diff options
Diffstat (limited to 'arch')
235 files changed, 4886 insertions, 2488 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index bf397a9f8ac2..ee8a9ad7bbd9 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -67,10 +67,6 @@ config GENERIC_BUST_SPINLOCK | |||
67 | config GENERIC_ISA_DMA | 67 | config GENERIC_ISA_DMA |
68 | bool | 68 | bool |
69 | 69 | ||
70 | config GENERIC_IOMAP | ||
71 | bool | ||
72 | default y | ||
73 | |||
74 | config FIQ | 70 | config FIQ |
75 | bool | 71 | bool |
76 | 72 | ||
@@ -202,6 +198,11 @@ config ARCH_H720X | |||
202 | help | 198 | help |
203 | This enables support for systems based on the Hynix HMS720x | 199 | This enables support for systems based on the Hynix HMS720x |
204 | 200 | ||
201 | config ARCH_AAEC2000 | ||
202 | bool "Agilent AAEC-2000 based" | ||
203 | help | ||
204 | This enables support for systems based on the Agilent AAEC-2000 | ||
205 | |||
205 | endchoice | 206 | endchoice |
206 | 207 | ||
207 | source "arch/arm/mach-clps711x/Kconfig" | 208 | source "arch/arm/mach-clps711x/Kconfig" |
@@ -234,6 +235,8 @@ source "arch/arm/mach-h720x/Kconfig" | |||
234 | 235 | ||
235 | source "arch/arm/mach-versatile/Kconfig" | 236 | source "arch/arm/mach-versatile/Kconfig" |
236 | 237 | ||
238 | source "arch/arm/mach-aaec2000/Kconfig" | ||
239 | |||
237 | # Definitions to make life easier | 240 | # Definitions to make life easier |
238 | config ARCH_ACORN | 241 | config ARCH_ACORN |
239 | bool | 242 | bool |
@@ -277,7 +280,7 @@ config ISA_DMA_API | |||
277 | default y | 280 | default y |
278 | 281 | ||
279 | config PCI | 282 | config PCI |
280 | bool "PCI support" if ARCH_INTEGRATOR_AP | 283 | bool "PCI support" if ARCH_INTEGRATOR_AP || ARCH_VERSATILE_PB |
281 | help | 284 | help |
282 | Find out whether you have a PCI motherboard. PCI is the name of a | 285 | Find out whether you have a PCI motherboard. PCI is the name of a |
283 | bus system, i.e. the way the CPU talks to the other stuff inside | 286 | bus system, i.e. the way the CPU talks to the other stuff inside |
@@ -497,7 +500,7 @@ source "drivers/cpufreq/Kconfig" | |||
497 | 500 | ||
498 | config CPU_FREQ_SA1100 | 501 | config CPU_FREQ_SA1100 |
499 | bool | 502 | bool |
500 | depends on CPU_FREQ && (SA1100_LART || SA1100_PLEB) | 503 | depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_H3800 || SA1100_LART || SA1100_PLEB || SA1100_BADGE4 || SA1100_HACKKIT) |
501 | default y | 504 | default y |
502 | 505 | ||
503 | config CPU_FREQ_SA1110 | 506 | config CPU_FREQ_SA1110 |
@@ -689,7 +692,9 @@ source "drivers/block/Kconfig" | |||
689 | 692 | ||
690 | source "drivers/acorn/block/Kconfig" | 693 | source "drivers/acorn/block/Kconfig" |
691 | 694 | ||
692 | if ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE | 695 | if PCMCIA || ARCH_CLPS7500 || ARCH_IOP3XX || ARCH_IXP4XX \ |
696 | || ARCH_L7200 || ARCH_LH7A40X || ARCH_PXA || ARCH_RPC \ | ||
697 | || ARCH_S3C2410 || ARCH_SA1100 || ARCH_SHARK || FOOTBRIDGE | ||
693 | source "drivers/ide/Kconfig" | 698 | source "drivers/ide/Kconfig" |
694 | endif | 699 | endif |
695 | 700 | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 2277e3d179cc..8330495e2448 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -97,6 +97,7 @@ textaddr-$(CONFIG_ARCH_FORTUNET) := 0xc0008000 | |||
97 | machine-$(CONFIG_ARCH_VERSATILE) := versatile | 97 | machine-$(CONFIG_ARCH_VERSATILE) := versatile |
98 | machine-$(CONFIG_ARCH_IMX) := imx | 98 | machine-$(CONFIG_ARCH_IMX) := imx |
99 | machine-$(CONFIG_ARCH_H720X) := h720x | 99 | machine-$(CONFIG_ARCH_H720X) := h720x |
100 | machine-$(CONFIG_ARCH_AAEC2000) := aaec2000 | ||
100 | 101 | ||
101 | ifeq ($(CONFIG_ARCH_EBSA110),y) | 102 | ifeq ($(CONFIG_ARCH_EBSA110),y) |
102 | # This is what happens if you forget the IOCS16 line. | 103 | # This is what happens if you forget the IOCS16 line. |
diff --git a/arch/arm/boot/compressed/head-xscale.S b/arch/arm/boot/compressed/head-xscale.S index 665bd2c20743..d3fe2533907e 100644 --- a/arch/arm/boot/compressed/head-xscale.S +++ b/arch/arm/boot/compressed/head-xscale.S | |||
@@ -47,3 +47,10 @@ __XScale_start: | |||
47 | orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00) | 47 | orr r7, r7, #(MACH_TYPE_GTWX5715 & 0xff00) |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifdef CONFIG_ARCH_IXP2000 | ||
51 | mov r1, #-1 | ||
52 | mov r0, #0xd6000000 | ||
53 | str r1, [r0, #0x14] | ||
54 | str r1, [r0, #0x18] | ||
55 | #endif | ||
56 | |||
diff --git a/arch/arm/common/amba.c b/arch/arm/common/amba.c index a0507f8c33fe..c6beb751f2a9 100644 --- a/arch/arm/common/amba.c +++ b/arch/arm/common/amba.c | |||
@@ -169,7 +169,7 @@ static void amba_device_release(struct device *dev) | |||
169 | } | 169 | } |
170 | 170 | ||
171 | #define amba_attr(name,fmt,arg...) \ | 171 | #define amba_attr(name,fmt,arg...) \ |
172 | static ssize_t show_##name(struct device *_dev, char *buf) \ | 172 | static ssize_t show_##name(struct device *_dev, struct device_attribute *attr, char *buf) \ |
173 | { \ | 173 | { \ |
174 | struct amba_device *dev = to_amba_device(_dev); \ | 174 | struct amba_device *dev = to_amba_device(_dev); \ |
175 | return sprintf(buf, fmt, arg); \ | 175 | return sprintf(buf, fmt, arg); \ |
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 5797b1b100a1..9d63a01214eb 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -30,6 +30,8 @@ | |||
30 | #include <linux/dmapool.h> | 30 | #include <linux/dmapool.h> |
31 | #include <linux/list.h> | 31 | #include <linux/list.h> |
32 | 32 | ||
33 | #include <asm/cacheflush.h> | ||
34 | |||
33 | #undef DEBUG | 35 | #undef DEBUG |
34 | 36 | ||
35 | #undef STATS | 37 | #undef STATS |
@@ -302,12 +304,24 @@ unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | |||
302 | 304 | ||
303 | DO_STATS ( device_info->bounce_count++ ); | 305 | DO_STATS ( device_info->bounce_count++ ); |
304 | 306 | ||
305 | if ((dir == DMA_FROM_DEVICE) || | 307 | if (dir == DMA_FROM_DEVICE || dir == DMA_BIDIRECTIONAL) { |
306 | (dir == DMA_BIDIRECTIONAL)) { | 308 | unsigned long ptr; |
309 | |||
307 | dev_dbg(dev, | 310 | dev_dbg(dev, |
308 | "%s: copy back safe %p to unsafe %p size %d\n", | 311 | "%s: copy back safe %p to unsafe %p size %d\n", |
309 | __func__, buf->safe, buf->ptr, size); | 312 | __func__, buf->safe, buf->ptr, size); |
310 | memcpy(buf->ptr, buf->safe, size); | 313 | memcpy(buf->ptr, buf->safe, size); |
314 | |||
315 | /* | ||
316 | * DMA buffers must have the same cache properties | ||
317 | * as if they were really used for DMA - which means | ||
318 | * data must be written back to RAM. Note that | ||
319 | * we don't use dmac_flush_range() here for the | ||
320 | * bidirectional case because we know the cache | ||
321 | * lines will be coherent with the data written. | ||
322 | */ | ||
323 | ptr = (unsigned long)buf->ptr; | ||
324 | dmac_clean_range(ptr, ptr + size); | ||
311 | } | 325 | } |
312 | free_safe_buffer(device_info, buf); | 326 | free_safe_buffer(device_info, buf); |
313 | } | 327 | } |
diff --git a/arch/arm/common/sharpsl_param.c b/arch/arm/common/sharpsl_param.c index c2c557a224c2..c94864c5b1af 100644 --- a/arch/arm/common/sharpsl_param.c +++ b/arch/arm/common/sharpsl_param.c | |||
@@ -22,7 +22,7 @@ | |||
22 | * them early in the boot process, then pass them to the appropriate drivers. | 22 | * them early in the boot process, then pass them to the appropriate drivers. |
23 | * Not all devices use all paramaters but the format is common to all. | 23 | * Not all devices use all paramaters but the format is common to all. |
24 | */ | 24 | */ |
25 | #ifdef ARCH_SA1100 | 25 | #ifdef CONFIG_ARCH_SA1100 |
26 | #define PARAM_BASE 0xe8ffc000 | 26 | #define PARAM_BASE 0xe8ffc000 |
27 | #else | 27 | #else |
28 | #define PARAM_BASE 0xa0000a00 | 28 | #define PARAM_BASE 0xa0000a00 |
diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig index 2b4059d2f8e4..5d92af975d87 100644 --- a/arch/arm/configs/badge4_defconfig +++ b/arch/arm/configs/badge4_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.12-rc1-bk2 | 3 | # Linux kernel version: 2.6.12-rc6-git3 |
4 | # Sat Mar 26 21:32:26 2005 | 4 | # Thu Jun 9 19:00:50 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -16,6 +16,7 @@ CONFIG_GENERIC_IOMAP=y | |||
16 | CONFIG_EXPERIMENTAL=y | 16 | CONFIG_EXPERIMENTAL=y |
17 | CONFIG_CLEAN_COMPILE=y | 17 | CONFIG_CLEAN_COMPILE=y |
18 | CONFIG_BROKEN_ON_SMP=y | 18 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -34,6 +35,8 @@ CONFIG_EMBEDDED=y | |||
34 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
35 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
36 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
37 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
38 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
39 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -109,7 +112,6 @@ CONFIG_CPU_ABRT_EV4=y | |||
109 | CONFIG_CPU_CACHE_V4WB=y | 112 | CONFIG_CPU_CACHE_V4WB=y |
110 | CONFIG_CPU_CACHE_VIVT=y | 113 | CONFIG_CPU_CACHE_VIVT=y |
111 | CONFIG_CPU_TLB_V4WB=y | 114 | CONFIG_CPU_TLB_V4WB=y |
112 | CONFIG_CPU_MINICACHE=y | ||
113 | 115 | ||
114 | # | 116 | # |
115 | # Processor Features | 117 | # Processor Features |
@@ -122,6 +124,7 @@ CONFIG_FORCE_MAX_ZONEORDER=9 | |||
122 | # Bus support | 124 | # Bus support |
123 | # | 125 | # |
124 | CONFIG_ISA=y | 126 | CONFIG_ISA=y |
127 | CONFIG_ISA_DMA_API=y | ||
125 | 128 | ||
126 | # | 129 | # |
127 | # PCCARD (PCMCIA/CardBus) support | 130 | # PCCARD (PCMCIA/CardBus) support |
@@ -131,6 +134,7 @@ CONFIG_ISA=y | |||
131 | # | 134 | # |
132 | # Kernel Features | 135 | # Kernel Features |
133 | # | 136 | # |
137 | # CONFIG_SMP is not set | ||
134 | # CONFIG_PREEMPT is not set | 138 | # CONFIG_PREEMPT is not set |
135 | CONFIG_DISCONTIGMEM=y | 139 | CONFIG_DISCONTIGMEM=y |
136 | # CONFIG_LEDS is not set | 140 | # CONFIG_LEDS is not set |
@@ -152,12 +156,14 @@ CONFIG_CPU_FREQ_TABLE=y | |||
152 | # CONFIG_CPU_FREQ_DEBUG is not set | 156 | # CONFIG_CPU_FREQ_DEBUG is not set |
153 | CONFIG_CPU_FREQ_STAT=y | 157 | CONFIG_CPU_FREQ_STAT=y |
154 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 158 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
155 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 159 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set |
156 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 160 | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y |
157 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | 161 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y |
158 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | 162 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set |
159 | # CONFIG_CPU_FREQ_GOV_USERSPACE is not set | 163 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
160 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set | 164 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set |
165 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set | ||
166 | CONFIG_CPU_FREQ_SA1100=y | ||
161 | 167 | ||
162 | # | 168 | # |
163 | # Floating point emulation | 169 | # Floating point emulation |
@@ -294,7 +300,6 @@ CONFIG_PARPORT_NOT_PC=y | |||
294 | # | 300 | # |
295 | # Block devices | 301 | # Block devices |
296 | # | 302 | # |
297 | # CONFIG_BLK_DEV_FD is not set | ||
298 | # CONFIG_BLK_DEV_XD is not set | 303 | # CONFIG_BLK_DEV_XD is not set |
299 | # CONFIG_PARIDE is not set | 304 | # CONFIG_PARIDE is not set |
300 | # CONFIG_BLK_DEV_COW_COMMON is not set | 305 | # CONFIG_BLK_DEV_COW_COMMON is not set |
@@ -428,7 +433,6 @@ CONFIG_NET=y | |||
428 | # | 433 | # |
429 | CONFIG_PACKET=y | 434 | CONFIG_PACKET=y |
430 | # CONFIG_PACKET_MMAP is not set | 435 | # CONFIG_PACKET_MMAP is not set |
431 | # CONFIG_NETLINK_DEV is not set | ||
432 | CONFIG_UNIX=y | 436 | CONFIG_UNIX=y |
433 | # CONFIG_NET_KEY is not set | 437 | # CONFIG_NET_KEY is not set |
434 | CONFIG_INET=y | 438 | CONFIG_INET=y |
@@ -526,6 +530,7 @@ CONFIG_IRDA_ULTRA=y | |||
526 | # CONFIG_SMC_IRCC_FIR is not set | 530 | # CONFIG_SMC_IRCC_FIR is not set |
527 | # CONFIG_ALI_FIR is not set | 531 | # CONFIG_ALI_FIR is not set |
528 | CONFIG_SA1100_FIR=y | 532 | CONFIG_SA1100_FIR=y |
533 | # CONFIG_VIA_FIR is not set | ||
529 | CONFIG_BT=m | 534 | CONFIG_BT=m |
530 | CONFIG_BT_L2CAP=m | 535 | CONFIG_BT_L2CAP=m |
531 | # CONFIG_BT_SCO is not set | 536 | # CONFIG_BT_SCO is not set |
@@ -618,7 +623,6 @@ CONFIG_NET_WIRELESS=y | |||
618 | # | 623 | # |
619 | # CONFIG_SERIO is not set | 624 | # CONFIG_SERIO is not set |
620 | # CONFIG_GAMEPORT is not set | 625 | # CONFIG_GAMEPORT is not set |
621 | CONFIG_SOUND_GAMEPORT=y | ||
622 | 626 | ||
623 | # | 627 | # |
624 | # Character devices | 628 | # Character devices |
@@ -687,7 +691,6 @@ CONFIG_RTC=m | |||
687 | # | 691 | # |
688 | # TPM devices | 692 | # TPM devices |
689 | # | 693 | # |
690 | # CONFIG_TCG_TPM is not set | ||
691 | 694 | ||
692 | # | 695 | # |
693 | # I2C support | 696 | # I2C support |
@@ -736,6 +739,7 @@ CONFIG_I2C_ELEKTOR=m | |||
736 | # CONFIG_SENSORS_LM85 is not set | 739 | # CONFIG_SENSORS_LM85 is not set |
737 | # CONFIG_SENSORS_LM87 is not set | 740 | # CONFIG_SENSORS_LM87 is not set |
738 | # CONFIG_SENSORS_LM90 is not set | 741 | # CONFIG_SENSORS_LM90 is not set |
742 | # CONFIG_SENSORS_LM92 is not set | ||
739 | # CONFIG_SENSORS_MAX1619 is not set | 743 | # CONFIG_SENSORS_MAX1619 is not set |
740 | # CONFIG_SENSORS_PC87360 is not set | 744 | # CONFIG_SENSORS_PC87360 is not set |
741 | # CONFIG_SENSORS_SMSC47B397 is not set | 745 | # CONFIG_SENSORS_SMSC47B397 is not set |
@@ -747,6 +751,7 @@ CONFIG_I2C_ELEKTOR=m | |||
747 | # | 751 | # |
748 | # Other I2C Chip support | 752 | # Other I2C Chip support |
749 | # | 753 | # |
754 | # CONFIG_SENSORS_DS1337 is not set | ||
750 | # CONFIG_SENSORS_EEPROM is not set | 755 | # CONFIG_SENSORS_EEPROM is not set |
751 | # CONFIG_SENSORS_PCF8574 is not set | 756 | # CONFIG_SENSORS_PCF8574 is not set |
752 | # CONFIG_SENSORS_PCF8591 is not set | 757 | # CONFIG_SENSORS_PCF8591 is not set |
@@ -871,7 +876,6 @@ CONFIG_USB_PRINTER=m | |||
871 | # | 876 | # |
872 | CONFIG_USB_STORAGE=y | 877 | CONFIG_USB_STORAGE=y |
873 | CONFIG_USB_STORAGE_DEBUG=y | 878 | CONFIG_USB_STORAGE_DEBUG=y |
874 | # CONFIG_USB_STORAGE_RW_DETECT is not set | ||
875 | # CONFIG_USB_STORAGE_DATAFAB is not set | 879 | # CONFIG_USB_STORAGE_DATAFAB is not set |
876 | # CONFIG_USB_STORAGE_FREECOM is not set | 880 | # CONFIG_USB_STORAGE_FREECOM is not set |
877 | # CONFIG_USB_STORAGE_ISD200 is not set | 881 | # CONFIG_USB_STORAGE_ISD200 is not set |
@@ -954,9 +958,11 @@ CONFIG_USB_USS720=m | |||
954 | # | 958 | # |
955 | CONFIG_USB_SERIAL=m | 959 | CONFIG_USB_SERIAL=m |
956 | CONFIG_USB_SERIAL_GENERIC=y | 960 | CONFIG_USB_SERIAL_GENERIC=y |
961 | # CONFIG_USB_SERIAL_AIRPRIME is not set | ||
957 | CONFIG_USB_SERIAL_BELKIN=m | 962 | CONFIG_USB_SERIAL_BELKIN=m |
958 | CONFIG_USB_SERIAL_WHITEHEAT=m | 963 | CONFIG_USB_SERIAL_WHITEHEAT=m |
959 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m | 964 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m |
965 | # CONFIG_USB_SERIAL_CP2101 is not set | ||
960 | # CONFIG_USB_SERIAL_CYPRESS_M8 is not set | 966 | # CONFIG_USB_SERIAL_CYPRESS_M8 is not set |
961 | CONFIG_USB_SERIAL_EMPEG=m | 967 | CONFIG_USB_SERIAL_EMPEG=m |
962 | CONFIG_USB_SERIAL_FTDI_SIO=m | 968 | CONFIG_USB_SERIAL_FTDI_SIO=m |
@@ -985,6 +991,7 @@ CONFIG_USB_SERIAL_KEYSPAN=m | |||
985 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | 991 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set |
986 | CONFIG_USB_SERIAL_MCT_U232=m | 992 | CONFIG_USB_SERIAL_MCT_U232=m |
987 | CONFIG_USB_SERIAL_PL2303=m | 993 | CONFIG_USB_SERIAL_PL2303=m |
994 | # CONFIG_USB_SERIAL_HP4X is not set | ||
988 | # CONFIG_USB_SERIAL_SAFE is not set | 995 | # CONFIG_USB_SERIAL_SAFE is not set |
989 | # CONFIG_USB_SERIAL_TI is not set | 996 | # CONFIG_USB_SERIAL_TI is not set |
990 | CONFIG_USB_SERIAL_CYBERJACK=m | 997 | CONFIG_USB_SERIAL_CYBERJACK=m |
diff --git a/arch/arm/configs/enp2611_defconfig b/arch/arm/configs/enp2611_defconfig index e8f9fccffe84..06fae4b62774 100644 --- a/arch/arm/configs/enp2611_defconfig +++ b/arch/arm/configs/enp2611_defconfig | |||
@@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0 | |||
50 | # | 50 | # |
51 | # Loadable module support | 51 | # Loadable module support |
52 | # | 52 | # |
53 | # CONFIG_MODULES is not set | 53 | CONFIG_MODULES=y |
54 | CONFIG_MODULE_UNLOAD=y | ||
55 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
56 | CONFIG_OBSOLETE_MODPARM=y | ||
57 | # CONFIG_MODVERSIONS is not set | ||
58 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
59 | CONFIG_KMOD=y | ||
54 | 60 | ||
55 | # | 61 | # |
56 | # System Type | 62 | # System Type |
diff --git a/arch/arm/configs/h3600_defconfig b/arch/arm/configs/h3600_defconfig index b4e297dd54b2..b9de07de80fe 100644 --- a/arch/arm/configs/h3600_defconfig +++ b/arch/arm/configs/h3600_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.12-rc1-bk2 | 3 | # Linux kernel version: 2.6.12-rc4 |
4 | # Mon Mar 28 00:02:26 2005 | 4 | # Thu Jun 9 01:59:03 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -16,6 +16,7 @@ CONFIG_GENERIC_IOMAP=y | |||
16 | CONFIG_EXPERIMENTAL=y | 16 | CONFIG_EXPERIMENTAL=y |
17 | CONFIG_CLEAN_COMPILE=y | 17 | CONFIG_CLEAN_COMPILE=y |
18 | CONFIG_BROKEN_ON_SMP=y | 18 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -33,6 +34,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
33 | # CONFIG_EMBEDDED is not set | 34 | # CONFIG_EMBEDDED is not set |
34 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
35 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 36 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
37 | CONFIG_PRINTK=y | ||
38 | CONFIG_BUG=y | ||
36 | CONFIG_BASE_FULL=y | 39 | CONFIG_BASE_FULL=y |
37 | CONFIG_FUTEX=y | 40 | CONFIG_FUTEX=y |
38 | CONFIG_EPOLL=y | 41 | CONFIG_EPOLL=y |
@@ -120,6 +123,7 @@ CONFIG_CPU_MINICACHE=y | |||
120 | # Bus support | 123 | # Bus support |
121 | # | 124 | # |
122 | CONFIG_ISA=y | 125 | CONFIG_ISA=y |
126 | CONFIG_ISA_DMA_API=y | ||
123 | 127 | ||
124 | # | 128 | # |
125 | # PCCARD (PCMCIA/CardBus) support | 129 | # PCCARD (PCMCIA/CardBus) support |
@@ -138,6 +142,7 @@ CONFIG_PCMCIA_SA1100=y | |||
138 | # | 142 | # |
139 | # Kernel Features | 143 | # Kernel Features |
140 | # | 144 | # |
145 | # CONFIG_SMP is not set | ||
141 | # CONFIG_PREEMPT is not set | 146 | # CONFIG_PREEMPT is not set |
142 | CONFIG_DISCONTIGMEM=y | 147 | CONFIG_DISCONTIGMEM=y |
143 | # CONFIG_LEDS is not set | 148 | # CONFIG_LEDS is not set |
@@ -159,12 +164,13 @@ CONFIG_CPU_FREQ_TABLE=y | |||
159 | # CONFIG_CPU_FREQ_DEBUG is not set | 164 | # CONFIG_CPU_FREQ_DEBUG is not set |
160 | CONFIG_CPU_FREQ_STAT=y | 165 | CONFIG_CPU_FREQ_STAT=y |
161 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 166 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
162 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 167 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set |
163 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 168 | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y |
164 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | 169 | # CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set |
165 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | 170 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set |
166 | # CONFIG_CPU_FREQ_GOV_USERSPACE is not set | 171 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
167 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set | 172 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set |
173 | CONFIG_CPU_FREQ_SA1100=y | ||
168 | 174 | ||
169 | # | 175 | # |
170 | # Floating point emulation | 176 | # Floating point emulation |
@@ -298,7 +304,6 @@ CONFIG_MTD_SA1100=y | |||
298 | # | 304 | # |
299 | # Block devices | 305 | # Block devices |
300 | # | 306 | # |
301 | # CONFIG_BLK_DEV_FD is not set | ||
302 | # CONFIG_BLK_DEV_XD is not set | 307 | # CONFIG_BLK_DEV_XD is not set |
303 | # CONFIG_BLK_DEV_COW_COMMON is not set | 308 | # CONFIG_BLK_DEV_COW_COMMON is not set |
304 | CONFIG_BLK_DEV_LOOP=m | 309 | CONFIG_BLK_DEV_LOOP=m |
@@ -379,7 +384,6 @@ CONFIG_NET=y | |||
379 | # Networking options | 384 | # Networking options |
380 | # | 385 | # |
381 | # CONFIG_PACKET is not set | 386 | # CONFIG_PACKET is not set |
382 | # CONFIG_NETLINK_DEV is not set | ||
383 | CONFIG_UNIX=y | 387 | CONFIG_UNIX=y |
384 | # CONFIG_NET_KEY is not set | 388 | # CONFIG_NET_KEY is not set |
385 | CONFIG_INET=y | 389 | CONFIG_INET=y |
@@ -476,6 +480,7 @@ CONFIG_IRCOMM=m | |||
476 | # CONFIG_SMC_IRCC_FIR is not set | 480 | # CONFIG_SMC_IRCC_FIR is not set |
477 | # CONFIG_ALI_FIR is not set | 481 | # CONFIG_ALI_FIR is not set |
478 | CONFIG_SA1100_FIR=m | 482 | CONFIG_SA1100_FIR=m |
483 | # CONFIG_VIA_FIR is not set | ||
479 | # CONFIG_BT is not set | 484 | # CONFIG_BT is not set |
480 | CONFIG_NETDEVICES=y | 485 | CONFIG_NETDEVICES=y |
481 | # CONFIG_DUMMY is not set | 486 | # CONFIG_DUMMY is not set |
@@ -647,7 +652,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
647 | # | 652 | # |
648 | # TPM devices | 653 | # TPM devices |
649 | # | 654 | # |
650 | # CONFIG_TCG_TPM is not set | ||
651 | 655 | ||
652 | # | 656 | # |
653 | # I2C support | 657 | # I2C support |
@@ -676,9 +680,11 @@ CONFIG_FB_CFB_FILLRECT=y | |||
676 | CONFIG_FB_CFB_COPYAREA=y | 680 | CONFIG_FB_CFB_COPYAREA=y |
677 | CONFIG_FB_CFB_IMAGEBLIT=y | 681 | CONFIG_FB_CFB_IMAGEBLIT=y |
678 | CONFIG_FB_SOFT_CURSOR=y | 682 | CONFIG_FB_SOFT_CURSOR=y |
683 | # CONFIG_FB_MACMODES is not set | ||
679 | # CONFIG_FB_MODE_HELPERS is not set | 684 | # CONFIG_FB_MODE_HELPERS is not set |
680 | # CONFIG_FB_TILEBLITTING is not set | 685 | # CONFIG_FB_TILEBLITTING is not set |
681 | CONFIG_FB_SA1100=y | 686 | CONFIG_FB_SA1100=y |
687 | # CONFIG_FB_S1D13XXX is not set | ||
682 | # CONFIG_FB_VIRTUAL is not set | 688 | # CONFIG_FB_VIRTUAL is not set |
683 | 689 | ||
684 | # | 690 | # |
diff --git a/arch/arm/configs/hackkit_defconfig b/arch/arm/configs/hackkit_defconfig index 6987c8c5ddb4..fb41a36a5a68 100644 --- a/arch/arm/configs/hackkit_defconfig +++ b/arch/arm/configs/hackkit_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.12-rc1-bk2 | 3 | # Linux kernel version: 2.6.12-rc6-git3 |
4 | # Mon Mar 28 00:22:34 2005 | 4 | # Thu Jun 9 20:58:58 2005 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -16,6 +16,7 @@ CONFIG_GENERIC_IOMAP=y | |||
16 | CONFIG_EXPERIMENTAL=y | 16 | CONFIG_EXPERIMENTAL=y |
17 | CONFIG_CLEAN_COMPILE=y | 17 | CONFIG_CLEAN_COMPILE=y |
18 | CONFIG_BROKEN_ON_SMP=y | 18 | CONFIG_BROKEN_ON_SMP=y |
19 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
19 | 20 | ||
20 | # | 21 | # |
21 | # General setup | 22 | # General setup |
@@ -34,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
34 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
35 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
36 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
37 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
38 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
39 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -109,7 +112,6 @@ CONFIG_CPU_ABRT_EV4=y | |||
109 | CONFIG_CPU_CACHE_V4WB=y | 112 | CONFIG_CPU_CACHE_V4WB=y |
110 | CONFIG_CPU_CACHE_VIVT=y | 113 | CONFIG_CPU_CACHE_VIVT=y |
111 | CONFIG_CPU_TLB_V4WB=y | 114 | CONFIG_CPU_TLB_V4WB=y |
112 | CONFIG_CPU_MINICACHE=y | ||
113 | 115 | ||
114 | # | 116 | # |
115 | # Processor Features | 117 | # Processor Features |
@@ -119,6 +121,7 @@ CONFIG_CPU_MINICACHE=y | |||
119 | # Bus support | 121 | # Bus support |
120 | # | 122 | # |
121 | CONFIG_ISA=y | 123 | CONFIG_ISA=y |
124 | CONFIG_ISA_DMA_API=y | ||
122 | 125 | ||
123 | # | 126 | # |
124 | # PCCARD (PCMCIA/CardBus) support | 127 | # PCCARD (PCMCIA/CardBus) support |
@@ -128,6 +131,7 @@ CONFIG_ISA=y | |||
128 | # | 131 | # |
129 | # Kernel Features | 132 | # Kernel Features |
130 | # | 133 | # |
134 | # CONFIG_SMP is not set | ||
131 | # CONFIG_PREEMPT is not set | 135 | # CONFIG_PREEMPT is not set |
132 | CONFIG_DISCONTIGMEM=y | 136 | CONFIG_DISCONTIGMEM=y |
133 | CONFIG_LEDS=y | 137 | CONFIG_LEDS=y |
@@ -151,12 +155,14 @@ CONFIG_CPU_FREQ_TABLE=y | |||
151 | # CONFIG_CPU_FREQ_DEBUG is not set | 155 | # CONFIG_CPU_FREQ_DEBUG is not set |
152 | CONFIG_CPU_FREQ_STAT=y | 156 | CONFIG_CPU_FREQ_STAT=y |
153 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set | 157 | # CONFIG_CPU_FREQ_STAT_DETAILS is not set |
154 | CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y | 158 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set |
155 | # CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set | 159 | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y |
156 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | 160 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y |
157 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set | 161 | # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set |
158 | # CONFIG_CPU_FREQ_GOV_USERSPACE is not set | 162 | CONFIG_CPU_FREQ_GOV_USERSPACE=y |
159 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set | 163 | # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set |
164 | # CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set | ||
165 | CONFIG_CPU_FREQ_SA1100=y | ||
160 | 166 | ||
161 | # | 167 | # |
162 | # Floating point emulation | 168 | # Floating point emulation |
@@ -280,7 +286,6 @@ CONFIG_MTD_CFI_UTIL=y | |||
280 | # | 286 | # |
281 | # Block devices | 287 | # Block devices |
282 | # | 288 | # |
283 | # CONFIG_BLK_DEV_FD is not set | ||
284 | # CONFIG_BLK_DEV_XD is not set | 289 | # CONFIG_BLK_DEV_XD is not set |
285 | # CONFIG_BLK_DEV_COW_COMMON is not set | 290 | # CONFIG_BLK_DEV_COW_COMMON is not set |
286 | # CONFIG_BLK_DEV_LOOP is not set | 291 | # CONFIG_BLK_DEV_LOOP is not set |
@@ -338,7 +343,6 @@ CONFIG_NET=y | |||
338 | # | 343 | # |
339 | CONFIG_PACKET=y | 344 | CONFIG_PACKET=y |
340 | # CONFIG_PACKET_MMAP is not set | 345 | # CONFIG_PACKET_MMAP is not set |
341 | # CONFIG_NETLINK_DEV is not set | ||
342 | CONFIG_UNIX=y | 346 | CONFIG_UNIX=y |
343 | # CONFIG_NET_KEY is not set | 347 | # CONFIG_NET_KEY is not set |
344 | CONFIG_INET=y | 348 | CONFIG_INET=y |
@@ -484,7 +488,6 @@ CONFIG_SERIO=y | |||
484 | CONFIG_SERIO_SERPORT=y | 488 | CONFIG_SERIO_SERPORT=y |
485 | # CONFIG_SERIO_RAW is not set | 489 | # CONFIG_SERIO_RAW is not set |
486 | # CONFIG_GAMEPORT is not set | 490 | # CONFIG_GAMEPORT is not set |
487 | CONFIG_SOUND_GAMEPORT=y | ||
488 | 491 | ||
489 | # | 492 | # |
490 | # Character devices | 493 | # Character devices |
@@ -533,7 +536,6 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
533 | # | 536 | # |
534 | # TPM devices | 537 | # TPM devices |
535 | # | 538 | # |
536 | # CONFIG_TCG_TPM is not set | ||
537 | 539 | ||
538 | # | 540 | # |
539 | # I2C support | 541 | # I2C support |
diff --git a/arch/arm/configs/ixdp2400_defconfig b/arch/arm/configs/ixdp2400_defconfig index 4fd663ecbe39..810a450a55d2 100644 --- a/arch/arm/configs/ixdp2400_defconfig +++ b/arch/arm/configs/ixdp2400_defconfig | |||
@@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0 | |||
50 | # | 50 | # |
51 | # Loadable module support | 51 | # Loadable module support |
52 | # | 52 | # |
53 | # CONFIG_MODULES is not set | 53 | CONFIG_MODULES=y |
54 | CONFIG_MODULE_UNLOAD=y | ||
55 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
56 | CONFIG_OBSOLETE_MODPARM=y | ||
57 | # CONFIG_MODVERSIONS is not set | ||
58 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
59 | CONFIG_KMOD=y | ||
54 | 60 | ||
55 | # | 61 | # |
56 | # System Type | 62 | # System Type |
diff --git a/arch/arm/configs/ixdp2401_defconfig b/arch/arm/configs/ixdp2401_defconfig index 6f51c98084a3..72e1b940e975 100644 --- a/arch/arm/configs/ixdp2401_defconfig +++ b/arch/arm/configs/ixdp2401_defconfig | |||
@@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0 | |||
50 | # | 50 | # |
51 | # Loadable module support | 51 | # Loadable module support |
52 | # | 52 | # |
53 | # CONFIG_MODULES is not set | 53 | CONFIG_MODULES=y |
54 | CONFIG_MODULE_UNLOAD=y | ||
55 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
56 | CONFIG_OBSOLETE_MODPARM=y | ||
57 | # CONFIG_MODVERSIONS is not set | ||
58 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
59 | CONFIG_KMOD=y | ||
54 | 60 | ||
55 | # | 61 | # |
56 | # System Type | 62 | # System Type |
diff --git a/arch/arm/configs/ixdp2800_defconfig b/arch/arm/configs/ixdp2800_defconfig index 7be3521f91fc..1592e45f0278 100644 --- a/arch/arm/configs/ixdp2800_defconfig +++ b/arch/arm/configs/ixdp2800_defconfig | |||
@@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0 | |||
50 | # | 50 | # |
51 | # Loadable module support | 51 | # Loadable module support |
52 | # | 52 | # |
53 | # CONFIG_MODULES is not set | 53 | CONFIG_MODULES=y |
54 | CONFIG_MODULE_UNLOAD=y | ||
55 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
56 | CONFIG_OBSOLETE_MODPARM=y | ||
57 | # CONFIG_MODVERSIONS is not set | ||
58 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
59 | CONFIG_KMOD=y | ||
54 | 60 | ||
55 | # | 61 | # |
56 | # System Type | 62 | # System Type |
diff --git a/arch/arm/configs/ixdp2801_defconfig b/arch/arm/configs/ixdp2801_defconfig index cd84a20f30f1..f1afe3d09ec6 100644 --- a/arch/arm/configs/ixdp2801_defconfig +++ b/arch/arm/configs/ixdp2801_defconfig | |||
@@ -50,7 +50,13 @@ CONFIG_BASE_SMALL=0 | |||
50 | # | 50 | # |
51 | # Loadable module support | 51 | # Loadable module support |
52 | # | 52 | # |
53 | # CONFIG_MODULES is not set | 53 | CONFIG_MODULES=y |
54 | CONFIG_MODULE_UNLOAD=y | ||
55 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
56 | CONFIG_OBSOLETE_MODPARM=y | ||
57 | # CONFIG_MODVERSIONS is not set | ||
58 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
59 | CONFIG_KMOD=y | ||
54 | 60 | ||
55 | # | 61 | # |
56 | # System Type | 62 | # System Type |
diff --git a/arch/arm/kernel/Makefile b/arch/arm/kernel/Makefile index 4a2af55e134b..3e1b0327e4d7 100644 --- a/arch/arm/kernel/Makefile +++ b/arch/arm/kernel/Makefile | |||
@@ -6,7 +6,7 @@ AFLAGS_head.o := -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR) | |||
6 | 6 | ||
7 | # Object file lists. | 7 | # Object file lists. |
8 | 8 | ||
9 | obj-y := arch.o compat.o dma.o entry-armv.o entry-common.o irq.o \ | 9 | obj-y := compat.o dma.o entry-armv.o entry-common.o irq.o \ |
10 | process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \ | 10 | process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \ |
11 | time.o traps.o | 11 | time.o traps.o |
12 | 12 | ||
diff --git a/arch/arm/kernel/arch.c b/arch/arm/kernel/arch.c deleted file mode 100644 index 4e02fbeb10a6..000000000000 --- a/arch/arm/kernel/arch.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/kernel/arch.c | ||
3 | * | ||
4 | * Architecture specific fixups. | ||
5 | */ | ||
6 | #include <linux/config.h> | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/types.h> | ||
9 | |||
10 | #include <asm/elf.h> | ||
11 | #include <asm/page.h> | ||
12 | #include <asm/setup.h> | ||
13 | #include <asm/mach/arch.h> | ||
14 | |||
15 | unsigned int vram_size; | ||
16 | |||
17 | #ifdef CONFIG_ARCH_ACORN | ||
18 | |||
19 | unsigned int memc_ctrl_reg; | ||
20 | unsigned int number_mfm_drives; | ||
21 | |||
22 | static int __init parse_tag_acorn(const struct tag *tag) | ||
23 | { | ||
24 | memc_ctrl_reg = tag->u.acorn.memc_control_reg; | ||
25 | number_mfm_drives = tag->u.acorn.adfsdrives; | ||
26 | |||
27 | switch (tag->u.acorn.vram_pages) { | ||
28 | case 512: | ||
29 | vram_size += PAGE_SIZE * 256; | ||
30 | case 256: | ||
31 | vram_size += PAGE_SIZE * 256; | ||
32 | default: | ||
33 | break; | ||
34 | } | ||
35 | #if 0 | ||
36 | if (vram_size) { | ||
37 | desc->video_start = 0x02000000; | ||
38 | desc->video_end = 0x02000000 + vram_size; | ||
39 | } | ||
40 | #endif | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | __tagtable(ATAG_ACORN, parse_tag_acorn); | ||
45 | |||
46 | #endif | ||
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 3dc15b131f53..6540db691338 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -866,19 +866,19 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot) | |||
866 | return ec; | 866 | return ec; |
867 | } | 867 | } |
868 | 868 | ||
869 | static ssize_t ecard_show_irq(struct device *dev, char *buf) | 869 | static ssize_t ecard_show_irq(struct device *dev, struct device_attribute *attr, char *buf) |
870 | { | 870 | { |
871 | struct expansion_card *ec = ECARD_DEV(dev); | 871 | struct expansion_card *ec = ECARD_DEV(dev); |
872 | return sprintf(buf, "%u\n", ec->irq); | 872 | return sprintf(buf, "%u\n", ec->irq); |
873 | } | 873 | } |
874 | 874 | ||
875 | static ssize_t ecard_show_dma(struct device *dev, char *buf) | 875 | static ssize_t ecard_show_dma(struct device *dev, struct device_attribute *attr, char *buf) |
876 | { | 876 | { |
877 | struct expansion_card *ec = ECARD_DEV(dev); | 877 | struct expansion_card *ec = ECARD_DEV(dev); |
878 | return sprintf(buf, "%u\n", ec->dma); | 878 | return sprintf(buf, "%u\n", ec->dma); |
879 | } | 879 | } |
880 | 880 | ||
881 | static ssize_t ecard_show_resources(struct device *dev, char *buf) | 881 | static ssize_t ecard_show_resources(struct device *dev, struct device_attribute *attr, char *buf) |
882 | { | 882 | { |
883 | struct expansion_card *ec = ECARD_DEV(dev); | 883 | struct expansion_card *ec = ECARD_DEV(dev); |
884 | char *str = buf; | 884 | char *str = buf; |
@@ -893,19 +893,19 @@ static ssize_t ecard_show_resources(struct device *dev, char *buf) | |||
893 | return str - buf; | 893 | return str - buf; |
894 | } | 894 | } |
895 | 895 | ||
896 | static ssize_t ecard_show_vendor(struct device *dev, char *buf) | 896 | static ssize_t ecard_show_vendor(struct device *dev, struct device_attribute *attr, char *buf) |
897 | { | 897 | { |
898 | struct expansion_card *ec = ECARD_DEV(dev); | 898 | struct expansion_card *ec = ECARD_DEV(dev); |
899 | return sprintf(buf, "%u\n", ec->cid.manufacturer); | 899 | return sprintf(buf, "%u\n", ec->cid.manufacturer); |
900 | } | 900 | } |
901 | 901 | ||
902 | static ssize_t ecard_show_device(struct device *dev, char *buf) | 902 | static ssize_t ecard_show_device(struct device *dev, struct device_attribute *attr, char *buf) |
903 | { | 903 | { |
904 | struct expansion_card *ec = ECARD_DEV(dev); | 904 | struct expansion_card *ec = ECARD_DEV(dev); |
905 | return sprintf(buf, "%u\n", ec->cid.product); | 905 | return sprintf(buf, "%u\n", ec->cid.product); |
906 | } | 906 | } |
907 | 907 | ||
908 | static ssize_t ecard_show_type(struct device *dev, char *buf) | 908 | static ssize_t ecard_show_type(struct device *dev, struct device_attribute *attr, char *buf) |
909 | { | 909 | { |
910 | struct expansion_card *ec = ECARD_DEV(dev); | 910 | struct expansion_card *ec = ECARD_DEV(dev); |
911 | return sprintf(buf, "%s\n", ec->type == ECARD_EASI ? "EASI" : "IOC"); | 911 | return sprintf(buf, "%s\n", ec->type == ECARD_EASI ? "EASI" : "IOC"); |
diff --git a/arch/arm/kernel/entry-armv.S b/arch/arm/kernel/entry-armv.S index 4eb36155dc93..39a6c1b0b9a3 100644 --- a/arch/arm/kernel/entry-armv.S +++ b/arch/arm/kernel/entry-armv.S | |||
@@ -24,48 +24,91 @@ | |||
24 | #include "entry-header.S" | 24 | #include "entry-header.S" |
25 | 25 | ||
26 | /* | 26 | /* |
27 | * Interrupt handling. Preserves r7, r8, r9 | ||
28 | */ | ||
29 | .macro irq_handler | ||
30 | 1: get_irqnr_and_base r0, r6, r5, lr | ||
31 | movne r1, sp | ||
32 | @ | ||
33 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
34 | @ | ||
35 | adrne lr, 1b | ||
36 | bne asm_do_IRQ | ||
37 | |||
38 | #ifdef CONFIG_SMP | ||
39 | /* | ||
40 | * XXX | ||
41 | * | ||
42 | * this macro assumes that irqstat (r6) and base (r5) are | ||
43 | * preserved from get_irqnr_and_base above | ||
44 | */ | ||
45 | test_for_ipi r0, r6, r5, lr | ||
46 | movne r0, sp | ||
47 | adrne lr, 1b | ||
48 | bne do_IPI | ||
49 | #endif | ||
50 | |||
51 | .endm | ||
52 | |||
53 | /* | ||
27 | * Invalid mode handlers | 54 | * Invalid mode handlers |
28 | */ | 55 | */ |
29 | .macro inv_entry, sym, reason | 56 | .macro inv_entry, reason |
30 | sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go | 57 | sub sp, sp, #S_FRAME_SIZE |
31 | stmia sp, {r0 - lr} @ Save XXX r0 - lr | 58 | stmib sp, {r1 - lr} |
32 | ldr r4, .LC\sym | ||
33 | mov r1, #\reason | 59 | mov r1, #\reason |
34 | .endm | 60 | .endm |
35 | 61 | ||
36 | __pabt_invalid: | 62 | __pabt_invalid: |
37 | inv_entry abt, BAD_PREFETCH | 63 | inv_entry BAD_PREFETCH |
38 | b 1f | 64 | b common_invalid |
39 | 65 | ||
40 | __dabt_invalid: | 66 | __dabt_invalid: |
41 | inv_entry abt, BAD_DATA | 67 | inv_entry BAD_DATA |
42 | b 1f | 68 | b common_invalid |
43 | 69 | ||
44 | __irq_invalid: | 70 | __irq_invalid: |
45 | inv_entry irq, BAD_IRQ | 71 | inv_entry BAD_IRQ |
46 | b 1f | 72 | b common_invalid |
47 | 73 | ||
48 | __und_invalid: | 74 | __und_invalid: |
49 | inv_entry und, BAD_UNDEFINSTR | 75 | inv_entry BAD_UNDEFINSTR |
76 | |||
77 | @ | ||
78 | @ XXX fall through to common_invalid | ||
79 | @ | ||
80 | |||
81 | @ | ||
82 | @ common_invalid - generic code for failed exception (re-entrant version of handlers) | ||
83 | @ | ||
84 | common_invalid: | ||
85 | zero_fp | ||
86 | |||
87 | ldmia r0, {r4 - r6} | ||
88 | add r0, sp, #S_PC @ here for interlock avoidance | ||
89 | mov r7, #-1 @ "" "" "" "" | ||
90 | str r4, [sp] @ save preserved r0 | ||
91 | stmia r0, {r5 - r7} @ lr_<exception>, | ||
92 | @ cpsr_<exception>, "old_r0" | ||
50 | 93 | ||
51 | 1: zero_fp | ||
52 | ldmia r4, {r5 - r7} @ Get XXX pc, cpsr, old_r0 | ||
53 | add r4, sp, #S_PC | ||
54 | stmia r4, {r5 - r7} @ Save XXX pc, cpsr, old_r0 | ||
55 | mov r0, sp | 94 | mov r0, sp |
56 | and r2, r6, #31 @ int mode | 95 | and r2, r6, #0x1f |
57 | b bad_mode | 96 | b bad_mode |
58 | 97 | ||
59 | /* | 98 | /* |
60 | * SVC mode handlers | 99 | * SVC mode handlers |
61 | */ | 100 | */ |
62 | .macro svc_entry, sym | 101 | .macro svc_entry |
63 | sub sp, sp, #S_FRAME_SIZE | 102 | sub sp, sp, #S_FRAME_SIZE |
64 | stmia sp, {r0 - r12} @ save r0 - r12 | 103 | stmib sp, {r1 - r12} |
65 | ldr r2, .LC\sym | 104 | |
66 | add r0, sp, #S_FRAME_SIZE | 105 | ldmia r0, {r1 - r3} |
67 | ldmia r2, {r2 - r4} @ get pc, cpsr | 106 | add r5, sp, #S_SP @ here for interlock avoidance |
68 | add r5, sp, #S_SP | 107 | mov r4, #-1 @ "" "" "" "" |
108 | add r0, sp, #S_FRAME_SIZE @ "" "" "" "" | ||
109 | str r1, [sp] @ save the "real" r0 copied | ||
110 | @ from the exception stack | ||
111 | |||
69 | mov r1, lr | 112 | mov r1, lr |
70 | 113 | ||
71 | @ | 114 | @ |
@@ -82,7 +125,7 @@ __und_invalid: | |||
82 | 125 | ||
83 | .align 5 | 126 | .align 5 |
84 | __dabt_svc: | 127 | __dabt_svc: |
85 | svc_entry abt | 128 | svc_entry |
86 | 129 | ||
87 | @ | 130 | @ |
88 | @ get ready to re-enable interrupts if appropriate | 131 | @ get ready to re-enable interrupts if appropriate |
@@ -129,28 +172,24 @@ __dabt_svc: | |||
129 | 172 | ||
130 | .align 5 | 173 | .align 5 |
131 | __irq_svc: | 174 | __irq_svc: |
132 | svc_entry irq | 175 | svc_entry |
176 | |||
133 | #ifdef CONFIG_PREEMPT | 177 | #ifdef CONFIG_PREEMPT |
134 | get_thread_info r8 | 178 | get_thread_info tsk |
135 | ldr r9, [r8, #TI_PREEMPT] @ get preempt count | 179 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count |
136 | add r7, r9, #1 @ increment it | 180 | add r7, r8, #1 @ increment it |
137 | str r7, [r8, #TI_PREEMPT] | 181 | str r7, [tsk, #TI_PREEMPT] |
138 | #endif | 182 | #endif |
139 | 1: get_irqnr_and_base r0, r6, r5, lr | 183 | |
140 | movne r1, sp | 184 | irq_handler |
141 | @ | ||
142 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
143 | @ | ||
144 | adrne lr, 1b | ||
145 | bne asm_do_IRQ | ||
146 | #ifdef CONFIG_PREEMPT | 185 | #ifdef CONFIG_PREEMPT |
147 | ldr r0, [r8, #TI_FLAGS] @ get flags | 186 | ldr r0, [tsk, #TI_FLAGS] @ get flags |
148 | tst r0, #_TIF_NEED_RESCHED | 187 | tst r0, #_TIF_NEED_RESCHED |
149 | blne svc_preempt | 188 | blne svc_preempt |
150 | preempt_return: | 189 | preempt_return: |
151 | ldr r0, [r8, #TI_PREEMPT] @ read preempt value | 190 | ldr r0, [tsk, #TI_PREEMPT] @ read preempt value |
191 | str r8, [tsk, #TI_PREEMPT] @ restore preempt count | ||
152 | teq r0, r7 | 192 | teq r0, r7 |
153 | str r9, [r8, #TI_PREEMPT] @ restore preempt count | ||
154 | strne r0, [r0, -r0] @ bug() | 193 | strne r0, [r0, -r0] @ bug() |
155 | #endif | 194 | #endif |
156 | ldr r0, [sp, #S_PSR] @ irqs are already disabled | 195 | ldr r0, [sp, #S_PSR] @ irqs are already disabled |
@@ -161,7 +200,7 @@ preempt_return: | |||
161 | 200 | ||
162 | #ifdef CONFIG_PREEMPT | 201 | #ifdef CONFIG_PREEMPT |
163 | svc_preempt: | 202 | svc_preempt: |
164 | teq r9, #0 @ was preempt count = 0 | 203 | teq r8, #0 @ was preempt count = 0 |
165 | ldreq r6, .LCirq_stat | 204 | ldreq r6, .LCirq_stat |
166 | movne pc, lr @ no | 205 | movne pc, lr @ no |
167 | ldr r0, [r6, #4] @ local_irq_count | 206 | ldr r0, [r6, #4] @ local_irq_count |
@@ -169,9 +208,9 @@ svc_preempt: | |||
169 | adds r0, r0, r1 | 208 | adds r0, r0, r1 |
170 | movne pc, lr | 209 | movne pc, lr |
171 | mov r7, #0 @ preempt_schedule_irq | 210 | mov r7, #0 @ preempt_schedule_irq |
172 | str r7, [r8, #TI_PREEMPT] @ expects preempt_count == 0 | 211 | str r7, [tsk, #TI_PREEMPT] @ expects preempt_count == 0 |
173 | 1: bl preempt_schedule_irq @ irq en/disable is done inside | 212 | 1: bl preempt_schedule_irq @ irq en/disable is done inside |
174 | ldr r0, [r8, #TI_FLAGS] @ get new tasks TI_FLAGS | 213 | ldr r0, [tsk, #TI_FLAGS] @ get new tasks TI_FLAGS |
175 | tst r0, #_TIF_NEED_RESCHED | 214 | tst r0, #_TIF_NEED_RESCHED |
176 | beq preempt_return @ go again | 215 | beq preempt_return @ go again |
177 | b 1b | 216 | b 1b |
@@ -179,7 +218,7 @@ svc_preempt: | |||
179 | 218 | ||
180 | .align 5 | 219 | .align 5 |
181 | __und_svc: | 220 | __und_svc: |
182 | svc_entry und | 221 | svc_entry |
183 | 222 | ||
184 | @ | 223 | @ |
185 | @ call emulation code, which returns using r9 if it has emulated | 224 | @ call emulation code, which returns using r9 if it has emulated |
@@ -209,7 +248,7 @@ __und_svc: | |||
209 | 248 | ||
210 | .align 5 | 249 | .align 5 |
211 | __pabt_svc: | 250 | __pabt_svc: |
212 | svc_entry abt | 251 | svc_entry |
213 | 252 | ||
214 | @ | 253 | @ |
215 | @ re-enable interrupts if appropriate | 254 | @ re-enable interrupts if appropriate |
@@ -242,12 +281,8 @@ __pabt_svc: | |||
242 | ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr | 281 | ldmia sp, {r0 - pc}^ @ load r0 - pc, cpsr |
243 | 282 | ||
244 | .align 5 | 283 | .align 5 |
245 | .LCirq: | 284 | .LCcralign: |
246 | .word __temp_irq | 285 | .word cr_alignment |
247 | .LCund: | ||
248 | .word __temp_und | ||
249 | .LCabt: | ||
250 | .word __temp_abt | ||
251 | #ifdef MULTI_ABORT | 286 | #ifdef MULTI_ABORT |
252 | .LCprocfns: | 287 | .LCprocfns: |
253 | .word processor | 288 | .word processor |
@@ -262,14 +297,18 @@ __pabt_svc: | |||
262 | /* | 297 | /* |
263 | * User mode handlers | 298 | * User mode handlers |
264 | */ | 299 | */ |
265 | .macro usr_entry, sym | 300 | .macro usr_entry |
266 | sub sp, sp, #S_FRAME_SIZE @ Allocate frame size in one go | 301 | sub sp, sp, #S_FRAME_SIZE |
267 | stmia sp, {r0 - r12} @ save r0 - r12 | 302 | stmib sp, {r1 - r12} |
268 | ldr r7, .LC\sym | 303 | |
269 | add r5, sp, #S_PC | 304 | ldmia r0, {r1 - r3} |
270 | ldmia r7, {r2 - r4} @ Get USR pc, cpsr | 305 | add r0, sp, #S_PC @ here for interlock avoidance |
271 | 306 | mov r4, #-1 @ "" "" "" "" | |
272 | #if __LINUX_ARM_ARCH__ < 6 | 307 | |
308 | str r1, [sp] @ save the "real" r0 copied | ||
309 | @ from the exception stack | ||
310 | |||
311 | #if __LINUX_ARM_ARCH__ < 6 && !defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) | ||
273 | @ make sure our user space atomic helper is aborted | 312 | @ make sure our user space atomic helper is aborted |
274 | cmp r2, #VIRT_OFFSET | 313 | cmp r2, #VIRT_OFFSET |
275 | bichs r3, r3, #PSR_Z_BIT | 314 | bichs r3, r3, #PSR_Z_BIT |
@@ -284,13 +323,13 @@ __pabt_svc: | |||
284 | @ | 323 | @ |
285 | @ Also, separately save sp_usr and lr_usr | 324 | @ Also, separately save sp_usr and lr_usr |
286 | @ | 325 | @ |
287 | stmia r5, {r2 - r4} | 326 | stmia r0, {r2 - r4} |
288 | stmdb r5, {sp, lr}^ | 327 | stmdb r0, {sp, lr}^ |
289 | 328 | ||
290 | @ | 329 | @ |
291 | @ Enable the alignment trap while in kernel mode | 330 | @ Enable the alignment trap while in kernel mode |
292 | @ | 331 | @ |
293 | alignment_trap r7, r0, __temp_\sym | 332 | alignment_trap r0 |
294 | 333 | ||
295 | @ | 334 | @ |
296 | @ Clear FP to mark the first stack frame | 335 | @ Clear FP to mark the first stack frame |
@@ -300,7 +339,7 @@ __pabt_svc: | |||
300 | 339 | ||
301 | .align 5 | 340 | .align 5 |
302 | __dabt_usr: | 341 | __dabt_usr: |
303 | usr_entry abt | 342 | usr_entry |
304 | 343 | ||
305 | @ | 344 | @ |
306 | @ Call the processor-specific abort handler: | 345 | @ Call the processor-specific abort handler: |
@@ -329,30 +368,23 @@ __dabt_usr: | |||
329 | 368 | ||
330 | .align 5 | 369 | .align 5 |
331 | __irq_usr: | 370 | __irq_usr: |
332 | usr_entry irq | 371 | usr_entry |
333 | 372 | ||
373 | get_thread_info tsk | ||
334 | #ifdef CONFIG_PREEMPT | 374 | #ifdef CONFIG_PREEMPT |
335 | get_thread_info r8 | 375 | ldr r8, [tsk, #TI_PREEMPT] @ get preempt count |
336 | ldr r9, [r8, #TI_PREEMPT] @ get preempt count | 376 | add r7, r8, #1 @ increment it |
337 | add r7, r9, #1 @ increment it | 377 | str r7, [tsk, #TI_PREEMPT] |
338 | str r7, [r8, #TI_PREEMPT] | ||
339 | #endif | 378 | #endif |
340 | 1: get_irqnr_and_base r0, r6, r5, lr | 379 | |
341 | movne r1, sp | 380 | irq_handler |
342 | adrne lr, 1b | ||
343 | @ | ||
344 | @ routine called with r0 = irq number, r1 = struct pt_regs * | ||
345 | @ | ||
346 | bne asm_do_IRQ | ||
347 | #ifdef CONFIG_PREEMPT | 381 | #ifdef CONFIG_PREEMPT |
348 | ldr r0, [r8, #TI_PREEMPT] | 382 | ldr r0, [tsk, #TI_PREEMPT] |
383 | str r8, [tsk, #TI_PREEMPT] | ||
349 | teq r0, r7 | 384 | teq r0, r7 |
350 | str r9, [r8, #TI_PREEMPT] | ||
351 | strne r0, [r0, -r0] | 385 | strne r0, [r0, -r0] |
352 | mov tsk, r8 | ||
353 | #else | ||
354 | get_thread_info tsk | ||
355 | #endif | 386 | #endif |
387 | |||
356 | mov why, #0 | 388 | mov why, #0 |
357 | b ret_to_user | 389 | b ret_to_user |
358 | 390 | ||
@@ -360,7 +392,7 @@ __irq_usr: | |||
360 | 392 | ||
361 | .align 5 | 393 | .align 5 |
362 | __und_usr: | 394 | __und_usr: |
363 | usr_entry und | 395 | usr_entry |
364 | 396 | ||
365 | tst r3, #PSR_T_BIT @ Thumb mode? | 397 | tst r3, #PSR_T_BIT @ Thumb mode? |
366 | bne fpundefinstr @ ignore FP | 398 | bne fpundefinstr @ ignore FP |
@@ -476,7 +508,7 @@ fpundefinstr: | |||
476 | 508 | ||
477 | .align 5 | 509 | .align 5 |
478 | __pabt_usr: | 510 | __pabt_usr: |
479 | usr_entry abt | 511 | usr_entry |
480 | 512 | ||
481 | enable_irq @ Enable interrupts | 513 | enable_irq @ Enable interrupts |
482 | mov r0, r2 @ address (pc) | 514 | mov r0, r2 @ address (pc) |
@@ -616,11 +648,17 @@ __kuser_helper_start: | |||
616 | 648 | ||
617 | __kuser_cmpxchg: @ 0xffff0fc0 | 649 | __kuser_cmpxchg: @ 0xffff0fc0 |
618 | 650 | ||
619 | #if __LINUX_ARM_ARCH__ < 6 | 651 | #if defined(CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG) |
620 | 652 | ||
621 | #ifdef CONFIG_SMP /* sanity check */ | 653 | /* |
622 | #error "CONFIG_SMP on a machine supporting pre-ARMv6 processors?" | 654 | * Poor you. No fast solution possible... |
623 | #endif | 655 | * The kernel itself must perform the operation. |
656 | * A special ghost syscall is used for that (see traps.c). | ||
657 | */ | ||
658 | swi #0x9ffff0 | ||
659 | mov pc, lr | ||
660 | |||
661 | #elif __LINUX_ARM_ARCH__ < 6 | ||
624 | 662 | ||
625 | /* | 663 | /* |
626 | * Theory of operation: | 664 | * Theory of operation: |
@@ -735,29 +773,41 @@ __kuser_helper_end: | |||
735 | * | 773 | * |
736 | * Common stub entry macro: | 774 | * Common stub entry macro: |
737 | * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC | 775 | * Enter in IRQ mode, spsr = SVC/USR CPSR, lr = SVC/USR PC |
776 | * | ||
777 | * SP points to a minimal amount of processor-private memory, the address | ||
778 | * of which is copied into r0 for the mode specific abort handler. | ||
738 | */ | 779 | */ |
739 | .macro vector_stub, name, sym, correction=0 | 780 | .macro vector_stub, name, correction=0 |
740 | .align 5 | 781 | .align 5 |
741 | 782 | ||
742 | vector_\name: | 783 | vector_\name: |
743 | ldr r13, .LCs\sym | ||
744 | .if \correction | 784 | .if \correction |
745 | sub lr, lr, #\correction | 785 | sub lr, lr, #\correction |
746 | .endif | 786 | .endif |
747 | str lr, [r13] @ save lr_IRQ | 787 | |
788 | @ | ||
789 | @ Save r0, lr_<exception> (parent PC) and spsr_<exception> | ||
790 | @ (parent CPSR) | ||
791 | @ | ||
792 | stmia sp, {r0, lr} @ save r0, lr | ||
748 | mrs lr, spsr | 793 | mrs lr, spsr |
749 | str lr, [r13, #4] @ save spsr_IRQ | 794 | str lr, [sp, #8] @ save spsr |
795 | |||
750 | @ | 796 | @ |
751 | @ now branch to the relevant MODE handling routine | 797 | @ Prepare for SVC32 mode. IRQs remain disabled. |
752 | @ | 798 | @ |
753 | mrs r13, cpsr | 799 | mrs r0, cpsr |
754 | bic r13, r13, #MODE_MASK | 800 | bic r0, r0, #MODE_MASK |
755 | orr r13, r13, #SVC_MODE | 801 | orr r0, r0, #SVC_MODE |
756 | msr spsr_cxsf, r13 @ switch to SVC_32 mode | 802 | msr spsr_cxsf, r0 |
757 | 803 | ||
758 | and lr, lr, #15 | 804 | @ |
805 | @ the branch table must immediately follow this code | ||
806 | @ | ||
807 | mov r0, sp | ||
808 | and lr, lr, #0x0f | ||
759 | ldr lr, [pc, lr, lsl #2] | 809 | ldr lr, [pc, lr, lsl #2] |
760 | movs pc, lr @ Changes mode and branches | 810 | movs pc, lr @ branch to handler in SVC mode |
761 | .endm | 811 | .endm |
762 | 812 | ||
763 | .globl __stubs_start | 813 | .globl __stubs_start |
@@ -765,7 +815,7 @@ __stubs_start: | |||
765 | /* | 815 | /* |
766 | * Interrupt dispatcher | 816 | * Interrupt dispatcher |
767 | */ | 817 | */ |
768 | vector_stub irq, irq, 4 | 818 | vector_stub irq, 4 |
769 | 819 | ||
770 | .long __irq_usr @ 0 (USR_26 / USR_32) | 820 | .long __irq_usr @ 0 (USR_26 / USR_32) |
771 | .long __irq_invalid @ 1 (FIQ_26 / FIQ_32) | 821 | .long __irq_invalid @ 1 (FIQ_26 / FIQ_32) |
@@ -788,7 +838,7 @@ __stubs_start: | |||
788 | * Data abort dispatcher | 838 | * Data abort dispatcher |
789 | * Enter in ABT mode, spsr = USR CPSR, lr = USR PC | 839 | * Enter in ABT mode, spsr = USR CPSR, lr = USR PC |
790 | */ | 840 | */ |
791 | vector_stub dabt, abt, 8 | 841 | vector_stub dabt, 8 |
792 | 842 | ||
793 | .long __dabt_usr @ 0 (USR_26 / USR_32) | 843 | .long __dabt_usr @ 0 (USR_26 / USR_32) |
794 | .long __dabt_invalid @ 1 (FIQ_26 / FIQ_32) | 844 | .long __dabt_invalid @ 1 (FIQ_26 / FIQ_32) |
@@ -811,7 +861,7 @@ __stubs_start: | |||
811 | * Prefetch abort dispatcher | 861 | * Prefetch abort dispatcher |
812 | * Enter in ABT mode, spsr = USR CPSR, lr = USR PC | 862 | * Enter in ABT mode, spsr = USR CPSR, lr = USR PC |
813 | */ | 863 | */ |
814 | vector_stub pabt, abt, 4 | 864 | vector_stub pabt, 4 |
815 | 865 | ||
816 | .long __pabt_usr @ 0 (USR_26 / USR_32) | 866 | .long __pabt_usr @ 0 (USR_26 / USR_32) |
817 | .long __pabt_invalid @ 1 (FIQ_26 / FIQ_32) | 867 | .long __pabt_invalid @ 1 (FIQ_26 / FIQ_32) |
@@ -834,7 +884,7 @@ __stubs_start: | |||
834 | * Undef instr entry dispatcher | 884 | * Undef instr entry dispatcher |
835 | * Enter in UND mode, spsr = SVC/USR CPSR, lr = SVC/USR PC | 885 | * Enter in UND mode, spsr = SVC/USR CPSR, lr = SVC/USR PC |
836 | */ | 886 | */ |
837 | vector_stub und, und | 887 | vector_stub und |
838 | 888 | ||
839 | .long __und_usr @ 0 (USR_26 / USR_32) | 889 | .long __und_usr @ 0 (USR_26 / USR_32) |
840 | .long __und_invalid @ 1 (FIQ_26 / FIQ_32) | 890 | .long __und_invalid @ 1 (FIQ_26 / FIQ_32) |
@@ -888,13 +938,6 @@ vector_addrexcptn: | |||
888 | .LCvswi: | 938 | .LCvswi: |
889 | .word vector_swi | 939 | .word vector_swi |
890 | 940 | ||
891 | .LCsirq: | ||
892 | .word __temp_irq | ||
893 | .LCsund: | ||
894 | .word __temp_und | ||
895 | .LCsabt: | ||
896 | .word __temp_abt | ||
897 | |||
898 | .globl __stubs_end | 941 | .globl __stubs_end |
899 | __stubs_end: | 942 | __stubs_end: |
900 | 943 | ||
@@ -916,23 +959,6 @@ __vectors_end: | |||
916 | 959 | ||
917 | .data | 960 | .data |
918 | 961 | ||
919 | /* | ||
920 | * Do not reorder these, and do not insert extra data between... | ||
921 | */ | ||
922 | |||
923 | __temp_irq: | ||
924 | .word 0 @ saved lr_irq | ||
925 | .word 0 @ saved spsr_irq | ||
926 | .word -1 @ old_r0 | ||
927 | __temp_und: | ||
928 | .word 0 @ Saved lr_und | ||
929 | .word 0 @ Saved spsr_und | ||
930 | .word -1 @ old_r0 | ||
931 | __temp_abt: | ||
932 | .word 0 @ Saved lr_abt | ||
933 | .word 0 @ Saved spsr_abt | ||
934 | .word -1 @ old_r0 | ||
935 | |||
936 | .globl cr_alignment | 962 | .globl cr_alignment |
937 | .globl cr_no_alignment | 963 | .globl cr_no_alignment |
938 | cr_alignment: | 964 | cr_alignment: |
diff --git a/arch/arm/kernel/entry-header.S b/arch/arm/kernel/entry-header.S index a3d40a0e2b04..afef21273963 100644 --- a/arch/arm/kernel/entry-header.S +++ b/arch/arm/kernel/entry-header.S | |||
@@ -59,11 +59,10 @@ | |||
59 | mov \rd, \rd, lsl #13 | 59 | mov \rd, \rd, lsl #13 |
60 | .endm | 60 | .endm |
61 | 61 | ||
62 | .macro alignment_trap, rbase, rtemp, sym | 62 | .macro alignment_trap, rtemp |
63 | #ifdef CONFIG_ALIGNMENT_TRAP | 63 | #ifdef CONFIG_ALIGNMENT_TRAP |
64 | #define OFF_CR_ALIGNMENT(x) cr_alignment - x | 64 | ldr \rtemp, .LCcralign |
65 | 65 | ldr \rtemp, [\rtemp] | |
66 | ldr \rtemp, [\rbase, #OFF_CR_ALIGNMENT(\sym)] | ||
67 | mcr p15, 0, \rtemp, c1, c0 | 66 | mcr p15, 0, \rtemp, c1, c0 |
68 | #endif | 67 | #endif |
69 | .endm | 68 | .endm |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 4733877296d4..bd4823c74645 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -2,6 +2,8 @@ | |||
2 | * linux/arch/arm/kernel/head.S | 2 | * linux/arch/arm/kernel/head.S |
3 | * | 3 | * |
4 | * Copyright (C) 1994-2002 Russell King | 4 | * Copyright (C) 1994-2002 Russell King |
5 | * Copyright (c) 2003 ARM Limited | ||
6 | * All Rights Reserved | ||
5 | * | 7 | * |
6 | * This program is free software; you can redistribute it and/or modify | 8 | * 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 | 9 | * it under the terms of the GNU General Public License version 2 as |
@@ -165,6 +167,48 @@ __mmap_switched: | |||
165 | stmia r6, {r0, r4} @ Save control register values | 167 | stmia r6, {r0, r4} @ Save control register values |
166 | b start_kernel | 168 | b start_kernel |
167 | 169 | ||
170 | #if defined(CONFIG_SMP) | ||
171 | .type secondary_startup, #function | ||
172 | ENTRY(secondary_startup) | ||
173 | /* | ||
174 | * Common entry point for secondary CPUs. | ||
175 | * | ||
176 | * Ensure that we're in SVC mode, and IRQs are disabled. Lookup | ||
177 | * the processor type - there is no need to check the machine type | ||
178 | * as it has already been validated by the primary processor. | ||
179 | */ | ||
180 | msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC | ||
181 | bl __lookup_processor_type | ||
182 | movs r10, r5 @ invalid processor? | ||
183 | moveq r0, #'p' @ yes, error 'p' | ||
184 | beq __error | ||
185 | |||
186 | /* | ||
187 | * Use the page tables supplied from __cpu_up. | ||
188 | */ | ||
189 | adr r4, __secondary_data | ||
190 | ldmia r4, {r5, r6, r13} @ address to jump to after | ||
191 | sub r4, r4, r5 @ mmu has been enabled | ||
192 | ldr r4, [r6, r4] @ get secondary_data.pgdir | ||
193 | adr lr, __enable_mmu @ return address | ||
194 | add pc, r10, #12 @ initialise processor | ||
195 | @ (return control reg) | ||
196 | |||
197 | /* | ||
198 | * r6 = &secondary_data | ||
199 | */ | ||
200 | ENTRY(__secondary_switched) | ||
201 | ldr sp, [r6, #4] @ get secondary_data.stack | ||
202 | mov fp, #0 | ||
203 | b secondary_start_kernel | ||
204 | |||
205 | .type __secondary_data, %object | ||
206 | __secondary_data: | ||
207 | .long . | ||
208 | .long secondary_data | ||
209 | .long __secondary_switched | ||
210 | #endif /* defined(CONFIG_SMP) */ | ||
211 | |||
168 | 212 | ||
169 | 213 | ||
170 | /* | 214 | /* |
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index c2a7da3ac0f1..9fed5fa194d9 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c | |||
@@ -92,6 +92,14 @@ struct cpu_user_fns cpu_user; | |||
92 | struct cpu_cache_fns cpu_cache; | 92 | struct cpu_cache_fns cpu_cache; |
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | struct stack { | ||
96 | u32 irq[3]; | ||
97 | u32 abt[3]; | ||
98 | u32 und[3]; | ||
99 | } ____cacheline_aligned; | ||
100 | |||
101 | static struct stack stacks[NR_CPUS]; | ||
102 | |||
95 | char elf_platform[ELF_PLATFORM_SIZE]; | 103 | char elf_platform[ELF_PLATFORM_SIZE]; |
96 | EXPORT_SYMBOL(elf_platform); | 104 | EXPORT_SYMBOL(elf_platform); |
97 | 105 | ||
@@ -307,8 +315,6 @@ static void __init setup_processor(void) | |||
307 | cpu_name, processor_id, (int)processor_id & 15, | 315 | cpu_name, processor_id, (int)processor_id & 15, |
308 | proc_arch[cpu_architecture()]); | 316 | proc_arch[cpu_architecture()]); |
309 | 317 | ||
310 | dump_cpu_info(smp_processor_id()); | ||
311 | |||
312 | sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); | 318 | sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); |
313 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); | 319 | sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); |
314 | elf_hwcap = list->elf_hwcap; | 320 | elf_hwcap = list->elf_hwcap; |
@@ -316,6 +322,46 @@ static void __init setup_processor(void) | |||
316 | cpu_proc_init(); | 322 | cpu_proc_init(); |
317 | } | 323 | } |
318 | 324 | ||
325 | /* | ||
326 | * cpu_init - initialise one CPU. | ||
327 | * | ||
328 | * cpu_init dumps the cache information, initialises SMP specific | ||
329 | * information, and sets up the per-CPU stacks. | ||
330 | */ | ||
331 | void cpu_init(void) | ||
332 | { | ||
333 | unsigned int cpu = smp_processor_id(); | ||
334 | struct stack *stk = &stacks[cpu]; | ||
335 | |||
336 | if (cpu >= NR_CPUS) { | ||
337 | printk(KERN_CRIT "CPU%u: bad primary CPU number\n", cpu); | ||
338 | BUG(); | ||
339 | } | ||
340 | |||
341 | dump_cpu_info(cpu); | ||
342 | |||
343 | /* | ||
344 | * setup stacks for re-entrant exception handlers | ||
345 | */ | ||
346 | __asm__ ( | ||
347 | "msr cpsr_c, %1\n\t" | ||
348 | "add sp, %0, %2\n\t" | ||
349 | "msr cpsr_c, %3\n\t" | ||
350 | "add sp, %0, %4\n\t" | ||
351 | "msr cpsr_c, %5\n\t" | ||
352 | "add sp, %0, %6\n\t" | ||
353 | "msr cpsr_c, %7" | ||
354 | : | ||
355 | : "r" (stk), | ||
356 | "I" (PSR_F_BIT | PSR_I_BIT | IRQ_MODE), | ||
357 | "I" (offsetof(struct stack, irq[0])), | ||
358 | "I" (PSR_F_BIT | PSR_I_BIT | ABT_MODE), | ||
359 | "I" (offsetof(struct stack, abt[0])), | ||
360 | "I" (PSR_F_BIT | PSR_I_BIT | UND_MODE), | ||
361 | "I" (offsetof(struct stack, und[0])), | ||
362 | "I" (PSR_F_BIT | PSR_I_BIT | SVC_MODE)); | ||
363 | } | ||
364 | |||
319 | static struct machine_desc * __init setup_machine(unsigned int nr) | 365 | static struct machine_desc * __init setup_machine(unsigned int nr) |
320 | { | 366 | { |
321 | struct machine_desc *list; | 367 | struct machine_desc *list; |
@@ -715,6 +761,8 @@ void __init setup_arch(char **cmdline_p) | |||
715 | paging_init(&meminfo, mdesc); | 761 | paging_init(&meminfo, mdesc); |
716 | request_standard_resources(&meminfo, mdesc); | 762 | request_standard_resources(&meminfo, mdesc); |
717 | 763 | ||
764 | cpu_init(); | ||
765 | |||
718 | /* | 766 | /* |
719 | * Set up various architecture-specific pointers | 767 | * Set up various architecture-specific pointers |
720 | */ | 768 | */ |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index ecc8c3332408..34892758f098 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -24,6 +24,9 @@ | |||
24 | #include <asm/atomic.h> | 24 | #include <asm/atomic.h> |
25 | #include <asm/cacheflush.h> | 25 | #include <asm/cacheflush.h> |
26 | #include <asm/cpu.h> | 26 | #include <asm/cpu.h> |
27 | #include <asm/mmu_context.h> | ||
28 | #include <asm/pgtable.h> | ||
29 | #include <asm/pgalloc.h> | ||
27 | #include <asm/processor.h> | 30 | #include <asm/processor.h> |
28 | #include <asm/tlbflush.h> | 31 | #include <asm/tlbflush.h> |
29 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
@@ -37,6 +40,13 @@ cpumask_t cpu_present_mask; | |||
37 | cpumask_t cpu_online_map; | 40 | cpumask_t cpu_online_map; |
38 | 41 | ||
39 | /* | 42 | /* |
43 | * as from 2.5, kernels no longer have an init_tasks structure | ||
44 | * so we need some other way of telling a new secondary core | ||
45 | * where to place its SVC stack | ||
46 | */ | ||
47 | struct secondary_data secondary_data; | ||
48 | |||
49 | /* | ||
40 | * structures for inter-processor calls | 50 | * structures for inter-processor calls |
41 | * - A collection of single bit ipi messages. | 51 | * - A collection of single bit ipi messages. |
42 | */ | 52 | */ |
@@ -71,6 +81,8 @@ static DEFINE_SPINLOCK(smp_call_function_lock); | |||
71 | int __init __cpu_up(unsigned int cpu) | 81 | int __init __cpu_up(unsigned int cpu) |
72 | { | 82 | { |
73 | struct task_struct *idle; | 83 | struct task_struct *idle; |
84 | pgd_t *pgd; | ||
85 | pmd_t *pmd; | ||
74 | int ret; | 86 | int ret; |
75 | 87 | ||
76 | /* | 88 | /* |
@@ -84,11 +96,57 @@ int __init __cpu_up(unsigned int cpu) | |||
84 | } | 96 | } |
85 | 97 | ||
86 | /* | 98 | /* |
99 | * Allocate initial page tables to allow the new CPU to | ||
100 | * enable the MMU safely. This essentially means a set | ||
101 | * of our "standard" page tables, with the addition of | ||
102 | * a 1:1 mapping for the physical address of the kernel. | ||
103 | */ | ||
104 | pgd = pgd_alloc(&init_mm); | ||
105 | pmd = pmd_offset(pgd, PHYS_OFFSET); | ||
106 | *pmd = __pmd((PHYS_OFFSET & PGDIR_MASK) | | ||
107 | PMD_TYPE_SECT | PMD_SECT_AP_WRITE); | ||
108 | |||
109 | /* | ||
110 | * We need to tell the secondary core where to find | ||
111 | * its stack and the page tables. | ||
112 | */ | ||
113 | secondary_data.stack = (void *)idle->thread_info + THREAD_SIZE - 8; | ||
114 | secondary_data.pgdir = virt_to_phys(pgd); | ||
115 | wmb(); | ||
116 | |||
117 | /* | ||
87 | * Now bring the CPU into our world. | 118 | * Now bring the CPU into our world. |
88 | */ | 119 | */ |
89 | ret = boot_secondary(cpu, idle); | 120 | ret = boot_secondary(cpu, idle); |
121 | if (ret == 0) { | ||
122 | unsigned long timeout; | ||
123 | |||
124 | /* | ||
125 | * CPU was successfully started, wait for it | ||
126 | * to come online or time out. | ||
127 | */ | ||
128 | timeout = jiffies + HZ; | ||
129 | while (time_before(jiffies, timeout)) { | ||
130 | if (cpu_online(cpu)) | ||
131 | break; | ||
132 | |||
133 | udelay(10); | ||
134 | barrier(); | ||
135 | } | ||
136 | |||
137 | if (!cpu_online(cpu)) | ||
138 | ret = -EIO; | ||
139 | } | ||
140 | |||
141 | secondary_data.stack = 0; | ||
142 | secondary_data.pgdir = 0; | ||
143 | |||
144 | *pmd_offset(pgd, PHYS_OFFSET) = __pmd(0); | ||
145 | pgd_free(pgd); | ||
146 | |||
90 | if (ret) { | 147 | if (ret) { |
91 | printk(KERN_CRIT "cpu_up: processor %d failed to boot\n", cpu); | 148 | printk(KERN_CRIT "CPU%u: processor failed to boot\n", cpu); |
149 | |||
92 | /* | 150 | /* |
93 | * FIXME: We need to clean up the new idle thread. --rmk | 151 | * FIXME: We need to clean up the new idle thread. --rmk |
94 | */ | 152 | */ |
@@ -98,6 +156,56 @@ int __init __cpu_up(unsigned int cpu) | |||
98 | } | 156 | } |
99 | 157 | ||
100 | /* | 158 | /* |
159 | * This is the secondary CPU boot entry. We're using this CPUs | ||
160 | * idle thread stack, but a set of temporary page tables. | ||
161 | */ | ||
162 | asmlinkage void __init secondary_start_kernel(void) | ||
163 | { | ||
164 | struct mm_struct *mm = &init_mm; | ||
165 | unsigned int cpu = smp_processor_id(); | ||
166 | |||
167 | printk("CPU%u: Booted secondary processor\n", cpu); | ||
168 | |||
169 | /* | ||
170 | * All kernel threads share the same mm context; grab a | ||
171 | * reference and switch to it. | ||
172 | */ | ||
173 | atomic_inc(&mm->mm_users); | ||
174 | atomic_inc(&mm->mm_count); | ||
175 | current->active_mm = mm; | ||
176 | cpu_set(cpu, mm->cpu_vm_mask); | ||
177 | cpu_switch_mm(mm->pgd, mm); | ||
178 | enter_lazy_tlb(mm, current); | ||
179 | |||
180 | cpu_init(); | ||
181 | |||
182 | /* | ||
183 | * Give the platform a chance to do its own initialisation. | ||
184 | */ | ||
185 | platform_secondary_init(cpu); | ||
186 | |||
187 | /* | ||
188 | * Enable local interrupts. | ||
189 | */ | ||
190 | local_irq_enable(); | ||
191 | local_fiq_enable(); | ||
192 | |||
193 | calibrate_delay(); | ||
194 | |||
195 | smp_store_cpu_info(cpu); | ||
196 | |||
197 | /* | ||
198 | * OK, now it's safe to let the boot CPU continue | ||
199 | */ | ||
200 | cpu_set(cpu, cpu_online_map); | ||
201 | |||
202 | /* | ||
203 | * OK, it's off to the idle thread for us | ||
204 | */ | ||
205 | cpu_idle(); | ||
206 | } | ||
207 | |||
208 | /* | ||
101 | * Called by both boot and secondaries to move global data into | 209 | * Called by both boot and secondaries to move global data into |
102 | * per-processor storage. | 210 | * per-processor storage. |
103 | */ | 211 | */ |
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c index 14df16b983f4..45d2a032d890 100644 --- a/arch/arm/kernel/traps.c +++ b/arch/arm/kernel/traps.c | |||
@@ -464,6 +464,55 @@ asmlinkage int arm_syscall(int no, struct pt_regs *regs) | |||
464 | #endif | 464 | #endif |
465 | return 0; | 465 | return 0; |
466 | 466 | ||
467 | #ifdef CONFIG_NEEDS_SYSCALL_FOR_CMPXCHG | ||
468 | /* | ||
469 | * Atomically store r1 in *r2 if *r2 is equal to r0 for user space. | ||
470 | * Return zero in r0 if *MEM was changed or non-zero if no exchange | ||
471 | * happened. Also set the user C flag accordingly. | ||
472 | * If access permissions have to be fixed up then non-zero is | ||
473 | * returned and the operation has to be re-attempted. | ||
474 | * | ||
475 | * *NOTE*: This is a ghost syscall private to the kernel. Only the | ||
476 | * __kuser_cmpxchg code in entry-armv.S should be aware of its | ||
477 | * existence. Don't ever use this from user code. | ||
478 | */ | ||
479 | case 0xfff0: | ||
480 | { | ||
481 | extern void do_DataAbort(unsigned long addr, unsigned int fsr, | ||
482 | struct pt_regs *regs); | ||
483 | unsigned long val; | ||
484 | unsigned long addr = regs->ARM_r2; | ||
485 | struct mm_struct *mm = current->mm; | ||
486 | pgd_t *pgd; pmd_t *pmd; pte_t *pte; | ||
487 | |||
488 | regs->ARM_cpsr &= ~PSR_C_BIT; | ||
489 | spin_lock(&mm->page_table_lock); | ||
490 | pgd = pgd_offset(mm, addr); | ||
491 | if (!pgd_present(*pgd)) | ||
492 | goto bad_access; | ||
493 | pmd = pmd_offset(pgd, addr); | ||
494 | if (!pmd_present(*pmd)) | ||
495 | goto bad_access; | ||
496 | pte = pte_offset_map(pmd, addr); | ||
497 | if (!pte_present(*pte) || !pte_write(*pte)) | ||
498 | goto bad_access; | ||
499 | val = *(unsigned long *)addr; | ||
500 | val -= regs->ARM_r0; | ||
501 | if (val == 0) { | ||
502 | *(unsigned long *)addr = regs->ARM_r1; | ||
503 | regs->ARM_cpsr |= PSR_C_BIT; | ||
504 | } | ||
505 | spin_unlock(&mm->page_table_lock); | ||
506 | return val; | ||
507 | |||
508 | bad_access: | ||
509 | spin_unlock(&mm->page_table_lock); | ||
510 | /* simulate a read access fault */ | ||
511 | do_DataAbort(addr, 15 + (1 << 11), regs); | ||
512 | return -1; | ||
513 | } | ||
514 | #endif | ||
515 | |||
467 | default: | 516 | default: |
468 | /* Calls 9f00xx..9f07ff are defined to return -ENOSYS | 517 | /* Calls 9f00xx..9f07ff are defined to return -ENOSYS |
469 | if not implemented, rather than raising SIGILL. This | 518 | if not implemented, rather than raising SIGILL. This |
diff --git a/arch/arm/lib/ashldi3.c b/arch/arm/lib/ashldi3.c index 130f5a839669..b62875cfd8f8 100644 --- a/arch/arm/lib/ashldi3.c +++ b/arch/arm/lib/ashldi3.c | |||
@@ -31,31 +31,26 @@ Boston, MA 02111-1307, USA. */ | |||
31 | 31 | ||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | 33 | ||
34 | DItype | 34 | s64 __ashldi3(s64 u, int b) |
35 | __ashldi3 (DItype u, word_type b) | ||
36 | { | 35 | { |
37 | DIunion w; | 36 | DIunion w; |
38 | word_type bm; | 37 | int bm; |
39 | DIunion uu; | 38 | DIunion uu; |
40 | 39 | ||
41 | if (b == 0) | 40 | if (b == 0) |
42 | return u; | 41 | return u; |
43 | 42 | ||
44 | uu.ll = u; | 43 | uu.ll = u; |
45 | 44 | ||
46 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | 45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; |
47 | if (bm <= 0) | 46 | if (bm <= 0) { |
48 | { | 47 | w.s.low = 0; |
49 | w.s.low = 0; | 48 | w.s.high = (u32) uu.s.low << -bm; |
50 | w.s.high = (USItype)uu.s.low << -bm; | 49 | } else { |
51 | } | 50 | u32 carries = (u32) uu.s.low >> bm; |
52 | else | 51 | w.s.low = (u32) uu.s.low << b; |
53 | { | 52 | w.s.high = ((u32) uu.s.high << b) | carries; |
54 | USItype carries = (USItype)uu.s.low >> bm; | 53 | } |
55 | w.s.low = (USItype)uu.s.low << b; | 54 | |
56 | w.s.high = ((USItype)uu.s.high << b) | carries; | 55 | return w.ll; |
57 | } | ||
58 | |||
59 | return w.ll; | ||
60 | } | 56 | } |
61 | |||
diff --git a/arch/arm/lib/ashrdi3.c b/arch/arm/lib/ashrdi3.c index 71625d218f8d..9a8600a7543f 100644 --- a/arch/arm/lib/ashrdi3.c +++ b/arch/arm/lib/ashrdi3.c | |||
@@ -31,31 +31,27 @@ Boston, MA 02111-1307, USA. */ | |||
31 | 31 | ||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | 33 | ||
34 | DItype | 34 | s64 __ashrdi3(s64 u, int b) |
35 | __ashrdi3 (DItype u, word_type b) | ||
36 | { | 35 | { |
37 | DIunion w; | 36 | DIunion w; |
38 | word_type bm; | 37 | int bm; |
39 | DIunion uu; | 38 | DIunion uu; |
40 | 39 | ||
41 | if (b == 0) | 40 | if (b == 0) |
42 | return u; | 41 | return u; |
43 | 42 | ||
44 | uu.ll = u; | 43 | uu.ll = u; |
45 | 44 | ||
46 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | 45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; |
47 | if (bm <= 0) | 46 | if (bm <= 0) { |
48 | { | 47 | /* w.s.high = 1..1 or 0..0 */ |
49 | /* w.s.high = 1..1 or 0..0 */ | 48 | w.s.high = uu.s.high >> (sizeof(s32) * BITS_PER_UNIT - 1); |
50 | w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1); | 49 | w.s.low = uu.s.high >> -bm; |
51 | w.s.low = uu.s.high >> -bm; | 50 | } else { |
52 | } | 51 | u32 carries = (u32) uu.s.high << bm; |
53 | else | 52 | w.s.high = uu.s.high >> b; |
54 | { | 53 | w.s.low = ((u32) uu.s.low >> b) | carries; |
55 | USItype carries = (USItype)uu.s.high << bm; | 54 | } |
56 | w.s.high = uu.s.high >> b; | 55 | |
57 | w.s.low = ((USItype)uu.s.low >> b) | carries; | 56 | return w.ll; |
58 | } | ||
59 | |||
60 | return w.ll; | ||
61 | } | 57 | } |
diff --git a/arch/arm/lib/gcclib.h b/arch/arm/lib/gcclib.h index 65314a3d9e27..8b6dcc656de7 100644 --- a/arch/arm/lib/gcclib.h +++ b/arch/arm/lib/gcclib.h | |||
@@ -1,25 +1,22 @@ | |||
1 | /* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ | 1 | /* gcclib.h -- definitions for various functions 'borrowed' from gcc-2.95.3 */ |
2 | /* I Molton 29/07/01 */ | 2 | /* I Molton 29/07/01 */ |
3 | 3 | ||
4 | #define BITS_PER_UNIT 8 | 4 | #include <linux/types.h> |
5 | #define SI_TYPE_SIZE (sizeof (SItype) * BITS_PER_UNIT) | ||
6 | 5 | ||
7 | typedef unsigned int UQItype __attribute__ ((mode (QI))); | 6 | #define BITS_PER_UNIT 8 |
8 | typedef int SItype __attribute__ ((mode (SI))); | 7 | #define SI_TYPE_SIZE (sizeof(s32) * BITS_PER_UNIT) |
9 | typedef unsigned int USItype __attribute__ ((mode (SI))); | ||
10 | typedef int DItype __attribute__ ((mode (DI))); | ||
11 | typedef int word_type __attribute__ ((mode (__word__))); | ||
12 | typedef unsigned int UDItype __attribute__ ((mode (DI))); | ||
13 | 8 | ||
14 | #ifdef __ARMEB__ | 9 | #ifdef __ARMEB__ |
15 | struct DIstruct {SItype high, low;}; | 10 | struct DIstruct { |
11 | s32 high, low; | ||
12 | }; | ||
16 | #else | 13 | #else |
17 | struct DIstruct {SItype low, high;}; | 14 | struct DIstruct { |
15 | s32 low, high; | ||
16 | }; | ||
18 | #endif | 17 | #endif |
19 | 18 | ||
20 | typedef union | 19 | typedef union { |
21 | { | 20 | struct DIstruct s; |
22 | struct DIstruct s; | 21 | s64 ll; |
23 | DItype ll; | ||
24 | } DIunion; | 22 | } DIunion; |
25 | |||
diff --git a/arch/arm/lib/io-writesw-armv4.S b/arch/arm/lib/io-writesw-armv4.S index 6d1d7c27806e..5e240e452af6 100644 --- a/arch/arm/lib/io-writesw-armv4.S +++ b/arch/arm/lib/io-writesw-armv4.S | |||
@@ -87,9 +87,9 @@ ENTRY(__raw_writesw) | |||
87 | subs r2, r2, #2 | 87 | subs r2, r2, #2 |
88 | orr ip, ip, r3, push_hbyte1 | 88 | orr ip, ip, r3, push_hbyte1 |
89 | strh ip, [r0] | 89 | strh ip, [r0] |
90 | bpl 2b | 90 | bpl 1b |
91 | 91 | ||
92 | 3: tst r2, #1 | 92 | tst r2, #1 |
93 | 2: movne ip, r3, lsr #8 | 93 | 3: movne ip, r3, lsr #8 |
94 | strneh ip, [r0] | 94 | strneh ip, [r0] |
95 | mov pc, lr | 95 | mov pc, lr |
diff --git a/arch/arm/lib/longlong.h b/arch/arm/lib/longlong.h index 179eea4edc35..90ae647e4d76 100644 --- a/arch/arm/lib/longlong.h +++ b/arch/arm/lib/longlong.h | |||
@@ -26,18 +26,18 @@ | |||
26 | 26 | ||
27 | #define __BITS4 (SI_TYPE_SIZE / 4) | 27 | #define __BITS4 (SI_TYPE_SIZE / 4) |
28 | #define __ll_B (1L << (SI_TYPE_SIZE / 2)) | 28 | #define __ll_B (1L << (SI_TYPE_SIZE / 2)) |
29 | #define __ll_lowpart(t) ((USItype) (t) % __ll_B) | 29 | #define __ll_lowpart(t) ((u32) (t) % __ll_B) |
30 | #define __ll_highpart(t) ((USItype) (t) / __ll_B) | 30 | #define __ll_highpart(t) ((u32) (t) / __ll_B) |
31 | 31 | ||
32 | /* Define auxiliary asm macros. | 32 | /* Define auxiliary asm macros. |
33 | 33 | ||
34 | 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) | 34 | 1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) |
35 | multiplies two USItype integers MULTIPLER and MULTIPLICAND, | 35 | multiplies two u32 integers MULTIPLER and MULTIPLICAND, |
36 | and generates a two-part USItype product in HIGH_PROD and | 36 | and generates a two-part u32 product in HIGH_PROD and |
37 | LOW_PROD. | 37 | LOW_PROD. |
38 | 38 | ||
39 | 2) __umulsidi3(a,b) multiplies two USItype integers A and B, | 39 | 2) __umulsidi3(a,b) multiplies two u32 integers A and B, |
40 | and returns a UDItype product. This is just a variant of umul_ppmm. | 40 | and returns a u64 product. This is just a variant of umul_ppmm. |
41 | 41 | ||
42 | 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator, | 42 | 3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator, |
43 | denominator) divides a two-word unsigned integer, composed by the | 43 | denominator) divides a two-word unsigned integer, composed by the |
@@ -77,23 +77,23 @@ | |||
77 | #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ | 77 | #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ |
78 | __asm__ ("adds %1, %4, %5 \n\ | 78 | __asm__ ("adds %1, %4, %5 \n\ |
79 | adc %0, %2, %3" \ | 79 | adc %0, %2, %3" \ |
80 | : "=r" ((USItype) (sh)), \ | 80 | : "=r" ((u32) (sh)), \ |
81 | "=&r" ((USItype) (sl)) \ | 81 | "=&r" ((u32) (sl)) \ |
82 | : "%r" ((USItype) (ah)), \ | 82 | : "%r" ((u32) (ah)), \ |
83 | "rI" ((USItype) (bh)), \ | 83 | "rI" ((u32) (bh)), \ |
84 | "%r" ((USItype) (al)), \ | 84 | "%r" ((u32) (al)), \ |
85 | "rI" ((USItype) (bl))) | 85 | "rI" ((u32) (bl))) |
86 | #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ | 86 | #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ |
87 | __asm__ ("subs %1, %4, %5 \n\ | 87 | __asm__ ("subs %1, %4, %5 \n\ |
88 | sbc %0, %2, %3" \ | 88 | sbc %0, %2, %3" \ |
89 | : "=r" ((USItype) (sh)), \ | 89 | : "=r" ((u32) (sh)), \ |
90 | "=&r" ((USItype) (sl)) \ | 90 | "=&r" ((u32) (sl)) \ |
91 | : "r" ((USItype) (ah)), \ | 91 | : "r" ((u32) (ah)), \ |
92 | "rI" ((USItype) (bh)), \ | 92 | "rI" ((u32) (bh)), \ |
93 | "r" ((USItype) (al)), \ | 93 | "r" ((u32) (al)), \ |
94 | "rI" ((USItype) (bl))) | 94 | "rI" ((u32) (bl))) |
95 | #define umul_ppmm(xh, xl, a, b) \ | 95 | #define umul_ppmm(xh, xl, a, b) \ |
96 | {register USItype __t0, __t1, __t2; \ | 96 | {register u32 __t0, __t1, __t2; \ |
97 | __asm__ ("%@ Inlined umul_ppmm \n\ | 97 | __asm__ ("%@ Inlined umul_ppmm \n\ |
98 | mov %2, %5, lsr #16 \n\ | 98 | mov %2, %5, lsr #16 \n\ |
99 | mov %0, %6, lsr #16 \n\ | 99 | mov %0, %6, lsr #16 \n\ |
@@ -107,14 +107,14 @@ | |||
107 | addcs %0, %0, #65536 \n\ | 107 | addcs %0, %0, #65536 \n\ |
108 | adds %1, %1, %3, lsl #16 \n\ | 108 | adds %1, %1, %3, lsl #16 \n\ |
109 | adc %0, %0, %3, lsr #16" \ | 109 | adc %0, %0, %3, lsr #16" \ |
110 | : "=&r" ((USItype) (xh)), \ | 110 | : "=&r" ((u32) (xh)), \ |
111 | "=r" ((USItype) (xl)), \ | 111 | "=r" ((u32) (xl)), \ |
112 | "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ | 112 | "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ |
113 | : "r" ((USItype) (a)), \ | 113 | : "r" ((u32) (a)), \ |
114 | "r" ((USItype) (b)));} | 114 | "r" ((u32) (b)));} |
115 | #define UMUL_TIME 20 | 115 | #define UMUL_TIME 20 |
116 | #define UDIV_TIME 100 | 116 | #define UDIV_TIME 100 |
117 | #endif /* __arm__ */ | 117 | #endif /* __arm__ */ |
118 | 118 | ||
119 | #define __umulsidi3(u, v) \ | 119 | #define __umulsidi3(u, v) \ |
120 | ({DIunion __w; \ | 120 | ({DIunion __w; \ |
@@ -123,14 +123,14 @@ | |||
123 | 123 | ||
124 | #define __udiv_qrnnd_c(q, r, n1, n0, d) \ | 124 | #define __udiv_qrnnd_c(q, r, n1, n0, d) \ |
125 | do { \ | 125 | do { \ |
126 | USItype __d1, __d0, __q1, __q0; \ | 126 | u32 __d1, __d0, __q1, __q0; \ |
127 | USItype __r1, __r0, __m; \ | 127 | u32 __r1, __r0, __m; \ |
128 | __d1 = __ll_highpart (d); \ | 128 | __d1 = __ll_highpart (d); \ |
129 | __d0 = __ll_lowpart (d); \ | 129 | __d0 = __ll_lowpart (d); \ |
130 | \ | 130 | \ |
131 | __r1 = (n1) % __d1; \ | 131 | __r1 = (n1) % __d1; \ |
132 | __q1 = (n1) / __d1; \ | 132 | __q1 = (n1) / __d1; \ |
133 | __m = (USItype) __q1 * __d0; \ | 133 | __m = (u32) __q1 * __d0; \ |
134 | __r1 = __r1 * __ll_B | __ll_highpart (n0); \ | 134 | __r1 = __r1 * __ll_B | __ll_highpart (n0); \ |
135 | if (__r1 < __m) \ | 135 | if (__r1 < __m) \ |
136 | { \ | 136 | { \ |
@@ -143,7 +143,7 @@ | |||
143 | \ | 143 | \ |
144 | __r0 = __r1 % __d1; \ | 144 | __r0 = __r1 % __d1; \ |
145 | __q0 = __r1 / __d1; \ | 145 | __q0 = __r1 / __d1; \ |
146 | __m = (USItype) __q0 * __d0; \ | 146 | __m = (u32) __q0 * __d0; \ |
147 | __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ | 147 | __r0 = __r0 * __ll_B | __ll_lowpart (n0); \ |
148 | if (__r0 < __m) \ | 148 | if (__r0 < __m) \ |
149 | { \ | 149 | { \ |
@@ -154,7 +154,7 @@ | |||
154 | } \ | 154 | } \ |
155 | __r0 -= __m; \ | 155 | __r0 -= __m; \ |
156 | \ | 156 | \ |
157 | (q) = (USItype) __q1 * __ll_B | __q0; \ | 157 | (q) = (u32) __q1 * __ll_B | __q0; \ |
158 | (r) = __r0; \ | 158 | (r) = __r0; \ |
159 | } while (0) | 159 | } while (0) |
160 | 160 | ||
@@ -163,14 +163,14 @@ | |||
163 | 163 | ||
164 | #define count_leading_zeros(count, x) \ | 164 | #define count_leading_zeros(count, x) \ |
165 | do { \ | 165 | do { \ |
166 | USItype __xr = (x); \ | 166 | u32 __xr = (x); \ |
167 | USItype __a; \ | 167 | u32 __a; \ |
168 | \ | 168 | \ |
169 | if (SI_TYPE_SIZE <= 32) \ | 169 | if (SI_TYPE_SIZE <= 32) \ |
170 | { \ | 170 | { \ |
171 | __a = __xr < ((USItype)1<<2*__BITS4) \ | 171 | __a = __xr < ((u32)1<<2*__BITS4) \ |
172 | ? (__xr < ((USItype)1<<__BITS4) ? 0 : __BITS4) \ | 172 | ? (__xr < ((u32)1<<__BITS4) ? 0 : __BITS4) \ |
173 | : (__xr < ((USItype)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \ | 173 | : (__xr < ((u32)1<<3*__BITS4) ? 2*__BITS4 : 3*__BITS4); \ |
174 | } \ | 174 | } \ |
175 | else \ | 175 | else \ |
176 | { \ | 176 | { \ |
diff --git a/arch/arm/lib/lshrdi3.c b/arch/arm/lib/lshrdi3.c index b666f1bad451..3681f49d2b6e 100644 --- a/arch/arm/lib/lshrdi3.c +++ b/arch/arm/lib/lshrdi3.c | |||
@@ -31,31 +31,26 @@ Boston, MA 02111-1307, USA. */ | |||
31 | 31 | ||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | 33 | ||
34 | DItype | 34 | s64 __lshrdi3(s64 u, int b) |
35 | __lshrdi3 (DItype u, word_type b) | ||
36 | { | 35 | { |
37 | DIunion w; | 36 | DIunion w; |
38 | word_type bm; | 37 | int bm; |
39 | DIunion uu; | 38 | DIunion uu; |
40 | 39 | ||
41 | if (b == 0) | 40 | if (b == 0) |
42 | return u; | 41 | return u; |
43 | 42 | ||
44 | uu.ll = u; | 43 | uu.ll = u; |
45 | 44 | ||
46 | bm = (sizeof (SItype) * BITS_PER_UNIT) - b; | 45 | bm = (sizeof(s32) * BITS_PER_UNIT) - b; |
47 | if (bm <= 0) | 46 | if (bm <= 0) { |
48 | { | 47 | w.s.high = 0; |
49 | w.s.high = 0; | 48 | w.s.low = (u32) uu.s.high >> -bm; |
50 | w.s.low = (USItype)uu.s.high >> -bm; | 49 | } else { |
51 | } | 50 | u32 carries = (u32) uu.s.high << bm; |
52 | else | 51 | w.s.high = (u32) uu.s.high >> b; |
53 | { | 52 | w.s.low = ((u32) uu.s.low >> b) | carries; |
54 | USItype carries = (USItype)uu.s.high << bm; | 53 | } |
55 | w.s.high = (USItype)uu.s.high >> b; | 54 | |
56 | w.s.low = ((USItype)uu.s.low >> b) | carries; | 55 | return w.ll; |
57 | } | ||
58 | |||
59 | return w.ll; | ||
60 | } | 56 | } |
61 | |||
diff --git a/arch/arm/lib/muldi3.c b/arch/arm/lib/muldi3.c index 44d611b1cfdb..0a3b93313f18 100644 --- a/arch/arm/lib/muldi3.c +++ b/arch/arm/lib/muldi3.c | |||
@@ -32,7 +32,7 @@ Boston, MA 02111-1307, USA. */ | |||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | 33 | ||
34 | #define umul_ppmm(xh, xl, a, b) \ | 34 | #define umul_ppmm(xh, xl, a, b) \ |
35 | {register USItype __t0, __t1, __t2; \ | 35 | {register u32 __t0, __t1, __t2; \ |
36 | __asm__ ("%@ Inlined umul_ppmm \n\ | 36 | __asm__ ("%@ Inlined umul_ppmm \n\ |
37 | mov %2, %5, lsr #16 \n\ | 37 | mov %2, %5, lsr #16 \n\ |
38 | mov %0, %6, lsr #16 \n\ | 38 | mov %0, %6, lsr #16 \n\ |
@@ -46,32 +46,27 @@ Boston, MA 02111-1307, USA. */ | |||
46 | addcs %0, %0, #65536 \n\ | 46 | addcs %0, %0, #65536 \n\ |
47 | adds %1, %1, %3, lsl #16 \n\ | 47 | adds %1, %1, %3, lsl #16 \n\ |
48 | adc %0, %0, %3, lsr #16" \ | 48 | adc %0, %0, %3, lsr #16" \ |
49 | : "=&r" ((USItype) (xh)), \ | 49 | : "=&r" ((u32) (xh)), \ |
50 | "=r" ((USItype) (xl)), \ | 50 | "=r" ((u32) (xl)), \ |
51 | "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ | 51 | "=&r" (__t0), "=&r" (__t1), "=r" (__t2) \ |
52 | : "r" ((USItype) (a)), \ | 52 | : "r" ((u32) (a)), \ |
53 | "r" ((USItype) (b)));} | 53 | "r" ((u32) (b)));} |
54 | |||
55 | 54 | ||
56 | #define __umulsidi3(u, v) \ | 55 | #define __umulsidi3(u, v) \ |
57 | ({DIunion __w; \ | 56 | ({DIunion __w; \ |
58 | umul_ppmm (__w.s.high, __w.s.low, u, v); \ | 57 | umul_ppmm (__w.s.high, __w.s.low, u, v); \ |
59 | __w.ll; }) | 58 | __w.ll; }) |
60 | 59 | ||
61 | 60 | s64 __muldi3(s64 u, s64 v) | |
62 | DItype | ||
63 | __muldi3 (DItype u, DItype v) | ||
64 | { | 61 | { |
65 | DIunion w; | 62 | DIunion w; |
66 | DIunion uu, vv; | 63 | DIunion uu, vv; |
67 | 64 | ||
68 | uu.ll = u, | 65 | uu.ll = u, vv.ll = v; |
69 | vv.ll = v; | ||
70 | 66 | ||
71 | w.ll = __umulsidi3 (uu.s.low, vv.s.low); | 67 | w.ll = __umulsidi3(uu.s.low, vv.s.low); |
72 | w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high | 68 | w.s.high += ((u32) uu.s.low * (u32) vv.s.high |
73 | + (USItype) uu.s.high * (USItype) vv.s.low); | 69 | + (u32) uu.s.high * (u32) vv.s.low); |
74 | 70 | ||
75 | return w.ll; | 71 | return w.ll; |
76 | } | 72 | } |
77 | |||
diff --git a/arch/arm/lib/ucmpdi2.c b/arch/arm/lib/ucmpdi2.c index 6c6ae63efa02..57f3f2df3850 100644 --- a/arch/arm/lib/ucmpdi2.c +++ b/arch/arm/lib/ucmpdi2.c | |||
@@ -31,21 +31,19 @@ Boston, MA 02111-1307, USA. */ | |||
31 | 31 | ||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | 33 | ||
34 | word_type | 34 | int __ucmpdi2(s64 a, s64 b) |
35 | __ucmpdi2 (DItype a, DItype b) | ||
36 | { | 35 | { |
37 | DIunion au, bu; | 36 | DIunion au, bu; |
38 | 37 | ||
39 | au.ll = a, bu.ll = b; | 38 | au.ll = a, bu.ll = b; |
40 | 39 | ||
41 | if ((USItype) au.s.high < (USItype) bu.s.high) | 40 | if ((u32) au.s.high < (u32) bu.s.high) |
42 | return 0; | 41 | return 0; |
43 | else if ((USItype) au.s.high > (USItype) bu.s.high) | 42 | else if ((u32) au.s.high > (u32) bu.s.high) |
44 | return 2; | 43 | return 2; |
45 | if ((USItype) au.s.low < (USItype) bu.s.low) | 44 | if ((u32) au.s.low < (u32) bu.s.low) |
46 | return 0; | 45 | return 0; |
47 | else if ((USItype) au.s.low > (USItype) bu.s.low) | 46 | else if ((u32) au.s.low > (u32) bu.s.low) |
48 | return 2; | 47 | return 2; |
49 | return 1; | 48 | return 1; |
50 | } | 49 | } |
51 | |||
diff --git a/arch/arm/lib/udivdi3.c b/arch/arm/lib/udivdi3.c index d25195f673f4..e343be4c6642 100644 --- a/arch/arm/lib/udivdi3.c +++ b/arch/arm/lib/udivdi3.c | |||
@@ -32,211 +32,191 @@ Boston, MA 02111-1307, USA. */ | |||
32 | #include "gcclib.h" | 32 | #include "gcclib.h" |
33 | #include "longlong.h" | 33 | #include "longlong.h" |
34 | 34 | ||
35 | static const UQItype __clz_tab[] = | 35 | static const u8 __clz_tab[] = { |
36 | { | 36 | 0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, |
37 | 0,1,2,2,3,3,3,3,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, | 37 | 5, 5, 5, 5, 5, 5, 5, 5, |
38 | 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, | 38 | 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
39 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | 39 | 6, 6, 6, 6, 6, 6, 6, 6, |
40 | 7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7, | 40 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
41 | 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, | 41 | 7, 7, 7, 7, 7, 7, 7, 7, |
42 | 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, | 42 | 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
43 | 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, | 43 | 7, 7, 7, 7, 7, 7, 7, 7, |
44 | 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, | 44 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
45 | 8, 8, 8, 8, 8, 8, 8, 8, | ||
46 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, | ||
47 | 8, 8, 8, 8, 8, 8, 8, 8, | ||
48 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, | ||
49 | 8, 8, 8, 8, 8, 8, 8, 8, | ||
50 | 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, | ||
51 | 8, 8, 8, 8, 8, 8, 8, 8, | ||
45 | }; | 52 | }; |
46 | 53 | ||
47 | UDItype | 54 | u64 __udivmoddi4(u64 n, u64 d, u64 * rp) |
48 | __udivmoddi4 (UDItype n, UDItype d, UDItype *rp) | ||
49 | { | 55 | { |
50 | DIunion ww; | 56 | DIunion ww; |
51 | DIunion nn, dd; | 57 | DIunion nn, dd; |
52 | DIunion rr; | 58 | DIunion rr; |
53 | USItype d0, d1, n0, n1, n2; | 59 | u32 d0, d1, n0, n1, n2; |
54 | USItype q0, q1; | 60 | u32 q0, q1; |
55 | USItype b, bm; | 61 | u32 b, bm; |
56 | 62 | ||
57 | nn.ll = n; | 63 | nn.ll = n; |
58 | dd.ll = d; | 64 | dd.ll = d; |
59 | 65 | ||
60 | d0 = dd.s.low; | 66 | d0 = dd.s.low; |
61 | d1 = dd.s.high; | 67 | d1 = dd.s.high; |
62 | n0 = nn.s.low; | 68 | n0 = nn.s.low; |
63 | n1 = nn.s.high; | 69 | n1 = nn.s.high; |
64 | 70 | ||
65 | if (d1 == 0) | 71 | if (d1 == 0) { |
66 | { | 72 | if (d0 > n1) { |
67 | if (d0 > n1) | 73 | /* 0q = nn / 0D */ |
68 | { | 74 | |
69 | /* 0q = nn / 0D */ | 75 | count_leading_zeros(bm, d0); |
70 | 76 | ||
71 | count_leading_zeros (bm, d0); | 77 | if (bm != 0) { |
72 | 78 | /* Normalize, i.e. make the most significant bit of the | |
73 | if (bm != 0) | 79 | denominator set. */ |
74 | { | 80 | |
75 | /* Normalize, i.e. make the most significant bit of the | 81 | d0 = d0 << bm; |
76 | denominator set. */ | 82 | n1 = (n1 << bm) | (n0 >> (SI_TYPE_SIZE - bm)); |
77 | 83 | n0 = n0 << bm; | |
78 | d0 = d0 << bm; | 84 | } |
79 | n1 = (n1 << bm) | (n0 >> (SI_TYPE_SIZE - bm)); | 85 | |
80 | n0 = n0 << bm; | 86 | udiv_qrnnd(q0, n0, n1, n0, d0); |
81 | } | 87 | q1 = 0; |
82 | 88 | ||
83 | udiv_qrnnd (q0, n0, n1, n0, d0); | 89 | /* Remainder in n0 >> bm. */ |
84 | q1 = 0; | 90 | } else { |
85 | 91 | /* qq = NN / 0d */ | |
86 | /* Remainder in n0 >> bm. */ | 92 | |
87 | } | 93 | if (d0 == 0) |
88 | else | 94 | d0 = 1 / d0; /* Divide intentionally by zero. */ |
89 | { | 95 | |
90 | /* qq = NN / 0d */ | 96 | count_leading_zeros(bm, d0); |
91 | 97 | ||
92 | if (d0 == 0) | 98 | if (bm == 0) { |
93 | d0 = 1 / d0; /* Divide intentionally by zero. */ | 99 | /* From (n1 >= d0) /\ (the most significant bit of d0 is set), |
94 | 100 | conclude (the most significant bit of n1 is set) /\ (the | |
95 | count_leading_zeros (bm, d0); | 101 | leading quotient digit q1 = 1). |
96 | 102 | ||
97 | if (bm == 0) | 103 | This special case is necessary, not an optimization. |
98 | { | 104 | (Shifts counts of SI_TYPE_SIZE are undefined.) */ |
99 | /* From (n1 >= d0) /\ (the most significant bit of d0 is set), | 105 | |
100 | conclude (the most significant bit of n1 is set) /\ (the | 106 | n1 -= d0; |
101 | leading quotient digit q1 = 1). | 107 | q1 = 1; |
102 | 108 | } else { | |
103 | This special case is necessary, not an optimization. | 109 | /* Normalize. */ |
104 | (Shifts counts of SI_TYPE_SIZE are undefined.) */ | 110 | |
105 | 111 | b = SI_TYPE_SIZE - bm; | |
106 | n1 -= d0; | 112 | |
107 | q1 = 1; | 113 | d0 = d0 << bm; |
108 | } | 114 | n2 = n1 >> b; |
109 | else | 115 | n1 = (n1 << bm) | (n0 >> b); |
110 | { | 116 | n0 = n0 << bm; |
111 | /* Normalize. */ | 117 | |
112 | 118 | udiv_qrnnd(q1, n1, n2, n1, d0); | |
113 | b = SI_TYPE_SIZE - bm; | 119 | } |
114 | 120 | ||
115 | d0 = d0 << bm; | 121 | /* n1 != d0... */ |
116 | n2 = n1 >> b; | 122 | |
117 | n1 = (n1 << bm) | (n0 >> b); | 123 | udiv_qrnnd(q0, n0, n1, n0, d0); |
118 | n0 = n0 << bm; | 124 | |
119 | 125 | /* Remainder in n0 >> bm. */ | |
120 | udiv_qrnnd (q1, n1, n2, n1, d0); | 126 | } |
121 | } | 127 | |
122 | 128 | if (rp != 0) { | |
123 | /* n1 != d0... */ | 129 | rr.s.low = n0 >> bm; |
124 | 130 | rr.s.high = 0; | |
125 | udiv_qrnnd (q0, n0, n1, n0, d0); | 131 | *rp = rr.ll; |
126 | 132 | } | |
127 | /* Remainder in n0 >> bm. */ | 133 | } else { |
128 | } | 134 | if (d1 > n1) { |
129 | 135 | /* 00 = nn / DD */ | |
130 | if (rp != 0) | 136 | |
131 | { | 137 | q0 = 0; |
132 | rr.s.low = n0 >> bm; | 138 | q1 = 0; |
133 | rr.s.high = 0; | 139 | |
134 | *rp = rr.ll; | 140 | /* Remainder in n1n0. */ |
135 | } | 141 | if (rp != 0) { |
136 | } | 142 | rr.s.low = n0; |
137 | else | 143 | rr.s.high = n1; |
138 | { | 144 | *rp = rr.ll; |
139 | if (d1 > n1) | 145 | } |
140 | { | 146 | } else { |
141 | /* 00 = nn / DD */ | 147 | /* 0q = NN / dd */ |
142 | 148 | ||
143 | q0 = 0; | 149 | count_leading_zeros(bm, d1); |
144 | q1 = 0; | 150 | if (bm == 0) { |
145 | 151 | /* From (n1 >= d1) /\ (the most significant bit of d1 is set), | |
146 | /* Remainder in n1n0. */ | 152 | conclude (the most significant bit of n1 is set) /\ (the |
147 | if (rp != 0) | 153 | quotient digit q0 = 0 or 1). |
148 | { | 154 | |
149 | rr.s.low = n0; | 155 | This special case is necessary, not an optimization. */ |
150 | rr.s.high = n1; | 156 | |
151 | *rp = rr.ll; | 157 | /* The condition on the next line takes advantage of that |
152 | } | 158 | n1 >= d1 (true due to program flow). */ |
153 | } | 159 | if (n1 > d1 || n0 >= d0) { |
154 | else | 160 | q0 = 1; |
155 | { | 161 | sub_ddmmss(n1, n0, n1, n0, d1, d0); |
156 | /* 0q = NN / dd */ | 162 | } else |
157 | 163 | q0 = 0; | |
158 | count_leading_zeros (bm, d1); | 164 | |
159 | if (bm == 0) | 165 | q1 = 0; |
160 | { | 166 | |
161 | /* From (n1 >= d1) /\ (the most significant bit of d1 is set), | 167 | if (rp != 0) { |
162 | conclude (the most significant bit of n1 is set) /\ (the | 168 | rr.s.low = n0; |
163 | quotient digit q0 = 0 or 1). | 169 | rr.s.high = n1; |
164 | 170 | *rp = rr.ll; | |
165 | This special case is necessary, not an optimization. */ | 171 | } |
166 | 172 | } else { | |
167 | /* The condition on the next line takes advantage of that | 173 | u32 m1, m0; |
168 | n1 >= d1 (true due to program flow). */ | 174 | /* Normalize. */ |
169 | if (n1 > d1 || n0 >= d0) | 175 | |
170 | { | 176 | b = SI_TYPE_SIZE - bm; |
171 | q0 = 1; | 177 | |
172 | sub_ddmmss (n1, n0, n1, n0, d1, d0); | 178 | d1 = (d1 << bm) | (d0 >> b); |
173 | } | 179 | d0 = d0 << bm; |
174 | else | 180 | n2 = n1 >> b; |
175 | q0 = 0; | 181 | n1 = (n1 << bm) | (n0 >> b); |
176 | 182 | n0 = n0 << bm; | |
177 | q1 = 0; | 183 | |
178 | 184 | udiv_qrnnd(q0, n1, n2, n1, d1); | |
179 | if (rp != 0) | 185 | umul_ppmm(m1, m0, q0, d0); |
180 | { | 186 | |
181 | rr.s.low = n0; | 187 | if (m1 > n1 || (m1 == n1 && m0 > n0)) { |
182 | rr.s.high = n1; | 188 | q0--; |
183 | *rp = rr.ll; | 189 | sub_ddmmss(m1, m0, m1, m0, d1, d0); |
184 | } | 190 | } |
185 | } | 191 | |
186 | else | 192 | q1 = 0; |
187 | { | 193 | |
188 | USItype m1, m0; | 194 | /* Remainder in (n1n0 - m1m0) >> bm. */ |
189 | /* Normalize. */ | 195 | if (rp != 0) { |
190 | 196 | sub_ddmmss(n1, n0, n1, n0, m1, m0); | |
191 | b = SI_TYPE_SIZE - bm; | 197 | rr.s.low = (n1 << b) | (n0 >> bm); |
192 | 198 | rr.s.high = n1 >> bm; | |
193 | d1 = (d1 << bm) | (d0 >> b); | 199 | *rp = rr.ll; |
194 | d0 = d0 << bm; | 200 | } |
195 | n2 = n1 >> b; | 201 | } |
196 | n1 = (n1 << bm) | (n0 >> b); | 202 | } |
197 | n0 = n0 << bm; | 203 | } |
198 | 204 | ||
199 | udiv_qrnnd (q0, n1, n2, n1, d1); | 205 | ww.s.low = q0; |
200 | umul_ppmm (m1, m0, q0, d0); | 206 | ww.s.high = q1; |
201 | 207 | return ww.ll; | |
202 | if (m1 > n1 || (m1 == n1 && m0 > n0)) | ||
203 | { | ||
204 | q0--; | ||
205 | sub_ddmmss (m1, m0, m1, m0, d1, d0); | ||
206 | } | ||
207 | |||
208 | q1 = 0; | ||
209 | |||
210 | /* Remainder in (n1n0 - m1m0) >> bm. */ | ||
211 | if (rp != 0) | ||
212 | { | ||
213 | sub_ddmmss (n1, n0, n1, n0, m1, m0); | ||
214 | rr.s.low = (n1 << b) | (n0 >> bm); | ||
215 | rr.s.high = n1 >> bm; | ||
216 | *rp = rr.ll; | ||
217 | } | ||
218 | } | ||
219 | } | ||
220 | } | ||
221 | |||
222 | ww.s.low = q0; | ||
223 | ww.s.high = q1; | ||
224 | return ww.ll; | ||
225 | } | 208 | } |
226 | 209 | ||
227 | UDItype | 210 | u64 __udivdi3(u64 n, u64 d) |
228 | __udivdi3 (UDItype n, UDItype d) | ||
229 | { | 211 | { |
230 | return __udivmoddi4 (n, d, (UDItype *) 0); | 212 | return __udivmoddi4(n, d, (u64 *) 0); |
231 | } | 213 | } |
232 | 214 | ||
233 | UDItype | 215 | u64 __umoddi3(u64 u, u64 v) |
234 | __umoddi3 (UDItype u, UDItype v) | ||
235 | { | 216 | { |
236 | UDItype w; | 217 | u64 w; |
237 | 218 | ||
238 | (void) __udivmoddi4 (u ,v, &w); | 219 | (void)__udivmoddi4(u, v, &w); |
239 | 220 | ||
240 | return w; | 221 | return w; |
241 | } | 222 | } |
242 | |||
diff --git a/arch/arm/mach-aaec2000/Kconfig b/arch/arm/mach-aaec2000/Kconfig new file mode 100644 index 000000000000..5e4bef93754c --- /dev/null +++ b/arch/arm/mach-aaec2000/Kconfig | |||
@@ -0,0 +1,11 @@ | |||
1 | if ARCH_AAEC2000 | ||
2 | |||
3 | menu "Agilent AAEC-2000 Implementations" | ||
4 | |||
5 | config MACH_AAED2000 | ||
6 | bool "Agilent AAED-2000 Development Platform" | ||
7 | select CPU_ARM920T | ||
8 | |||
9 | endmenu | ||
10 | |||
11 | endif | ||
diff --git a/arch/arm/mach-aaec2000/Makefile b/arch/arm/mach-aaec2000/Makefile new file mode 100644 index 000000000000..20ec83896c37 --- /dev/null +++ b/arch/arm/mach-aaec2000/Makefile | |||
@@ -0,0 +1,9 @@ | |||
1 | # | ||
2 | # Makefile for the linux kernel. | ||
3 | # | ||
4 | |||
5 | # Common support (must be linked before board specific support) | ||
6 | obj-y += core.o | ||
7 | |||
8 | # Specific board support | ||
9 | obj-$(CONFIG_MACH_AAED2000) += aaed2000.o | ||
diff --git a/arch/arm/mach-aaec2000/aaed2000.c b/arch/arm/mach-aaec2000/aaed2000.c new file mode 100644 index 000000000000..5417ca3f4621 --- /dev/null +++ b/arch/arm/mach-aaec2000/aaed2000.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/aaed2000.c | ||
3 | * | ||
4 | * Support for the Agilent AAED-2000 Development Platform. | ||
5 | * | ||
6 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | * | ||
12 | */ | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/major.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | |||
20 | #include <asm/setup.h> | ||
21 | #include <asm/memory.h> | ||
22 | #include <asm/mach-types.h> | ||
23 | #include <asm/hardware.h> | ||
24 | #include <asm/irq.h> | ||
25 | |||
26 | #include <asm/mach/arch.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | #include <asm/mach/irq.h> | ||
29 | |||
30 | #include "core.h" | ||
31 | |||
32 | static void __init aaed2000_init_irq(void) | ||
33 | { | ||
34 | aaec2000_init_irq(); | ||
35 | } | ||
36 | |||
37 | static void __init aaed2000_map_io(void) | ||
38 | { | ||
39 | aaec2000_map_io(); | ||
40 | } | ||
41 | |||
42 | MACHINE_START(AAED2000, "Agilent AAED-2000 Development Platform") | ||
43 | MAINTAINER("Nicolas Bellido Y Ortega") | ||
44 | BOOT_MEM(0xf0000000, PIO_BASE, VIO_BASE) | ||
45 | MAPIO(aaed2000_map_io) | ||
46 | INITIRQ(aaed2000_init_irq) | ||
47 | .timer = &aaec2000_timer, | ||
48 | MACHINE_END | ||
diff --git a/arch/arm/mach-aaec2000/core.c b/arch/arm/mach-aaec2000/core.c new file mode 100644 index 000000000000..fc145b3768fa --- /dev/null +++ b/arch/arm/mach-aaec2000/core.c | |||
@@ -0,0 +1,157 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/core.c | ||
3 | * | ||
4 | * Code common to all AAEC-2000 machines | ||
5 | * | ||
6 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License version 2 as | ||
10 | * published by the Free Software Foundation. | ||
11 | */ | ||
12 | #include <linux/config.h> | ||
13 | #include <linux/module.h> | ||
14 | #include <linux/kernel.h> | ||
15 | #include <linux/init.h> | ||
16 | #include <linux/list.h> | ||
17 | #include <linux/errno.h> | ||
18 | #include <linux/interrupt.h> | ||
19 | #include <linux/timex.h> | ||
20 | #include <linux/signal.h> | ||
21 | |||
22 | #include <asm/hardware.h> | ||
23 | #include <asm/irq.h> | ||
24 | |||
25 | #include <asm/mach/irq.h> | ||
26 | #include <asm/mach/time.h> | ||
27 | #include <asm/mach/map.h> | ||
28 | |||
29 | /* | ||
30 | * Common I/O mapping: | ||
31 | * | ||
32 | * Static virtual address mappings are as follow: | ||
33 | * | ||
34 | * 0xf8000000-0xf8001ffff: Devices connected to APB bus | ||
35 | * 0xf8002000-0xf8003ffff: Devices connected to AHB bus | ||
36 | * | ||
37 | * Below 0xe8000000 is reserved for vm allocation. | ||
38 | * | ||
39 | * The machine specific code must provide the extra mapping beside the | ||
40 | * default mapping provided here. | ||
41 | */ | ||
42 | static struct map_desc standard_io_desc[] __initdata = { | ||
43 | /* virtual physical length type */ | ||
44 | { VIO_APB_BASE, PIO_APB_BASE, IO_APB_LENGTH, MT_DEVICE }, | ||
45 | { VIO_AHB_BASE, PIO_AHB_BASE, IO_AHB_LENGTH, MT_DEVICE } | ||
46 | }; | ||
47 | |||
48 | void __init aaec2000_map_io(void) | ||
49 | { | ||
50 | iotable_init(standard_io_desc, ARRAY_SIZE(standard_io_desc)); | ||
51 | } | ||
52 | |||
53 | /* | ||
54 | * Interrupt handling routines | ||
55 | */ | ||
56 | static void aaec2000_int_ack(unsigned int irq) | ||
57 | { | ||
58 | IRQ_INTSR = 1 << irq; | ||
59 | } | ||
60 | |||
61 | static void aaec2000_int_mask(unsigned int irq) | ||
62 | { | ||
63 | IRQ_INTENC |= (1 << irq); | ||
64 | } | ||
65 | |||
66 | static void aaec2000_int_unmask(unsigned int irq) | ||
67 | { | ||
68 | IRQ_INTENS |= (1 << irq); | ||
69 | } | ||
70 | |||
71 | static struct irqchip aaec2000_irq_chip = { | ||
72 | .ack = aaec2000_int_ack, | ||
73 | .mask = aaec2000_int_mask, | ||
74 | .unmask = aaec2000_int_unmask, | ||
75 | }; | ||
76 | |||
77 | void __init aaec2000_init_irq(void) | ||
78 | { | ||
79 | unsigned int i; | ||
80 | |||
81 | for (i = 0; i < NR_IRQS; i++) { | ||
82 | set_irq_handler(i, do_level_IRQ); | ||
83 | set_irq_chip(i, &aaec2000_irq_chip); | ||
84 | set_irq_flags(i, IRQF_VALID); | ||
85 | } | ||
86 | |||
87 | /* Disable all interrupts */ | ||
88 | IRQ_INTENC = 0xffffffff; | ||
89 | |||
90 | /* Clear any pending interrupts */ | ||
91 | IRQ_INTSR = IRQ_INTSR; | ||
92 | } | ||
93 | |||
94 | /* | ||
95 | * Time keeping | ||
96 | */ | ||
97 | /* IRQs are disabled before entering here from do_gettimeofday() */ | ||
98 | static unsigned long aaec2000_gettimeoffset(void) | ||
99 | { | ||
100 | unsigned long ticks_to_match, elapsed, usec; | ||
101 | |||
102 | /* Get ticks before next timer match */ | ||
103 | ticks_to_match = TIMER1_LOAD - TIMER1_VAL; | ||
104 | |||
105 | /* We need elapsed ticks since last match */ | ||
106 | elapsed = LATCH - ticks_to_match; | ||
107 | |||
108 | /* Now, convert them to usec */ | ||
109 | usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH; | ||
110 | |||
111 | return usec; | ||
112 | } | ||
113 | |||
114 | /* We enter here with IRQs enabled */ | ||
115 | static irqreturn_t | ||
116 | aaec2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
117 | { | ||
118 | /* TODO: Check timer accuracy */ | ||
119 | write_seqlock(&xtime_lock); | ||
120 | |||
121 | timer_tick(regs); | ||
122 | TIMER1_CLEAR = 1; | ||
123 | |||
124 | write_sequnlock(&xtime_lock); | ||
125 | |||
126 | return IRQ_HANDLED; | ||
127 | } | ||
128 | |||
129 | static struct irqaction aaec2000_timer_irq = { | ||
130 | .name = "AAEC-2000 Timer Tick", | ||
131 | .flags = SA_INTERRUPT, | ||
132 | .handler = aaec2000_timer_interrupt | ||
133 | }; | ||
134 | |||
135 | static void __init aaec2000_timer_init(void) | ||
136 | { | ||
137 | /* Disable timer 1 */ | ||
138 | TIMER1_CTRL = 0; | ||
139 | |||
140 | /* We have somehow to generate a 100Hz clock. | ||
141 | * We then use the 508KHz timer in periodic mode. | ||
142 | */ | ||
143 | TIMER1_LOAD = LATCH; | ||
144 | TIMER1_CLEAR = 1; /* Clear interrupt */ | ||
145 | |||
146 | setup_irq(INT_TMR1_OFL, &aaec2000_timer_irq); | ||
147 | |||
148 | TIMER1_CTRL = TIMER_CTRL_ENABLE | | ||
149 | TIMER_CTRL_PERIODIC | | ||
150 | TIMER_CTRL_CLKSEL_508K; | ||
151 | } | ||
152 | |||
153 | struct sys_timer aaec2000_timer = { | ||
154 | .init = aaec2000_timer_init, | ||
155 | .offset = aaec2000_gettimeoffset, | ||
156 | }; | ||
157 | |||
diff --git a/arch/arm/mach-aaec2000/core.h b/arch/arm/mach-aaec2000/core.h new file mode 100644 index 000000000000..91893d848c16 --- /dev/null +++ b/arch/arm/mach-aaec2000/core.h | |||
@@ -0,0 +1,16 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-aaec2000/core.h | ||
3 | * | ||
4 | * Copyright (c) 2005 Nicolas Bellido Y Ortega | ||
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 | */ | ||
11 | |||
12 | struct sys_timer; | ||
13 | |||
14 | extern struct sys_timer aaec2000_timer; | ||
15 | extern void __init aaec2000_map_io(void); | ||
16 | extern void __init aaec2000_init_irq(void); | ||
diff --git a/arch/arm/mach-integrator/Makefile b/arch/arm/mach-integrator/Makefile index 158daaf9e3b0..ebb255bdce8a 100644 --- a/arch/arm/mach-integrator/Makefile +++ b/arch/arm/mach-integrator/Makefile | |||
@@ -12,3 +12,4 @@ obj-$(CONFIG_LEDS) += leds.o | |||
12 | obj-$(CONFIG_PCI) += pci_v3.o pci.o | 12 | obj-$(CONFIG_PCI) += pci_v3.o pci.o |
13 | obj-$(CONFIG_CPU_FREQ_INTEGRATOR) += cpu.o | 13 | obj-$(CONFIG_CPU_FREQ_INTEGRATOR) += cpu.o |
14 | obj-$(CONFIG_INTEGRATOR_IMPD1) += impd1.o | 14 | obj-$(CONFIG_INTEGRATOR_IMPD1) += impd1.o |
15 | obj-$(CONFIG_SMP) += platsmp.o headsmp.o | ||
diff --git a/arch/arm/mach-integrator/core.c b/arch/arm/mach-integrator/core.c index bd17b5154311..bd1e5e3c9d34 100644 --- a/arch/arm/mach-integrator/core.c +++ b/arch/arm/mach-integrator/core.c | |||
@@ -14,6 +14,7 @@ | |||
14 | #include <linux/spinlock.h> | 14 | #include <linux/spinlock.h> |
15 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/smp.h> | ||
17 | 18 | ||
18 | #include <asm/hardware.h> | 19 | #include <asm/hardware.h> |
19 | #include <asm/irq.h> | 20 | #include <asm/irq.h> |
@@ -221,7 +222,23 @@ integrator_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
221 | */ | 222 | */ |
222 | timer1->TimerClear = 1; | 223 | timer1->TimerClear = 1; |
223 | 224 | ||
224 | timer_tick(regs); | 225 | /* |
226 | * the clock tick routines are only processed on the | ||
227 | * primary CPU | ||
228 | */ | ||
229 | if (hard_smp_processor_id() == 0) { | ||
230 | timer_tick(regs); | ||
231 | #ifdef CONFIG_SMP | ||
232 | smp_send_timer(); | ||
233 | #endif | ||
234 | } | ||
235 | |||
236 | #ifdef CONFIG_SMP | ||
237 | /* | ||
238 | * this is the ARM equivalent of the APIC timer interrupt | ||
239 | */ | ||
240 | update_process_times(user_mode(regs)); | ||
241 | #endif /* CONFIG_SMP */ | ||
225 | 242 | ||
226 | write_sequnlock(&xtime_lock); | 243 | write_sequnlock(&xtime_lock); |
227 | 244 | ||
diff --git a/arch/arm/mach-integrator/headsmp.S b/arch/arm/mach-integrator/headsmp.S new file mode 100644 index 000000000000..ceaa88e30d70 --- /dev/null +++ b/arch/arm/mach-integrator/headsmp.S | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-integrator/headsmp.S | ||
3 | * | ||
4 | * Copyright (c) 2003 ARM Limited | ||
5 | * All Rights Reserved | ||
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 | #include <linux/linkage.h> | ||
12 | #include <linux/init.h> | ||
13 | |||
14 | __INIT | ||
15 | |||
16 | /* | ||
17 | * Integrator specific entry point for secondary CPUs. This provides | ||
18 | * a "holding pen" into which all secondary cores are held until we're | ||
19 | * ready for them to initialise. | ||
20 | */ | ||
21 | ENTRY(integrator_secondary_startup) | ||
22 | adr r4, 1f | ||
23 | ldmia r4, {r5, r6} | ||
24 | sub r4, r4, r5 | ||
25 | ldr r6, [r6, r4] | ||
26 | pen: ldr r7, [r6] | ||
27 | cmp r7, r0 | ||
28 | bne pen | ||
29 | |||
30 | /* | ||
31 | * we've been released from the holding pen: secondary_stack | ||
32 | * should now contain the SVC stack for this core | ||
33 | */ | ||
34 | b secondary_startup | ||
35 | |||
36 | 1: .long . | ||
37 | .long phys_pen_release | ||
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 3b948e8c2751..e0a01eef0993 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -83,7 +83,6 @@ static struct map_desc intcp_io_desc[] __initdata = { | |||
83 | { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, | 83 | { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K, MT_DEVICE }, |
84 | { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, | 84 | { IO_ADDRESS(INTEGRATOR_DBG_BASE), INTEGRATOR_DBG_BASE, SZ_4K, MT_DEVICE }, |
85 | { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, | 85 | { IO_ADDRESS(INTEGRATOR_GPIO_BASE), INTEGRATOR_GPIO_BASE, SZ_4K, MT_DEVICE }, |
86 | { 0xfc900000, 0xc9000000, SZ_4K, MT_DEVICE }, | ||
87 | { 0xfca00000, 0xca000000, SZ_4K, MT_DEVICE }, | 86 | { 0xfca00000, 0xca000000, SZ_4K, MT_DEVICE }, |
88 | { 0xfcb00000, 0xcb000000, SZ_4K, MT_DEVICE }, | 87 | { 0xfcb00000, 0xcb000000, SZ_4K, MT_DEVICE }, |
89 | }; | 88 | }; |
diff --git a/arch/arm/mach-integrator/leds.c b/arch/arm/mach-integrator/leds.c index d2c0ab21150c..f1436e683b49 100644 --- a/arch/arm/mach-integrator/leds.c +++ b/arch/arm/mach-integrator/leds.c | |||
@@ -22,6 +22,8 @@ | |||
22 | */ | 22 | */ |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/init.h> | 24 | #include <linux/init.h> |
25 | #include <linux/smp.h> | ||
26 | #include <linux/spinlock.h> | ||
25 | 27 | ||
26 | #include <asm/hardware.h> | 28 | #include <asm/hardware.h> |
27 | #include <asm/io.h> | 29 | #include <asm/io.h> |
@@ -85,4 +87,4 @@ static int __init leds_init(void) | |||
85 | return 0; | 87 | return 0; |
86 | } | 88 | } |
87 | 89 | ||
88 | __initcall(leds_init); | 90 | core_initcall(leds_init); |
diff --git a/arch/arm/mach-integrator/platsmp.c b/arch/arm/mach-integrator/platsmp.c new file mode 100644 index 000000000000..ead15dfcb53d --- /dev/null +++ b/arch/arm/mach-integrator/platsmp.c | |||
@@ -0,0 +1,192 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-cintegrator/platsmp.c | ||
3 | * | ||
4 | * Copyright (C) 2002 ARM Ltd. | ||
5 | * All Rights Reserved | ||
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 | #include <linux/init.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/sched.h> | ||
14 | #include <linux/errno.h> | ||
15 | #include <linux/mm.h> | ||
16 | |||
17 | #include <asm/atomic.h> | ||
18 | #include <asm/delay.h> | ||
19 | #include <asm/mmu_context.h> | ||
20 | #include <asm/procinfo.h> | ||
21 | #include <asm/ptrace.h> | ||
22 | #include <asm/smp.h> | ||
23 | |||
24 | extern void integrator_secondary_startup(void); | ||
25 | |||
26 | /* | ||
27 | * control for which core is the next to come out of the secondary | ||
28 | * boot "holding pen" | ||
29 | */ | ||
30 | volatile int __initdata pen_release = -1; | ||
31 | unsigned long __initdata phys_pen_release = 0; | ||
32 | |||
33 | static DEFINE_SPINLOCK(boot_lock); | ||
34 | |||
35 | void __init platform_secondary_init(unsigned int cpu) | ||
36 | { | ||
37 | /* | ||
38 | * the primary core may have used a "cross call" soft interrupt | ||
39 | * to get this processor out of WFI in the BootMonitor - make | ||
40 | * sure that we are no longer being sent this soft interrupt | ||
41 | */ | ||
42 | smp_cross_call_done(cpumask_of_cpu(cpu)); | ||
43 | |||
44 | /* | ||
45 | * if any interrupts are already enabled for the primary | ||
46 | * core (e.g. timer irq), then they will not have been enabled | ||
47 | * for us: do so | ||
48 | */ | ||
49 | secondary_scan_irqs(); | ||
50 | |||
51 | /* | ||
52 | * let the primary processor know we're out of the | ||
53 | * pen, then head off into the C entry point | ||
54 | */ | ||
55 | pen_release = -1; | ||
56 | |||
57 | /* | ||
58 | * Synchronise with the boot thread. | ||
59 | */ | ||
60 | spin_lock(&boot_lock); | ||
61 | spin_unlock(&boot_lock); | ||
62 | } | ||
63 | |||
64 | int __init boot_secondary(unsigned int cpu, struct task_struct *idle) | ||
65 | { | ||
66 | unsigned long timeout; | ||
67 | |||
68 | /* | ||
69 | * set synchronisation state between this boot processor | ||
70 | * and the secondary one | ||
71 | */ | ||
72 | spin_lock(&boot_lock); | ||
73 | |||
74 | /* | ||
75 | * The secondary processor is waiting to be released from | ||
76 | * the holding pen - release it, then wait for it to flag | ||
77 | * that it has been released by resetting pen_release. | ||
78 | * | ||
79 | * Note that "pen_release" is the hardware CPU ID, whereas | ||
80 | * "cpu" is Linux's internal ID. | ||
81 | */ | ||
82 | pen_release = cpu; | ||
83 | |||
84 | /* | ||
85 | * XXX | ||
86 | * | ||
87 | * This is a later addition to the booting protocol: the | ||
88 | * bootMonitor now puts secondary cores into WFI, so | ||
89 | * poke_milo() no longer gets the cores moving; we need | ||
90 | * to send a soft interrupt to wake the secondary core. | ||
91 | * Use smp_cross_call() for this, since there's little | ||
92 | * point duplicating the code here | ||
93 | */ | ||
94 | smp_cross_call(cpumask_of_cpu(cpu)); | ||
95 | |||
96 | timeout = jiffies + (1 * HZ); | ||
97 | while (time_before(jiffies, timeout)) { | ||
98 | if (pen_release == -1) | ||
99 | break; | ||
100 | |||
101 | udelay(10); | ||
102 | } | ||
103 | |||
104 | /* | ||
105 | * now the secondary core is starting up let it run its | ||
106 | * calibrations, then wait for it to finish | ||
107 | */ | ||
108 | spin_unlock(&boot_lock); | ||
109 | |||
110 | return pen_release != -1 ? -ENOSYS : 0; | ||
111 | } | ||
112 | |||
113 | static void __init poke_milo(void) | ||
114 | { | ||
115 | extern void secondary_startup(void); | ||
116 | |||
117 | /* nobody is to be released from the pen yet */ | ||
118 | pen_release = -1; | ||
119 | |||
120 | phys_pen_release = virt_to_phys(&pen_release); | ||
121 | |||
122 | /* | ||
123 | * write the address of secondary startup into the system-wide | ||
124 | * flags register, then clear the bottom two bits, which is what | ||
125 | * BootMonitor is waiting for | ||
126 | */ | ||
127 | #if 1 | ||
128 | #define CINTEGRATOR_HDR_FLAGSS_OFFSET 0x30 | ||
129 | __raw_writel(virt_to_phys(integrator_secondary_startup), | ||
130 | (IO_ADDRESS(INTEGRATOR_HDR_BASE) + | ||
131 | CINTEGRATOR_HDR_FLAGSS_OFFSET)); | ||
132 | #define CINTEGRATOR_HDR_FLAGSC_OFFSET 0x34 | ||
133 | __raw_writel(3, | ||
134 | (IO_ADDRESS(INTEGRATOR_HDR_BASE) + | ||
135 | CINTEGRATOR_HDR_FLAGSC_OFFSET)); | ||
136 | #endif | ||
137 | |||
138 | mb(); | ||
139 | } | ||
140 | |||
141 | void __init smp_prepare_cpus(unsigned int max_cpus) | ||
142 | { | ||
143 | unsigned int ncores = get_core_count(); | ||
144 | unsigned int cpu = smp_processor_id(); | ||
145 | int i; | ||
146 | |||
147 | /* sanity check */ | ||
148 | if (ncores == 0) { | ||
149 | printk(KERN_ERR | ||
150 | "Integrator/CP: strange CM count of 0? Default to 1\n"); | ||
151 | |||
152 | ncores = 1; | ||
153 | } | ||
154 | |||
155 | if (ncores > NR_CPUS) { | ||
156 | printk(KERN_WARNING | ||
157 | "Integrator/CP: no. of cores (%d) greater than configured " | ||
158 | "maximum of %d - clipping\n", | ||
159 | ncores, NR_CPUS); | ||
160 | ncores = NR_CPUS; | ||
161 | } | ||
162 | |||
163 | /* | ||
164 | * start with some more config for the Boot CPU, now that | ||
165 | * the world is a bit more alive (which was not the case | ||
166 | * when smp_prepare_boot_cpu() was called) | ||
167 | */ | ||
168 | smp_store_cpu_info(cpu); | ||
169 | |||
170 | /* | ||
171 | * are we trying to boot more cores than exist? | ||
172 | */ | ||
173 | if (max_cpus > ncores) | ||
174 | max_cpus = ncores; | ||
175 | |||
176 | /* | ||
177 | * Initialise the present mask - this tells us which CPUs should | ||
178 | * be present. | ||
179 | */ | ||
180 | for (i = 0; i < max_cpus; i++) { | ||
181 | cpu_set(i, cpu_present_mask); | ||
182 | } | ||
183 | |||
184 | /* | ||
185 | * Do we need any more CPUs? If so, then let them know where | ||
186 | * to start. Note that, on modern versions of MILO, the "poke" | ||
187 | * doesn't actually do anything until each individual core is | ||
188 | * sent a soft interrupt to get it out of WFI | ||
189 | */ | ||
190 | if (max_cpus > 1) | ||
191 | poke_milo(); | ||
192 | } | ||
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 4f3c3d5c781c..fc0555596d6d 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -162,12 +162,13 @@ void __init ixp2000_map_io(void) | |||
162 | static unsigned ticks_per_jiffy; | 162 | static unsigned ticks_per_jiffy; |
163 | static unsigned ticks_per_usec; | 163 | static unsigned ticks_per_usec; |
164 | static unsigned next_jiffy_time; | 164 | static unsigned next_jiffy_time; |
165 | static volatile unsigned long *missing_jiffy_timer_csr; | ||
165 | 166 | ||
166 | unsigned long ixp2000_gettimeoffset (void) | 167 | unsigned long ixp2000_gettimeoffset (void) |
167 | { | 168 | { |
168 | unsigned long offset; | 169 | unsigned long offset; |
169 | 170 | ||
170 | offset = next_jiffy_time - *IXP2000_T4_CSR; | 171 | offset = next_jiffy_time - *missing_jiffy_timer_csr; |
171 | 172 | ||
172 | return offset / ticks_per_usec; | 173 | return offset / ticks_per_usec; |
173 | } | 174 | } |
@@ -179,7 +180,7 @@ static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
179 | /* clear timer 1 */ | 180 | /* clear timer 1 */ |
180 | ixp2000_reg_write(IXP2000_T1_CLR, 1); | 181 | ixp2000_reg_write(IXP2000_T1_CLR, 1); |
181 | 182 | ||
182 | while ((next_jiffy_time - *IXP2000_T4_CSR) > ticks_per_jiffy) { | 183 | while ((next_jiffy_time - *missing_jiffy_timer_csr) > ticks_per_jiffy) { |
183 | timer_tick(regs); | 184 | timer_tick(regs); |
184 | next_jiffy_time -= ticks_per_jiffy; | 185 | next_jiffy_time -= ticks_per_jiffy; |
185 | } | 186 | } |
@@ -197,20 +198,37 @@ static struct irqaction ixp2000_timer_irq = { | |||
197 | 198 | ||
198 | void __init ixp2000_init_time(unsigned long tick_rate) | 199 | void __init ixp2000_init_time(unsigned long tick_rate) |
199 | { | 200 | { |
200 | ixp2000_reg_write(IXP2000_T1_CLR, 0); | ||
201 | ixp2000_reg_write(IXP2000_T4_CLR, 0); | ||
202 | |||
203 | ticks_per_jiffy = (tick_rate + HZ/2) / HZ; | 201 | ticks_per_jiffy = (tick_rate + HZ/2) / HZ; |
204 | ticks_per_usec = tick_rate / 1000000; | 202 | ticks_per_usec = tick_rate / 1000000; |
205 | 203 | ||
204 | /* | ||
205 | * We use timer 1 as our timer interrupt. | ||
206 | */ | ||
207 | ixp2000_reg_write(IXP2000_T1_CLR, 0); | ||
206 | ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy - 1); | 208 | ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy - 1); |
207 | ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7)); | 209 | ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7)); |
208 | 210 | ||
209 | /* | 211 | /* |
210 | * We use T4 as a monotonic counter to track missed jiffies | 212 | * We use a second timer as a monotonic counter for tracking |
213 | * missed jiffies. The IXP2000 has four timers, but if we're | ||
214 | * on an A-step IXP2800, timer 2 and 3 don't work, so on those | ||
215 | * chips we use timer 4. Timer 4 is the only timer that can | ||
216 | * be used for the watchdog, so we use timer 2 if we're on a | ||
217 | * non-buggy chip. | ||
211 | */ | 218 | */ |
212 | ixp2000_reg_write(IXP2000_T4_CLD, -1); | 219 | if ((*IXP2000_PRODUCT_ID & 0x001ffef0) == 0x00000000) { |
213 | ixp2000_reg_write(IXP2000_T4_CTL, (1 << 7)); | 220 | printk(KERN_INFO "Enabling IXP2800 erratum #25 workaround\n"); |
221 | |||
222 | ixp2000_reg_write(IXP2000_T4_CLR, 0); | ||
223 | ixp2000_reg_write(IXP2000_T4_CLD, -1); | ||
224 | ixp2000_reg_write(IXP2000_T4_CTL, (1 << 7)); | ||
225 | missing_jiffy_timer_csr = IXP2000_T4_CSR; | ||
226 | } else { | ||
227 | ixp2000_reg_write(IXP2000_T2_CLR, 0); | ||
228 | ixp2000_reg_write(IXP2000_T2_CLD, -1); | ||
229 | ixp2000_reg_write(IXP2000_T2_CTL, (1 << 7)); | ||
230 | missing_jiffy_timer_csr = IXP2000_T2_CSR; | ||
231 | } | ||
214 | next_jiffy_time = 0xffffffff; | 232 | next_jiffy_time = 0xffffffff; |
215 | 233 | ||
216 | /* register for interrupt */ | 234 | /* register for interrupt */ |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index dd012d6e2f5c..f2c9e0d2b24b 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/kernel.h> | 15 | #include <linux/kernel.h> |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/sysdev.h> | ||
18 | #include <linux/major.h> | 19 | #include <linux/major.h> |
19 | #include <linux/fb.h> | 20 | #include <linux/fb.h> |
20 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
@@ -106,6 +107,35 @@ static void __init lubbock_init_irq(void) | |||
106 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); | 107 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); |
107 | } | 108 | } |
108 | 109 | ||
110 | #ifdef CONFIG_PM | ||
111 | |||
112 | static int lubbock_irq_resume(struct sys_device *dev) | ||
113 | { | ||
114 | LUB_IRQ_MASK_EN = lubbock_irq_enabled; | ||
115 | return 0; | ||
116 | } | ||
117 | |||
118 | static struct sysdev_class lubbock_irq_sysclass = { | ||
119 | set_kset_name("cpld_irq"), | ||
120 | .resume = lubbock_irq_resume, | ||
121 | }; | ||
122 | |||
123 | static struct sys_device lubbock_irq_device = { | ||
124 | .cls = &lubbock_irq_sysclass, | ||
125 | }; | ||
126 | |||
127 | static int __init lubbock_irq_device_init(void) | ||
128 | { | ||
129 | int ret = sysdev_class_register(&lubbock_irq_sysclass); | ||
130 | if (ret == 0) | ||
131 | ret = sysdev_register(&lubbock_irq_device); | ||
132 | return ret; | ||
133 | } | ||
134 | |||
135 | device_initcall(lubbock_irq_device_init); | ||
136 | |||
137 | #endif | ||
138 | |||
109 | static int lubbock_udc_is_connected(void) | 139 | static int lubbock_udc_is_connected(void) |
110 | { | 140 | { |
111 | return (LUB_MISC_RD & (1 << 9)) == 0; | 141 | return (LUB_MISC_RD & (1 << 9)) == 0; |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 3f952237ae3d..9896afca751f 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -15,6 +15,7 @@ | |||
15 | 15 | ||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/device.h> | 17 | #include <linux/device.h> |
18 | #include <linux/sysdev.h> | ||
18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
19 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
20 | #include <linux/bitops.h> | 21 | #include <linux/bitops.h> |
@@ -62,7 +63,6 @@ static struct irqchip mainstone_irq_chip = { | |||
62 | .unmask = mainstone_unmask_irq, | 63 | .unmask = mainstone_unmask_irq, |
63 | }; | 64 | }; |
64 | 65 | ||
65 | |||
66 | static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, | 66 | static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, |
67 | struct pt_regs *regs) | 67 | struct pt_regs *regs) |
68 | { | 68 | { |
@@ -100,6 +100,35 @@ static void __init mainstone_init_irq(void) | |||
100 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); | 100 | set_irq_type(IRQ_GPIO(0), IRQT_FALLING); |
101 | } | 101 | } |
102 | 102 | ||
103 | #ifdef CONFIG_PM | ||
104 | |||
105 | static int mainstone_irq_resume(struct sys_device *dev) | ||
106 | { | ||
107 | MST_INTMSKENA = mainstone_irq_enabled; | ||
108 | return 0; | ||
109 | } | ||
110 | |||
111 | static struct sysdev_class mainstone_irq_sysclass = { | ||
112 | set_kset_name("cpld_irq"), | ||
113 | .resume = mainstone_irq_resume, | ||
114 | }; | ||
115 | |||
116 | static struct sys_device mainstone_irq_device = { | ||
117 | .cls = &mainstone_irq_sysclass, | ||
118 | }; | ||
119 | |||
120 | static int __init mainstone_irq_device_init(void) | ||
121 | { | ||
122 | int ret = sysdev_class_register(&mainstone_irq_sysclass); | ||
123 | if (ret == 0) | ||
124 | ret = sysdev_register(&mainstone_irq_device); | ||
125 | return ret; | ||
126 | } | ||
127 | |||
128 | device_initcall(mainstone_irq_device_init); | ||
129 | |||
130 | #endif | ||
131 | |||
103 | 132 | ||
104 | static struct resource smc91x_resources[] = { | 133 | static struct resource smc91x_resources[] = { |
105 | [0] = { | 134 | [0] = { |
@@ -304,6 +333,15 @@ static void __init mainstone_map_io(void) | |||
304 | PWER = 0xC0000002; | 333 | PWER = 0xC0000002; |
305 | PRER = 0x00000002; | 334 | PRER = 0x00000002; |
306 | PFER = 0x00000002; | 335 | PFER = 0x00000002; |
336 | /* for use I SRAM as framebuffer. */ | ||
337 | PSLR |= 0xF04; | ||
338 | PCFR = 0x66; | ||
339 | /* For Keypad wakeup. */ | ||
340 | KPC &=~KPC_ASACT; | ||
341 | KPC |=KPC_AS; | ||
342 | PKWR = 0x000FD000; | ||
343 | /* Need read PKWR back after set it. */ | ||
344 | PKWR; | ||
307 | } | 345 | } |
308 | 346 | ||
309 | MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") | 347 | MACHINE_START(MAINSTONE, "Intel HCDDBBVA0 Development Platform (aka Mainstone)") |
diff --git a/arch/arm/mach-pxa/pm.c b/arch/arm/mach-pxa/pm.c index 82a4bf34c251..ac4dd4336160 100644 --- a/arch/arm/mach-pxa/pm.c +++ b/arch/arm/mach-pxa/pm.c | |||
@@ -29,9 +29,6 @@ | |||
29 | */ | 29 | */ |
30 | #undef DEBUG | 30 | #undef DEBUG |
31 | 31 | ||
32 | extern void pxa_cpu_suspend(void); | ||
33 | extern void pxa_cpu_resume(void); | ||
34 | |||
35 | #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x | 32 | #define SAVE(x) sleep_save[SLEEP_SAVE_##x] = x |
36 | #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] | 33 | #define RESTORE(x) x = sleep_save[SLEEP_SAVE_##x] |
37 | 34 | ||
@@ -63,6 +60,12 @@ enum { SLEEP_SAVE_START = 0, | |||
63 | SLEEP_SAVE_ICMR, | 60 | SLEEP_SAVE_ICMR, |
64 | SLEEP_SAVE_CKEN, | 61 | SLEEP_SAVE_CKEN, |
65 | 62 | ||
63 | #ifdef CONFIG_PXA27x | ||
64 | SLEEP_SAVE_MDREFR, | ||
65 | SLEEP_SAVE_PWER, SLEEP_SAVE_PCFR, SLEEP_SAVE_PRER, | ||
66 | SLEEP_SAVE_PFER, SLEEP_SAVE_PKWR, | ||
67 | #endif | ||
68 | |||
66 | SLEEP_SAVE_CKSUM, | 69 | SLEEP_SAVE_CKSUM, |
67 | 70 | ||
68 | SLEEP_SAVE_SIZE | 71 | SLEEP_SAVE_SIZE |
@@ -75,9 +78,7 @@ static int pxa_pm_enter(suspend_state_t state) | |||
75 | unsigned long checksum = 0; | 78 | unsigned long checksum = 0; |
76 | struct timespec delta, rtc; | 79 | struct timespec delta, rtc; |
77 | int i; | 80 | int i; |
78 | 81 | extern void pxa_cpu_pm_enter(suspend_state_t state); | |
79 | if (state != PM_SUSPEND_MEM) | ||
80 | return -EINVAL; | ||
81 | 82 | ||
82 | #ifdef CONFIG_IWMMXT | 83 | #ifdef CONFIG_IWMMXT |
83 | /* force any iWMMXt context to ram **/ | 84 | /* force any iWMMXt context to ram **/ |
@@ -100,16 +101,17 @@ static int pxa_pm_enter(suspend_state_t state) | |||
100 | SAVE(GAFR2_L); SAVE(GAFR2_U); | 101 | SAVE(GAFR2_L); SAVE(GAFR2_U); |
101 | 102 | ||
102 | #ifdef CONFIG_PXA27x | 103 | #ifdef CONFIG_PXA27x |
104 | SAVE(MDREFR); | ||
103 | SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3); | 105 | SAVE(GPLR3); SAVE(GPDR3); SAVE(GRER3); SAVE(GFER3); SAVE(PGSR3); |
104 | SAVE(GAFR3_L); SAVE(GAFR3_U); | 106 | SAVE(GAFR3_L); SAVE(GAFR3_U); |
107 | SAVE(PWER); SAVE(PCFR); SAVE(PRER); | ||
108 | SAVE(PFER); SAVE(PKWR); | ||
105 | #endif | 109 | #endif |
106 | 110 | ||
107 | SAVE(ICMR); | 111 | SAVE(ICMR); |
108 | ICMR = 0; | 112 | ICMR = 0; |
109 | 113 | ||
110 | SAVE(CKEN); | 114 | SAVE(CKEN); |
111 | CKEN = 0; | ||
112 | |||
113 | SAVE(PSTR); | 115 | SAVE(PSTR); |
114 | 116 | ||
115 | /* Note: wake up source are set up in each machine specific files */ | 117 | /* Note: wake up source are set up in each machine specific files */ |
@@ -123,16 +125,15 @@ static int pxa_pm_enter(suspend_state_t state) | |||
123 | /* Clear sleep reset status */ | 125 | /* Clear sleep reset status */ |
124 | RCSR = RCSR_SMR; | 126 | RCSR = RCSR_SMR; |
125 | 127 | ||
126 | /* set resume return address */ | ||
127 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
128 | |||
129 | /* before sleeping, calculate and save a checksum */ | 128 | /* before sleeping, calculate and save a checksum */ |
130 | for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++) | 129 | for (i = 0; i < SLEEP_SAVE_SIZE - 1; i++) |
131 | checksum += sleep_save[i]; | 130 | checksum += sleep_save[i]; |
132 | sleep_save[SLEEP_SAVE_CKSUM] = checksum; | 131 | sleep_save[SLEEP_SAVE_CKSUM] = checksum; |
133 | 132 | ||
134 | /* *** go zzz *** */ | 133 | /* *** go zzz *** */ |
135 | pxa_cpu_suspend(); | 134 | pxa_cpu_pm_enter(state); |
135 | |||
136 | cpu_init(); | ||
136 | 137 | ||
137 | /* after sleeping, validate the checksum */ | 138 | /* after sleeping, validate the checksum */ |
138 | checksum = 0; | 139 | checksum = 0; |
@@ -145,7 +146,7 @@ static int pxa_pm_enter(suspend_state_t state) | |||
145 | LUB_HEXLED = 0xbadbadc5; | 146 | LUB_HEXLED = 0xbadbadc5; |
146 | #endif | 147 | #endif |
147 | while (1) | 148 | while (1) |
148 | pxa_cpu_suspend(); | 149 | pxa_cpu_pm_enter(state); |
149 | } | 150 | } |
150 | 151 | ||
151 | /* ensure not to come back here if it wasn't intended */ | 152 | /* ensure not to come back here if it wasn't intended */ |
@@ -162,8 +163,11 @@ static int pxa_pm_enter(suspend_state_t state) | |||
162 | RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); | 163 | RESTORE(PGSR0); RESTORE(PGSR1); RESTORE(PGSR2); |
163 | 164 | ||
164 | #ifdef CONFIG_PXA27x | 165 | #ifdef CONFIG_PXA27x |
166 | RESTORE(MDREFR); | ||
165 | RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3); | 167 | RESTORE(GAFR3_L); RESTORE(GAFR3_U); RESTORE_GPLEVEL(3); |
166 | RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); | 168 | RESTORE(GPDR3); RESTORE(GRER3); RESTORE(GFER3); RESTORE(PGSR3); |
169 | RESTORE(PWER); RESTORE(PCFR); RESTORE(PRER); | ||
170 | RESTORE(PFER); RESTORE(PKWR); | ||
167 | #endif | 171 | #endif |
168 | 172 | ||
169 | PSSR = PSSR_RDH | PSSR_PH; | 173 | PSSR = PSSR_RDH | PSSR_PH; |
@@ -197,7 +201,9 @@ unsigned long sleep_phys_sp(void *sp) | |||
197 | */ | 201 | */ |
198 | static int pxa_pm_prepare(suspend_state_t state) | 202 | static int pxa_pm_prepare(suspend_state_t state) |
199 | { | 203 | { |
200 | return 0; | 204 | extern int pxa_cpu_pm_prepare(suspend_state_t state); |
205 | |||
206 | return pxa_cpu_pm_prepare(state); | ||
201 | } | 207 | } |
202 | 208 | ||
203 | /* | 209 | /* |
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c index e887b7175ef3..7869c3b4e62f 100644 --- a/arch/arm/mach-pxa/pxa25x.c +++ b/arch/arm/mach-pxa/pxa25x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | * initialization stuff for PXA machines which can be overridden later if | 16 | * initialization stuff for PXA machines which can be overridden later if |
17 | * need be. | 17 | * need be. |
18 | */ | 18 | */ |
19 | #include <linux/config.h> | ||
19 | #include <linux/module.h> | 20 | #include <linux/module.h> |
20 | #include <linux/kernel.h> | 21 | #include <linux/kernel.h> |
21 | #include <linux/init.h> | 22 | #include <linux/init.h> |
@@ -102,3 +103,35 @@ unsigned int get_lcdclk_frequency_10khz(void) | |||
102 | } | 103 | } |
103 | 104 | ||
104 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); | 105 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); |
106 | |||
107 | #ifdef CONFIG_PM | ||
108 | |||
109 | int pxa_cpu_pm_prepare(suspend_state_t state) | ||
110 | { | ||
111 | switch (state) { | ||
112 | case PM_SUSPEND_MEM: | ||
113 | break; | ||
114 | default: | ||
115 | return -EINVAL; | ||
116 | } | ||
117 | |||
118 | return 0; | ||
119 | } | ||
120 | |||
121 | void pxa_cpu_pm_enter(suspend_state_t state) | ||
122 | { | ||
123 | extern void pxa_cpu_suspend(unsigned int); | ||
124 | extern void pxa_cpu_resume(void); | ||
125 | |||
126 | CKEN = 0; | ||
127 | |||
128 | switch (state) { | ||
129 | case PM_SUSPEND_MEM: | ||
130 | /* set resume return address */ | ||
131 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
132 | pxa_cpu_suspend(3); | ||
133 | break; | ||
134 | } | ||
135 | } | ||
136 | |||
137 | #endif | ||
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c index 7e863afefb53..893964fb9659 100644 --- a/arch/arm/mach-pxa/pxa27x.c +++ b/arch/arm/mach-pxa/pxa27x.c | |||
@@ -120,6 +120,42 @@ EXPORT_SYMBOL(get_clk_frequency_khz); | |||
120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); | 120 | EXPORT_SYMBOL(get_memclk_frequency_10khz); |
121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); | 121 | EXPORT_SYMBOL(get_lcdclk_frequency_10khz); |
122 | 122 | ||
123 | #ifdef CONFIG_PM | ||
124 | |||
125 | int pxa_cpu_pm_prepare(suspend_state_t state) | ||
126 | { | ||
127 | switch (state) { | ||
128 | case PM_SUSPEND_MEM: | ||
129 | return 0; | ||
130 | default: | ||
131 | return -EINVAL; | ||
132 | } | ||
133 | } | ||
134 | |||
135 | void pxa_cpu_pm_enter(suspend_state_t state) | ||
136 | { | ||
137 | extern void pxa_cpu_standby(void); | ||
138 | extern void pxa_cpu_suspend(unsigned int); | ||
139 | extern void pxa_cpu_resume(void); | ||
140 | |||
141 | CKEN = CKEN22_MEMC | CKEN9_OSTIMER; | ||
142 | |||
143 | /* ensure voltage-change sequencer not initiated, which hangs */ | ||
144 | PCFR &= ~PCFR_FVC; | ||
145 | |||
146 | /* Clear edge-detect status register. */ | ||
147 | PEDR = 0xDF12FE1B; | ||
148 | |||
149 | switch (state) { | ||
150 | case PM_SUSPEND_MEM: | ||
151 | /* set resume return address */ | ||
152 | PSPR = virt_to_phys(pxa_cpu_resume); | ||
153 | pxa_cpu_suspend(3); | ||
154 | break; | ||
155 | } | ||
156 | } | ||
157 | |||
158 | #endif | ||
123 | 159 | ||
124 | /* | 160 | /* |
125 | * device registration specific to PXA27x. | 161 | * device registration specific to PXA27x. |
diff --git a/arch/arm/mach-s3c2410/dma.c b/arch/arm/mach-s3c2410/dma.c index bc229fab86d4..c7c28890d406 100644 --- a/arch/arm/mach-s3c2410/dma.c +++ b/arch/arm/mach-s3c2410/dma.c | |||
@@ -785,6 +785,10 @@ int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *client) | |||
785 | chan->client = NULL; | 785 | chan->client = NULL; |
786 | chan->in_use = 0; | 786 | chan->in_use = 0; |
787 | 787 | ||
788 | if (chan->irq_claimed) | ||
789 | free_irq(chan->irq, (void *)chan); | ||
790 | chan->irq_claimed = 0; | ||
791 | |||
788 | local_irq_restore(flags); | 792 | local_irq_restore(flags); |
789 | 793 | ||
790 | return 0; | 794 | return 0; |
diff --git a/arch/arm/mach-sa1100/Kconfig b/arch/arm/mach-sa1100/Kconfig index 50cde576dadf..6923316b3d0d 100644 --- a/arch/arm/mach-sa1100/Kconfig +++ b/arch/arm/mach-sa1100/Kconfig | |||
@@ -150,7 +150,7 @@ config SA1100_SSP | |||
150 | 150 | ||
151 | config H3600_SLEEVE | 151 | config H3600_SLEEVE |
152 | tristate "Compaq iPAQ Handheld sleeve support" | 152 | tristate "Compaq iPAQ Handheld sleeve support" |
153 | depends on SA1100_H3600 | 153 | depends on SA1100_H3100 || SA1100_H3600 |
154 | help | 154 | help |
155 | Choose this option to enable support for extension packs (sleeves) | 155 | Choose this option to enable support for extension packs (sleeves) |
156 | for the Compaq iPAQ H3XXX series of handheld computers. This option | 156 | for the Compaq iPAQ H3XXX series of handheld computers. This option |
diff --git a/arch/arm/mach-sa1100/pm.c b/arch/arm/mach-sa1100/pm.c index 379ea5e3950f..59c7964cfe11 100644 --- a/arch/arm/mach-sa1100/pm.c +++ b/arch/arm/mach-sa1100/pm.c | |||
@@ -88,6 +88,8 @@ static int sa11x0_pm_enter(suspend_state_t state) | |||
88 | /* go zzz */ | 88 | /* go zzz */ |
89 | sa1100_cpu_suspend(); | 89 | sa1100_cpu_suspend(); |
90 | 90 | ||
91 | cpu_init(); | ||
92 | |||
91 | /* | 93 | /* |
92 | * Ensure not to come back here if it wasn't intended | 94 | * Ensure not to come back here if it wasn't intended |
93 | */ | 95 | */ |
diff --git a/arch/arm/mach-versatile/Makefile b/arch/arm/mach-versatile/Makefile index 5d608837757a..ba81e70ed813 100644 --- a/arch/arm/mach-versatile/Makefile +++ b/arch/arm/mach-versatile/Makefile | |||
@@ -5,3 +5,4 @@ | |||
5 | obj-y := core.o clock.o | 5 | obj-y := core.o clock.o |
6 | obj-$(CONFIG_ARCH_VERSATILE_PB) += versatile_pb.o | 6 | obj-$(CONFIG_ARCH_VERSATILE_PB) += versatile_pb.o |
7 | obj-$(CONFIG_MACH_VERSATILE_AB) += versatile_ab.o | 7 | obj-$(CONFIG_MACH_VERSATILE_AB) += versatile_ab.o |
8 | obj-$(CONFIG_PCI) += pci.o | ||
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index 554e1bd30d6e..6a7cbea5e098 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -196,11 +196,15 @@ static struct map_desc versatile_io_desc[] __initdata = { | |||
196 | #ifdef CONFIG_DEBUG_LL | 196 | #ifdef CONFIG_DEBUG_LL |
197 | { IO_ADDRESS(VERSATILE_UART0_BASE), VERSATILE_UART0_BASE, SZ_4K, MT_DEVICE }, | 197 | { IO_ADDRESS(VERSATILE_UART0_BASE), VERSATILE_UART0_BASE, SZ_4K, MT_DEVICE }, |
198 | #endif | 198 | #endif |
199 | #ifdef FIXME | 199 | #ifdef CONFIG_PCI |
200 | { PCI_MEMORY_VADDR, PHYS_PCI_MEM_BASE, SZ_16M, MT_DEVICE }, | 200 | { IO_ADDRESS(VERSATILE_PCI_CORE_BASE), VERSATILE_PCI_CORE_BASE, SZ_4K, MT_DEVICE }, |
201 | { PCI_CONFIG_VADDR, PHYS_PCI_CONFIG_BASE, SZ_16M, MT_DEVICE }, | 201 | { VERSATILE_PCI_VIRT_BASE, VERSATILE_PCI_BASE, VERSATILE_PCI_BASE_SIZE, MT_DEVICE }, |
202 | { PCI_V3_VADDR, PHYS_PCI_V3_BASE, SZ_512K, MT_DEVICE }, | 202 | { VERSATILE_PCI_CFG_VIRT_BASE, VERSATILE_PCI_CFG_BASE, VERSATILE_PCI_CFG_BASE_SIZE, MT_DEVICE }, |
203 | { PCI_IO_VADDR, PHYS_PCI_IO_BASE, SZ_64K, MT_DEVICE }, | 203 | #if 0 |
204 | { VERSATILE_PCI_VIRT_MEM_BASE0, VERSATILE_PCI_MEM_BASE0, SZ_16M, MT_DEVICE }, | ||
205 | { VERSATILE_PCI_VIRT_MEM_BASE1, VERSATILE_PCI_MEM_BASE1, SZ_16M, MT_DEVICE }, | ||
206 | { VERSATILE_PCI_VIRT_MEM_BASE2, VERSATILE_PCI_MEM_BASE2, SZ_16M, MT_DEVICE }, | ||
207 | #endif | ||
204 | #endif | 208 | #endif |
205 | }; | 209 | }; |
206 | 210 | ||
@@ -543,7 +547,7 @@ static void versatile_clcd_enable(struct clcd_fb *fb) | |||
543 | val |= SYS_CLCD_MODE_5551; | 547 | val |= SYS_CLCD_MODE_5551; |
544 | break; | 548 | break; |
545 | case 6: | 549 | case 6: |
546 | val |= SYS_CLCD_MODE_565_BLSB; | 550 | val |= SYS_CLCD_MODE_565_RLSB; |
547 | break; | 551 | break; |
548 | case 8: | 552 | case 8: |
549 | val |= SYS_CLCD_MODE_888; | 553 | val |= SYS_CLCD_MODE_888; |
diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c new file mode 100644 index 000000000000..d1565e851f0e --- /dev/null +++ b/arch/arm/mach-versatile/pci.c | |||
@@ -0,0 +1,360 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mach-versatile/pci.c | ||
3 | * | ||
4 | * (C) Copyright Koninklijke Philips Electronics NV 2004. All rights reserved. | ||
5 | * You can redistribute and/or modify this software under the terms of version 2 | ||
6 | * of the GNU General Public License as published by the Free Software Foundation. | ||
7 | * THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED | ||
8 | * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
9 | * General Public License for more details. | ||
10 | * Koninklijke Philips Electronics nor its subsidiaries is obligated to provide any support for this software. | ||
11 | * | ||
12 | * ARM Versatile PCI driver. | ||
13 | * | ||
14 | * 14/04/2005 Initial version, colin.king@philips.com | ||
15 | * | ||
16 | */ | ||
17 | #include <linux/config.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/pci.h> | ||
20 | #include <linux/ptrace.h> | ||
21 | #include <linux/slab.h> | ||
22 | #include <linux/ioport.h> | ||
23 | #include <linux/interrupt.h> | ||
24 | #include <linux/spinlock.h> | ||
25 | #include <linux/init.h> | ||
26 | |||
27 | #include <asm/hardware.h> | ||
28 | #include <asm/io.h> | ||
29 | #include <asm/irq.h> | ||
30 | #include <asm/system.h> | ||
31 | #include <asm/mach/pci.h> | ||
32 | #include <asm/mach-types.h> | ||
33 | |||
34 | /* | ||
35 | * these spaces are mapped using the following base registers: | ||
36 | * | ||
37 | * Usage Local Bus Memory Base/Map registers used | ||
38 | * | ||
39 | * Mem 50000000 - 5FFFFFFF LB_BASE0/LB_MAP0, non prefetch | ||
40 | * Mem 60000000 - 6FFFFFFF LB_BASE1/LB_MAP1, prefetch | ||
41 | * IO 44000000 - 4FFFFFFF LB_BASE2/LB_MAP2, IO | ||
42 | * Cfg 42000000 - 42FFFFFF PCI config | ||
43 | * | ||
44 | */ | ||
45 | #define SYS_PCICTL IO_ADDRESS(VERSATILE_SYS_PCICTL) | ||
46 | #define PCI_IMAP0 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x0) | ||
47 | #define PCI_IMAP1 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x4) | ||
48 | #define PCI_IMAP2 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x8) | ||
49 | #define PCI_SMAP0 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x10) | ||
50 | #define PCI_SMAP1 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x14) | ||
51 | #define PCI_SMAP2 IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x18) | ||
52 | #define PCI_SELFID IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0xc) | ||
53 | |||
54 | #define DEVICE_ID_OFFSET 0x00 | ||
55 | #define CSR_OFFSET 0x04 | ||
56 | #define CLASS_ID_OFFSET 0x08 | ||
57 | |||
58 | #define VP_PCI_DEVICE_ID 0x030010ee | ||
59 | #define VP_PCI_CLASS_ID 0x0b400000 | ||
60 | |||
61 | static unsigned long pci_slot_ignore = 0; | ||
62 | |||
63 | static int __init versatile_pci_slot_ignore(char *str) | ||
64 | { | ||
65 | int retval; | ||
66 | int slot; | ||
67 | |||
68 | while ((retval = get_option(&str,&slot))) { | ||
69 | if ((slot < 0) || (slot > 31)) { | ||
70 | printk("Illegal slot value: %d\n",slot); | ||
71 | } else { | ||
72 | pci_slot_ignore |= (1 << slot); | ||
73 | } | ||
74 | } | ||
75 | return 1; | ||
76 | } | ||
77 | |||
78 | __setup("pci_slot_ignore=", versatile_pci_slot_ignore); | ||
79 | |||
80 | |||
81 | static unsigned long __pci_addr(struct pci_bus *bus, | ||
82 | unsigned int devfn, int offset) | ||
83 | { | ||
84 | unsigned int busnr = bus->number; | ||
85 | |||
86 | /* | ||
87 | * Trap out illegal values | ||
88 | */ | ||
89 | if (offset > 255) | ||
90 | BUG(); | ||
91 | if (busnr > 255) | ||
92 | BUG(); | ||
93 | if (devfn > 255) | ||
94 | BUG(); | ||
95 | |||
96 | return (VERSATILE_PCI_CFG_VIRT_BASE | (busnr << 16) | | ||
97 | (PCI_SLOT(devfn) << 11) | (PCI_FUNC(devfn) << 8) | offset); | ||
98 | } | ||
99 | |||
100 | static int versatile_read_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
101 | int size, u32 *val) | ||
102 | { | ||
103 | unsigned long addr = __pci_addr(bus, devfn, where); | ||
104 | u32 v; | ||
105 | int slot = PCI_SLOT(devfn); | ||
106 | |||
107 | if (pci_slot_ignore & (1 << slot)) { | ||
108 | /* Ignore this slot */ | ||
109 | switch (size) { | ||
110 | case 1: | ||
111 | v = 0xff; | ||
112 | break; | ||
113 | case 2: | ||
114 | v = 0xffff; | ||
115 | break; | ||
116 | default: | ||
117 | v = 0xffffffff; | ||
118 | } | ||
119 | } else { | ||
120 | switch (size) { | ||
121 | case 1: | ||
122 | addr &= ~3; | ||
123 | v = __raw_readb(addr); | ||
124 | break; | ||
125 | |||
126 | case 2: | ||
127 | v = __raw_readl(addr & ~3); | ||
128 | if (addr & 2) v >>= 16; | ||
129 | v &= 0xffff; | ||
130 | break; | ||
131 | |||
132 | default: | ||
133 | addr &= ~3; | ||
134 | v = __raw_readl(addr); | ||
135 | break; | ||
136 | } | ||
137 | } | ||
138 | |||
139 | *val = v; | ||
140 | return PCIBIOS_SUCCESSFUL; | ||
141 | } | ||
142 | |||
143 | static int versatile_write_config(struct pci_bus *bus, unsigned int devfn, int where, | ||
144 | int size, u32 val) | ||
145 | { | ||
146 | unsigned long addr = __pci_addr(bus, devfn, where); | ||
147 | int slot = PCI_SLOT(devfn); | ||
148 | |||
149 | if (pci_slot_ignore & (1 << slot)) { | ||
150 | return PCIBIOS_SUCCESSFUL; | ||
151 | } | ||
152 | |||
153 | switch (size) { | ||
154 | case 1: | ||
155 | __raw_writeb((u8)val, addr); | ||
156 | break; | ||
157 | |||
158 | case 2: | ||
159 | __raw_writew((u16)val, addr); | ||
160 | break; | ||
161 | |||
162 | case 4: | ||
163 | __raw_writel(val, addr); | ||
164 | break; | ||
165 | } | ||
166 | |||
167 | return PCIBIOS_SUCCESSFUL; | ||
168 | } | ||
169 | |||
170 | static struct pci_ops pci_versatile_ops = { | ||
171 | .read = versatile_read_config, | ||
172 | .write = versatile_write_config, | ||
173 | }; | ||
174 | |||
175 | static struct resource io_mem = { | ||
176 | .name = "PCI I/O space", | ||
177 | .start = VERSATILE_PCI_MEM_BASE0, | ||
178 | .end = VERSATILE_PCI_MEM_BASE0+VERSATILE_PCI_MEM_BASE0_SIZE-1, | ||
179 | .flags = IORESOURCE_IO, | ||
180 | }; | ||
181 | |||
182 | static struct resource non_mem = { | ||
183 | .name = "PCI non-prefetchable", | ||
184 | .start = VERSATILE_PCI_MEM_BASE1, | ||
185 | .end = VERSATILE_PCI_MEM_BASE1+VERSATILE_PCI_MEM_BASE1_SIZE-1, | ||
186 | .flags = IORESOURCE_MEM, | ||
187 | }; | ||
188 | |||
189 | static struct resource pre_mem = { | ||
190 | .name = "PCI prefetchable", | ||
191 | .start = VERSATILE_PCI_MEM_BASE2, | ||
192 | .end = VERSATILE_PCI_MEM_BASE2+VERSATILE_PCI_MEM_BASE2_SIZE-1, | ||
193 | .flags = IORESOURCE_MEM | IORESOURCE_PREFETCH, | ||
194 | }; | ||
195 | |||
196 | static int __init pci_versatile_setup_resources(struct resource **resource) | ||
197 | { | ||
198 | int ret = 0; | ||
199 | |||
200 | ret = request_resource(&iomem_resource, &io_mem); | ||
201 | if (ret) { | ||
202 | printk(KERN_ERR "PCI: unable to allocate I/O " | ||
203 | "memory region (%d)\n", ret); | ||
204 | goto out; | ||
205 | } | ||
206 | ret = request_resource(&iomem_resource, &non_mem); | ||
207 | if (ret) { | ||
208 | printk(KERN_ERR "PCI: unable to allocate non-prefetchable " | ||
209 | "memory region (%d)\n", ret); | ||
210 | goto release_io_mem; | ||
211 | } | ||
212 | ret = request_resource(&iomem_resource, &pre_mem); | ||
213 | if (ret) { | ||
214 | printk(KERN_ERR "PCI: unable to allocate prefetchable " | ||
215 | "memory region (%d)\n", ret); | ||
216 | goto release_non_mem; | ||
217 | } | ||
218 | |||
219 | /* | ||
220 | * bus->resource[0] is the IO resource for this bus | ||
221 | * bus->resource[1] is the mem resource for this bus | ||
222 | * bus->resource[2] is the prefetch mem resource for this bus | ||
223 | */ | ||
224 | resource[0] = &io_mem; | ||
225 | resource[1] = &non_mem; | ||
226 | resource[2] = &pre_mem; | ||
227 | |||
228 | goto out; | ||
229 | |||
230 | release_non_mem: | ||
231 | release_resource(&non_mem); | ||
232 | release_io_mem: | ||
233 | release_resource(&io_mem); | ||
234 | out: | ||
235 | return ret; | ||
236 | } | ||
237 | |||
238 | int __init pci_versatile_setup(int nr, struct pci_sys_data *sys) | ||
239 | { | ||
240 | int ret = 0; | ||
241 | int i; | ||
242 | int myslot = -1; | ||
243 | unsigned long val; | ||
244 | |||
245 | if (nr == 0) { | ||
246 | sys->mem_offset = 0; | ||
247 | ret = pci_versatile_setup_resources(sys->resource); | ||
248 | if (ret < 0) { | ||
249 | printk("pci_versatile_setup: resources... oops?\n"); | ||
250 | goto out; | ||
251 | } | ||
252 | } else { | ||
253 | printk("pci_versatile_setup: resources... nr == 0??\n"); | ||
254 | goto out; | ||
255 | } | ||
256 | |||
257 | __raw_writel(VERSATILE_PCI_MEM_BASE0 >> 28,PCI_IMAP0); | ||
258 | __raw_writel(VERSATILE_PCI_MEM_BASE1 >> 28,PCI_IMAP1); | ||
259 | __raw_writel(VERSATILE_PCI_MEM_BASE2 >> 28,PCI_IMAP2); | ||
260 | |||
261 | __raw_writel(1, SYS_PCICTL); | ||
262 | |||
263 | val = __raw_readl(SYS_PCICTL); | ||
264 | if (!(val & 1)) { | ||
265 | printk("Not plugged into PCI backplane!\n"); | ||
266 | ret = -EIO; | ||
267 | goto out; | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * We need to discover the PCI core first to configure itself | ||
272 | * before the main PCI probing is performed | ||
273 | */ | ||
274 | for (i=0; i<32; i++) { | ||
275 | if ((__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+DEVICE_ID_OFFSET) == VP_PCI_DEVICE_ID) && | ||
276 | (__raw_readl(VERSATILE_PCI_VIRT_BASE+(i<<11)+CLASS_ID_OFFSET) == VP_PCI_CLASS_ID)) { | ||
277 | myslot = i; | ||
278 | |||
279 | __raw_writel(myslot, PCI_SELFID); | ||
280 | val = __raw_readl(VERSATILE_PCI_CFG_VIRT_BASE+(myslot<<11)+CSR_OFFSET); | ||
281 | val |= (1<<2); | ||
282 | __raw_writel(val, VERSATILE_PCI_CFG_VIRT_BASE+(myslot<<11)+CSR_OFFSET); | ||
283 | break; | ||
284 | } | ||
285 | } | ||
286 | |||
287 | if (myslot == -1) { | ||
288 | printk("Cannot find PCI core!\n"); | ||
289 | ret = -EIO; | ||
290 | } else { | ||
291 | printk("PCI core found (slot %d)\n",myslot); | ||
292 | /* Do not to map Versatile FPGA PCI device | ||
293 | into memory space as we are short of | ||
294 | mappable memory */ | ||
295 | pci_slot_ignore |= (1 << myslot); | ||
296 | ret = 1; | ||
297 | } | ||
298 | |||
299 | out: | ||
300 | return ret; | ||
301 | } | ||
302 | |||
303 | |||
304 | struct pci_bus *pci_versatile_scan_bus(int nr, struct pci_sys_data *sys) | ||
305 | { | ||
306 | return pci_scan_bus(sys->busnr, &pci_versatile_ops, sys); | ||
307 | } | ||
308 | |||
309 | /* | ||
310 | * V3_LB_BASE? - local bus address | ||
311 | * V3_LB_MAP? - pci bus address | ||
312 | */ | ||
313 | void __init pci_versatile_preinit(void) | ||
314 | { | ||
315 | } | ||
316 | |||
317 | void __init pci_versatile_postinit(void) | ||
318 | { | ||
319 | } | ||
320 | |||
321 | |||
322 | /* | ||
323 | * map the specified device/slot/pin to an IRQ. Different backplanes may need to modify this. | ||
324 | */ | ||
325 | static int __init versatile_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | ||
326 | { | ||
327 | int irq; | ||
328 | int devslot = PCI_SLOT(dev->devfn); | ||
329 | |||
330 | /* slot, pin, irq | ||
331 | 24 1 27 | ||
332 | 25 1 28 untested | ||
333 | 26 1 29 | ||
334 | 27 1 30 untested | ||
335 | */ | ||
336 | |||
337 | irq = 27 + ((slot + pin + 2) % 3); /* Fudged */ | ||
338 | |||
339 | printk("map irq: slot %d, pin %d, devslot %d, irq: %d\n",slot,pin,devslot,irq); | ||
340 | |||
341 | return irq; | ||
342 | } | ||
343 | |||
344 | static struct hw_pci versatile_pci __initdata = { | ||
345 | .swizzle = NULL, | ||
346 | .map_irq = versatile_map_irq, | ||
347 | .nr_controllers = 1, | ||
348 | .setup = pci_versatile_setup, | ||
349 | .scan = pci_versatile_scan_bus, | ||
350 | .preinit = pci_versatile_preinit, | ||
351 | .postinit = pci_versatile_postinit, | ||
352 | }; | ||
353 | |||
354 | static int __init versatile_pci_init(void) | ||
355 | { | ||
356 | pci_common_init(&versatile_pci); | ||
357 | return 0; | ||
358 | } | ||
359 | |||
360 | subsys_initcall(versatile_pci_init); | ||
diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 48bac7da8c70..95606b4a3ba6 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 | 65 | depends on ARCH_INTEGRATOR || ARCH_S3C2410 || ARCH_IMX || ARCH_AAEC2000 |
66 | default y if ARCH_S3C2410 | 66 | default y if ARCH_S3C2410 |
67 | select CPU_32v4 | 67 | select CPU_32v4 |
68 | select CPU_ABRT_EV4T | 68 | select CPU_ABRT_EV4T |
@@ -228,7 +228,6 @@ config CPU_SA1100 | |||
228 | select CPU_CACHE_V4WB | 228 | select CPU_CACHE_V4WB |
229 | select CPU_CACHE_VIVT | 229 | select CPU_CACHE_VIVT |
230 | select CPU_TLB_V4WB | 230 | select CPU_TLB_V4WB |
231 | select CPU_MINICACHE | ||
232 | 231 | ||
233 | # XScale | 232 | # XScale |
234 | config CPU_XSCALE | 233 | config CPU_XSCALE |
@@ -239,7 +238,6 @@ config CPU_XSCALE | |||
239 | select CPU_ABRT_EV5T | 238 | select CPU_ABRT_EV5T |
240 | select CPU_CACHE_VIVT | 239 | select CPU_CACHE_VIVT |
241 | select CPU_TLB_V4WBI | 240 | select CPU_TLB_V4WBI |
242 | select CPU_MINICACHE | ||
243 | 241 | ||
244 | # ARMv6 | 242 | # ARMv6 |
245 | config CPU_V6 | 243 | config CPU_V6 |
@@ -345,11 +343,6 @@ config CPU_TLB_V4WBI | |||
345 | config CPU_TLB_V6 | 343 | config CPU_TLB_V6 |
346 | bool | 344 | bool |
347 | 345 | ||
348 | config CPU_MINICACHE | ||
349 | bool | ||
350 | help | ||
351 | Processor has a minicache. | ||
352 | |||
353 | comment "Processor Features" | 346 | comment "Processor Features" |
354 | 347 | ||
355 | config ARM_THUMB | 348 | config ARM_THUMB |
@@ -429,3 +422,11 @@ config HAS_TLS_REG | |||
429 | assume directly accessing that register and always obtain the | 422 | assume directly accessing that register and always obtain the |
430 | expected value only on ARMv7 and above. | 423 | expected value only on ARMv7 and above. |
431 | 424 | ||
425 | config NEEDS_SYSCALL_FOR_CMPXCHG | ||
426 | bool | ||
427 | default y if SMP && (CPU_32v5 || CPU_32v4 || CPU_32v3) | ||
428 | help | ||
429 | SMP on a pre-ARMv6 processor? Well OK then. | ||
430 | Forget about fast user space cmpxchg support. | ||
431 | It is just not possible. | ||
432 | |||
diff --git a/arch/arm/mm/Makefile b/arch/arm/mm/Makefile index ccf316c11e02..59f47d4c2dfe 100644 --- a/arch/arm/mm/Makefile +++ b/arch/arm/mm/Makefile | |||
@@ -31,8 +31,6 @@ 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 | 33 | ||
34 | obj-$(CONFIG_CPU_MINICACHE) += minicache.o | ||
35 | |||
36 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o | 34 | obj-$(CONFIG_CPU_TLB_V3) += tlb-v3.o |
37 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o | 35 | obj-$(CONFIG_CPU_TLB_V4WT) += tlb-v4.o |
38 | obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o | 36 | obj-$(CONFIG_CPU_TLB_V4WB) += tlb-v4wb.o |
diff --git a/arch/arm/mm/copypage-v6.c b/arch/arm/mm/copypage-v6.c index a8c00236bd3d..27d041574ea7 100644 --- a/arch/arm/mm/copypage-v6.c +++ b/arch/arm/mm/copypage-v6.c | |||
@@ -30,8 +30,6 @@ | |||
30 | 30 | ||
31 | static DEFINE_SPINLOCK(v6_lock); | 31 | static DEFINE_SPINLOCK(v6_lock); |
32 | 32 | ||
33 | #define DCACHE_COLOUR(vaddr) ((vaddr & (SHMLBA - 1)) >> PAGE_SHIFT) | ||
34 | |||
35 | /* | 33 | /* |
36 | * Copy the user page. No aliasing to deal with so we can just | 34 | * Copy the user page. No aliasing to deal with so we can just |
37 | * attack the kernel's existing mapping of these pages. | 35 | * attack the kernel's existing mapping of these pages. |
@@ -55,7 +53,7 @@ void v6_clear_user_page_nonaliasing(void *kaddr, unsigned long vaddr) | |||
55 | */ | 53 | */ |
56 | void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) | 54 | void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vaddr) |
57 | { | 55 | { |
58 | unsigned int offset = DCACHE_COLOUR(vaddr); | 56 | unsigned int offset = CACHE_COLOUR(vaddr); |
59 | unsigned long from, to; | 57 | unsigned long from, to; |
60 | 58 | ||
61 | /* | 59 | /* |
@@ -95,7 +93,7 @@ void v6_copy_user_page_aliasing(void *kto, const void *kfrom, unsigned long vadd | |||
95 | */ | 93 | */ |
96 | void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) | 94 | void v6_clear_user_page_aliasing(void *kaddr, unsigned long vaddr) |
97 | { | 95 | { |
98 | unsigned int offset = DCACHE_COLOUR(vaddr); | 96 | unsigned int offset = CACHE_COLOUR(vaddr); |
99 | unsigned long to = to_address + (offset << PAGE_SHIFT); | 97 | unsigned long to = to_address + (offset << PAGE_SHIFT); |
100 | 98 | ||
101 | /* | 99 | /* |
diff --git a/arch/arm/mm/copypage-xscale.S b/arch/arm/mm/copypage-xscale.S deleted file mode 100644 index bb277316ef52..000000000000 --- a/arch/arm/mm/copypage-xscale.S +++ /dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage-xscale.S | ||
3 | * | ||
4 | * Copyright (C) 2001 Russell King | ||
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 | #include <linux/linkage.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <asm/constants.h> | ||
13 | |||
14 | /* | ||
15 | * General note: | ||
16 | * We don't really want write-allocate cache behaviour for these functions | ||
17 | * since that will just eat through 8K of the cache. | ||
18 | */ | ||
19 | |||
20 | .text | ||
21 | .align 5 | ||
22 | /* | ||
23 | * XScale optimised copy_user_page | ||
24 | * r0 = destination | ||
25 | * r1 = source | ||
26 | * r2 = virtual user address of ultimate destination page | ||
27 | * | ||
28 | * The source page may have some clean entries in the cache already, but we | ||
29 | * can safely ignore them - break_cow() will flush them out of the cache | ||
30 | * if we eventually end up using our copied page. | ||
31 | * | ||
32 | * What we could do is use the mini-cache to buffer reads from the source | ||
33 | * page. We rely on the mini-cache being smaller than one page, so we'll | ||
34 | * cycle through the complete cache anyway. | ||
35 | */ | ||
36 | ENTRY(xscale_mc_copy_user_page) | ||
37 | stmfd sp!, {r4, r5, lr} | ||
38 | mov r5, r0 | ||
39 | mov r0, r1 | ||
40 | bl map_page_minicache | ||
41 | mov r1, r5 | ||
42 | mov lr, #PAGE_SZ/64-1 | ||
43 | |||
44 | /* | ||
45 | * Strangely enough, best performance is achieved | ||
46 | * when prefetching destination as well. (NP) | ||
47 | */ | ||
48 | pld [r0, #0] | ||
49 | pld [r0, #32] | ||
50 | pld [r1, #0] | ||
51 | pld [r1, #32] | ||
52 | |||
53 | 1: pld [r0, #64] | ||
54 | pld [r0, #96] | ||
55 | pld [r1, #64] | ||
56 | pld [r1, #96] | ||
57 | |||
58 | 2: ldrd r2, [r0], #8 | ||
59 | ldrd r4, [r0], #8 | ||
60 | mov ip, r1 | ||
61 | strd r2, [r1], #8 | ||
62 | ldrd r2, [r0], #8 | ||
63 | strd r4, [r1], #8 | ||
64 | ldrd r4, [r0], #8 | ||
65 | strd r2, [r1], #8 | ||
66 | strd r4, [r1], #8 | ||
67 | mcr p15, 0, ip, c7, c10, 1 @ clean D line | ||
68 | ldrd r2, [r0], #8 | ||
69 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line | ||
70 | ldrd r4, [r0], #8 | ||
71 | mov ip, r1 | ||
72 | strd r2, [r1], #8 | ||
73 | ldrd r2, [r0], #8 | ||
74 | strd r4, [r1], #8 | ||
75 | ldrd r4, [r0], #8 | ||
76 | strd r2, [r1], #8 | ||
77 | strd r4, [r1], #8 | ||
78 | mcr p15, 0, ip, c7, c10, 1 @ clean D line | ||
79 | subs lr, lr, #1 | ||
80 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line | ||
81 | bgt 1b | ||
82 | beq 2b | ||
83 | |||
84 | ldmfd sp!, {r4, r5, pc} | ||
85 | |||
86 | .align 5 | ||
87 | /* | ||
88 | * XScale optimised clear_user_page | ||
89 | * r0 = destination | ||
90 | * r1 = virtual user address of ultimate destination page | ||
91 | */ | ||
92 | ENTRY(xscale_mc_clear_user_page) | ||
93 | mov r1, #PAGE_SZ/32 | ||
94 | mov r2, #0 | ||
95 | mov r3, #0 | ||
96 | 1: mov ip, r0 | ||
97 | strd r2, [r0], #8 | ||
98 | strd r2, [r0], #8 | ||
99 | strd r2, [r0], #8 | ||
100 | strd r2, [r0], #8 | ||
101 | mcr p15, 0, ip, c7, c10, 1 @ clean D line | ||
102 | subs r1, r1, #1 | ||
103 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line | ||
104 | bne 1b | ||
105 | mov pc, lr | ||
106 | |||
107 | __INITDATA | ||
108 | |||
109 | .type xscale_mc_user_fns, #object | ||
110 | ENTRY(xscale_mc_user_fns) | ||
111 | .long xscale_mc_clear_user_page | ||
112 | .long xscale_mc_copy_user_page | ||
113 | .size xscale_mc_user_fns, . - xscale_mc_user_fns | ||
diff --git a/arch/arm/mm/copypage-xscale.c b/arch/arm/mm/copypage-xscale.c new file mode 100644 index 000000000000..42a6ee255ce0 --- /dev/null +++ b/arch/arm/mm/copypage-xscale.c | |||
@@ -0,0 +1,131 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/lib/copypage-xscale.S | ||
3 | * | ||
4 | * Copyright (C) 1995-2005 Russell King | ||
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 | * This handles the mini data cache, as found on SA11x0 and XScale | ||
11 | * processors. When we copy a user page page, we map it in such a way | ||
12 | * that accesses to this page will not touch the main data cache, but | ||
13 | * will be cached in the mini data cache. This prevents us thrashing | ||
14 | * the main data cache on page faults. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | |||
19 | #include <asm/page.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | #include <asm/tlbflush.h> | ||
22 | |||
23 | /* | ||
24 | * 0xffff8000 to 0xffffffff is reserved for any ARM architecture | ||
25 | * specific hacks for copying pages efficiently. | ||
26 | */ | ||
27 | #define COPYPAGE_MINICACHE 0xffff8000 | ||
28 | |||
29 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ | ||
30 | L_PTE_CACHEABLE) | ||
31 | |||
32 | #define TOP_PTE(x) pte_offset_kernel(top_pmd, x) | ||
33 | |||
34 | static DEFINE_SPINLOCK(minicache_lock); | ||
35 | |||
36 | /* | ||
37 | * XScale mini-dcache optimised copy_user_page | ||
38 | * | ||
39 | * We flush the destination cache lines just before we write the data into the | ||
40 | * corresponding address. Since the Dcache is read-allocate, this removes the | ||
41 | * Dcache aliasing issue. The writes will be forwarded to the write buffer, | ||
42 | * and merged as appropriate. | ||
43 | */ | ||
44 | static void __attribute__((naked)) | ||
45 | mc_copy_user_page(void *from, void *to) | ||
46 | { | ||
47 | /* | ||
48 | * Strangely enough, best performance is achieved | ||
49 | * when prefetching destination as well. (NP) | ||
50 | */ | ||
51 | asm volatile( | ||
52 | "stmfd sp!, {r4, r5, lr} \n\ | ||
53 | mov lr, %2 \n\ | ||
54 | pld [r0, #0] \n\ | ||
55 | pld [r0, #32] \n\ | ||
56 | pld [r1, #0] \n\ | ||
57 | pld [r1, #32] \n\ | ||
58 | 1: pld [r0, #64] \n\ | ||
59 | pld [r0, #96] \n\ | ||
60 | pld [r1, #64] \n\ | ||
61 | pld [r1, #96] \n\ | ||
62 | 2: ldrd r2, [r0], #8 \n\ | ||
63 | ldrd r4, [r0], #8 \n\ | ||
64 | mov ip, r1 \n\ | ||
65 | strd r2, [r1], #8 \n\ | ||
66 | ldrd r2, [r0], #8 \n\ | ||
67 | strd r4, [r1], #8 \n\ | ||
68 | ldrd r4, [r0], #8 \n\ | ||
69 | strd r2, [r1], #8 \n\ | ||
70 | strd r4, [r1], #8 \n\ | ||
71 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ | ||
72 | ldrd r2, [r0], #8 \n\ | ||
73 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ | ||
74 | ldrd r4, [r0], #8 \n\ | ||
75 | mov ip, r1 \n\ | ||
76 | strd r2, [r1], #8 \n\ | ||
77 | ldrd r2, [r0], #8 \n\ | ||
78 | strd r4, [r1], #8 \n\ | ||
79 | ldrd r4, [r0], #8 \n\ | ||
80 | strd r2, [r1], #8 \n\ | ||
81 | strd r4, [r1], #8 \n\ | ||
82 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ | ||
83 | subs lr, lr, #1 \n\ | ||
84 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ | ||
85 | bgt 1b \n\ | ||
86 | beq 2b \n\ | ||
87 | ldmfd sp!, {r4, r5, pc} " | ||
88 | : | ||
89 | : "r" (from), "r" (to), "I" (PAGE_SIZE / 64 - 1)); | ||
90 | } | ||
91 | |||
92 | void xscale_mc_copy_user_page(void *kto, const void *kfrom, unsigned long vaddr) | ||
93 | { | ||
94 | spin_lock(&minicache_lock); | ||
95 | |||
96 | set_pte(TOP_PTE(COPYPAGE_MINICACHE), pfn_pte(__pa(kfrom) >> PAGE_SHIFT, minicache_pgprot)); | ||
97 | flush_tlb_kernel_page(COPYPAGE_MINICACHE); | ||
98 | |||
99 | mc_copy_user_page((void *)COPYPAGE_MINICACHE, kto); | ||
100 | |||
101 | spin_unlock(&minicache_lock); | ||
102 | } | ||
103 | |||
104 | /* | ||
105 | * XScale optimised clear_user_page | ||
106 | */ | ||
107 | void __attribute__((naked)) | ||
108 | xscale_mc_clear_user_page(void *kaddr, unsigned long vaddr) | ||
109 | { | ||
110 | asm volatile( | ||
111 | "mov r1, %0 \n\ | ||
112 | mov r2, #0 \n\ | ||
113 | mov r3, #0 \n\ | ||
114 | 1: mov ip, r0 \n\ | ||
115 | strd r2, [r0], #8 \n\ | ||
116 | strd r2, [r0], #8 \n\ | ||
117 | strd r2, [r0], #8 \n\ | ||
118 | strd r2, [r0], #8 \n\ | ||
119 | mcr p15, 0, ip, c7, c10, 1 @ clean D line\n\ | ||
120 | subs r1, r1, #1 \n\ | ||
121 | mcr p15, 0, ip, c7, c6, 1 @ invalidate D line\n\ | ||
122 | bne 1b \n\ | ||
123 | mov pc, lr" | ||
124 | : | ||
125 | : "I" (PAGE_SIZE / 32)); | ||
126 | } | ||
127 | |||
128 | struct cpu_user_fns xscale_mc_user_fns __initdata = { | ||
129 | .cpu_clear_user_page = xscale_mc_clear_user_page, | ||
130 | .cpu_copy_user_page = xscale_mc_copy_user_page, | ||
131 | }; | ||
diff --git a/arch/arm/mm/fault-armv.c b/arch/arm/mm/fault-armv.c index 01967ddeef53..be4ab3d73c91 100644 --- a/arch/arm/mm/fault-armv.c +++ b/arch/arm/mm/fault-armv.c | |||
@@ -77,9 +77,8 @@ no_pmd: | |||
77 | } | 77 | } |
78 | 78 | ||
79 | static void | 79 | static void |
80 | make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page, int dirty) | 80 | make_coherent(struct address_space *mapping, struct vm_area_struct *vma, unsigned long addr, unsigned long pfn) |
81 | { | 81 | { |
82 | struct address_space *mapping = page_mapping(page); | ||
83 | struct mm_struct *mm = vma->vm_mm; | 82 | struct mm_struct *mm = vma->vm_mm; |
84 | struct vm_area_struct *mpnt; | 83 | struct vm_area_struct *mpnt; |
85 | struct prio_tree_iter iter; | 84 | struct prio_tree_iter iter; |
@@ -87,9 +86,6 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page, | |||
87 | pgoff_t pgoff; | 86 | pgoff_t pgoff; |
88 | int aliases = 0; | 87 | int aliases = 0; |
89 | 88 | ||
90 | if (!mapping) | ||
91 | return; | ||
92 | |||
93 | pgoff = vma->vm_pgoff + ((addr - vma->vm_start) >> PAGE_SHIFT); | 89 | pgoff = vma->vm_pgoff + ((addr - vma->vm_start) >> PAGE_SHIFT); |
94 | 90 | ||
95 | /* | 91 | /* |
@@ -115,9 +111,11 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page, | |||
115 | if (aliases) | 111 | if (aliases) |
116 | adjust_pte(vma, addr); | 112 | adjust_pte(vma, addr); |
117 | else | 113 | else |
118 | flush_cache_page(vma, addr, page_to_pfn(page)); | 114 | flush_cache_page(vma, addr, pfn); |
119 | } | 115 | } |
120 | 116 | ||
117 | void __flush_dcache_page(struct address_space *mapping, struct page *page); | ||
118 | |||
121 | /* | 119 | /* |
122 | * Take care of architecture specific things when placing a new PTE into | 120 | * Take care of architecture specific things when placing a new PTE into |
123 | * a page table, or changing an existing PTE. Basically, there are two | 121 | * a page table, or changing an existing PTE. Basically, there are two |
@@ -134,29 +132,22 @@ make_coherent(struct vm_area_struct *vma, unsigned long addr, struct page *page, | |||
134 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) | 132 | void update_mmu_cache(struct vm_area_struct *vma, unsigned long addr, pte_t pte) |
135 | { | 133 | { |
136 | unsigned long pfn = pte_pfn(pte); | 134 | unsigned long pfn = pte_pfn(pte); |
135 | struct address_space *mapping; | ||
137 | struct page *page; | 136 | struct page *page; |
138 | 137 | ||
139 | if (!pfn_valid(pfn)) | 138 | if (!pfn_valid(pfn)) |
140 | return; | 139 | return; |
140 | |||
141 | page = pfn_to_page(pfn); | 141 | page = pfn_to_page(pfn); |
142 | if (page_mapping(page)) { | 142 | mapping = page_mapping(page); |
143 | if (mapping) { | ||
143 | int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); | 144 | int dirty = test_and_clear_bit(PG_dcache_dirty, &page->flags); |
144 | 145 | ||
145 | if (dirty) { | 146 | if (dirty) |
146 | /* | 147 | __flush_dcache_page(mapping, page); |
147 | * This is our first userspace mapping of this page. | ||
148 | * Ensure that the physical page is coherent with | ||
149 | * the kernel mapping. | ||
150 | * | ||
151 | * FIXME: only need to do this on VIVT and aliasing | ||
152 | * VIPT cache architectures. We can do that | ||
153 | * by choosing whether to set this bit... | ||
154 | */ | ||
155 | __cpuc_flush_dcache_page(page_address(page)); | ||
156 | } | ||
157 | 148 | ||
158 | if (cache_is_vivt()) | 149 | if (cache_is_vivt()) |
159 | make_coherent(vma, addr, page, dirty); | 150 | make_coherent(mapping, vma, addr, pfn); |
160 | } | 151 | } |
161 | } | 152 | } |
162 | 153 | ||
diff --git a/arch/arm/mm/flush.c b/arch/arm/mm/flush.c index 4085ed983e46..191788fb18d1 100644 --- a/arch/arm/mm/flush.c +++ b/arch/arm/mm/flush.c | |||
@@ -37,13 +37,8 @@ static void flush_pfn_alias(unsigned long pfn, unsigned long vaddr) | |||
37 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) | 37 | #define flush_pfn_alias(pfn,vaddr) do { } while (0) |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | static void __flush_dcache_page(struct address_space *mapping, struct page *page) | 40 | void __flush_dcache_page(struct address_space *mapping, struct page *page) |
41 | { | 41 | { |
42 | struct mm_struct *mm = current->active_mm; | ||
43 | struct vm_area_struct *mpnt; | ||
44 | struct prio_tree_iter iter; | ||
45 | pgoff_t pgoff; | ||
46 | |||
47 | /* | 42 | /* |
48 | * Writeback any data associated with the kernel mapping of this | 43 | * Writeback any data associated with the kernel mapping of this |
49 | * page. This ensures that data in the physical page is mutually | 44 | * page. This ensures that data in the physical page is mutually |
@@ -52,24 +47,21 @@ static void __flush_dcache_page(struct address_space *mapping, struct page *page | |||
52 | __cpuc_flush_dcache_page(page_address(page)); | 47 | __cpuc_flush_dcache_page(page_address(page)); |
53 | 48 | ||
54 | /* | 49 | /* |
55 | * If there's no mapping pointer here, then this page isn't | 50 | * If this is a page cache page, and we have an aliasing VIPT cache, |
56 | * visible to userspace yet, so there are no cache lines | 51 | * we only need to do one flush - which would be at the relevant |
57 | * associated with any other aliases. | ||
58 | */ | ||
59 | if (!mapping) | ||
60 | return; | ||
61 | |||
62 | /* | ||
63 | * This is a page cache page. If we have a VIPT cache, we | ||
64 | * only need to do one flush - which would be at the relevant | ||
65 | * userspace colour, which is congruent with page->index. | 52 | * userspace colour, which is congruent with page->index. |
66 | */ | 53 | */ |
67 | if (cache_is_vipt()) { | 54 | if (mapping && cache_is_vipt_aliasing()) |
68 | if (cache_is_vipt_aliasing()) | 55 | flush_pfn_alias(page_to_pfn(page), |
69 | flush_pfn_alias(page_to_pfn(page), | 56 | page->index << PAGE_CACHE_SHIFT); |
70 | page->index << PAGE_CACHE_SHIFT); | 57 | } |
71 | return; | 58 | |
72 | } | 59 | static void __flush_dcache_aliases(struct address_space *mapping, struct page *page) |
60 | { | ||
61 | struct mm_struct *mm = current->active_mm; | ||
62 | struct vm_area_struct *mpnt; | ||
63 | struct prio_tree_iter iter; | ||
64 | pgoff_t pgoff; | ||
73 | 65 | ||
74 | /* | 66 | /* |
75 | * There are possible user space mappings of this page: | 67 | * There are possible user space mappings of this page: |
@@ -116,12 +108,12 @@ void flush_dcache_page(struct page *page) | |||
116 | { | 108 | { |
117 | struct address_space *mapping = page_mapping(page); | 109 | struct address_space *mapping = page_mapping(page); |
118 | 110 | ||
119 | if (cache_is_vipt_nonaliasing()) | ||
120 | return; | ||
121 | |||
122 | if (mapping && !mapping_mapped(mapping)) | 111 | if (mapping && !mapping_mapped(mapping)) |
123 | set_bit(PG_dcache_dirty, &page->flags); | 112 | set_bit(PG_dcache_dirty, &page->flags); |
124 | else | 113 | else { |
125 | __flush_dcache_page(mapping, page); | 114 | __flush_dcache_page(mapping, page); |
115 | if (mapping && cache_is_vivt()) | ||
116 | __flush_dcache_aliases(mapping, page); | ||
117 | } | ||
126 | } | 118 | } |
127 | EXPORT_SYMBOL(flush_dcache_page); | 119 | EXPORT_SYMBOL(flush_dcache_page); |
diff --git a/arch/arm/mm/ioremap.c b/arch/arm/mm/ioremap.c index 00bb8fd37a59..7110e54182b1 100644 --- a/arch/arm/mm/ioremap.c +++ b/arch/arm/mm/ioremap.c | |||
@@ -170,3 +170,50 @@ void __iounmap(void __iomem *addr) | |||
170 | vfree((void *) (PAGE_MASK & (unsigned long) addr)); | 170 | vfree((void *) (PAGE_MASK & (unsigned long) addr)); |
171 | } | 171 | } |
172 | EXPORT_SYMBOL(__iounmap); | 172 | EXPORT_SYMBOL(__iounmap); |
173 | |||
174 | #ifdef __io | ||
175 | void __iomem *ioport_map(unsigned long port, unsigned int nr) | ||
176 | { | ||
177 | return __io(port); | ||
178 | } | ||
179 | EXPORT_SYMBOL(ioport_map); | ||
180 | |||
181 | void ioport_unmap(void __iomem *addr) | ||
182 | { | ||
183 | } | ||
184 | EXPORT_SYMBOL(ioport_unmap); | ||
185 | #endif | ||
186 | |||
187 | #ifdef CONFIG_PCI | ||
188 | #include <linux/pci.h> | ||
189 | #include <linux/ioport.h> | ||
190 | |||
191 | void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | ||
192 | { | ||
193 | unsigned long start = pci_resource_start(dev, bar); | ||
194 | unsigned long len = pci_resource_len(dev, bar); | ||
195 | unsigned long flags = pci_resource_flags(dev, bar); | ||
196 | |||
197 | if (!len || !start) | ||
198 | return NULL; | ||
199 | if (maxlen && len > maxlen) | ||
200 | len = maxlen; | ||
201 | if (flags & IORESOURCE_IO) | ||
202 | return ioport_map(start, len); | ||
203 | if (flags & IORESOURCE_MEM) { | ||
204 | if (flags & IORESOURCE_CACHEABLE) | ||
205 | return ioremap(start, len); | ||
206 | return ioremap_nocache(start, len); | ||
207 | } | ||
208 | return NULL; | ||
209 | } | ||
210 | EXPORT_SYMBOL(pci_iomap); | ||
211 | |||
212 | void pci_iounmap(struct pci_dev *dev, void __iomem *addr) | ||
213 | { | ||
214 | if ((unsigned long)addr >= VMALLOC_START && | ||
215 | (unsigned long)addr < VMALLOC_END) | ||
216 | iounmap(addr); | ||
217 | } | ||
218 | EXPORT_SYMBOL(pci_iounmap); | ||
219 | #endif | ||
diff --git a/arch/arm/mm/minicache.c b/arch/arm/mm/minicache.c deleted file mode 100644 index dedf2ab01b2a..000000000000 --- a/arch/arm/mm/minicache.c +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/arm/mm/minicache.c | ||
3 | * | ||
4 | * Copyright (C) 2001 Russell King | ||
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 | * This handles the mini data cache, as found on SA11x0 and XScale | ||
11 | * processors. When we copy a user page page, we map it in such a way | ||
12 | * that accesses to this page will not touch the main data cache, but | ||
13 | * will be cached in the mini data cache. This prevents us thrashing | ||
14 | * the main data cache on page faults. | ||
15 | */ | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/mm.h> | ||
18 | |||
19 | #include <asm/page.h> | ||
20 | #include <asm/pgtable.h> | ||
21 | #include <asm/tlbflush.h> | ||
22 | |||
23 | /* | ||
24 | * 0xffff8000 to 0xffffffff is reserved for any ARM architecture | ||
25 | * specific hacks for copying pages efficiently. | ||
26 | */ | ||
27 | #define minicache_address (0xffff8000) | ||
28 | #define minicache_pgprot __pgprot(L_PTE_PRESENT | L_PTE_YOUNG | \ | ||
29 | L_PTE_CACHEABLE) | ||
30 | |||
31 | static pte_t *minicache_pte; | ||
32 | |||
33 | /* | ||
34 | * Note that this is intended to be called only from the copy_user_page | ||
35 | * asm code; anything else will require special locking to prevent the | ||
36 | * mini-cache space being re-used. (Note: probably preempt unsafe). | ||
37 | * | ||
38 | * We rely on the fact that the minicache is 2K, and we'll be pushing | ||
39 | * 4K of data through it, so we don't actually have to specifically | ||
40 | * flush the minicache when we change the mapping. | ||
41 | * | ||
42 | * Note also: assert(PAGE_OFFSET <= virt < high_memory). | ||
43 | * Unsafe: preempt, kmap. | ||
44 | */ | ||
45 | unsigned long map_page_minicache(unsigned long virt) | ||
46 | { | ||
47 | set_pte(minicache_pte, pfn_pte(__pa(virt) >> PAGE_SHIFT, minicache_pgprot)); | ||
48 | flush_tlb_kernel_page(minicache_address); | ||
49 | |||
50 | return minicache_address; | ||
51 | } | ||
52 | |||
53 | static int __init minicache_init(void) | ||
54 | { | ||
55 | pgd_t *pgd; | ||
56 | pmd_t *pmd; | ||
57 | |||
58 | spin_lock(&init_mm.page_table_lock); | ||
59 | |||
60 | pgd = pgd_offset_k(minicache_address); | ||
61 | pmd = pmd_alloc(&init_mm, pgd, minicache_address); | ||
62 | if (!pmd) | ||
63 | BUG(); | ||
64 | minicache_pte = pte_alloc_kernel(&init_mm, pmd, minicache_address); | ||
65 | if (!minicache_pte) | ||
66 | BUG(); | ||
67 | |||
68 | spin_unlock(&init_mm.page_table_lock); | ||
69 | |||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | core_initcall(minicache_init); | ||
diff --git a/arch/arm26/kernel/ecard.c b/arch/arm26/kernel/ecard.c index 824c6b571ad9..f2278aadac8a 100644 --- a/arch/arm26/kernel/ecard.c +++ b/arch/arm26/kernel/ecard.c | |||
@@ -562,31 +562,31 @@ static void __init ecard_init_resources(struct expansion_card *ec) | |||
562 | } | 562 | } |
563 | } | 563 | } |
564 | 564 | ||
565 | static ssize_t ecard_show_irq(struct device *dev, char *buf) | 565 | static ssize_t ecard_show_irq(struct device *dev, struct device_attribute *attr, char *buf) |
566 | { | 566 | { |
567 | struct expansion_card *ec = ECARD_DEV(dev); | 567 | struct expansion_card *ec = ECARD_DEV(dev); |
568 | return sprintf(buf, "%u\n", ec->irq); | 568 | return sprintf(buf, "%u\n", ec->irq); |
569 | } | 569 | } |
570 | 570 | ||
571 | static ssize_t ecard_show_vendor(struct device *dev, char *buf) | 571 | static ssize_t ecard_show_vendor(struct device *dev, struct device_attribute *attr, char *buf) |
572 | { | 572 | { |
573 | struct expansion_card *ec = ECARD_DEV(dev); | 573 | struct expansion_card *ec = ECARD_DEV(dev); |
574 | return sprintf(buf, "%u\n", ec->cid.manufacturer); | 574 | return sprintf(buf, "%u\n", ec->cid.manufacturer); |
575 | } | 575 | } |
576 | 576 | ||
577 | static ssize_t ecard_show_device(struct device *dev, char *buf) | 577 | static ssize_t ecard_show_device(struct device *dev, struct device_attribute *attr, char *buf) |
578 | { | 578 | { |
579 | struct expansion_card *ec = ECARD_DEV(dev); | 579 | struct expansion_card *ec = ECARD_DEV(dev); |
580 | return sprintf(buf, "%u\n", ec->cid.product); | 580 | return sprintf(buf, "%u\n", ec->cid.product); |
581 | } | 581 | } |
582 | 582 | ||
583 | static ssize_t ecard_show_dma(struct device *dev, char *buf) | 583 | static ssize_t ecard_show_dma(struct device *dev, struct device_attribute *attr, char *buf) |
584 | { | 584 | { |
585 | struct expansion_card *ec = ECARD_DEV(dev); | 585 | struct expansion_card *ec = ECARD_DEV(dev); |
586 | return sprintf(buf, "%u\n", ec->dma); | 586 | return sprintf(buf, "%u\n", ec->dma); |
587 | } | 587 | } |
588 | 588 | ||
589 | static ssize_t ecard_show_resources(struct device *dev, char *buf) | 589 | static ssize_t ecard_show_resources(struct device *dev, struct device_attribute *attr, char *buf) |
590 | { | 590 | { |
591 | struct expansion_card *ec = ECARD_DEV(dev); | 591 | struct expansion_card *ec = ECARD_DEV(dev); |
592 | char *str = buf; | 592 | char *str = buf; |
diff --git a/arch/h8300/kernel/process.c b/arch/h8300/kernel/process.c index 134aec1c6d19..b5f83e9f04db 100644 --- a/arch/h8300/kernel/process.c +++ b/arch/h8300/kernel/process.c | |||
@@ -54,7 +54,7 @@ asmlinkage void ret_from_fork(void); | |||
54 | void default_idle(void) | 54 | void default_idle(void) |
55 | { | 55 | { |
56 | while(1) { | 56 | while(1) { |
57 | if (need_resched()) { | 57 | if (!need_resched()) { |
58 | local_irq_enable(); | 58 | local_irq_enable(); |
59 | __asm__("sleep"); | 59 | __asm__("sleep"); |
60 | local_irq_disable(); | 60 | local_irq_disable(); |
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 0fbcfe00dd8d..51ecd512603d 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -43,7 +43,7 @@ obj-$(CONFIG_SCx200) += scx200.o | |||
43 | # Note: kbuild does not track this dependency due to usage of .incbin | 43 | # Note: kbuild does not track this dependency due to usage of .incbin |
44 | $(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so | 44 | $(obj)/vsyscall.o: $(obj)/vsyscall-int80.so $(obj)/vsyscall-sysenter.so |
45 | targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so) | 45 | targets += $(foreach F,int80 sysenter,vsyscall-$F.o vsyscall-$F.so) |
46 | targets += vsyscall.lds | 46 | targets += vsyscall-note.o vsyscall.lds |
47 | 47 | ||
48 | # The DSO images are built using a special linker script. | 48 | # The DSO images are built using a special linker script. |
49 | quiet_cmd_syscall = SYSCALL $@ | 49 | quiet_cmd_syscall = SYSCALL $@ |
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 45641a872550..0ff65abcd56c 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
@@ -1222,6 +1222,7 @@ static int suspend(int vetoable) | |||
1222 | 1222 | ||
1223 | save_processor_state(); | 1223 | save_processor_state(); |
1224 | err = set_system_power_state(APM_STATE_SUSPEND); | 1224 | err = set_system_power_state(APM_STATE_SUSPEND); |
1225 | ignore_normal_resume = 1; | ||
1225 | restore_processor_state(); | 1226 | restore_processor_state(); |
1226 | 1227 | ||
1227 | local_irq_disable(); | 1228 | local_irq_disable(); |
@@ -1229,7 +1230,6 @@ static int suspend(int vetoable) | |||
1229 | spin_lock(&i8253_lock); | 1230 | spin_lock(&i8253_lock); |
1230 | reinit_timer(); | 1231 | reinit_timer(); |
1231 | set_time(); | 1232 | set_time(); |
1232 | ignore_normal_resume = 1; | ||
1233 | 1233 | ||
1234 | spin_unlock(&i8253_lock); | 1234 | spin_unlock(&i8253_lock); |
1235 | write_sequnlock(&xtime_lock); | 1235 | write_sequnlock(&xtime_lock); |
diff --git a/arch/i386/kernel/cpu/cpufreq/Kconfig b/arch/i386/kernel/cpu/cpufreq/Kconfig index f25ffd74235c..0f1eb507233b 100644 --- a/arch/i386/kernel/cpu/cpufreq/Kconfig +++ b/arch/i386/kernel/cpu/cpufreq/Kconfig | |||
@@ -23,7 +23,7 @@ config X86_ACPI_CPUFREQ | |||
23 | If in doubt, say N. | 23 | If in doubt, say N. |
24 | 24 | ||
25 | config ELAN_CPUFREQ | 25 | config ELAN_CPUFREQ |
26 | tristate "AMD Elan" | 26 | tristate "AMD Elan SC400 and SC410" |
27 | select CPU_FREQ_TABLE | 27 | select CPU_FREQ_TABLE |
28 | depends on X86_ELAN | 28 | depends on X86_ELAN |
29 | ---help--- | 29 | ---help--- |
@@ -38,6 +38,18 @@ config ELAN_CPUFREQ | |||
38 | 38 | ||
39 | If in doubt, say N. | 39 | If in doubt, say N. |
40 | 40 | ||
41 | config SC520_CPUFREQ | ||
42 | tristate "AMD Elan SC520" | ||
43 | select CPU_FREQ_TABLE | ||
44 | depends on X86_ELAN | ||
45 | ---help--- | ||
46 | This adds the CPUFreq driver for AMD Elan SC520 processor. | ||
47 | |||
48 | For details, take a look at <file:Documentation/cpu-freq/>. | ||
49 | |||
50 | If in doubt, say N. | ||
51 | |||
52 | |||
41 | config X86_POWERNOW_K6 | 53 | config X86_POWERNOW_K6 |
42 | tristate "AMD Mobile K6-2/K6-3 PowerNow!" | 54 | tristate "AMD Mobile K6-2/K6-3 PowerNow!" |
43 | select CPU_FREQ_TABLE | 55 | select CPU_FREQ_TABLE |
diff --git a/arch/i386/kernel/cpu/cpufreq/Makefile b/arch/i386/kernel/cpu/cpufreq/Makefile index a922e97aeedd..2e894f1c8910 100644 --- a/arch/i386/kernel/cpu/cpufreq/Makefile +++ b/arch/i386/kernel/cpu/cpufreq/Makefile | |||
@@ -3,6 +3,7 @@ obj-$(CONFIG_X86_POWERNOW_K7) += powernow-k7.o | |||
3 | obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o | 3 | obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o |
4 | obj-$(CONFIG_X86_LONGHAUL) += longhaul.o | 4 | obj-$(CONFIG_X86_LONGHAUL) += longhaul.o |
5 | obj-$(CONFIG_ELAN_CPUFREQ) += elanfreq.o | 5 | obj-$(CONFIG_ELAN_CPUFREQ) += elanfreq.o |
6 | obj-$(CONFIG_SC520_CPUFREQ) += sc520_freq.o | ||
6 | obj-$(CONFIG_X86_LONGRUN) += longrun.o | 7 | obj-$(CONFIG_X86_LONGRUN) += longrun.o |
7 | obj-$(CONFIG_X86_GX_SUSPMOD) += gx-suspmod.o | 8 | obj-$(CONFIG_X86_GX_SUSPMOD) += gx-suspmod.o |
8 | obj-$(CONFIG_X86_SPEEDSTEP_ICH) += speedstep-ich.o | 9 | obj-$(CONFIG_X86_SPEEDSTEP_ICH) += speedstep-ich.o |
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index ab0f9f5aac11..04e3563da4fe 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/cpufreq.h> | 29 | #include <linux/cpufreq.h> |
30 | #include <linux/slab.h> | 30 | #include <linux/slab.h> |
31 | #include <linux/string.h> | 31 | #include <linux/string.h> |
32 | #include <linux/pci.h> | ||
32 | 33 | ||
33 | #include <asm/msr.h> | 34 | #include <asm/msr.h> |
34 | #include <asm/timex.h> | 35 | #include <asm/timex.h> |
@@ -119,7 +120,13 @@ static int longhaul_get_cpu_mult(void) | |||
119 | static void do_powersaver(union msr_longhaul *longhaul, | 120 | static void do_powersaver(union msr_longhaul *longhaul, |
120 | unsigned int clock_ratio_index) | 121 | unsigned int clock_ratio_index) |
121 | { | 122 | { |
123 | struct pci_dev *dev; | ||
124 | unsigned long flags; | ||
125 | unsigned int tmp_mask; | ||
122 | int version; | 126 | int version; |
127 | int i; | ||
128 | u16 pci_cmd; | ||
129 | u16 cmd_state[64]; | ||
123 | 130 | ||
124 | switch (cpu_model) { | 131 | switch (cpu_model) { |
125 | case CPU_EZRA_T: | 132 | case CPU_EZRA_T: |
@@ -137,17 +144,58 @@ static void do_powersaver(union msr_longhaul *longhaul, | |||
137 | longhaul->bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; | 144 | longhaul->bits.SoftBusRatio4 = (clock_ratio_index & 0x10) >> 4; |
138 | longhaul->bits.EnableSoftBusRatio = 1; | 145 | longhaul->bits.EnableSoftBusRatio = 1; |
139 | longhaul->bits.RevisionKey = 0; | 146 | longhaul->bits.RevisionKey = 0; |
140 | local_irq_disable(); | 147 | |
141 | wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); | 148 | preempt_disable(); |
149 | local_irq_save(flags); | ||
150 | |||
151 | /* | ||
152 | * get current pci bus master state for all devices | ||
153 | * and clear bus master bit | ||
154 | */ | ||
155 | dev = NULL; | ||
156 | i = 0; | ||
157 | do { | ||
158 | dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev); | ||
159 | if (dev != NULL) { | ||
160 | pci_read_config_word(dev, PCI_COMMAND, &pci_cmd); | ||
161 | cmd_state[i++] = pci_cmd; | ||
162 | pci_cmd &= ~PCI_COMMAND_MASTER; | ||
163 | pci_write_config_word(dev, PCI_COMMAND, pci_cmd); | ||
164 | } | ||
165 | } while (dev != NULL); | ||
166 | |||
167 | tmp_mask=inb(0x21); /* works on C3. save mask. */ | ||
168 | outb(0xFE,0x21); /* TMR0 only */ | ||
169 | outb(0xFF,0x80); /* delay */ | ||
170 | |||
142 | local_irq_enable(); | 171 | local_irq_enable(); |
172 | |||
173 | __hlt(); | ||
174 | wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); | ||
143 | __hlt(); | 175 | __hlt(); |
144 | 176 | ||
177 | local_irq_disable(); | ||
178 | |||
179 | outb(tmp_mask,0x21); /* restore mask */ | ||
180 | |||
181 | /* restore pci bus master state for all devices */ | ||
182 | dev = NULL; | ||
183 | i = 0; | ||
184 | do { | ||
185 | dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev); | ||
186 | if (dev != NULL) { | ||
187 | pci_cmd = cmd_state[i++]; | ||
188 | pci_write_config_byte(dev, PCI_COMMAND, pci_cmd); | ||
189 | } | ||
190 | } while (dev != NULL); | ||
191 | local_irq_restore(flags); | ||
192 | preempt_enable(); | ||
193 | |||
194 | /* disable bus ratio bit */ | ||
145 | rdmsrl(MSR_VIA_LONGHAUL, longhaul->val); | 195 | rdmsrl(MSR_VIA_LONGHAUL, longhaul->val); |
146 | longhaul->bits.EnableSoftBusRatio = 0; | 196 | longhaul->bits.EnableSoftBusRatio = 0; |
147 | longhaul->bits.RevisionKey = version; | 197 | longhaul->bits.RevisionKey = version; |
148 | local_irq_disable(); | ||
149 | wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); | 198 | wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); |
150 | local_irq_enable(); | ||
151 | } | 199 | } |
152 | 200 | ||
153 | /** | 201 | /** |
@@ -578,7 +626,7 @@ static int __init longhaul_cpu_init(struct cpufreq_policy *policy) | |||
578 | longhaul_setup_voltagescaling(); | 626 | longhaul_setup_voltagescaling(); |
579 | 627 | ||
580 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | 628 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; |
581 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 629 | policy->cpuinfo.transition_latency = 200000; /* nsec */ |
582 | policy->cur = calc_speed(longhaul_get_cpu_mult()); | 630 | policy->cur = calc_speed(longhaul_get_cpu_mult()); |
583 | 631 | ||
584 | ret = cpufreq_frequency_table_cpuinfo(policy, longhaul_table); | 632 | ret = cpufreq_frequency_table_cpuinfo(policy, longhaul_table); |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c index 913f652623d9..5c530064eb74 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k7.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k7.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/dmi.h> | 23 | #include <linux/dmi.h> |
24 | 24 | ||
25 | #include <asm/msr.h> | 25 | #include <asm/msr.h> |
26 | #include <asm/timer.h> | ||
26 | #include <asm/timex.h> | 27 | #include <asm/timex.h> |
27 | #include <asm/io.h> | 28 | #include <asm/io.h> |
28 | #include <asm/system.h> | 29 | #include <asm/system.h> |
@@ -586,13 +587,17 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy) | |||
586 | 587 | ||
587 | rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val); | 588 | rdmsrl (MSR_K7_FID_VID_STATUS, fidvidstatus.val); |
588 | 589 | ||
589 | /* A K7 with powernow technology is set to max frequency by BIOS */ | 590 | /* recalibrate cpu_khz */ |
590 | fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.MFID]; | 591 | result = recalibrate_cpu_khz(); |
592 | if (result) | ||
593 | return result; | ||
594 | |||
595 | fsb = (10 * cpu_khz) / fid_codes[fidvidstatus.bits.CFID]; | ||
591 | if (!fsb) { | 596 | if (!fsb) { |
592 | printk(KERN_WARNING PFX "can not determine bus frequency\n"); | 597 | printk(KERN_WARNING PFX "can not determine bus frequency\n"); |
593 | return -EINVAL; | 598 | return -EINVAL; |
594 | } | 599 | } |
595 | dprintk("FSB: %3d.%03d MHz\n", fsb/1000, fsb%1000); | 600 | dprintk("FSB: %3dMHz\n", fsb/1000); |
596 | 601 | ||
597 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { | 602 | if (dmi_check_system(powernow_dmi_table) || acpi_force) { |
598 | printk (KERN_INFO PFX "PSB/PST known to be broken. Trying ACPI instead\n"); | 603 | printk (KERN_INFO PFX "PSB/PST known to be broken. Trying ACPI instead\n"); |
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c index a65ff7e32e5d..10cc096c0ade 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * GNU general public license version 2. See "COPYING" or | 4 | * GNU general public license version 2. See "COPYING" or |
5 | * http://www.gnu.org/licenses/gpl.html | 5 | * http://www.gnu.org/licenses/gpl.html |
6 | * | 6 | * |
7 | * Support : paul.devriendt@amd.com | 7 | * Support : mark.langsdorf@amd.com |
8 | * | 8 | * |
9 | * Based on the powernow-k7.c module written by Dave Jones. | 9 | * Based on the powernow-k7.c module written by Dave Jones. |
10 | * (C) 2003 Dave Jones <davej@codemonkey.org.uk> on behalf of SuSE Labs | 10 | * (C) 2003 Dave Jones <davej@codemonkey.org.uk> on behalf of SuSE Labs |
@@ -15,12 +15,13 @@ | |||
15 | * | 15 | * |
16 | * Valuable input gratefully received from Dave Jones, Pavel Machek, | 16 | * Valuable input gratefully received from Dave Jones, Pavel Machek, |
17 | * Dominik Brodowski, and others. | 17 | * Dominik Brodowski, and others. |
18 | * Originally developed by Paul Devriendt. | ||
18 | * Processor information obtained from Chapter 9 (Power and Thermal Management) | 19 | * Processor information obtained from Chapter 9 (Power and Thermal Management) |
19 | * of the "BIOS and Kernel Developer's Guide for the AMD Athlon 64 and AMD | 20 | * of the "BIOS and Kernel Developer's Guide for the AMD Athlon 64 and AMD |
20 | * Opteron Processors" available for download from www.amd.com | 21 | * Opteron Processors" available for download from www.amd.com |
21 | * | 22 | * |
22 | * Tables for specific CPUs can be infrerred from | 23 | * Tables for specific CPUs can be infrerred from |
23 | * http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/30430.pdf | 24 | * http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/30430.pdf |
24 | */ | 25 | */ |
25 | 26 | ||
26 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
@@ -30,6 +31,7 @@ | |||
30 | #include <linux/cpufreq.h> | 31 | #include <linux/cpufreq.h> |
31 | #include <linux/slab.h> | 32 | #include <linux/slab.h> |
32 | #include <linux/string.h> | 33 | #include <linux/string.h> |
34 | #include <linux/cpumask.h> | ||
33 | 35 | ||
34 | #include <asm/msr.h> | 36 | #include <asm/msr.h> |
35 | #include <asm/io.h> | 37 | #include <asm/io.h> |
@@ -42,7 +44,7 @@ | |||
42 | 44 | ||
43 | #define PFX "powernow-k8: " | 45 | #define PFX "powernow-k8: " |
44 | #define BFX PFX "BIOS error: " | 46 | #define BFX PFX "BIOS error: " |
45 | #define VERSION "version 1.00.09e" | 47 | #define VERSION "version 1.40.2" |
46 | #include "powernow-k8.h" | 48 | #include "powernow-k8.h" |
47 | 49 | ||
48 | /* serialize freq changes */ | 50 | /* serialize freq changes */ |
@@ -50,6 +52,10 @@ static DECLARE_MUTEX(fidvid_sem); | |||
50 | 52 | ||
51 | static struct powernow_k8_data *powernow_data[NR_CPUS]; | 53 | static struct powernow_k8_data *powernow_data[NR_CPUS]; |
52 | 54 | ||
55 | #ifndef CONFIG_SMP | ||
56 | static cpumask_t cpu_core_map[1]; | ||
57 | #endif | ||
58 | |||
53 | /* Return a frequency in MHz, given an input fid */ | 59 | /* Return a frequency in MHz, given an input fid */ |
54 | static u32 find_freq_from_fid(u32 fid) | 60 | static u32 find_freq_from_fid(u32 fid) |
55 | { | 61 | { |
@@ -274,11 +280,18 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, u32 reqvid | |||
274 | { | 280 | { |
275 | u32 rvosteps = data->rvo; | 281 | u32 rvosteps = data->rvo; |
276 | u32 savefid = data->currfid; | 282 | u32 savefid = data->currfid; |
283 | u32 maxvid, lo; | ||
277 | 284 | ||
278 | dprintk("ph1 (cpu%d): start, currfid 0x%x, currvid 0x%x, reqvid 0x%x, rvo 0x%x\n", | 285 | dprintk("ph1 (cpu%d): start, currfid 0x%x, currvid 0x%x, reqvid 0x%x, rvo 0x%x\n", |
279 | smp_processor_id(), | 286 | smp_processor_id(), |
280 | data->currfid, data->currvid, reqvid, data->rvo); | 287 | data->currfid, data->currvid, reqvid, data->rvo); |
281 | 288 | ||
289 | rdmsr(MSR_FIDVID_STATUS, lo, maxvid); | ||
290 | maxvid = 0x1f & (maxvid >> 16); | ||
291 | dprintk("ph1 maxvid=0x%x\n", maxvid); | ||
292 | if (reqvid < maxvid) /* lower numbers are higher voltages */ | ||
293 | reqvid = maxvid; | ||
294 | |||
282 | while (data->currvid > reqvid) { | 295 | while (data->currvid > reqvid) { |
283 | dprintk("ph1: curr 0x%x, req vid 0x%x\n", | 296 | dprintk("ph1: curr 0x%x, req vid 0x%x\n", |
284 | data->currvid, reqvid); | 297 | data->currvid, reqvid); |
@@ -286,8 +299,8 @@ static int core_voltage_pre_transition(struct powernow_k8_data *data, u32 reqvid | |||
286 | return 1; | 299 | return 1; |
287 | } | 300 | } |
288 | 301 | ||
289 | while ((rvosteps > 0) && ((data->rvo + data->currvid) > reqvid)) { | 302 | while ((rvosteps > 0) && ((data->rvo + data->currvid) > reqvid)) { |
290 | if (data->currvid == 0) { | 303 | if (data->currvid == maxvid) { |
291 | rvosteps = 0; | 304 | rvosteps = 0; |
292 | } else { | 305 | } else { |
293 | dprintk("ph1: changing vid for rvo, req 0x%x\n", | 306 | dprintk("ph1: changing vid for rvo, req 0x%x\n", |
@@ -671,7 +684,7 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
671 | * BIOS and Kernel Developer's Guide, which is available on | 684 | * BIOS and Kernel Developer's Guide, which is available on |
672 | * www.amd.com | 685 | * www.amd.com |
673 | */ | 686 | */ |
674 | printk(KERN_ERR PFX "BIOS error - no PSB\n"); | 687 | printk(KERN_INFO PFX "BIOS error - no PSB or ACPI _PSS objects\n"); |
675 | return -ENODEV; | 688 | return -ENODEV; |
676 | } | 689 | } |
677 | 690 | ||
@@ -695,7 +708,7 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
695 | struct cpufreq_frequency_table *powernow_table; | 708 | struct cpufreq_frequency_table *powernow_table; |
696 | 709 | ||
697 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { | 710 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { |
698 | dprintk("register performance failed\n"); | 711 | dprintk("register performance failed: bad ACPI data\n"); |
699 | return -EIO; | 712 | return -EIO; |
700 | } | 713 | } |
701 | 714 | ||
@@ -746,22 +759,23 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
746 | continue; | 759 | continue; |
747 | } | 760 | } |
748 | 761 | ||
749 | if (fid < HI_FID_TABLE_BOTTOM) { | 762 | /* verify only 1 entry from the lo frequency table */ |
750 | if (cntlofreq) { | 763 | if (fid < HI_FID_TABLE_BOTTOM) { |
751 | /* if both entries are the same, ignore this | 764 | if (cntlofreq) { |
752 | * one... | 765 | /* if both entries are the same, ignore this |
753 | */ | 766 | * one... |
754 | if ((powernow_table[i].frequency != powernow_table[cntlofreq].frequency) || | 767 | */ |
755 | (powernow_table[i].index != powernow_table[cntlofreq].index)) { | 768 | if ((powernow_table[i].frequency != powernow_table[cntlofreq].frequency) || |
756 | printk(KERN_ERR PFX "Too many lo freq table entries\n"); | 769 | (powernow_table[i].index != powernow_table[cntlofreq].index)) { |
757 | goto err_out_mem; | 770 | printk(KERN_ERR PFX "Too many lo freq table entries\n"); |
758 | } | 771 | goto err_out_mem; |
759 | 772 | } | |
760 | dprintk("double low frequency table entry, ignoring it.\n"); | 773 | |
761 | powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 774 | dprintk("double low frequency table entry, ignoring it.\n"); |
762 | continue; | 775 | powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
763 | } else | 776 | continue; |
764 | cntlofreq = i; | 777 | } else |
778 | cntlofreq = i; | ||
765 | } | 779 | } |
766 | 780 | ||
767 | if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) { | 781 | if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) { |
@@ -816,7 +830,7 @@ static int transition_frequency(struct powernow_k8_data *data, unsigned int inde | |||
816 | { | 830 | { |
817 | u32 fid; | 831 | u32 fid; |
818 | u32 vid; | 832 | u32 vid; |
819 | int res; | 833 | int res, i; |
820 | struct cpufreq_freqs freqs; | 834 | struct cpufreq_freqs freqs; |
821 | 835 | ||
822 | dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); | 836 | dprintk("cpu %d transition to index %u\n", smp_processor_id(), index); |
@@ -841,7 +855,8 @@ static int transition_frequency(struct powernow_k8_data *data, unsigned int inde | |||
841 | } | 855 | } |
842 | 856 | ||
843 | if ((fid < HI_FID_TABLE_BOTTOM) && (data->currfid < HI_FID_TABLE_BOTTOM)) { | 857 | if ((fid < HI_FID_TABLE_BOTTOM) && (data->currfid < HI_FID_TABLE_BOTTOM)) { |
844 | printk("ignoring illegal change in lo freq table-%x to 0x%x\n", | 858 | printk(KERN_ERR PFX |
859 | "ignoring illegal change in lo freq table-%x to 0x%x\n", | ||
845 | data->currfid, fid); | 860 | data->currfid, fid); |
846 | return 1; | 861 | return 1; |
847 | } | 862 | } |
@@ -850,18 +865,20 @@ static int transition_frequency(struct powernow_k8_data *data, unsigned int inde | |||
850 | smp_processor_id(), fid, vid); | 865 | smp_processor_id(), fid, vid); |
851 | 866 | ||
852 | freqs.cpu = data->cpu; | 867 | freqs.cpu = data->cpu; |
853 | |||
854 | freqs.old = find_khz_freq_from_fid(data->currfid); | 868 | freqs.old = find_khz_freq_from_fid(data->currfid); |
855 | freqs.new = find_khz_freq_from_fid(fid); | 869 | freqs.new = find_khz_freq_from_fid(fid); |
856 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 870 | for_each_cpu_mask(i, cpu_core_map[data->cpu]) { |
871 | freqs.cpu = i; | ||
872 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
873 | } | ||
857 | 874 | ||
858 | down(&fidvid_sem); | ||
859 | res = transition_fid_vid(data, fid, vid); | 875 | res = transition_fid_vid(data, fid, vid); |
860 | up(&fidvid_sem); | ||
861 | 876 | ||
862 | freqs.new = find_khz_freq_from_fid(data->currfid); | 877 | freqs.new = find_khz_freq_from_fid(data->currfid); |
863 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 878 | for_each_cpu_mask(i, cpu_core_map[data->cpu]) { |
864 | 879 | freqs.cpu = i; | |
880 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
881 | } | ||
865 | return res; | 882 | return res; |
866 | } | 883 | } |
867 | 884 | ||
@@ -874,6 +891,7 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
874 | u32 checkvid = data->currvid; | 891 | u32 checkvid = data->currvid; |
875 | unsigned int newstate; | 892 | unsigned int newstate; |
876 | int ret = -EIO; | 893 | int ret = -EIO; |
894 | int i; | ||
877 | 895 | ||
878 | /* only run on specific CPU from here on */ | 896 | /* only run on specific CPU from here on */ |
879 | oldmask = current->cpus_allowed; | 897 | oldmask = current->cpus_allowed; |
@@ -902,22 +920,41 @@ static int powernowk8_target(struct cpufreq_policy *pol, unsigned targfreq, unsi | |||
902 | data->currfid, data->currvid); | 920 | data->currfid, data->currvid); |
903 | 921 | ||
904 | if ((checkvid != data->currvid) || (checkfid != data->currfid)) { | 922 | if ((checkvid != data->currvid) || (checkfid != data->currfid)) { |
905 | printk(KERN_ERR PFX | 923 | printk(KERN_INFO PFX |
906 | "error - out of sync, fid 0x%x 0x%x, vid 0x%x 0x%x\n", | 924 | "error - out of sync, fix 0x%x 0x%x, vid 0x%x 0x%x\n", |
907 | checkfid, data->currfid, checkvid, data->currvid); | 925 | checkfid, data->currfid, checkvid, data->currvid); |
908 | } | 926 | } |
909 | 927 | ||
910 | if (cpufreq_frequency_table_target(pol, data->powernow_table, targfreq, relation, &newstate)) | 928 | if (cpufreq_frequency_table_target(pol, data->powernow_table, targfreq, relation, &newstate)) |
911 | goto err_out; | 929 | goto err_out; |
912 | 930 | ||
931 | down(&fidvid_sem); | ||
932 | |||
933 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { | ||
934 | /* make sure the sibling is initialized */ | ||
935 | if (!powernow_data[i]) { | ||
936 | ret = 0; | ||
937 | up(&fidvid_sem); | ||
938 | goto err_out; | ||
939 | } | ||
940 | } | ||
941 | |||
913 | powernow_k8_acpi_pst_values(data, newstate); | 942 | powernow_k8_acpi_pst_values(data, newstate); |
914 | 943 | ||
915 | if (transition_frequency(data, newstate)) { | 944 | if (transition_frequency(data, newstate)) { |
916 | printk(KERN_ERR PFX "transition frequency failed\n"); | 945 | printk(KERN_ERR PFX "transition frequency failed\n"); |
917 | ret = 1; | 946 | ret = 1; |
947 | up(&fidvid_sem); | ||
918 | goto err_out; | 948 | goto err_out; |
919 | } | 949 | } |
920 | 950 | ||
951 | /* Update all the fid/vids of our siblings */ | ||
952 | for_each_cpu_mask(i, cpu_core_map[pol->cpu]) { | ||
953 | powernow_data[i]->currvid = data->currvid; | ||
954 | powernow_data[i]->currfid = data->currfid; | ||
955 | } | ||
956 | up(&fidvid_sem); | ||
957 | |||
921 | pol->cur = find_khz_freq_from_fid(data->currfid); | 958 | pol->cur = find_khz_freq_from_fid(data->currfid); |
922 | ret = 0; | 959 | ret = 0; |
923 | 960 | ||
@@ -962,7 +999,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
962 | */ | 999 | */ |
963 | 1000 | ||
964 | if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) { | 1001 | if ((num_online_cpus() != 1) || (num_possible_cpus() != 1)) { |
965 | printk(KERN_INFO PFX "MP systems not supported by PSB BIOS structure\n"); | 1002 | printk(KERN_ERR PFX "MP systems not supported by PSB BIOS structure\n"); |
966 | kfree(data); | 1003 | kfree(data); |
967 | return -ENODEV; | 1004 | return -ENODEV; |
968 | } | 1005 | } |
@@ -1003,6 +1040,7 @@ static int __init powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1003 | schedule(); | 1040 | schedule(); |
1004 | 1041 | ||
1005 | pol->governor = CPUFREQ_DEFAULT_GOVERNOR; | 1042 | pol->governor = CPUFREQ_DEFAULT_GOVERNOR; |
1043 | pol->cpus = cpu_core_map[pol->cpu]; | ||
1006 | 1044 | ||
1007 | /* Take a crude guess here. | 1045 | /* Take a crude guess here. |
1008 | * That guess was in microseconds, so multiply with 1000 */ | 1046 | * That guess was in microseconds, so multiply with 1000 */ |
@@ -1069,7 +1107,7 @@ static unsigned int powernowk8_get (unsigned int cpu) | |||
1069 | return 0; | 1107 | return 0; |
1070 | } | 1108 | } |
1071 | preempt_disable(); | 1109 | preempt_disable(); |
1072 | 1110 | ||
1073 | if (query_current_values_with_pending_wait(data)) | 1111 | if (query_current_values_with_pending_wait(data)) |
1074 | goto out; | 1112 | goto out; |
1075 | 1113 | ||
@@ -1127,9 +1165,10 @@ static void __exit powernowk8_exit(void) | |||
1127 | cpufreq_unregister_driver(&cpufreq_amd64_driver); | 1165 | cpufreq_unregister_driver(&cpufreq_amd64_driver); |
1128 | } | 1166 | } |
1129 | 1167 | ||
1130 | MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com>"); | 1168 | MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com."); |
1131 | MODULE_DESCRIPTION("AMD Athlon 64 and Opteron processor frequency driver."); | 1169 | MODULE_DESCRIPTION("AMD Athlon 64 and Opteron processor frequency driver."); |
1132 | MODULE_LICENSE("GPL"); | 1170 | MODULE_LICENSE("GPL"); |
1133 | 1171 | ||
1134 | late_initcall(powernowk8_init); | 1172 | late_initcall(powernowk8_init); |
1135 | module_exit(powernowk8_exit); | 1173 | module_exit(powernowk8_exit); |
1174 | |||
diff --git a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h index 63ebc8470f52..9ed5bf221cb7 100644 --- a/arch/i386/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/i386/kernel/cpu/cpufreq/powernow-k8.h | |||
@@ -174,3 +174,18 @@ static int core_voltage_post_transition(struct powernow_k8_data *data, u32 reqvi | |||
174 | static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid); | 174 | static int core_frequency_transition(struct powernow_k8_data *data, u32 reqfid); |
175 | 175 | ||
176 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index); | 176 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index); |
177 | |||
178 | #ifndef for_each_cpu_mask | ||
179 | #define for_each_cpu_mask(i,mask) for (i=0;i<1;i++) | ||
180 | #endif | ||
181 | |||
182 | #ifdef CONFIG_SMP | ||
183 | static inline void define_siblings(int cpu, cpumask_t cpu_sharedcore_mask[]) | ||
184 | { | ||
185 | } | ||
186 | #else | ||
187 | static inline void define_siblings(int cpu, cpumask_t cpu_sharedcore_mask[]) | ||
188 | { | ||
189 | cpu_set(0, cpu_sharedcore_mask[0]); | ||
190 | } | ||
191 | #endif | ||
diff --git a/arch/i386/kernel/cpu/cpufreq/sc520_freq.c b/arch/i386/kernel/cpu/cpufreq/sc520_freq.c new file mode 100644 index 000000000000..ef457d50f4ac --- /dev/null +++ b/arch/i386/kernel/cpu/cpufreq/sc520_freq.c | |||
@@ -0,0 +1,186 @@ | |||
1 | /* | ||
2 | * sc520_freq.c: cpufreq driver for the AMD Elan sc520 | ||
3 | * | ||
4 | * Copyright (C) 2005 Sean Young <sean@mess.org> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or | ||
7 | * modify it under the terms of the GNU General Public License | ||
8 | * as published by the Free Software Foundation; either version | ||
9 | * 2 of the License, or (at your option) any later version. | ||
10 | * | ||
11 | * Based on elanfreq.c | ||
12 | * | ||
13 | * 2005-03-30: - initial revision | ||
14 | */ | ||
15 | |||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/module.h> | ||
18 | #include <linux/init.h> | ||
19 | |||
20 | #include <linux/delay.h> | ||
21 | #include <linux/cpufreq.h> | ||
22 | |||
23 | #include <asm/msr.h> | ||
24 | #include <asm/timex.h> | ||
25 | #include <asm/io.h> | ||
26 | |||
27 | #define MMCR_BASE 0xfffef000 /* The default base address */ | ||
28 | #define OFFS_CPUCTL 0x2 /* CPU Control Register */ | ||
29 | |||
30 | static __u8 __iomem *cpuctl; | ||
31 | |||
32 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "sc520_freq", msg) | ||
33 | |||
34 | static struct cpufreq_frequency_table sc520_freq_table[] = { | ||
35 | {0x01, 100000}, | ||
36 | {0x02, 133000}, | ||
37 | {0, CPUFREQ_TABLE_END}, | ||
38 | }; | ||
39 | |||
40 | static unsigned int sc520_freq_get_cpu_frequency(unsigned int cpu) | ||
41 | { | ||
42 | u8 clockspeed_reg = *cpuctl; | ||
43 | |||
44 | switch (clockspeed_reg & 0x03) { | ||
45 | default: | ||
46 | printk(KERN_ERR "sc520_freq: error: cpuctl register has unexpected value %02x\n", clockspeed_reg); | ||
47 | case 0x01: | ||
48 | return 100000; | ||
49 | case 0x02: | ||
50 | return 133000; | ||
51 | } | ||
52 | } | ||
53 | |||
54 | static void sc520_freq_set_cpu_state (unsigned int state) | ||
55 | { | ||
56 | |||
57 | struct cpufreq_freqs freqs; | ||
58 | u8 clockspeed_reg; | ||
59 | |||
60 | freqs.old = sc520_freq_get_cpu_frequency(0); | ||
61 | freqs.new = sc520_freq_table[state].frequency; | ||
62 | freqs.cpu = 0; /* AMD Elan is UP */ | ||
63 | |||
64 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | ||
65 | |||
66 | dprintk("attempting to set frequency to %i kHz\n", | ||
67 | sc520_freq_table[state].frequency); | ||
68 | |||
69 | local_irq_disable(); | ||
70 | |||
71 | clockspeed_reg = *cpuctl & ~0x03; | ||
72 | *cpuctl = clockspeed_reg | sc520_freq_table[state].index; | ||
73 | |||
74 | local_irq_enable(); | ||
75 | |||
76 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | ||
77 | }; | ||
78 | |||
79 | static int sc520_freq_verify (struct cpufreq_policy *policy) | ||
80 | { | ||
81 | return cpufreq_frequency_table_verify(policy, &sc520_freq_table[0]); | ||
82 | } | ||
83 | |||
84 | static int sc520_freq_target (struct cpufreq_policy *policy, | ||
85 | unsigned int target_freq, | ||
86 | unsigned int relation) | ||
87 | { | ||
88 | unsigned int newstate = 0; | ||
89 | |||
90 | if (cpufreq_frequency_table_target(policy, sc520_freq_table, target_freq, relation, &newstate)) | ||
91 | return -EINVAL; | ||
92 | |||
93 | sc520_freq_set_cpu_state(newstate); | ||
94 | |||
95 | return 0; | ||
96 | } | ||
97 | |||
98 | |||
99 | /* | ||
100 | * Module init and exit code | ||
101 | */ | ||
102 | |||
103 | static int sc520_freq_cpu_init(struct cpufreq_policy *policy) | ||
104 | { | ||
105 | struct cpuinfo_x86 *c = cpu_data; | ||
106 | int result; | ||
107 | |||
108 | /* capability check */ | ||
109 | if (c->x86_vendor != X86_VENDOR_AMD || | ||
110 | c->x86 != 4 || c->x86_model != 9) | ||
111 | return -ENODEV; | ||
112 | |||
113 | /* cpuinfo and default policy values */ | ||
114 | policy->governor = CPUFREQ_DEFAULT_GOVERNOR; | ||
115 | policy->cpuinfo.transition_latency = 1000000; /* 1ms */ | ||
116 | policy->cur = sc520_freq_get_cpu_frequency(0); | ||
117 | |||
118 | result = cpufreq_frequency_table_cpuinfo(policy, sc520_freq_table); | ||
119 | if (result) | ||
120 | return (result); | ||
121 | |||
122 | cpufreq_frequency_table_get_attr(sc520_freq_table, policy->cpu); | ||
123 | |||
124 | return 0; | ||
125 | } | ||
126 | |||
127 | |||
128 | static int sc520_freq_cpu_exit(struct cpufreq_policy *policy) | ||
129 | { | ||
130 | cpufreq_frequency_table_put_attr(policy->cpu); | ||
131 | return 0; | ||
132 | } | ||
133 | |||
134 | |||
135 | static struct freq_attr* sc520_freq_attr[] = { | ||
136 | &cpufreq_freq_attr_scaling_available_freqs, | ||
137 | NULL, | ||
138 | }; | ||
139 | |||
140 | |||
141 | static struct cpufreq_driver sc520_freq_driver = { | ||
142 | .get = sc520_freq_get_cpu_frequency, | ||
143 | .verify = sc520_freq_verify, | ||
144 | .target = sc520_freq_target, | ||
145 | .init = sc520_freq_cpu_init, | ||
146 | .exit = sc520_freq_cpu_exit, | ||
147 | .name = "sc520_freq", | ||
148 | .owner = THIS_MODULE, | ||
149 | .attr = sc520_freq_attr, | ||
150 | }; | ||
151 | |||
152 | |||
153 | static int __init sc520_freq_init(void) | ||
154 | { | ||
155 | struct cpuinfo_x86 *c = cpu_data; | ||
156 | |||
157 | /* Test if we have the right hardware */ | ||
158 | if(c->x86_vendor != X86_VENDOR_AMD || | ||
159 | c->x86 != 4 || c->x86_model != 9) { | ||
160 | dprintk("no Elan SC520 processor found!\n"); | ||
161 | return -ENODEV; | ||
162 | } | ||
163 | cpuctl = ioremap((unsigned long)(MMCR_BASE + OFFS_CPUCTL), 1); | ||
164 | if(!cpuctl) { | ||
165 | printk(KERN_ERR "sc520_freq: error: failed to remap memory\n"); | ||
166 | return -ENOMEM; | ||
167 | } | ||
168 | |||
169 | return cpufreq_register_driver(&sc520_freq_driver); | ||
170 | } | ||
171 | |||
172 | |||
173 | static void __exit sc520_freq_exit(void) | ||
174 | { | ||
175 | cpufreq_unregister_driver(&sc520_freq_driver); | ||
176 | iounmap(cpuctl); | ||
177 | } | ||
178 | |||
179 | |||
180 | MODULE_LICENSE("GPL"); | ||
181 | MODULE_AUTHOR("Sean Young <sean@mess.org>"); | ||
182 | MODULE_DESCRIPTION("cpufreq driver for AMD's Elan sc520 CPU"); | ||
183 | |||
184 | module_init(sc520_freq_init); | ||
185 | module_exit(sc520_freq_exit); | ||
186 | |||
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c index 07d5612dc00f..7dcbf70fc16f 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -54,6 +54,8 @@ enum { | |||
54 | CPU_DOTHAN_A1, | 54 | CPU_DOTHAN_A1, |
55 | CPU_DOTHAN_A2, | 55 | CPU_DOTHAN_A2, |
56 | CPU_DOTHAN_B0, | 56 | CPU_DOTHAN_B0, |
57 | CPU_MP4HT_D0, | ||
58 | CPU_MP4HT_E0, | ||
57 | }; | 59 | }; |
58 | 60 | ||
59 | static const struct cpu_id cpu_ids[] = { | 61 | static const struct cpu_id cpu_ids[] = { |
@@ -61,6 +63,8 @@ static const struct cpu_id cpu_ids[] = { | |||
61 | [CPU_DOTHAN_A1] = { 6, 13, 1 }, | 63 | [CPU_DOTHAN_A1] = { 6, 13, 1 }, |
62 | [CPU_DOTHAN_A2] = { 6, 13, 2 }, | 64 | [CPU_DOTHAN_A2] = { 6, 13, 2 }, |
63 | [CPU_DOTHAN_B0] = { 6, 13, 6 }, | 65 | [CPU_DOTHAN_B0] = { 6, 13, 6 }, |
66 | [CPU_MP4HT_D0] = {15, 3, 4 }, | ||
67 | [CPU_MP4HT_E0] = {15, 4, 1 }, | ||
64 | }; | 68 | }; |
65 | #define N_IDS (sizeof(cpu_ids)/sizeof(cpu_ids[0])) | 69 | #define N_IDS (sizeof(cpu_ids)/sizeof(cpu_ids[0])) |
66 | 70 | ||
@@ -226,6 +230,8 @@ static struct cpu_model models[] = | |||
226 | { &cpu_ids[CPU_DOTHAN_A1], NULL, 0, NULL }, | 230 | { &cpu_ids[CPU_DOTHAN_A1], NULL, 0, NULL }, |
227 | { &cpu_ids[CPU_DOTHAN_A2], NULL, 0, NULL }, | 231 | { &cpu_ids[CPU_DOTHAN_A2], NULL, 0, NULL }, |
228 | { &cpu_ids[CPU_DOTHAN_B0], NULL, 0, NULL }, | 232 | { &cpu_ids[CPU_DOTHAN_B0], NULL, 0, NULL }, |
233 | { &cpu_ids[CPU_MP4HT_D0], NULL, 0, NULL }, | ||
234 | { &cpu_ids[CPU_MP4HT_E0], NULL, 0, NULL }, | ||
229 | 235 | ||
230 | { NULL, } | 236 | { NULL, } |
231 | }; | 237 | }; |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c index 8ba430a9c3a2..d368b3f5fce8 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-lib.c | |||
@@ -336,7 +336,7 @@ unsigned int speedstep_get_freqs(unsigned int processor, | |||
336 | if (!prev_speed) | 336 | if (!prev_speed) |
337 | return -EIO; | 337 | return -EIO; |
338 | 338 | ||
339 | dprintk("previous seped is %u\n", prev_speed); | 339 | dprintk("previous speed is %u\n", prev_speed); |
340 | 340 | ||
341 | local_irq_save(flags); | 341 | local_irq_save(flags); |
342 | 342 | ||
@@ -348,7 +348,7 @@ unsigned int speedstep_get_freqs(unsigned int processor, | |||
348 | goto out; | 348 | goto out; |
349 | } | 349 | } |
350 | 350 | ||
351 | dprintk("low seped is %u\n", *low_speed); | 351 | dprintk("low speed is %u\n", *low_speed); |
352 | 352 | ||
353 | /* switch to high state */ | 353 | /* switch to high state */ |
354 | set_state(SPEEDSTEP_HIGH); | 354 | set_state(SPEEDSTEP_HIGH); |
@@ -358,7 +358,7 @@ unsigned int speedstep_get_freqs(unsigned int processor, | |||
358 | goto out; | 358 | goto out; |
359 | } | 359 | } |
360 | 360 | ||
361 | dprintk("high seped is %u\n", *high_speed); | 361 | dprintk("high speed is %u\n", *high_speed); |
362 | 362 | ||
363 | if (*low_speed == *high_speed) { | 363 | if (*low_speed == *high_speed) { |
364 | ret = -ENODEV; | 364 | ret = -ENODEV; |
diff --git a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c index 79440b3f087e..b25fb6b635ae 100644 --- a/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-smi.c | |||
@@ -357,6 +357,9 @@ static int __init speedstep_init(void) | |||
357 | case SPEEDSTEP_PROCESSOR_PIII_C: | 357 | case SPEEDSTEP_PROCESSOR_PIII_C: |
358 | case SPEEDSTEP_PROCESSOR_PIII_C_EARLY: | 358 | case SPEEDSTEP_PROCESSOR_PIII_C_EARLY: |
359 | break; | 359 | break; |
360 | case SPEEDSTEP_PROCESSOR_P4M: | ||
361 | printk(KERN_INFO "speedstep-smi: you're trying to use this cpufreq driver on a Pentium 4-based CPU. Most likely it will not work.\n"); | ||
362 | break; | ||
360 | default: | 363 | default: |
361 | speedstep_processor = 0; | 364 | speedstep_processor = 0; |
362 | } | 365 | } |
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index aeb5b4ef8c8b..a710dc4eb20e 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -118,7 +118,7 @@ struct _cpuid4_info { | |||
118 | }; | 118 | }; |
119 | 119 | ||
120 | #define MAX_CACHE_LEAVES 4 | 120 | #define MAX_CACHE_LEAVES 4 |
121 | static unsigned short __devinitdata num_cache_leaves; | 121 | static unsigned short num_cache_leaves; |
122 | 122 | ||
123 | static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf) | 123 | static int __devinit cpuid4_cache_lookup(int index, struct _cpuid4_info *this_leaf) |
124 | { | 124 | { |
diff --git a/arch/i386/kernel/cpuid.c b/arch/i386/kernel/cpuid.c index 2e2756345bb2..4647db4ad6de 100644 --- a/arch/i386/kernel/cpuid.c +++ b/arch/i386/kernel/cpuid.c | |||
@@ -45,7 +45,7 @@ | |||
45 | #include <asm/uaccess.h> | 45 | #include <asm/uaccess.h> |
46 | #include <asm/system.h> | 46 | #include <asm/system.h> |
47 | 47 | ||
48 | static struct class_simple *cpuid_class; | 48 | static struct class *cpuid_class; |
49 | 49 | ||
50 | #ifdef CONFIG_SMP | 50 | #ifdef CONFIG_SMP |
51 | 51 | ||
@@ -158,12 +158,12 @@ static struct file_operations cpuid_fops = { | |||
158 | .open = cpuid_open, | 158 | .open = cpuid_open, |
159 | }; | 159 | }; |
160 | 160 | ||
161 | static int cpuid_class_simple_device_add(int i) | 161 | static int cpuid_class_device_create(int i) |
162 | { | 162 | { |
163 | int err = 0; | 163 | int err = 0; |
164 | struct class_device *class_err; | 164 | struct class_device *class_err; |
165 | 165 | ||
166 | class_err = class_simple_device_add(cpuid_class, MKDEV(CPUID_MAJOR, i), NULL, "cpu%d",i); | 166 | class_err = class_device_create(cpuid_class, MKDEV(CPUID_MAJOR, i), NULL, "cpu%d",i); |
167 | if (IS_ERR(class_err)) | 167 | if (IS_ERR(class_err)) |
168 | err = PTR_ERR(class_err); | 168 | err = PTR_ERR(class_err); |
169 | return err; | 169 | return err; |
@@ -175,10 +175,10 @@ static int __devinit cpuid_class_cpu_callback(struct notifier_block *nfb, unsign | |||
175 | 175 | ||
176 | switch (action) { | 176 | switch (action) { |
177 | case CPU_ONLINE: | 177 | case CPU_ONLINE: |
178 | cpuid_class_simple_device_add(cpu); | 178 | cpuid_class_device_create(cpu); |
179 | break; | 179 | break; |
180 | case CPU_DEAD: | 180 | case CPU_DEAD: |
181 | class_simple_device_remove(MKDEV(CPUID_MAJOR, cpu)); | 181 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); |
182 | break; | 182 | break; |
183 | } | 183 | } |
184 | return NOTIFY_OK; | 184 | return NOTIFY_OK; |
@@ -200,13 +200,13 @@ static int __init cpuid_init(void) | |||
200 | err = -EBUSY; | 200 | err = -EBUSY; |
201 | goto out; | 201 | goto out; |
202 | } | 202 | } |
203 | cpuid_class = class_simple_create(THIS_MODULE, "cpuid"); | 203 | cpuid_class = class_create(THIS_MODULE, "cpuid"); |
204 | if (IS_ERR(cpuid_class)) { | 204 | if (IS_ERR(cpuid_class)) { |
205 | err = PTR_ERR(cpuid_class); | 205 | err = PTR_ERR(cpuid_class); |
206 | goto out_chrdev; | 206 | goto out_chrdev; |
207 | } | 207 | } |
208 | for_each_online_cpu(i) { | 208 | for_each_online_cpu(i) { |
209 | err = cpuid_class_simple_device_add(i); | 209 | err = cpuid_class_device_create(i); |
210 | if (err != 0) | 210 | if (err != 0) |
211 | goto out_class; | 211 | goto out_class; |
212 | } | 212 | } |
@@ -218,9 +218,9 @@ static int __init cpuid_init(void) | |||
218 | out_class: | 218 | out_class: |
219 | i = 0; | 219 | i = 0; |
220 | for_each_online_cpu(i) { | 220 | for_each_online_cpu(i) { |
221 | class_simple_device_remove(MKDEV(CPUID_MAJOR, i)); | 221 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, i)); |
222 | } | 222 | } |
223 | class_simple_destroy(cpuid_class); | 223 | class_destroy(cpuid_class); |
224 | out_chrdev: | 224 | out_chrdev: |
225 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); | 225 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); |
226 | out: | 226 | out: |
@@ -232,8 +232,8 @@ static void __exit cpuid_exit(void) | |||
232 | int cpu = 0; | 232 | int cpu = 0; |
233 | 233 | ||
234 | for_each_online_cpu(cpu) | 234 | for_each_online_cpu(cpu) |
235 | class_simple_device_remove(MKDEV(CPUID_MAJOR, cpu)); | 235 | class_device_destroy(cpuid_class, MKDEV(CPUID_MAJOR, cpu)); |
236 | class_simple_destroy(cpuid_class); | 236 | class_destroy(cpuid_class); |
237 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); | 237 | unregister_chrdev(CPUID_MAJOR, "cpu/cpuid"); |
238 | unregister_cpu_notifier(&cpuid_class_cpu_notifier); | 238 | unregister_cpu_notifier(&cpuid_class_cpu_notifier); |
239 | } | 239 | } |
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index 05d9f8f363a6..b2f03c39a6fe 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #include <asm/uaccess.h> | 44 | #include <asm/uaccess.h> |
45 | #include <asm/system.h> | 45 | #include <asm/system.h> |
46 | 46 | ||
47 | static struct class_simple *msr_class; | 47 | static struct class *msr_class; |
48 | 48 | ||
49 | /* Note: "err" is handled in a funny way below. Otherwise one version | 49 | /* Note: "err" is handled in a funny way below. Otherwise one version |
50 | of gcc or another breaks. */ | 50 | of gcc or another breaks. */ |
@@ -260,12 +260,12 @@ static struct file_operations msr_fops = { | |||
260 | .open = msr_open, | 260 | .open = msr_open, |
261 | }; | 261 | }; |
262 | 262 | ||
263 | static int msr_class_simple_device_add(int i) | 263 | static int msr_class_device_create(int i) |
264 | { | 264 | { |
265 | int err = 0; | 265 | int err = 0; |
266 | struct class_device *class_err; | 266 | struct class_device *class_err; |
267 | 267 | ||
268 | class_err = class_simple_device_add(msr_class, MKDEV(MSR_MAJOR, i), NULL, "msr%d",i); | 268 | class_err = class_device_create(msr_class, MKDEV(MSR_MAJOR, i), NULL, "msr%d",i); |
269 | if (IS_ERR(class_err)) | 269 | if (IS_ERR(class_err)) |
270 | err = PTR_ERR(class_err); | 270 | err = PTR_ERR(class_err); |
271 | return err; | 271 | return err; |
@@ -277,10 +277,10 @@ static int __devinit msr_class_cpu_callback(struct notifier_block *nfb, unsigned | |||
277 | 277 | ||
278 | switch (action) { | 278 | switch (action) { |
279 | case CPU_ONLINE: | 279 | case CPU_ONLINE: |
280 | msr_class_simple_device_add(cpu); | 280 | msr_class_device_create(cpu); |
281 | break; | 281 | break; |
282 | case CPU_DEAD: | 282 | case CPU_DEAD: |
283 | class_simple_device_remove(MKDEV(MSR_MAJOR, cpu)); | 283 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); |
284 | break; | 284 | break; |
285 | } | 285 | } |
286 | return NOTIFY_OK; | 286 | return NOTIFY_OK; |
@@ -302,13 +302,13 @@ static int __init msr_init(void) | |||
302 | err = -EBUSY; | 302 | err = -EBUSY; |
303 | goto out; | 303 | goto out; |
304 | } | 304 | } |
305 | msr_class = class_simple_create(THIS_MODULE, "msr"); | 305 | msr_class = class_create(THIS_MODULE, "msr"); |
306 | if (IS_ERR(msr_class)) { | 306 | if (IS_ERR(msr_class)) { |
307 | err = PTR_ERR(msr_class); | 307 | err = PTR_ERR(msr_class); |
308 | goto out_chrdev; | 308 | goto out_chrdev; |
309 | } | 309 | } |
310 | for_each_online_cpu(i) { | 310 | for_each_online_cpu(i) { |
311 | err = msr_class_simple_device_add(i); | 311 | err = msr_class_device_create(i); |
312 | if (err != 0) | 312 | if (err != 0) |
313 | goto out_class; | 313 | goto out_class; |
314 | } | 314 | } |
@@ -320,8 +320,8 @@ static int __init msr_init(void) | |||
320 | out_class: | 320 | out_class: |
321 | i = 0; | 321 | i = 0; |
322 | for_each_online_cpu(i) | 322 | for_each_online_cpu(i) |
323 | class_simple_device_remove(MKDEV(MSR_MAJOR, i)); | 323 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, i)); |
324 | class_simple_destroy(msr_class); | 324 | class_destroy(msr_class); |
325 | out_chrdev: | 325 | out_chrdev: |
326 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 326 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
327 | out: | 327 | out: |
@@ -332,8 +332,8 @@ static void __exit msr_exit(void) | |||
332 | { | 332 | { |
333 | int cpu = 0; | 333 | int cpu = 0; |
334 | for_each_online_cpu(cpu) | 334 | for_each_online_cpu(cpu) |
335 | class_simple_device_remove(MKDEV(MSR_MAJOR, cpu)); | 335 | class_device_destroy(msr_class, MKDEV(MSR_MAJOR, cpu)); |
336 | class_simple_destroy(msr_class); | 336 | class_destroy(msr_class); |
337 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); | 337 | unregister_chrdev(MSR_MAJOR, "cpu/msr"); |
338 | unregister_cpu_notifier(&msr_class_cpu_notifier); | 338 | unregister_cpu_notifier(&msr_class_cpu_notifier); |
339 | } | 339 | } |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index 945ec73163c8..2bfbddebdbf8 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -1502,11 +1502,13 @@ void __init setup_arch(char **cmdline_p) | |||
1502 | if (efi_enabled) | 1502 | if (efi_enabled) |
1503 | efi_map_memmap(); | 1503 | efi_map_memmap(); |
1504 | 1504 | ||
1505 | #ifdef CONFIG_ACPI_BOOT | ||
1505 | /* | 1506 | /* |
1506 | * Parse the ACPI tables for possible boot-time SMP configuration. | 1507 | * Parse the ACPI tables for possible boot-time SMP configuration. |
1507 | */ | 1508 | */ |
1508 | acpi_boot_table_init(); | 1509 | acpi_boot_table_init(); |
1509 | acpi_boot_init(); | 1510 | acpi_boot_init(); |
1511 | #endif | ||
1510 | 1512 | ||
1511 | #ifdef CONFIG_X86_LOCAL_APIC | 1513 | #ifdef CONFIG_X86_LOCAL_APIC |
1512 | if (smp_found_config) | 1514 | if (smp_found_config) |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 35bfe138cb1a..bc1bb6919e6a 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1074,8 +1074,10 @@ static void __init smp_boot_cpus(unsigned int max_cpus) | |||
1074 | cpu_set(cpu, cpu_sibling_map[cpu]); | 1074 | cpu_set(cpu, cpu_sibling_map[cpu]); |
1075 | } | 1075 | } |
1076 | 1076 | ||
1077 | if (siblings != smp_num_siblings) | 1077 | if (siblings != smp_num_siblings) { |
1078 | printk(KERN_WARNING "WARNING: %d siblings found for CPU%d, should be %d\n", siblings, cpu, smp_num_siblings); | 1078 | printk(KERN_WARNING "WARNING: %d siblings found for CPU%d, should be %d\n", siblings, cpu, smp_num_siblings); |
1079 | smp_num_siblings = siblings; | ||
1080 | } | ||
1079 | 1081 | ||
1080 | if (c->x86_num_cores > 1) { | 1082 | if (c->x86_num_cores > 1) { |
1081 | for (i = 0; i < NR_CPUS; i++) { | 1083 | for (i = 0; i < NR_CPUS; i++) { |
diff --git a/arch/i386/kernel/timers/common.c b/arch/i386/kernel/timers/common.c index f7f90005e22e..8e201219f525 100644 --- a/arch/i386/kernel/timers/common.c +++ b/arch/i386/kernel/timers/common.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/timex.h> | 6 | #include <linux/timex.h> |
7 | #include <linux/errno.h> | 7 | #include <linux/errno.h> |
8 | #include <linux/jiffies.h> | 8 | #include <linux/jiffies.h> |
9 | #include <linux/module.h> | ||
9 | 10 | ||
10 | #include <asm/io.h> | 11 | #include <asm/io.h> |
11 | #include <asm/timer.h> | 12 | #include <asm/timer.h> |
@@ -24,7 +25,7 @@ | |||
24 | 25 | ||
25 | #define CALIBRATE_TIME (5 * 1000020/HZ) | 26 | #define CALIBRATE_TIME (5 * 1000020/HZ) |
26 | 27 | ||
27 | unsigned long __init calibrate_tsc(void) | 28 | unsigned long calibrate_tsc(void) |
28 | { | 29 | { |
29 | mach_prepare_counter(); | 30 | mach_prepare_counter(); |
30 | 31 | ||
@@ -139,7 +140,7 @@ bad_calibration: | |||
139 | #endif | 140 | #endif |
140 | 141 | ||
141 | /* calculate cpu_khz */ | 142 | /* calculate cpu_khz */ |
142 | void __init init_cpu_khz(void) | 143 | void init_cpu_khz(void) |
143 | { | 144 | { |
144 | if (cpu_has_tsc) { | 145 | if (cpu_has_tsc) { |
145 | unsigned long tsc_quotient = calibrate_tsc(); | 146 | unsigned long tsc_quotient = calibrate_tsc(); |
@@ -158,3 +159,4 @@ void __init init_cpu_khz(void) | |||
158 | } | 159 | } |
159 | } | 160 | } |
160 | } | 161 | } |
162 | |||
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index 7926d967be00..180444d87824 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -320,6 +320,26 @@ core_initcall(cpufreq_tsc); | |||
320 | static inline void cpufreq_delayed_get(void) { return; } | 320 | static inline void cpufreq_delayed_get(void) { return; } |
321 | #endif | 321 | #endif |
322 | 322 | ||
323 | int recalibrate_cpu_khz(void) | ||
324 | { | ||
325 | #ifndef CONFIG_SMP | ||
326 | unsigned long cpu_khz_old = cpu_khz; | ||
327 | |||
328 | if (cpu_has_tsc) { | ||
329 | init_cpu_khz(); | ||
330 | cpu_data[0].loops_per_jiffy = | ||
331 | cpufreq_scale(cpu_data[0].loops_per_jiffy, | ||
332 | cpu_khz_old, | ||
333 | cpu_khz); | ||
334 | return 0; | ||
335 | } else | ||
336 | return -ENODEV; | ||
337 | #else | ||
338 | return -ENODEV; | ||
339 | #endif | ||
340 | } | ||
341 | EXPORT_SYMBOL(recalibrate_cpu_khz); | ||
342 | |||
323 | static void mark_offset_tsc(void) | 343 | static void mark_offset_tsc(void) |
324 | { | 344 | { |
325 | unsigned long lost,delay; | 345 | unsigned long lost,delay; |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 247a21c64aea..c1e20d65dd6c 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -2427,7 +2427,7 @@ sys32_epoll_wait(int epfd, struct epoll_event32 __user * events, int maxevents, | |||
2427 | { | 2427 | { |
2428 | struct epoll_event *events64 = NULL; | 2428 | struct epoll_event *events64 = NULL; |
2429 | mm_segment_t old_fs = get_fs(); | 2429 | mm_segment_t old_fs = get_fs(); |
2430 | int error, numevents, size; | 2430 | int numevents, size; |
2431 | int evt_idx; | 2431 | int evt_idx; |
2432 | int do_free_pages = 0; | 2432 | int do_free_pages = 0; |
2433 | 2433 | ||
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index 81c45d447394..d99316c9be28 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -1182,7 +1182,7 @@ ENTRY(notify_resume_user) | |||
1182 | ;; | 1182 | ;; |
1183 | (pNonSys) mov out2=0 // out2==0 => not a syscall | 1183 | (pNonSys) mov out2=0 // out2==0 => not a syscall |
1184 | .fframe 16 | 1184 | .fframe 16 |
1185 | .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) | 1185 | .spillsp ar.unat, 16 |
1186 | st8 [sp]=r9,-16 // allocate space for ar.unat and save it | 1186 | st8 [sp]=r9,-16 // allocate space for ar.unat and save it |
1187 | st8 [out1]=loc1,-8 // save ar.pfs, out1=&sigscratch | 1187 | st8 [out1]=loc1,-8 // save ar.pfs, out1=&sigscratch |
1188 | .body | 1188 | .body |
@@ -1208,7 +1208,7 @@ GLOBAL_ENTRY(sys_rt_sigsuspend) | |||
1208 | adds out2=8,sp // out2=&sigscratch->ar_pfs | 1208 | adds out2=8,sp // out2=&sigscratch->ar_pfs |
1209 | ;; | 1209 | ;; |
1210 | .fframe 16 | 1210 | .fframe 16 |
1211 | .spillpsp ar.unat, 16 // (note that offset is relative to psp+0x10!) | 1211 | .spillsp ar.unat, 16 |
1212 | st8 [sp]=r9,-16 // allocate space for ar.unat and save it | 1212 | st8 [sp]=r9,-16 // allocate space for ar.unat and save it |
1213 | st8 [out2]=loc1,-8 // save ar.pfs, out2=&sigscratch | 1213 | st8 [out2]=loc1,-8 // save ar.pfs, out2=&sigscratch |
1214 | .body | 1214 | .body |
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index 4f3cdef75797..962b6c4e32b5 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -460,9 +460,9 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set | |||
460 | ;; | 460 | ;; |
461 | 461 | ||
462 | st8 [r2]=r14 // update current->blocked with new mask | 462 | st8 [r2]=r14 // update current->blocked with new mask |
463 | cmpxchg4.acq r14=[r9],r18,ar.ccv // current->thread_info->flags <- r18 | 463 | cmpxchg4.acq r8=[r9],r18,ar.ccv // current->thread_info->flags <- r18 |
464 | ;; | 464 | ;; |
465 | cmp.ne p6,p0=r17,r14 // update failed? | 465 | cmp.ne p6,p0=r17,r8 // update failed? |
466 | (p6) br.cond.spnt.few 1b // yes -> retry | 466 | (p6) br.cond.spnt.few 1b // yes -> retry |
467 | 467 | ||
468 | #ifdef CONFIG_SMP | 468 | #ifdef CONFIG_SMP |
diff --git a/arch/ia64/kernel/mca.c b/arch/ia64/kernel/mca.c index 4d6c7b8f667b..736e328b5e61 100644 --- a/arch/ia64/kernel/mca.c +++ b/arch/ia64/kernel/mca.c | |||
@@ -1103,8 +1103,6 @@ ia64_mca_cpe_int_caller(int cpe_irq, void *arg, struct pt_regs *ptregs) | |||
1103 | return IRQ_HANDLED; | 1103 | return IRQ_HANDLED; |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | #endif /* CONFIG_ACPI */ | ||
1107 | |||
1108 | /* | 1106 | /* |
1109 | * ia64_mca_cpe_poll | 1107 | * ia64_mca_cpe_poll |
1110 | * | 1108 | * |
@@ -1122,6 +1120,8 @@ ia64_mca_cpe_poll (unsigned long dummy) | |||
1122 | platform_send_ipi(first_cpu(cpu_online_map), IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0); | 1120 | platform_send_ipi(first_cpu(cpu_online_map), IA64_CPEP_VECTOR, IA64_IPI_DM_INT, 0); |
1123 | } | 1121 | } |
1124 | 1122 | ||
1123 | #endif /* CONFIG_ACPI */ | ||
1124 | |||
1125 | /* | 1125 | /* |
1126 | * C portion of the OS INIT handler | 1126 | * C portion of the OS INIT handler |
1127 | * | 1127 | * |
@@ -1390,8 +1390,7 @@ ia64_mca_init(void) | |||
1390 | register_percpu_irq(IA64_MCA_WAKEUP_VECTOR, &mca_wkup_irqaction); | 1390 | register_percpu_irq(IA64_MCA_WAKEUP_VECTOR, &mca_wkup_irqaction); |
1391 | 1391 | ||
1392 | #ifdef CONFIG_ACPI | 1392 | #ifdef CONFIG_ACPI |
1393 | /* Setup the CPEI/P vector and handler */ | 1393 | /* Setup the CPEI/P handler */ |
1394 | cpe_vector = acpi_request_vector(ACPI_INTERRUPT_CPEI); | ||
1395 | register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction); | 1394 | register_percpu_irq(IA64_CPEP_VECTOR, &mca_cpep_irqaction); |
1396 | #endif | 1395 | #endif |
1397 | 1396 | ||
@@ -1436,6 +1435,7 @@ ia64_mca_late_init(void) | |||
1436 | 1435 | ||
1437 | #ifdef CONFIG_ACPI | 1436 | #ifdef CONFIG_ACPI |
1438 | /* Setup the CPEI/P vector and handler */ | 1437 | /* Setup the CPEI/P vector and handler */ |
1438 | cpe_vector = acpi_request_vector(ACPI_INTERRUPT_CPEI); | ||
1439 | init_timer(&cpe_poll_timer); | 1439 | init_timer(&cpe_poll_timer); |
1440 | cpe_poll_timer.function = ia64_mca_cpe_poll; | 1440 | cpe_poll_timer.function = ia64_mca_cpe_poll; |
1441 | 1441 | ||
diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h index 1dbc7b2497c9..f6d8a010d99b 100644 --- a/arch/ia64/kernel/minstate.h +++ b/arch/ia64/kernel/minstate.h | |||
@@ -41,7 +41,7 @@ | |||
41 | (pKStk) addl r3=THIS_CPU(ia64_mca_data),r3;; \ | 41 | (pKStk) addl r3=THIS_CPU(ia64_mca_data),r3;; \ |
42 | (pKStk) ld8 r3 = [r3];; \ | 42 | (pKStk) ld8 r3 = [r3];; \ |
43 | (pKStk) addl r3=IA64_MCA_CPU_INIT_STACK_OFFSET,r3;; \ | 43 | (pKStk) addl r3=IA64_MCA_CPU_INIT_STACK_OFFSET,r3;; \ |
44 | (pKStk) addl sp=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r3; \ | 44 | (pKStk) addl r1=IA64_STK_OFFSET-IA64_PT_REGS_SIZE,r3; \ |
45 | (pUStk) mov ar.rsc=0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ | 45 | (pUStk) mov ar.rsc=0; /* set enforced lazy mode, pl 0, little-endian, loadrs=0 */ \ |
46 | (pUStk) addl r22=IA64_RBS_OFFSET,r1; /* compute base of register backing store */ \ | 46 | (pUStk) addl r22=IA64_RBS_OFFSET,r1; /* compute base of register backing store */ \ |
47 | ;; \ | 47 | ;; \ |
@@ -50,7 +50,6 @@ | |||
50 | (pUStk) mov r23=ar.bspstore; /* save ar.bspstore */ \ | 50 | (pUStk) mov r23=ar.bspstore; /* save ar.bspstore */ \ |
51 | (pUStk) dep r22=-1,r22,61,3; /* compute kernel virtual addr of RBS */ \ | 51 | (pUStk) dep r22=-1,r22,61,3; /* compute kernel virtual addr of RBS */ \ |
52 | ;; \ | 52 | ;; \ |
53 | (pKStk) addl r1=-IA64_PT_REGS_SIZE,r1; /* if in kernel mode, use sp (r12) */ \ | ||
54 | (pUStk) mov ar.bspstore=r22; /* switch to kernel RBS */ \ | 53 | (pUStk) mov ar.bspstore=r22; /* switch to kernel RBS */ \ |
55 | ;; \ | 54 | ;; \ |
56 | (pUStk) mov r18=ar.bsp; \ | 55 | (pUStk) mov r18=ar.bsp; \ |
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index febc091c2f02..f1aca7cffd12 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c | |||
@@ -825,14 +825,16 @@ apply_relocate_add (Elf64_Shdr *sechdrs, const char *strtab, unsigned int symind | |||
825 | * XXX Should have an arch-hook for running this after final section | 825 | * XXX Should have an arch-hook for running this after final section |
826 | * addresses have been selected... | 826 | * addresses have been selected... |
827 | */ | 827 | */ |
828 | /* See if gp can cover the entire core module: */ | 828 | uint64_t gp; |
829 | uint64_t gp = (uint64_t) mod->module_core + MAX_LTOFF / 2; | 829 | if (mod->core_size > MAX_LTOFF) |
830 | if (mod->core_size >= MAX_LTOFF) | ||
831 | /* | 830 | /* |
832 | * This takes advantage of fact that SHF_ARCH_SMALL gets allocated | 831 | * This takes advantage of fact that SHF_ARCH_SMALL gets allocated |
833 | * at the end of the module. | 832 | * at the end of the module. |
834 | */ | 833 | */ |
835 | gp = (uint64_t) mod->module_core + mod->core_size - MAX_LTOFF / 2; | 834 | gp = mod->core_size - MAX_LTOFF / 2; |
835 | else | ||
836 | gp = mod->core_size / 2; | ||
837 | gp = (uint64_t) mod->module_core + ((gp + 7) & -8); | ||
836 | mod->arch.gp = gp; | 838 | mod->arch.gp = gp; |
837 | DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp); | 839 | DEBUGP("%s: placing gp at 0x%lx\n", __FUNCTION__, gp); |
838 | } | 840 | } |
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index 71c101601e3e..6407bff6bfd7 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * Version Perfmon-2.x is a rewrite of perfmon-1.x | 11 | * Version Perfmon-2.x is a rewrite of perfmon-1.x |
12 | * by Stephane Eranian, Hewlett Packard Co. | 12 | * by Stephane Eranian, Hewlett Packard Co. |
13 | * | 13 | * |
14 | * Copyright (C) 1999-2003, 2005 Hewlett Packard Co | 14 | * Copyright (C) 1999-2005 Hewlett Packard Co |
15 | * Stephane Eranian <eranian@hpl.hp.com> | 15 | * Stephane Eranian <eranian@hpl.hp.com> |
16 | * David Mosberger-Tang <davidm@hpl.hp.com> | 16 | * David Mosberger-Tang <davidm@hpl.hp.com> |
17 | * | 17 | * |
@@ -497,6 +497,9 @@ typedef struct { | |||
497 | static pfm_stats_t pfm_stats[NR_CPUS]; | 497 | static pfm_stats_t pfm_stats[NR_CPUS]; |
498 | static pfm_session_t pfm_sessions; /* global sessions information */ | 498 | static pfm_session_t pfm_sessions; /* global sessions information */ |
499 | 499 | ||
500 | static spinlock_t pfm_alt_install_check = SPIN_LOCK_UNLOCKED; | ||
501 | static pfm_intr_handler_desc_t *pfm_alt_intr_handler; | ||
502 | |||
500 | static struct proc_dir_entry *perfmon_dir; | 503 | static struct proc_dir_entry *perfmon_dir; |
501 | static pfm_uuid_t pfm_null_uuid = {0,}; | 504 | static pfm_uuid_t pfm_null_uuid = {0,}; |
502 | 505 | ||
@@ -606,6 +609,7 @@ DEFINE_PER_CPU(unsigned long, pfm_syst_info); | |||
606 | DEFINE_PER_CPU(struct task_struct *, pmu_owner); | 609 | DEFINE_PER_CPU(struct task_struct *, pmu_owner); |
607 | DEFINE_PER_CPU(pfm_context_t *, pmu_ctx); | 610 | DEFINE_PER_CPU(pfm_context_t *, pmu_ctx); |
608 | DEFINE_PER_CPU(unsigned long, pmu_activation_number); | 611 | DEFINE_PER_CPU(unsigned long, pmu_activation_number); |
612 | EXPORT_PER_CPU_SYMBOL_GPL(pfm_syst_info); | ||
609 | 613 | ||
610 | 614 | ||
611 | /* forward declaration */ | 615 | /* forward declaration */ |
@@ -1325,7 +1329,7 @@ pfm_reserve_session(struct task_struct *task, int is_syswide, unsigned int cpu) | |||
1325 | error_conflict: | 1329 | error_conflict: |
1326 | DPRINT(("system wide not possible, conflicting session [%d] on CPU%d\n", | 1330 | DPRINT(("system wide not possible, conflicting session [%d] on CPU%d\n", |
1327 | pfm_sessions.pfs_sys_session[cpu]->pid, | 1331 | pfm_sessions.pfs_sys_session[cpu]->pid, |
1328 | smp_processor_id())); | 1332 | cpu)); |
1329 | abort: | 1333 | abort: |
1330 | UNLOCK_PFS(flags); | 1334 | UNLOCK_PFS(flags); |
1331 | 1335 | ||
@@ -5555,26 +5559,32 @@ pfm_interrupt_handler(int irq, void *arg, struct pt_regs *regs) | |||
5555 | int ret; | 5559 | int ret; |
5556 | 5560 | ||
5557 | this_cpu = get_cpu(); | 5561 | this_cpu = get_cpu(); |
5558 | min = pfm_stats[this_cpu].pfm_ovfl_intr_cycles_min; | 5562 | if (likely(!pfm_alt_intr_handler)) { |
5559 | max = pfm_stats[this_cpu].pfm_ovfl_intr_cycles_max; | 5563 | min = pfm_stats[this_cpu].pfm_ovfl_intr_cycles_min; |
5564 | max = pfm_stats[this_cpu].pfm_ovfl_intr_cycles_max; | ||
5560 | 5565 | ||
5561 | start_cycles = ia64_get_itc(); | 5566 | start_cycles = ia64_get_itc(); |
5562 | 5567 | ||
5563 | ret = pfm_do_interrupt_handler(irq, arg, regs); | 5568 | ret = pfm_do_interrupt_handler(irq, arg, regs); |
5564 | 5569 | ||
5565 | total_cycles = ia64_get_itc(); | 5570 | total_cycles = ia64_get_itc(); |
5566 | 5571 | ||
5567 | /* | 5572 | /* |
5568 | * don't measure spurious interrupts | 5573 | * don't measure spurious interrupts |
5569 | */ | 5574 | */ |
5570 | if (likely(ret == 0)) { | 5575 | if (likely(ret == 0)) { |
5571 | total_cycles -= start_cycles; | 5576 | total_cycles -= start_cycles; |
5572 | 5577 | ||
5573 | if (total_cycles < min) pfm_stats[this_cpu].pfm_ovfl_intr_cycles_min = total_cycles; | 5578 | if (total_cycles < min) pfm_stats[this_cpu].pfm_ovfl_intr_cycles_min = total_cycles; |
5574 | if (total_cycles > max) pfm_stats[this_cpu].pfm_ovfl_intr_cycles_max = total_cycles; | 5579 | if (total_cycles > max) pfm_stats[this_cpu].pfm_ovfl_intr_cycles_max = total_cycles; |
5575 | 5580 | ||
5576 | pfm_stats[this_cpu].pfm_ovfl_intr_cycles += total_cycles; | 5581 | pfm_stats[this_cpu].pfm_ovfl_intr_cycles += total_cycles; |
5582 | } | ||
5583 | } | ||
5584 | else { | ||
5585 | (*pfm_alt_intr_handler->handler)(irq, arg, regs); | ||
5577 | } | 5586 | } |
5587 | |||
5578 | put_cpu_no_resched(); | 5588 | put_cpu_no_resched(); |
5579 | return IRQ_HANDLED; | 5589 | return IRQ_HANDLED; |
5580 | } | 5590 | } |
@@ -6425,6 +6435,141 @@ static struct irqaction perfmon_irqaction = { | |||
6425 | .name = "perfmon" | 6435 | .name = "perfmon" |
6426 | }; | 6436 | }; |
6427 | 6437 | ||
6438 | static void | ||
6439 | pfm_alt_save_pmu_state(void *data) | ||
6440 | { | ||
6441 | struct pt_regs *regs; | ||
6442 | |||
6443 | regs = ia64_task_regs(current); | ||
6444 | |||
6445 | DPRINT(("called\n")); | ||
6446 | |||
6447 | /* | ||
6448 | * should not be necessary but | ||
6449 | * let's take not risk | ||
6450 | */ | ||
6451 | pfm_clear_psr_up(); | ||
6452 | pfm_clear_psr_pp(); | ||
6453 | ia64_psr(regs)->pp = 0; | ||
6454 | |||
6455 | /* | ||
6456 | * This call is required | ||
6457 | * May cause a spurious interrupt on some processors | ||
6458 | */ | ||
6459 | pfm_freeze_pmu(); | ||
6460 | |||
6461 | ia64_srlz_d(); | ||
6462 | } | ||
6463 | |||
6464 | void | ||
6465 | pfm_alt_restore_pmu_state(void *data) | ||
6466 | { | ||
6467 | struct pt_regs *regs; | ||
6468 | |||
6469 | regs = ia64_task_regs(current); | ||
6470 | |||
6471 | DPRINT(("called\n")); | ||
6472 | |||
6473 | /* | ||
6474 | * put PMU back in state expected | ||
6475 | * by perfmon | ||
6476 | */ | ||
6477 | pfm_clear_psr_up(); | ||
6478 | pfm_clear_psr_pp(); | ||
6479 | ia64_psr(regs)->pp = 0; | ||
6480 | |||
6481 | /* | ||
6482 | * perfmon runs with PMU unfrozen at all times | ||
6483 | */ | ||
6484 | pfm_unfreeze_pmu(); | ||
6485 | |||
6486 | ia64_srlz_d(); | ||
6487 | } | ||
6488 | |||
6489 | int | ||
6490 | pfm_install_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl) | ||
6491 | { | ||
6492 | int ret, i; | ||
6493 | int reserve_cpu; | ||
6494 | |||
6495 | /* some sanity checks */ | ||
6496 | if (hdl == NULL || hdl->handler == NULL) return -EINVAL; | ||
6497 | |||
6498 | /* do the easy test first */ | ||
6499 | if (pfm_alt_intr_handler) return -EBUSY; | ||
6500 | |||
6501 | /* one at a time in the install or remove, just fail the others */ | ||
6502 | if (!spin_trylock(&pfm_alt_install_check)) { | ||
6503 | return -EBUSY; | ||
6504 | } | ||
6505 | |||
6506 | /* reserve our session */ | ||
6507 | for_each_online_cpu(reserve_cpu) { | ||
6508 | ret = pfm_reserve_session(NULL, 1, reserve_cpu); | ||
6509 | if (ret) goto cleanup_reserve; | ||
6510 | } | ||
6511 | |||
6512 | /* save the current system wide pmu states */ | ||
6513 | ret = on_each_cpu(pfm_alt_save_pmu_state, NULL, 0, 1); | ||
6514 | if (ret) { | ||
6515 | DPRINT(("on_each_cpu() failed: %d\n", ret)); | ||
6516 | goto cleanup_reserve; | ||
6517 | } | ||
6518 | |||
6519 | /* officially change to the alternate interrupt handler */ | ||
6520 | pfm_alt_intr_handler = hdl; | ||
6521 | |||
6522 | spin_unlock(&pfm_alt_install_check); | ||
6523 | |||
6524 | return 0; | ||
6525 | |||
6526 | cleanup_reserve: | ||
6527 | for_each_online_cpu(i) { | ||
6528 | /* don't unreserve more than we reserved */ | ||
6529 | if (i >= reserve_cpu) break; | ||
6530 | |||
6531 | pfm_unreserve_session(NULL, 1, i); | ||
6532 | } | ||
6533 | |||
6534 | spin_unlock(&pfm_alt_install_check); | ||
6535 | |||
6536 | return ret; | ||
6537 | } | ||
6538 | EXPORT_SYMBOL_GPL(pfm_install_alt_pmu_interrupt); | ||
6539 | |||
6540 | int | ||
6541 | pfm_remove_alt_pmu_interrupt(pfm_intr_handler_desc_t *hdl) | ||
6542 | { | ||
6543 | int i; | ||
6544 | int ret; | ||
6545 | |||
6546 | if (hdl == NULL) return -EINVAL; | ||
6547 | |||
6548 | /* cannot remove someone else's handler! */ | ||
6549 | if (pfm_alt_intr_handler != hdl) return -EINVAL; | ||
6550 | |||
6551 | /* one at a time in the install or remove, just fail the others */ | ||
6552 | if (!spin_trylock(&pfm_alt_install_check)) { | ||
6553 | return -EBUSY; | ||
6554 | } | ||
6555 | |||
6556 | pfm_alt_intr_handler = NULL; | ||
6557 | |||
6558 | ret = on_each_cpu(pfm_alt_restore_pmu_state, NULL, 0, 1); | ||
6559 | if (ret) { | ||
6560 | DPRINT(("on_each_cpu() failed: %d\n", ret)); | ||
6561 | } | ||
6562 | |||
6563 | for_each_online_cpu(i) { | ||
6564 | pfm_unreserve_session(NULL, 1, i); | ||
6565 | } | ||
6566 | |||
6567 | spin_unlock(&pfm_alt_install_check); | ||
6568 | |||
6569 | return 0; | ||
6570 | } | ||
6571 | EXPORT_SYMBOL_GPL(pfm_remove_alt_pmu_interrupt); | ||
6572 | |||
6428 | /* | 6573 | /* |
6429 | * perfmon initialization routine, called from the initcall() table | 6574 | * perfmon initialization routine, called from the initcall() table |
6430 | */ | 6575 | */ |
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c index 907464ee7273..575a8f657b31 100644 --- a/arch/ia64/kernel/ptrace.c +++ b/arch/ia64/kernel/ptrace.c | |||
@@ -635,11 +635,17 @@ ia64_flush_fph (struct task_struct *task) | |||
635 | { | 635 | { |
636 | struct ia64_psr *psr = ia64_psr(ia64_task_regs(task)); | 636 | struct ia64_psr *psr = ia64_psr(ia64_task_regs(task)); |
637 | 637 | ||
638 | /* | ||
639 | * Prevent migrating this task while | ||
640 | * we're fiddling with the FPU state | ||
641 | */ | ||
642 | preempt_disable(); | ||
638 | if (ia64_is_local_fpu_owner(task) && psr->mfh) { | 643 | if (ia64_is_local_fpu_owner(task) && psr->mfh) { |
639 | psr->mfh = 0; | 644 | psr->mfh = 0; |
640 | task->thread.flags |= IA64_THREAD_FPH_VALID; | 645 | task->thread.flags |= IA64_THREAD_FPH_VALID; |
641 | ia64_save_fpu(&task->thread.fph[0]); | 646 | ia64_save_fpu(&task->thread.fph[0]); |
642 | } | 647 | } |
648 | preempt_enable(); | ||
643 | } | 649 | } |
644 | 650 | ||
645 | /* | 651 | /* |
@@ -692,16 +698,30 @@ convert_to_non_syscall (struct task_struct *child, struct pt_regs *pt, | |||
692 | unsigned long cfm) | 698 | unsigned long cfm) |
693 | { | 699 | { |
694 | struct unw_frame_info info, prev_info; | 700 | struct unw_frame_info info, prev_info; |
695 | unsigned long ip, pr; | 701 | unsigned long ip, sp, pr; |
696 | 702 | ||
697 | unw_init_from_blocked_task(&info, child); | 703 | unw_init_from_blocked_task(&info, child); |
698 | while (1) { | 704 | while (1) { |
699 | prev_info = info; | 705 | prev_info = info; |
700 | if (unw_unwind(&info) < 0) | 706 | if (unw_unwind(&info) < 0) |
701 | return; | 707 | return; |
702 | if (unw_get_rp(&info, &ip) < 0) | 708 | |
709 | unw_get_sp(&info, &sp); | ||
710 | if ((long)((unsigned long)child + IA64_STK_OFFSET - sp) | ||
711 | < IA64_PT_REGS_SIZE) { | ||
712 | dprintk("ptrace.%s: ran off the top of the kernel " | ||
713 | "stack\n", __FUNCTION__); | ||
714 | return; | ||
715 | } | ||
716 | if (unw_get_pr (&prev_info, &pr) < 0) { | ||
717 | unw_get_rp(&prev_info, &ip); | ||
718 | dprintk("ptrace.%s: failed to read " | ||
719 | "predicate register (ip=0x%lx)\n", | ||
720 | __FUNCTION__, ip); | ||
703 | return; | 721 | return; |
704 | if (ip < FIXADDR_USER_END) | 722 | } |
723 | if (unw_is_intr_frame(&info) | ||
724 | && (pr & (1UL << PRED_USER_STACK))) | ||
705 | break; | 725 | break; |
706 | } | 726 | } |
707 | 727 | ||
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index b7e6b4cb374b..d14692e0920a 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -720,7 +720,8 @@ cpu_init (void) | |||
720 | ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page))); | 720 | ia64_set_kr(IA64_KR_PT_BASE, __pa(ia64_imva(empty_zero_page))); |
721 | 721 | ||
722 | /* | 722 | /* |
723 | * Initialize default control register to defer all speculative faults. The | 723 | * Initialize default control register to defer speculative faults except |
724 | * for those arising from TLB misses, which are not deferred. The | ||
724 | * kernel MUST NOT depend on a particular setting of these bits (in other words, | 725 | * kernel MUST NOT depend on a particular setting of these bits (in other words, |
725 | * the kernel must have recovery code for all speculative accesses). Turn on | 726 | * the kernel must have recovery code for all speculative accesses). Turn on |
726 | * dcr.lc as per recommendation by the architecture team. Most IA-32 apps | 727 | * dcr.lc as per recommendation by the architecture team. Most IA-32 apps |
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 0d5ee57c9865..3865f088ffa2 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -624,7 +624,7 @@ static struct { | |||
624 | __u16 thread_id; | 624 | __u16 thread_id; |
625 | __u16 proc_fixed_addr; | 625 | __u16 proc_fixed_addr; |
626 | __u8 valid; | 626 | __u8 valid; |
627 | }mt_info[NR_CPUS] __devinit; | 627 | } mt_info[NR_CPUS] __devinitdata; |
628 | 628 | ||
629 | #ifdef CONFIG_HOTPLUG_CPU | 629 | #ifdef CONFIG_HOTPLUG_CPU |
630 | static inline void | 630 | static inline void |
diff --git a/arch/ia64/kernel/sys_ia64.c b/arch/ia64/kernel/sys_ia64.c index a8cf6d8a509c..770fab37928e 100644 --- a/arch/ia64/kernel/sys_ia64.c +++ b/arch/ia64/kernel/sys_ia64.c | |||
@@ -182,13 +182,6 @@ do_mmap2 (unsigned long addr, unsigned long len, int prot, int flags, int fd, un | |||
182 | } | 182 | } |
183 | } | 183 | } |
184 | 184 | ||
185 | /* | ||
186 | * A zero mmap always succeeds in Linux, independent of whether or not the | ||
187 | * remaining arguments are valid. | ||
188 | */ | ||
189 | if (len == 0) | ||
190 | goto out; | ||
191 | |||
192 | /* Careful about overflows.. */ | 185 | /* Careful about overflows.. */ |
193 | len = PAGE_ALIGN(len); | 186 | len = PAGE_ALIGN(len); |
194 | if (!len || len > TASK_SIZE) { | 187 | if (!len || len > TASK_SIZE) { |
diff --git a/arch/ia64/kernel/traps.c b/arch/ia64/kernel/traps.c index e82ad78081b3..1861173bd4f6 100644 --- a/arch/ia64/kernel/traps.c +++ b/arch/ia64/kernel/traps.c | |||
@@ -111,6 +111,24 @@ ia64_bad_break (unsigned long break_num, struct pt_regs *regs) | |||
111 | siginfo_t siginfo; | 111 | siginfo_t siginfo; |
112 | int sig, code; | 112 | int sig, code; |
113 | 113 | ||
114 | /* break.b always sets cr.iim to 0, which causes problems for | ||
115 | * debuggers. Get the real break number from the original instruction, | ||
116 | * but only for kernel code. User space break.b is left alone, to | ||
117 | * preserve the existing behaviour. All break codings have the same | ||
118 | * format, so there is no need to check the slot type. | ||
119 | */ | ||
120 | if (break_num == 0 && !user_mode(regs)) { | ||
121 | struct ia64_psr *ipsr = ia64_psr(regs); | ||
122 | unsigned long *bundle = (unsigned long *)regs->cr_iip; | ||
123 | unsigned long slot; | ||
124 | switch (ipsr->ri) { | ||
125 | case 0: slot = (bundle[0] >> 5); break; | ||
126 | case 1: slot = (bundle[0] >> 46) | (bundle[1] << 18); break; | ||
127 | default: slot = (bundle[1] >> 23); break; | ||
128 | } | ||
129 | break_num = ((slot >> 36 & 1) << 20) | (slot >> 6 & 0xfffff); | ||
130 | } | ||
131 | |||
114 | /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ | 132 | /* SIGILL, SIGFPE, SIGSEGV, and SIGBUS want these field initialized: */ |
115 | siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); | 133 | siginfo.si_addr = (void __user *) (regs->cr_iip + ia64_psr(regs)->ri); |
116 | siginfo.si_imm = break_num; | 134 | siginfo.si_imm = break_num; |
@@ -202,13 +220,21 @@ disabled_fph_fault (struct pt_regs *regs) | |||
202 | 220 | ||
203 | /* first, grant user-level access to fph partition: */ | 221 | /* first, grant user-level access to fph partition: */ |
204 | psr->dfh = 0; | 222 | psr->dfh = 0; |
223 | |||
224 | /* | ||
225 | * Make sure that no other task gets in on this processor | ||
226 | * while we're claiming the FPU | ||
227 | */ | ||
228 | preempt_disable(); | ||
205 | #ifndef CONFIG_SMP | 229 | #ifndef CONFIG_SMP |
206 | { | 230 | { |
207 | struct task_struct *fpu_owner | 231 | struct task_struct *fpu_owner |
208 | = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER); | 232 | = (struct task_struct *)ia64_get_kr(IA64_KR_FPU_OWNER); |
209 | 233 | ||
210 | if (ia64_is_local_fpu_owner(current)) | 234 | if (ia64_is_local_fpu_owner(current)) { |
235 | preempt_enable_no_resched(); | ||
211 | return; | 236 | return; |
237 | } | ||
212 | 238 | ||
213 | if (fpu_owner) | 239 | if (fpu_owner) |
214 | ia64_flush_fph(fpu_owner); | 240 | ia64_flush_fph(fpu_owner); |
@@ -226,6 +252,7 @@ disabled_fph_fault (struct pt_regs *regs) | |||
226 | */ | 252 | */ |
227 | psr->mfh = 1; | 253 | psr->mfh = 1; |
228 | } | 254 | } |
255 | preempt_enable_no_resched(); | ||
229 | } | 256 | } |
230 | 257 | ||
231 | static inline int | 258 | static inline int |
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 547785e3cba2..4eb2f52b87a1 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -305,8 +305,9 @@ setup_gate (void) | |||
305 | struct page *page; | 305 | struct page *page; |
306 | 306 | ||
307 | /* | 307 | /* |
308 | * Map the gate page twice: once read-only to export the ELF headers etc. and once | 308 | * Map the gate page twice: once read-only to export the ELF |
309 | * execute-only page to enable privilege-promotion via "epc": | 309 | * headers etc. and once execute-only page to enable |
310 | * privilege-promotion via "epc": | ||
310 | */ | 311 | */ |
311 | page = virt_to_page(ia64_imva(__start_gate_section)); | 312 | page = virt_to_page(ia64_imva(__start_gate_section)); |
312 | put_kernel_page(page, GATE_ADDR, PAGE_READONLY); | 313 | put_kernel_page(page, GATE_ADDR, PAGE_READONLY); |
@@ -315,6 +316,20 @@ setup_gate (void) | |||
315 | put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); | 316 | put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); |
316 | #else | 317 | #else |
317 | put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); | 318 | put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); |
319 | /* Fill in the holes (if any) with read-only zero pages: */ | ||
320 | { | ||
321 | unsigned long addr; | ||
322 | |||
323 | for (addr = GATE_ADDR + PAGE_SIZE; | ||
324 | addr < GATE_ADDR + PERCPU_PAGE_SIZE; | ||
325 | addr += PAGE_SIZE) | ||
326 | { | ||
327 | put_kernel_page(ZERO_PAGE(0), addr, | ||
328 | PAGE_READONLY); | ||
329 | put_kernel_page(ZERO_PAGE(0), addr + PERCPU_PAGE_SIZE, | ||
330 | PAGE_READONLY); | ||
331 | } | ||
332 | } | ||
318 | #endif | 333 | #endif |
319 | ia64_patch_gate(); | 334 | ia64_patch_gate(); |
320 | } | 335 | } |
diff --git a/arch/ia64/sn/kernel/setup.c b/arch/ia64/sn/kernel/setup.c index 4fb44984afe6..44bfc7f318cb 100644 --- a/arch/ia64/sn/kernel/setup.c +++ b/arch/ia64/sn/kernel/setup.c | |||
@@ -222,7 +222,7 @@ void __init early_sn_setup(void) | |||
222 | 222 | ||
223 | extern int platform_intr_list[]; | 223 | extern int platform_intr_list[]; |
224 | extern nasid_t master_nasid; | 224 | extern nasid_t master_nasid; |
225 | static int shub_1_1_found __initdata; | 225 | static int __initdata shub_1_1_found = 0; |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * sn_check_for_wars | 228 | * sn_check_for_wars |
@@ -251,7 +251,7 @@ static void __init sn_check_for_wars(void) | |||
251 | } else { | 251 | } else { |
252 | for_each_online_node(cnode) { | 252 | for_each_online_node(cnode) { |
253 | if (is_shub_1_1(cnodeid_to_nasid(cnode))) | 253 | if (is_shub_1_1(cnodeid_to_nasid(cnode))) |
254 | sn_hub_info->shub_1_1_found = 1; | 254 | shub_1_1_found = 1; |
255 | } | 255 | } |
256 | } | 256 | } |
257 | } | 257 | } |
@@ -271,6 +271,8 @@ void __init sn_setup(char **cmdline_p) | |||
271 | int major = sn_sal_rev_major(), minor = sn_sal_rev_minor(); | 271 | int major = sn_sal_rev_major(), minor = sn_sal_rev_minor(); |
272 | extern void sn_cpu_init(void); | 272 | extern void sn_cpu_init(void); |
273 | 273 | ||
274 | ia64_sn_plat_set_error_handling_features(); | ||
275 | |||
274 | /* | 276 | /* |
275 | * If the generic code has enabled vga console support - lets | 277 | * If the generic code has enabled vga console support - lets |
276 | * get rid of it again. This is a kludge for the fact that ACPI | 278 | * get rid of it again. This is a kludge for the fact that ACPI |
diff --git a/arch/ia64/sn/kernel/tiocx.c b/arch/ia64/sn/kernel/tiocx.c index ab9b5f35c2a7..a087b274847e 100644 --- a/arch/ia64/sn/kernel/tiocx.c +++ b/arch/ia64/sn/kernel/tiocx.c | |||
@@ -432,7 +432,7 @@ static int tiocx_reload(struct cx_dev *cx_dev) | |||
432 | return cx_device_reload(cx_dev); | 432 | return cx_device_reload(cx_dev); |
433 | } | 433 | } |
434 | 434 | ||
435 | static ssize_t show_cxdev_control(struct device *dev, char *buf) | 435 | static ssize_t show_cxdev_control(struct device *dev, struct device_attribute *attr, char *buf) |
436 | { | 436 | { |
437 | struct cx_dev *cx_dev = to_cx_dev(dev); | 437 | struct cx_dev *cx_dev = to_cx_dev(dev); |
438 | 438 | ||
@@ -442,7 +442,7 @@ static ssize_t show_cxdev_control(struct device *dev, char *buf) | |||
442 | tiocx_btchar_get(cx_dev->cx_id.nasid)); | 442 | tiocx_btchar_get(cx_dev->cx_id.nasid)); |
443 | } | 443 | } |
444 | 444 | ||
445 | static ssize_t store_cxdev_control(struct device *dev, const char *buf, | 445 | static ssize_t store_cxdev_control(struct device *dev, struct device_attribute *attr, const char *buf, |
446 | size_t count) | 446 | size_t count) |
447 | { | 447 | { |
448 | int n; | 448 | int n; |
@@ -518,25 +518,22 @@ static int __init tiocx_init(void) | |||
518 | return 0; | 518 | return 0; |
519 | } | 519 | } |
520 | 520 | ||
521 | static void __exit tiocx_exit(void) | 521 | static int cx_remove_device(struct device * dev, void * data) |
522 | { | 522 | { |
523 | struct device *dev; | 523 | struct cx_dev *cx_dev = to_cx_dev(dev); |
524 | struct device *tdev; | 524 | device_remove_file(dev, &dev_attr_cxdev_control); |
525 | cx_device_unregister(cx_dev); | ||
526 | return 0; | ||
527 | } | ||
525 | 528 | ||
529 | static void __exit tiocx_exit(void) | ||
530 | { | ||
526 | DBG("tiocx_exit\n"); | 531 | DBG("tiocx_exit\n"); |
527 | 532 | ||
528 | /* | 533 | /* |
529 | * Unregister devices. | 534 | * Unregister devices. |
530 | */ | 535 | */ |
531 | list_for_each_entry_safe(dev, tdev, &tiocx_bus_type.devices.list, | 536 | bus_for_each_dev(&tiocx_bus_type, NULL, NULL, cx_remove_device); |
532 | bus_list) { | ||
533 | if (dev) { | ||
534 | struct cx_dev *cx_dev = to_cx_dev(dev); | ||
535 | device_remove_file(dev, &dev_attr_cxdev_control); | ||
536 | cx_device_unregister(cx_dev); | ||
537 | } | ||
538 | } | ||
539 | |||
540 | bus_unregister(&tiocx_bus_type); | 537 | bus_unregister(&tiocx_bus_type); |
541 | } | 538 | } |
542 | 539 | ||
diff --git a/arch/m68k/configs/amiga_defconfig b/arch/m68k/configs/amiga_defconfig index 7dbf997ff205..5649fbae430e 100644 --- a/arch/m68k/configs/amiga_defconfig +++ b/arch/m68k/configs/amiga_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:05:59 2005 | 4 | # Tue Jun 7 20:34:23 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -135,7 +137,6 @@ CONFIG_PARPORT_1284=y | |||
135 | # | 137 | # |
136 | CONFIG_AMIGA_FLOPPY=y | 138 | CONFIG_AMIGA_FLOPPY=y |
137 | CONFIG_AMIGA_Z2RAM=y | 139 | CONFIG_AMIGA_Z2RAM=y |
138 | # CONFIG_BLK_DEV_XD is not set | ||
139 | # CONFIG_PARIDE is not set | 140 | # CONFIG_PARIDE is not set |
140 | # CONFIG_BLK_DEV_COW_COMMON is not set | 141 | # CONFIG_BLK_DEV_COW_COMMON is not set |
141 | CONFIG_BLK_DEV_LOOP=y | 142 | CONFIG_BLK_DEV_LOOP=y |
@@ -223,17 +224,12 @@ CONFIG_SCSI_CONSTANTS=y | |||
223 | # | 224 | # |
224 | # SCSI low-level drivers | 225 | # SCSI low-level drivers |
225 | # | 226 | # |
226 | # CONFIG_SCSI_7000FASST is not set | ||
227 | # CONFIG_SCSI_AHA152X is not set | 227 | # CONFIG_SCSI_AHA152X is not set |
228 | # CONFIG_SCSI_AHA1542 is not set | ||
229 | # CONFIG_SCSI_AIC7XXX_OLD is not set | 228 | # CONFIG_SCSI_AIC7XXX_OLD is not set |
230 | # CONFIG_SCSI_IN2000 is not set | 229 | # CONFIG_SCSI_IN2000 is not set |
231 | # CONFIG_SCSI_SATA is not set | 230 | # CONFIG_SCSI_SATA is not set |
232 | # CONFIG_SCSI_BUSLOGIC is not set | ||
233 | # CONFIG_SCSI_DTC3280 is not set | 231 | # CONFIG_SCSI_DTC3280 is not set |
234 | # CONFIG_SCSI_EATA is not set | ||
235 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 232 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
236 | # CONFIG_SCSI_GDTH is not set | ||
237 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | 233 | # CONFIG_SCSI_GENERIC_NCR5380 is not set |
238 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set | 234 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set |
239 | # CONFIG_SCSI_PPA is not set | 235 | # CONFIG_SCSI_PPA is not set |
@@ -244,7 +240,6 @@ CONFIG_SCSI_CONSTANTS=y | |||
244 | # CONFIG_SCSI_QLOGIC_FAS is not set | 240 | # CONFIG_SCSI_QLOGIC_FAS is not set |
245 | # CONFIG_SCSI_SYM53C416 is not set | 241 | # CONFIG_SCSI_SYM53C416 is not set |
246 | # CONFIG_SCSI_T128 is not set | 242 | # CONFIG_SCSI_T128 is not set |
247 | # CONFIG_SCSI_U14_34F is not set | ||
248 | # CONFIG_SCSI_DEBUG is not set | 243 | # CONFIG_SCSI_DEBUG is not set |
249 | CONFIG_A3000_SCSI=y | 244 | CONFIG_A3000_SCSI=y |
250 | CONFIG_A2091_SCSI=y | 245 | CONFIG_A2091_SCSI=y |
@@ -492,7 +487,6 @@ CONFIG_HYDRA=m | |||
492 | CONFIG_ZORRO8390=m | 487 | CONFIG_ZORRO8390=m |
493 | CONFIG_APNE=m | 488 | CONFIG_APNE=m |
494 | # CONFIG_NET_VENDOR_3COM is not set | 489 | # CONFIG_NET_VENDOR_3COM is not set |
495 | # CONFIG_LANCE is not set | ||
496 | # CONFIG_NET_VENDOR_SMC is not set | 490 | # CONFIG_NET_VENDOR_SMC is not set |
497 | # CONFIG_NET_VENDOR_RACAL is not set | 491 | # CONFIG_NET_VENDOR_RACAL is not set |
498 | # CONFIG_AT1700 is not set | 492 | # CONFIG_AT1700 is not set |
@@ -620,7 +614,6 @@ CONFIG_SERIO_SERPORT=m | |||
620 | # CONFIG_SERIO_PARKBD is not set | 614 | # CONFIG_SERIO_PARKBD is not set |
621 | # CONFIG_SERIO_RAW is not set | 615 | # CONFIG_SERIO_RAW is not set |
622 | # CONFIG_GAMEPORT is not set | 616 | # CONFIG_GAMEPORT is not set |
623 | CONFIG_SOUND_GAMEPORT=y | ||
624 | 617 | ||
625 | # | 618 | # |
626 | # Character devices | 619 | # Character devices |
diff --git a/arch/m68k/configs/apollo_defconfig b/arch/m68k/configs/apollo_defconfig index 505a2968e604..63024b0b7ac3 100644 --- a/arch/m68k/configs/apollo_defconfig +++ b/arch/m68k/configs/apollo_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:00 2005 | 4 | # Tue Jun 7 20:34:27 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -497,7 +499,6 @@ CONFIG_SERIO_SERPORT=m | |||
497 | CONFIG_SERIO_LIBPS2=m | 499 | CONFIG_SERIO_LIBPS2=m |
498 | # CONFIG_SERIO_RAW is not set | 500 | # CONFIG_SERIO_RAW is not set |
499 | # CONFIG_GAMEPORT is not set | 501 | # CONFIG_GAMEPORT is not set |
500 | CONFIG_SOUND_GAMEPORT=y | ||
501 | 502 | ||
502 | # | 503 | # |
503 | # Character devices | 504 | # Character devices |
diff --git a/arch/m68k/configs/atari_defconfig b/arch/m68k/configs/atari_defconfig index 617aa73c3250..6433da2d2ce2 100644 --- a/arch/m68k/configs/atari_defconfig +++ b/arch/m68k/configs/atari_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:18 2005 | 4 | # Tue Jun 7 20:34:32 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -531,7 +533,6 @@ CONFIG_SERIO_SERPORT=y | |||
531 | CONFIG_SERIO_LIBPS2=y | 533 | CONFIG_SERIO_LIBPS2=y |
532 | # CONFIG_SERIO_RAW is not set | 534 | # CONFIG_SERIO_RAW is not set |
533 | # CONFIG_GAMEPORT is not set | 535 | # CONFIG_GAMEPORT is not set |
534 | CONFIG_SOUND_GAMEPORT=y | ||
535 | 536 | ||
536 | # | 537 | # |
537 | # Character devices | 538 | # Character devices |
diff --git a/arch/m68k/configs/bvme6000_defconfig b/arch/m68k/configs/bvme6000_defconfig index b501db51d9ec..da2a23a21463 100644 --- a/arch/m68k/configs/bvme6000_defconfig +++ b/arch/m68k/configs/bvme6000_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:19 2005 | 4 | # Tue Jun 7 20:34:37 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -496,7 +498,6 @@ CONFIG_SERIO_SERPORT=m | |||
496 | CONFIG_SERIO_LIBPS2=m | 498 | CONFIG_SERIO_LIBPS2=m |
497 | # CONFIG_SERIO_RAW is not set | 499 | # CONFIG_SERIO_RAW is not set |
498 | # CONFIG_GAMEPORT is not set | 500 | # CONFIG_GAMEPORT is not set |
499 | CONFIG_SOUND_GAMEPORT=y | ||
500 | 501 | ||
501 | # | 502 | # |
502 | # Character devices | 503 | # Character devices |
diff --git a/arch/m68k/configs/hp300_defconfig b/arch/m68k/configs/hp300_defconfig index 2bf6cef4f2b2..51251883adf8 100644 --- a/arch/m68k/configs/hp300_defconfig +++ b/arch/m68k/configs/hp300_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:21 2005 | 4 | # Tue Jun 7 20:34:41 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -498,7 +500,6 @@ CONFIG_SERIO_SERPORT=m | |||
498 | CONFIG_SERIO_LIBPS2=m | 500 | CONFIG_SERIO_LIBPS2=m |
499 | # CONFIG_SERIO_RAW is not set | 501 | # CONFIG_SERIO_RAW is not set |
500 | # CONFIG_GAMEPORT is not set | 502 | # CONFIG_GAMEPORT is not set |
501 | CONFIG_SOUND_GAMEPORT=y | ||
502 | 503 | ||
503 | # | 504 | # |
504 | # Character devices | 505 | # Character devices |
diff --git a/arch/m68k/configs/mac_defconfig b/arch/m68k/configs/mac_defconfig index 7074f856820c..15b80abfe94a 100644 --- a/arch/m68k/configs/mac_defconfig +++ b/arch/m68k/configs/mac_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:24 2005 | 4 | # Tue Jun 7 20:34:45 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -540,7 +542,6 @@ CONFIG_SERIO_SERPORT=m | |||
540 | CONFIG_SERIO_LIBPS2=m | 542 | CONFIG_SERIO_LIBPS2=m |
541 | # CONFIG_SERIO_RAW is not set | 543 | # CONFIG_SERIO_RAW is not set |
542 | # CONFIG_GAMEPORT is not set | 544 | # CONFIG_GAMEPORT is not set |
543 | CONFIG_SOUND_GAMEPORT=y | ||
544 | 545 | ||
545 | # | 546 | # |
546 | # Character devices | 547 | # Character devices |
diff --git a/arch/m68k/configs/mvme147_defconfig b/arch/m68k/configs/mvme147_defconfig index 61f09bc4846a..f0d5534f6830 100644 --- a/arch/m68k/configs/mvme147_defconfig +++ b/arch/m68k/configs/mvme147_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:28 2005 | 4 | # Tue Jun 7 20:34:50 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -498,7 +500,6 @@ CONFIG_SERIO_SERPORT=m | |||
498 | CONFIG_SERIO_LIBPS2=m | 500 | CONFIG_SERIO_LIBPS2=m |
499 | # CONFIG_SERIO_RAW is not set | 501 | # CONFIG_SERIO_RAW is not set |
500 | # CONFIG_GAMEPORT is not set | 502 | # CONFIG_GAMEPORT is not set |
501 | CONFIG_SOUND_GAMEPORT=y | ||
502 | 503 | ||
503 | # | 504 | # |
504 | # Character devices | 505 | # Character devices |
diff --git a/arch/m68k/configs/mvme16x_defconfig b/arch/m68k/configs/mvme16x_defconfig index 69c01004ec41..1d5c46ff3c81 100644 --- a/arch/m68k/configs/mvme16x_defconfig +++ b/arch/m68k/configs/mvme16x_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:31 2005 | 4 | # Tue Jun 7 20:34:53 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -497,7 +499,6 @@ CONFIG_SERIO_SERPORT=m | |||
497 | CONFIG_SERIO_LIBPS2=m | 499 | CONFIG_SERIO_LIBPS2=m |
498 | # CONFIG_SERIO_RAW is not set | 500 | # CONFIG_SERIO_RAW is not set |
499 | # CONFIG_GAMEPORT is not set | 501 | # CONFIG_GAMEPORT is not set |
500 | CONFIG_SOUND_GAMEPORT=y | ||
501 | 502 | ||
502 | # | 503 | # |
503 | # Character devices | 504 | # Character devices |
diff --git a/arch/m68k/configs/q40_defconfig b/arch/m68k/configs/q40_defconfig index 550ec26006c1..856238634d42 100644 --- a/arch/m68k/configs/q40_defconfig +++ b/arch/m68k/configs/q40_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:34 2005 | 4 | # Tue Jun 7 20:34:58 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -125,7 +127,6 @@ CONFIG_FW_LOADER=m | |||
125 | # Block devices | 127 | # Block devices |
126 | # | 128 | # |
127 | # CONFIG_BLK_DEV_FD is not set | 129 | # CONFIG_BLK_DEV_FD is not set |
128 | # CONFIG_BLK_DEV_XD is not set | ||
129 | # CONFIG_BLK_DEV_COW_COMMON is not set | 130 | # CONFIG_BLK_DEV_COW_COMMON is not set |
130 | CONFIG_BLK_DEV_LOOP=y | 131 | CONFIG_BLK_DEV_LOOP=y |
131 | CONFIG_BLK_DEV_CRYPTOLOOP=m | 132 | CONFIG_BLK_DEV_CRYPTOLOOP=m |
@@ -210,17 +211,12 @@ CONFIG_SCSI_CONSTANTS=y | |||
210 | # | 211 | # |
211 | # SCSI low-level drivers | 212 | # SCSI low-level drivers |
212 | # | 213 | # |
213 | # CONFIG_SCSI_7000FASST is not set | ||
214 | # CONFIG_SCSI_AHA152X is not set | 214 | # CONFIG_SCSI_AHA152X is not set |
215 | # CONFIG_SCSI_AHA1542 is not set | ||
216 | # CONFIG_SCSI_AIC7XXX_OLD is not set | 215 | # CONFIG_SCSI_AIC7XXX_OLD is not set |
217 | # CONFIG_SCSI_IN2000 is not set | 216 | # CONFIG_SCSI_IN2000 is not set |
218 | # CONFIG_SCSI_SATA is not set | 217 | # CONFIG_SCSI_SATA is not set |
219 | # CONFIG_SCSI_BUSLOGIC is not set | ||
220 | # CONFIG_SCSI_DTC3280 is not set | 218 | # CONFIG_SCSI_DTC3280 is not set |
221 | # CONFIG_SCSI_EATA is not set | ||
222 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 219 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
223 | # CONFIG_SCSI_GDTH is not set | ||
224 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | 220 | # CONFIG_SCSI_GENERIC_NCR5380 is not set |
225 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set | 221 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set |
226 | # CONFIG_SCSI_NCR53C406A is not set | 222 | # CONFIG_SCSI_NCR53C406A is not set |
@@ -229,7 +225,6 @@ CONFIG_SCSI_CONSTANTS=y | |||
229 | # CONFIG_SCSI_QLOGIC_FAS is not set | 225 | # CONFIG_SCSI_QLOGIC_FAS is not set |
230 | # CONFIG_SCSI_SYM53C416 is not set | 226 | # CONFIG_SCSI_SYM53C416 is not set |
231 | # CONFIG_SCSI_T128 is not set | 227 | # CONFIG_SCSI_T128 is not set |
232 | # CONFIG_SCSI_U14_34F is not set | ||
233 | # CONFIG_SCSI_DEBUG is not set | 228 | # CONFIG_SCSI_DEBUG is not set |
234 | 229 | ||
235 | # | 230 | # |
@@ -466,7 +461,6 @@ CONFIG_EQUALIZER=m | |||
466 | CONFIG_NET_ETHERNET=y | 461 | CONFIG_NET_ETHERNET=y |
467 | CONFIG_MII=m | 462 | CONFIG_MII=m |
468 | # CONFIG_NET_VENDOR_3COM is not set | 463 | # CONFIG_NET_VENDOR_3COM is not set |
469 | # CONFIG_LANCE is not set | ||
470 | # CONFIG_NET_VENDOR_SMC is not set | 464 | # CONFIG_NET_VENDOR_SMC is not set |
471 | # CONFIG_NET_VENDOR_RACAL is not set | 465 | # CONFIG_NET_VENDOR_RACAL is not set |
472 | # CONFIG_AT1700 is not set | 466 | # CONFIG_AT1700 is not set |
@@ -570,7 +564,6 @@ CONFIG_SERIO_Q40KBD=m | |||
570 | CONFIG_SERIO_LIBPS2=m | 564 | CONFIG_SERIO_LIBPS2=m |
571 | # CONFIG_SERIO_RAW is not set | 565 | # CONFIG_SERIO_RAW is not set |
572 | # CONFIG_GAMEPORT is not set | 566 | # CONFIG_GAMEPORT is not set |
573 | CONFIG_SOUND_GAMEPORT=y | ||
574 | 567 | ||
575 | # | 568 | # |
576 | # Character devices | 569 | # Character devices |
diff --git a/arch/m68k/configs/sun3_defconfig b/arch/m68k/configs/sun3_defconfig index 5b5a619645aa..af903b5c5708 100644 --- a/arch/m68k/configs/sun3_defconfig +++ b/arch/m68k/configs/sun3_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:37 2005 | 4 | # Tue Jun 7 20:35:02 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -171,7 +173,6 @@ CONFIG_SCSI_CONSTANTS=y | |||
171 | # | 173 | # |
172 | # CONFIG_SCSI_SATA is not set | 174 | # CONFIG_SCSI_SATA is not set |
173 | # CONFIG_SCSI_DEBUG is not set | 175 | # CONFIG_SCSI_DEBUG is not set |
174 | CONFIG_SUN3_SCSI=y | ||
175 | 176 | ||
176 | # | 177 | # |
177 | # Multi-device support (RAID and LVM) | 178 | # Multi-device support (RAID and LVM) |
@@ -487,7 +488,6 @@ CONFIG_SERIO_SERPORT=m | |||
487 | CONFIG_SERIO_LIBPS2=m | 488 | CONFIG_SERIO_LIBPS2=m |
488 | # CONFIG_SERIO_RAW is not set | 489 | # CONFIG_SERIO_RAW is not set |
489 | # CONFIG_GAMEPORT is not set | 490 | # CONFIG_GAMEPORT is not set |
490 | CONFIG_SOUND_GAMEPORT=y | ||
491 | 491 | ||
492 | # | 492 | # |
493 | # Character devices | 493 | # Character devices |
diff --git a/arch/m68k/configs/sun3x_defconfig b/arch/m68k/configs/sun3x_defconfig index 704e42344cba..997143b7928a 100644 --- a/arch/m68k/configs/sun3x_defconfig +++ b/arch/m68k/configs/sun3x_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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:06:40 2005 | 4 | # Tue Jun 7 20:35:06 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -35,6 +35,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
35 | CONFIG_KALLSYMS=y | 35 | CONFIG_KALLSYMS=y |
36 | # CONFIG_KALLSYMS_ALL is not set | 36 | # CONFIG_KALLSYMS_ALL is not set |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
38 | CONFIG_PRINTK=y | ||
39 | CONFIG_BUG=y | ||
38 | CONFIG_BASE_FULL=y | 40 | CONFIG_BASE_FULL=y |
39 | CONFIG_FUTEX=y | 41 | CONFIG_FUTEX=y |
40 | CONFIG_EPOLL=y | 42 | CONFIG_EPOLL=y |
@@ -497,7 +499,6 @@ CONFIG_SERIO_SERPORT=m | |||
497 | CONFIG_SERIO_LIBPS2=m | 499 | CONFIG_SERIO_LIBPS2=m |
498 | # CONFIG_SERIO_RAW is not set | 500 | # CONFIG_SERIO_RAW is not set |
499 | # CONFIG_GAMEPORT is not set | 501 | # CONFIG_GAMEPORT is not set |
500 | CONFIG_SOUND_GAMEPORT=y | ||
501 | 502 | ||
502 | # | 503 | # |
503 | # Character devices | 504 | # Character devices |
diff --git a/arch/m68k/defconfig b/arch/m68k/defconfig index 5b2296ecba82..7d935e48a9a8 100644 --- a/arch/m68k/defconfig +++ b/arch/m68k/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.12-rc2-m68k | 3 | # Linux kernel version: 2.6.12-rc6-m68k |
4 | # Tue Apr 5 14:05:31 2005 | 4 | # Tue Jun 7 20:34:17 2005 |
5 | # | 5 | # |
6 | CONFIG_M68K=y | 6 | CONFIG_M68K=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -33,6 +33,8 @@ CONFIG_KOBJECT_UEVENT=y | |||
33 | # CONFIG_EMBEDDED is not set | 33 | # CONFIG_EMBEDDED is not set |
34 | CONFIG_KALLSYMS=y | 34 | CONFIG_KALLSYMS=y |
35 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 35 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
36 | CONFIG_PRINTK=y | ||
37 | CONFIG_BUG=y | ||
36 | CONFIG_BASE_FULL=y | 38 | CONFIG_BASE_FULL=y |
37 | CONFIG_FUTEX=y | 39 | CONFIG_FUTEX=y |
38 | CONFIG_EPOLL=y | 40 | CONFIG_EPOLL=y |
@@ -355,7 +357,6 @@ CONFIG_SERIO_SERPORT=y | |||
355 | CONFIG_SERIO_LIBPS2=y | 357 | CONFIG_SERIO_LIBPS2=y |
356 | # CONFIG_SERIO_RAW is not set | 358 | # CONFIG_SERIO_RAW is not set |
357 | # CONFIG_GAMEPORT is not set | 359 | # CONFIG_GAMEPORT is not set |
358 | CONFIG_SOUND_GAMEPORT=y | ||
359 | 360 | ||
360 | # | 361 | # |
361 | # Character devices | 362 | # Character devices |
diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 2b6c9d32b7a6..c4a33f265dc0 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c | |||
@@ -45,11 +45,13 @@ asmlinkage void ret_from_fork(void); | |||
45 | */ | 45 | */ |
46 | void default_idle(void) | 46 | void default_idle(void) |
47 | { | 47 | { |
48 | while(1) { | 48 | local_irq_disable(); |
49 | if (need_resched()) | 49 | while (!need_resched()) { |
50 | __asm__("stop #0x2000" : : : "cc"); | 50 | /* This stop will re-enable interrupts */ |
51 | schedule(); | 51 | __asm__("stop #0x2000" : : : "cc"); |
52 | local_irq_disable(); | ||
52 | } | 53 | } |
54 | local_irq_enable(); | ||
53 | } | 55 | } |
54 | 56 | ||
55 | void (*idle)(void) = default_idle; | 57 | void (*idle)(void) = default_idle; |
@@ -63,7 +65,12 @@ void (*idle)(void) = default_idle; | |||
63 | void cpu_idle(void) | 65 | void cpu_idle(void) |
64 | { | 66 | { |
65 | /* endless idle loop with no priority at all */ | 67 | /* endless idle loop with no priority at all */ |
66 | idle(); | 68 | while (1) { |
69 | idle(); | ||
70 | preempt_enable_no_resched(); | ||
71 | schedule(); | ||
72 | preempt_disable(); | ||
73 | } | ||
67 | } | 74 | } |
68 | 75 | ||
69 | void machine_restart(char * __unused) | 76 | void machine_restart(char * __unused) |
diff --git a/arch/parisc/kernel/drivers.c b/arch/parisc/kernel/drivers.c index ebf186656afb..d34bbe7ae0e3 100644 --- a/arch/parisc/kernel/drivers.c +++ b/arch/parisc/kernel/drivers.c | |||
@@ -466,7 +466,7 @@ static int parisc_generic_match(struct device *dev, struct device_driver *drv) | |||
466 | } | 466 | } |
467 | 467 | ||
468 | #define pa_dev_attr(name, field, format_string) \ | 468 | #define pa_dev_attr(name, field, format_string) \ |
469 | static ssize_t name##_show(struct device *dev, char *buf) \ | 469 | static ssize_t name##_show(struct device *dev, struct device_attribute *attr, char *buf) \ |
470 | { \ | 470 | { \ |
471 | struct parisc_device *padev = to_parisc_device(dev); \ | 471 | struct parisc_device *padev = to_parisc_device(dev); \ |
472 | return sprintf(buf, format_string, padev->field); \ | 472 | return sprintf(buf, format_string, padev->field); \ |
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index 600f23d7fd33..54ce6da22644 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -1083,6 +1083,23 @@ source "drivers/zorro/Kconfig" | |||
1083 | 1083 | ||
1084 | source kernel/power/Kconfig | 1084 | source kernel/power/Kconfig |
1085 | 1085 | ||
1086 | config SECCOMP | ||
1087 | bool "Enable seccomp to safely compute untrusted bytecode" | ||
1088 | depends on PROC_FS | ||
1089 | default y | ||
1090 | help | ||
1091 | This kernel feature is useful for number crunching applications | ||
1092 | that may need to compute untrusted bytecode during their | ||
1093 | execution. By using pipes or other transports made available to | ||
1094 | the process as file descriptors supporting the read/write | ||
1095 | syscalls, it's possible to isolate those applications in | ||
1096 | their own address space using seccomp. Once seccomp is | ||
1097 | enabled via /proc/<pid>/seccomp, it cannot be disabled | ||
1098 | and the task is only allowed to execute a few safe syscalls | ||
1099 | defined by each seccomp mode. | ||
1100 | |||
1101 | If unsure, say Y. Only embedded should say N here. | ||
1102 | |||
1086 | endmenu | 1103 | endmenu |
1087 | 1104 | ||
1088 | config ISA_DMA_API | 1105 | config ISA_DMA_API |
@@ -1143,12 +1160,12 @@ config PCI_QSPAN | |||
1143 | 1160 | ||
1144 | config PCI_8260 | 1161 | config PCI_8260 |
1145 | bool | 1162 | bool |
1146 | depends on PCI && 8260 && !8272 | 1163 | depends on PCI && 8260 |
1147 | default y | 1164 | default y |
1148 | 1165 | ||
1149 | config 8260_PCI9 | 1166 | config 8260_PCI9 |
1150 | bool " Enable workaround for MPC826x erratum PCI 9" | 1167 | bool " Enable workaround for MPC826x erratum PCI 9" |
1151 | depends on PCI_8260 | 1168 | depends on PCI_8260 && !ADS8272 |
1152 | default y | 1169 | default y |
1153 | 1170 | ||
1154 | choice | 1171 | choice |
diff --git a/arch/ppc/boot/images/Makefile b/arch/ppc/boot/images/Makefile index f850fb0fb511..c9ac5f5fa9e4 100644 --- a/arch/ppc/boot/images/Makefile +++ b/arch/ppc/boot/images/Makefile | |||
@@ -22,7 +22,8 @@ targets += uImage | |||
22 | $(obj)/uImage: $(obj)/vmlinux.gz | 22 | $(obj)/uImage: $(obj)/vmlinux.gz |
23 | $(Q)rm -f $@ | 23 | $(Q)rm -f $@ |
24 | $(call if_changed,uimage) | 24 | $(call if_changed,uimage) |
25 | @echo ' Image: $@' $(if $(wildcard $@),'is ready','not made') | 25 | @echo -n ' Image: $@ ' |
26 | @if [ -f $@ ]; then echo 'is ready' ; else echo 'not made'; fi | ||
26 | 27 | ||
27 | # Files generated that shall be removed upon make clean | 28 | # Files generated that shall be removed upon make clean |
28 | clean-files := sImage vmapus vmlinux* miboot* zImage* uImage | 29 | clean-files := sImage vmapus vmlinux* miboot* zImage* uImage |
diff --git a/arch/ppc/configs/mpc8555_cds_defconfig b/arch/ppc/configs/mpc8555_cds_defconfig index 728bd9e1a8fa..15abebf46b96 100644 --- a/arch/ppc/configs/mpc8555_cds_defconfig +++ b/arch/ppc/configs/mpc8555_cds_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.11-rc1 | 3 | # Linux kernel version: 2.6.12-rc4 |
4 | # Thu Jan 20 01:25:35 2005 | 4 | # Tue May 17 11:56:01 2005 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_GENERIC_HARDIRQS=y | 7 | CONFIG_GENERIC_HARDIRQS=y |
@@ -11,6 +11,7 @@ CONFIG_HAVE_DEC_LOCK=y | |||
11 | CONFIG_PPC=y | 11 | CONFIG_PPC=y |
12 | CONFIG_PPC32=y | 12 | CONFIG_PPC32=y |
13 | CONFIG_GENERIC_NVRAM=y | 13 | CONFIG_GENERIC_NVRAM=y |
14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
14 | 15 | ||
15 | # | 16 | # |
16 | # Code maturity level options | 17 | # Code maturity level options |
@@ -18,6 +19,7 @@ CONFIG_GENERIC_NVRAM=y | |||
18 | CONFIG_EXPERIMENTAL=y | 19 | CONFIG_EXPERIMENTAL=y |
19 | CONFIG_CLEAN_COMPILE=y | 20 | CONFIG_CLEAN_COMPILE=y |
20 | CONFIG_BROKEN_ON_SMP=y | 21 | CONFIG_BROKEN_ON_SMP=y |
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
21 | 23 | ||
22 | # | 24 | # |
23 | # General setup | 25 | # General setup |
@@ -29,12 +31,14 @@ CONFIG_SYSVIPC=y | |||
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 31 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 32 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 33 | # CONFIG_AUDIT is not set |
32 | CONFIG_LOG_BUF_SHIFT=14 | ||
33 | # CONFIG_HOTPLUG is not set | 34 | # CONFIG_HOTPLUG is not set |
34 | CONFIG_KOBJECT_UEVENT=y | 35 | CONFIG_KOBJECT_UEVENT=y |
35 | # CONFIG_IKCONFIG is not set | 36 | # CONFIG_IKCONFIG is not set |
36 | CONFIG_EMBEDDED=y | 37 | CONFIG_EMBEDDED=y |
37 | # CONFIG_KALLSYMS is not set | 38 | # CONFIG_KALLSYMS is not set |
39 | CONFIG_PRINTK=y | ||
40 | CONFIG_BUG=y | ||
41 | CONFIG_BASE_FULL=y | ||
38 | CONFIG_FUTEX=y | 42 | CONFIG_FUTEX=y |
39 | # CONFIG_EPOLL is not set | 43 | # CONFIG_EPOLL is not set |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
@@ -44,6 +48,7 @@ CONFIG_CC_ALIGN_LABELS=0 | |||
44 | CONFIG_CC_ALIGN_LOOPS=0 | 48 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 49 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 50 | # CONFIG_TINY_SHMEM is not set |
51 | CONFIG_BASE_SMALL=0 | ||
47 | 52 | ||
48 | # | 53 | # |
49 | # Loadable module support | 54 | # Loadable module support |
@@ -62,10 +67,12 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
62 | CONFIG_E500=y | 67 | CONFIG_E500=y |
63 | CONFIG_BOOKE=y | 68 | CONFIG_BOOKE=y |
64 | CONFIG_FSL_BOOKE=y | 69 | CONFIG_FSL_BOOKE=y |
70 | # CONFIG_PHYS_64BIT is not set | ||
65 | CONFIG_SPE=y | 71 | CONFIG_SPE=y |
66 | CONFIG_MATH_EMULATION=y | 72 | CONFIG_MATH_EMULATION=y |
67 | # CONFIG_CPU_FREQ is not set | 73 | # CONFIG_CPU_FREQ is not set |
68 | CONFIG_PPC_GEN550=y | 74 | CONFIG_PPC_GEN550=y |
75 | # CONFIG_PM is not set | ||
69 | CONFIG_85xx=y | 76 | CONFIG_85xx=y |
70 | CONFIG_PPC_INDIRECT_PCI_BE=y | 77 | CONFIG_PPC_INDIRECT_PCI_BE=y |
71 | 78 | ||
@@ -76,6 +83,7 @@ CONFIG_PPC_INDIRECT_PCI_BE=y | |||
76 | CONFIG_MPC8555_CDS=y | 83 | CONFIG_MPC8555_CDS=y |
77 | # CONFIG_MPC8560_ADS is not set | 84 | # CONFIG_MPC8560_ADS is not set |
78 | # CONFIG_SBC8560 is not set | 85 | # CONFIG_SBC8560 is not set |
86 | # CONFIG_STX_GP3 is not set | ||
79 | CONFIG_MPC8555=y | 87 | CONFIG_MPC8555=y |
80 | CONFIG_85xx_PCI2=y | 88 | CONFIG_85xx_PCI2=y |
81 | 89 | ||
@@ -90,6 +98,7 @@ CONFIG_CPM2=y | |||
90 | CONFIG_BINFMT_ELF=y | 98 | CONFIG_BINFMT_ELF=y |
91 | # CONFIG_BINFMT_MISC is not set | 99 | # CONFIG_BINFMT_MISC is not set |
92 | # CONFIG_CMDLINE_BOOL is not set | 100 | # CONFIG_CMDLINE_BOOL is not set |
101 | CONFIG_ISA_DMA_API=y | ||
93 | 102 | ||
94 | # | 103 | # |
95 | # Bus options | 104 | # Bus options |
@@ -105,10 +114,6 @@ CONFIG_PCI_NAMES=y | |||
105 | # CONFIG_PCCARD is not set | 114 | # CONFIG_PCCARD is not set |
106 | 115 | ||
107 | # | 116 | # |
108 | # PC-card bridges | ||
109 | # | ||
110 | |||
111 | # | ||
112 | # Advanced setup | 117 | # Advanced setup |
113 | # | 118 | # |
114 | # CONFIG_ADVANCED_OPTIONS is not set | 119 | # CONFIG_ADVANCED_OPTIONS is not set |
@@ -180,7 +185,59 @@ CONFIG_IOSCHED_CFQ=y | |||
180 | # | 185 | # |
181 | # ATA/ATAPI/MFM/RLL support | 186 | # ATA/ATAPI/MFM/RLL support |
182 | # | 187 | # |
183 | # CONFIG_IDE is not set | 188 | CONFIG_IDE=y |
189 | CONFIG_BLK_DEV_IDE=y | ||
190 | |||
191 | # | ||
192 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
193 | # | ||
194 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
195 | CONFIG_BLK_DEV_IDEDISK=y | ||
196 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
197 | # CONFIG_BLK_DEV_IDECD is not set | ||
198 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
199 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
200 | # CONFIG_IDE_TASK_IOCTL is not set | ||
201 | |||
202 | # | ||
203 | # IDE chipset support/bugfixes | ||
204 | # | ||
205 | CONFIG_IDE_GENERIC=y | ||
206 | CONFIG_BLK_DEV_IDEPCI=y | ||
207 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
208 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
209 | CONFIG_BLK_DEV_GENERIC=y | ||
210 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
211 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
212 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
213 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
214 | CONFIG_IDEDMA_PCI_AUTO=y | ||
215 | # CONFIG_IDEDMA_ONLYDISK is not set | ||
216 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
217 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
218 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
219 | # CONFIG_BLK_DEV_CMD64X is not set | ||
220 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
221 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
222 | # CONFIG_BLK_DEV_CS5520 is not set | ||
223 | # CONFIG_BLK_DEV_CS5530 is not set | ||
224 | # CONFIG_BLK_DEV_HPT34X is not set | ||
225 | # CONFIG_BLK_DEV_HPT366 is not set | ||
226 | # CONFIG_BLK_DEV_SC1200 is not set | ||
227 | # CONFIG_BLK_DEV_PIIX is not set | ||
228 | # CONFIG_BLK_DEV_NS87415 is not set | ||
229 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
230 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
231 | # CONFIG_BLK_DEV_SVWKS is not set | ||
232 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
233 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
234 | # CONFIG_BLK_DEV_TRM290 is not set | ||
235 | CONFIG_BLK_DEV_VIA82CXXX=y | ||
236 | # CONFIG_IDE_ARM is not set | ||
237 | CONFIG_BLK_DEV_IDEDMA=y | ||
238 | # CONFIG_IDEDMA_IVB is not set | ||
239 | CONFIG_IDEDMA_AUTO=y | ||
240 | # CONFIG_BLK_DEV_HD is not set | ||
184 | 241 | ||
185 | # | 242 | # |
186 | # SCSI device support | 243 | # SCSI device support |
@@ -220,7 +277,6 @@ CONFIG_NET=y | |||
220 | # | 277 | # |
221 | CONFIG_PACKET=y | 278 | CONFIG_PACKET=y |
222 | # CONFIG_PACKET_MMAP is not set | 279 | # CONFIG_PACKET_MMAP is not set |
223 | # CONFIG_NETLINK_DEV is not set | ||
224 | CONFIG_UNIX=y | 280 | CONFIG_UNIX=y |
225 | # CONFIG_NET_KEY is not set | 281 | # CONFIG_NET_KEY is not set |
226 | CONFIG_INET=y | 282 | CONFIG_INET=y |
@@ -370,14 +426,6 @@ CONFIG_INPUT=y | |||
370 | # CONFIG_INPUT_EVBUG is not set | 426 | # CONFIG_INPUT_EVBUG is not set |
371 | 427 | ||
372 | # | 428 | # |
373 | # Input I/O drivers | ||
374 | # | ||
375 | # CONFIG_GAMEPORT is not set | ||
376 | CONFIG_SOUND_GAMEPORT=y | ||
377 | # CONFIG_SERIO is not set | ||
378 | # CONFIG_SERIO_I8042 is not set | ||
379 | |||
380 | # | ||
381 | # Input Device Drivers | 429 | # Input Device Drivers |
382 | # | 430 | # |
383 | # CONFIG_INPUT_KEYBOARD is not set | 431 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -387,6 +435,13 @@ CONFIG_SOUND_GAMEPORT=y | |||
387 | # CONFIG_INPUT_MISC is not set | 435 | # CONFIG_INPUT_MISC is not set |
388 | 436 | ||
389 | # | 437 | # |
438 | # Hardware I/O ports | ||
439 | # | ||
440 | # CONFIG_SERIO is not set | ||
441 | # CONFIG_GAMEPORT is not set | ||
442 | CONFIG_SOUND_GAMEPORT=y | ||
443 | |||
444 | # | ||
390 | # Character devices | 445 | # Character devices |
391 | # | 446 | # |
392 | # CONFIG_VT is not set | 447 | # CONFIG_VT is not set |
@@ -406,6 +461,7 @@ CONFIG_SERIAL_8250_NR_UARTS=4 | |||
406 | CONFIG_SERIAL_CORE=y | 461 | CONFIG_SERIAL_CORE=y |
407 | CONFIG_SERIAL_CORE_CONSOLE=y | 462 | CONFIG_SERIAL_CORE_CONSOLE=y |
408 | # CONFIG_SERIAL_CPM is not set | 463 | # CONFIG_SERIAL_CPM is not set |
464 | # CONFIG_SERIAL_JSM is not set | ||
409 | CONFIG_UNIX98_PTYS=y | 465 | CONFIG_UNIX98_PTYS=y |
410 | CONFIG_LEGACY_PTYS=y | 466 | CONFIG_LEGACY_PTYS=y |
411 | CONFIG_LEGACY_PTY_COUNT=256 | 467 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -434,6 +490,11 @@ CONFIG_GEN_RTC=y | |||
434 | # CONFIG_RAW_DRIVER is not set | 490 | # CONFIG_RAW_DRIVER is not set |
435 | 491 | ||
436 | # | 492 | # |
493 | # TPM devices | ||
494 | # | ||
495 | # CONFIG_TCG_TPM is not set | ||
496 | |||
497 | # | ||
437 | # I2C support | 498 | # I2C support |
438 | # | 499 | # |
439 | CONFIG_I2C=y | 500 | CONFIG_I2C=y |
@@ -456,11 +517,11 @@ CONFIG_I2C_CHARDEV=y | |||
456 | # CONFIG_I2C_AMD8111 is not set | 517 | # CONFIG_I2C_AMD8111 is not set |
457 | # CONFIG_I2C_I801 is not set | 518 | # CONFIG_I2C_I801 is not set |
458 | # CONFIG_I2C_I810 is not set | 519 | # CONFIG_I2C_I810 is not set |
520 | # CONFIG_I2C_PIIX4 is not set | ||
459 | # CONFIG_I2C_ISA is not set | 521 | # CONFIG_I2C_ISA is not set |
460 | CONFIG_I2C_MPC=y | 522 | CONFIG_I2C_MPC=y |
461 | # CONFIG_I2C_NFORCE2 is not set | 523 | # CONFIG_I2C_NFORCE2 is not set |
462 | # CONFIG_I2C_PARPORT_LIGHT is not set | 524 | # CONFIG_I2C_PARPORT_LIGHT is not set |
463 | # CONFIG_I2C_PIIX4 is not set | ||
464 | # CONFIG_I2C_PROSAVAGE is not set | 525 | # CONFIG_I2C_PROSAVAGE is not set |
465 | # CONFIG_I2C_SAVAGE4 is not set | 526 | # CONFIG_I2C_SAVAGE4 is not set |
466 | # CONFIG_SCx200_ACB is not set | 527 | # CONFIG_SCx200_ACB is not set |
@@ -483,7 +544,9 @@ CONFIG_I2C_MPC=y | |||
483 | # CONFIG_SENSORS_ASB100 is not set | 544 | # CONFIG_SENSORS_ASB100 is not set |
484 | # CONFIG_SENSORS_DS1621 is not set | 545 | # CONFIG_SENSORS_DS1621 is not set |
485 | # CONFIG_SENSORS_FSCHER is not set | 546 | # CONFIG_SENSORS_FSCHER is not set |
547 | # CONFIG_SENSORS_FSCPOS is not set | ||
486 | # CONFIG_SENSORS_GL518SM is not set | 548 | # CONFIG_SENSORS_GL518SM is not set |
549 | # CONFIG_SENSORS_GL520SM is not set | ||
487 | # CONFIG_SENSORS_IT87 is not set | 550 | # CONFIG_SENSORS_IT87 is not set |
488 | # CONFIG_SENSORS_LM63 is not set | 551 | # CONFIG_SENSORS_LM63 is not set |
489 | # CONFIG_SENSORS_LM75 is not set | 552 | # CONFIG_SENSORS_LM75 is not set |
@@ -494,9 +557,11 @@ CONFIG_I2C_MPC=y | |||
494 | # CONFIG_SENSORS_LM85 is not set | 557 | # CONFIG_SENSORS_LM85 is not set |
495 | # CONFIG_SENSORS_LM87 is not set | 558 | # CONFIG_SENSORS_LM87 is not set |
496 | # CONFIG_SENSORS_LM90 is not set | 559 | # CONFIG_SENSORS_LM90 is not set |
560 | # CONFIG_SENSORS_LM92 is not set | ||
497 | # CONFIG_SENSORS_MAX1619 is not set | 561 | # CONFIG_SENSORS_MAX1619 is not set |
498 | # CONFIG_SENSORS_PC87360 is not set | 562 | # CONFIG_SENSORS_PC87360 is not set |
499 | # CONFIG_SENSORS_SMSC47B397 is not set | 563 | # CONFIG_SENSORS_SMSC47B397 is not set |
564 | # CONFIG_SENSORS_SIS5595 is not set | ||
500 | # CONFIG_SENSORS_SMSC47M1 is not set | 565 | # CONFIG_SENSORS_SMSC47M1 is not set |
501 | # CONFIG_SENSORS_VIA686A is not set | 566 | # CONFIG_SENSORS_VIA686A is not set |
502 | # CONFIG_SENSORS_W83781D is not set | 567 | # CONFIG_SENSORS_W83781D is not set |
@@ -506,10 +571,12 @@ CONFIG_I2C_MPC=y | |||
506 | # | 571 | # |
507 | # Other I2C Chip support | 572 | # Other I2C Chip support |
508 | # | 573 | # |
574 | # CONFIG_SENSORS_DS1337 is not set | ||
509 | # CONFIG_SENSORS_EEPROM is not set | 575 | # CONFIG_SENSORS_EEPROM is not set |
510 | # CONFIG_SENSORS_PCF8574 is not set | 576 | # CONFIG_SENSORS_PCF8574 is not set |
511 | # CONFIG_SENSORS_PCF8591 is not set | 577 | # CONFIG_SENSORS_PCF8591 is not set |
512 | # CONFIG_SENSORS_RTC8564 is not set | 578 | # CONFIG_SENSORS_RTC8564 is not set |
579 | # CONFIG_SENSORS_M41T00 is not set | ||
513 | # CONFIG_I2C_DEBUG_CORE is not set | 580 | # CONFIG_I2C_DEBUG_CORE is not set |
514 | # CONFIG_I2C_DEBUG_ALGO is not set | 581 | # CONFIG_I2C_DEBUG_ALGO is not set |
515 | # CONFIG_I2C_DEBUG_BUS is not set | 582 | # CONFIG_I2C_DEBUG_BUS is not set |
@@ -538,7 +605,6 @@ CONFIG_I2C_MPC=y | |||
538 | # Graphics support | 605 | # Graphics support |
539 | # | 606 | # |
540 | # CONFIG_FB is not set | 607 | # CONFIG_FB is not set |
541 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
542 | 608 | ||
543 | # | 609 | # |
544 | # Sound | 610 | # Sound |
@@ -548,13 +614,9 @@ CONFIG_I2C_MPC=y | |||
548 | # | 614 | # |
549 | # USB support | 615 | # USB support |
550 | # | 616 | # |
551 | # CONFIG_USB is not set | ||
552 | CONFIG_USB_ARCH_HAS_HCD=y | 617 | CONFIG_USB_ARCH_HAS_HCD=y |
553 | CONFIG_USB_ARCH_HAS_OHCI=y | 618 | CONFIG_USB_ARCH_HAS_OHCI=y |
554 | 619 | # CONFIG_USB is not set | |
555 | # | ||
556 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
557 | # | ||
558 | 620 | ||
559 | # | 621 | # |
560 | # USB Gadget Support | 622 | # USB Gadget Support |
@@ -585,6 +647,10 @@ CONFIG_JBD=y | |||
585 | CONFIG_FS_MBCACHE=y | 647 | CONFIG_FS_MBCACHE=y |
586 | # CONFIG_REISERFS_FS is not set | 648 | # CONFIG_REISERFS_FS is not set |
587 | # CONFIG_JFS_FS is not set | 649 | # CONFIG_JFS_FS is not set |
650 | |||
651 | # | ||
652 | # XFS support | ||
653 | # | ||
588 | # CONFIG_XFS_FS is not set | 654 | # CONFIG_XFS_FS is not set |
589 | # CONFIG_MINIX_FS is not set | 655 | # CONFIG_MINIX_FS is not set |
590 | # CONFIG_ROMFS_FS is not set | 656 | # CONFIG_ROMFS_FS is not set |
@@ -646,7 +712,6 @@ CONFIG_NFS_FS=y | |||
646 | # CONFIG_NFSD is not set | 712 | # CONFIG_NFSD is not set |
647 | CONFIG_ROOT_NFS=y | 713 | CONFIG_ROOT_NFS=y |
648 | CONFIG_LOCKD=y | 714 | CONFIG_LOCKD=y |
649 | # CONFIG_EXPORTFS is not set | ||
650 | CONFIG_SUNRPC=y | 715 | CONFIG_SUNRPC=y |
651 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 716 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
652 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 717 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -698,7 +763,9 @@ CONFIG_CRC32=y | |||
698 | # | 763 | # |
699 | # Kernel hacking | 764 | # Kernel hacking |
700 | # | 765 | # |
766 | # CONFIG_PRINTK_TIME is not set | ||
701 | # CONFIG_DEBUG_KERNEL is not set | 767 | # CONFIG_DEBUG_KERNEL is not set |
768 | CONFIG_LOG_BUF_SHIFT=14 | ||
702 | # CONFIG_KGDB_CONSOLE is not set | 769 | # CONFIG_KGDB_CONSOLE is not set |
703 | # CONFIG_SERIAL_TEXT_DEBUG is not set | 770 | # CONFIG_SERIAL_TEXT_DEBUG is not set |
704 | 771 | ||
diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c index 8aa5e8c69009..d44b7dc5390a 100644 --- a/arch/ppc/kernel/cputable.c +++ b/arch/ppc/kernel/cputable.c | |||
@@ -838,6 +838,17 @@ struct cpu_spec cpu_specs[] = { | |||
838 | .icache_bsize = 32, | 838 | .icache_bsize = 32, |
839 | .dcache_bsize = 32, | 839 | .dcache_bsize = 32, |
840 | }, | 840 | }, |
841 | { /* 405EP */ | ||
842 | .pvr_mask = 0xffff0000, | ||
843 | .pvr_value = 0x51210000, | ||
844 | .cpu_name = "405EP", | ||
845 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
846 | CPU_FTR_USE_TB, | ||
847 | .cpu_user_features = PPC_FEATURE_32 | | ||
848 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, | ||
849 | .icache_bsize = 32, | ||
850 | .dcache_bsize = 32, | ||
851 | }, | ||
841 | 852 | ||
842 | #endif /* CONFIG_40x */ | 853 | #endif /* CONFIG_40x */ |
843 | #ifdef CONFIG_44x | 854 | #ifdef CONFIG_44x |
diff --git a/arch/ppc/kernel/entry.S b/arch/ppc/kernel/entry.S index 5f075dbc4ee7..661523707e8c 100644 --- a/arch/ppc/kernel/entry.S +++ b/arch/ppc/kernel/entry.S | |||
@@ -202,7 +202,7 @@ _GLOBAL(DoSyscall) | |||
202 | rlwinm r11,r11,0,~_TIFL_FORCE_NOERROR | 202 | rlwinm r11,r11,0,~_TIFL_FORCE_NOERROR |
203 | stw r11,TI_LOCAL_FLAGS(r10) | 203 | stw r11,TI_LOCAL_FLAGS(r10) |
204 | lwz r11,TI_FLAGS(r10) | 204 | lwz r11,TI_FLAGS(r10) |
205 | andi. r11,r11,_TIF_SYSCALL_TRACE | 205 | andi. r11,r11,_TIF_SYSCALL_T_OR_A |
206 | bne- syscall_dotrace | 206 | bne- syscall_dotrace |
207 | syscall_dotrace_cont: | 207 | syscall_dotrace_cont: |
208 | cmplwi 0,r0,NR_syscalls | 208 | cmplwi 0,r0,NR_syscalls |
@@ -237,7 +237,7 @@ ret_from_syscall: | |||
237 | SYNC | 237 | SYNC |
238 | MTMSRD(r10) | 238 | MTMSRD(r10) |
239 | lwz r9,TI_FLAGS(r12) | 239 | lwz r9,TI_FLAGS(r12) |
240 | andi. r0,r9,(_TIF_SYSCALL_TRACE|_TIF_SIGPENDING|_TIF_NEED_RESCHED) | 240 | andi. r0,r9,(_TIF_SYSCALL_T_OR_A|_TIF_SIGPENDING|_TIF_NEED_RESCHED) |
241 | bne- syscall_exit_work | 241 | bne- syscall_exit_work |
242 | syscall_exit_cont: | 242 | syscall_exit_cont: |
243 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) | 243 | #if defined(CONFIG_4xx) || defined(CONFIG_BOOKE) |
@@ -277,7 +277,8 @@ syscall_dotrace: | |||
277 | SAVE_NVGPRS(r1) | 277 | SAVE_NVGPRS(r1) |
278 | li r0,0xc00 | 278 | li r0,0xc00 |
279 | stw r0,TRAP(r1) | 279 | stw r0,TRAP(r1) |
280 | bl do_syscall_trace | 280 | addi r3,r1,STACK_FRAME_OVERHEAD |
281 | bl do_syscall_trace_enter | ||
281 | lwz r0,GPR0(r1) /* Restore original registers */ | 282 | lwz r0,GPR0(r1) /* Restore original registers */ |
282 | lwz r3,GPR3(r1) | 283 | lwz r3,GPR3(r1) |
283 | lwz r4,GPR4(r1) | 284 | lwz r4,GPR4(r1) |
@@ -291,7 +292,7 @@ syscall_dotrace: | |||
291 | syscall_exit_work: | 292 | syscall_exit_work: |
292 | stw r6,RESULT(r1) /* Save result */ | 293 | stw r6,RESULT(r1) /* Save result */ |
293 | stw r3,GPR3(r1) /* Update return value */ | 294 | stw r3,GPR3(r1) /* Update return value */ |
294 | andi. r0,r9,_TIF_SYSCALL_TRACE | 295 | andi. r0,r9,_TIF_SYSCALL_T_OR_A |
295 | beq 5f | 296 | beq 5f |
296 | ori r10,r10,MSR_EE | 297 | ori r10,r10,MSR_EE |
297 | SYNC | 298 | SYNC |
@@ -303,7 +304,8 @@ syscall_exit_work: | |||
303 | li r4,0xc00 | 304 | li r4,0xc00 |
304 | stw r4,TRAP(r1) | 305 | stw r4,TRAP(r1) |
305 | 4: | 306 | 4: |
306 | bl do_syscall_trace | 307 | addi r3,r1,STACK_FRAME_OVERHEAD |
308 | bl do_syscall_trace_leave | ||
307 | REST_NVGPRS(r1) | 309 | REST_NVGPRS(r1) |
308 | 2: | 310 | 2: |
309 | lwz r3,GPR3(r1) | 311 | lwz r3,GPR3(r1) |
@@ -627,8 +629,8 @@ sigreturn_exit: | |||
627 | subi r1,r3,STACK_FRAME_OVERHEAD | 629 | subi r1,r3,STACK_FRAME_OVERHEAD |
628 | rlwinm r12,r1,0,0,18 /* current_thread_info() */ | 630 | rlwinm r12,r1,0,0,18 /* current_thread_info() */ |
629 | lwz r9,TI_FLAGS(r12) | 631 | lwz r9,TI_FLAGS(r12) |
630 | andi. r0,r9,_TIF_SYSCALL_TRACE | 632 | andi. r0,r9,_TIF_SYSCALL_T_OR_A |
631 | bnel- do_syscall_trace | 633 | bnel- do_syscall_trace_leave |
632 | /* fall through */ | 634 | /* fall through */ |
633 | 635 | ||
634 | .globl ret_from_except_full | 636 | .globl ret_from_except_full |
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index f22ddce36135..ce36e88ba627 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -232,7 +232,8 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
232 | tlbwe | 232 | tlbwe |
233 | 233 | ||
234 | /* 7. Jump to KERNELBASE mapping */ | 234 | /* 7. Jump to KERNELBASE mapping */ |
235 | li r7,0 | 235 | lis r7,MSR_KERNEL@h |
236 | ori r7,r7,MSR_KERNEL@l | ||
236 | bl 1f /* Find our address */ | 237 | bl 1f /* Find our address */ |
237 | 1: mflr r9 | 238 | 1: mflr r9 |
238 | rlwimi r6,r9,0,20,31 | 239 | rlwimi r6,r9,0,20,31 |
@@ -293,6 +294,18 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
293 | mtspr SPRN_HID0, r2 | 294 | mtspr SPRN_HID0, r2 |
294 | #endif | 295 | #endif |
295 | 296 | ||
297 | #if !defined(CONFIG_BDI_SWITCH) | ||
298 | /* | ||
299 | * The Abatron BDI JTAG debugger does not tolerate others | ||
300 | * mucking with the debug registers. | ||
301 | */ | ||
302 | lis r2,DBCR0_IDM@h | ||
303 | mtspr SPRN_DBCR0,r2 | ||
304 | /* clear any residual debug events */ | ||
305 | li r2,-1 | ||
306 | mtspr SPRN_DBSR,r2 | ||
307 | #endif | ||
308 | |||
296 | /* | 309 | /* |
297 | * This is where the main kernel code starts. | 310 | * This is where the main kernel code starts. |
298 | */ | 311 | */ |
diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S index e4f1615ec13f..7329ef177a18 100644 --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S | |||
@@ -619,7 +619,7 @@ _GLOBAL(flush_instruction_cache) | |||
619 | _GLOBAL(flush_icache_range) | 619 | _GLOBAL(flush_icache_range) |
620 | BEGIN_FTR_SECTION | 620 | BEGIN_FTR_SECTION |
621 | blr /* for 601, do nothing */ | 621 | blr /* for 601, do nothing */ |
622 | END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) | 622 | END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) |
623 | li r5,L1_CACHE_LINE_SIZE-1 | 623 | li r5,L1_CACHE_LINE_SIZE-1 |
624 | andc r3,r3,r5 | 624 | andc r3,r3,r5 |
625 | subf r4,r3,r4 | 625 | subf r4,r3,r4 |
@@ -736,7 +736,7 @@ _GLOBAL(flush_dcache_all) | |||
736 | _GLOBAL(__flush_dcache_icache) | 736 | _GLOBAL(__flush_dcache_icache) |
737 | BEGIN_FTR_SECTION | 737 | BEGIN_FTR_SECTION |
738 | blr /* for 601, do nothing */ | 738 | blr /* for 601, do nothing */ |
739 | END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) | 739 | END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) |
740 | rlwinm r3,r3,0,0,19 /* Get page base address */ | 740 | rlwinm r3,r3,0,0,19 /* Get page base address */ |
741 | li r4,4096/L1_CACHE_LINE_SIZE /* Number of lines in a page */ | 741 | li r4,4096/L1_CACHE_LINE_SIZE /* Number of lines in a page */ |
742 | mtctr r4 | 742 | mtctr r4 |
@@ -764,7 +764,7 @@ END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) | |||
764 | _GLOBAL(__flush_dcache_icache_phys) | 764 | _GLOBAL(__flush_dcache_icache_phys) |
765 | BEGIN_FTR_SECTION | 765 | BEGIN_FTR_SECTION |
766 | blr /* for 601, do nothing */ | 766 | blr /* for 601, do nothing */ |
767 | END_FTR_SECTION_IFSET(PPC_FEATURE_UNIFIED_CACHE) | 767 | END_FTR_SECTION_IFCLR(CPU_FTR_SPLIT_ID_CACHE) |
768 | mfmsr r10 | 768 | mfmsr r10 |
769 | rlwinm r0,r10,0,28,26 /* clear DR */ | 769 | rlwinm r0,r10,0,28,26 /* clear DR */ |
770 | mtmsr r0 | 770 | mtmsr r0 |
diff --git a/arch/ppc/kernel/pci.c b/arch/ppc/kernel/pci.c index 47a15306823a..6d7b92d72458 100644 --- a/arch/ppc/kernel/pci.c +++ b/arch/ppc/kernel/pci.c | |||
@@ -1003,7 +1003,7 @@ pci_create_OF_bus_map(void) | |||
1003 | } | 1003 | } |
1004 | } | 1004 | } |
1005 | 1005 | ||
1006 | static ssize_t pci_show_devspec(struct device *dev, char *buf) | 1006 | static ssize_t pci_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) |
1007 | { | 1007 | { |
1008 | struct pci_dev *pdev; | 1008 | struct pci_dev *pdev; |
1009 | struct device_node *np; | 1009 | struct device_node *np; |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index 2ccb58fe4fc3..d59ad07de8e7 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -55,7 +55,6 @@ | |||
55 | #define EXPORT_SYMTAB_STROPS | 55 | #define EXPORT_SYMTAB_STROPS |
56 | 56 | ||
57 | extern void transfer_to_handler(void); | 57 | extern void transfer_to_handler(void); |
58 | extern void do_syscall_trace(void); | ||
59 | extern void do_IRQ(struct pt_regs *regs); | 58 | extern void do_IRQ(struct pt_regs *regs); |
60 | extern void MachineCheckException(struct pt_regs *regs); | 59 | extern void MachineCheckException(struct pt_regs *regs); |
61 | extern void AlignmentException(struct pt_regs *regs); | 60 | extern void AlignmentException(struct pt_regs *regs); |
@@ -74,7 +73,6 @@ extern unsigned long mm_ptov (unsigned long paddr); | |||
74 | EXPORT_SYMBOL(clear_pages); | 73 | EXPORT_SYMBOL(clear_pages); |
75 | EXPORT_SYMBOL(clear_user_page); | 74 | EXPORT_SYMBOL(clear_user_page); |
76 | EXPORT_SYMBOL(do_signal); | 75 | EXPORT_SYMBOL(do_signal); |
77 | EXPORT_SYMBOL(do_syscall_trace); | ||
78 | EXPORT_SYMBOL(transfer_to_handler); | 76 | EXPORT_SYMBOL(transfer_to_handler); |
79 | EXPORT_SYMBOL(do_IRQ); | 77 | EXPORT_SYMBOL(do_IRQ); |
80 | EXPORT_SYMBOL(MachineCheckException); | 78 | EXPORT_SYMBOL(MachineCheckException); |
diff --git a/arch/ppc/kernel/ptrace.c b/arch/ppc/kernel/ptrace.c index 59d59a8dc249..e7aee4108dea 100644 --- a/arch/ppc/kernel/ptrace.c +++ b/arch/ppc/kernel/ptrace.c | |||
@@ -27,6 +27,9 @@ | |||
27 | #include <linux/user.h> | 27 | #include <linux/user.h> |
28 | #include <linux/security.h> | 28 | #include <linux/security.h> |
29 | #include <linux/signal.h> | 29 | #include <linux/signal.h> |
30 | #include <linux/seccomp.h> | ||
31 | #include <linux/audit.h> | ||
32 | #include <linux/module.h> | ||
30 | 33 | ||
31 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
32 | #include <asm/page.h> | 35 | #include <asm/page.h> |
@@ -455,11 +458,10 @@ out: | |||
455 | return ret; | 458 | return ret; |
456 | } | 459 | } |
457 | 460 | ||
458 | void do_syscall_trace(void) | 461 | static void do_syscall_trace(void) |
459 | { | 462 | { |
460 | if (!test_thread_flag(TIF_SYSCALL_TRACE) | 463 | /* the 0x80 provides a way for the tracing parent to distinguish |
461 | || !(current->ptrace & PT_PTRACED)) | 464 | between a syscall stop and SIGTRAP delivery */ |
462 | return; | ||
463 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) | 465 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) |
464 | ? 0x80 : 0)); | 466 | ? 0x80 : 0)); |
465 | 467 | ||
@@ -473,3 +475,33 @@ void do_syscall_trace(void) | |||
473 | current->exit_code = 0; | 475 | current->exit_code = 0; |
474 | } | 476 | } |
475 | } | 477 | } |
478 | |||
479 | void do_syscall_trace_enter(struct pt_regs *regs) | ||
480 | { | ||
481 | if (test_thread_flag(TIF_SYSCALL_TRACE) | ||
482 | && (current->ptrace & PT_PTRACED)) | ||
483 | do_syscall_trace(); | ||
484 | |||
485 | if (unlikely(current->audit_context)) | ||
486 | audit_syscall_entry(current, AUDIT_ARCH_PPC, | ||
487 | regs->gpr[0], | ||
488 | regs->gpr[3], regs->gpr[4], | ||
489 | regs->gpr[5], regs->gpr[6]); | ||
490 | } | ||
491 | |||
492 | void do_syscall_trace_leave(struct pt_regs *regs) | ||
493 | { | ||
494 | secure_computing(regs->gpr[0]); | ||
495 | |||
496 | if (unlikely(current->audit_context)) | ||
497 | audit_syscall_exit(current, | ||
498 | (regs->ccr&0x1000)?AUDITSC_FAILURE:AUDITSC_SUCCESS, | ||
499 | regs->result); | ||
500 | |||
501 | if ((test_thread_flag(TIF_SYSCALL_TRACE)) | ||
502 | && (current->ptrace & PT_PTRACED)) | ||
503 | do_syscall_trace(); | ||
504 | } | ||
505 | |||
506 | EXPORT_SYMBOL(do_syscall_trace_enter); | ||
507 | EXPORT_SYMBOL(do_syscall_trace_leave); | ||
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index f8e7e324a173..c65731e8bc65 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -408,12 +408,7 @@ static int emulate_string_inst(struct pt_regs *regs, u32 instword) | |||
408 | 408 | ||
409 | /* Early out if we are an invalid form of lswx */ | 409 | /* Early out if we are an invalid form of lswx */ |
410 | if ((instword & INST_STRING_MASK) == INST_LSWX) | 410 | if ((instword & INST_STRING_MASK) == INST_LSWX) |
411 | if ((rA >= rT) || (NB_RB >= rT) || (rT == rA) || (rT == NB_RB)) | 411 | if ((rT == rA) || (rT == NB_RB)) |
412 | return -EINVAL; | ||
413 | |||
414 | /* Early out if we are an invalid form of lswi */ | ||
415 | if ((instword & INST_STRING_MASK) == INST_LSWI) | ||
416 | if ((rA >= rT) || (rT == rA)) | ||
417 | return -EINVAL; | 412 | return -EINVAL; |
418 | 413 | ||
419 | EA = (rA == 0) ? 0 : regs->gpr[rA]; | 414 | EA = (rA == 0) ? 0 : regs->gpr[rA]; |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index b3b0f51979d2..e6348b5a1ddc 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -127,7 +127,6 @@ mpc834x_sys_map_io(void) | |||
127 | { | 127 | { |
128 | /* we steal the lowest ioremap addr for virt space */ | 128 | /* we steal the lowest ioremap addr for virt space */ |
129 | io_block_mapping(VIRT_IMMRBAR, immrbar, 1024*1024, _PAGE_IO); | 129 | io_block_mapping(VIRT_IMMRBAR, immrbar, 1024*1024, _PAGE_IO); |
130 | io_block_mapping(BCSR_VIRT_ADDR, BCSR_PHYS_ADDR, BCSR_SIZE, _PAGE_IO); | ||
131 | } | 130 | } |
132 | 131 | ||
133 | int | 132 | int |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index f4d055ae19c1..a2f6e49d7151 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h | |||
@@ -26,9 +26,14 @@ | |||
26 | #define VIRT_IMMRBAR ((uint)0xfe000000) | 26 | #define VIRT_IMMRBAR ((uint)0xfe000000) |
27 | 27 | ||
28 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) | 28 | #define BCSR_PHYS_ADDR ((uint)0xf8000000) |
29 | #define BCSR_VIRT_ADDR ((uint)0xfe100000) | ||
30 | #define BCSR_SIZE ((uint)(32 * 1024)) | 29 | #define BCSR_SIZE ((uint)(32 * 1024)) |
31 | 30 | ||
31 | #define BCSR_MISC_REG2_OFF 0x07 | ||
32 | #define BCSR_MISC_REG2_PORESET 0x01 | ||
33 | |||
34 | #define BCSR_MISC_REG3_OFF 0x08 | ||
35 | #define BCSR_MISC_REG3_CNFLOCK 0x80 | ||
36 | |||
32 | #ifdef CONFIG_PCI | 37 | #ifdef CONFIG_PCI |
33 | /* PCI interrupt controller */ | 38 | /* PCI interrupt controller */ |
34 | #define PIRQA MPC83xx_IRQ_IRQ4 | 39 | #define PIRQA MPC83xx_IRQ_IRQ4 |
diff --git a/arch/ppc/platforms/85xx/mpc8540_ads.c b/arch/ppc/platforms/85xx/mpc8540_ads.c index 4d857d6d633d..583838ab02d8 100644 --- a/arch/ppc/platforms/85xx/mpc8540_ads.c +++ b/arch/ppc/platforms/85xx/mpc8540_ads.c | |||
@@ -210,6 +210,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
210 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 210 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
211 | ppc_md.progress = gen550_progress; | 211 | ppc_md.progress = gen550_progress; |
212 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 212 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
213 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
214 | ppc_md.early_serial_map = mpc85xx_early_serial_map; | ||
215 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
213 | 216 | ||
214 | if (ppc_md.progress) | 217 | if (ppc_md.progress) |
215 | ppc_md.progress("mpc8540ads_init(): exit", 0); | 218 | ppc_md.progress("mpc8540ads_init(): exit", 0); |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c index 6c020d67ad70..e7cfa498568c 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.c +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.c | |||
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/machdep.h> | 44 | #include <asm/machdep.h> |
45 | #include <asm/prom.h> | 45 | #include <asm/prom.h> |
46 | #include <asm/open_pic.h> | 46 | #include <asm/open_pic.h> |
47 | #include <asm/i8259.h> | ||
47 | #include <asm/bootinfo.h> | 48 | #include <asm/bootinfo.h> |
48 | #include <asm/pci-bridge.h> | 49 | #include <asm/pci-bridge.h> |
49 | #include <asm/mpc85xx.h> | 50 | #include <asm/mpc85xx.h> |
@@ -181,6 +182,7 @@ void __init | |||
181 | mpc85xx_cds_init_IRQ(void) | 182 | mpc85xx_cds_init_IRQ(void) |
182 | { | 183 | { |
183 | bd_t *binfo = (bd_t *) __res; | 184 | bd_t *binfo = (bd_t *) __res; |
185 | int i; | ||
184 | 186 | ||
185 | /* Determine the Physical Address of the OpenPIC regs */ | 187 | /* Determine the Physical Address of the OpenPIC regs */ |
186 | phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; | 188 | phys_addr_t OpenPIC_PAddr = binfo->bi_immr_base + MPC85xx_OPENPIC_OFFSET; |
@@ -198,6 +200,15 @@ mpc85xx_cds_init_IRQ(void) | |||
198 | */ | 200 | */ |
199 | openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); | 201 | openpic_init(MPC85xx_OPENPIC_IRQ_OFFSET); |
200 | 202 | ||
203 | #ifdef CONFIG_PCI | ||
204 | openpic_hookup_cascade(PIRQ0A, "82c59 cascade", i8259_irq); | ||
205 | |||
206 | for (i = 0; i < NUM_8259_INTERRUPTS; i++) | ||
207 | irq_desc[i].handler = &i8259_pic; | ||
208 | |||
209 | i8259_init(0); | ||
210 | #endif | ||
211 | |||
201 | #ifdef CONFIG_CPM2 | 212 | #ifdef CONFIG_CPM2 |
202 | /* Setup CPM2 PIC */ | 213 | /* Setup CPM2 PIC */ |
203 | cpm2_init_IRQ(); | 214 | cpm2_init_IRQ(); |
@@ -231,7 +242,7 @@ mpc85xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
231 | * interrupt on slot */ | 242 | * interrupt on slot */ |
232 | { | 243 | { |
233 | { 0, 1, 2, 3 }, /* 16 - PMC */ | 244 | { 0, 1, 2, 3 }, /* 16 - PMC */ |
234 | { 3, 0, 0, 0 }, /* 17 P2P (Tsi320) */ | 245 | { 0, 1, 2, 3 }, /* 17 P2P (Tsi320) */ |
235 | { 0, 1, 2, 3 }, /* 18 - Slot 1 */ | 246 | { 0, 1, 2, 3 }, /* 18 - Slot 1 */ |
236 | { 1, 2, 3, 0 }, /* 19 - Slot 2 */ | 247 | { 1, 2, 3, 0 }, /* 19 - Slot 2 */ |
237 | { 2, 3, 0, 1 }, /* 20 - Slot 3 */ | 248 | { 2, 3, 0, 1 }, /* 20 - Slot 3 */ |
@@ -280,13 +291,135 @@ mpc85xx_exclude_device(u_char bus, u_char devfn) | |||
280 | return PCIBIOS_DEVICE_NOT_FOUND; | 291 | return PCIBIOS_DEVICE_NOT_FOUND; |
281 | #endif | 292 | #endif |
282 | /* We explicitly do not go past the Tundra 320 Bridge */ | 293 | /* We explicitly do not go past the Tundra 320 Bridge */ |
283 | if (bus == 1) | 294 | if ((bus == 1) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) |
284 | return PCIBIOS_DEVICE_NOT_FOUND; | 295 | return PCIBIOS_DEVICE_NOT_FOUND; |
285 | if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) | 296 | if ((bus == 0) && (PCI_SLOT(devfn) == ARCADIA_2ND_BRIDGE_IDSEL)) |
286 | return PCIBIOS_DEVICE_NOT_FOUND; | 297 | return PCIBIOS_DEVICE_NOT_FOUND; |
287 | else | 298 | else |
288 | return PCIBIOS_SUCCESSFUL; | 299 | return PCIBIOS_SUCCESSFUL; |
289 | } | 300 | } |
301 | |||
302 | void __init | ||
303 | mpc85xx_cds_enable_via(struct pci_controller *hose) | ||
304 | { | ||
305 | u32 pci_class; | ||
306 | u16 vid, did; | ||
307 | |||
308 | early_read_config_dword(hose, 0, 0x88, PCI_CLASS_REVISION, &pci_class); | ||
309 | if ((pci_class >> 16) != PCI_CLASS_BRIDGE_PCI) | ||
310 | return; | ||
311 | |||
312 | /* Configure P2P so that we can reach bus 1 */ | ||
313 | early_write_config_byte(hose, 0, 0x88, PCI_PRIMARY_BUS, 0); | ||
314 | early_write_config_byte(hose, 0, 0x88, PCI_SECONDARY_BUS, 1); | ||
315 | early_write_config_byte(hose, 0, 0x88, PCI_SUBORDINATE_BUS, 0xff); | ||
316 | |||
317 | early_read_config_word(hose, 1, 0x10, PCI_VENDOR_ID, &vid); | ||
318 | early_read_config_word(hose, 1, 0x10, PCI_DEVICE_ID, &did); | ||
319 | |||
320 | if ((vid != PCI_VENDOR_ID_VIA) || | ||
321 | (did != PCI_DEVICE_ID_VIA_82C686)) | ||
322 | return; | ||
323 | |||
324 | /* Enable USB and IDE functions */ | ||
325 | early_write_config_byte(hose, 1, 0x10, 0x48, 0x08); | ||
326 | } | ||
327 | |||
328 | void __init | ||
329 | mpc85xx_cds_fixup_via(struct pci_controller *hose) | ||
330 | { | ||
331 | u32 pci_class; | ||
332 | u16 vid, did; | ||
333 | |||
334 | early_read_config_dword(hose, 0, 0x88, PCI_CLASS_REVISION, &pci_class); | ||
335 | if ((pci_class >> 16) != PCI_CLASS_BRIDGE_PCI) | ||
336 | return; | ||
337 | |||
338 | /* | ||
339 | * Force the backplane P2P bridge to have a window | ||
340 | * open from 0x00000000-0x00001fff in PCI I/O space. | ||
341 | * This allows legacy I/O (i8259, etc) on the VIA | ||
342 | * southbridge to be accessed. | ||
343 | */ | ||
344 | early_write_config_byte(hose, 0, 0x88, PCI_IO_BASE, 0x00); | ||
345 | early_write_config_word(hose, 0, 0x88, PCI_IO_BASE_UPPER16, 0x0000); | ||
346 | early_write_config_byte(hose, 0, 0x88, PCI_IO_LIMIT, 0x10); | ||
347 | early_write_config_word(hose, 0, 0x88, PCI_IO_LIMIT_UPPER16, 0x0000); | ||
348 | |||
349 | early_read_config_word(hose, 1, 0x10, PCI_VENDOR_ID, &vid); | ||
350 | early_read_config_word(hose, 1, 0x10, PCI_DEVICE_ID, &did); | ||
351 | if ((vid != PCI_VENDOR_ID_VIA) || | ||
352 | (did != PCI_DEVICE_ID_VIA_82C686)) | ||
353 | return; | ||
354 | |||
355 | /* | ||
356 | * Since the P2P window was forced to cover the fixed | ||
357 | * legacy I/O addresses, it is necessary to manually | ||
358 | * place the base addresses for the IDE and USB functions | ||
359 | * within this window. | ||
360 | */ | ||
361 | /* Function 1, IDE */ | ||
362 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_0, 0x1ff8); | ||
363 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_1, 0x1ff4); | ||
364 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_2, 0x1fe8); | ||
365 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_3, 0x1fe4); | ||
366 | early_write_config_dword(hose, 1, 0x11, PCI_BASE_ADDRESS_4, 0x1fd0); | ||
367 | |||
368 | /* Function 2, USB ports 0-1 */ | ||
369 | early_write_config_dword(hose, 1, 0x12, PCI_BASE_ADDRESS_4, 0x1fa0); | ||
370 | |||
371 | /* Function 3, USB ports 2-3 */ | ||
372 | early_write_config_dword(hose, 1, 0x13, PCI_BASE_ADDRESS_4, 0x1f80); | ||
373 | |||
374 | /* Function 5, Power Management */ | ||
375 | early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_0, 0x1e00); | ||
376 | early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_1, 0x1dfc); | ||
377 | early_write_config_dword(hose, 1, 0x15, PCI_BASE_ADDRESS_2, 0x1df8); | ||
378 | |||
379 | /* Function 6, AC97 Interface */ | ||
380 | early_write_config_dword(hose, 1, 0x16, PCI_BASE_ADDRESS_0, 0x1c00); | ||
381 | } | ||
382 | |||
383 | void __init | ||
384 | mpc85xx_cds_pcibios_fixup(void) | ||
385 | { | ||
386 | struct pci_dev *dev = NULL; | ||
387 | u_char c; | ||
388 | |||
389 | if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, | ||
390 | PCI_DEVICE_ID_VIA_82C586_1, NULL))) { | ||
391 | /* | ||
392 | * U-Boot does not set the enable bits | ||
393 | * for the IDE device. Force them on here. | ||
394 | */ | ||
395 | pci_read_config_byte(dev, 0x40, &c); | ||
396 | c |= 0x03; /* IDE: Chip Enable Bits */ | ||
397 | pci_write_config_byte(dev, 0x40, c); | ||
398 | |||
399 | /* | ||
400 | * Since only primary interface works, force the | ||
401 | * IDE function to standard primary IDE interrupt | ||
402 | * w/ 8259 offset | ||
403 | */ | ||
404 | dev->irq = 14; | ||
405 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq); | ||
406 | } | ||
407 | |||
408 | /* | ||
409 | * Force legacy USB interrupt routing | ||
410 | */ | ||
411 | if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, | ||
412 | PCI_DEVICE_ID_VIA_82C586_2, NULL))) { | ||
413 | dev->irq = 10; | ||
414 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 10); | ||
415 | } | ||
416 | |||
417 | if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, | ||
418 | PCI_DEVICE_ID_VIA_82C586_2, dev))) { | ||
419 | dev->irq = 11; | ||
420 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, 11); | ||
421 | } | ||
422 | } | ||
290 | #endif /* CONFIG_PCI */ | 423 | #endif /* CONFIG_PCI */ |
291 | 424 | ||
292 | TODC_ALLOC(); | 425 | TODC_ALLOC(); |
@@ -328,6 +461,9 @@ mpc85xx_cds_setup_arch(void) | |||
328 | loops_per_jiffy = freq / HZ; | 461 | loops_per_jiffy = freq / HZ; |
329 | 462 | ||
330 | #ifdef CONFIG_PCI | 463 | #ifdef CONFIG_PCI |
464 | /* VIA IDE configuration */ | ||
465 | ppc_md.pcibios_fixup = mpc85xx_cds_pcibios_fixup; | ||
466 | |||
331 | /* setup PCI host bridges */ | 467 | /* setup PCI host bridges */ |
332 | mpc85xx_setup_hose(); | 468 | mpc85xx_setup_hose(); |
333 | #endif | 469 | #endif |
@@ -459,6 +595,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
459 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 595 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
460 | ppc_md.progress = gen550_progress; | 596 | ppc_md.progress = gen550_progress; |
461 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 597 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
598 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
599 | ppc_md.early_serial_map = mpc85xx_early_serial_map; | ||
600 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
462 | 601 | ||
463 | if (ppc_md.progress) | 602 | if (ppc_md.progress) |
464 | ppc_md.progress("mpc85xx_cds_init(): exit", 0); | 603 | ppc_md.progress("mpc85xx_cds_init(): exit", 0); |
diff --git a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h index 7627d77504bd..12b292c6ae32 100644 --- a/arch/ppc/platforms/85xx/mpc85xx_cds_common.h +++ b/arch/ppc/platforms/85xx/mpc85xx_cds_common.h | |||
@@ -77,4 +77,7 @@ | |||
77 | 77 | ||
78 | #define MPC85XX_PCI2_IO_SIZE 0x01000000 | 78 | #define MPC85XX_PCI2_IO_SIZE 0x01000000 |
79 | 79 | ||
80 | #define NR_8259_INTS 16 | ||
81 | #define CPM_IRQ_OFFSET NR_8259_INTS | ||
82 | |||
80 | #endif /* __MACH_MPC85XX_CDS_H__ */ | 83 | #endif /* __MACH_MPC85XX_CDS_H__ */ |
diff --git a/arch/ppc/platforms/85xx/sbc8560.c b/arch/ppc/platforms/85xx/sbc8560.c index 9ab05e590c3e..7b9e1543e175 100644 --- a/arch/ppc/platforms/85xx/sbc8560.c +++ b/arch/ppc/platforms/85xx/sbc8560.c | |||
@@ -221,6 +221,9 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
221 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) | 221 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_SERIAL_TEXT_DEBUG) |
222 | ppc_md.progress = gen550_progress; | 222 | ppc_md.progress = gen550_progress; |
223 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ | 223 | #endif /* CONFIG_SERIAL_8250 && CONFIG_SERIAL_TEXT_DEBUG */ |
224 | #if defined(CONFIG_SERIAL_8250) && defined(CONFIG_KGDB) | ||
225 | ppc_md.early_serial_map = sbc8560_early_serial_map; | ||
226 | #endif /* CONFIG_SERIAL_8250 && CONFIG_KGDB */ | ||
224 | 227 | ||
225 | if (ppc_md.progress) | 228 | if (ppc_md.progress) |
226 | ppc_md.progress("sbc8560_init(): exit", 0); | 229 | ppc_md.progress("sbc8560_init(): exit", 0); |
diff --git a/arch/ppc/platforms/pmac_cpufreq.c b/arch/ppc/platforms/pmac_cpufreq.c index f7fb2786cd50..5fdd4f607a40 100644 --- a/arch/ppc/platforms/pmac_cpufreq.c +++ b/arch/ppc/platforms/pmac_cpufreq.c | |||
@@ -83,16 +83,13 @@ static u32 frequency_gpio; | |||
83 | static u32 slew_done_gpio; | 83 | static u32 slew_done_gpio; |
84 | static int no_schedule; | 84 | static int no_schedule; |
85 | static int has_cpu_l2lve; | 85 | static int has_cpu_l2lve; |
86 | 86 | static int is_pmu_based; | |
87 | |||
88 | #define PMAC_CPU_LOW_SPEED 1 | ||
89 | #define PMAC_CPU_HIGH_SPEED 0 | ||
90 | 87 | ||
91 | /* There are only two frequency states for each processor. Values | 88 | /* There are only two frequency states for each processor. Values |
92 | * are in kHz for the time being. | 89 | * are in kHz for the time being. |
93 | */ | 90 | */ |
94 | #define CPUFREQ_HIGH PMAC_CPU_HIGH_SPEED | 91 | #define CPUFREQ_HIGH 0 |
95 | #define CPUFREQ_LOW PMAC_CPU_LOW_SPEED | 92 | #define CPUFREQ_LOW 1 |
96 | 93 | ||
97 | static struct cpufreq_frequency_table pmac_cpu_freqs[] = { | 94 | static struct cpufreq_frequency_table pmac_cpu_freqs[] = { |
98 | {CPUFREQ_HIGH, 0}, | 95 | {CPUFREQ_HIGH, 0}, |
@@ -100,6 +97,11 @@ static struct cpufreq_frequency_table pmac_cpu_freqs[] = { | |||
100 | {0, CPUFREQ_TABLE_END}, | 97 | {0, CPUFREQ_TABLE_END}, |
101 | }; | 98 | }; |
102 | 99 | ||
100 | static struct freq_attr* pmac_cpu_freqs_attr[] = { | ||
101 | &cpufreq_freq_attr_scaling_available_freqs, | ||
102 | NULL, | ||
103 | }; | ||
104 | |||
103 | static inline void local_delay(unsigned long ms) | 105 | static inline void local_delay(unsigned long ms) |
104 | { | 106 | { |
105 | if (no_schedule) | 107 | if (no_schedule) |
@@ -269,6 +271,8 @@ static int __pmac pmu_set_cpu_speed(int low_speed) | |||
269 | #ifdef DEBUG_FREQ | 271 | #ifdef DEBUG_FREQ |
270 | printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); | 272 | printk(KERN_DEBUG "HID1, before: %x\n", mfspr(SPRN_HID1)); |
271 | #endif | 273 | #endif |
274 | pmu_suspend(); | ||
275 | |||
272 | /* Disable all interrupt sources on openpic */ | 276 | /* Disable all interrupt sources on openpic */ |
273 | pic_prio = openpic_get_priority(); | 277 | pic_prio = openpic_get_priority(); |
274 | openpic_set_priority(0xf); | 278 | openpic_set_priority(0xf); |
@@ -343,6 +347,8 @@ static int __pmac pmu_set_cpu_speed(int low_speed) | |||
343 | debug_calc_bogomips(); | 347 | debug_calc_bogomips(); |
344 | #endif | 348 | #endif |
345 | 349 | ||
350 | pmu_resume(); | ||
351 | |||
346 | preempt_enable(); | 352 | preempt_enable(); |
347 | 353 | ||
348 | return 0; | 354 | return 0; |
@@ -355,7 +361,7 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
355 | static unsigned long prev_l3cr; | 361 | static unsigned long prev_l3cr; |
356 | 362 | ||
357 | freqs.old = cur_freq; | 363 | freqs.old = cur_freq; |
358 | freqs.new = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq; | 364 | freqs.new = (speed_mode == CPUFREQ_HIGH) ? hi_freq : low_freq; |
359 | freqs.cpu = smp_processor_id(); | 365 | freqs.cpu = smp_processor_id(); |
360 | 366 | ||
361 | if (freqs.old == freqs.new) | 367 | if (freqs.old == freqs.new) |
@@ -363,7 +369,7 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
363 | 369 | ||
364 | if (notify) | 370 | if (notify) |
365 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 371 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
366 | if (speed_mode == PMAC_CPU_LOW_SPEED && | 372 | if (speed_mode == CPUFREQ_LOW && |
367 | cpu_has_feature(CPU_FTR_L3CR)) { | 373 | cpu_has_feature(CPU_FTR_L3CR)) { |
368 | l3cr = _get_L3CR(); | 374 | l3cr = _get_L3CR(); |
369 | if (l3cr & L3CR_L3E) { | 375 | if (l3cr & L3CR_L3E) { |
@@ -371,8 +377,8 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
371 | _set_L3CR(0); | 377 | _set_L3CR(0); |
372 | } | 378 | } |
373 | } | 379 | } |
374 | set_speed_proc(speed_mode == PMAC_CPU_LOW_SPEED); | 380 | set_speed_proc(speed_mode == CPUFREQ_LOW); |
375 | if (speed_mode == PMAC_CPU_HIGH_SPEED && | 381 | if (speed_mode == CPUFREQ_HIGH && |
376 | cpu_has_feature(CPU_FTR_L3CR)) { | 382 | cpu_has_feature(CPU_FTR_L3CR)) { |
377 | l3cr = _get_L3CR(); | 383 | l3cr = _get_L3CR(); |
378 | if ((prev_l3cr & L3CR_L3E) && l3cr != prev_l3cr) | 384 | if ((prev_l3cr & L3CR_L3E) && l3cr != prev_l3cr) |
@@ -380,7 +386,7 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify) | |||
380 | } | 386 | } |
381 | if (notify) | 387 | if (notify) |
382 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 388 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
383 | cur_freq = (speed_mode == PMAC_CPU_HIGH_SPEED) ? hi_freq : low_freq; | 389 | cur_freq = (speed_mode == CPUFREQ_HIGH) ? hi_freq : low_freq; |
384 | 390 | ||
385 | return 0; | 391 | return 0; |
386 | } | 392 | } |
@@ -423,7 +429,8 @@ static int __pmac pmac_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
423 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 429 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
424 | policy->cur = cur_freq; | 430 | policy->cur = cur_freq; |
425 | 431 | ||
426 | return cpufreq_frequency_table_cpuinfo(policy, &pmac_cpu_freqs[0]); | 432 | cpufreq_frequency_table_get_attr(pmac_cpu_freqs, policy->cpu); |
433 | return cpufreq_frequency_table_cpuinfo(policy, pmac_cpu_freqs); | ||
427 | } | 434 | } |
428 | 435 | ||
429 | static u32 __pmac read_gpio(struct device_node *np) | 436 | static u32 __pmac read_gpio(struct device_node *np) |
@@ -456,8 +463,8 @@ static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, u32 state) | |||
456 | */ | 463 | */ |
457 | no_schedule = 1; | 464 | no_schedule = 1; |
458 | sleep_freq = cur_freq; | 465 | sleep_freq = cur_freq; |
459 | if (cur_freq == low_freq) | 466 | if (cur_freq == low_freq && !is_pmu_based) |
460 | do_set_cpu_speed(PMAC_CPU_HIGH_SPEED, 0); | 467 | do_set_cpu_speed(CPUFREQ_HIGH, 0); |
461 | return 0; | 468 | return 0; |
462 | } | 469 | } |
463 | 470 | ||
@@ -473,8 +480,8 @@ static int __pmac pmac_cpufreq_resume(struct cpufreq_policy *policy) | |||
473 | * is that we force a switch to whatever it was, which is | 480 | * is that we force a switch to whatever it was, which is |
474 | * probably high speed due to our suspend() routine | 481 | * probably high speed due to our suspend() routine |
475 | */ | 482 | */ |
476 | do_set_cpu_speed(sleep_freq == low_freq ? PMAC_CPU_LOW_SPEED | 483 | do_set_cpu_speed(sleep_freq == low_freq ? |
477 | : PMAC_CPU_HIGH_SPEED, 0); | 484 | CPUFREQ_LOW : CPUFREQ_HIGH, 0); |
478 | 485 | ||
479 | no_schedule = 0; | 486 | no_schedule = 0; |
480 | return 0; | 487 | return 0; |
@@ -488,6 +495,7 @@ static struct cpufreq_driver pmac_cpufreq_driver = { | |||
488 | .suspend = pmac_cpufreq_suspend, | 495 | .suspend = pmac_cpufreq_suspend, |
489 | .resume = pmac_cpufreq_resume, | 496 | .resume = pmac_cpufreq_resume, |
490 | .flags = CPUFREQ_PM_NO_WARN, | 497 | .flags = CPUFREQ_PM_NO_WARN, |
498 | .attr = pmac_cpu_freqs_attr, | ||
491 | .name = "powermac", | 499 | .name = "powermac", |
492 | .owner = THIS_MODULE, | 500 | .owner = THIS_MODULE, |
493 | }; | 501 | }; |
@@ -580,6 +588,7 @@ static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode) | |||
580 | return 1; | 588 | return 1; |
581 | hi_freq = (*value) / 1000; | 589 | hi_freq = (*value) / 1000; |
582 | set_speed_proc = pmu_set_cpu_speed; | 590 | set_speed_proc = pmu_set_cpu_speed; |
591 | is_pmu_based = 1; | ||
583 | 592 | ||
584 | return 0; | 593 | return 0; |
585 | } | 594 | } |
@@ -684,6 +693,7 @@ static int __init pmac_cpufreq_setup(void) | |||
684 | hi_freq = cur_freq; | 693 | hi_freq = cur_freq; |
685 | low_freq = 400000; | 694 | low_freq = 400000; |
686 | set_speed_proc = pmu_set_cpu_speed; | 695 | set_speed_proc = pmu_set_cpu_speed; |
696 | is_pmu_based = 1; | ||
687 | } | 697 | } |
688 | /* Else check for TiPb 400 & 500 */ | 698 | /* Else check for TiPb 400 & 500 */ |
689 | else if (machine_is_compatible("PowerBook3,2")) { | 699 | else if (machine_is_compatible("PowerBook3,2")) { |
@@ -695,6 +705,7 @@ static int __init pmac_cpufreq_setup(void) | |||
695 | hi_freq = cur_freq; | 705 | hi_freq = cur_freq; |
696 | low_freq = 300000; | 706 | low_freq = 300000; |
697 | set_speed_proc = pmu_set_cpu_speed; | 707 | set_speed_proc = pmu_set_cpu_speed; |
708 | is_pmu_based = 1; | ||
698 | } | 709 | } |
699 | /* Else check for 750FX */ | 710 | /* Else check for 750FX */ |
700 | else if (PVR_VER(mfspr(SPRN_PVR)) == 0x7000) | 711 | else if (PVR_VER(mfspr(SPRN_PVR)) == 0x7000) |
diff --git a/arch/ppc/platforms/pq2ads.h b/arch/ppc/platforms/pq2ads.h index cf5e5dd06d63..067d9a5aebc1 100644 --- a/arch/ppc/platforms/pq2ads.h +++ b/arch/ppc/platforms/pq2ads.h | |||
@@ -49,10 +49,10 @@ | |||
49 | /* PCI interrupt controller */ | 49 | /* PCI interrupt controller */ |
50 | #define PCI_INT_STAT_REG 0xF8200000 | 50 | #define PCI_INT_STAT_REG 0xF8200000 |
51 | #define PCI_INT_MASK_REG 0xF8200004 | 51 | #define PCI_INT_MASK_REG 0xF8200004 |
52 | #define PIRQA (NR_SIU_INTS + 0) | 52 | #define PIRQA (NR_CPM_INTS + 0) |
53 | #define PIRQB (NR_SIU_INTS + 1) | 53 | #define PIRQB (NR_CPM_INTS + 1) |
54 | #define PIRQC (NR_SIU_INTS + 2) | 54 | #define PIRQC (NR_CPM_INTS + 2) |
55 | #define PIRQD (NR_SIU_INTS + 3) | 55 | #define PIRQD (NR_CPM_INTS + 3) |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * PCI memory map definitions for MPC8266ADS-PCI. | 58 | * PCI memory map definitions for MPC8266ADS-PCI. |
@@ -68,28 +68,23 @@ | |||
68 | * 0x00000000-0x1FFFFFFF 0x00000000-0x1FFFFFFF MPC8266 local memory | 68 | * 0x00000000-0x1FFFFFFF 0x00000000-0x1FFFFFFF MPC8266 local memory |
69 | */ | 69 | */ |
70 | 70 | ||
71 | /* window for a PCI master to access MPC8266 memory */ | 71 | /* All the other PCI memory map definitions reside at syslib/m82xx_pci.h |
72 | #define PCI_SLV_MEM_LOCAL 0x00000000 /* Local base */ | 72 | Here we should redefine what is unique for this board */ |
73 | #define PCI_SLV_MEM_BUS 0x00000000 /* PCI base */ | 73 | #define M82xx_PCI_SLAVE_MEM_LOCAL 0x00000000 /* Local base */ |
74 | #define M82xx_PCI_SLAVE_MEM_BUS 0x00000000 /* PCI base */ | ||
75 | #define M82xx_PCI_SLAVE_MEM_SIZE 0x10000000 /* 256 Mb */ | ||
74 | 76 | ||
75 | /* window for the processor to access PCI memory with prefetching */ | 77 | #define M82xx_PCI_SLAVE_SEC_WND_SIZE ~(0x40000000 - 1U) /* 2 x 512Mb */ |
76 | #define PCI_MSTR_MEM_LOCAL 0x80000000 /* Local base */ | 78 | #define M82xx_PCI_SLAVE_SEC_WND_BASE 0x80000000 /* PCI Memory base */ |
77 | #define PCI_MSTR_MEM_BUS 0x80000000 /* PCI base */ | ||
78 | #define PCI_MSTR_MEM_SIZE 0x20000000 /* 512MB */ | ||
79 | 79 | ||
80 | /* window for the processor to access PCI memory without prefetching */ | 80 | #if defined(CONFIG_ADS8272) |
81 | #define PCI_MSTR_MEMIO_LOCAL 0xA0000000 /* Local base */ | 81 | #define PCI_INT_TO_SIU SIU_INT_IRQ2 |
82 | #define PCI_MSTR_MEMIO_BUS 0xA0000000 /* PCI base */ | 82 | #elif defined(CONFIG_PQ2FADS) |
83 | #define PCI_MSTR_MEMIO_SIZE 0x20000000 /* 512MB */ | 83 | #define PCI_INT_TO_SIU SIU_INT_IRQ6 |
84 | #else | ||
85 | #warning PCI Bridge will be without interrupts support | ||
86 | #endif | ||
84 | 87 | ||
85 | /* window for the processor to access PCI I/O */ | ||
86 | #define PCI_MSTR_IO_LOCAL 0xF4000000 /* Local base */ | ||
87 | #define PCI_MSTR_IO_BUS 0x00000000 /* PCI base */ | ||
88 | #define PCI_MSTR_IO_SIZE 0x04000000 /* 64MB */ | ||
89 | |||
90 | #define _IO_BASE PCI_MSTR_IO_LOCAL | ||
91 | #define _ISA_MEM_BASE PCI_MSTR_MEMIO_LOCAL | ||
92 | #define PCI_DRAM_OFFSET PCI_SLV_MEM_BUS | ||
93 | #endif /* CONFIG_PCI */ | 88 | #endif /* CONFIG_PCI */ |
94 | 89 | ||
95 | #endif /* __MACH_ADS8260_DEFS */ | 90 | #endif /* __MACH_ADS8260_DEFS */ |
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index dd418ea3426c..96acf85800d4 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -81,7 +81,7 @@ obj-$(CONFIG_SBC82xx) += todc_time.o | |||
81 | obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ | 81 | obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ |
82 | todc_time.o | 82 | todc_time.o |
83 | obj-$(CONFIG_8260) += m8260_setup.o | 83 | obj-$(CONFIG_8260) += m8260_setup.o |
84 | obj-$(CONFIG_PCI_8260) += m8260_pci.o indirect_pci.o | 84 | obj-$(CONFIG_PCI_8260) += m82xx_pci.o indirect_pci.o pci_auto.o |
85 | obj-$(CONFIG_8260_PCI9) += m8260_pci_erratum9.o | 85 | obj-$(CONFIG_8260_PCI9) += m8260_pci_erratum9.o |
86 | obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o | 86 | obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o |
87 | ifeq ($(CONFIG_PPC_GEN550),y) | 87 | ifeq ($(CONFIG_PPC_GEN550),y) |
@@ -97,7 +97,7 @@ obj-$(CONFIG_MPC10X_OPENPIC) += open_pic.o | |||
97 | obj-$(CONFIG_40x) += dcr.o | 97 | obj-$(CONFIG_40x) += dcr.o |
98 | obj-$(CONFIG_BOOKE) += dcr.o | 98 | obj-$(CONFIG_BOOKE) += dcr.o |
99 | obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o \ | 99 | obj-$(CONFIG_85xx) += open_pic.o ppc85xx_common.o ppc85xx_setup.o \ |
100 | ppc_sys.o mpc85xx_sys.o \ | 100 | ppc_sys.o i8259.o mpc85xx_sys.o \ |
101 | mpc85xx_devices.o | 101 | mpc85xx_devices.o |
102 | ifeq ($(CONFIG_85xx),y) | 102 | ifeq ($(CONFIG_85xx),y) |
103 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o | 103 | obj-$(CONFIG_PCI) += indirect_pci.o pci_auto.o |
diff --git a/arch/ppc/syslib/m8260_pci.c b/arch/ppc/syslib/m8260_pci.c deleted file mode 100644 index 057cc3f8ff37..000000000000 --- a/arch/ppc/syslib/m8260_pci.c +++ /dev/null | |||
@@ -1,193 +0,0 @@ | |||
1 | /* | ||
2 | * (C) Copyright 2003 | ||
3 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||
4 | * | ||
5 | * (C) Copyright 2004 Red Hat, Inc. | ||
6 | * | ||
7 | * See file CREDITS for list of people who contributed to this | ||
8 | * project. | ||
9 | * | ||
10 | * This program is free software; you can redistribute it and/or | ||
11 | * modify it under the terms of the GNU General Public License as | ||
12 | * published by the Free Software Foundation; either version 2 of | ||
13 | * the License, or (at your option) any later version. | ||
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, | ||
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | * GNU General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License | ||
21 | * along with this program; if not, write to the Free Software | ||
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
23 | * MA 02111-1307 USA | ||
24 | */ | ||
25 | |||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/init.h> | ||
28 | #include <linux/pci.h> | ||
29 | #include <linux/slab.h> | ||
30 | #include <linux/delay.h> | ||
31 | |||
32 | #include <asm/byteorder.h> | ||
33 | #include <asm/io.h> | ||
34 | #include <asm/irq.h> | ||
35 | #include <asm/uaccess.h> | ||
36 | #include <asm/machdep.h> | ||
37 | #include <asm/pci-bridge.h> | ||
38 | #include <asm/immap_cpm2.h> | ||
39 | #include <asm/mpc8260.h> | ||
40 | |||
41 | #include "m8260_pci.h" | ||
42 | |||
43 | |||
44 | /* PCI bus configuration registers. | ||
45 | */ | ||
46 | |||
47 | static void __init m8260_setup_pci(struct pci_controller *hose) | ||
48 | { | ||
49 | volatile cpm2_map_t *immap = cpm2_immr; | ||
50 | unsigned long pocmr; | ||
51 | u16 tempShort; | ||
52 | |||
53 | #ifndef CONFIG_ATC /* already done in U-Boot */ | ||
54 | /* | ||
55 | * Setting required to enable IRQ1-IRQ7 (SIUMCR [DPPC]), | ||
56 | * and local bus for PCI (SIUMCR [LBPC]). | ||
57 | */ | ||
58 | immap->im_siu_conf.siu_82xx.sc_siumcr = 0x00640000; | ||
59 | #endif | ||
60 | |||
61 | /* Make PCI lowest priority */ | ||
62 | /* Each 4 bits is a device bus request and the MS 4bits | ||
63 | is highest priority */ | ||
64 | /* Bus 4bit value | ||
65 | --- ---------- | ||
66 | CPM high 0b0000 | ||
67 | CPM middle 0b0001 | ||
68 | CPM low 0b0010 | ||
69 | PCI reguest 0b0011 | ||
70 | Reserved 0b0100 | ||
71 | Reserved 0b0101 | ||
72 | Internal Core 0b0110 | ||
73 | External Master 1 0b0111 | ||
74 | External Master 2 0b1000 | ||
75 | External Master 3 0b1001 | ||
76 | The rest are reserved */ | ||
77 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x61207893; | ||
78 | |||
79 | /* Park bus on core while modifying PCI Bus accesses */ | ||
80 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = 0x6; | ||
81 | |||
82 | /* | ||
83 | * Set up master window that allows the CPU to access PCI space. This | ||
84 | * window is set up using the first SIU PCIBR registers. | ||
85 | */ | ||
86 | immap->im_memctl.memc_pcimsk0 = MPC826x_PCI_MASK; | ||
87 | immap->im_memctl.memc_pcibr0 = MPC826x_PCI_BASE | PCIBR_ENABLE; | ||
88 | |||
89 | /* Disable machine check on no response or target abort */ | ||
90 | immap->im_pci.pci_emr = cpu_to_le32(0x1fe7); | ||
91 | /* Release PCI RST (by default the PCI RST signal is held low) */ | ||
92 | immap->im_pci.pci_gcr = cpu_to_le32(PCIGCR_PCI_BUS_EN); | ||
93 | |||
94 | /* give it some time */ | ||
95 | mdelay(1); | ||
96 | |||
97 | /* | ||
98 | * Set up master window that allows the CPU to access PCI Memory (prefetch) | ||
99 | * space. This window is set up using the first set of Outbound ATU registers. | ||
100 | */ | ||
101 | immap->im_pci.pci_potar0 = cpu_to_le32(MPC826x_PCI_LOWER_MEM >> 12); | ||
102 | immap->im_pci.pci_pobar0 = cpu_to_le32((MPC826x_PCI_LOWER_MEM - MPC826x_PCI_MEM_OFFSET) >> 12); | ||
103 | pocmr = ((MPC826x_PCI_UPPER_MEM - MPC826x_PCI_LOWER_MEM) >> 12) ^ 0xfffff; | ||
104 | immap->im_pci.pci_pocmr0 = cpu_to_le32(pocmr | POCMR_ENABLE | POCMR_PREFETCH_EN); | ||
105 | |||
106 | /* | ||
107 | * Set up master window that allows the CPU to access PCI Memory (non-prefetch) | ||
108 | * space. This window is set up using the second set of Outbound ATU registers. | ||
109 | */ | ||
110 | immap->im_pci.pci_potar1 = cpu_to_le32(MPC826x_PCI_LOWER_MMIO >> 12); | ||
111 | immap->im_pci.pci_pobar1 = cpu_to_le32((MPC826x_PCI_LOWER_MMIO - MPC826x_PCI_MMIO_OFFSET) >> 12); | ||
112 | pocmr = ((MPC826x_PCI_UPPER_MMIO - MPC826x_PCI_LOWER_MMIO) >> 12) ^ 0xfffff; | ||
113 | immap->im_pci.pci_pocmr1 = cpu_to_le32(pocmr | POCMR_ENABLE); | ||
114 | |||
115 | /* | ||
116 | * Set up master window that allows the CPU to access PCI IO space. This window | ||
117 | * is set up using the third set of Outbound ATU registers. | ||
118 | */ | ||
119 | immap->im_pci.pci_potar2 = cpu_to_le32(MPC826x_PCI_IO_BASE >> 12); | ||
120 | immap->im_pci.pci_pobar2 = cpu_to_le32(MPC826x_PCI_LOWER_IO >> 12); | ||
121 | pocmr = ((MPC826x_PCI_UPPER_IO - MPC826x_PCI_LOWER_IO) >> 12) ^ 0xfffff; | ||
122 | immap->im_pci.pci_pocmr2 = cpu_to_le32(pocmr | POCMR_ENABLE | POCMR_PCI_IO); | ||
123 | |||
124 | /* | ||
125 | * Set up slave window that allows PCI masters to access MPC826x local memory. | ||
126 | * This window is set up using the first set of Inbound ATU registers | ||
127 | */ | ||
128 | |||
129 | immap->im_pci.pci_pitar0 = cpu_to_le32(MPC826x_PCI_SLAVE_MEM_LOCAL >> 12); | ||
130 | immap->im_pci.pci_pibar0 = cpu_to_le32(MPC826x_PCI_SLAVE_MEM_BUS >> 12); | ||
131 | pocmr = ((MPC826x_PCI_SLAVE_MEM_SIZE-1) >> 12) ^ 0xfffff; | ||
132 | immap->im_pci.pci_picmr0 = cpu_to_le32(pocmr | PICMR_ENABLE | PICMR_PREFETCH_EN); | ||
133 | |||
134 | /* See above for description - puts PCI request as highest priority */ | ||
135 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x03124567; | ||
136 | |||
137 | /* Park the bus on the PCI */ | ||
138 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_PCI; | ||
139 | |||
140 | /* Host mode - specify the bridge as a host-PCI bridge */ | ||
141 | early_write_config_word(hose, 0, 0, PCI_CLASS_DEVICE, PCI_CLASS_BRIDGE_HOST); | ||
142 | |||
143 | /* Enable the host bridge to be a master on the PCI bus, and to act as a PCI memory target */ | ||
144 | early_read_config_word(hose, 0, 0, PCI_COMMAND, &tempShort); | ||
145 | early_write_config_word(hose, 0, 0, PCI_COMMAND, | ||
146 | tempShort | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY); | ||
147 | } | ||
148 | |||
149 | void __init m8260_find_bridges(void) | ||
150 | { | ||
151 | extern int pci_assign_all_busses; | ||
152 | struct pci_controller * hose; | ||
153 | |||
154 | pci_assign_all_busses = 1; | ||
155 | |||
156 | hose = pcibios_alloc_controller(); | ||
157 | |||
158 | if (!hose) | ||
159 | return; | ||
160 | |||
161 | ppc_md.pci_swizzle = common_swizzle; | ||
162 | |||
163 | hose->first_busno = 0; | ||
164 | hose->bus_offset = 0; | ||
165 | hose->last_busno = 0xff; | ||
166 | |||
167 | setup_m8260_indirect_pci(hose, | ||
168 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_addr, | ||
169 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_data); | ||
170 | |||
171 | m8260_setup_pci(hose); | ||
172 | hose->pci_mem_offset = MPC826x_PCI_MEM_OFFSET; | ||
173 | |||
174 | hose->io_base_virt = ioremap(MPC826x_PCI_IO_BASE, | ||
175 | MPC826x_PCI_IO_SIZE); | ||
176 | isa_io_base = (unsigned long) hose->io_base_virt; | ||
177 | |||
178 | /* setup resources */ | ||
179 | pci_init_resource(&hose->mem_resources[0], | ||
180 | MPC826x_PCI_LOWER_MEM, | ||
181 | MPC826x_PCI_UPPER_MEM, | ||
182 | IORESOURCE_MEM|IORESOURCE_PREFETCH, "PCI prefetchable memory"); | ||
183 | |||
184 | pci_init_resource(&hose->mem_resources[1], | ||
185 | MPC826x_PCI_LOWER_MMIO, | ||
186 | MPC826x_PCI_UPPER_MMIO, | ||
187 | IORESOURCE_MEM, "PCI memory"); | ||
188 | |||
189 | pci_init_resource(&hose->io_resource, | ||
190 | MPC826x_PCI_LOWER_IO, | ||
191 | MPC826x_PCI_UPPER_IO, | ||
192 | IORESOURCE_IO, "PCI I/O"); | ||
193 | } | ||
diff --git a/arch/ppc/syslib/m8260_pci.h b/arch/ppc/syslib/m8260_pci.h deleted file mode 100644 index d1352120acd7..000000000000 --- a/arch/ppc/syslib/m8260_pci.h +++ /dev/null | |||
@@ -1,76 +0,0 @@ | |||
1 | |||
2 | #ifndef _PPC_KERNEL_M8260_PCI_H | ||
3 | #define _PPC_KERNEL_M8260_PCI_H | ||
4 | |||
5 | #include <asm/m8260_pci.h> | ||
6 | |||
7 | /* | ||
8 | * Local->PCI map (from CPU) controlled by | ||
9 | * MPC826x master window | ||
10 | * | ||
11 | * 0x80000000 - 0xBFFFFFFF Total CPU2PCI space PCIBR0 | ||
12 | * | ||
13 | * 0x80000000 - 0x9FFFFFFF PCI Mem with prefetch (Outbound ATU #1) | ||
14 | * 0xA0000000 - 0xAFFFFFFF PCI Mem w/o prefetch (Outbound ATU #2) | ||
15 | * 0xB0000000 - 0xB0FFFFFF 32-bit PCI IO (Outbound ATU #3) | ||
16 | * | ||
17 | * PCI->Local map (from PCI) | ||
18 | * MPC826x slave window controlled by | ||
19 | * | ||
20 | * 0x00000000 - 0x07FFFFFF MPC826x local memory (Inbound ATU #1) | ||
21 | */ | ||
22 | |||
23 | /* | ||
24 | * Slave window that allows PCI masters to access MPC826x local memory. | ||
25 | * This window is set up using the first set of Inbound ATU registers | ||
26 | */ | ||
27 | |||
28 | #ifndef MPC826x_PCI_SLAVE_MEM_LOCAL | ||
29 | #define MPC826x_PCI_SLAVE_MEM_LOCAL (((struct bd_info *)__res)->bi_memstart) | ||
30 | #define MPC826x_PCI_SLAVE_MEM_BUS (((struct bd_info *)__res)->bi_memstart) | ||
31 | #define MPC826x_PCI_SLAVE_MEM_SIZE (((struct bd_info *)__res)->bi_memsize) | ||
32 | #endif | ||
33 | |||
34 | /* | ||
35 | * This is the window that allows the CPU to access PCI address space. | ||
36 | * It will be setup with the SIU PCIBR0 register. All three PCI master | ||
37 | * windows, which allow the CPU to access PCI prefetch, non prefetch, | ||
38 | * and IO space (see below), must all fit within this window. | ||
39 | */ | ||
40 | #ifndef MPC826x_PCI_BASE | ||
41 | #define MPC826x_PCI_BASE 0x80000000 | ||
42 | #define MPC826x_PCI_MASK 0xc0000000 | ||
43 | #endif | ||
44 | |||
45 | #ifndef MPC826x_PCI_LOWER_MEM | ||
46 | #define MPC826x_PCI_LOWER_MEM 0x80000000 | ||
47 | #define MPC826x_PCI_UPPER_MEM 0x9fffffff | ||
48 | #define MPC826x_PCI_MEM_OFFSET 0x00000000 | ||
49 | #endif | ||
50 | |||
51 | #ifndef MPC826x_PCI_LOWER_MMIO | ||
52 | #define MPC826x_PCI_LOWER_MMIO 0xa0000000 | ||
53 | #define MPC826x_PCI_UPPER_MMIO 0xafffffff | ||
54 | #define MPC826x_PCI_MMIO_OFFSET 0x00000000 | ||
55 | #endif | ||
56 | |||
57 | #ifndef MPC826x_PCI_LOWER_IO | ||
58 | #define MPC826x_PCI_LOWER_IO 0x00000000 | ||
59 | #define MPC826x_PCI_UPPER_IO 0x00ffffff | ||
60 | #define MPC826x_PCI_IO_BASE 0xb0000000 | ||
61 | #define MPC826x_PCI_IO_SIZE 0x01000000 | ||
62 | #endif | ||
63 | |||
64 | #ifndef _IO_BASE | ||
65 | #define _IO_BASE isa_io_base | ||
66 | #endif | ||
67 | |||
68 | #ifdef CONFIG_8260_PCI9 | ||
69 | struct pci_controller; | ||
70 | extern void setup_m8260_indirect_pci(struct pci_controller* hose, | ||
71 | u32 cfg_addr, u32 cfg_data); | ||
72 | #else | ||
73 | #define setup_m8260_indirect_pci setup_indirect_pci | ||
74 | #endif | ||
75 | |||
76 | #endif /* _PPC_KERNEL_M8260_PCI_H */ | ||
diff --git a/arch/ppc/syslib/m8260_pci_erratum9.c b/arch/ppc/syslib/m8260_pci_erratum9.c index 9c0582d639e0..1dc7e4e1d491 100644 --- a/arch/ppc/syslib/m8260_pci_erratum9.c +++ b/arch/ppc/syslib/m8260_pci_erratum9.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/immap_cpm2.h> | 31 | #include <asm/immap_cpm2.h> |
32 | #include <asm/cpm2.h> | 32 | #include <asm/cpm2.h> |
33 | 33 | ||
34 | #include "m8260_pci.h" | 34 | #include "m82xx_pci.h" |
35 | 35 | ||
36 | #ifdef CONFIG_8260_PCI9 | 36 | #ifdef CONFIG_8260_PCI9 |
37 | /*#include <asm/mpc8260_pci9.h>*/ /* included in asm/io.h */ | 37 | /*#include <asm/mpc8260_pci9.h>*/ /* included in asm/io.h */ |
@@ -248,11 +248,11 @@ EXPORT_SYMBOL(idma_pci9_read_le); | |||
248 | 248 | ||
249 | static inline int is_pci_mem(unsigned long addr) | 249 | static inline int is_pci_mem(unsigned long addr) |
250 | { | 250 | { |
251 | if (addr >= MPC826x_PCI_LOWER_MMIO && | 251 | if (addr >= M82xx_PCI_LOWER_MMIO && |
252 | addr <= MPC826x_PCI_UPPER_MMIO) | 252 | addr <= M82xx_PCI_UPPER_MMIO) |
253 | return 1; | 253 | return 1; |
254 | if (addr >= MPC826x_PCI_LOWER_MEM && | 254 | if (addr >= M82xx_PCI_LOWER_MEM && |
255 | addr <= MPC826x_PCI_UPPER_MEM) | 255 | addr <= M82xx_PCI_UPPER_MEM) |
256 | return 1; | 256 | return 1; |
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
diff --git a/arch/ppc/syslib/m8260_setup.c b/arch/ppc/syslib/m8260_setup.c index 23ea3f694de2..fda75d79050c 100644 --- a/arch/ppc/syslib/m8260_setup.c +++ b/arch/ppc/syslib/m8260_setup.c | |||
@@ -34,7 +34,8 @@ | |||
34 | unsigned char __res[sizeof(bd_t)]; | 34 | unsigned char __res[sizeof(bd_t)]; |
35 | 35 | ||
36 | extern void cpm2_reset(void); | 36 | extern void cpm2_reset(void); |
37 | extern void m8260_find_bridges(void); | 37 | extern void pq2_find_bridges(void); |
38 | extern void pq2pci_init_irq(void); | ||
38 | extern void idma_pci9_init(void); | 39 | extern void idma_pci9_init(void); |
39 | 40 | ||
40 | /* Place-holder for board-specific init */ | 41 | /* Place-holder for board-specific init */ |
@@ -56,7 +57,7 @@ m8260_setup_arch(void) | |||
56 | idma_pci9_init(); | 57 | idma_pci9_init(); |
57 | #endif | 58 | #endif |
58 | #ifdef CONFIG_PCI_8260 | 59 | #ifdef CONFIG_PCI_8260 |
59 | m8260_find_bridges(); | 60 | pq2_find_bridges(); |
60 | #endif | 61 | #endif |
61 | #ifdef CONFIG_BLK_DEV_INITRD | 62 | #ifdef CONFIG_BLK_DEV_INITRD |
62 | if (initrd_start) | 63 | if (initrd_start) |
@@ -173,6 +174,12 @@ m8260_init_IRQ(void) | |||
173 | * in case the boot rom changed something on us. | 174 | * in case the boot rom changed something on us. |
174 | */ | 175 | */ |
175 | cpm2_immr->im_intctl.ic_siprr = 0x05309770; | 176 | cpm2_immr->im_intctl.ic_siprr = 0x05309770; |
177 | |||
178 | #if defined(CONFIG_PCI) && (defined(CONFIG_ADS8272) || defined(CONFIG_PQ2FADS)) | ||
179 | /* Initialize stuff for the 82xx CPLD IC and install demux */ | ||
180 | pq2pci_init_irq(); | ||
181 | #endif | ||
182 | |||
176 | } | 183 | } |
177 | 184 | ||
178 | /* | 185 | /* |
diff --git a/arch/ppc/syslib/m82xx_pci.c b/arch/ppc/syslib/m82xx_pci.c new file mode 100644 index 000000000000..5e7a7edcea74 --- /dev/null +++ b/arch/ppc/syslib/m82xx_pci.c | |||
@@ -0,0 +1,383 @@ | |||
1 | /* | ||
2 | * | ||
3 | * (C) Copyright 2003 | ||
4 | * Wolfgang Denk, DENX Software Engineering, wd@denx.de. | ||
5 | * | ||
6 | * (C) Copyright 2004 Red Hat, Inc. | ||
7 | * | ||
8 | * 2005 (c) MontaVista Software, Inc. | ||
9 | * Vitaly Bordug <vbordug@ru.mvista.com> | ||
10 | * | ||
11 | * See file CREDITS for list of people who contributed to this | ||
12 | * project. | ||
13 | * | ||
14 | * This program is free software; you can redistribute it and/or | ||
15 | * modify it under the terms of the GNU General Public License as | ||
16 | * published by the Free Software Foundation; either version 2 of | ||
17 | * the License, or (at your option) any later version. | ||
18 | * | ||
19 | * This program is distributed in the hope that it will be useful, | ||
20 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
21 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
22 | * GNU General Public License for more details. | ||
23 | * | ||
24 | * You should have received a copy of the GNU General Public License | ||
25 | * along with this program; if not, write to the Free Software | ||
26 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | ||
27 | * MA 02111-1307 USA | ||
28 | */ | ||
29 | |||
30 | #include <linux/kernel.h> | ||
31 | #include <linux/init.h> | ||
32 | #include <linux/pci.h> | ||
33 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | ||
35 | #include <linux/irq.h> | ||
36 | #include <linux/interrupt.h> | ||
37 | |||
38 | #include <asm/byteorder.h> | ||
39 | #include <asm/io.h> | ||
40 | #include <asm/irq.h> | ||
41 | #include <asm/uaccess.h> | ||
42 | #include <asm/machdep.h> | ||
43 | #include <asm/pci-bridge.h> | ||
44 | #include <asm/immap_cpm2.h> | ||
45 | #include <asm/mpc8260.h> | ||
46 | #include <asm/cpm2.h> | ||
47 | |||
48 | #include "m82xx_pci.h" | ||
49 | |||
50 | /* | ||
51 | * Interrupt routing | ||
52 | */ | ||
53 | |||
54 | static inline int | ||
55 | pq2pci_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
56 | { | ||
57 | static char pci_irq_table[][4] = | ||
58 | /* | ||
59 | * PCI IDSEL/INTPIN->INTLINE | ||
60 | * A B C D | ||
61 | */ | ||
62 | { | ||
63 | { PIRQA, PIRQB, PIRQC, PIRQD }, /* IDSEL 22 - PCI slot 0 */ | ||
64 | { PIRQD, PIRQA, PIRQB, PIRQC }, /* IDSEL 23 - PCI slot 1 */ | ||
65 | { PIRQC, PIRQD, PIRQA, PIRQB }, /* IDSEL 24 - PCI slot 2 */ | ||
66 | }; | ||
67 | |||
68 | const long min_idsel = 22, max_idsel = 24, irqs_per_slot = 4; | ||
69 | return PCI_IRQ_TABLE_LOOKUP; | ||
70 | } | ||
71 | |||
72 | static void | ||
73 | pq2pci_mask_irq(unsigned int irq) | ||
74 | { | ||
75 | int bit = irq - NR_CPM_INTS; | ||
76 | |||
77 | *(volatile unsigned long *) PCI_INT_MASK_REG |= (1 << (31 - bit)); | ||
78 | return; | ||
79 | } | ||
80 | |||
81 | static void | ||
82 | pq2pci_unmask_irq(unsigned int irq) | ||
83 | { | ||
84 | int bit = irq - NR_CPM_INTS; | ||
85 | |||
86 | *(volatile unsigned long *) PCI_INT_MASK_REG &= ~(1 << (31 - bit)); | ||
87 | return; | ||
88 | } | ||
89 | |||
90 | static void | ||
91 | pq2pci_mask_and_ack(unsigned int irq) | ||
92 | { | ||
93 | int bit = irq - NR_CPM_INTS; | ||
94 | |||
95 | *(volatile unsigned long *) PCI_INT_MASK_REG |= (1 << (31 - bit)); | ||
96 | return; | ||
97 | } | ||
98 | |||
99 | static void | ||
100 | pq2pci_end_irq(unsigned int irq) | ||
101 | { | ||
102 | int bit = irq - NR_CPM_INTS; | ||
103 | |||
104 | *(volatile unsigned long *) PCI_INT_MASK_REG &= ~(1 << (31 - bit)); | ||
105 | return; | ||
106 | } | ||
107 | |||
108 | struct hw_interrupt_type pq2pci_ic = { | ||
109 | "PQ2 PCI", | ||
110 | NULL, | ||
111 | NULL, | ||
112 | pq2pci_unmask_irq, | ||
113 | pq2pci_mask_irq, | ||
114 | pq2pci_mask_and_ack, | ||
115 | pq2pci_end_irq, | ||
116 | 0 | ||
117 | }; | ||
118 | |||
119 | static irqreturn_t | ||
120 | pq2pci_irq_demux(int irq, void *dev_id, struct pt_regs *regs) | ||
121 | { | ||
122 | unsigned long stat, mask, pend; | ||
123 | int bit; | ||
124 | |||
125 | for(;;) { | ||
126 | stat = *(volatile unsigned long *) PCI_INT_STAT_REG; | ||
127 | mask = *(volatile unsigned long *) PCI_INT_MASK_REG; | ||
128 | pend = stat & ~mask & 0xf0000000; | ||
129 | if (!pend) | ||
130 | break; | ||
131 | for (bit = 0; pend != 0; ++bit, pend <<= 1) { | ||
132 | if (pend & 0x80000000) | ||
133 | __do_IRQ(NR_CPM_INTS + bit, regs); | ||
134 | } | ||
135 | } | ||
136 | |||
137 | return IRQ_HANDLED; | ||
138 | } | ||
139 | |||
140 | static struct irqaction pq2pci_irqaction = { | ||
141 | .handler = pq2pci_irq_demux, | ||
142 | .flags = SA_INTERRUPT, | ||
143 | .mask = CPU_MASK_NONE, | ||
144 | .name = "PQ2 PCI cascade", | ||
145 | }; | ||
146 | |||
147 | |||
148 | void | ||
149 | pq2pci_init_irq(void) | ||
150 | { | ||
151 | int irq; | ||
152 | volatile cpm2_map_t *immap = cpm2_immr; | ||
153 | #if defined CONFIG_ADS8272 | ||
154 | /* configure chip select for PCI interrupt controller */ | ||
155 | immap->im_memctl.memc_br3 = PCI_INT_STAT_REG | 0x00001801; | ||
156 | immap->im_memctl.memc_or3 = 0xffff8010; | ||
157 | #elif defined CONFIG_PQ2FADS | ||
158 | immap->im_memctl.memc_br8 = PCI_INT_STAT_REG | 0x00001801; | ||
159 | immap->im_memctl.memc_or8 = 0xffff8010; | ||
160 | #endif | ||
161 | for (irq = NR_CPM_INTS; irq < NR_CPM_INTS + 4; irq++) | ||
162 | irq_desc[irq].handler = &pq2pci_ic; | ||
163 | |||
164 | /* make PCI IRQ level sensitive */ | ||
165 | immap->im_intctl.ic_siexr &= | ||
166 | ~(1 << (14 - (PCI_INT_TO_SIU - SIU_INT_IRQ1))); | ||
167 | |||
168 | /* mask all PCI interrupts */ | ||
169 | *(volatile unsigned long *) PCI_INT_MASK_REG |= 0xfff00000; | ||
170 | |||
171 | /* install the demultiplexer for the PCI cascade interrupt */ | ||
172 | setup_irq(PCI_INT_TO_SIU, &pq2pci_irqaction); | ||
173 | return; | ||
174 | } | ||
175 | |||
176 | static int | ||
177 | pq2pci_exclude_device(u_char bus, u_char devfn) | ||
178 | { | ||
179 | return PCIBIOS_SUCCESSFUL; | ||
180 | } | ||
181 | |||
182 | /* PCI bus configuration registers. | ||
183 | */ | ||
184 | static void | ||
185 | pq2ads_setup_pci(struct pci_controller *hose) | ||
186 | { | ||
187 | __u32 val; | ||
188 | volatile cpm2_map_t *immap = cpm2_immr; | ||
189 | bd_t* binfo = (bd_t*) __res; | ||
190 | u32 sccr = immap->im_clkrst.car_sccr; | ||
191 | uint pci_div,freq,time; | ||
192 | /* PCI int lowest prio */ | ||
193 | /* Each 4 bits is a device bus request and the MS 4bits | ||
194 | is highest priority */ | ||
195 | /* Bus 4bit value | ||
196 | --- ---------- | ||
197 | CPM high 0b0000 | ||
198 | CPM middle 0b0001 | ||
199 | CPM low 0b0010 | ||
200 | PCI reguest 0b0011 | ||
201 | Reserved 0b0100 | ||
202 | Reserved 0b0101 | ||
203 | Internal Core 0b0110 | ||
204 | External Master 1 0b0111 | ||
205 | External Master 2 0b1000 | ||
206 | External Master 3 0b1001 | ||
207 | The rest are reserved | ||
208 | */ | ||
209 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x61207893; | ||
210 | /* park bus on core */ | ||
211 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_CORE; | ||
212 | /* | ||
213 | * Set up master windows that allow the CPU to access PCI space. These | ||
214 | * windows are set up using the two SIU PCIBR registers. | ||
215 | */ | ||
216 | |||
217 | immap->im_memctl.memc_pcimsk0 = M82xx_PCI_PRIM_WND_SIZE; | ||
218 | immap->im_memctl.memc_pcibr0 = M82xx_PCI_PRIM_WND_BASE | PCIBR_ENABLE; | ||
219 | |||
220 | #ifdef M82xx_PCI_SEC_WND_SIZE | ||
221 | immap->im_memctl.memc_pcimsk1 = M82xx_PCI_SEC_WND_SIZE; | ||
222 | immap->im_memctl.memc_pcibr1 = M82xx_PCI_SEC_WND_BASE | PCIBR_ENABLE; | ||
223 | #endif | ||
224 | |||
225 | #if defined CONFIG_ADS8272 | ||
226 | immap->im_siu_conf.siu_82xx.sc_siumcr = | ||
227 | (immap->im_siu_conf.siu_82xx.sc_siumcr & | ||
228 | ~(SIUMCR_BBD | SIUMCR_ESE | SIUMCR_PBSE | | ||
229 | SIUMCR_CDIS | SIUMCR_DPPC11 | SIUMCR_L2CPC11 | | ||
230 | SIUMCR_LBPC11 | SIUMCR_APPC11 | | ||
231 | SIUMCR_CS10PC11 | SIUMCR_BCTLC11 | SIUMCR_MMR11)) | | ||
232 | SIUMCR_DPPC11 | SIUMCR_L2CPC01 | SIUMCR_LBPC00 | | ||
233 | SIUMCR_APPC10 | SIUMCR_CS10PC00 | | ||
234 | SIUMCR_BCTLC00 | SIUMCR_MMR11 ; | ||
235 | |||
236 | #elif defined CONFIG_PQ2FADS | ||
237 | /* | ||
238 | * Setting required to enable IRQ1-IRQ7 (SIUMCR [DPPC]), | ||
239 | * and local bus for PCI (SIUMCR [LBPC]). | ||
240 | */ | ||
241 | immap->im_siu_conf.siu_82xx.sc_siumcr = (immap->im_siu_conf.sc_siumcr & | ||
242 | ~(SIUMCR_L2PC11 | SIUMCR_LBPC11 | SIUMCR_CS10PC11 | SIUMCR_APPC11) | | ||
243 | SIUMCR_BBD | SIUMCR_LBPC01 | SIUMCR_DPPC11 | SIUMCR_APPC10; | ||
244 | #endif | ||
245 | /* Enable PCI */ | ||
246 | immap->im_pci.pci_gcr = cpu_to_le32(PCIGCR_PCI_BUS_EN); | ||
247 | |||
248 | pci_div = ( (sccr & SCCR_PCI_MODCK) ? 2 : 1) * | ||
249 | ( ( (sccr & SCCR_PCIDF_MSK) >> SCCR_PCIDF_SHIFT) + 1); | ||
250 | freq = (uint)((2*binfo->bi_cpmfreq)/(pci_div)); | ||
251 | time = (int)666666/freq; | ||
252 | /* due to PCI Local Bus spec, some devices needs to wait such a long | ||
253 | time after RST deassertion. More specifically, 0.508s for 66MHz & twice more for 33 */ | ||
254 | printk("%s: The PCI bus is %d Mhz.\nWaiting %s after deasserting RST...\n",__FILE__,freq, | ||
255 | (time==1) ? "0.5 seconds":"1 second" ); | ||
256 | |||
257 | { | ||
258 | int i; | ||
259 | for(i=0;i<(500*time);i++) | ||
260 | udelay(1000); | ||
261 | } | ||
262 | |||
263 | /* setup ATU registers */ | ||
264 | immap->im_pci.pci_pocmr0 = cpu_to_le32(POCMR_ENABLE | POCMR_PCI_IO | | ||
265 | ((~(M82xx_PCI_IO_SIZE - 1U)) >> POTA_ADDR_SHIFT)); | ||
266 | immap->im_pci.pci_potar0 = cpu_to_le32(M82xx_PCI_LOWER_IO >> POTA_ADDR_SHIFT); | ||
267 | immap->im_pci.pci_pobar0 = cpu_to_le32(M82xx_PCI_IO_BASE >> POTA_ADDR_SHIFT); | ||
268 | |||
269 | /* Set-up non-prefetchable window */ | ||
270 | immap->im_pci.pci_pocmr1 = cpu_to_le32(POCMR_ENABLE | ((~(M82xx_PCI_MMIO_SIZE-1U)) >> POTA_ADDR_SHIFT)); | ||
271 | immap->im_pci.pci_potar1 = cpu_to_le32(M82xx_PCI_LOWER_MMIO >> POTA_ADDR_SHIFT); | ||
272 | immap->im_pci.pci_pobar1 = cpu_to_le32((M82xx_PCI_LOWER_MMIO - M82xx_PCI_MMIO_OFFSET) >> POTA_ADDR_SHIFT); | ||
273 | |||
274 | /* Set-up prefetchable window */ | ||
275 | immap->im_pci.pci_pocmr2 = cpu_to_le32(POCMR_ENABLE |POCMR_PREFETCH_EN | | ||
276 | (~(M82xx_PCI_MEM_SIZE-1U) >> POTA_ADDR_SHIFT)); | ||
277 | immap->im_pci.pci_potar2 = cpu_to_le32(M82xx_PCI_LOWER_MEM >> POTA_ADDR_SHIFT); | ||
278 | immap->im_pci.pci_pobar2 = cpu_to_le32((M82xx_PCI_LOWER_MEM - M82xx_PCI_MEM_OFFSET) >> POTA_ADDR_SHIFT); | ||
279 | |||
280 | /* Inbound transactions from PCI memory space */ | ||
281 | immap->im_pci.pci_picmr0 = cpu_to_le32(PICMR_ENABLE | PICMR_PREFETCH_EN | | ||
282 | ((~(M82xx_PCI_SLAVE_MEM_SIZE-1U)) >> PITA_ADDR_SHIFT)); | ||
283 | immap->im_pci.pci_pibar0 = cpu_to_le32(M82xx_PCI_SLAVE_MEM_BUS >> PITA_ADDR_SHIFT); | ||
284 | immap->im_pci.pci_pitar0 = cpu_to_le32(M82xx_PCI_SLAVE_MEM_LOCAL>> PITA_ADDR_SHIFT); | ||
285 | |||
286 | #if defined CONFIG_ADS8272 | ||
287 | /* PCI int highest prio */ | ||
288 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x01236745; | ||
289 | #elif defined CONFIG_PQ2FADS | ||
290 | immap->im_siu_conf.siu_82xx.sc_ppc_alrh = 0x03124567; | ||
291 | #endif | ||
292 | /* park bus on PCI */ | ||
293 | immap->im_siu_conf.siu_82xx.sc_ppc_acr = PPC_ACR_BUS_PARK_PCI; | ||
294 | |||
295 | /* Enable bus mastering and inbound memory transactions */ | ||
296 | early_read_config_dword(hose, hose->first_busno, 0, PCI_COMMAND, &val); | ||
297 | val &= 0xffff0000; | ||
298 | val |= PCI_COMMAND_MEMORY|PCI_COMMAND_MASTER; | ||
299 | early_write_config_dword(hose, hose->first_busno, 0, PCI_COMMAND, val); | ||
300 | |||
301 | } | ||
302 | |||
303 | void __init pq2_find_bridges(void) | ||
304 | { | ||
305 | extern int pci_assign_all_busses; | ||
306 | struct pci_controller * hose; | ||
307 | int host_bridge; | ||
308 | |||
309 | pci_assign_all_busses = 1; | ||
310 | |||
311 | hose = pcibios_alloc_controller(); | ||
312 | |||
313 | if (!hose) | ||
314 | return; | ||
315 | |||
316 | ppc_md.pci_swizzle = common_swizzle; | ||
317 | |||
318 | hose->first_busno = 0; | ||
319 | hose->bus_offset = 0; | ||
320 | hose->last_busno = 0xff; | ||
321 | |||
322 | #ifdef CONFIG_ADS8272 | ||
323 | hose->set_cfg_type = 1; | ||
324 | #endif | ||
325 | |||
326 | setup_m8260_indirect_pci(hose, | ||
327 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_addr, | ||
328 | (unsigned long)&cpm2_immr->im_pci.pci_cfg_data); | ||
329 | |||
330 | /* Make sure it is a supported bridge */ | ||
331 | early_read_config_dword(hose, | ||
332 | 0, | ||
333 | PCI_DEVFN(0,0), | ||
334 | PCI_VENDOR_ID, | ||
335 | &host_bridge); | ||
336 | switch (host_bridge) { | ||
337 | case PCI_DEVICE_ID_MPC8265: | ||
338 | break; | ||
339 | case PCI_DEVICE_ID_MPC8272: | ||
340 | break; | ||
341 | default: | ||
342 | printk("Attempting to use unrecognized host bridge ID" | ||
343 | " 0x%08x.\n", host_bridge); | ||
344 | break; | ||
345 | } | ||
346 | |||
347 | pq2ads_setup_pci(hose); | ||
348 | |||
349 | hose->io_space.start = M82xx_PCI_LOWER_IO; | ||
350 | hose->io_space.end = M82xx_PCI_UPPER_IO; | ||
351 | hose->mem_space.start = M82xx_PCI_LOWER_MEM; | ||
352 | hose->mem_space.end = M82xx_PCI_UPPER_MMIO; | ||
353 | hose->pci_mem_offset = M82xx_PCI_MEM_OFFSET; | ||
354 | |||
355 | isa_io_base = | ||
356 | (unsigned long) ioremap(M82xx_PCI_IO_BASE, | ||
357 | M82xx_PCI_IO_SIZE); | ||
358 | hose->io_base_virt = (void *) isa_io_base; | ||
359 | |||
360 | /* setup resources */ | ||
361 | pci_init_resource(&hose->mem_resources[0], | ||
362 | M82xx_PCI_LOWER_MEM, | ||
363 | M82xx_PCI_UPPER_MEM, | ||
364 | IORESOURCE_MEM|IORESOURCE_PREFETCH, "PCI prefetchable memory"); | ||
365 | |||
366 | pci_init_resource(&hose->mem_resources[1], | ||
367 | M82xx_PCI_LOWER_MMIO, | ||
368 | M82xx_PCI_UPPER_MMIO, | ||
369 | IORESOURCE_MEM, "PCI memory"); | ||
370 | |||
371 | pci_init_resource(&hose->io_resource, | ||
372 | M82xx_PCI_LOWER_IO, | ||
373 | M82xx_PCI_UPPER_IO, | ||
374 | IORESOURCE_IO | 1, "PCI I/O"); | ||
375 | |||
376 | ppc_md.pci_exclude_device = pq2pci_exclude_device; | ||
377 | hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); | ||
378 | |||
379 | ppc_md.pci_map_irq = pq2pci_map_irq; | ||
380 | ppc_md.pcibios_fixup = NULL; | ||
381 | ppc_md.pcibios_fixup_bus = NULL; | ||
382 | |||
383 | } | ||
diff --git a/arch/ppc/syslib/m82xx_pci.h b/arch/ppc/syslib/m82xx_pci.h new file mode 100644 index 000000000000..924f73f8e595 --- /dev/null +++ b/arch/ppc/syslib/m82xx_pci.h | |||
@@ -0,0 +1,92 @@ | |||
1 | |||
2 | #ifndef _PPC_KERNEL_M82XX_PCI_H | ||
3 | #define _PPC_KERNEL_M82XX_PCI_H | ||
4 | |||
5 | #include <asm/m8260_pci.h> | ||
6 | /* | ||
7 | * Local->PCI map (from CPU) controlled by | ||
8 | * MPC826x master window | ||
9 | * | ||
10 | * 0xF6000000 - 0xF7FFFFFF IO space | ||
11 | * 0x80000000 - 0xBFFFFFFF CPU2PCI memory space PCIBR0 | ||
12 | * | ||
13 | * 0x80000000 - 0x9FFFFFFF PCI Mem with prefetch (Outbound ATU #1) | ||
14 | * 0xA0000000 - 0xBFFFFFFF PCI Mem w/o prefetch (Outbound ATU #2) | ||
15 | * 0xF6000000 - 0xF7FFFFFF 32-bit PCI IO (Outbound ATU #3) | ||
16 | * | ||
17 | * PCI->Local map (from PCI) | ||
18 | * MPC826x slave window controlled by | ||
19 | * | ||
20 | * 0x00000000 - 0x07FFFFFF MPC826x local memory (Inbound ATU #1) | ||
21 | */ | ||
22 | |||
23 | /* | ||
24 | * Slave window that allows PCI masters to access MPC826x local memory. | ||
25 | * This window is set up using the first set of Inbound ATU registers | ||
26 | */ | ||
27 | |||
28 | #ifndef M82xx_PCI_SLAVE_MEM_LOCAL | ||
29 | #define M82xx_PCI_SLAVE_MEM_LOCAL (((struct bd_info *)__res)->bi_memstart) | ||
30 | #define M82xx_PCI_SLAVE_MEM_BUS (((struct bd_info *)__res)->bi_memstart) | ||
31 | #define M82xx_PCI_SLAVE_MEM_SIZE (((struct bd_info *)__res)->bi_memsize) | ||
32 | #endif | ||
33 | |||
34 | /* | ||
35 | * This is the window that allows the CPU to access PCI address space. | ||
36 | * It will be setup with the SIU PCIBR0 register. All three PCI master | ||
37 | * windows, which allow the CPU to access PCI prefetch, non prefetch, | ||
38 | * and IO space (see below), must all fit within this window. | ||
39 | */ | ||
40 | |||
41 | #ifndef M82xx_PCI_LOWER_MEM | ||
42 | #define M82xx_PCI_LOWER_MEM 0x80000000 | ||
43 | #define M82xx_PCI_UPPER_MEM 0x9fffffff | ||
44 | #define M82xx_PCI_MEM_OFFSET 0x00000000 | ||
45 | #define M82xx_PCI_MEM_SIZE 0x20000000 | ||
46 | #endif | ||
47 | |||
48 | #ifndef M82xx_PCI_LOWER_MMIO | ||
49 | #define M82xx_PCI_LOWER_MMIO 0xa0000000 | ||
50 | #define M82xx_PCI_UPPER_MMIO 0xafffffff | ||
51 | #define M82xx_PCI_MMIO_OFFSET 0x00000000 | ||
52 | #define M82xx_PCI_MMIO_SIZE 0x20000000 | ||
53 | #endif | ||
54 | |||
55 | #ifndef M82xx_PCI_LOWER_IO | ||
56 | #define M82xx_PCI_LOWER_IO 0x00000000 | ||
57 | #define M82xx_PCI_UPPER_IO 0x01ffffff | ||
58 | #define M82xx_PCI_IO_BASE 0xf6000000 | ||
59 | #define M82xx_PCI_IO_SIZE 0x02000000 | ||
60 | #endif | ||
61 | |||
62 | #ifndef M82xx_PCI_PRIM_WND_SIZE | ||
63 | #define M82xx_PCI_PRIM_WND_SIZE ~(M82xx_PCI_IO_SIZE - 1U) | ||
64 | #define M82xx_PCI_PRIM_WND_BASE (M82xx_PCI_IO_BASE) | ||
65 | #endif | ||
66 | |||
67 | #ifndef M82xx_PCI_SEC_WND_SIZE | ||
68 | #define M82xx_PCI_SEC_WND_SIZE ~(M82xx_PCI_MEM_SIZE + M82xx_PCI_MMIO_SIZE - 1U) | ||
69 | #define M82xx_PCI_SEC_WND_BASE (M82xx_PCI_LOWER_MEM) | ||
70 | #endif | ||
71 | |||
72 | #ifndef POTA_ADDR_SHIFT | ||
73 | #define POTA_ADDR_SHIFT 12 | ||
74 | #endif | ||
75 | |||
76 | #ifndef PITA_ADDR_SHIFT | ||
77 | #define PITA_ADDR_SHIFT 12 | ||
78 | #endif | ||
79 | |||
80 | #ifndef _IO_BASE | ||
81 | #define _IO_BASE isa_io_base | ||
82 | #endif | ||
83 | |||
84 | #ifdef CONFIG_8260_PCI9 | ||
85 | struct pci_controller; | ||
86 | extern void setup_m8260_indirect_pci(struct pci_controller* hose, | ||
87 | u32 cfg_addr, u32 cfg_data); | ||
88 | #else | ||
89 | #define setup_m8260_indirect_pci setup_indirect_pci | ||
90 | #endif | ||
91 | |||
92 | #endif /* _PPC_KERNEL_M8260_PCI_H */ | ||
diff --git a/arch/ppc/syslib/ocp.c b/arch/ppc/syslib/ocp.c index a5156c5179a6..e5fd2ae503ea 100644 --- a/arch/ppc/syslib/ocp.c +++ b/arch/ppc/syslib/ocp.c | |||
@@ -68,7 +68,7 @@ static int ocp_inited; | |||
68 | /* Sysfs support */ | 68 | /* Sysfs support */ |
69 | #define OCP_DEF_ATTR(field, format_string) \ | 69 | #define OCP_DEF_ATTR(field, format_string) \ |
70 | static ssize_t \ | 70 | static ssize_t \ |
71 | show_##field(struct device *dev, char *buf) \ | 71 | show_##field(struct device *dev, struct device_attribute *attr, char *buf) \ |
72 | { \ | 72 | { \ |
73 | struct ocp_device *odev = to_ocp_dev(dev); \ | 73 | struct ocp_device *odev = to_ocp_dev(dev); \ |
74 | \ | 74 | \ |
diff --git a/arch/ppc/syslib/of_device.c b/arch/ppc/syslib/of_device.c index 46269ed21aee..49c0e34e2d6b 100644 --- a/arch/ppc/syslib/of_device.c +++ b/arch/ppc/syslib/of_device.c | |||
@@ -161,7 +161,7 @@ void of_unregister_driver(struct of_platform_driver *drv) | |||
161 | } | 161 | } |
162 | 162 | ||
163 | 163 | ||
164 | static ssize_t dev_show_devspec(struct device *dev, char *buf) | 164 | static ssize_t dev_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) |
165 | { | 165 | { |
166 | struct of_device *ofdev; | 166 | struct of_device *ofdev; |
167 | 167 | ||
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index 9d4ed68b5804..000ba47c67cb 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -275,7 +275,7 @@ static void __init openpic_enable_sie(void) | |||
275 | } | 275 | } |
276 | #endif | 276 | #endif |
277 | 277 | ||
278 | #if defined(CONFIG_EPIC_SERIAL_MODE) || defined(CONFIG_PM) | 278 | #if defined(CONFIG_EPIC_SERIAL_MODE) |
279 | static void openpic_reset(void) | 279 | static void openpic_reset(void) |
280 | { | 280 | { |
281 | openpic_setfield(&OpenPIC->Global.Global_Configuration0, | 281 | openpic_setfield(&OpenPIC->Global.Global_Configuration0, |
@@ -993,8 +993,6 @@ int openpic_resume(struct sys_device *sysdev) | |||
993 | return 0; | 993 | return 0; |
994 | } | 994 | } |
995 | 995 | ||
996 | openpic_reset(); | ||
997 | |||
998 | /* OpenPIC sometimes seem to need some time to be fully back up... */ | 996 | /* OpenPIC sometimes seem to need some time to be fully back up... */ |
999 | do { | 997 | do { |
1000 | openpic_set_spurious(OPENPIC_VEC_SPURIOUS); | 998 | openpic_set_spurious(OPENPIC_VEC_SPURIOUS); |
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index c28f9d679484..843cf8873e60 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/mmu.h> | 29 | #include <asm/mmu.h> |
30 | #include <asm/ppc_sys.h> | 30 | #include <asm/ppc_sys.h> |
31 | #include <asm/kgdb.h> | 31 | #include <asm/kgdb.h> |
32 | #include <asm/delay.h> | ||
32 | 33 | ||
33 | #include <syslib/ppc83xx_setup.h> | 34 | #include <syslib/ppc83xx_setup.h> |
34 | 35 | ||
@@ -117,7 +118,34 @@ mpc83xx_early_serial_map(void) | |||
117 | void | 118 | void |
118 | mpc83xx_restart(char *cmd) | 119 | mpc83xx_restart(char *cmd) |
119 | { | 120 | { |
121 | volatile unsigned char __iomem *reg; | ||
122 | unsigned char tmp; | ||
123 | |||
124 | reg = ioremap(BCSR_PHYS_ADDR, BCSR_SIZE); | ||
125 | |||
120 | local_irq_disable(); | 126 | local_irq_disable(); |
127 | |||
128 | /* | ||
129 | * Unlock the BCSR bits so a PRST will update the contents. | ||
130 | * Otherwise the reset asserts but doesn't clear. | ||
131 | */ | ||
132 | tmp = in_8(reg + BCSR_MISC_REG3_OFF); | ||
133 | tmp |= BCSR_MISC_REG3_CNFLOCK; /* low true, high false */ | ||
134 | out_8(reg + BCSR_MISC_REG3_OFF, tmp); | ||
135 | |||
136 | /* | ||
137 | * Trigger a reset via a low->high transition of the | ||
138 | * PORESET bit. | ||
139 | */ | ||
140 | tmp = in_8(reg + BCSR_MISC_REG2_OFF); | ||
141 | tmp &= ~BCSR_MISC_REG2_PORESET; | ||
142 | out_8(reg + BCSR_MISC_REG2_OFF, tmp); | ||
143 | |||
144 | udelay(1); | ||
145 | |||
146 | tmp |= BCSR_MISC_REG2_PORESET; | ||
147 | out_8(reg + BCSR_MISC_REG2_OFF, tmp); | ||
148 | |||
121 | for(;;); | 149 | for(;;); |
122 | } | 150 | } |
123 | 151 | ||
diff --git a/arch/ppc/syslib/ppc85xx_setup.c b/arch/ppc/syslib/ppc85xx_setup.c index 152c3ef1312a..f3277f469e78 100644 --- a/arch/ppc/syslib/ppc85xx_setup.c +++ b/arch/ppc/syslib/ppc85xx_setup.c | |||
@@ -132,6 +132,12 @@ mpc85xx_halt(void) | |||
132 | } | 132 | } |
133 | 133 | ||
134 | #ifdef CONFIG_PCI | 134 | #ifdef CONFIG_PCI |
135 | |||
136 | #if defined(CONFIG_MPC8555_CDS) | ||
137 | extern void mpc85xx_cds_enable_via(struct pci_controller *hose); | ||
138 | extern void mpc85xx_cds_fixup_via(struct pci_controller *hose); | ||
139 | #endif | ||
140 | |||
135 | static void __init | 141 | static void __init |
136 | mpc85xx_setup_pci1(struct pci_controller *hose) | 142 | mpc85xx_setup_pci1(struct pci_controller *hose) |
137 | { | 143 | { |
@@ -302,8 +308,18 @@ mpc85xx_setup_hose(void) | |||
302 | 308 | ||
303 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 309 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
304 | 310 | ||
311 | #if defined(CONFIG_MPC8555_CDS) | ||
312 | /* Pre pciauto_bus_scan VIA init */ | ||
313 | mpc85xx_cds_enable_via(hose_a); | ||
314 | #endif | ||
315 | |||
305 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); | 316 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); |
306 | 317 | ||
318 | #if defined(CONFIG_MPC8555_CDS) | ||
319 | /* Post pciauto_bus_scan VIA fixup */ | ||
320 | mpc85xx_cds_fixup_via(hose_a); | ||
321 | #endif | ||
322 | |||
307 | #ifdef CONFIG_85xx_PCI2 | 323 | #ifdef CONFIG_85xx_PCI2 |
308 | hose_b = pcibios_alloc_controller(); | 324 | hose_b = pcibios_alloc_controller(); |
309 | 325 | ||
diff --git a/arch/ppc/syslib/prom_init.c b/arch/ppc/syslib/prom_init.c index 2cee87137f2e..7f15136830f4 100644 --- a/arch/ppc/syslib/prom_init.c +++ b/arch/ppc/syslib/prom_init.c | |||
@@ -626,8 +626,18 @@ inspect_node(phandle node, struct device_node *dad, | |||
626 | l = call_prom("package-to-path", 3, 1, node, | 626 | l = call_prom("package-to-path", 3, 1, node, |
627 | mem_start, mem_end - mem_start); | 627 | mem_start, mem_end - mem_start); |
628 | if (l >= 0) { | 628 | if (l >= 0) { |
629 | char *p, *ep; | ||
630 | |||
629 | np->full_name = PTRUNRELOC((char *) mem_start); | 631 | np->full_name = PTRUNRELOC((char *) mem_start); |
630 | *(char *)(mem_start + l) = 0; | 632 | *(char *)(mem_start + l) = 0; |
633 | /* Fixup an Apple bug where they have bogus \0 chars in the | ||
634 | * middle of the path in some properties | ||
635 | */ | ||
636 | for (p = (char *)mem_start, ep = p + l; p < ep; p++) | ||
637 | if ((*p) == '\0') { | ||
638 | memmove(p, p+1, ep - p); | ||
639 | ep--; | ||
640 | } | ||
631 | mem_start = ALIGNUL(mem_start + l + 1); | 641 | mem_start = ALIGNUL(mem_start + l + 1); |
632 | } | 642 | } |
633 | 643 | ||
diff --git a/arch/ppc64/boot/prom.c b/arch/ppc64/boot/prom.c index 7b607d1862cb..d5218b15824e 100644 --- a/arch/ppc64/boot/prom.c +++ b/arch/ppc64/boot/prom.c | |||
@@ -11,6 +11,23 @@ | |||
11 | #include <linux/string.h> | 11 | #include <linux/string.h> |
12 | #include <linux/ctype.h> | 12 | #include <linux/ctype.h> |
13 | 13 | ||
14 | extern __u32 __div64_32(unsigned long long *dividend, __u32 divisor); | ||
15 | |||
16 | /* The unnecessary pointer compare is there | ||
17 | * to check for type safety (n must be 64bit) | ||
18 | */ | ||
19 | # define do_div(n,base) ({ \ | ||
20 | __u32 __base = (base); \ | ||
21 | __u32 __rem; \ | ||
22 | (void)(((typeof((n)) *)0) == ((unsigned long long *)0)); \ | ||
23 | if (((n) >> 32) == 0) { \ | ||
24 | __rem = (__u32)(n) % __base; \ | ||
25 | (n) = (__u32)(n) / __base; \ | ||
26 | } else \ | ||
27 | __rem = __div64_32(&(n), __base); \ | ||
28 | __rem; \ | ||
29 | }) | ||
30 | |||
14 | int (*prom)(void *); | 31 | int (*prom)(void *); |
15 | 32 | ||
16 | void *chosen_handle; | 33 | void *chosen_handle; |
@@ -352,7 +369,7 @@ static int skip_atoi(const char **s) | |||
352 | #define SPECIAL 32 /* 0x */ | 369 | #define SPECIAL 32 /* 0x */ |
353 | #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ | 370 | #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ |
354 | 371 | ||
355 | static char * number(char * str, long num, int base, int size, int precision, int type) | 372 | static char * number(char * str, unsigned long long num, int base, int size, int precision, int type) |
356 | { | 373 | { |
357 | char c,sign,tmp[66]; | 374 | char c,sign,tmp[66]; |
358 | const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; | 375 | const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; |
@@ -367,9 +384,9 @@ static char * number(char * str, long num, int base, int size, int precision, in | |||
367 | c = (type & ZEROPAD) ? '0' : ' '; | 384 | c = (type & ZEROPAD) ? '0' : ' '; |
368 | sign = 0; | 385 | sign = 0; |
369 | if (type & SIGN) { | 386 | if (type & SIGN) { |
370 | if (num < 0) { | 387 | if ((signed long long)num < 0) { |
371 | sign = '-'; | 388 | sign = '-'; |
372 | num = -num; | 389 | num = - (signed long long)num; |
373 | size--; | 390 | size--; |
374 | } else if (type & PLUS) { | 391 | } else if (type & PLUS) { |
375 | sign = '+'; | 392 | sign = '+'; |
@@ -389,8 +406,7 @@ static char * number(char * str, long num, int base, int size, int precision, in | |||
389 | if (num == 0) | 406 | if (num == 0) |
390 | tmp[i++]='0'; | 407 | tmp[i++]='0'; |
391 | else while (num != 0) { | 408 | else while (num != 0) { |
392 | tmp[i++] = digits[num % base]; | 409 | tmp[i++] = digits[do_div(num, base)]; |
393 | num /= base; | ||
394 | } | 410 | } |
395 | if (i > precision) | 411 | if (i > precision) |
396 | precision = i; | 412 | precision = i; |
@@ -426,7 +442,7 @@ int sprintf(char * buf, const char *fmt, ...); | |||
426 | int vsprintf(char *buf, const char *fmt, va_list args) | 442 | int vsprintf(char *buf, const char *fmt, va_list args) |
427 | { | 443 | { |
428 | int len; | 444 | int len; |
429 | unsigned long num; | 445 | unsigned long long num; |
430 | int i, base; | 446 | int i, base; |
431 | char * str; | 447 | char * str; |
432 | const char *s; | 448 | const char *s; |
diff --git a/arch/ppc64/configs/g5_defconfig b/arch/ppc64/configs/g5_defconfig index 0f90df0b3f9c..1eb33398648e 100644 --- a/arch/ppc64/configs/g5_defconfig +++ b/arch/ppc64/configs/g5_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.11 | 3 | # Linux kernel version: 2.6.12-rc6 |
4 | # Thu Mar 10 16:47:04 2005 | 4 | # Tue Jun 14 16:59:20 2005 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
11 | CONFIG_HAVE_DEC_LOCK=y | 11 | CONFIG_HAVE_DEC_LOCK=y |
12 | CONFIG_EARLY_PRINTK=y | 12 | CONFIG_EARLY_PRINTK=y |
13 | CONFIG_COMPAT=y | 13 | CONFIG_COMPAT=y |
14 | CONFIG_FRAME_POINTER=y | 14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | 15 | CONFIG_FORCE_MAX_ZONEORDER=13 |
16 | 16 | ||
17 | # | 17 | # |
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13 | |||
20 | CONFIG_EXPERIMENTAL=y | 20 | CONFIG_EXPERIMENTAL=y |
21 | CONFIG_CLEAN_COMPILE=y | 21 | CONFIG_CLEAN_COMPILE=y |
22 | CONFIG_LOCK_KERNEL=y | 22 | CONFIG_LOCK_KERNEL=y |
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | 24 | ||
24 | # | 25 | # |
25 | # General setup | 26 | # General setup |
@@ -31,19 +32,20 @@ CONFIG_POSIX_MQUEUE=y | |||
31 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
32 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
33 | # CONFIG_AUDIT is not set | 34 | # CONFIG_AUDIT is not set |
34 | CONFIG_LOG_BUF_SHIFT=17 | ||
35 | CONFIG_HOTPLUG=y | 35 | CONFIG_HOTPLUG=y |
36 | CONFIG_KOBJECT_UEVENT=y | 36 | CONFIG_KOBJECT_UEVENT=y |
37 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
38 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
39 | # CONFIG_CPUSETS is not set | ||
39 | # CONFIG_EMBEDDED is not set | 40 | # CONFIG_EMBEDDED is not set |
40 | CONFIG_KALLSYMS=y | 41 | CONFIG_KALLSYMS=y |
41 | # CONFIG_KALLSYMS_ALL is not set | 42 | # CONFIG_KALLSYMS_ALL is not set |
42 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 43 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
43 | CONFIG_BASE_FULL=y | 46 | CONFIG_BASE_FULL=y |
44 | CONFIG_FUTEX=y | 47 | CONFIG_FUTEX=y |
45 | CONFIG_EPOLL=y | 48 | CONFIG_EPOLL=y |
46 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
47 | CONFIG_SHMEM=y | 49 | CONFIG_SHMEM=y |
48 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 50 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
49 | CONFIG_CC_ALIGN_LABELS=0 | 51 | CONFIG_CC_ALIGN_LABELS=0 |
@@ -87,6 +89,8 @@ CONFIG_NR_CPUS=2 | |||
87 | # CONFIG_SCHED_SMT is not set | 89 | # CONFIG_SCHED_SMT is not set |
88 | # CONFIG_PREEMPT is not set | 90 | # CONFIG_PREEMPT is not set |
89 | CONFIG_GENERIC_HARDIRQS=y | 91 | CONFIG_GENERIC_HARDIRQS=y |
92 | CONFIG_SECCOMP=y | ||
93 | CONFIG_ISA_DMA_API=y | ||
90 | 94 | ||
91 | # | 95 | # |
92 | # General setup | 96 | # General setup |
@@ -97,6 +101,7 @@ CONFIG_BINFMT_ELF=y | |||
97 | # CONFIG_BINFMT_MISC is not set | 101 | # CONFIG_BINFMT_MISC is not set |
98 | CONFIG_PCI_LEGACY_PROC=y | 102 | CONFIG_PCI_LEGACY_PROC=y |
99 | CONFIG_PCI_NAMES=y | 103 | CONFIG_PCI_NAMES=y |
104 | # CONFIG_PCI_DEBUG is not set | ||
100 | # CONFIG_HOTPLUG_CPU is not set | 105 | # CONFIG_HOTPLUG_CPU is not set |
101 | 106 | ||
102 | # | 107 | # |
@@ -105,10 +110,6 @@ CONFIG_PCI_NAMES=y | |||
105 | # CONFIG_PCCARD is not set | 110 | # CONFIG_PCCARD is not set |
106 | 111 | ||
107 | # | 112 | # |
108 | # PC-card bridges | ||
109 | # | ||
110 | |||
111 | # | ||
112 | # PCI Hotplug Support | 113 | # PCI Hotplug Support |
113 | # | 114 | # |
114 | # CONFIG_HOTPLUG_PCI is not set | 115 | # CONFIG_HOTPLUG_PCI is not set |
@@ -293,7 +294,6 @@ CONFIG_SCSI_SATA_SVW=y | |||
293 | # CONFIG_SCSI_BUSLOGIC is not set | 294 | # CONFIG_SCSI_BUSLOGIC is not set |
294 | # CONFIG_SCSI_DMX3191D is not set | 295 | # CONFIG_SCSI_DMX3191D is not set |
295 | # CONFIG_SCSI_EATA is not set | 296 | # CONFIG_SCSI_EATA is not set |
296 | # CONFIG_SCSI_EATA_PIO is not set | ||
297 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 297 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
298 | # CONFIG_SCSI_GDTH is not set | 298 | # CONFIG_SCSI_GDTH is not set |
299 | # CONFIG_SCSI_IPS is not set | 299 | # CONFIG_SCSI_IPS is not set |
@@ -301,7 +301,6 @@ CONFIG_SCSI_SATA_SVW=y | |||
301 | # CONFIG_SCSI_INIA100 is not set | 301 | # CONFIG_SCSI_INIA100 is not set |
302 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 302 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
303 | # CONFIG_SCSI_IPR is not set | 303 | # CONFIG_SCSI_IPR is not set |
304 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
305 | # CONFIG_SCSI_QLOGIC_FC is not set | 304 | # CONFIG_SCSI_QLOGIC_FC is not set |
306 | # CONFIG_SCSI_QLOGIC_1280 is not set | 305 | # CONFIG_SCSI_QLOGIC_1280 is not set |
307 | CONFIG_SCSI_QLA2XXX=y | 306 | CONFIG_SCSI_QLA2XXX=y |
@@ -310,6 +309,7 @@ CONFIG_SCSI_QLA2XXX=y | |||
310 | # CONFIG_SCSI_QLA2300 is not set | 309 | # CONFIG_SCSI_QLA2300 is not set |
311 | # CONFIG_SCSI_QLA2322 is not set | 310 | # CONFIG_SCSI_QLA2322 is not set |
312 | # CONFIG_SCSI_QLA6312 is not set | 311 | # CONFIG_SCSI_QLA6312 is not set |
312 | # CONFIG_SCSI_LPFC is not set | ||
313 | # CONFIG_SCSI_DC395x is not set | 313 | # CONFIG_SCSI_DC395x is not set |
314 | # CONFIG_SCSI_DC390T is not set | 314 | # CONFIG_SCSI_DC390T is not set |
315 | # CONFIG_SCSI_DEBUG is not set | 315 | # CONFIG_SCSI_DEBUG is not set |
@@ -332,6 +332,7 @@ CONFIG_DM_CRYPT=m | |||
332 | CONFIG_DM_SNAPSHOT=m | 332 | CONFIG_DM_SNAPSHOT=m |
333 | CONFIG_DM_MIRROR=m | 333 | CONFIG_DM_MIRROR=m |
334 | CONFIG_DM_ZERO=m | 334 | CONFIG_DM_ZERO=m |
335 | # CONFIG_DM_MULTIPATH is not set | ||
335 | 336 | ||
336 | # | 337 | # |
337 | # Fusion MPT device support | 338 | # Fusion MPT device support |
@@ -394,7 +395,6 @@ CONFIG_NET=y | |||
394 | # | 395 | # |
395 | CONFIG_PACKET=y | 396 | CONFIG_PACKET=y |
396 | # CONFIG_PACKET_MMAP is not set | 397 | # CONFIG_PACKET_MMAP is not set |
397 | # CONFIG_NETLINK_DEV is not set | ||
398 | CONFIG_UNIX=y | 398 | CONFIG_UNIX=y |
399 | CONFIG_NET_KEY=m | 399 | CONFIG_NET_KEY=m |
400 | CONFIG_INET=y | 400 | CONFIG_INET=y |
@@ -564,6 +564,8 @@ CONFIG_E1000=y | |||
564 | # CONFIG_R8169 is not set | 564 | # CONFIG_R8169 is not set |
565 | # CONFIG_SK98LIN is not set | 565 | # CONFIG_SK98LIN is not set |
566 | CONFIG_TIGON3=m | 566 | CONFIG_TIGON3=m |
567 | # CONFIG_BNX2 is not set | ||
568 | # CONFIG_MV643XX_ETH is not set | ||
567 | 569 | ||
568 | # | 570 | # |
569 | # Ethernet (10000 Mbit) | 571 | # Ethernet (10000 Mbit) |
@@ -631,18 +633,6 @@ CONFIG_INPUT_EVDEV=y | |||
631 | # CONFIG_INPUT_EVBUG is not set | 633 | # CONFIG_INPUT_EVBUG is not set |
632 | 634 | ||
633 | # | 635 | # |
634 | # Input I/O drivers | ||
635 | # | ||
636 | # CONFIG_GAMEPORT is not set | ||
637 | CONFIG_SOUND_GAMEPORT=y | ||
638 | CONFIG_SERIO=y | ||
639 | # CONFIG_SERIO_I8042 is not set | ||
640 | # CONFIG_SERIO_SERPORT is not set | ||
641 | # CONFIG_SERIO_CT82C710 is not set | ||
642 | # CONFIG_SERIO_PCIPS2 is not set | ||
643 | # CONFIG_SERIO_RAW is not set | ||
644 | |||
645 | # | ||
646 | # Input Device Drivers | 636 | # Input Device Drivers |
647 | # | 637 | # |
648 | CONFIG_INPUT_KEYBOARD=y | 638 | CONFIG_INPUT_KEYBOARD=y |
@@ -660,6 +650,16 @@ CONFIG_INPUT_MOUSE=y | |||
660 | # CONFIG_INPUT_MISC is not set | 650 | # CONFIG_INPUT_MISC is not set |
661 | 651 | ||
662 | # | 652 | # |
653 | # Hardware I/O ports | ||
654 | # | ||
655 | CONFIG_SERIO=y | ||
656 | # CONFIG_SERIO_I8042 is not set | ||
657 | # CONFIG_SERIO_SERPORT is not set | ||
658 | # CONFIG_SERIO_PCIPS2 is not set | ||
659 | # CONFIG_SERIO_RAW is not set | ||
660 | # CONFIG_GAMEPORT is not set | ||
661 | |||
662 | # | ||
663 | # Character devices | 663 | # Character devices |
664 | # | 664 | # |
665 | CONFIG_VT=y | 665 | CONFIG_VT=y |
@@ -676,6 +676,7 @@ CONFIG_HW_CONSOLE=y | |||
676 | # Non-8250 serial port support | 676 | # Non-8250 serial port support |
677 | # | 677 | # |
678 | # CONFIG_SERIAL_PMACZILOG is not set | 678 | # CONFIG_SERIAL_PMACZILOG is not set |
679 | # CONFIG_SERIAL_JSM is not set | ||
679 | CONFIG_UNIX98_PTYS=y | 680 | CONFIG_UNIX98_PTYS=y |
680 | CONFIG_LEGACY_PTYS=y | 681 | CONFIG_LEGACY_PTYS=y |
681 | CONFIG_LEGACY_PTY_COUNT=256 | 682 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -698,9 +699,12 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
698 | # | 699 | # |
699 | # Ftape, the floppy tape device driver | 700 | # Ftape, the floppy tape device driver |
700 | # | 701 | # |
702 | CONFIG_AGP=m | ||
703 | CONFIG_AGP_UNINORTH=m | ||
701 | # CONFIG_DRM is not set | 704 | # CONFIG_DRM is not set |
702 | CONFIG_RAW_DRIVER=y | 705 | CONFIG_RAW_DRIVER=y |
703 | CONFIG_MAX_RAW_DEVS=256 | 706 | CONFIG_MAX_RAW_DEVS=256 |
707 | # CONFIG_HANGCHECK_TIMER is not set | ||
704 | 708 | ||
705 | # | 709 | # |
706 | # TPM devices | 710 | # TPM devices |
@@ -730,12 +734,11 @@ CONFIG_I2C_ALGOBIT=y | |||
730 | # CONFIG_I2C_AMD8111 is not set | 734 | # CONFIG_I2C_AMD8111 is not set |
731 | # CONFIG_I2C_I801 is not set | 735 | # CONFIG_I2C_I801 is not set |
732 | # CONFIG_I2C_I810 is not set | 736 | # CONFIG_I2C_I810 is not set |
737 | # CONFIG_I2C_PIIX4 is not set | ||
733 | # CONFIG_I2C_ISA is not set | 738 | # CONFIG_I2C_ISA is not set |
734 | CONFIG_I2C_KEYWEST=y | 739 | CONFIG_I2C_KEYWEST=y |
735 | # CONFIG_I2C_MPC is not set | ||
736 | # CONFIG_I2C_NFORCE2 is not set | 740 | # CONFIG_I2C_NFORCE2 is not set |
737 | # CONFIG_I2C_PARPORT_LIGHT is not set | 741 | # CONFIG_I2C_PARPORT_LIGHT is not set |
738 | # CONFIG_I2C_PIIX4 is not set | ||
739 | # CONFIG_I2C_PROSAVAGE is not set | 742 | # CONFIG_I2C_PROSAVAGE is not set |
740 | # CONFIG_I2C_SAVAGE4 is not set | 743 | # CONFIG_I2C_SAVAGE4 is not set |
741 | # CONFIG_SCx200_ACB is not set | 744 | # CONFIG_SCx200_ACB is not set |
@@ -772,6 +775,7 @@ CONFIG_I2C_KEYWEST=y | |||
772 | # CONFIG_SENSORS_LM85 is not set | 775 | # CONFIG_SENSORS_LM85 is not set |
773 | # CONFIG_SENSORS_LM87 is not set | 776 | # CONFIG_SENSORS_LM87 is not set |
774 | # CONFIG_SENSORS_LM90 is not set | 777 | # CONFIG_SENSORS_LM90 is not set |
778 | # CONFIG_SENSORS_LM92 is not set | ||
775 | # CONFIG_SENSORS_MAX1619 is not set | 779 | # CONFIG_SENSORS_MAX1619 is not set |
776 | # CONFIG_SENSORS_PC87360 is not set | 780 | # CONFIG_SENSORS_PC87360 is not set |
777 | # CONFIG_SENSORS_SMSC47B397 is not set | 781 | # CONFIG_SENSORS_SMSC47B397 is not set |
@@ -785,6 +789,7 @@ CONFIG_I2C_KEYWEST=y | |||
785 | # | 789 | # |
786 | # Other I2C Chip support | 790 | # Other I2C Chip support |
787 | # | 791 | # |
792 | # CONFIG_SENSORS_DS1337 is not set | ||
788 | # CONFIG_SENSORS_EEPROM is not set | 793 | # CONFIG_SENSORS_EEPROM is not set |
789 | # CONFIG_SENSORS_PCF8574 is not set | 794 | # CONFIG_SENSORS_PCF8574 is not set |
790 | # CONFIG_SENSORS_PCF8591 is not set | 795 | # CONFIG_SENSORS_PCF8591 is not set |
@@ -817,6 +822,11 @@ CONFIG_I2C_KEYWEST=y | |||
817 | # Graphics support | 822 | # Graphics support |
818 | # | 823 | # |
819 | CONFIG_FB=y | 824 | CONFIG_FB=y |
825 | CONFIG_FB_CFB_FILLRECT=y | ||
826 | CONFIG_FB_CFB_COPYAREA=y | ||
827 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
828 | CONFIG_FB_SOFT_CURSOR=y | ||
829 | CONFIG_FB_MACMODES=y | ||
820 | CONFIG_FB_MODE_HELPERS=y | 830 | CONFIG_FB_MODE_HELPERS=y |
821 | CONFIG_FB_TILEBLITTING=y | 831 | CONFIG_FB_TILEBLITTING=y |
822 | # CONFIG_FB_CIRRUS is not set | 832 | # CONFIG_FB_CIRRUS is not set |
@@ -830,6 +840,7 @@ CONFIG_FB_OF=y | |||
830 | # CONFIG_FB_ASILIANT is not set | 840 | # CONFIG_FB_ASILIANT is not set |
831 | # CONFIG_FB_IMSTT is not set | 841 | # CONFIG_FB_IMSTT is not set |
832 | # CONFIG_FB_VGA16 is not set | 842 | # CONFIG_FB_VGA16 is not set |
843 | # CONFIG_FB_NVIDIA is not set | ||
833 | CONFIG_FB_RIVA=y | 844 | CONFIG_FB_RIVA=y |
834 | # CONFIG_FB_RIVA_I2C is not set | 845 | # CONFIG_FB_RIVA_I2C is not set |
835 | # CONFIG_FB_RIVA_DEBUG is not set | 846 | # CONFIG_FB_RIVA_DEBUG is not set |
@@ -847,6 +858,7 @@ CONFIG_FB_RADEON_I2C=y | |||
847 | # CONFIG_FB_3DFX is not set | 858 | # CONFIG_FB_3DFX is not set |
848 | # CONFIG_FB_VOODOO1 is not set | 859 | # CONFIG_FB_VOODOO1 is not set |
849 | # CONFIG_FB_TRIDENT is not set | 860 | # CONFIG_FB_TRIDENT is not set |
861 | # CONFIG_FB_S1D13XXX is not set | ||
850 | # CONFIG_FB_VIRTUAL is not set | 862 | # CONFIG_FB_VIRTUAL is not set |
851 | 863 | ||
852 | # | 864 | # |
@@ -880,6 +892,8 @@ CONFIG_LCD_DEVICE=y | |||
880 | # | 892 | # |
881 | # USB support | 893 | # USB support |
882 | # | 894 | # |
895 | CONFIG_USB_ARCH_HAS_HCD=y | ||
896 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
883 | CONFIG_USB=y | 897 | CONFIG_USB=y |
884 | # CONFIG_USB_DEBUG is not set | 898 | # CONFIG_USB_DEBUG is not set |
885 | 899 | ||
@@ -890,8 +904,6 @@ CONFIG_USB_DEVICEFS=y | |||
890 | # CONFIG_USB_BANDWIDTH is not set | 904 | # CONFIG_USB_BANDWIDTH is not set |
891 | # CONFIG_USB_DYNAMIC_MINORS is not set | 905 | # CONFIG_USB_DYNAMIC_MINORS is not set |
892 | # CONFIG_USB_OTG is not set | 906 | # CONFIG_USB_OTG is not set |
893 | CONFIG_USB_ARCH_HAS_HCD=y | ||
894 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
895 | 907 | ||
896 | # | 908 | # |
897 | # USB Host Controller Drivers | 909 | # USB Host Controller Drivers |
@@ -917,7 +929,6 @@ CONFIG_USB_PRINTER=y | |||
917 | # | 929 | # |
918 | CONFIG_USB_STORAGE=y | 930 | CONFIG_USB_STORAGE=y |
919 | # CONFIG_USB_STORAGE_DEBUG is not set | 931 | # CONFIG_USB_STORAGE_DEBUG is not set |
920 | CONFIG_USB_STORAGE_RW_DETECT=y | ||
921 | CONFIG_USB_STORAGE_DATAFAB=y | 932 | CONFIG_USB_STORAGE_DATAFAB=y |
922 | CONFIG_USB_STORAGE_FREECOM=y | 933 | CONFIG_USB_STORAGE_FREECOM=y |
923 | CONFIG_USB_STORAGE_ISD200=y | 934 | CONFIG_USB_STORAGE_ISD200=y |
@@ -1004,8 +1015,10 @@ CONFIG_USB_MON=y | |||
1004 | # | 1015 | # |
1005 | CONFIG_USB_SERIAL=m | 1016 | CONFIG_USB_SERIAL=m |
1006 | CONFIG_USB_SERIAL_GENERIC=y | 1017 | CONFIG_USB_SERIAL_GENERIC=y |
1018 | # CONFIG_USB_SERIAL_AIRPRIME is not set | ||
1007 | CONFIG_USB_SERIAL_BELKIN=m | 1019 | CONFIG_USB_SERIAL_BELKIN=m |
1008 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m | 1020 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m |
1021 | # CONFIG_USB_SERIAL_CP2101 is not set | ||
1009 | CONFIG_USB_SERIAL_CYPRESS_M8=m | 1022 | CONFIG_USB_SERIAL_CYPRESS_M8=m |
1010 | CONFIG_USB_SERIAL_EMPEG=m | 1023 | CONFIG_USB_SERIAL_EMPEG=m |
1011 | CONFIG_USB_SERIAL_FTDI_SIO=m | 1024 | CONFIG_USB_SERIAL_FTDI_SIO=m |
@@ -1034,6 +1047,7 @@ CONFIG_USB_SERIAL_KLSI=m | |||
1034 | CONFIG_USB_SERIAL_KOBIL_SCT=m | 1047 | CONFIG_USB_SERIAL_KOBIL_SCT=m |
1035 | CONFIG_USB_SERIAL_MCT_U232=m | 1048 | CONFIG_USB_SERIAL_MCT_U232=m |
1036 | CONFIG_USB_SERIAL_PL2303=m | 1049 | CONFIG_USB_SERIAL_PL2303=m |
1050 | # CONFIG_USB_SERIAL_HP4X is not set | ||
1037 | CONFIG_USB_SERIAL_SAFE=m | 1051 | CONFIG_USB_SERIAL_SAFE=m |
1038 | CONFIG_USB_SERIAL_SAFE_PADDED=y | 1052 | CONFIG_USB_SERIAL_SAFE_PADDED=y |
1039 | CONFIG_USB_SERIAL_TI=m | 1053 | CONFIG_USB_SERIAL_TI=m |
@@ -1270,11 +1284,13 @@ CONFIG_OPROFILE=y | |||
1270 | # | 1284 | # |
1271 | # Kernel hacking | 1285 | # Kernel hacking |
1272 | # | 1286 | # |
1287 | # CONFIG_PRINTK_TIME is not set | ||
1273 | CONFIG_DEBUG_KERNEL=y | 1288 | CONFIG_DEBUG_KERNEL=y |
1274 | CONFIG_MAGIC_SYSRQ=y | 1289 | CONFIG_MAGIC_SYSRQ=y |
1275 | # CONFIG_PRINTK_TIME is not set | 1290 | CONFIG_LOG_BUF_SHIFT=17 |
1276 | # CONFIG_SCHEDSTATS is not set | 1291 | # CONFIG_SCHEDSTATS is not set |
1277 | # CONFIG_DEBUG_SLAB is not set | 1292 | # CONFIG_DEBUG_SLAB is not set |
1293 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1278 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1294 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1279 | # CONFIG_DEBUG_KOBJECT is not set | 1295 | # CONFIG_DEBUG_KOBJECT is not set |
1280 | # CONFIG_DEBUG_INFO is not set | 1296 | # CONFIG_DEBUG_INFO is not set |
diff --git a/arch/ppc64/configs/iSeries_defconfig b/arch/ppc64/configs/iSeries_defconfig index a39e9d2e25da..f6a2b99afd63 100644 --- a/arch/ppc64/configs/iSeries_defconfig +++ b/arch/ppc64/configs/iSeries_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.11-rc3-bk6 | 3 | # Linux kernel version: 2.6.12-rc6 |
4 | # Wed Feb 9 23:34:52 2005 | 4 | # Tue Jun 14 17:01:28 2005 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
11 | CONFIG_HAVE_DEC_LOCK=y | 11 | CONFIG_HAVE_DEC_LOCK=y |
12 | CONFIG_EARLY_PRINTK=y | 12 | CONFIG_EARLY_PRINTK=y |
13 | CONFIG_COMPAT=y | 13 | CONFIG_COMPAT=y |
14 | CONFIG_FRAME_POINTER=y | 14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | 15 | CONFIG_FORCE_MAX_ZONEORDER=13 |
16 | 16 | ||
17 | # | 17 | # |
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13 | |||
20 | CONFIG_EXPERIMENTAL=y | 20 | CONFIG_EXPERIMENTAL=y |
21 | CONFIG_CLEAN_COMPILE=y | 21 | CONFIG_CLEAN_COMPILE=y |
22 | CONFIG_LOCK_KERNEL=y | 22 | CONFIG_LOCK_KERNEL=y |
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | 24 | ||
24 | # | 25 | # |
25 | # General setup | 26 | # General setup |
@@ -30,24 +31,29 @@ CONFIG_SYSVIPC=y | |||
30 | CONFIG_POSIX_MQUEUE=y | 31 | CONFIG_POSIX_MQUEUE=y |
31 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
32 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
33 | CONFIG_LOG_BUF_SHIFT=17 | 34 | CONFIG_AUDIT=y |
35 | CONFIG_AUDITSYSCALL=y | ||
34 | CONFIG_HOTPLUG=y | 36 | CONFIG_HOTPLUG=y |
35 | CONFIG_KOBJECT_UEVENT=y | 37 | CONFIG_KOBJECT_UEVENT=y |
36 | CONFIG_IKCONFIG=y | 38 | CONFIG_IKCONFIG=y |
37 | CONFIG_IKCONFIG_PROC=y | 39 | CONFIG_IKCONFIG_PROC=y |
40 | # CONFIG_CPUSETS is not set | ||
38 | # CONFIG_EMBEDDED is not set | 41 | # CONFIG_EMBEDDED is not set |
39 | CONFIG_KALLSYMS=y | 42 | CONFIG_KALLSYMS=y |
40 | # CONFIG_KALLSYMS_ALL is not set | 43 | # CONFIG_KALLSYMS_ALL is not set |
41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 44 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
45 | CONFIG_PRINTK=y | ||
46 | CONFIG_BUG=y | ||
47 | CONFIG_BASE_FULL=y | ||
42 | CONFIG_FUTEX=y | 48 | CONFIG_FUTEX=y |
43 | CONFIG_EPOLL=y | 49 | CONFIG_EPOLL=y |
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | 50 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 51 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
47 | CONFIG_CC_ALIGN_LABELS=0 | 52 | CONFIG_CC_ALIGN_LABELS=0 |
48 | CONFIG_CC_ALIGN_LOOPS=0 | 53 | CONFIG_CC_ALIGN_LOOPS=0 |
49 | CONFIG_CC_ALIGN_JUMPS=0 | 54 | CONFIG_CC_ALIGN_JUMPS=0 |
50 | # CONFIG_TINY_SHMEM is not set | 55 | # CONFIG_TINY_SHMEM is not set |
56 | CONFIG_BASE_SMALL=0 | ||
51 | 57 | ||
52 | # | 58 | # |
53 | # Loadable module support | 59 | # Loadable module support |
@@ -79,6 +85,8 @@ CONFIG_NR_CPUS=32 | |||
79 | CONFIG_GENERIC_HARDIRQS=y | 85 | CONFIG_GENERIC_HARDIRQS=y |
80 | CONFIG_MSCHUNKS=y | 86 | CONFIG_MSCHUNKS=y |
81 | CONFIG_LPARCFG=y | 87 | CONFIG_LPARCFG=y |
88 | CONFIG_SECCOMP=y | ||
89 | CONFIG_ISA_DMA_API=y | ||
82 | 90 | ||
83 | # | 91 | # |
84 | # General setup | 92 | # General setup |
@@ -89,6 +97,7 @@ CONFIG_BINFMT_ELF=y | |||
89 | # CONFIG_BINFMT_MISC is not set | 97 | # CONFIG_BINFMT_MISC is not set |
90 | CONFIG_PCI_LEGACY_PROC=y | 98 | CONFIG_PCI_LEGACY_PROC=y |
91 | CONFIG_PCI_NAMES=y | 99 | CONFIG_PCI_NAMES=y |
100 | # CONFIG_PCI_DEBUG is not set | ||
92 | 101 | ||
93 | # | 102 | # |
94 | # PCCARD (PCMCIA/CardBus) support | 103 | # PCCARD (PCMCIA/CardBus) support |
@@ -96,10 +105,6 @@ CONFIG_PCI_NAMES=y | |||
96 | # CONFIG_PCCARD is not set | 105 | # CONFIG_PCCARD is not set |
97 | 106 | ||
98 | # | 107 | # |
99 | # PC-card bridges | ||
100 | # | ||
101 | |||
102 | # | ||
103 | # PCI Hotplug Support | 108 | # PCI Hotplug Support |
104 | # | 109 | # |
105 | # CONFIG_HOTPLUG_PCI is not set | 110 | # CONFIG_HOTPLUG_PCI is not set |
@@ -210,7 +215,6 @@ CONFIG_SCSI_FC_ATTRS=y | |||
210 | # CONFIG_SCSI_BUSLOGIC is not set | 215 | # CONFIG_SCSI_BUSLOGIC is not set |
211 | # CONFIG_SCSI_DMX3191D is not set | 216 | # CONFIG_SCSI_DMX3191D is not set |
212 | # CONFIG_SCSI_EATA is not set | 217 | # CONFIG_SCSI_EATA is not set |
213 | # CONFIG_SCSI_EATA_PIO is not set | ||
214 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 218 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
215 | # CONFIG_SCSI_GDTH is not set | 219 | # CONFIG_SCSI_GDTH is not set |
216 | # CONFIG_SCSI_IPS is not set | 220 | # CONFIG_SCSI_IPS is not set |
@@ -219,7 +223,6 @@ CONFIG_SCSI_IBMVSCSI=m | |||
219 | # CONFIG_SCSI_INIA100 is not set | 223 | # CONFIG_SCSI_INIA100 is not set |
220 | # CONFIG_SCSI_SYM53C8XX_2 is not set | 224 | # CONFIG_SCSI_SYM53C8XX_2 is not set |
221 | # CONFIG_SCSI_IPR is not set | 225 | # CONFIG_SCSI_IPR is not set |
222 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
223 | # CONFIG_SCSI_QLOGIC_FC is not set | 226 | # CONFIG_SCSI_QLOGIC_FC is not set |
224 | # CONFIG_SCSI_QLOGIC_1280 is not set | 227 | # CONFIG_SCSI_QLOGIC_1280 is not set |
225 | CONFIG_SCSI_QLA2XXX=y | 228 | CONFIG_SCSI_QLA2XXX=y |
@@ -228,6 +231,7 @@ CONFIG_SCSI_QLA2XXX=y | |||
228 | # CONFIG_SCSI_QLA2300 is not set | 231 | # CONFIG_SCSI_QLA2300 is not set |
229 | # CONFIG_SCSI_QLA2322 is not set | 232 | # CONFIG_SCSI_QLA2322 is not set |
230 | # CONFIG_SCSI_QLA6312 is not set | 233 | # CONFIG_SCSI_QLA6312 is not set |
234 | # CONFIG_SCSI_LPFC is not set | ||
231 | # CONFIG_SCSI_DC395x is not set | 235 | # CONFIG_SCSI_DC395x is not set |
232 | # CONFIG_SCSI_DC390T is not set | 236 | # CONFIG_SCSI_DC390T is not set |
233 | # CONFIG_SCSI_DEBUG is not set | 237 | # CONFIG_SCSI_DEBUG is not set |
@@ -250,6 +254,7 @@ CONFIG_DM_CRYPT=m | |||
250 | CONFIG_DM_SNAPSHOT=m | 254 | CONFIG_DM_SNAPSHOT=m |
251 | CONFIG_DM_MIRROR=m | 255 | CONFIG_DM_MIRROR=m |
252 | CONFIG_DM_ZERO=m | 256 | CONFIG_DM_ZERO=m |
257 | # CONFIG_DM_MULTIPATH is not set | ||
253 | 258 | ||
254 | # | 259 | # |
255 | # Fusion MPT device support | 260 | # Fusion MPT device support |
@@ -280,7 +285,6 @@ CONFIG_NET=y | |||
280 | # | 285 | # |
281 | CONFIG_PACKET=y | 286 | CONFIG_PACKET=y |
282 | # CONFIG_PACKET_MMAP is not set | 287 | # CONFIG_PACKET_MMAP is not set |
283 | # CONFIG_NETLINK_DEV is not set | ||
284 | CONFIG_UNIX=y | 288 | CONFIG_UNIX=y |
285 | CONFIG_NET_KEY=m | 289 | CONFIG_NET_KEY=m |
286 | CONFIG_INET=y | 290 | CONFIG_INET=y |
@@ -445,7 +449,6 @@ CONFIG_PCNET32=y | |||
445 | # CONFIG_DGRS is not set | 449 | # CONFIG_DGRS is not set |
446 | # CONFIG_EEPRO100 is not set | 450 | # CONFIG_EEPRO100 is not set |
447 | CONFIG_E100=y | 451 | CONFIG_E100=y |
448 | # CONFIG_E100_NAPI is not set | ||
449 | # CONFIG_FEALNX is not set | 452 | # CONFIG_FEALNX is not set |
450 | # CONFIG_NATSEMI is not set | 453 | # CONFIG_NATSEMI is not set |
451 | # CONFIG_NE2K_PCI is not set | 454 | # CONFIG_NE2K_PCI is not set |
@@ -471,6 +474,7 @@ CONFIG_E1000=m | |||
471 | # CONFIG_SK98LIN is not set | 474 | # CONFIG_SK98LIN is not set |
472 | # CONFIG_VIA_VELOCITY is not set | 475 | # CONFIG_VIA_VELOCITY is not set |
473 | # CONFIG_TIGON3 is not set | 476 | # CONFIG_TIGON3 is not set |
477 | # CONFIG_BNX2 is not set | ||
474 | 478 | ||
475 | # | 479 | # |
476 | # Ethernet (10000 Mbit) | 480 | # Ethernet (10000 Mbit) |
@@ -539,14 +543,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
539 | # CONFIG_INPUT_EVBUG is not set | 543 | # CONFIG_INPUT_EVBUG is not set |
540 | 544 | ||
541 | # | 545 | # |
542 | # Input I/O drivers | ||
543 | # | ||
544 | # CONFIG_GAMEPORT is not set | ||
545 | CONFIG_SOUND_GAMEPORT=y | ||
546 | # CONFIG_SERIO is not set | ||
547 | # CONFIG_SERIO_I8042 is not set | ||
548 | |||
549 | # | ||
550 | # Input Device Drivers | 546 | # Input Device Drivers |
551 | # | 547 | # |
552 | # CONFIG_INPUT_KEYBOARD is not set | 548 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -556,6 +552,12 @@ CONFIG_SOUND_GAMEPORT=y | |||
556 | # CONFIG_INPUT_MISC is not set | 552 | # CONFIG_INPUT_MISC is not set |
557 | 553 | ||
558 | # | 554 | # |
555 | # Hardware I/O ports | ||
556 | # | ||
557 | # CONFIG_SERIO is not set | ||
558 | # CONFIG_GAMEPORT is not set | ||
559 | |||
560 | # | ||
559 | # Character devices | 561 | # Character devices |
560 | # | 562 | # |
561 | # CONFIG_SERIAL_NONSTANDARD is not set | 563 | # CONFIG_SERIAL_NONSTANDARD is not set |
@@ -570,6 +572,7 @@ CONFIG_SOUND_GAMEPORT=y | |||
570 | # | 572 | # |
571 | CONFIG_SERIAL_CORE=m | 573 | CONFIG_SERIAL_CORE=m |
572 | CONFIG_SERIAL_ICOM=m | 574 | CONFIG_SERIAL_ICOM=m |
575 | # CONFIG_SERIAL_JSM is not set | ||
573 | CONFIG_UNIX98_PTYS=y | 576 | CONFIG_UNIX98_PTYS=y |
574 | CONFIG_LEGACY_PTYS=y | 577 | CONFIG_LEGACY_PTYS=y |
575 | CONFIG_LEGACY_PTY_COUNT=256 | 578 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -592,9 +595,16 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
592 | # | 595 | # |
593 | # Ftape, the floppy tape device driver | 596 | # Ftape, the floppy tape device driver |
594 | # | 597 | # |
598 | # CONFIG_AGP is not set | ||
595 | # CONFIG_DRM is not set | 599 | # CONFIG_DRM is not set |
596 | CONFIG_RAW_DRIVER=y | 600 | CONFIG_RAW_DRIVER=y |
597 | CONFIG_MAX_RAW_DEVS=256 | 601 | CONFIG_MAX_RAW_DEVS=256 |
602 | # CONFIG_HANGCHECK_TIMER is not set | ||
603 | |||
604 | # | ||
605 | # TPM devices | ||
606 | # | ||
607 | # CONFIG_TCG_TPM is not set | ||
598 | 608 | ||
599 | # | 609 | # |
600 | # I2C support | 610 | # I2C support |
@@ -633,13 +643,9 @@ CONFIG_MAX_RAW_DEVS=256 | |||
633 | # | 643 | # |
634 | # USB support | 644 | # USB support |
635 | # | 645 | # |
636 | # CONFIG_USB is not set | ||
637 | CONFIG_USB_ARCH_HAS_HCD=y | 646 | CONFIG_USB_ARCH_HAS_HCD=y |
638 | CONFIG_USB_ARCH_HAS_OHCI=y | 647 | CONFIG_USB_ARCH_HAS_OHCI=y |
639 | 648 | # CONFIG_USB is not set | |
640 | # | ||
641 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
642 | # | ||
643 | 649 | ||
644 | # | 650 | # |
645 | # USB Gadget Support | 651 | # USB Gadget Support |
@@ -848,10 +854,13 @@ CONFIG_OPROFILE=y | |||
848 | # | 854 | # |
849 | # Kernel hacking | 855 | # Kernel hacking |
850 | # | 856 | # |
857 | # CONFIG_PRINTK_TIME is not set | ||
851 | CONFIG_DEBUG_KERNEL=y | 858 | CONFIG_DEBUG_KERNEL=y |
852 | CONFIG_MAGIC_SYSRQ=y | 859 | CONFIG_MAGIC_SYSRQ=y |
860 | CONFIG_LOG_BUF_SHIFT=17 | ||
853 | # CONFIG_SCHEDSTATS is not set | 861 | # CONFIG_SCHEDSTATS is not set |
854 | # CONFIG_DEBUG_SLAB is not set | 862 | # CONFIG_DEBUG_SLAB is not set |
863 | # CONFIG_DEBUG_SPINLOCK is not set | ||
855 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 864 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
856 | # CONFIG_DEBUG_KOBJECT is not set | 865 | # CONFIG_DEBUG_KOBJECT is not set |
857 | # CONFIG_DEBUG_INFO is not set | 866 | # CONFIG_DEBUG_INFO is not set |
@@ -881,6 +890,7 @@ CONFIG_CRYPTO_SHA1=m | |||
881 | CONFIG_CRYPTO_SHA256=m | 890 | CONFIG_CRYPTO_SHA256=m |
882 | CONFIG_CRYPTO_SHA512=m | 891 | CONFIG_CRYPTO_SHA512=m |
883 | CONFIG_CRYPTO_WP512=m | 892 | CONFIG_CRYPTO_WP512=m |
893 | CONFIG_CRYPTO_TGR192=m | ||
884 | CONFIG_CRYPTO_DES=y | 894 | CONFIG_CRYPTO_DES=y |
885 | CONFIG_CRYPTO_BLOWFISH=m | 895 | CONFIG_CRYPTO_BLOWFISH=m |
886 | CONFIG_CRYPTO_TWOFISH=m | 896 | CONFIG_CRYPTO_TWOFISH=m |
diff --git a/arch/ppc64/configs/maple_defconfig b/arch/ppc64/configs/maple_defconfig index cf527501915c..8051b0f47b6f 100644 --- a/arch/ppc64/configs/maple_defconfig +++ b/arch/ppc64/configs/maple_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.11-rc3-bk6 | 3 | # Linux kernel version: 2.6.12-rc6 |
4 | # Wed Feb 9 23:34:53 2005 | 4 | # Tue Jun 14 17:12:48 2005 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
11 | CONFIG_HAVE_DEC_LOCK=y | 11 | CONFIG_HAVE_DEC_LOCK=y |
12 | CONFIG_EARLY_PRINTK=y | 12 | CONFIG_EARLY_PRINTK=y |
13 | CONFIG_COMPAT=y | 13 | CONFIG_COMPAT=y |
14 | CONFIG_FRAME_POINTER=y | 14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | 15 | CONFIG_FORCE_MAX_ZONEORDER=13 |
16 | 16 | ||
17 | # | 17 | # |
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13 | |||
20 | CONFIG_EXPERIMENTAL=y | 20 | CONFIG_EXPERIMENTAL=y |
21 | CONFIG_CLEAN_COMPILE=y | 21 | CONFIG_CLEAN_COMPILE=y |
22 | CONFIG_LOCK_KERNEL=y | 22 | CONFIG_LOCK_KERNEL=y |
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | 24 | ||
24 | # | 25 | # |
25 | # General setup | 26 | # General setup |
@@ -30,24 +31,28 @@ CONFIG_SYSVIPC=y | |||
30 | CONFIG_POSIX_MQUEUE=y | 31 | CONFIG_POSIX_MQUEUE=y |
31 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
32 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
33 | CONFIG_LOG_BUF_SHIFT=17 | 34 | # CONFIG_AUDIT is not set |
34 | # CONFIG_HOTPLUG is not set | 35 | # CONFIG_HOTPLUG is not set |
35 | CONFIG_KOBJECT_UEVENT=y | 36 | CONFIG_KOBJECT_UEVENT=y |
36 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
37 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
39 | # CONFIG_CPUSETS is not set | ||
38 | # CONFIG_EMBEDDED is not set | 40 | # CONFIG_EMBEDDED is not set |
39 | CONFIG_KALLSYMS=y | 41 | CONFIG_KALLSYMS=y |
40 | CONFIG_KALLSYMS_ALL=y | 42 | CONFIG_KALLSYMS_ALL=y |
41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 43 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_BASE_FULL=y | ||
42 | CONFIG_FUTEX=y | 47 | CONFIG_FUTEX=y |
43 | CONFIG_EPOLL=y | 48 | CONFIG_EPOLL=y |
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | 49 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 50 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
47 | CONFIG_CC_ALIGN_LABELS=0 | 51 | CONFIG_CC_ALIGN_LABELS=0 |
48 | CONFIG_CC_ALIGN_LOOPS=0 | 52 | CONFIG_CC_ALIGN_LOOPS=0 |
49 | CONFIG_CC_ALIGN_JUMPS=0 | 53 | CONFIG_CC_ALIGN_JUMPS=0 |
50 | # CONFIG_TINY_SHMEM is not set | 54 | # CONFIG_TINY_SHMEM is not set |
55 | CONFIG_BASE_SMALL=0 | ||
51 | 56 | ||
52 | # | 57 | # |
53 | # Loadable module support | 58 | # Loadable module support |
@@ -84,6 +89,8 @@ CONFIG_NR_CPUS=2 | |||
84 | # CONFIG_SCHED_SMT is not set | 89 | # CONFIG_SCHED_SMT is not set |
85 | # CONFIG_PREEMPT is not set | 90 | # CONFIG_PREEMPT is not set |
86 | CONFIG_GENERIC_HARDIRQS=y | 91 | CONFIG_GENERIC_HARDIRQS=y |
92 | CONFIG_SECCOMP=y | ||
93 | CONFIG_ISA_DMA_API=y | ||
87 | 94 | ||
88 | # | 95 | # |
89 | # General setup | 96 | # General setup |
@@ -94,6 +101,7 @@ CONFIG_BINFMT_ELF=y | |||
94 | # CONFIG_BINFMT_MISC is not set | 101 | # CONFIG_BINFMT_MISC is not set |
95 | CONFIG_PCI_LEGACY_PROC=y | 102 | CONFIG_PCI_LEGACY_PROC=y |
96 | CONFIG_PCI_NAMES=y | 103 | CONFIG_PCI_NAMES=y |
104 | # CONFIG_PCI_DEBUG is not set | ||
97 | 105 | ||
98 | # | 106 | # |
99 | # PCCARD (PCMCIA/CardBus) support | 107 | # PCCARD (PCMCIA/CardBus) support |
@@ -101,10 +109,6 @@ CONFIG_PCI_NAMES=y | |||
101 | # CONFIG_PCCARD is not set | 109 | # CONFIG_PCCARD is not set |
102 | 110 | ||
103 | # | 111 | # |
104 | # PC-card bridges | ||
105 | # | ||
106 | |||
107 | # | ||
108 | # PCI Hotplug Support | 112 | # PCI Hotplug Support |
109 | # | 113 | # |
110 | # CONFIG_HOTPLUG_PCI is not set | 114 | # CONFIG_HOTPLUG_PCI is not set |
@@ -261,7 +265,6 @@ CONFIG_NET=y | |||
261 | # | 265 | # |
262 | CONFIG_PACKET=y | 266 | CONFIG_PACKET=y |
263 | CONFIG_PACKET_MMAP=y | 267 | CONFIG_PACKET_MMAP=y |
264 | # CONFIG_NETLINK_DEV is not set | ||
265 | CONFIG_UNIX=y | 268 | CONFIG_UNIX=y |
266 | # CONFIG_NET_KEY is not set | 269 | # CONFIG_NET_KEY is not set |
267 | CONFIG_INET=y | 270 | CONFIG_INET=y |
@@ -376,6 +379,8 @@ CONFIG_E1000=y | |||
376 | # CONFIG_SK98LIN is not set | 379 | # CONFIG_SK98LIN is not set |
377 | # CONFIG_VIA_VELOCITY is not set | 380 | # CONFIG_VIA_VELOCITY is not set |
378 | # CONFIG_TIGON3 is not set | 381 | # CONFIG_TIGON3 is not set |
382 | # CONFIG_BNX2 is not set | ||
383 | # CONFIG_MV643XX_ETH is not set | ||
379 | 384 | ||
380 | # | 385 | # |
381 | # Ethernet (10000 Mbit) | 386 | # Ethernet (10000 Mbit) |
@@ -432,14 +437,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=1200 | |||
432 | # CONFIG_INPUT_EVBUG is not set | 437 | # CONFIG_INPUT_EVBUG is not set |
433 | 438 | ||
434 | # | 439 | # |
435 | # Input I/O drivers | ||
436 | # | ||
437 | # CONFIG_GAMEPORT is not set | ||
438 | CONFIG_SOUND_GAMEPORT=y | ||
439 | # CONFIG_SERIO is not set | ||
440 | # CONFIG_SERIO_I8042 is not set | ||
441 | |||
442 | # | ||
443 | # Input Device Drivers | 440 | # Input Device Drivers |
444 | # | 441 | # |
445 | # CONFIG_INPUT_KEYBOARD is not set | 442 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -449,6 +446,12 @@ CONFIG_SOUND_GAMEPORT=y | |||
449 | # CONFIG_INPUT_MISC is not set | 446 | # CONFIG_INPUT_MISC is not set |
450 | 447 | ||
451 | # | 448 | # |
449 | # Hardware I/O ports | ||
450 | # | ||
451 | # CONFIG_SERIO is not set | ||
452 | # CONFIG_GAMEPORT is not set | ||
453 | |||
454 | # | ||
452 | # Character devices | 455 | # Character devices |
453 | # | 456 | # |
454 | CONFIG_VT=y | 457 | CONFIG_VT=y |
@@ -469,7 +472,7 @@ CONFIG_SERIAL_8250_NR_UARTS=4 | |||
469 | # | 472 | # |
470 | CONFIG_SERIAL_CORE=y | 473 | CONFIG_SERIAL_CORE=y |
471 | CONFIG_SERIAL_CORE_CONSOLE=y | 474 | CONFIG_SERIAL_CORE_CONSOLE=y |
472 | # CONFIG_SERIAL_PMACZILOG is not set | 475 | # CONFIG_SERIAL_JSM is not set |
473 | CONFIG_UNIX98_PTYS=y | 476 | CONFIG_UNIX98_PTYS=y |
474 | CONFIG_LEGACY_PTYS=y | 477 | CONFIG_LEGACY_PTYS=y |
475 | CONFIG_LEGACY_PTY_COUNT=256 | 478 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -492,8 +495,15 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
492 | # | 495 | # |
493 | # Ftape, the floppy tape device driver | 496 | # Ftape, the floppy tape device driver |
494 | # | 497 | # |
498 | # CONFIG_AGP is not set | ||
495 | # CONFIG_DRM is not set | 499 | # CONFIG_DRM is not set |
496 | # CONFIG_RAW_DRIVER is not set | 500 | # CONFIG_RAW_DRIVER is not set |
501 | # CONFIG_HANGCHECK_TIMER is not set | ||
502 | |||
503 | # | ||
504 | # TPM devices | ||
505 | # | ||
506 | # CONFIG_TCG_TPM is not set | ||
497 | 507 | ||
498 | # | 508 | # |
499 | # I2C support | 509 | # I2C support |
@@ -518,8 +528,8 @@ CONFIG_I2C_ALGOBIT=y | |||
518 | CONFIG_I2C_AMD8111=y | 528 | CONFIG_I2C_AMD8111=y |
519 | # CONFIG_I2C_I801 is not set | 529 | # CONFIG_I2C_I801 is not set |
520 | # CONFIG_I2C_I810 is not set | 530 | # CONFIG_I2C_I810 is not set |
531 | # CONFIG_I2C_PIIX4 is not set | ||
521 | # CONFIG_I2C_ISA is not set | 532 | # CONFIG_I2C_ISA is not set |
522 | # CONFIG_I2C_MPC is not set | ||
523 | # CONFIG_I2C_NFORCE2 is not set | 533 | # CONFIG_I2C_NFORCE2 is not set |
524 | # CONFIG_I2C_PARPORT_LIGHT is not set | 534 | # CONFIG_I2C_PARPORT_LIGHT is not set |
525 | # CONFIG_I2C_PROSAVAGE is not set | 535 | # CONFIG_I2C_PROSAVAGE is not set |
@@ -545,7 +555,9 @@ CONFIG_I2C_AMD8111=y | |||
545 | # CONFIG_SENSORS_ASB100 is not set | 555 | # CONFIG_SENSORS_ASB100 is not set |
546 | # CONFIG_SENSORS_DS1621 is not set | 556 | # CONFIG_SENSORS_DS1621 is not set |
547 | # CONFIG_SENSORS_FSCHER is not set | 557 | # CONFIG_SENSORS_FSCHER is not set |
558 | # CONFIG_SENSORS_FSCPOS is not set | ||
548 | # CONFIG_SENSORS_GL518SM is not set | 559 | # CONFIG_SENSORS_GL518SM is not set |
560 | # CONFIG_SENSORS_GL520SM is not set | ||
549 | # CONFIG_SENSORS_IT87 is not set | 561 | # CONFIG_SENSORS_IT87 is not set |
550 | # CONFIG_SENSORS_LM63 is not set | 562 | # CONFIG_SENSORS_LM63 is not set |
551 | # CONFIG_SENSORS_LM75 is not set | 563 | # CONFIG_SENSORS_LM75 is not set |
@@ -556,9 +568,11 @@ CONFIG_I2C_AMD8111=y | |||
556 | # CONFIG_SENSORS_LM85 is not set | 568 | # CONFIG_SENSORS_LM85 is not set |
557 | # CONFIG_SENSORS_LM87 is not set | 569 | # CONFIG_SENSORS_LM87 is not set |
558 | # CONFIG_SENSORS_LM90 is not set | 570 | # CONFIG_SENSORS_LM90 is not set |
571 | # CONFIG_SENSORS_LM92 is not set | ||
559 | # CONFIG_SENSORS_MAX1619 is not set | 572 | # CONFIG_SENSORS_MAX1619 is not set |
560 | # CONFIG_SENSORS_PC87360 is not set | 573 | # CONFIG_SENSORS_PC87360 is not set |
561 | # CONFIG_SENSORS_SMSC47B397 is not set | 574 | # CONFIG_SENSORS_SMSC47B397 is not set |
575 | # CONFIG_SENSORS_SIS5595 is not set | ||
562 | # CONFIG_SENSORS_SMSC47M1 is not set | 576 | # CONFIG_SENSORS_SMSC47M1 is not set |
563 | # CONFIG_SENSORS_VIA686A is not set | 577 | # CONFIG_SENSORS_VIA686A is not set |
564 | # CONFIG_SENSORS_W83781D is not set | 578 | # CONFIG_SENSORS_W83781D is not set |
@@ -568,6 +582,7 @@ CONFIG_I2C_AMD8111=y | |||
568 | # | 582 | # |
569 | # Other I2C Chip support | 583 | # Other I2C Chip support |
570 | # | 584 | # |
585 | # CONFIG_SENSORS_DS1337 is not set | ||
571 | # CONFIG_SENSORS_EEPROM is not set | 586 | # CONFIG_SENSORS_EEPROM is not set |
572 | # CONFIG_SENSORS_PCF8574 is not set | 587 | # CONFIG_SENSORS_PCF8574 is not set |
573 | # CONFIG_SENSORS_PCF8591 is not set | 588 | # CONFIG_SENSORS_PCF8591 is not set |
@@ -615,6 +630,8 @@ CONFIG_DUMMY_CONSOLE=y | |||
615 | # | 630 | # |
616 | # USB support | 631 | # USB support |
617 | # | 632 | # |
633 | CONFIG_USB_ARCH_HAS_HCD=y | ||
634 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
618 | CONFIG_USB=y | 635 | CONFIG_USB=y |
619 | # CONFIG_USB_DEBUG is not set | 636 | # CONFIG_USB_DEBUG is not set |
620 | 637 | ||
@@ -625,8 +642,6 @@ CONFIG_USB_DEVICEFS=y | |||
625 | # CONFIG_USB_BANDWIDTH is not set | 642 | # CONFIG_USB_BANDWIDTH is not set |
626 | # CONFIG_USB_DYNAMIC_MINORS is not set | 643 | # CONFIG_USB_DYNAMIC_MINORS is not set |
627 | # CONFIG_USB_OTG is not set | 644 | # CONFIG_USB_OTG is not set |
628 | CONFIG_USB_ARCH_HAS_HCD=y | ||
629 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
630 | 645 | ||
631 | # | 646 | # |
632 | # USB Host Controller Drivers | 647 | # USB Host Controller Drivers |
@@ -635,6 +650,8 @@ CONFIG_USB_EHCI_HCD=y | |||
635 | CONFIG_USB_EHCI_SPLIT_ISO=y | 650 | CONFIG_USB_EHCI_SPLIT_ISO=y |
636 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 651 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
637 | CONFIG_USB_OHCI_HCD=y | 652 | CONFIG_USB_OHCI_HCD=y |
653 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
654 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
638 | CONFIG_USB_UHCI_HCD=y | 655 | CONFIG_USB_UHCI_HCD=y |
639 | # CONFIG_USB_SL811_HCD is not set | 656 | # CONFIG_USB_SL811_HCD is not set |
640 | 657 | ||
@@ -688,6 +705,7 @@ CONFIG_USB_HIDINPUT=y | |||
688 | CONFIG_USB_PEGASUS=y | 705 | CONFIG_USB_PEGASUS=y |
689 | # CONFIG_USB_RTL8150 is not set | 706 | # CONFIG_USB_RTL8150 is not set |
690 | # CONFIG_USB_USBNET is not set | 707 | # CONFIG_USB_USBNET is not set |
708 | CONFIG_USB_MON=y | ||
691 | 709 | ||
692 | # | 710 | # |
693 | # USB port drivers | 711 | # USB port drivers |
@@ -699,8 +717,10 @@ CONFIG_USB_PEGASUS=y | |||
699 | CONFIG_USB_SERIAL=y | 717 | CONFIG_USB_SERIAL=y |
700 | # CONFIG_USB_SERIAL_CONSOLE is not set | 718 | # CONFIG_USB_SERIAL_CONSOLE is not set |
701 | CONFIG_USB_SERIAL_GENERIC=y | 719 | CONFIG_USB_SERIAL_GENERIC=y |
720 | # CONFIG_USB_SERIAL_AIRPRIME is not set | ||
702 | # CONFIG_USB_SERIAL_BELKIN is not set | 721 | # CONFIG_USB_SERIAL_BELKIN is not set |
703 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set | 722 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set |
723 | # CONFIG_USB_SERIAL_CP2101 is not set | ||
704 | CONFIG_USB_SERIAL_CYPRESS_M8=m | 724 | CONFIG_USB_SERIAL_CYPRESS_M8=m |
705 | # CONFIG_USB_SERIAL_EMPEG is not set | 725 | # CONFIG_USB_SERIAL_EMPEG is not set |
706 | # CONFIG_USB_SERIAL_FTDI_SIO is not set | 726 | # CONFIG_USB_SERIAL_FTDI_SIO is not set |
@@ -729,6 +749,7 @@ CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y | |||
729 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | 749 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set |
730 | # CONFIG_USB_SERIAL_MCT_U232 is not set | 750 | # CONFIG_USB_SERIAL_MCT_U232 is not set |
731 | # CONFIG_USB_SERIAL_PL2303 is not set | 751 | # CONFIG_USB_SERIAL_PL2303 is not set |
752 | # CONFIG_USB_SERIAL_HP4X is not set | ||
732 | # CONFIG_USB_SERIAL_SAFE is not set | 753 | # CONFIG_USB_SERIAL_SAFE is not set |
733 | CONFIG_USB_SERIAL_TI=m | 754 | CONFIG_USB_SERIAL_TI=m |
734 | # CONFIG_USB_SERIAL_CYBERJACK is not set | 755 | # CONFIG_USB_SERIAL_CYBERJACK is not set |
@@ -750,6 +771,7 @@ CONFIG_USB_EZUSB=y | |||
750 | # CONFIG_USB_PHIDGETKIT is not set | 771 | # CONFIG_USB_PHIDGETKIT is not set |
751 | # CONFIG_USB_PHIDGETSERVO is not set | 772 | # CONFIG_USB_PHIDGETSERVO is not set |
752 | # CONFIG_USB_IDMOUSE is not set | 773 | # CONFIG_USB_IDMOUSE is not set |
774 | # CONFIG_USB_SISUSBVGA is not set | ||
753 | # CONFIG_USB_TEST is not set | 775 | # CONFIG_USB_TEST is not set |
754 | 776 | ||
755 | # | 777 | # |
@@ -936,10 +958,13 @@ CONFIG_NLS_UTF8=y | |||
936 | # | 958 | # |
937 | # Kernel hacking | 959 | # Kernel hacking |
938 | # | 960 | # |
961 | # CONFIG_PRINTK_TIME is not set | ||
939 | CONFIG_DEBUG_KERNEL=y | 962 | CONFIG_DEBUG_KERNEL=y |
940 | CONFIG_MAGIC_SYSRQ=y | 963 | CONFIG_MAGIC_SYSRQ=y |
964 | CONFIG_LOG_BUF_SHIFT=17 | ||
941 | # CONFIG_SCHEDSTATS is not set | 965 | # CONFIG_SCHEDSTATS is not set |
942 | CONFIG_DEBUG_SLAB=y | 966 | CONFIG_DEBUG_SLAB=y |
967 | # CONFIG_DEBUG_SPINLOCK is not set | ||
943 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | 968 | CONFIG_DEBUG_SPINLOCK_SLEEP=y |
944 | # CONFIG_DEBUG_KOBJECT is not set | 969 | # CONFIG_DEBUG_KOBJECT is not set |
945 | # CONFIG_DEBUG_INFO is not set | 970 | # CONFIG_DEBUG_INFO is not set |
@@ -971,6 +996,7 @@ CONFIG_CRYPTO_MD5=y | |||
971 | # CONFIG_CRYPTO_SHA256 is not set | 996 | # CONFIG_CRYPTO_SHA256 is not set |
972 | # CONFIG_CRYPTO_SHA512 is not set | 997 | # CONFIG_CRYPTO_SHA512 is not set |
973 | # CONFIG_CRYPTO_WP512 is not set | 998 | # CONFIG_CRYPTO_WP512 is not set |
999 | # CONFIG_CRYPTO_TGR192 is not set | ||
974 | CONFIG_CRYPTO_DES=y | 1000 | CONFIG_CRYPTO_DES=y |
975 | # CONFIG_CRYPTO_BLOWFISH is not set | 1001 | # CONFIG_CRYPTO_BLOWFISH is not set |
976 | # CONFIG_CRYPTO_TWOFISH is not set | 1002 | # CONFIG_CRYPTO_TWOFISH is not set |
diff --git a/arch/ppc64/configs/pSeries_defconfig b/arch/ppc64/configs/pSeries_defconfig index 4fecf237d5c9..3eb5ef25d3a3 100644 --- a/arch/ppc64/configs/pSeries_defconfig +++ b/arch/ppc64/configs/pSeries_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.11-rc3-bk6 | 3 | # Linux kernel version: 2.6.12-rc6 |
4 | # Wed Feb 9 23:34:54 2005 | 4 | # Tue Jun 14 17:13:47 2005 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
11 | CONFIG_HAVE_DEC_LOCK=y | 11 | CONFIG_HAVE_DEC_LOCK=y |
12 | CONFIG_EARLY_PRINTK=y | 12 | CONFIG_EARLY_PRINTK=y |
13 | CONFIG_COMPAT=y | 13 | CONFIG_COMPAT=y |
14 | CONFIG_FRAME_POINTER=y | 14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | 15 | CONFIG_FORCE_MAX_ZONEORDER=13 |
16 | 16 | ||
17 | # | 17 | # |
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13 | |||
20 | CONFIG_EXPERIMENTAL=y | 20 | CONFIG_EXPERIMENTAL=y |
21 | CONFIG_CLEAN_COMPILE=y | 21 | CONFIG_CLEAN_COMPILE=y |
22 | CONFIG_LOCK_KERNEL=y | 22 | CONFIG_LOCK_KERNEL=y |
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | 24 | ||
24 | # | 25 | # |
25 | # General setup | 26 | # General setup |
@@ -30,24 +31,29 @@ CONFIG_SYSVIPC=y | |||
30 | CONFIG_POSIX_MQUEUE=y | 31 | CONFIG_POSIX_MQUEUE=y |
31 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
32 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
33 | CONFIG_LOG_BUF_SHIFT=17 | 34 | CONFIG_AUDIT=y |
35 | CONFIG_AUDITSYSCALL=y | ||
34 | CONFIG_HOTPLUG=y | 36 | CONFIG_HOTPLUG=y |
35 | CONFIG_KOBJECT_UEVENT=y | 37 | CONFIG_KOBJECT_UEVENT=y |
36 | CONFIG_IKCONFIG=y | 38 | CONFIG_IKCONFIG=y |
37 | CONFIG_IKCONFIG_PROC=y | 39 | CONFIG_IKCONFIG_PROC=y |
40 | CONFIG_CPUSETS=y | ||
38 | # CONFIG_EMBEDDED is not set | 41 | # CONFIG_EMBEDDED is not set |
39 | CONFIG_KALLSYMS=y | 42 | CONFIG_KALLSYMS=y |
40 | CONFIG_KALLSYMS_ALL=y | 43 | CONFIG_KALLSYMS_ALL=y |
41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 44 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
45 | CONFIG_PRINTK=y | ||
46 | CONFIG_BUG=y | ||
47 | CONFIG_BASE_FULL=y | ||
42 | CONFIG_FUTEX=y | 48 | CONFIG_FUTEX=y |
43 | CONFIG_EPOLL=y | 49 | CONFIG_EPOLL=y |
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | 50 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 51 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
47 | CONFIG_CC_ALIGN_LABELS=0 | 52 | CONFIG_CC_ALIGN_LABELS=0 |
48 | CONFIG_CC_ALIGN_LOOPS=0 | 53 | CONFIG_CC_ALIGN_LOOPS=0 |
49 | CONFIG_CC_ALIGN_JUMPS=0 | 54 | CONFIG_CC_ALIGN_JUMPS=0 |
50 | # CONFIG_TINY_SHMEM is not set | 55 | # CONFIG_TINY_SHMEM is not set |
56 | CONFIG_BASE_SMALL=0 | ||
51 | 57 | ||
52 | # | 58 | # |
53 | # Loadable module support | 59 | # Loadable module support |
@@ -89,9 +95,12 @@ CONFIG_SCHED_SMT=y | |||
89 | CONFIG_EEH=y | 95 | CONFIG_EEH=y |
90 | CONFIG_GENERIC_HARDIRQS=y | 96 | CONFIG_GENERIC_HARDIRQS=y |
91 | CONFIG_PPC_RTAS=y | 97 | CONFIG_PPC_RTAS=y |
98 | CONFIG_RTAS_PROC=y | ||
92 | CONFIG_RTAS_FLASH=m | 99 | CONFIG_RTAS_FLASH=m |
93 | CONFIG_SCANLOG=m | 100 | CONFIG_SCANLOG=m |
94 | CONFIG_LPARCFG=y | 101 | CONFIG_LPARCFG=y |
102 | CONFIG_SECCOMP=y | ||
103 | CONFIG_ISA_DMA_API=y | ||
95 | 104 | ||
96 | # | 105 | # |
97 | # General setup | 106 | # General setup |
@@ -102,6 +111,7 @@ CONFIG_BINFMT_ELF=y | |||
102 | # CONFIG_BINFMT_MISC is not set | 111 | # CONFIG_BINFMT_MISC is not set |
103 | CONFIG_PCI_LEGACY_PROC=y | 112 | CONFIG_PCI_LEGACY_PROC=y |
104 | CONFIG_PCI_NAMES=y | 113 | CONFIG_PCI_NAMES=y |
114 | # CONFIG_PCI_DEBUG is not set | ||
105 | CONFIG_HOTPLUG_CPU=y | 115 | CONFIG_HOTPLUG_CPU=y |
106 | 116 | ||
107 | # | 117 | # |
@@ -110,10 +120,6 @@ CONFIG_HOTPLUG_CPU=y | |||
110 | # CONFIG_PCCARD is not set | 120 | # CONFIG_PCCARD is not set |
111 | 121 | ||
112 | # | 122 | # |
113 | # PC-card bridges | ||
114 | # | ||
115 | |||
116 | # | ||
117 | # PCI Hotplug Support | 123 | # PCI Hotplug Support |
118 | # | 124 | # |
119 | CONFIG_HOTPLUG_PCI=m | 125 | CONFIG_HOTPLUG_PCI=m |
@@ -147,11 +153,10 @@ CONFIG_FW_LOADER=y | |||
147 | # | 153 | # |
148 | CONFIG_PARPORT=m | 154 | CONFIG_PARPORT=m |
149 | CONFIG_PARPORT_PC=m | 155 | CONFIG_PARPORT_PC=m |
150 | CONFIG_PARPORT_PC_CML1=m | ||
151 | # CONFIG_PARPORT_SERIAL is not set | 156 | # CONFIG_PARPORT_SERIAL is not set |
152 | # CONFIG_PARPORT_PC_FIFO is not set | 157 | # CONFIG_PARPORT_PC_FIFO is not set |
153 | # CONFIG_PARPORT_PC_SUPERIO is not set | 158 | # CONFIG_PARPORT_PC_SUPERIO is not set |
154 | # CONFIG_PARPORT_OTHER is not set | 159 | # CONFIG_PARPORT_GSC is not set |
155 | # CONFIG_PARPORT_1284 is not set | 160 | # CONFIG_PARPORT_1284 is not set |
156 | 161 | ||
157 | # | 162 | # |
@@ -293,7 +298,6 @@ CONFIG_SCSI_ISCSI_ATTRS=m | |||
293 | # CONFIG_SCSI_BUSLOGIC is not set | 298 | # CONFIG_SCSI_BUSLOGIC is not set |
294 | # CONFIG_SCSI_DMX3191D is not set | 299 | # CONFIG_SCSI_DMX3191D is not set |
295 | # CONFIG_SCSI_EATA is not set | 300 | # CONFIG_SCSI_EATA is not set |
296 | # CONFIG_SCSI_EATA_PIO is not set | ||
297 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 301 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
298 | # CONFIG_SCSI_GDTH is not set | 302 | # CONFIG_SCSI_GDTH is not set |
299 | # CONFIG_SCSI_IPS is not set | 303 | # CONFIG_SCSI_IPS is not set |
@@ -310,7 +314,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 | |||
310 | CONFIG_SCSI_IPR=y | 314 | CONFIG_SCSI_IPR=y |
311 | CONFIG_SCSI_IPR_TRACE=y | 315 | CONFIG_SCSI_IPR_TRACE=y |
312 | CONFIG_SCSI_IPR_DUMP=y | 316 | CONFIG_SCSI_IPR_DUMP=y |
313 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
314 | # CONFIG_SCSI_QLOGIC_FC is not set | 317 | # CONFIG_SCSI_QLOGIC_FC is not set |
315 | # CONFIG_SCSI_QLOGIC_1280 is not set | 318 | # CONFIG_SCSI_QLOGIC_1280 is not set |
316 | CONFIG_SCSI_QLA2XXX=y | 319 | CONFIG_SCSI_QLA2XXX=y |
@@ -319,6 +322,7 @@ CONFIG_SCSI_QLA22XX=m | |||
319 | CONFIG_SCSI_QLA2300=m | 322 | CONFIG_SCSI_QLA2300=m |
320 | CONFIG_SCSI_QLA2322=m | 323 | CONFIG_SCSI_QLA2322=m |
321 | CONFIG_SCSI_QLA6312=m | 324 | CONFIG_SCSI_QLA6312=m |
325 | CONFIG_SCSI_LPFC=m | ||
322 | # CONFIG_SCSI_DC395x is not set | 326 | # CONFIG_SCSI_DC395x is not set |
323 | # CONFIG_SCSI_DC390T is not set | 327 | # CONFIG_SCSI_DC390T is not set |
324 | # CONFIG_SCSI_DEBUG is not set | 328 | # CONFIG_SCSI_DEBUG is not set |
@@ -341,6 +345,8 @@ CONFIG_DM_CRYPT=m | |||
341 | CONFIG_DM_SNAPSHOT=m | 345 | CONFIG_DM_SNAPSHOT=m |
342 | CONFIG_DM_MIRROR=m | 346 | CONFIG_DM_MIRROR=m |
343 | CONFIG_DM_ZERO=m | 347 | CONFIG_DM_ZERO=m |
348 | CONFIG_DM_MULTIPATH=m | ||
349 | CONFIG_DM_MULTIPATH_EMC=m | ||
344 | 350 | ||
345 | # | 351 | # |
346 | # Fusion MPT device support | 352 | # Fusion MPT device support |
@@ -371,7 +377,6 @@ CONFIG_NET=y | |||
371 | # | 377 | # |
372 | CONFIG_PACKET=y | 378 | CONFIG_PACKET=y |
373 | # CONFIG_PACKET_MMAP is not set | 379 | # CONFIG_PACKET_MMAP is not set |
374 | # CONFIG_NETLINK_DEV is not set | ||
375 | CONFIG_UNIX=y | 380 | CONFIG_UNIX=y |
376 | CONFIG_NET_KEY=m | 381 | CONFIG_NET_KEY=m |
377 | CONFIG_INET=y | 382 | CONFIG_INET=y |
@@ -539,7 +544,6 @@ CONFIG_PCNET32=y | |||
539 | # CONFIG_DGRS is not set | 544 | # CONFIG_DGRS is not set |
540 | # CONFIG_EEPRO100 is not set | 545 | # CONFIG_EEPRO100 is not set |
541 | CONFIG_E100=y | 546 | CONFIG_E100=y |
542 | # CONFIG_E100_NAPI is not set | ||
543 | # CONFIG_FEALNX is not set | 547 | # CONFIG_FEALNX is not set |
544 | # CONFIG_NATSEMI is not set | 548 | # CONFIG_NATSEMI is not set |
545 | # CONFIG_NE2K_PCI is not set | 549 | # CONFIG_NE2K_PCI is not set |
@@ -565,6 +569,8 @@ CONFIG_E1000=y | |||
565 | # CONFIG_SK98LIN is not set | 569 | # CONFIG_SK98LIN is not set |
566 | # CONFIG_VIA_VELOCITY is not set | 570 | # CONFIG_VIA_VELOCITY is not set |
567 | CONFIG_TIGON3=y | 571 | CONFIG_TIGON3=y |
572 | # CONFIG_BNX2 is not set | ||
573 | # CONFIG_MV643XX_ETH is not set | ||
568 | 574 | ||
569 | # | 575 | # |
570 | # Ethernet (10000 Mbit) | 576 | # Ethernet (10000 Mbit) |
@@ -636,20 +642,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
636 | # CONFIG_INPUT_EVBUG is not set | 642 | # CONFIG_INPUT_EVBUG is not set |
637 | 643 | ||
638 | # | 644 | # |
639 | # Input I/O drivers | ||
640 | # | ||
641 | # CONFIG_GAMEPORT is not set | ||
642 | CONFIG_SOUND_GAMEPORT=y | ||
643 | CONFIG_SERIO=y | ||
644 | CONFIG_SERIO_I8042=y | ||
645 | # CONFIG_SERIO_SERPORT is not set | ||
646 | # CONFIG_SERIO_CT82C710 is not set | ||
647 | # CONFIG_SERIO_PARKBD is not set | ||
648 | # CONFIG_SERIO_PCIPS2 is not set | ||
649 | CONFIG_SERIO_LIBPS2=y | ||
650 | # CONFIG_SERIO_RAW is not set | ||
651 | |||
652 | # | ||
653 | # Input Device Drivers | 645 | # Input Device Drivers |
654 | # | 646 | # |
655 | CONFIG_INPUT_KEYBOARD=y | 647 | CONFIG_INPUT_KEYBOARD=y |
@@ -669,6 +661,18 @@ CONFIG_INPUT_PCSPKR=m | |||
669 | # CONFIG_INPUT_UINPUT is not set | 661 | # CONFIG_INPUT_UINPUT is not set |
670 | 662 | ||
671 | # | 663 | # |
664 | # Hardware I/O ports | ||
665 | # | ||
666 | CONFIG_SERIO=y | ||
667 | CONFIG_SERIO_I8042=y | ||
668 | # CONFIG_SERIO_SERPORT is not set | ||
669 | # CONFIG_SERIO_PARKBD is not set | ||
670 | # CONFIG_SERIO_PCIPS2 is not set | ||
671 | CONFIG_SERIO_LIBPS2=y | ||
672 | # CONFIG_SERIO_RAW is not set | ||
673 | # CONFIG_GAMEPORT is not set | ||
674 | |||
675 | # | ||
672 | # Character devices | 676 | # Character devices |
673 | # | 677 | # |
674 | CONFIG_VT=y | 678 | CONFIG_VT=y |
@@ -689,8 +693,8 @@ CONFIG_SERIAL_8250_NR_UARTS=4 | |||
689 | # | 693 | # |
690 | CONFIG_SERIAL_CORE=y | 694 | CONFIG_SERIAL_CORE=y |
691 | CONFIG_SERIAL_CORE_CONSOLE=y | 695 | CONFIG_SERIAL_CORE_CONSOLE=y |
692 | # CONFIG_SERIAL_PMACZILOG is not set | ||
693 | CONFIG_SERIAL_ICOM=m | 696 | CONFIG_SERIAL_ICOM=m |
697 | # CONFIG_SERIAL_JSM is not set | ||
694 | CONFIG_UNIX98_PTYS=y | 698 | CONFIG_UNIX98_PTYS=y |
695 | CONFIG_LEGACY_PTYS=y | 699 | CONFIG_LEGACY_PTYS=y |
696 | CONFIG_LEGACY_PTY_COUNT=256 | 700 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -718,9 +722,16 @@ CONFIG_HVCS=m | |||
718 | # | 722 | # |
719 | # Ftape, the floppy tape device driver | 723 | # Ftape, the floppy tape device driver |
720 | # | 724 | # |
725 | # CONFIG_AGP is not set | ||
721 | # CONFIG_DRM is not set | 726 | # CONFIG_DRM is not set |
722 | CONFIG_RAW_DRIVER=y | 727 | CONFIG_RAW_DRIVER=y |
723 | CONFIG_MAX_RAW_DEVS=1024 | 728 | CONFIG_MAX_RAW_DEVS=1024 |
729 | # CONFIG_HANGCHECK_TIMER is not set | ||
730 | |||
731 | # | ||
732 | # TPM devices | ||
733 | # | ||
734 | # CONFIG_TCG_TPM is not set | ||
724 | 735 | ||
725 | # | 736 | # |
726 | # I2C support | 737 | # I2C support |
@@ -745,8 +756,8 @@ CONFIG_I2C_ALGOBIT=y | |||
745 | # CONFIG_I2C_AMD8111 is not set | 756 | # CONFIG_I2C_AMD8111 is not set |
746 | # CONFIG_I2C_I801 is not set | 757 | # CONFIG_I2C_I801 is not set |
747 | # CONFIG_I2C_I810 is not set | 758 | # CONFIG_I2C_I810 is not set |
759 | # CONFIG_I2C_PIIX4 is not set | ||
748 | # CONFIG_I2C_ISA is not set | 760 | # CONFIG_I2C_ISA is not set |
749 | # CONFIG_I2C_MPC is not set | ||
750 | # CONFIG_I2C_NFORCE2 is not set | 761 | # CONFIG_I2C_NFORCE2 is not set |
751 | # CONFIG_I2C_PARPORT is not set | 762 | # CONFIG_I2C_PARPORT is not set |
752 | # CONFIG_I2C_PARPORT_LIGHT is not set | 763 | # CONFIG_I2C_PARPORT_LIGHT is not set |
@@ -773,7 +784,9 @@ CONFIG_I2C_ALGOBIT=y | |||
773 | # CONFIG_SENSORS_ASB100 is not set | 784 | # CONFIG_SENSORS_ASB100 is not set |
774 | # CONFIG_SENSORS_DS1621 is not set | 785 | # CONFIG_SENSORS_DS1621 is not set |
775 | # CONFIG_SENSORS_FSCHER is not set | 786 | # CONFIG_SENSORS_FSCHER is not set |
787 | # CONFIG_SENSORS_FSCPOS is not set | ||
776 | # CONFIG_SENSORS_GL518SM is not set | 788 | # CONFIG_SENSORS_GL518SM is not set |
789 | # CONFIG_SENSORS_GL520SM is not set | ||
777 | # CONFIG_SENSORS_IT87 is not set | 790 | # CONFIG_SENSORS_IT87 is not set |
778 | # CONFIG_SENSORS_LM63 is not set | 791 | # CONFIG_SENSORS_LM63 is not set |
779 | # CONFIG_SENSORS_LM75 is not set | 792 | # CONFIG_SENSORS_LM75 is not set |
@@ -784,9 +797,11 @@ CONFIG_I2C_ALGOBIT=y | |||
784 | # CONFIG_SENSORS_LM85 is not set | 797 | # CONFIG_SENSORS_LM85 is not set |
785 | # CONFIG_SENSORS_LM87 is not set | 798 | # CONFIG_SENSORS_LM87 is not set |
786 | # CONFIG_SENSORS_LM90 is not set | 799 | # CONFIG_SENSORS_LM90 is not set |
800 | # CONFIG_SENSORS_LM92 is not set | ||
787 | # CONFIG_SENSORS_MAX1619 is not set | 801 | # CONFIG_SENSORS_MAX1619 is not set |
788 | # CONFIG_SENSORS_PC87360 is not set | 802 | # CONFIG_SENSORS_PC87360 is not set |
789 | # CONFIG_SENSORS_SMSC47B397 is not set | 803 | # CONFIG_SENSORS_SMSC47B397 is not set |
804 | # CONFIG_SENSORS_SIS5595 is not set | ||
790 | # CONFIG_SENSORS_SMSC47M1 is not set | 805 | # CONFIG_SENSORS_SMSC47M1 is not set |
791 | # CONFIG_SENSORS_VIA686A is not set | 806 | # CONFIG_SENSORS_VIA686A is not set |
792 | # CONFIG_SENSORS_W83781D is not set | 807 | # CONFIG_SENSORS_W83781D is not set |
@@ -796,6 +811,7 @@ CONFIG_I2C_ALGOBIT=y | |||
796 | # | 811 | # |
797 | # Other I2C Chip support | 812 | # Other I2C Chip support |
798 | # | 813 | # |
814 | # CONFIG_SENSORS_DS1337 is not set | ||
799 | # CONFIG_SENSORS_EEPROM is not set | 815 | # CONFIG_SENSORS_EEPROM is not set |
800 | # CONFIG_SENSORS_PCF8574 is not set | 816 | # CONFIG_SENSORS_PCF8574 is not set |
801 | # CONFIG_SENSORS_PCF8591 is not set | 817 | # CONFIG_SENSORS_PCF8591 is not set |
@@ -828,8 +844,13 @@ CONFIG_I2C_ALGOBIT=y | |||
828 | # Graphics support | 844 | # Graphics support |
829 | # | 845 | # |
830 | CONFIG_FB=y | 846 | CONFIG_FB=y |
847 | CONFIG_FB_CFB_FILLRECT=y | ||
848 | CONFIG_FB_CFB_COPYAREA=y | ||
849 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
850 | CONFIG_FB_SOFT_CURSOR=y | ||
851 | CONFIG_FB_MACMODES=y | ||
831 | CONFIG_FB_MODE_HELPERS=y | 852 | CONFIG_FB_MODE_HELPERS=y |
832 | # CONFIG_FB_TILEBLITTING is not set | 853 | CONFIG_FB_TILEBLITTING=y |
833 | # CONFIG_FB_CIRRUS is not set | 854 | # CONFIG_FB_CIRRUS is not set |
834 | # CONFIG_FB_PM2 is not set | 855 | # CONFIG_FB_PM2 is not set |
835 | # CONFIG_FB_CYBER2000 is not set | 856 | # CONFIG_FB_CYBER2000 is not set |
@@ -838,6 +859,7 @@ CONFIG_FB_OF=y | |||
838 | # CONFIG_FB_ASILIANT is not set | 859 | # CONFIG_FB_ASILIANT is not set |
839 | # CONFIG_FB_IMSTT is not set | 860 | # CONFIG_FB_IMSTT is not set |
840 | # CONFIG_FB_VGA16 is not set | 861 | # CONFIG_FB_VGA16 is not set |
862 | # CONFIG_FB_NVIDIA is not set | ||
841 | # CONFIG_FB_RIVA is not set | 863 | # CONFIG_FB_RIVA is not set |
842 | CONFIG_FB_MATROX=y | 864 | CONFIG_FB_MATROX=y |
843 | CONFIG_FB_MATROX_MILLENIUM=y | 865 | CONFIG_FB_MATROX_MILLENIUM=y |
@@ -858,6 +880,7 @@ CONFIG_FB_RADEON_I2C=y | |||
858 | # CONFIG_FB_3DFX is not set | 880 | # CONFIG_FB_3DFX is not set |
859 | # CONFIG_FB_VOODOO1 is not set | 881 | # CONFIG_FB_VOODOO1 is not set |
860 | # CONFIG_FB_TRIDENT is not set | 882 | # CONFIG_FB_TRIDENT is not set |
883 | # CONFIG_FB_S1D13XXX is not set | ||
861 | # CONFIG_FB_VIRTUAL is not set | 884 | # CONFIG_FB_VIRTUAL is not set |
862 | 885 | ||
863 | # | 886 | # |
@@ -891,6 +914,8 @@ CONFIG_LCD_DEVICE=y | |||
891 | # | 914 | # |
892 | # USB support | 915 | # USB support |
893 | # | 916 | # |
917 | CONFIG_USB_ARCH_HAS_HCD=y | ||
918 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
894 | CONFIG_USB=y | 919 | CONFIG_USB=y |
895 | # CONFIG_USB_DEBUG is not set | 920 | # CONFIG_USB_DEBUG is not set |
896 | 921 | ||
@@ -901,8 +926,6 @@ CONFIG_USB_DEVICEFS=y | |||
901 | # CONFIG_USB_BANDWIDTH is not set | 926 | # CONFIG_USB_BANDWIDTH is not set |
902 | # CONFIG_USB_DYNAMIC_MINORS is not set | 927 | # CONFIG_USB_DYNAMIC_MINORS is not set |
903 | # CONFIG_USB_OTG is not set | 928 | # CONFIG_USB_OTG is not set |
904 | CONFIG_USB_ARCH_HAS_HCD=y | ||
905 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
906 | 929 | ||
907 | # | 930 | # |
908 | # USB Host Controller Drivers | 931 | # USB Host Controller Drivers |
@@ -911,6 +934,8 @@ CONFIG_USB_EHCI_HCD=y | |||
911 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | 934 | # CONFIG_USB_EHCI_SPLIT_ISO is not set |
912 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 935 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
913 | CONFIG_USB_OHCI_HCD=y | 936 | CONFIG_USB_OHCI_HCD=y |
937 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
938 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
914 | # CONFIG_USB_UHCI_HCD is not set | 939 | # CONFIG_USB_UHCI_HCD is not set |
915 | # CONFIG_USB_SL811_HCD is not set | 940 | # CONFIG_USB_SL811_HCD is not set |
916 | 941 | ||
@@ -926,12 +951,11 @@ CONFIG_USB_OHCI_HCD=y | |||
926 | # | 951 | # |
927 | CONFIG_USB_STORAGE=y | 952 | CONFIG_USB_STORAGE=y |
928 | # CONFIG_USB_STORAGE_DEBUG is not set | 953 | # CONFIG_USB_STORAGE_DEBUG is not set |
929 | # CONFIG_USB_STORAGE_RW_DETECT is not set | ||
930 | # CONFIG_USB_STORAGE_DATAFAB is not set | 954 | # CONFIG_USB_STORAGE_DATAFAB is not set |
931 | # CONFIG_USB_STORAGE_FREECOM is not set | 955 | # CONFIG_USB_STORAGE_FREECOM is not set |
932 | # CONFIG_USB_STORAGE_ISD200 is not set | 956 | # CONFIG_USB_STORAGE_ISD200 is not set |
933 | # CONFIG_USB_STORAGE_DPCM is not set | 957 | # CONFIG_USB_STORAGE_DPCM is not set |
934 | # CONFIG_USB_STORAGE_HP8200e is not set | 958 | # CONFIG_USB_STORAGE_USBAT is not set |
935 | # CONFIG_USB_STORAGE_SDDR09 is not set | 959 | # CONFIG_USB_STORAGE_SDDR09 is not set |
936 | # CONFIG_USB_STORAGE_SDDR55 is not set | 960 | # CONFIG_USB_STORAGE_SDDR55 is not set |
937 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | 961 | # CONFIG_USB_STORAGE_JUMPSHOT is not set |
@@ -975,6 +999,7 @@ CONFIG_USB_HIDDEV=y | |||
975 | # CONFIG_USB_PEGASUS is not set | 999 | # CONFIG_USB_PEGASUS is not set |
976 | # CONFIG_USB_RTL8150 is not set | 1000 | # CONFIG_USB_RTL8150 is not set |
977 | # CONFIG_USB_USBNET is not set | 1001 | # CONFIG_USB_USBNET is not set |
1002 | CONFIG_USB_MON=y | ||
978 | 1003 | ||
979 | # | 1004 | # |
980 | # USB port drivers | 1005 | # USB port drivers |
@@ -1000,6 +1025,7 @@ CONFIG_USB_HIDDEV=y | |||
1000 | # CONFIG_USB_PHIDGETKIT is not set | 1025 | # CONFIG_USB_PHIDGETKIT is not set |
1001 | # CONFIG_USB_PHIDGETSERVO is not set | 1026 | # CONFIG_USB_PHIDGETSERVO is not set |
1002 | # CONFIG_USB_IDMOUSE is not set | 1027 | # CONFIG_USB_IDMOUSE is not set |
1028 | # CONFIG_USB_SISUSBVGA is not set | ||
1003 | # CONFIG_USB_TEST is not set | 1029 | # CONFIG_USB_TEST is not set |
1004 | 1030 | ||
1005 | # | 1031 | # |
@@ -1208,10 +1234,13 @@ CONFIG_OPROFILE=y | |||
1208 | # | 1234 | # |
1209 | # Kernel hacking | 1235 | # Kernel hacking |
1210 | # | 1236 | # |
1237 | # CONFIG_PRINTK_TIME is not set | ||
1211 | CONFIG_DEBUG_KERNEL=y | 1238 | CONFIG_DEBUG_KERNEL=y |
1212 | CONFIG_MAGIC_SYSRQ=y | 1239 | CONFIG_MAGIC_SYSRQ=y |
1240 | CONFIG_LOG_BUF_SHIFT=17 | ||
1213 | # CONFIG_SCHEDSTATS is not set | 1241 | # CONFIG_SCHEDSTATS is not set |
1214 | # CONFIG_DEBUG_SLAB is not set | 1242 | # CONFIG_DEBUG_SLAB is not set |
1243 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1215 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1244 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1216 | # CONFIG_DEBUG_KOBJECT is not set | 1245 | # CONFIG_DEBUG_KOBJECT is not set |
1217 | # CONFIG_DEBUG_INFO is not set | 1246 | # CONFIG_DEBUG_INFO is not set |
@@ -1243,6 +1272,7 @@ CONFIG_CRYPTO_SHA1=m | |||
1243 | CONFIG_CRYPTO_SHA256=m | 1272 | CONFIG_CRYPTO_SHA256=m |
1244 | CONFIG_CRYPTO_SHA512=m | 1273 | CONFIG_CRYPTO_SHA512=m |
1245 | CONFIG_CRYPTO_WP512=m | 1274 | CONFIG_CRYPTO_WP512=m |
1275 | CONFIG_CRYPTO_TGR192=m | ||
1246 | CONFIG_CRYPTO_DES=y | 1276 | CONFIG_CRYPTO_DES=y |
1247 | CONFIG_CRYPTO_BLOWFISH=m | 1277 | CONFIG_CRYPTO_BLOWFISH=m |
1248 | CONFIG_CRYPTO_TWOFISH=m | 1278 | CONFIG_CRYPTO_TWOFISH=m |
diff --git a/arch/ppc64/defconfig b/arch/ppc64/defconfig index 537b1cc82eab..2f31bf3046f9 100644 --- a/arch/ppc64/defconfig +++ b/arch/ppc64/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.11-rc3-bk6 | 3 | # Linux kernel version: 2.6.12-rc5-git9 |
4 | # Wed Feb 9 23:34:51 2005 | 4 | # Sun Jun 5 09:26:47 2005 |
5 | # | 5 | # |
6 | CONFIG_64BIT=y | 6 | CONFIG_64BIT=y |
7 | CONFIG_MMU=y | 7 | CONFIG_MMU=y |
@@ -11,7 +11,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
11 | CONFIG_HAVE_DEC_LOCK=y | 11 | CONFIG_HAVE_DEC_LOCK=y |
12 | CONFIG_EARLY_PRINTK=y | 12 | CONFIG_EARLY_PRINTK=y |
13 | CONFIG_COMPAT=y | 13 | CONFIG_COMPAT=y |
14 | CONFIG_FRAME_POINTER=y | 14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y |
15 | CONFIG_FORCE_MAX_ZONEORDER=13 | 15 | CONFIG_FORCE_MAX_ZONEORDER=13 |
16 | 16 | ||
17 | # | 17 | # |
@@ -20,6 +20,7 @@ CONFIG_FORCE_MAX_ZONEORDER=13 | |||
20 | CONFIG_EXPERIMENTAL=y | 20 | CONFIG_EXPERIMENTAL=y |
21 | CONFIG_CLEAN_COMPILE=y | 21 | CONFIG_CLEAN_COMPILE=y |
22 | CONFIG_LOCK_KERNEL=y | 22 | CONFIG_LOCK_KERNEL=y |
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
23 | 24 | ||
24 | # | 25 | # |
25 | # General setup | 26 | # General setup |
@@ -30,24 +31,28 @@ CONFIG_SYSVIPC=y | |||
30 | CONFIG_POSIX_MQUEUE=y | 31 | CONFIG_POSIX_MQUEUE=y |
31 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
32 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
33 | CONFIG_LOG_BUF_SHIFT=17 | 34 | # CONFIG_AUDIT is not set |
34 | CONFIG_HOTPLUG=y | 35 | CONFIG_HOTPLUG=y |
35 | CONFIG_KOBJECT_UEVENT=y | 36 | CONFIG_KOBJECT_UEVENT=y |
36 | CONFIG_IKCONFIG=y | 37 | CONFIG_IKCONFIG=y |
37 | CONFIG_IKCONFIG_PROC=y | 38 | CONFIG_IKCONFIG_PROC=y |
39 | CONFIG_CPUSETS=y | ||
38 | # CONFIG_EMBEDDED is not set | 40 | # CONFIG_EMBEDDED is not set |
39 | CONFIG_KALLSYMS=y | 41 | CONFIG_KALLSYMS=y |
40 | # CONFIG_KALLSYMS_ALL is not set | 42 | # CONFIG_KALLSYMS_ALL is not set |
41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 43 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
44 | CONFIG_PRINTK=y | ||
45 | CONFIG_BUG=y | ||
46 | CONFIG_BASE_FULL=y | ||
42 | CONFIG_FUTEX=y | 47 | CONFIG_FUTEX=y |
43 | CONFIG_EPOLL=y | 48 | CONFIG_EPOLL=y |
44 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
45 | CONFIG_SHMEM=y | 49 | CONFIG_SHMEM=y |
46 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 50 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
47 | CONFIG_CC_ALIGN_LABELS=0 | 51 | CONFIG_CC_ALIGN_LABELS=0 |
48 | CONFIG_CC_ALIGN_LOOPS=0 | 52 | CONFIG_CC_ALIGN_LOOPS=0 |
49 | CONFIG_CC_ALIGN_JUMPS=0 | 53 | CONFIG_CC_ALIGN_JUMPS=0 |
50 | # CONFIG_TINY_SHMEM is not set | 54 | # CONFIG_TINY_SHMEM is not set |
55 | CONFIG_BASE_SMALL=0 | ||
51 | 56 | ||
52 | # | 57 | # |
53 | # Loadable module support | 58 | # Loadable module support |
@@ -91,9 +96,12 @@ CONFIG_DISCONTIGMEM=y | |||
91 | CONFIG_EEH=y | 96 | CONFIG_EEH=y |
92 | CONFIG_GENERIC_HARDIRQS=y | 97 | CONFIG_GENERIC_HARDIRQS=y |
93 | CONFIG_PPC_RTAS=y | 98 | CONFIG_PPC_RTAS=y |
99 | CONFIG_RTAS_PROC=y | ||
94 | CONFIG_RTAS_FLASH=m | 100 | CONFIG_RTAS_FLASH=m |
95 | CONFIG_SCANLOG=m | 101 | CONFIG_SCANLOG=m |
96 | CONFIG_LPARCFG=y | 102 | CONFIG_LPARCFG=y |
103 | CONFIG_SECCOMP=y | ||
104 | CONFIG_ISA_DMA_API=y | ||
97 | 105 | ||
98 | # | 106 | # |
99 | # General setup | 107 | # General setup |
@@ -104,6 +112,7 @@ CONFIG_BINFMT_ELF=y | |||
104 | CONFIG_BINFMT_MISC=m | 112 | CONFIG_BINFMT_MISC=m |
105 | # CONFIG_PCI_LEGACY_PROC is not set | 113 | # CONFIG_PCI_LEGACY_PROC is not set |
106 | # CONFIG_PCI_NAMES is not set | 114 | # CONFIG_PCI_NAMES is not set |
115 | # CONFIG_PCI_DEBUG is not set | ||
107 | CONFIG_HOTPLUG_CPU=y | 116 | CONFIG_HOTPLUG_CPU=y |
108 | 117 | ||
109 | # | 118 | # |
@@ -112,10 +121,6 @@ CONFIG_HOTPLUG_CPU=y | |||
112 | # CONFIG_PCCARD is not set | 121 | # CONFIG_PCCARD is not set |
113 | 122 | ||
114 | # | 123 | # |
115 | # PC-card bridges | ||
116 | # | ||
117 | |||
118 | # | ||
119 | # PCI Hotplug Support | 124 | # PCI Hotplug Support |
120 | # | 125 | # |
121 | CONFIG_HOTPLUG_PCI=m | 126 | CONFIG_HOTPLUG_PCI=m |
@@ -149,11 +154,10 @@ CONFIG_FW_LOADER=y | |||
149 | # | 154 | # |
150 | CONFIG_PARPORT=m | 155 | CONFIG_PARPORT=m |
151 | CONFIG_PARPORT_PC=m | 156 | CONFIG_PARPORT_PC=m |
152 | CONFIG_PARPORT_PC_CML1=m | ||
153 | # CONFIG_PARPORT_SERIAL is not set | 157 | # CONFIG_PARPORT_SERIAL is not set |
154 | # CONFIG_PARPORT_PC_FIFO is not set | 158 | # CONFIG_PARPORT_PC_FIFO is not set |
155 | # CONFIG_PARPORT_PC_SUPERIO is not set | 159 | # CONFIG_PARPORT_PC_SUPERIO is not set |
156 | # CONFIG_PARPORT_OTHER is not set | 160 | # CONFIG_PARPORT_GSC is not set |
157 | # CONFIG_PARPORT_1284 is not set | 161 | # CONFIG_PARPORT_1284 is not set |
158 | 162 | ||
159 | # | 163 | # |
@@ -301,6 +305,7 @@ CONFIG_SCSI_SATA_SVW=y | |||
301 | # CONFIG_SCSI_ATA_PIIX is not set | 305 | # CONFIG_SCSI_ATA_PIIX is not set |
302 | # CONFIG_SCSI_SATA_NV is not set | 306 | # CONFIG_SCSI_SATA_NV is not set |
303 | # CONFIG_SCSI_SATA_PROMISE is not set | 307 | # CONFIG_SCSI_SATA_PROMISE is not set |
308 | # CONFIG_SCSI_SATA_QSTOR is not set | ||
304 | # CONFIG_SCSI_SATA_SX4 is not set | 309 | # CONFIG_SCSI_SATA_SX4 is not set |
305 | # CONFIG_SCSI_SATA_SIL is not set | 310 | # CONFIG_SCSI_SATA_SIL is not set |
306 | # CONFIG_SCSI_SATA_SIS is not set | 311 | # CONFIG_SCSI_SATA_SIS is not set |
@@ -310,7 +315,6 @@ CONFIG_SCSI_SATA_SVW=y | |||
310 | # CONFIG_SCSI_BUSLOGIC is not set | 315 | # CONFIG_SCSI_BUSLOGIC is not set |
311 | # CONFIG_SCSI_DMX3191D is not set | 316 | # CONFIG_SCSI_DMX3191D is not set |
312 | # CONFIG_SCSI_EATA is not set | 317 | # CONFIG_SCSI_EATA is not set |
313 | # CONFIG_SCSI_EATA_PIO is not set | ||
314 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | 318 | # CONFIG_SCSI_FUTURE_DOMAIN is not set |
315 | # CONFIG_SCSI_GDTH is not set | 319 | # CONFIG_SCSI_GDTH is not set |
316 | # CONFIG_SCSI_IPS is not set | 320 | # CONFIG_SCSI_IPS is not set |
@@ -327,7 +331,6 @@ CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 | |||
327 | CONFIG_SCSI_IPR=y | 331 | CONFIG_SCSI_IPR=y |
328 | CONFIG_SCSI_IPR_TRACE=y | 332 | CONFIG_SCSI_IPR_TRACE=y |
329 | CONFIG_SCSI_IPR_DUMP=y | 333 | CONFIG_SCSI_IPR_DUMP=y |
330 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
331 | # CONFIG_SCSI_QLOGIC_FC is not set | 334 | # CONFIG_SCSI_QLOGIC_FC is not set |
332 | # CONFIG_SCSI_QLOGIC_1280 is not set | 335 | # CONFIG_SCSI_QLOGIC_1280 is not set |
333 | CONFIG_SCSI_QLA2XXX=y | 336 | CONFIG_SCSI_QLA2XXX=y |
@@ -336,6 +339,7 @@ CONFIG_SCSI_QLA22XX=m | |||
336 | CONFIG_SCSI_QLA2300=m | 339 | CONFIG_SCSI_QLA2300=m |
337 | CONFIG_SCSI_QLA2322=m | 340 | CONFIG_SCSI_QLA2322=m |
338 | CONFIG_SCSI_QLA6312=m | 341 | CONFIG_SCSI_QLA6312=m |
342 | CONFIG_SCSI_LPFC=m | ||
339 | # CONFIG_SCSI_DC395x is not set | 343 | # CONFIG_SCSI_DC395x is not set |
340 | # CONFIG_SCSI_DC390T is not set | 344 | # CONFIG_SCSI_DC390T is not set |
341 | CONFIG_SCSI_DEBUG=m | 345 | CONFIG_SCSI_DEBUG=m |
@@ -358,6 +362,8 @@ CONFIG_DM_CRYPT=m | |||
358 | CONFIG_DM_SNAPSHOT=m | 362 | CONFIG_DM_SNAPSHOT=m |
359 | CONFIG_DM_MIRROR=m | 363 | CONFIG_DM_MIRROR=m |
360 | CONFIG_DM_ZERO=m | 364 | CONFIG_DM_ZERO=m |
365 | CONFIG_DM_MULTIPATH=m | ||
366 | CONFIG_DM_MULTIPATH_EMC=m | ||
361 | 367 | ||
362 | # | 368 | # |
363 | # Fusion MPT device support | 369 | # Fusion MPT device support |
@@ -405,6 +411,7 @@ CONFIG_IEEE1394_AMDTP=m | |||
405 | # | 411 | # |
406 | CONFIG_ADB=y | 412 | CONFIG_ADB=y |
407 | CONFIG_ADB_PMU=y | 413 | CONFIG_ADB_PMU=y |
414 | CONFIG_PMAC_SMU=y | ||
408 | # CONFIG_PMAC_PBOOK is not set | 415 | # CONFIG_PMAC_PBOOK is not set |
409 | # CONFIG_PMAC_BACKLIGHT is not set | 416 | # CONFIG_PMAC_BACKLIGHT is not set |
410 | # CONFIG_INPUT_ADBHID is not set | 417 | # CONFIG_INPUT_ADBHID is not set |
@@ -420,7 +427,6 @@ CONFIG_NET=y | |||
420 | # | 427 | # |
421 | CONFIG_PACKET=y | 428 | CONFIG_PACKET=y |
422 | # CONFIG_PACKET_MMAP is not set | 429 | # CONFIG_PACKET_MMAP is not set |
423 | # CONFIG_NETLINK_DEV is not set | ||
424 | CONFIG_UNIX=y | 430 | CONFIG_UNIX=y |
425 | CONFIG_NET_KEY=m | 431 | CONFIG_NET_KEY=m |
426 | CONFIG_INET=y | 432 | CONFIG_INET=y |
@@ -588,7 +594,6 @@ CONFIG_PCNET32=y | |||
588 | # CONFIG_DGRS is not set | 594 | # CONFIG_DGRS is not set |
589 | # CONFIG_EEPRO100 is not set | 595 | # CONFIG_EEPRO100 is not set |
590 | CONFIG_E100=y | 596 | CONFIG_E100=y |
591 | # CONFIG_E100_NAPI is not set | ||
592 | # CONFIG_FEALNX is not set | 597 | # CONFIG_FEALNX is not set |
593 | # CONFIG_NATSEMI is not set | 598 | # CONFIG_NATSEMI is not set |
594 | # CONFIG_NE2K_PCI is not set | 599 | # CONFIG_NE2K_PCI is not set |
@@ -614,6 +619,8 @@ CONFIG_E1000=y | |||
614 | # CONFIG_SK98LIN is not set | 619 | # CONFIG_SK98LIN is not set |
615 | # CONFIG_VIA_VELOCITY is not set | 620 | # CONFIG_VIA_VELOCITY is not set |
616 | CONFIG_TIGON3=y | 621 | CONFIG_TIGON3=y |
622 | # CONFIG_BNX2 is not set | ||
623 | # CONFIG_MV643XX_ETH is not set | ||
617 | 624 | ||
618 | # | 625 | # |
619 | # Ethernet (10000 Mbit) | 626 | # Ethernet (10000 Mbit) |
@@ -683,20 +690,6 @@ CONFIG_INPUT_EVDEV=m | |||
683 | # CONFIG_INPUT_EVBUG is not set | 690 | # CONFIG_INPUT_EVBUG is not set |
684 | 691 | ||
685 | # | 692 | # |
686 | # Input I/O drivers | ||
687 | # | ||
688 | # CONFIG_GAMEPORT is not set | ||
689 | CONFIG_SOUND_GAMEPORT=y | ||
690 | CONFIG_SERIO=y | ||
691 | CONFIG_SERIO_I8042=y | ||
692 | # CONFIG_SERIO_SERPORT is not set | ||
693 | # CONFIG_SERIO_CT82C710 is not set | ||
694 | # CONFIG_SERIO_PARKBD is not set | ||
695 | # CONFIG_SERIO_PCIPS2 is not set | ||
696 | CONFIG_SERIO_LIBPS2=y | ||
697 | # CONFIG_SERIO_RAW is not set | ||
698 | |||
699 | # | ||
700 | # Input Device Drivers | 693 | # Input Device Drivers |
701 | # | 694 | # |
702 | CONFIG_INPUT_KEYBOARD=y | 695 | CONFIG_INPUT_KEYBOARD=y |
@@ -716,6 +709,18 @@ CONFIG_INPUT_PCSPKR=m | |||
716 | # CONFIG_INPUT_UINPUT is not set | 709 | # CONFIG_INPUT_UINPUT is not set |
717 | 710 | ||
718 | # | 711 | # |
712 | # Hardware I/O ports | ||
713 | # | ||
714 | CONFIG_SERIO=y | ||
715 | CONFIG_SERIO_I8042=y | ||
716 | # CONFIG_SERIO_SERPORT is not set | ||
717 | # CONFIG_SERIO_PARKBD is not set | ||
718 | # CONFIG_SERIO_PCIPS2 is not set | ||
719 | CONFIG_SERIO_LIBPS2=y | ||
720 | # CONFIG_SERIO_RAW is not set | ||
721 | # CONFIG_GAMEPORT is not set | ||
722 | |||
723 | # | ||
719 | # Character devices | 724 | # Character devices |
720 | # | 725 | # |
721 | CONFIG_VT=y | 726 | CONFIG_VT=y |
@@ -738,6 +743,7 @@ CONFIG_SERIAL_CORE=y | |||
738 | CONFIG_SERIAL_CORE_CONSOLE=y | 743 | CONFIG_SERIAL_CORE_CONSOLE=y |
739 | # CONFIG_SERIAL_PMACZILOG is not set | 744 | # CONFIG_SERIAL_PMACZILOG is not set |
740 | CONFIG_SERIAL_ICOM=m | 745 | CONFIG_SERIAL_ICOM=m |
746 | CONFIG_SERIAL_JSM=m | ||
741 | CONFIG_UNIX98_PTYS=y | 747 | CONFIG_UNIX98_PTYS=y |
742 | CONFIG_LEGACY_PTYS=y | 748 | CONFIG_LEGACY_PTYS=y |
743 | CONFIG_LEGACY_PTY_COUNT=256 | 749 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -766,9 +772,16 @@ CONFIG_HVCS=m | |||
766 | # | 772 | # |
767 | # Ftape, the floppy tape device driver | 773 | # Ftape, the floppy tape device driver |
768 | # | 774 | # |
775 | # CONFIG_AGP is not set | ||
769 | # CONFIG_DRM is not set | 776 | # CONFIG_DRM is not set |
770 | CONFIG_RAW_DRIVER=y | 777 | CONFIG_RAW_DRIVER=y |
771 | CONFIG_MAX_RAW_DEVS=256 | 778 | CONFIG_MAX_RAW_DEVS=256 |
779 | # CONFIG_HANGCHECK_TIMER is not set | ||
780 | |||
781 | # | ||
782 | # TPM devices | ||
783 | # | ||
784 | # CONFIG_TCG_TPM is not set | ||
772 | 785 | ||
773 | # | 786 | # |
774 | # I2C support | 787 | # I2C support |
@@ -793,9 +806,9 @@ CONFIG_I2C_ALGOBIT=y | |||
793 | CONFIG_I2C_AMD8111=y | 806 | CONFIG_I2C_AMD8111=y |
794 | # CONFIG_I2C_I801 is not set | 807 | # CONFIG_I2C_I801 is not set |
795 | # CONFIG_I2C_I810 is not set | 808 | # CONFIG_I2C_I810 is not set |
809 | # CONFIG_I2C_PIIX4 is not set | ||
796 | # CONFIG_I2C_ISA is not set | 810 | # CONFIG_I2C_ISA is not set |
797 | CONFIG_I2C_KEYWEST=y | 811 | CONFIG_I2C_KEYWEST=y |
798 | # CONFIG_I2C_MPC is not set | ||
799 | # CONFIG_I2C_NFORCE2 is not set | 812 | # CONFIG_I2C_NFORCE2 is not set |
800 | # CONFIG_I2C_PARPORT is not set | 813 | # CONFIG_I2C_PARPORT is not set |
801 | # CONFIG_I2C_PARPORT_LIGHT is not set | 814 | # CONFIG_I2C_PARPORT_LIGHT is not set |
@@ -822,7 +835,9 @@ CONFIG_I2C_KEYWEST=y | |||
822 | # CONFIG_SENSORS_ASB100 is not set | 835 | # CONFIG_SENSORS_ASB100 is not set |
823 | # CONFIG_SENSORS_DS1621 is not set | 836 | # CONFIG_SENSORS_DS1621 is not set |
824 | # CONFIG_SENSORS_FSCHER is not set | 837 | # CONFIG_SENSORS_FSCHER is not set |
838 | # CONFIG_SENSORS_FSCPOS is not set | ||
825 | # CONFIG_SENSORS_GL518SM is not set | 839 | # CONFIG_SENSORS_GL518SM is not set |
840 | # CONFIG_SENSORS_GL520SM is not set | ||
826 | # CONFIG_SENSORS_IT87 is not set | 841 | # CONFIG_SENSORS_IT87 is not set |
827 | # CONFIG_SENSORS_LM63 is not set | 842 | # CONFIG_SENSORS_LM63 is not set |
828 | # CONFIG_SENSORS_LM75 is not set | 843 | # CONFIG_SENSORS_LM75 is not set |
@@ -833,9 +848,11 @@ CONFIG_I2C_KEYWEST=y | |||
833 | # CONFIG_SENSORS_LM85 is not set | 848 | # CONFIG_SENSORS_LM85 is not set |
834 | # CONFIG_SENSORS_LM87 is not set | 849 | # CONFIG_SENSORS_LM87 is not set |
835 | # CONFIG_SENSORS_LM90 is not set | 850 | # CONFIG_SENSORS_LM90 is not set |
851 | # CONFIG_SENSORS_LM92 is not set | ||
836 | # CONFIG_SENSORS_MAX1619 is not set | 852 | # CONFIG_SENSORS_MAX1619 is not set |
837 | # CONFIG_SENSORS_PC87360 is not set | 853 | # CONFIG_SENSORS_PC87360 is not set |
838 | # CONFIG_SENSORS_SMSC47B397 is not set | 854 | # CONFIG_SENSORS_SMSC47B397 is not set |
855 | # CONFIG_SENSORS_SIS5595 is not set | ||
839 | # CONFIG_SENSORS_SMSC47M1 is not set | 856 | # CONFIG_SENSORS_SMSC47M1 is not set |
840 | # CONFIG_SENSORS_VIA686A is not set | 857 | # CONFIG_SENSORS_VIA686A is not set |
841 | # CONFIG_SENSORS_W83781D is not set | 858 | # CONFIG_SENSORS_W83781D is not set |
@@ -845,6 +862,7 @@ CONFIG_I2C_KEYWEST=y | |||
845 | # | 862 | # |
846 | # Other I2C Chip support | 863 | # Other I2C Chip support |
847 | # | 864 | # |
865 | # CONFIG_SENSORS_DS1337 is not set | ||
848 | # CONFIG_SENSORS_EEPROM is not set | 866 | # CONFIG_SENSORS_EEPROM is not set |
849 | # CONFIG_SENSORS_PCF8574 is not set | 867 | # CONFIG_SENSORS_PCF8574 is not set |
850 | # CONFIG_SENSORS_PCF8591 is not set | 868 | # CONFIG_SENSORS_PCF8591 is not set |
@@ -877,6 +895,11 @@ CONFIG_I2C_KEYWEST=y | |||
877 | # Graphics support | 895 | # Graphics support |
878 | # | 896 | # |
879 | CONFIG_FB=y | 897 | CONFIG_FB=y |
898 | CONFIG_FB_CFB_FILLRECT=y | ||
899 | CONFIG_FB_CFB_COPYAREA=y | ||
900 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
901 | CONFIG_FB_SOFT_CURSOR=y | ||
902 | CONFIG_FB_MACMODES=y | ||
880 | CONFIG_FB_MODE_HELPERS=y | 903 | CONFIG_FB_MODE_HELPERS=y |
881 | CONFIG_FB_TILEBLITTING=y | 904 | CONFIG_FB_TILEBLITTING=y |
882 | # CONFIG_FB_CIRRUS is not set | 905 | # CONFIG_FB_CIRRUS is not set |
@@ -890,9 +913,8 @@ CONFIG_FB_OF=y | |||
890 | # CONFIG_FB_ASILIANT is not set | 913 | # CONFIG_FB_ASILIANT is not set |
891 | # CONFIG_FB_IMSTT is not set | 914 | # CONFIG_FB_IMSTT is not set |
892 | # CONFIG_FB_VGA16 is not set | 915 | # CONFIG_FB_VGA16 is not set |
893 | CONFIG_FB_RIVA=y | 916 | # CONFIG_FB_NVIDIA is not set |
894 | CONFIG_FB_RIVA_I2C=y | 917 | # CONFIG_FB_RIVA is not set |
895 | # CONFIG_FB_RIVA_DEBUG is not set | ||
896 | CONFIG_FB_MATROX=y | 918 | CONFIG_FB_MATROX=y |
897 | CONFIG_FB_MATROX_MILLENIUM=y | 919 | CONFIG_FB_MATROX_MILLENIUM=y |
898 | CONFIG_FB_MATROX_MYSTIQUE=y | 920 | CONFIG_FB_MATROX_MYSTIQUE=y |
@@ -913,6 +935,7 @@ CONFIG_FB_RADEON_I2C=y | |||
913 | # CONFIG_FB_3DFX is not set | 935 | # CONFIG_FB_3DFX is not set |
914 | # CONFIG_FB_VOODOO1 is not set | 936 | # CONFIG_FB_VOODOO1 is not set |
915 | # CONFIG_FB_TRIDENT is not set | 937 | # CONFIG_FB_TRIDENT is not set |
938 | # CONFIG_FB_S1D13XXX is not set | ||
916 | # CONFIG_FB_VIRTUAL is not set | 939 | # CONFIG_FB_VIRTUAL is not set |
917 | 940 | ||
918 | # | 941 | # |
@@ -946,6 +969,8 @@ CONFIG_LCD_DEVICE=y | |||
946 | # | 969 | # |
947 | # USB support | 970 | # USB support |
948 | # | 971 | # |
972 | CONFIG_USB_ARCH_HAS_HCD=y | ||
973 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
949 | CONFIG_USB=y | 974 | CONFIG_USB=y |
950 | # CONFIG_USB_DEBUG is not set | 975 | # CONFIG_USB_DEBUG is not set |
951 | 976 | ||
@@ -956,8 +981,6 @@ CONFIG_USB_DEVICEFS=y | |||
956 | # CONFIG_USB_BANDWIDTH is not set | 981 | # CONFIG_USB_BANDWIDTH is not set |
957 | # CONFIG_USB_DYNAMIC_MINORS is not set | 982 | # CONFIG_USB_DYNAMIC_MINORS is not set |
958 | # CONFIG_USB_OTG is not set | 983 | # CONFIG_USB_OTG is not set |
959 | CONFIG_USB_ARCH_HAS_HCD=y | ||
960 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
961 | 984 | ||
962 | # | 985 | # |
963 | # USB Host Controller Drivers | 986 | # USB Host Controller Drivers |
@@ -966,6 +989,8 @@ CONFIG_USB_EHCI_HCD=y | |||
966 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | 989 | # CONFIG_USB_EHCI_SPLIT_ISO is not set |
967 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 990 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
968 | CONFIG_USB_OHCI_HCD=y | 991 | CONFIG_USB_OHCI_HCD=y |
992 | # CONFIG_USB_OHCI_BIG_ENDIAN is not set | ||
993 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
969 | # CONFIG_USB_UHCI_HCD is not set | 994 | # CONFIG_USB_UHCI_HCD is not set |
970 | # CONFIG_USB_SL811_HCD is not set | 995 | # CONFIG_USB_SL811_HCD is not set |
971 | 996 | ||
@@ -981,12 +1006,11 @@ CONFIG_USB_OHCI_HCD=y | |||
981 | # | 1006 | # |
982 | CONFIG_USB_STORAGE=m | 1007 | CONFIG_USB_STORAGE=m |
983 | # CONFIG_USB_STORAGE_DEBUG is not set | 1008 | # CONFIG_USB_STORAGE_DEBUG is not set |
984 | CONFIG_USB_STORAGE_RW_DETECT=y | ||
985 | # CONFIG_USB_STORAGE_DATAFAB is not set | 1009 | # CONFIG_USB_STORAGE_DATAFAB is not set |
986 | # CONFIG_USB_STORAGE_FREECOM is not set | 1010 | # CONFIG_USB_STORAGE_FREECOM is not set |
987 | # CONFIG_USB_STORAGE_ISD200 is not set | 1011 | # CONFIG_USB_STORAGE_ISD200 is not set |
988 | # CONFIG_USB_STORAGE_DPCM is not set | 1012 | # CONFIG_USB_STORAGE_DPCM is not set |
989 | # CONFIG_USB_STORAGE_HP8200e is not set | 1013 | # CONFIG_USB_STORAGE_USBAT is not set |
990 | # CONFIG_USB_STORAGE_SDDR09 is not set | 1014 | # CONFIG_USB_STORAGE_SDDR09 is not set |
991 | # CONFIG_USB_STORAGE_SDDR55 is not set | 1015 | # CONFIG_USB_STORAGE_SDDR55 is not set |
992 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | 1016 | # CONFIG_USB_STORAGE_JUMPSHOT is not set |
@@ -1030,6 +1054,7 @@ CONFIG_USB_HIDDEV=y | |||
1030 | CONFIG_USB_PEGASUS=y | 1054 | CONFIG_USB_PEGASUS=y |
1031 | # CONFIG_USB_RTL8150 is not set | 1055 | # CONFIG_USB_RTL8150 is not set |
1032 | # CONFIG_USB_USBNET is not set | 1056 | # CONFIG_USB_USBNET is not set |
1057 | # CONFIG_USB_MON is not set | ||
1033 | 1058 | ||
1034 | # | 1059 | # |
1035 | # USB port drivers | 1060 | # USB port drivers |
@@ -1055,6 +1080,7 @@ CONFIG_USB_PEGASUS=y | |||
1055 | # CONFIG_USB_PHIDGETKIT is not set | 1080 | # CONFIG_USB_PHIDGETKIT is not set |
1056 | # CONFIG_USB_PHIDGETSERVO is not set | 1081 | # CONFIG_USB_PHIDGETSERVO is not set |
1057 | # CONFIG_USB_IDMOUSE is not set | 1082 | # CONFIG_USB_IDMOUSE is not set |
1083 | # CONFIG_USB_SISUSBVGA is not set | ||
1058 | # CONFIG_USB_TEST is not set | 1084 | # CONFIG_USB_TEST is not set |
1059 | 1085 | ||
1060 | # | 1086 | # |
@@ -1276,10 +1302,13 @@ CONFIG_OPROFILE=y | |||
1276 | # | 1302 | # |
1277 | # Kernel hacking | 1303 | # Kernel hacking |
1278 | # | 1304 | # |
1305 | # CONFIG_PRINTK_TIME is not set | ||
1279 | CONFIG_DEBUG_KERNEL=y | 1306 | CONFIG_DEBUG_KERNEL=y |
1280 | CONFIG_MAGIC_SYSRQ=y | 1307 | CONFIG_MAGIC_SYSRQ=y |
1308 | CONFIG_LOG_BUF_SHIFT=17 | ||
1281 | # CONFIG_SCHEDSTATS is not set | 1309 | # CONFIG_SCHEDSTATS is not set |
1282 | # CONFIG_DEBUG_SLAB is not set | 1310 | # CONFIG_DEBUG_SLAB is not set |
1311 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1283 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1312 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1284 | # CONFIG_DEBUG_KOBJECT is not set | 1313 | # CONFIG_DEBUG_KOBJECT is not set |
1285 | # CONFIG_DEBUG_INFO is not set | 1314 | # CONFIG_DEBUG_INFO is not set |
@@ -1311,6 +1340,7 @@ CONFIG_CRYPTO_SHA1=m | |||
1311 | CONFIG_CRYPTO_SHA256=m | 1340 | CONFIG_CRYPTO_SHA256=m |
1312 | CONFIG_CRYPTO_SHA512=m | 1341 | CONFIG_CRYPTO_SHA512=m |
1313 | CONFIG_CRYPTO_WP512=m | 1342 | CONFIG_CRYPTO_WP512=m |
1343 | CONFIG_CRYPTO_TGR192=m | ||
1314 | CONFIG_CRYPTO_DES=y | 1344 | CONFIG_CRYPTO_DES=y |
1315 | CONFIG_CRYPTO_BLOWFISH=m | 1345 | CONFIG_CRYPTO_BLOWFISH=m |
1316 | CONFIG_CRYPTO_TWOFISH=m | 1346 | CONFIG_CRYPTO_TWOFISH=m |
diff --git a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S index d3604056e1a9..b61572eb2a71 100644 --- a/arch/ppc64/kernel/entry.S +++ b/arch/ppc64/kernel/entry.S | |||
@@ -436,15 +436,6 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC) | |||
436 | REST_8GPRS(14, r1) | 436 | REST_8GPRS(14, r1) |
437 | REST_10GPRS(22, r1) | 437 | REST_10GPRS(22, r1) |
438 | 438 | ||
439 | #ifdef CONFIG_PPC_ISERIES | ||
440 | clrrdi r7,r1,THREAD_SHIFT /* get current_thread_info() */ | ||
441 | ld r7,TI_FLAGS(r7) /* Get run light flag */ | ||
442 | mfspr r9,CTRLF | ||
443 | srdi r7,r7,TIF_RUN_LIGHT | ||
444 | insrdi r9,r7,1,63 /* Insert run light into CTRL */ | ||
445 | mtspr CTRLT,r9 | ||
446 | #endif | ||
447 | |||
448 | /* convert old thread to its task_struct for return value */ | 439 | /* convert old thread to its task_struct for return value */ |
449 | addi r3,r3,-THREAD | 440 | addi r3,r3,-THREAD |
450 | ld r7,_NIP(r1) /* Return to _switch caller in new task */ | 441 | ld r7,_NIP(r1) /* Return to _switch caller in new task */ |
diff --git a/arch/ppc64/kernel/head.S b/arch/ppc64/kernel/head.S index 92a744c31ab1..346dbf606b5d 100644 --- a/arch/ppc64/kernel/head.S +++ b/arch/ppc64/kernel/head.S | |||
@@ -626,10 +626,10 @@ system_reset_iSeries: | |||
626 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ | 626 | lhz r24,PACAPACAINDEX(r13) /* Get processor # */ |
627 | cmpwi 0,r24,0 /* Are we processor 0? */ | 627 | cmpwi 0,r24,0 /* Are we processor 0? */ |
628 | beq .__start_initialization_iSeries /* Start up the first processor */ | 628 | beq .__start_initialization_iSeries /* Start up the first processor */ |
629 | mfspr r4,CTRLF | 629 | mfspr r4,SPRN_CTRLF |
630 | li r5,RUNLATCH /* Turn off the run light */ | 630 | li r5,CTRL_RUNLATCH /* Turn off the run light */ |
631 | andc r4,r4,r5 | 631 | andc r4,r4,r5 |
632 | mtspr CTRLT,r4 | 632 | mtspr SPRN_CTRLT,r4 |
633 | 633 | ||
634 | 1: | 634 | 1: |
635 | HMT_LOW | 635 | HMT_LOW |
@@ -2082,9 +2082,9 @@ _GLOBAL(hmt_start_secondary) | |||
2082 | mfspr r4, HID0 | 2082 | mfspr r4, HID0 |
2083 | ori r4, r4, 0x1 | 2083 | ori r4, r4, 0x1 |
2084 | mtspr HID0, r4 | 2084 | mtspr HID0, r4 |
2085 | mfspr r4, CTRLF | 2085 | mfspr r4, SPRN_CTRLF |
2086 | oris r4, r4, 0x40 | 2086 | oris r4, r4, 0x40 |
2087 | mtspr CTRLT, r4 | 2087 | mtspr SPRN_CTRLT, r4 |
2088 | blr | 2088 | blr |
2089 | #endif | 2089 | #endif |
2090 | 2090 | ||
diff --git a/arch/ppc64/kernel/iSeries_setup.c b/arch/ppc64/kernel/iSeries_setup.c index da20120f2261..6d06eb550a3f 100644 --- a/arch/ppc64/kernel/iSeries_setup.c +++ b/arch/ppc64/kernel/iSeries_setup.c | |||
@@ -852,6 +852,28 @@ static int __init iSeries_src_init(void) | |||
852 | 852 | ||
853 | late_initcall(iSeries_src_init); | 853 | late_initcall(iSeries_src_init); |
854 | 854 | ||
855 | static int set_spread_lpevents(char *str) | ||
856 | { | ||
857 | unsigned long i; | ||
858 | unsigned long val = simple_strtoul(str, NULL, 0); | ||
859 | |||
860 | /* | ||
861 | * The parameter is the number of processors to share in processing | ||
862 | * lp events. | ||
863 | */ | ||
864 | if (( val > 0) && (val <= NR_CPUS)) { | ||
865 | for (i = 1; i < val; ++i) | ||
866 | paca[i].lpqueue_ptr = paca[0].lpqueue_ptr; | ||
867 | |||
868 | printk("lpevent processing spread over %ld processors\n", val); | ||
869 | } else { | ||
870 | printk("invalid spread_lpevents %ld\n", val); | ||
871 | } | ||
872 | |||
873 | return 1; | ||
874 | } | ||
875 | __setup("spread_lpevents=", set_spread_lpevents); | ||
876 | |||
855 | void __init iSeries_early_setup(void) | 877 | void __init iSeries_early_setup(void) |
856 | { | 878 | { |
857 | iSeries_fixup_klimit(); | 879 | iSeries_fixup_klimit(); |
diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c index 6abc621d3ba0..f24ce2b87200 100644 --- a/arch/ppc64/kernel/idle.c +++ b/arch/ppc64/kernel/idle.c | |||
@@ -75,13 +75,9 @@ static int iSeries_idle(void) | |||
75 | { | 75 | { |
76 | struct paca_struct *lpaca; | 76 | struct paca_struct *lpaca; |
77 | long oldval; | 77 | long oldval; |
78 | unsigned long CTRL; | ||
79 | 78 | ||
80 | /* ensure iSeries run light will be out when idle */ | 79 | /* ensure iSeries run light will be out when idle */ |
81 | clear_thread_flag(TIF_RUN_LIGHT); | 80 | ppc64_runlatch_off(); |
82 | CTRL = mfspr(CTRLF); | ||
83 | CTRL &= ~RUNLATCH; | ||
84 | mtspr(CTRLT, CTRL); | ||
85 | 81 | ||
86 | lpaca = get_paca(); | 82 | lpaca = get_paca(); |
87 | 83 | ||
@@ -111,7 +107,9 @@ static int iSeries_idle(void) | |||
111 | } | 107 | } |
112 | } | 108 | } |
113 | 109 | ||
110 | ppc64_runlatch_on(); | ||
114 | schedule(); | 111 | schedule(); |
112 | ppc64_runlatch_off(); | ||
115 | } | 113 | } |
116 | 114 | ||
117 | return 0; | 115 | return 0; |
diff --git a/arch/ppc64/kernel/iommu.c b/arch/ppc64/kernel/iommu.c index 344164681d2c..8316426ccaf6 100644 --- a/arch/ppc64/kernel/iommu.c +++ b/arch/ppc64/kernel/iommu.c | |||
@@ -423,6 +423,9 @@ struct iommu_table *iommu_init_table(struct iommu_table *tbl) | |||
423 | tbl->it_largehint = tbl->it_halfpoint; | 423 | tbl->it_largehint = tbl->it_halfpoint; |
424 | spin_lock_init(&tbl->it_lock); | 424 | spin_lock_init(&tbl->it_lock); |
425 | 425 | ||
426 | /* Clear the hardware table in case firmware left allocations in it */ | ||
427 | ppc_md.tce_free(tbl, tbl->it_offset, tbl->it_size); | ||
428 | |||
426 | if (!welcomed) { | 429 | if (!welcomed) { |
427 | printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n", | 430 | printk(KERN_INFO "IOMMU table initialized, virtual merging %s\n", |
428 | novmerge ? "disabled" : "enabled"); | 431 | novmerge ? "disabled" : "enabled"); |
diff --git a/arch/ppc64/kernel/kprobes.c b/arch/ppc64/kernel/kprobes.c index 103daaf73573..e950a2058a19 100644 --- a/arch/ppc64/kernel/kprobes.c +++ b/arch/ppc64/kernel/kprobes.c | |||
@@ -45,12 +45,17 @@ static struct pt_regs jprobe_saved_regs; | |||
45 | 45 | ||
46 | int arch_prepare_kprobe(struct kprobe *p) | 46 | int arch_prepare_kprobe(struct kprobe *p) |
47 | { | 47 | { |
48 | int ret = 0; | ||
48 | kprobe_opcode_t insn = *p->addr; | 49 | kprobe_opcode_t insn = *p->addr; |
49 | 50 | ||
50 | if (IS_MTMSRD(insn) || IS_RFID(insn)) | 51 | if ((unsigned long)p->addr & 0x03) { |
51 | /* cannot put bp on RFID/MTMSRD */ | 52 | printk("Attempt to register kprobe at an unaligned address\n"); |
52 | return 1; | 53 | ret = -EINVAL; |
53 | return 0; | 54 | } else if (IS_MTMSRD(insn) || IS_RFID(insn)) { |
55 | printk("Cannot register a kprobe on rfid or mtmsrd\n"); | ||
56 | ret = -EINVAL; | ||
57 | } | ||
58 | return ret; | ||
54 | } | 59 | } |
55 | 60 | ||
56 | void arch_copy_kprobe(struct kprobe *p) | 61 | void arch_copy_kprobe(struct kprobe *p) |
@@ -172,8 +177,6 @@ static void resume_execution(struct kprobe *p, struct pt_regs *regs) | |||
172 | ret = emulate_step(regs, p->ainsn.insn[0]); | 177 | ret = emulate_step(regs, p->ainsn.insn[0]); |
173 | if (ret == 0) | 178 | if (ret == 0) |
174 | regs->nip = (unsigned long)p->addr + 4; | 179 | regs->nip = (unsigned long)p->addr + 4; |
175 | |||
176 | regs->msr &= ~MSR_SE; | ||
177 | } | 180 | } |
178 | 181 | ||
179 | static inline int post_kprobe_handler(struct pt_regs *regs) | 182 | static inline int post_kprobe_handler(struct pt_regs *regs) |
@@ -210,6 +213,7 @@ static inline int kprobe_fault_handler(struct pt_regs *regs, int trapnr) | |||
210 | 213 | ||
211 | if (kprobe_status & KPROBE_HIT_SS) { | 214 | if (kprobe_status & KPROBE_HIT_SS) { |
212 | resume_execution(current_kprobe, regs); | 215 | resume_execution(current_kprobe, regs); |
216 | regs->msr &= ~MSR_SE; | ||
213 | regs->msr |= kprobe_saved_msr; | 217 | regs->msr |= kprobe_saved_msr; |
214 | 218 | ||
215 | unlock_kprobes(); | 219 | unlock_kprobes(); |
@@ -233,8 +237,6 @@ int kprobe_exceptions_notify(struct notifier_block *self, unsigned long val, | |||
233 | */ | 237 | */ |
234 | preempt_disable(); | 238 | preempt_disable(); |
235 | switch (val) { | 239 | switch (val) { |
236 | case DIE_IABR_MATCH: | ||
237 | case DIE_DABR_MATCH: | ||
238 | case DIE_BPT: | 240 | case DIE_BPT: |
239 | if (kprobe_handler(args->regs)) | 241 | if (kprobe_handler(args->regs)) |
240 | ret = NOTIFY_STOP; | 242 | ret = NOTIFY_STOP; |
diff --git a/arch/ppc64/kernel/misc.S b/arch/ppc64/kernel/misc.S index b944717c1dbd..e3c73b3425dc 100644 --- a/arch/ppc64/kernel/misc.S +++ b/arch/ppc64/kernel/misc.S | |||
@@ -792,7 +792,7 @@ _GLOBAL(sys_call_table32) | |||
792 | .llong .compat_sys_newstat | 792 | .llong .compat_sys_newstat |
793 | .llong .compat_sys_newlstat | 793 | .llong .compat_sys_newlstat |
794 | .llong .compat_sys_newfstat | 794 | .llong .compat_sys_newfstat |
795 | .llong .sys_uname | 795 | .llong .sys32_uname |
796 | .llong .sys_ni_syscall /* 110 old iopl syscall */ | 796 | .llong .sys_ni_syscall /* 110 old iopl syscall */ |
797 | .llong .sys_vhangup | 797 | .llong .sys_vhangup |
798 | .llong .sys_ni_syscall /* old idle syscall */ | 798 | .llong .sys_ni_syscall /* old idle syscall */ |
diff --git a/arch/ppc64/kernel/of_device.c b/arch/ppc64/kernel/of_device.c index f4c825a69fa0..66bd5ab7c25a 100644 --- a/arch/ppc64/kernel/of_device.c +++ b/arch/ppc64/kernel/of_device.c | |||
@@ -161,7 +161,7 @@ void of_unregister_driver(struct of_platform_driver *drv) | |||
161 | } | 161 | } |
162 | 162 | ||
163 | 163 | ||
164 | static ssize_t dev_show_devspec(struct device *dev, char *buf) | 164 | static ssize_t dev_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) |
165 | { | 165 | { |
166 | struct of_device *ofdev; | 166 | struct of_device *ofdev; |
167 | 167 | ||
diff --git a/arch/ppc64/kernel/pSeries_reconfig.c b/arch/ppc64/kernel/pSeries_reconfig.c index cb5443f2e49b..dc2a69d412a2 100644 --- a/arch/ppc64/kernel/pSeries_reconfig.c +++ b/arch/ppc64/kernel/pSeries_reconfig.c | |||
@@ -47,14 +47,6 @@ static void remove_node_proc_entries(struct device_node *np) | |||
47 | remove_proc_entry(pp->name, np->pde); | 47 | remove_proc_entry(pp->name, np->pde); |
48 | pp = pp->next; | 48 | pp = pp->next; |
49 | } | 49 | } |
50 | |||
51 | /* Assuming that symlinks have the same parent directory as | ||
52 | * np->pde. | ||
53 | */ | ||
54 | if (np->name_link) | ||
55 | remove_proc_entry(np->name_link->name, parent->pde); | ||
56 | if (np->addr_link) | ||
57 | remove_proc_entry(np->addr_link->name, parent->pde); | ||
58 | if (np->pde) | 50 | if (np->pde) |
59 | remove_proc_entry(np->pde->name, parent->pde); | 51 | remove_proc_entry(np->pde->name, parent->pde); |
60 | } | 52 | } |
diff --git a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c index fbad349ec58c..4203bd020c82 100644 --- a/arch/ppc64/kernel/pSeries_smp.c +++ b/arch/ppc64/kernel/pSeries_smp.c | |||
@@ -375,7 +375,7 @@ static int smp_pSeries_cpu_bootable(unsigned int nr) | |||
375 | * cpus are assumed to be secondary threads. | 375 | * cpus are assumed to be secondary threads. |
376 | */ | 376 | */ |
377 | if (system_state < SYSTEM_RUNNING && | 377 | if (system_state < SYSTEM_RUNNING && |
378 | cur_cpu_spec->cpu_features & CPU_FTR_SMT && | 378 | cpu_has_feature(CPU_FTR_SMT) && |
379 | !smt_enabled_at_boot && nr % 2 != 0) | 379 | !smt_enabled_at_boot && nr % 2 != 0) |
380 | return 0; | 380 | return 0; |
381 | 381 | ||
@@ -419,8 +419,8 @@ void __init smp_init_pSeries(void) | |||
419 | #endif | 419 | #endif |
420 | 420 | ||
421 | /* Mark threads which are still spinning in hold loops. */ | 421 | /* Mark threads which are still spinning in hold loops. */ |
422 | if (cur_cpu_spec->cpu_features & CPU_FTR_SMT) | 422 | if (cpu_has_feature(CPU_FTR_SMT)) { |
423 | for_each_present_cpu(i) { | 423 | for_each_present_cpu(i) { |
424 | if (i % 2 == 0) | 424 | if (i % 2 == 0) |
425 | /* | 425 | /* |
426 | * Even-numbered logical cpus correspond to | 426 | * Even-numbered logical cpus correspond to |
@@ -428,8 +428,9 @@ void __init smp_init_pSeries(void) | |||
428 | */ | 428 | */ |
429 | cpu_set(i, of_spin_map); | 429 | cpu_set(i, of_spin_map); |
430 | } | 430 | } |
431 | else | 431 | } else { |
432 | of_spin_map = cpu_present_map; | 432 | of_spin_map = cpu_present_map; |
433 | } | ||
433 | 434 | ||
434 | cpu_clear(boot_cpuid, of_spin_map); | 435 | cpu_clear(boot_cpuid, of_spin_map); |
435 | 436 | ||
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c index d786d4b6af0b..2bf0513f3eca 100644 --- a/arch/ppc64/kernel/pci.c +++ b/arch/ppc64/kernel/pci.c | |||
@@ -507,7 +507,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
507 | } | 507 | } |
508 | 508 | ||
509 | #ifdef CONFIG_PPC_MULTIPLATFORM | 509 | #ifdef CONFIG_PPC_MULTIPLATFORM |
510 | static ssize_t pci_show_devspec(struct device *dev, char *buf) | 510 | static ssize_t pci_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) |
511 | { | 511 | { |
512 | struct pci_dev *pdev; | 512 | struct pci_dev *pdev; |
513 | struct device_node *np; | 513 | struct device_node *np; |
diff --git a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c index 8b0686122738..cdfecbeb331f 100644 --- a/arch/ppc64/kernel/process.c +++ b/arch/ppc64/kernel/process.c | |||
@@ -378,9 +378,6 @@ copy_thread(int nr, unsigned long clone_flags, unsigned long usp, | |||
378 | childregs->gpr[1] = sp + sizeof(struct pt_regs); | 378 | childregs->gpr[1] = sp + sizeof(struct pt_regs); |
379 | p->thread.regs = NULL; /* no user register state */ | 379 | p->thread.regs = NULL; /* no user register state */ |
380 | clear_ti_thread_flag(p->thread_info, TIF_32BIT); | 380 | clear_ti_thread_flag(p->thread_info, TIF_32BIT); |
381 | #ifdef CONFIG_PPC_ISERIES | ||
382 | set_ti_thread_flag(p->thread_info, TIF_RUN_LIGHT); | ||
383 | #endif | ||
384 | } else { | 381 | } else { |
385 | childregs->gpr[1] = usp; | 382 | childregs->gpr[1] = usp; |
386 | p->thread.regs = childregs; | 383 | p->thread.regs = childregs; |
diff --git a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c index 6f79b7b9b445..b7683abfbe6a 100644 --- a/arch/ppc64/kernel/prom_init.c +++ b/arch/ppc64/kernel/prom_init.c | |||
@@ -211,13 +211,23 @@ struct { | |||
211 | */ | 211 | */ |
212 | #define ADDR(x) (u32) ((unsigned long)(x) - offset) | 212 | #define ADDR(x) (u32) ((unsigned long)(x) - offset) |
213 | 213 | ||
214 | /* | ||
215 | * Error results ... some OF calls will return "-1" on error, some | ||
216 | * will return 0, some will return either. To simplify, here are | ||
217 | * macros to use with any ihandle or phandle return value to check if | ||
218 | * it is valid | ||
219 | */ | ||
220 | |||
221 | #define PROM_ERROR (-1u) | ||
222 | #define PHANDLE_VALID(p) ((p) != 0 && (p) != PROM_ERROR) | ||
223 | #define IHANDLE_VALID(i) ((i) != 0 && (i) != PROM_ERROR) | ||
224 | |||
225 | |||
214 | /* This is the one and *ONLY* place where we actually call open | 226 | /* This is the one and *ONLY* place where we actually call open |
215 | * firmware from, since we need to make sure we're running in 32b | 227 | * firmware from, since we need to make sure we're running in 32b |
216 | * mode when we do. We switch back to 64b mode upon return. | 228 | * mode when we do. We switch back to 64b mode upon return. |
217 | */ | 229 | */ |
218 | 230 | ||
219 | #define PROM_ERROR (-1) | ||
220 | |||
221 | static int __init call_prom(const char *service, int nargs, int nret, ...) | 231 | static int __init call_prom(const char *service, int nargs, int nret, ...) |
222 | { | 232 | { |
223 | int i; | 233 | int i; |
@@ -587,14 +597,13 @@ static void __init prom_send_capabilities(void) | |||
587 | { | 597 | { |
588 | unsigned long offset = reloc_offset(); | 598 | unsigned long offset = reloc_offset(); |
589 | ihandle elfloader; | 599 | ihandle elfloader; |
590 | int ret; | ||
591 | 600 | ||
592 | elfloader = call_prom("open", 1, 1, ADDR("/packages/elf-loader")); | 601 | elfloader = call_prom("open", 1, 1, ADDR("/packages/elf-loader")); |
593 | if (elfloader == 0) { | 602 | if (elfloader == 0) { |
594 | prom_printf("couldn't open /packages/elf-loader\n"); | 603 | prom_printf("couldn't open /packages/elf-loader\n"); |
595 | return; | 604 | return; |
596 | } | 605 | } |
597 | ret = call_prom("call-method", 3, 1, ADDR("process-elf-header"), | 606 | call_prom("call-method", 3, 1, ADDR("process-elf-header"), |
598 | elfloader, ADDR(&fake_elf)); | 607 | elfloader, ADDR(&fake_elf)); |
599 | call_prom("close", 1, 0, elfloader); | 608 | call_prom("close", 1, 0, elfloader); |
600 | } | 609 | } |
@@ -646,7 +655,7 @@ static unsigned long __init alloc_up(unsigned long size, unsigned long align) | |||
646 | base = _ALIGN_UP(base + 0x100000, align)) { | 655 | base = _ALIGN_UP(base + 0x100000, align)) { |
647 | prom_debug(" trying: 0x%x\n\r", base); | 656 | prom_debug(" trying: 0x%x\n\r", base); |
648 | addr = (unsigned long)prom_claim(base, size, 0); | 657 | addr = (unsigned long)prom_claim(base, size, 0); |
649 | if ((int)addr != PROM_ERROR) | 658 | if (addr != PROM_ERROR) |
650 | break; | 659 | break; |
651 | addr = 0; | 660 | addr = 0; |
652 | if (align == 0) | 661 | if (align == 0) |
@@ -708,7 +717,7 @@ static unsigned long __init alloc_down(unsigned long size, unsigned long align, | |||
708 | for(; base > RELOC(alloc_bottom); base = _ALIGN_DOWN(base - 0x100000, align)) { | 717 | for(; base > RELOC(alloc_bottom); base = _ALIGN_DOWN(base - 0x100000, align)) { |
709 | prom_debug(" trying: 0x%x\n\r", base); | 718 | prom_debug(" trying: 0x%x\n\r", base); |
710 | addr = (unsigned long)prom_claim(base, size, 0); | 719 | addr = (unsigned long)prom_claim(base, size, 0); |
711 | if ((int)addr != PROM_ERROR) | 720 | if (addr != PROM_ERROR) |
712 | break; | 721 | break; |
713 | addr = 0; | 722 | addr = 0; |
714 | } | 723 | } |
@@ -902,18 +911,19 @@ static void __init prom_instantiate_rtas(void) | |||
902 | { | 911 | { |
903 | unsigned long offset = reloc_offset(); | 912 | unsigned long offset = reloc_offset(); |
904 | struct prom_t *_prom = PTRRELOC(&prom); | 913 | struct prom_t *_prom = PTRRELOC(&prom); |
905 | phandle prom_rtas, rtas_node; | 914 | phandle rtas_node; |
915 | ihandle rtas_inst; | ||
906 | u32 base, entry = 0; | 916 | u32 base, entry = 0; |
907 | u32 size = 0; | 917 | u32 size = 0; |
908 | 918 | ||
909 | prom_debug("prom_instantiate_rtas: start...\n"); | 919 | prom_debug("prom_instantiate_rtas: start...\n"); |
910 | 920 | ||
911 | prom_rtas = call_prom("finddevice", 1, 1, ADDR("/rtas")); | 921 | rtas_node = call_prom("finddevice", 1, 1, ADDR("/rtas")); |
912 | prom_debug("prom_rtas: %x\n", prom_rtas); | 922 | prom_debug("rtas_node: %x\n", rtas_node); |
913 | if (prom_rtas == (phandle) -1) | 923 | if (!PHANDLE_VALID(rtas_node)) |
914 | return; | 924 | return; |
915 | 925 | ||
916 | prom_getprop(prom_rtas, "rtas-size", &size, sizeof(size)); | 926 | prom_getprop(rtas_node, "rtas-size", &size, sizeof(size)); |
917 | if (size == 0) | 927 | if (size == 0) |
918 | return; | 928 | return; |
919 | 929 | ||
@@ -922,14 +932,18 @@ static void __init prom_instantiate_rtas(void) | |||
922 | prom_printf("RTAS allocation failed !\n"); | 932 | prom_printf("RTAS allocation failed !\n"); |
923 | return; | 933 | return; |
924 | } | 934 | } |
925 | prom_printf("instantiating rtas at 0x%x", base); | ||
926 | 935 | ||
927 | rtas_node = call_prom("open", 1, 1, ADDR("/rtas")); | 936 | rtas_inst = call_prom("open", 1, 1, ADDR("/rtas")); |
928 | prom_printf("..."); | 937 | if (!IHANDLE_VALID(rtas_inst)) { |
938 | prom_printf("opening rtas package failed"); | ||
939 | return; | ||
940 | } | ||
941 | |||
942 | prom_printf("instantiating rtas at 0x%x ...", base); | ||
929 | 943 | ||
930 | if (call_prom("call-method", 3, 2, | 944 | if (call_prom("call-method", 3, 2, |
931 | ADDR("instantiate-rtas"), | 945 | ADDR("instantiate-rtas"), |
932 | rtas_node, base) != PROM_ERROR) { | 946 | rtas_inst, base) != PROM_ERROR) { |
933 | entry = (long)_prom->args.rets[1]; | 947 | entry = (long)_prom->args.rets[1]; |
934 | } | 948 | } |
935 | if (entry == 0) { | 949 | if (entry == 0) { |
@@ -940,8 +954,8 @@ static void __init prom_instantiate_rtas(void) | |||
940 | 954 | ||
941 | reserve_mem(base, size); | 955 | reserve_mem(base, size); |
942 | 956 | ||
943 | prom_setprop(prom_rtas, "linux,rtas-base", &base, sizeof(base)); | 957 | prom_setprop(rtas_node, "linux,rtas-base", &base, sizeof(base)); |
944 | prom_setprop(prom_rtas, "linux,rtas-entry", &entry, sizeof(entry)); | 958 | prom_setprop(rtas_node, "linux,rtas-entry", &entry, sizeof(entry)); |
945 | 959 | ||
946 | prom_debug("rtas base = 0x%x\n", base); | 960 | prom_debug("rtas base = 0x%x\n", base); |
947 | prom_debug("rtas entry = 0x%x\n", entry); | 961 | prom_debug("rtas entry = 0x%x\n", entry); |
@@ -1062,7 +1076,7 @@ static void __init prom_initialize_tce_table(void) | |||
1062 | 1076 | ||
1063 | prom_printf("opening PHB %s", path); | 1077 | prom_printf("opening PHB %s", path); |
1064 | phb_node = call_prom("open", 1, 1, path); | 1078 | phb_node = call_prom("open", 1, 1, path); |
1065 | if ( (long)phb_node <= 0) | 1079 | if (phb_node == 0) |
1066 | prom_printf("... failed\n"); | 1080 | prom_printf("... failed\n"); |
1067 | else | 1081 | else |
1068 | prom_printf("... done\n"); | 1082 | prom_printf("... done\n"); |
@@ -1279,12 +1293,12 @@ static void __init prom_init_client_services(unsigned long pp) | |||
1279 | 1293 | ||
1280 | /* get a handle for the stdout device */ | 1294 | /* get a handle for the stdout device */ |
1281 | _prom->chosen = call_prom("finddevice", 1, 1, ADDR("/chosen")); | 1295 | _prom->chosen = call_prom("finddevice", 1, 1, ADDR("/chosen")); |
1282 | if ((long)_prom->chosen <= 0) | 1296 | if (!PHANDLE_VALID(_prom->chosen)) |
1283 | prom_panic("cannot find chosen"); /* msg won't be printed :( */ | 1297 | prom_panic("cannot find chosen"); /* msg won't be printed :( */ |
1284 | 1298 | ||
1285 | /* get device tree root */ | 1299 | /* get device tree root */ |
1286 | _prom->root = call_prom("finddevice", 1, 1, ADDR("/")); | 1300 | _prom->root = call_prom("finddevice", 1, 1, ADDR("/")); |
1287 | if ((long)_prom->root <= 0) | 1301 | if (!PHANDLE_VALID(_prom->root)) |
1288 | prom_panic("cannot find device tree root"); /* msg won't be printed :( */ | 1302 | prom_panic("cannot find device tree root"); /* msg won't be printed :( */ |
1289 | } | 1303 | } |
1290 | 1304 | ||
@@ -1356,9 +1370,8 @@ static int __init prom_find_machine_type(void) | |||
1356 | } | 1370 | } |
1357 | /* Default to pSeries. We need to know if we are running LPAR */ | 1371 | /* Default to pSeries. We need to know if we are running LPAR */ |
1358 | rtas = call_prom("finddevice", 1, 1, ADDR("/rtas")); | 1372 | rtas = call_prom("finddevice", 1, 1, ADDR("/rtas")); |
1359 | if (rtas != (phandle) -1) { | 1373 | if (PHANDLE_VALID(rtas)) { |
1360 | unsigned long x; | 1374 | int x = prom_getproplen(rtas, "ibm,hypertas-functions"); |
1361 | x = prom_getproplen(rtas, "ibm,hypertas-functions"); | ||
1362 | if (x != PROM_ERROR) { | 1375 | if (x != PROM_ERROR) { |
1363 | prom_printf("Hypertas detected, assuming LPAR !\n"); | 1376 | prom_printf("Hypertas detected, assuming LPAR !\n"); |
1364 | return PLATFORM_PSERIES_LPAR; | 1377 | return PLATFORM_PSERIES_LPAR; |
@@ -1426,12 +1439,13 @@ static void __init prom_check_displays(void) | |||
1426 | * leave some room at the end of the path for appending extra | 1439 | * leave some room at the end of the path for appending extra |
1427 | * arguments | 1440 | * arguments |
1428 | */ | 1441 | */ |
1429 | if (call_prom("package-to-path", 3, 1, node, path, PROM_SCRATCH_SIZE-10) < 0) | 1442 | if (call_prom("package-to-path", 3, 1, node, path, |
1443 | PROM_SCRATCH_SIZE-10) == PROM_ERROR) | ||
1430 | continue; | 1444 | continue; |
1431 | prom_printf("found display : %s, opening ... ", path); | 1445 | prom_printf("found display : %s, opening ... ", path); |
1432 | 1446 | ||
1433 | ih = call_prom("open", 1, 1, path); | 1447 | ih = call_prom("open", 1, 1, path); |
1434 | if (ih == (ihandle)0 || ih == (ihandle)-1) { | 1448 | if (ih == 0) { |
1435 | prom_printf("failed\n"); | 1449 | prom_printf("failed\n"); |
1436 | continue; | 1450 | continue; |
1437 | } | 1451 | } |
@@ -1514,6 +1528,12 @@ static unsigned long __init dt_find_string(char *str) | |||
1514 | return 0; | 1528 | return 0; |
1515 | } | 1529 | } |
1516 | 1530 | ||
1531 | /* | ||
1532 | * The Open Firmware 1275 specification states properties must be 31 bytes or | ||
1533 | * less, however not all firmwares obey this. Make it 64 bytes to be safe. | ||
1534 | */ | ||
1535 | #define MAX_PROPERTY_NAME 64 | ||
1536 | |||
1517 | static void __init scan_dt_build_strings(phandle node, unsigned long *mem_start, | 1537 | static void __init scan_dt_build_strings(phandle node, unsigned long *mem_start, |
1518 | unsigned long *mem_end) | 1538 | unsigned long *mem_end) |
1519 | { | 1539 | { |
@@ -1527,10 +1547,12 @@ static void __init scan_dt_build_strings(phandle node, unsigned long *mem_start, | |||
1527 | /* get and store all property names */ | 1547 | /* get and store all property names */ |
1528 | prev_name = RELOC(""); | 1548 | prev_name = RELOC(""); |
1529 | for (;;) { | 1549 | for (;;) { |
1530 | 1550 | int rc; | |
1531 | /* 32 is max len of name including nul. */ | 1551 | |
1532 | namep = make_room(mem_start, mem_end, 32, 1); | 1552 | /* 64 is max len of name including nul. */ |
1533 | if (call_prom("nextprop", 3, 1, node, prev_name, namep) <= 0) { | 1553 | namep = make_room(mem_start, mem_end, MAX_PROPERTY_NAME, 1); |
1554 | rc = call_prom("nextprop", 3, 1, node, prev_name, namep); | ||
1555 | if (rc != 1) { | ||
1534 | /* No more nodes: unwind alloc */ | 1556 | /* No more nodes: unwind alloc */ |
1535 | *mem_start = (unsigned long)namep; | 1557 | *mem_start = (unsigned long)namep; |
1536 | break; | 1558 | break; |
@@ -1555,18 +1577,12 @@ static void __init scan_dt_build_strings(phandle node, unsigned long *mem_start, | |||
1555 | } | 1577 | } |
1556 | } | 1578 | } |
1557 | 1579 | ||
1558 | /* | ||
1559 | * The Open Firmware 1275 specification states properties must be 31 bytes or | ||
1560 | * less, however not all firmwares obey this. Make it 64 bytes to be safe. | ||
1561 | */ | ||
1562 | #define MAX_PROPERTY_NAME 64 | ||
1563 | |||
1564 | static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, | 1580 | static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, |
1565 | unsigned long *mem_end) | 1581 | unsigned long *mem_end) |
1566 | { | 1582 | { |
1567 | int l, align; | 1583 | int l, align; |
1568 | phandle child; | 1584 | phandle child; |
1569 | char *namep, *prev_name, *sstart; | 1585 | char *namep, *prev_name, *sstart, *p, *ep; |
1570 | unsigned long soff; | 1586 | unsigned long soff; |
1571 | unsigned char *valp; | 1587 | unsigned char *valp; |
1572 | unsigned long offset = reloc_offset(); | 1588 | unsigned long offset = reloc_offset(); |
@@ -1588,6 +1604,14 @@ static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, | |||
1588 | call_prom("package-to-path", 3, 1, node, namep, l); | 1604 | call_prom("package-to-path", 3, 1, node, namep, l); |
1589 | } | 1605 | } |
1590 | namep[l] = '\0'; | 1606 | namep[l] = '\0'; |
1607 | /* Fixup an Apple bug where they have bogus \0 chars in the | ||
1608 | * middle of the path in some properties | ||
1609 | */ | ||
1610 | for (p = namep, ep = namep + l; p < ep; p++) | ||
1611 | if (*p == '\0') { | ||
1612 | memmove(p, p+1, ep - p); | ||
1613 | ep--; l--; | ||
1614 | } | ||
1591 | *mem_start = _ALIGN(((unsigned long) namep) + strlen(namep) + 1, 4); | 1615 | *mem_start = _ALIGN(((unsigned long) namep) + strlen(namep) + 1, 4); |
1592 | } | 1616 | } |
1593 | 1617 | ||
@@ -1599,7 +1623,10 @@ static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, | |||
1599 | prev_name = RELOC(""); | 1623 | prev_name = RELOC(""); |
1600 | sstart = (char *)RELOC(dt_string_start); | 1624 | sstart = (char *)RELOC(dt_string_start); |
1601 | for (;;) { | 1625 | for (;;) { |
1602 | if (call_prom("nextprop", 3, 1, node, prev_name, pname) <= 0) | 1626 | int rc; |
1627 | |||
1628 | rc = call_prom("nextprop", 3, 1, node, prev_name, pname); | ||
1629 | if (rc != 1) | ||
1603 | break; | 1630 | break; |
1604 | 1631 | ||
1605 | /* find string offset */ | 1632 | /* find string offset */ |
@@ -1615,7 +1642,7 @@ static void __init scan_dt_build_struct(phandle node, unsigned long *mem_start, | |||
1615 | l = call_prom("getproplen", 2, 1, node, pname); | 1642 | l = call_prom("getproplen", 2, 1, node, pname); |
1616 | 1643 | ||
1617 | /* sanity checks */ | 1644 | /* sanity checks */ |
1618 | if (l < 0) | 1645 | if (l == PROM_ERROR) |
1619 | continue; | 1646 | continue; |
1620 | if (l > MAX_PROPERTY_LENGTH) { | 1647 | if (l > MAX_PROPERTY_LENGTH) { |
1621 | prom_printf("WARNING: ignoring large property "); | 1648 | prom_printf("WARNING: ignoring large property "); |
@@ -1763,17 +1790,18 @@ static void __init fixup_device_tree(void) | |||
1763 | 1790 | ||
1764 | /* Some G5s have a missing interrupt definition, fix it up here */ | 1791 | /* Some G5s have a missing interrupt definition, fix it up here */ |
1765 | u3 = call_prom("finddevice", 1, 1, ADDR("/u3@0,f8000000")); | 1792 | u3 = call_prom("finddevice", 1, 1, ADDR("/u3@0,f8000000")); |
1766 | if ((long)u3 <= 0) | 1793 | if (!PHANDLE_VALID(u3)) |
1767 | return; | 1794 | return; |
1768 | i2c = call_prom("finddevice", 1, 1, ADDR("/u3@0,f8000000/i2c@f8001000")); | 1795 | i2c = call_prom("finddevice", 1, 1, ADDR("/u3@0,f8000000/i2c@f8001000")); |
1769 | if ((long)i2c <= 0) | 1796 | if (!PHANDLE_VALID(i2c)) |
1770 | return; | 1797 | return; |
1771 | mpic = call_prom("finddevice", 1, 1, ADDR("/u3@0,f8000000/mpic@f8040000")); | 1798 | mpic = call_prom("finddevice", 1, 1, ADDR("/u3@0,f8000000/mpic@f8040000")); |
1772 | if ((long)mpic <= 0) | 1799 | if (!PHANDLE_VALID(mpic)) |
1773 | return; | 1800 | return; |
1774 | 1801 | ||
1775 | /* check if proper rev of u3 */ | 1802 | /* check if proper rev of u3 */ |
1776 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) <= 0) | 1803 | if (prom_getprop(u3, "device-rev", &u3_rev, sizeof(u3_rev)) |
1804 | == PROM_ERROR) | ||
1777 | return; | 1805 | return; |
1778 | if (u3_rev != 0x35) | 1806 | if (u3_rev != 0x35) |
1779 | return; | 1807 | return; |
@@ -1881,6 +1909,12 @@ unsigned long __init prom_init(unsigned long r3, unsigned long r4, unsigned long | |||
1881 | &getprop_rval, sizeof(getprop_rval)); | 1909 | &getprop_rval, sizeof(getprop_rval)); |
1882 | 1910 | ||
1883 | /* | 1911 | /* |
1912 | * On pSeries, inform the firmware about our capabilities | ||
1913 | */ | ||
1914 | if (RELOC(of_platform) & PLATFORM_PSERIES) | ||
1915 | prom_send_capabilities(); | ||
1916 | |||
1917 | /* | ||
1884 | * On pSeries, copy the CPU hold code | 1918 | * On pSeries, copy the CPU hold code |
1885 | */ | 1919 | */ |
1886 | if (RELOC(of_platform) & PLATFORM_PSERIES) | 1920 | if (RELOC(of_platform) & PLATFORM_PSERIES) |
diff --git a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c index ff65dc33320e..b0c3b829fe47 100644 --- a/arch/ppc64/kernel/rtasd.c +++ b/arch/ppc64/kernel/rtasd.c | |||
@@ -440,7 +440,7 @@ static int rtasd(void *unused) | |||
440 | goto error; | 440 | goto error; |
441 | } | 441 | } |
442 | 442 | ||
443 | printk(KERN_ERR "RTAS daemon started\n"); | 443 | printk(KERN_INFO "RTAS daemon started\n"); |
444 | 444 | ||
445 | DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2); | 445 | DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2); |
446 | 446 | ||
@@ -485,7 +485,7 @@ static int __init rtas_init(void) | |||
485 | /* No RTAS, only warn if we are on a pSeries box */ | 485 | /* No RTAS, only warn if we are on a pSeries box */ |
486 | if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { | 486 | if (rtas_token("event-scan") == RTAS_UNKNOWN_SERVICE) { |
487 | if (systemcfg->platform & PLATFORM_PSERIES) | 487 | if (systemcfg->platform & PLATFORM_PSERIES) |
488 | printk(KERN_ERR "rtasd: no event-scan on system\n"); | 488 | printk(KERN_INFO "rtasd: no event-scan on system\n"); |
489 | return 1; | 489 | return 1; |
490 | } | 490 | } |
491 | 491 | ||
diff --git a/arch/ppc64/kernel/setup.c b/arch/ppc64/kernel/setup.c index 21c57f539c29..dce198d39328 100644 --- a/arch/ppc64/kernel/setup.c +++ b/arch/ppc64/kernel/setup.c | |||
@@ -103,11 +103,6 @@ extern void unflatten_device_tree(void); | |||
103 | 103 | ||
104 | extern void smp_release_cpus(void); | 104 | extern void smp_release_cpus(void); |
105 | 105 | ||
106 | unsigned long decr_overclock = 1; | ||
107 | unsigned long decr_overclock_proc0 = 1; | ||
108 | unsigned long decr_overclock_set = 0; | ||
109 | unsigned long decr_overclock_proc0_set = 0; | ||
110 | |||
111 | int have_of = 1; | 106 | int have_of = 1; |
112 | int boot_cpuid = 0; | 107 | int boot_cpuid = 0; |
113 | int boot_cpuid_phys = 0; | 108 | int boot_cpuid_phys = 0; |
@@ -1120,64 +1115,15 @@ void ppc64_dump_msg(unsigned int src, const char *msg) | |||
1120 | printk("[dump]%04x %s\n", src, msg); | 1115 | printk("[dump]%04x %s\n", src, msg); |
1121 | } | 1116 | } |
1122 | 1117 | ||
1123 | int set_spread_lpevents( char * str ) | ||
1124 | { | ||
1125 | /* The parameter is the number of processors to share in processing lp events */ | ||
1126 | unsigned long i; | ||
1127 | unsigned long val = simple_strtoul( str, NULL, 0 ); | ||
1128 | if ( ( val > 0 ) && ( val <= NR_CPUS ) ) { | ||
1129 | for ( i=1; i<val; ++i ) | ||
1130 | paca[i].lpqueue_ptr = paca[0].lpqueue_ptr; | ||
1131 | printk("lpevent processing spread over %ld processors\n", val); | ||
1132 | } | ||
1133 | else | ||
1134 | printk("invalid spreaqd_lpevents %ld\n", val); | ||
1135 | return 1; | ||
1136 | } | ||
1137 | |||
1138 | /* This should only be called on processor 0 during calibrate decr */ | 1118 | /* This should only be called on processor 0 during calibrate decr */ |
1139 | void setup_default_decr(void) | 1119 | void setup_default_decr(void) |
1140 | { | 1120 | { |
1141 | struct paca_struct *lpaca = get_paca(); | 1121 | struct paca_struct *lpaca = get_paca(); |
1142 | 1122 | ||
1143 | if ( decr_overclock_set && !decr_overclock_proc0_set ) | 1123 | lpaca->default_decr = tb_ticks_per_jiffy; |
1144 | decr_overclock_proc0 = decr_overclock; | ||
1145 | |||
1146 | lpaca->default_decr = tb_ticks_per_jiffy / decr_overclock_proc0; | ||
1147 | lpaca->next_jiffy_update_tb = get_tb() + tb_ticks_per_jiffy; | 1124 | lpaca->next_jiffy_update_tb = get_tb() + tb_ticks_per_jiffy; |
1148 | } | 1125 | } |
1149 | 1126 | ||
1150 | int set_decr_overclock_proc0( char * str ) | ||
1151 | { | ||
1152 | unsigned long val = simple_strtoul( str, NULL, 0 ); | ||
1153 | if ( ( val >= 1 ) && ( val <= 48 ) ) { | ||
1154 | decr_overclock_proc0_set = 1; | ||
1155 | decr_overclock_proc0 = val; | ||
1156 | printk("proc 0 decrementer overclock factor of %ld\n", val); | ||
1157 | } | ||
1158 | else | ||
1159 | printk("invalid proc 0 decrementer overclock factor of %ld\n", val); | ||
1160 | return 1; | ||
1161 | } | ||
1162 | |||
1163 | int set_decr_overclock( char * str ) | ||
1164 | { | ||
1165 | unsigned long val = simple_strtoul( str, NULL, 0 ); | ||
1166 | if ( ( val >= 1 ) && ( val <= 48 ) ) { | ||
1167 | decr_overclock_set = 1; | ||
1168 | decr_overclock = val; | ||
1169 | printk("decrementer overclock factor of %ld\n", val); | ||
1170 | } | ||
1171 | else | ||
1172 | printk("invalid decrementer overclock factor of %ld\n", val); | ||
1173 | return 1; | ||
1174 | |||
1175 | } | ||
1176 | |||
1177 | __setup("spread_lpevents=", set_spread_lpevents ); | ||
1178 | __setup("decr_overclock_proc0=", set_decr_overclock_proc0 ); | ||
1179 | __setup("decr_overclock=", set_decr_overclock ); | ||
1180 | |||
1181 | #ifndef CONFIG_PPC_ISERIES | 1127 | #ifndef CONFIG_PPC_ISERIES |
1182 | /* | 1128 | /* |
1183 | * This function can be used by platforms to "find" legacy serial ports. | 1129 | * This function can be used by platforms to "find" legacy serial ports. |
diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c index 3b906cd94037..9ef5d36d6b25 100644 --- a/arch/ppc64/kernel/smp.c +++ b/arch/ppc64/kernel/smp.c | |||
@@ -334,7 +334,6 @@ void smp_call_function_interrupt(void) | |||
334 | } | 334 | } |
335 | } | 335 | } |
336 | 336 | ||
337 | extern unsigned long decr_overclock; | ||
338 | extern struct gettimeofday_struct do_gtod; | 337 | extern struct gettimeofday_struct do_gtod; |
339 | 338 | ||
340 | struct thread_info *current_set[NR_CPUS]; | 339 | struct thread_info *current_set[NR_CPUS]; |
@@ -491,7 +490,7 @@ int __devinit __cpu_up(unsigned int cpu) | |||
491 | if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) | 490 | if (smp_ops->cpu_bootable && !smp_ops->cpu_bootable(cpu)) |
492 | return -EINVAL; | 491 | return -EINVAL; |
493 | 492 | ||
494 | paca[cpu].default_decr = tb_ticks_per_jiffy / decr_overclock; | 493 | paca[cpu].default_decr = tb_ticks_per_jiffy; |
495 | 494 | ||
496 | if (!cpu_has_feature(CPU_FTR_SLB)) { | 495 | if (!cpu_has_feature(CPU_FTR_SLB)) { |
497 | void *tmp; | 496 | void *tmp; |
diff --git a/arch/ppc64/kernel/sys_ppc32.c b/arch/ppc64/kernel/sys_ppc32.c index 7cf7a9600025..9c8e317c598d 100644 --- a/arch/ppc64/kernel/sys_ppc32.c +++ b/arch/ppc64/kernel/sys_ppc32.c | |||
@@ -791,31 +791,6 @@ asmlinkage int sys32_pciconfig_iobase(u32 which, u32 in_bus, u32 in_devfn) | |||
791 | } | 791 | } |
792 | 792 | ||
793 | 793 | ||
794 | asmlinkage int ppc64_newuname(struct new_utsname __user * name) | ||
795 | { | ||
796 | int errno = sys_newuname(name); | ||
797 | |||
798 | if (current->personality == PER_LINUX32 && !errno) { | ||
799 | if(copy_to_user(name->machine, "ppc\0\0", 8)) { | ||
800 | errno = -EFAULT; | ||
801 | } | ||
802 | } | ||
803 | return errno; | ||
804 | } | ||
805 | |||
806 | asmlinkage int ppc64_personality(unsigned long personality) | ||
807 | { | ||
808 | int ret; | ||
809 | if (current->personality == PER_LINUX32 && personality == PER_LINUX) | ||
810 | personality = PER_LINUX32; | ||
811 | ret = sys_personality(personality); | ||
812 | if (ret == PER_LINUX32) | ||
813 | ret = PER_LINUX; | ||
814 | return ret; | ||
815 | } | ||
816 | |||
817 | |||
818 | |||
819 | /* Note: it is necessary to treat mode as an unsigned int, | 794 | /* Note: it is necessary to treat mode as an unsigned int, |
820 | * with the corresponding cast to a signed int to insure that the | 795 | * with the corresponding cast to a signed int to insure that the |
821 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) | 796 | * proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode) |
@@ -1158,26 +1133,47 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | |||
1158 | } | 1133 | } |
1159 | #endif | 1134 | #endif |
1160 | 1135 | ||
1136 | asmlinkage int sys32_uname(struct old_utsname __user * name) | ||
1137 | { | ||
1138 | int err = 0; | ||
1139 | |||
1140 | down_read(&uts_sem); | ||
1141 | if (copy_to_user(name, &system_utsname, sizeof(*name))) | ||
1142 | err = -EFAULT; | ||
1143 | up_read(&uts_sem); | ||
1144 | if (!err && personality(current->personality) == PER_LINUX32) { | ||
1145 | /* change "ppc64" to "ppc" */ | ||
1146 | if (__put_user(0, name->machine + 3) | ||
1147 | || __put_user(0, name->machine + 4)) | ||
1148 | err = -EFAULT; | ||
1149 | } | ||
1150 | return err; | ||
1151 | } | ||
1152 | |||
1161 | asmlinkage int sys32_olduname(struct oldold_utsname __user * name) | 1153 | asmlinkage int sys32_olduname(struct oldold_utsname __user * name) |
1162 | { | 1154 | { |
1163 | int error; | 1155 | int error; |
1164 | 1156 | ||
1165 | if (!name) | ||
1166 | return -EFAULT; | ||
1167 | if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) | 1157 | if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) |
1168 | return -EFAULT; | 1158 | return -EFAULT; |
1169 | 1159 | ||
1170 | down_read(&uts_sem); | 1160 | down_read(&uts_sem); |
1171 | error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); | 1161 | error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); |
1172 | error -= __put_user(0,name->sysname+__OLD_UTS_LEN); | 1162 | error |= __put_user(0,name->sysname+__OLD_UTS_LEN); |
1173 | error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); | 1163 | error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); |
1174 | error -= __put_user(0,name->nodename+__OLD_UTS_LEN); | 1164 | error |= __put_user(0,name->nodename+__OLD_UTS_LEN); |
1175 | error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); | 1165 | error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); |
1176 | error -= __put_user(0,name->release+__OLD_UTS_LEN); | 1166 | error |= __put_user(0,name->release+__OLD_UTS_LEN); |
1177 | error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); | 1167 | error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); |
1178 | error -= __put_user(0,name->version+__OLD_UTS_LEN); | 1168 | error |= __put_user(0,name->version+__OLD_UTS_LEN); |
1179 | error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); | 1169 | error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); |
1180 | error = __put_user(0,name->machine+__OLD_UTS_LEN); | 1170 | error |= __put_user(0,name->machine+__OLD_UTS_LEN); |
1171 | if (personality(current->personality) == PER_LINUX32) { | ||
1172 | /* change "ppc64" to "ppc" */ | ||
1173 | error |= __put_user(0, name->machine + 3); | ||
1174 | error |= __put_user(0, name->machine + 4); | ||
1175 | } | ||
1176 | |||
1181 | up_read(&uts_sem); | 1177 | up_read(&uts_sem); |
1182 | 1178 | ||
1183 | error = error ? -EFAULT : 0; | 1179 | error = error ? -EFAULT : 0; |
diff --git a/arch/ppc64/kernel/syscalls.c b/arch/ppc64/kernel/syscalls.c index f2865ff8d2f9..a8cbb202b8cd 100644 --- a/arch/ppc64/kernel/syscalls.c +++ b/arch/ppc64/kernel/syscalls.c | |||
@@ -199,24 +199,33 @@ out: | |||
199 | return ret; | 199 | return ret; |
200 | } | 200 | } |
201 | 201 | ||
202 | static int __init set_fakeppc(char *str) | 202 | long ppc64_personality(unsigned long personality) |
203 | { | 203 | { |
204 | if (*str) | 204 | long ret; |
205 | return 0; | 205 | |
206 | init_task.personality = PER_LINUX32; | 206 | if (personality(current->personality) == PER_LINUX32 |
207 | return 1; | 207 | && personality == PER_LINUX) |
208 | personality = PER_LINUX32; | ||
209 | ret = sys_personality(personality); | ||
210 | if (ret == PER_LINUX32) | ||
211 | ret = PER_LINUX; | ||
212 | return ret; | ||
208 | } | 213 | } |
209 | __setup("fakeppc", set_fakeppc); | ||
210 | 214 | ||
211 | asmlinkage int sys_uname(struct old_utsname __user * name) | 215 | long ppc64_newuname(struct new_utsname __user * name) |
212 | { | 216 | { |
213 | int err = -EFAULT; | 217 | int err = 0; |
214 | 218 | ||
215 | down_read(&uts_sem); | 219 | down_read(&uts_sem); |
216 | if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) | 220 | if (copy_to_user(name, &system_utsname, sizeof(*name))) |
217 | err = 0; | 221 | err = -EFAULT; |
218 | up_read(&uts_sem); | 222 | up_read(&uts_sem); |
219 | 223 | if (!err && personality(current->personality) == PER_LINUX32) { | |
224 | /* change ppc64 to ppc */ | ||
225 | if (__put_user(0, name->machine + 3) | ||
226 | || __put_user(0, name->machine + 4)) | ||
227 | err = -EFAULT; | ||
228 | } | ||
220 | return err; | 229 | return err; |
221 | } | 230 | } |
222 | 231 | ||
diff --git a/arch/ppc64/kernel/sysfs.c b/arch/ppc64/kernel/sysfs.c index 0925694c3ce5..c8fa6569b2fd 100644 --- a/arch/ppc64/kernel/sysfs.c +++ b/arch/ppc64/kernel/sysfs.c | |||
@@ -113,7 +113,6 @@ void ppc64_enable_pmcs(void) | |||
113 | #ifdef CONFIG_PPC_PSERIES | 113 | #ifdef CONFIG_PPC_PSERIES |
114 | unsigned long set, reset; | 114 | unsigned long set, reset; |
115 | int ret; | 115 | int ret; |
116 | unsigned int ctrl; | ||
117 | #endif /* CONFIG_PPC_PSERIES */ | 116 | #endif /* CONFIG_PPC_PSERIES */ |
118 | 117 | ||
119 | /* Only need to enable them once */ | 118 | /* Only need to enable them once */ |
@@ -167,11 +166,8 @@ void ppc64_enable_pmcs(void) | |||
167 | * On SMT machines we have to set the run latch in the ctrl register | 166 | * On SMT machines we have to set the run latch in the ctrl register |
168 | * in order to make PMC6 spin. | 167 | * in order to make PMC6 spin. |
169 | */ | 168 | */ |
170 | if (cpu_has_feature(CPU_FTR_SMT)) { | 169 | if (cpu_has_feature(CPU_FTR_SMT)) |
171 | ctrl = mfspr(CTRLF); | 170 | ppc64_runlatch_on(); |
172 | ctrl |= RUNLATCH; | ||
173 | mtspr(CTRLT, ctrl); | ||
174 | } | ||
175 | #endif /* CONFIG_PPC_PSERIES */ | 171 | #endif /* CONFIG_PPC_PSERIES */ |
176 | } | 172 | } |
177 | 173 | ||
diff --git a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c index 3d54745108c7..33364a7d2cd2 100644 --- a/arch/ppc64/kernel/time.c +++ b/arch/ppc64/kernel/time.c | |||
@@ -325,9 +325,7 @@ int timer_interrupt(struct pt_regs * regs) | |||
325 | 325 | ||
326 | irq_enter(); | 326 | irq_enter(); |
327 | 327 | ||
328 | #ifndef CONFIG_PPC_ISERIES | ||
329 | profile_tick(CPU_PROFILING, regs); | 328 | profile_tick(CPU_PROFILING, regs); |
330 | #endif | ||
331 | 329 | ||
332 | lpaca->lppaca.int_dword.fields.decr_int = 0; | 330 | lpaca->lppaca.int_dword.fields.decr_int = 0; |
333 | 331 | ||
diff --git a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c index cdd830cb2768..79f2dc7a9833 100644 --- a/arch/ppc64/kernel/vio.c +++ b/arch/ppc64/kernel/vio.c | |||
@@ -300,7 +300,7 @@ static void __devinit vio_dev_release(struct device *dev) | |||
300 | } | 300 | } |
301 | 301 | ||
302 | #ifdef CONFIG_PPC_PSERIES | 302 | #ifdef CONFIG_PPC_PSERIES |
303 | static ssize_t viodev_show_devspec(struct device *dev, char *buf) | 303 | static ssize_t viodev_show_devspec(struct device *dev, struct device_attribute *attr, char *buf) |
304 | { | 304 | { |
305 | struct device_node *of_node = dev->platform_data; | 305 | struct device_node *of_node = dev->platform_data; |
306 | 306 | ||
@@ -309,7 +309,7 @@ static ssize_t viodev_show_devspec(struct device *dev, char *buf) | |||
309 | DEVICE_ATTR(devspec, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_devspec, NULL); | 309 | DEVICE_ATTR(devspec, S_IRUSR | S_IRGRP | S_IROTH, viodev_show_devspec, NULL); |
310 | #endif | 310 | #endif |
311 | 311 | ||
312 | static ssize_t viodev_show_name(struct device *dev, char *buf) | 312 | static ssize_t viodev_show_name(struct device *dev, struct device_attribute *attr, char *buf) |
313 | { | 313 | { |
314 | return sprintf(buf, "%s\n", to_vio_dev(dev)->name); | 314 | return sprintf(buf, "%s\n", to_vio_dev(dev)->name); |
315 | } | 315 | } |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 01ae1964c938..c067435bae45 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -28,6 +28,7 @@ | |||
28 | //#include <linux/kernel_stat.h> | 28 | //#include <linux/kernel_stat.h> |
29 | #include <linux/notifier.h> | 29 | #include <linux/notifier.h> |
30 | #include <linux/cpu.h> | 30 | #include <linux/cpu.h> |
31 | #include <linux/workqueue.h> | ||
31 | 32 | ||
32 | #include "appldata.h" | 33 | #include "appldata.h" |
33 | 34 | ||
@@ -133,9 +134,12 @@ static int appldata_interval = APPLDATA_CPU_INTERVAL; | |||
133 | static int appldata_timer_active; | 134 | static int appldata_timer_active; |
134 | 135 | ||
135 | /* | 136 | /* |
136 | * Tasklet | 137 | * Work queue |
137 | */ | 138 | */ |
138 | static struct tasklet_struct appldata_tasklet_struct; | 139 | static struct workqueue_struct *appldata_wq; |
140 | static void appldata_work_fn(void *data); | ||
141 | static DECLARE_WORK(appldata_work, appldata_work_fn, NULL); | ||
142 | |||
139 | 143 | ||
140 | /* | 144 | /* |
141 | * Ops list | 145 | * Ops list |
@@ -144,11 +148,11 @@ static DEFINE_SPINLOCK(appldata_ops_lock); | |||
144 | static LIST_HEAD(appldata_ops_list); | 148 | static LIST_HEAD(appldata_ops_list); |
145 | 149 | ||
146 | 150 | ||
147 | /************************* timer, tasklet, DIAG ******************************/ | 151 | /*************************** timer, work, DIAG *******************************/ |
148 | /* | 152 | /* |
149 | * appldata_timer_function() | 153 | * appldata_timer_function() |
150 | * | 154 | * |
151 | * schedule tasklet and reschedule timer | 155 | * schedule work and reschedule timer |
152 | */ | 156 | */ |
153 | static void appldata_timer_function(unsigned long data, struct pt_regs *regs) | 157 | static void appldata_timer_function(unsigned long data, struct pt_regs *regs) |
154 | { | 158 | { |
@@ -157,22 +161,22 @@ static void appldata_timer_function(unsigned long data, struct pt_regs *regs) | |||
157 | atomic_read(&appldata_expire_count)); | 161 | atomic_read(&appldata_expire_count)); |
158 | if (atomic_dec_and_test(&appldata_expire_count)) { | 162 | if (atomic_dec_and_test(&appldata_expire_count)) { |
159 | atomic_set(&appldata_expire_count, num_online_cpus()); | 163 | atomic_set(&appldata_expire_count, num_online_cpus()); |
160 | tasklet_schedule((struct tasklet_struct *) data); | 164 | queue_work(appldata_wq, (struct work_struct *) data); |
161 | } | 165 | } |
162 | } | 166 | } |
163 | 167 | ||
164 | /* | 168 | /* |
165 | * appldata_tasklet_function() | 169 | * appldata_work_fn() |
166 | * | 170 | * |
167 | * call data gathering function for each (active) module | 171 | * call data gathering function for each (active) module |
168 | */ | 172 | */ |
169 | static void appldata_tasklet_function(unsigned long data) | 173 | static void appldata_work_fn(void *data) |
170 | { | 174 | { |
171 | struct list_head *lh; | 175 | struct list_head *lh; |
172 | struct appldata_ops *ops; | 176 | struct appldata_ops *ops; |
173 | int i; | 177 | int i; |
174 | 178 | ||
175 | P_DEBUG(" -= Tasklet =-\n"); | 179 | P_DEBUG(" -= Work Queue =-\n"); |
176 | i = 0; | 180 | i = 0; |
177 | spin_lock(&appldata_ops_lock); | 181 | spin_lock(&appldata_ops_lock); |
178 | list_for_each(lh, &appldata_ops_list) { | 182 | list_for_each(lh, &appldata_ops_list) { |
@@ -231,7 +235,7 @@ static int appldata_diag(char record_nr, u16 function, unsigned long buffer, | |||
231 | : "=d" (ry) : "d" (&(appldata_parameter_list)) : "cc"); | 235 | : "=d" (ry) : "d" (&(appldata_parameter_list)) : "cc"); |
232 | return (int) ry; | 236 | return (int) ry; |
233 | } | 237 | } |
234 | /********************** timer, tasklet, DIAG <END> ***************************/ | 238 | /************************ timer, work, DIAG <END> ****************************/ |
235 | 239 | ||
236 | 240 | ||
237 | /****************************** /proc stuff **********************************/ | 241 | /****************************** /proc stuff **********************************/ |
@@ -411,7 +415,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, | |||
411 | struct list_head *lh; | 415 | struct list_head *lh; |
412 | 416 | ||
413 | found = 0; | 417 | found = 0; |
414 | spin_lock_bh(&appldata_ops_lock); | 418 | spin_lock(&appldata_ops_lock); |
415 | list_for_each(lh, &appldata_ops_list) { | 419 | list_for_each(lh, &appldata_ops_list) { |
416 | tmp_ops = list_entry(lh, struct appldata_ops, list); | 420 | tmp_ops = list_entry(lh, struct appldata_ops, list); |
417 | if (&tmp_ops->ctl_table[2] == ctl) { | 421 | if (&tmp_ops->ctl_table[2] == ctl) { |
@@ -419,15 +423,15 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, | |||
419 | } | 423 | } |
420 | } | 424 | } |
421 | if (!found) { | 425 | if (!found) { |
422 | spin_unlock_bh(&appldata_ops_lock); | 426 | spin_unlock(&appldata_ops_lock); |
423 | return -ENODEV; | 427 | return -ENODEV; |
424 | } | 428 | } |
425 | ops = ctl->data; | 429 | ops = ctl->data; |
426 | if (!try_module_get(ops->owner)) { // protect this function | 430 | if (!try_module_get(ops->owner)) { // protect this function |
427 | spin_unlock_bh(&appldata_ops_lock); | 431 | spin_unlock(&appldata_ops_lock); |
428 | return -ENODEV; | 432 | return -ENODEV; |
429 | } | 433 | } |
430 | spin_unlock_bh(&appldata_ops_lock); | 434 | spin_unlock(&appldata_ops_lock); |
431 | 435 | ||
432 | if (!*lenp || *ppos) { | 436 | if (!*lenp || *ppos) { |
433 | *lenp = 0; | 437 | *lenp = 0; |
@@ -451,10 +455,11 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, | |||
451 | return -EFAULT; | 455 | return -EFAULT; |
452 | } | 456 | } |
453 | 457 | ||
454 | spin_lock_bh(&appldata_ops_lock); | 458 | spin_lock(&appldata_ops_lock); |
455 | if ((buf[0] == '1') && (ops->active == 0)) { | 459 | if ((buf[0] == '1') && (ops->active == 0)) { |
456 | if (!try_module_get(ops->owner)) { // protect tasklet | 460 | // protect work queue callback |
457 | spin_unlock_bh(&appldata_ops_lock); | 461 | if (!try_module_get(ops->owner)) { |
462 | spin_unlock(&appldata_ops_lock); | ||
458 | module_put(ops->owner); | 463 | module_put(ops->owner); |
459 | return -ENODEV; | 464 | return -ENODEV; |
460 | } | 465 | } |
@@ -485,7 +490,7 @@ appldata_generic_handler(ctl_table *ctl, int write, struct file *filp, | |||
485 | } | 490 | } |
486 | module_put(ops->owner); | 491 | module_put(ops->owner); |
487 | } | 492 | } |
488 | spin_unlock_bh(&appldata_ops_lock); | 493 | spin_unlock(&appldata_ops_lock); |
489 | out: | 494 | out: |
490 | *lenp = len; | 495 | *lenp = len; |
491 | *ppos += len; | 496 | *ppos += len; |
@@ -529,7 +534,7 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
529 | } | 534 | } |
530 | memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table)); | 535 | memset(ops->ctl_table, 0, 4*sizeof(struct ctl_table)); |
531 | 536 | ||
532 | spin_lock_bh(&appldata_ops_lock); | 537 | spin_lock(&appldata_ops_lock); |
533 | list_for_each(lh, &appldata_ops_list) { | 538 | list_for_each(lh, &appldata_ops_list) { |
534 | tmp_ops = list_entry(lh, struct appldata_ops, list); | 539 | tmp_ops = list_entry(lh, struct appldata_ops, list); |
535 | P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n", | 540 | P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n", |
@@ -541,18 +546,18 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
541 | APPLDATA_PROC_NAME_LENGTH) == 0) { | 546 | APPLDATA_PROC_NAME_LENGTH) == 0) { |
542 | P_ERROR("Name \"%s\" already registered!\n", ops->name); | 547 | P_ERROR("Name \"%s\" already registered!\n", ops->name); |
543 | kfree(ops->ctl_table); | 548 | kfree(ops->ctl_table); |
544 | spin_unlock_bh(&appldata_ops_lock); | 549 | spin_unlock(&appldata_ops_lock); |
545 | return -EBUSY; | 550 | return -EBUSY; |
546 | } | 551 | } |
547 | if (tmp_ops->ctl_nr == ops->ctl_nr) { | 552 | if (tmp_ops->ctl_nr == ops->ctl_nr) { |
548 | P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr); | 553 | P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr); |
549 | kfree(ops->ctl_table); | 554 | kfree(ops->ctl_table); |
550 | spin_unlock_bh(&appldata_ops_lock); | 555 | spin_unlock(&appldata_ops_lock); |
551 | return -EBUSY; | 556 | return -EBUSY; |
552 | } | 557 | } |
553 | } | 558 | } |
554 | list_add(&ops->list, &appldata_ops_list); | 559 | list_add(&ops->list, &appldata_ops_list); |
555 | spin_unlock_bh(&appldata_ops_lock); | 560 | spin_unlock(&appldata_ops_lock); |
556 | 561 | ||
557 | ops->ctl_table[0].ctl_name = CTL_APPLDATA; | 562 | ops->ctl_table[0].ctl_name = CTL_APPLDATA; |
558 | ops->ctl_table[0].procname = appldata_proc_name; | 563 | ops->ctl_table[0].procname = appldata_proc_name; |
@@ -583,12 +588,12 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
583 | */ | 588 | */ |
584 | void appldata_unregister_ops(struct appldata_ops *ops) | 589 | void appldata_unregister_ops(struct appldata_ops *ops) |
585 | { | 590 | { |
586 | spin_lock_bh(&appldata_ops_lock); | 591 | spin_lock(&appldata_ops_lock); |
587 | unregister_sysctl_table(ops->sysctl_header); | 592 | unregister_sysctl_table(ops->sysctl_header); |
588 | list_del(&ops->list); | 593 | list_del(&ops->list); |
589 | kfree(ops->ctl_table); | 594 | kfree(ops->ctl_table); |
590 | ops->ctl_table = NULL; | 595 | ops->ctl_table = NULL; |
591 | spin_unlock_bh(&appldata_ops_lock); | 596 | spin_unlock(&appldata_ops_lock); |
592 | P_INFO("%s-ops unregistered!\n", ops->name); | 597 | P_INFO("%s-ops unregistered!\n", ops->name); |
593 | } | 598 | } |
594 | /********************** module-ops management <END> **************************/ | 599 | /********************** module-ops management <END> **************************/ |
@@ -602,7 +607,7 @@ appldata_online_cpu(int cpu) | |||
602 | init_virt_timer(&per_cpu(appldata_timer, cpu)); | 607 | init_virt_timer(&per_cpu(appldata_timer, cpu)); |
603 | per_cpu(appldata_timer, cpu).function = appldata_timer_function; | 608 | per_cpu(appldata_timer, cpu).function = appldata_timer_function; |
604 | per_cpu(appldata_timer, cpu).data = (unsigned long) | 609 | per_cpu(appldata_timer, cpu).data = (unsigned long) |
605 | &appldata_tasklet_struct; | 610 | &appldata_work; |
606 | atomic_inc(&appldata_expire_count); | 611 | atomic_inc(&appldata_expire_count); |
607 | spin_lock(&appldata_timer_lock); | 612 | spin_lock(&appldata_timer_lock); |
608 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); | 613 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); |
@@ -615,7 +620,7 @@ appldata_offline_cpu(int cpu) | |||
615 | del_virt_timer(&per_cpu(appldata_timer, cpu)); | 620 | del_virt_timer(&per_cpu(appldata_timer, cpu)); |
616 | if (atomic_dec_and_test(&appldata_expire_count)) { | 621 | if (atomic_dec_and_test(&appldata_expire_count)) { |
617 | atomic_set(&appldata_expire_count, num_online_cpus()); | 622 | atomic_set(&appldata_expire_count, num_online_cpus()); |
618 | tasklet_schedule(&appldata_tasklet_struct); | 623 | queue_work(appldata_wq, &appldata_work); |
619 | } | 624 | } |
620 | spin_lock(&appldata_timer_lock); | 625 | spin_lock(&appldata_timer_lock); |
621 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); | 626 | __appldata_vtimer_setup(APPLDATA_MOD_TIMER); |
@@ -648,7 +653,7 @@ static struct notifier_block __devinitdata appldata_nb = { | |||
648 | /* | 653 | /* |
649 | * appldata_init() | 654 | * appldata_init() |
650 | * | 655 | * |
651 | * init timer and tasklet, register /proc entries | 656 | * init timer, register /proc entries |
652 | */ | 657 | */ |
653 | static int __init appldata_init(void) | 658 | static int __init appldata_init(void) |
654 | { | 659 | { |
@@ -657,6 +662,12 @@ static int __init appldata_init(void) | |||
657 | P_DEBUG("sizeof(parameter_list) = %lu\n", | 662 | P_DEBUG("sizeof(parameter_list) = %lu\n", |
658 | sizeof(struct appldata_parameter_list)); | 663 | sizeof(struct appldata_parameter_list)); |
659 | 664 | ||
665 | appldata_wq = create_singlethread_workqueue("appldata"); | ||
666 | if (!appldata_wq) { | ||
667 | P_ERROR("Could not create work queue\n"); | ||
668 | return -ENOMEM; | ||
669 | } | ||
670 | |||
660 | for_each_online_cpu(i) | 671 | for_each_online_cpu(i) |
661 | appldata_online_cpu(i); | 672 | appldata_online_cpu(i); |
662 | 673 | ||
@@ -670,7 +681,6 @@ static int __init appldata_init(void) | |||
670 | appldata_table[1].de->owner = THIS_MODULE; | 681 | appldata_table[1].de->owner = THIS_MODULE; |
671 | #endif | 682 | #endif |
672 | 683 | ||
673 | tasklet_init(&appldata_tasklet_struct, appldata_tasklet_function, 0); | ||
674 | P_DEBUG("Base interface initialized.\n"); | 684 | P_DEBUG("Base interface initialized.\n"); |
675 | return 0; | 685 | return 0; |
676 | } | 686 | } |
@@ -678,7 +688,7 @@ static int __init appldata_init(void) | |||
678 | /* | 688 | /* |
679 | * appldata_exit() | 689 | * appldata_exit() |
680 | * | 690 | * |
681 | * stop timer and tasklet, unregister /proc entries | 691 | * stop timer, unregister /proc entries |
682 | */ | 692 | */ |
683 | static void __exit appldata_exit(void) | 693 | static void __exit appldata_exit(void) |
684 | { | 694 | { |
@@ -690,7 +700,7 @@ static void __exit appldata_exit(void) | |||
690 | /* | 700 | /* |
691 | * ops list should be empty, but just in case something went wrong... | 701 | * ops list should be empty, but just in case something went wrong... |
692 | */ | 702 | */ |
693 | spin_lock_bh(&appldata_ops_lock); | 703 | spin_lock(&appldata_ops_lock); |
694 | list_for_each(lh, &appldata_ops_list) { | 704 | list_for_each(lh, &appldata_ops_list) { |
695 | ops = list_entry(lh, struct appldata_ops, list); | 705 | ops = list_entry(lh, struct appldata_ops, list); |
696 | rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC, | 706 | rc = appldata_diag(ops->record_nr, APPLDATA_STOP_REC, |
@@ -700,7 +710,7 @@ static void __exit appldata_exit(void) | |||
700 | "return code: %d\n", ops->name, rc); | 710 | "return code: %d\n", ops->name, rc); |
701 | } | 711 | } |
702 | } | 712 | } |
703 | spin_unlock_bh(&appldata_ops_lock); | 713 | spin_unlock(&appldata_ops_lock); |
704 | 714 | ||
705 | for_each_online_cpu(i) | 715 | for_each_online_cpu(i) |
706 | appldata_offline_cpu(i); | 716 | appldata_offline_cpu(i); |
@@ -709,7 +719,7 @@ static void __exit appldata_exit(void) | |||
709 | 719 | ||
710 | unregister_sysctl_table(appldata_sysctl_header); | 720 | unregister_sysctl_table(appldata_sysctl_header); |
711 | 721 | ||
712 | tasklet_kill(&appldata_tasklet_struct); | 722 | destroy_workqueue(appldata_wq); |
713 | P_DEBUG("... module unloaded!\n"); | 723 | P_DEBUG("... module unloaded!\n"); |
714 | } | 724 | } |
715 | /**************************** init / exit <END> ******************************/ | 725 | /**************************** init / exit <END> ******************************/ |
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c index 462ee9a84e76..f0e2fbed3d4c 100644 --- a/arch/s390/appldata/appldata_mem.c +++ b/arch/s390/appldata/appldata_mem.c | |||
@@ -68,7 +68,7 @@ struct appldata_mem_data { | |||
68 | u64 pgmajfault; /* page faults (major only) */ | 68 | u64 pgmajfault; /* page faults (major only) */ |
69 | // <-- New in 2.6 | 69 | // <-- New in 2.6 |
70 | 70 | ||
71 | } appldata_mem_data; | 71 | } __attribute__((packed)) appldata_mem_data; |
72 | 72 | ||
73 | 73 | ||
74 | static inline void appldata_debug_print(struct appldata_mem_data *mem_data) | 74 | static inline void appldata_debug_print(struct appldata_mem_data *mem_data) |
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c index dd61638d3027..2a4c7432db4a 100644 --- a/arch/s390/appldata/appldata_net_sum.c +++ b/arch/s390/appldata/appldata_net_sum.c | |||
@@ -57,7 +57,7 @@ struct appldata_net_sum_data { | |||
57 | u64 rx_dropped; /* no space in linux buffers */ | 57 | u64 rx_dropped; /* no space in linux buffers */ |
58 | u64 tx_dropped; /* no space available in linux */ | 58 | u64 tx_dropped; /* no space available in linux */ |
59 | u64 collisions; /* collisions while transmitting */ | 59 | u64 collisions; /* collisions while transmitting */ |
60 | } appldata_net_sum_data; | 60 | } __attribute__((packed)) appldata_net_sum_data; |
61 | 61 | ||
62 | 62 | ||
63 | static inline void appldata_print_debug(struct appldata_net_sum_data *net_data) | 63 | static inline void appldata_print_debug(struct appldata_net_sum_data *net_data) |
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c index b83f07484551..e0a476bf4fd6 100644 --- a/arch/s390/appldata/appldata_os.c +++ b/arch/s390/appldata/appldata_os.c | |||
@@ -49,7 +49,7 @@ struct appldata_os_per_cpu { | |||
49 | u32 per_cpu_softirq; /* ... spent in softirqs */ | 49 | u32 per_cpu_softirq; /* ... spent in softirqs */ |
50 | u32 per_cpu_iowait; /* ... spent while waiting for I/O */ | 50 | u32 per_cpu_iowait; /* ... spent while waiting for I/O */ |
51 | // <-- New in 2.6 | 51 | // <-- New in 2.6 |
52 | }; | 52 | } __attribute__((packed)); |
53 | 53 | ||
54 | struct appldata_os_data { | 54 | struct appldata_os_data { |
55 | u64 timestamp; | 55 | u64 timestamp; |
@@ -75,7 +75,7 @@ struct appldata_os_data { | |||
75 | 75 | ||
76 | /* per cpu data */ | 76 | /* per cpu data */ |
77 | struct appldata_os_per_cpu os_cpu[0]; | 77 | struct appldata_os_per_cpu os_cpu[0]; |
78 | }; | 78 | } __attribute__((packed)); |
79 | 79 | ||
80 | static struct appldata_os_data *appldata_os_data; | 80 | static struct appldata_os_data *appldata_os_data; |
81 | 81 | ||
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 26889366929a..06afa3103ace 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <asm/pgalloc.h> | 40 | #include <asm/pgalloc.h> |
41 | #include <asm/system.h> | 41 | #include <asm/system.h> |
42 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
43 | #include <asm/unistd.h> | ||
43 | 44 | ||
44 | #ifdef CONFIG_S390_SUPPORT | 45 | #ifdef CONFIG_S390_SUPPORT |
45 | #include "compat_ptrace.h" | 46 | #include "compat_ptrace.h" |
@@ -130,13 +131,19 @@ static int | |||
130 | peek_user(struct task_struct *child, addr_t addr, addr_t data) | 131 | peek_user(struct task_struct *child, addr_t addr, addr_t data) |
131 | { | 132 | { |
132 | struct user *dummy = NULL; | 133 | struct user *dummy = NULL; |
133 | addr_t offset, tmp; | 134 | addr_t offset, tmp, mask; |
134 | 135 | ||
135 | /* | 136 | /* |
136 | * Stupid gdb peeks/pokes the access registers in 64 bit with | 137 | * Stupid gdb peeks/pokes the access registers in 64 bit with |
137 | * an alignment of 4. Programmers from hell... | 138 | * an alignment of 4. Programmers from hell... |
138 | */ | 139 | */ |
139 | if ((addr & 3) || addr > sizeof(struct user) - __ADDR_MASK) | 140 | mask = __ADDR_MASK; |
141 | #ifdef CONFIG_ARCH_S390X | ||
142 | if (addr >= (addr_t) &dummy->regs.acrs && | ||
143 | addr < (addr_t) &dummy->regs.orig_gpr2) | ||
144 | mask = 3; | ||
145 | #endif | ||
146 | if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) | ||
140 | return -EIO; | 147 | return -EIO; |
141 | 148 | ||
142 | if (addr < (addr_t) &dummy->regs.acrs) { | 149 | if (addr < (addr_t) &dummy->regs.acrs) { |
@@ -153,6 +160,16 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data) | |||
153 | * access registers are stored in the thread structure | 160 | * access registers are stored in the thread structure |
154 | */ | 161 | */ |
155 | offset = addr - (addr_t) &dummy->regs.acrs; | 162 | offset = addr - (addr_t) &dummy->regs.acrs; |
163 | #ifdef CONFIG_ARCH_S390X | ||
164 | /* | ||
165 | * Very special case: old & broken 64 bit gdb reading | ||
166 | * from acrs[15]. Result is a 64 bit value. Read the | ||
167 | * 32 bit acrs[15] value and shift it by 32. Sick... | ||
168 | */ | ||
169 | if (addr == (addr_t) &dummy->regs.acrs[15]) | ||
170 | tmp = ((unsigned long) child->thread.acrs[15]) << 32; | ||
171 | else | ||
172 | #endif | ||
156 | tmp = *(addr_t *)((addr_t) &child->thread.acrs + offset); | 173 | tmp = *(addr_t *)((addr_t) &child->thread.acrs + offset); |
157 | 174 | ||
158 | } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { | 175 | } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { |
@@ -167,6 +184,9 @@ peek_user(struct task_struct *child, addr_t addr, addr_t data) | |||
167 | */ | 184 | */ |
168 | offset = addr - (addr_t) &dummy->regs.fp_regs; | 185 | offset = addr - (addr_t) &dummy->regs.fp_regs; |
169 | tmp = *(addr_t *)((addr_t) &child->thread.fp_regs + offset); | 186 | tmp = *(addr_t *)((addr_t) &child->thread.fp_regs + offset); |
187 | if (addr == (addr_t) &dummy->regs.fp_regs.fpc) | ||
188 | tmp &= (unsigned long) FPC_VALID_MASK | ||
189 | << (BITS_PER_LONG - 32); | ||
170 | 190 | ||
171 | } else if (addr < (addr_t) (&dummy->regs.per_info + 1)) { | 191 | } else if (addr < (addr_t) (&dummy->regs.per_info + 1)) { |
172 | /* | 192 | /* |
@@ -191,13 +211,19 @@ static int | |||
191 | poke_user(struct task_struct *child, addr_t addr, addr_t data) | 211 | poke_user(struct task_struct *child, addr_t addr, addr_t data) |
192 | { | 212 | { |
193 | struct user *dummy = NULL; | 213 | struct user *dummy = NULL; |
194 | addr_t offset; | 214 | addr_t offset, mask; |
195 | 215 | ||
196 | /* | 216 | /* |
197 | * Stupid gdb peeks/pokes the access registers in 64 bit with | 217 | * Stupid gdb peeks/pokes the access registers in 64 bit with |
198 | * an alignment of 4. Programmers from hell indeed... | 218 | * an alignment of 4. Programmers from hell indeed... |
199 | */ | 219 | */ |
200 | if ((addr & 3) || addr > sizeof(struct user) - __ADDR_MASK) | 220 | mask = __ADDR_MASK; |
221 | #ifdef CONFIG_ARCH_S390X | ||
222 | if (addr >= (addr_t) &dummy->regs.acrs && | ||
223 | addr < (addr_t) &dummy->regs.orig_gpr2) | ||
224 | mask = 3; | ||
225 | #endif | ||
226 | if ((addr & mask) || addr > sizeof(struct user) - __ADDR_MASK) | ||
201 | return -EIO; | 227 | return -EIO; |
202 | 228 | ||
203 | if (addr < (addr_t) &dummy->regs.acrs) { | 229 | if (addr < (addr_t) &dummy->regs.acrs) { |
@@ -224,6 +250,17 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
224 | * access registers are stored in the thread structure | 250 | * access registers are stored in the thread structure |
225 | */ | 251 | */ |
226 | offset = addr - (addr_t) &dummy->regs.acrs; | 252 | offset = addr - (addr_t) &dummy->regs.acrs; |
253 | #ifdef CONFIG_ARCH_S390X | ||
254 | /* | ||
255 | * Very special case: old & broken 64 bit gdb writing | ||
256 | * to acrs[15] with a 64 bit value. Ignore the lower | ||
257 | * half of the value and write the upper 32 bit to | ||
258 | * acrs[15]. Sick... | ||
259 | */ | ||
260 | if (addr == (addr_t) &dummy->regs.acrs[15]) | ||
261 | child->thread.acrs[15] = (unsigned int) (data >> 32); | ||
262 | else | ||
263 | #endif | ||
227 | *(addr_t *)((addr_t) &child->thread.acrs + offset) = data; | 264 | *(addr_t *)((addr_t) &child->thread.acrs + offset) = data; |
228 | 265 | ||
229 | } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { | 266 | } else if (addr == (addr_t) &dummy->regs.orig_gpr2) { |
@@ -237,7 +274,8 @@ poke_user(struct task_struct *child, addr_t addr, addr_t data) | |||
237 | * floating point regs. are stored in the thread structure | 274 | * floating point regs. are stored in the thread structure |
238 | */ | 275 | */ |
239 | if (addr == (addr_t) &dummy->regs.fp_regs.fpc && | 276 | if (addr == (addr_t) &dummy->regs.fp_regs.fpc && |
240 | (data & ~FPC_VALID_MASK) != 0) | 277 | (data & ~((unsigned long) FPC_VALID_MASK |
278 | << (BITS_PER_LONG - 32))) != 0) | ||
241 | return -EINVAL; | 279 | return -EINVAL; |
242 | offset = addr - (addr_t) &dummy->regs.fp_regs; | 280 | offset = addr - (addr_t) &dummy->regs.fp_regs; |
243 | *(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data; | 281 | *(addr_t *)((addr_t) &child->thread.fp_regs + offset) = data; |
@@ -723,6 +761,13 @@ syscall_trace(struct pt_regs *regs, int entryexit) | |||
723 | ? 0x80 : 0)); | 761 | ? 0x80 : 0)); |
724 | 762 | ||
725 | /* | 763 | /* |
764 | * If the debuffer has set an invalid system call number, | ||
765 | * we prepare to skip the system call restart handling. | ||
766 | */ | ||
767 | if (!entryexit && regs->gprs[2] >= NR_syscalls) | ||
768 | regs->trap = -1; | ||
769 | |||
770 | /* | ||
726 | * this isn't the same as continuing with a signal, but it will do | 771 | * this isn't the same as continuing with a signal, but it will do |
727 | * for normal use. strace only continues with a signal if the | 772 | * for normal use. strace only continues with a signal if the |
728 | * stopping signal is not SIGTRAP. -brl | 773 | * stopping signal is not SIGTRAP. -brl |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 80306bc8c799..75fde949d125 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -207,7 +207,7 @@ do_exception(struct pt_regs *regs, unsigned long error_code, int is_protection) | |||
207 | * we are not in an interrupt and that there is a | 207 | * we are not in an interrupt and that there is a |
208 | * user context. | 208 | * user context. |
209 | */ | 209 | */ |
210 | if (user_address == 0 || in_interrupt() || !mm) | 210 | if (user_address == 0 || in_atomic() || !mm) |
211 | goto no_context; | 211 | goto no_context; |
212 | 212 | ||
213 | /* | 213 | /* |
diff --git a/arch/sparc64/kernel/pci_iommu.c b/arch/sparc64/kernel/pci_iommu.c index 33ca56c90da2..2803bc7c2c79 100644 --- a/arch/sparc64/kernel/pci_iommu.c +++ b/arch/sparc64/kernel/pci_iommu.c | |||
@@ -196,6 +196,34 @@ static iopte_t *alloc_consistent_cluster(struct pci_iommu *iommu, unsigned long | |||
196 | return NULL; | 196 | return NULL; |
197 | } | 197 | } |
198 | 198 | ||
199 | static int iommu_alloc_ctx(struct pci_iommu *iommu) | ||
200 | { | ||
201 | int lowest = iommu->ctx_lowest_free; | ||
202 | int sz = IOMMU_NUM_CTXS - lowest; | ||
203 | int n = find_next_zero_bit(iommu->ctx_bitmap, sz, lowest); | ||
204 | |||
205 | if (unlikely(n == sz)) { | ||
206 | n = find_next_zero_bit(iommu->ctx_bitmap, lowest, 1); | ||
207 | if (unlikely(n == lowest)) { | ||
208 | printk(KERN_WARNING "IOMMU: Ran out of contexts.\n"); | ||
209 | n = 0; | ||
210 | } | ||
211 | } | ||
212 | if (n) | ||
213 | __set_bit(n, iommu->ctx_bitmap); | ||
214 | |||
215 | return n; | ||
216 | } | ||
217 | |||
218 | static inline void iommu_free_ctx(struct pci_iommu *iommu, int ctx) | ||
219 | { | ||
220 | if (likely(ctx)) { | ||
221 | __clear_bit(ctx, iommu->ctx_bitmap); | ||
222 | if (ctx < iommu->ctx_lowest_free) | ||
223 | iommu->ctx_lowest_free = ctx; | ||
224 | } | ||
225 | } | ||
226 | |||
199 | /* Allocate and map kernel buffer of size SIZE using consistent mode | 227 | /* Allocate and map kernel buffer of size SIZE using consistent mode |
200 | * DMA for PCI device PDEV. Return non-NULL cpu-side address if | 228 | * DMA for PCI device PDEV. Return non-NULL cpu-side address if |
201 | * successful and set *DMA_ADDRP to the PCI side dma address. | 229 | * successful and set *DMA_ADDRP to the PCI side dma address. |
@@ -236,7 +264,7 @@ void *pci_alloc_consistent(struct pci_dev *pdev, size_t size, dma_addr_t *dma_ad | |||
236 | npages = size >> IO_PAGE_SHIFT; | 264 | npages = size >> IO_PAGE_SHIFT; |
237 | ctx = 0; | 265 | ctx = 0; |
238 | if (iommu->iommu_ctxflush) | 266 | if (iommu->iommu_ctxflush) |
239 | ctx = iommu->iommu_cur_ctx++; | 267 | ctx = iommu_alloc_ctx(iommu); |
240 | first_page = __pa(first_page); | 268 | first_page = __pa(first_page); |
241 | while (npages--) { | 269 | while (npages--) { |
242 | iopte_val(*iopte) = (IOPTE_CONSISTENT(ctx) | | 270 | iopte_val(*iopte) = (IOPTE_CONSISTENT(ctx) | |
@@ -317,6 +345,8 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_ | |||
317 | } | 345 | } |
318 | } | 346 | } |
319 | 347 | ||
348 | iommu_free_ctx(iommu, ctx); | ||
349 | |||
320 | spin_unlock_irqrestore(&iommu->lock, flags); | 350 | spin_unlock_irqrestore(&iommu->lock, flags); |
321 | 351 | ||
322 | order = get_order(size); | 352 | order = get_order(size); |
@@ -360,7 +390,7 @@ dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direct | |||
360 | base_paddr = __pa(oaddr & IO_PAGE_MASK); | 390 | base_paddr = __pa(oaddr & IO_PAGE_MASK); |
361 | ctx = 0; | 391 | ctx = 0; |
362 | if (iommu->iommu_ctxflush) | 392 | if (iommu->iommu_ctxflush) |
363 | ctx = iommu->iommu_cur_ctx++; | 393 | ctx = iommu_alloc_ctx(iommu); |
364 | if (strbuf->strbuf_enabled) | 394 | if (strbuf->strbuf_enabled) |
365 | iopte_protection = IOPTE_STREAMING(ctx); | 395 | iopte_protection = IOPTE_STREAMING(ctx); |
366 | else | 396 | else |
@@ -380,39 +410,53 @@ bad: | |||
380 | return PCI_DMA_ERROR_CODE; | 410 | return PCI_DMA_ERROR_CODE; |
381 | } | 411 | } |
382 | 412 | ||
383 | static void pci_strbuf_flush(struct pci_strbuf *strbuf, struct pci_iommu *iommu, u32 vaddr, unsigned long ctx, unsigned long npages) | 413 | static void pci_strbuf_flush(struct pci_strbuf *strbuf, struct pci_iommu *iommu, u32 vaddr, unsigned long ctx, unsigned long npages, int direction) |
384 | { | 414 | { |
385 | int limit; | 415 | int limit; |
386 | 416 | ||
387 | PCI_STC_FLUSHFLAG_INIT(strbuf); | ||
388 | if (strbuf->strbuf_ctxflush && | 417 | if (strbuf->strbuf_ctxflush && |
389 | iommu->iommu_ctxflush) { | 418 | iommu->iommu_ctxflush) { |
390 | unsigned long matchreg, flushreg; | 419 | unsigned long matchreg, flushreg; |
420 | u64 val; | ||
391 | 421 | ||
392 | flushreg = strbuf->strbuf_ctxflush; | 422 | flushreg = strbuf->strbuf_ctxflush; |
393 | matchreg = PCI_STC_CTXMATCH_ADDR(strbuf, ctx); | 423 | matchreg = PCI_STC_CTXMATCH_ADDR(strbuf, ctx); |
394 | 424 | ||
395 | limit = 100000; | ||
396 | pci_iommu_write(flushreg, ctx); | 425 | pci_iommu_write(flushreg, ctx); |
397 | for(;;) { | 426 | val = pci_iommu_read(matchreg); |
398 | if (((long)pci_iommu_read(matchreg)) >= 0L) | 427 | val &= 0xffff; |
399 | break; | 428 | if (!val) |
400 | limit--; | 429 | goto do_flush_sync; |
401 | if (!limit) | 430 | |
402 | break; | 431 | while (val) { |
403 | udelay(1); | 432 | if (val & 0x1) |
433 | pci_iommu_write(flushreg, ctx); | ||
434 | val >>= 1; | ||
404 | } | 435 | } |
405 | if (!limit) | 436 | val = pci_iommu_read(matchreg); |
437 | if (unlikely(val)) { | ||
406 | printk(KERN_WARNING "pci_strbuf_flush: ctx flush " | 438 | printk(KERN_WARNING "pci_strbuf_flush: ctx flush " |
407 | "timeout vaddr[%08x] ctx[%lx]\n", | 439 | "timeout matchreg[%lx] ctx[%lx]\n", |
408 | vaddr, ctx); | 440 | val, ctx); |
441 | goto do_page_flush; | ||
442 | } | ||
409 | } else { | 443 | } else { |
410 | unsigned long i; | 444 | unsigned long i; |
411 | 445 | ||
446 | do_page_flush: | ||
412 | for (i = 0; i < npages; i++, vaddr += IO_PAGE_SIZE) | 447 | for (i = 0; i < npages; i++, vaddr += IO_PAGE_SIZE) |
413 | pci_iommu_write(strbuf->strbuf_pflush, vaddr); | 448 | pci_iommu_write(strbuf->strbuf_pflush, vaddr); |
414 | } | 449 | } |
415 | 450 | ||
451 | do_flush_sync: | ||
452 | /* If the device could not have possibly put dirty data into | ||
453 | * the streaming cache, no flush-flag synchronization needs | ||
454 | * to be performed. | ||
455 | */ | ||
456 | if (direction == PCI_DMA_TODEVICE) | ||
457 | return; | ||
458 | |||
459 | PCI_STC_FLUSHFLAG_INIT(strbuf); | ||
416 | pci_iommu_write(strbuf->strbuf_fsync, strbuf->strbuf_flushflag_pa); | 460 | pci_iommu_write(strbuf->strbuf_fsync, strbuf->strbuf_flushflag_pa); |
417 | (void) pci_iommu_read(iommu->write_complete_reg); | 461 | (void) pci_iommu_read(iommu->write_complete_reg); |
418 | 462 | ||
@@ -466,7 +510,7 @@ void pci_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int | |||
466 | 510 | ||
467 | /* Step 1: Kick data out of streaming buffers if necessary. */ | 511 | /* Step 1: Kick data out of streaming buffers if necessary. */ |
468 | if (strbuf->strbuf_enabled) | 512 | if (strbuf->strbuf_enabled) |
469 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages); | 513 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); |
470 | 514 | ||
471 | /* Step 2: Clear out first TSB entry. */ | 515 | /* Step 2: Clear out first TSB entry. */ |
472 | iopte_make_dummy(iommu, base); | 516 | iopte_make_dummy(iommu, base); |
@@ -474,6 +518,8 @@ void pci_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int | |||
474 | free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, | 518 | free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, |
475 | npages, ctx); | 519 | npages, ctx); |
476 | 520 | ||
521 | iommu_free_ctx(iommu, ctx); | ||
522 | |||
477 | spin_unlock_irqrestore(&iommu->lock, flags); | 523 | spin_unlock_irqrestore(&iommu->lock, flags); |
478 | } | 524 | } |
479 | 525 | ||
@@ -613,7 +659,7 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int | |||
613 | /* Step 4: Choose a context if necessary. */ | 659 | /* Step 4: Choose a context if necessary. */ |
614 | ctx = 0; | 660 | ctx = 0; |
615 | if (iommu->iommu_ctxflush) | 661 | if (iommu->iommu_ctxflush) |
616 | ctx = iommu->iommu_cur_ctx++; | 662 | ctx = iommu_alloc_ctx(iommu); |
617 | 663 | ||
618 | /* Step 5: Create the mappings. */ | 664 | /* Step 5: Create the mappings. */ |
619 | if (strbuf->strbuf_enabled) | 665 | if (strbuf->strbuf_enabled) |
@@ -678,7 +724,7 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, | |||
678 | 724 | ||
679 | /* Step 1: Kick data out of streaming buffers if necessary. */ | 725 | /* Step 1: Kick data out of streaming buffers if necessary. */ |
680 | if (strbuf->strbuf_enabled) | 726 | if (strbuf->strbuf_enabled) |
681 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages); | 727 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); |
682 | 728 | ||
683 | /* Step 2: Clear out first TSB entry. */ | 729 | /* Step 2: Clear out first TSB entry. */ |
684 | iopte_make_dummy(iommu, base); | 730 | iopte_make_dummy(iommu, base); |
@@ -686,6 +732,8 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, | |||
686 | free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, | 732 | free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, |
687 | npages, ctx); | 733 | npages, ctx); |
688 | 734 | ||
735 | iommu_free_ctx(iommu, ctx); | ||
736 | |||
689 | spin_unlock_irqrestore(&iommu->lock, flags); | 737 | spin_unlock_irqrestore(&iommu->lock, flags); |
690 | } | 738 | } |
691 | 739 | ||
@@ -724,7 +772,7 @@ void pci_dma_sync_single_for_cpu(struct pci_dev *pdev, dma_addr_t bus_addr, size | |||
724 | } | 772 | } |
725 | 773 | ||
726 | /* Step 2: Kick data out of streaming buffers. */ | 774 | /* Step 2: Kick data out of streaming buffers. */ |
727 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages); | 775 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); |
728 | 776 | ||
729 | spin_unlock_irqrestore(&iommu->lock, flags); | 777 | spin_unlock_irqrestore(&iommu->lock, flags); |
730 | } | 778 | } |
@@ -768,7 +816,7 @@ void pci_dma_sync_sg_for_cpu(struct pci_dev *pdev, struct scatterlist *sglist, i | |||
768 | i--; | 816 | i--; |
769 | npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length) | 817 | npages = (IO_PAGE_ALIGN(sglist[i].dma_address + sglist[i].dma_length) |
770 | - bus_addr) >> IO_PAGE_SHIFT; | 818 | - bus_addr) >> IO_PAGE_SHIFT; |
771 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages); | 819 | pci_strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); |
772 | 820 | ||
773 | spin_unlock_irqrestore(&iommu->lock, flags); | 821 | spin_unlock_irqrestore(&iommu->lock, flags); |
774 | } | 822 | } |
diff --git a/arch/sparc64/kernel/pci_psycho.c b/arch/sparc64/kernel/pci_psycho.c index 3567fa879e1f..534320ef0db2 100644 --- a/arch/sparc64/kernel/pci_psycho.c +++ b/arch/sparc64/kernel/pci_psycho.c | |||
@@ -1212,7 +1212,7 @@ static void __init psycho_iommu_init(struct pci_controller_info *p) | |||
1212 | 1212 | ||
1213 | /* Setup initial software IOMMU state. */ | 1213 | /* Setup initial software IOMMU state. */ |
1214 | spin_lock_init(&iommu->lock); | 1214 | spin_lock_init(&iommu->lock); |
1215 | iommu->iommu_cur_ctx = 0; | 1215 | iommu->ctx_lowest_free = 1; |
1216 | 1216 | ||
1217 | /* Register addresses. */ | 1217 | /* Register addresses. */ |
1218 | iommu->iommu_control = p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL; | 1218 | iommu->iommu_control = p->pbm_A.controller_regs + PSYCHO_IOMMU_CONTROL; |
diff --git a/arch/sparc64/kernel/pci_sabre.c b/arch/sparc64/kernel/pci_sabre.c index 5525d1ec4af8..53d333b4a4e8 100644 --- a/arch/sparc64/kernel/pci_sabre.c +++ b/arch/sparc64/kernel/pci_sabre.c | |||
@@ -1265,7 +1265,7 @@ static void __init sabre_iommu_init(struct pci_controller_info *p, | |||
1265 | 1265 | ||
1266 | /* Setup initial software IOMMU state. */ | 1266 | /* Setup initial software IOMMU state. */ |
1267 | spin_lock_init(&iommu->lock); | 1267 | spin_lock_init(&iommu->lock); |
1268 | iommu->iommu_cur_ctx = 0; | 1268 | iommu->ctx_lowest_free = 1; |
1269 | 1269 | ||
1270 | /* Register addresses. */ | 1270 | /* Register addresses. */ |
1271 | iommu->iommu_control = p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL; | 1271 | iommu->iommu_control = p->pbm_A.controller_regs + SABRE_IOMMU_CONTROL; |
diff --git a/arch/sparc64/kernel/pci_schizo.c b/arch/sparc64/kernel/pci_schizo.c index e93fcadc3722..5753175b94e6 100644 --- a/arch/sparc64/kernel/pci_schizo.c +++ b/arch/sparc64/kernel/pci_schizo.c | |||
@@ -1753,7 +1753,7 @@ static void schizo_pbm_iommu_init(struct pci_pbm_info *pbm) | |||
1753 | 1753 | ||
1754 | /* Setup initial software IOMMU state. */ | 1754 | /* Setup initial software IOMMU state. */ |
1755 | spin_lock_init(&iommu->lock); | 1755 | spin_lock_init(&iommu->lock); |
1756 | iommu->iommu_cur_ctx = 0; | 1756 | iommu->ctx_lowest_free = 1; |
1757 | 1757 | ||
1758 | /* Register addresses, SCHIZO has iommu ctx flushing. */ | 1758 | /* Register addresses, SCHIZO has iommu ctx flushing. */ |
1759 | iommu->iommu_control = pbm->pbm_regs + SCHIZO_IOMMU_CONTROL; | 1759 | iommu->iommu_control = pbm->pbm_regs + SCHIZO_IOMMU_CONTROL; |
diff --git a/arch/sparc64/kernel/sbus.c b/arch/sparc64/kernel/sbus.c index 76ea6455433f..89f5e019f24c 100644 --- a/arch/sparc64/kernel/sbus.c +++ b/arch/sparc64/kernel/sbus.c | |||
@@ -117,17 +117,25 @@ static void iommu_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages | |||
117 | 117 | ||
118 | #define STRBUF_TAG_VALID 0x02UL | 118 | #define STRBUF_TAG_VALID 0x02UL |
119 | 119 | ||
120 | static void sbus_strbuf_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages) | 120 | static void sbus_strbuf_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages, int direction) |
121 | { | 121 | { |
122 | unsigned long n; | 122 | unsigned long n; |
123 | int limit; | 123 | int limit; |
124 | 124 | ||
125 | iommu->strbuf_flushflag = 0UL; | ||
126 | n = npages; | 125 | n = npages; |
127 | while (n--) | 126 | while (n--) |
128 | upa_writeq(base + (n << IO_PAGE_SHIFT), | 127 | upa_writeq(base + (n << IO_PAGE_SHIFT), |
129 | iommu->strbuf_regs + STRBUF_PFLUSH); | 128 | iommu->strbuf_regs + STRBUF_PFLUSH); |
130 | 129 | ||
130 | /* If the device could not have possibly put dirty data into | ||
131 | * the streaming cache, no flush-flag synchronization needs | ||
132 | * to be performed. | ||
133 | */ | ||
134 | if (direction == SBUS_DMA_TODEVICE) | ||
135 | return; | ||
136 | |||
137 | iommu->strbuf_flushflag = 0UL; | ||
138 | |||
131 | /* Whoopee cushion! */ | 139 | /* Whoopee cushion! */ |
132 | upa_writeq(__pa(&iommu->strbuf_flushflag), | 140 | upa_writeq(__pa(&iommu->strbuf_flushflag), |
133 | iommu->strbuf_regs + STRBUF_FSYNC); | 141 | iommu->strbuf_regs + STRBUF_FSYNC); |
@@ -421,7 +429,7 @@ void sbus_unmap_single(struct sbus_dev *sdev, dma_addr_t dma_addr, size_t size, | |||
421 | 429 | ||
422 | spin_lock_irqsave(&iommu->lock, flags); | 430 | spin_lock_irqsave(&iommu->lock, flags); |
423 | free_streaming_cluster(iommu, dma_base, size >> IO_PAGE_SHIFT); | 431 | free_streaming_cluster(iommu, dma_base, size >> IO_PAGE_SHIFT); |
424 | sbus_strbuf_flush(iommu, dma_base, size >> IO_PAGE_SHIFT); | 432 | sbus_strbuf_flush(iommu, dma_base, size >> IO_PAGE_SHIFT, direction); |
425 | spin_unlock_irqrestore(&iommu->lock, flags); | 433 | spin_unlock_irqrestore(&iommu->lock, flags); |
426 | } | 434 | } |
427 | 435 | ||
@@ -584,7 +592,7 @@ void sbus_unmap_sg(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int | |||
584 | iommu = sdev->bus->iommu; | 592 | iommu = sdev->bus->iommu; |
585 | spin_lock_irqsave(&iommu->lock, flags); | 593 | spin_lock_irqsave(&iommu->lock, flags); |
586 | free_streaming_cluster(iommu, dvma_base, size >> IO_PAGE_SHIFT); | 594 | free_streaming_cluster(iommu, dvma_base, size >> IO_PAGE_SHIFT); |
587 | sbus_strbuf_flush(iommu, dvma_base, size >> IO_PAGE_SHIFT); | 595 | sbus_strbuf_flush(iommu, dvma_base, size >> IO_PAGE_SHIFT, direction); |
588 | spin_unlock_irqrestore(&iommu->lock, flags); | 596 | spin_unlock_irqrestore(&iommu->lock, flags); |
589 | } | 597 | } |
590 | 598 | ||
@@ -596,7 +604,7 @@ void sbus_dma_sync_single_for_cpu(struct sbus_dev *sdev, dma_addr_t base, size_t | |||
596 | size = (IO_PAGE_ALIGN(base + size) - (base & IO_PAGE_MASK)); | 604 | size = (IO_PAGE_ALIGN(base + size) - (base & IO_PAGE_MASK)); |
597 | 605 | ||
598 | spin_lock_irqsave(&iommu->lock, flags); | 606 | spin_lock_irqsave(&iommu->lock, flags); |
599 | sbus_strbuf_flush(iommu, base & IO_PAGE_MASK, size >> IO_PAGE_SHIFT); | 607 | sbus_strbuf_flush(iommu, base & IO_PAGE_MASK, size >> IO_PAGE_SHIFT, direction); |
600 | spin_unlock_irqrestore(&iommu->lock, flags); | 608 | spin_unlock_irqrestore(&iommu->lock, flags); |
601 | } | 609 | } |
602 | 610 | ||
@@ -620,7 +628,7 @@ void sbus_dma_sync_sg_for_cpu(struct sbus_dev *sdev, struct scatterlist *sg, int | |||
620 | size = IO_PAGE_ALIGN(sg[i].dma_address + sg[i].dma_length) - base; | 628 | size = IO_PAGE_ALIGN(sg[i].dma_address + sg[i].dma_length) - base; |
621 | 629 | ||
622 | spin_lock_irqsave(&iommu->lock, flags); | 630 | spin_lock_irqsave(&iommu->lock, flags); |
623 | sbus_strbuf_flush(iommu, base, size >> IO_PAGE_SHIFT); | 631 | sbus_strbuf_flush(iommu, base, size >> IO_PAGE_SHIFT, direction); |
624 | spin_unlock_irqrestore(&iommu->lock, flags); | 632 | spin_unlock_irqrestore(&iommu->lock, flags); |
625 | } | 633 | } |
626 | 634 | ||
diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index b89989de364d..bd41e4286d0d 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug | |||
@@ -2,10 +2,6 @@ menu "Kernel hacking" | |||
2 | 2 | ||
3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
4 | 4 | ||
5 | config FRAME_POINTER | ||
6 | bool | ||
7 | default y if DEBUG_INFO | ||
8 | |||
9 | config PT_PROXY | 5 | config PT_PROXY |
10 | bool "Enable ptrace proxy" | 6 | bool "Enable ptrace proxy" |
11 | depends on XTERM_CHAN && DEBUG_INFO && MODE_TT | 7 | depends on XTERM_CHAN && DEBUG_INFO && MODE_TT |
diff --git a/arch/um/Kconfig_char b/arch/um/Kconfig_char index 3e50fdb67626..62d87b71179b 100644 --- a/arch/um/Kconfig_char +++ b/arch/um/Kconfig_char | |||
@@ -204,5 +204,11 @@ config UML_RANDOM | |||
204 | http://sourceforge.net/projects/gkernel/). rngd periodically reads | 204 | http://sourceforge.net/projects/gkernel/). rngd periodically reads |
205 | /dev/hwrng and injects the entropy into /dev/random. | 205 | /dev/hwrng and injects the entropy into /dev/random. |
206 | 206 | ||
207 | config MMAPPER | ||
208 | tristate "iomem emulation driver" | ||
209 | help | ||
210 | This driver allows a host file to be used as emulated IO memory inside | ||
211 | UML. | ||
212 | |||
207 | endmenu | 213 | endmenu |
208 | 214 | ||
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile index 323f72c64cd2..b2de9916c32c 100644 --- a/arch/um/drivers/Makefile +++ b/arch/um/drivers/Makefile | |||
@@ -22,8 +22,8 @@ obj-y := stdio_console.o fd.o chan_kern.o chan_user.o line.o | |||
22 | obj-$(CONFIG_SSL) += ssl.o | 22 | obj-$(CONFIG_SSL) += ssl.o |
23 | obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o | 23 | obj-$(CONFIG_STDERR_CONSOLE) += stderr_console.o |
24 | 24 | ||
25 | obj-$(CONFIG_UML_NET_SLIP) += slip.o | 25 | obj-$(CONFIG_UML_NET_SLIP) += slip.o slip_common.o |
26 | obj-$(CONFIG_UML_NET_SLIRP) += slirp.o | 26 | obj-$(CONFIG_UML_NET_SLIRP) += slirp.o slip_common.o |
27 | obj-$(CONFIG_UML_NET_DAEMON) += daemon.o | 27 | obj-$(CONFIG_UML_NET_DAEMON) += daemon.o |
28 | obj-$(CONFIG_UML_NET_MCAST) += mcast.o | 28 | obj-$(CONFIG_UML_NET_MCAST) += mcast.o |
29 | #obj-$(CONFIG_UML_NET_PCAP) += pcap.o $(PCAP) | 29 | #obj-$(CONFIG_UML_NET_PCAP) += pcap.o $(PCAP) |
@@ -41,6 +41,6 @@ obj-$(CONFIG_UML_WATCHDOG) += harddog.o | |||
41 | obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o | 41 | obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o |
42 | obj-$(CONFIG_UML_RANDOM) += random.o | 42 | obj-$(CONFIG_UML_RANDOM) += random.o |
43 | 43 | ||
44 | USER_OBJS := fd.o null.o pty.o tty.o xterm.o | 44 | USER_OBJS := fd.o null.o pty.o tty.o xterm.o slip_common.o |
45 | 45 | ||
46 | include arch/um/scripts/Makefile.rules | 46 | include arch/um/scripts/Makefile.rules |
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index 583b8e137c33..5d3768156c92 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c | |||
@@ -143,22 +143,22 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out) | |||
143 | { | 143 | { |
144 | struct winch_data data; | 144 | struct winch_data data; |
145 | unsigned long stack; | 145 | unsigned long stack; |
146 | int fds[2], pid, n, err; | 146 | int fds[2], n, err; |
147 | char c; | 147 | char c; |
148 | 148 | ||
149 | err = os_pipe(fds, 1, 1); | 149 | err = os_pipe(fds, 1, 1); |
150 | if(err < 0){ | 150 | if(err < 0){ |
151 | printk("winch_tramp : os_pipe failed, err = %d\n", -err); | 151 | printk("winch_tramp : os_pipe failed, err = %d\n", -err); |
152 | return(err); | 152 | goto out; |
153 | } | 153 | } |
154 | 154 | ||
155 | data = ((struct winch_data) { .pty_fd = fd, | 155 | data = ((struct winch_data) { .pty_fd = fd, |
156 | .pipe_fd = fds[1], | 156 | .pipe_fd = fds[1], |
157 | .close_me = fds[0] } ); | 157 | .close_me = fds[0] } ); |
158 | pid = run_helper_thread(winch_thread, &data, 0, &stack, 0); | 158 | err = run_helper_thread(winch_thread, &data, 0, &stack, 0); |
159 | if(pid < 0){ | 159 | if(err < 0){ |
160 | printk("fork of winch_thread failed - errno = %d\n", errno); | 160 | printk("fork of winch_thread failed - errno = %d\n", errno); |
161 | return(pid); | 161 | goto out_close; |
162 | } | 162 | } |
163 | 163 | ||
164 | os_close_file(fds[1]); | 164 | os_close_file(fds[1]); |
@@ -168,14 +168,22 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out) | |||
168 | printk("winch_tramp : failed to read synchronization byte\n"); | 168 | printk("winch_tramp : failed to read synchronization byte\n"); |
169 | printk("read failed, err = %d\n", -n); | 169 | printk("read failed, err = %d\n", -n); |
170 | printk("fd %d will not support SIGWINCH\n", fd); | 170 | printk("fd %d will not support SIGWINCH\n", fd); |
171 | *fd_out = -1; | 171 | err = -EINVAL; |
172 | goto out_close1; | ||
172 | } | 173 | } |
173 | return(pid); | 174 | return err ; |
175 | |||
176 | out_close: | ||
177 | os_close_file(fds[1]); | ||
178 | out_close1: | ||
179 | os_close_file(fds[0]); | ||
180 | out: | ||
181 | return err; | ||
174 | } | 182 | } |
175 | 183 | ||
176 | void register_winch(int fd, struct tty_struct *tty) | 184 | void register_winch(int fd, struct tty_struct *tty) |
177 | { | 185 | { |
178 | int pid, thread, thread_fd; | 186 | int pid, thread, thread_fd = -1; |
179 | int count; | 187 | int count; |
180 | char c = 1; | 188 | char c = 1; |
181 | 189 | ||
@@ -186,7 +194,7 @@ void register_winch(int fd, struct tty_struct *tty) | |||
186 | if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, | 194 | if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, |
187 | tty) && (pid == -1)){ | 195 | tty) && (pid == -1)){ |
188 | thread = winch_tramp(fd, tty, &thread_fd); | 196 | thread = winch_tramp(fd, tty, &thread_fd); |
189 | if(fd != -1){ | 197 | if(thread > 0){ |
190 | register_winch_irq(thread_fd, fd, thread, tty); | 198 | register_winch_irq(thread_fd, fd, thread, tty); |
191 | 199 | ||
192 | count = os_write_file(thread_fd, &c, sizeof(c)); | 200 | count = os_write_file(thread_fd, &c, sizeof(c)); |
diff --git a/arch/um/drivers/mmapper_kern.c b/arch/um/drivers/mmapper_kern.c index a63231dffe05..a37a5ac13c22 100644 --- a/arch/um/drivers/mmapper_kern.c +++ b/arch/um/drivers/mmapper_kern.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
21 | #include <linux/miscdevice.h> | ||
21 | #include <asm/uaccess.h> | 22 | #include <asm/uaccess.h> |
22 | #include <asm/irq.h> | 23 | #include <asm/irq.h> |
23 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
@@ -117,24 +118,39 @@ static struct file_operations mmapper_fops = { | |||
117 | .release = mmapper_release, | 118 | .release = mmapper_release, |
118 | }; | 119 | }; |
119 | 120 | ||
121 | static struct miscdevice mmapper_dev = { | ||
122 | .minor = MISC_DYNAMIC_MINOR, | ||
123 | .name = "mmapper", | ||
124 | .fops = &mmapper_fops | ||
125 | }; | ||
126 | |||
120 | static int __init mmapper_init(void) | 127 | static int __init mmapper_init(void) |
121 | { | 128 | { |
129 | int err; | ||
130 | |||
122 | printk(KERN_INFO "Mapper v0.1\n"); | 131 | printk(KERN_INFO "Mapper v0.1\n"); |
123 | 132 | ||
124 | v_buf = (char *) find_iomem("mmapper", &mmapper_size); | 133 | v_buf = (char *) find_iomem("mmapper", &mmapper_size); |
125 | if(mmapper_size == 0){ | 134 | if(mmapper_size == 0){ |
126 | printk(KERN_ERR "mmapper_init - find_iomem failed\n"); | 135 | printk(KERN_ERR "mmapper_init - find_iomem failed\n"); |
127 | return(0); | 136 | goto out; |
128 | } | 137 | } |
129 | 138 | ||
130 | p_buf = __pa(v_buf); | 139 | err = misc_register(&mmapper_dev); |
140 | if(err){ | ||
141 | printk(KERN_ERR "mmapper - misc_register failed, err = %d\n", | ||
142 | err); | ||
143 | goto out; | ||
144 | } | ||
131 | 145 | ||
132 | devfs_mk_cdev(MKDEV(30, 0), S_IFCHR|S_IRUGO|S_IWUGO, "mmapper"); | 146 | p_buf = __pa(v_buf); |
133 | return(0); | 147 | out: |
148 | return 0; | ||
134 | } | 149 | } |
135 | 150 | ||
136 | static void mmapper_exit(void) | 151 | static void mmapper_exit(void) |
137 | { | 152 | { |
153 | misc_deregister(&mmapper_dev); | ||
138 | } | 154 | } |
139 | 155 | ||
140 | module_init(mmapper_init); | 156 | module_init(mmapper_init); |
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 47229fe4a813..3730d4f12713 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c | |||
@@ -32,7 +32,7 @@ int tap_open_common(void *dev, char *gate_addr) | |||
32 | return(0); | 32 | return(0); |
33 | } | 33 | } |
34 | 34 | ||
35 | void tap_check_ips(char *gate_addr, char *eth_addr) | 35 | void tap_check_ips(char *gate_addr, unsigned char *eth_addr) |
36 | { | 36 | { |
37 | int tap_addr[4]; | 37 | int tap_addr[4]; |
38 | 38 | ||
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index d43e9fab05a7..f9e22198e011 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c | |||
@@ -1,5 +1,10 @@ | |||
1 | /* Much of this ripped from hw_random.c */ | 1 | /* Copyright (C) 2005 Jeff Dike <jdike@addtoit.com> */ |
2 | 2 | /* Much of this ripped from drivers/char/hw_random.c, see there for other | |
3 | * copyright. | ||
4 | * | ||
5 | * This software may be used and distributed according to the terms | ||
6 | * of the GNU General Public License, incorporated herein by reference. | ||
7 | */ | ||
3 | #include <linux/module.h> | 8 | #include <linux/module.h> |
4 | #include <linux/fs.h> | 9 | #include <linux/fs.h> |
5 | #include <linux/miscdevice.h> | 10 | #include <linux/miscdevice.h> |
@@ -12,8 +17,6 @@ | |||
12 | */ | 17 | */ |
13 | #define RNG_VERSION "1.0.0" | 18 | #define RNG_VERSION "1.0.0" |
14 | #define RNG_MODULE_NAME "random" | 19 | #define RNG_MODULE_NAME "random" |
15 | #define RNG_DRIVER_NAME RNG_MODULE_NAME " virtual driver " RNG_VERSION | ||
16 | #define PFX RNG_MODULE_NAME ": " | ||
17 | 20 | ||
18 | #define RNG_MISCDEV_MINOR 183 /* official */ | 21 | #define RNG_MISCDEV_MINOR 183 /* official */ |
19 | 22 | ||
@@ -98,7 +101,7 @@ static int __init rng_init (void) | |||
98 | 101 | ||
99 | err = misc_register (&rng_miscdev); | 102 | err = misc_register (&rng_miscdev); |
100 | if (err) { | 103 | if (err) { |
101 | printk (KERN_ERR PFX "misc device register failed\n"); | 104 | printk (KERN_ERR RNG_MODULE_NAME ": misc device register failed\n"); |
102 | goto err_out_cleanup_hw; | 105 | goto err_out_cleanup_hw; |
103 | } | 106 | } |
104 | 107 | ||
@@ -120,3 +123,6 @@ static void __exit rng_cleanup (void) | |||
120 | 123 | ||
121 | module_init (rng_init); | 124 | module_init (rng_init); |
122 | module_exit (rng_cleanup); | 125 | module_exit (rng_cleanup); |
126 | |||
127 | MODULE_DESCRIPTION("UML Host Random Number Generator (RNG) driver"); | ||
128 | MODULE_LICENSE("GPL"); | ||
diff --git a/arch/um/drivers/slip.h b/arch/um/drivers/slip.h index 495f2f1b1420..bb0dab41c2e4 100644 --- a/arch/um/drivers/slip.h +++ b/arch/um/drivers/slip.h | |||
@@ -1,10 +1,7 @@ | |||
1 | #ifndef __UM_SLIP_H | 1 | #ifndef __UM_SLIP_H |
2 | #define __UM_SLIP_H | 2 | #define __UM_SLIP_H |
3 | 3 | ||
4 | #define BUF_SIZE 1500 | 4 | #include "slip_common.h" |
5 | /* two bytes each for a (pathological) max packet of escaped chars + * | ||
6 | * terminating END char + initial END char */ | ||
7 | #define ENC_BUF_SIZE (2 * BUF_SIZE + 2) | ||
8 | 5 | ||
9 | struct slip_data { | 6 | struct slip_data { |
10 | void *dev; | 7 | void *dev; |
@@ -12,28 +9,12 @@ struct slip_data { | |||
12 | char *addr; | 9 | char *addr; |
13 | char *gate_addr; | 10 | char *gate_addr; |
14 | int slave; | 11 | int slave; |
15 | char ibuf[ENC_BUF_SIZE]; | 12 | struct slip_proto slip; |
16 | char obuf[ENC_BUF_SIZE]; | ||
17 | int more; /* more data: do not read fd until ibuf has been drained */ | ||
18 | int pos; | ||
19 | int esc; | ||
20 | }; | 13 | }; |
21 | 14 | ||
22 | extern struct net_user_info slip_user_info; | 15 | extern struct net_user_info slip_user_info; |
23 | 16 | ||
24 | extern int set_umn_addr(int fd, char *addr, char *ptp_addr); | ||
25 | extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri); | 17 | extern int slip_user_read(int fd, void *buf, int len, struct slip_data *pri); |
26 | extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri); | 18 | extern int slip_user_write(int fd, void *buf, int len, struct slip_data *pri); |
27 | 19 | ||
28 | #endif | 20 | #endif |
29 | |||
30 | /* | ||
31 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
32 | * Emacs will notice this stuff at the end of the file and automatically | ||
33 | * adjust the settings for this buffer only. This must remain at the end | ||
34 | * of the file. | ||
35 | * --------------------------------------------------------------------------- | ||
36 | * Local variables: | ||
37 | * c-file-style: "linux" | ||
38 | * End: | ||
39 | */ | ||
diff --git a/arch/um/drivers/slip_common.c b/arch/um/drivers/slip_common.c new file mode 100644 index 000000000000..e89cfc68fc3e --- /dev/null +++ b/arch/um/drivers/slip_common.c | |||
@@ -0,0 +1,54 @@ | |||
1 | #include <string.h> | ||
2 | #include "slip_common.h" | ||
3 | #include "net_user.h" | ||
4 | |||
5 | int slip_proto_read(int fd, void *buf, int len, struct slip_proto *slip) | ||
6 | { | ||
7 | int i, n, size, start; | ||
8 | |||
9 | if(slip->more > 0){ | ||
10 | i = 0; | ||
11 | while(i < slip->more){ | ||
12 | size = slip_unesc(slip->ibuf[i++], slip->ibuf, | ||
13 | &slip->pos, &slip->esc); | ||
14 | if(size){ | ||
15 | memcpy(buf, slip->ibuf, size); | ||
16 | memmove(slip->ibuf, &slip->ibuf[i], | ||
17 | slip->more - i); | ||
18 | slip->more = slip->more - i; | ||
19 | return size; | ||
20 | } | ||
21 | } | ||
22 | slip->more = 0; | ||
23 | } | ||
24 | |||
25 | n = net_read(fd, &slip->ibuf[slip->pos], | ||
26 | sizeof(slip->ibuf) - slip->pos); | ||
27 | if(n <= 0) | ||
28 | return n; | ||
29 | |||
30 | start = slip->pos; | ||
31 | for(i = 0; i < n; i++){ | ||
32 | size = slip_unesc(slip->ibuf[start + i], slip->ibuf,&slip->pos, | ||
33 | &slip->esc); | ||
34 | if(size){ | ||
35 | memcpy(buf, slip->ibuf, size); | ||
36 | memmove(slip->ibuf, &slip->ibuf[start+i+1], | ||
37 | n - (i + 1)); | ||
38 | slip->more = n - (i + 1); | ||
39 | return size; | ||
40 | } | ||
41 | } | ||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | int slip_proto_write(int fd, void *buf, int len, struct slip_proto *slip) | ||
46 | { | ||
47 | int actual, n; | ||
48 | |||
49 | actual = slip_esc(buf, slip->obuf, len); | ||
50 | n = net_write(fd, slip->obuf, actual); | ||
51 | if(n < 0) | ||
52 | return n; | ||
53 | else return len; | ||
54 | } | ||
diff --git a/arch/um/drivers/slip_proto.h b/arch/um/drivers/slip_common.h index 7206361ace45..2ae76d8f1be1 100644 --- a/arch/um/drivers/slip_proto.h +++ b/arch/um/drivers/slip_common.h | |||
@@ -1,10 +1,10 @@ | |||
1 | /* | 1 | #ifndef __UM_SLIP_COMMON_H |
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | #define __UM_SLIP_COMMON_H |
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | 3 | ||
6 | #ifndef __UM_SLIP_PROTO_H__ | 4 | #define BUF_SIZE 1500 |
7 | #define __UM_SLIP_PROTO_H__ | 5 | /* two bytes each for a (pathological) max packet of escaped chars + * |
6 | * terminating END char + initial END char */ | ||
7 | #define ENC_BUF_SIZE (2 * BUF_SIZE + 2) | ||
8 | 8 | ||
9 | /* SLIP protocol characters. */ | 9 | /* SLIP protocol characters. */ |
10 | #define SLIP_END 0300 /* indicates end of frame */ | 10 | #define SLIP_END 0300 /* indicates end of frame */ |
@@ -12,7 +12,8 @@ | |||
12 | #define SLIP_ESC_END 0334 /* ESC ESC_END means END 'data' */ | 12 | #define SLIP_ESC_END 0334 /* ESC ESC_END means END 'data' */ |
13 | #define SLIP_ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */ | 13 | #define SLIP_ESC_ESC 0335 /* ESC ESC_ESC means ESC 'data' */ |
14 | 14 | ||
15 | static inline int slip_unesc(unsigned char c,char *buf,int *pos, int *esc) | 15 | static inline int slip_unesc(unsigned char c, unsigned char *buf, int *pos, |
16 | int *esc) | ||
16 | { | 17 | { |
17 | int ret; | 18 | int ret; |
18 | 19 | ||
@@ -79,15 +80,25 @@ static inline int slip_esc(unsigned char *s, unsigned char *d, int len) | |||
79 | return (ptr - d); | 80 | return (ptr - d); |
80 | } | 81 | } |
81 | 82 | ||
82 | #endif | 83 | struct slip_proto { |
84 | unsigned char ibuf[ENC_BUF_SIZE]; | ||
85 | unsigned char obuf[ENC_BUF_SIZE]; | ||
86 | int more; /* more data: do not read fd until ibuf has been drained */ | ||
87 | int pos; | ||
88 | int esc; | ||
89 | }; | ||
90 | |||
91 | #define SLIP_PROTO_INIT { \ | ||
92 | .ibuf = { '\0' }, \ | ||
93 | .obuf = { '\0' }, \ | ||
94 | .more = 0, \ | ||
95 | .pos = 0, \ | ||
96 | .esc = 0 \ | ||
97 | } | ||
83 | 98 | ||
84 | /* | 99 | extern int slip_proto_read(int fd, void *buf, int len, |
85 | * Overrides for Emacs so that we follow Linus's tabbing style. | 100 | struct slip_proto *slip); |
86 | * Emacs will notice this stuff at the end of the file and automatically | 101 | extern int slip_proto_write(int fd, void *buf, int len, |
87 | * adjust the settings for this buffer only. This must remain at the end | 102 | struct slip_proto *slip); |
88 | * of the file. | 103 | |
89 | * --------------------------------------------------------------------------- | 104 | #endif |
90 | * Local variables: | ||
91 | * c-file-style: "linux" | ||
92 | * End: | ||
93 | */ | ||
diff --git a/arch/um/drivers/slip_kern.c b/arch/um/drivers/slip_kern.c index 0886eedba213..9a6f5c85f902 100644 --- a/arch/um/drivers/slip_kern.c +++ b/arch/um/drivers/slip_kern.c | |||
@@ -26,16 +26,16 @@ void slip_init(struct net_device *dev, void *data) | |||
26 | .addr = NULL, | 26 | .addr = NULL, |
27 | .gate_addr = init->gate_addr, | 27 | .gate_addr = init->gate_addr, |
28 | .slave = -1, | 28 | .slave = -1, |
29 | .ibuf = { '\0' }, | 29 | .slip = SLIP_PROTO_INIT, |
30 | .obuf = { '\0' }, | ||
31 | .pos = 0, | ||
32 | .esc = 0, | ||
33 | .dev = dev }); | 30 | .dev = dev }); |
34 | 31 | ||
35 | dev->init = NULL; | 32 | dev->init = NULL; |
33 | dev->header_cache_update = NULL; | ||
34 | dev->hard_header_cache = NULL; | ||
35 | dev->hard_header = NULL; | ||
36 | dev->hard_header_len = 0; | 36 | dev->hard_header_len = 0; |
37 | dev->addr_len = 4; | 37 | dev->addr_len = 0; |
38 | dev->type = ARPHRD_ETHER; | 38 | dev->type = ARPHRD_SLIP; |
39 | dev->tx_queue_len = 256; | 39 | dev->tx_queue_len = 256; |
40 | dev->flags = IFF_NOARP; | 40 | dev->flags = IFF_NOARP; |
41 | printk("SLIP backend - SLIP IP = %s\n", spri->gate_addr); | 41 | printk("SLIP backend - SLIP IP = %s\n", spri->gate_addr); |
diff --git a/arch/um/drivers/slip_user.c b/arch/um/drivers/slip_user.c index d94846b1b4cf..71af444e591f 100644 --- a/arch/um/drivers/slip_user.c +++ b/arch/um/drivers/slip_user.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include "user.h" | 13 | #include "user.h" |
14 | #include "net_user.h" | 14 | #include "net_user.h" |
15 | #include "slip.h" | 15 | #include "slip.h" |
16 | #include "slip_proto.h" | 16 | #include "slip_common.h" |
17 | #include "helper.h" | 17 | #include "helper.h" |
18 | #include "os.h" | 18 | #include "os.h" |
19 | 19 | ||
@@ -77,41 +77,51 @@ static int slip_tramp(char **argv, int fd) | |||
77 | err = os_pipe(fds, 1, 0); | 77 | err = os_pipe(fds, 1, 0); |
78 | if(err < 0){ | 78 | if(err < 0){ |
79 | printk("slip_tramp : pipe failed, err = %d\n", -err); | 79 | printk("slip_tramp : pipe failed, err = %d\n", -err); |
80 | return(err); | 80 | goto out; |
81 | } | 81 | } |
82 | 82 | ||
83 | err = 0; | 83 | err = 0; |
84 | pe_data.stdin = fd; | 84 | pe_data.stdin = fd; |
85 | pe_data.stdout = fds[1]; | 85 | pe_data.stdout = fds[1]; |
86 | pe_data.close_me = fds[0]; | 86 | pe_data.close_me = fds[0]; |
87 | pid = run_helper(slip_pre_exec, &pe_data, argv, NULL); | 87 | err = run_helper(slip_pre_exec, &pe_data, argv, NULL); |
88 | if(err < 0) | ||
89 | goto out_close; | ||
90 | pid = err; | ||
91 | |||
92 | output_len = page_size(); | ||
93 | output = um_kmalloc(output_len); | ||
94 | if(output == NULL){ | ||
95 | printk("slip_tramp : failed to allocate output buffer\n"); | ||
96 | os_kill_process(pid, 1); | ||
97 | err = -ENOMEM; | ||
98 | goto out_free; | ||
99 | } | ||
88 | 100 | ||
89 | if(pid < 0) err = pid; | 101 | os_close_file(fds[1]); |
90 | else { | 102 | read_output(fds[0], output, output_len); |
91 | output_len = page_size(); | 103 | printk("%s", output); |
92 | output = um_kmalloc(output_len); | 104 | |
93 | if(output == NULL) | 105 | CATCH_EINTR(err = waitpid(pid, &status, 0)); |
94 | printk("slip_tramp : failed to allocate output " | 106 | if(err < 0) |
95 | "buffer\n"); | 107 | err = errno; |
96 | 108 | else if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)){ | |
97 | os_close_file(fds[1]); | 109 | printk("'%s' didn't exit with status 0\n", argv[0]); |
98 | read_output(fds[0], output, output_len); | 110 | err = -EINVAL; |
99 | if(output != NULL){ | ||
100 | printk("%s", output); | ||
101 | kfree(output); | ||
102 | } | ||
103 | CATCH_EINTR(err = waitpid(pid, &status, 0)); | ||
104 | if(err < 0) | ||
105 | err = errno; | ||
106 | else if(!WIFEXITED(status) || (WEXITSTATUS(status) != 0)){ | ||
107 | printk("'%s' didn't exit with status 0\n", argv[0]); | ||
108 | err = -EINVAL; | ||
109 | } | ||
110 | } | 111 | } |
112 | else err = 0; | ||
111 | 113 | ||
112 | os_close_file(fds[0]); | 114 | os_close_file(fds[0]); |
113 | 115 | ||
114 | return(err); | 116 | out_free: |
117 | kfree(output); | ||
118 | return err; | ||
119 | |||
120 | out_close: | ||
121 | os_close_file(fds[0]); | ||
122 | os_close_file(fds[1]); | ||
123 | out: | ||
124 | return err; | ||
115 | } | 125 | } |
116 | 126 | ||
117 | static int slip_open(void *data) | 127 | static int slip_open(void *data) |
@@ -123,21 +133,26 @@ static int slip_open(void *data) | |||
123 | NULL }; | 133 | NULL }; |
124 | int sfd, mfd, err; | 134 | int sfd, mfd, err; |
125 | 135 | ||
126 | mfd = get_pty(); | 136 | err = get_pty(); |
127 | if(mfd < 0){ | 137 | if(err < 0){ |
128 | printk("umn : Failed to open pty, err = %d\n", -mfd); | 138 | printk("slip-open : Failed to open pty, err = %d\n", -err); |
129 | return(mfd); | 139 | goto out; |
130 | } | 140 | } |
131 | sfd = os_open_file(ptsname(mfd), of_rdwr(OPENFLAGS()), 0); | 141 | mfd = err; |
132 | if(sfd < 0){ | 142 | |
133 | printk("Couldn't open tty for slip line, err = %d\n", -sfd); | 143 | err = os_open_file(ptsname(mfd), of_rdwr(OPENFLAGS()), 0); |
134 | os_close_file(mfd); | 144 | if(err < 0){ |
135 | return(sfd); | 145 | printk("Couldn't open tty for slip line, err = %d\n", -err); |
146 | goto out_close; | ||
136 | } | 147 | } |
137 | if(set_up_tty(sfd)) return(-1); | 148 | sfd = err; |
149 | |||
150 | if(set_up_tty(sfd)) | ||
151 | goto out_close2; | ||
152 | |||
138 | pri->slave = sfd; | 153 | pri->slave = sfd; |
139 | pri->pos = 0; | 154 | pri->slip.pos = 0; |
140 | pri->esc = 0; | 155 | pri->slip.esc = 0; |
141 | if(pri->gate_addr != NULL){ | 156 | if(pri->gate_addr != NULL){ |
142 | sprintf(version_buf, "%d", UML_NET_VERSION); | 157 | sprintf(version_buf, "%d", UML_NET_VERSION); |
143 | strcpy(gate_buf, pri->gate_addr); | 158 | strcpy(gate_buf, pri->gate_addr); |
@@ -146,12 +161,12 @@ static int slip_open(void *data) | |||
146 | 161 | ||
147 | if(err < 0){ | 162 | if(err < 0){ |
148 | printk("slip_tramp failed - err = %d\n", -err); | 163 | printk("slip_tramp failed - err = %d\n", -err); |
149 | return(err); | 164 | goto out_close2; |
150 | } | 165 | } |
151 | err = os_get_ifname(pri->slave, pri->name); | 166 | err = os_get_ifname(pri->slave, pri->name); |
152 | if(err < 0){ | 167 | if(err < 0){ |
153 | printk("get_ifname failed, err = %d\n", -err); | 168 | printk("get_ifname failed, err = %d\n", -err); |
154 | return(err); | 169 | goto out_close2; |
155 | } | 170 | } |
156 | iter_addresses(pri->dev, open_addr, pri->name); | 171 | iter_addresses(pri->dev, open_addr, pri->name); |
157 | } | 172 | } |
@@ -160,10 +175,16 @@ static int slip_open(void *data) | |||
160 | if(err < 0){ | 175 | if(err < 0){ |
161 | printk("Failed to set slip discipline encapsulation - " | 176 | printk("Failed to set slip discipline encapsulation - " |
162 | "err = %d\n", -err); | 177 | "err = %d\n", -err); |
163 | return(err); | 178 | goto out_close2; |
164 | } | 179 | } |
165 | } | 180 | } |
166 | return(mfd); | 181 | return(mfd); |
182 | out_close2: | ||
183 | os_close_file(sfd); | ||
184 | out_close: | ||
185 | os_close_file(mfd); | ||
186 | out: | ||
187 | return err; | ||
167 | } | 188 | } |
168 | 189 | ||
169 | static void slip_close(int fd, void *data) | 190 | static void slip_close(int fd, void *data) |
@@ -190,48 +211,12 @@ static void slip_close(int fd, void *data) | |||
190 | 211 | ||
191 | int slip_user_read(int fd, void *buf, int len, struct slip_data *pri) | 212 | int slip_user_read(int fd, void *buf, int len, struct slip_data *pri) |
192 | { | 213 | { |
193 | int i, n, size, start; | 214 | return slip_proto_read(fd, buf, len, &pri->slip); |
194 | |||
195 | if(pri->more>0) { | ||
196 | i = 0; | ||
197 | while(i < pri->more) { | ||
198 | size = slip_unesc(pri->ibuf[i++], | ||
199 | pri->ibuf, &pri->pos, &pri->esc); | ||
200 | if(size){ | ||
201 | memcpy(buf, pri->ibuf, size); | ||
202 | memmove(pri->ibuf, &pri->ibuf[i], pri->more-i); | ||
203 | pri->more=pri->more-i; | ||
204 | return(size); | ||
205 | } | ||
206 | } | ||
207 | pri->more=0; | ||
208 | } | ||
209 | |||
210 | n = net_read(fd, &pri->ibuf[pri->pos], sizeof(pri->ibuf) - pri->pos); | ||
211 | if(n <= 0) return(n); | ||
212 | |||
213 | start = pri->pos; | ||
214 | for(i = 0; i < n; i++){ | ||
215 | size = slip_unesc(pri->ibuf[start + i], | ||
216 | pri->ibuf, &pri->pos, &pri->esc); | ||
217 | if(size){ | ||
218 | memcpy(buf, pri->ibuf, size); | ||
219 | memmove(pri->ibuf, &pri->ibuf[start+i+1], n-(i+1)); | ||
220 | pri->more=n-(i+1); | ||
221 | return(size); | ||
222 | } | ||
223 | } | ||
224 | return(0); | ||
225 | } | 215 | } |
226 | 216 | ||
227 | int slip_user_write(int fd, void *buf, int len, struct slip_data *pri) | 217 | int slip_user_write(int fd, void *buf, int len, struct slip_data *pri) |
228 | { | 218 | { |
229 | int actual, n; | 219 | return slip_proto_write(fd, buf, len, &pri->slip); |
230 | |||
231 | actual = slip_esc(buf, pri->obuf, len); | ||
232 | n = net_write(fd, pri->obuf, actual); | ||
233 | if(n < 0) return(n); | ||
234 | else return(len); | ||
235 | } | 220 | } |
236 | 221 | ||
237 | static int slip_set_mtu(int mtu, void *data) | 222 | static int slip_set_mtu(int mtu, void *data) |
@@ -267,14 +252,3 @@ struct net_user_info slip_user_info = { | |||
267 | .delete_address = slip_del_addr, | 252 | .delete_address = slip_del_addr, |
268 | .max_packet = BUF_SIZE | 253 | .max_packet = BUF_SIZE |
269 | }; | 254 | }; |
270 | |||
271 | /* | ||
272 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
273 | * Emacs will notice this stuff at the end of the file and automatically | ||
274 | * adjust the settings for this buffer only. This must remain at the end | ||
275 | * of the file. | ||
276 | * --------------------------------------------------------------------------- | ||
277 | * Local variables: | ||
278 | * c-file-style: "linux" | ||
279 | * End: | ||
280 | */ | ||
diff --git a/arch/um/drivers/slirp.h b/arch/um/drivers/slirp.h index 04e407d1e44a..6cf88ab580c9 100644 --- a/arch/um/drivers/slirp.h +++ b/arch/um/drivers/slirp.h | |||
@@ -1,10 +1,7 @@ | |||
1 | #ifndef __UM_SLIRP_H | 1 | #ifndef __UM_SLIRP_H |
2 | #define __UM_SLIRP_H | 2 | #define __UM_SLIRP_H |
3 | 3 | ||
4 | #define BUF_SIZE 1500 | 4 | #include "slip_common.h" |
5 | /* two bytes each for a (pathological) max packet of escaped chars + * | ||
6 | * terminating END char + initial END char */ | ||
7 | #define ENC_BUF_SIZE (2 * BUF_SIZE + 2) | ||
8 | 5 | ||
9 | #define SLIRP_MAX_ARGS 100 | 6 | #define SLIRP_MAX_ARGS 100 |
10 | /* | 7 | /* |
@@ -24,28 +21,13 @@ struct slirp_data { | |||
24 | struct arg_list_dummy_wrapper argw; | 21 | struct arg_list_dummy_wrapper argw; |
25 | int pid; | 22 | int pid; |
26 | int slave; | 23 | int slave; |
27 | char ibuf[ENC_BUF_SIZE]; | 24 | struct slip_proto slip; |
28 | char obuf[ENC_BUF_SIZE]; | ||
29 | int more; /* more data: do not read fd until ibuf has been drained */ | ||
30 | int pos; | ||
31 | int esc; | ||
32 | }; | 25 | }; |
33 | 26 | ||
34 | extern struct net_user_info slirp_user_info; | 27 | extern struct net_user_info slirp_user_info; |
35 | 28 | ||
36 | extern int set_umn_addr(int fd, char *addr, char *ptp_addr); | ||
37 | extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri); | 29 | extern int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri); |
38 | extern int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri); | 30 | extern int slirp_user_write(int fd, void *buf, int len, |
31 | struct slirp_data *pri); | ||
39 | 32 | ||
40 | #endif | 33 | #endif |
41 | |||
42 | /* | ||
43 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
44 | * Emacs will notice this stuff at the end of the file and automatically | ||
45 | * adjust the settings for this buffer only. This must remain at the end | ||
46 | * of the file. | ||
47 | * --------------------------------------------------------------------------- | ||
48 | * Local variables: | ||
49 | * c-file-style: "linux" | ||
50 | * End: | ||
51 | */ | ||
diff --git a/arch/um/drivers/slirp_kern.c b/arch/um/drivers/slirp_kern.c index c9d6b52a831d..9864d27afdbe 100644 --- a/arch/um/drivers/slirp_kern.c +++ b/arch/um/drivers/slirp_kern.c | |||
@@ -25,10 +25,7 @@ void slirp_init(struct net_device *dev, void *data) | |||
25 | { .argw = init->argw, | 25 | { .argw = init->argw, |
26 | .pid = -1, | 26 | .pid = -1, |
27 | .slave = -1, | 27 | .slave = -1, |
28 | .ibuf = { '\0' }, | 28 | .slip = SLIP_PROTO_INIT, |
29 | .obuf = { '\0' }, | ||
30 | .pos = 0, | ||
31 | .esc = 0, | ||
32 | .dev = dev }); | 29 | .dev = dev }); |
33 | 30 | ||
34 | dev->init = NULL; | 31 | dev->init = NULL; |
diff --git a/arch/um/drivers/slirp_user.c b/arch/um/drivers/slirp_user.c index c322515c71cc..8d91f663d82c 100644 --- a/arch/um/drivers/slirp_user.c +++ b/arch/um/drivers/slirp_user.c | |||
@@ -12,7 +12,7 @@ | |||
12 | #include "user.h" | 12 | #include "user.h" |
13 | #include "net_user.h" | 13 | #include "net_user.h" |
14 | #include "slirp.h" | 14 | #include "slirp.h" |
15 | #include "slip_proto.h" | 15 | #include "slip_common.h" |
16 | #include "helper.h" | 16 | #include "helper.h" |
17 | #include "os.h" | 17 | #include "os.h" |
18 | 18 | ||
@@ -48,47 +48,32 @@ static int slirp_tramp(char **argv, int fd) | |||
48 | return(pid); | 48 | return(pid); |
49 | } | 49 | } |
50 | 50 | ||
51 | /* XXX This is just a trivial wrapper around os_pipe */ | ||
52 | static int slirp_datachan(int *mfd, int *sfd) | ||
53 | { | ||
54 | int fds[2], err; | ||
55 | |||
56 | err = os_pipe(fds, 1, 1); | ||
57 | if(err < 0){ | ||
58 | printk("slirp_datachan: Failed to open pipe, err = %d\n", -err); | ||
59 | return(err); | ||
60 | } | ||
61 | |||
62 | *mfd = fds[0]; | ||
63 | *sfd = fds[1]; | ||
64 | return(0); | ||
65 | } | ||
66 | |||
67 | static int slirp_open(void *data) | 51 | static int slirp_open(void *data) |
68 | { | 52 | { |
69 | struct slirp_data *pri = data; | 53 | struct slirp_data *pri = data; |
70 | int sfd, mfd, pid, err; | 54 | int fds[2], pid, err; |
71 | 55 | ||
72 | err = slirp_datachan(&mfd, &sfd); | 56 | err = os_pipe(fds, 1, 1); |
73 | if(err) | 57 | if(err) |
74 | return(err); | 58 | return(err); |
75 | 59 | ||
76 | pid = slirp_tramp(pri->argw.argv, sfd); | 60 | err = slirp_tramp(pri->argw.argv, fds[1]); |
77 | 61 | if(err < 0){ | |
78 | if(pid < 0){ | 62 | printk("slirp_tramp failed - errno = %d\n", -err); |
79 | printk("slirp_tramp failed - errno = %d\n", -pid); | 63 | goto out; |
80 | os_close_file(sfd); | ||
81 | os_close_file(mfd); | ||
82 | return(pid); | ||
83 | } | 64 | } |
84 | 65 | pid = err; | |
85 | pri->slave = sfd; | 66 | |
86 | pri->pos = 0; | 67 | pri->slave = fds[1]; |
87 | pri->esc = 0; | 68 | pri->slip.pos = 0; |
88 | 69 | pri->slip.esc = 0; | |
89 | pri->pid = pid; | 70 | pri->pid = err; |
90 | 71 | ||
91 | return(mfd); | 72 | return(fds[0]); |
73 | out: | ||
74 | os_close_file(fds[0]); | ||
75 | os_close_file(fds[1]); | ||
76 | return err; | ||
92 | } | 77 | } |
93 | 78 | ||
94 | static void slirp_close(int fd, void *data) | 79 | static void slirp_close(int fd, void *data) |
@@ -129,48 +114,12 @@ static void slirp_close(int fd, void *data) | |||
129 | 114 | ||
130 | int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri) | 115 | int slirp_user_read(int fd, void *buf, int len, struct slirp_data *pri) |
131 | { | 116 | { |
132 | int i, n, size, start; | 117 | return slip_proto_read(fd, buf, len, &pri->slip); |
133 | |||
134 | if(pri->more>0) { | ||
135 | i = 0; | ||
136 | while(i < pri->more) { | ||
137 | size = slip_unesc(pri->ibuf[i++], | ||
138 | pri->ibuf,&pri->pos,&pri->esc); | ||
139 | if(size){ | ||
140 | memcpy(buf, pri->ibuf, size); | ||
141 | memmove(pri->ibuf, &pri->ibuf[i], pri->more-i); | ||
142 | pri->more=pri->more-i; | ||
143 | return(size); | ||
144 | } | ||
145 | } | ||
146 | pri->more=0; | ||
147 | } | ||
148 | |||
149 | n = net_read(fd, &pri->ibuf[pri->pos], sizeof(pri->ibuf) - pri->pos); | ||
150 | if(n <= 0) return(n); | ||
151 | |||
152 | start = pri->pos; | ||
153 | for(i = 0; i < n; i++){ | ||
154 | size = slip_unesc(pri->ibuf[start + i], | ||
155 | pri->ibuf,&pri->pos,&pri->esc); | ||
156 | if(size){ | ||
157 | memcpy(buf, pri->ibuf, size); | ||
158 | memmove(pri->ibuf, &pri->ibuf[start+i+1], n-(i+1)); | ||
159 | pri->more=n-(i+1); | ||
160 | return(size); | ||
161 | } | ||
162 | } | ||
163 | return(0); | ||
164 | } | 118 | } |
165 | 119 | ||
166 | int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri) | 120 | int slirp_user_write(int fd, void *buf, int len, struct slirp_data *pri) |
167 | { | 121 | { |
168 | int actual, n; | 122 | return slip_proto_write(fd, buf, len, &pri->slip); |
169 | |||
170 | actual = slip_esc(buf, pri->obuf, len); | ||
171 | n = net_write(fd, pri->obuf, actual); | ||
172 | if(n < 0) return(n); | ||
173 | else return(len); | ||
174 | } | 123 | } |
175 | 124 | ||
176 | static int slirp_set_mtu(int mtu, void *data) | 125 | static int slirp_set_mtu(int mtu, void *data) |
@@ -188,14 +137,3 @@ struct net_user_info slirp_user_info = { | |||
188 | .delete_address = NULL, | 137 | .delete_address = NULL, |
189 | .max_packet = BUF_SIZE | 138 | .max_packet = BUF_SIZE |
190 | }; | 139 | }; |
191 | |||
192 | /* | ||
193 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
194 | * Emacs will notice this stuff at the end of the file and automatically | ||
195 | * adjust the settings for this buffer only. This must remain at the end | ||
196 | * of the file. | ||
197 | * --------------------------------------------------------------------------- | ||
198 | * Local variables: | ||
199 | * c-file-style: "linux" | ||
200 | * End: | ||
201 | */ | ||
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index a2bac429f3d4..b32a77010fbe 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include "init.h" | 22 | #include "init.h" |
23 | #include "irq_user.h" | 23 | #include "irq_user.h" |
24 | #include "mconsole_kern.h" | 24 | #include "mconsole_kern.h" |
25 | #include "2_5compat.h" | ||
26 | 25 | ||
27 | static int ssl_version = 1; | 26 | static int ssl_version = 1; |
28 | 27 | ||
diff --git a/arch/um/drivers/stderr_console.c b/arch/um/drivers/stderr_console.c index 98565b53d170..429ae8e6c7e5 100644 --- a/arch/um/drivers/stderr_console.c +++ b/arch/um/drivers/stderr_console.c | |||
@@ -22,9 +22,9 @@ static void stderr_console_write(struct console *console, const char *string, | |||
22 | } | 22 | } |
23 | 23 | ||
24 | static struct console stderr_console = { | 24 | static struct console stderr_console = { |
25 | .name "stderr", | 25 | .name = "stderr", |
26 | .write stderr_console_write, | 26 | .write = stderr_console_write, |
27 | .flags CON_PRINTBUFFER, | 27 | .flags = CON_PRINTBUFFER, |
28 | }; | 28 | }; |
29 | 29 | ||
30 | static int __init stderr_console_init(void) | 30 | static int __init stderr_console_init(void) |
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 361d0be342b3..afbe1e71ed83 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c | |||
@@ -28,7 +28,6 @@ | |||
28 | #include "irq_user.h" | 28 | #include "irq_user.h" |
29 | #include "mconsole_kern.h" | 29 | #include "mconsole_kern.h" |
30 | #include "init.h" | 30 | #include "init.h" |
31 | #include "2_5compat.h" | ||
32 | 31 | ||
33 | #define MAX_TTYS (16) | 32 | #define MAX_TTYS (16) |
34 | 33 | ||
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 88f956c34fed..2a7f6892c55c 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -49,7 +49,6 @@ | |||
49 | #include "irq_user.h" | 49 | #include "irq_user.h" |
50 | #include "irq_kern.h" | 50 | #include "irq_kern.h" |
51 | #include "ubd_user.h" | 51 | #include "ubd_user.h" |
52 | #include "2_5compat.h" | ||
53 | #include "os.h" | 52 | #include "os.h" |
54 | #include "mem.h" | 53 | #include "mem.h" |
55 | #include "mem_kern.h" | 54 | #include "mem_kern.h" |
@@ -440,9 +439,9 @@ static int udb_setup(char *str) | |||
440 | __setup("udb", udb_setup); | 439 | __setup("udb", udb_setup); |
441 | __uml_help(udb_setup, | 440 | __uml_help(udb_setup, |
442 | "udb\n" | 441 | "udb\n" |
443 | " This option is here solely to catch ubd -> udb typos, which can be\n\n" | 442 | " This option is here solely to catch ubd -> udb typos, which can be\n" |
444 | " to impossible to catch visually unless you specifically look for\n\n" | 443 | " to impossible to catch visually unless you specifically look for\n" |
445 | " them. The only result of any option starting with 'udb' is an error\n\n" | 444 | " them. The only result of any option starting with 'udb' is an error\n" |
446 | " in the boot output.\n\n" | 445 | " in the boot output.\n\n" |
447 | ); | 446 | ); |
448 | 447 | ||
diff --git a/arch/um/include/2_5compat.h b/arch/um/include/2_5compat.h deleted file mode 100644 index abdb015a4d71..000000000000 --- a/arch/um/include/2_5compat.h +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __2_5_COMPAT_H__ | ||
7 | #define __2_5_COMPAT_H__ | ||
8 | |||
9 | #define INIT_HARDSECT(arr, maj, sizes) | ||
10 | |||
11 | #define SET_PRI(task) do ; while(0) | ||
12 | |||
13 | #endif | ||
14 | |||
15 | /* | ||
16 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
17 | * Emacs will notice this stuff at the end of the file and automatically | ||
18 | * adjust the settings for this buffer only. This must remain at the end | ||
19 | * of the file. | ||
20 | * --------------------------------------------------------------------------- | ||
21 | * Local variables: | ||
22 | * c-file-style: "linux" | ||
23 | * End: | ||
24 | */ | ||
diff --git a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h index 9fbe3083fdd8..cfa368e045a5 100644 --- a/arch/um/include/mconsole.h +++ b/arch/um/include/mconsole.h | |||
@@ -56,7 +56,7 @@ struct mc_request | |||
56 | int as_interrupt; | 56 | int as_interrupt; |
57 | 57 | ||
58 | int originating_fd; | 58 | int originating_fd; |
59 | int originlen; | 59 | unsigned int originlen; |
60 | unsigned char origin[128]; /* sockaddr_un */ | 60 | unsigned char origin[128]; /* sockaddr_un */ |
61 | 61 | ||
62 | struct mconsole_request request; | 62 | struct mconsole_request request; |
diff --git a/arch/um/include/net_user.h b/arch/um/include/net_user.h index 36807b796e9f..89885a77a771 100644 --- a/arch/um/include/net_user.h +++ b/arch/um/include/net_user.h | |||
@@ -35,7 +35,7 @@ extern void *get_output_buffer(int *len_out); | |||
35 | extern void free_output_buffer(void *buffer); | 35 | extern void free_output_buffer(void *buffer); |
36 | 36 | ||
37 | extern int tap_open_common(void *dev, char *gate_addr); | 37 | extern int tap_open_common(void *dev, char *gate_addr); |
38 | extern void tap_check_ips(char *gate_addr, char *eth_addr); | 38 | extern void tap_check_ips(char *gate_addr, unsigned char *eth_addr); |
39 | 39 | ||
40 | extern void read_output(int fd, char *output_out, int len); | 40 | extern void read_output(int fd, char *output_out, int len); |
41 | 41 | ||
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index d246d5a24609..881d2988d2d8 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -136,7 +136,7 @@ extern int os_seek_file(int fd, __u64 offset); | |||
136 | extern int os_open_file(char *file, struct openflags flags, int mode); | 136 | extern int os_open_file(char *file, struct openflags flags, int mode); |
137 | extern int os_read_file(int fd, void *buf, int len); | 137 | extern int os_read_file(int fd, void *buf, int len); |
138 | extern int os_write_file(int fd, const void *buf, int count); | 138 | extern int os_write_file(int fd, const void *buf, int count); |
139 | extern int os_file_size(char *file, long long *size_out); | 139 | extern int os_file_size(char *file, unsigned long long *size_out); |
140 | extern int os_file_modtime(char *file, unsigned long *modtime); | 140 | extern int os_file_modtime(char *file, unsigned long *modtime); |
141 | extern int os_pipe(int *fd, int stream, int close_on_exec); | 141 | extern int os_pipe(int *fd, int stream, int close_on_exec); |
142 | extern int os_set_fd_async(int fd, int owner); | 142 | extern int os_set_fd_async(int fd, int owner); |
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h index 6eaeb9919983..c8ee9559f3ab 100644 --- a/arch/um/include/sysdep-i386/ptrace.h +++ b/arch/um/include/sysdep-i386/ptrace.h | |||
@@ -8,6 +8,8 @@ | |||
8 | 8 | ||
9 | #include "uml-config.h" | 9 | #include "uml-config.h" |
10 | #include "user_constants.h" | 10 | #include "user_constants.h" |
11 | #include "sysdep/faultinfo.h" | ||
12 | #include "choose-mode.h" | ||
11 | 13 | ||
12 | #define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long)) | 14 | #define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long)) |
13 | #define MAX_REG_OFFSET (UM_FRAME_SIZE) | 15 | #define MAX_REG_OFFSET (UM_FRAME_SIZE) |
@@ -58,9 +60,6 @@ extern int sysemu_supported; | |||
58 | #define PTRACE_SYSEMU_SINGLESTEP 32 | 60 | #define PTRACE_SYSEMU_SINGLESTEP 32 |
59 | #endif | 61 | #endif |
60 | 62 | ||
61 | #include "sysdep/faultinfo.h" | ||
62 | #include "choose-mode.h" | ||
63 | |||
64 | union uml_pt_regs { | 63 | union uml_pt_regs { |
65 | #ifdef UML_CONFIG_MODE_TT | 64 | #ifdef UML_CONFIG_MODE_TT |
66 | struct tt_regs { | 65 | struct tt_regs { |
diff --git a/arch/um/include/sysrq.h b/arch/um/include/sysrq.h index 2ce9423460b3..c8d332b56b98 100644 --- a/arch/um/include/sysrq.h +++ b/arch/um/include/sysrq.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __UM_SYSRQ_H | 1 | #ifndef __UM_SYSRQ_H |
2 | #define __UM_SYSRQ_H | 2 | #define __UM_SYSRQ_H |
3 | 3 | ||
4 | extern void show_trace(unsigned long *stack); | 4 | struct task_struct; |
5 | extern void show_trace(struct task_struct* task, unsigned long *stack); | ||
5 | 6 | ||
6 | #endif | 7 | #endif |
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index b8c5b8a95250..7b6a24dfd302 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h | |||
@@ -41,9 +41,6 @@ extern unsigned long highmem; | |||
41 | extern char host_info[]; | 41 | extern char host_info[]; |
42 | 42 | ||
43 | extern char saved_command_line[]; | 43 | extern char saved_command_line[]; |
44 | extern char command_line[]; | ||
45 | |||
46 | extern char *tempdir; | ||
47 | 44 | ||
48 | extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end; | 45 | extern unsigned long _stext, _etext, _sdata, _edata, __bss_start, _end; |
49 | extern unsigned long _unprotected_end; | 46 | extern unsigned long _unprotected_end; |
diff --git a/arch/um/kernel/exec_kern.c b/arch/um/kernel/exec_kern.c index 49ddabe69be7..efd222ffe20e 100644 --- a/arch/um/kernel/exec_kern.c +++ b/arch/um/kernel/exec_kern.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include "kern.h" | 16 | #include "kern.h" |
17 | #include "irq_user.h" | 17 | #include "irq_user.h" |
18 | #include "tlb.h" | 18 | #include "tlb.h" |
19 | #include "2_5compat.h" | ||
20 | #include "os.h" | 19 | #include "os.h" |
21 | #include "time_user.h" | 20 | #include "time_user.h" |
22 | #include "choose-mode.h" | 21 | #include "choose-mode.h" |
diff --git a/arch/um/kernel/initrd_kern.c b/arch/um/kernel/initrd_kern.c deleted file mode 100644 index fc568af468b9..000000000000 --- a/arch/um/kernel/initrd_kern.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "linux/init.h" | ||
7 | #include "linux/bootmem.h" | ||
8 | #include "linux/initrd.h" | ||
9 | #include "asm/types.h" | ||
10 | #include "user_util.h" | ||
11 | #include "kern_util.h" | ||
12 | #include "initrd.h" | ||
13 | #include "init.h" | ||
14 | #include "os.h" | ||
15 | |||
16 | /* Changed by uml_initrd_setup, which is a setup */ | ||
17 | static char *initrd __initdata = NULL; | ||
18 | |||
19 | static int __init read_initrd(void) | ||
20 | { | ||
21 | void *area; | ||
22 | long long size; | ||
23 | int err; | ||
24 | |||
25 | if(initrd == NULL) return 0; | ||
26 | err = os_file_size(initrd, &size); | ||
27 | if(err) return 0; | ||
28 | area = alloc_bootmem(size); | ||
29 | if(area == NULL) return 0; | ||
30 | if(load_initrd(initrd, area, size) == -1) return 0; | ||
31 | initrd_start = (unsigned long) area; | ||
32 | initrd_end = initrd_start + size; | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | __uml_postsetup(read_initrd); | ||
37 | |||
38 | static int __init uml_initrd_setup(char *line, int *add) | ||
39 | { | ||
40 | initrd = line; | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | __uml_setup("initrd=", uml_initrd_setup, | ||
45 | "initrd=<initrd image>\n" | ||
46 | " This is used to boot UML from an initrd image. The argument is the\n" | ||
47 | " name of the file containing the image.\n\n" | ||
48 | ); | ||
49 | |||
50 | /* | ||
51 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
52 | * Emacs will notice this stuff at the end of the file and automatically | ||
53 | * adjust the settings for this buffer only. This must remain at the end | ||
54 | * of the file. | ||
55 | * --------------------------------------------------------------------------- | ||
56 | * Local variables: | ||
57 | * c-file-style: "linux" | ||
58 | * End: | ||
59 | */ | ||
diff --git a/arch/um/kernel/initrd_user.c b/arch/um/kernel/initrd_user.c deleted file mode 100644 index cb90681e151c..000000000000 --- a/arch/um/kernel/initrd_user.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <unistd.h> | ||
7 | #include <sys/types.h> | ||
8 | #include <sys/stat.h> | ||
9 | #include <errno.h> | ||
10 | |||
11 | #include "user_util.h" | ||
12 | #include "kern_util.h" | ||
13 | #include "user.h" | ||
14 | #include "initrd.h" | ||
15 | #include "os.h" | ||
16 | |||
17 | int load_initrd(char *filename, void *buf, int size) | ||
18 | { | ||
19 | int fd, n; | ||
20 | |||
21 | fd = os_open_file(filename, of_read(OPENFLAGS()), 0); | ||
22 | if(fd < 0){ | ||
23 | printk("Opening '%s' failed - err = %d\n", filename, -fd); | ||
24 | return(-1); | ||
25 | } | ||
26 | n = os_read_file(fd, buf, size); | ||
27 | if(n != size){ | ||
28 | printk("Read of %d bytes from '%s' failed, err = %d\n", size, | ||
29 | filename, -n); | ||
30 | return(-1); | ||
31 | } | ||
32 | |||
33 | os_close_file(fd); | ||
34 | return(0); | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
39 | * Emacs will notice this stuff at the end of the file and automatically | ||
40 | * adjust the settings for this buffer only. This must remain at the end | ||
41 | * of the file. | ||
42 | * --------------------------------------------------------------------------- | ||
43 | * Local variables: | ||
44 | * c-file-style: "linux" | ||
45 | * End: | ||
46 | */ | ||
diff --git a/arch/um/kernel/main.c b/arch/um/kernel/main.c index a17c49703f9b..e59f58152678 100644 --- a/arch/um/kernel/main.c +++ b/arch/um/kernel/main.c | |||
@@ -24,8 +24,6 @@ | |||
24 | #include "mode.h" | 24 | #include "mode.h" |
25 | #include "choose-mode.h" | 25 | #include "choose-mode.h" |
26 | #include "uml-config.h" | 26 | #include "uml-config.h" |
27 | #include "irq_user.h" | ||
28 | #include "time_user.h" | ||
29 | #include "os.h" | 27 | #include "os.h" |
30 | 28 | ||
31 | /* Set in set_stklim, which is called from main and __wrap_malloc. | 29 | /* Set in set_stklim, which is called from main and __wrap_malloc. |
@@ -71,7 +69,7 @@ static __init void do_uml_initcalls(void) | |||
71 | 69 | ||
72 | static void last_ditch_exit(int sig) | 70 | static void last_ditch_exit(int sig) |
73 | { | 71 | { |
74 | CHOOSE_MODE(kmalloc_ok = 0, (void) 0); | 72 | kmalloc_ok = 0; |
75 | signal(SIGINT, SIG_DFL); | 73 | signal(SIGINT, SIG_DFL); |
76 | signal(SIGTERM, SIG_DFL); | 74 | signal(SIGTERM, SIG_DFL); |
77 | signal(SIGHUP, SIG_DFL); | 75 | signal(SIGHUP, SIG_DFL); |
@@ -87,7 +85,7 @@ int main(int argc, char **argv, char **envp) | |||
87 | { | 85 | { |
88 | char **new_argv; | 86 | char **new_argv; |
89 | sigset_t mask; | 87 | sigset_t mask; |
90 | int ret, i; | 88 | int ret, i, err; |
91 | 89 | ||
92 | /* Enable all signals except SIGIO - in some environments, we can | 90 | /* Enable all signals except SIGIO - in some environments, we can |
93 | * enter with some signals blocked | 91 | * enter with some signals blocked |
@@ -160,27 +158,29 @@ int main(int argc, char **argv, char **envp) | |||
160 | */ | 158 | */ |
161 | change_sig(SIGPROF, 0); | 159 | change_sig(SIGPROF, 0); |
162 | 160 | ||
163 | /* Reboot */ | 161 | /* This signal stuff used to be in the reboot case. However, |
164 | if(ret){ | 162 | * sometimes a SIGVTALRM can come in when we're halting (reproducably |
165 | int err; | 163 | * when writing out gcov information, presumably because that takes |
164 | * some time) and cause a segfault. | ||
165 | */ | ||
166 | 166 | ||
167 | printf("\n"); | 167 | /* stop timers and set SIG*ALRM to be ignored */ |
168 | disable_timer(); | ||
168 | 169 | ||
169 | /* stop timers and set SIG*ALRM to be ignored */ | 170 | /* disable SIGIO for the fds and set SIGIO to be ignored */ |
170 | disable_timer(); | 171 | err = deactivate_all_fds(); |
172 | if(err) | ||
173 | printf("deactivate_all_fds failed, errno = %d\n", -err); | ||
171 | 174 | ||
172 | /* disable SIGIO for the fds and set SIGIO to be ignored */ | 175 | /* Let any pending signals fire now. This ensures |
173 | err = deactivate_all_fds(); | 176 | * that they won't be delivered after the exec, when |
174 | if(err) | 177 | * they are definitely not expected. |
175 | printf("deactivate_all_fds failed, errno = %d\n", | 178 | */ |
176 | -err); | 179 | unblock_signals(); |
177 | |||
178 | /* Let any pending signals fire now. This ensures | ||
179 | * that they won't be delivered after the exec, when | ||
180 | * they are definitely not expected. | ||
181 | */ | ||
182 | unblock_signals(); | ||
183 | 180 | ||
181 | /* Reboot */ | ||
182 | if(ret){ | ||
183 | printf("\n"); | ||
184 | execvp(new_argv[0], new_argv); | 184 | execvp(new_argv[0], new_argv); |
185 | perror("Failed to exec kernel"); | 185 | perror("Failed to exec kernel"); |
186 | ret = 1; | 186 | ret = 1; |
diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c index 51f8e5a8ac6a..1b5ef3e96c71 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/kernel/process.c | |||
@@ -30,7 +30,6 @@ | |||
30 | #include "init.h" | 30 | #include "init.h" |
31 | #include "os.h" | 31 | #include "os.h" |
32 | #include "uml-config.h" | 32 | #include "uml-config.h" |
33 | #include "ptrace_user.h" | ||
34 | #include "choose-mode.h" | 33 | #include "choose-mode.h" |
35 | #include "mode.h" | 34 | #include "mode.h" |
36 | #ifdef UML_CONFIG_MODE_SKAS | 35 | #ifdef UML_CONFIG_MODE_SKAS |
@@ -131,7 +130,7 @@ int start_fork_tramp(void *thread_arg, unsigned long temp_stack, | |||
131 | return(arg.pid); | 130 | return(arg.pid); |
132 | } | 131 | } |
133 | 132 | ||
134 | static int ptrace_child(void *arg) | 133 | static int ptrace_child(void) |
135 | { | 134 | { |
136 | int ret; | 135 | int ret; |
137 | int pid = os_getpid(), ppid = getppid(); | 136 | int pid = os_getpid(), ppid = getppid(); |
@@ -160,20 +159,16 @@ static int ptrace_child(void *arg) | |||
160 | _exit(ret); | 159 | _exit(ret); |
161 | } | 160 | } |
162 | 161 | ||
163 | static int start_ptraced_child(void **stack_out) | 162 | static int start_ptraced_child(void) |
164 | { | 163 | { |
165 | void *stack; | ||
166 | unsigned long sp; | ||
167 | int pid, n, status; | 164 | int pid, n, status; |
168 | 165 | ||
169 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, | 166 | pid = fork(); |
170 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); | 167 | if(pid == 0) |
171 | if(stack == MAP_FAILED) | 168 | ptrace_child(); |
172 | panic("check_ptrace : mmap failed, errno = %d", errno); | 169 | |
173 | sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); | ||
174 | pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); | ||
175 | if(pid < 0) | 170 | if(pid < 0) |
176 | panic("check_ptrace : clone failed, errno = %d", errno); | 171 | panic("check_ptrace : fork failed, errno = %d", errno); |
177 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 172 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
178 | if(n < 0) | 173 | if(n < 0) |
179 | panic("check_ptrace : wait failed, errno = %d", errno); | 174 | panic("check_ptrace : wait failed, errno = %d", errno); |
@@ -181,7 +176,6 @@ static int start_ptraced_child(void **stack_out) | |||
181 | panic("check_ptrace : expected SIGSTOP, got status = %d", | 176 | panic("check_ptrace : expected SIGSTOP, got status = %d", |
182 | status); | 177 | status); |
183 | 178 | ||
184 | *stack_out = stack; | ||
185 | return(pid); | 179 | return(pid); |
186 | } | 180 | } |
187 | 181 | ||
@@ -189,12 +183,12 @@ static int start_ptraced_child(void **stack_out) | |||
189 | * just avoid using sysemu, not panic, but only if SYSEMU features are broken. | 183 | * just avoid using sysemu, not panic, but only if SYSEMU features are broken. |
190 | * So only for SYSEMU features we test mustpanic, while normal host features | 184 | * So only for SYSEMU features we test mustpanic, while normal host features |
191 | * must work anyway!*/ | 185 | * must work anyway!*/ |
192 | static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) | 186 | static int stop_ptraced_child(int pid, int exitcode, int mustexit) |
193 | { | 187 | { |
194 | int status, n, ret = 0; | 188 | int status, n, ret = 0; |
195 | 189 | ||
196 | if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) | 190 | if(ptrace(PTRACE_CONT, pid, 0, 0) < 0) |
197 | panic("check_ptrace : ptrace failed, errno = %d", errno); | 191 | panic("stop_ptraced_child : ptrace failed, errno = %d", errno); |
198 | CATCH_EINTR(n = waitpid(pid, &status, 0)); | 192 | CATCH_EINTR(n = waitpid(pid, &status, 0)); |
199 | if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { | 193 | if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { |
200 | int exit_with = WEXITSTATUS(status); | 194 | int exit_with = WEXITSTATUS(status); |
@@ -205,15 +199,13 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) | |||
205 | printk("check_ptrace : child exited with exitcode %d, while " | 199 | printk("check_ptrace : child exited with exitcode %d, while " |
206 | "expecting %d; status 0x%x", exit_with, | 200 | "expecting %d; status 0x%x", exit_with, |
207 | exitcode, status); | 201 | exitcode, status); |
208 | if (mustpanic) | 202 | if (mustexit) |
209 | panic("\n"); | 203 | panic("\n"); |
210 | else | 204 | else |
211 | printk("\n"); | 205 | printk("\n"); |
212 | ret = -1; | 206 | ret = -1; |
213 | } | 207 | } |
214 | 208 | ||
215 | if(munmap(stack, PAGE_SIZE) < 0) | ||
216 | panic("check_ptrace : munmap failed, errno = %d", errno); | ||
217 | return ret; | 209 | return ret; |
218 | } | 210 | } |
219 | 211 | ||
@@ -235,12 +227,11 @@ __uml_setup("nosysemu", nosysemu_cmd_param, | |||
235 | 227 | ||
236 | static void __init check_sysemu(void) | 228 | static void __init check_sysemu(void) |
237 | { | 229 | { |
238 | void *stack; | ||
239 | int pid, syscall, n, status, count=0; | 230 | int pid, syscall, n, status, count=0; |
240 | 231 | ||
241 | printk("Checking syscall emulation patch for ptrace..."); | 232 | printk("Checking syscall emulation patch for ptrace..."); |
242 | sysemu_supported = 0; | 233 | sysemu_supported = 0; |
243 | pid = start_ptraced_child(&stack); | 234 | pid = start_ptraced_child(); |
244 | 235 | ||
245 | if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) | 236 | if(ptrace(PTRACE_SYSEMU, pid, 0, 0) < 0) |
246 | goto fail; | 237 | goto fail; |
@@ -258,7 +249,7 @@ static void __init check_sysemu(void) | |||
258 | panic("check_sysemu : failed to modify system " | 249 | panic("check_sysemu : failed to modify system " |
259 | "call return, errno = %d", errno); | 250 | "call return, errno = %d", errno); |
260 | 251 | ||
261 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) | 252 | if (stop_ptraced_child(pid, 0, 0) < 0) |
262 | goto fail_stopped; | 253 | goto fail_stopped; |
263 | 254 | ||
264 | sysemu_supported = 1; | 255 | sysemu_supported = 1; |
@@ -266,7 +257,7 @@ static void __init check_sysemu(void) | |||
266 | set_using_sysemu(!force_sysemu_disabled); | 257 | set_using_sysemu(!force_sysemu_disabled); |
267 | 258 | ||
268 | printk("Checking advanced syscall emulation patch for ptrace..."); | 259 | printk("Checking advanced syscall emulation patch for ptrace..."); |
269 | pid = start_ptraced_child(&stack); | 260 | pid = start_ptraced_child(); |
270 | while(1){ | 261 | while(1){ |
271 | count++; | 262 | count++; |
272 | if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) | 263 | if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) |
@@ -291,7 +282,7 @@ static void __init check_sysemu(void) | |||
291 | break; | 282 | break; |
292 | } | 283 | } |
293 | } | 284 | } |
294 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) | 285 | if (stop_ptraced_child(pid, 0, 0) < 0) |
295 | goto fail_stopped; | 286 | goto fail_stopped; |
296 | 287 | ||
297 | sysemu_supported = 2; | 288 | sysemu_supported = 2; |
@@ -302,18 +293,17 @@ static void __init check_sysemu(void) | |||
302 | return; | 293 | return; |
303 | 294 | ||
304 | fail: | 295 | fail: |
305 | stop_ptraced_child(pid, stack, 1, 0); | 296 | stop_ptraced_child(pid, 1, 0); |
306 | fail_stopped: | 297 | fail_stopped: |
307 | printk("missing\n"); | 298 | printk("missing\n"); |
308 | } | 299 | } |
309 | 300 | ||
310 | void __init check_ptrace(void) | 301 | void __init check_ptrace(void) |
311 | { | 302 | { |
312 | void *stack; | ||
313 | int pid, syscall, n, status; | 303 | int pid, syscall, n, status; |
314 | 304 | ||
315 | printk("Checking that ptrace can change system call numbers..."); | 305 | printk("Checking that ptrace can change system call numbers..."); |
316 | pid = start_ptraced_child(&stack); | 306 | pid = start_ptraced_child(); |
317 | 307 | ||
318 | if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) | 308 | if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) |
319 | panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno); | 309 | panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno); |
@@ -340,7 +330,7 @@ void __init check_ptrace(void) | |||
340 | break; | 330 | break; |
341 | } | 331 | } |
342 | } | 332 | } |
343 | stop_ptraced_child(pid, stack, 0, 1); | 333 | stop_ptraced_child(pid, 0, 1); |
344 | printk("OK\n"); | 334 | printk("OK\n"); |
345 | check_sysemu(); | 335 | check_sysemu(); |
346 | } | 336 | } |
@@ -372,11 +362,10 @@ void forward_pending_sigio(int target) | |||
372 | static inline int check_skas3_ptrace_support(void) | 362 | static inline int check_skas3_ptrace_support(void) |
373 | { | 363 | { |
374 | struct ptrace_faultinfo fi; | 364 | struct ptrace_faultinfo fi; |
375 | void *stack; | ||
376 | int pid, n, ret = 1; | 365 | int pid, n, ret = 1; |
377 | 366 | ||
378 | printf("Checking for the skas3 patch in the host..."); | 367 | printf("Checking for the skas3 patch in the host..."); |
379 | pid = start_ptraced_child(&stack); | 368 | pid = start_ptraced_child(); |
380 | 369 | ||
381 | n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); | 370 | n = ptrace(PTRACE_FAULTINFO, pid, 0, &fi); |
382 | if (n < 0) { | 371 | if (n < 0) { |
@@ -391,7 +380,7 @@ static inline int check_skas3_ptrace_support(void) | |||
391 | } | 380 | } |
392 | 381 | ||
393 | init_registers(pid); | 382 | init_registers(pid); |
394 | stop_ptraced_child(pid, stack, 1, 1); | 383 | stop_ptraced_child(pid, 1, 1); |
395 | 384 | ||
396 | return(ret); | 385 | return(ret); |
397 | } | 386 | } |
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index c1adf7ba3fd1..804c6bbdf67c 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
@@ -43,7 +43,6 @@ | |||
43 | #include "tlb.h" | 43 | #include "tlb.h" |
44 | #include "frame_kern.h" | 44 | #include "frame_kern.h" |
45 | #include "sigcontext.h" | 45 | #include "sigcontext.h" |
46 | #include "2_5compat.h" | ||
47 | #include "os.h" | 46 | #include "os.h" |
48 | #include "mode.h" | 47 | #include "mode.h" |
49 | #include "mode_kern.h" | 48 | #include "mode_kern.h" |
@@ -55,18 +54,6 @@ | |||
55 | */ | 54 | */ |
56 | struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } }; | 55 | struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } }; |
57 | 56 | ||
58 | struct task_struct *get_task(int pid, int require) | ||
59 | { | ||
60 | struct task_struct *ret; | ||
61 | |||
62 | read_lock(&tasklist_lock); | ||
63 | ret = find_task_by_pid(pid); | ||
64 | read_unlock(&tasklist_lock); | ||
65 | |||
66 | if(require && (ret == NULL)) panic("get_task couldn't find a task\n"); | ||
67 | return(ret); | ||
68 | } | ||
69 | |||
70 | int external_pid(void *t) | 57 | int external_pid(void *t) |
71 | { | 58 | { |
72 | struct task_struct *task = t ? t : current; | 59 | struct task_struct *task = t ? t : current; |
@@ -189,7 +176,6 @@ void default_idle(void) | |||
189 | 176 | ||
190 | while(1){ | 177 | while(1){ |
191 | /* endless idle loop with no priority at all */ | 178 | /* endless idle loop with no priority at all */ |
192 | SET_PRI(current); | ||
193 | 179 | ||
194 | /* | 180 | /* |
195 | * although we are an idle CPU, we do not want to | 181 | * although we are an idle CPU, we do not want to |
@@ -212,11 +198,6 @@ int page_size(void) | |||
212 | return(PAGE_SIZE); | 198 | return(PAGE_SIZE); |
213 | } | 199 | } |
214 | 200 | ||
215 | unsigned long page_mask(void) | ||
216 | { | ||
217 | return(PAGE_MASK); | ||
218 | } | ||
219 | |||
220 | void *um_virt_to_phys(struct task_struct *task, unsigned long addr, | 201 | void *um_virt_to_phys(struct task_struct *task, unsigned long addr, |
221 | pte_t *pte_out) | 202 | pte_t *pte_out) |
222 | { | 203 | { |
@@ -349,11 +330,6 @@ char *uml_strdup(char *string) | |||
349 | return(new); | 330 | return(new); |
350 | } | 331 | } |
351 | 332 | ||
352 | void *get_init_task(void) | ||
353 | { | ||
354 | return(&init_thread_union.thread_info.task); | ||
355 | } | ||
356 | |||
357 | int copy_to_user_proc(void __user *to, void *from, int size) | 333 | int copy_to_user_proc(void __user *to, void *from, int size) |
358 | { | 334 | { |
359 | return(copy_to_user(to, from, size)); | 335 | return(copy_to_user(to, from, size)); |
@@ -480,15 +456,3 @@ unsigned long arch_align_stack(unsigned long sp) | |||
480 | return sp & ~0xf; | 456 | return sp & ~0xf; |
481 | } | 457 | } |
482 | #endif | 458 | #endif |
483 | |||
484 | |||
485 | /* | ||
486 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
487 | * Emacs will notice this stuff at the end of the file and automatically | ||
488 | * adjust the settings for this buffer only. This must remain at the end | ||
489 | * of the file. | ||
490 | * --------------------------------------------------------------------------- | ||
491 | * Local variables: | ||
492 | * c-file-style: "linux" | ||
493 | * End: | ||
494 | */ | ||
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c index 2925e15324de..71af4d503899 100644 --- a/arch/um/kernel/ptrace.c +++ b/arch/um/kernel/ptrace.c | |||
@@ -322,11 +322,9 @@ void syscall_trace(union uml_pt_regs *regs, int entryexit) | |||
322 | UPT_SYSCALL_ARG2(regs), | 322 | UPT_SYSCALL_ARG2(regs), |
323 | UPT_SYSCALL_ARG3(regs), | 323 | UPT_SYSCALL_ARG3(regs), |
324 | UPT_SYSCALL_ARG4(regs)); | 324 | UPT_SYSCALL_ARG4(regs)); |
325 | else { | 325 | else audit_syscall_exit(current, |
326 | int res = UPT_SYSCALL_RET(regs); | 326 | AUDITSC_RESULT(UPT_SYSCALL_RET(regs)), |
327 | audit_syscall_exit(current, AUDITSC_RESULT(res), | 327 | UPT_SYSCALL_RET(regs)); |
328 | res); | ||
329 | } | ||
330 | } | 328 | } |
331 | 329 | ||
332 | /* Fake a debug trap */ | 330 | /* Fake a debug trap */ |
@@ -356,14 +354,3 @@ void syscall_trace(union uml_pt_regs *regs, int entryexit) | |||
356 | current->exit_code = 0; | 354 | current->exit_code = 0; |
357 | } | 355 | } |
358 | } | 356 | } |
359 | |||
360 | /* | ||
361 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
362 | * Emacs will notice this stuff at the end of the file and automatically | ||
363 | * adjust the settings for this buffer only. This must remain at the end | ||
364 | * of the file. | ||
365 | * --------------------------------------------------------------------------- | ||
366 | * Local variables: | ||
367 | * c-file-style: "linux" | ||
368 | * End: | ||
369 | */ | ||
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index ab5d3271da0b..fc71ef295782 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
@@ -68,8 +68,11 @@ void new_thread_handler(int sig) | |||
68 | * 0 if it just exits | 68 | * 0 if it just exits |
69 | */ | 69 | */ |
70 | n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf); | 70 | n = run_kernel_thread(fn, arg, ¤t->thread.exec_buf); |
71 | if(n == 1) | 71 | if(n == 1){ |
72 | /* Handle any immediate reschedules or signals */ | ||
73 | interrupt_end(); | ||
72 | userspace(¤t->thread.regs.regs); | 74 | userspace(¤t->thread.regs.regs); |
75 | } | ||
73 | else do_exit(0); | 76 | else do_exit(0); |
74 | } | 77 | } |
75 | 78 | ||
@@ -96,6 +99,8 @@ void fork_handler(int sig) | |||
96 | schedule_tail(current->thread.prev_sched); | 99 | schedule_tail(current->thread.prev_sched); |
97 | current->thread.prev_sched = NULL; | 100 | current->thread.prev_sched = NULL; |
98 | 101 | ||
102 | /* Handle any immediate reschedules or signals */ | ||
103 | interrupt_end(); | ||
99 | userspace(¤t->thread.regs.regs); | 104 | userspace(¤t->thread.regs.regs); |
100 | } | 105 | } |
101 | 106 | ||
diff --git a/arch/um/kernel/sysrq.c b/arch/um/kernel/sysrq.c index e630438f9e73..f80850091e79 100644 --- a/arch/um/kernel/sysrq.c +++ b/arch/um/kernel/sysrq.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
6 | #include "linux/sched.h" | 7 | #include "linux/sched.h" |
7 | #include "linux/kernel.h" | 8 | #include "linux/kernel.h" |
8 | #include "linux/module.h" | 9 | #include "linux/module.h" |
@@ -12,14 +13,14 @@ | |||
12 | #include "sysrq.h" | 13 | #include "sysrq.h" |
13 | #include "user_util.h" | 14 | #include "user_util.h" |
14 | 15 | ||
15 | void show_trace(unsigned long * stack) | 16 | /* Catch non-i386 SUBARCH's. */ |
17 | #if !defined(CONFIG_UML_X86) || defined(CONFIG_64BIT) | ||
18 | void show_trace(struct task_struct *task, unsigned long * stack) | ||
16 | { | 19 | { |
17 | /* XXX: Copy the CONFIG_FRAME_POINTER stack-walking backtrace from | ||
18 | * arch/i386/kernel/traps.c, and then move this to sys-i386/sysrq.c.*/ | ||
19 | unsigned long addr; | 20 | unsigned long addr; |
20 | 21 | ||
21 | if (!stack) { | 22 | if (!stack) { |
22 | stack = (unsigned long*) &stack; | 23 | stack = (unsigned long*) &stack; |
23 | WARN_ON(1); | 24 | WARN_ON(1); |
24 | } | 25 | } |
25 | 26 | ||
@@ -35,6 +36,7 @@ void show_trace(unsigned long * stack) | |||
35 | } | 36 | } |
36 | printk("\n"); | 37 | printk("\n"); |
37 | } | 38 | } |
39 | #endif | ||
38 | 40 | ||
39 | /* | 41 | /* |
40 | * stack dumps generator - this is used by arch-independent code. | 42 | * stack dumps generator - this is used by arch-independent code. |
@@ -44,7 +46,7 @@ void dump_stack(void) | |||
44 | { | 46 | { |
45 | unsigned long stack; | 47 | unsigned long stack; |
46 | 48 | ||
47 | show_trace(&stack); | 49 | show_trace(current, &stack); |
48 | } | 50 | } |
49 | EXPORT_SYMBOL(dump_stack); | 51 | EXPORT_SYMBOL(dump_stack); |
50 | 52 | ||
@@ -59,7 +61,11 @@ void show_stack(struct task_struct *task, unsigned long *esp) | |||
59 | int i; | 61 | int i; |
60 | 62 | ||
61 | if (esp == NULL) { | 63 | if (esp == NULL) { |
62 | if (task != current) { | 64 | if (task != current && task != NULL) { |
65 | /* XXX: Isn't this bogus? I.e. isn't this the | ||
66 | * *userspace* stack of this task? If not so, use this | ||
67 | * even when task == current (as in i386). | ||
68 | */ | ||
63 | esp = (unsigned long *) KSTK_ESP(task); | 69 | esp = (unsigned long *) KSTK_ESP(task); |
64 | /* Which one? No actual difference - just coding style.*/ | 70 | /* Which one? No actual difference - just coding style.*/ |
65 | //esp = (unsigned long *) PT_REGS_IP(&task->thread.regs); | 71 | //esp = (unsigned long *) PT_REGS_IP(&task->thread.regs); |
@@ -77,5 +83,6 @@ void show_stack(struct task_struct *task, unsigned long *esp) | |||
77 | printk("%08lx ", *stack++); | 83 | printk("%08lx ", *stack++); |
78 | } | 84 | } |
79 | 85 | ||
80 | show_trace(esp); | 86 | printk("Call Trace: \n"); |
87 | show_trace(current, esp); | ||
81 | } | 88 | } |
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c index 1de22d8a313a..c20aef120598 100644 --- a/arch/um/kernel/trap_kern.c +++ b/arch/um/kernel/trap_kern.c | |||
@@ -23,7 +23,6 @@ | |||
23 | #include "kern.h" | 23 | #include "kern.h" |
24 | #include "chan_kern.h" | 24 | #include "chan_kern.h" |
25 | #include "mconsole_kern.h" | 25 | #include "mconsole_kern.h" |
26 | #include "2_5compat.h" | ||
27 | #include "mem.h" | 26 | #include "mem.h" |
28 | #include "mem_kern.h" | 27 | #include "mem_kern.h" |
29 | 28 | ||
diff --git a/arch/um/kernel/tt/process_kern.c b/arch/um/kernel/tt/process_kern.c index df810ca8fc12..776310fd5b8b 100644 --- a/arch/um/kernel/tt/process_kern.c +++ b/arch/um/kernel/tt/process_kern.c | |||
@@ -32,10 +32,6 @@ void *switch_to_tt(void *prev, void *next, void *last) | |||
32 | unsigned long flags; | 32 | unsigned long flags; |
33 | int err, vtalrm, alrm, prof, cpu; | 33 | int err, vtalrm, alrm, prof, cpu; |
34 | char c; | 34 | char c; |
35 | /* jailing and SMP are incompatible, so this doesn't need to be | ||
36 | * made per-cpu | ||
37 | */ | ||
38 | static int reading; | ||
39 | 35 | ||
40 | from = prev; | 36 | from = prev; |
41 | to = next; | 37 | to = next; |
@@ -59,13 +55,11 @@ void *switch_to_tt(void *prev, void *next, void *last) | |||
59 | c = 0; | 55 | c = 0; |
60 | set_current(to); | 56 | set_current(to); |
61 | 57 | ||
62 | reading = 0; | ||
63 | err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); | 58 | err = os_write_file(to->thread.mode.tt.switch_pipe[1], &c, sizeof(c)); |
64 | if(err != sizeof(c)) | 59 | if(err != sizeof(c)) |
65 | panic("write of switch_pipe failed, err = %d", -err); | 60 | panic("write of switch_pipe failed, err = %d", -err); |
66 | 61 | ||
67 | reading = 1; | 62 | if(from->thread.mode.tt.switch_pipe[0] == -1) |
68 | if(from->thread.mode.tt.switch_pipe[0] == -1) | ||
69 | os_kill_process(os_getpid(), 0); | 63 | os_kill_process(os_getpid(), 0); |
70 | 64 | ||
71 | err = os_read_file(from->thread.mode.tt.switch_pipe[0], &c, sizeof(c)); | 65 | err = os_read_file(from->thread.mode.tt.switch_pipe[0], &c, sizeof(c)); |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 4d10ec372a67..8736d098f0ee 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include "asm/setup.h" | 26 | #include "asm/setup.h" |
27 | #include "ubd_user.h" | 27 | #include "ubd_user.h" |
28 | #include "asm/current.h" | 28 | #include "asm/current.h" |
29 | #include "asm/setup.h" | ||
30 | #include "user_util.h" | 29 | #include "user_util.h" |
31 | #include "kern_util.h" | 30 | #include "kern_util.h" |
32 | #include "kern.h" | 31 | #include "kern.h" |
@@ -111,12 +110,6 @@ struct seq_operations cpuinfo_op = { | |||
111 | .show = show_cpuinfo, | 110 | .show = show_cpuinfo, |
112 | }; | 111 | }; |
113 | 112 | ||
114 | pte_t * __bad_pagetable(void) | ||
115 | { | ||
116 | panic("Someone should implement __bad_pagetable"); | ||
117 | return(NULL); | ||
118 | } | ||
119 | |||
120 | /* Set in linux_main */ | 113 | /* Set in linux_main */ |
121 | unsigned long host_task_size; | 114 | unsigned long host_task_size; |
122 | unsigned long task_size; | 115 | unsigned long task_size; |
diff --git a/arch/um/os-Linux/elf_aux.c b/arch/um/os-Linux/elf_aux.c index 9aee0b62ebca..f0d6060e3e57 100644 --- a/arch/um/os-Linux/elf_aux.c +++ b/arch/um/os-Linux/elf_aux.c | |||
@@ -45,7 +45,11 @@ __init void scan_elf_aux( char **envp) | |||
45 | elf_aux_hwcap = auxv->a_un.a_val; | 45 | elf_aux_hwcap = auxv->a_un.a_val; |
46 | break; | 46 | break; |
47 | case AT_PLATFORM: | 47 | case AT_PLATFORM: |
48 | elf_aux_platform = auxv->a_un.a_ptr; | 48 | /* elf.h removed the pointer elements from |
49 | * a_un, so we have to use a_val, which is | ||
50 | * all that's left. | ||
51 | */ | ||
52 | elf_aux_platform = (char *) auxv->a_un.a_val; | ||
49 | break; | 53 | break; |
50 | case AT_PAGESZ: | 54 | case AT_PAGESZ: |
51 | page_size = auxv->a_un.a_val; | 55 | page_size = auxv->a_un.a_val; |
diff --git a/arch/um/os-Linux/file.c b/arch/um/os-Linux/file.c index 77d4066d1af8..fd45bb260907 100644 --- a/arch/um/os-Linux/file.c +++ b/arch/um/os-Linux/file.c | |||
@@ -363,7 +363,7 @@ int os_write_file(int fd, const void *buf, int len) | |||
363 | (int (*)(int, void *, int)) write, copy_to_user_proc)); | 363 | (int (*)(int, void *, int)) write, copy_to_user_proc)); |
364 | } | 364 | } |
365 | 365 | ||
366 | int os_file_size(char *file, long long *size_out) | 366 | int os_file_size(char *file, unsigned long long *size_out) |
367 | { | 367 | { |
368 | struct uml_stat buf; | 368 | struct uml_stat buf; |
369 | int err; | 369 | int err; |
diff --git a/arch/um/scripts/Makefile.rules b/arch/um/scripts/Makefile.rules index 0b2491883d9c..98346c711493 100644 --- a/arch/um/scripts/Makefile.rules +++ b/arch/um/scripts/Makefile.rules | |||
@@ -14,7 +14,7 @@ quiet_cmd_make_link = SYMLINK $@ | |||
14 | cmd_make_link = ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@ | 14 | cmd_make_link = ln -sf $(srctree)/arch/$(SUBARCH)/$($(notdir $@)-dir)/$(notdir $@) $@ |
15 | 15 | ||
16 | # this needs to be before the foreach, because targets does not accept | 16 | # this needs to be before the foreach, because targets does not accept |
17 | # complete paths like $(obj)/$(f). To make sure this works, use a := assignment, | 17 | # complete paths like $(obj)/$(f). To make sure this works, use a := assignment |
18 | # or we will get $(obj)/$(f) in the "targets" value. | 18 | # or we will get $(obj)/$(f) in the "targets" value. |
19 | # Also, this forces you to use the := syntax when assigning to targets. | 19 | # Also, this forces you to use the := syntax when assigning to targets. |
20 | # Otherwise the line below will cause an infinite loop (if you don't know why, | 20 | # Otherwise the line below will cause an infinite loop (if you don't know why, |
diff --git a/arch/um/sys-i386/sysrq.c b/arch/um/sys-i386/sysrq.c index 281fc7b8ca00..e3706d15c4f5 100644 --- a/arch/um/sys-i386/sysrq.c +++ b/arch/um/sys-i386/sysrq.c | |||
@@ -3,12 +3,15 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include "linux/config.h" | ||
6 | #include "linux/kernel.h" | 7 | #include "linux/kernel.h" |
7 | #include "linux/smp.h" | 8 | #include "linux/smp.h" |
8 | #include "linux/sched.h" | 9 | #include "linux/sched.h" |
10 | #include "linux/kallsyms.h" | ||
9 | #include "asm/ptrace.h" | 11 | #include "asm/ptrace.h" |
10 | #include "sysrq.h" | 12 | #include "sysrq.h" |
11 | 13 | ||
14 | /* This is declared by <linux/sched.h> */ | ||
12 | void show_regs(struct pt_regs *regs) | 15 | void show_regs(struct pt_regs *regs) |
13 | { | 16 | { |
14 | printk("\n"); | 17 | printk("\n"); |
@@ -31,5 +34,80 @@ void show_regs(struct pt_regs *regs) | |||
31 | 0xffff & PT_REGS_DS(regs), | 34 | 0xffff & PT_REGS_DS(regs), |
32 | 0xffff & PT_REGS_ES(regs)); | 35 | 0xffff & PT_REGS_ES(regs)); |
33 | 36 | ||
34 | show_trace((unsigned long *) ®s); | 37 | show_trace(NULL, (unsigned long *) ®s); |
35 | } | 38 | } |
39 | |||
40 | /* Copied from i386. */ | ||
41 | static inline int valid_stack_ptr(struct thread_info *tinfo, void *p) | ||
42 | { | ||
43 | return p > (void *)tinfo && | ||
44 | p < (void *)tinfo + THREAD_SIZE - 3; | ||
45 | } | ||
46 | |||
47 | /* Adapted from i386 (we also print the address we read from). */ | ||
48 | static inline unsigned long print_context_stack(struct thread_info *tinfo, | ||
49 | unsigned long *stack, unsigned long ebp) | ||
50 | { | ||
51 | unsigned long addr; | ||
52 | |||
53 | #ifdef CONFIG_FRAME_POINTER | ||
54 | while (valid_stack_ptr(tinfo, (void *)ebp)) { | ||
55 | addr = *(unsigned long *)(ebp + 4); | ||
56 | printk("%08lx: [<%08lx>]", ebp + 4, addr); | ||
57 | print_symbol(" %s", addr); | ||
58 | printk("\n"); | ||
59 | ebp = *(unsigned long *)ebp; | ||
60 | } | ||
61 | #else | ||
62 | while (valid_stack_ptr(tinfo, stack)) { | ||
63 | addr = *stack; | ||
64 | if (__kernel_text_address(addr)) { | ||
65 | printk("%08lx: [<%08lx>]", (unsigned long) stack, addr); | ||
66 | print_symbol(" %s", addr); | ||
67 | printk("\n"); | ||
68 | } | ||
69 | stack++; | ||
70 | } | ||
71 | #endif | ||
72 | return ebp; | ||
73 | } | ||
74 | |||
75 | void show_trace(struct task_struct* task, unsigned long * stack) | ||
76 | { | ||
77 | unsigned long ebp; | ||
78 | struct thread_info *context; | ||
79 | |||
80 | /* Turn this into BUG_ON if possible. */ | ||
81 | if (!stack) { | ||
82 | stack = (unsigned long*) &stack; | ||
83 | printk("show_trace: got NULL stack, implicit assumption task == current"); | ||
84 | WARN_ON(1); | ||
85 | } | ||
86 | |||
87 | if (!task) | ||
88 | task = current; | ||
89 | |||
90 | if (task != current) { | ||
91 | //ebp = (unsigned long) KSTK_EBP(task); | ||
92 | /* Which one? No actual difference - just coding style.*/ | ||
93 | ebp = (unsigned long) PT_REGS_EBP(&task->thread.regs); | ||
94 | } else { | ||
95 | asm ("movl %%ebp, %0" : "=r" (ebp) : ); | ||
96 | } | ||
97 | |||
98 | context = (struct thread_info *) | ||
99 | ((unsigned long)stack & (~(THREAD_SIZE - 1))); | ||
100 | print_context_stack(context, stack, ebp); | ||
101 | |||
102 | /*while (((long) stack & (THREAD_SIZE-1)) != 0) { | ||
103 | addr = *stack; | ||
104 | if (__kernel_text_address(addr)) { | ||
105 | printk("%08lx: [<%08lx>]", (unsigned long) stack, addr); | ||
106 | print_symbol(" %s", addr); | ||
107 | printk("\n"); | ||
108 | } | ||
109 | stack++; | ||
110 | }*/ | ||
111 | printk("\n"); | ||
112 | } | ||
113 | |||
diff --git a/arch/um/sys-ppc/sysrq.c b/arch/um/sys-ppc/sysrq.c index 82d6e9335bb6..2f816f1a0ff4 100644 --- a/arch/um/sys-ppc/sysrq.c +++ b/arch/um/sys-ppc/sysrq.c | |||
@@ -27,17 +27,5 @@ void show_regs(struct pt_regs_subarch *regs) | |||
27 | 0xffff & regs->xds, 0xffff & regs->xes); | 27 | 0xffff & regs->xds, 0xffff & regs->xes); |
28 | #endif | 28 | #endif |
29 | 29 | ||
30 | show_trace(®s->gpr[1]); | 30 | show_trace(current, ®s->gpr[1]); |
31 | } | 31 | } |
32 | |||
33 | |||
34 | /* | ||
35 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
36 | * Emacs will notice this stuff at the end of the file and automatically | ||
37 | * adjust the settings for this buffer only. This must remain at the end | ||
38 | * of the file. | ||
39 | * --------------------------------------------------------------------------- | ||
40 | * Local variables: | ||
41 | * c-file-style: "linux" | ||
42 | * End: | ||
43 | */ | ||
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index d4a59657fb99..6f44f40204ed 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c | |||
@@ -133,23 +133,27 @@ static long arch_prctl_tt(int code, unsigned long addr) | |||
133 | 133 | ||
134 | #ifdef CONFIG_MODE_SKAS | 134 | #ifdef CONFIG_MODE_SKAS |
135 | 135 | ||
136 | /* XXX: Must also call arch_prctl in the host, beside saving the segment bases! */ | ||
136 | static long arch_prctl_skas(int code, unsigned long addr) | 137 | static long arch_prctl_skas(int code, unsigned long addr) |
137 | { | 138 | { |
138 | long ret = 0; | 139 | long ret = 0; |
139 | 140 | ||
140 | switch(code){ | 141 | switch(code){ |
141 | case ARCH_SET_GS: | ||
142 | current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr; | ||
143 | break; | ||
144 | case ARCH_SET_FS: | 142 | case ARCH_SET_FS: |
145 | current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr; | 143 | current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr; |
146 | break; | 144 | break; |
145 | case ARCH_SET_GS: | ||
146 | current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr; | ||
147 | break; | ||
147 | case ARCH_GET_FS: | 148 | case ARCH_GET_FS: |
148 | ret = put_user(current->thread.regs.regs.skas.regs[GS / sizeof(unsigned long)], &addr); | 149 | ret = put_user(current->thread.regs.regs.skas. |
150 | regs[FS_BASE / sizeof(unsigned long)], | ||
151 | (unsigned long __user *)addr); | ||
149 | break; | 152 | break; |
150 | case ARCH_GET_GS: | 153 | case ARCH_GET_GS: |
151 | ret = put_user(current->thread.regs.regs.skas.regs[FS / sizeof(unsigned \ | 154 | ret = put_user(current->thread.regs.regs.skas. |
152 | long)], &addr); | 155 | regs[GS_BASE / sizeof(unsigned long)], |
156 | (unsigned long __user *)addr); | ||
153 | break; | 157 | break; |
154 | default: | 158 | default: |
155 | ret = -EINVAL; | 159 | ret = -EINVAL; |
diff --git a/arch/um/sys-x86_64/sysrq.c b/arch/um/sys-x86_64/sysrq.c index ddf74691a610..d0a25af19a5b 100644 --- a/arch/um/sys-x86_64/sysrq.c +++ b/arch/um/sys-x86_64/sysrq.c | |||
@@ -36,14 +36,5 @@ void __show_regs(struct pt_regs * regs) | |||
36 | void show_regs(struct pt_regs *regs) | 36 | void show_regs(struct pt_regs *regs) |
37 | { | 37 | { |
38 | __show_regs(regs); | 38 | __show_regs(regs); |
39 | show_trace((unsigned long *) ®s); | 39 | show_trace(current, (unsigned long *) ®s); |
40 | } | 40 | } |
41 | |||
42 | /* Emacs will notice this stuff at the end of the file and automatically | ||
43 | * adjust the settings for this buffer only. This must remain at the end | ||
44 | * of the file. | ||
45 | * --------------------------------------------------------------------------- | ||
46 | * Local variables: | ||
47 | * c-file-style: "linux" | ||
48 | * End: | ||
49 | */ | ||
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 0f430d9d3632..289f448ac89c 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -305,6 +305,7 @@ config HPET_TIMER | |||
305 | 305 | ||
306 | config X86_PM_TIMER | 306 | config X86_PM_TIMER |
307 | bool "PM timer" | 307 | bool "PM timer" |
308 | depends on ACPI | ||
308 | default y | 309 | default y |
309 | help | 310 | help |
310 | Support the ACPI PM timer for time keeping. This is slow, | 311 | Support the ACPI PM timer for time keeping. This is slow, |
diff --git a/arch/x86_64/kernel/aperture.c b/arch/x86_64/kernel/aperture.c index a491f72cc966..504e63474993 100644 --- a/arch/x86_64/kernel/aperture.c +++ b/arch/x86_64/kernel/aperture.c | |||
@@ -33,12 +33,10 @@ int fallback_aper_force __initdata = 0; | |||
33 | 33 | ||
34 | int fix_aperture __initdata = 1; | 34 | int fix_aperture __initdata = 1; |
35 | 35 | ||
36 | #define NB_ID_3 (PCI_VENDOR_ID_AMD | (0x1103<<16)) | 36 | /* This code runs before the PCI subsystem is initialized, so just |
37 | access the northbridge directly. */ | ||
37 | 38 | ||
38 | static struct resource aper_res = { | 39 | #define NB_ID_3 (PCI_VENDOR_ID_AMD | (0x1103<<16)) |
39 | .name = "Aperture", | ||
40 | .flags = IORESOURCE_MEM, | ||
41 | }; | ||
42 | 40 | ||
43 | static u32 __init allocate_aperture(void) | 41 | static u32 __init allocate_aperture(void) |
44 | { | 42 | { |
@@ -55,24 +53,11 @@ static u32 __init allocate_aperture(void) | |||
55 | aper_size = (32 * 1024 * 1024) << fallback_aper_order; | 53 | aper_size = (32 * 1024 * 1024) << fallback_aper_order; |
56 | 54 | ||
57 | /* | 55 | /* |
58 | * Aperture has to be naturally aligned. This means an 2GB | 56 | * Aperture has to be naturally aligned. This means an 2GB aperture won't |
59 | * aperture won't have much chances to find a place in the | 57 | * have much chances to find a place in the lower 4GB of memory. |
60 | * lower 4GB of memory. Unfortunately we cannot move it up | 58 | * Unfortunately we cannot move it up because that would make the |
61 | * because that would make the IOMMU useless. | 59 | * IOMMU useless. |
62 | */ | 60 | */ |
63 | |||
64 | /* First try to find some free unused space */ | ||
65 | if (!allocate_resource(&iomem_resource, &aper_res, | ||
66 | aper_size, | ||
67 | 0, 0xffffffff, | ||
68 | aper_size, | ||
69 | NULL, NULL)) { | ||
70 | printk(KERN_INFO "Putting aperture at %lx-%lx\n", | ||
71 | aper_res.start, aper_res.end); | ||
72 | return aper_res.start; | ||
73 | } | ||
74 | |||
75 | /* No free space found. Go on to waste some memory... */ | ||
76 | p = __alloc_bootmem_node(nd0, aper_size, aper_size, 0); | 61 | p = __alloc_bootmem_node(nd0, aper_size, aper_size, 0); |
77 | if (!p || __pa(p)+aper_size > 0xffffffff) { | 62 | if (!p || __pa(p)+aper_size > 0xffffffff) { |
78 | printk("Cannot allocate aperture memory hole (%p,%uK)\n", | 63 | printk("Cannot allocate aperture memory hole (%p,%uK)\n", |
@@ -81,7 +66,7 @@ static u32 __init allocate_aperture(void) | |||
81 | free_bootmem_node(nd0, (unsigned long)p, aper_size); | 66 | free_bootmem_node(nd0, (unsigned long)p, aper_size); |
82 | return 0; | 67 | return 0; |
83 | } | 68 | } |
84 | printk("Mapping aperture over %d KB of precious RAM @ %lx\n", | 69 | printk("Mapping aperture over %d KB of RAM @ %lx\n", |
85 | aper_size >> 10, __pa(p)); | 70 | aper_size >> 10, __pa(p)); |
86 | return (u32)__pa(p); | 71 | return (u32)__pa(p); |
87 | } | 72 | } |
@@ -102,16 +87,10 @@ static int __init aperture_valid(char *name, u64 aper_base, u32 aper_size) | |||
102 | printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name); | 87 | printk("Aperture from %s pointing to e820 RAM. Ignoring.\n",name); |
103 | return 0; | 88 | return 0; |
104 | } | 89 | } |
105 | /* Don't check the resource here because the aperture is usually | ||
106 | in an e820 reserved area, and we allocated these earlier. */ | ||
107 | return 1; | 90 | return 1; |
108 | } | 91 | } |
109 | 92 | ||
110 | /* | 93 | /* Find a PCI capability */ |
111 | * Find a PCI capability. | ||
112 | * This code runs before the PCI subsystem is initialized, so just | ||
113 | * access the northbridge directly. | ||
114 | */ | ||
115 | static __u32 __init find_cap(int num, int slot, int func, int cap) | 94 | static __u32 __init find_cap(int num, int slot, int func, int cap) |
116 | { | 95 | { |
117 | u8 pos; | 96 | u8 pos; |
@@ -276,6 +255,8 @@ void __init iommu_hole_init(void) | |||
276 | fallback_aper_force) { | 255 | fallback_aper_force) { |
277 | printk("Your BIOS doesn't leave a aperture memory hole\n"); | 256 | printk("Your BIOS doesn't leave a aperture memory hole\n"); |
278 | printk("Please enable the IOMMU option in the BIOS setup\n"); | 257 | printk("Please enable the IOMMU option in the BIOS setup\n"); |
258 | printk("This costs you %d MB of RAM\n", | ||
259 | 32 << fallback_aper_order); | ||
279 | 260 | ||
280 | aper_order = fallback_aper_order; | 261 | aper_order = fallback_aper_order; |
281 | aper_alloc = allocate_aperture(); | 262 | aper_alloc = allocate_aperture(); |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index 80e9b498c443..afd87e64d0a8 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/desc.h> | 37 | #include <asm/desc.h> |
38 | #include <asm/proto.h> | 38 | #include <asm/proto.h> |
39 | #include <asm/mach_apic.h> | 39 | #include <asm/mach_apic.h> |
40 | #include <asm/acpi.h> | ||
40 | 41 | ||
41 | #define __apicdebuginit __init | 42 | #define __apicdebuginit __init |
42 | 43 | ||
diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index f86d9db94bfc..61a63be6b294 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <asm/pgalloc.h> | 30 | #include <asm/pgalloc.h> |
31 | #include <asm/io_apic.h> | 31 | #include <asm/io_apic.h> |
32 | #include <asm/proto.h> | 32 | #include <asm/proto.h> |
33 | #include <asm/acpi.h> | ||
33 | 34 | ||
34 | /* Have we found an MP table */ | 35 | /* Have we found an MP table */ |
35 | int smp_found_config; | 36 | int smp_found_config; |
diff --git a/arch/x86_64/kernel/signal.c b/arch/x86_64/kernel/signal.c index 3fdcdba0fec5..429c0269dc4e 100644 --- a/arch/x86_64/kernel/signal.c +++ b/arch/x86_64/kernel/signal.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/uaccess.h> | 28 | #include <asm/uaccess.h> |
29 | #include <asm/i387.h> | 29 | #include <asm/i387.h> |
30 | #include <asm/proto.h> | 30 | #include <asm/proto.h> |
31 | #include <asm/ia32_unistd.h> | ||
31 | 32 | ||
32 | /* #define DEBUG_SIG 1 */ | 33 | /* #define DEBUG_SIG 1 */ |
33 | 34 | ||
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index 735b6767c8ed..fb8c809b4cd9 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -27,7 +27,9 @@ | |||
27 | #include <linux/bcd.h> | 27 | #include <linux/bcd.h> |
28 | #include <linux/kallsyms.h> | 28 | #include <linux/kallsyms.h> |
29 | #include <linux/acpi.h> | 29 | #include <linux/acpi.h> |
30 | #ifdef CONFIG_ACPI | ||
30 | #include <acpi/achware.h> /* for PM timer frequency */ | 31 | #include <acpi/achware.h> /* for PM timer frequency */ |
32 | #endif | ||
31 | #include <asm/8253pit.h> | 33 | #include <asm/8253pit.h> |
32 | #include <asm/pgtable.h> | 34 | #include <asm/pgtable.h> |
33 | #include <asm/vsyscall.h> | 35 | #include <asm/vsyscall.h> |