diff options
872 files changed, 13426 insertions, 21115 deletions
diff --git a/Documentation/crypto/api-intro.txt b/Documentation/crypto/api-intro.txt index a2d5b4900772..74dffc68ff9f 100644 --- a/Documentation/crypto/api-intro.txt +++ b/Documentation/crypto/api-intro.txt | |||
@@ -223,6 +223,7 @@ CAST5 algorithm contributors: | |||
223 | 223 | ||
224 | TEA/XTEA algorithm contributors: | 224 | TEA/XTEA algorithm contributors: |
225 | Aaron Grothe | 225 | Aaron Grothe |
226 | Michael Ringe | ||
226 | 227 | ||
227 | Khazad algorithm contributors: | 228 | Khazad algorithm contributors: |
228 | Aaron Grothe | 229 | Aaron Grothe |
diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 0665cb12bd66..363909056e46 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt | |||
@@ -102,16 +102,6 @@ Who: Jody McIntyre <scjody@steamballoon.com> | |||
102 | 102 | ||
103 | --------------------------- | 103 | --------------------------- |
104 | 104 | ||
105 | What: register_serial/unregister_serial | ||
106 | When: September 2005 | ||
107 | Why: This interface does not allow serial ports to be registered against | ||
108 | a struct device, and as such does not allow correct power management | ||
109 | of such ports. 8250-based ports should use serial8250_register_port | ||
110 | and serial8250_unregister_port, or platform devices instead. | ||
111 | Who: Russell King <rmk@arm.linux.org.uk> | ||
112 | |||
113 | --------------------------- | ||
114 | |||
115 | What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid | 105 | What: i2c sysfs name change: in1_ref, vid deprecated in favour of cpu0_vid |
116 | When: November 2005 | 106 | When: November 2005 |
117 | Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c | 107 | Files: drivers/i2c/chips/adm1025.c, drivers/i2c/chips/adm1026.c |
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 6c98f2bd421e..5024ba7a592c 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -133,6 +133,7 @@ Table 1-1: Process specific entries in /proc | |||
133 | statm Process memory status information | 133 | statm Process memory status information |
134 | status Process status in human readable form | 134 | status Process status in human readable form |
135 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan | 135 | wchan If CONFIG_KALLSYMS is set, a pre-decoded wchan |
136 | smaps Extension based on maps, presenting the rss size for each mapped file | ||
136 | .............................................................................. | 137 | .............................................................................. |
137 | 138 | ||
138 | For example, to get the status information of a process, all you have to do is | 139 | For example, to get the status information of a process, all you have to do is |
diff --git a/Documentation/power/swsusp-dmcrypt.txt b/Documentation/power/swsusp-dmcrypt.txt new file mode 100644 index 000000000000..59931b46ff7e --- /dev/null +++ b/Documentation/power/swsusp-dmcrypt.txt | |||
@@ -0,0 +1,138 @@ | |||
1 | Author: Andreas Steinmetz <ast@domdv.de> | ||
2 | |||
3 | |||
4 | How to use dm-crypt and swsusp together: | ||
5 | ======================================== | ||
6 | |||
7 | Some prerequisites: | ||
8 | You know how dm-crypt works. If not, visit the following web page: | ||
9 | http://www.saout.de/misc/dm-crypt/ | ||
10 | You have read Documentation/power/swsusp.txt and understand it. | ||
11 | You did read Documentation/initrd.txt and know how an initrd works. | ||
12 | You know how to create or how to modify an initrd. | ||
13 | |||
14 | Now your system is properly set up, your disk is encrypted except for | ||
15 | the swap device(s) and the boot partition which may contain a mini | ||
16 | system for crypto setup and/or rescue purposes. You may even have | ||
17 | an initrd that does your current crypto setup already. | ||
18 | |||
19 | At this point you want to encrypt your swap, too. Still you want to | ||
20 | be able to suspend using swsusp. This, however, means that you | ||
21 | have to be able to either enter a passphrase or that you read | ||
22 | the key(s) from an external device like a pcmcia flash disk | ||
23 | or an usb stick prior to resume. So you need an initrd, that sets | ||
24 | up dm-crypt and then asks swsusp to resume from the encrypted | ||
25 | swap device. | ||
26 | |||
27 | The most important thing is that you set up dm-crypt in such | ||
28 | a way that the swap device you suspend to/resume from has | ||
29 | always the same major/minor within the initrd as well as | ||
30 | within your running system. The easiest way to achieve this is | ||
31 | to always set up this swap device first with dmsetup, so that | ||
32 | it will always look like the following: | ||
33 | |||
34 | brw------- 1 root root 254, 0 Jul 28 13:37 /dev/mapper/swap0 | ||
35 | |||
36 | Now set up your kernel to use /dev/mapper/swap0 as the default | ||
37 | resume partition, so your kernel .config contains: | ||
38 | |||
39 | CONFIG_PM_STD_PARTITION="/dev/mapper/swap0" | ||
40 | |||
41 | Prepare your boot loader to use the initrd you will create or | ||
42 | modify. For lilo the simplest setup looks like the following | ||
43 | lines: | ||
44 | |||
45 | image=/boot/vmlinuz | ||
46 | initrd=/boot/initrd.gz | ||
47 | label=linux | ||
48 | append="root=/dev/ram0 init=/linuxrc rw" | ||
49 | |||
50 | Finally you need to create or modify your initrd. Lets assume | ||
51 | you create an initrd that reads the required dm-crypt setup | ||
52 | from a pcmcia flash disk card. The card is formatted with an ext2 | ||
53 | fs which resides on /dev/hde1 when the card is inserted. The | ||
54 | card contains at least the encrypted swap setup in a file | ||
55 | named "swapkey". /etc/fstab of your initrd contains something | ||
56 | like the following: | ||
57 | |||
58 | /dev/hda1 /mnt ext3 ro 0 0 | ||
59 | none /proc proc defaults,noatime,nodiratime 0 0 | ||
60 | none /sys sysfs defaults,noatime,nodiratime 0 0 | ||
61 | |||
62 | /dev/hda1 contains an unencrypted mini system that sets up all | ||
63 | of your crypto devices, again by reading the setup from the | ||
64 | pcmcia flash disk. What follows now is a /linuxrc for your | ||
65 | initrd that allows you to resume from encrypted swap and that | ||
66 | continues boot with your mini system on /dev/hda1 if resume | ||
67 | does not happen: | ||
68 | |||
69 | #!/bin/sh | ||
70 | PATH=/sbin:/bin:/usr/sbin:/usr/bin | ||
71 | mount /proc | ||
72 | mount /sys | ||
73 | mapped=0 | ||
74 | noresume=`grep -c noresume /proc/cmdline` | ||
75 | if [ "$*" != "" ] | ||
76 | then | ||
77 | noresume=1 | ||
78 | fi | ||
79 | dmesg -n 1 | ||
80 | /sbin/cardmgr -q | ||
81 | for i in 1 2 3 4 5 6 7 8 9 0 | ||
82 | do | ||
83 | if [ -f /proc/ide/hde/media ] | ||
84 | then | ||
85 | usleep 500000 | ||
86 | mount -t ext2 -o ro /dev/hde1 /mnt | ||
87 | if [ -f /mnt/swapkey ] | ||
88 | then | ||
89 | dmsetup create swap0 /mnt/swapkey > /dev/null 2>&1 && mapped=1 | ||
90 | fi | ||
91 | umount /mnt | ||
92 | break | ||
93 | fi | ||
94 | usleep 500000 | ||
95 | done | ||
96 | killproc /sbin/cardmgr | ||
97 | dmesg -n 6 | ||
98 | if [ $mapped = 1 ] | ||
99 | then | ||
100 | if [ $noresume != 0 ] | ||
101 | then | ||
102 | mkswap /dev/mapper/swap0 > /dev/null 2>&1 | ||
103 | fi | ||
104 | echo 254:0 > /sys/power/resume | ||
105 | dmsetup remove swap0 | ||
106 | fi | ||
107 | umount /sys | ||
108 | mount /mnt | ||
109 | umount /proc | ||
110 | cd /mnt | ||
111 | pivot_root . mnt | ||
112 | mount /proc | ||
113 | umount -l /mnt | ||
114 | umount /proc | ||
115 | exec chroot . /sbin/init $* < dev/console > dev/console 2>&1 | ||
116 | |||
117 | Please don't mind the weird loop above, busybox's msh doesn't know | ||
118 | the let statement. Now, what is happening in the script? | ||
119 | First we have to decide if we want to try to resume, or not. | ||
120 | We will not resume if booting with "noresume" or any parameters | ||
121 | for init like "single" or "emergency" as boot parameters. | ||
122 | |||
123 | Then we need to set up dmcrypt with the setup data from the | ||
124 | pcmcia flash disk. If this succeeds we need to reset the swap | ||
125 | device if we don't want to resume. The line "echo 254:0 > /sys/power/resume" | ||
126 | then attempts to resume from the first device mapper device. | ||
127 | Note that it is important to set the device in /sys/power/resume, | ||
128 | regardless if resuming or not, otherwise later suspend will fail. | ||
129 | If resume starts, script execution terminates here. | ||
130 | |||
131 | Otherwise we just remove the encrypted swap device and leave it to the | ||
132 | mini system on /dev/hda1 to set the whole crypto up (it is up to | ||
133 | you to modify this to your taste). | ||
134 | |||
135 | What then follows is the well known process to change the root | ||
136 | file system and continue booting from there. I prefer to unmount | ||
137 | the initrd prior to continue booting but it is up to you to modify | ||
138 | this. | ||
diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt index 7a6b78966459..ddf907fbcc05 100644 --- a/Documentation/power/swsusp.txt +++ b/Documentation/power/swsusp.txt | |||
@@ -311,3 +311,10 @@ As a rule of thumb use encrypted swap to protect your data while your | |||
311 | system is shut down or suspended. Additionally use the encrypted | 311 | system is shut down or suspended. Additionally use the encrypted |
312 | suspend image to prevent sensitive data from being stolen after | 312 | suspend image to prevent sensitive data from being stolen after |
313 | resume. | 313 | resume. |
314 | |||
315 | Q: Why we cannot suspend to a swap file? | ||
316 | |||
317 | A: Because accessing swap file needs the filesystem mounted, and | ||
318 | filesystem might do something wrong (like replaying the journal) | ||
319 | during mount. [Probably could be solved by modifying every filesystem | ||
320 | to support some kind of "really read-only!" option. Patches welcome.] | ||
diff --git a/Documentation/power/video.txt b/Documentation/power/video.txt index 7a4a5036d123..1a44e8acb54c 100644 --- a/Documentation/power/video.txt +++ b/Documentation/power/video.txt | |||
@@ -46,6 +46,12 @@ There are a few types of systems where video works after S3 resume: | |||
46 | POSTing bios works. Ole Rohne has patch to do just that at | 46 | POSTing bios works. Ole Rohne has patch to do just that at |
47 | http://dev.gentoo.org/~marineam/patch-radeonfb-2.6.11-rc2-mm2. | 47 | http://dev.gentoo.org/~marineam/patch-radeonfb-2.6.11-rc2-mm2. |
48 | 48 | ||
49 | (8) on some systems, you can use the video_post utility mentioned here: | ||
50 | http://bugzilla.kernel.org/show_bug.cgi?id=3670. Do echo 3 > /sys/power/state | ||
51 | && /usr/sbin/video_post - which will initialize the display in console mode. | ||
52 | If you are in X, you can switch to a virtual terminal and back to X using | ||
53 | CTRL+ALT+F1 - CTRL+ALT+F7 to get the display working in graphical mode again. | ||
54 | |||
49 | Now, if you pass acpi_sleep=something, and it does not work with your | 55 | Now, if you pass acpi_sleep=something, and it does not work with your |
50 | bios, you'll get a hard crash during resume. Be careful. Also it is | 56 | bios, you'll get a hard crash during resume. Be careful. Also it is |
51 | safest to do your experiments with plain old VGA console. The vesafb | 57 | safest to do your experiments with plain old VGA console. The vesafb |
@@ -64,7 +70,8 @@ Model hack (or "how to do it") | |||
64 | ------------------------------------------------------------------------------ | 70 | ------------------------------------------------------------------------------ |
65 | Acer Aspire 1406LC ole's late BIOS init (7), turn off DRI | 71 | Acer Aspire 1406LC ole's late BIOS init (7), turn off DRI |
66 | Acer TM 242FX vbetool (6) | 72 | Acer TM 242FX vbetool (6) |
67 | Acer TM C300 vga=normal (only suspend on console, not in X), vbetool (6) | 73 | Acer TM C110 video_post (8) |
74 | Acer TM C300 vga=normal (only suspend on console, not in X), vbetool (6) or video_post (8) | ||
68 | Acer TM 4052LCi s3_bios (2) | 75 | Acer TM 4052LCi s3_bios (2) |
69 | Acer TM 636Lci s3_bios vga=normal (2) | 76 | Acer TM 636Lci s3_bios vga=normal (2) |
70 | Acer TM 650 (Radeon M7) vga=normal plus boot-radeon (5) gets text console back | 77 | Acer TM 650 (Radeon M7) vga=normal plus boot-radeon (5) gets text console back |
diff --git a/Documentation/vm/locking b/Documentation/vm/locking index c3ef09ae3bb1..f366fa956179 100644 --- a/Documentation/vm/locking +++ b/Documentation/vm/locking | |||
@@ -83,19 +83,18 @@ single address space optimization, so that the zap_page_range (from | |||
83 | vmtruncate) does not lose sending ipi's to cloned threads that might | 83 | vmtruncate) does not lose sending ipi's to cloned threads that might |
84 | be spawned underneath it and go to user mode to drag in pte's into tlbs. | 84 | be spawned underneath it and go to user mode to drag in pte's into tlbs. |
85 | 85 | ||
86 | swap_list_lock/swap_device_lock | 86 | swap_lock |
87 | ------------------------------- | 87 | -------------- |
88 | The swap devices are chained in priority order from the "swap_list" header. | 88 | The swap devices are chained in priority order from the "swap_list" header. |
89 | The "swap_list" is used for the round-robin swaphandle allocation strategy. | 89 | The "swap_list" is used for the round-robin swaphandle allocation strategy. |
90 | The #free swaphandles is maintained in "nr_swap_pages". These two together | 90 | The #free swaphandles is maintained in "nr_swap_pages". These two together |
91 | are protected by the swap_list_lock. | 91 | are protected by the swap_lock. |
92 | 92 | ||
93 | The swap_device_lock, which is per swap device, protects the reference | 93 | The swap_lock also protects all the device reference counts on the |
94 | counts on the corresponding swaphandles, maintained in the "swap_map" | 94 | corresponding swaphandles, maintained in the "swap_map" array, and the |
95 | array, and the "highest_bit" and "lowest_bit" fields. | 95 | "highest_bit" and "lowest_bit" fields. |
96 | 96 | ||
97 | Both of these are spinlocks, and are never acquired from intr level. The | 97 | The swap_lock is a spinlock, and is never acquired from intr level. |
98 | locking hierarchy is swap_list_lock -> swap_device_lock. | ||
99 | 98 | ||
100 | To prevent races between swap space deletion or async readahead swapins | 99 | To prevent races between swap space deletion or async readahead swapins |
101 | deciding whether a swap handle is being used, ie worthy of being read in | 100 | deciding whether a swap handle is being used, ie worthy of being read in |
diff --git a/Documentation/watchdog/watchdog-api.txt b/Documentation/watchdog/watchdog-api.txt index 28388aa700c6..c5beb548cfc4 100644 --- a/Documentation/watchdog/watchdog-api.txt +++ b/Documentation/watchdog/watchdog-api.txt | |||
@@ -228,6 +228,26 @@ advantechwdt.c -- Advantech Single Board Computer | |||
228 | The GETSTATUS call returns if the device is open or not. | 228 | The GETSTATUS call returns if the device is open or not. |
229 | [FIXME -- silliness again?] | 229 | [FIXME -- silliness again?] |
230 | 230 | ||
231 | booke_wdt.c -- PowerPC BookE Watchdog Timer | ||
232 | |||
233 | Timeout default varies according to frequency, supports | ||
234 | SETTIMEOUT | ||
235 | |||
236 | Watchdog can not be turned off, CONFIG_WATCHDOG_NOWAYOUT | ||
237 | does not make sense | ||
238 | |||
239 | GETSUPPORT returns the watchdog_info struct, and | ||
240 | GETSTATUS returns the supported options. GETBOOTSTATUS | ||
241 | returns a 1 if the last reset was caused by the | ||
242 | watchdog and a 0 otherwise. This watchdog can not be | ||
243 | disabled once it has been started. The wdt_period kernel | ||
244 | parameter selects which bit of the time base changing | ||
245 | from 0->1 will trigger the watchdog exception. Changing | ||
246 | the timeout from the ioctl calls will change the | ||
247 | wdt_period as defined above. Finally if you would like to | ||
248 | replace the default Watchdog Handler you can implement the | ||
249 | WatchdogHandler() function in your own code. | ||
250 | |||
231 | eurotechwdt.c -- Eurotech CPU-1220/1410 | 251 | eurotechwdt.c -- Eurotech CPU-1220/1410 |
232 | 252 | ||
233 | The timeout can be set using the SETTIMEOUT ioctl and defaults | 253 | The timeout can be set using the SETTIMEOUT ioctl and defaults |
@@ -374,8 +374,8 @@ depfile = $(subst $(comma),_,$(@D)/.$(@F).d) | |||
374 | 374 | ||
375 | # Files to ignore in find ... statements | 375 | # Files to ignore in find ... statements |
376 | 376 | ||
377 | RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc \) -prune -o | 377 | RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc -o -name .hg \) -prune -o |
378 | RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc | 378 | RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc --exclude .hg |
379 | 379 | ||
380 | # =========================================================================== | 380 | # =========================================================================== |
381 | # Rules shared between *config targets and build targets | 381 | # Rules shared between *config targets and build targets |
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index 41f12658c8b4..51f430cc2fbf 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -177,7 +177,7 @@ static void locomo_handler(unsigned int irq, struct irqdesc *desc, | |||
177 | d = irq_desc + irq; | 177 | d = irq_desc + irq; |
178 | for (i = 0; i <= 3; i++, d++, irq++) { | 178 | for (i = 0; i <= 3; i++, d++, irq++) { |
179 | if (req & (0x0100 << i)) { | 179 | if (req & (0x0100 << i)) { |
180 | d->handle(irq, d, regs); | 180 | desc_handle_irq(irq, d, regs); |
181 | } | 181 | } |
182 | 182 | ||
183 | } | 183 | } |
@@ -220,7 +220,7 @@ static void locomo_key_handler(unsigned int irq, struct irqdesc *desc, | |||
220 | 220 | ||
221 | if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { | 221 | if (locomo_readl(mapbase + LOCOMO_KEYBOARD + LOCOMO_KIC) & 0x0001) { |
222 | d = irq_desc + LOCOMO_IRQ_KEY_START; | 222 | d = irq_desc + LOCOMO_IRQ_KEY_START; |
223 | d->handle(LOCOMO_IRQ_KEY_START, d, regs); | 223 | desc_handle_irq(LOCOMO_IRQ_KEY_START, d, regs); |
224 | } | 224 | } |
225 | } | 225 | } |
226 | 226 | ||
@@ -273,7 +273,7 @@ static void locomo_gpio_handler(unsigned int irq, struct irqdesc *desc, | |||
273 | d = irq_desc + LOCOMO_IRQ_GPIO_START; | 273 | d = irq_desc + LOCOMO_IRQ_GPIO_START; |
274 | for (i = 0; i <= 15; i++, irq++, d++) { | 274 | for (i = 0; i <= 15; i++, irq++, d++) { |
275 | if (req & (0x0001 << i)) { | 275 | if (req & (0x0001 << i)) { |
276 | d->handle(irq, d, regs); | 276 | desc_handle_irq(irq, d, regs); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | } | 279 | } |
@@ -328,7 +328,7 @@ static void locomo_lt_handler(unsigned int irq, struct irqdesc *desc, | |||
328 | 328 | ||
329 | if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { | 329 | if (locomo_readl(mapbase + LOCOMO_LTINT) & 0x0001) { |
330 | d = irq_desc + LOCOMO_IRQ_LT_START; | 330 | d = irq_desc + LOCOMO_IRQ_LT_START; |
331 | d->handle(LOCOMO_IRQ_LT_START, d, regs); | 331 | desc_handle_irq(LOCOMO_IRQ_LT_START, d, regs); |
332 | } | 332 | } |
333 | } | 333 | } |
334 | 334 | ||
@@ -379,7 +379,7 @@ static void locomo_spi_handler(unsigned int irq, struct irqdesc *desc, | |||
379 | 379 | ||
380 | for (i = 0; i <= 3; i++, irq++, d++) { | 380 | for (i = 0; i <= 3; i++, irq++, d++) { |
381 | if (req & (0x0001 << i)) { | 381 | if (req & (0x0001 << i)) { |
382 | d->handle(irq, d, regs); | 382 | desc_handle_irq(irq, d, regs); |
383 | } | 383 | } |
384 | } | 384 | } |
385 | } | 385 | } |
@@ -651,15 +651,15 @@ __locomo_probe(struct device *me, struct resource *mem, int irq) | |||
651 | return ret; | 651 | return ret; |
652 | } | 652 | } |
653 | 653 | ||
654 | static void __locomo_remove(struct locomo *lchip) | 654 | static int locomo_remove_child(struct device *dev, void *data) |
655 | { | 655 | { |
656 | struct list_head *l, *n; | 656 | device_unregister(dev); |
657 | 657 | return 0; | |
658 | list_for_each_safe(l, n, &lchip->dev->children) { | 658 | } |
659 | struct device *d = list_to_dev(l); | ||
660 | 659 | ||
661 | device_unregister(d); | 660 | static void __locomo_remove(struct locomo *lchip) |
662 | } | 661 | { |
662 | device_for_each_child(lchip->dev, NULL, locomo_remove_child); | ||
663 | 663 | ||
664 | if (lchip->irq != NO_IRQ) { | 664 | if (lchip->irq != NO_IRQ) { |
665 | set_irq_chained_handler(lchip->irq, NULL); | 665 | set_irq_chained_handler(lchip->irq, NULL); |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 38c2eb667eb9..1a47fbf9cbbc 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -268,8 +268,8 @@ static struct irqchip sa1111_low_chip = { | |||
268 | .mask = sa1111_mask_lowirq, | 268 | .mask = sa1111_mask_lowirq, |
269 | .unmask = sa1111_unmask_lowirq, | 269 | .unmask = sa1111_unmask_lowirq, |
270 | .retrigger = sa1111_retrigger_lowirq, | 270 | .retrigger = sa1111_retrigger_lowirq, |
271 | .type = sa1111_type_lowirq, | 271 | .set_type = sa1111_type_lowirq, |
272 | .wake = sa1111_wake_lowirq, | 272 | .set_wake = sa1111_wake_lowirq, |
273 | }; | 273 | }; |
274 | 274 | ||
275 | static void sa1111_mask_highirq(unsigned int irq) | 275 | static void sa1111_mask_highirq(unsigned int irq) |
@@ -364,8 +364,8 @@ static struct irqchip sa1111_high_chip = { | |||
364 | .mask = sa1111_mask_highirq, | 364 | .mask = sa1111_mask_highirq, |
365 | .unmask = sa1111_unmask_highirq, | 365 | .unmask = sa1111_unmask_highirq, |
366 | .retrigger = sa1111_retrigger_highirq, | 366 | .retrigger = sa1111_retrigger_highirq, |
367 | .type = sa1111_type_highirq, | 367 | .set_type = sa1111_type_highirq, |
368 | .wake = sa1111_wake_highirq, | 368 | .set_wake = sa1111_wake_highirq, |
369 | }; | 369 | }; |
370 | 370 | ||
371 | static void sa1111_setup_irq(struct sa1111 *sachip) | 371 | static void sa1111_setup_irq(struct sa1111 *sachip) |
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 6540db691338..dceb826bd216 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -585,7 +585,7 @@ ecard_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | |||
585 | 585 | ||
586 | if (pending) { | 586 | if (pending) { |
587 | struct irqdesc *d = irq_desc + ec->irq; | 587 | struct irqdesc *d = irq_desc + ec->irq; |
588 | d->handle(ec->irq, d, regs); | 588 | desc_handle_irq(ec->irq, d, regs); |
589 | called ++; | 589 | called ++; |
590 | } | 590 | } |
591 | } | 591 | } |
@@ -632,7 +632,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg | |||
632 | * Serial cards should go in 0/1, ethernet/scsi in 2/3 | 632 | * Serial cards should go in 0/1, ethernet/scsi in 2/3 |
633 | * otherwise you will lose serial data at high speeds! | 633 | * otherwise you will lose serial data at high speeds! |
634 | */ | 634 | */ |
635 | d->handle(ec->irq, d, regs); | 635 | desc_handle_irq(ec->irq, d, regs); |
636 | } else { | 636 | } else { |
637 | printk(KERN_WARNING "card%d: interrupt from unclaimed " | 637 | printk(KERN_WARNING "card%d: interrupt from unclaimed " |
638 | "card???\n", slot); | 638 | "card???\n", slot); |
diff --git a/arch/arm/kernel/irq.c b/arch/arm/kernel/irq.c index 395137a8fad2..3284118f356b 100644 --- a/arch/arm/kernel/irq.c +++ b/arch/arm/kernel/irq.c | |||
@@ -207,8 +207,8 @@ void enable_irq_wake(unsigned int irq) | |||
207 | unsigned long flags; | 207 | unsigned long flags; |
208 | 208 | ||
209 | spin_lock_irqsave(&irq_controller_lock, flags); | 209 | spin_lock_irqsave(&irq_controller_lock, flags); |
210 | if (desc->chip->wake) | 210 | if (desc->chip->set_wake) |
211 | desc->chip->wake(irq, 1); | 211 | desc->chip->set_wake(irq, 1); |
212 | spin_unlock_irqrestore(&irq_controller_lock, flags); | 212 | spin_unlock_irqrestore(&irq_controller_lock, flags); |
213 | } | 213 | } |
214 | EXPORT_SYMBOL(enable_irq_wake); | 214 | EXPORT_SYMBOL(enable_irq_wake); |
@@ -219,8 +219,8 @@ void disable_irq_wake(unsigned int irq) | |||
219 | unsigned long flags; | 219 | unsigned long flags; |
220 | 220 | ||
221 | spin_lock_irqsave(&irq_controller_lock, flags); | 221 | spin_lock_irqsave(&irq_controller_lock, flags); |
222 | if (desc->chip->wake) | 222 | if (desc->chip->set_wake) |
223 | desc->chip->wake(irq, 0); | 223 | desc->chip->set_wake(irq, 0); |
224 | spin_unlock_irqrestore(&irq_controller_lock, flags); | 224 | spin_unlock_irqrestore(&irq_controller_lock, flags); |
225 | } | 225 | } |
226 | EXPORT_SYMBOL(disable_irq_wake); | 226 | EXPORT_SYMBOL(disable_irq_wake); |
@@ -517,7 +517,7 @@ static void do_pending_irqs(struct pt_regs *regs) | |||
517 | list_for_each_safe(l, n, &head) { | 517 | list_for_each_safe(l, n, &head) { |
518 | desc = list_entry(l, struct irqdesc, pend); | 518 | desc = list_entry(l, struct irqdesc, pend); |
519 | list_del_init(&desc->pend); | 519 | list_del_init(&desc->pend); |
520 | desc->handle(desc - irq_desc, desc, regs); | 520 | desc_handle_irq(desc - irq_desc, desc, regs); |
521 | } | 521 | } |
522 | 522 | ||
523 | /* | 523 | /* |
@@ -545,7 +545,7 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs) | |||
545 | 545 | ||
546 | irq_enter(); | 546 | irq_enter(); |
547 | spin_lock(&irq_controller_lock); | 547 | spin_lock(&irq_controller_lock); |
548 | desc->handle(irq, desc, regs); | 548 | desc_handle_irq(irq, desc, regs); |
549 | 549 | ||
550 | /* | 550 | /* |
551 | * Now re-run any pending interrupts. | 551 | * Now re-run any pending interrupts. |
@@ -624,9 +624,9 @@ int set_irq_type(unsigned int irq, unsigned int type) | |||
624 | } | 624 | } |
625 | 625 | ||
626 | desc = irq_desc + irq; | 626 | desc = irq_desc + irq; |
627 | if (desc->chip->type) { | 627 | if (desc->chip->set_type) { |
628 | spin_lock_irqsave(&irq_controller_lock, flags); | 628 | spin_lock_irqsave(&irq_controller_lock, flags); |
629 | ret = desc->chip->type(irq, type); | 629 | ret = desc->chip->set_type(irq, type); |
630 | spin_unlock_irqrestore(&irq_controller_lock, flags); | 630 | spin_unlock_irqrestore(&irq_controller_lock, flags); |
631 | } | 631 | } |
632 | 632 | ||
@@ -846,8 +846,8 @@ unsigned long probe_irq_on(void) | |||
846 | 846 | ||
847 | irq_desc[i].probing = 1; | 847 | irq_desc[i].probing = 1; |
848 | irq_desc[i].triggered = 0; | 848 | irq_desc[i].triggered = 0; |
849 | if (irq_desc[i].chip->type) | 849 | if (irq_desc[i].chip->set_type) |
850 | irq_desc[i].chip->type(i, IRQT_PROBE); | 850 | irq_desc[i].chip->set_type(i, IRQT_PROBE); |
851 | irq_desc[i].chip->unmask(i); | 851 | irq_desc[i].chip->unmask(i); |
852 | irqs += 1; | 852 | irqs += 1; |
853 | } | 853 | } |
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index b2085735a2ba..826164945747 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c | |||
@@ -110,7 +110,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
110 | * We need to tell the secondary core where to find | 110 | * We need to tell the secondary core where to find |
111 | * its stack and the page tables. | 111 | * its stack and the page tables. |
112 | */ | 112 | */ |
113 | secondary_data.stack = (void *)idle->thread_info + THREAD_SIZE - 8; | 113 | secondary_data.stack = (void *)idle->thread_info + THREAD_START_SP; |
114 | secondary_data.pgdir = virt_to_phys(pgd); | 114 | secondary_data.pgdir = virt_to_phys(pgd); |
115 | wmb(); | 115 | wmb(); |
116 | 116 | ||
diff --git a/arch/arm/mach-footbridge/isa-irq.c b/arch/arm/mach-footbridge/isa-irq.c index b21016070ea3..e1c43b331d64 100644 --- a/arch/arm/mach-footbridge/isa-irq.c +++ b/arch/arm/mach-footbridge/isa-irq.c | |||
@@ -95,7 +95,7 @@ isa_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | |||
95 | } | 95 | } |
96 | 96 | ||
97 | desc = irq_desc + isa_irq; | 97 | desc = irq_desc + isa_irq; |
98 | desc->handle(isa_irq, desc, regs); | 98 | desc_handle_irq(isa_irq, desc, regs); |
99 | } | 99 | } |
100 | 100 | ||
101 | static struct irqaction irq_cascade = { .handler = no_action, .name = "cascade", }; | 101 | static struct irqaction irq_cascade = { .handler = no_action, .name = "cascade", }; |
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index 96aa3af70d86..5110e2e65ddd 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c | |||
@@ -108,7 +108,7 @@ h720x_gpio_handler(unsigned int mask, unsigned int irq, | |||
108 | while (mask) { | 108 | while (mask) { |
109 | if (mask & 1) { | 109 | if (mask & 1) { |
110 | IRQDBG("handling irq %d\n", irq); | 110 | IRQDBG("handling irq %d\n", irq); |
111 | desc->handle(irq, desc, regs); | 111 | desc_handle_irq(irq, desc, regs); |
112 | } | 112 | } |
113 | irq++; | 113 | irq++; |
114 | desc++; | 114 | desc++; |
diff --git a/arch/arm/mach-h720x/cpu-h7202.c b/arch/arm/mach-h720x/cpu-h7202.c index 593b6a2a30e1..4b3199319e68 100644 --- a/arch/arm/mach-h720x/cpu-h7202.c +++ b/arch/arm/mach-h720x/cpu-h7202.c | |||
@@ -126,7 +126,7 @@ h7202_timerx_demux_handler(unsigned int irq_unused, struct irqdesc *desc, | |||
126 | desc = irq_desc + irq; | 126 | desc = irq_desc + irq; |
127 | while (mask) { | 127 | while (mask) { |
128 | if (mask & 1) | 128 | if (mask & 1) |
129 | desc->handle(irq, desc, regs); | 129 | desc_handle_irq(irq, desc, regs); |
130 | irq++; | 130 | irq++; |
131 | desc++; | 131 | desc++; |
132 | mask >>= 1; | 132 | mask >>= 1; |
diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c index 0c2713426dfd..eeb8a6d4a399 100644 --- a/arch/arm/mach-imx/irq.c +++ b/arch/arm/mach-imx/irq.c | |||
@@ -152,7 +152,7 @@ imx_gpio_handler(unsigned int mask, unsigned int irq, | |||
152 | while (mask) { | 152 | while (mask) { |
153 | if (mask & 1) { | 153 | if (mask & 1) { |
154 | DEBUG_IRQ("handling irq %d\n", irq); | 154 | DEBUG_IRQ("handling irq %d\n", irq); |
155 | desc->handle(irq, desc, regs); | 155 | desc_handle_irq(irq, desc, regs); |
156 | } | 156 | } |
157 | irq++; | 157 | irq++; |
158 | desc++; | 158 | desc++; |
@@ -214,7 +214,7 @@ static struct irqchip imx_gpio_chip = { | |||
214 | .ack = imx_gpio_ack_irq, | 214 | .ack = imx_gpio_ack_irq, |
215 | .mask = imx_gpio_mask_irq, | 215 | .mask = imx_gpio_mask_irq, |
216 | .unmask = imx_gpio_unmask_irq, | 216 | .unmask = imx_gpio_unmask_irq, |
217 | .type = imx_gpio_irq_type, | 217 | .set_type = imx_gpio_irq_type, |
218 | }; | 218 | }; |
219 | 219 | ||
220 | void __init | 220 | void __init |
diff --git a/arch/arm/mach-integrator/integrator_cp.c b/arch/arm/mach-integrator/integrator_cp.c index 569f328c479d..2be5c03ab87f 100644 --- a/arch/arm/mach-integrator/integrator_cp.c +++ b/arch/arm/mach-integrator/integrator_cp.c | |||
@@ -170,7 +170,7 @@ sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | |||
170 | irq += IRQ_SIC_START; | 170 | irq += IRQ_SIC_START; |
171 | 171 | ||
172 | desc = irq_desc + irq; | 172 | desc = irq_desc + irq; |
173 | desc->handle(irq, desc, regs); | 173 | desc_handle_irq(irq, desc, regs); |
174 | } while (status); | 174 | } while (status); |
175 | } | 175 | } |
176 | 176 | ||
diff --git a/arch/arm/mach-ixp2000/core.c b/arch/arm/mach-ixp2000/core.c index 45b18658499f..781d10ae00b7 100644 --- a/arch/arm/mach-ixp2000/core.c +++ b/arch/arm/mach-ixp2000/core.c | |||
@@ -317,7 +317,7 @@ static void ixp2000_GPIO_irq_handler(unsigned int irq, struct irqdesc *desc, str | |||
317 | for (i = 0; i <= 7; i++) { | 317 | for (i = 0; i <= 7; i++) { |
318 | if (status & (1<<i)) { | 318 | if (status & (1<<i)) { |
319 | desc = irq_desc + i + IRQ_IXP2000_GPIO0; | 319 | desc = irq_desc + i + IRQ_IXP2000_GPIO0; |
320 | desc->handle(i + IRQ_IXP2000_GPIO0, desc, regs); | 320 | desc_handle_irq(i + IRQ_IXP2000_GPIO0, desc, regs); |
321 | } | 321 | } |
322 | } | 322 | } |
323 | } | 323 | } |
@@ -380,10 +380,10 @@ static void ixp2000_GPIO_irq_unmask(unsigned int irq) | |||
380 | } | 380 | } |
381 | 381 | ||
382 | static struct irqchip ixp2000_GPIO_irq_chip = { | 382 | static struct irqchip ixp2000_GPIO_irq_chip = { |
383 | .type = ixp2000_GPIO_irq_type, | 383 | .ack = ixp2000_GPIO_irq_mask_ack, |
384 | .ack = ixp2000_GPIO_irq_mask_ack, | 384 | .mask = ixp2000_GPIO_irq_mask, |
385 | .mask = ixp2000_GPIO_irq_mask, | 385 | .unmask = ixp2000_GPIO_irq_unmask |
386 | .unmask = ixp2000_GPIO_irq_unmask | 386 | .set_type = ixp2000_GPIO_irq_type, |
387 | }; | 387 | }; |
388 | 388 | ||
389 | static void ixp2000_pci_irq_mask(unsigned int irq) | 389 | static void ixp2000_pci_irq_mask(unsigned int irq) |
diff --git a/arch/arm/mach-ixp2000/ixdp2x00.c b/arch/arm/mach-ixp2000/ixdp2x00.c index a43369ad876c..63ba0191aa65 100644 --- a/arch/arm/mach-ixp2000/ixdp2x00.c +++ b/arch/arm/mach-ixp2000/ixdp2x00.c | |||
@@ -133,7 +133,7 @@ static void ixdp2x00_irq_handler(unsigned int irq, struct irqdesc *desc, struct | |||
133 | struct irqdesc *cpld_desc; | 133 | struct irqdesc *cpld_desc; |
134 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; | 134 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; |
135 | cpld_desc = irq_desc + cpld_irq; | 135 | cpld_desc = irq_desc + cpld_irq; |
136 | cpld_desc->handle(cpld_irq, cpld_desc, regs); | 136 | desc_handle_irq(cpld_irq, cpld_desc, regs); |
137 | } | 137 | } |
138 | } | 138 | } |
139 | 139 | ||
diff --git a/arch/arm/mach-ixp2000/ixdp2x01.c b/arch/arm/mach-ixp2000/ixdp2x01.c index 43447dad1657..7a5109921287 100644 --- a/arch/arm/mach-ixp2000/ixdp2x01.c +++ b/arch/arm/mach-ixp2000/ixdp2x01.c | |||
@@ -82,7 +82,7 @@ static void ixdp2x01_irq_handler(unsigned int irq, struct irqdesc *desc, struct | |||
82 | struct irqdesc *cpld_desc; | 82 | struct irqdesc *cpld_desc; |
83 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; | 83 | int cpld_irq = IXP2000_BOARD_IRQ(0) + i; |
84 | cpld_desc = irq_desc + cpld_irq; | 84 | cpld_desc = irq_desc + cpld_irq; |
85 | cpld_desc->handle(cpld_irq, cpld_desc, regs); | 85 | desc_handle_irq(cpld_irq, cpld_desc, regs); |
86 | } | 86 | } |
87 | } | 87 | } |
88 | 88 | ||
diff --git a/arch/arm/mach-lh7a40x/common.h b/arch/arm/mach-lh7a40x/common.h index beda7c2602fb..578a52461fdb 100644 --- a/arch/arm/mach-lh7a40x/common.h +++ b/arch/arm/mach-lh7a40x/common.h | |||
@@ -13,4 +13,4 @@ extern struct sys_timer lh7a40x_timer; | |||
13 | extern void lh7a400_init_irq (void); | 13 | extern void lh7a400_init_irq (void); |
14 | extern void lh7a404_init_irq (void); | 14 | extern void lh7a404_init_irq (void); |
15 | 15 | ||
16 | #define IRQ_DISPATCH(irq) irq_desc[irq].handle ((irq), &irq_desc[irq], regs) | 16 | #define IRQ_DISPATCH(irq) desc_handle_irq((irq),(irq_desc + irq), regs) |
diff --git a/arch/arm/mach-omap1/fpga.c b/arch/arm/mach-omap1/fpga.c index 7c08f6c2e1d0..c12a78335625 100644 --- a/arch/arm/mach-omap1/fpga.c +++ b/arch/arm/mach-omap1/fpga.c | |||
@@ -102,7 +102,7 @@ void innovator_fpga_IRQ_demux(unsigned int irq, struct irqdesc *desc, | |||
102 | fpga_irq++, stat >>= 1) { | 102 | fpga_irq++, stat >>= 1) { |
103 | if (stat & 1) { | 103 | if (stat & 1) { |
104 | d = irq_desc + fpga_irq; | 104 | d = irq_desc + fpga_irq; |
105 | d->handle(fpga_irq, d, regs); | 105 | desc_handle_irq(fpga_irq, d, regs); |
106 | } | 106 | } |
107 | } | 107 | } |
108 | } | 108 | } |
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index f3cac43124a5..539b596005fc 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -133,7 +133,7 @@ static struct irqchip pxa_low_gpio_chip = { | |||
133 | .ack = pxa_ack_low_gpio, | 133 | .ack = pxa_ack_low_gpio, |
134 | .mask = pxa_mask_low_irq, | 134 | .mask = pxa_mask_low_irq, |
135 | .unmask = pxa_unmask_low_irq, | 135 | .unmask = pxa_unmask_low_irq, |
136 | .type = pxa_gpio_irq_type, | 136 | .set_type = pxa_gpio_irq_type, |
137 | }; | 137 | }; |
138 | 138 | ||
139 | /* | 139 | /* |
@@ -157,7 +157,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, | |||
157 | mask >>= 2; | 157 | mask >>= 2; |
158 | do { | 158 | do { |
159 | if (mask & 1) | 159 | if (mask & 1) |
160 | desc->handle(irq, desc, regs); | 160 | desc_handle_irq(irq, desc, regs); |
161 | irq++; | 161 | irq++; |
162 | desc++; | 162 | desc++; |
163 | mask >>= 1; | 163 | mask >>= 1; |
@@ -172,7 +172,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, | |||
172 | desc = irq_desc + irq; | 172 | desc = irq_desc + irq; |
173 | do { | 173 | do { |
174 | if (mask & 1) | 174 | if (mask & 1) |
175 | desc->handle(irq, desc, regs); | 175 | desc_handle_irq(irq, desc, regs); |
176 | irq++; | 176 | irq++; |
177 | desc++; | 177 | desc++; |
178 | mask >>= 1; | 178 | mask >>= 1; |
@@ -187,7 +187,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, | |||
187 | desc = irq_desc + irq; | 187 | desc = irq_desc + irq; |
188 | do { | 188 | do { |
189 | if (mask & 1) | 189 | if (mask & 1) |
190 | desc->handle(irq, desc, regs); | 190 | desc_handle_irq(irq, desc, regs); |
191 | irq++; | 191 | irq++; |
192 | desc++; | 192 | desc++; |
193 | mask >>= 1; | 193 | mask >>= 1; |
@@ -203,7 +203,7 @@ static void pxa_gpio_demux_handler(unsigned int irq, struct irqdesc *desc, | |||
203 | desc = irq_desc + irq; | 203 | desc = irq_desc + irq; |
204 | do { | 204 | do { |
205 | if (mask & 1) | 205 | if (mask & 1) |
206 | desc->handle(irq, desc, regs); | 206 | desc_handle_irq(irq, desc, regs); |
207 | irq++; | 207 | irq++; |
208 | desc++; | 208 | desc++; |
209 | mask >>= 1; | 209 | mask >>= 1; |
@@ -241,7 +241,7 @@ static struct irqchip pxa_muxed_gpio_chip = { | |||
241 | .ack = pxa_ack_muxed_gpio, | 241 | .ack = pxa_ack_muxed_gpio, |
242 | .mask = pxa_mask_muxed_gpio, | 242 | .mask = pxa_mask_muxed_gpio, |
243 | .unmask = pxa_unmask_muxed_gpio, | 243 | .unmask = pxa_unmask_muxed_gpio, |
244 | .type = pxa_gpio_irq_type, | 244 | .set_type = pxa_gpio_irq_type, |
245 | }; | 245 | }; |
246 | 246 | ||
247 | 247 | ||
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 6309853b59be..923f6eb774c0 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -84,7 +84,7 @@ static void lubbock_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
84 | if (likely(pending)) { | 84 | if (likely(pending)) { |
85 | irq = LUBBOCK_IRQ(0) + __ffs(pending); | 85 | irq = LUBBOCK_IRQ(0) + __ffs(pending); |
86 | desc = irq_desc + irq; | 86 | desc = irq_desc + irq; |
87 | desc->handle(irq, desc, regs); | 87 | desc_handle_irq(irq, desc, regs); |
88 | } | 88 | } |
89 | pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; | 89 | pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; |
90 | } while (pending); | 90 | } while (pending); |
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 827b7b5a5be8..85fdb5b1470a 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -72,7 +72,7 @@ static void mainstone_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
72 | if (likely(pending)) { | 72 | if (likely(pending)) { |
73 | irq = MAINSTONE_IRQ(0) + __ffs(pending); | 73 | irq = MAINSTONE_IRQ(0) + __ffs(pending); |
74 | desc = irq_desc + irq; | 74 | desc = irq_desc + irq; |
75 | desc->handle(irq, desc, regs); | 75 | desc_handle_irq(irq, desc, regs); |
76 | } | 76 | } |
77 | pending = MST_INTSETCLR & mainstone_irq_enabled; | 77 | pending = MST_INTSETCLR & mainstone_irq_enabled; |
78 | } while (pending); | 78 | } while (pending); |
diff --git a/arch/arm/mach-s3c2410/bast-irq.c b/arch/arm/mach-s3c2410/bast-irq.c index 5e5bbe893cbb..49914709fa09 100644 --- a/arch/arm/mach-s3c2410/bast-irq.c +++ b/arch/arm/mach-s3c2410/bast-irq.c | |||
@@ -124,7 +124,7 @@ bast_irq_pc104_demux(unsigned int irq, | |||
124 | irqno = bast_pc104_irqs[i]; | 124 | irqno = bast_pc104_irqs[i]; |
125 | desc = irq_desc + irqno; | 125 | desc = irq_desc + irqno; |
126 | 126 | ||
127 | desc->handle(irqno, desc, regs); | 127 | desc_handle_irq(irqno, desc, regs); |
128 | } | 128 | } |
129 | 129 | ||
130 | stat >>= 1; | 130 | stat >>= 1; |
diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c index 973a5fe6769c..66d8c068e940 100644 --- a/arch/arm/mach-s3c2410/irq.c +++ b/arch/arm/mach-s3c2410/irq.c | |||
@@ -184,14 +184,14 @@ struct irqchip s3c_irq_level_chip = { | |||
184 | .ack = s3c_irq_maskack, | 184 | .ack = s3c_irq_maskack, |
185 | .mask = s3c_irq_mask, | 185 | .mask = s3c_irq_mask, |
186 | .unmask = s3c_irq_unmask, | 186 | .unmask = s3c_irq_unmask, |
187 | .wake = s3c_irq_wake | 187 | .set_wake = s3c_irq_wake |
188 | }; | 188 | }; |
189 | 189 | ||
190 | static struct irqchip s3c_irq_chip = { | 190 | static struct irqchip s3c_irq_chip = { |
191 | .ack = s3c_irq_ack, | 191 | .ack = s3c_irq_ack, |
192 | .mask = s3c_irq_mask, | 192 | .mask = s3c_irq_mask, |
193 | .unmask = s3c_irq_unmask, | 193 | .unmask = s3c_irq_unmask, |
194 | .wake = s3c_irq_wake | 194 | .set_wake = s3c_irq_wake |
195 | }; | 195 | }; |
196 | 196 | ||
197 | /* S3C2410_EINTMASK | 197 | /* S3C2410_EINTMASK |
@@ -350,16 +350,16 @@ static struct irqchip s3c_irqext_chip = { | |||
350 | .mask = s3c_irqext_mask, | 350 | .mask = s3c_irqext_mask, |
351 | .unmask = s3c_irqext_unmask, | 351 | .unmask = s3c_irqext_unmask, |
352 | .ack = s3c_irqext_ack, | 352 | .ack = s3c_irqext_ack, |
353 | .type = s3c_irqext_type, | 353 | .set_type = s3c_irqext_type, |
354 | .wake = s3c_irqext_wake | 354 | .set_wake = s3c_irqext_wake |
355 | }; | 355 | }; |
356 | 356 | ||
357 | static struct irqchip s3c_irq_eint0t4 = { | 357 | static struct irqchip s3c_irq_eint0t4 = { |
358 | .ack = s3c_irq_ack, | 358 | .ack = s3c_irq_ack, |
359 | .mask = s3c_irq_mask, | 359 | .mask = s3c_irq_mask, |
360 | .unmask = s3c_irq_unmask, | 360 | .unmask = s3c_irq_unmask, |
361 | .wake = s3c_irq_wake, | 361 | .set_wake = s3c_irq_wake, |
362 | .type = s3c_irqext_type, | 362 | .set_type = s3c_irqext_type, |
363 | }; | 363 | }; |
364 | 364 | ||
365 | /* mask values for the parent registers for each of the interrupt types */ | 365 | /* mask values for the parent registers for each of the interrupt types */ |
@@ -496,11 +496,11 @@ static void s3c_irq_demux_adc(unsigned int irq, | |||
496 | if (subsrc != 0) { | 496 | if (subsrc != 0) { |
497 | if (subsrc & 1) { | 497 | if (subsrc & 1) { |
498 | mydesc = irq_desc + IRQ_TC; | 498 | mydesc = irq_desc + IRQ_TC; |
499 | mydesc->handle( IRQ_TC, mydesc, regs); | 499 | desc_handle_irq(IRQ_TC, mydesc, regs); |
500 | } | 500 | } |
501 | if (subsrc & 2) { | 501 | if (subsrc & 2) { |
502 | mydesc = irq_desc + IRQ_ADC; | 502 | mydesc = irq_desc + IRQ_ADC; |
503 | mydesc->handle(IRQ_ADC, mydesc, regs); | 503 | desc_handle_irq(IRQ_ADC, mydesc, regs); |
504 | } | 504 | } |
505 | } | 505 | } |
506 | } | 506 | } |
@@ -529,17 +529,17 @@ static void s3c_irq_demux_uart(unsigned int start, | |||
529 | desc = irq_desc + start; | 529 | desc = irq_desc + start; |
530 | 530 | ||
531 | if (subsrc & 1) | 531 | if (subsrc & 1) |
532 | desc->handle(start, desc, regs); | 532 | desc_handle_irq(start, desc, regs); |
533 | 533 | ||
534 | desc++; | 534 | desc++; |
535 | 535 | ||
536 | if (subsrc & 2) | 536 | if (subsrc & 2) |
537 | desc->handle(start+1, desc, regs); | 537 | desc_handle_irq(start+1, desc, regs); |
538 | 538 | ||
539 | desc++; | 539 | desc++; |
540 | 540 | ||
541 | if (subsrc & 4) | 541 | if (subsrc & 4) |
542 | desc->handle(start+2, desc, regs); | 542 | desc_handle_irq(start+2, desc, regs); |
543 | } | 543 | } |
544 | } | 544 | } |
545 | 545 | ||
diff --git a/arch/arm/mach-s3c2410/pm.c b/arch/arm/mach-s3c2410/pm.c index 13a48ee77484..fe57d966a34d 100644 --- a/arch/arm/mach-s3c2410/pm.c +++ b/arch/arm/mach-s3c2410/pm.c | |||
@@ -585,14 +585,16 @@ static int s3c2410_pm_enter(suspend_state_t state) | |||
585 | 585 | ||
586 | s3c2410_pm_check_store(); | 586 | s3c2410_pm_check_store(); |
587 | 587 | ||
588 | // need to make some form of time-delta | ||
589 | |||
590 | /* send the cpu to sleep... */ | 588 | /* send the cpu to sleep... */ |
591 | 589 | ||
592 | __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ | 590 | __raw_writel(0x00, S3C2410_CLKCON); /* turn off clocks over sleep */ |
593 | 591 | ||
594 | s3c2410_cpu_suspend(regs_save); | 592 | s3c2410_cpu_suspend(regs_save); |
595 | 593 | ||
594 | /* restore the cpu state */ | ||
595 | |||
596 | cpu_init(); | ||
597 | |||
596 | /* unset the return-from-sleep flag, to ensure reset */ | 598 | /* unset the return-from-sleep flag, to ensure reset */ |
597 | 599 | ||
598 | tmp = __raw_readl(S3C2410_GSTATUS2); | 600 | tmp = __raw_readl(S3C2410_GSTATUS2); |
diff --git a/arch/arm/mach-s3c2410/s3c2440-irq.c b/arch/arm/mach-s3c2410/s3c2440-irq.c index 7cb9912242a3..278d0044c85d 100644 --- a/arch/arm/mach-s3c2410/s3c2440-irq.c +++ b/arch/arm/mach-s3c2410/s3c2440-irq.c | |||
@@ -64,11 +64,11 @@ static void s3c_irq_demux_wdtac97(unsigned int irq, | |||
64 | if (subsrc != 0) { | 64 | if (subsrc != 0) { |
65 | if (subsrc & 1) { | 65 | if (subsrc & 1) { |
66 | mydesc = irq_desc + IRQ_S3C2440_WDT; | 66 | mydesc = irq_desc + IRQ_S3C2440_WDT; |
67 | mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); | 67 | desc_handle_irq(IRQ_S3C2440_WDT, mydesc, regs); |
68 | } | 68 | } |
69 | if (subsrc & 2) { | 69 | if (subsrc & 2) { |
70 | mydesc = irq_desc + IRQ_S3C2440_AC97; | 70 | mydesc = irq_desc + IRQ_S3C2440_AC97; |
71 | mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); | 71 | desc_handle_irq(IRQ_S3C2440_AC97, mydesc, regs); |
72 | } | 72 | } |
73 | } | 73 | } |
74 | } | 74 | } |
@@ -122,11 +122,11 @@ static void s3c_irq_demux_cam(unsigned int irq, | |||
122 | if (subsrc != 0) { | 122 | if (subsrc != 0) { |
123 | if (subsrc & 1) { | 123 | if (subsrc & 1) { |
124 | mydesc = irq_desc + IRQ_S3C2440_CAM_C; | 124 | mydesc = irq_desc + IRQ_S3C2440_CAM_C; |
125 | mydesc->handle( IRQ_S3C2440_WDT, mydesc, regs); | 125 | desc_handle_irq(IRQ_S3C2440_CAM_C, mydesc, regs); |
126 | } | 126 | } |
127 | if (subsrc & 2) { | 127 | if (subsrc & 2) { |
128 | mydesc = irq_desc + IRQ_S3C2440_CAM_P; | 128 | mydesc = irq_desc + IRQ_S3C2440_CAM_P; |
129 | mydesc->handle(IRQ_S3C2440_AC97, mydesc, regs); | 129 | desc_handle_irq(IRQ_S3C2440_CAM_P, mydesc, regs); |
130 | } | 130 | } |
131 | } | 131 | } |
132 | } | 132 | } |
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c index 66a929cb7bc5..c131a5201b5b 100644 --- a/arch/arm/mach-sa1100/irq.c +++ b/arch/arm/mach-sa1100/irq.c | |||
@@ -98,8 +98,8 @@ static struct irqchip sa1100_low_gpio_chip = { | |||
98 | .ack = sa1100_low_gpio_ack, | 98 | .ack = sa1100_low_gpio_ack, |
99 | .mask = sa1100_low_gpio_mask, | 99 | .mask = sa1100_low_gpio_mask, |
100 | .unmask = sa1100_low_gpio_unmask, | 100 | .unmask = sa1100_low_gpio_unmask, |
101 | .type = sa1100_gpio_type, | 101 | .set_type = sa1100_gpio_type, |
102 | .wake = sa1100_low_gpio_wake, | 102 | .set_wake = sa1100_low_gpio_wake, |
103 | }; | 103 | }; |
104 | 104 | ||
105 | /* | 105 | /* |
@@ -126,7 +126,7 @@ sa1100_high_gpio_handler(unsigned int irq, struct irqdesc *desc, | |||
126 | mask >>= 11; | 126 | mask >>= 11; |
127 | do { | 127 | do { |
128 | if (mask & 1) | 128 | if (mask & 1) |
129 | desc->handle(irq, desc, regs); | 129 | desc_handle_irq(irq, desc, regs); |
130 | mask >>= 1; | 130 | mask >>= 1; |
131 | irq++; | 131 | irq++; |
132 | desc++; | 132 | desc++; |
@@ -181,8 +181,8 @@ static struct irqchip sa1100_high_gpio_chip = { | |||
181 | .ack = sa1100_high_gpio_ack, | 181 | .ack = sa1100_high_gpio_ack, |
182 | .mask = sa1100_high_gpio_mask, | 182 | .mask = sa1100_high_gpio_mask, |
183 | .unmask = sa1100_high_gpio_unmask, | 183 | .unmask = sa1100_high_gpio_unmask, |
184 | .type = sa1100_gpio_type, | 184 | .set_type = sa1100_gpio_type, |
185 | .wake = sa1100_high_gpio_wake, | 185 | .set_wake = sa1100_high_gpio_wake, |
186 | }; | 186 | }; |
187 | 187 | ||
188 | /* | 188 | /* |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 1405383463ea..fc061641b7be 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -61,12 +61,12 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg | |||
61 | 61 | ||
62 | if (irr & IRR_ETHERNET) { | 62 | if (irr & IRR_ETHERNET) { |
63 | d = irq_desc + IRQ_NEPONSET_SMC9196; | 63 | d = irq_desc + IRQ_NEPONSET_SMC9196; |
64 | d->handle(IRQ_NEPONSET_SMC9196, d, regs); | 64 | desc_handle_irq(IRQ_NEPONSET_SMC9196, d, regs); |
65 | } | 65 | } |
66 | 66 | ||
67 | if (irr & IRR_USAR) { | 67 | if (irr & IRR_USAR) { |
68 | d = irq_desc + IRQ_NEPONSET_USAR; | 68 | d = irq_desc + IRQ_NEPONSET_USAR; |
69 | d->handle(IRQ_NEPONSET_USAR, d, regs); | 69 | desc_handle_irq(IRQ_NEPONSET_USAR, d, regs); |
70 | } | 70 | } |
71 | 71 | ||
72 | desc->chip->unmask(irq); | 72 | desc->chip->unmask(irq); |
@@ -74,7 +74,7 @@ neponset_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg | |||
74 | 74 | ||
75 | if (irr & IRR_SA1111) { | 75 | if (irr & IRR_SA1111) { |
76 | d = irq_desc + IRQ_NEPONSET_SA1111; | 76 | d = irq_desc + IRQ_NEPONSET_SA1111; |
77 | d->handle(IRQ_NEPONSET_SA1111, d, regs); | 77 | desc_handle_irq(IRQ_NEPONSET_SA1111, d, regs); |
78 | } | 78 | } |
79 | } | 79 | } |
80 | } | 80 | } |
diff --git a/arch/arm/mach-versatile/core.c b/arch/arm/mach-versatile/core.c index f01c0f8a2bb3..3c8862fde51a 100644 --- a/arch/arm/mach-versatile/core.c +++ b/arch/arm/mach-versatile/core.c | |||
@@ -108,7 +108,7 @@ sic_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | |||
108 | irq += IRQ_SIC_START; | 108 | irq += IRQ_SIC_START; |
109 | 109 | ||
110 | desc = irq_desc + irq; | 110 | desc = irq_desc + irq; |
111 | desc->handle(irq, desc, regs); | 111 | desc_handle_irq(irq, desc, regs); |
112 | } while (status); | 112 | } while (status); |
113 | } | 113 | } |
114 | 114 | ||
diff --git a/arch/arm/mm/proc-arm6_7.S b/arch/arm/mm/proc-arm6_7.S index 0ee214b824ff..189ef6a71ba1 100644 --- a/arch/arm/mm/proc-arm6_7.S +++ b/arch/arm/mm/proc-arm6_7.S | |||
@@ -38,8 +38,8 @@ ENTRY(cpu_arm7_data_abort) | |||
38 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | 38 | mrc p15, 0, r1, c5, c0, 0 @ get FSR |
39 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | 39 | mrc p15, 0, r0, c6, c0, 0 @ get FAR |
40 | ldr r8, [r0] @ read arm instruction | 40 | ldr r8, [r0] @ read arm instruction |
41 | tst r8, #1 << 20 @ L = 1 -> write? | 41 | tst r8, #1 << 20 @ L = 0 -> write? |
42 | orreq r1, r1, #1 << 8 @ yes. | 42 | orreq r1, r1, #1 << 11 @ yes. |
43 | and r7, r8, #15 << 24 | 43 | and r7, r8, #15 << 24 |
44 | add pc, pc, r7, lsr #22 @ Now branch to the relevant processing routine | 44 | add pc, pc, r7, lsr #22 @ Now branch to the relevant processing routine |
45 | nop | 45 | nop |
@@ -71,8 +71,8 @@ ENTRY(cpu_arm6_data_abort) | |||
71 | mrc p15, 0, r1, c5, c0, 0 @ get FSR | 71 | mrc p15, 0, r1, c5, c0, 0 @ get FSR |
72 | mrc p15, 0, r0, c6, c0, 0 @ get FAR | 72 | mrc p15, 0, r0, c6, c0, 0 @ get FAR |
73 | ldr r8, [r2] @ read arm instruction | 73 | ldr r8, [r2] @ read arm instruction |
74 | tst r8, #1 << 20 @ L = 1 -> write? | 74 | tst r8, #1 << 20 @ L = 0 -> write? |
75 | orreq r1, r1, #1 << 8 @ yes. | 75 | orreq r1, r1, #1 << 11 @ yes. |
76 | and r7, r8, #14 << 24 | 76 | and r7, r8, #14 << 24 |
77 | teq r7, #8 << 24 @ was it ldm/stm | 77 | teq r7, #8 << 24 @ was it ldm/stm |
78 | movne pc, lr | 78 | movne pc, lr |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 1c85b4e536c2..aa481ea3d702 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -590,7 +590,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, | |||
590 | if (!(isr & 1)) | 590 | if (!(isr & 1)) |
591 | continue; | 591 | continue; |
592 | d = irq_desc + gpio_irq; | 592 | d = irq_desc + gpio_irq; |
593 | d->handle(gpio_irq, d, regs); | 593 | desc_handle_irq(gpio_irq, d, regs); |
594 | } | 594 | } |
595 | } | 595 | } |
596 | 596 | ||
diff --git a/arch/cris/Kconfig.debug b/arch/cris/Kconfig.debug index cd72324935c4..0a1d62a23614 100644 --- a/arch/cris/Kconfig.debug +++ b/arch/cris/Kconfig.debug | |||
@@ -5,10 +5,13 @@ config PROFILING | |||
5 | bool "Kernel profiling support" | 5 | bool "Kernel profiling support" |
6 | 6 | ||
7 | config SYSTEM_PROFILER | 7 | config SYSTEM_PROFILER |
8 | bool "System profiling support" | 8 | bool "System profiling support" |
9 | |||
10 | source "lib/Kconfig.debug" | ||
9 | 11 | ||
10 | config ETRAX_KGDB | 12 | config ETRAX_KGDB |
11 | bool "Use kernel GDB debugger" | 13 | bool "Use kernel GDB debugger" |
14 | depends on DEBUG_KERNEL | ||
12 | ---help--- | 15 | ---help--- |
13 | The CRIS version of gdb can be used to remotely debug a running | 16 | The CRIS version of gdb can be used to remotely debug a running |
14 | Linux kernel via the serial debug port. Provided you have gdb-cris | 17 | Linux kernel via the serial debug port. Provided you have gdb-cris |
@@ -22,25 +25,11 @@ config ETRAX_KGDB | |||
22 | this option is turned on! | 25 | this option is turned on! |
23 | 26 | ||
24 | 27 | ||
25 | config DEBUG_INFO | ||
26 | bool "Compile the kernel with debug info" | ||
27 | help | ||
28 | If you say Y here the resulting kernel image will include | ||
29 | debugging info resulting in a larger kernel image. | ||
30 | Say Y here only if you plan to use gdb to debug the kernel. | ||
31 | If you don't debug the kernel, you can say N. | ||
32 | |||
33 | config FRAME_POINTER | ||
34 | bool "Compile the kernel with frame pointers" | ||
35 | help | ||
36 | If you say Y here the resulting kernel image will be slightly larger | ||
37 | and slower, but it will give very useful debugging information. | ||
38 | If you don't debug the kernel, you can say N, but we may not be able | ||
39 | to solve problems without frame pointers. | ||
40 | |||
41 | config DEBUG_NMI_OOPS | 28 | config DEBUG_NMI_OOPS |
42 | bool "NMI causes oops printout" | 29 | bool "NMI causes oops printout" |
43 | help | 30 | depends on DEBUG_KERNEL |
44 | If the system locks up without any debug information you can say Y | 31 | help |
45 | here to make it possible to dump an OOPS with an external NMI. | 32 | If the system locks up without any debug information you can say Y |
33 | here to make it possible to dump an OOPS with an external NMI. | ||
34 | |||
46 | endmenu | 35 | endmenu |
diff --git a/arch/frv/kernel/frv_ksyms.c b/arch/frv/kernel/frv_ksyms.c index 62cfbd9b4f98..1a76d5247190 100644 --- a/arch/frv/kernel/frv_ksyms.c +++ b/arch/frv/kernel/frv_ksyms.c | |||
@@ -71,7 +71,6 @@ EXPORT_SYMBOL(memset); | |||
71 | EXPORT_SYMBOL(memcmp); | 71 | EXPORT_SYMBOL(memcmp); |
72 | EXPORT_SYMBOL(memscan); | 72 | EXPORT_SYMBOL(memscan); |
73 | EXPORT_SYMBOL(memmove); | 73 | EXPORT_SYMBOL(memmove); |
74 | EXPORT_SYMBOL(strtok); | ||
75 | 74 | ||
76 | EXPORT_SYMBOL(get_wchan); | 75 | EXPORT_SYMBOL(get_wchan); |
77 | 76 | ||
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index 619d843ba231..3b3b017e1c15 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
@@ -14,6 +14,10 @@ config X86 | |||
14 | 486, 586, Pentiums, and various instruction-set-compatible chips by | 14 | 486, 586, Pentiums, and various instruction-set-compatible chips by |
15 | AMD, Cyrix, and others. | 15 | AMD, Cyrix, and others. |
16 | 16 | ||
17 | config SEMAPHORE_SLEEPERS | ||
18 | bool | ||
19 | default y | ||
20 | |||
17 | config MMU | 21 | config MMU |
18 | bool | 22 | bool |
19 | default y | 23 | default y |
@@ -754,6 +758,7 @@ config NUMA | |||
754 | depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI)) | 758 | depends on SMP && HIGHMEM64G && (X86_NUMAQ || X86_GENERICARCH || (X86_SUMMIT && ACPI)) |
755 | default n if X86_PC | 759 | default n if X86_PC |
756 | default y if (X86_NUMAQ || X86_SUMMIT) | 760 | default y if (X86_NUMAQ || X86_SUMMIT) |
761 | select SPARSEMEM_STATIC | ||
757 | 762 | ||
758 | # Need comments to help the hapless user trying to turn on NUMA support | 763 | # Need comments to help the hapless user trying to turn on NUMA support |
759 | comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support" | 764 | comment "NUMA (NUMA-Q) requires SMP, 64GB highmem support" |
diff --git a/arch/i386/kernel/Makefile b/arch/i386/kernel/Makefile index 4cc83b322b36..64682a0edacf 100644 --- a/arch/i386/kernel/Makefile +++ b/arch/i386/kernel/Makefile | |||
@@ -7,7 +7,7 @@ extra-y := head.o init_task.o vmlinux.lds | |||
7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ | 7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o vm86.o \ |
8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ | 8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_i386.o \ |
9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ | 9 | pci-dma.o i386_ksyms.o i387.o dmi_scan.o bootflag.o \ |
10 | doublefault.o quirks.o | 10 | doublefault.o quirks.o i8237.o |
11 | 11 | ||
12 | obj-y += cpu/ | 12 | obj-y += cpu/ |
13 | obj-y += timers/ | 13 | obj-y += timers/ |
diff --git a/arch/i386/kernel/acpi/boot.c b/arch/i386/kernel/acpi/boot.c index b7808a89d945..34ee500c26e5 100644 --- a/arch/i386/kernel/acpi/boot.c +++ b/arch/i386/kernel/acpi/boot.c | |||
@@ -833,6 +833,9 @@ acpi_process_madt(void) | |||
833 | if (!error) { | 833 | if (!error) { |
834 | acpi_lapic = 1; | 834 | acpi_lapic = 1; |
835 | 835 | ||
836 | #ifdef CONFIG_X86_GENERICARCH | ||
837 | generic_bigsmp_probe(); | ||
838 | #endif | ||
836 | /* | 839 | /* |
837 | * Parse MADT IO-APIC entries | 840 | * Parse MADT IO-APIC entries |
838 | */ | 841 | */ |
diff --git a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c index 4553ffd94b1f..46ce9b248f55 100644 --- a/arch/i386/kernel/cpu/common.c +++ b/arch/i386/kernel/cpu/common.c | |||
@@ -613,8 +613,8 @@ void __devinit cpu_init(void) | |||
613 | memcpy(thread->tls_array, &per_cpu(cpu_gdt_table, cpu), | 613 | memcpy(thread->tls_array, &per_cpu(cpu_gdt_table, cpu), |
614 | GDT_ENTRY_TLS_ENTRIES * 8); | 614 | GDT_ENTRY_TLS_ENTRIES * 8); |
615 | 615 | ||
616 | __asm__ __volatile__("lgdt %0" : : "m" (cpu_gdt_descr[cpu])); | 616 | load_gdt(&cpu_gdt_descr[cpu]); |
617 | __asm__ __volatile__("lidt %0" : : "m" (idt_descr)); | 617 | load_idt(&idt_descr); |
618 | 618 | ||
619 | /* | 619 | /* |
620 | * Delete NT | 620 | * Delete NT |
@@ -642,12 +642,12 @@ void __devinit cpu_init(void) | |||
642 | asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs"); | 642 | asm volatile ("xorl %eax, %eax; movl %eax, %fs; movl %eax, %gs"); |
643 | 643 | ||
644 | /* Clear all 6 debug registers: */ | 644 | /* Clear all 6 debug registers: */ |
645 | 645 | set_debugreg(0, 0); | |
646 | #define CD(register) set_debugreg(0, register) | 646 | set_debugreg(0, 1); |
647 | 647 | set_debugreg(0, 2); | |
648 | CD(0); CD(1); CD(2); CD(3); /* no db4 and db5 */; CD(6); CD(7); | 648 | set_debugreg(0, 3); |
649 | 649 | set_debugreg(0, 6); | |
650 | #undef CD | 650 | set_debugreg(0, 7); |
651 | 651 | ||
652 | /* | 652 | /* |
653 | * Force FPU initialization: | 653 | * Force FPU initialization: |
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c index 04e3563da4fe..bf02b5026e62 100644 --- a/arch/i386/kernel/cpu/cpufreq/longhaul.c +++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c | |||
@@ -64,8 +64,6 @@ static int dont_scale_voltage; | |||
64 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) | 64 | #define dprintk(msg...) cpufreq_debug_printk(CPUFREQ_DEBUG_DRIVER, "longhaul", msg) |
65 | 65 | ||
66 | 66 | ||
67 | #define __hlt() __asm__ __volatile__("hlt": : :"memory") | ||
68 | |||
69 | /* Clock ratios multiplied by 10 */ | 67 | /* Clock ratios multiplied by 10 */ |
70 | static int clock_ratio[32]; | 68 | static int clock_ratio[32]; |
71 | static int eblcr_table[32]; | 69 | static int eblcr_table[32]; |
@@ -168,11 +166,9 @@ static void do_powersaver(union msr_longhaul *longhaul, | |||
168 | outb(0xFE,0x21); /* TMR0 only */ | 166 | outb(0xFE,0x21); /* TMR0 only */ |
169 | outb(0xFF,0x80); /* delay */ | 167 | outb(0xFF,0x80); /* delay */ |
170 | 168 | ||
171 | local_irq_enable(); | 169 | safe_halt(); |
172 | |||
173 | __hlt(); | ||
174 | wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); | 170 | wrmsrl(MSR_VIA_LONGHAUL, longhaul->val); |
175 | __hlt(); | 171 | halt(); |
176 | 172 | ||
177 | local_irq_disable(); | 173 | local_irq_disable(); |
178 | 174 | ||
@@ -251,9 +247,7 @@ static void longhaul_setstate(unsigned int clock_ratio_index) | |||
251 | bcr2.bits.CLOCKMUL = clock_ratio_index; | 247 | bcr2.bits.CLOCKMUL = clock_ratio_index; |
252 | local_irq_disable(); | 248 | local_irq_disable(); |
253 | wrmsrl (MSR_VIA_BCR2, bcr2.val); | 249 | wrmsrl (MSR_VIA_BCR2, bcr2.val); |
254 | local_irq_enable(); | 250 | safe_halt(); |
255 | |||
256 | __hlt(); | ||
257 | 251 | ||
258 | /* Disable software clock multiplier */ | 252 | /* Disable software clock multiplier */ |
259 | rdmsrl (MSR_VIA_BCR2, bcr2.val); | 253 | rdmsrl (MSR_VIA_BCR2, bcr2.val); |
diff --git a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c index ba4b01138c8f..ff87cc22b323 100644 --- a/arch/i386/kernel/cpu/cyrix.c +++ b/arch/i386/kernel/cpu/cyrix.c | |||
@@ -132,11 +132,7 @@ static void __init set_cx86_memwb(void) | |||
132 | setCx86(CX86_CCR2, getCx86(CX86_CCR2) & ~0x04); | 132 | setCx86(CX86_CCR2, getCx86(CX86_CCR2) & ~0x04); |
133 | /* set 'Not Write-through' */ | 133 | /* set 'Not Write-through' */ |
134 | cr0 = 0x20000000; | 134 | cr0 = 0x20000000; |
135 | __asm__("movl %%cr0,%%eax\n\t" | 135 | write_cr0(read_cr0() | cr0); |
136 | "orl %0,%%eax\n\t" | ||
137 | "movl %%eax,%%cr0\n" | ||
138 | : : "r" (cr0) | ||
139 | :"ax"); | ||
140 | /* CCR2 bit 2: lock NW bit and set WT1 */ | 136 | /* CCR2 bit 2: lock NW bit and set WT1 */ |
141 | setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14 ); | 137 | setCx86(CX86_CCR2, getCx86(CX86_CCR2) | 0x14 ); |
142 | } | 138 | } |
diff --git a/arch/i386/kernel/cpu/intel.c b/arch/i386/kernel/cpu/intel.c index a2c33c1a46c5..43601de0f633 100644 --- a/arch/i386/kernel/cpu/intel.c +++ b/arch/i386/kernel/cpu/intel.c | |||
@@ -82,16 +82,13 @@ static void __devinit Intel_errata_workarounds(struct cpuinfo_x86 *c) | |||
82 | */ | 82 | */ |
83 | static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) | 83 | static int __devinit num_cpu_cores(struct cpuinfo_x86 *c) |
84 | { | 84 | { |
85 | unsigned int eax; | 85 | unsigned int eax, ebx, ecx, edx; |
86 | 86 | ||
87 | if (c->cpuid_level < 4) | 87 | if (c->cpuid_level < 4) |
88 | return 1; | 88 | return 1; |
89 | 89 | ||
90 | __asm__("cpuid" | 90 | /* Intel has a non-standard dependency on %ecx for this CPUID level. */ |
91 | : "=a" (eax) | 91 | cpuid_count(4, 0, &eax, &ebx, &ecx, &edx); |
92 | : "0" (4), "c" (0) | ||
93 | : "bx", "dx"); | ||
94 | |||
95 | if (eax & 0x1f) | 92 | if (eax & 0x1f) |
96 | return ((eax >> 26) + 1); | 93 | return ((eax >> 26) + 1); |
97 | else | 94 | else |
diff --git a/arch/i386/kernel/cpu/intel_cacheinfo.c b/arch/i386/kernel/cpu/intel_cacheinfo.c index 6c55b50cf048..9e0d5f83cb9f 100644 --- a/arch/i386/kernel/cpu/intel_cacheinfo.c +++ b/arch/i386/kernel/cpu/intel_cacheinfo.c | |||
@@ -305,6 +305,9 @@ static void __devinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
305 | { | 305 | { |
306 | struct _cpuid4_info *this_leaf; | 306 | struct _cpuid4_info *this_leaf; |
307 | unsigned long num_threads_sharing; | 307 | unsigned long num_threads_sharing; |
308 | #ifdef CONFIG_X86_HT | ||
309 | struct cpuinfo_x86 *c = cpu_data + cpu; | ||
310 | #endif | ||
308 | 311 | ||
309 | this_leaf = CPUID4_INFO_IDX(cpu, index); | 312 | this_leaf = CPUID4_INFO_IDX(cpu, index); |
310 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; | 313 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; |
@@ -314,10 +317,12 @@ static void __devinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
314 | #ifdef CONFIG_X86_HT | 317 | #ifdef CONFIG_X86_HT |
315 | else if (num_threads_sharing == smp_num_siblings) | 318 | else if (num_threads_sharing == smp_num_siblings) |
316 | this_leaf->shared_cpu_map = cpu_sibling_map[cpu]; | 319 | this_leaf->shared_cpu_map = cpu_sibling_map[cpu]; |
317 | #endif | 320 | else if (num_threads_sharing == (c->x86_num_cores * smp_num_siblings)) |
321 | this_leaf->shared_cpu_map = cpu_core_map[cpu]; | ||
318 | else | 322 | else |
319 | printk(KERN_INFO "Number of CPUs sharing cache didn't match " | 323 | printk(KERN_DEBUG "Number of CPUs sharing cache didn't match " |
320 | "any known set of CPUs\n"); | 324 | "any known set of CPUs\n"); |
325 | #endif | ||
321 | } | 326 | } |
322 | #else | 327 | #else |
323 | static void __init cache_shared_cpu_map_setup(unsigned int cpu, int index) {} | 328 | static void __init cache_shared_cpu_map_setup(unsigned int cpu, int index) {} |
diff --git a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c index 764cac64e211..dd4ebd6af7e4 100644 --- a/arch/i386/kernel/cpu/mtrr/main.c +++ b/arch/i386/kernel/cpu/mtrr/main.c | |||
@@ -561,7 +561,7 @@ struct mtrr_value { | |||
561 | 561 | ||
562 | static struct mtrr_value * mtrr_state; | 562 | static struct mtrr_value * mtrr_state; |
563 | 563 | ||
564 | static int mtrr_save(struct sys_device * sysdev, u32 state) | 564 | static int mtrr_save(struct sys_device * sysdev, pm_message_t state) |
565 | { | 565 | { |
566 | int i; | 566 | int i; |
567 | int size = num_var_ranges * sizeof(struct mtrr_value); | 567 | int size = num_var_ranges * sizeof(struct mtrr_value); |
diff --git a/arch/i386/kernel/crash.c b/arch/i386/kernel/crash.c index e5fab12f7926..913be77bb844 100644 --- a/arch/i386/kernel/crash.c +++ b/arch/i386/kernel/crash.c | |||
@@ -153,7 +153,7 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu) | |||
153 | disable_local_APIC(); | 153 | disable_local_APIC(); |
154 | atomic_dec(&waiting_for_crash_ipi); | 154 | atomic_dec(&waiting_for_crash_ipi); |
155 | /* Assume hlt works */ | 155 | /* Assume hlt works */ |
156 | __asm__("hlt"); | 156 | halt(); |
157 | for(;;); | 157 | for(;;); |
158 | 158 | ||
159 | return 1; | 159 | return 1; |
diff --git a/arch/i386/kernel/doublefault.c b/arch/i386/kernel/doublefault.c index 789af3e9fb1f..5edb1d379add 100644 --- a/arch/i386/kernel/doublefault.c +++ b/arch/i386/kernel/doublefault.c | |||
@@ -20,7 +20,7 @@ static void doublefault_fn(void) | |||
20 | struct Xgt_desc_struct gdt_desc = {0, 0}; | 20 | struct Xgt_desc_struct gdt_desc = {0, 0}; |
21 | unsigned long gdt, tss; | 21 | unsigned long gdt, tss; |
22 | 22 | ||
23 | __asm__ __volatile__("sgdt %0": "=m" (gdt_desc): :"memory"); | 23 | store_gdt(&gdt_desc); |
24 | gdt = gdt_desc.address; | 24 | gdt = gdt_desc.address; |
25 | 25 | ||
26 | printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size); | 26 | printk("double fault, gdt at %08lx [%d bytes]\n", gdt, gdt_desc.size); |
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c index 385883ea8c19..ecad519fd395 100644 --- a/arch/i386/kernel/efi.c +++ b/arch/i386/kernel/efi.c | |||
@@ -79,7 +79,7 @@ static void efi_call_phys_prelog(void) | |||
79 | * directory. If I have PSE, I just need to duplicate one entry in | 79 | * directory. If I have PSE, I just need to duplicate one entry in |
80 | * page directory. | 80 | * page directory. |
81 | */ | 81 | */ |
82 | __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4)); | 82 | cr4 = read_cr4(); |
83 | 83 | ||
84 | if (cr4 & X86_CR4_PSE) { | 84 | if (cr4 & X86_CR4_PSE) { |
85 | efi_bak_pg_dir_pointer[0].pgd = | 85 | efi_bak_pg_dir_pointer[0].pgd = |
@@ -104,8 +104,7 @@ static void efi_call_phys_prelog(void) | |||
104 | local_flush_tlb(); | 104 | local_flush_tlb(); |
105 | 105 | ||
106 | cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address); | 106 | cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address); |
107 | __asm__ __volatile__("lgdt %0":"=m" | 107 | load_gdt((struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0])); |
108 | (*(struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0]))); | ||
109 | } | 108 | } |
110 | 109 | ||
111 | static void efi_call_phys_epilog(void) | 110 | static void efi_call_phys_epilog(void) |
@@ -114,8 +113,8 @@ static void efi_call_phys_epilog(void) | |||
114 | 113 | ||
115 | cpu_gdt_descr[0].address = | 114 | cpu_gdt_descr[0].address = |
116 | (unsigned long) __va(cpu_gdt_descr[0].address); | 115 | (unsigned long) __va(cpu_gdt_descr[0].address); |
117 | __asm__ __volatile__("lgdt %0":"=m"(cpu_gdt_descr)); | 116 | load_gdt(&cpu_gdt_descr[0]); |
118 | __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4)); | 117 | cr4 = read_cr4(); |
119 | 118 | ||
120 | if (cr4 & X86_CR4_PSE) { | 119 | if (cr4 & X86_CR4_PSE) { |
121 | swapper_pg_dir[pgd_index(0)].pgd = | 120 | swapper_pg_dir[pgd_index(0)].pgd = |
@@ -233,22 +232,23 @@ void __init efi_map_memmap(void) | |||
233 | { | 232 | { |
234 | memmap.map = NULL; | 233 | memmap.map = NULL; |
235 | 234 | ||
236 | memmap.map = (efi_memory_desc_t *) | 235 | memmap.map = bt_ioremap((unsigned long) memmap.phys_map, |
237 | bt_ioremap((unsigned long) memmap.phys_map, | 236 | (memmap.nr_map * memmap.desc_size)); |
238 | (memmap.nr_map * sizeof(efi_memory_desc_t))); | ||
239 | |||
240 | if (memmap.map == NULL) | 237 | if (memmap.map == NULL) |
241 | printk(KERN_ERR PFX "Could not remap the EFI memmap!\n"); | 238 | printk(KERN_ERR PFX "Could not remap the EFI memmap!\n"); |
239 | |||
240 | memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); | ||
242 | } | 241 | } |
243 | 242 | ||
244 | #if EFI_DEBUG | 243 | #if EFI_DEBUG |
245 | static void __init print_efi_memmap(void) | 244 | static void __init print_efi_memmap(void) |
246 | { | 245 | { |
247 | efi_memory_desc_t *md; | 246 | efi_memory_desc_t *md; |
247 | void *p; | ||
248 | int i; | 248 | int i; |
249 | 249 | ||
250 | for (i = 0; i < memmap.nr_map; i++) { | 250 | for (p = memmap.map, i = 0; p < memmap.map_end; p += memmap.desc_size, i++) { |
251 | md = &memmap.map[i]; | 251 | md = p; |
252 | printk(KERN_INFO "mem%02u: type=%u, attr=0x%llx, " | 252 | printk(KERN_INFO "mem%02u: type=%u, attr=0x%llx, " |
253 | "range=[0x%016llx-0x%016llx) (%lluMB)\n", | 253 | "range=[0x%016llx-0x%016llx) (%lluMB)\n", |
254 | i, md->type, md->attribute, md->phys_addr, | 254 | i, md->type, md->attribute, md->phys_addr, |
@@ -271,10 +271,10 @@ void efi_memmap_walk(efi_freemem_callback_t callback, void *arg) | |||
271 | } prev, curr; | 271 | } prev, curr; |
272 | efi_memory_desc_t *md; | 272 | efi_memory_desc_t *md; |
273 | unsigned long start, end; | 273 | unsigned long start, end; |
274 | int i; | 274 | void *p; |
275 | 275 | ||
276 | for (i = 0; i < memmap.nr_map; i++) { | 276 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
277 | md = &memmap.map[i]; | 277 | md = p; |
278 | 278 | ||
279 | if ((md->num_pages == 0) || (!is_available_memory(md))) | 279 | if ((md->num_pages == 0) || (!is_available_memory(md))) |
280 | continue; | 280 | continue; |
@@ -325,6 +325,7 @@ void __init efi_init(void) | |||
325 | memmap.phys_map = EFI_MEMMAP; | 325 | memmap.phys_map = EFI_MEMMAP; |
326 | memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE; | 326 | memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE; |
327 | memmap.desc_version = EFI_MEMDESC_VERSION; | 327 | memmap.desc_version = EFI_MEMDESC_VERSION; |
328 | memmap.desc_size = EFI_MEMDESC_SIZE; | ||
328 | 329 | ||
329 | efi.systab = (efi_system_table_t *) | 330 | efi.systab = (efi_system_table_t *) |
330 | boot_ioremap((unsigned long) efi_phys.systab, | 331 | boot_ioremap((unsigned long) efi_phys.systab, |
@@ -428,22 +429,30 @@ void __init efi_init(void) | |||
428 | printk(KERN_ERR PFX "Could not map the runtime service table!\n"); | 429 | printk(KERN_ERR PFX "Could not map the runtime service table!\n"); |
429 | 430 | ||
430 | /* Map the EFI memory map for use until paging_init() */ | 431 | /* Map the EFI memory map for use until paging_init() */ |
431 | 432 | memmap.map = boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE); | |
432 | memmap.map = (efi_memory_desc_t *) | ||
433 | boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE); | ||
434 | |||
435 | if (memmap.map == NULL) | 433 | if (memmap.map == NULL) |
436 | printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); | 434 | printk(KERN_ERR PFX "Could not map the EFI memory map!\n"); |
437 | 435 | ||
438 | if (EFI_MEMDESC_SIZE != sizeof(efi_memory_desc_t)) { | 436 | memmap.map_end = memmap.map + (memmap.nr_map * memmap.desc_size); |
439 | printk(KERN_WARNING PFX "Warning! Kernel-defined memdesc doesn't " | 437 | |
440 | "match the one from EFI!\n"); | ||
441 | } | ||
442 | #if EFI_DEBUG | 438 | #if EFI_DEBUG |
443 | print_efi_memmap(); | 439 | print_efi_memmap(); |
444 | #endif | 440 | #endif |
445 | } | 441 | } |
446 | 442 | ||
443 | static inline void __init check_range_for_systab(efi_memory_desc_t *md) | ||
444 | { | ||
445 | if (((unsigned long)md->phys_addr <= (unsigned long)efi_phys.systab) && | ||
446 | ((unsigned long)efi_phys.systab < md->phys_addr + | ||
447 | ((unsigned long)md->num_pages << EFI_PAGE_SHIFT))) { | ||
448 | unsigned long addr; | ||
449 | |||
450 | addr = md->virt_addr - md->phys_addr + | ||
451 | (unsigned long)efi_phys.systab; | ||
452 | efi.systab = (efi_system_table_t *)addr; | ||
453 | } | ||
454 | } | ||
455 | |||
447 | /* | 456 | /* |
448 | * This function will switch the EFI runtime services to virtual mode. | 457 | * This function will switch the EFI runtime services to virtual mode. |
449 | * Essentially, look through the EFI memmap and map every region that | 458 | * Essentially, look through the EFI memmap and map every region that |
@@ -457,43 +466,32 @@ void __init efi_enter_virtual_mode(void) | |||
457 | { | 466 | { |
458 | efi_memory_desc_t *md; | 467 | efi_memory_desc_t *md; |
459 | efi_status_t status; | 468 | efi_status_t status; |
460 | int i; | 469 | void *p; |
461 | 470 | ||
462 | efi.systab = NULL; | 471 | efi.systab = NULL; |
463 | 472 | ||
464 | for (i = 0; i < memmap.nr_map; i++) { | 473 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
465 | md = &memmap.map[i]; | 474 | md = p; |
466 | 475 | ||
467 | if (md->attribute & EFI_MEMORY_RUNTIME) { | 476 | if (!(md->attribute & EFI_MEMORY_RUNTIME)) |
468 | md->virt_addr = | 477 | continue; |
469 | (unsigned long)ioremap(md->phys_addr, | ||
470 | md->num_pages << EFI_PAGE_SHIFT); | ||
471 | if (!(unsigned long)md->virt_addr) { | ||
472 | printk(KERN_ERR PFX "ioremap of 0x%lX failed\n", | ||
473 | (unsigned long)md->phys_addr); | ||
474 | } | ||
475 | 478 | ||
476 | if (((unsigned long)md->phys_addr <= | 479 | md->virt_addr = (unsigned long)ioremap(md->phys_addr, |
477 | (unsigned long)efi_phys.systab) && | 480 | md->num_pages << EFI_PAGE_SHIFT); |
478 | ((unsigned long)efi_phys.systab < | 481 | if (!(unsigned long)md->virt_addr) { |
479 | md->phys_addr + | 482 | printk(KERN_ERR PFX "ioremap of 0x%lX failed\n", |
480 | ((unsigned long)md->num_pages << | 483 | (unsigned long)md->phys_addr); |
481 | EFI_PAGE_SHIFT))) { | ||
482 | unsigned long addr; | ||
483 | |||
484 | addr = md->virt_addr - md->phys_addr + | ||
485 | (unsigned long)efi_phys.systab; | ||
486 | efi.systab = (efi_system_table_t *)addr; | ||
487 | } | ||
488 | } | 484 | } |
485 | /* update the virtual address of the EFI system table */ | ||
486 | check_range_for_systab(md); | ||
489 | } | 487 | } |
490 | 488 | ||
491 | if (!efi.systab) | 489 | if (!efi.systab) |
492 | BUG(); | 490 | BUG(); |
493 | 491 | ||
494 | status = phys_efi_set_virtual_address_map( | 492 | status = phys_efi_set_virtual_address_map( |
495 | sizeof(efi_memory_desc_t) * memmap.nr_map, | 493 | memmap.desc_size * memmap.nr_map, |
496 | sizeof(efi_memory_desc_t), | 494 | memmap.desc_size, |
497 | memmap.desc_version, | 495 | memmap.desc_version, |
498 | memmap.phys_map); | 496 | memmap.phys_map); |
499 | 497 | ||
@@ -533,10 +531,10 @@ efi_initialize_iomem_resources(struct resource *code_resource, | |||
533 | { | 531 | { |
534 | struct resource *res; | 532 | struct resource *res; |
535 | efi_memory_desc_t *md; | 533 | efi_memory_desc_t *md; |
536 | int i; | 534 | void *p; |
537 | 535 | ||
538 | for (i = 0; i < memmap.nr_map; i++) { | 536 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
539 | md = &memmap.map[i]; | 537 | md = p; |
540 | 538 | ||
541 | if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) > | 539 | if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) > |
542 | 0x100000000ULL) | 540 | 0x100000000ULL) |
@@ -613,10 +611,10 @@ efi_initialize_iomem_resources(struct resource *code_resource, | |||
613 | u32 efi_mem_type(unsigned long phys_addr) | 611 | u32 efi_mem_type(unsigned long phys_addr) |
614 | { | 612 | { |
615 | efi_memory_desc_t *md; | 613 | efi_memory_desc_t *md; |
616 | int i; | 614 | void *p; |
617 | 615 | ||
618 | for (i = 0; i < memmap.nr_map; i++) { | 616 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
619 | md = &memmap.map[i]; | 617 | md = p; |
620 | if ((md->phys_addr <= phys_addr) && (phys_addr < | 618 | if ((md->phys_addr <= phys_addr) && (phys_addr < |
621 | (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) )) | 619 | (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) )) |
622 | return md->type; | 620 | return md->type; |
@@ -627,10 +625,10 @@ u32 efi_mem_type(unsigned long phys_addr) | |||
627 | u64 efi_mem_attributes(unsigned long phys_addr) | 625 | u64 efi_mem_attributes(unsigned long phys_addr) |
628 | { | 626 | { |
629 | efi_memory_desc_t *md; | 627 | efi_memory_desc_t *md; |
630 | int i; | 628 | void *p; |
631 | 629 | ||
632 | for (i = 0; i < memmap.nr_map; i++) { | 630 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
633 | md = &memmap.map[i]; | 631 | md = p; |
634 | if ((md->phys_addr <= phys_addr) && (phys_addr < | 632 | if ((md->phys_addr <= phys_addr) && (phys_addr < |
635 | (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) )) | 633 | (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) )) |
636 | return md->attribute; | 634 | return md->attribute; |
diff --git a/arch/i386/kernel/entry.S b/arch/i386/kernel/entry.S index a991d4e5edd2..abb909793efc 100644 --- a/arch/i386/kernel/entry.S +++ b/arch/i386/kernel/entry.S | |||
@@ -203,7 +203,7 @@ sysenter_past_esp: | |||
203 | GET_THREAD_INFO(%ebp) | 203 | GET_THREAD_INFO(%ebp) |
204 | 204 | ||
205 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ | 205 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ |
206 | testw $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),TI_flags(%ebp) | 206 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) |
207 | jnz syscall_trace_entry | 207 | jnz syscall_trace_entry |
208 | cmpl $(nr_syscalls), %eax | 208 | cmpl $(nr_syscalls), %eax |
209 | jae syscall_badsys | 209 | jae syscall_badsys |
@@ -226,9 +226,9 @@ ENTRY(system_call) | |||
226 | pushl %eax # save orig_eax | 226 | pushl %eax # save orig_eax |
227 | SAVE_ALL | 227 | SAVE_ALL |
228 | GET_THREAD_INFO(%ebp) | 228 | GET_THREAD_INFO(%ebp) |
229 | # system call tracing in operation | 229 | # system call tracing in operation / emulation |
230 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ | 230 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ |
231 | testw $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP),TI_flags(%ebp) | 231 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) |
232 | jnz syscall_trace_entry | 232 | jnz syscall_trace_entry |
233 | cmpl $(nr_syscalls), %eax | 233 | cmpl $(nr_syscalls), %eax |
234 | jae syscall_badsys | 234 | jae syscall_badsys |
@@ -338,6 +338,9 @@ syscall_trace_entry: | |||
338 | movl %esp, %eax | 338 | movl %esp, %eax |
339 | xorl %edx,%edx | 339 | xorl %edx,%edx |
340 | call do_syscall_trace | 340 | call do_syscall_trace |
341 | cmpl $0, %eax | ||
342 | jne resume_userspace # ret != 0 -> running under PTRACE_SYSEMU, | ||
343 | # so must skip actual syscall | ||
341 | movl ORIG_EAX(%esp), %eax | 344 | movl ORIG_EAX(%esp), %eax |
342 | cmpl $(nr_syscalls), %eax | 345 | cmpl $(nr_syscalls), %eax |
343 | jnae syscall_call | 346 | jnae syscall_call |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 4477bb107098..0480ca9e9e57 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -77,6 +77,32 @@ ENTRY(startup_32) | |||
77 | subl %edi,%ecx | 77 | subl %edi,%ecx |
78 | shrl $2,%ecx | 78 | shrl $2,%ecx |
79 | rep ; stosl | 79 | rep ; stosl |
80 | /* | ||
81 | * Copy bootup parameters out of the way. | ||
82 | * Note: %esi still has the pointer to the real-mode data. | ||
83 | * With the kexec as boot loader, parameter segment might be loaded beyond | ||
84 | * kernel image and might not even be addressable by early boot page tables. | ||
85 | * (kexec on panic case). Hence copy out the parameters before initializing | ||
86 | * page tables. | ||
87 | */ | ||
88 | movl $(boot_params - __PAGE_OFFSET),%edi | ||
89 | movl $(PARAM_SIZE/4),%ecx | ||
90 | cld | ||
91 | rep | ||
92 | movsl | ||
93 | movl boot_params - __PAGE_OFFSET + NEW_CL_POINTER,%esi | ||
94 | andl %esi,%esi | ||
95 | jnz 2f # New command line protocol | ||
96 | cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR | ||
97 | jne 1f | ||
98 | movzwl OLD_CL_OFFSET,%esi | ||
99 | addl $(OLD_CL_BASE_ADDR),%esi | ||
100 | 2: | ||
101 | movl $(saved_command_line - __PAGE_OFFSET),%edi | ||
102 | movl $(COMMAND_LINE_SIZE/4),%ecx | ||
103 | rep | ||
104 | movsl | ||
105 | 1: | ||
80 | 106 | ||
81 | /* | 107 | /* |
82 | * Initialize page tables. This creates a PDE and a set of page | 108 | * Initialize page tables. This creates a PDE and a set of page |
@@ -214,28 +240,6 @@ ENTRY(startup_32_smp) | |||
214 | */ | 240 | */ |
215 | call setup_idt | 241 | call setup_idt |
216 | 242 | ||
217 | /* | ||
218 | * Copy bootup parameters out of the way. | ||
219 | * Note: %esi still has the pointer to the real-mode data. | ||
220 | */ | ||
221 | movl $boot_params,%edi | ||
222 | movl $(PARAM_SIZE/4),%ecx | ||
223 | cld | ||
224 | rep | ||
225 | movsl | ||
226 | movl boot_params+NEW_CL_POINTER,%esi | ||
227 | andl %esi,%esi | ||
228 | jnz 2f # New command line protocol | ||
229 | cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR | ||
230 | jne 1f | ||
231 | movzwl OLD_CL_OFFSET,%esi | ||
232 | addl $(OLD_CL_BASE_ADDR),%esi | ||
233 | 2: | ||
234 | movl $saved_command_line,%edi | ||
235 | movl $(COMMAND_LINE_SIZE/4),%ecx | ||
236 | rep | ||
237 | movsl | ||
238 | 1: | ||
239 | checkCPUtype: | 243 | checkCPUtype: |
240 | 244 | ||
241 | movl $-1,X86_CPUID # -1 for no CPUID initially | 245 | movl $-1,X86_CPUID # -1 for no CPUID initially |
diff --git a/arch/i386/kernel/i8237.c b/arch/i386/kernel/i8237.c new file mode 100644 index 000000000000..c36d1c006c2f --- /dev/null +++ b/arch/i386/kernel/i8237.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * i8237.c: 8237A DMA controller suspend functions. | ||
3 | * | ||
4 | * Written by Pierre Ossman, 2005. | ||
5 | */ | ||
6 | |||
7 | #include <linux/init.h> | ||
8 | #include <linux/sysdev.h> | ||
9 | |||
10 | #include <asm/dma.h> | ||
11 | |||
12 | /* | ||
13 | * This module just handles suspend/resume issues with the | ||
14 | * 8237A DMA controller (used for ISA and LPC). | ||
15 | * Allocation is handled in kernel/dma.c and normal usage is | ||
16 | * in asm/dma.h. | ||
17 | */ | ||
18 | |||
19 | static int i8237A_resume(struct sys_device *dev) | ||
20 | { | ||
21 | unsigned long flags; | ||
22 | int i; | ||
23 | |||
24 | flags = claim_dma_lock(); | ||
25 | |||
26 | dma_outb(DMA1_RESET_REG, 0); | ||
27 | dma_outb(DMA2_RESET_REG, 0); | ||
28 | |||
29 | for (i = 0;i < 8;i++) { | ||
30 | set_dma_addr(i, 0x000000); | ||
31 | /* DMA count is a bit weird so this is not 0 */ | ||
32 | set_dma_count(i, 1); | ||
33 | } | ||
34 | |||
35 | /* Enable cascade DMA or channel 0-3 won't work */ | ||
36 | enable_dma(4); | ||
37 | |||
38 | release_dma_lock(flags); | ||
39 | |||
40 | return 0; | ||
41 | } | ||
42 | |||
43 | static int i8237A_suspend(struct sys_device *dev, pm_message_t state) | ||
44 | { | ||
45 | return 0; | ||
46 | } | ||
47 | |||
48 | static struct sysdev_class i8237_sysdev_class = { | ||
49 | set_kset_name("i8237"), | ||
50 | .suspend = i8237A_suspend, | ||
51 | .resume = i8237A_resume, | ||
52 | }; | ||
53 | |||
54 | static struct sys_device device_i8237A = { | ||
55 | .id = 0, | ||
56 | .cls = &i8237_sysdev_class, | ||
57 | }; | ||
58 | |||
59 | static int __init i8237A_init_sysfs(void) | ||
60 | { | ||
61 | int error = sysdev_class_register(&i8237_sysdev_class); | ||
62 | if (!error) | ||
63 | error = sysdev_register(&device_i8237A); | ||
64 | return error; | ||
65 | } | ||
66 | |||
67 | device_initcall(i8237A_init_sysfs); | ||
diff --git a/arch/i386/kernel/ioport.c b/arch/i386/kernel/ioport.c index 8b25160393c1..f2b37654777f 100644 --- a/arch/i386/kernel/ioport.c +++ b/arch/i386/kernel/ioport.c | |||
@@ -132,6 +132,7 @@ asmlinkage long sys_iopl(unsigned long unused) | |||
132 | volatile struct pt_regs * regs = (struct pt_regs *) &unused; | 132 | volatile struct pt_regs * regs = (struct pt_regs *) &unused; |
133 | unsigned int level = regs->ebx; | 133 | unsigned int level = regs->ebx; |
134 | unsigned int old = (regs->eflags >> 12) & 3; | 134 | unsigned int old = (regs->eflags >> 12) & 3; |
135 | struct thread_struct *t = ¤t->thread; | ||
135 | 136 | ||
136 | if (level > 3) | 137 | if (level > 3) |
137 | return -EINVAL; | 138 | return -EINVAL; |
@@ -140,8 +141,8 @@ asmlinkage long sys_iopl(unsigned long unused) | |||
140 | if (!capable(CAP_SYS_RAWIO)) | 141 | if (!capable(CAP_SYS_RAWIO)) |
141 | return -EPERM; | 142 | return -EPERM; |
142 | } | 143 | } |
143 | regs->eflags = (regs->eflags &~ 0x3000UL) | (level << 12); | 144 | t->iopl = level << 12; |
144 | /* Make sure we return the long way (not sysenter) */ | 145 | regs->eflags = (regs->eflags & ~X86_EFLAGS_IOPL) | t->iopl; |
145 | set_thread_flag(TIF_IRET); | 146 | set_iopl_mask(t->iopl); |
146 | return 0; | 147 | return 0; |
147 | } | 148 | } |
diff --git a/arch/i386/kernel/ldt.c b/arch/i386/kernel/ldt.c index bb50afbee921..fe1ffa55587d 100644 --- a/arch/i386/kernel/ldt.c +++ b/arch/i386/kernel/ldt.c | |||
@@ -177,7 +177,7 @@ static int read_default_ldt(void __user * ptr, unsigned long bytecount) | |||
177 | static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode) | 177 | static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode) |
178 | { | 178 | { |
179 | struct mm_struct * mm = current->mm; | 179 | struct mm_struct * mm = current->mm; |
180 | __u32 entry_1, entry_2, *lp; | 180 | __u32 entry_1, entry_2; |
181 | int error; | 181 | int error; |
182 | struct user_desc ldt_info; | 182 | struct user_desc ldt_info; |
183 | 183 | ||
@@ -205,8 +205,6 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode) | |||
205 | goto out_unlock; | 205 | goto out_unlock; |
206 | } | 206 | } |
207 | 207 | ||
208 | lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt); | ||
209 | |||
210 | /* Allow LDTs to be cleared by the user. */ | 208 | /* Allow LDTs to be cleared by the user. */ |
211 | if (ldt_info.base_addr == 0 && ldt_info.limit == 0) { | 209 | if (ldt_info.base_addr == 0 && ldt_info.limit == 0) { |
212 | if (oldmode || LDT_empty(&ldt_info)) { | 210 | if (oldmode || LDT_empty(&ldt_info)) { |
@@ -223,8 +221,7 @@ static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode) | |||
223 | 221 | ||
224 | /* Install the new entry ... */ | 222 | /* Install the new entry ... */ |
225 | install: | 223 | install: |
226 | *lp = entry_1; | 224 | write_ldt_entry(mm->context.ldt, ldt_info.entry_number, entry_1, entry_2); |
227 | *(lp+1) = entry_2; | ||
228 | error = 0; | 225 | error = 0; |
229 | 226 | ||
230 | out_unlock: | 227 | out_unlock: |
diff --git a/arch/i386/kernel/machine_kexec.c b/arch/i386/kernel/machine_kexec.c index cb699a2aa1f8..a912fed48482 100644 --- a/arch/i386/kernel/machine_kexec.c +++ b/arch/i386/kernel/machine_kexec.c | |||
@@ -17,13 +17,7 @@ | |||
17 | #include <asm/apic.h> | 17 | #include <asm/apic.h> |
18 | #include <asm/cpufeature.h> | 18 | #include <asm/cpufeature.h> |
19 | #include <asm/desc.h> | 19 | #include <asm/desc.h> |
20 | 20 | #include <asm/system.h> | |
21 | static inline unsigned long read_cr3(void) | ||
22 | { | ||
23 | unsigned long cr3; | ||
24 | asm volatile("movl %%cr3,%0": "=r"(cr3)); | ||
25 | return cr3; | ||
26 | } | ||
27 | 21 | ||
28 | #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE))) | 22 | #define PAGE_ALIGNED __attribute__ ((__aligned__(PAGE_SIZE))) |
29 | 23 | ||
@@ -99,10 +93,7 @@ static void set_idt(void *newidt, __u16 limit) | |||
99 | curidt.size = limit; | 93 | curidt.size = limit; |
100 | curidt.address = (unsigned long)newidt; | 94 | curidt.address = (unsigned long)newidt; |
101 | 95 | ||
102 | __asm__ __volatile__ ( | 96 | load_idt(&curidt); |
103 | "lidtl %0\n" | ||
104 | : : "m" (curidt) | ||
105 | ); | ||
106 | }; | 97 | }; |
107 | 98 | ||
108 | 99 | ||
@@ -114,10 +105,7 @@ static void set_gdt(void *newgdt, __u16 limit) | |||
114 | curgdt.size = limit; | 105 | curgdt.size = limit; |
115 | curgdt.address = (unsigned long)newgdt; | 106 | curgdt.address = (unsigned long)newgdt; |
116 | 107 | ||
117 | __asm__ __volatile__ ( | 108 | load_gdt(&curgdt); |
118 | "lgdtl %0\n" | ||
119 | : : "m" (curgdt) | ||
120 | ); | ||
121 | }; | 109 | }; |
122 | 110 | ||
123 | static void load_segments(void) | 111 | static void load_segments(void) |
diff --git a/arch/i386/kernel/microcode.c b/arch/i386/kernel/microcode.c index a77c612aad00..165f13158c60 100644 --- a/arch/i386/kernel/microcode.c +++ b/arch/i386/kernel/microcode.c | |||
@@ -164,7 +164,8 @@ static void collect_cpu_info (void *unused) | |||
164 | } | 164 | } |
165 | 165 | ||
166 | wrmsr(MSR_IA32_UCODE_REV, 0, 0); | 166 | wrmsr(MSR_IA32_UCODE_REV, 0, 0); |
167 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); | 167 | /* see notes above for revision 1.07. Apparent chip bug */ |
168 | serialize_cpu(); | ||
168 | /* get the current revision from MSR 0x8B */ | 169 | /* get the current revision from MSR 0x8B */ |
169 | rdmsr(MSR_IA32_UCODE_REV, val[0], uci->rev); | 170 | rdmsr(MSR_IA32_UCODE_REV, val[0], uci->rev); |
170 | pr_debug("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n", | 171 | pr_debug("microcode: collect_cpu_info : sig=0x%x, pf=0x%x, rev=0x%x\n", |
@@ -377,7 +378,9 @@ static void do_update_one (void * unused) | |||
377 | (unsigned long) uci->mc->bits >> 16 >> 16); | 378 | (unsigned long) uci->mc->bits >> 16 >> 16); |
378 | wrmsr(MSR_IA32_UCODE_REV, 0, 0); | 379 | wrmsr(MSR_IA32_UCODE_REV, 0, 0); |
379 | 380 | ||
380 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); | 381 | /* see notes above for revision 1.07. Apparent chip bug */ |
382 | serialize_cpu(); | ||
383 | |||
381 | /* get the current revision from MSR 0x8B */ | 384 | /* get the current revision from MSR 0x8B */ |
382 | rdmsr(MSR_IA32_UCODE_REV, val[0], val[1]); | 385 | rdmsr(MSR_IA32_UCODE_REV, val[0], val[1]); |
383 | 386 | ||
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index ce838abb27d8..5d0b9a8fc43d 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -65,6 +65,8 @@ int nr_ioapics; | |||
65 | int pic_mode; | 65 | int pic_mode; |
66 | unsigned long mp_lapic_addr; | 66 | unsigned long mp_lapic_addr; |
67 | 67 | ||
68 | unsigned int def_to_bigsmp = 0; | ||
69 | |||
68 | /* Processor that is doing the boot up */ | 70 | /* Processor that is doing the boot up */ |
69 | unsigned int boot_cpu_physical_apicid = -1U; | 71 | unsigned int boot_cpu_physical_apicid = -1U; |
70 | /* Internal processor count */ | 72 | /* Internal processor count */ |
@@ -120,7 +122,7 @@ static int MP_valid_apicid(int apicid, int version) | |||
120 | 122 | ||
121 | static void __init MP_processor_info (struct mpc_config_processor *m) | 123 | static void __init MP_processor_info (struct mpc_config_processor *m) |
122 | { | 124 | { |
123 | int ver, apicid; | 125 | int ver, apicid, cpu, found_bsp = 0; |
124 | physid_mask_t tmp; | 126 | physid_mask_t tmp; |
125 | 127 | ||
126 | if (!(m->mpc_cpuflag & CPU_ENABLED)) | 128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) |
@@ -179,6 +181,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
179 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { | 181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { |
180 | Dprintk(" Bootup CPU\n"); | 182 | Dprintk(" Bootup CPU\n"); |
181 | boot_cpu_physical_apicid = m->mpc_apicid; | 183 | boot_cpu_physical_apicid = m->mpc_apicid; |
184 | found_bsp = 1; | ||
182 | } | 185 | } |
183 | 186 | ||
184 | if (num_processors >= NR_CPUS) { | 187 | if (num_processors >= NR_CPUS) { |
@@ -202,6 +205,11 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
202 | return; | 205 | return; |
203 | } | 206 | } |
204 | 207 | ||
208 | if (found_bsp) | ||
209 | cpu = 0; | ||
210 | else | ||
211 | cpu = num_processors - 1; | ||
212 | cpu_set(cpu, cpu_possible_map); | ||
205 | tmp = apicid_to_cpu_present(apicid); | 213 | tmp = apicid_to_cpu_present(apicid); |
206 | physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp); | 214 | physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp); |
207 | 215 | ||
@@ -213,6 +221,13 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
213 | ver = 0x10; | 221 | ver = 0x10; |
214 | } | 222 | } |
215 | apic_version[m->mpc_apicid] = ver; | 223 | apic_version[m->mpc_apicid] = ver; |
224 | if ((num_processors > 8) && | ||
225 | APIC_XAPIC(ver) && | ||
226 | (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)) | ||
227 | def_to_bigsmp = 1; | ||
228 | else | ||
229 | def_to_bigsmp = 0; | ||
230 | |||
216 | bios_cpu_apicid[num_processors - 1] = m->mpc_apicid; | 231 | bios_cpu_apicid[num_processors - 1] = m->mpc_apicid; |
217 | } | 232 | } |
218 | 233 | ||
diff --git a/arch/i386/kernel/msr.c b/arch/i386/kernel/msr.c index b2f03c39a6fe..03100d6fc5d6 100644 --- a/arch/i386/kernel/msr.c +++ b/arch/i386/kernel/msr.c | |||
@@ -46,23 +46,13 @@ | |||
46 | 46 | ||
47 | static struct class *msr_class; | 47 | static struct class *msr_class; |
48 | 48 | ||
49 | /* Note: "err" is handled in a funny way below. Otherwise one version | ||
50 | of gcc or another breaks. */ | ||
51 | |||
52 | static inline int wrmsr_eio(u32 reg, u32 eax, u32 edx) | 49 | static inline int wrmsr_eio(u32 reg, u32 eax, u32 edx) |
53 | { | 50 | { |
54 | int err; | 51 | int err; |
55 | 52 | ||
56 | asm volatile ("1: wrmsr\n" | 53 | err = wrmsr_safe(reg, eax, edx); |
57 | "2:\n" | 54 | if (err) |
58 | ".section .fixup,\"ax\"\n" | 55 | err = -EIO; |
59 | "3: movl %4,%0\n" | ||
60 | " jmp 2b\n" | ||
61 | ".previous\n" | ||
62 | ".section __ex_table,\"a\"\n" | ||
63 | " .align 4\n" " .long 1b,3b\n" ".previous":"=&bDS" (err) | ||
64 | :"a"(eax), "d"(edx), "c"(reg), "i"(-EIO), "0"(0)); | ||
65 | |||
66 | return err; | 56 | return err; |
67 | } | 57 | } |
68 | 58 | ||
@@ -70,18 +60,9 @@ static inline int rdmsr_eio(u32 reg, u32 *eax, u32 *edx) | |||
70 | { | 60 | { |
71 | int err; | 61 | int err; |
72 | 62 | ||
73 | asm volatile ("1: rdmsr\n" | 63 | err = rdmsr_safe(reg, eax, edx); |
74 | "2:\n" | 64 | if (err) |
75 | ".section .fixup,\"ax\"\n" | 65 | err = -EIO; |
76 | "3: movl %4,%0\n" | ||
77 | " jmp 2b\n" | ||
78 | ".previous\n" | ||
79 | ".section __ex_table,\"a\"\n" | ||
80 | " .align 4\n" | ||
81 | " .long 1b,3b\n" | ||
82 | ".previous":"=&bDS" (err), "=a"(*eax), "=d"(*edx) | ||
83 | :"c"(reg), "i"(-EIO), "0"(0)); | ||
84 | |||
85 | return err; | 66 | return err; |
86 | } | 67 | } |
87 | 68 | ||
diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c index 8c242bb1ef45..8bbdbda07a2d 100644 --- a/arch/i386/kernel/nmi.c +++ b/arch/i386/kernel/nmi.c | |||
@@ -501,8 +501,11 @@ void nmi_watchdog_tick (struct pt_regs * regs) | |||
501 | */ | 501 | */ |
502 | alert_counter[cpu]++; | 502 | alert_counter[cpu]++; |
503 | if (alert_counter[cpu] == 5*nmi_hz) | 503 | if (alert_counter[cpu] == 5*nmi_hz) |
504 | /* | ||
505 | * die_nmi will return ONLY if NOTIFY_STOP happens.. | ||
506 | */ | ||
504 | die_nmi(regs, "NMI Watchdog detected LOCKUP"); | 507 | die_nmi(regs, "NMI Watchdog detected LOCKUP"); |
505 | } else { | 508 | |
506 | last_irq_sums[cpu] = sum; | 509 | last_irq_sums[cpu] = sum; |
507 | alert_counter[cpu] = 0; | 510 | alert_counter[cpu] = 0; |
508 | } | 511 | } |
diff --git a/arch/i386/kernel/process.c b/arch/i386/kernel/process.c index e3f362e8af5b..b45cbf93d439 100644 --- a/arch/i386/kernel/process.c +++ b/arch/i386/kernel/process.c | |||
@@ -164,7 +164,7 @@ static inline void play_dead(void) | |||
164 | */ | 164 | */ |
165 | local_irq_disable(); | 165 | local_irq_disable(); |
166 | while (1) | 166 | while (1) |
167 | __asm__ __volatile__("hlt":::"memory"); | 167 | halt(); |
168 | } | 168 | } |
169 | #else | 169 | #else |
170 | static inline void play_dead(void) | 170 | static inline void play_dead(void) |
@@ -313,16 +313,12 @@ void show_regs(struct pt_regs * regs) | |||
313 | printk(" DS: %04x ES: %04x\n", | 313 | printk(" DS: %04x ES: %04x\n", |
314 | 0xffff & regs->xds,0xffff & regs->xes); | 314 | 0xffff & regs->xds,0xffff & regs->xes); |
315 | 315 | ||
316 | __asm__("movl %%cr0, %0": "=r" (cr0)); | 316 | cr0 = read_cr0(); |
317 | __asm__("movl %%cr2, %0": "=r" (cr2)); | 317 | cr2 = read_cr2(); |
318 | __asm__("movl %%cr3, %0": "=r" (cr3)); | 318 | cr3 = read_cr3(); |
319 | /* This could fault if %cr4 does not exist */ | 319 | if (current_cpu_data.x86 > 4) { |
320 | __asm__("1: movl %%cr4, %0 \n" | 320 | cr4 = read_cr4(); |
321 | "2: \n" | 321 | } |
322 | ".section __ex_table,\"a\" \n" | ||
323 | ".long 1b,2b \n" | ||
324 | ".previous \n" | ||
325 | : "=r" (cr4): "0" (0)); | ||
326 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); | 322 | printk("CR0: %08lx CR2: %08lx CR3: %08lx CR4: %08lx\n", cr0, cr2, cr3, cr4); |
327 | show_trace(NULL, ®s->esp); | 323 | show_trace(NULL, ®s->esp); |
328 | } | 324 | } |
@@ -682,21 +678,26 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas | |||
682 | __unlazy_fpu(prev_p); | 678 | __unlazy_fpu(prev_p); |
683 | 679 | ||
684 | /* | 680 | /* |
685 | * Reload esp0, LDT and the page table pointer: | 681 | * Reload esp0. |
686 | */ | 682 | */ |
687 | load_esp0(tss, next); | 683 | load_esp0(tss, next); |
688 | 684 | ||
689 | /* | 685 | /* |
690 | * Load the per-thread Thread-Local Storage descriptor. | 686 | * Save away %fs and %gs. No need to save %es and %ds, as |
687 | * those are always kernel segments while inside the kernel. | ||
688 | * Doing this before setting the new TLS descriptors avoids | ||
689 | * the situation where we temporarily have non-reloadable | ||
690 | * segments in %fs and %gs. This could be an issue if the | ||
691 | * NMI handler ever used %fs or %gs (it does not today), or | ||
692 | * if the kernel is running inside of a hypervisor layer. | ||
691 | */ | 693 | */ |
692 | load_TLS(next, cpu); | 694 | savesegment(fs, prev->fs); |
695 | savesegment(gs, prev->gs); | ||
693 | 696 | ||
694 | /* | 697 | /* |
695 | * Save away %fs and %gs. No need to save %es and %ds, as | 698 | * Load the per-thread Thread-Local Storage descriptor. |
696 | * those are always kernel segments while inside the kernel. | ||
697 | */ | 699 | */ |
698 | asm volatile("mov %%fs,%0":"=m" (prev->fs)); | 700 | load_TLS(next, cpu); |
699 | asm volatile("mov %%gs,%0":"=m" (prev->gs)); | ||
700 | 701 | ||
701 | /* | 702 | /* |
702 | * Restore %fs and %gs if needed. | 703 | * Restore %fs and %gs if needed. |
@@ -711,6 +712,12 @@ struct task_struct fastcall * __switch_to(struct task_struct *prev_p, struct tas | |||
711 | loadsegment(gs, next->gs); | 712 | loadsegment(gs, next->gs); |
712 | 713 | ||
713 | /* | 714 | /* |
715 | * Restore IOPL if needed. | ||
716 | */ | ||
717 | if (unlikely(prev->iopl != next->iopl)) | ||
718 | set_iopl_mask(next->iopl); | ||
719 | |||
720 | /* | ||
714 | * Now maybe reload the debug registers | 721 | * Now maybe reload the debug registers |
715 | */ | 722 | */ |
716 | if (unlikely(next->debugreg[7])) { | 723 | if (unlikely(next->debugreg[7])) { |
diff --git a/arch/i386/kernel/ptrace.c b/arch/i386/kernel/ptrace.c index 0da59b42843c..340980203b09 100644 --- a/arch/i386/kernel/ptrace.c +++ b/arch/i386/kernel/ptrace.c | |||
@@ -271,6 +271,8 @@ static void clear_singlestep(struct task_struct *child) | |||
271 | void ptrace_disable(struct task_struct *child) | 271 | void ptrace_disable(struct task_struct *child) |
272 | { | 272 | { |
273 | clear_singlestep(child); | 273 | clear_singlestep(child); |
274 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
275 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | ||
274 | } | 276 | } |
275 | 277 | ||
276 | /* | 278 | /* |
@@ -509,15 +511,20 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
509 | } | 511 | } |
510 | break; | 512 | break; |
511 | 513 | ||
514 | case PTRACE_SYSEMU: /* continue and stop at next syscall, which will not be executed */ | ||
512 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | 515 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ |
513 | case PTRACE_CONT: /* restart after signal. */ | 516 | case PTRACE_CONT: /* restart after signal. */ |
514 | ret = -EIO; | 517 | ret = -EIO; |
515 | if (!valid_signal(data)) | 518 | if (!valid_signal(data)) |
516 | break; | 519 | break; |
517 | if (request == PTRACE_SYSCALL) { | 520 | if (request == PTRACE_SYSEMU) { |
521 | set_tsk_thread_flag(child, TIF_SYSCALL_EMU); | ||
522 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | ||
523 | } else if (request == PTRACE_SYSCALL) { | ||
518 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 524 | set_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
519 | } | 525 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); |
520 | else { | 526 | } else { |
527 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | ||
521 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 528 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
522 | } | 529 | } |
523 | child->exit_code = data; | 530 | child->exit_code = data; |
@@ -542,10 +549,17 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
542 | wake_up_process(child); | 549 | wake_up_process(child); |
543 | break; | 550 | break; |
544 | 551 | ||
552 | case PTRACE_SYSEMU_SINGLESTEP: /* Same as SYSEMU, but singlestep if not syscall */ | ||
545 | case PTRACE_SINGLESTEP: /* set the trap flag. */ | 553 | case PTRACE_SINGLESTEP: /* set the trap flag. */ |
546 | ret = -EIO; | 554 | ret = -EIO; |
547 | if (!valid_signal(data)) | 555 | if (!valid_signal(data)) |
548 | break; | 556 | break; |
557 | |||
558 | if (request == PTRACE_SYSEMU_SINGLESTEP) | ||
559 | set_tsk_thread_flag(child, TIF_SYSCALL_EMU); | ||
560 | else | ||
561 | clear_tsk_thread_flag(child, TIF_SYSCALL_EMU); | ||
562 | |||
549 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); | 563 | clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE); |
550 | set_singlestep(child); | 564 | set_singlestep(child); |
551 | child->exit_code = data; | 565 | child->exit_code = data; |
@@ -678,26 +692,52 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | |||
678 | * - triggered by current->work.syscall_trace | 692 | * - triggered by current->work.syscall_trace |
679 | */ | 693 | */ |
680 | __attribute__((regparm(3))) | 694 | __attribute__((regparm(3))) |
681 | void do_syscall_trace(struct pt_regs *regs, int entryexit) | 695 | int do_syscall_trace(struct pt_regs *regs, int entryexit) |
682 | { | 696 | { |
697 | int is_sysemu = test_thread_flag(TIF_SYSCALL_EMU), ret = 0; | ||
698 | /* With TIF_SYSCALL_EMU set we want to ignore TIF_SINGLESTEP for syscall | ||
699 | * interception. */ | ||
700 | int is_singlestep = !is_sysemu && test_thread_flag(TIF_SINGLESTEP); | ||
701 | |||
683 | /* do the secure computing check first */ | 702 | /* do the secure computing check first */ |
684 | secure_computing(regs->orig_eax); | 703 | secure_computing(regs->orig_eax); |
685 | 704 | ||
686 | if (unlikely(current->audit_context) && entryexit) | 705 | if (unlikely(current->audit_context)) { |
687 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), regs->eax); | 706 | if (entryexit) |
707 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), regs->eax); | ||
708 | /* Debug traps, when using PTRACE_SINGLESTEP, must be sent only | ||
709 | * on the syscall exit path. Normally, when TIF_SYSCALL_AUDIT is | ||
710 | * not used, entry.S will call us only on syscall exit, not | ||
711 | * entry; so when TIF_SYSCALL_AUDIT is used we must avoid | ||
712 | * calling send_sigtrap() on syscall entry. | ||
713 | * | ||
714 | * Note that when PTRACE_SYSEMU_SINGLESTEP is used, | ||
715 | * is_singlestep is false, despite his name, so we will still do | ||
716 | * the correct thing. | ||
717 | */ | ||
718 | else if (is_singlestep) | ||
719 | goto out; | ||
720 | } | ||
688 | 721 | ||
689 | if (!(current->ptrace & PT_PTRACED)) | 722 | if (!(current->ptrace & PT_PTRACED)) |
690 | goto out; | 723 | goto out; |
691 | 724 | ||
725 | /* If a process stops on the 1st tracepoint with SYSCALL_TRACE | ||
726 | * and then is resumed with SYSEMU_SINGLESTEP, it will come in | ||
727 | * here. We have to check this and return */ | ||
728 | if (is_sysemu && entryexit) | ||
729 | return 0; | ||
730 | |||
692 | /* Fake a debug trap */ | 731 | /* Fake a debug trap */ |
693 | if (test_thread_flag(TIF_SINGLESTEP)) | 732 | if (is_singlestep) |
694 | send_sigtrap(current, regs, 0); | 733 | send_sigtrap(current, regs, 0); |
695 | 734 | ||
696 | if (!test_thread_flag(TIF_SYSCALL_TRACE)) | 735 | if (!test_thread_flag(TIF_SYSCALL_TRACE) && !is_sysemu) |
697 | goto out; | 736 | goto out; |
698 | 737 | ||
699 | /* the 0x80 provides a way for the tracing parent to distinguish | 738 | /* the 0x80 provides a way for the tracing parent to distinguish |
700 | between a syscall stop and SIGTRAP delivery */ | 739 | between a syscall stop and SIGTRAP delivery */ |
740 | /* Note that the debugger could change the result of test_thread_flag!*/ | ||
701 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); | 741 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80 : 0)); |
702 | 742 | ||
703 | /* | 743 | /* |
@@ -709,9 +749,16 @@ void do_syscall_trace(struct pt_regs *regs, int entryexit) | |||
709 | send_sig(current->exit_code, current, 1); | 749 | send_sig(current->exit_code, current, 1); |
710 | current->exit_code = 0; | 750 | current->exit_code = 0; |
711 | } | 751 | } |
752 | ret = is_sysemu; | ||
712 | out: | 753 | out: |
713 | if (unlikely(current->audit_context) && !entryexit) | 754 | if (unlikely(current->audit_context) && !entryexit) |
714 | audit_syscall_entry(current, AUDIT_ARCH_I386, regs->orig_eax, | 755 | audit_syscall_entry(current, AUDIT_ARCH_I386, regs->orig_eax, |
715 | regs->ebx, regs->ecx, regs->edx, regs->esi); | 756 | regs->ebx, regs->ecx, regs->edx, regs->esi); |
757 | if (ret == 0) | ||
758 | return 0; | ||
716 | 759 | ||
760 | regs->orig_eax = -1; /* force skip of syscall restarting */ | ||
761 | if (unlikely(current->audit_context)) | ||
762 | audit_syscall_exit(current, AUDITSC_RESULT(regs->eax), regs->eax); | ||
763 | return 1; | ||
717 | } | 764 | } |
diff --git a/arch/i386/kernel/reboot.c b/arch/i386/kernel/reboot.c index c71fef31dc47..1cbb9c0f4704 100644 --- a/arch/i386/kernel/reboot.c +++ b/arch/i386/kernel/reboot.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/dmi.h> | 13 | #include <linux/dmi.h> |
14 | #include <asm/uaccess.h> | 14 | #include <asm/uaccess.h> |
15 | #include <asm/apic.h> | 15 | #include <asm/apic.h> |
16 | #include <asm/desc.h> | ||
16 | #include "mach_reboot.h" | 17 | #include "mach_reboot.h" |
17 | #include <linux/reboot_fixups.h> | 18 | #include <linux/reboot_fixups.h> |
18 | 19 | ||
@@ -242,13 +243,13 @@ void machine_real_restart(unsigned char *code, int length) | |||
242 | 243 | ||
243 | /* Set up the IDT for real mode. */ | 244 | /* Set up the IDT for real mode. */ |
244 | 245 | ||
245 | __asm__ __volatile__ ("lidt %0" : : "m" (real_mode_idt)); | 246 | load_idt(&real_mode_idt); |
246 | 247 | ||
247 | /* Set up a GDT from which we can load segment descriptors for real | 248 | /* Set up a GDT from which we can load segment descriptors for real |
248 | mode. The GDT is not used in real mode; it is just needed here to | 249 | mode. The GDT is not used in real mode; it is just needed here to |
249 | prepare the descriptors. */ | 250 | prepare the descriptors. */ |
250 | 251 | ||
251 | __asm__ __volatile__ ("lgdt %0" : : "m" (real_mode_gdt)); | 252 | load_gdt(&real_mode_gdt); |
252 | 253 | ||
253 | /* Load the data segment registers, and thus the descriptors ready for | 254 | /* Load the data segment registers, and thus the descriptors ready for |
254 | real mode. The base address of each segment is 0x100, 16 times the | 255 | real mode. The base address of each segment is 0x100, 16 times the |
@@ -316,7 +317,7 @@ void machine_emergency_restart(void) | |||
316 | if (!reboot_thru_bios) { | 317 | if (!reboot_thru_bios) { |
317 | if (efi_enabled) { | 318 | if (efi_enabled) { |
318 | efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); | 319 | efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, NULL); |
319 | __asm__ __volatile__("lidt %0": :"m" (no_idt)); | 320 | load_idt(&no_idt); |
320 | __asm__ __volatile__("int3"); | 321 | __asm__ __volatile__("int3"); |
321 | } | 322 | } |
322 | /* rebooting needs to touch the page at absolute addr 0 */ | 323 | /* rebooting needs to touch the page at absolute addr 0 */ |
@@ -325,7 +326,7 @@ void machine_emergency_restart(void) | |||
325 | mach_reboot_fixups(); /* for board specific fixups */ | 326 | mach_reboot_fixups(); /* for board specific fixups */ |
326 | mach_reboot(); | 327 | mach_reboot(); |
327 | /* That didn't work - force a triple fault.. */ | 328 | /* That didn't work - force a triple fault.. */ |
328 | __asm__ __volatile__("lidt %0": :"m" (no_idt)); | 329 | load_idt(&no_idt); |
329 | __asm__ __volatile__("int3"); | 330 | __asm__ __volatile__("int3"); |
330 | } | 331 | } |
331 | } | 332 | } |
diff --git a/arch/i386/kernel/semaphore.c b/arch/i386/kernel/semaphore.c index 469f496e55c0..7455ab643943 100644 --- a/arch/i386/kernel/semaphore.c +++ b/arch/i386/kernel/semaphore.c | |||
@@ -13,171 +13,9 @@ | |||
13 | * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org> | 13 | * rw semaphores implemented November 1999 by Benjamin LaHaise <bcrl@kvack.org> |
14 | */ | 14 | */ |
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | #include <linux/sched.h> | ||
17 | #include <linux/err.h> | ||
18 | #include <linux/init.h> | ||
19 | #include <asm/semaphore.h> | 16 | #include <asm/semaphore.h> |
20 | 17 | ||
21 | /* | 18 | /* |
22 | * Semaphores are implemented using a two-way counter: | ||
23 | * The "count" variable is decremented for each process | ||
24 | * that tries to acquire the semaphore, while the "sleeping" | ||
25 | * variable is a count of such acquires. | ||
26 | * | ||
27 | * Notably, the inline "up()" and "down()" functions can | ||
28 | * efficiently test if they need to do any extra work (up | ||
29 | * needs to do something only if count was negative before | ||
30 | * the increment operation. | ||
31 | * | ||
32 | * "sleeping" and the contention routine ordering is protected | ||
33 | * by the spinlock in the semaphore's waitqueue head. | ||
34 | * | ||
35 | * Note that these functions are only called when there is | ||
36 | * contention on the lock, and as such all this is the | ||
37 | * "non-critical" part of the whole semaphore business. The | ||
38 | * critical part is the inline stuff in <asm/semaphore.h> | ||
39 | * where we want to avoid any extra jumps and calls. | ||
40 | */ | ||
41 | |||
42 | /* | ||
43 | * Logic: | ||
44 | * - only on a boundary condition do we need to care. When we go | ||
45 | * from a negative count to a non-negative, we wake people up. | ||
46 | * - when we go from a non-negative count to a negative do we | ||
47 | * (a) synchronize with the "sleeper" count and (b) make sure | ||
48 | * that we're on the wakeup list before we synchronize so that | ||
49 | * we cannot lose wakeup events. | ||
50 | */ | ||
51 | |||
52 | static fastcall void __attribute_used__ __up(struct semaphore *sem) | ||
53 | { | ||
54 | wake_up(&sem->wait); | ||
55 | } | ||
56 | |||
57 | static fastcall void __attribute_used__ __sched __down(struct semaphore * sem) | ||
58 | { | ||
59 | struct task_struct *tsk = current; | ||
60 | DECLARE_WAITQUEUE(wait, tsk); | ||
61 | unsigned long flags; | ||
62 | |||
63 | tsk->state = TASK_UNINTERRUPTIBLE; | ||
64 | spin_lock_irqsave(&sem->wait.lock, flags); | ||
65 | add_wait_queue_exclusive_locked(&sem->wait, &wait); | ||
66 | |||
67 | sem->sleepers++; | ||
68 | for (;;) { | ||
69 | int sleepers = sem->sleepers; | ||
70 | |||
71 | /* | ||
72 | * Add "everybody else" into it. They aren't | ||
73 | * playing, because we own the spinlock in | ||
74 | * the wait_queue_head. | ||
75 | */ | ||
76 | if (!atomic_add_negative(sleepers - 1, &sem->count)) { | ||
77 | sem->sleepers = 0; | ||
78 | break; | ||
79 | } | ||
80 | sem->sleepers = 1; /* us - see -1 above */ | ||
81 | spin_unlock_irqrestore(&sem->wait.lock, flags); | ||
82 | |||
83 | schedule(); | ||
84 | |||
85 | spin_lock_irqsave(&sem->wait.lock, flags); | ||
86 | tsk->state = TASK_UNINTERRUPTIBLE; | ||
87 | } | ||
88 | remove_wait_queue_locked(&sem->wait, &wait); | ||
89 | wake_up_locked(&sem->wait); | ||
90 | spin_unlock_irqrestore(&sem->wait.lock, flags); | ||
91 | tsk->state = TASK_RUNNING; | ||
92 | } | ||
93 | |||
94 | static fastcall int __attribute_used__ __sched __down_interruptible(struct semaphore * sem) | ||
95 | { | ||
96 | int retval = 0; | ||
97 | struct task_struct *tsk = current; | ||
98 | DECLARE_WAITQUEUE(wait, tsk); | ||
99 | unsigned long flags; | ||
100 | |||
101 | tsk->state = TASK_INTERRUPTIBLE; | ||
102 | spin_lock_irqsave(&sem->wait.lock, flags); | ||
103 | add_wait_queue_exclusive_locked(&sem->wait, &wait); | ||
104 | |||
105 | sem->sleepers++; | ||
106 | for (;;) { | ||
107 | int sleepers = sem->sleepers; | ||
108 | |||
109 | /* | ||
110 | * With signals pending, this turns into | ||
111 | * the trylock failure case - we won't be | ||
112 | * sleeping, and we* can't get the lock as | ||
113 | * it has contention. Just correct the count | ||
114 | * and exit. | ||
115 | */ | ||
116 | if (signal_pending(current)) { | ||
117 | retval = -EINTR; | ||
118 | sem->sleepers = 0; | ||
119 | atomic_add(sleepers, &sem->count); | ||
120 | break; | ||
121 | } | ||
122 | |||
123 | /* | ||
124 | * Add "everybody else" into it. They aren't | ||
125 | * playing, because we own the spinlock in | ||
126 | * wait_queue_head. The "-1" is because we're | ||
127 | * still hoping to get the semaphore. | ||
128 | */ | ||
129 | if (!atomic_add_negative(sleepers - 1, &sem->count)) { | ||
130 | sem->sleepers = 0; | ||
131 | break; | ||
132 | } | ||
133 | sem->sleepers = 1; /* us - see -1 above */ | ||
134 | spin_unlock_irqrestore(&sem->wait.lock, flags); | ||
135 | |||
136 | schedule(); | ||
137 | |||
138 | spin_lock_irqsave(&sem->wait.lock, flags); | ||
139 | tsk->state = TASK_INTERRUPTIBLE; | ||
140 | } | ||
141 | remove_wait_queue_locked(&sem->wait, &wait); | ||
142 | wake_up_locked(&sem->wait); | ||
143 | spin_unlock_irqrestore(&sem->wait.lock, flags); | ||
144 | |||
145 | tsk->state = TASK_RUNNING; | ||
146 | return retval; | ||
147 | } | ||
148 | |||
149 | /* | ||
150 | * Trylock failed - make sure we correct for | ||
151 | * having decremented the count. | ||
152 | * | ||
153 | * We could have done the trylock with a | ||
154 | * single "cmpxchg" without failure cases, | ||
155 | * but then it wouldn't work on a 386. | ||
156 | */ | ||
157 | static fastcall int __attribute_used__ __down_trylock(struct semaphore * sem) | ||
158 | { | ||
159 | int sleepers; | ||
160 | unsigned long flags; | ||
161 | |||
162 | spin_lock_irqsave(&sem->wait.lock, flags); | ||
163 | sleepers = sem->sleepers + 1; | ||
164 | sem->sleepers = 0; | ||
165 | |||
166 | /* | ||
167 | * Add "everybody else" and us into it. They aren't | ||
168 | * playing, because we own the spinlock in the | ||
169 | * wait_queue_head. | ||
170 | */ | ||
171 | if (!atomic_add_negative(sleepers, &sem->count)) { | ||
172 | wake_up_locked(&sem->wait); | ||
173 | } | ||
174 | |||
175 | spin_unlock_irqrestore(&sem->wait.lock, flags); | ||
176 | return 1; | ||
177 | } | ||
178 | |||
179 | |||
180 | /* | ||
181 | * The semaphore operations have a special calling sequence that | 19 | * The semaphore operations have a special calling sequence that |
182 | * allow us to do a simpler in-line version of them. These routines | 20 | * allow us to do a simpler in-line version of them. These routines |
183 | * need to convert that sequence back into the C sequence when | 21 | * need to convert that sequence back into the C sequence when |
diff --git a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c index af4de58cab54..294bcca985ab 100644 --- a/arch/i386/kernel/setup.c +++ b/arch/i386/kernel/setup.c | |||
@@ -370,12 +370,16 @@ static void __init limit_regions(unsigned long long size) | |||
370 | int i; | 370 | int i; |
371 | 371 | ||
372 | if (efi_enabled) { | 372 | if (efi_enabled) { |
373 | for (i = 0; i < memmap.nr_map; i++) { | 373 | efi_memory_desc_t *md; |
374 | current_addr = memmap.map[i].phys_addr + | 374 | void *p; |
375 | (memmap.map[i].num_pages << 12); | 375 | |
376 | if (memmap.map[i].type == EFI_CONVENTIONAL_MEMORY) { | 376 | for (p = memmap.map, i = 0; p < memmap.map_end; |
377 | p += memmap.desc_size, i++) { | ||
378 | md = p; | ||
379 | current_addr = md->phys_addr + (md->num_pages << 12); | ||
380 | if (md->type == EFI_CONVENTIONAL_MEMORY) { | ||
377 | if (current_addr >= size) { | 381 | if (current_addr >= size) { |
378 | memmap.map[i].num_pages -= | 382 | md->num_pages -= |
379 | (((current_addr-size) + PAGE_SIZE-1) >> PAGE_SHIFT); | 383 | (((current_addr-size) + PAGE_SIZE-1) >> PAGE_SHIFT); |
380 | memmap.nr_map = i + 1; | 384 | memmap.nr_map = i + 1; |
381 | return; | 385 | return; |
@@ -1581,8 +1585,14 @@ void __init setup_arch(char **cmdline_p) | |||
1581 | */ | 1585 | */ |
1582 | acpi_boot_table_init(); | 1586 | acpi_boot_table_init(); |
1583 | acpi_boot_init(); | 1587 | acpi_boot_init(); |
1584 | #endif | ||
1585 | 1588 | ||
1589 | #if defined(CONFIG_SMP) && defined(CONFIG_X86_PC) | ||
1590 | if (def_to_bigsmp) | ||
1591 | printk(KERN_WARNING "More than 8 CPUs detected and " | ||
1592 | "CONFIG_X86_PC cannot handle it.\nUse " | ||
1593 | "CONFIG_X86_GENERICARCH or CONFIG_X86_BIGSMP.\n"); | ||
1594 | #endif | ||
1595 | #endif | ||
1586 | #ifdef CONFIG_X86_LOCAL_APIC | 1596 | #ifdef CONFIG_X86_LOCAL_APIC |
1587 | if (smp_found_config) | 1597 | if (smp_found_config) |
1588 | get_smp_config(); | 1598 | get_smp_config(); |
diff --git a/arch/i386/kernel/signal.c b/arch/i386/kernel/signal.c index 140e340569c6..61eb0c8a6e47 100644 --- a/arch/i386/kernel/signal.c +++ b/arch/i386/kernel/signal.c | |||
@@ -278,9 +278,9 @@ setup_sigcontext(struct sigcontext __user *sc, struct _fpstate __user *fpstate, | |||
278 | int tmp, err = 0; | 278 | int tmp, err = 0; |
279 | 279 | ||
280 | tmp = 0; | 280 | tmp = 0; |
281 | __asm__("movl %%gs,%0" : "=r"(tmp): "0"(tmp)); | 281 | savesegment(gs, tmp); |
282 | err |= __put_user(tmp, (unsigned int __user *)&sc->gs); | 282 | err |= __put_user(tmp, (unsigned int __user *)&sc->gs); |
283 | __asm__("movl %%fs,%0" : "=r"(tmp): "0"(tmp)); | 283 | savesegment(fs, tmp); |
284 | err |= __put_user(tmp, (unsigned int __user *)&sc->fs); | 284 | err |= __put_user(tmp, (unsigned int __user *)&sc->fs); |
285 | 285 | ||
286 | err |= __put_user(regs->xes, (unsigned int __user *)&sc->es); | 286 | err |= __put_user(regs->xes, (unsigned int __user *)&sc->es); |
@@ -604,7 +604,9 @@ int fastcall do_signal(struct pt_regs *regs, sigset_t *oldset) | |||
604 | * We want the common case to go fast, which | 604 | * We want the common case to go fast, which |
605 | * is why we may in certain cases get here from | 605 | * is why we may in certain cases get here from |
606 | * kernel mode. Just return without doing anything | 606 | * kernel mode. Just return without doing anything |
607 | * if so. | 607 | * if so. vm86 regs switched out by assembly code |
608 | * before reaching here, so testing against kernel | ||
609 | * CS suffices. | ||
608 | */ | 610 | */ |
609 | if (!user_mode(regs)) | 611 | if (!user_mode(regs)) |
610 | return 1; | 612 | return 1; |
diff --git a/arch/i386/kernel/smp.c b/arch/i386/kernel/smp.c index cec4bde67161..48b55db3680f 100644 --- a/arch/i386/kernel/smp.c +++ b/arch/i386/kernel/smp.c | |||
@@ -576,7 +576,7 @@ static void stop_this_cpu (void * dummy) | |||
576 | local_irq_disable(); | 576 | local_irq_disable(); |
577 | disable_local_APIC(); | 577 | disable_local_APIC(); |
578 | if (cpu_data[smp_processor_id()].hlt_works_ok) | 578 | if (cpu_data[smp_processor_id()].hlt_works_ok) |
579 | for(;;) __asm__("hlt"); | 579 | for(;;) halt(); |
580 | for (;;); | 580 | for (;;); |
581 | } | 581 | } |
582 | 582 | ||
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 8ac8e9fd5614..5e4893d2b9f2 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -88,6 +88,8 @@ EXPORT_SYMBOL(cpu_online_map); | |||
88 | cpumask_t cpu_callin_map; | 88 | cpumask_t cpu_callin_map; |
89 | cpumask_t cpu_callout_map; | 89 | cpumask_t cpu_callout_map; |
90 | EXPORT_SYMBOL(cpu_callout_map); | 90 | EXPORT_SYMBOL(cpu_callout_map); |
91 | cpumask_t cpu_possible_map; | ||
92 | EXPORT_SYMBOL(cpu_possible_map); | ||
91 | static cpumask_t smp_commenced_mask; | 93 | static cpumask_t smp_commenced_mask; |
92 | 94 | ||
93 | /* TSC's upper 32 bits can't be written in eariler CPU (before prescott), there | 95 | /* TSC's upper 32 bits can't be written in eariler CPU (before prescott), there |
@@ -1017,8 +1019,8 @@ int __devinit smp_prepare_cpu(int cpu) | |||
1017 | tsc_sync_disabled = 1; | 1019 | tsc_sync_disabled = 1; |
1018 | 1020 | ||
1019 | /* init low mem mapping */ | 1021 | /* init low mem mapping */ |
1020 | memcpy(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, | 1022 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, |
1021 | sizeof(swapper_pg_dir[0]) * KERNEL_PGD_PTRS); | 1023 | KERNEL_PGD_PTRS); |
1022 | flush_tlb_all(); | 1024 | flush_tlb_all(); |
1023 | schedule_work(&task); | 1025 | schedule_work(&task); |
1024 | wait_for_completion(&done); | 1026 | wait_for_completion(&done); |
@@ -1265,6 +1267,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
1265 | cpu_set(smp_processor_id(), cpu_online_map); | 1267 | cpu_set(smp_processor_id(), cpu_online_map); |
1266 | cpu_set(smp_processor_id(), cpu_callout_map); | 1268 | cpu_set(smp_processor_id(), cpu_callout_map); |
1267 | cpu_set(smp_processor_id(), cpu_present_map); | 1269 | cpu_set(smp_processor_id(), cpu_present_map); |
1270 | cpu_set(smp_processor_id(), cpu_possible_map); | ||
1268 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 1271 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
1269 | } | 1272 | } |
1270 | 1273 | ||
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index 0ee9dee8af06..6f794a78ee1e 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -383,6 +383,7 @@ void notify_arch_cmos_timer(void) | |||
383 | 383 | ||
384 | static long clock_cmos_diff, sleep_start; | 384 | static long clock_cmos_diff, sleep_start; |
385 | 385 | ||
386 | static struct timer_opts *last_timer; | ||
386 | static int timer_suspend(struct sys_device *dev, pm_message_t state) | 387 | static int timer_suspend(struct sys_device *dev, pm_message_t state) |
387 | { | 388 | { |
388 | /* | 389 | /* |
@@ -391,6 +392,10 @@ static int timer_suspend(struct sys_device *dev, pm_message_t state) | |||
391 | clock_cmos_diff = -get_cmos_time(); | 392 | clock_cmos_diff = -get_cmos_time(); |
392 | clock_cmos_diff += get_seconds(); | 393 | clock_cmos_diff += get_seconds(); |
393 | sleep_start = get_cmos_time(); | 394 | sleep_start = get_cmos_time(); |
395 | last_timer = cur_timer; | ||
396 | cur_timer = &timer_none; | ||
397 | if (last_timer->suspend) | ||
398 | last_timer->suspend(state); | ||
394 | return 0; | 399 | return 0; |
395 | } | 400 | } |
396 | 401 | ||
@@ -404,6 +409,7 @@ static int timer_resume(struct sys_device *dev) | |||
404 | if (is_hpet_enabled()) | 409 | if (is_hpet_enabled()) |
405 | hpet_reenable(); | 410 | hpet_reenable(); |
406 | #endif | 411 | #endif |
412 | setup_pit_timer(); | ||
407 | sec = get_cmos_time() + clock_cmos_diff; | 413 | sec = get_cmos_time() + clock_cmos_diff; |
408 | sleep_length = (get_cmos_time() - sleep_start) * HZ; | 414 | sleep_length = (get_cmos_time() - sleep_start) * HZ; |
409 | write_seqlock_irqsave(&xtime_lock, flags); | 415 | write_seqlock_irqsave(&xtime_lock, flags); |
@@ -412,6 +418,10 @@ static int timer_resume(struct sys_device *dev) | |||
412 | write_sequnlock_irqrestore(&xtime_lock, flags); | 418 | write_sequnlock_irqrestore(&xtime_lock, flags); |
413 | jiffies += sleep_length; | 419 | jiffies += sleep_length; |
414 | wall_jiffies += sleep_length; | 420 | wall_jiffies += sleep_length; |
421 | if (last_timer->resume) | ||
422 | last_timer->resume(); | ||
423 | cur_timer = last_timer; | ||
424 | last_timer = NULL; | ||
415 | return 0; | 425 | return 0; |
416 | } | 426 | } |
417 | 427 | ||
diff --git a/arch/i386/kernel/timers/timer_hpet.c b/arch/i386/kernel/timers/timer_hpet.c index ef8dac5dd33b..001de97c9e4a 100644 --- a/arch/i386/kernel/timers/timer_hpet.c +++ b/arch/i386/kernel/timers/timer_hpet.c | |||
@@ -136,6 +136,8 @@ static void delay_hpet(unsigned long loops) | |||
136 | } while ((hpet_end - hpet_start) < (loops)); | 136 | } while ((hpet_end - hpet_start) < (loops)); |
137 | } | 137 | } |
138 | 138 | ||
139 | static struct timer_opts timer_hpet; | ||
140 | |||
139 | static int __init init_hpet(char* override) | 141 | static int __init init_hpet(char* override) |
140 | { | 142 | { |
141 | unsigned long result, remain; | 143 | unsigned long result, remain; |
@@ -163,6 +165,8 @@ static int __init init_hpet(char* override) | |||
163 | } | 165 | } |
164 | set_cyc2ns_scale(cpu_khz/1000); | 166 | set_cyc2ns_scale(cpu_khz/1000); |
165 | } | 167 | } |
168 | /* set this only when cpu_has_tsc */ | ||
169 | timer_hpet.read_timer = read_timer_tsc; | ||
166 | } | 170 | } |
167 | 171 | ||
168 | /* | 172 | /* |
@@ -177,6 +181,19 @@ static int __init init_hpet(char* override) | |||
177 | return 0; | 181 | return 0; |
178 | } | 182 | } |
179 | 183 | ||
184 | static int hpet_resume(void) | ||
185 | { | ||
186 | write_seqlock(&monotonic_lock); | ||
187 | /* Assume this is the last mark offset time */ | ||
188 | rdtsc(last_tsc_low, last_tsc_high); | ||
189 | |||
190 | if (hpet_use_timer) | ||
191 | hpet_last = hpet_readl(HPET_T0_CMP) - hpet_tick; | ||
192 | else | ||
193 | hpet_last = hpet_readl(HPET_COUNTER); | ||
194 | write_sequnlock(&monotonic_lock); | ||
195 | return 0; | ||
196 | } | ||
180 | /************************************************************/ | 197 | /************************************************************/ |
181 | 198 | ||
182 | /* tsc timer_opts struct */ | 199 | /* tsc timer_opts struct */ |
@@ -186,7 +203,7 @@ static struct timer_opts timer_hpet __read_mostly = { | |||
186 | .get_offset = get_offset_hpet, | 203 | .get_offset = get_offset_hpet, |
187 | .monotonic_clock = monotonic_clock_hpet, | 204 | .monotonic_clock = monotonic_clock_hpet, |
188 | .delay = delay_hpet, | 205 | .delay = delay_hpet, |
189 | .read_timer = read_timer_tsc, | 206 | .resume = hpet_resume, |
190 | }; | 207 | }; |
191 | 208 | ||
192 | struct init_timer_opts __initdata timer_hpet_init = { | 209 | struct init_timer_opts __initdata timer_hpet_init = { |
diff --git a/arch/i386/kernel/timers/timer_pit.c b/arch/i386/kernel/timers/timer_pit.c index 06de036a820c..eddb64038234 100644 --- a/arch/i386/kernel/timers/timer_pit.c +++ b/arch/i386/kernel/timers/timer_pit.c | |||
@@ -175,30 +175,3 @@ void setup_pit_timer(void) | |||
175 | outb(LATCH >> 8 , PIT_CH0); /* MSB */ | 175 | outb(LATCH >> 8 , PIT_CH0); /* MSB */ |
176 | spin_unlock_irqrestore(&i8253_lock, flags); | 176 | spin_unlock_irqrestore(&i8253_lock, flags); |
177 | } | 177 | } |
178 | |||
179 | static int timer_resume(struct sys_device *dev) | ||
180 | { | ||
181 | setup_pit_timer(); | ||
182 | return 0; | ||
183 | } | ||
184 | |||
185 | static struct sysdev_class timer_sysclass = { | ||
186 | set_kset_name("timer_pit"), | ||
187 | .resume = timer_resume, | ||
188 | }; | ||
189 | |||
190 | static struct sys_device device_timer = { | ||
191 | .id = 0, | ||
192 | .cls = &timer_sysclass, | ||
193 | }; | ||
194 | |||
195 | static int __init init_timer_sysfs(void) | ||
196 | { | ||
197 | int error = sysdev_class_register(&timer_sysclass); | ||
198 | if (!error) | ||
199 | error = sysdev_register(&device_timer); | ||
200 | return error; | ||
201 | } | ||
202 | |||
203 | device_initcall(init_timer_sysfs); | ||
204 | |||
diff --git a/arch/i386/kernel/timers/timer_pm.c b/arch/i386/kernel/timers/timer_pm.c index 4ef20e663498..264edaaac315 100644 --- a/arch/i386/kernel/timers/timer_pm.c +++ b/arch/i386/kernel/timers/timer_pm.c | |||
@@ -186,6 +186,14 @@ static void mark_offset_pmtmr(void) | |||
186 | } | 186 | } |
187 | } | 187 | } |
188 | 188 | ||
189 | static int pmtmr_resume(void) | ||
190 | { | ||
191 | write_seqlock(&monotonic_lock); | ||
192 | /* Assume this is the last mark offset time */ | ||
193 | offset_tick = read_pmtmr(); | ||
194 | write_sequnlock(&monotonic_lock); | ||
195 | return 0; | ||
196 | } | ||
189 | 197 | ||
190 | static unsigned long long monotonic_clock_pmtmr(void) | 198 | static unsigned long long monotonic_clock_pmtmr(void) |
191 | { | 199 | { |
@@ -247,6 +255,7 @@ static struct timer_opts timer_pmtmr = { | |||
247 | .monotonic_clock = monotonic_clock_pmtmr, | 255 | .monotonic_clock = monotonic_clock_pmtmr, |
248 | .delay = delay_pmtmr, | 256 | .delay = delay_pmtmr, |
249 | .read_timer = read_timer_tsc, | 257 | .read_timer = read_timer_tsc, |
258 | .resume = pmtmr_resume, | ||
250 | }; | 259 | }; |
251 | 260 | ||
252 | struct init_timer_opts __initdata timer_pmtmr_init = { | 261 | struct init_timer_opts __initdata timer_pmtmr_init = { |
diff --git a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c index 8f4e4d5bc560..6dd470cc9f72 100644 --- a/arch/i386/kernel/timers/timer_tsc.c +++ b/arch/i386/kernel/timers/timer_tsc.c | |||
@@ -543,6 +543,19 @@ static int __init init_tsc(char* override) | |||
543 | return -ENODEV; | 543 | return -ENODEV; |
544 | } | 544 | } |
545 | 545 | ||
546 | static int tsc_resume(void) | ||
547 | { | ||
548 | write_seqlock(&monotonic_lock); | ||
549 | /* Assume this is the last mark offset time */ | ||
550 | rdtsc(last_tsc_low, last_tsc_high); | ||
551 | #ifdef CONFIG_HPET_TIMER | ||
552 | if (is_hpet_enabled() && hpet_use_timer) | ||
553 | hpet_last = hpet_readl(HPET_COUNTER); | ||
554 | #endif | ||
555 | write_sequnlock(&monotonic_lock); | ||
556 | return 0; | ||
557 | } | ||
558 | |||
546 | #ifndef CONFIG_X86_TSC | 559 | #ifndef CONFIG_X86_TSC |
547 | /* disable flag for tsc. Takes effect by clearing the TSC cpu flag | 560 | /* disable flag for tsc. Takes effect by clearing the TSC cpu flag |
548 | * in cpu/common.c */ | 561 | * in cpu/common.c */ |
@@ -573,6 +586,7 @@ static struct timer_opts timer_tsc = { | |||
573 | .monotonic_clock = monotonic_clock_tsc, | 586 | .monotonic_clock = monotonic_clock_tsc, |
574 | .delay = delay_tsc, | 587 | .delay = delay_tsc, |
575 | .read_timer = read_timer_tsc, | 588 | .read_timer = read_timer_tsc, |
589 | .resume = tsc_resume, | ||
576 | }; | 590 | }; |
577 | 591 | ||
578 | struct init_timer_opts __initdata timer_tsc_init = { | 592 | struct init_timer_opts __initdata timer_tsc_init = { |
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c index cd2d5d5514fe..54629bb5893a 100644 --- a/arch/i386/kernel/traps.c +++ b/arch/i386/kernel/traps.c | |||
@@ -210,7 +210,7 @@ void show_registers(struct pt_regs *regs) | |||
210 | unsigned short ss; | 210 | unsigned short ss; |
211 | 211 | ||
212 | esp = (unsigned long) (®s->esp); | 212 | esp = (unsigned long) (®s->esp); |
213 | ss = __KERNEL_DS; | 213 | savesegment(ss, ss); |
214 | if (user_mode(regs)) { | 214 | if (user_mode(regs)) { |
215 | in_kernel = 0; | 215 | in_kernel = 0; |
216 | esp = regs->esp; | 216 | esp = regs->esp; |
@@ -267,9 +267,6 @@ static void handle_BUG(struct pt_regs *regs) | |||
267 | char c; | 267 | char c; |
268 | unsigned long eip; | 268 | unsigned long eip; |
269 | 269 | ||
270 | if (user_mode(regs)) | ||
271 | goto no_bug; /* Not in kernel */ | ||
272 | |||
273 | eip = regs->eip; | 270 | eip = regs->eip; |
274 | 271 | ||
275 | if (eip < PAGE_OFFSET) | 272 | if (eip < PAGE_OFFSET) |
@@ -568,6 +565,10 @@ static DEFINE_SPINLOCK(nmi_print_lock); | |||
568 | 565 | ||
569 | void die_nmi (struct pt_regs *regs, const char *msg) | 566 | void die_nmi (struct pt_regs *regs, const char *msg) |
570 | { | 567 | { |
568 | if (notify_die(DIE_NMIWATCHDOG, msg, regs, 0, 0, SIGINT) == | ||
569 | NOTIFY_STOP) | ||
570 | return; | ||
571 | |||
571 | spin_lock(&nmi_print_lock); | 572 | spin_lock(&nmi_print_lock); |
572 | /* | 573 | /* |
573 | * We are in trouble anyway, lets at least try | 574 | * We are in trouble anyway, lets at least try |
@@ -1008,7 +1009,7 @@ void __init trap_init_f00f_bug(void) | |||
1008 | * it uses the read-only mapped virtual address. | 1009 | * it uses the read-only mapped virtual address. |
1009 | */ | 1010 | */ |
1010 | idt_descr.address = fix_to_virt(FIX_F00F_IDT); | 1011 | idt_descr.address = fix_to_virt(FIX_F00F_IDT); |
1011 | __asm__ __volatile__("lidt %0" : : "m" (idt_descr)); | 1012 | load_idt(&idt_descr); |
1012 | } | 1013 | } |
1013 | #endif | 1014 | #endif |
1014 | 1015 | ||
diff --git a/arch/i386/kernel/vm86.c b/arch/i386/kernel/vm86.c index ec0f68ce6886..16b485009622 100644 --- a/arch/i386/kernel/vm86.c +++ b/arch/i386/kernel/vm86.c | |||
@@ -294,8 +294,8 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk | |||
294 | */ | 294 | */ |
295 | info->regs32->eax = 0; | 295 | info->regs32->eax = 0; |
296 | tsk->thread.saved_esp0 = tsk->thread.esp0; | 296 | tsk->thread.saved_esp0 = tsk->thread.esp0; |
297 | asm volatile("mov %%fs,%0":"=m" (tsk->thread.saved_fs)); | 297 | savesegment(fs, tsk->thread.saved_fs); |
298 | asm volatile("mov %%gs,%0":"=m" (tsk->thread.saved_gs)); | 298 | savesegment(gs, tsk->thread.saved_gs); |
299 | 299 | ||
300 | tss = &per_cpu(init_tss, get_cpu()); | 300 | tss = &per_cpu(init_tss, get_cpu()); |
301 | tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0; | 301 | tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0; |
@@ -542,7 +542,7 @@ void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code) | |||
542 | unsigned char opcode; | 542 | unsigned char opcode; |
543 | unsigned char __user *csp; | 543 | unsigned char __user *csp; |
544 | unsigned char __user *ssp; | 544 | unsigned char __user *ssp; |
545 | unsigned short ip, sp; | 545 | unsigned short ip, sp, orig_flags; |
546 | int data32, pref_done; | 546 | int data32, pref_done; |
547 | 547 | ||
548 | #define CHECK_IF_IN_TRAP \ | 548 | #define CHECK_IF_IN_TRAP \ |
@@ -551,8 +551,12 @@ void handle_vm86_fault(struct kernel_vm86_regs * regs, long error_code) | |||
551 | #define VM86_FAULT_RETURN do { \ | 551 | #define VM86_FAULT_RETURN do { \ |
552 | if (VMPI.force_return_for_pic && (VEFLAGS & (IF_MASK | VIF_MASK))) \ | 552 | if (VMPI.force_return_for_pic && (VEFLAGS & (IF_MASK | VIF_MASK))) \ |
553 | return_to_32bit(regs, VM86_PICRETURN); \ | 553 | return_to_32bit(regs, VM86_PICRETURN); \ |
554 | if (orig_flags & TF_MASK) \ | ||
555 | handle_vm86_trap(regs, 0, 1); \ | ||
554 | return; } while (0) | 556 | return; } while (0) |
555 | 557 | ||
558 | orig_flags = *(unsigned short *)®s->eflags; | ||
559 | |||
556 | csp = (unsigned char __user *) (regs->cs << 4); | 560 | csp = (unsigned char __user *) (regs->cs << 4); |
557 | ssp = (unsigned char __user *) (regs->ss << 4); | 561 | ssp = (unsigned char __user *) (regs->ss << 4); |
558 | sp = SP(regs); | 562 | sp = SP(regs); |
diff --git a/arch/i386/kernel/vsyscall-sigreturn.S b/arch/i386/kernel/vsyscall-sigreturn.S index c8fcf75b9be3..68afa50dd7cf 100644 --- a/arch/i386/kernel/vsyscall-sigreturn.S +++ b/arch/i386/kernel/vsyscall-sigreturn.S | |||
@@ -15,7 +15,7 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | .text | 17 | .text |
18 | .org __kernel_vsyscall+32 | 18 | .org __kernel_vsyscall+32,0x90 |
19 | .globl __kernel_sigreturn | 19 | .globl __kernel_sigreturn |
20 | .type __kernel_sigreturn,@function | 20 | .type __kernel_sigreturn,@function |
21 | __kernel_sigreturn: | 21 | __kernel_sigreturn: |
@@ -35,6 +35,7 @@ __kernel_rt_sigreturn: | |||
35 | int $0x80 | 35 | int $0x80 |
36 | .LEND_rt_sigreturn: | 36 | .LEND_rt_sigreturn: |
37 | .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn | 37 | .size __kernel_rt_sigreturn,.-.LSTART_rt_sigreturn |
38 | .balign 32 | ||
38 | .previous | 39 | .previous |
39 | 40 | ||
40 | .section .eh_frame,"a",@progbits | 41 | .section .eh_frame,"a",@progbits |
diff --git a/arch/i386/mach-es7000/es7000.h b/arch/i386/mach-es7000/es7000.h index 70691f0c4ce2..898ed905e119 100644 --- a/arch/i386/mach-es7000/es7000.h +++ b/arch/i386/mach-es7000/es7000.h | |||
@@ -104,7 +104,8 @@ struct mip_reg { | |||
104 | #define MIP_SW_APIC 0x1020b | 104 | #define MIP_SW_APIC 0x1020b |
105 | #define MIP_FUNC(VALUE) (VALUE & 0xff) | 105 | #define MIP_FUNC(VALUE) (VALUE & 0xff) |
106 | 106 | ||
107 | extern int parse_unisys_oem (char *oemptr, int oem_entries); | 107 | extern int parse_unisys_oem (char *oemptr); |
108 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length); | 108 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
109 | extern void setup_unisys (); | ||
109 | extern int es7000_start_cpu(int cpu, unsigned long eip); | 110 | extern int es7000_start_cpu(int cpu, unsigned long eip); |
110 | extern void es7000_sw_apic(void); | 111 | extern void es7000_sw_apic(void); |
diff --git a/arch/i386/mach-es7000/es7000plat.c b/arch/i386/mach-es7000/es7000plat.c index d5936d500479..2000bdca2fc2 100644 --- a/arch/i386/mach-es7000/es7000plat.c +++ b/arch/i386/mach-es7000/es7000plat.c | |||
@@ -75,12 +75,29 @@ es7000_rename_gsi(int ioapic, int gsi) | |||
75 | 75 | ||
76 | #endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT) | 76 | #endif // (CONFIG_X86_IO_APIC) && (CONFIG_ACPI_INTERPRETER || CONFIG_ACPI_BOOT) |
77 | 77 | ||
78 | void __init | ||
79 | setup_unisys () | ||
80 | { | ||
81 | /* | ||
82 | * Determine the generation of the ES7000 currently running. | ||
83 | * | ||
84 | * es7000_plat = 1 if the machine is a 5xx ES7000 box | ||
85 | * es7000_plat = 2 if the machine is a x86_64 ES7000 box | ||
86 | * | ||
87 | */ | ||
88 | if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) | ||
89 | es7000_plat = 2; | ||
90 | else | ||
91 | es7000_plat = 1; | ||
92 | ioapic_renumber_irq = es7000_rename_gsi; | ||
93 | } | ||
94 | |||
78 | /* | 95 | /* |
79 | * Parse the OEM Table | 96 | * Parse the OEM Table |
80 | */ | 97 | */ |
81 | 98 | ||
82 | int __init | 99 | int __init |
83 | parse_unisys_oem (char *oemptr, int oem_entries) | 100 | parse_unisys_oem (char *oemptr) |
84 | { | 101 | { |
85 | int i; | 102 | int i; |
86 | int success = 0; | 103 | int success = 0; |
@@ -95,7 +112,7 @@ parse_unisys_oem (char *oemptr, int oem_entries) | |||
95 | 112 | ||
96 | tp += 8; | 113 | tp += 8; |
97 | 114 | ||
98 | for (i=0; i <= oem_entries; i++) { | 115 | for (i=0; i <= 6; i++) { |
99 | type = *tp++; | 116 | type = *tp++; |
100 | size = *tp++; | 117 | size = *tp++; |
101 | tp -= 2; | 118 | tp -= 2; |
@@ -130,34 +147,18 @@ parse_unisys_oem (char *oemptr, int oem_entries) | |||
130 | default: | 147 | default: |
131 | break; | 148 | break; |
132 | } | 149 | } |
133 | if (i == 6) break; | ||
134 | tp += size; | 150 | tp += size; |
135 | } | 151 | } |
136 | 152 | ||
137 | if (success < 2) { | 153 | if (success < 2) { |
138 | es7000_plat = 0; | 154 | es7000_plat = 0; |
139 | } else { | 155 | } else |
140 | printk("\nEnabling ES7000 specific features...\n"); | 156 | setup_unisys(); |
141 | /* | ||
142 | * Determine the generation of the ES7000 currently running. | ||
143 | * | ||
144 | * es7000_plat = 0 if the machine is NOT a Unisys ES7000 box | ||
145 | * es7000_plat = 1 if the machine is a 5xx ES7000 box | ||
146 | * es7000_plat = 2 if the machine is a x86_64 ES7000 box | ||
147 | * | ||
148 | */ | ||
149 | if (!(boot_cpu_data.x86 <= 15 && boot_cpu_data.x86_model <= 2)) | ||
150 | es7000_plat = 2; | ||
151 | else | ||
152 | es7000_plat = 1; | ||
153 | |||
154 | ioapic_renumber_irq = es7000_rename_gsi; | ||
155 | } | ||
156 | return es7000_plat; | 157 | return es7000_plat; |
157 | } | 158 | } |
158 | 159 | ||
159 | int __init | 160 | int __init |
160 | find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length) | 161 | find_unisys_acpi_oem_table(unsigned long *oem_addr) |
161 | { | 162 | { |
162 | struct acpi_table_rsdp *rsdp = NULL; | 163 | struct acpi_table_rsdp *rsdp = NULL; |
163 | unsigned long rsdp_phys = 0; | 164 | unsigned long rsdp_phys = 0; |
@@ -201,13 +202,11 @@ find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length) | |||
201 | acpi_table_print(header, sdt.entry[i].pa); | 202 | acpi_table_print(header, sdt.entry[i].pa); |
202 | t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length); | 203 | t = (struct oem_table *) __acpi_map_table(sdt.entry[i].pa, header->length); |
203 | addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize); | 204 | addr = (void *) __acpi_map_table(t->OEMTableAddr, t->OEMTableSize); |
204 | *length = header->length; | ||
205 | *oem_addr = (unsigned long) addr; | 205 | *oem_addr = (unsigned long) addr; |
206 | return 0; | 206 | return 0; |
207 | } | 207 | } |
208 | } | 208 | } |
209 | } | 209 | } |
210 | Dprintk("ES7000: did not find Unisys ACPI OEM table!\n"); | ||
211 | return -1; | 210 | return -1; |
212 | } | 211 | } |
213 | 212 | ||
diff --git a/arch/i386/mach-generic/bigsmp.c b/arch/i386/mach-generic/bigsmp.c index 25883b44f625..037b2af1a1f4 100644 --- a/arch/i386/mach-generic/bigsmp.c +++ b/arch/i386/mach-generic/bigsmp.c | |||
@@ -47,7 +47,10 @@ static struct dmi_system_id __initdata bigsmp_dmi_table[] = { | |||
47 | 47 | ||
48 | static __init int probe_bigsmp(void) | 48 | static __init int probe_bigsmp(void) |
49 | { | 49 | { |
50 | dmi_check_system(bigsmp_dmi_table); | 50 | if (def_to_bigsmp) |
51 | dmi_bigsmp = 1; | ||
52 | else | ||
53 | dmi_check_system(bigsmp_dmi_table); | ||
51 | return dmi_bigsmp; | 54 | return dmi_bigsmp; |
52 | } | 55 | } |
53 | 56 | ||
diff --git a/arch/i386/mach-generic/probe.c b/arch/i386/mach-generic/probe.c index 5497c65a8790..cea5b3ce4b57 100644 --- a/arch/i386/mach-generic/probe.c +++ b/arch/i386/mach-generic/probe.c | |||
@@ -30,6 +30,25 @@ struct genapic *apic_probe[] __initdata = { | |||
30 | NULL, | 30 | NULL, |
31 | }; | 31 | }; |
32 | 32 | ||
33 | static int cmdline_apic; | ||
34 | |||
35 | void __init generic_bigsmp_probe(void) | ||
36 | { | ||
37 | /* | ||
38 | * This routine is used to switch to bigsmp mode when | ||
39 | * - There is no apic= option specified by the user | ||
40 | * - generic_apic_probe() has choosen apic_default as the sub_arch | ||
41 | * - we find more than 8 CPUs in acpi LAPIC listing with xAPIC support | ||
42 | */ | ||
43 | |||
44 | if (!cmdline_apic && genapic == &apic_default) | ||
45 | if (apic_bigsmp.probe()) { | ||
46 | genapic = &apic_bigsmp; | ||
47 | printk(KERN_INFO "Overriding APIC driver with %s\n", | ||
48 | genapic->name); | ||
49 | } | ||
50 | } | ||
51 | |||
33 | void __init generic_apic_probe(char *command_line) | 52 | void __init generic_apic_probe(char *command_line) |
34 | { | 53 | { |
35 | char *s; | 54 | char *s; |
@@ -52,6 +71,7 @@ void __init generic_apic_probe(char *command_line) | |||
52 | if (!changed) | 71 | if (!changed) |
53 | printk(KERN_ERR "Unknown genapic `%s' specified.\n", s); | 72 | printk(KERN_ERR "Unknown genapic `%s' specified.\n", s); |
54 | *p = old; | 73 | *p = old; |
74 | cmdline_apic = changed; | ||
55 | } | 75 | } |
56 | for (i = 0; !changed && apic_probe[i]; i++) { | 76 | for (i = 0; !changed && apic_probe[i]; i++) { |
57 | if (apic_probe[i]->probe()) { | 77 | if (apic_probe[i]->probe()) { |
diff --git a/arch/i386/mach-voyager/voyager_basic.c b/arch/i386/mach-voyager/voyager_basic.c index c6384061328a..cc69875d979b 100644 --- a/arch/i386/mach-voyager/voyager_basic.c +++ b/arch/i386/mach-voyager/voyager_basic.c | |||
@@ -234,10 +234,9 @@ voyager_power_off(void) | |||
234 | #endif | 234 | #endif |
235 | } | 235 | } |
236 | /* and wait for it to happen */ | 236 | /* and wait for it to happen */ |
237 | for(;;) { | 237 | local_irq_disable(); |
238 | __asm("cli"); | 238 | for(;;) |
239 | __asm("hlt"); | 239 | halt(); |
240 | } | ||
241 | } | 240 | } |
242 | 241 | ||
243 | /* copied from process.c */ | 242 | /* copied from process.c */ |
@@ -278,10 +277,9 @@ machine_restart(char *cmd) | |||
278 | outb(basebd | 0x08, VOYAGER_MC_SETUP); | 277 | outb(basebd | 0x08, VOYAGER_MC_SETUP); |
279 | outb(0x02, catbase + 0x21); | 278 | outb(0x02, catbase + 0x21); |
280 | } | 279 | } |
281 | for(;;) { | 280 | local_irq_disable(); |
282 | asm("cli"); | 281 | for(;;) |
283 | asm("hlt"); | 282 | halt(); |
284 | } | ||
285 | } | 283 | } |
286 | 284 | ||
287 | void | 285 | void |
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 0e1f4208b07c..46b0cf4a31e0 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -242,6 +242,8 @@ static cpumask_t smp_commenced_mask = CPU_MASK_NONE; | |||
242 | cpumask_t cpu_callin_map = CPU_MASK_NONE; | 242 | cpumask_t cpu_callin_map = CPU_MASK_NONE; |
243 | cpumask_t cpu_callout_map = CPU_MASK_NONE; | 243 | cpumask_t cpu_callout_map = CPU_MASK_NONE; |
244 | EXPORT_SYMBOL(cpu_callout_map); | 244 | EXPORT_SYMBOL(cpu_callout_map); |
245 | cpumask_t cpu_possible_map = CPU_MASK_ALL; | ||
246 | EXPORT_SYMBOL(cpu_possible_map); | ||
245 | 247 | ||
246 | /* The per processor IRQ masks (these are usually kept in sync) */ | 248 | /* The per processor IRQ masks (these are usually kept in sync) */ |
247 | static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned; | 249 | static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned; |
@@ -1015,7 +1017,7 @@ smp_stop_cpu_function(void *dummy) | |||
1015 | cpu_clear(smp_processor_id(), cpu_online_map); | 1017 | cpu_clear(smp_processor_id(), cpu_online_map); |
1016 | local_irq_disable(); | 1018 | local_irq_disable(); |
1017 | for(;;) | 1019 | for(;;) |
1018 | __asm__("hlt"); | 1020 | halt(); |
1019 | } | 1021 | } |
1020 | 1022 | ||
1021 | static DEFINE_SPINLOCK(call_lock); | 1023 | static DEFINE_SPINLOCK(call_lock); |
@@ -1910,6 +1912,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
1910 | { | 1912 | { |
1911 | cpu_set(smp_processor_id(), cpu_online_map); | 1913 | cpu_set(smp_processor_id(), cpu_online_map); |
1912 | cpu_set(smp_processor_id(), cpu_callout_map); | 1914 | cpu_set(smp_processor_id(), cpu_callout_map); |
1915 | cpu_set(smp_processor_id(), cpu_possible_map); | ||
1913 | } | 1916 | } |
1914 | 1917 | ||
1915 | int __devinit | 1918 | int __devinit |
diff --git a/arch/i386/math-emu/get_address.c b/arch/i386/math-emu/get_address.c index 91175738e948..9819b705efa4 100644 --- a/arch/i386/math-emu/get_address.c +++ b/arch/i386/math-emu/get_address.c | |||
@@ -155,7 +155,6 @@ static long pm_address(u_char FPU_modrm, u_char segment, | |||
155 | { | 155 | { |
156 | struct desc_struct descriptor; | 156 | struct desc_struct descriptor; |
157 | unsigned long base_address, limit, address, seg_top; | 157 | unsigned long base_address, limit, address, seg_top; |
158 | unsigned short selector; | ||
159 | 158 | ||
160 | segment--; | 159 | segment--; |
161 | 160 | ||
@@ -173,17 +172,11 @@ static long pm_address(u_char FPU_modrm, u_char segment, | |||
173 | /* fs and gs aren't used by the kernel, so they still have their | 172 | /* fs and gs aren't used by the kernel, so they still have their |
174 | user-space values. */ | 173 | user-space values. */ |
175 | case PREFIX_FS_-1: | 174 | case PREFIX_FS_-1: |
176 | /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register | 175 | /* N.B. - movl %seg, mem is a 2 byte write regardless of prefix */ |
177 | in the assembler statement. */ | 176 | savesegment(fs, addr->selector); |
178 | |||
179 | __asm__("mov %%fs,%0":"=r" (selector)); | ||
180 | addr->selector = selector; | ||
181 | break; | 177 | break; |
182 | case PREFIX_GS_-1: | 178 | case PREFIX_GS_-1: |
183 | /* The cast is needed here to get gcc 2.8.0 to use a 16 bit register | 179 | savesegment(gs, addr->selector); |
184 | in the assembler statement. */ | ||
185 | __asm__("mov %%gs,%0":"=r" (selector)); | ||
186 | addr->selector = selector; | ||
187 | break; | 180 | break; |
188 | default: | 181 | default: |
189 | addr->selector = PM_REG_(segment); | 182 | addr->selector = PM_REG_(segment); |
diff --git a/arch/i386/mm/fault.c b/arch/i386/mm/fault.c index 8e90339d6eaa..411b8500ad1b 100644 --- a/arch/i386/mm/fault.c +++ b/arch/i386/mm/fault.c | |||
@@ -199,6 +199,18 @@ static inline int is_prefetch(struct pt_regs *regs, unsigned long addr, | |||
199 | return 0; | 199 | return 0; |
200 | } | 200 | } |
201 | 201 | ||
202 | static noinline void force_sig_info_fault(int si_signo, int si_code, | ||
203 | unsigned long address, struct task_struct *tsk) | ||
204 | { | ||
205 | siginfo_t info; | ||
206 | |||
207 | info.si_signo = si_signo; | ||
208 | info.si_errno = 0; | ||
209 | info.si_code = si_code; | ||
210 | info.si_addr = (void __user *)address; | ||
211 | force_sig_info(si_signo, &info, tsk); | ||
212 | } | ||
213 | |||
202 | fastcall void do_invalid_op(struct pt_regs *, unsigned long); | 214 | fastcall void do_invalid_op(struct pt_regs *, unsigned long); |
203 | 215 | ||
204 | /* | 216 | /* |
@@ -218,11 +230,10 @@ fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
218 | struct vm_area_struct * vma; | 230 | struct vm_area_struct * vma; |
219 | unsigned long address; | 231 | unsigned long address; |
220 | unsigned long page; | 232 | unsigned long page; |
221 | int write; | 233 | int write, si_code; |
222 | siginfo_t info; | ||
223 | 234 | ||
224 | /* get the address */ | 235 | /* get the address */ |
225 | __asm__("movl %%cr2,%0":"=r" (address)); | 236 | address = read_cr2(); |
226 | 237 | ||
227 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, | 238 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, error_code, 14, |
228 | SIGSEGV) == NOTIFY_STOP) | 239 | SIGSEGV) == NOTIFY_STOP) |
@@ -233,7 +244,7 @@ fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
233 | 244 | ||
234 | tsk = current; | 245 | tsk = current; |
235 | 246 | ||
236 | info.si_code = SEGV_MAPERR; | 247 | si_code = SEGV_MAPERR; |
237 | 248 | ||
238 | /* | 249 | /* |
239 | * We fault-in kernel-space virtual memory on-demand. The | 250 | * We fault-in kernel-space virtual memory on-demand. The |
@@ -313,7 +324,7 @@ fastcall void do_page_fault(struct pt_regs *regs, unsigned long error_code) | |||
313 | * we can handle it.. | 324 | * we can handle it.. |
314 | */ | 325 | */ |
315 | good_area: | 326 | good_area: |
316 | info.si_code = SEGV_ACCERR; | 327 | si_code = SEGV_ACCERR; |
317 | write = 0; | 328 | write = 0; |
318 | switch (error_code & 3) { | 329 | switch (error_code & 3) { |
319 | default: /* 3: write, present */ | 330 | default: /* 3: write, present */ |
@@ -387,11 +398,7 @@ bad_area_nosemaphore: | |||
387 | /* Kernel addresses are always protection faults */ | 398 | /* Kernel addresses are always protection faults */ |
388 | tsk->thread.error_code = error_code | (address >= TASK_SIZE); | 399 | tsk->thread.error_code = error_code | (address >= TASK_SIZE); |
389 | tsk->thread.trap_no = 14; | 400 | tsk->thread.trap_no = 14; |
390 | info.si_signo = SIGSEGV; | 401 | force_sig_info_fault(SIGSEGV, si_code, address, tsk); |
391 | info.si_errno = 0; | ||
392 | /* info.si_code has been set above */ | ||
393 | info.si_addr = (void __user *)address; | ||
394 | force_sig_info(SIGSEGV, &info, tsk); | ||
395 | return; | 402 | return; |
396 | } | 403 | } |
397 | 404 | ||
@@ -446,7 +453,7 @@ no_context: | |||
446 | printk(" at virtual address %08lx\n",address); | 453 | printk(" at virtual address %08lx\n",address); |
447 | printk(KERN_ALERT " printing eip:\n"); | 454 | printk(KERN_ALERT " printing eip:\n"); |
448 | printk("%08lx\n", regs->eip); | 455 | printk("%08lx\n", regs->eip); |
449 | asm("movl %%cr3,%0":"=r" (page)); | 456 | page = read_cr3(); |
450 | page = ((unsigned long *) __va(page))[address >> 22]; | 457 | page = ((unsigned long *) __va(page))[address >> 22]; |
451 | printk(KERN_ALERT "*pde = %08lx\n", page); | 458 | printk(KERN_ALERT "*pde = %08lx\n", page); |
452 | /* | 459 | /* |
@@ -500,11 +507,7 @@ do_sigbus: | |||
500 | tsk->thread.cr2 = address; | 507 | tsk->thread.cr2 = address; |
501 | tsk->thread.error_code = error_code; | 508 | tsk->thread.error_code = error_code; |
502 | tsk->thread.trap_no = 14; | 509 | tsk->thread.trap_no = 14; |
503 | info.si_signo = SIGBUS; | 510 | force_sig_info_fault(SIGBUS, BUS_ADRERR, address, tsk); |
504 | info.si_errno = 0; | ||
505 | info.si_code = BUS_ADRERR; | ||
506 | info.si_addr = (void __user *)address; | ||
507 | force_sig_info(SIGBUS, &info, tsk); | ||
508 | return; | 511 | return; |
509 | 512 | ||
510 | vmalloc_fault: | 513 | vmalloc_fault: |
@@ -523,7 +526,7 @@ vmalloc_fault: | |||
523 | pmd_t *pmd, *pmd_k; | 526 | pmd_t *pmd, *pmd_k; |
524 | pte_t *pte_k; | 527 | pte_t *pte_k; |
525 | 528 | ||
526 | asm("movl %%cr3,%0":"=r" (pgd_paddr)); | 529 | pgd_paddr = read_cr3(); |
527 | pgd = index + (pgd_t *)__va(pgd_paddr); | 530 | pgd = index + (pgd_t *)__va(pgd_paddr); |
528 | pgd_k = init_mm.pgd + index; | 531 | pgd_k = init_mm.pgd + index; |
529 | 532 | ||
diff --git a/arch/i386/mm/hugetlbpage.c b/arch/i386/mm/hugetlbpage.c index 3b099f32b948..d524127c9afc 100644 --- a/arch/i386/mm/hugetlbpage.c +++ b/arch/i386/mm/hugetlbpage.c | |||
@@ -22,12 +22,15 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr) | |||
22 | { | 22 | { |
23 | pgd_t *pgd; | 23 | pgd_t *pgd; |
24 | pud_t *pud; | 24 | pud_t *pud; |
25 | pmd_t *pmd = NULL; | 25 | pte_t *pte = NULL; |
26 | 26 | ||
27 | pgd = pgd_offset(mm, addr); | 27 | pgd = pgd_offset(mm, addr); |
28 | pud = pud_alloc(mm, pgd, addr); | 28 | pud = pud_alloc(mm, pgd, addr); |
29 | pmd = pmd_alloc(mm, pud, addr); | 29 | if (pud) |
30 | return (pte_t *) pmd; | 30 | pte = (pte_t *) pmd_alloc(mm, pud, addr); |
31 | BUG_ON(pte && !pte_none(*pte) && !pte_huge(*pte)); | ||
32 | |||
33 | return pte; | ||
31 | } | 34 | } |
32 | 35 | ||
33 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | 36 | pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) |
@@ -37,8 +40,11 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) | |||
37 | pmd_t *pmd = NULL; | 40 | pmd_t *pmd = NULL; |
38 | 41 | ||
39 | pgd = pgd_offset(mm, addr); | 42 | pgd = pgd_offset(mm, addr); |
40 | pud = pud_offset(pgd, addr); | 43 | if (pgd_present(*pgd)) { |
41 | pmd = pmd_offset(pud, addr); | 44 | pud = pud_offset(pgd, addr); |
45 | if (pud_present(*pud)) | ||
46 | pmd = pmd_offset(pud, addr); | ||
47 | } | ||
42 | return (pte_t *) pmd; | 48 | return (pte_t *) pmd; |
43 | } | 49 | } |
44 | 50 | ||
@@ -118,17 +124,6 @@ follow_huge_pmd(struct mm_struct *mm, unsigned long address, | |||
118 | } | 124 | } |
119 | #endif | 125 | #endif |
120 | 126 | ||
121 | void hugetlb_clean_stale_pgtable(pte_t *pte) | ||
122 | { | ||
123 | pmd_t *pmd = (pmd_t *) pte; | ||
124 | struct page *page; | ||
125 | |||
126 | page = pmd_page(*pmd); | ||
127 | pmd_clear(pmd); | ||
128 | dec_page_state(nr_page_table_pages); | ||
129 | page_cache_release(page); | ||
130 | } | ||
131 | |||
132 | /* x86_64 also uses this file */ | 127 | /* x86_64 also uses this file */ |
133 | 128 | ||
134 | #ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA | 129 | #ifdef HAVE_ARCH_HUGETLB_UNMAPPED_AREA |
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c index 12216b52e28b..9edfc058b894 100644 --- a/arch/i386/mm/init.c +++ b/arch/i386/mm/init.c | |||
@@ -198,9 +198,10 @@ int page_is_ram(unsigned long pagenr) | |||
198 | 198 | ||
199 | if (efi_enabled) { | 199 | if (efi_enabled) { |
200 | efi_memory_desc_t *md; | 200 | efi_memory_desc_t *md; |
201 | void *p; | ||
201 | 202 | ||
202 | for (i = 0; i < memmap.nr_map; i++) { | 203 | for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { |
203 | md = &memmap.map[i]; | 204 | md = p; |
204 | if (!is_available_memory(md)) | 205 | if (!is_available_memory(md)) |
205 | continue; | 206 | continue; |
206 | addr = (md->phys_addr+PAGE_SIZE-1) >> PAGE_SHIFT; | 207 | addr = (md->phys_addr+PAGE_SIZE-1) >> PAGE_SHIFT; |
@@ -348,7 +349,7 @@ static void __init pagetable_init (void) | |||
348 | * All user-space mappings are explicitly cleared after | 349 | * All user-space mappings are explicitly cleared after |
349 | * SMP startup. | 350 | * SMP startup. |
350 | */ | 351 | */ |
351 | pgd_base[0] = pgd_base[USER_PTRS_PER_PGD]; | 352 | set_pgd(&pgd_base[0], pgd_base[USER_PTRS_PER_PGD]); |
352 | #endif | 353 | #endif |
353 | } | 354 | } |
354 | 355 | ||
diff --git a/arch/i386/mm/pageattr.c b/arch/i386/mm/pageattr.c index cb3da6baa704..f600fc244f02 100644 --- a/arch/i386/mm/pageattr.c +++ b/arch/i386/mm/pageattr.c | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <asm/uaccess.h> | 12 | #include <asm/uaccess.h> |
13 | #include <asm/processor.h> | 13 | #include <asm/processor.h> |
14 | #include <asm/tlbflush.h> | 14 | #include <asm/tlbflush.h> |
15 | #include <asm/pgalloc.h> | ||
15 | 16 | ||
16 | static DEFINE_SPINLOCK(cpa_lock); | 17 | static DEFINE_SPINLOCK(cpa_lock); |
17 | static struct list_head df_list = LIST_HEAD_INIT(df_list); | 18 | static struct list_head df_list = LIST_HEAD_INIT(df_list); |
@@ -52,8 +53,8 @@ static struct page *split_large_page(unsigned long address, pgprot_t prot) | |||
52 | addr = address & LARGE_PAGE_MASK; | 53 | addr = address & LARGE_PAGE_MASK; |
53 | pbase = (pte_t *)page_address(base); | 54 | pbase = (pte_t *)page_address(base); |
54 | for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { | 55 | for (i = 0; i < PTRS_PER_PTE; i++, addr += PAGE_SIZE) { |
55 | pbase[i] = pfn_pte(addr >> PAGE_SHIFT, | 56 | set_pte(&pbase[i], pfn_pte(addr >> PAGE_SHIFT, |
56 | addr == address ? prot : PAGE_KERNEL); | 57 | addr == address ? prot : PAGE_KERNEL)); |
57 | } | 58 | } |
58 | return base; | 59 | return base; |
59 | } | 60 | } |
@@ -62,7 +63,7 @@ static void flush_kernel_map(void *dummy) | |||
62 | { | 63 | { |
63 | /* Could use CLFLUSH here if the CPU supports it (Hammer,P4) */ | 64 | /* Could use CLFLUSH here if the CPU supports it (Hammer,P4) */ |
64 | if (boot_cpu_data.x86_model >= 4) | 65 | if (boot_cpu_data.x86_model >= 4) |
65 | asm volatile("wbinvd":::"memory"); | 66 | wbinvd(); |
66 | /* Flush all to work around Errata in early athlons regarding | 67 | /* Flush all to work around Errata in early athlons regarding |
67 | * large page flushing. | 68 | * large page flushing. |
68 | */ | 69 | */ |
diff --git a/arch/i386/mm/pgtable.c b/arch/i386/mm/pgtable.c index bd2f7afc7a2a..dcdce2c6c532 100644 --- a/arch/i386/mm/pgtable.c +++ b/arch/i386/mm/pgtable.c | |||
@@ -207,19 +207,19 @@ void pgd_ctor(void *pgd, kmem_cache_t *cache, unsigned long unused) | |||
207 | { | 207 | { |
208 | unsigned long flags; | 208 | unsigned long flags; |
209 | 209 | ||
210 | if (PTRS_PER_PMD == 1) | 210 | if (PTRS_PER_PMD == 1) { |
211 | memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); | ||
211 | spin_lock_irqsave(&pgd_lock, flags); | 212 | spin_lock_irqsave(&pgd_lock, flags); |
213 | } | ||
212 | 214 | ||
213 | memcpy((pgd_t *)pgd + USER_PTRS_PER_PGD, | 215 | clone_pgd_range((pgd_t *)pgd + USER_PTRS_PER_PGD, |
214 | swapper_pg_dir + USER_PTRS_PER_PGD, | 216 | swapper_pg_dir + USER_PTRS_PER_PGD, |
215 | (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); | 217 | KERNEL_PGD_PTRS); |
216 | |||
217 | if (PTRS_PER_PMD > 1) | 218 | if (PTRS_PER_PMD > 1) |
218 | return; | 219 | return; |
219 | 220 | ||
220 | pgd_list_add(pgd); | 221 | pgd_list_add(pgd); |
221 | spin_unlock_irqrestore(&pgd_lock, flags); | 222 | spin_unlock_irqrestore(&pgd_lock, flags); |
222 | memset(pgd, 0, USER_PTRS_PER_PGD*sizeof(pgd_t)); | ||
223 | } | 223 | } |
224 | 224 | ||
225 | /* never called when PTRS_PER_PMD > 1 */ | 225 | /* never called when PTRS_PER_PMD > 1 */ |
diff --git a/arch/i386/power/cpu.c b/arch/i386/power/cpu.c index c547c1af6fa1..7b0b9ad848e5 100644 --- a/arch/i386/power/cpu.c +++ b/arch/i386/power/cpu.c | |||
@@ -42,25 +42,25 @@ void __save_processor_state(struct saved_context *ctxt) | |||
42 | /* | 42 | /* |
43 | * descriptor tables | 43 | * descriptor tables |
44 | */ | 44 | */ |
45 | asm volatile ("sgdt %0" : "=m" (ctxt->gdt_limit)); | 45 | store_gdt(&ctxt->gdt_limit); |
46 | asm volatile ("sidt %0" : "=m" (ctxt->idt_limit)); | 46 | store_idt(&ctxt->idt_limit); |
47 | asm volatile ("str %0" : "=m" (ctxt->tr)); | 47 | store_tr(ctxt->tr); |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * segment registers | 50 | * segment registers |
51 | */ | 51 | */ |
52 | asm volatile ("movw %%es, %0" : "=m" (ctxt->es)); | 52 | savesegment(es, ctxt->es); |
53 | asm volatile ("movw %%fs, %0" : "=m" (ctxt->fs)); | 53 | savesegment(fs, ctxt->fs); |
54 | asm volatile ("movw %%gs, %0" : "=m" (ctxt->gs)); | 54 | savesegment(gs, ctxt->gs); |
55 | asm volatile ("movw %%ss, %0" : "=m" (ctxt->ss)); | 55 | savesegment(ss, ctxt->ss); |
56 | 56 | ||
57 | /* | 57 | /* |
58 | * control registers | 58 | * control registers |
59 | */ | 59 | */ |
60 | asm volatile ("movl %%cr0, %0" : "=r" (ctxt->cr0)); | 60 | ctxt->cr0 = read_cr0(); |
61 | asm volatile ("movl %%cr2, %0" : "=r" (ctxt->cr2)); | 61 | ctxt->cr2 = read_cr2(); |
62 | asm volatile ("movl %%cr3, %0" : "=r" (ctxt->cr3)); | 62 | ctxt->cr3 = read_cr3(); |
63 | asm volatile ("movl %%cr4, %0" : "=r" (ctxt->cr4)); | 63 | ctxt->cr4 = read_cr4(); |
64 | } | 64 | } |
65 | 65 | ||
66 | void save_processor_state(void) | 66 | void save_processor_state(void) |
@@ -84,7 +84,6 @@ static void fix_processor_context(void) | |||
84 | struct tss_struct * t = &per_cpu(init_tss, cpu); | 84 | struct tss_struct * t = &per_cpu(init_tss, cpu); |
85 | 85 | ||
86 | set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ | 86 | set_tss_desc(cpu,t); /* This just modifies memory; should not be necessary. But... This is necessary, because 386 hardware has concept of busy TSS or some similar stupidity. */ |
87 | per_cpu(cpu_gdt_table, cpu)[GDT_ENTRY_TSS].b &= 0xfffffdff; | ||
88 | 87 | ||
89 | load_TR_desc(); /* This does ltr */ | 88 | load_TR_desc(); /* This does ltr */ |
90 | load_LDT(¤t->active_mm->context); /* This does lldt */ | 89 | load_LDT(¤t->active_mm->context); /* This does lldt */ |
@@ -109,25 +108,25 @@ void __restore_processor_state(struct saved_context *ctxt) | |||
109 | /* | 108 | /* |
110 | * control registers | 109 | * control registers |
111 | */ | 110 | */ |
112 | asm volatile ("movl %0, %%cr4" :: "r" (ctxt->cr4)); | 111 | write_cr4(ctxt->cr4); |
113 | asm volatile ("movl %0, %%cr3" :: "r" (ctxt->cr3)); | 112 | write_cr3(ctxt->cr3); |
114 | asm volatile ("movl %0, %%cr2" :: "r" (ctxt->cr2)); | 113 | write_cr2(ctxt->cr2); |
115 | asm volatile ("movl %0, %%cr0" :: "r" (ctxt->cr0)); | 114 | write_cr2(ctxt->cr0); |
116 | 115 | ||
117 | /* | 116 | /* |
118 | * now restore the descriptor tables to their proper values | 117 | * now restore the descriptor tables to their proper values |
119 | * ltr is done i fix_processor_context(). | 118 | * ltr is done i fix_processor_context(). |
120 | */ | 119 | */ |
121 | asm volatile ("lgdt %0" :: "m" (ctxt->gdt_limit)); | 120 | load_gdt(&ctxt->gdt_limit); |
122 | asm volatile ("lidt %0" :: "m" (ctxt->idt_limit)); | 121 | load_idt(&ctxt->idt_limit); |
123 | 122 | ||
124 | /* | 123 | /* |
125 | * segment registers | 124 | * segment registers |
126 | */ | 125 | */ |
127 | asm volatile ("movw %0, %%es" :: "r" (ctxt->es)); | 126 | loadsegment(es, ctxt->es); |
128 | asm volatile ("movw %0, %%fs" :: "r" (ctxt->fs)); | 127 | loadsegment(fs, ctxt->fs); |
129 | asm volatile ("movw %0, %%gs" :: "r" (ctxt->gs)); | 128 | loadsegment(gs, ctxt->gs); |
130 | asm volatile ("movw %0, %%ss" :: "r" (ctxt->ss)); | 129 | loadsegment(ss, ctxt->ss); |
131 | 130 | ||
132 | /* | 131 | /* |
133 | * sysenter MSRs | 132 | * sysenter MSRs |
diff --git a/arch/m68k/kernel/m68k_ksyms.c b/arch/m68k/kernel/m68k_ksyms.c index fe837e31afbf..73e2f5e168dd 100644 --- a/arch/m68k/kernel/m68k_ksyms.c +++ b/arch/m68k/kernel/m68k_ksyms.c | |||
@@ -74,10 +74,6 @@ EXPORT_SYMBOL(vme_brdtype); | |||
74 | EXPORT_SYMBOL(__ashldi3); | 74 | EXPORT_SYMBOL(__ashldi3); |
75 | EXPORT_SYMBOL(__ashrdi3); | 75 | EXPORT_SYMBOL(__ashrdi3); |
76 | EXPORT_SYMBOL(__lshrdi3); | 76 | EXPORT_SYMBOL(__lshrdi3); |
77 | EXPORT_SYMBOL(memcpy); | ||
78 | EXPORT_SYMBOL(memset); | ||
79 | EXPORT_SYMBOL(memcmp); | ||
80 | EXPORT_SYMBOL(memscan); | ||
81 | EXPORT_SYMBOL(__muldi3); | 77 | EXPORT_SYMBOL(__muldi3); |
82 | 78 | ||
83 | EXPORT_SYMBOL(__down_failed); | 79 | EXPORT_SYMBOL(__down_failed); |
diff --git a/arch/m68k/kernel/ptrace.c b/arch/m68k/kernel/ptrace.c index f4e1e5eb8e12..8ed1b01a6a87 100644 --- a/arch/m68k/kernel/ptrace.c +++ b/arch/m68k/kernel/ptrace.c | |||
@@ -95,7 +95,7 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
95 | if (regno == PT_USP) | 95 | if (regno == PT_USP) |
96 | addr = &task->thread.usp; | 96 | addr = &task->thread.usp; |
97 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) | 97 | else if (regno < sizeof(regoff)/sizeof(regoff[0])) |
98 | addr = (unsigned long *) (task->thread.esp0 + regoff[regno]); | 98 | addr = (unsigned long *)(task->thread.esp0 + regoff[regno]); |
99 | else | 99 | else |
100 | return -1; | 100 | return -1; |
101 | *addr = data; | 101 | *addr = data; |
@@ -103,48 +103,56 @@ static inline int put_reg(struct task_struct *task, int regno, | |||
103 | } | 103 | } |
104 | 104 | ||
105 | /* | 105 | /* |
106 | * Called by kernel/ptrace.c when detaching.. | ||
107 | * | ||
108 | * Make sure the single step bit is not set. | 106 | * Make sure the single step bit is not set. |
109 | */ | 107 | */ |
110 | void ptrace_disable(struct task_struct *child) | 108 | static inline void singlestep_disable(struct task_struct *child) |
111 | { | 109 | { |
112 | unsigned long tmp; | 110 | unsigned long tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); |
113 | /* make sure the single step bit is not set. */ | ||
114 | tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); | ||
115 | put_reg(child, PT_SR, tmp); | 111 | put_reg(child, PT_SR, tmp); |
116 | child->thread.work.delayed_trace = 0; | 112 | child->thread.work.delayed_trace = 0; |
113 | } | ||
114 | |||
115 | /* | ||
116 | * Called by kernel/ptrace.c when detaching.. | ||
117 | */ | ||
118 | void ptrace_disable(struct task_struct *child) | ||
119 | { | ||
120 | singlestep_disable(child); | ||
117 | child->thread.work.syscall_trace = 0; | 121 | child->thread.work.syscall_trace = 0; |
118 | } | 122 | } |
119 | 123 | ||
120 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | 124 | asmlinkage int sys_ptrace(long request, long pid, long addr, long data) |
121 | { | 125 | { |
122 | struct task_struct *child; | 126 | struct task_struct *child; |
123 | int ret; | 127 | unsigned long tmp; |
128 | int i, ret = 0; | ||
124 | 129 | ||
125 | lock_kernel(); | 130 | lock_kernel(); |
126 | ret = -EPERM; | ||
127 | if (request == PTRACE_TRACEME) { | 131 | if (request == PTRACE_TRACEME) { |
128 | /* are we already being traced? */ | 132 | /* are we already being traced? */ |
129 | if (current->ptrace & PT_PTRACED) | 133 | if (current->ptrace & PT_PTRACED) { |
134 | ret = -EPERM; | ||
130 | goto out; | 135 | goto out; |
136 | } | ||
131 | /* set the ptrace bit in the process flags. */ | 137 | /* set the ptrace bit in the process flags. */ |
132 | current->ptrace |= PT_PTRACED; | 138 | current->ptrace |= PT_PTRACED; |
133 | ret = 0; | ||
134 | goto out; | 139 | goto out; |
135 | } | 140 | } |
136 | ret = -ESRCH; | ||
137 | read_lock(&tasklist_lock); | 141 | read_lock(&tasklist_lock); |
138 | child = find_task_by_pid(pid); | 142 | child = find_task_by_pid(pid); |
139 | if (child) | 143 | if (child) |
140 | get_task_struct(child); | 144 | get_task_struct(child); |
141 | read_unlock(&tasklist_lock); | 145 | read_unlock(&tasklist_lock); |
142 | if (!child) | 146 | if (unlikely(!child)) { |
147 | ret = -ESRCH; | ||
143 | goto out; | 148 | goto out; |
149 | } | ||
144 | 150 | ||
145 | ret = -EPERM; | 151 | /* you may not mess with init */ |
146 | if (pid == 1) /* you may not mess with init */ | 152 | if (unlikely(pid == 1)) { |
153 | ret = -EPERM; | ||
147 | goto out_tsk; | 154 | goto out_tsk; |
155 | } | ||
148 | 156 | ||
149 | if (request == PTRACE_ATTACH) { | 157 | if (request == PTRACE_ATTACH) { |
150 | ret = ptrace_attach(child); | 158 | ret = ptrace_attach(child); |
@@ -152,227 +160,171 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
152 | } | 160 | } |
153 | 161 | ||
154 | ret = ptrace_check_attach(child, request == PTRACE_KILL); | 162 | ret = ptrace_check_attach(child, request == PTRACE_KILL); |
155 | if (ret < 0) | 163 | if (ret) |
156 | goto out_tsk; | 164 | goto out_tsk; |
157 | 165 | ||
158 | switch (request) { | 166 | switch (request) { |
159 | /* when I and D space are separate, these will need to be fixed. */ | 167 | /* when I and D space are separate, these will need to be fixed. */ |
160 | case PTRACE_PEEKTEXT: /* read word at location addr. */ | 168 | case PTRACE_PEEKTEXT: /* read word at location addr. */ |
161 | case PTRACE_PEEKDATA: { | 169 | case PTRACE_PEEKDATA: |
162 | unsigned long tmp; | 170 | i = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); |
163 | int copied; | 171 | if (i != sizeof(tmp)) |
164 | 172 | goto out_eio; | |
165 | copied = access_process_vm(child, addr, &tmp, sizeof(tmp), 0); | 173 | ret = put_user(tmp, (unsigned long *)data); |
166 | ret = -EIO; | 174 | break; |
167 | if (copied != sizeof(tmp)) | ||
168 | break; | ||
169 | ret = put_user(tmp,(unsigned long *) data); | ||
170 | break; | ||
171 | } | ||
172 | 175 | ||
173 | /* read the word at location addr in the USER area. */ | 176 | /* read the word at location addr in the USER area. */ |
174 | case PTRACE_PEEKUSR: { | 177 | case PTRACE_PEEKUSR: |
175 | unsigned long tmp; | 178 | if (addr & 3) |
176 | 179 | goto out_eio; | |
177 | ret = -EIO; | 180 | addr >>= 2; /* temporary hack. */ |
178 | if ((addr & 3) || addr < 0 || | 181 | |
179 | addr > sizeof(struct user) - 3) | 182 | if (addr >= 0 && addr < 19) { |
180 | break; | 183 | tmp = get_reg(child, addr); |
181 | 184 | if (addr == PT_SR) | |
182 | tmp = 0; /* Default return condition */ | 185 | tmp >>= 16; |
183 | addr = addr >> 2; /* temporary hack. */ | 186 | } else if (addr >= 21 && addr < 49) { |
184 | ret = -EIO; | 187 | tmp = child->thread.fp[addr - 21]; |
185 | if (addr < 19) { | 188 | /* Convert internal fpu reg representation |
186 | tmp = get_reg(child, addr); | 189 | * into long double format |
187 | if (addr == PT_SR) | 190 | */ |
188 | tmp >>= 16; | 191 | if (FPU_IS_EMU && (addr < 45) && !(addr % 3)) |
189 | } else if (addr >= 21 && addr < 49) { | 192 | tmp = ((tmp & 0xffff0000) << 15) | |
190 | tmp = child->thread.fp[addr - 21]; | 193 | ((tmp & 0x0000ffff) << 16); |
191 | #ifdef CONFIG_M68KFPU_EMU | 194 | } else |
192 | /* Convert internal fpu reg representation | ||
193 | * into long double format | ||
194 | */ | ||
195 | if (FPU_IS_EMU && (addr < 45) && !(addr % 3)) | ||
196 | tmp = ((tmp & 0xffff0000) << 15) | | ||
197 | ((tmp & 0x0000ffff) << 16); | ||
198 | #endif | ||
199 | } else | ||
200 | break; | ||
201 | ret = put_user(tmp,(unsigned long *) data); | ||
202 | break; | ||
203 | } | ||
204 | |||
205 | /* when I and D space are separate, this will have to be fixed. */ | ||
206 | case PTRACE_POKETEXT: /* write the word at location addr. */ | ||
207 | case PTRACE_POKEDATA: | ||
208 | ret = 0; | ||
209 | if (access_process_vm(child, addr, &data, sizeof(data), 1) == sizeof(data)) | ||
210 | break; | ||
211 | ret = -EIO; | ||
212 | break; | ||
213 | |||
214 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ | ||
215 | ret = -EIO; | ||
216 | if ((addr & 3) || addr < 0 || | ||
217 | addr > sizeof(struct user) - 3) | ||
218 | break; | ||
219 | |||
220 | addr = addr >> 2; /* temporary hack. */ | ||
221 | |||
222 | if (addr == PT_SR) { | ||
223 | data &= SR_MASK; | ||
224 | data <<= 16; | ||
225 | data |= get_reg(child, PT_SR) & ~(SR_MASK << 16); | ||
226 | } | ||
227 | if (addr < 19) { | ||
228 | if (put_reg(child, addr, data)) | ||
229 | break; | ||
230 | ret = 0; | ||
231 | break; | ||
232 | } | ||
233 | if (addr >= 21 && addr < 48) | ||
234 | { | ||
235 | #ifdef CONFIG_M68KFPU_EMU | ||
236 | /* Convert long double format | ||
237 | * into internal fpu reg representation | ||
238 | */ | ||
239 | if (FPU_IS_EMU && (addr < 45) && !(addr % 3)) { | ||
240 | data = (unsigned long)data << 15; | ||
241 | data = (data & 0xffff0000) | | ||
242 | ((data & 0x0000ffff) >> 1); | ||
243 | } | ||
244 | #endif | ||
245 | child->thread.fp[addr - 21] = data; | ||
246 | ret = 0; | ||
247 | } | ||
248 | break; | 195 | break; |
249 | 196 | ret = put_user(tmp, (unsigned long *)data); | |
250 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ | 197 | break; |
251 | case PTRACE_CONT: { /* restart after signal. */ | 198 | |
252 | long tmp; | 199 | /* when I and D space are separate, this will have to be fixed. */ |
253 | 200 | case PTRACE_POKETEXT: /* write the word at location addr. */ | |
254 | ret = -EIO; | 201 | case PTRACE_POKEDATA: |
255 | if (!valid_signal(data)) | 202 | if (access_process_vm(child, addr, &data, sizeof(data), 1) != sizeof(data)) |
256 | break; | 203 | goto out_eio; |
257 | if (request == PTRACE_SYSCALL) { | 204 | break; |
258 | child->thread.work.syscall_trace = ~0; | 205 | |
259 | } else { | 206 | case PTRACE_POKEUSR: /* write the word at location addr in the USER area */ |
260 | child->thread.work.syscall_trace = 0; | 207 | if (addr & 3) |
208 | goto out_eio; | ||
209 | addr >>= 2; /* temporary hack. */ | ||
210 | |||
211 | if (addr == PT_SR) { | ||
212 | data &= SR_MASK; | ||
213 | data <<= 16; | ||
214 | data |= get_reg(child, PT_SR) & ~(SR_MASK << 16); | ||
215 | } else if (addr >= 0 && addr < 19) { | ||
216 | if (put_reg(child, addr, data)) | ||
217 | goto out_eio; | ||
218 | } else if (addr >= 21 && addr < 48) { | ||
219 | /* Convert long double format | ||
220 | * into internal fpu reg representation | ||
221 | */ | ||
222 | if (FPU_IS_EMU && (addr < 45) && !(addr % 3)) { | ||
223 | data = (unsigned long)data << 15; | ||
224 | data = (data & 0xffff0000) | | ||
225 | ((data & 0x0000ffff) >> 1); | ||
261 | } | 226 | } |
262 | child->exit_code = data; | 227 | child->thread.fp[addr - 21] = data; |
263 | /* make sure the single step bit is not set. */ | 228 | } else |
264 | tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); | 229 | goto out_eio; |
265 | put_reg(child, PT_SR, tmp); | 230 | break; |
266 | child->thread.work.delayed_trace = 0; | 231 | |
267 | wake_up_process(child); | 232 | case PTRACE_SYSCALL: /* continue and stop at next (return from) syscall */ |
268 | ret = 0; | 233 | case PTRACE_CONT: /* restart after signal. */ |
269 | break; | 234 | if (!valid_signal(data)) |
270 | } | 235 | goto out_eio; |
271 | 236 | ||
272 | /* | 237 | if (request == PTRACE_SYSCALL) |
273 | * make the child exit. Best I can do is send it a sigkill. | 238 | child->thread.work.syscall_trace = ~0; |
274 | * perhaps it should be put in the status that it wants to | 239 | else |
275 | * exit. | ||
276 | */ | ||
277 | case PTRACE_KILL: { | ||
278 | long tmp; | ||
279 | |||
280 | ret = 0; | ||
281 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
282 | break; | ||
283 | child->exit_code = SIGKILL; | ||
284 | /* make sure the single step bit is not set. */ | ||
285 | tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); | ||
286 | put_reg(child, PT_SR, tmp); | ||
287 | child->thread.work.delayed_trace = 0; | ||
288 | wake_up_process(child); | ||
289 | break; | ||
290 | } | ||
291 | |||
292 | case PTRACE_SINGLESTEP: { /* set the trap flag. */ | ||
293 | long tmp; | ||
294 | |||
295 | ret = -EIO; | ||
296 | if (!valid_signal(data)) | ||
297 | break; | ||
298 | child->thread.work.syscall_trace = 0; | 240 | child->thread.work.syscall_trace = 0; |
299 | tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); | 241 | child->exit_code = data; |
300 | put_reg(child, PT_SR, tmp); | 242 | singlestep_disable(child); |
301 | child->thread.work.delayed_trace = 1; | 243 | wake_up_process(child); |
302 | 244 | break; | |
303 | child->exit_code = data; | ||
304 | /* give it a chance to run. */ | ||
305 | wake_up_process(child); | ||
306 | ret = 0; | ||
307 | break; | ||
308 | } | ||
309 | 245 | ||
310 | case PTRACE_DETACH: /* detach a process that was attached. */ | 246 | /* |
311 | ret = ptrace_detach(child, data); | 247 | * make the child exit. Best I can do is send it a sigkill. |
248 | * perhaps it should be put in the status that it wants to | ||
249 | * exit. | ||
250 | */ | ||
251 | case PTRACE_KILL: | ||
252 | if (child->exit_state == EXIT_ZOMBIE) /* already dead */ | ||
312 | break; | 253 | break; |
313 | 254 | child->exit_code = SIGKILL; | |
314 | case PTRACE_GETREGS: { /* Get all gp regs from the child. */ | 255 | singlestep_disable(child); |
315 | int i; | 256 | wake_up_process(child); |
316 | unsigned long tmp; | 257 | break; |
317 | for (i = 0; i < 19; i++) { | 258 | |
318 | tmp = get_reg(child, i); | 259 | case PTRACE_SINGLESTEP: /* set the trap flag. */ |
319 | if (i == PT_SR) | 260 | if (!valid_signal(data)) |
261 | goto out_eio; | ||
262 | |||
263 | child->thread.work.syscall_trace = 0; | ||
264 | tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); | ||
265 | put_reg(child, PT_SR, tmp); | ||
266 | child->thread.work.delayed_trace = 1; | ||
267 | |||
268 | child->exit_code = data; | ||
269 | /* give it a chance to run. */ | ||
270 | wake_up_process(child); | ||
271 | break; | ||
272 | |||
273 | case PTRACE_DETACH: /* detach a process that was attached. */ | ||
274 | ret = ptrace_detach(child, data); | ||
275 | break; | ||
276 | |||
277 | case PTRACE_GETREGS: /* Get all gp regs from the child. */ | ||
278 | for (i = 0; i < 19; i++) { | ||
279 | tmp = get_reg(child, i); | ||
280 | if (i == PT_SR) | ||
320 | tmp >>= 16; | 281 | tmp >>= 16; |
321 | if (put_user(tmp, (unsigned long *) data)) { | 282 | ret = put_user(tmp, (unsigned long *)data); |
322 | ret = -EFAULT; | 283 | if (ret) |
323 | break; | 284 | break; |
324 | } | 285 | data += sizeof(long); |
325 | data += sizeof(long); | ||
326 | } | ||
327 | ret = 0; | ||
328 | break; | ||
329 | } | 286 | } |
287 | break; | ||
330 | 288 | ||
331 | case PTRACE_SETREGS: { /* Set all gp regs in the child. */ | 289 | case PTRACE_SETREGS: /* Set all gp regs in the child. */ |
332 | int i; | 290 | for (i = 0; i < 19; i++) { |
333 | unsigned long tmp; | 291 | ret = get_user(tmp, (unsigned long *)data); |
334 | for (i = 0; i < 19; i++) { | 292 | if (ret) |
335 | if (get_user(tmp, (unsigned long *) data)) { | ||
336 | ret = -EFAULT; | ||
337 | break; | 293 | break; |
338 | } | 294 | if (i == PT_SR) { |
339 | if (i == PT_SR) { | ||
340 | tmp &= SR_MASK; | 295 | tmp &= SR_MASK; |
341 | tmp <<= 16; | 296 | tmp <<= 16; |
342 | tmp |= get_reg(child, PT_SR) & ~(SR_MASK << 16); | 297 | tmp |= get_reg(child, PT_SR) & ~(SR_MASK << 16); |
343 | } | ||
344 | put_reg(child, i, tmp); | ||
345 | data += sizeof(long); | ||
346 | } | 298 | } |
347 | ret = 0; | 299 | put_reg(child, i, tmp); |
348 | break; | 300 | data += sizeof(long); |
349 | } | 301 | } |
350 | 302 | break; | |
351 | case PTRACE_GETFPREGS: { /* Get the child FPU state. */ | 303 | |
352 | ret = 0; | 304 | case PTRACE_GETFPREGS: /* Get the child FPU state. */ |
353 | if (copy_to_user((void *)data, &child->thread.fp, | 305 | if (copy_to_user((void *)data, &child->thread.fp, |
354 | sizeof(struct user_m68kfp_struct))) | 306 | sizeof(struct user_m68kfp_struct))) |
355 | ret = -EFAULT; | 307 | ret = -EFAULT; |
356 | break; | 308 | break; |
357 | } | 309 | |
358 | 310 | case PTRACE_SETFPREGS: /* Set the child FPU state. */ | |
359 | case PTRACE_SETFPREGS: { /* Set the child FPU state. */ | 311 | if (copy_from_user(&child->thread.fp, (void *)data, |
360 | ret = 0; | 312 | sizeof(struct user_m68kfp_struct))) |
361 | if (copy_from_user(&child->thread.fp, (void *)data, | 313 | ret = -EFAULT; |
362 | sizeof(struct user_m68kfp_struct))) | 314 | break; |
363 | ret = -EFAULT; | 315 | |
364 | break; | 316 | default: |
365 | } | 317 | ret = ptrace_request(child, request, addr, data); |
366 | 318 | break; | |
367 | default: | ||
368 | ret = ptrace_request(child, request, addr, data); | ||
369 | break; | ||
370 | } | 319 | } |
371 | out_tsk: | 320 | out_tsk: |
372 | put_task_struct(child); | 321 | put_task_struct(child); |
373 | out: | 322 | out: |
374 | unlock_kernel(); | 323 | unlock_kernel(); |
375 | return ret; | 324 | return ret; |
325 | out_eio: | ||
326 | ret = -EIO; | ||
327 | goto out_tsk; | ||
376 | } | 328 | } |
377 | 329 | ||
378 | asmlinkage void syscall_trace(void) | 330 | asmlinkage void syscall_trace(void) |
diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile index 34b6dbc29c85..ebe51a513817 100644 --- a/arch/m68k/lib/Makefile +++ b/arch/m68k/lib/Makefile | |||
@@ -5,4 +5,4 @@ | |||
5 | EXTRA_AFLAGS := -traditional | 5 | EXTRA_AFLAGS := -traditional |
6 | 6 | ||
7 | lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ | 7 | lib-y := ashldi3.o ashrdi3.o lshrdi3.o muldi3.o \ |
8 | checksum.o memcmp.o memcpy.o memset.o semaphore.o | 8 | checksum.o string.o semaphore.o |
diff --git a/arch/m68k/lib/memcmp.c b/arch/m68k/lib/memcmp.c deleted file mode 100644 index f4796febb773..000000000000 --- a/arch/m68k/lib/memcmp.c +++ /dev/null | |||
@@ -1,11 +0,0 @@ | |||
1 | #include <linux/types.h> | ||
2 | |||
3 | int memcmp(const void * cs,const void * ct,size_t count) | ||
4 | { | ||
5 | const unsigned char *su1, *su2; | ||
6 | |||
7 | for( su1 = cs, su2 = ct; 0 < count; ++su1, ++su2, count--) | ||
8 | if (*su1 != *su2) | ||
9 | return((*su1 < *su2) ? -1 : +1); | ||
10 | return(0); | ||
11 | } | ||
diff --git a/arch/m68k/lib/memcpy.c b/arch/m68k/lib/memcpy.c deleted file mode 100644 index 73e181823d9b..000000000000 --- a/arch/m68k/lib/memcpy.c +++ /dev/null | |||
@@ -1,75 +0,0 @@ | |||
1 | #include <linux/types.h> | ||
2 | |||
3 | void * memcpy(void * to, const void * from, size_t n) | ||
4 | { | ||
5 | void *xto = to; | ||
6 | size_t temp, temp1; | ||
7 | |||
8 | if (!n) | ||
9 | return xto; | ||
10 | if ((long) to & 1) | ||
11 | { | ||
12 | char *cto = to; | ||
13 | const char *cfrom = from; | ||
14 | *cto++ = *cfrom++; | ||
15 | to = cto; | ||
16 | from = cfrom; | ||
17 | n--; | ||
18 | } | ||
19 | if (n > 2 && (long) to & 2) | ||
20 | { | ||
21 | short *sto = to; | ||
22 | const short *sfrom = from; | ||
23 | *sto++ = *sfrom++; | ||
24 | to = sto; | ||
25 | from = sfrom; | ||
26 | n -= 2; | ||
27 | } | ||
28 | temp = n >> 2; | ||
29 | if (temp) | ||
30 | { | ||
31 | long *lto = to; | ||
32 | const long *lfrom = from; | ||
33 | |||
34 | __asm__ __volatile__("movel %2,%3\n\t" | ||
35 | "andw #7,%3\n\t" | ||
36 | "lsrl #3,%2\n\t" | ||
37 | "negw %3\n\t" | ||
38 | "jmp %%pc@(1f,%3:w:2)\n\t" | ||
39 | "4:\t" | ||
40 | "movel %0@+,%1@+\n\t" | ||
41 | "movel %0@+,%1@+\n\t" | ||
42 | "movel %0@+,%1@+\n\t" | ||
43 | "movel %0@+,%1@+\n\t" | ||
44 | "movel %0@+,%1@+\n\t" | ||
45 | "movel %0@+,%1@+\n\t" | ||
46 | "movel %0@+,%1@+\n\t" | ||
47 | "movel %0@+,%1@+\n\t" | ||
48 | "1:\t" | ||
49 | "dbra %2,4b\n\t" | ||
50 | "clrw %2\n\t" | ||
51 | "subql #1,%2\n\t" | ||
52 | "jpl 4b\n\t" | ||
53 | : "=a" (lfrom), "=a" (lto), "=d" (temp), | ||
54 | "=&d" (temp1) | ||
55 | : "0" (lfrom), "1" (lto), "2" (temp) | ||
56 | ); | ||
57 | to = lto; | ||
58 | from = lfrom; | ||
59 | } | ||
60 | if (n & 2) | ||
61 | { | ||
62 | short *sto = to; | ||
63 | const short *sfrom = from; | ||
64 | *sto++ = *sfrom++; | ||
65 | to = sto; | ||
66 | from = sfrom; | ||
67 | } | ||
68 | if (n & 1) | ||
69 | { | ||
70 | char *cto = to; | ||
71 | const char *cfrom = from; | ||
72 | *cto = *cfrom; | ||
73 | } | ||
74 | return xto; | ||
75 | } | ||
diff --git a/arch/m68k/lib/memset.c b/arch/m68k/lib/memset.c deleted file mode 100644 index d55fdb2ee9d3..000000000000 --- a/arch/m68k/lib/memset.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | #include <linux/types.h> | ||
2 | |||
3 | void * memset(void * s, int c, size_t count) | ||
4 | { | ||
5 | void *xs = s; | ||
6 | size_t temp, temp1; | ||
7 | |||
8 | if (!count) | ||
9 | return xs; | ||
10 | c &= 0xff; | ||
11 | c |= c << 8; | ||
12 | c |= c << 16; | ||
13 | if ((long) s & 1) | ||
14 | { | ||
15 | char *cs = s; | ||
16 | *cs++ = c; | ||
17 | s = cs; | ||
18 | count--; | ||
19 | } | ||
20 | if (count > 2 && (long) s & 2) | ||
21 | { | ||
22 | short *ss = s; | ||
23 | *ss++ = c; | ||
24 | s = ss; | ||
25 | count -= 2; | ||
26 | } | ||
27 | temp = count >> 2; | ||
28 | if (temp) | ||
29 | { | ||
30 | long *ls = s; | ||
31 | |||
32 | __asm__ __volatile__("movel %1,%2\n\t" | ||
33 | "andw #7,%2\n\t" | ||
34 | "lsrl #3,%1\n\t" | ||
35 | "negw %2\n\t" | ||
36 | "jmp %%pc@(2f,%2:w:2)\n\t" | ||
37 | "1:\t" | ||
38 | "movel %3,%0@+\n\t" | ||
39 | "movel %3,%0@+\n\t" | ||
40 | "movel %3,%0@+\n\t" | ||
41 | "movel %3,%0@+\n\t" | ||
42 | "movel %3,%0@+\n\t" | ||
43 | "movel %3,%0@+\n\t" | ||
44 | "movel %3,%0@+\n\t" | ||
45 | "movel %3,%0@+\n\t" | ||
46 | "2:\t" | ||
47 | "dbra %1,1b\n\t" | ||
48 | "clrw %1\n\t" | ||
49 | "subql #1,%1\n\t" | ||
50 | "jpl 1b\n\t" | ||
51 | : "=a" (ls), "=d" (temp), "=&d" (temp1) | ||
52 | : "d" (c), "0" (ls), "1" (temp) | ||
53 | ); | ||
54 | s = ls; | ||
55 | } | ||
56 | if (count & 2) | ||
57 | { | ||
58 | short *ss = s; | ||
59 | *ss++ = c; | ||
60 | s = ss; | ||
61 | } | ||
62 | if (count & 1) | ||
63 | { | ||
64 | char *cs = s; | ||
65 | *cs = c; | ||
66 | } | ||
67 | return xs; | ||
68 | } | ||
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c new file mode 100644 index 000000000000..b92b89e1ea0c --- /dev/null +++ b/arch/m68k/lib/string.c | |||
@@ -0,0 +1,237 @@ | |||
1 | |||
2 | #include <linux/types.h> | ||
3 | #include <linux/module.h> | ||
4 | |||
5 | void *memset(void *s, int c, size_t count) | ||
6 | { | ||
7 | void *xs = s; | ||
8 | size_t temp, temp1; | ||
9 | |||
10 | if (!count) | ||
11 | return xs; | ||
12 | c &= 0xff; | ||
13 | c |= c << 8; | ||
14 | c |= c << 16; | ||
15 | if ((long)s & 1) { | ||
16 | char *cs = s; | ||
17 | *cs++ = c; | ||
18 | s = cs; | ||
19 | count--; | ||
20 | } | ||
21 | if (count > 2 && (long)s & 2) { | ||
22 | short *ss = s; | ||
23 | *ss++ = c; | ||
24 | s = ss; | ||
25 | count -= 2; | ||
26 | } | ||
27 | temp = count >> 2; | ||
28 | if (temp) { | ||
29 | long *ls = s; | ||
30 | |||
31 | asm volatile ( | ||
32 | " movel %1,%2\n" | ||
33 | " andw #7,%2\n" | ||
34 | " lsrl #3,%1\n" | ||
35 | " negw %2\n" | ||
36 | " jmp %%pc@(2f,%2:w:2)\n" | ||
37 | "1: movel %3,%0@+\n" | ||
38 | " movel %3,%0@+\n" | ||
39 | " movel %3,%0@+\n" | ||
40 | " movel %3,%0@+\n" | ||
41 | " movel %3,%0@+\n" | ||
42 | " movel %3,%0@+\n" | ||
43 | " movel %3,%0@+\n" | ||
44 | " movel %3,%0@+\n" | ||
45 | "2: dbra %1,1b\n" | ||
46 | " clrw %1\n" | ||
47 | " subql #1,%1\n" | ||
48 | " jpl 1b" | ||
49 | : "=a" (ls), "=d" (temp), "=&d" (temp1) | ||
50 | : "d" (c), "0" (ls), "1" (temp)); | ||
51 | s = ls; | ||
52 | } | ||
53 | if (count & 2) { | ||
54 | short *ss = s; | ||
55 | *ss++ = c; | ||
56 | s = ss; | ||
57 | } | ||
58 | if (count & 1) { | ||
59 | char *cs = s; | ||
60 | *cs = c; | ||
61 | } | ||
62 | return xs; | ||
63 | } | ||
64 | EXPORT_SYMBOL(memset); | ||
65 | |||
66 | void *memcpy(void *to, const void *from, size_t n) | ||
67 | { | ||
68 | void *xto = to; | ||
69 | size_t temp, temp1; | ||
70 | |||
71 | if (!n) | ||
72 | return xto; | ||
73 | if ((long)to & 1) { | ||
74 | char *cto = to; | ||
75 | const char *cfrom = from; | ||
76 | *cto++ = *cfrom++; | ||
77 | to = cto; | ||
78 | from = cfrom; | ||
79 | n--; | ||
80 | } | ||
81 | if (n > 2 && (long)to & 2) { | ||
82 | short *sto = to; | ||
83 | const short *sfrom = from; | ||
84 | *sto++ = *sfrom++; | ||
85 | to = sto; | ||
86 | from = sfrom; | ||
87 | n -= 2; | ||
88 | } | ||
89 | temp = n >> 2; | ||
90 | if (temp) { | ||
91 | long *lto = to; | ||
92 | const long *lfrom = from; | ||
93 | |||
94 | asm volatile ( | ||
95 | " movel %2,%3\n" | ||
96 | " andw #7,%3\n" | ||
97 | " lsrl #3,%2\n" | ||
98 | " negw %3\n" | ||
99 | " jmp %%pc@(1f,%3:w:2)\n" | ||
100 | "4: movel %0@+,%1@+\n" | ||
101 | " movel %0@+,%1@+\n" | ||
102 | " movel %0@+,%1@+\n" | ||
103 | " movel %0@+,%1@+\n" | ||
104 | " movel %0@+,%1@+\n" | ||
105 | " movel %0@+,%1@+\n" | ||
106 | " movel %0@+,%1@+\n" | ||
107 | " movel %0@+,%1@+\n" | ||
108 | "1: dbra %2,4b\n" | ||
109 | " clrw %2\n" | ||
110 | " subql #1,%2\n" | ||
111 | " jpl 4b" | ||
112 | : "=a" (lfrom), "=a" (lto), "=d" (temp), "=&d" (temp1) | ||
113 | : "0" (lfrom), "1" (lto), "2" (temp)); | ||
114 | to = lto; | ||
115 | from = lfrom; | ||
116 | } | ||
117 | if (n & 2) { | ||
118 | short *sto = to; | ||
119 | const short *sfrom = from; | ||
120 | *sto++ = *sfrom++; | ||
121 | to = sto; | ||
122 | from = sfrom; | ||
123 | } | ||
124 | if (n & 1) { | ||
125 | char *cto = to; | ||
126 | const char *cfrom = from; | ||
127 | *cto = *cfrom; | ||
128 | } | ||
129 | return xto; | ||
130 | } | ||
131 | EXPORT_SYMBOL(memcpy); | ||
132 | |||
133 | void *memmove(void *dest, const void *src, size_t n) | ||
134 | { | ||
135 | void *xdest = dest; | ||
136 | size_t temp; | ||
137 | |||
138 | if (!n) | ||
139 | return xdest; | ||
140 | |||
141 | if (dest < src) { | ||
142 | if ((long)dest & 1) { | ||
143 | char *cdest = dest; | ||
144 | const char *csrc = src; | ||
145 | *cdest++ = *csrc++; | ||
146 | dest = cdest; | ||
147 | src = csrc; | ||
148 | n--; | ||
149 | } | ||
150 | if (n > 2 && (long)dest & 2) { | ||
151 | short *sdest = dest; | ||
152 | const short *ssrc = src; | ||
153 | *sdest++ = *ssrc++; | ||
154 | dest = sdest; | ||
155 | src = ssrc; | ||
156 | n -= 2; | ||
157 | } | ||
158 | temp = n >> 2; | ||
159 | if (temp) { | ||
160 | long *ldest = dest; | ||
161 | const long *lsrc = src; | ||
162 | temp--; | ||
163 | do | ||
164 | *ldest++ = *lsrc++; | ||
165 | while (temp--); | ||
166 | dest = ldest; | ||
167 | src = lsrc; | ||
168 | } | ||
169 | if (n & 2) { | ||
170 | short *sdest = dest; | ||
171 | const short *ssrc = src; | ||
172 | *sdest++ = *ssrc++; | ||
173 | dest = sdest; | ||
174 | src = ssrc; | ||
175 | } | ||
176 | if (n & 1) { | ||
177 | char *cdest = dest; | ||
178 | const char *csrc = src; | ||
179 | *cdest = *csrc; | ||
180 | } | ||
181 | } else { | ||
182 | dest = (char *)dest + n; | ||
183 | src = (const char *)src + n; | ||
184 | if ((long)dest & 1) { | ||
185 | char *cdest = dest; | ||
186 | const char *csrc = src; | ||
187 | *--cdest = *--csrc; | ||
188 | dest = cdest; | ||
189 | src = csrc; | ||
190 | n--; | ||
191 | } | ||
192 | if (n > 2 && (long)dest & 2) { | ||
193 | short *sdest = dest; | ||
194 | const short *ssrc = src; | ||
195 | *--sdest = *--ssrc; | ||
196 | dest = sdest; | ||
197 | src = ssrc; | ||
198 | n -= 2; | ||
199 | } | ||
200 | temp = n >> 2; | ||
201 | if (temp) { | ||
202 | long *ldest = dest; | ||
203 | const long *lsrc = src; | ||
204 | temp--; | ||
205 | do | ||
206 | *--ldest = *--lsrc; | ||
207 | while (temp--); | ||
208 | dest = ldest; | ||
209 | src = lsrc; | ||
210 | } | ||
211 | if (n & 2) { | ||
212 | short *sdest = dest; | ||
213 | const short *ssrc = src; | ||
214 | *--sdest = *--ssrc; | ||
215 | dest = sdest; | ||
216 | src = ssrc; | ||
217 | } | ||
218 | if (n & 1) { | ||
219 | char *cdest = dest; | ||
220 | const char *csrc = src; | ||
221 | *--cdest = *--csrc; | ||
222 | } | ||
223 | } | ||
224 | return xdest; | ||
225 | } | ||
226 | EXPORT_SYMBOL(memmove); | ||
227 | |||
228 | int memcmp(const void *cs, const void *ct, size_t count) | ||
229 | { | ||
230 | const unsigned char *su1, *su2; | ||
231 | |||
232 | for (su1 = cs, su2 = ct; count > 0; ++su1, ++su2, count--) | ||
233 | if (*su1 != *su2) | ||
234 | return *su1 < *su2 ? -1 : +1; | ||
235 | return 0; | ||
236 | } | ||
237 | EXPORT_SYMBOL(memcmp); | ||
diff --git a/arch/m68k/mm/Makefile b/arch/m68k/mm/Makefile index 90f1c735c110..5eaa43c4cb3c 100644 --- a/arch/m68k/mm/Makefile +++ b/arch/m68k/mm/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the linux m68k-specific parts of the memory manager. | 2 | # Makefile for the linux m68k-specific parts of the memory manager. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := init.o fault.o hwtest.o | 5 | obj-y := cache.o init.o fault.o hwtest.o |
6 | 6 | ||
7 | obj-$(CONFIG_MMU_MOTOROLA) += kmap.o memory.o motorola.o | 7 | obj-$(CONFIG_MMU_MOTOROLA) += kmap.o memory.o motorola.o |
8 | obj-$(CONFIG_MMU_SUN3) += sun3kmap.o sun3mmu.o | 8 | obj-$(CONFIG_MMU_SUN3) += sun3kmap.o sun3mmu.o |
diff --git a/arch/m68k/mm/cache.c b/arch/m68k/mm/cache.c new file mode 100644 index 000000000000..5437fff5fe07 --- /dev/null +++ b/arch/m68k/mm/cache.c | |||
@@ -0,0 +1,118 @@ | |||
1 | /* | ||
2 | * linux/arch/m68k/mm/cache.c | ||
3 | * | ||
4 | * Instruction cache handling | ||
5 | * | ||
6 | * Copyright (C) 1995 Hamish Macdonald | ||
7 | */ | ||
8 | |||
9 | #include <linux/module.h> | ||
10 | #include <asm/pgalloc.h> | ||
11 | #include <asm/traps.h> | ||
12 | |||
13 | |||
14 | static unsigned long virt_to_phys_slow(unsigned long vaddr) | ||
15 | { | ||
16 | if (CPU_IS_060) { | ||
17 | unsigned long paddr; | ||
18 | |||
19 | /* The PLPAR instruction causes an access error if the translation | ||
20 | * is not possible. To catch this we use the same exception mechanism | ||
21 | * as for user space accesses in <asm/uaccess.h>. */ | ||
22 | asm volatile (".chip 68060\n" | ||
23 | "1: plpar (%0)\n" | ||
24 | ".chip 68k\n" | ||
25 | "2:\n" | ||
26 | ".section .fixup,\"ax\"\n" | ||
27 | " .even\n" | ||
28 | "3: sub.l %0,%0\n" | ||
29 | " jra 2b\n" | ||
30 | ".previous\n" | ||
31 | ".section __ex_table,\"a\"\n" | ||
32 | " .align 4\n" | ||
33 | " .long 1b,3b\n" | ||
34 | ".previous" | ||
35 | : "=a" (paddr) | ||
36 | : "0" (vaddr)); | ||
37 | return paddr; | ||
38 | } else if (CPU_IS_040) { | ||
39 | unsigned long mmusr; | ||
40 | |||
41 | asm volatile (".chip 68040\n\t" | ||
42 | "ptestr (%1)\n\t" | ||
43 | "movec %%mmusr, %0\n\t" | ||
44 | ".chip 68k" | ||
45 | : "=r" (mmusr) | ||
46 | : "a" (vaddr)); | ||
47 | |||
48 | if (mmusr & MMU_R_040) | ||
49 | return (mmusr & PAGE_MASK) | (vaddr & ~PAGE_MASK); | ||
50 | } else { | ||
51 | unsigned short mmusr; | ||
52 | unsigned long *descaddr; | ||
53 | |||
54 | asm volatile ("ptestr %3,%2@,#7,%0\n\t" | ||
55 | "pmove %%psr,%1@" | ||
56 | : "=a&" (descaddr) | ||
57 | : "a" (&mmusr), "a" (vaddr), "d" (get_fs().seg)); | ||
58 | if (mmusr & (MMU_I|MMU_B|MMU_L)) | ||
59 | return 0; | ||
60 | descaddr = phys_to_virt((unsigned long)descaddr); | ||
61 | switch (mmusr & MMU_NUM) { | ||
62 | case 1: | ||
63 | return (*descaddr & 0xfe000000) | (vaddr & 0x01ffffff); | ||
64 | case 2: | ||
65 | return (*descaddr & 0xfffc0000) | (vaddr & 0x0003ffff); | ||
66 | case 3: | ||
67 | return (*descaddr & PAGE_MASK) | (vaddr & ~PAGE_MASK); | ||
68 | } | ||
69 | } | ||
70 | return 0; | ||
71 | } | ||
72 | |||
73 | /* Push n pages at kernel virtual address and clear the icache */ | ||
74 | /* RZ: use cpush %bc instead of cpush %dc, cinv %ic */ | ||
75 | void flush_icache_range(unsigned long address, unsigned long endaddr) | ||
76 | { | ||
77 | |||
78 | if (CPU_IS_040_OR_060) { | ||
79 | address &= PAGE_MASK; | ||
80 | |||
81 | do { | ||
82 | asm volatile ("nop\n\t" | ||
83 | ".chip 68040\n\t" | ||
84 | "cpushp %%bc,(%0)\n\t" | ||
85 | ".chip 68k" | ||
86 | : : "a" (virt_to_phys_slow(address))); | ||
87 | address += PAGE_SIZE; | ||
88 | } while (address < endaddr); | ||
89 | } else { | ||
90 | unsigned long tmp; | ||
91 | asm volatile ("movec %%cacr,%0\n\t" | ||
92 | "orw %1,%0\n\t" | ||
93 | "movec %0,%%cacr" | ||
94 | : "=&d" (tmp) | ||
95 | : "di" (FLUSH_I)); | ||
96 | } | ||
97 | } | ||
98 | EXPORT_SYMBOL(flush_icache_range); | ||
99 | |||
100 | void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | ||
101 | unsigned long addr, int len) | ||
102 | { | ||
103 | if (CPU_IS_040_OR_060) { | ||
104 | asm volatile ("nop\n\t" | ||
105 | ".chip 68040\n\t" | ||
106 | "cpushp %%bc,(%0)\n\t" | ||
107 | ".chip 68k" | ||
108 | : : "a" (page_to_phys(page))); | ||
109 | } else { | ||
110 | unsigned long tmp; | ||
111 | asm volatile ("movec %%cacr,%0\n\t" | ||
112 | "orw %1,%0\n\t" | ||
113 | "movec %0,%%cacr" | ||
114 | : "=&d" (tmp) | ||
115 | : "di" (FLUSH_I)); | ||
116 | } | ||
117 | } | ||
118 | |||
diff --git a/arch/m68k/mm/memory.c b/arch/m68k/mm/memory.c index 1453a6013721..559942ce0e1e 100644 --- a/arch/m68k/mm/memory.c +++ b/arch/m68k/mm/memory.c | |||
@@ -354,110 +354,6 @@ void cache_push (unsigned long paddr, int len) | |||
354 | #endif | 354 | #endif |
355 | } | 355 | } |
356 | 356 | ||
357 | static unsigned long virt_to_phys_slow(unsigned long vaddr) | ||
358 | { | ||
359 | if (CPU_IS_060) { | ||
360 | mm_segment_t fs = get_fs(); | ||
361 | unsigned long paddr; | ||
362 | |||
363 | set_fs(get_ds()); | ||
364 | |||
365 | /* The PLPAR instruction causes an access error if the translation | ||
366 | * is not possible. To catch this we use the same exception mechanism | ||
367 | * as for user space accesses in <asm/uaccess.h>. */ | ||
368 | asm volatile (".chip 68060\n" | ||
369 | "1: plpar (%0)\n" | ||
370 | ".chip 68k\n" | ||
371 | "2:\n" | ||
372 | ".section .fixup,\"ax\"\n" | ||
373 | " .even\n" | ||
374 | "3: sub.l %0,%0\n" | ||
375 | " jra 2b\n" | ||
376 | ".previous\n" | ||
377 | ".section __ex_table,\"a\"\n" | ||
378 | " .align 4\n" | ||
379 | " .long 1b,3b\n" | ||
380 | ".previous" | ||
381 | : "=a" (paddr) | ||
382 | : "0" (vaddr)); | ||
383 | set_fs(fs); | ||
384 | return paddr; | ||
385 | } else if (CPU_IS_040) { | ||
386 | mm_segment_t fs = get_fs(); | ||
387 | unsigned long mmusr; | ||
388 | |||
389 | set_fs(get_ds()); | ||
390 | |||
391 | asm volatile (".chip 68040\n\t" | ||
392 | "ptestr (%1)\n\t" | ||
393 | "movec %%mmusr, %0\n\t" | ||
394 | ".chip 68k" | ||
395 | : "=r" (mmusr) | ||
396 | : "a" (vaddr)); | ||
397 | set_fs(fs); | ||
398 | |||
399 | if (mmusr & MMU_R_040) | ||
400 | return (mmusr & PAGE_MASK) | (vaddr & ~PAGE_MASK); | ||
401 | } else { | ||
402 | unsigned short mmusr; | ||
403 | unsigned long *descaddr; | ||
404 | |||
405 | asm volatile ("ptestr #5,%2@,#7,%0\n\t" | ||
406 | "pmove %%psr,%1@" | ||
407 | : "=a&" (descaddr) | ||
408 | : "a" (&mmusr), "a" (vaddr)); | ||
409 | if (mmusr & (MMU_I|MMU_B|MMU_L)) | ||
410 | return 0; | ||
411 | descaddr = phys_to_virt((unsigned long)descaddr); | ||
412 | switch (mmusr & MMU_NUM) { | ||
413 | case 1: | ||
414 | return (*descaddr & 0xfe000000) | (vaddr & 0x01ffffff); | ||
415 | case 2: | ||
416 | return (*descaddr & 0xfffc0000) | (vaddr & 0x0003ffff); | ||
417 | case 3: | ||
418 | return (*descaddr & PAGE_MASK) | (vaddr & ~PAGE_MASK); | ||
419 | } | ||
420 | } | ||
421 | return 0; | ||
422 | } | ||
423 | |||
424 | /* Push n pages at kernel virtual address and clear the icache */ | ||
425 | /* RZ: use cpush %bc instead of cpush %dc, cinv %ic */ | ||
426 | void flush_icache_range(unsigned long address, unsigned long endaddr) | ||
427 | { | ||
428 | if (CPU_IS_040_OR_060) { | ||
429 | address &= PAGE_MASK; | ||
430 | |||
431 | if (address >= PAGE_OFFSET && address < (unsigned long)high_memory) { | ||
432 | do { | ||
433 | asm volatile ("nop\n\t" | ||
434 | ".chip 68040\n\t" | ||
435 | "cpushp %%bc,(%0)\n\t" | ||
436 | ".chip 68k" | ||
437 | : : "a" (virt_to_phys((void *)address))); | ||
438 | address += PAGE_SIZE; | ||
439 | } while (address < endaddr); | ||
440 | } else { | ||
441 | do { | ||
442 | asm volatile ("nop\n\t" | ||
443 | ".chip 68040\n\t" | ||
444 | "cpushp %%bc,(%0)\n\t" | ||
445 | ".chip 68k" | ||
446 | : : "a" (virt_to_phys_slow(address))); | ||
447 | address += PAGE_SIZE; | ||
448 | } while (address < endaddr); | ||
449 | } | ||
450 | } else { | ||
451 | unsigned long tmp; | ||
452 | asm volatile ("movec %%cacr,%0\n\t" | ||
453 | "orw %1,%0\n\t" | ||
454 | "movec %0,%%cacr" | ||
455 | : "=&d" (tmp) | ||
456 | : "di" (FLUSH_I)); | ||
457 | } | ||
458 | } | ||
459 | |||
460 | |||
461 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK | 357 | #ifndef CONFIG_SINGLE_MEMORY_CHUNK |
462 | int mm_end_of_chunk (unsigned long addr, int len) | 358 | int mm_end_of_chunk (unsigned long addr, int len) |
463 | { | 359 | { |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 898de2df1fc7..d79fba0aa8bf 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -4,26 +4,46 @@ config MIPS | |||
4 | # Horrible source of confusion. Die, die, die ... | 4 | # Horrible source of confusion. Die, die, die ... |
5 | select EMBEDDED | 5 | select EMBEDDED |
6 | 6 | ||
7 | config MIPS64 | 7 | mainmenu "Linux/MIPS Kernel Configuration" |
8 | bool "64-bit kernel" | ||
9 | help | ||
10 | Select this option if you want to build a 64-bit kernel. You should | ||
11 | only select this option if you have hardware that actually has a | ||
12 | 64-bit processor and if your application will actually benefit from | ||
13 | 64-bit processing, otherwise say N. You must say Y for kernels for | ||
14 | SGI IP27 (Origin 200 and 2000) and SGI IP32 (O2). If in doubt say N. | ||
15 | 8 | ||
16 | config 64BIT | 9 | source "init/Kconfig" |
17 | def_bool MIPS64 | ||
18 | 10 | ||
19 | config MIPS32 | 11 | config SYS_SUPPORTS_32BIT_KERNEL |
12 | bool | ||
13 | config SYS_SUPPORTS_64BIT_KERNEL | ||
14 | bool | ||
15 | config CPU_SUPPORTS_32BIT_KERNEL | ||
16 | bool | ||
17 | config CPU_SUPPORTS_64BIT_KERNEL | ||
20 | bool | 18 | bool |
21 | depends on MIPS64 = 'n' | ||
22 | default y | ||
23 | 19 | ||
24 | mainmenu "Linux/MIPS Kernel Configuration" | 20 | menu "Kernel type" |
25 | 21 | ||
26 | source "init/Kconfig" | 22 | choice |
23 | |||
24 | prompt "Kernel code model" | ||
25 | help | ||
26 | You should only select this option if you have a workload that | ||
27 | actually benefits from 64-bit processing or if your machine has | ||
28 | large memory. You will only be presented a single option in this | ||
29 | menu if your system does not support both 32-bit and 64-bit kernels. | ||
30 | |||
31 | config 32BIT | ||
32 | bool "32-bit kernel" | ||
33 | depends on CPU_SUPPORTS_32BIT_KERNEL && SYS_SUPPORTS_32BIT_KERNEL | ||
34 | select TRAD_SIGNALS | ||
35 | help | ||
36 | Select this option if you want to build a 32-bit kernel. | ||
37 | |||
38 | config 64BIT | ||
39 | bool "64-bit kernel" | ||
40 | depends on CPU_SUPPORTS_64BIT_KERNEL && SYS_SUPPORTS_64BIT_KERNEL | ||
41 | help | ||
42 | Select this option if you want to build a 64-bit kernel. | ||
43 | |||
44 | endchoice | ||
45 | |||
46 | endmenu | ||
27 | 47 | ||
28 | menu "Machine selection" | 48 | menu "Machine selection" |
29 | 49 | ||
@@ -34,6 +54,8 @@ config MACH_JAZZ | |||
34 | select GENERIC_ISA_DMA | 54 | select GENERIC_ISA_DMA |
35 | select I8259 | 55 | select I8259 |
36 | select ISA | 56 | select ISA |
57 | select SYS_SUPPORTS_32BIT_KERNEL | ||
58 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
37 | help | 59 | help |
38 | This a family of machines based on the MIPS R4030 chipset which was | 60 | This a family of machines based on the MIPS R4030 chipset which was |
39 | used by several vendors to build RISC/os and Windows NT workstations. | 61 | used by several vendors to build RISC/os and Windows NT workstations. |
@@ -71,7 +93,9 @@ config OLIVETTI_M700 | |||
71 | <http://www.linux-mips.org/>. | 93 | <http://www.linux-mips.org/>. |
72 | 94 | ||
73 | config MACH_VR41XX | 95 | config MACH_VR41XX |
74 | bool "Support for NEC VR41XX-based machines" | 96 | bool "Support for NEC VR4100 series based machines" |
97 | select SYS_SUPPORTS_32BIT_KERNEL | ||
98 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
75 | 99 | ||
76 | config NEC_CMBVR4133 | 100 | config NEC_CMBVR4133 |
77 | bool "Support for NEC CMB-VR4133" | 101 | bool "Support for NEC CMB-VR4133" |
@@ -80,7 +104,6 @@ config NEC_CMBVR4133 | |||
80 | select DMA_NONCOHERENT | 104 | select DMA_NONCOHERENT |
81 | select IRQ_CPU | 105 | select IRQ_CPU |
82 | select HW_HAS_PCI | 106 | select HW_HAS_PCI |
83 | select PCI_VR41XX | ||
84 | 107 | ||
85 | config ROCKHOPPER | 108 | config ROCKHOPPER |
86 | bool "Support for Rockhopper baseboard" | 109 | bool "Support for Rockhopper baseboard" |
@@ -91,6 +114,7 @@ config ROCKHOPPER | |||
91 | config CASIO_E55 | 114 | config CASIO_E55 |
92 | bool "Support for CASIO CASSIOPEIA E-10/15/55/65" | 115 | bool "Support for CASIO CASSIOPEIA E-10/15/55/65" |
93 | depends on MACH_VR41XX | 116 | depends on MACH_VR41XX |
117 | select CPU_LITTLE_ENDIAN | ||
94 | select DMA_NONCOHERENT | 118 | select DMA_NONCOHERENT |
95 | select IRQ_CPU | 119 | select IRQ_CPU |
96 | select ISA | 120 | select ISA |
@@ -98,53 +122,54 @@ config CASIO_E55 | |||
98 | config IBM_WORKPAD | 122 | config IBM_WORKPAD |
99 | bool "Support for IBM WorkPad z50" | 123 | bool "Support for IBM WorkPad z50" |
100 | depends on MACH_VR41XX | 124 | depends on MACH_VR41XX |
125 | select CPU_LITTLE_ENDIAN | ||
101 | select DMA_NONCOHERENT | 126 | select DMA_NONCOHERENT |
102 | select IRQ_CPU | 127 | select IRQ_CPU |
103 | select ISA | 128 | select ISA |
104 | 129 | ||
105 | config TANBAC_TB0226 | 130 | config TANBAC_TB022X |
106 | bool "Support for TANBAC TB0226 (Mbase)" | 131 | bool "Support for TANBAC VR4131 multichip module and TANBAC VR4131DIMM" |
107 | depends on MACH_VR41XX | 132 | depends on MACH_VR41XX |
133 | select CPU_LITTLE_ENDIAN | ||
108 | select DMA_NONCOHERENT | 134 | select DMA_NONCOHERENT |
109 | select HW_HAS_PCI | ||
110 | select IRQ_CPU | 135 | select IRQ_CPU |
136 | select HW_HAS_PCI | ||
111 | help | 137 | help |
112 | The TANBAC TB0226 (Mbase) is a MIPS-based platform manufactured by TANBAC. | 138 | The TANBAC VR4131 multichip module(TB0225) and |
113 | Please refer to <http://www.tanbac.co.jp/> about Mbase. | 139 | the TANBAC VR4131DIMM(TB0229) are MIPS-based platforms |
140 | manufactured by TANBAC. | ||
141 | Please refer to <http://www.tanbac.co.jp/> | ||
142 | about VR4131 multichip module and VR4131DIMM. | ||
114 | 143 | ||
115 | config TANBAC_TB0229 | 144 | config TANBAC_TB0226 |
116 | bool "Support for TANBAC TB0229 (VR4131DIMM)" | 145 | bool "Support for TANBAC Mbase(TB0226)" |
117 | depends on MACH_VR41XX | 146 | depends on TANBAC_TB022X |
118 | select DMA_NONCOHERENT | 147 | select GPIO_VR41XX |
119 | select HW_HAS_PCI | ||
120 | select IRQ_CPU | ||
121 | help | 148 | help |
122 | The TANBAC TB0229 (VR4131DIMM) is a MIPS-based platform manufactured by TANBAC. | 149 | The TANBAC Mbase(TB0226) is a MIPS-based platform manufactured by TANBAC. |
123 | Please refer to <http://www.tanbac.co.jp/> about VR4131DIMM. | 150 | Please refer to <http://www.tanbac.co.jp/> about Mbase. |
124 | 151 | ||
125 | config VICTOR_MPC30X | 152 | config VICTOR_MPC30X |
126 | bool "Support for Victor MP-C303/304" | 153 | bool "Support for Victor MP-C303/304" |
154 | depends on MACH_VR41XX | ||
155 | select CPU_LITTLE_ENDIAN | ||
127 | select DMA_NONCOHERENT | 156 | select DMA_NONCOHERENT |
128 | select HW_HAS_PCI | ||
129 | select IRQ_CPU | 157 | select IRQ_CPU |
130 | depends on MACH_VR41XX | 158 | select HW_HAS_PCI |
131 | 159 | ||
132 | config ZAO_CAPCELLA | 160 | config ZAO_CAPCELLA |
133 | bool "Support for ZAO Networks Capcella" | 161 | bool "Support for ZAO Networks Capcella" |
134 | depends on MACH_VR41XX | 162 | depends on MACH_VR41XX |
163 | select CPU_LITTLE_ENDIAN | ||
135 | select DMA_NONCOHERENT | 164 | select DMA_NONCOHERENT |
136 | select HW_HAS_PCI | ||
137 | select IRQ_CPU | 165 | select IRQ_CPU |
166 | select HW_HAS_PCI | ||
138 | 167 | ||
139 | config PCI_VR41XX | 168 | config PCI_VR41XX |
140 | bool "Add PCI control unit support of NEC VR4100 series" | 169 | bool "Add PCI control unit support of NEC VR4100 series" |
141 | depends on MACH_VR41XX && PCI | 170 | depends on MACH_VR41XX && HW_HAS_PCI |
142 | 171 | default y | |
143 | config VRC4171 | 172 | select PCI |
144 | tristate "Add NEC VRC4171 companion chip support" | ||
145 | depends on MACH_VR41XX && ISA | ||
146 | ---help--- | ||
147 | The NEC VRC4171/4171A is a companion chip for NEC VR4111/VR4121. | ||
148 | 173 | ||
149 | config VRC4173 | 174 | config VRC4173 |
150 | tristate "Add NEC VRC4173 companion chip support" | 175 | tristate "Add NEC VRC4173 companion chip support" |
@@ -154,25 +179,28 @@ config VRC4173 | |||
154 | 179 | ||
155 | config TOSHIBA_JMR3927 | 180 | config TOSHIBA_JMR3927 |
156 | bool "Support for Toshiba JMR-TX3927 board" | 181 | bool "Support for Toshiba JMR-TX3927 board" |
157 | depends on MIPS32 | ||
158 | select DMA_NONCOHERENT | 182 | select DMA_NONCOHERENT |
159 | select HW_HAS_PCI | 183 | select HW_HAS_PCI |
160 | select SWAP_IO_SPACE | 184 | select SWAP_IO_SPACE |
185 | select SYS_SUPPORTS_32BIT_KERNEL | ||
161 | 186 | ||
162 | config MIPS_COBALT | 187 | config MIPS_COBALT |
163 | bool "Support for Cobalt Server (EXPERIMENTAL)" | 188 | bool "Support for Cobalt Server" |
164 | depends on EXPERIMENTAL | 189 | depends on EXPERIMENTAL |
165 | select DMA_NONCOHERENT | 190 | select DMA_NONCOHERENT |
166 | select HW_HAS_PCI | 191 | select HW_HAS_PCI |
167 | select I8259 | 192 | select I8259 |
168 | select IRQ_CPU | 193 | select IRQ_CPU |
194 | select SYS_SUPPORTS_32BIT_KERNEL | ||
195 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
169 | 196 | ||
170 | config MACH_DECSTATION | 197 | config MACH_DECSTATION |
171 | bool "Support for DECstations" | 198 | bool "Support for DECstations" |
172 | select BOOT_ELF32 | 199 | select BOOT_ELF32 |
173 | select DMA_NONCOHERENT | 200 | select DMA_NONCOHERENT |
174 | select IRQ_CPU | 201 | select IRQ_CPU |
175 | depends on MIPS32 || EXPERIMENTAL | 202 | select SYS_SUPPORTS_32BIT_KERNEL |
203 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
176 | ---help--- | 204 | ---help--- |
177 | This enables support for DEC's MIPS based workstations. For details | 205 | This enables support for DEC's MIPS based workstations. For details |
178 | see the Linux/MIPS FAQ on <http://www.linux-mips.org/> and the | 206 | see the Linux/MIPS FAQ on <http://www.linux-mips.org/> and the |
@@ -194,6 +222,8 @@ config MIPS_EV64120 | |||
194 | select DMA_NONCOHERENT | 222 | select DMA_NONCOHERENT |
195 | select HW_HAS_PCI | 223 | select HW_HAS_PCI |
196 | select MIPS_GT64120 | 224 | select MIPS_GT64120 |
225 | select SYS_SUPPORTS_32BIT_KERNEL | ||
226 | select SYS_SUPPORTS_64BIT_KERNEL | ||
197 | help | 227 | help |
198 | This is an evaluation board based on the Galileo GT-64120 | 228 | This is an evaluation board based on the Galileo GT-64120 |
199 | single-chip system controller that contains a MIPS R5000 compatible | 229 | single-chip system controller that contains a MIPS R5000 compatible |
@@ -214,6 +244,8 @@ config MIPS_EV96100 | |||
214 | select MIPS_GT96100 | 244 | select MIPS_GT96100 |
215 | select RM7000_CPU_SCACHE | 245 | select RM7000_CPU_SCACHE |
216 | select SWAP_IO_SPACE | 246 | select SWAP_IO_SPACE |
247 | select SYS_SUPPORTS_32BIT_KERNEL | ||
248 | select SYS_SUPPORTS_64BIT_KERNEL | ||
217 | help | 249 | help |
218 | This is an evaluation board based on the Galileo GT-96100 LAN/WAN | 250 | This is an evaluation board based on the Galileo GT-96100 LAN/WAN |
219 | communications controllers containing a MIPS R5000 compatible core | 251 | communications controllers containing a MIPS R5000 compatible core |
@@ -224,6 +256,8 @@ config MIPS_IVR | |||
224 | bool "Support for Globespan IVR board" | 256 | bool "Support for Globespan IVR board" |
225 | select DMA_NONCOHERENT | 257 | select DMA_NONCOHERENT |
226 | select HW_HAS_PCI | 258 | select HW_HAS_PCI |
259 | select SYS_SUPPORTS_32BIT_KERNEL | ||
260 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
227 | help | 261 | help |
228 | This is an evaluation board built by Globespan to showcase thir | 262 | This is an evaluation board built by Globespan to showcase thir |
229 | iVR (Internet Video Recorder) design. It utilizes a QED RM5231 | 263 | iVR (Internet Video Recorder) design. It utilizes a QED RM5231 |
@@ -237,6 +271,8 @@ config LASAT | |||
237 | select HW_HAS_PCI | 271 | select HW_HAS_PCI |
238 | select MIPS_GT64120 | 272 | select MIPS_GT64120 |
239 | select R5000_CPU_SCACHE | 273 | select R5000_CPU_SCACHE |
274 | select SYS_SUPPORTS_32BIT_KERNEL | ||
275 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
240 | 276 | ||
241 | config PICVUE | 277 | config PICVUE |
242 | tristate "PICVUE LCD display driver" | 278 | tristate "PICVUE LCD display driver" |
@@ -258,6 +294,8 @@ config MIPS_ITE8172 | |||
258 | bool "Support for ITE 8172G board" | 294 | bool "Support for ITE 8172G board" |
259 | select DMA_NONCOHERENT | 295 | select DMA_NONCOHERENT |
260 | select HW_HAS_PCI | 296 | select HW_HAS_PCI |
297 | select SYS_SUPPORTS_32BIT_KERNEL | ||
298 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
261 | help | 299 | help |
262 | Ths is an evaluation board made by ITE <http://www.ite.com.tw/> | 300 | Ths is an evaluation board made by ITE <http://www.ite.com.tw/> |
263 | with ATX form factor that utilizes a MIPS R5000 to work with its | 301 | with ATX form factor that utilizes a MIPS R5000 to work with its |
@@ -281,6 +319,8 @@ config MIPS_ATLAS | |||
281 | select HW_HAS_PCI | 319 | select HW_HAS_PCI |
282 | select MIPS_GT64120 | 320 | select MIPS_GT64120 |
283 | select SWAP_IO_SPACE | 321 | select SWAP_IO_SPACE |
322 | select SYS_SUPPORTS_32BIT_KERNEL | ||
323 | select SYS_SUPPORTS_64BIT_KERNEL | ||
284 | help | 324 | help |
285 | This enables support for the QED R5231-based MIPS Atlas evaluation | 325 | This enables support for the QED R5231-based MIPS Atlas evaluation |
286 | board. | 326 | board. |
@@ -295,6 +335,8 @@ config MIPS_MALTA | |||
295 | select I8259 | 335 | select I8259 |
296 | select MIPS_GT64120 | 336 | select MIPS_GT64120 |
297 | select SWAP_IO_SPACE | 337 | select SWAP_IO_SPACE |
338 | select SYS_SUPPORTS_32BIT_KERNEL | ||
339 | select SYS_SUPPORTS_64BIT_KERNEL | ||
298 | help | 340 | help |
299 | This enables support for the VR5000-based MIPS Malta evaluation | 341 | This enables support for the VR5000-based MIPS Malta evaluation |
300 | board. | 342 | board. |
@@ -304,6 +346,8 @@ config MIPS_SEAD | |||
304 | depends on EXPERIMENTAL | 346 | depends on EXPERIMENTAL |
305 | select IRQ_CPU | 347 | select IRQ_CPU |
306 | select DMA_NONCOHERENT | 348 | select DMA_NONCOHERENT |
349 | select SYS_SUPPORTS_32BIT_KERNEL | ||
350 | select SYS_SUPPORTS_64BIT_KERNEL | ||
307 | 351 | ||
308 | config MOMENCO_OCELOT | 352 | config MOMENCO_OCELOT |
309 | bool "Support for Momentum Ocelot board" | 353 | bool "Support for Momentum Ocelot board" |
@@ -314,6 +358,8 @@ config MOMENCO_OCELOT | |||
314 | select MIPS_GT64120 | 358 | select MIPS_GT64120 |
315 | select RM7000_CPU_SCACHE | 359 | select RM7000_CPU_SCACHE |
316 | select SWAP_IO_SPACE | 360 | select SWAP_IO_SPACE |
361 | select SYS_SUPPORTS_32BIT_KERNEL | ||
362 | select SYS_SUPPORTS_64BIT_KERNEL | ||
317 | help | 363 | help |
318 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by | 364 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by |
319 | Momentum Computer <http://www.momenco.com/>. | 365 | Momentum Computer <http://www.momenco.com/>. |
@@ -327,6 +373,8 @@ config MOMENCO_OCELOT_G | |||
327 | select PCI_MARVELL | 373 | select PCI_MARVELL |
328 | select RM7000_CPU_SCACHE | 374 | select RM7000_CPU_SCACHE |
329 | select SWAP_IO_SPACE | 375 | select SWAP_IO_SPACE |
376 | select SYS_SUPPORTS_32BIT_KERNEL | ||
377 | select SYS_SUPPORTS_64BIT_KERNEL | ||
330 | help | 378 | help |
331 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by | 379 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by |
332 | Momentum Computer <http://www.momenco.com/>. | 380 | Momentum Computer <http://www.momenco.com/>. |
@@ -340,6 +388,8 @@ config MOMENCO_OCELOT_C | |||
340 | select PCI_MARVELL | 388 | select PCI_MARVELL |
341 | select RM7000_CPU_SCACHE | 389 | select RM7000_CPU_SCACHE |
342 | select SWAP_IO_SPACE | 390 | select SWAP_IO_SPACE |
391 | select SYS_SUPPORTS_32BIT_KERNEL | ||
392 | select SYS_SUPPORTS_64BIT_KERNEL | ||
343 | help | 393 | help |
344 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by | 394 | The Ocelot is a MIPS-based Single Board Computer (SBC) made by |
345 | Momentum Computer <http://www.momenco.com/>. | 395 | Momentum Computer <http://www.momenco.com/>. |
@@ -355,6 +405,8 @@ config MOMENCO_OCELOT_3 | |||
355 | select PCI_MARVELL | 405 | select PCI_MARVELL |
356 | select RM7000_CPU_SCACHE | 406 | select RM7000_CPU_SCACHE |
357 | select SWAP_IO_SPACE | 407 | select SWAP_IO_SPACE |
408 | select SYS_SUPPORTS_32BIT_KERNEL | ||
409 | select SYS_SUPPORTS_64BIT_KERNEL | ||
358 | help | 410 | help |
359 | The Ocelot-3 is based off Discovery III System Controller and | 411 | The Ocelot-3 is based off Discovery III System Controller and |
360 | PMC-Sierra Rm79000 core. | 412 | PMC-Sierra Rm79000 core. |
@@ -371,6 +423,8 @@ config MOMENCO_JAGUAR_ATX | |||
371 | select PCI_MARVELL | 423 | select PCI_MARVELL |
372 | select RM7000_CPU_SCACHE | 424 | select RM7000_CPU_SCACHE |
373 | select SWAP_IO_SPACE | 425 | select SWAP_IO_SPACE |
426 | select SYS_SUPPORTS_32BIT_KERNEL | ||
427 | select SYS_SUPPORTS_64BIT_KERNEL | ||
374 | help | 428 | help |
375 | The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by | 429 | The Jaguar ATX is a MIPS-based Single Board Computer (SBC) made by |
376 | Momentum Computer <http://www.momenco.com/>. | 430 | Momentum Computer <http://www.momenco.com/>. |
@@ -390,6 +444,8 @@ config PMC_YOSEMITE | |||
390 | select IRQ_CPU_RM7K | 444 | select IRQ_CPU_RM7K |
391 | select IRQ_CPU_RM9K | 445 | select IRQ_CPU_RM9K |
392 | select SWAP_IO_SPACE | 446 | select SWAP_IO_SPACE |
447 | select SYS_SUPPORTS_32BIT_KERNEL | ||
448 | select SYS_SUPPORTS_64BIT_KERNEL | ||
393 | help | 449 | help |
394 | Yosemite is an evaluation board for the RM9000x2 processor | 450 | Yosemite is an evaluation board for the RM9000x2 processor |
395 | manufactured by PMC-Sierra | 451 | manufactured by PMC-Sierra |
@@ -407,6 +463,8 @@ config DDB5074 | |||
407 | select IRQ_CPU | 463 | select IRQ_CPU |
408 | select I8259 | 464 | select I8259 |
409 | select ISA | 465 | select ISA |
466 | select SYS_SUPPORTS_32BIT_KERNEL | ||
467 | select SYS_SUPPORTS_64BIT_KERNEL | ||
410 | help | 468 | help |
411 | This enables support for the VR5000-based NEC DDB Vrc-5074 | 469 | This enables support for the VR5000-based NEC DDB Vrc-5074 |
412 | evaluation board. | 470 | evaluation board. |
@@ -419,6 +477,8 @@ config DDB5476 | |||
419 | select IRQ_CPU | 477 | select IRQ_CPU |
420 | select I8259 | 478 | select I8259 |
421 | select ISA | 479 | select ISA |
480 | select SYS_SUPPORTS_32BIT_KERNEL | ||
481 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
422 | help | 482 | help |
423 | This enables support for the R5432-based NEC DDB Vrc-5476 | 483 | This enables support for the R5432-based NEC DDB Vrc-5476 |
424 | evaluation board. | 484 | evaluation board. |
@@ -433,6 +493,8 @@ config DDB5477 | |||
433 | select HW_HAS_PCI | 493 | select HW_HAS_PCI |
434 | select I8259 | 494 | select I8259 |
435 | select IRQ_CPU | 495 | select IRQ_CPU |
496 | select SYS_SUPPORTS_32BIT_KERNEL | ||
497 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
436 | help | 498 | help |
437 | This enables support for the R5432-based NEC DDB Vrc-5477, | 499 | This enables support for the R5432-based NEC DDB Vrc-5477, |
438 | or Rockhopper/SolutionGear boards with R5432/R5500 CPUs. | 500 | or Rockhopper/SolutionGear boards with R5432/R5500 CPUs. |
@@ -445,10 +507,23 @@ config DDB5477_BUS_FREQUENCY | |||
445 | depends on DDB5477 | 507 | depends on DDB5477 |
446 | default 0 | 508 | default 0 |
447 | 509 | ||
448 | config NEC_OSPREY | 510 | config QEMU |
449 | bool "Support for NEC Osprey board" | 511 | bool "Support for Qemu" |
450 | select DMA_NONCOHERENT | 512 | select DMA_COHERENT |
451 | select IRQ_CPU | 513 | select GENERIC_ISA_DMA |
514 | select HAVE_STD_PC_SERIAL_PORT | ||
515 | select I8259 | ||
516 | select ISA | ||
517 | select SWAP_IO_SPACE | ||
518 | select SYS_SUPPORTS_32BIT_KERNEL | ||
519 | select SYS_SUPPORTS_BIG_ENDIAN | ||
520 | help | ||
521 | Qemu is a software emulator which among other architectures also | ||
522 | can simulate a MIPS32 4Kc system. This patch adds support for the | ||
523 | system architecture that currently is being simulated by Qemu. It | ||
524 | will eventually be removed again when Qemu has the capability to | ||
525 | simulate actual MIPS hardware platforms. More information on Qemu | ||
526 | can be found at http://www.linux-mips.org/wiki/Qemu. | ||
452 | 527 | ||
453 | config SGI_IP22 | 528 | config SGI_IP22 |
454 | bool "Support for SGI IP22 (Indy/Indigo2)" | 529 | bool "Support for SGI IP22 (Indy/Indigo2)" |
@@ -459,6 +534,8 @@ config SGI_IP22 | |||
459 | select IP22_CPU_SCACHE | 534 | select IP22_CPU_SCACHE |
460 | select IRQ_CPU | 535 | select IRQ_CPU |
461 | select SWAP_IO_SPACE | 536 | select SWAP_IO_SPACE |
537 | select SYS_SUPPORTS_32BIT_KERNEL | ||
538 | select SYS_SUPPORTS_64BIT_KERNEL | ||
462 | help | 539 | help |
463 | This are the SGI Indy, Challenge S and Indigo2, as well as certain | 540 | This are the SGI Indy, Challenge S and Indigo2, as well as certain |
464 | OEM variants like the Tandem CMN B006S. To compile a Linux kernel | 541 | OEM variants like the Tandem CMN B006S. To compile a Linux kernel |
@@ -466,12 +543,12 @@ config SGI_IP22 | |||
466 | 543 | ||
467 | config SGI_IP27 | 544 | config SGI_IP27 |
468 | bool "Support for SGI IP27 (Origin200/2000)" | 545 | bool "Support for SGI IP27 (Origin200/2000)" |
469 | depends on MIPS64 | ||
470 | select ARC | 546 | select ARC |
471 | select ARC64 | 547 | select ARC64 |
472 | select DMA_IP27 | 548 | select DMA_IP27 |
473 | select HW_HAS_PCI | 549 | select HW_HAS_PCI |
474 | select PCI_DOMAINS | 550 | select PCI_DOMAINS |
551 | select SYS_SUPPORTS_64BIT_KERNEL | ||
475 | help | 552 | help |
476 | This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics | 553 | This are the SGI Origin 200, Origin 2000 and Onyx 2 Graphics |
477 | workstations. To compile a Linux kernel that runs on these, say Y | 554 | workstations. To compile a Linux kernel that runs on these, say Y |
@@ -534,7 +611,7 @@ config REPLICATE_EXHANDLERS | |||
534 | 611 | ||
535 | config SGI_IP32 | 612 | config SGI_IP32 |
536 | bool "Support for SGI IP32 (O2) (EXPERIMENTAL)" | 613 | bool "Support for SGI IP32 (O2) (EXPERIMENTAL)" |
537 | depends on MIPS64 && EXPERIMENTAL | 614 | depends on EXPERIMENTAL |
538 | select ARC | 615 | select ARC |
539 | select ARC32 | 616 | select ARC32 |
540 | select BOOT_ELF32 | 617 | select BOOT_ELF32 |
@@ -544,12 +621,13 @@ config SGI_IP32 | |||
544 | select HW_HAS_PCI | 621 | select HW_HAS_PCI |
545 | select R5000_CPU_SCACHE | 622 | select R5000_CPU_SCACHE |
546 | select RM7000_CPU_SCACHE | 623 | select RM7000_CPU_SCACHE |
624 | select SYS_SUPPORTS_64BIT_KERNEL | ||
547 | help | 625 | help |
548 | If you want this kernel to run on SGI O2 workstation, say Y here. | 626 | If you want this kernel to run on SGI O2 workstation, say Y here. |
549 | 627 | ||
550 | config SOC_AU1X00 | 628 | config SOC_AU1X00 |
551 | depends on MIPS32 | ||
552 | bool "Support for AMD/Alchemy Au1X00 SOCs" | 629 | bool "Support for AMD/Alchemy Au1X00 SOCs" |
630 | select SYS_SUPPORTS_32BIT_KERNEL | ||
553 | 631 | ||
554 | choice | 632 | choice |
555 | prompt "Au1X00 SOC Type" | 633 | prompt "Au1X00 SOC Type" |
@@ -661,6 +739,8 @@ config SIBYTE_SB1xxx_SOC | |||
661 | select BOOT_ELF32 | 739 | select BOOT_ELF32 |
662 | select DMA_COHERENT | 740 | select DMA_COHERENT |
663 | select SWAP_IO_SPACE | 741 | select SWAP_IO_SPACE |
742 | select SYS_SUPPORTS_32BIT_KERNEL | ||
743 | select SYS_SUPPORTS_64BIT_KERNEL | ||
664 | 744 | ||
665 | choice | 745 | choice |
666 | prompt "BCM1xxx SOC-based board" | 746 | prompt "BCM1xxx SOC-based board" |
@@ -880,6 +960,8 @@ config SNI_RM200_PCI | |||
880 | select HW_HAS_PCI | 960 | select HW_HAS_PCI |
881 | select I8259 | 961 | select I8259 |
882 | select ISA | 962 | select ISA |
963 | select SYS_SUPPORTS_32BIT_KERNEL | ||
964 | select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL | ||
883 | help | 965 | help |
884 | The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens | 966 | The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens |
885 | Nixdorf Informationssysteme (SNI), parent company of Pyramid | 967 | Nixdorf Informationssysteme (SNI), parent company of Pyramid |
@@ -888,13 +970,14 @@ config SNI_RM200_PCI | |||
888 | 970 | ||
889 | config TOSHIBA_RBTX4927 | 971 | config TOSHIBA_RBTX4927 |
890 | bool "Support for Toshiba TBTX49[23]7 board" | 972 | bool "Support for Toshiba TBTX49[23]7 board" |
891 | depends on MIPS32 | ||
892 | select DMA_NONCOHERENT | 973 | select DMA_NONCOHERENT |
893 | select HAS_TXX9_SERIAL | 974 | select HAS_TXX9_SERIAL |
894 | select HW_HAS_PCI | 975 | select HW_HAS_PCI |
895 | select I8259 | 976 | select I8259 |
896 | select ISA | 977 | select ISA |
897 | select SWAP_IO_SPACE | 978 | select SWAP_IO_SPACE |
979 | select SYS_SUPPORTS_32BIT_KERNEL | ||
980 | select SYS_SUPPORTS_64BIT_KERNEL | ||
898 | help | 981 | help |
899 | This Toshiba board is based on the TX4927 processor. Say Y here to | 982 | This Toshiba board is based on the TX4927 processor. Say Y here to |
900 | support this machine type | 983 | support this machine type |
@@ -926,13 +1009,21 @@ config ARC | |||
926 | depends on SNI_RM200_PCI || SGI_IP32 || SGI_IP27 || SGI_IP22 || MIPS_MAGNUM_4000 || OLIVETTI_M700 || ACER_PICA_61 | 1009 | depends on SNI_RM200_PCI || SGI_IP32 || SGI_IP27 || SGI_IP22 || MIPS_MAGNUM_4000 || OLIVETTI_M700 || ACER_PICA_61 |
927 | default y | 1010 | default y |
928 | 1011 | ||
929 | config DMA_COHERENT | 1012 | config DMA_COHERENT |
1013 | bool | ||
1014 | |||
1015 | config DMA_IP27 | ||
930 | bool | 1016 | bool |
931 | 1017 | ||
932 | config DMA_IP27 | 1018 | config DMA_IP32 |
933 | bool | 1019 | bool |
1020 | select DMA_NEED_PCI_MAP_STATE | ||
934 | 1021 | ||
935 | config DMA_NONCOHERENT | 1022 | config DMA_NONCOHERENT |
1023 | bool | ||
1024 | select DMA_NEED_PCI_MAP_STATE | ||
1025 | |||
1026 | config DMA_NEED_PCI_MAP_STATE | ||
936 | bool | 1027 | bool |
937 | 1028 | ||
938 | config EARLY_PRINTK | 1029 | config EARLY_PRINTK |
@@ -974,7 +1065,7 @@ config MIPS_DISABLE_OBSOLETE_IDE | |||
974 | 1065 | ||
975 | config CPU_LITTLE_ENDIAN | 1066 | config CPU_LITTLE_ENDIAN |
976 | bool "Generate little endian code" | 1067 | bool "Generate little endian code" |
977 | default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 || DDB5477 || MACH_DECSTATION || IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR || SOC_AU1X00 || NEC_OSPREY || OLIVETTI_M700 || SNI_RM200_PCI || VICTOR_MPC30X || ZAO_CAPCELLA | 1068 | default y if ACER_PICA_61 || CASIO_E55 || DDB5074 || DDB5476 || DDB5477 || MACH_DECSTATION || IBM_WORKPAD || LASAT || MIPS_COBALT || MIPS_ITE8172 || MIPS_IVR || SOC_AU1X00 || OLIVETTI_M700 || SNI_RM200_PCI || VICTOR_MPC30X || ZAO_CAPCELLA |
978 | default n if MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT || MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927 | 1069 | default n if MIPS_EV64120 || MIPS_EV96100 || MOMENCO_OCELOT || MOMENCO_OCELOT_G || SGI_IP22 || SGI_IP27 || SGI_IP32 || TOSHIBA_JMR3927 |
979 | help | 1070 | help |
980 | Some MIPS machines can be configured for either little or big endian | 1071 | Some MIPS machines can be configured for either little or big endian |
@@ -1091,11 +1182,6 @@ config ARC32 | |||
1091 | config HAVE_STD_PC_SERIAL_PORT | 1182 | config HAVE_STD_PC_SERIAL_PORT |
1092 | bool | 1183 | bool |
1093 | 1184 | ||
1094 | config VR4181 | ||
1095 | bool | ||
1096 | depends on NEC_OSPREY | ||
1097 | default y | ||
1098 | |||
1099 | config ARC_CONSOLE | 1185 | config ARC_CONSOLE |
1100 | bool "ARC console support" | 1186 | bool "ARC console support" |
1101 | depends on SGI_IP22 || SNI_RM200_PCI | 1187 | depends on SGI_IP22 || SNI_RM200_PCI |
@@ -1145,13 +1231,16 @@ choice | |||
1145 | 1231 | ||
1146 | config CPU_MIPS32 | 1232 | config CPU_MIPS32 |
1147 | bool "MIPS32" | 1233 | bool "MIPS32" |
1234 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1148 | 1235 | ||
1149 | config CPU_MIPS64 | 1236 | config CPU_MIPS64 |
1150 | bool "MIPS64" | 1237 | bool "MIPS64" |
1238 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1239 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1151 | 1240 | ||
1152 | config CPU_R3000 | 1241 | config CPU_R3000 |
1153 | bool "R3000" | 1242 | bool "R3000" |
1154 | depends on MIPS32 | 1243 | select CPU_SUPPORTS_32BIT_KERNEL |
1155 | help | 1244 | help |
1156 | Please make sure to pick the right CPU type. Linux/MIPS is not | 1245 | Please make sure to pick the right CPU type. Linux/MIPS is not |
1157 | designed to be generic, i.e. Kernels compiled for R3000 CPUs will | 1246 | designed to be generic, i.e. Kernels compiled for R3000 CPUs will |
@@ -1162,10 +1251,12 @@ config CPU_R3000 | |||
1162 | 1251 | ||
1163 | config CPU_TX39XX | 1252 | config CPU_TX39XX |
1164 | bool "R39XX" | 1253 | bool "R39XX" |
1165 | depends on MIPS32 | 1254 | select CPU_SUPPORTS_32BIT_KERNEL |
1166 | 1255 | ||
1167 | config CPU_VR41XX | 1256 | config CPU_VR41XX |
1168 | bool "R41xx" | 1257 | bool "R41xx" |
1258 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1259 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1169 | help | 1260 | help |
1170 | The options selects support for the NEC VR41xx series of processors. | 1261 | The options selects support for the NEC VR41xx series of processors. |
1171 | Only choose this option if you have one of these processors as a | 1262 | Only choose this option if you have one of these processors as a |
@@ -1174,20 +1265,28 @@ config CPU_VR41XX | |||
1174 | 1265 | ||
1175 | config CPU_R4300 | 1266 | config CPU_R4300 |
1176 | bool "R4300" | 1267 | bool "R4300" |
1268 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1269 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1177 | help | 1270 | help |
1178 | MIPS Technologies R4300-series processors. | 1271 | MIPS Technologies R4300-series processors. |
1179 | 1272 | ||
1180 | config CPU_R4X00 | 1273 | config CPU_R4X00 |
1181 | bool "R4x00" | 1274 | bool "R4x00" |
1275 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1276 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1182 | help | 1277 | help |
1183 | MIPS Technologies R4000-series processors other than 4300, including | 1278 | MIPS Technologies R4000-series processors other than 4300, including |
1184 | the R4000, R4400, R4600, and 4700. | 1279 | the R4000, R4400, R4600, and 4700. |
1185 | 1280 | ||
1186 | config CPU_TX49XX | 1281 | config CPU_TX49XX |
1187 | bool "R49XX" | 1282 | bool "R49XX" |
1283 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1284 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1188 | 1285 | ||
1189 | config CPU_R5000 | 1286 | config CPU_R5000 |
1190 | bool "R5000" | 1287 | bool "R5000" |
1288 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1289 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1191 | help | 1290 | help |
1192 | MIPS Technologies R5000-series processors other than the Nevada. | 1291 | MIPS Technologies R5000-series processors other than the Nevada. |
1193 | 1292 | ||
@@ -1196,36 +1295,48 @@ config CPU_R5432 | |||
1196 | 1295 | ||
1197 | config CPU_R6000 | 1296 | config CPU_R6000 |
1198 | bool "R6000" | 1297 | bool "R6000" |
1199 | depends on MIPS32 && EXPERIMENTAL | 1298 | depends on EXPERIMENTAL |
1299 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1200 | help | 1300 | help |
1201 | MIPS Technologies R6000 and R6000A series processors. Note these | 1301 | MIPS Technologies R6000 and R6000A series processors. Note these |
1202 | processors are extremly rare and the support for them is incomplete. | 1302 | processors are extremly rare and the support for them is incomplete. |
1203 | 1303 | ||
1204 | config CPU_NEVADA | 1304 | config CPU_NEVADA |
1205 | bool "RM52xx" | 1305 | bool "RM52xx" |
1306 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1307 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1206 | help | 1308 | help |
1207 | QED / PMC-Sierra RM52xx-series ("Nevada") processors. | 1309 | QED / PMC-Sierra RM52xx-series ("Nevada") processors. |
1208 | 1310 | ||
1209 | config CPU_R8000 | 1311 | config CPU_R8000 |
1210 | bool "R8000" | 1312 | bool "R8000" |
1211 | depends on MIPS64 && EXPERIMENTAL | 1313 | depends on EXPERIMENTAL |
1314 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1212 | help | 1315 | help |
1213 | MIPS Technologies R8000 processors. Note these processors are | 1316 | MIPS Technologies R8000 processors. Note these processors are |
1214 | uncommon and the support for them is incomplete. | 1317 | uncommon and the support for them is incomplete. |
1215 | 1318 | ||
1216 | config CPU_R10000 | 1319 | config CPU_R10000 |
1217 | bool "R10000" | 1320 | bool "R10000" |
1321 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1322 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1218 | help | 1323 | help |
1219 | MIPS Technologies R10000-series processors. | 1324 | MIPS Technologies R10000-series processors. |
1220 | 1325 | ||
1221 | config CPU_RM7000 | 1326 | config CPU_RM7000 |
1222 | bool "RM7000" | 1327 | bool "RM7000" |
1328 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1329 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1223 | 1330 | ||
1224 | config CPU_RM9000 | 1331 | config CPU_RM9000 |
1225 | bool "RM9000" | 1332 | bool "RM9000" |
1333 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1334 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1226 | 1335 | ||
1227 | config CPU_SB1 | 1336 | config CPU_SB1 |
1228 | bool "SB1" | 1337 | bool "SB1" |
1338 | select CPU_SUPPORTS_32BIT_KERNEL | ||
1339 | select CPU_SUPPORTS_64BIT_KERNEL | ||
1229 | 1340 | ||
1230 | endchoice | 1341 | endchoice |
1231 | 1342 | ||
@@ -1321,11 +1432,11 @@ config SB1_PASS_2_1_WORKAROUNDS | |||
1321 | 1432 | ||
1322 | config 64BIT_PHYS_ADDR | 1433 | config 64BIT_PHYS_ADDR |
1323 | bool "Support for 64-bit physical address space" | 1434 | bool "Support for 64-bit physical address space" |
1324 | depends on (CPU_R4X00 || CPU_R5000 || CPU_RM7000 || CPU_RM9000 || CPU_R10000 || CPU_SB1 || CPU_MIPS32 || CPU_MIPS64) && MIPS32 | 1435 | depends on (CPU_R4X00 || CPU_R5000 || CPU_RM7000 || CPU_RM9000 || CPU_R10000 || CPU_SB1 || CPU_MIPS32 || CPU_MIPS64) && 32BIT |
1325 | 1436 | ||
1326 | config CPU_ADVANCED | 1437 | config CPU_ADVANCED |
1327 | bool "Override CPU Options" | 1438 | bool "Override CPU Options" |
1328 | depends on MIPS32 | 1439 | depends on 32BIT |
1329 | help | 1440 | help |
1330 | Saying yes here allows you to select support for various features | 1441 | Saying yes here allows you to select support for various features |
1331 | your CPU may or may not have. Most people should say N here. | 1442 | your CPU may or may not have. Most people should say N here. |
@@ -1379,7 +1490,7 @@ config CPU_HAS_SYNC | |||
1379 | # | 1490 | # |
1380 | config HIGHMEM | 1491 | config HIGHMEM |
1381 | bool "High Memory Support" | 1492 | bool "High Memory Support" |
1382 | depends on MIPS32 && (CPU_R3000 || CPU_SB1 || CPU_R7000 || CPU_RM9000 || CPU_R10000) && !(MACH_DECSTATION || MOMENCO_JAGUAR_ATX) | 1493 | depends on 32BIT && (CPU_R3000 || CPU_SB1 || CPU_R7000 || CPU_RM9000 || CPU_R10000) && !(MACH_DECSTATION || MOMENCO_JAGUAR_ATX) |
1383 | 1494 | ||
1384 | config ARCH_FLATMEM_ENABLE | 1495 | config ARCH_FLATMEM_ENABLE |
1385 | def_bool y | 1496 | def_bool y |
@@ -1439,7 +1550,7 @@ config RTC_DS1742 | |||
1439 | 1550 | ||
1440 | config MIPS_INSANE_LARGE | 1551 | config MIPS_INSANE_LARGE |
1441 | bool "Support for large 64-bit configurations" | 1552 | bool "Support for large 64-bit configurations" |
1442 | depends on CPU_R10000 && MIPS64 | 1553 | depends on CPU_R10000 && 64BIT |
1443 | help | 1554 | help |
1444 | MIPS R10000 does support a 44 bit / 16TB address space as opposed to | 1555 | MIPS R10000 does support a 44 bit / 16TB address space as opposed to |
1445 | previous 64-bit processors which only supported 40 bit / 1TB. If you | 1556 | previous 64-bit processors which only supported 40 bit / 1TB. If you |
@@ -1540,11 +1651,11 @@ source "fs/Kconfig.binfmt" | |||
1540 | 1651 | ||
1541 | config TRAD_SIGNALS | 1652 | config TRAD_SIGNALS |
1542 | bool | 1653 | bool |
1543 | default y if MIPS32 | 1654 | default y if 32BIT |
1544 | 1655 | ||
1545 | config BUILD_ELF64 | 1656 | config BUILD_ELF64 |
1546 | bool "Use 64-bit ELF format for building" | 1657 | bool "Use 64-bit ELF format for building" |
1547 | depends on MIPS64 | 1658 | depends on 64BIT |
1548 | help | 1659 | help |
1549 | A 64-bit kernel is usually built using the 64-bit ELF binary object | 1660 | A 64-bit kernel is usually built using the 64-bit ELF binary object |
1550 | format as it's one that allows arbitrary 64-bit constructs. For | 1661 | format as it's one that allows arbitrary 64-bit constructs. For |
@@ -1559,11 +1670,11 @@ config BUILD_ELF64 | |||
1559 | 1670 | ||
1560 | config BINFMT_IRIX | 1671 | config BINFMT_IRIX |
1561 | bool "Include IRIX binary compatibility" | 1672 | bool "Include IRIX binary compatibility" |
1562 | depends on !CPU_LITTLE_ENDIAN && MIPS32 && BROKEN | 1673 | depends on !CPU_LITTLE_ENDIAN && 32BIT && BROKEN |
1563 | 1674 | ||
1564 | config MIPS32_COMPAT | 1675 | config MIPS32_COMPAT |
1565 | bool "Kernel support for Linux/MIPS 32-bit binary compatibility" | 1676 | bool "Kernel support for Linux/MIPS 32-bit binary compatibility" |
1566 | depends on MIPS64 | 1677 | depends on 64BIT |
1567 | help | 1678 | help |
1568 | Select this option if you want Linux/MIPS 32-bit binary | 1679 | Select this option if you want Linux/MIPS 32-bit binary |
1569 | compatibility. Since all software available for Linux/MIPS is | 1680 | compatibility. Since all software available for Linux/MIPS is |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index bc1c44274a58..d27b82595485 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -37,12 +37,12 @@ else | |||
37 | 64bit-emul = elf64btsmip | 37 | 64bit-emul = elf64btsmip |
38 | endif | 38 | endif |
39 | 39 | ||
40 | ifdef CONFIG_MIPS32 | 40 | ifdef CONFIG_32BIT |
41 | gcc-abi = 32 | 41 | gcc-abi = 32 |
42 | tool-prefix = $(32bit-tool-prefix) | 42 | tool-prefix = $(32bit-tool-prefix) |
43 | UTS_MACHINE := mips | 43 | UTS_MACHINE := mips |
44 | endif | 44 | endif |
45 | ifdef CONFIG_MIPS64 | 45 | ifdef CONFIG_64BIT |
46 | gcc-abi = 64 | 46 | gcc-abi = 64 |
47 | tool-prefix = $(64bit-tool-prefix) | 47 | tool-prefix = $(64bit-tool-prefix) |
48 | UTS_MACHINE := mips64 | 48 | UTS_MACHINE := mips64 |
@@ -63,7 +63,7 @@ ld-emul = $(32bit-emul) | |||
63 | vmlinux-32 = vmlinux | 63 | vmlinux-32 = vmlinux |
64 | vmlinux-64 = vmlinux.64 | 64 | vmlinux-64 = vmlinux.64 |
65 | 65 | ||
66 | cflags-$(CONFIG_MIPS64) += $(call cc-option,-mno-explicit-relocs) | 66 | cflags-$(CONFIG_64BIT) += $(call cc-option,-mno-explicit-relocs) |
67 | endif | 67 | endif |
68 | 68 | ||
69 | # | 69 | # |
@@ -177,7 +177,7 @@ cflags-$(CONFIG_CPU_MIPS64) += \ | |||
177 | 177 | ||
178 | cflags-$(CONFIG_CPU_R5000) += \ | 178 | cflags-$(CONFIG_CPU_R5000) += \ |
179 | $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \ | 179 | $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \ |
180 | -Wa,--trap | 180 | -Wa,--trap |
181 | 181 | ||
182 | cflags-$(CONFIG_CPU_R5432) += \ | 182 | cflags-$(CONFIG_CPU_R5432) += \ |
183 | $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \ | 183 | $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \ |
@@ -423,6 +423,12 @@ core-$(CONFIG_PMC_YOSEMITE) += arch/mips/pmc-sierra/yosemite/ | |||
423 | cflags-$(CONFIG_PMC_YOSEMITE) += -Iinclude/asm-mips/mach-yosemite | 423 | cflags-$(CONFIG_PMC_YOSEMITE) += -Iinclude/asm-mips/mach-yosemite |
424 | load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 | 424 | load-$(CONFIG_PMC_YOSEMITE) += 0xffffffff80100000 |
425 | 425 | ||
426 | # Qemu simulating MIPS32 4Kc | ||
427 | # | ||
428 | core-$(CONFIG_QEMU) += arch/mips/qemu/ | ||
429 | cflags-$(CONFIG_QEMU) += -Iinclude/asm-mips/mach-qemu | ||
430 | load-$(CONFIG_QEMU) += 0xffffffff80010000 | ||
431 | |||
426 | # | 432 | # |
427 | # Momentum Ocelot-3 | 433 | # Momentum Ocelot-3 |
428 | # | 434 | # |
@@ -469,13 +475,6 @@ cflags-$(CONFIG_LASAT) += -Iinclude/asm-mips/mach-lasat | |||
469 | load-$(CONFIG_LASAT) += 0xffffffff80000000 | 475 | load-$(CONFIG_LASAT) += 0xffffffff80000000 |
470 | 476 | ||
471 | # | 477 | # |
472 | # NEC Osprey (vr4181) board | ||
473 | # | ||
474 | core-$(CONFIG_NEC_OSPREY) += arch/mips/vr4181/common/ \ | ||
475 | arch/mips/vr4181/osprey/ | ||
476 | load-$(CONFIG_NEC_OSPREY) += 0xffffffff80002000 | ||
477 | |||
478 | # | ||
479 | # Common VR41xx | 478 | # Common VR41xx |
480 | # | 479 | # |
481 | core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/ | 480 | core-$(CONFIG_MACH_VR41XX) += arch/mips/vr41xx/common/ |
@@ -490,13 +489,11 @@ load-$(CONFIG_NEC_CMBVR4133) += 0xffffffff80100000 | |||
490 | # | 489 | # |
491 | # ZAO Networks Capcella (VR4131) | 490 | # ZAO Networks Capcella (VR4131) |
492 | # | 491 | # |
493 | core-$(CONFIG_ZAO_CAPCELLA) += arch/mips/vr41xx/zao-capcella/ | ||
494 | load-$(CONFIG_ZAO_CAPCELLA) += 0xffffffff80000000 | 492 | load-$(CONFIG_ZAO_CAPCELLA) += 0xffffffff80000000 |
495 | 493 | ||
496 | # | 494 | # |
497 | # Victor MP-C303/304 (VR4122) | 495 | # Victor MP-C303/304 (VR4122) |
498 | # | 496 | # |
499 | core-$(CONFIG_VICTOR_MPC30X) += arch/mips/vr41xx/victor-mpc30x/ | ||
500 | load-$(CONFIG_VICTOR_MPC30X) += 0xffffffff80001000 | 497 | load-$(CONFIG_VICTOR_MPC30X) += 0xffffffff80001000 |
501 | 498 | ||
502 | # | 499 | # |
@@ -512,16 +509,9 @@ core-$(CONFIG_CASIO_E55) += arch/mips/vr41xx/casio-e55/ | |||
512 | load-$(CONFIG_CASIO_E55) += 0xffffffff80004000 | 509 | load-$(CONFIG_CASIO_E55) += 0xffffffff80004000 |
513 | 510 | ||
514 | # | 511 | # |
515 | # TANBAC TB0226 Mbase (VR4131) | 512 | # TANBAC VR4131 multichip module(TB0225) and TANBAC VR4131DIMM(TB0229) (VR4131) |
516 | # | ||
517 | core-$(CONFIG_TANBAC_TB0226) += arch/mips/vr41xx/tanbac-tb0226/ | ||
518 | load-$(CONFIG_TANBAC_TB0226) += 0xffffffff80000000 | ||
519 | |||
520 | # | ||
521 | # TANBAC TB0229 VR4131DIMM (VR4131) | ||
522 | # | 513 | # |
523 | core-$(CONFIG_TANBAC_TB0229) += arch/mips/vr41xx/tanbac-tb0229/ | 514 | load-$(CONFIG_TANBAC_TB022X) += 0xffffffff80000000 |
524 | load-$(CONFIG_TANBAC_TB0229) += 0xffffffff80000000 | ||
525 | 515 | ||
526 | # | 516 | # |
527 | # SGI IP22 (Indy/Indigo2) | 517 | # SGI IP22 (Indy/Indigo2) |
@@ -534,10 +524,10 @@ load-$(CONFIG_TANBAC_TB0229) += 0xffffffff80000000 | |||
534 | # | 524 | # |
535 | core-$(CONFIG_SGI_IP22) += arch/mips/sgi-ip22/ | 525 | core-$(CONFIG_SGI_IP22) += arch/mips/sgi-ip22/ |
536 | cflags-$(CONFIG_SGI_IP22) += -Iinclude/asm-mips/mach-ip22 | 526 | cflags-$(CONFIG_SGI_IP22) += -Iinclude/asm-mips/mach-ip22 |
537 | ifdef CONFIG_MIPS32 | 527 | ifdef CONFIG_32BIT |
538 | load-$(CONFIG_SGI_IP22) += 0xffffffff88002000 | 528 | load-$(CONFIG_SGI_IP22) += 0xffffffff88002000 |
539 | endif | 529 | endif |
540 | ifdef CONFIG_MIPS64 | 530 | ifdef CONFIG_64BIT |
541 | load-$(CONFIG_SGI_IP22) += 0xffffffff88004000 | 531 | load-$(CONFIG_SGI_IP22) += 0xffffffff88004000 |
542 | endif | 532 | endif |
543 | 533 | ||
@@ -642,7 +632,7 @@ load-$(CONFIG_TOSHIBA_RBTX4927) += 0xffffffff80020000 | |||
642 | cflags-y += -Iinclude/asm-mips/mach-generic | 632 | cflags-y += -Iinclude/asm-mips/mach-generic |
643 | drivers-$(CONFIG_PCI) += arch/mips/pci/ | 633 | drivers-$(CONFIG_PCI) += arch/mips/pci/ |
644 | 634 | ||
645 | ifdef CONFIG_MIPS32 | 635 | ifdef CONFIG_32BIT |
646 | ifdef CONFIG_CPU_LITTLE_ENDIAN | 636 | ifdef CONFIG_CPU_LITTLE_ENDIAN |
647 | JIFFIES = jiffies_64 | 637 | JIFFIES = jiffies_64 |
648 | else | 638 | else |
@@ -674,8 +664,8 @@ CPPFLAGS_vmlinux.lds := \ | |||
674 | head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o | 664 | head-y := arch/mips/kernel/head.o arch/mips/kernel/init_task.o |
675 | 665 | ||
676 | libs-y += arch/mips/lib/ | 666 | libs-y += arch/mips/lib/ |
677 | libs-$(CONFIG_MIPS32) += arch/mips/lib-32/ | 667 | libs-$(CONFIG_32BIT) += arch/mips/lib-32/ |
678 | libs-$(CONFIG_MIPS64) += arch/mips/lib-64/ | 668 | libs-$(CONFIG_64BIT) += arch/mips/lib-64/ |
679 | 669 | ||
680 | core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/ | 670 | core-y += arch/mips/kernel/ arch/mips/mm/ arch/mips/math-emu/ |
681 | 671 | ||
@@ -730,7 +720,7 @@ archclean: | |||
730 | @$(MAKE) $(clean)=arch/mips/boot | 720 | @$(MAKE) $(clean)=arch/mips/boot |
731 | @$(MAKE) $(clean)=arch/mips/lasat | 721 | @$(MAKE) $(clean)=arch/mips/lasat |
732 | 722 | ||
733 | # Generate <asm/offset.h | 723 | # Generate <asm/offset.h |
734 | # | 724 | # |
735 | # The default rule is suffering from funny problems on MIPS so we using our | 725 | # The default rule is suffering from funny problems on MIPS so we using our |
736 | # own ... | 726 | # own ... |
diff --git a/arch/mips/au1000/common/pci.c b/arch/mips/au1000/common/pci.c index 533721eef6ae..4e5a6e1a9a6e 100644 --- a/arch/mips/au1000/common/pci.c +++ b/arch/mips/au1000/common/pci.c | |||
@@ -40,14 +40,14 @@ | |||
40 | 40 | ||
41 | /* TBD */ | 41 | /* TBD */ |
42 | static struct resource pci_io_resource = { | 42 | static struct resource pci_io_resource = { |
43 | "pci IO space", | 43 | "pci IO space", |
44 | (u32)PCI_IO_START, | 44 | (u32)PCI_IO_START, |
45 | (u32)PCI_IO_END, | 45 | (u32)PCI_IO_END, |
46 | IORESOURCE_IO | 46 | IORESOURCE_IO |
47 | }; | 47 | }; |
48 | 48 | ||
49 | static struct resource pci_mem_resource = { | 49 | static struct resource pci_mem_resource = { |
50 | "pci memory space", | 50 | "pci memory space", |
51 | (u32)PCI_MEM_START, | 51 | (u32)PCI_MEM_START, |
52 | (u32)PCI_MEM_END, | 52 | (u32)PCI_MEM_END, |
53 | IORESOURCE_MEM | 53 | IORESOURCE_MEM |
@@ -68,7 +68,7 @@ static unsigned long virt_io_addr; | |||
68 | static int __init au1x_pci_setup(void) | 68 | static int __init au1x_pci_setup(void) |
69 | { | 69 | { |
70 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) | 70 | #if defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550) |
71 | virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START, | 71 | virt_io_addr = (unsigned long)ioremap(Au1500_PCI_IO_START, |
72 | Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1); | 72 | Au1500_PCI_IO_END - Au1500_PCI_IO_START + 1); |
73 | 73 | ||
74 | if (!virt_io_addr) { | 74 | if (!virt_io_addr) { |
@@ -77,7 +77,7 @@ static int __init au1x_pci_setup(void) | |||
77 | } | 77 | } |
78 | 78 | ||
79 | #ifdef CONFIG_DMA_NONCOHERENT | 79 | #ifdef CONFIG_DMA_NONCOHERENT |
80 | /* | 80 | /* |
81 | * Set the NC bit in controller for Au1500 pre-AC silicon | 81 | * Set the NC bit in controller for Au1500 pre-AC silicon |
82 | */ | 82 | */ |
83 | u32 prid = read_c0_prid(); | 83 | u32 prid = read_c0_prid(); |
diff --git a/arch/mips/au1000/common/setup.c b/arch/mips/au1000/common/setup.c index dbc8b1bda963..eff89e109ce6 100644 --- a/arch/mips/au1000/common/setup.c +++ b/arch/mips/au1000/common/setup.c | |||
@@ -97,7 +97,7 @@ static int __init au1x00_setup(void) | |||
97 | argptr = prom_getcmdline(); | 97 | argptr = prom_getcmdline(); |
98 | strcat(argptr, " console=ttyS0,115200"); | 98 | strcat(argptr, " console=ttyS0,115200"); |
99 | } | 99 | } |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | #ifdef CONFIG_FB_AU1100 | 102 | #ifdef CONFIG_FB_AU1100 |
103 | if ((argptr = strstr(argptr, "video=")) == NULL) { | 103 | if ((argptr = strstr(argptr, "video=")) == NULL) { |
diff --git a/arch/mips/au1000/common/time.c b/arch/mips/au1000/common/time.c index fe418f1620c3..57675b41480e 100644 --- a/arch/mips/au1000/common/time.c +++ b/arch/mips/au1000/common/time.c | |||
@@ -281,7 +281,7 @@ unsigned long cal_r4koff(void) | |||
281 | cpu_speed = count * 2; | 281 | cpu_speed = count * 2; |
282 | } | 282 | } |
283 | #else | 283 | #else |
284 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * | 284 | cpu_speed = (au_readl(SYS_CPUPLL) & 0x0000003f) * |
285 | AU1000_SRC_CLK; | 285 | AU1000_SRC_CLK; |
286 | count = cpu_speed / 2; | 286 | count = cpu_speed / 2; |
287 | #endif | 287 | #endif |
@@ -356,7 +356,7 @@ static unsigned long do_fast_cp0_gettimeoffset(void) | |||
356 | : "hi", "lo", GCC_REG_ACCUM); | 356 | : "hi", "lo", GCC_REG_ACCUM); |
357 | 357 | ||
358 | /* | 358 | /* |
359 | * Due to possible jiffies inconsistencies, we need to check | 359 | * Due to possible jiffies inconsistencies, we need to check |
360 | * the result so that we'll get a timer that is monotonic. | 360 | * the result so that we'll get a timer that is monotonic. |
361 | */ | 361 | */ |
362 | if (res >= USECS_PER_JIFFY) | 362 | if (res >= USECS_PER_JIFFY) |
@@ -375,8 +375,8 @@ static unsigned long do_fast_pm_gettimeoffset(void) | |||
375 | au_sync(); | 375 | au_sync(); |
376 | offset = pc0 - last_pc0; | 376 | offset = pc0 - last_pc0; |
377 | if (offset > 2*MATCH20_INC) { | 377 | if (offset > 2*MATCH20_INC) { |
378 | printk("huge offset %x, last_pc0 %x last_match20 %x pc0 %x\n", | 378 | printk("huge offset %x, last_pc0 %x last_match20 %x pc0 %x\n", |
379 | (unsigned)offset, (unsigned)last_pc0, | 379 | (unsigned)offset, (unsigned)last_pc0, |
380 | (unsigned)last_match20, (unsigned)pc0); | 380 | (unsigned)last_match20, (unsigned)pc0); |
381 | } | 381 | } |
382 | offset = (unsigned long)((offset * 305) / 10); | 382 | offset = (unsigned long)((offset * 305) / 10); |
@@ -394,11 +394,11 @@ void au1xxx_timer_setup(struct irqaction *irq) | |||
394 | r4k_offset = cal_r4koff(); | 394 | r4k_offset = cal_r4koff(); |
395 | printk("%08lx(%d)\n", r4k_offset, (int) r4k_offset); | 395 | printk("%08lx(%d)\n", r4k_offset, (int) r4k_offset); |
396 | 396 | ||
397 | //est_freq = 2*r4k_offset*HZ; | 397 | //est_freq = 2*r4k_offset*HZ; |
398 | est_freq = r4k_offset*HZ; | 398 | est_freq = r4k_offset*HZ; |
399 | est_freq += 5000; /* round */ | 399 | est_freq += 5000; /* round */ |
400 | est_freq -= est_freq%10000; | 400 | est_freq -= est_freq%10000; |
401 | printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, | 401 | printk("CPU frequency %d.%02d MHz\n", est_freq/1000000, |
402 | (est_freq%1000000)*100/1000000); | 402 | (est_freq%1000000)*100/1000000); |
403 | set_au1x00_speed(est_freq); | 403 | set_au1x00_speed(est_freq); |
404 | set_au1x00_lcd_clock(); // program the LCD clock | 404 | set_au1x00_lcd_clock(); // program the LCD clock |
diff --git a/arch/mips/au1000/csb250/board_setup.c b/arch/mips/au1000/csb250/board_setup.c index 90426eaffb23..1c55c5f59d75 100644 --- a/arch/mips/au1000/csb250/board_setup.c +++ b/arch/mips/au1000/csb250/board_setup.c | |||
@@ -182,7 +182,7 @@ void __init board_setup(void) | |||
182 | au_writel(0xf0000000, Au1500_PCI_MWMASK_DEV); | 182 | au_writel(0xf0000000, Au1500_PCI_MWMASK_DEV); |
183 | au_writel(0, Au1500_PCI_MWBASE_REV_CCL); | 183 | au_writel(0, Au1500_PCI_MWBASE_REV_CCL); |
184 | au_writel(0x02a00356, Au1500_PCI_STATCMD); | 184 | au_writel(0x02a00356, Au1500_PCI_STATCMD); |
185 | au_writel(0x00003c04, Au1500_PCI_HDRTYPE); | 185 | au_writel(0x00003c04, Au1500_PCI_HDRTYPE); |
186 | au_writel(0x00000008, Au1500_PCI_MBAR); | 186 | au_writel(0x00000008, Au1500_PCI_MBAR); |
187 | au_sync(); | 187 | au_sync(); |
188 | 188 | ||
@@ -216,7 +216,7 @@ csb250_pci_idsel(unsigned int devsel, int assert) | |||
216 | unsigned int gpio2_pins; | 216 | unsigned int gpio2_pins; |
217 | 217 | ||
218 | retval = 1; | 218 | retval = 1; |
219 | 219 | ||
220 | /* First, disable both selects, then assert the one requested. | 220 | /* First, disable both selects, then assert the one requested. |
221 | */ | 221 | */ |
222 | au_writel(0xc000c000, GPIO2_OUTPUT); | 222 | au_writel(0xc000c000, GPIO2_OUTPUT); |
diff --git a/arch/mips/au1000/csb250/init.c b/arch/mips/au1000/csb250/init.c index 4320057fc439..bd99733abc0b 100644 --- a/arch/mips/au1000/csb250/init.c +++ b/arch/mips/au1000/csb250/init.c | |||
@@ -81,7 +81,7 @@ int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) | |||
81 | csb_env[0] = env1; | 81 | csb_env[0] = env1; |
82 | 82 | ||
83 | mips_machgroup = MACH_GROUP_ALCHEMY; | 83 | mips_machgroup = MACH_GROUP_ALCHEMY; |
84 | mips_machtype = MACH_CSB250; | 84 | mips_machtype = MACH_CSB250; |
85 | 85 | ||
86 | prom_init_cmdline(); | 86 | prom_init_cmdline(); |
87 | memsize_str = prom_getenv("memsize"); | 87 | memsize_str = prom_getenv("memsize"); |
diff --git a/arch/mips/au1000/db1x00/init.c b/arch/mips/au1000/db1x00/init.c index 51eee94a5e82..4b9d5e46edbb 100644 --- a/arch/mips/au1000/db1x00/init.c +++ b/arch/mips/au1000/db1x00/init.c | |||
@@ -61,7 +61,7 @@ void __init prom_init(void) | |||
61 | prom_envp = (char **) fw_arg2; | 61 | prom_envp = (char **) fw_arg2; |
62 | 62 | ||
63 | mips_machgroup = MACH_GROUP_ALCHEMY; | 63 | mips_machgroup = MACH_GROUP_ALCHEMY; |
64 | mips_machtype = MACH_DB1000; /* set the platform # */ | 64 | mips_machtype = MACH_DB1000; /* set the platform # */ |
65 | 65 | ||
66 | prom_init_cmdline(); | 66 | prom_init_cmdline(); |
67 | 67 | ||
diff --git a/arch/mips/au1000/hydrogen3/init.c b/arch/mips/au1000/hydrogen3/init.c index eee4adf98711..8cc9879dd582 100644 --- a/arch/mips/au1000/hydrogen3/init.c +++ b/arch/mips/au1000/hydrogen3/init.c | |||
@@ -63,7 +63,7 @@ int __init prom_init(int argc, char **argv, char **envp, int *prom_vec) | |||
63 | prom_envp = envp; | 63 | prom_envp = envp; |
64 | 64 | ||
65 | mips_machgroup = MACH_GROUP_ALCHEMY; | 65 | mips_machgroup = MACH_GROUP_ALCHEMY; |
66 | mips_machtype = MACH_DB1000; /* set the platform # */ | 66 | mips_machtype = MACH_DB1000; /* set the platform # */ |
67 | prom_init_cmdline(); | 67 | prom_init_cmdline(); |
68 | 68 | ||
69 | memsize_str = prom_getenv("memsize"); | 69 | memsize_str = prom_getenv("memsize"); |
diff --git a/arch/mips/au1000/pb1000/board_setup.c b/arch/mips/au1000/pb1000/board_setup.c index 2fa211b69329..0b4807dc9f44 100644 --- a/arch/mips/au1000/pb1000/board_setup.c +++ b/arch/mips/au1000/pb1000/board_setup.c | |||
@@ -174,7 +174,7 @@ void __init board_setup(void) | |||
174 | case 0x02: /* HB */ | 174 | case 0x02: /* HB */ |
175 | break; | 175 | break; |
176 | default: /* HC and newer */ | 176 | default: /* HC and newer */ |
177 | /* Enable sys bus clock divider when IDLE state or no bus | 177 | /* Enable sys bus clock divider when IDLE state or no bus |
178 | activity. */ | 178 | activity. */ |
179 | au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); | 179 | au_writel(au_readl(SYS_POWERCTRL) | (0x3 << 5), SYS_POWERCTRL); |
180 | break; | 180 | break; |
diff --git a/arch/mips/au1000/xxs1500/board_setup.c b/arch/mips/au1000/xxs1500/board_setup.c index 9dadc82536f4..1e59433dfd66 100644 --- a/arch/mips/au1000/xxs1500/board_setup.c +++ b/arch/mips/au1000/xxs1500/board_setup.c | |||
@@ -49,7 +49,7 @@ void board_reset (void) | |||
49 | void __init board_setup(void) | 49 | void __init board_setup(void) |
50 | { | 50 | { |
51 | u32 pin_func; | 51 | u32 pin_func; |
52 | 52 | ||
53 | // set multiple use pins (UART3/GPIO) to UART (it's used as UART too) | 53 | // set multiple use pins (UART3/GPIO) to UART (it's used as UART too) |
54 | pin_func = au_readl(SYS_PINFUNC) & (u32)(~SYS_PF_UR3); | 54 | pin_func = au_readl(SYS_PINFUNC) & (u32)(~SYS_PF_UR3); |
55 | pin_func |= SYS_PF_UR3; | 55 | pin_func |= SYS_PF_UR3; |
@@ -75,11 +75,11 @@ void __init board_setup(void) | |||
75 | au_writel(1, GPIO2_ENABLE); | 75 | au_writel(1, GPIO2_ENABLE); |
76 | /* gpio2 208/9/10/11 are inputs */ | 76 | /* gpio2 208/9/10/11 are inputs */ |
77 | au_writel((1<<8) | (1<<9) | (1<<10) | (1<<11), GPIO2_DIR); | 77 | au_writel((1<<8) | (1<<9) | (1<<10) | (1<<11), GPIO2_DIR); |
78 | 78 | ||
79 | /* turn off power */ | 79 | /* turn off power */ |
80 | au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<14))|(1<<30), GPIO2_OUTPUT); | 80 | au_writel((au_readl(GPIO2_PINSTATE) & ~(1<<14))|(1<<30), GPIO2_OUTPUT); |
81 | #endif | 81 | #endif |
82 | 82 | ||
83 | 83 | ||
84 | #ifdef CONFIG_PCI | 84 | #ifdef CONFIG_PCI |
85 | #if defined(__MIPSEB__) | 85 | #if defined(__MIPSEB__) |
diff --git a/arch/mips/au1000/xxs1500/init.c b/arch/mips/au1000/xxs1500/init.c index 03f755291b51..f1c76533b6fc 100644 --- a/arch/mips/au1000/xxs1500/init.c +++ b/arch/mips/au1000/xxs1500/init.c | |||
@@ -55,7 +55,7 @@ void __init prom_init(void) | |||
55 | prom_envp = (char **) fw_arg2; | 55 | prom_envp = (char **) fw_arg2; |
56 | 56 | ||
57 | mips_machgroup = MACH_GROUP_ALCHEMY; | 57 | mips_machgroup = MACH_GROUP_ALCHEMY; |
58 | mips_machtype = MACH_XXS1500; /* set the platform # */ | 58 | mips_machtype = MACH_XXS1500; /* set the platform # */ |
59 | 59 | ||
60 | prom_init_cmdline(); | 60 | prom_init_cmdline(); |
61 | 61 | ||
diff --git a/arch/mips/au1000/xxs1500/irqmap.c b/arch/mips/au1000/xxs1500/irqmap.c index 954800a0ab52..52f2f7daeb05 100644 --- a/arch/mips/au1000/xxs1500/irqmap.c +++ b/arch/mips/au1000/xxs1500/irqmap.c | |||
@@ -56,7 +56,7 @@ au1xxx_irq_map_t au1xxx_irq_map[] = { | |||
56 | { AU1500_GPIO_207, INTC_INT_LOW_LEVEL, 0 }, | 56 | { AU1500_GPIO_207, INTC_INT_LOW_LEVEL, 0 }, |
57 | 57 | ||
58 | { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, | 58 | { AU1000_GPIO_0, INTC_INT_LOW_LEVEL, 0 }, |
59 | { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, | 59 | { AU1000_GPIO_1, INTC_INT_LOW_LEVEL, 0 }, |
60 | { AU1000_GPIO_2, INTC_INT_LOW_LEVEL, 0 }, | 60 | { AU1000_GPIO_2, INTC_INT_LOW_LEVEL, 0 }, |
61 | { AU1000_GPIO_3, INTC_INT_LOW_LEVEL, 0 }, | 61 | { AU1000_GPIO_3, INTC_INT_LOW_LEVEL, 0 }, |
62 | { AU1000_GPIO_4, INTC_INT_LOW_LEVEL, 0 }, /* CF interrupt */ | 62 | { AU1000_GPIO_4, INTC_INT_LOW_LEVEL, 0 }, /* CF interrupt */ |
diff --git a/arch/mips/configs/atlas_defconfig b/arch/mips/configs/atlas_defconfig index caad7ca27abd..3120a02b8670 100644 --- a/arch/mips/configs/atlas_defconfig +++ b/arch/mips/configs/atlas_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:00 2005 | 4 | # Wed Jan 26 02:49:00 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -88,6 +88,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
88 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 88 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
89 | CONFIG_HAVE_DEC_LOCK=y | 89 | CONFIG_HAVE_DEC_LOCK=y |
90 | CONFIG_DMA_NONCOHERENT=y | 90 | CONFIG_DMA_NONCOHERENT=y |
91 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
91 | CONFIG_MIPS_BONITO64=y | 92 | CONFIG_MIPS_BONITO64=y |
92 | CONFIG_MIPS_MSC=y | 93 | CONFIG_MIPS_MSC=y |
93 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 94 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
diff --git a/arch/mips/configs/capcella_defconfig b/arch/mips/configs/capcella_defconfig index 1b7f8a702d06..158e7165f4e3 100644 --- a/arch/mips/configs/capcella_defconfig +++ b/arch/mips/configs/capcella_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:00 2005 | 4 | # Wed Jan 26 02:49:00 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -97,6 +97,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
97 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 97 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
98 | CONFIG_HAVE_DEC_LOCK=y | 98 | CONFIG_HAVE_DEC_LOCK=y |
99 | CONFIG_DMA_NONCOHERENT=y | 99 | CONFIG_DMA_NONCOHERENT=y |
100 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
100 | CONFIG_CPU_LITTLE_ENDIAN=y | 101 | CONFIG_CPU_LITTLE_ENDIAN=y |
101 | CONFIG_IRQ_CPU=y | 102 | CONFIG_IRQ_CPU=y |
102 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 103 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
diff --git a/arch/mips/configs/cobalt_defconfig b/arch/mips/configs/cobalt_defconfig index 8861854561e5..4302c6f914f5 100644 --- a/arch/mips/configs/cobalt_defconfig +++ b/arch/mips/configs/cobalt_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:00 2005 | 4 | # Wed Jan 26 02:49:00 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -82,6 +82,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
82 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 82 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
83 | CONFIG_HAVE_DEC_LOCK=y | 83 | CONFIG_HAVE_DEC_LOCK=y |
84 | CONFIG_DMA_NONCOHERENT=y | 84 | CONFIG_DMA_NONCOHERENT=y |
85 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
85 | CONFIG_I8259=y | 86 | CONFIG_I8259=y |
86 | CONFIG_CPU_LITTLE_ENDIAN=y | 87 | CONFIG_CPU_LITTLE_ENDIAN=y |
87 | CONFIG_IRQ_CPU=y | 88 | CONFIG_IRQ_CPU=y |
diff --git a/arch/mips/configs/db1000_defconfig b/arch/mips/configs/db1000_defconfig index 19cac1bf4f01..962fc14b58c2 100644 --- a/arch/mips/configs/db1000_defconfig +++ b/arch/mips/configs/db1000_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:01 2005 | 4 | # Wed Jan 26 02:49:01 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -104,6 +104,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
104 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 104 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
105 | CONFIG_HAVE_DEC_LOCK=y | 105 | CONFIG_HAVE_DEC_LOCK=y |
106 | CONFIG_DMA_NONCOHERENT=y | 106 | CONFIG_DMA_NONCOHERENT=y |
107 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
107 | CONFIG_CPU_LITTLE_ENDIAN=y | 108 | CONFIG_CPU_LITTLE_ENDIAN=y |
108 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 109 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
109 | 110 | ||
diff --git a/arch/mips/configs/db1100_defconfig b/arch/mips/configs/db1100_defconfig index 035ac95d197e..6a528d479d70 100644 --- a/arch/mips/configs/db1100_defconfig +++ b/arch/mips/configs/db1100_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:01 2005 | 4 | # Wed Jan 26 02:49:01 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -104,6 +104,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
104 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 104 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
105 | CONFIG_HAVE_DEC_LOCK=y | 105 | CONFIG_HAVE_DEC_LOCK=y |
106 | CONFIG_DMA_NONCOHERENT=y | 106 | CONFIG_DMA_NONCOHERENT=y |
107 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
107 | CONFIG_CPU_LITTLE_ENDIAN=y | 108 | CONFIG_CPU_LITTLE_ENDIAN=y |
108 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 109 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
109 | 110 | ||
diff --git a/arch/mips/configs/db1500_defconfig b/arch/mips/configs/db1500_defconfig index c38c4ed18fe7..fed6f2fab48b 100644 --- a/arch/mips/configs/db1500_defconfig +++ b/arch/mips/configs/db1500_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:01 2005 | 4 | # Wed Jan 26 02:49:01 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
diff --git a/arch/mips/configs/db1550_defconfig b/arch/mips/configs/db1550_defconfig index ee81309ae3a5..178c0ad1af75 100644 --- a/arch/mips/configs/db1550_defconfig +++ b/arch/mips/configs/db1550_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:02 2005 | 4 | # Wed Jan 26 02:49:02 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
diff --git a/arch/mips/configs/ddb5476_defconfig b/arch/mips/configs/ddb5476_defconfig index d43ed57c4b4e..70addc73f699 100644 --- a/arch/mips/configs/ddb5476_defconfig +++ b/arch/mips/configs/ddb5476_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:02 2005 | 4 | # Wed Jan 26 02:49:02 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -82,6 +82,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
82 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 82 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
83 | CONFIG_HAVE_DEC_LOCK=y | 83 | CONFIG_HAVE_DEC_LOCK=y |
84 | CONFIG_DMA_NONCOHERENT=y | 84 | CONFIG_DMA_NONCOHERENT=y |
85 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
85 | CONFIG_I8259=y | 86 | CONFIG_I8259=y |
86 | CONFIG_CPU_LITTLE_ENDIAN=y | 87 | CONFIG_CPU_LITTLE_ENDIAN=y |
87 | CONFIG_IRQ_CPU=y | 88 | CONFIG_IRQ_CPU=y |
diff --git a/arch/mips/configs/ddb5477_defconfig b/arch/mips/configs/ddb5477_defconfig index 5a032cdefd63..60292808b384 100644 --- a/arch/mips/configs/ddb5477_defconfig +++ b/arch/mips/configs/ddb5477_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:02 2005 | 4 | # Wed Jan 26 02:49:02 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -83,6 +83,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
83 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 83 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
84 | CONFIG_HAVE_DEC_LOCK=y | 84 | CONFIG_HAVE_DEC_LOCK=y |
85 | CONFIG_DMA_NONCOHERENT=y | 85 | CONFIG_DMA_NONCOHERENT=y |
86 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
86 | CONFIG_I8259=y | 87 | CONFIG_I8259=y |
87 | CONFIG_CPU_LITTLE_ENDIAN=y | 88 | CONFIG_CPU_LITTLE_ENDIAN=y |
88 | CONFIG_IRQ_CPU=y | 89 | CONFIG_IRQ_CPU=y |
diff --git a/arch/mips/configs/decstation_defconfig b/arch/mips/configs/decstation_defconfig index 32ada79da9d8..66ec1f41d122 100644 --- a/arch/mips/configs/decstation_defconfig +++ b/arch/mips/configs/decstation_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:03 2005 | 4 | # Wed Jan 26 02:49:03 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -88,6 +88,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
88 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 88 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
89 | CONFIG_HAVE_DEC_LOCK=y | 89 | CONFIG_HAVE_DEC_LOCK=y |
90 | CONFIG_DMA_NONCOHERENT=y | 90 | CONFIG_DMA_NONCOHERENT=y |
91 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
91 | CONFIG_EARLY_PRINTK=y | 92 | CONFIG_EARLY_PRINTK=y |
92 | CONFIG_CPU_LITTLE_ENDIAN=y | 93 | CONFIG_CPU_LITTLE_ENDIAN=y |
93 | CONFIG_IRQ_CPU=y | 94 | CONFIG_IRQ_CPU=y |
diff --git a/arch/mips/configs/e55_defconfig b/arch/mips/configs/e55_defconfig index 52074a2085fb..ba2ec01defb1 100644 --- a/arch/mips/configs/e55_defconfig +++ b/arch/mips/configs/e55_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:03 2005 | 4 | # Wed Jan 26 02:49:03 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -96,6 +96,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
96 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 96 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
97 | CONFIG_HAVE_DEC_LOCK=y | 97 | CONFIG_HAVE_DEC_LOCK=y |
98 | CONFIG_DMA_NONCOHERENT=y | 98 | CONFIG_DMA_NONCOHERENT=y |
99 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
99 | CONFIG_CPU_LITTLE_ENDIAN=y | 100 | CONFIG_CPU_LITTLE_ENDIAN=y |
100 | CONFIG_IRQ_CPU=y | 101 | CONFIG_IRQ_CPU=y |
101 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 102 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
diff --git a/arch/mips/configs/ev64120_defconfig b/arch/mips/configs/ev64120_defconfig index 360e842fd4be..17e87f70f602 100644 --- a/arch/mips/configs/ev64120_defconfig +++ b/arch/mips/configs/ev64120_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:03 2005 | 4 | # Wed Jan 26 02:49:03 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -89,6 +89,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
89 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 89 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
90 | CONFIG_HAVE_DEC_LOCK=y | 90 | CONFIG_HAVE_DEC_LOCK=y |
91 | CONFIG_DMA_NONCOHERENT=y | 91 | CONFIG_DMA_NONCOHERENT=y |
92 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
92 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 93 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
93 | CONFIG_MIPS_GT64120=y | 94 | CONFIG_MIPS_GT64120=y |
94 | # CONFIG_SYSCLK_75 is not set | 95 | # CONFIG_SYSCLK_75 is not set |
diff --git a/arch/mips/configs/ev96100_defconfig b/arch/mips/configs/ev96100_defconfig index 657a9508d31a..9da4140eae00 100644 --- a/arch/mips/configs/ev96100_defconfig +++ b/arch/mips/configs/ev96100_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:03 2005 | 4 | # Wed Jan 26 02:49:03 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -88,6 +88,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
88 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 88 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
89 | CONFIG_HAVE_DEC_LOCK=y | 89 | CONFIG_HAVE_DEC_LOCK=y |
90 | CONFIG_DMA_NONCOHERENT=y | 90 | CONFIG_DMA_NONCOHERENT=y |
91 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
91 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 92 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
92 | CONFIG_IRQ_CPU=y | 93 | CONFIG_IRQ_CPU=y |
93 | CONFIG_MIPS_GT64120=y | 94 | CONFIG_MIPS_GT64120=y |
diff --git a/arch/mips/configs/ip22_defconfig b/arch/mips/configs/ip22_defconfig index 3fb102e6a7f7..17fa5c4e3ad1 100644 --- a/arch/mips/configs/ip22_defconfig +++ b/arch/mips/configs/ip22_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:04 2005 | 4 | # Wed Jan 26 02:49:04 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -90,6 +90,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
90 | CONFIG_HAVE_DEC_LOCK=y | 90 | CONFIG_HAVE_DEC_LOCK=y |
91 | CONFIG_ARC=y | 91 | CONFIG_ARC=y |
92 | CONFIG_DMA_NONCOHERENT=y | 92 | CONFIG_DMA_NONCOHERENT=y |
93 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
93 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 94 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
94 | CONFIG_IRQ_CPU=y | 95 | CONFIG_IRQ_CPU=y |
95 | CONFIG_SWAP_IO_SPACE=y | 96 | CONFIG_SWAP_IO_SPACE=y |
diff --git a/arch/mips/configs/ip27_defconfig b/arch/mips/configs/ip27_defconfig index b5bab3a42fc4..b2a67da1e031 100644 --- a/arch/mips/configs/ip27_defconfig +++ b/arch/mips/configs/ip27_defconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | # Wed Jan 26 02:49:04 2005 | 4 | # Wed Jan 26 02:49:04 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | CONFIG_MIPS64=y | 7 | CONFIG_64BIT=y |
8 | CONFIG_64BIT=y | 8 | CONFIG_64BIT=y |
9 | 9 | ||
10 | # | 10 | # |
diff --git a/arch/mips/configs/ip32_defconfig b/arch/mips/configs/ip32_defconfig index bdf1415475ff..b26e1173365d 100644 --- a/arch/mips/configs/ip32_defconfig +++ b/arch/mips/configs/ip32_defconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | # Wed Jan 26 02:49:04 2005 | 4 | # Wed Jan 26 02:49:04 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | CONFIG_MIPS64=y | 7 | CONFIG_64BIT=y |
8 | CONFIG_64BIT=y | 8 | CONFIG_64BIT=y |
9 | 9 | ||
10 | # | 10 | # |
@@ -84,6 +84,7 @@ CONFIG_ARC=y | |||
84 | CONFIG_DMA_IP32=y | 84 | CONFIG_DMA_IP32=y |
85 | CONFIG_OWN_DMA=y | 85 | CONFIG_OWN_DMA=y |
86 | CONFIG_DMA_NONCOHERENT=y | 86 | CONFIG_DMA_NONCOHERENT=y |
87 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
87 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 88 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
88 | CONFIG_ARC32=y | 89 | CONFIG_ARC32=y |
89 | CONFIG_BOOT_ELF32=y | 90 | CONFIG_BOOT_ELF32=y |
diff --git a/arch/mips/configs/it8172_defconfig b/arch/mips/configs/it8172_defconfig index 1ca7746388f0..08bd3ad64761 100644 --- a/arch/mips/configs/it8172_defconfig +++ b/arch/mips/configs/it8172_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:05 2005 | 4 | # Wed Jan 26 02:49:05 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -90,6 +90,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
90 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 90 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
91 | CONFIG_HAVE_DEC_LOCK=y | 91 | CONFIG_HAVE_DEC_LOCK=y |
92 | CONFIG_DMA_NONCOHERENT=y | 92 | CONFIG_DMA_NONCOHERENT=y |
93 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
93 | CONFIG_CPU_LITTLE_ENDIAN=y | 94 | CONFIG_CPU_LITTLE_ENDIAN=y |
94 | CONFIG_ITE_BOARD_GEN=y | 95 | CONFIG_ITE_BOARD_GEN=y |
95 | CONFIG_IT8172_CIR=y | 96 | CONFIG_IT8172_CIR=y |
diff --git a/arch/mips/configs/ivr_defconfig b/arch/mips/configs/ivr_defconfig index c6eef708be1e..583ef5c5b1cd 100644 --- a/arch/mips/configs/ivr_defconfig +++ b/arch/mips/configs/ivr_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:05 2005 | 4 | # Wed Jan 26 02:49:05 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -89,6 +89,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
89 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 89 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
90 | CONFIG_HAVE_DEC_LOCK=y | 90 | CONFIG_HAVE_DEC_LOCK=y |
91 | CONFIG_DMA_NONCOHERENT=y | 91 | CONFIG_DMA_NONCOHERENT=y |
92 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
92 | CONFIG_CPU_LITTLE_ENDIAN=y | 93 | CONFIG_CPU_LITTLE_ENDIAN=y |
93 | CONFIG_ITE_BOARD_GEN=y | 94 | CONFIG_ITE_BOARD_GEN=y |
94 | CONFIG_IT8172_CIR=y | 95 | CONFIG_IT8172_CIR=y |
diff --git a/arch/mips/configs/jaguar-atx_defconfig b/arch/mips/configs/jaguar-atx_defconfig index 757c4e88cc00..8abb5a0c6c12 100644 --- a/arch/mips/configs/jaguar-atx_defconfig +++ b/arch/mips/configs/jaguar-atx_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:05 2005 | 4 | # Wed Jan 26 02:49:05 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -81,6 +81,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
81 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 81 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
82 | CONFIG_HAVE_DEC_LOCK=y | 82 | CONFIG_HAVE_DEC_LOCK=y |
83 | CONFIG_DMA_NONCOHERENT=y | 83 | CONFIG_DMA_NONCOHERENT=y |
84 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
84 | CONFIG_LIMITED_DMA=y | 85 | CONFIG_LIMITED_DMA=y |
85 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 86 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
86 | CONFIG_IRQ_CPU=y | 87 | CONFIG_IRQ_CPU=y |
diff --git a/arch/mips/configs/jmr3927_defconfig b/arch/mips/configs/jmr3927_defconfig index e5a613906554..da5d9ee2ecce 100644 --- a/arch/mips/configs/jmr3927_defconfig +++ b/arch/mips/configs/jmr3927_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:06 2005 | 4 | # Wed Jan 26 02:49:06 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -82,6 +82,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
82 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 82 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
83 | CONFIG_HAVE_DEC_LOCK=y | 83 | CONFIG_HAVE_DEC_LOCK=y |
84 | CONFIG_DMA_NONCOHERENT=y | 84 | CONFIG_DMA_NONCOHERENT=y |
85 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
85 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 86 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
86 | CONFIG_MIPS_TX3927=y | 87 | CONFIG_MIPS_TX3927=y |
87 | CONFIG_SWAP_IO_SPACE=y | 88 | CONFIG_SWAP_IO_SPACE=y |
diff --git a/arch/mips/configs/lasat200_defconfig b/arch/mips/configs/lasat200_defconfig index 1e7697834e90..8d600ae890f4 100644 --- a/arch/mips/configs/lasat200_defconfig +++ b/arch/mips/configs/lasat200_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:06 2005 | 4 | # Wed Jan 26 02:49:06 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -92,6 +92,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
92 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 92 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
93 | CONFIG_HAVE_DEC_LOCK=y | 93 | CONFIG_HAVE_DEC_LOCK=y |
94 | CONFIG_DMA_NONCOHERENT=y | 94 | CONFIG_DMA_NONCOHERENT=y |
95 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
95 | CONFIG_MIPS_NILE4=y | 96 | CONFIG_MIPS_NILE4=y |
96 | CONFIG_CPU_LITTLE_ENDIAN=y | 97 | CONFIG_CPU_LITTLE_ENDIAN=y |
97 | CONFIG_MIPS_GT64120=y | 98 | CONFIG_MIPS_GT64120=y |
diff --git a/arch/mips/configs/malta_defconfig b/arch/mips/configs/malta_defconfig index 61fb9fb97e6e..79519ac5af4a 100644 --- a/arch/mips/configs/malta_defconfig +++ b/arch/mips/configs/malta_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:53:14 2005 | 4 | # Wed Jan 26 02:53:14 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -88,6 +88,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
88 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 88 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
89 | CONFIG_HAVE_DEC_LOCK=y | 89 | CONFIG_HAVE_DEC_LOCK=y |
90 | CONFIG_DMA_NONCOHERENT=y | 90 | CONFIG_DMA_NONCOHERENT=y |
91 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
91 | CONFIG_GENERIC_ISA_DMA=y | 92 | CONFIG_GENERIC_ISA_DMA=y |
92 | CONFIG_I8259=y | 93 | CONFIG_I8259=y |
93 | CONFIG_MIPS_BONITO64=y | 94 | CONFIG_MIPS_BONITO64=y |
diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig index 31b8f2ad7338..0fea57ef18f2 100644 --- a/arch/mips/configs/mpc30x_defconfig +++ b/arch/mips/configs/mpc30x_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:07 2005 | 4 | # Wed Jan 26 02:49:07 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -97,6 +97,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
97 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 97 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
98 | CONFIG_HAVE_DEC_LOCK=y | 98 | CONFIG_HAVE_DEC_LOCK=y |
99 | CONFIG_DMA_NONCOHERENT=y | 99 | CONFIG_DMA_NONCOHERENT=y |
100 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
100 | CONFIG_CPU_LITTLE_ENDIAN=y | 101 | CONFIG_CPU_LITTLE_ENDIAN=y |
101 | CONFIG_IRQ_CPU=y | 102 | CONFIG_IRQ_CPU=y |
102 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 103 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
diff --git a/arch/mips/configs/ocelot_3_defconfig b/arch/mips/configs/ocelot_3_defconfig index 2cce682fffcf..b4cf97a732bc 100644 --- a/arch/mips/configs/ocelot_3_defconfig +++ b/arch/mips/configs/ocelot_3_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:07 2005 | 4 | # Wed Jan 26 02:49:07 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -89,6 +89,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
89 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 89 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
90 | CONFIG_HAVE_DEC_LOCK=y | 90 | CONFIG_HAVE_DEC_LOCK=y |
91 | CONFIG_DMA_NONCOHERENT=y | 91 | CONFIG_DMA_NONCOHERENT=y |
92 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
92 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 93 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
93 | CONFIG_IRQ_CPU=y | 94 | CONFIG_IRQ_CPU=y |
94 | CONFIG_IRQ_CPU_RM7K=y | 95 | CONFIG_IRQ_CPU_RM7K=y |
diff --git a/arch/mips/configs/ocelot_c_defconfig b/arch/mips/configs/ocelot_c_defconfig index 0cbf48a62e02..a38903db85a0 100644 --- a/arch/mips/configs/ocelot_c_defconfig +++ b/arch/mips/configs/ocelot_c_defconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | # Wed Jan 26 02:49:07 2005 | 4 | # Wed Jan 26 02:49:07 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | CONFIG_MIPS64=y | 7 | CONFIG_64BIT=y |
8 | CONFIG_64BIT=y | 8 | CONFIG_64BIT=y |
9 | 9 | ||
10 | # | 10 | # |
@@ -80,6 +80,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
80 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 80 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
81 | CONFIG_HAVE_DEC_LOCK=y | 81 | CONFIG_HAVE_DEC_LOCK=y |
82 | CONFIG_DMA_NONCOHERENT=y | 82 | CONFIG_DMA_NONCOHERENT=y |
83 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
83 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 84 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
84 | CONFIG_IRQ_CPU=y | 85 | CONFIG_IRQ_CPU=y |
85 | CONFIG_IRQ_MV64340=y | 86 | CONFIG_IRQ_MV64340=y |
diff --git a/arch/mips/configs/ocelot_defconfig b/arch/mips/configs/ocelot_defconfig index 4043950d360a..920d59b56a4e 100644 --- a/arch/mips/configs/ocelot_defconfig +++ b/arch/mips/configs/ocelot_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:08 2005 | 4 | # Wed Jan 26 02:49:08 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -82,6 +82,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
82 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 82 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
83 | CONFIG_HAVE_DEC_LOCK=y | 83 | CONFIG_HAVE_DEC_LOCK=y |
84 | CONFIG_DMA_NONCOHERENT=y | 84 | CONFIG_DMA_NONCOHERENT=y |
85 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
85 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 86 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
86 | CONFIG_IRQ_CPU=y | 87 | CONFIG_IRQ_CPU=y |
87 | CONFIG_IRQ_CPU_RM7K=y | 88 | CONFIG_IRQ_CPU_RM7K=y |
diff --git a/arch/mips/configs/ocelot_g_defconfig b/arch/mips/configs/ocelot_g_defconfig index 3870af4537ad..ef5ea50893d1 100644 --- a/arch/mips/configs/ocelot_g_defconfig +++ b/arch/mips/configs/ocelot_g_defconfig | |||
@@ -4,7 +4,7 @@ | |||
4 | # Wed Jan 26 02:49:08 2005 | 4 | # Wed Jan 26 02:49:08 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | CONFIG_MIPS64=y | 7 | CONFIG_64BIT=y |
8 | CONFIG_64BIT=y | 8 | CONFIG_64BIT=y |
9 | 9 | ||
10 | # | 10 | # |
@@ -80,6 +80,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
80 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 80 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
81 | CONFIG_HAVE_DEC_LOCK=y | 81 | CONFIG_HAVE_DEC_LOCK=y |
82 | CONFIG_DMA_NONCOHERENT=y | 82 | CONFIG_DMA_NONCOHERENT=y |
83 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
83 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 84 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
84 | CONFIG_IRQ_CPU=y | 85 | CONFIG_IRQ_CPU=y |
85 | CONFIG_IRQ_CPU_RM7K=y | 86 | CONFIG_IRQ_CPU_RM7K=y |
diff --git a/arch/mips/configs/pb1100_defconfig b/arch/mips/configs/pb1100_defconfig index 6cdabd550300..813e3a8b480b 100644 --- a/arch/mips/configs/pb1100_defconfig +++ b/arch/mips/configs/pb1100_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:08 2005 | 4 | # Wed Jan 26 02:49:08 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -104,6 +104,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
104 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 104 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
105 | CONFIG_HAVE_DEC_LOCK=y | 105 | CONFIG_HAVE_DEC_LOCK=y |
106 | CONFIG_DMA_NONCOHERENT=y | 106 | CONFIG_DMA_NONCOHERENT=y |
107 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
107 | CONFIG_CPU_LITTLE_ENDIAN=y | 108 | CONFIG_CPU_LITTLE_ENDIAN=y |
108 | CONFIG_SWAP_IO_SPACE=y | 109 | CONFIG_SWAP_IO_SPACE=y |
109 | # CONFIG_AU1X00_USB_DEVICE is not set | 110 | # CONFIG_AU1X00_USB_DEVICE is not set |
diff --git a/arch/mips/configs/pb1500_defconfig b/arch/mips/configs/pb1500_defconfig index 2aebbd2e82b3..49e528340a39 100644 --- a/arch/mips/configs/pb1500_defconfig +++ b/arch/mips/configs/pb1500_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:09 2005 | 4 | # Wed Jan 26 02:49:09 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
diff --git a/arch/mips/configs/pb1550_defconfig b/arch/mips/configs/pb1550_defconfig index 9e21edc28280..8e426776c098 100644 --- a/arch/mips/configs/pb1550_defconfig +++ b/arch/mips/configs/pb1550_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:09 2005 | 4 | # Wed Jan 26 02:49:09 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
diff --git a/arch/mips/configs/osprey_defconfig b/arch/mips/configs/qemu_defconfig index 989cb9e7ae83..b6568e421b99 100644 --- a/arch/mips/configs/osprey_defconfig +++ b/arch/mips/configs/qemu_defconfig | |||
@@ -1,108 +1,133 @@ | |||
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-rc2 | 3 | # Linux kernel version: 2.6.13-rc6 |
4 | # Wed Jan 26 02:49:08 2005 | 4 | # Mon Aug 8 11:49:54 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | ||
9 | CONFIG_MIPS32=y | ||
10 | 7 | ||
11 | # | 8 | # |
12 | # Code maturity level options | 9 | # Code maturity level options |
13 | # | 10 | # |
14 | CONFIG_EXPERIMENTAL=y | 11 | # CONFIG_EXPERIMENTAL is not set |
15 | CONFIG_CLEAN_COMPILE=y | 12 | CONFIG_CLEAN_COMPILE=y |
16 | CONFIG_BROKEN_ON_SMP=y | 13 | CONFIG_BROKEN_ON_SMP=y |
14 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
17 | 15 | ||
18 | # | 16 | # |
19 | # General setup | 17 | # General setup |
20 | # | 18 | # |
21 | CONFIG_LOCALVERSION="" | 19 | CONFIG_LOCALVERSION="" |
22 | CONFIG_SWAP=y | 20 | # CONFIG_SWAP is not set |
23 | CONFIG_SYSVIPC=y | 21 | # CONFIG_SYSVIPC is not set |
24 | # CONFIG_POSIX_MQUEUE is not set | ||
25 | # CONFIG_BSD_PROCESS_ACCT is not set | 22 | # CONFIG_BSD_PROCESS_ACCT is not set |
26 | CONFIG_SYSCTL=y | 23 | # CONFIG_SYSCTL is not set |
27 | # CONFIG_AUDIT is not set | 24 | # CONFIG_AUDIT is not set |
28 | CONFIG_LOG_BUF_SHIFT=14 | ||
29 | # CONFIG_HOTPLUG is not set | 25 | # CONFIG_HOTPLUG is not set |
30 | CONFIG_KOBJECT_UEVENT=y | 26 | CONFIG_KOBJECT_UEVENT=y |
31 | # CONFIG_IKCONFIG is not set | 27 | # CONFIG_IKCONFIG is not set |
32 | CONFIG_EMBEDDED=y | 28 | CONFIG_EMBEDDED=y |
33 | CONFIG_KALLSYMS=y | 29 | CONFIG_KALLSYMS=y |
34 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 30 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
35 | CONFIG_FUTEX=y | 31 | CONFIG_PRINTK=y |
36 | CONFIG_EPOLL=y | 32 | # CONFIG_BUG is not set |
33 | # CONFIG_BASE_FULL is not set | ||
34 | # CONFIG_FUTEX is not set | ||
35 | # CONFIG_EPOLL is not set | ||
37 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
38 | CONFIG_SHMEM=y | 37 | # CONFIG_SHMEM is not set |
39 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 38 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
40 | CONFIG_CC_ALIGN_LABELS=0 | 39 | CONFIG_CC_ALIGN_LABELS=0 |
41 | CONFIG_CC_ALIGN_LOOPS=0 | 40 | CONFIG_CC_ALIGN_LOOPS=0 |
42 | CONFIG_CC_ALIGN_JUMPS=0 | 41 | CONFIG_CC_ALIGN_JUMPS=0 |
43 | # CONFIG_TINY_SHMEM is not set | 42 | CONFIG_TINY_SHMEM=y |
43 | CONFIG_BASE_SMALL=1 | ||
44 | 44 | ||
45 | # | 45 | # |
46 | # Loadable module support | 46 | # Loadable module support |
47 | # | 47 | # |
48 | CONFIG_MODULES=y | 48 | # CONFIG_MODULES is not set |
49 | CONFIG_MODULE_UNLOAD=y | ||
50 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
51 | CONFIG_OBSOLETE_MODPARM=y | ||
52 | CONFIG_MODVERSIONS=y | ||
53 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
54 | CONFIG_KMOD=y | ||
55 | 49 | ||
56 | # | 50 | # |
57 | # Machine selection | 51 | # Machine selection |
58 | # | 52 | # |
59 | # CONFIG_MACH_JAZZ is not set | 53 | # CONFIG_MIPS_MTX1 is not set |
60 | # CONFIG_MACH_VR41XX is not set | 54 | # CONFIG_MIPS_BOSPORUS is not set |
61 | # CONFIG_TOSHIBA_JMR3927 is not set | 55 | # CONFIG_MIPS_PB1000 is not set |
56 | # CONFIG_MIPS_PB1100 is not set | ||
57 | # CONFIG_MIPS_PB1500 is not set | ||
58 | # CONFIG_MIPS_PB1550 is not set | ||
59 | # CONFIG_MIPS_PB1200 is not set | ||
60 | # CONFIG_MIPS_DB1000 is not set | ||
61 | # CONFIG_MIPS_DB1100 is not set | ||
62 | # CONFIG_MIPS_DB1500 is not set | ||
63 | # CONFIG_MIPS_DB1550 is not set | ||
64 | # CONFIG_MIPS_DB1200 is not set | ||
65 | # CONFIG_MIPS_MIRAGE is not set | ||
62 | # CONFIG_MIPS_COBALT is not set | 66 | # CONFIG_MIPS_COBALT is not set |
63 | # CONFIG_MACH_DECSTATION is not set | 67 | # CONFIG_MACH_DECSTATION is not set |
64 | # CONFIG_MIPS_EV64120 is not set | 68 | # CONFIG_MIPS_EV64120 is not set |
65 | # CONFIG_MIPS_EV96100 is not set | 69 | # CONFIG_MIPS_EV96100 is not set |
66 | # CONFIG_MIPS_IVR is not set | 70 | # CONFIG_MIPS_IVR is not set |
67 | # CONFIG_LASAT is not set | ||
68 | # CONFIG_MIPS_ITE8172 is not set | 71 | # CONFIG_MIPS_ITE8172 is not set |
72 | # CONFIG_MACH_JAZZ is not set | ||
73 | # CONFIG_LASAT is not set | ||
69 | # CONFIG_MIPS_ATLAS is not set | 74 | # CONFIG_MIPS_ATLAS is not set |
70 | # CONFIG_MIPS_MALTA is not set | 75 | # CONFIG_MIPS_MALTA is not set |
71 | # CONFIG_MIPS_SEAD is not set | 76 | # CONFIG_MIPS_SEAD is not set |
77 | # CONFIG_MOMENCO_JAGUAR_ATX is not set | ||
72 | # CONFIG_MOMENCO_OCELOT is not set | 78 | # CONFIG_MOMENCO_OCELOT is not set |
73 | # CONFIG_MOMENCO_OCELOT_G is not set | ||
74 | # CONFIG_MOMENCO_OCELOT_C is not set | ||
75 | # CONFIG_MOMENCO_OCELOT_3 is not set | 79 | # CONFIG_MOMENCO_OCELOT_3 is not set |
76 | # CONFIG_MOMENCO_JAGUAR_ATX is not set | 80 | # CONFIG_MOMENCO_OCELOT_C is not set |
77 | # CONFIG_PMC_YOSEMITE is not set | 81 | # CONFIG_MOMENCO_OCELOT_G is not set |
82 | # CONFIG_MIPS_XXS1500 is not set | ||
83 | # CONFIG_PNX8550_V2PCI is not set | ||
84 | # CONFIG_PNX8550_JBS is not set | ||
78 | # CONFIG_DDB5074 is not set | 85 | # CONFIG_DDB5074 is not set |
79 | # CONFIG_DDB5476 is not set | 86 | # CONFIG_DDB5476 is not set |
80 | # CONFIG_DDB5477 is not set | 87 | # CONFIG_DDB5477 is not set |
81 | CONFIG_NEC_OSPREY=y | 88 | # CONFIG_MACH_VR41XX is not set |
89 | # CONFIG_PMC_YOSEMITE is not set | ||
90 | CONFIG_QEMU=y | ||
82 | # CONFIG_SGI_IP22 is not set | 91 | # CONFIG_SGI_IP22 is not set |
83 | # CONFIG_SOC_AU1X00 is not set | 92 | # CONFIG_SGI_IP27 is not set |
84 | # CONFIG_SIBYTE_SB1xxx_SOC is not set | 93 | # CONFIG_SGI_IP32 is not set |
94 | # CONFIG_SIBYTE_SWARM is not set | ||
95 | # CONFIG_SIBYTE_SENTOSA is not set | ||
96 | # CONFIG_SIBYTE_RHONE is not set | ||
97 | # CONFIG_SIBYTE_CARMEL is not set | ||
98 | # CONFIG_SIBYTE_PTSWARM is not set | ||
99 | # CONFIG_SIBYTE_LITTLESUR is not set | ||
100 | # CONFIG_SIBYTE_CRHINE is not set | ||
101 | # CONFIG_SIBYTE_CRHONE is not set | ||
85 | # CONFIG_SNI_RM200_PCI is not set | 102 | # CONFIG_SNI_RM200_PCI is not set |
103 | # CONFIG_TOSHIBA_JMR3927 is not set | ||
86 | # CONFIG_TOSHIBA_RBTX4927 is not set | 104 | # CONFIG_TOSHIBA_RBTX4927 is not set |
105 | # CONFIG_TOSHIBA_RBTX4938 is not set | ||
87 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 106 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
88 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 107 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
89 | CONFIG_HAVE_DEC_LOCK=y | 108 | CONFIG_HAVE_DEC_LOCK=y |
90 | CONFIG_DMA_NONCOHERENT=y | 109 | CONFIG_DMA_COHERENT=y |
91 | CONFIG_CPU_LITTLE_ENDIAN=y | 110 | CONFIG_GENERIC_ISA_DMA=y |
92 | CONFIG_IRQ_CPU=y | 111 | CONFIG_I8259=y |
112 | CONFIG_CPU_BIG_ENDIAN=y | ||
113 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
114 | CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y | ||
115 | CONFIG_SWAP_IO_SPACE=y | ||
93 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 116 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
94 | CONFIG_VR4181=y | 117 | CONFIG_HAVE_STD_PC_SERIAL_PORT=y |
95 | 118 | ||
96 | # | 119 | # |
97 | # CPU selection | 120 | # CPU selection |
98 | # | 121 | # |
99 | # CONFIG_CPU_MIPS32 is not set | 122 | # CONFIG_CPU_MIPS32_R1 is not set |
100 | # CONFIG_CPU_MIPS64 is not set | 123 | # CONFIG_CPU_MIPS32_R2 is not set |
124 | # CONFIG_CPU_MIPS64_R1 is not set | ||
125 | # CONFIG_CPU_MIPS64_R2 is not set | ||
101 | # CONFIG_CPU_R3000 is not set | 126 | # CONFIG_CPU_R3000 is not set |
102 | # CONFIG_CPU_TX39XX is not set | 127 | # CONFIG_CPU_TX39XX is not set |
103 | CONFIG_CPU_VR41XX=y | 128 | # CONFIG_CPU_VR41XX is not set |
104 | # CONFIG_CPU_R4300 is not set | 129 | # CONFIG_CPU_R4300 is not set |
105 | # CONFIG_CPU_R4X00 is not set | 130 | CONFIG_CPU_R4X00=y |
106 | # CONFIG_CPU_TX49XX is not set | 131 | # CONFIG_CPU_TX49XX is not set |
107 | # CONFIG_CPU_R5000 is not set | 132 | # CONFIG_CPU_R5000 is not set |
108 | # CONFIG_CPU_R5432 is not set | 133 | # CONFIG_CPU_R5432 is not set |
@@ -113,17 +138,36 @@ CONFIG_CPU_VR41XX=y | |||
113 | # CONFIG_CPU_RM7000 is not set | 138 | # CONFIG_CPU_RM7000 is not set |
114 | # CONFIG_CPU_RM9000 is not set | 139 | # CONFIG_CPU_RM9000 is not set |
115 | # CONFIG_CPU_SB1 is not set | 140 | # CONFIG_CPU_SB1 is not set |
141 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y | ||
142 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y | ||
143 | CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y | ||
144 | |||
145 | # | ||
146 | # Kernel type | ||
147 | # | ||
148 | CONFIG_32BIT=y | ||
149 | # CONFIG_64BIT is not set | ||
116 | CONFIG_PAGE_SIZE_4KB=y | 150 | CONFIG_PAGE_SIZE_4KB=y |
117 | # CONFIG_PAGE_SIZE_8KB is not set | 151 | # CONFIG_PAGE_SIZE_8KB is not set |
118 | # CONFIG_PAGE_SIZE_16KB is not set | 152 | # CONFIG_PAGE_SIZE_16KB is not set |
119 | # CONFIG_PAGE_SIZE_64KB is not set | 153 | # CONFIG_PAGE_SIZE_64KB is not set |
154 | # CONFIG_MIPS_MT is not set | ||
155 | # CONFIG_64BIT_PHYS_ADDR is not set | ||
120 | # CONFIG_CPU_ADVANCED is not set | 156 | # CONFIG_CPU_ADVANCED is not set |
157 | CONFIG_CPU_HAS_LLSC=y | ||
158 | CONFIG_CPU_HAS_LLDSCD=y | ||
121 | CONFIG_CPU_HAS_SYNC=y | 159 | CONFIG_CPU_HAS_SYNC=y |
160 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
161 | CONFIG_FLATMEM=y | ||
162 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
163 | CONFIG_PREEMPT_NONE=y | ||
164 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
122 | # CONFIG_PREEMPT is not set | 165 | # CONFIG_PREEMPT is not set |
123 | 166 | ||
124 | # | 167 | # |
125 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | 168 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) |
126 | # | 169 | # |
170 | CONFIG_ISA=y | ||
127 | CONFIG_MMU=y | 171 | CONFIG_MMU=y |
128 | 172 | ||
129 | # | 173 | # |
@@ -132,10 +176,6 @@ CONFIG_MMU=y | |||
132 | # CONFIG_PCCARD is not set | 176 | # CONFIG_PCCARD is not set |
133 | 177 | ||
134 | # | 178 | # |
135 | # PC-card bridges | ||
136 | # | ||
137 | |||
138 | # | ||
139 | # PCI Hotplug Support | 179 | # PCI Hotplug Support |
140 | # | 180 | # |
141 | 181 | ||
@@ -147,6 +187,56 @@ CONFIG_BINFMT_ELF=y | |||
147 | CONFIG_TRAD_SIGNALS=y | 187 | CONFIG_TRAD_SIGNALS=y |
148 | 188 | ||
149 | # | 189 | # |
190 | # Networking | ||
191 | # | ||
192 | CONFIG_NET=y | ||
193 | |||
194 | # | ||
195 | # Networking options | ||
196 | # | ||
197 | CONFIG_PACKET=y | ||
198 | CONFIG_PACKET_MMAP=y | ||
199 | CONFIG_UNIX=y | ||
200 | # CONFIG_NET_KEY is not set | ||
201 | CONFIG_INET=y | ||
202 | CONFIG_IP_MULTICAST=y | ||
203 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
204 | CONFIG_IP_FIB_HASH=y | ||
205 | CONFIG_IP_PNP=y | ||
206 | CONFIG_IP_PNP_DHCP=y | ||
207 | CONFIG_IP_PNP_BOOTP=y | ||
208 | # CONFIG_IP_PNP_RARP is not set | ||
209 | # CONFIG_NET_IPIP is not set | ||
210 | # CONFIG_NET_IPGRE is not set | ||
211 | # CONFIG_IP_MROUTE is not set | ||
212 | # CONFIG_SYN_COOKIES is not set | ||
213 | # CONFIG_INET_AH is not set | ||
214 | # CONFIG_INET_ESP is not set | ||
215 | # CONFIG_INET_IPCOMP is not set | ||
216 | # CONFIG_INET_TUNNEL is not set | ||
217 | CONFIG_IP_TCPDIAG=y | ||
218 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
219 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
220 | CONFIG_TCP_CONG_BIC=y | ||
221 | # CONFIG_IPV6 is not set | ||
222 | # CONFIG_NETFILTER is not set | ||
223 | # CONFIG_BRIDGE is not set | ||
224 | # CONFIG_VLAN_8021Q is not set | ||
225 | # CONFIG_DECNET is not set | ||
226 | # CONFIG_LLC2 is not set | ||
227 | # CONFIG_IPX is not set | ||
228 | # CONFIG_ATALK is not set | ||
229 | # CONFIG_NET_SCHED is not set | ||
230 | # CONFIG_NET_CLS_ROUTE is not set | ||
231 | |||
232 | # | ||
233 | # Network testing | ||
234 | # | ||
235 | # CONFIG_HAMRADIO is not set | ||
236 | # CONFIG_IRDA is not set | ||
237 | # CONFIG_BT is not set | ||
238 | |||
239 | # | ||
150 | # Device Drivers | 240 | # Device Drivers |
151 | # | 241 | # |
152 | 242 | ||
@@ -154,7 +244,7 @@ CONFIG_TRAD_SIGNALS=y | |||
154 | # Generic Driver Options | 244 | # Generic Driver Options |
155 | # | 245 | # |
156 | CONFIG_STANDALONE=y | 246 | CONFIG_STANDALONE=y |
157 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 247 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
158 | # CONFIG_FW_LOADER is not set | 248 | # CONFIG_FW_LOADER is not set |
159 | 249 | ||
160 | # | 250 | # |
@@ -170,6 +260,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
170 | # | 260 | # |
171 | # Plug and Play support | 261 | # Plug and Play support |
172 | # | 262 | # |
263 | # CONFIG_PNP is not set | ||
173 | 264 | ||
174 | # | 265 | # |
175 | # Block devices | 266 | # Block devices |
@@ -181,19 +272,16 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
181 | # CONFIG_BLK_DEV_RAM is not set | 272 | # CONFIG_BLK_DEV_RAM is not set |
182 | CONFIG_BLK_DEV_RAM_COUNT=16 | 273 | CONFIG_BLK_DEV_RAM_COUNT=16 |
183 | CONFIG_INITRAMFS_SOURCE="" | 274 | CONFIG_INITRAMFS_SOURCE="" |
184 | # CONFIG_LBD is not set | 275 | # CONFIG_CDROM_PKTCDVD is not set |
185 | CONFIG_CDROM_PKTCDVD=m | ||
186 | CONFIG_CDROM_PKTCDVD_BUFFERS=8 | ||
187 | # CONFIG_CDROM_PKTCDVD_WCACHE is not set | ||
188 | 276 | ||
189 | # | 277 | # |
190 | # IO Schedulers | 278 | # IO Schedulers |
191 | # | 279 | # |
192 | CONFIG_IOSCHED_NOOP=y | 280 | CONFIG_IOSCHED_NOOP=y |
193 | CONFIG_IOSCHED_AS=y | 281 | # CONFIG_IOSCHED_AS is not set |
194 | CONFIG_IOSCHED_DEADLINE=y | 282 | # CONFIG_IOSCHED_DEADLINE is not set |
195 | CONFIG_IOSCHED_CFQ=y | 283 | # CONFIG_IOSCHED_CFQ is not set |
196 | CONFIG_ATA_OVER_ETH=m | 284 | # CONFIG_ATA_OVER_ETH is not set |
197 | 285 | ||
198 | # | 286 | # |
199 | # ATA/ATAPI/MFM/RLL support | 287 | # ATA/ATAPI/MFM/RLL support |
@@ -206,6 +294,11 @@ CONFIG_ATA_OVER_ETH=m | |||
206 | # CONFIG_SCSI is not set | 294 | # CONFIG_SCSI is not set |
207 | 295 | ||
208 | # | 296 | # |
297 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
298 | # | ||
299 | # CONFIG_CD_NO_IDESCSI is not set | ||
300 | |||
301 | # | ||
209 | # Multi-device support (RAID and LVM) | 302 | # Multi-device support (RAID and LVM) |
210 | # | 303 | # |
211 | # CONFIG_MD is not set | 304 | # CONFIG_MD is not set |
@@ -213,6 +306,7 @@ CONFIG_ATA_OVER_ETH=m | |||
213 | # | 306 | # |
214 | # Fusion MPT device support | 307 | # Fusion MPT device support |
215 | # | 308 | # |
309 | # CONFIG_FUSION is not set | ||
216 | 310 | ||
217 | # | 311 | # |
218 | # IEEE 1394 (FireWire) support | 312 | # IEEE 1394 (FireWire) support |
@@ -223,84 +317,41 @@ CONFIG_ATA_OVER_ETH=m | |||
223 | # | 317 | # |
224 | 318 | ||
225 | # | 319 | # |
226 | # Networking support | 320 | # Network device support |
227 | # | ||
228 | CONFIG_NET=y | ||
229 | |||
230 | # | ||
231 | # Networking options | ||
232 | # | 321 | # |
233 | CONFIG_PACKET=y | ||
234 | # CONFIG_PACKET_MMAP is not set | ||
235 | CONFIG_NETLINK_DEV=y | ||
236 | CONFIG_UNIX=y | ||
237 | CONFIG_NET_KEY=y | ||
238 | CONFIG_INET=y | ||
239 | # CONFIG_IP_MULTICAST is not set | ||
240 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
241 | CONFIG_IP_PNP=y | ||
242 | # CONFIG_IP_PNP_DHCP is not set | ||
243 | CONFIG_IP_PNP_BOOTP=y | ||
244 | # CONFIG_IP_PNP_RARP is not set | ||
245 | # CONFIG_NET_IPIP is not set | ||
246 | # CONFIG_NET_IPGRE is not set | ||
247 | # CONFIG_ARPD is not set | ||
248 | # CONFIG_SYN_COOKIES is not set | ||
249 | # CONFIG_INET_AH is not set | ||
250 | # CONFIG_INET_ESP is not set | ||
251 | # CONFIG_INET_IPCOMP is not set | ||
252 | CONFIG_INET_TUNNEL=m | ||
253 | CONFIG_IP_TCPDIAG=m | ||
254 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
255 | # CONFIG_IPV6 is not set | ||
256 | # CONFIG_NETFILTER is not set | ||
257 | CONFIG_XFRM=y | ||
258 | CONFIG_XFRM_USER=m | ||
259 | |||
260 | # | ||
261 | # SCTP Configuration (EXPERIMENTAL) | ||
262 | # | ||
263 | # CONFIG_IP_SCTP is not set | ||
264 | # CONFIG_ATM is not set | ||
265 | # CONFIG_BRIDGE is not set | ||
266 | # CONFIG_VLAN_8021Q is not set | ||
267 | # CONFIG_DECNET is not set | ||
268 | # CONFIG_LLC2 is not set | ||
269 | # CONFIG_IPX is not set | ||
270 | # CONFIG_ATALK is not set | ||
271 | # CONFIG_X25 is not set | ||
272 | # CONFIG_LAPB is not set | ||
273 | # CONFIG_NET_DIVERT is not set | ||
274 | # CONFIG_ECONET is not set | ||
275 | # CONFIG_WAN_ROUTER is not set | ||
276 | |||
277 | # | ||
278 | # QoS and/or fair queueing | ||
279 | # | ||
280 | # CONFIG_NET_SCHED is not set | ||
281 | # CONFIG_NET_CLS_ROUTE is not set | ||
282 | |||
283 | # | ||
284 | # Network testing | ||
285 | # | ||
286 | # CONFIG_NET_PKTGEN is not set | ||
287 | # CONFIG_NETPOLL is not set | ||
288 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
289 | # CONFIG_HAMRADIO is not set | ||
290 | # CONFIG_IRDA is not set | ||
291 | # CONFIG_BT is not set | ||
292 | CONFIG_NETDEVICES=y | 322 | CONFIG_NETDEVICES=y |
293 | # CONFIG_DUMMY is not set | 323 | # CONFIG_DUMMY is not set |
294 | # CONFIG_BONDING is not set | 324 | # CONFIG_BONDING is not set |
295 | # CONFIG_EQUALIZER is not set | 325 | # CONFIG_EQUALIZER is not set |
296 | # CONFIG_TUN is not set | 326 | # CONFIG_TUN is not set |
297 | # CONFIG_ETHERTAP is not set | 327 | |
328 | # | ||
329 | # ARCnet devices | ||
330 | # | ||
331 | # CONFIG_ARCNET is not set | ||
298 | 332 | ||
299 | # | 333 | # |
300 | # Ethernet (10 or 100Mbit) | 334 | # Ethernet (10 or 100Mbit) |
301 | # | 335 | # |
302 | CONFIG_NET_ETHERNET=y | 336 | CONFIG_NET_ETHERNET=y |
303 | # CONFIG_MII is not set | 337 | CONFIG_MII=y |
338 | # CONFIG_NET_VENDOR_3COM is not set | ||
339 | # CONFIG_NET_VENDOR_SMC is not set | ||
340 | # CONFIG_NET_VENDOR_RACAL is not set | ||
341 | # CONFIG_DEPCA is not set | ||
342 | # CONFIG_HP100 is not set | ||
343 | CONFIG_NET_ISA=y | ||
344 | # CONFIG_E2100 is not set | ||
345 | # CONFIG_EWRK3 is not set | ||
346 | # CONFIG_EEXPRESS is not set | ||
347 | # CONFIG_EEXPRESS_PRO is not set | ||
348 | # CONFIG_HPLAN_PLUS is not set | ||
349 | # CONFIG_HPLAN is not set | ||
350 | # CONFIG_LP486E is not set | ||
351 | # CONFIG_ETH16I is not set | ||
352 | CONFIG_NE2000=y | ||
353 | # CONFIG_NET_PCI is not set | ||
354 | # CONFIG_NET_POCKET is not set | ||
304 | 355 | ||
305 | # | 356 | # |
306 | # Ethernet (1000 Mbit) | 357 | # Ethernet (1000 Mbit) |
@@ -313,6 +364,7 @@ CONFIG_NET_ETHERNET=y | |||
313 | # | 364 | # |
314 | # Token Ring devices | 365 | # Token Ring devices |
315 | # | 366 | # |
367 | # CONFIG_TR is not set | ||
316 | 368 | ||
317 | # | 369 | # |
318 | # Wireless LAN (non-hamradio) | 370 | # Wireless LAN (non-hamradio) |
@@ -325,8 +377,8 @@ CONFIG_NET_ETHERNET=y | |||
325 | # CONFIG_WAN is not set | 377 | # CONFIG_WAN is not set |
326 | # CONFIG_PPP is not set | 378 | # CONFIG_PPP is not set |
327 | # CONFIG_SLIP is not set | 379 | # CONFIG_SLIP is not set |
328 | # CONFIG_SHAPER is not set | 380 | # CONFIG_NETPOLL is not set |
329 | # CONFIG_NETCONSOLE is not set | 381 | # CONFIG_NET_POLL_CONTROLLER is not set |
330 | 382 | ||
331 | # | 383 | # |
332 | # ISDN subsystem | 384 | # ISDN subsystem |
@@ -346,28 +398,13 @@ CONFIG_INPUT=y | |||
346 | # | 398 | # |
347 | # Userland interfaces | 399 | # Userland interfaces |
348 | # | 400 | # |
349 | CONFIG_INPUT_MOUSEDEV=y | 401 | # CONFIG_INPUT_MOUSEDEV is not set |
350 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
351 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
352 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
353 | # CONFIG_INPUT_JOYDEV is not set | 402 | # CONFIG_INPUT_JOYDEV is not set |
354 | # CONFIG_INPUT_TSDEV is not set | 403 | # CONFIG_INPUT_TSDEV is not set |
355 | # CONFIG_INPUT_EVDEV is not set | 404 | # CONFIG_INPUT_EVDEV is not set |
356 | # CONFIG_INPUT_EVBUG is not set | 405 | # CONFIG_INPUT_EVBUG is not set |
357 | 406 | ||
358 | # | 407 | # |
359 | # Input I/O drivers | ||
360 | # | ||
361 | # CONFIG_GAMEPORT is not set | ||
362 | CONFIG_SOUND_GAMEPORT=y | ||
363 | CONFIG_SERIO=y | ||
364 | # CONFIG_SERIO_I8042 is not set | ||
365 | CONFIG_SERIO_SERPORT=y | ||
366 | # CONFIG_SERIO_CT82C710 is not set | ||
367 | # CONFIG_SERIO_LIBPS2 is not set | ||
368 | CONFIG_SERIO_RAW=m | ||
369 | |||
370 | # | ||
371 | # Input Device Drivers | 408 | # Input Device Drivers |
372 | # | 409 | # |
373 | # CONFIG_INPUT_KEYBOARD is not set | 410 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -377,6 +414,12 @@ CONFIG_SERIO_RAW=m | |||
377 | # CONFIG_INPUT_MISC is not set | 414 | # CONFIG_INPUT_MISC is not set |
378 | 415 | ||
379 | # | 416 | # |
417 | # Hardware I/O ports | ||
418 | # | ||
419 | # CONFIG_SERIO is not set | ||
420 | # CONFIG_GAMEPORT is not set | ||
421 | |||
422 | # | ||
380 | # Character devices | 423 | # Character devices |
381 | # | 424 | # |
382 | CONFIG_VT=y | 425 | CONFIG_VT=y |
@@ -397,9 +440,8 @@ CONFIG_SERIAL_8250_NR_UARTS=4 | |||
397 | # | 440 | # |
398 | CONFIG_SERIAL_CORE=y | 441 | CONFIG_SERIAL_CORE=y |
399 | CONFIG_SERIAL_CORE_CONSOLE=y | 442 | CONFIG_SERIAL_CORE_CONSOLE=y |
400 | CONFIG_UNIX98_PTYS=y | 443 | # CONFIG_UNIX98_PTYS is not set |
401 | CONFIG_LEGACY_PTYS=y | 444 | # CONFIG_LEGACY_PTYS is not set |
402 | CONFIG_LEGACY_PTY_COUNT=256 | ||
403 | 445 | ||
404 | # | 446 | # |
405 | # IPMI | 447 | # IPMI |
@@ -418,13 +460,17 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
418 | # | 460 | # |
419 | # Ftape, the floppy tape device driver | 461 | # Ftape, the floppy tape device driver |
420 | # | 462 | # |
421 | # CONFIG_DRM is not set | ||
422 | # CONFIG_RAW_DRIVER is not set | 463 | # CONFIG_RAW_DRIVER is not set |
423 | 464 | ||
424 | # | 465 | # |
466 | # TPM devices | ||
467 | # | ||
468 | |||
469 | # | ||
425 | # I2C support | 470 | # I2C support |
426 | # | 471 | # |
427 | # CONFIG_I2C is not set | 472 | # CONFIG_I2C is not set |
473 | # CONFIG_I2C_SENSOR is not set | ||
428 | 474 | ||
429 | # | 475 | # |
430 | # Dallas's 1-wire bus | 476 | # Dallas's 1-wire bus |
@@ -432,6 +478,11 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
432 | # CONFIG_W1 is not set | 478 | # CONFIG_W1 is not set |
433 | 479 | ||
434 | # | 480 | # |
481 | # Hardware Monitoring support | ||
482 | # | ||
483 | # CONFIG_HWMON is not set | ||
484 | |||
485 | # | ||
435 | # Misc devices | 486 | # Misc devices |
436 | # | 487 | # |
437 | 488 | ||
@@ -453,9 +504,9 @@ CONFIG_LEGACY_PTY_COUNT=256 | |||
453 | # | 504 | # |
454 | # Console display driver support | 505 | # Console display driver support |
455 | # | 506 | # |
456 | # CONFIG_VGA_CONSOLE is not set | 507 | CONFIG_VGA_CONSOLE=y |
508 | # CONFIG_MDA_CONSOLE is not set | ||
457 | CONFIG_DUMMY_CONSOLE=y | 509 | CONFIG_DUMMY_CONSOLE=y |
458 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
459 | 510 | ||
460 | # | 511 | # |
461 | # Sound | 512 | # Sound |
@@ -469,10 +520,6 @@ CONFIG_DUMMY_CONSOLE=y | |||
469 | # CONFIG_USB_ARCH_HAS_OHCI is not set | 520 | # CONFIG_USB_ARCH_HAS_OHCI is not set |
470 | 521 | ||
471 | # | 522 | # |
472 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
473 | # | ||
474 | |||
475 | # | ||
476 | # USB Gadget Support | 523 | # USB Gadget Support |
477 | # | 524 | # |
478 | # CONFIG_USB_GADGET is not set | 525 | # CONFIG_USB_GADGET is not set |
@@ -488,19 +535,28 @@ CONFIG_DUMMY_CONSOLE=y | |||
488 | # CONFIG_INFINIBAND is not set | 535 | # CONFIG_INFINIBAND is not set |
489 | 536 | ||
490 | # | 537 | # |
538 | # SN Devices | ||
539 | # | ||
540 | |||
541 | # | ||
491 | # File systems | 542 | # File systems |
492 | # | 543 | # |
493 | CONFIG_EXT2_FS=y | 544 | # CONFIG_EXT2_FS is not set |
494 | # CONFIG_EXT2_FS_XATTR is not set | ||
495 | # CONFIG_EXT3_FS is not set | 545 | # CONFIG_EXT3_FS is not set |
496 | # CONFIG_JBD is not set | 546 | # CONFIG_JBD is not set |
497 | # CONFIG_REISERFS_FS is not set | 547 | # CONFIG_REISERFS_FS is not set |
498 | # CONFIG_JFS_FS is not set | 548 | # CONFIG_JFS_FS is not set |
549 | # CONFIG_FS_POSIX_ACL is not set | ||
550 | |||
551 | # | ||
552 | # XFS support | ||
553 | # | ||
499 | # CONFIG_XFS_FS is not set | 554 | # CONFIG_XFS_FS is not set |
500 | # CONFIG_MINIX_FS is not set | 555 | # CONFIG_MINIX_FS is not set |
501 | # CONFIG_ROMFS_FS is not set | 556 | # CONFIG_ROMFS_FS is not set |
557 | CONFIG_INOTIFY=y | ||
502 | # CONFIG_QUOTA is not set | 558 | # CONFIG_QUOTA is not set |
503 | CONFIG_DNOTIFY=y | 559 | # CONFIG_DNOTIFY is not set |
504 | # CONFIG_AUTOFS_FS is not set | 560 | # CONFIG_AUTOFS_FS is not set |
505 | # CONFIG_AUTOFS4_FS is not set | 561 | # CONFIG_AUTOFS4_FS is not set |
506 | 562 | ||
@@ -520,12 +576,8 @@ CONFIG_DNOTIFY=y | |||
520 | # | 576 | # |
521 | # Pseudo filesystems | 577 | # Pseudo filesystems |
522 | # | 578 | # |
523 | CONFIG_PROC_FS=y | 579 | # CONFIG_PROC_FS is not set |
524 | CONFIG_PROC_KCORE=y | 580 | # CONFIG_SYSFS is not set |
525 | CONFIG_SYSFS=y | ||
526 | # CONFIG_DEVFS_FS is not set | ||
527 | CONFIG_DEVPTS_FS_XATTR=y | ||
528 | CONFIG_DEVPTS_FS_SECURITY=y | ||
529 | # CONFIG_TMPFS is not set | 581 | # CONFIG_TMPFS is not set |
530 | # CONFIG_HUGETLB_PAGE is not set | 582 | # CONFIG_HUGETLB_PAGE is not set |
531 | CONFIG_RAMFS=y | 583 | CONFIG_RAMFS=y |
@@ -533,13 +585,7 @@ CONFIG_RAMFS=y | |||
533 | # | 585 | # |
534 | # Miscellaneous filesystems | 586 | # Miscellaneous filesystems |
535 | # | 587 | # |
536 | # CONFIG_ADFS_FS is not set | ||
537 | # CONFIG_AFFS_FS is not set | ||
538 | # CONFIG_HFS_FS is not set | ||
539 | # CONFIG_HFSPLUS_FS is not set | 588 | # CONFIG_HFSPLUS_FS is not set |
540 | # CONFIG_BEFS_FS is not set | ||
541 | # CONFIG_BFS_FS is not set | ||
542 | # CONFIG_EFS_FS is not set | ||
543 | # CONFIG_CRAMFS is not set | 589 | # CONFIG_CRAMFS is not set |
544 | # CONFIG_VXFS_FS is not set | 590 | # CONFIG_VXFS_FS is not set |
545 | # CONFIG_HPFS_FS is not set | 591 | # CONFIG_HPFS_FS is not set |
@@ -551,23 +597,18 @@ CONFIG_RAMFS=y | |||
551 | # Network File Systems | 597 | # Network File Systems |
552 | # | 598 | # |
553 | CONFIG_NFS_FS=y | 599 | CONFIG_NFS_FS=y |
554 | # CONFIG_NFS_V3 is not set | 600 | CONFIG_NFS_V3=y |
555 | # CONFIG_NFS_V4 is not set | 601 | # CONFIG_NFS_V3_ACL is not set |
556 | # CONFIG_NFS_DIRECTIO is not set | 602 | # CONFIG_NFSD is not set |
557 | CONFIG_NFSD=y | ||
558 | # CONFIG_NFSD_V3 is not set | ||
559 | # CONFIG_NFSD_TCP is not set | ||
560 | CONFIG_ROOT_NFS=y | 603 | CONFIG_ROOT_NFS=y |
561 | CONFIG_LOCKD=y | 604 | CONFIG_LOCKD=y |
562 | CONFIG_EXPORTFS=y | 605 | CONFIG_LOCKD_V4=y |
606 | CONFIG_NFS_COMMON=y | ||
563 | CONFIG_SUNRPC=y | 607 | CONFIG_SUNRPC=y |
564 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
565 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
566 | # CONFIG_SMB_FS is not set | 608 | # CONFIG_SMB_FS is not set |
567 | # CONFIG_CIFS is not set | 609 | # CONFIG_CIFS is not set |
568 | # CONFIG_NCP_FS is not set | 610 | # CONFIG_NCP_FS is not set |
569 | # CONFIG_CODA_FS is not set | 611 | # CONFIG_CODA_FS is not set |
570 | # CONFIG_AFS_FS is not set | ||
571 | 612 | ||
572 | # | 613 | # |
573 | # Partition Types | 614 | # Partition Types |
@@ -581,22 +622,18 @@ CONFIG_MSDOS_PARTITION=y | |||
581 | # CONFIG_NLS is not set | 622 | # CONFIG_NLS is not set |
582 | 623 | ||
583 | # | 624 | # |
584 | # Profiling support | ||
585 | # | ||
586 | # CONFIG_PROFILING is not set | ||
587 | |||
588 | # | ||
589 | # Kernel hacking | 625 | # Kernel hacking |
590 | # | 626 | # |
627 | # CONFIG_PRINTK_TIME is not set | ||
591 | # CONFIG_DEBUG_KERNEL is not set | 628 | # CONFIG_DEBUG_KERNEL is not set |
629 | CONFIG_LOG_BUF_SHIFT=14 | ||
592 | CONFIG_CROSSCOMPILE=y | 630 | CONFIG_CROSSCOMPILE=y |
593 | CONFIG_CMDLINE="ip=bootp ether=46,0x03fe0300,eth0" | 631 | CONFIG_CMDLINE="console=ttyS0 debug ip=172.20.0.2:172.20.0.1::255.255.0.0" |
594 | 632 | ||
595 | # | 633 | # |
596 | # Security options | 634 | # Security options |
597 | # | 635 | # |
598 | CONFIG_KEYS=y | 636 | # CONFIG_KEYS is not set |
599 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
600 | # CONFIG_SECURITY is not set | 637 | # CONFIG_SECURITY is not set |
601 | 638 | ||
602 | # | 639 | # |
@@ -612,7 +649,7 @@ CONFIG_KEYS_DEBUG_PROC_KEYS=y | |||
612 | # Library routines | 649 | # Library routines |
613 | # | 650 | # |
614 | # CONFIG_CRC_CCITT is not set | 651 | # CONFIG_CRC_CCITT is not set |
615 | # CONFIG_CRC32 is not set | 652 | CONFIG_CRC32=y |
616 | CONFIG_LIBCRC32C=m | 653 | # CONFIG_LIBCRC32C is not set |
617 | CONFIG_GENERIC_HARDIRQS=y | 654 | CONFIG_GENERIC_HARDIRQS=y |
618 | CONFIG_GENERIC_IRQ_PROBE=y | 655 | CONFIG_GENERIC_IRQ_PROBE=y |
diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig index d0c85a4009d6..17d4fce6c4c6 100644 --- a/arch/mips/configs/rm200_defconfig +++ b/arch/mips/configs/rm200_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:09 2005 | 4 | # Wed Jan 26 02:49:09 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -91,6 +91,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
91 | CONFIG_HAVE_DEC_LOCK=y | 91 | CONFIG_HAVE_DEC_LOCK=y |
92 | CONFIG_ARC=y | 92 | CONFIG_ARC=y |
93 | CONFIG_DMA_NONCOHERENT=y | 93 | CONFIG_DMA_NONCOHERENT=y |
94 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
94 | CONFIG_GENERIC_ISA_DMA=y | 95 | CONFIG_GENERIC_ISA_DMA=y |
95 | CONFIG_I8259=y | 96 | CONFIG_I8259=y |
96 | CONFIG_CPU_LITTLE_ENDIAN=y | 97 | CONFIG_CPU_LITTLE_ENDIAN=y |
diff --git a/arch/mips/configs/sb1250-swarm_defconfig b/arch/mips/configs/sb1250-swarm_defconfig index 84978b70714b..1dc935f37582 100644 --- a/arch/mips/configs/sb1250-swarm_defconfig +++ b/arch/mips/configs/sb1250-swarm_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:10 2005 | 4 | # Wed Jan 26 02:49:10 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
diff --git a/arch/mips/configs/sead_defconfig b/arch/mips/configs/sead_defconfig index 7c718a429b04..dd07e866b128 100644 --- a/arch/mips/configs/sead_defconfig +++ b/arch/mips/configs/sead_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:10 2005 | 4 | # Wed Jan 26 02:49:10 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -80,6 +80,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
80 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 80 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
81 | CONFIG_HAVE_DEC_LOCK=y | 81 | CONFIG_HAVE_DEC_LOCK=y |
82 | CONFIG_DMA_NONCOHERENT=y | 82 | CONFIG_DMA_NONCOHERENT=y |
83 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
83 | CONFIG_CPU_LITTLE_ENDIAN=y | 84 | CONFIG_CPU_LITTLE_ENDIAN=y |
84 | CONFIG_IRQ_CPU=y | 85 | CONFIG_IRQ_CPU=y |
85 | CONFIG_MIPS_BOARDS_GEN=y | 86 | CONFIG_MIPS_BOARDS_GEN=y |
diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig index e01727cd0fe9..c9d3f83caf0f 100644 --- a/arch/mips/configs/tb0226_defconfig +++ b/arch/mips/configs/tb0226_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:12 2005 | 4 | # Wed Jan 26 02:49:12 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -95,6 +95,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
95 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 95 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
96 | CONFIG_HAVE_DEC_LOCK=y | 96 | CONFIG_HAVE_DEC_LOCK=y |
97 | CONFIG_DMA_NONCOHERENT=y | 97 | CONFIG_DMA_NONCOHERENT=y |
98 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
98 | CONFIG_CPU_LITTLE_ENDIAN=y | 99 | CONFIG_CPU_LITTLE_ENDIAN=y |
99 | CONFIG_IRQ_CPU=y | 100 | CONFIG_IRQ_CPU=y |
100 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 101 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
diff --git a/arch/mips/configs/tb0229_defconfig b/arch/mips/configs/tb0229_defconfig index c6ba3de27614..2cb669188aa9 100644 --- a/arch/mips/configs/tb0229_defconfig +++ b/arch/mips/configs/tb0229_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:12 2005 | 4 | # Wed Jan 26 02:49:12 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -98,6 +98,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
98 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 98 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
99 | CONFIG_HAVE_DEC_LOCK=y | 99 | CONFIG_HAVE_DEC_LOCK=y |
100 | CONFIG_DMA_NONCOHERENT=y | 100 | CONFIG_DMA_NONCOHERENT=y |
101 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
101 | CONFIG_CPU_LITTLE_ENDIAN=y | 102 | CONFIG_CPU_LITTLE_ENDIAN=y |
102 | CONFIG_IRQ_CPU=y | 103 | CONFIG_IRQ_CPU=y |
103 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 104 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
diff --git a/arch/mips/configs/workpad_defconfig b/arch/mips/configs/workpad_defconfig index 915c43b6e2d9..16e07fca446f 100644 --- a/arch/mips/configs/workpad_defconfig +++ b/arch/mips/configs/workpad_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:12 2005 | 4 | # Wed Jan 26 02:49:12 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -96,6 +96,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
96 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 96 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
97 | CONFIG_HAVE_DEC_LOCK=y | 97 | CONFIG_HAVE_DEC_LOCK=y |
98 | CONFIG_DMA_NONCOHERENT=y | 98 | CONFIG_DMA_NONCOHERENT=y |
99 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
99 | CONFIG_CPU_LITTLE_ENDIAN=y | 100 | CONFIG_CPU_LITTLE_ENDIAN=y |
100 | CONFIG_IRQ_CPU=y | 101 | CONFIG_IRQ_CPU=y |
101 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | 102 | CONFIG_MIPS_L1_CACHE_SHIFT=5 |
diff --git a/arch/mips/configs/yosemite_defconfig b/arch/mips/configs/yosemite_defconfig index 562f2b8043ac..6d2290777ad7 100644 --- a/arch/mips/configs/yosemite_defconfig +++ b/arch/mips/configs/yosemite_defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:49:13 2005 | 4 | # Wed Jan 26 02:49:13 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
diff --git a/arch/mips/ddb5xxx/ddb5477/irq.c b/arch/mips/ddb5xxx/ddb5477/irq.c index 5f027bfa4af8..9ffe1a9142ca 100644 --- a/arch/mips/ddb5xxx/ddb5477/irq.c +++ b/arch/mips/ddb5xxx/ddb5477/irq.c | |||
@@ -76,7 +76,7 @@ set_pci_int_attr(u32 pci, u32 intn, u32 active, u32 trigger) | |||
76 | extern void vrc5477_irq_init(u32 base); | 76 | extern void vrc5477_irq_init(u32 base); |
77 | extern void mips_cpu_irq_init(u32 base); | 77 | extern void mips_cpu_irq_init(u32 base); |
78 | extern asmlinkage void ddb5477_handle_int(void); | 78 | extern asmlinkage void ddb5477_handle_int(void); |
79 | extern int setup_irq(unsigned int irq, struct irqaction *irqaction); | 79 | extern int setup_irq(unsigned int irq, struct irqaction *irqaction); |
80 | static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL }; | 80 | static struct irqaction irq_cascade = { no_action, 0, CPU_MASK_NONE, "cascade", NULL, NULL }; |
81 | 81 | ||
82 | void __init arch_init_irq(void) | 82 | void __init arch_init_irq(void) |
@@ -94,7 +94,7 @@ void __init arch_init_irq(void) | |||
94 | /* setup PCI interrupt attributes */ | 94 | /* setup PCI interrupt attributes */ |
95 | set_pci_int_attr(PCI0, INTA, ACTIVE_LOW, LEVEL_SENSE); | 95 | set_pci_int_attr(PCI0, INTA, ACTIVE_LOW, LEVEL_SENSE); |
96 | set_pci_int_attr(PCI0, INTB, ACTIVE_LOW, LEVEL_SENSE); | 96 | set_pci_int_attr(PCI0, INTB, ACTIVE_LOW, LEVEL_SENSE); |
97 | if (mips_machtype == MACH_NEC_ROCKHOPPERII) | 97 | if (mips_machtype == MACH_NEC_ROCKHOPPERII) |
98 | set_pci_int_attr(PCI0, INTC, ACTIVE_HIGH, LEVEL_SENSE); | 98 | set_pci_int_attr(PCI0, INTC, ACTIVE_HIGH, LEVEL_SENSE); |
99 | else | 99 | else |
100 | set_pci_int_attr(PCI0, INTC, ACTIVE_LOW, LEVEL_SENSE); | 100 | set_pci_int_attr(PCI0, INTC, ACTIVE_LOW, LEVEL_SENSE); |
@@ -134,7 +134,7 @@ void __init arch_init_irq(void) | |||
134 | 134 | ||
135 | /* setup cascade interrupts */ | 135 | /* setup cascade interrupts */ |
136 | setup_irq(VRC5477_IRQ_BASE + VRC5477_I8259_CASCADE, &irq_cascade); | 136 | setup_irq(VRC5477_IRQ_BASE + VRC5477_I8259_CASCADE, &irq_cascade); |
137 | setup_irq(CPU_IRQ_BASE + CPU_VRC5477_CASCADE, &irq_cascade); | 137 | setup_irq(CPU_IRQ_BASE + CPU_VRC5477_CASCADE, &irq_cascade); |
138 | 138 | ||
139 | /* hook up the first-level interrupt handler */ | 139 | /* hook up the first-level interrupt handler */ |
140 | set_except_vector(0, ddb5477_handle_int); | 140 | set_except_vector(0, ddb5477_handle_int); |
diff --git a/arch/mips/ddb5xxx/ddb5477/setup.c b/arch/mips/ddb5xxx/ddb5477/setup.c index 15c6e543b56f..d62f5a789b05 100644 --- a/arch/mips/ddb5xxx/ddb5477/setup.c +++ b/arch/mips/ddb5xxx/ddb5477/setup.c | |||
@@ -141,7 +141,7 @@ static void __init ddb_time_init(void) | |||
141 | 141 | ||
142 | /* mips_hpt_frequency is 1/2 of the cpu core freq */ | 142 | /* mips_hpt_frequency is 1/2 of the cpu core freq */ |
143 | i = (read_c0_config() >> 28 ) & 7; | 143 | i = (read_c0_config() >> 28 ) & 7; |
144 | if ((current_cpu_data.cputype == CPU_R5432) && (i == 3)) | 144 | if ((current_cpu_data.cputype == CPU_R5432) && (i == 3)) |
145 | i = 4; | 145 | i = 4; |
146 | mips_hpt_frequency = bus_frequency*(i+4)/4; | 146 | mips_hpt_frequency = bus_frequency*(i+4)/4; |
147 | } | 147 | } |
@@ -298,11 +298,11 @@ static void __init ddb5477_board_init(void) | |||
298 | 298 | ||
299 | if (mips_machtype == MACH_NEC_ROCKHOPPER | 299 | if (mips_machtype == MACH_NEC_ROCKHOPPER |
300 | || mips_machtype == MACH_NEC_ROCKHOPPERII) { | 300 | || mips_machtype == MACH_NEC_ROCKHOPPERII) { |
301 | /* Disable bus diagnostics. */ | 301 | /* Disable bus diagnostics. */ |
302 | ddb_out32(DDB_PCICTL0_L, 0); | 302 | ddb_out32(DDB_PCICTL0_L, 0); |
303 | ddb_out32(DDB_PCICTL0_H, 0); | 303 | ddb_out32(DDB_PCICTL0_H, 0); |
304 | ddb_out32(DDB_PCICTL1_L, 0); | 304 | ddb_out32(DDB_PCICTL1_L, 0); |
305 | ddb_out32(DDB_PCICTL1_H, 0); | 305 | ddb_out32(DDB_PCICTL1_H, 0); |
306 | } | 306 | } |
307 | 307 | ||
308 | if (mips_machtype == MACH_NEC_ROCKHOPPER) { | 308 | if (mips_machtype == MACH_NEC_ROCKHOPPER) { |
@@ -354,7 +354,7 @@ static void __init ddb5477_board_init(void) | |||
354 | */ | 354 | */ |
355 | pci_write_config_byte(&dev_m1533, 0x58, 0x74); | 355 | pci_write_config_byte(&dev_m1533, 0x58, 0x74); |
356 | 356 | ||
357 | /* | 357 | /* |
358 | * positive decode (bit6 -0) | 358 | * positive decode (bit6 -0) |
359 | * enable IDE controler interrupt (bit 4 -1) | 359 | * enable IDE controler interrupt (bit 4 -1) |
360 | * setup SIRQ to point to IRQ 14 (bit 3:0 - 1101) | 360 | * setup SIRQ to point to IRQ 14 (bit 3:0 - 1101) |
@@ -364,31 +364,31 @@ static void __init ddb5477_board_init(void) | |||
364 | /* Setup M5229 registers */ | 364 | /* Setup M5229 registers */ |
365 | dev_m5229.bus = &bus; | 365 | dev_m5229.bus = &bus; |
366 | dev_m5229.sysdata = NULL; | 366 | dev_m5229.sysdata = NULL; |
367 | dev_m5229.devfn = 4*8; // slot 4 (AD15): M5229 IDE | 367 | dev_m5229.devfn = 4*8; // slot 4 (AD15): M5229 IDE |
368 | 368 | ||
369 | /* | 369 | /* |
370 | * enable IDE in the M5229 config register 0x50 (bit 0 - 1) | 370 | * enable IDE in the M5229 config register 0x50 (bit 0 - 1) |
371 | * M5229 IDSEL is addr:15; see above setting | 371 | * M5229 IDSEL is addr:15; see above setting |
372 | */ | 372 | */ |
373 | pci_read_config_byte(&dev_m5229, 0x50, &temp8); | 373 | pci_read_config_byte(&dev_m5229, 0x50, &temp8); |
374 | pci_write_config_byte(&dev_m5229, 0x50, temp8 | 0x1); | 374 | pci_write_config_byte(&dev_m5229, 0x50, temp8 | 0x1); |
375 | 375 | ||
376 | /* | 376 | /* |
377 | * enable bus master (bit 2) and IO decoding (bit 0) | 377 | * enable bus master (bit 2) and IO decoding (bit 0) |
378 | */ | 378 | */ |
379 | pci_read_config_byte(&dev_m5229, 0x04, &temp8); | 379 | pci_read_config_byte(&dev_m5229, 0x04, &temp8); |
380 | pci_write_config_byte(&dev_m5229, 0x04, temp8 | 0x5); | 380 | pci_write_config_byte(&dev_m5229, 0x04, temp8 | 0x5); |
381 | 381 | ||
382 | /* | 382 | /* |
383 | * enable native, copied from arch/ppc/k2boot/head.S | 383 | * enable native, copied from arch/ppc/k2boot/head.S |
384 | * TODO - need volatile, need to be portable | 384 | * TODO - need volatile, need to be portable |
385 | */ | 385 | */ |
386 | pci_write_config_byte(&dev_m5229, 0x09, 0xef); | 386 | pci_write_config_byte(&dev_m5229, 0x09, 0xef); |
387 | 387 | ||
388 | /* Set Primary Channel Command Block Timing */ | 388 | /* Set Primary Channel Command Block Timing */ |
389 | pci_write_config_byte(&dev_m5229, 0x59, 0x31); | 389 | pci_write_config_byte(&dev_m5229, 0x59, 0x31); |
390 | 390 | ||
391 | /* | 391 | /* |
392 | * Enable primary channel 40-pin cable | 392 | * Enable primary channel 40-pin cable |
393 | * M5229 register 0x4a (bit 0) | 393 | * M5229 register 0x4a (bit 0) |
394 | */ | 394 | */ |
diff --git a/arch/mips/dec/ecc-berr.c b/arch/mips/dec/ecc-berr.c index 133fb7c48e6c..6dbce92eb068 100644 --- a/arch/mips/dec/ecc-berr.c +++ b/arch/mips/dec/ecc-berr.c | |||
@@ -253,7 +253,7 @@ static inline void dec_kn03_be_init(void) | |||
253 | 253 | ||
254 | kn0x_erraddr = (void *)(KN03_SLOT_BASE + IOASIC_ERRADDR); | 254 | kn0x_erraddr = (void *)(KN03_SLOT_BASE + IOASIC_ERRADDR); |
255 | kn0x_chksyn = (void *)(KN03_SLOT_BASE + IOASIC_CHKSYN); | 255 | kn0x_chksyn = (void *)(KN03_SLOT_BASE + IOASIC_CHKSYN); |
256 | 256 | ||
257 | /* | 257 | /* |
258 | * Set normal ECC detection and generation, enable ECC correction. | 258 | * Set normal ECC detection and generation, enable ECC correction. |
259 | * For KN05 we also need to make sure EE (?) is enabled in the MB. | 259 | * For KN05 we also need to make sure EE (?) is enabled in the MB. |
diff --git a/arch/mips/dec/int-handler.S b/arch/mips/dec/int-handler.S index 3b3790993219..c89768d5c4e5 100644 --- a/arch/mips/dec/int-handler.S +++ b/arch/mips/dec/int-handler.S | |||
@@ -133,7 +133,7 @@ | |||
133 | */ | 133 | */ |
134 | mfc0 t0,CP0_CAUSE # get pending interrupts | 134 | mfc0 t0,CP0_CAUSE # get pending interrupts |
135 | mfc0 t1,CP0_STATUS | 135 | mfc0 t1,CP0_STATUS |
136 | #ifdef CONFIG_MIPS32 | 136 | #ifdef CONFIG_32BIT |
137 | lw t2,cpu_fpu_mask | 137 | lw t2,cpu_fpu_mask |
138 | #endif | 138 | #endif |
139 | andi t0,ST0_IM # CAUSE.CE may be non-zero! | 139 | andi t0,ST0_IM # CAUSE.CE may be non-zero! |
@@ -141,7 +141,7 @@ | |||
141 | 141 | ||
142 | beqz t0,spurious | 142 | beqz t0,spurious |
143 | 143 | ||
144 | #ifdef CONFIG_MIPS32 | 144 | #ifdef CONFIG_32BIT |
145 | and t2,t0 | 145 | and t2,t0 |
146 | bnez t2,fpu # handle FPU immediately | 146 | bnez t2,fpu # handle FPU immediately |
147 | #endif | 147 | #endif |
@@ -271,7 +271,7 @@ handle_it: | |||
271 | j ret_from_irq | 271 | j ret_from_irq |
272 | nop | 272 | nop |
273 | 273 | ||
274 | #ifdef CONFIG_MIPS32 | 274 | #ifdef CONFIG_32BIT |
275 | fpu: | 275 | fpu: |
276 | j handle_fpe_int | 276 | j handle_fpe_int |
277 | nop | 277 | nop |
diff --git a/arch/mips/dec/prom/Makefile b/arch/mips/dec/prom/Makefile index 373822ec2d8c..bcd0247b3a66 100644 --- a/arch/mips/dec/prom/Makefile +++ b/arch/mips/dec/prom/Makefile | |||
@@ -5,7 +5,7 @@ | |||
5 | 5 | ||
6 | lib-y += init.o memory.o cmdline.o identify.o console.o | 6 | lib-y += init.o memory.o cmdline.o identify.o console.o |
7 | 7 | ||
8 | lib-$(CONFIG_MIPS32) += locore.o | 8 | lib-$(CONFIG_32BIT) += locore.o |
9 | lib-$(CONFIG_MIPS64) += call_o32.o | 9 | lib-$(CONFIG_64BIT) += call_o32.o |
10 | 10 | ||
11 | EXTRA_AFLAGS := $(CFLAGS) | 11 | EXTRA_AFLAGS := $(CFLAGS) |
diff --git a/arch/mips/defconfig b/arch/mips/defconfig index d55fe665926f..20f84b119b4c 100644 --- a/arch/mips/defconfig +++ b/arch/mips/defconfig | |||
@@ -4,9 +4,9 @@ | |||
4 | # Wed Jan 26 02:48:59 2005 | 4 | # Wed Jan 26 02:48:59 2005 |
5 | # | 5 | # |
6 | CONFIG_MIPS=y | 6 | CONFIG_MIPS=y |
7 | # CONFIG_MIPS64 is not set | ||
8 | # CONFIG_64BIT is not set | 7 | # CONFIG_64BIT is not set |
9 | CONFIG_MIPS32=y | 8 | # CONFIG_64BIT is not set |
9 | CONFIG_32BIT=y | ||
10 | 10 | ||
11 | # | 11 | # |
12 | # Code maturity level options | 12 | # Code maturity level options |
@@ -90,6 +90,7 @@ CONFIG_GENERIC_CALIBRATE_DELAY=y | |||
90 | CONFIG_HAVE_DEC_LOCK=y | 90 | CONFIG_HAVE_DEC_LOCK=y |
91 | CONFIG_ARC=y | 91 | CONFIG_ARC=y |
92 | CONFIG_DMA_NONCOHERENT=y | 92 | CONFIG_DMA_NONCOHERENT=y |
93 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
93 | # CONFIG_CPU_LITTLE_ENDIAN is not set | 94 | # CONFIG_CPU_LITTLE_ENDIAN is not set |
94 | CONFIG_IRQ_CPU=y | 95 | CONFIG_IRQ_CPU=y |
95 | CONFIG_SWAP_IO_SPACE=y | 96 | CONFIG_SWAP_IO_SPACE=y |
diff --git a/arch/mips/ite-boards/generic/it8172_setup.c b/arch/mips/ite-boards/generic/it8172_setup.c index d808a67294b8..a5f6d84bc181 100644 --- a/arch/mips/ite-boards/generic/it8172_setup.c +++ b/arch/mips/ite-boards/generic/it8172_setup.c | |||
@@ -129,7 +129,7 @@ static void __init it8172_setup(void) | |||
129 | 129 | ||
130 | /* | 130 | /* |
131 | * IO/MEM resources. | 131 | * IO/MEM resources. |
132 | * | 132 | * |
133 | * revisit this area. | 133 | * revisit this area. |
134 | */ | 134 | */ |
135 | set_io_port_base(KSEG1); | 135 | set_io_port_base(KSEG1); |
diff --git a/arch/mips/ite-boards/generic/time.c b/arch/mips/ite-boards/generic/time.c index 30a6c0d5fc50..f5d67ee21ac6 100644 --- a/arch/mips/ite-boards/generic/time.c +++ b/arch/mips/ite-boards/generic/time.c | |||
@@ -72,7 +72,7 @@ static inline int rtc_dm_binary(void) { return saved_control & RTC_DM_BINARY; } | |||
72 | static inline unsigned char | 72 | static inline unsigned char |
73 | bin_to_hw(unsigned char c) | 73 | bin_to_hw(unsigned char c) |
74 | { | 74 | { |
75 | if (rtc_dm_binary()) | 75 | if (rtc_dm_binary()) |
76 | return c; | 76 | return c; |
77 | else | 77 | else |
78 | return ((c/10) << 4) + (c%10); | 78 | return ((c/10) << 4) + (c%10); |
@@ -91,9 +91,9 @@ hw_to_bin(unsigned char c) | |||
91 | static inline unsigned char | 91 | static inline unsigned char |
92 | hour_bin_to_hw(unsigned char c) | 92 | hour_bin_to_hw(unsigned char c) |
93 | { | 93 | { |
94 | if (rtc_24h()) | 94 | if (rtc_24h()) |
95 | return bin_to_hw(c); | 95 | return bin_to_hw(c); |
96 | if (c >= 12) | 96 | if (c >= 12) |
97 | return 0x80 | bin_to_hw((c==12)?12:c-12); /* 12 is 12pm */ | 97 | return 0x80 | bin_to_hw((c==12)?12:c-12); /* 12 is 12pm */ |
98 | else | 98 | else |
99 | return bin_to_hw((c==0)?12:c); /* 0 is 12 AM, not 0 am */ | 99 | return bin_to_hw((c==0)?12:c); /* 0 is 12 AM, not 0 am */ |
@@ -105,9 +105,9 @@ hour_hw_to_bin(unsigned char c) | |||
105 | unsigned char tmp = hw_to_bin(c&0x3f); | 105 | unsigned char tmp = hw_to_bin(c&0x3f); |
106 | if (rtc_24h()) | 106 | if (rtc_24h()) |
107 | return tmp; | 107 | return tmp; |
108 | if (c & 0x80) | 108 | if (c & 0x80) |
109 | return (tmp==12)?12:tmp+12; /* 12pm is 12, not 24 */ | 109 | return (tmp==12)?12:tmp+12; /* 12pm is 12, not 24 */ |
110 | else | 110 | else |
111 | return (tmp==12)?0:tmp; /* 12am is 0 */ | 111 | return (tmp==12)?0:tmp; /* 12am is 0 */ |
112 | } | 112 | } |
113 | 113 | ||
@@ -145,7 +145,7 @@ static unsigned long __init cal_r4koff(void) | |||
145 | return (mips_hpt_frequency / HZ); | 145 | return (mips_hpt_frequency / HZ); |
146 | } | 146 | } |
147 | 147 | ||
148 | static unsigned long | 148 | static unsigned long |
149 | it8172_rtc_get_time(void) | 149 | it8172_rtc_get_time(void) |
150 | { | 150 | { |
151 | unsigned int year, mon, day, hour, min, sec; | 151 | unsigned int year, mon, day, hour, min, sec; |
@@ -166,12 +166,12 @@ it8172_rtc_get_time(void) | |||
166 | hour = hour_hw_to_bin(CMOS_READ(RTC_HOURS)); | 166 | hour = hour_hw_to_bin(CMOS_READ(RTC_HOURS)); |
167 | day = hw_to_bin(CMOS_READ(RTC_DAY_OF_MONTH)); | 167 | day = hw_to_bin(CMOS_READ(RTC_DAY_OF_MONTH)); |
168 | mon = hw_to_bin(CMOS_READ(RTC_MONTH)); | 168 | mon = hw_to_bin(CMOS_READ(RTC_MONTH)); |
169 | year = hw_to_bin(CMOS_READ(RTC_YEAR)) + | 169 | year = hw_to_bin(CMOS_READ(RTC_YEAR)) + |
170 | hw_to_bin(*rtc_century_reg) * 100; | 170 | hw_to_bin(*rtc_century_reg) * 100; |
171 | 171 | ||
172 | /* restore interrupts */ | 172 | /* restore interrupts */ |
173 | local_irq_restore(flags); | 173 | local_irq_restore(flags); |
174 | 174 | ||
175 | return mktime(year, mon, day, hour, min, sec); | 175 | return mktime(year, mon, day, hour, min, sec); |
176 | } | 176 | } |
177 | 177 | ||
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index a0230ee0f7f4..d3303584fbd1 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -13,8 +13,8 @@ binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ | |||
13 | 13 | ||
14 | ifdef CONFIG_MODULES | 14 | ifdef CONFIG_MODULES |
15 | obj-y += mips_ksyms.o module.o | 15 | obj-y += mips_ksyms.o module.o |
16 | obj-$(CONFIG_MIPS32) += module-elf32.o | 16 | obj-$(CONFIG_32BIT) += module-elf32.o |
17 | obj-$(CONFIG_MIPS64) += module-elf64.o | 17 | obj-$(CONFIG_64BIT) += module-elf64.o |
18 | endif | 18 | endif |
19 | 19 | ||
20 | obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o | 20 | obj-$(CONFIG_CPU_R3000) += r2300_fpu.o r2300_switch.o |
@@ -45,8 +45,8 @@ obj-$(CONFIG_IRQ_CPU_RM7K) += irq-rm7000.o | |||
45 | obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o | 45 | obj-$(CONFIG_IRQ_CPU_RM9K) += irq-rm9000.o |
46 | obj-$(CONFIG_IRQ_MV64340) += irq-mv6434x.o | 46 | obj-$(CONFIG_IRQ_MV64340) += irq-mv6434x.o |
47 | 47 | ||
48 | obj-$(CONFIG_MIPS32) += scall32-o32.o | 48 | obj-$(CONFIG_32BIT) += scall32-o32.o |
49 | obj-$(CONFIG_MIPS64) += scall64-64.o | 49 | obj-$(CONFIG_64BIT) += scall64-64.o |
50 | obj-$(CONFIG_BINFMT_IRIX) += binfmt_irix.o | 50 | obj-$(CONFIG_BINFMT_IRIX) += binfmt_irix.o |
51 | obj-$(CONFIG_MIPS32_COMPAT) += ioctl32.o linux32.o signal32.o | 51 | obj-$(CONFIG_MIPS32_COMPAT) += ioctl32.o linux32.o signal32.o |
52 | obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o | 52 | obj-$(CONFIG_MIPS32_N32) += binfmt_elfn32.o scall64-n32.o signal_n32.o |
@@ -55,7 +55,7 @@ obj-$(CONFIG_MIPS32_O32) += binfmt_elfo32.o scall64-o32.o ptrace32.o | |||
55 | obj-$(CONFIG_KGDB) += gdb-low.o gdb-stub.o | 55 | obj-$(CONFIG_KGDB) += gdb-low.o gdb-stub.o |
56 | obj-$(CONFIG_PROC_FS) += proc.o | 56 | obj-$(CONFIG_PROC_FS) += proc.o |
57 | 57 | ||
58 | obj-$(CONFIG_MIPS64) += cpu-bugs64.o | 58 | obj-$(CONFIG_64BIT) += cpu-bugs64.o |
59 | 59 | ||
60 | obj-$(CONFIG_GEN_RTC) += genrtc.o | 60 | obj-$(CONFIG_GEN_RTC) += genrtc.o |
61 | 61 | ||
diff --git a/arch/mips/kernel/binfmt_elfn32.c b/arch/mips/kernel/binfmt_elfn32.c index ed47041f3030..6b645fbb1ddc 100644 --- a/arch/mips/kernel/binfmt_elfn32.c +++ b/arch/mips/kernel/binfmt_elfn32.c | |||
@@ -103,7 +103,7 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
103 | * Convert jiffies to nanoseconds and seperate with | 103 | * Convert jiffies to nanoseconds and seperate with |
104 | * one divide. | 104 | * one divide. |
105 | */ | 105 | */ |
106 | u64 nsec = (u64)jiffies * TICK_NSEC; | 106 | u64 nsec = (u64)jiffies * TICK_NSEC; |
107 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); | 107 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); |
108 | value->tv_usec /= NSEC_PER_USEC; | 108 | value->tv_usec /= NSEC_PER_USEC; |
109 | } | 109 | } |
diff --git a/arch/mips/kernel/binfmt_elfo32.c b/arch/mips/kernel/binfmt_elfo32.c index ee21b18c37a8..b4075e99c452 100644 --- a/arch/mips/kernel/binfmt_elfo32.c +++ b/arch/mips/kernel/binfmt_elfo32.c | |||
@@ -105,7 +105,7 @@ jiffies_to_compat_timeval(unsigned long jiffies, struct compat_timeval *value) | |||
105 | * Convert jiffies to nanoseconds and seperate with | 105 | * Convert jiffies to nanoseconds and seperate with |
106 | * one divide. | 106 | * one divide. |
107 | */ | 107 | */ |
108 | u64 nsec = (u64)jiffies * TICK_NSEC; | 108 | u64 nsec = (u64)jiffies * TICK_NSEC; |
109 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); | 109 | value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_usec); |
110 | value->tv_usec /= NSEC_PER_USEC; | 110 | value->tv_usec /= NSEC_PER_USEC; |
111 | } | 111 | } |
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index 11ebe5d4c446..47a087b6c11b 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
@@ -137,7 +137,7 @@ static inline void check_mult_sh(void) | |||
137 | for (i = 0; i < 8; i++) | 137 | for (i = 0; i < 8; i++) |
138 | if (v1[i] != w[i]) | 138 | if (v1[i] != w[i]) |
139 | bug = 1; | 139 | bug = 1; |
140 | 140 | ||
141 | if (bug == 0) { | 141 | if (bug == 0) { |
142 | printk("no.\n"); | 142 | printk("no.\n"); |
143 | return; | 143 | return; |
@@ -149,7 +149,7 @@ static inline void check_mult_sh(void) | |||
149 | for (i = 0; i < 8; i++) | 149 | for (i = 0; i < 8; i++) |
150 | if (v2[i] != w[i]) | 150 | if (v2[i] != w[i]) |
151 | fix = 0; | 151 | fix = 0; |
152 | 152 | ||
153 | if (fix == 1) { | 153 | if (fix == 1) { |
154 | printk("yes.\n"); | 154 | printk("yes.\n"); |
155 | return; | 155 | return; |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 4bb849582314..7685f8baf3f0 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -229,15 +229,9 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c) | |||
229 | break; | 229 | break; |
230 | case PRID_IMP_VR41XX: | 230 | case PRID_IMP_VR41XX: |
231 | switch (c->processor_id & 0xf0) { | 231 | switch (c->processor_id & 0xf0) { |
232 | #ifndef CONFIG_VR4181 | ||
233 | case PRID_REV_VR4111: | 232 | case PRID_REV_VR4111: |
234 | c->cputype = CPU_VR4111; | 233 | c->cputype = CPU_VR4111; |
235 | break; | 234 | break; |
236 | #else | ||
237 | case PRID_REV_VR4181: | ||
238 | c->cputype = CPU_VR4181; | ||
239 | break; | ||
240 | #endif | ||
241 | case PRID_REV_VR4121: | 235 | case PRID_REV_VR4121: |
242 | c->cputype = CPU_VR4121; | 236 | c->cputype = CPU_VR4121; |
243 | break; | 237 | break; |
diff --git a/arch/mips/kernel/gdb-low.S b/arch/mips/kernel/gdb-low.S index ece6ddaf7011..512bedbfa7b9 100644 --- a/arch/mips/kernel/gdb-low.S +++ b/arch/mips/kernel/gdb-low.S | |||
@@ -13,13 +13,13 @@ | |||
13 | #include <asm/stackframe.h> | 13 | #include <asm/stackframe.h> |
14 | #include <asm/gdb-stub.h> | 14 | #include <asm/gdb-stub.h> |
15 | 15 | ||
16 | #ifdef CONFIG_MIPS32 | 16 | #ifdef CONFIG_32BIT |
17 | #define DMFC0 mfc0 | 17 | #define DMFC0 mfc0 |
18 | #define DMTC0 mtc0 | 18 | #define DMTC0 mtc0 |
19 | #define LDC1 lwc1 | 19 | #define LDC1 lwc1 |
20 | #define SDC1 lwc1 | 20 | #define SDC1 lwc1 |
21 | #endif | 21 | #endif |
22 | #ifdef CONFIG_MIPS64 | 22 | #ifdef CONFIG_64BIT |
23 | #define DMFC0 dmfc0 | 23 | #define DMFC0 dmfc0 |
24 | #define DMTC0 dmtc0 | 24 | #define DMTC0 dmtc0 |
25 | #define LDC1 ldc1 | 25 | #define LDC1 ldc1 |
diff --git a/arch/mips/kernel/gdb-stub.c b/arch/mips/kernel/gdb-stub.c index 269889302a27..d3fd1ab14274 100644 --- a/arch/mips/kernel/gdb-stub.c +++ b/arch/mips/kernel/gdb-stub.c | |||
@@ -687,8 +687,8 @@ void handle_exception (struct gdb_regs *regs) | |||
687 | * acquire the big kgdb spinlock | 687 | * acquire the big kgdb spinlock |
688 | */ | 688 | */ |
689 | if (!spin_trylock(&kgdb_lock)) { | 689 | if (!spin_trylock(&kgdb_lock)) { |
690 | /* | 690 | /* |
691 | * some other CPU has the lock, we should go back to | 691 | * some other CPU has the lock, we should go back to |
692 | * receive the gdb_wait IPC | 692 | * receive the gdb_wait IPC |
693 | */ | 693 | */ |
694 | return; | 694 | return; |
@@ -703,7 +703,7 @@ void handle_exception (struct gdb_regs *regs) | |||
703 | async_bp.addr = 0; | 703 | async_bp.addr = 0; |
704 | } | 704 | } |
705 | 705 | ||
706 | /* | 706 | /* |
707 | * acquire the CPU spinlocks | 707 | * acquire the CPU spinlocks |
708 | */ | 708 | */ |
709 | for (i = num_online_cpus()-1; i >= 0; i--) | 709 | for (i = num_online_cpus()-1; i >= 0; i--) |
@@ -894,7 +894,7 @@ void handle_exception (struct gdb_regs *regs) | |||
894 | ptr = &input_buffer[1]; | 894 | ptr = &input_buffer[1]; |
895 | if (hexToLong(&ptr, &addr)) | 895 | if (hexToLong(&ptr, &addr)) |
896 | regs->cp0_epc = addr; | 896 | regs->cp0_epc = addr; |
897 | 897 | ||
898 | goto exit_kgdb_exception; | 898 | goto exit_kgdb_exception; |
899 | break; | 899 | break; |
900 | 900 | ||
@@ -1001,7 +1001,7 @@ void breakpoint(void) | |||
1001 | return; | 1001 | return; |
1002 | 1002 | ||
1003 | __asm__ __volatile__( | 1003 | __asm__ __volatile__( |
1004 | ".globl breakinst\n\t" | 1004 | ".globl breakinst\n\t" |
1005 | ".set\tnoreorder\n\t" | 1005 | ".set\tnoreorder\n\t" |
1006 | "nop\n" | 1006 | "nop\n" |
1007 | "breakinst:\tbreak\n\t" | 1007 | "breakinst:\tbreak\n\t" |
@@ -1014,7 +1014,7 @@ void breakpoint(void) | |||
1014 | void async_breakpoint(void) | 1014 | void async_breakpoint(void) |
1015 | { | 1015 | { |
1016 | __asm__ __volatile__( | 1016 | __asm__ __volatile__( |
1017 | ".globl async_breakinst\n\t" | 1017 | ".globl async_breakinst\n\t" |
1018 | ".set\tnoreorder\n\t" | 1018 | ".set\tnoreorder\n\t" |
1019 | "nop\n" | 1019 | "nop\n" |
1020 | "async_breakinst:\tbreak\n\t" | 1020 | "async_breakinst:\tbreak\n\t" |
diff --git a/arch/mips/kernel/genex.S b/arch/mips/kernel/genex.S index a5b0a389b063..e7f6c1b90806 100644 --- a/arch/mips/kernel/genex.S +++ b/arch/mips/kernel/genex.S | |||
@@ -54,7 +54,7 @@ NESTED(except_vec3_generic, 0, sp) | |||
54 | #endif | 54 | #endif |
55 | mfc0 k1, CP0_CAUSE | 55 | mfc0 k1, CP0_CAUSE |
56 | andi k1, k1, 0x7c | 56 | andi k1, k1, 0x7c |
57 | #ifdef CONFIG_MIPS64 | 57 | #ifdef CONFIG_64BIT |
58 | dsll k1, k1, 1 | 58 | dsll k1, k1, 1 |
59 | #endif | 59 | #endif |
60 | PTR_L k0, exception_handlers(k1) | 60 | PTR_L k0, exception_handlers(k1) |
@@ -81,7 +81,7 @@ NESTED(except_vec3_r4000, 0, sp) | |||
81 | beq k1, k0, handle_vced | 81 | beq k1, k0, handle_vced |
82 | li k0, 14<<2 | 82 | li k0, 14<<2 |
83 | beq k1, k0, handle_vcei | 83 | beq k1, k0, handle_vcei |
84 | #ifdef CONFIG_MIPS64 | 84 | #ifdef CONFIG_64BIT |
85 | dsll k1, k1, 1 | 85 | dsll k1, k1, 1 |
86 | #endif | 86 | #endif |
87 | .set pop | 87 | .set pop |
@@ -244,12 +244,12 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
244 | start with an n and gas will believe \n is ok ... */ | 244 | start with an n and gas will believe \n is ok ... */ |
245 | .macro __BUILD_verbose nexception | 245 | .macro __BUILD_verbose nexception |
246 | LONG_L a1, PT_EPC(sp) | 246 | LONG_L a1, PT_EPC(sp) |
247 | #if CONFIG_MIPS32 | 247 | #ifdef CONFIG_32BIT |
248 | PRINT("Got \nexception at %08lx\012") | 248 | PRINT("Got \nexception at %08lx\012") |
249 | #endif | 249 | #endif |
250 | #if CONFIG_MIPS64 | 250 | #ifdef CONFIG_64BIT |
251 | PRINT("Got \nexception at %016lx\012") | 251 | PRINT("Got \nexception at %016lx\012") |
252 | #endif | 252 | #endif |
253 | .endm | 253 | .endm |
254 | 254 | ||
255 | .macro __BUILD_count exception | 255 | .macro __BUILD_count exception |
@@ -293,7 +293,7 @@ NESTED(nmi_handler, PT_SIZE, sp) | |||
293 | BUILD_HANDLER mcheck mcheck cli verbose /* #24 */ | 293 | BUILD_HANDLER mcheck mcheck cli verbose /* #24 */ |
294 | BUILD_HANDLER reserved reserved sti verbose /* others */ | 294 | BUILD_HANDLER reserved reserved sti verbose /* others */ |
295 | 295 | ||
296 | #ifdef CONFIG_MIPS64 | 296 | #ifdef CONFIG_64BIT |
297 | /* A temporary overflow handler used by check_daddi(). */ | 297 | /* A temporary overflow handler used by check_daddi(). */ |
298 | 298 | ||
299 | __INIT | 299 | __INIT |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index a64e87d22014..2a1b45d66f04 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -107,7 +107,7 @@ | |||
107 | .endm | 107 | .endm |
108 | 108 | ||
109 | .macro setup_c0_status_pri | 109 | .macro setup_c0_status_pri |
110 | #ifdef CONFIG_MIPS64 | 110 | #ifdef CONFIG_64BIT |
111 | setup_c0_status ST0_KX 0 | 111 | setup_c0_status ST0_KX 0 |
112 | #else | 112 | #else |
113 | setup_c0_status 0 0 | 113 | setup_c0_status 0 0 |
@@ -115,7 +115,7 @@ | |||
115 | .endm | 115 | .endm |
116 | 116 | ||
117 | .macro setup_c0_status_sec | 117 | .macro setup_c0_status_sec |
118 | #ifdef CONFIG_MIPS64 | 118 | #ifdef CONFIG_64BIT |
119 | setup_c0_status ST0_KX ST0_BEV | 119 | setup_c0_status ST0_KX ST0_BEV |
120 | #else | 120 | #else |
121 | setup_c0_status 0 ST0_BEV | 121 | setup_c0_status 0 ST0_BEV |
@@ -215,7 +215,7 @@ NESTED(smp_bootstrap, 16, sp) | |||
215 | * slightly different layout ... | 215 | * slightly different layout ... |
216 | */ | 216 | */ |
217 | page swapper_pg_dir, _PGD_ORDER | 217 | page swapper_pg_dir, _PGD_ORDER |
218 | #ifdef CONFIG_MIPS64 | 218 | #ifdef CONFIG_64BIT |
219 | page invalid_pmd_table, _PMD_ORDER | 219 | page invalid_pmd_table, _PMD_ORDER |
220 | #endif | 220 | #endif |
221 | page invalid_pte_table, _PTE_ORDER | 221 | page invalid_pte_table, _PTE_ORDER |
diff --git a/arch/mips/kernel/ioctl32.c b/arch/mips/kernel/ioctl32.c index 519cd5d0aebb..c069719ff0d8 100644 --- a/arch/mips/kernel/ioctl32.c +++ b/arch/mips/kernel/ioctl32.c | |||
@@ -27,7 +27,7 @@ long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg); | |||
27 | #include "compat_ioctl.c" | 27 | #include "compat_ioctl.c" |
28 | 28 | ||
29 | typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); | 29 | typedef int (* ioctl32_handler_t)(unsigned int, unsigned int, unsigned long, struct file *); |
30 | 30 | ||
31 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) | 31 | #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL((cmd),sys_ioctl) |
32 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL }, | 32 | #define HANDLE_IOCTL(cmd,handler) { (cmd), (ioctl32_handler_t)(handler), NULL }, |
33 | #define IOCTL_TABLE_START \ | 33 | #define IOCTL_TABLE_START \ |
diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c index 441157a1f994..7d93992e462c 100644 --- a/arch/mips/kernel/irq.c +++ b/arch/mips/kernel/irq.c | |||
@@ -77,7 +77,7 @@ int show_interrupts(struct seq_file *p, void *v) | |||
77 | if (i < NR_IRQS) { | 77 | if (i < NR_IRQS) { |
78 | spin_lock_irqsave(&irq_desc[i].lock, flags); | 78 | spin_lock_irqsave(&irq_desc[i].lock, flags); |
79 | action = irq_desc[i].action; | 79 | action = irq_desc[i].action; |
80 | if (!action) | 80 | if (!action) |
81 | goto skip; | 81 | goto skip; |
82 | seq_printf(p, "%3d: ",i); | 82 | seq_printf(p, "%3d: ",i); |
83 | #ifndef CONFIG_SMP | 83 | #ifndef CONFIG_SMP |
diff --git a/arch/mips/kernel/linux32.c b/arch/mips/kernel/linux32.c index 993abc868e54..4613219dd73e 100644 --- a/arch/mips/kernel/linux32.c +++ b/arch/mips/kernel/linux32.c | |||
@@ -313,7 +313,7 @@ asmlinkage int sys32_sysinfo(struct sysinfo32 *info) | |||
313 | struct sysinfo s; | 313 | struct sysinfo s; |
314 | int ret, err; | 314 | int ret, err; |
315 | mm_segment_t old_fs = get_fs (); | 315 | mm_segment_t old_fs = get_fs (); |
316 | 316 | ||
317 | set_fs (KERNEL_DS); | 317 | set_fs (KERNEL_DS); |
318 | ret = sys_sysinfo(&s); | 318 | ret = sys_sysinfo(&s); |
319 | set_fs (old_fs); | 319 | set_fs (old_fs); |
@@ -560,7 +560,7 @@ struct ipc64_perm32 { | |||
560 | compat_gid_t gid; | 560 | compat_gid_t gid; |
561 | compat_uid_t cuid; | 561 | compat_uid_t cuid; |
562 | compat_gid_t cgid; | 562 | compat_gid_t cgid; |
563 | compat_mode_t mode; | 563 | compat_mode_t mode; |
564 | unsigned short seq; | 564 | unsigned short seq; |
565 | unsigned short __pad1; | 565 | unsigned short __pad1; |
566 | unsigned int __unused1; | 566 | unsigned int __unused1; |
@@ -1334,17 +1334,17 @@ asmlinkage int sys32_sendfile(int out_fd, int in_fd, compat_off_t *offset, | |||
1334 | mm_segment_t old_fs = get_fs(); | 1334 | mm_segment_t old_fs = get_fs(); |
1335 | int ret; | 1335 | int ret; |
1336 | off_t of; | 1336 | off_t of; |
1337 | 1337 | ||
1338 | if (offset && get_user(of, offset)) | 1338 | if (offset && get_user(of, offset)) |
1339 | return -EFAULT; | 1339 | return -EFAULT; |
1340 | 1340 | ||
1341 | set_fs(KERNEL_DS); | 1341 | set_fs(KERNEL_DS); |
1342 | ret = sys_sendfile(out_fd, in_fd, offset ? &of : NULL, count); | 1342 | ret = sys_sendfile(out_fd, in_fd, offset ? &of : NULL, count); |
1343 | set_fs(old_fs); | 1343 | set_fs(old_fs); |
1344 | 1344 | ||
1345 | if (offset && put_user(of, offset)) | 1345 | if (offset && put_user(of, offset)) |
1346 | return -EFAULT; | 1346 | return -EFAULT; |
1347 | 1347 | ||
1348 | return ret; | 1348 | return ret; |
1349 | } | 1349 | } |
1350 | 1350 | ||
@@ -1362,11 +1362,11 @@ static unsigned char socketcall_nargs[18]={AL(0),AL(3),AL(3),AL(3),AL(2),AL(3), | |||
1362 | #undef AL | 1362 | #undef AL |
1363 | 1363 | ||
1364 | /* | 1364 | /* |
1365 | * System call vectors. | 1365 | * System call vectors. |
1366 | * | 1366 | * |
1367 | * Argument checking cleaned up. Saved 20% in size. | 1367 | * Argument checking cleaned up. Saved 20% in size. |
1368 | * This function doesn't need to set the kernel lock because | 1368 | * This function doesn't need to set the kernel lock because |
1369 | * it is set by the callees. | 1369 | * it is set by the callees. |
1370 | */ | 1370 | */ |
1371 | 1371 | ||
1372 | asmlinkage long sys32_socketcall(int call, unsigned int *args32) | 1372 | asmlinkage long sys32_socketcall(int call, unsigned int *args32) |
@@ -1402,11 +1402,11 @@ asmlinkage long sys32_socketcall(int call, unsigned int *args32) | |||
1402 | /* copy_from_user should be SMP safe. */ | 1402 | /* copy_from_user should be SMP safe. */ |
1403 | if (copy_from_user(a, args32, socketcall_nargs[call])) | 1403 | if (copy_from_user(a, args32, socketcall_nargs[call])) |
1404 | return -EFAULT; | 1404 | return -EFAULT; |
1405 | 1405 | ||
1406 | a0=a[0]; | 1406 | a0=a[0]; |
1407 | a1=a[1]; | 1407 | a1=a[1]; |
1408 | 1408 | ||
1409 | switch(call) | 1409 | switch(call) |
1410 | { | 1410 | { |
1411 | case SYS_SOCKET: | 1411 | case SYS_SOCKET: |
1412 | err = sys_socket(a0,a1,a[2]); | 1412 | err = sys_socket(a0,a1,a[2]); |
diff --git a/arch/mips/kernel/mips_ksyms.c b/arch/mips/kernel/mips_ksyms.c index eed29fc9dc82..86e42c633f73 100644 --- a/arch/mips/kernel/mips_ksyms.c +++ b/arch/mips/kernel/mips_ksyms.c | |||
@@ -35,7 +35,7 @@ EXPORT_SYMBOL(memcpy); | |||
35 | EXPORT_SYMBOL(memmove); | 35 | EXPORT_SYMBOL(memmove); |
36 | EXPORT_SYMBOL(strcat); | 36 | EXPORT_SYMBOL(strcat); |
37 | EXPORT_SYMBOL(strchr); | 37 | EXPORT_SYMBOL(strchr); |
38 | #ifdef CONFIG_MIPS64 | 38 | #ifdef CONFIG_64BIT |
39 | EXPORT_SYMBOL(strncmp); | 39 | EXPORT_SYMBOL(strncmp); |
40 | #endif | 40 | #endif |
41 | EXPORT_SYMBOL(strlen); | 41 | EXPORT_SYMBOL(strlen); |
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 6e70c42c2058..e4f2f8011387 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -70,7 +70,7 @@ void start_thread(struct pt_regs * regs, unsigned long pc, unsigned long sp) | |||
70 | 70 | ||
71 | /* New thread loses kernel privileges. */ | 71 | /* New thread loses kernel privileges. */ |
72 | status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK); | 72 | status = regs->cp0_status & ~(ST0_CU0|ST0_CU1|KU_MASK); |
73 | #ifdef CONFIG_MIPS64 | 73 | #ifdef CONFIG_64BIT |
74 | status &= ~ST0_FR; | 74 | status &= ~ST0_FR; |
75 | status |= (current->thread.mflags & MF_32BIT_REGS) ? 0 : ST0_FR; | 75 | status |= (current->thread.mflags & MF_32BIT_REGS) ? 0 : ST0_FR; |
76 | #endif | 76 | #endif |
@@ -236,10 +236,10 @@ static int __init get_frame_info(struct mips_frame_info *info, void *func) | |||
236 | break; | 236 | break; |
237 | 237 | ||
238 | if ( | 238 | if ( |
239 | #ifdef CONFIG_MIPS32 | 239 | #ifdef CONFIG_32BIT |
240 | ip->i_format.opcode == sw_op && | 240 | ip->i_format.opcode == sw_op && |
241 | #endif | 241 | #endif |
242 | #ifdef CONFIG_MIPS64 | 242 | #ifdef CONFIG_64BIT |
243 | ip->i_format.opcode == sd_op && | 243 | ip->i_format.opcode == sd_op && |
244 | #endif | 244 | #endif |
245 | ip->i_format.rs == 29) | 245 | ip->i_format.rs == 29) |
@@ -353,7 +353,7 @@ schedule_timeout_caller: | |||
353 | 353 | ||
354 | out: | 354 | out: |
355 | 355 | ||
356 | #ifdef CONFIG_MIPS64 | 356 | #ifdef CONFIG_64BIT |
357 | if (current->thread.mflags & MF_32BIT_REGS) /* Kludge for 32-bit ps */ | 357 | if (current->thread.mflags & MF_32BIT_REGS) /* Kludge for 32-bit ps */ |
358 | pc &= 0xffffffffUL; | 358 | pc &= 0xffffffffUL; |
359 | #endif | 359 | #endif |
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c index 92e70ca3bff9..0b571a5b4b83 100644 --- a/arch/mips/kernel/ptrace.c +++ b/arch/mips/kernel/ptrace.c | |||
@@ -124,7 +124,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
124 | if (tsk_used_math(child)) { | 124 | if (tsk_used_math(child)) { |
125 | fpureg_t *fregs = get_fpu_regs(child); | 125 | fpureg_t *fregs = get_fpu_regs(child); |
126 | 126 | ||
127 | #ifdef CONFIG_MIPS32 | 127 | #ifdef CONFIG_32BIT |
128 | /* | 128 | /* |
129 | * The odd registers are actually the high | 129 | * The odd registers are actually the high |
130 | * order bits of the values stored in the even | 130 | * order bits of the values stored in the even |
@@ -135,7 +135,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
135 | else | 135 | else |
136 | tmp = (unsigned long) (fregs[(addr - 32)] & 0xffffffff); | 136 | tmp = (unsigned long) (fregs[(addr - 32)] & 0xffffffff); |
137 | #endif | 137 | #endif |
138 | #ifdef CONFIG_MIPS64 | 138 | #ifdef CONFIG_64BIT |
139 | tmp = fregs[addr - FPR_BASE]; | 139 | tmp = fregs[addr - FPR_BASE]; |
140 | #endif | 140 | #endif |
141 | } else { | 141 | } else { |
@@ -213,7 +213,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
213 | sizeof(child->thread.fpu.hard)); | 213 | sizeof(child->thread.fpu.hard)); |
214 | child->thread.fpu.hard.fcr31 = 0; | 214 | child->thread.fpu.hard.fcr31 = 0; |
215 | } | 215 | } |
216 | #ifdef CONFIG_MIPS32 | 216 | #ifdef CONFIG_32BIT |
217 | /* | 217 | /* |
218 | * The odd registers are actually the high order bits | 218 | * The odd registers are actually the high order bits |
219 | * of the values stored in the even registers - unless | 219 | * of the values stored in the even registers - unless |
@@ -227,7 +227,7 @@ asmlinkage int sys_ptrace(long request, long pid, long addr, long data) | |||
227 | fregs[addr - FPR_BASE] |= data; | 227 | fregs[addr - FPR_BASE] |= data; |
228 | } | 228 | } |
229 | #endif | 229 | #endif |
230 | #ifdef CONFIG_MIPS64 | 230 | #ifdef CONFIG_64BIT |
231 | fregs[addr - FPR_BASE] = data; | 231 | fregs[addr - FPR_BASE] = data; |
232 | #endif | 232 | #endif |
233 | break; | 233 | break; |
@@ -304,14 +304,14 @@ out: | |||
304 | static inline int audit_arch(void) | 304 | static inline int audit_arch(void) |
305 | { | 305 | { |
306 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 306 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
307 | #ifdef CONFIG_MIPS64 | 307 | #ifdef CONFIG_64BIT |
308 | if (!(current->thread.mflags & MF_32BIT_REGS)) | 308 | if (!(current->thread.mflags & MF_32BIT_REGS)) |
309 | return AUDIT_ARCH_MIPSEL64; | 309 | return AUDIT_ARCH_MIPSEL64; |
310 | #endif /* MIPS64 */ | 310 | #endif /* MIPS64 */ |
311 | return AUDIT_ARCH_MIPSEL; | 311 | return AUDIT_ARCH_MIPSEL; |
312 | 312 | ||
313 | #else /* big endian... */ | 313 | #else /* big endian... */ |
314 | #ifdef CONFIG_MIPS64 | 314 | #ifdef CONFIG_64BIT |
315 | if (!(current->thread.mflags & MF_32BIT_REGS)) | 315 | if (!(current->thread.mflags & MF_32BIT_REGS)) |
316 | return AUDIT_ARCH_MIPS64; | 316 | return AUDIT_ARCH_MIPS64; |
317 | #endif /* MIPS64 */ | 317 | #endif /* MIPS64 */ |
diff --git a/arch/mips/kernel/r2300_switch.S b/arch/mips/kernel/r2300_switch.S index 243e7b629af6..f10019640ee9 100644 --- a/arch/mips/kernel/r2300_switch.S +++ b/arch/mips/kernel/r2300_switch.S | |||
@@ -35,7 +35,7 @@ | |||
35 | /* | 35 | /* |
36 | * FPU context is saved iff the process has used it's FPU in the current | 36 | * FPU context is saved iff the process has used it's FPU in the current |
37 | * time slice as indicated by TIF_USEDFPU. In any case, the CU1 bit for user | 37 | * time slice as indicated by TIF_USEDFPU. In any case, the CU1 bit for user |
38 | * space STATUS register should be 0, so that a process *always* starts its | 38 | * space STATUS register should be 0, so that a process *always* starts its |
39 | * userland with FPU disabled after each context switch. | 39 | * userland with FPU disabled after each context switch. |
40 | * | 40 | * |
41 | * FPU will be enabled as soon as the process accesses FPU again, through | 41 | * FPU will be enabled as soon as the process accesses FPU again, through |
@@ -55,7 +55,7 @@ LEAF(resume) | |||
55 | cpu_save_nonscratch a0 | 55 | cpu_save_nonscratch a0 |
56 | sw ra, THREAD_REG31(a0) | 56 | sw ra, THREAD_REG31(a0) |
57 | 57 | ||
58 | /* | 58 | /* |
59 | * check if we need to save FPU registers | 59 | * check if we need to save FPU registers |
60 | */ | 60 | */ |
61 | lw t3, TASK_THREAD_INFO(a0) | 61 | lw t3, TASK_THREAD_INFO(a0) |
diff --git a/arch/mips/kernel/r4k_fpu.S b/arch/mips/kernel/r4k_fpu.S index ebb643d8d14c..aba665bcb386 100644 --- a/arch/mips/kernel/r4k_fpu.S +++ b/arch/mips/kernel/r4k_fpu.S | |||
@@ -36,7 +36,7 @@ | |||
36 | LEAF(_save_fp_context) | 36 | LEAF(_save_fp_context) |
37 | cfc1 t1, fcr31 | 37 | cfc1 t1, fcr31 |
38 | 38 | ||
39 | #ifdef CONFIG_MIPS64 | 39 | #ifdef CONFIG_64BIT |
40 | /* Store the 16 odd double precision registers */ | 40 | /* Store the 16 odd double precision registers */ |
41 | EX sdc1 $f1, SC_FPREGS+8(a0) | 41 | EX sdc1 $f1, SC_FPREGS+8(a0) |
42 | EX sdc1 $f3, SC_FPREGS+24(a0) | 42 | EX sdc1 $f3, SC_FPREGS+24(a0) |
@@ -118,7 +118,7 @@ LEAF(_save_fp_context32) | |||
118 | */ | 118 | */ |
119 | LEAF(_restore_fp_context) | 119 | LEAF(_restore_fp_context) |
120 | EX lw t0, SC_FPC_CSR(a0) | 120 | EX lw t0, SC_FPC_CSR(a0) |
121 | #ifdef CONFIG_MIPS64 | 121 | #ifdef CONFIG_64BIT |
122 | EX ldc1 $f1, SC_FPREGS+8(a0) | 122 | EX ldc1 $f1, SC_FPREGS+8(a0) |
123 | EX ldc1 $f3, SC_FPREGS+24(a0) | 123 | EX ldc1 $f3, SC_FPREGS+24(a0) |
124 | EX ldc1 $f5, SC_FPREGS+40(a0) | 124 | EX ldc1 $f5, SC_FPREGS+40(a0) |
diff --git a/arch/mips/kernel/r4k_switch.S b/arch/mips/kernel/r4k_switch.S index 1fc3b2eb12bd..e02b7722ccb8 100644 --- a/arch/mips/kernel/r4k_switch.S +++ b/arch/mips/kernel/r4k_switch.S | |||
@@ -33,7 +33,7 @@ | |||
33 | /* | 33 | /* |
34 | * FPU context is saved iff the process has used it's FPU in the current | 34 | * FPU context is saved iff the process has used it's FPU in the current |
35 | * time slice as indicated by _TIF_USEDFPU. In any case, the CU1 bit for user | 35 | * time slice as indicated by _TIF_USEDFPU. In any case, the CU1 bit for user |
36 | * space STATUS register should be 0, so that a process *always* starts its | 36 | * space STATUS register should be 0, so that a process *always* starts its |
37 | * userland with FPU disabled after each context switch. | 37 | * userland with FPU disabled after each context switch. |
38 | * | 38 | * |
39 | * FPU will be enabled as soon as the process accesses FPU again, through | 39 | * FPU will be enabled as soon as the process accesses FPU again, through |
@@ -105,7 +105,7 @@ | |||
105 | * Save a thread's fp context. | 105 | * Save a thread's fp context. |
106 | */ | 106 | */ |
107 | LEAF(_save_fp) | 107 | LEAF(_save_fp) |
108 | #ifdef CONFIG_MIPS64 | 108 | #ifdef CONFIG_64BIT |
109 | mfc0 t1, CP0_STATUS | 109 | mfc0 t1, CP0_STATUS |
110 | #endif | 110 | #endif |
111 | fpu_save_double a0 t1 t0 t2 # clobbers t1 | 111 | fpu_save_double a0 t1 t0 t2 # clobbers t1 |
@@ -142,7 +142,7 @@ LEAF(_init_fpu) | |||
142 | 142 | ||
143 | li t1, -1 # SNaN | 143 | li t1, -1 # SNaN |
144 | 144 | ||
145 | #ifdef CONFIG_MIPS64 | 145 | #ifdef CONFIG_64BIT |
146 | sll t0, t0, 5 | 146 | sll t0, t0, 5 |
147 | bgez t0, 1f # 16 / 32 register mode? | 147 | bgez t0, 1f # 16 / 32 register mode? |
148 | 148 | ||
@@ -164,7 +164,7 @@ LEAF(_init_fpu) | |||
164 | dmtc1 t1, $f31 | 164 | dmtc1 t1, $f31 |
165 | 1: | 165 | 1: |
166 | #endif | 166 | #endif |
167 | 167 | ||
168 | #ifdef CONFIG_CPU_MIPS32 | 168 | #ifdef CONFIG_CPU_MIPS32 |
169 | mtc1 t1, $f0 | 169 | mtc1 t1, $f0 |
170 | mtc1 t1, $f1 | 170 | mtc1 t1, $f1 |
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index 3a240e3e004c..12b531c295c4 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -241,7 +241,7 @@ static inline int parse_rd_cmdline(unsigned long* rd_start, unsigned long* rd_en | |||
241 | if (*tmp) | 241 | if (*tmp) |
242 | strcat(command_line, tmp); | 242 | strcat(command_line, tmp); |
243 | 243 | ||
244 | #ifdef CONFIG_MIPS64 | 244 | #ifdef CONFIG_64BIT |
245 | /* HACK: Guess if the sign extension was forgotten */ | 245 | /* HACK: Guess if the sign extension was forgotten */ |
246 | if (start > 0x0000000080000000 && start < 0x00000000ffffffff) | 246 | if (start > 0x0000000080000000 && start < 0x00000000ffffffff) |
247 | start |= 0xffffffff00000000; | 247 | start |= 0xffffffff00000000; |
@@ -446,7 +446,7 @@ static inline void resource_init(void) | |||
446 | { | 446 | { |
447 | int i; | 447 | int i; |
448 | 448 | ||
449 | #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) | 449 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
450 | /* | 450 | /* |
451 | * The 64bit code in 32bit object format trick can't represent | 451 | * The 64bit code in 32bit object format trick can't represent |
452 | * 64bit wide relocations for linker script symbols. | 452 | * 64bit wide relocations for linker script symbols. |
diff --git a/arch/mips/kernel/signal32.c b/arch/mips/kernel/signal32.c index f6875f023a29..8ddfbd8d425a 100644 --- a/arch/mips/kernel/signal32.c +++ b/arch/mips/kernel/signal32.c | |||
@@ -558,7 +558,7 @@ static inline int setup_sigcontext32(struct pt_regs *regs, | |||
558 | if (!used_math()) | 558 | if (!used_math()) |
559 | goto out; | 559 | goto out; |
560 | 560 | ||
561 | /* | 561 | /* |
562 | * Save FPU state to signal context. Signal handler will "inherit" | 562 | * Save FPU state to signal context. Signal handler will "inherit" |
563 | * current FPU state. | 563 | * current FPU state. |
564 | */ | 564 | */ |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index 56c36e42e0a6..a53b1ed7b386 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -924,7 +924,7 @@ void __init per_cpu_trap_init(void) | |||
924 | * flag that some firmware may have left set and the TS bit (for | 924 | * flag that some firmware may have left set and the TS bit (for |
925 | * IP27). Set XX for ISA IV code to work. | 925 | * IP27). Set XX for ISA IV code to work. |
926 | */ | 926 | */ |
927 | #ifdef CONFIG_MIPS64 | 927 | #ifdef CONFIG_64BIT |
928 | status_set |= ST0_FR|ST0_KX|ST0_SX|ST0_UX; | 928 | status_set |= ST0_FR|ST0_KX|ST0_SX|ST0_UX; |
929 | #endif | 929 | #endif |
930 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) | 930 | if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV) |
diff --git a/arch/mips/kernel/unaligned.c b/arch/mips/kernel/unaligned.c index 3f24a1d45865..36c5212e0928 100644 --- a/arch/mips/kernel/unaligned.c +++ b/arch/mips/kernel/unaligned.c | |||
@@ -240,7 +240,7 @@ static inline int emulate_load_store_insn(struct pt_regs *regs, | |||
240 | break; | 240 | break; |
241 | 241 | ||
242 | case lwu_op: | 242 | case lwu_op: |
243 | #ifdef CONFIG_MIPS64 | 243 | #ifdef CONFIG_64BIT |
244 | /* | 244 | /* |
245 | * A 32-bit kernel might be running on a 64-bit processor. But | 245 | * A 32-bit kernel might be running on a 64-bit processor. But |
246 | * if we're on a 32-bit processor and an i-cache incoherency | 246 | * if we're on a 32-bit processor and an i-cache incoherency |
@@ -278,13 +278,13 @@ static inline int emulate_load_store_insn(struct pt_regs *regs, | |||
278 | *newvalue = value; | 278 | *newvalue = value; |
279 | *regptr = ®s->regs[insn.i_format.rt]; | 279 | *regptr = ®s->regs[insn.i_format.rt]; |
280 | break; | 280 | break; |
281 | #endif /* CONFIG_MIPS64 */ | 281 | #endif /* CONFIG_64BIT */ |
282 | 282 | ||
283 | /* Cannot handle 64-bit instructions in 32-bit kernel */ | 283 | /* Cannot handle 64-bit instructions in 32-bit kernel */ |
284 | goto sigill; | 284 | goto sigill; |
285 | 285 | ||
286 | case ld_op: | 286 | case ld_op: |
287 | #ifdef CONFIG_MIPS64 | 287 | #ifdef CONFIG_64BIT |
288 | /* | 288 | /* |
289 | * A 32-bit kernel might be running on a 64-bit processor. But | 289 | * A 32-bit kernel might be running on a 64-bit processor. But |
290 | * if we're on a 32-bit processor and an i-cache incoherency | 290 | * if we're on a 32-bit processor and an i-cache incoherency |
@@ -320,7 +320,7 @@ static inline int emulate_load_store_insn(struct pt_regs *regs, | |||
320 | *newvalue = value; | 320 | *newvalue = value; |
321 | *regptr = ®s->regs[insn.i_format.rt]; | 321 | *regptr = ®s->regs[insn.i_format.rt]; |
322 | break; | 322 | break; |
323 | #endif /* CONFIG_MIPS64 */ | 323 | #endif /* CONFIG_64BIT */ |
324 | 324 | ||
325 | /* Cannot handle 64-bit instructions in 32-bit kernel */ | 325 | /* Cannot handle 64-bit instructions in 32-bit kernel */ |
326 | goto sigill; | 326 | goto sigill; |
@@ -392,7 +392,7 @@ static inline int emulate_load_store_insn(struct pt_regs *regs, | |||
392 | break; | 392 | break; |
393 | 393 | ||
394 | case sd_op: | 394 | case sd_op: |
395 | #ifdef CONFIG_MIPS64 | 395 | #ifdef CONFIG_64BIT |
396 | /* | 396 | /* |
397 | * A 32-bit kernel might be running on a 64-bit processor. But | 397 | * A 32-bit kernel might be running on a 64-bit processor. But |
398 | * if we're on a 32-bit processor and an i-cache incoherency | 398 | * if we're on a 32-bit processor and an i-cache incoherency |
@@ -428,7 +428,7 @@ static inline int emulate_load_store_insn(struct pt_regs *regs, | |||
428 | if (res) | 428 | if (res) |
429 | goto fault; | 429 | goto fault; |
430 | break; | 430 | break; |
431 | #endif /* CONFIG_MIPS64 */ | 431 | #endif /* CONFIG_64BIT */ |
432 | 432 | ||
433 | /* Cannot handle 64-bit instructions in 32-bit kernel */ | 433 | /* Cannot handle 64-bit instructions in 32-bit kernel */ |
434 | goto sigill; | 434 | goto sigill; |
diff --git a/arch/mips/kernel/vmlinux.lds.S b/arch/mips/kernel/vmlinux.lds.S index e830d788c106..482ac310c937 100644 --- a/arch/mips/kernel/vmlinux.lds.S +++ b/arch/mips/kernel/vmlinux.lds.S | |||
@@ -15,7 +15,7 @@ SECTIONS | |||
15 | /* This is the value for an Origin kernel, taken from an IRIX kernel. */ | 15 | /* This is the value for an Origin kernel, taken from an IRIX kernel. */ |
16 | /* . = 0xc00000000001c000; */ | 16 | /* . = 0xc00000000001c000; */ |
17 | 17 | ||
18 | /* Set the vaddr for the text segment to a value | 18 | /* Set the vaddr for the text segment to a value |
19 | >= 0xa800 0000 0001 9000 if no symmon is going to configured | 19 | >= 0xa800 0000 0001 9000 if no symmon is going to configured |
20 | >= 0xa800 0000 0030 0000 otherwise */ | 20 | >= 0xa800 0000 0030 0000 otherwise */ |
21 | 21 | ||
diff --git a/arch/mips/lasat/at93c.c b/arch/mips/lasat/at93c.c index f6add041ebec..ca26e554615e 100644 --- a/arch/mips/lasat/at93c.c +++ b/arch/mips/lasat/at93c.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Atmel AT93C46 serial eeprom driver | 2 | * Atmel AT93C46 serial eeprom driver |
3 | * | 3 | * |
4 | * Brian Murphy <brian.murphy@eicon.com> | 4 | * Brian Murphy <brian.murphy@eicon.com> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
@@ -21,12 +21,12 @@ | |||
21 | 21 | ||
22 | struct at93c_defs *at93c; | 22 | struct at93c_defs *at93c; |
23 | 23 | ||
24 | static void at93c_reg_write(u32 val) | 24 | static void at93c_reg_write(u32 val) |
25 | { | 25 | { |
26 | *at93c->reg = val; | 26 | *at93c->reg = val; |
27 | } | 27 | } |
28 | 28 | ||
29 | static u32 at93c_reg_read(void) | 29 | static u32 at93c_reg_read(void) |
30 | { | 30 | { |
31 | u32 tmp = *at93c->reg; | 31 | u32 tmp = *at93c->reg; |
32 | return tmp; | 32 | return tmp; |
@@ -81,7 +81,7 @@ static u8 at93c_read_byte(void) | |||
81 | } | 81 | } |
82 | 82 | ||
83 | static void at93c_write_bits(u32 data, int size) | 83 | static void at93c_write_bits(u32 data, int size) |
84 | { | 84 | { |
85 | int i; | 85 | int i; |
86 | int shift = size - 1; | 86 | int shift = size - 1; |
87 | u32 mask = (1 << shift); | 87 | u32 mask = (1 << shift); |
@@ -90,7 +90,7 @@ static void at93c_write_bits(u32 data, int size) | |||
90 | at93c_write_databit((data & mask) >> shift); | 90 | at93c_write_databit((data & mask) >> shift); |
91 | data <<= 1; | 91 | data <<= 1; |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | static void at93c_init_op(void) | 95 | static void at93c_init_op(void) |
96 | { | 96 | { |
@@ -104,8 +104,8 @@ static void at93c_end_op(void) | |||
104 | lasat_ndelay(250); | 104 | lasat_ndelay(250); |
105 | } | 105 | } |
106 | 106 | ||
107 | static void at93c_wait(void) | 107 | static void at93c_wait(void) |
108 | { | 108 | { |
109 | at93c_init_op(); | 109 | at93c_init_op(); |
110 | while (!at93c_read_databit()) | 110 | while (!at93c_read_databit()) |
111 | ; | 111 | ; |
diff --git a/arch/mips/lasat/at93c.h b/arch/mips/lasat/at93c.h index a912ac2171b0..cfe2f99b1d44 100644 --- a/arch/mips/lasat/at93c.h +++ b/arch/mips/lasat/at93c.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Atmel AT93C46 serial eeprom driver | 2 | * Atmel AT93C46 serial eeprom driver |
3 | * | 3 | * |
4 | * Brian Murphy <brian.murphy@eicon.com> | 4 | * Brian Murphy <brian.murphy@eicon.com> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | 7 | ||
diff --git a/arch/mips/lasat/ds1603.c b/arch/mips/lasat/ds1603.c index 7bbf6cf923c9..9d7812e03dcd 100644 --- a/arch/mips/lasat/ds1603.c +++ b/arch/mips/lasat/ds1603.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Dallas Semiconductors 1603 RTC driver | 2 | * Dallas Semiconductors 1603 RTC driver |
3 | * | 3 | * |
4 | * Brian Murphy <brian@murphy.dk> | 4 | * Brian Murphy <brian@murphy.dk> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
@@ -20,12 +20,12 @@ | |||
20 | struct ds_defs *ds1603 = NULL; | 20 | struct ds_defs *ds1603 = NULL; |
21 | 21 | ||
22 | /* HW specific register functions */ | 22 | /* HW specific register functions */ |
23 | static void rtc_reg_write(unsigned long val) | 23 | static void rtc_reg_write(unsigned long val) |
24 | { | 24 | { |
25 | *ds1603->reg = val; | 25 | *ds1603->reg = val; |
26 | } | 26 | } |
27 | 27 | ||
28 | static unsigned long rtc_reg_read(void) | 28 | static unsigned long rtc_reg_read(void) |
29 | { | 29 | { |
30 | unsigned long tmp = *ds1603->reg; | 30 | unsigned long tmp = *ds1603->reg; |
31 | return tmp; | 31 | return tmp; |
@@ -80,7 +80,7 @@ static unsigned int rtc_read_databit(void) | |||
80 | { | 80 | { |
81 | unsigned int data; | 81 | unsigned int data; |
82 | 82 | ||
83 | data = (rtc_datareg_read() & (1 << ds1603->data_read_shift)) | 83 | data = (rtc_datareg_read() & (1 << ds1603->data_read_shift)) |
84 | >> ds1603->data_read_shift; | 84 | >> ds1603->data_read_shift; |
85 | rtc_cycle_clock(rtc_reg_read()); | 85 | rtc_cycle_clock(rtc_reg_read()); |
86 | return data; | 86 | return data; |
diff --git a/arch/mips/lasat/ds1603.h b/arch/mips/lasat/ds1603.h index 55f3b0423c20..c2e5c76a379d 100644 --- a/arch/mips/lasat/ds1603.h +++ b/arch/mips/lasat/ds1603.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Dallas Semiconductors 1603 RTC driver | 2 | * Dallas Semiconductors 1603 RTC driver |
3 | * | 3 | * |
4 | * Brian Murphy <brian@murphy.dk> | 4 | * Brian Murphy <brian@murphy.dk> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #ifndef __DS1603_H | 7 | #ifndef __DS1603_H |
diff --git a/arch/mips/lasat/image/Makefile b/arch/mips/lasat/image/Makefile index 18b6430f11be..35ecd6483ef6 100644 --- a/arch/mips/lasat/image/Makefile +++ b/arch/mips/lasat/image/Makefile | |||
@@ -21,7 +21,7 @@ LDSCRIPT= -L$(obj) -Tromscript.normal | |||
21 | HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ | 21 | HEAD_DEFINES := -D_kernel_start=0x$(KERNEL_START) \ |
22 | -D_kernel_entry=0x$(KERNEL_ENTRY) \ | 22 | -D_kernel_entry=0x$(KERNEL_ENTRY) \ |
23 | -D VERSION="\"$(Version)\"" \ | 23 | -D VERSION="\"$(Version)\"" \ |
24 | -D TIMESTAMP=$(shell date +%s) | 24 | -D TIMESTAMP=$(shell date +%s) |
25 | 25 | ||
26 | $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) | 26 | $(obj)/head.o: $(obj)/head.S $(KERNEL_IMAGE) |
27 | $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< | 27 | $(CC) -fno-pic $(HEAD_DEFINES) -I$(TOPDIR)/include -c -o $@ $< |
diff --git a/arch/mips/lasat/image/head.S b/arch/mips/lasat/image/head.S index 426bd7de17bb..efb95f2609c2 100644 --- a/arch/mips/lasat/image/head.S +++ b/arch/mips/lasat/image/head.S | |||
@@ -27,5 +27,5 @@ reldate: | |||
27 | .word TIMESTAMP | 27 | .word TIMESTAMP |
28 | 28 | ||
29 | .org 0x50 | 29 | .org 0x50 |
30 | release: | 30 | release: |
31 | .string VERSION | 31 | .string VERSION |
diff --git a/arch/mips/lasat/interrupt.c b/arch/mips/lasat/interrupt.c index 1148a2d20aa7..c90da1639440 100644 --- a/arch/mips/lasat/interrupt.c +++ b/arch/mips/lasat/interrupt.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | 15 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. | 16 | * 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. |
17 | * | 17 | * |
18 | * Routines for generic manipulation of the interrupts found on the | 18 | * Routines for generic manipulation of the interrupts found on the |
19 | * Lasat boards. | 19 | * Lasat boards. |
20 | */ | 20 | */ |
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
@@ -101,7 +101,7 @@ static unsigned long get_int_status_100(void) | |||
101 | return *lasat_int_status & *lasat_int_mask; | 101 | return *lasat_int_status & *lasat_int_mask; |
102 | } | 102 | } |
103 | 103 | ||
104 | static unsigned long get_int_status_200(void) | 104 | static unsigned long get_int_status_200(void) |
105 | { | 105 | { |
106 | unsigned long int_status; | 106 | unsigned long int_status; |
107 | 107 | ||
diff --git a/arch/mips/lasat/lasat_board.c b/arch/mips/lasat/lasat_board.c index 8c784bcf1111..fc9b0e2a6be1 100644 --- a/arch/mips/lasat/lasat_board.c +++ b/arch/mips/lasat/lasat_board.c | |||
@@ -67,7 +67,7 @@ static void init_flash_sizes(void) | |||
67 | 67 | ||
68 | if (mips_machtype == MACH_LASAT_100) { | 68 | if (mips_machtype == MACH_LASAT_100) { |
69 | lasat_board_info.li_flash_base = 0x1e000000; | 69 | lasat_board_info.li_flash_base = 0x1e000000; |
70 | 70 | ||
71 | lb[LASAT_MTD_BOOTLOADER] = 0x1e400000; | 71 | lb[LASAT_MTD_BOOTLOADER] = 0x1e400000; |
72 | 72 | ||
73 | if (lasat_board_info.li_flash_size > 0x200000) { | 73 | if (lasat_board_info.li_flash_size > 0x200000) { |
@@ -103,7 +103,7 @@ int lasat_init_board_info(void) | |||
103 | memset(&lasat_board_info, 0, sizeof(lasat_board_info)); | 103 | memset(&lasat_board_info, 0, sizeof(lasat_board_info)); |
104 | 104 | ||
105 | /* First read the EEPROM info */ | 105 | /* First read the EEPROM info */ |
106 | EEPROMRead(0, (unsigned char *)&lasat_board_info.li_eeprom_info, | 106 | EEPROMRead(0, (unsigned char *)&lasat_board_info.li_eeprom_info, |
107 | sizeof(struct lasat_eeprom_struct)); | 107 | sizeof(struct lasat_eeprom_struct)); |
108 | 108 | ||
109 | /* Check the CRC */ | 109 | /* Check the CRC */ |
@@ -188,7 +188,7 @@ int lasat_init_board_info(void) | |||
188 | case 0x1: | 188 | case 0x1: |
189 | lasat_board_info.li_cpu_hz = | 189 | lasat_board_info.li_cpu_hz = |
190 | lasat_board_info.li_bus_hz + | 190 | lasat_board_info.li_bus_hz + |
191 | (lasat_board_info.li_bus_hz >> 1); | 191 | (lasat_board_info.li_bus_hz >> 1); |
192 | break; | 192 | break; |
193 | case 0x2: | 193 | case 0x2: |
194 | lasat_board_info.li_cpu_hz = | 194 | lasat_board_info.li_cpu_hz = |
@@ -271,7 +271,7 @@ void lasat_write_eeprom_info(void) | |||
271 | lasat_board_info.li_eeprom_info.crc32 = crc; | 271 | lasat_board_info.li_eeprom_info.crc32 = crc; |
272 | 272 | ||
273 | /* Write the EEPROM info */ | 273 | /* Write the EEPROM info */ |
274 | EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info, | 274 | EEPROMWrite(0, (unsigned char *)&lasat_board_info.li_eeprom_info, |
275 | sizeof(struct lasat_eeprom_struct)); | 275 | sizeof(struct lasat_eeprom_struct)); |
276 | } | 276 | } |
277 | 277 | ||
diff --git a/arch/mips/lasat/picvue.c b/arch/mips/lasat/picvue.c index 5637cd153926..9ae82c3ffb07 100644 --- a/arch/mips/lasat/picvue.c +++ b/arch/mips/lasat/picvue.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Picvue PVC160206 display driver | 2 | * Picvue PVC160206 display driver |
3 | * | 3 | * |
4 | * Brian Murphy <brian@murphy.dk> | 4 | * Brian Murphy <brian@murphy.dk> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
@@ -24,12 +24,12 @@ struct pvc_defs *picvue = NULL; | |||
24 | 24 | ||
25 | DECLARE_MUTEX(pvc_sem); | 25 | DECLARE_MUTEX(pvc_sem); |
26 | 26 | ||
27 | static void pvc_reg_write(u32 val) | 27 | static void pvc_reg_write(u32 val) |
28 | { | 28 | { |
29 | *picvue->reg = val; | 29 | *picvue->reg = val; |
30 | } | 30 | } |
31 | 31 | ||
32 | static u32 pvc_reg_read(void) | 32 | static u32 pvc_reg_read(void) |
33 | { | 33 | { |
34 | u32 tmp = *picvue->reg; | 34 | u32 tmp = *picvue->reg; |
35 | return tmp; | 35 | return tmp; |
@@ -65,12 +65,12 @@ static u8 pvc_read_data(void) | |||
65 | { | 65 | { |
66 | u32 data = pvc_reg_read(); | 66 | u32 data = pvc_reg_read(); |
67 | u8 byte; | 67 | u8 byte; |
68 | data |= picvue->rw; | 68 | data |= picvue->rw; |
69 | data &= ~picvue->rs; | 69 | data &= ~picvue->rs; |
70 | pvc_reg_write(data); | 70 | pvc_reg_write(data); |
71 | ndelay(40); | 71 | ndelay(40); |
72 | byte = pvc_read_byte(data); | 72 | byte = pvc_read_byte(data); |
73 | data |= picvue->rs; | 73 | data |= picvue->rs; |
74 | pvc_reg_write(data); | 74 | pvc_reg_write(data); |
75 | return byte; | 75 | return byte; |
76 | } | 76 | } |
diff --git a/arch/mips/lasat/picvue.h b/arch/mips/lasat/picvue.h index 74a39039135d..2a96bf971897 100644 --- a/arch/mips/lasat/picvue.h +++ b/arch/mips/lasat/picvue.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Picvue PVC160206 display driver | 2 | * Picvue PVC160206 display driver |
3 | * | 3 | * |
4 | * Brian Murphy <brian.murphy@eicon.com> | 4 | * Brian Murphy <brian.murphy@eicon.com> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #include <asm/semaphore.h> | 7 | #include <asm/semaphore.h> |
diff --git a/arch/mips/lasat/picvue_proc.c b/arch/mips/lasat/picvue_proc.c index eaa2b4625124..cce7cddcdb08 100644 --- a/arch/mips/lasat/picvue_proc.c +++ b/arch/mips/lasat/picvue_proc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Picvue PVC160206 display driver | 2 | * Picvue PVC160206 display driver |
3 | * | 3 | * |
4 | * Brian Murphy <brian.murphy@eicon.com> | 4 | * Brian Murphy <brian.murphy@eicon.com> |
5 | * | 5 | * |
6 | */ | 6 | */ |
7 | #include <linux/kernel.h> | 7 | #include <linux/kernel.h> |
@@ -51,10 +51,10 @@ static int pvc_proc_read_line(char *page, char **start, | |||
51 | page += sprintf(page, "%s\n", pvc_lines[lineno]); | 51 | page += sprintf(page, "%s\n", pvc_lines[lineno]); |
52 | up(&pvc_sem); | 52 | up(&pvc_sem); |
53 | 53 | ||
54 | return page - origpage; | 54 | return page - origpage; |
55 | } | 55 | } |
56 | 56 | ||
57 | static int pvc_proc_write_line(struct file *file, const char *buffer, | 57 | static int pvc_proc_write_line(struct file *file, const char *buffer, |
58 | unsigned long count, void *data) | 58 | unsigned long count, void *data) |
59 | { | 59 | { |
60 | int origcount = count; | 60 | int origcount = count; |
@@ -119,7 +119,7 @@ static int pvc_proc_read_scroll(char *page, char **start, | |||
119 | page += sprintf(page, "%d\n", scroll_dir * scroll_interval); | 119 | page += sprintf(page, "%d\n", scroll_dir * scroll_interval); |
120 | up(&pvc_sem); | 120 | up(&pvc_sem); |
121 | 121 | ||
122 | return page - origpage; | 122 | return page - origpage; |
123 | } | 123 | } |
124 | 124 | ||
125 | 125 | ||
diff --git a/arch/mips/lasat/prom.c b/arch/mips/lasat/prom.c index ca62881c9e52..88c7ab871ec4 100644 --- a/arch/mips/lasat/prom.c +++ b/arch/mips/lasat/prom.c | |||
@@ -42,7 +42,7 @@ static void null_prom_putc(char c) | |||
42 | /* these are functions provided by the bootloader */ | 42 | /* these are functions provided by the bootloader */ |
43 | static void (* prom_putc)(char c) = null_prom_putc; | 43 | static void (* prom_putc)(char c) = null_prom_putc; |
44 | void (* prom_printf)(const char * fmt, ...) = null_prom_printf; | 44 | void (* prom_printf)(const char * fmt, ...) = null_prom_printf; |
45 | void (* prom_display)(const char *string, int pos, int clear) = | 45 | void (* prom_display)(const char *string, int pos, int clear) = |
46 | null_prom_display; | 46 | null_prom_display; |
47 | void (* prom_monitor)(void) = null_prom_monitor; | 47 | void (* prom_monitor)(void) = null_prom_monitor; |
48 | 48 | ||
diff --git a/arch/mips/lasat/reset.c b/arch/mips/lasat/reset.c index 37e4912ee1c8..8d7d7a454f9a 100644 --- a/arch/mips/lasat/reset.c +++ b/arch/mips/lasat/reset.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Thomas Horsten <thh@lasat.com> | 2 | * Thomas Horsten <thh@lasat.com> |
3 | * Copyright (C) 2000 LASAT Networks A/S. | 3 | * Copyright (C) 2000 LASAT Networks A/S. |
4 | * | 4 | * |
diff --git a/arch/mips/lasat/setup.c b/arch/mips/lasat/setup.c index e371ed5cbe34..f2604fab9a99 100644 --- a/arch/mips/lasat/setup.c +++ b/arch/mips/lasat/setup.c | |||
@@ -105,7 +105,7 @@ static int lasat_panic_prom_monitor(struct notifier_block *this, | |||
105 | return NOTIFY_DONE; | 105 | return NOTIFY_DONE; |
106 | } | 106 | } |
107 | 107 | ||
108 | static struct notifier_block lasat_panic_block[] = | 108 | static struct notifier_block lasat_panic_block[] = |
109 | { | 109 | { |
110 | { lasat_panic_display, NULL, INT_MAX }, | 110 | { lasat_panic_display, NULL, INT_MAX }, |
111 | { lasat_panic_prom_monitor, NULL, INT_MIN } | 111 | { lasat_panic_prom_monitor, NULL, INT_MIN } |
@@ -120,7 +120,7 @@ static void lasat_timer_setup(struct irqaction *irq) | |||
120 | { | 120 | { |
121 | 121 | ||
122 | write_c0_compare( | 122 | write_c0_compare( |
123 | read_c0_count() + | 123 | read_c0_count() + |
124 | mips_hpt_frequency / HZ); | 124 | mips_hpt_frequency / HZ); |
125 | change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5); | 125 | change_c0_status(ST0_IM, IE_IRQ0 | IE_IRQ5); |
126 | } | 126 | } |
diff --git a/arch/mips/lasat/sysctl.c b/arch/mips/lasat/sysctl.c index 1c0cc620a43f..8ff43a1c1e99 100644 --- a/arch/mips/lasat/sysctl.c +++ b/arch/mips/lasat/sysctl.c | |||
@@ -37,14 +37,14 @@ | |||
37 | 37 | ||
38 | static DECLARE_MUTEX(lasat_info_sem); | 38 | static DECLARE_MUTEX(lasat_info_sem); |
39 | 39 | ||
40 | /* Strategy function to write EEPROM after changing string entry */ | 40 | /* Strategy function to write EEPROM after changing string entry */ |
41 | int sysctl_lasatstring(ctl_table *table, int *name, int nlen, | 41 | int sysctl_lasatstring(ctl_table *table, int *name, int nlen, |
42 | void *oldval, size_t *oldlenp, | 42 | void *oldval, size_t *oldlenp, |
43 | void *newval, size_t newlen, void **context) | 43 | void *newval, size_t newlen, void **context) |
44 | { | 44 | { |
45 | int r; | 45 | int r; |
46 | down(&lasat_info_sem); | 46 | down(&lasat_info_sem); |
47 | r = sysctl_string(table, name, | 47 | r = sysctl_string(table, name, |
48 | nlen, oldval, oldlenp, newval, newlen, context); | 48 | nlen, oldval, oldlenp, newval, newlen, context); |
49 | if (r < 0) { | 49 | if (r < 0) { |
50 | up(&lasat_info_sem); | 50 | up(&lasat_info_sem); |
@@ -74,7 +74,7 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp, | |||
74 | return 0; | 74 | return 0; |
75 | } | 75 | } |
76 | 76 | ||
77 | /* proc function to write EEPROM after changing int entry */ | 77 | /* proc function to write EEPROM after changing int entry */ |
78 | int proc_dolasatint(ctl_table *table, int write, struct file *filp, | 78 | int proc_dolasatint(ctl_table *table, int write, struct file *filp, |
79 | void *buffer, size_t *lenp, loff_t *ppos) | 79 | void *buffer, size_t *lenp, loff_t *ppos) |
80 | { | 80 | { |
@@ -93,7 +93,7 @@ int proc_dolasatint(ctl_table *table, int write, struct file *filp, | |||
93 | static int rtctmp; | 93 | static int rtctmp; |
94 | 94 | ||
95 | #ifdef CONFIG_DS1603 | 95 | #ifdef CONFIG_DS1603 |
96 | /* proc function to read/write RealTime Clock */ | 96 | /* proc function to read/write RealTime Clock */ |
97 | int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, | 97 | int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, |
98 | void *buffer, size_t *lenp, loff_t *ppos) | 98 | void *buffer, size_t *lenp, loff_t *ppos) |
99 | { | 99 | { |
@@ -165,9 +165,9 @@ static char lasat_bcastaddr[16]; | |||
165 | void update_bcastaddr(void) | 165 | void update_bcastaddr(void) |
166 | { | 166 | { |
167 | unsigned int ip; | 167 | unsigned int ip; |
168 | 168 | ||
169 | ip = (lasat_board_info.li_eeprom_info.ipaddr & | 169 | ip = (lasat_board_info.li_eeprom_info.ipaddr & |
170 | lasat_board_info.li_eeprom_info.netmask) | | 170 | lasat_board_info.li_eeprom_info.netmask) | |
171 | ~lasat_board_info.li_eeprom_info.netmask; | 171 | ~lasat_board_info.li_eeprom_info.netmask; |
172 | 172 | ||
173 | sprintf(lasat_bcastaddr, "%d.%d.%d.%d", | 173 | sprintf(lasat_bcastaddr, "%d.%d.%d.%d", |
@@ -205,7 +205,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, | |||
205 | break; | 205 | break; |
206 | len++; | 206 | len++; |
207 | } | 207 | } |
208 | if (len >= sizeof(proc_lasat_ipbuf)-1) | 208 | if (len >= sizeof(proc_lasat_ipbuf)-1) |
209 | len = sizeof(proc_lasat_ipbuf) - 1; | 209 | len = sizeof(proc_lasat_ipbuf) - 1; |
210 | if (copy_from_user(proc_lasat_ipbuf, buffer, len)) | 210 | if (copy_from_user(proc_lasat_ipbuf, buffer, len)) |
211 | { | 211 | { |
@@ -249,8 +249,8 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, | |||
249 | } | 249 | } |
250 | #endif /* defined(CONFIG_INET) */ | 250 | #endif /* defined(CONFIG_INET) */ |
251 | 251 | ||
252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, | 252 | static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, |
253 | void *oldval, size_t *oldlenp, | 253 | void *oldval, size_t *oldlenp, |
254 | void *newval, size_t newlen, | 254 | void *newval, size_t newlen, |
255 | void **context) | 255 | void **context) |
256 | { | 256 | { |
@@ -293,7 +293,7 @@ int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp, | |||
293 | if (!strcmp(filp->f_dentry->d_name.name, "debugaccess")) | 293 | if (!strcmp(filp->f_dentry->d_name.name, "debugaccess")) |
294 | lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess; | 294 | lasat_board_info.li_eeprom_info.debugaccess = lasat_board_info.li_debugaccess; |
295 | } | 295 | } |
296 | lasat_write_eeprom_info(); | 296 | lasat_write_eeprom_info(); |
297 | up(&lasat_info_sem); | 297 | up(&lasat_info_sem); |
298 | return 0; | 298 | return 0; |
299 | } | 299 | } |
@@ -316,8 +316,8 @@ static ctl_table lasat_table[] = { | |||
316 | 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, | 316 | 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, |
317 | {LASAT_NETMASK, "netmask", &lasat_board_info.li_eeprom_info.netmask, sizeof(int), | 317 | {LASAT_NETMASK, "netmask", &lasat_board_info.li_eeprom_info.netmask, sizeof(int), |
318 | 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, | 318 | 0644, NULL, &proc_lasat_ip, &sysctl_lasat_intvec}, |
319 | {LASAT_BCAST, "bcastaddr", &lasat_bcastaddr, | 319 | {LASAT_BCAST, "bcastaddr", &lasat_bcastaddr, |
320 | sizeof(lasat_bcastaddr), 0600, NULL, | 320 | sizeof(lasat_bcastaddr), 0600, NULL, |
321 | &proc_dostring, &sysctl_string}, | 321 | &proc_dostring, &sysctl_string}, |
322 | #endif | 322 | #endif |
323 | {LASAT_PASSWORD, "passwd_hash", &lasat_board_info.li_eeprom_info.passwd_hash, sizeof(lasat_board_info.li_eeprom_info.passwd_hash), | 323 | {LASAT_PASSWORD, "passwd_hash", &lasat_board_info.li_eeprom_info.passwd_hash, sizeof(lasat_board_info.li_eeprom_info.passwd_hash), |
diff --git a/arch/mips/lib-32/Makefile b/arch/mips/lib-32/Makefile index fd6a2bafdfcf..ad285786e74b 100644 --- a/arch/mips/lib-32/Makefile +++ b/arch/mips/lib-32/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for MIPS-specific library files.. | 2 | # Makefile for MIPS-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y += csum_partial.o memset.o watch.o | 5 | lib-y += csum_partial.o memset.o watch.o |
6 | 6 | ||
7 | obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o | 7 | obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o |
8 | obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o | 8 | obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o |
diff --git a/arch/mips/lib-64/Makefile b/arch/mips/lib-64/Makefile index fd6a2bafdfcf..ad285786e74b 100644 --- a/arch/mips/lib-64/Makefile +++ b/arch/mips/lib-64/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for MIPS-specific library files.. | 2 | # Makefile for MIPS-specific library files.. |
3 | # | 3 | # |
4 | 4 | ||
5 | lib-y += csum_partial.o memset.o watch.o | 5 | lib-y += csum_partial.o memset.o watch.o |
6 | 6 | ||
7 | obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o | 7 | obj-$(CONFIG_CPU_MIPS32) += dump_tlb.o |
8 | obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o | 8 | obj-$(CONFIG_CPU_MIPS64) += dump_tlb.o |
diff --git a/arch/mips/lib/memcpy.S b/arch/mips/lib/memcpy.S index afa8eae18ff6..90ee8d43261f 100644 --- a/arch/mips/lib/memcpy.S +++ b/arch/mips/lib/memcpy.S | |||
@@ -79,7 +79,7 @@ | |||
79 | /* | 79 | /* |
80 | * Only on the 64-bit kernel we can made use of 64-bit registers. | 80 | * Only on the 64-bit kernel we can made use of 64-bit registers. |
81 | */ | 81 | */ |
82 | #ifdef CONFIG_MIPS64 | 82 | #ifdef CONFIG_64BIT |
83 | #define USE_DOUBLE | 83 | #define USE_DOUBLE |
84 | #endif | 84 | #endif |
85 | 85 | ||
@@ -101,7 +101,7 @@ | |||
101 | #define NBYTES 8 | 101 | #define NBYTES 8 |
102 | #define LOG_NBYTES 3 | 102 | #define LOG_NBYTES 3 |
103 | 103 | ||
104 | /* | 104 | /* |
105 | * As we are sharing code base with the mips32 tree (which use the o32 ABI | 105 | * As we are sharing code base with the mips32 tree (which use the o32 ABI |
106 | * register definitions). We need to redefine the register definitions from | 106 | * register definitions). We need to redefine the register definitions from |
107 | * the n64 ABI register naming to the o32 ABI register naming. | 107 | * the n64 ABI register naming to the o32 ABI register naming. |
@@ -118,7 +118,7 @@ | |||
118 | #define t5 $13 | 118 | #define t5 $13 |
119 | #define t6 $14 | 119 | #define t6 $14 |
120 | #define t7 $15 | 120 | #define t7 $15 |
121 | 121 | ||
122 | #else | 122 | #else |
123 | 123 | ||
124 | #define LOAD lw | 124 | #define LOAD lw |
diff --git a/arch/mips/math-emu/cp1emu.c b/arch/mips/math-emu/cp1emu.c index 20a552be02ee..99c550632d44 100644 --- a/arch/mips/math-emu/cp1emu.c +++ b/arch/mips/math-emu/cp1emu.c | |||
@@ -320,7 +320,7 @@ static int cop1Emulate(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx) | |||
320 | case cop1_op: | 320 | case cop1_op: |
321 | switch (MIPSInst_RS(ir)) { | 321 | switch (MIPSInst_RS(ir)) { |
322 | 322 | ||
323 | #if __mips64 && !defined(SINGLE_ONLY_FPU) | 323 | #if defined(__mips64) && !defined(SINGLE_ONLY_FPU) |
324 | case dmfc_op: | 324 | case dmfc_op: |
325 | /* copregister fs -> gpr[rt] */ | 325 | /* copregister fs -> gpr[rt] */ |
326 | if (MIPSInst_RT(ir) != 0) { | 326 | if (MIPSInst_RT(ir) != 0) { |
@@ -805,7 +805,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx, | |||
805 | ieee754dp d; | 805 | ieee754dp d; |
806 | ieee754sp s; | 806 | ieee754sp s; |
807 | int w; | 807 | int w; |
808 | #if __mips64 | 808 | #ifdef __mips64 |
809 | s64 l; | 809 | s64 l; |
810 | #endif | 810 | #endif |
811 | } rv; /* resulting value */ | 811 | } rv; /* resulting value */ |
@@ -950,7 +950,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx, | |||
950 | } | 950 | } |
951 | #endif /* __mips >= 2 */ | 951 | #endif /* __mips >= 2 */ |
952 | 952 | ||
953 | #if __mips64 && !defined(SINGLE_ONLY_FPU) | 953 | #if defined(__mips64) && !defined(SINGLE_ONLY_FPU) |
954 | case fcvtl_op:{ | 954 | case fcvtl_op:{ |
955 | ieee754sp fs; | 955 | ieee754sp fs; |
956 | 956 | ||
@@ -1125,7 +1125,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx, | |||
1125 | } | 1125 | } |
1126 | #endif | 1126 | #endif |
1127 | 1127 | ||
1128 | #if __mips64 && !defined(SINGLE_ONLY_FPU) | 1128 | #if defined(__mips64) && !defined(SINGLE_ONLY_FPU) |
1129 | case fcvtl_op:{ | 1129 | case fcvtl_op:{ |
1130 | ieee754dp fs; | 1130 | ieee754dp fs; |
1131 | 1131 | ||
@@ -1203,7 +1203,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx, | |||
1203 | break; | 1203 | break; |
1204 | } | 1204 | } |
1205 | 1205 | ||
1206 | #if __mips64 && !defined(SINGLE_ONLY_FPU) | 1206 | #if defined(__mips64) && !defined(SINGLE_ONLY_FPU) |
1207 | case l_fmt:{ | 1207 | case l_fmt:{ |
1208 | switch (MIPSInst_FUNC(ir)) { | 1208 | switch (MIPSInst_FUNC(ir)) { |
1209 | case fcvts_op: | 1209 | case fcvts_op: |
@@ -1267,7 +1267,7 @@ static int fpu_emu(struct pt_regs *xcp, struct mips_fpu_soft_struct *ctx, | |||
1267 | case w_fmt: | 1267 | case w_fmt: |
1268 | SITOREG(rv.w, MIPSInst_FD(ir)); | 1268 | SITOREG(rv.w, MIPSInst_FD(ir)); |
1269 | break; | 1269 | break; |
1270 | #if __mips64 && !defined(SINGLE_ONLY_FPU) | 1270 | #if defined(__mips64) && !defined(SINGLE_ONLY_FPU) |
1271 | case l_fmt: | 1271 | case l_fmt: |
1272 | DITOREG(rv.l, MIPSInst_FD(ir)); | 1272 | DITOREG(rv.l, MIPSInst_FD(ir)); |
1273 | break; | 1273 | break; |
diff --git a/arch/mips/math-emu/kernel_linkage.c b/arch/mips/math-emu/kernel_linkage.c index 04397fec30fc..4002f0cf79f3 100644 --- a/arch/mips/math-emu/kernel_linkage.c +++ b/arch/mips/math-emu/kernel_linkage.c | |||
@@ -86,7 +86,7 @@ int fpu_emulator_restore_context(struct sigcontext *sc) | |||
86 | return err; | 86 | return err; |
87 | } | 87 | } |
88 | 88 | ||
89 | #ifdef CONFIG_MIPS64 | 89 | #ifdef CONFIG_64BIT |
90 | /* | 90 | /* |
91 | * This is the o32 version | 91 | * This is the o32 version |
92 | */ | 92 | */ |
diff --git a/arch/mips/mips-boards/atlas/atlas_int.c b/arch/mips/mips-boards/atlas/atlas_int.c index 8f1d875217a2..19d4b0792460 100644 --- a/arch/mips/mips-boards/atlas/atlas_int.c +++ b/arch/mips/mips-boards/atlas/atlas_int.c | |||
@@ -122,7 +122,7 @@ void __init arch_init_irq(void) | |||
122 | int i; | 122 | int i; |
123 | 123 | ||
124 | atlas_hw0_icregs = (struct atlas_ictrl_regs *)ioremap (ATLAS_ICTRL_REGS_BASE, sizeof(struct atlas_ictrl_regs *)); | 124 | atlas_hw0_icregs = (struct atlas_ictrl_regs *)ioremap (ATLAS_ICTRL_REGS_BASE, sizeof(struct atlas_ictrl_regs *)); |
125 | 125 | ||
126 | /* | 126 | /* |
127 | * Mask out all interrupt by writing "1" to all bit position in | 127 | * Mask out all interrupt by writing "1" to all bit position in |
128 | * the interrupt reset reg. | 128 | * the interrupt reset reg. |
diff --git a/arch/mips/mips-boards/generic/init.c b/arch/mips/mips-boards/generic/init.c index 31caf0603a3f..311155d1d3ed 100644 --- a/arch/mips/mips-boards/generic/init.c +++ b/arch/mips/mips-boards/generic/init.c | |||
@@ -200,7 +200,7 @@ void __init kgdb_config (void) | |||
200 | generic_putDebugChar = saa9730_putDebugChar; | 200 | generic_putDebugChar = saa9730_putDebugChar; |
201 | generic_getDebugChar = saa9730_getDebugChar; | 201 | generic_getDebugChar = saa9730_getDebugChar; |
202 | } | 202 | } |
203 | else | 203 | else |
204 | #endif | 204 | #endif |
205 | { | 205 | { |
206 | speed = rs_kgdb_hook(line, speed); | 206 | speed = rs_kgdb_hook(line, speed); |
@@ -243,7 +243,7 @@ void __init prom_init(void) | |||
243 | mips_revision_corid = MIPS_REVISION_CORID; | 243 | mips_revision_corid = MIPS_REVISION_CORID; |
244 | 244 | ||
245 | if (mips_revision_corid == MIPS_REVISION_CORID_CORE_EMUL) { | 245 | if (mips_revision_corid == MIPS_REVISION_CORID_CORE_EMUL) { |
246 | if (BONITO_PCIDID == 0x0001df53 || | 246 | if (BONITO_PCIDID == 0x0001df53 || |
247 | BONITO_PCIDID == 0x0003df53) | 247 | BONITO_PCIDID == 0x0003df53) |
248 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_BON; | 248 | mips_revision_corid = MIPS_REVISION_CORID_CORE_EMUL_BON; |
249 | else | 249 | else |
@@ -310,7 +310,7 @@ void __init prom_init(void) | |||
310 | case MIPS_REVISION_CORID_CORE_MSC: | 310 | case MIPS_REVISION_CORID_CORE_MSC: |
311 | case MIPS_REVISION_CORID_CORE_FPGA2: | 311 | case MIPS_REVISION_CORID_CORE_FPGA2: |
312 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: | 312 | case MIPS_REVISION_CORID_CORE_EMUL_MSC: |
313 | _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); | 313 | _pcictrl_msc = (unsigned long)ioremap(MIPS_MSC01_PCI_REG_BASE, 0x2000); |
314 | 314 | ||
315 | #ifdef CONFIG_CPU_LITTLE_ENDIAN | 315 | #ifdef CONFIG_CPU_LITTLE_ENDIAN |
316 | MSC_WRITE(MSC01_PCI_SWAP, MSC01_PCI_SWAP_NOSWAP); | 316 | MSC_WRITE(MSC01_PCI_SWAP, MSC01_PCI_SWAP_NOSWAP); |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index fe7fc17305a6..16315444dd5a 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -89,7 +89,7 @@ static unsigned int __init estimate_cpu_frequency(void) | |||
89 | * really calculate the timer frequency | 89 | * really calculate the timer frequency |
90 | * For now we hardwire the SEAD board frequency to 12MHz. | 90 | * For now we hardwire the SEAD board frequency to 12MHz. |
91 | */ | 91 | */ |
92 | 92 | ||
93 | if ((prid == (PRID_COMP_MIPS | PRID_IMP_20KC)) || | 93 | if ((prid == (PRID_COMP_MIPS | PRID_IMP_20KC)) || |
94 | (prid == (PRID_COMP_MIPS | PRID_IMP_25KF))) | 94 | (prid == (PRID_COMP_MIPS | PRID_IMP_25KF))) |
95 | count = 12000000; | 95 | count = 12000000; |
diff --git a/arch/mips/mips-boards/malta/malta_setup.c b/arch/mips/mips-boards/malta/malta_setup.c index 3377e66de9eb..df6db6419ae9 100644 --- a/arch/mips/mips-boards/malta/malta_setup.c +++ b/arch/mips/mips-boards/malta/malta_setup.c | |||
@@ -149,15 +149,15 @@ static int __init malta_setup(void) | |||
149 | argptr = prom_getcmdline(); | 149 | argptr = prom_getcmdline(); |
150 | if (strstr(argptr, "iobcuncached")) { | 150 | if (strstr(argptr, "iobcuncached")) { |
151 | BONITO_PCICACHECTRL &= ~BONITO_PCICACHECTRL_IOBCCOH_EN; | 151 | BONITO_PCICACHECTRL &= ~BONITO_PCICACHECTRL_IOBCCOH_EN; |
152 | BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG & | 152 | BONITO_PCIMEMBASECFG = BONITO_PCIMEMBASECFG & |
153 | ~(BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | | 153 | ~(BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | |
154 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); | 154 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); |
155 | printk("Disabled Bonito IOBC coherency\n"); | 155 | printk("Disabled Bonito IOBC coherency\n"); |
156 | } | 156 | } |
157 | else { | 157 | else { |
158 | BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_IOBCCOH_EN; | 158 | BONITO_PCICACHECTRL |= BONITO_PCICACHECTRL_IOBCCOH_EN; |
159 | BONITO_PCIMEMBASECFG |= | 159 | BONITO_PCIMEMBASECFG |= |
160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | | 160 | (BONITO_PCIMEMBASECFG_MEMBASE0_CACHED | |
161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); | 161 | BONITO_PCIMEMBASECFG_MEMBASE1_CACHED); |
162 | printk("Disabled Bonito IOBC coherency\n"); | 162 | printk("Disabled Bonito IOBC coherency\n"); |
163 | } | 163 | } |
diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile index f61e038b4440..b56a0abdc3d4 100644 --- a/arch/mips/mm/Makefile +++ b/arch/mips/mm/Makefile | |||
@@ -5,8 +5,8 @@ | |||
5 | obj-y += cache.o extable.o fault.o init.o pgtable.o \ | 5 | obj-y += cache.o extable.o fault.o init.o pgtable.o \ |
6 | tlbex.o tlbex-fault.o | 6 | tlbex.o tlbex-fault.o |
7 | 7 | ||
8 | obj-$(CONFIG_MIPS32) += ioremap.o pgtable-32.o | 8 | obj-$(CONFIG_32BIT) += ioremap.o pgtable-32.o |
9 | obj-$(CONFIG_MIPS64) += pgtable-64.o | 9 | obj-$(CONFIG_64BIT) += pgtable-64.o |
10 | obj-$(CONFIG_HIGHMEM) += highmem.o | 10 | obj-$(CONFIG_HIGHMEM) += highmem.o |
11 | 11 | ||
12 | obj-$(CONFIG_CPU_MIPS32) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o | 12 | obj-$(CONFIG_CPU_MIPS32) += c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index a03ebb2cba67..5ea84bc98c6a 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -126,13 +126,13 @@ static inline void tx49_blast_icache32(void) | |||
126 | 126 | ||
127 | CACHE32_UNROLL32_ALIGN2; | 127 | CACHE32_UNROLL32_ALIGN2; |
128 | /* I'm in even chunk. blast odd chunks */ | 128 | /* I'm in even chunk. blast odd chunks */ |
129 | for (ws = 0; ws < ws_end; ws += ws_inc) | 129 | for (ws = 0; ws < ws_end; ws += ws_inc) |
130 | for (addr = start + 0x400; addr < end; addr += 0x400 * 2) | 130 | for (addr = start + 0x400; addr < end; addr += 0x400 * 2) |
131 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 131 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
132 | CACHE32_UNROLL32_ALIGN; | 132 | CACHE32_UNROLL32_ALIGN; |
133 | /* I'm in odd chunk. blast even chunks */ | 133 | /* I'm in odd chunk. blast even chunks */ |
134 | for (ws = 0; ws < ws_end; ws += ws_inc) | 134 | for (ws = 0; ws < ws_end; ws += ws_inc) |
135 | for (addr = start; addr < end; addr += 0x400 * 2) | 135 | for (addr = start; addr < end; addr += 0x400 * 2) |
136 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 136 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
137 | } | 137 | } |
138 | 138 | ||
@@ -156,13 +156,13 @@ static inline void tx49_blast_icache32_page_indexed(unsigned long page) | |||
156 | 156 | ||
157 | CACHE32_UNROLL32_ALIGN2; | 157 | CACHE32_UNROLL32_ALIGN2; |
158 | /* I'm in even chunk. blast odd chunks */ | 158 | /* I'm in even chunk. blast odd chunks */ |
159 | for (ws = 0; ws < ws_end; ws += ws_inc) | 159 | for (ws = 0; ws < ws_end; ws += ws_inc) |
160 | for (addr = start + 0x400; addr < end; addr += 0x400 * 2) | 160 | for (addr = start + 0x400; addr < end; addr += 0x400 * 2) |
161 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 161 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
162 | CACHE32_UNROLL32_ALIGN; | 162 | CACHE32_UNROLL32_ALIGN; |
163 | /* I'm in odd chunk. blast even chunks */ | 163 | /* I'm in odd chunk. blast even chunks */ |
164 | for (ws = 0; ws < ws_end; ws += ws_inc) | 164 | for (ws = 0; ws < ws_end; ws += ws_inc) |
165 | for (addr = start; addr < end; addr += 0x400 * 2) | 165 | for (addr = start; addr < end; addr += 0x400 * 2) |
166 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 166 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
167 | } | 167 | } |
168 | 168 | ||
@@ -723,10 +723,10 @@ static void local_r4k_flush_cache_sigtramp(void * arg) | |||
723 | ".set push\n\t" | 723 | ".set push\n\t" |
724 | ".set noat\n\t" | 724 | ".set noat\n\t" |
725 | ".set mips3\n\t" | 725 | ".set mips3\n\t" |
726 | #ifdef CONFIG_MIPS32 | 726 | #ifdef CONFIG_32BIT |
727 | "la $at,1f\n\t" | 727 | "la $at,1f\n\t" |
728 | #endif | 728 | #endif |
729 | #ifdef CONFIG_MIPS64 | 729 | #ifdef CONFIG_64BIT |
730 | "dla $at,1f\n\t" | 730 | "dla $at,1f\n\t" |
731 | #endif | 731 | #endif |
732 | "cache %0,($at)\n\t" | 732 | "cache %0,($at)\n\t" |
diff --git a/arch/mips/mm/c-sb1.c b/arch/mips/mm/c-sb1.c index ab30afd63b32..502f68c664b2 100644 --- a/arch/mips/mm/c-sb1.c +++ b/arch/mips/mm/c-sb1.c | |||
@@ -270,7 +270,7 @@ static void local_sb1_flush_icache_range(unsigned long start, | |||
270 | __sb1_writeback_inv_dcache_all(); | 270 | __sb1_writeback_inv_dcache_all(); |
271 | else | 271 | else |
272 | __sb1_writeback_inv_dcache_range(start, end); | 272 | __sb1_writeback_inv_dcache_range(start, end); |
273 | 273 | ||
274 | /* Just flush the whole icache if the range is big enough */ | 274 | /* Just flush the whole icache if the range is big enough */ |
275 | if ((end - start) > icache_range_cutoff) | 275 | if ((end - start) > icache_range_cutoff) |
276 | __sb1_flush_icache_all(); | 276 | __sb1_flush_icache_all(); |
diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c index 13d96d62764e..7166ffe63502 100644 --- a/arch/mips/mm/cerr-sb1.c +++ b/arch/mips/mm/cerr-sb1.c | |||
@@ -25,7 +25,7 @@ | |||
25 | #include <asm/sibyte/sb1250_regs.h> | 25 | #include <asm/sibyte/sb1250_regs.h> |
26 | #include <asm/sibyte/sb1250_scd.h> | 26 | #include <asm/sibyte/sb1250_scd.h> |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | /* SB1 definitions */ | 29 | /* SB1 definitions */ |
30 | 30 | ||
31 | /* XXX should come from config1 XXX */ | 31 | /* XXX should come from config1 XXX */ |
@@ -136,14 +136,14 @@ static inline void breakout_cerrd(unsigned int val) | |||
136 | 136 | ||
137 | #ifndef CONFIG_SIBYTE_BUS_WATCHER | 137 | #ifndef CONFIG_SIBYTE_BUS_WATCHER |
138 | 138 | ||
139 | static void check_bus_watcher(void) | 139 | static void check_bus_watcher(void) |
140 | { | 140 | { |
141 | uint32_t status, l2_err, memio_err; | 141 | uint32_t status, l2_err, memio_err; |
142 | 142 | ||
143 | /* Destructive read, clears register and interrupt */ | 143 | /* Destructive read, clears register and interrupt */ |
144 | status = csr_in32(IOADDR(A_SCD_BUS_ERR_STATUS)); | 144 | status = csr_in32(IOADDR(A_SCD_BUS_ERR_STATUS)); |
145 | /* Bit 31 is always on, but there's no #define for that */ | 145 | /* Bit 31 is always on, but there's no #define for that */ |
146 | if (status & ~(1UL << 31)) { | 146 | if (status & ~(1UL << 31)) { |
147 | l2_err = csr_in32(IOADDR(A_BUS_L2_ERRORS)); | 147 | l2_err = csr_in32(IOADDR(A_BUS_L2_ERRORS)); |
148 | memio_err = csr_in32(IOADDR(A_BUS_MEM_IO_ERRORS)); | 148 | memio_err = csr_in32(IOADDR(A_BUS_MEM_IO_ERRORS)); |
149 | prom_printf("Bus watcher error counters: %08x %08x\n", l2_err, memio_err); | 149 | prom_printf("Bus watcher error counters: %08x %08x\n", l2_err, memio_err); |
@@ -153,14 +153,14 @@ static void check_bus_watcher(void) | |||
153 | (int)(G_SCD_BERR_TID(status) >> 6), | 153 | (int)(G_SCD_BERR_TID(status) >> 6), |
154 | (int)G_SCD_BERR_RID(status), | 154 | (int)G_SCD_BERR_RID(status), |
155 | (int)G_SCD_BERR_DCODE(status)); | 155 | (int)G_SCD_BERR_DCODE(status)); |
156 | } else { | 156 | } else { |
157 | prom_printf("Bus watcher indicates no error\n"); | 157 | prom_printf("Bus watcher indicates no error\n"); |
158 | } | 158 | } |
159 | } | 159 | } |
160 | #else | 160 | #else |
161 | extern void check_bus_watcher(void); | 161 | extern void check_bus_watcher(void); |
162 | #endif | 162 | #endif |
163 | 163 | ||
164 | asmlinkage void sb1_cache_error(void) | 164 | asmlinkage void sb1_cache_error(void) |
165 | { | 165 | { |
166 | uint64_t cerr_dpa; | 166 | uint64_t cerr_dpa; |
diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c index 9895e32b0fce..59e54f12212e 100644 --- a/arch/mips/mm/dma-noncoherent.c +++ b/arch/mips/mm/dma-noncoherent.c | |||
@@ -162,7 +162,7 @@ int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | |||
162 | 162 | ||
163 | for (i = 0; i < nents; i++, sg++) { | 163 | for (i = 0; i < nents; i++, sg++) { |
164 | unsigned long addr; | 164 | unsigned long addr; |
165 | 165 | ||
166 | addr = (unsigned long) page_address(sg->page); | 166 | addr = (unsigned long) page_address(sg->page); |
167 | if (addr) | 167 | if (addr) |
168 | __dma_sync(addr + sg->offset, sg->length, direction); | 168 | __dma_sync(addr + sg->offset, sg->length, direction); |
@@ -230,9 +230,9 @@ void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, | |||
230 | size_t size, enum dma_data_direction direction) | 230 | size_t size, enum dma_data_direction direction) |
231 | { | 231 | { |
232 | unsigned long addr; | 232 | unsigned long addr; |
233 | 233 | ||
234 | BUG_ON(direction == DMA_NONE); | 234 | BUG_ON(direction == DMA_NONE); |
235 | 235 | ||
236 | addr = dma_handle + PAGE_OFFSET; | 236 | addr = dma_handle + PAGE_OFFSET; |
237 | __dma_sync(addr, size, direction); | 237 | __dma_sync(addr, size, direction); |
238 | } | 238 | } |
@@ -282,9 +282,9 @@ void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, | |||
282 | enum dma_data_direction direction) | 282 | enum dma_data_direction direction) |
283 | { | 283 | { |
284 | int i; | 284 | int i; |
285 | 285 | ||
286 | BUG_ON(direction == DMA_NONE); | 286 | BUG_ON(direction == DMA_NONE); |
287 | 287 | ||
288 | /* Make sure that gcc doesn't leave the empty loop body. */ | 288 | /* Make sure that gcc doesn't leave the empty loop body. */ |
289 | for (i = 0; i < nelems; i++, sg++) | 289 | for (i = 0; i < nelems; i++, sg++) |
290 | __dma_sync((unsigned long)page_address(sg->page), | 290 | __dma_sync((unsigned long)page_address(sg->page), |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index 9c9a271c8a3a..dc6830b10fab 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -96,7 +96,7 @@ static void __init kmap_init(void) | |||
96 | kmap_prot = PAGE_KERNEL; | 96 | kmap_prot = PAGE_KERNEL; |
97 | } | 97 | } |
98 | 98 | ||
99 | #ifdef CONFIG_MIPS64 | 99 | #ifdef CONFIG_64BIT |
100 | static void __init fixrange_init(unsigned long start, unsigned long end, | 100 | static void __init fixrange_init(unsigned long start, unsigned long end, |
101 | pgd_t *pgd_base) | 101 | pgd_t *pgd_base) |
102 | { | 102 | { |
@@ -125,7 +125,7 @@ static void __init fixrange_init(unsigned long start, unsigned long end, | |||
125 | j = 0; | 125 | j = 0; |
126 | } | 126 | } |
127 | } | 127 | } |
128 | #endif /* CONFIG_MIPS64 */ | 128 | #endif /* CONFIG_64BIT */ |
129 | #endif /* CONFIG_HIGHMEM */ | 129 | #endif /* CONFIG_HIGHMEM */ |
130 | 130 | ||
131 | #ifndef CONFIG_NEED_MULTIPLE_NODES | 131 | #ifndef CONFIG_NEED_MULTIPLE_NODES |
@@ -258,7 +258,7 @@ void __init mem_init(void) | |||
258 | #ifdef CONFIG_BLK_DEV_INITRD | 258 | #ifdef CONFIG_BLK_DEV_INITRD |
259 | void free_initrd_mem(unsigned long start, unsigned long end) | 259 | void free_initrd_mem(unsigned long start, unsigned long end) |
260 | { | 260 | { |
261 | #ifdef CONFIG_MIPS64 | 261 | #ifdef CONFIG_64BIT |
262 | /* Switch from KSEG0 to XKPHYS addresses */ | 262 | /* Switch from KSEG0 to XKPHYS addresses */ |
263 | start = (unsigned long)phys_to_virt(CPHYSADDR(start)); | 263 | start = (unsigned long)phys_to_virt(CPHYSADDR(start)); |
264 | end = (unsigned long)phys_to_virt(CPHYSADDR(end)); | 264 | end = (unsigned long)phys_to_virt(CPHYSADDR(end)); |
@@ -286,7 +286,7 @@ void free_initmem(void) | |||
286 | 286 | ||
287 | addr = (unsigned long) &__init_begin; | 287 | addr = (unsigned long) &__init_begin; |
288 | while (addr < (unsigned long) &__init_end) { | 288 | while (addr < (unsigned long) &__init_end) { |
289 | #ifdef CONFIG_MIPS64 | 289 | #ifdef CONFIG_64BIT |
290 | page = PAGE_OFFSET | CPHYSADDR(addr); | 290 | page = PAGE_OFFSET | CPHYSADDR(addr); |
291 | #else | 291 | #else |
292 | page = addr; | 292 | page = addr; |
diff --git a/arch/mips/mm/pg-sb1.c b/arch/mips/mm/pg-sb1.c index 59d131b5e536..1b6df7133c1e 100644 --- a/arch/mips/mm/pg-sb1.c +++ b/arch/mips/mm/pg-sb1.c | |||
@@ -114,7 +114,7 @@ static inline void copy_page_cpu(void *to, void *from) | |||
114 | " pref " SB1_PREF_STORE_STREAMED_HINT ", -64(%1)\n" | 114 | " pref " SB1_PREF_STORE_STREAMED_HINT ", -64(%1)\n" |
115 | " pref " SB1_PREF_LOAD_STREAMED_HINT ", -32(%0)\n" | 115 | " pref " SB1_PREF_LOAD_STREAMED_HINT ", -32(%0)\n" |
116 | "1: pref " SB1_PREF_STORE_STREAMED_HINT ", -32(%1)\n" | 116 | "1: pref " SB1_PREF_STORE_STREAMED_HINT ", -32(%1)\n" |
117 | # ifdef CONFIG_MIPS64 | 117 | # ifdef CONFIG_64BIT |
118 | " ld $8, -128(%0) \n" /* Block copy a cacheline */ | 118 | " ld $8, -128(%0) \n" /* Block copy a cacheline */ |
119 | " ld $9, -120(%0) \n" | 119 | " ld $9, -120(%0) \n" |
120 | " ld $10, -112(%0) \n" | 120 | " ld $10, -112(%0) \n" |
@@ -148,7 +148,7 @@ static inline void copy_page_cpu(void *to, void *from) | |||
148 | " daddiu %0, %0, -128 \n" | 148 | " daddiu %0, %0, -128 \n" |
149 | " daddiu %1, %1, -128 \n" | 149 | " daddiu %1, %1, -128 \n" |
150 | #endif | 150 | #endif |
151 | #ifdef CONFIG_MIPS64 | 151 | #ifdef CONFIG_64BIT |
152 | " ld $8, 0(%0) \n" /* Block copy a cacheline */ | 152 | " ld $8, 0(%0) \n" /* Block copy a cacheline */ |
153 | "1: ld $9, 8(%0) \n" | 153 | "1: ld $9, 8(%0) \n" |
154 | " ld $10, 16(%0) \n" | 154 | " ld $10, 16(%0) \n" |
@@ -178,7 +178,7 @@ static inline void copy_page_cpu(void *to, void *from) | |||
178 | " daddiu %0, %0, 32 \n" | 178 | " daddiu %0, %0, 32 \n" |
179 | " daddiu %1, %1, 32 \n" | 179 | " daddiu %1, %1, 32 \n" |
180 | " bnel %0, %2, 1b \n" | 180 | " bnel %0, %2, 1b \n" |
181 | #ifdef CONFIG_MIPS64 | 181 | #ifdef CONFIG_64BIT |
182 | " ld $8, 0(%0) \n" | 182 | " ld $8, 0(%0) \n" |
183 | #else | 183 | #else |
184 | " lw $2, 0(%0) \n" | 184 | " lw $2, 0(%0) \n" |
@@ -186,7 +186,7 @@ static inline void copy_page_cpu(void *to, void *from) | |||
186 | " .set pop \n" | 186 | " .set pop \n" |
187 | : "+r" (src), "+r" (dst) | 187 | : "+r" (src), "+r" (dst) |
188 | : "r" (end) | 188 | : "r" (end) |
189 | #ifdef CONFIG_MIPS64 | 189 | #ifdef CONFIG_64BIT |
190 | : "$8","$9","$10","$11","memory"); | 190 | : "$8","$9","$10","$11","memory"); |
191 | #else | 191 | #else |
192 | : "$2","$3","$6","$7","$8","$9","$10","$11","memory"); | 192 | : "$2","$3","$6","$7","$8","$9","$10","$11","memory"); |
@@ -198,7 +198,7 @@ static inline void copy_page_cpu(void *to, void *from) | |||
198 | 198 | ||
199 | /* | 199 | /* |
200 | * Pad descriptors to cacheline, since each is exclusively owned by a | 200 | * Pad descriptors to cacheline, since each is exclusively owned by a |
201 | * particular CPU. | 201 | * particular CPU. |
202 | */ | 202 | */ |
203 | typedef struct dmadscr_s { | 203 | typedef struct dmadscr_s { |
204 | u64 dscr_a; | 204 | u64 dscr_a; |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 87e229f4d3d5..6569be3983c7 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -448,7 +448,7 @@ L_LA(_r3000_write_probe_fail) | |||
448 | L_LA(_r3000_write_probe_ok) | 448 | L_LA(_r3000_write_probe_ok) |
449 | 449 | ||
450 | /* convenience macros for instructions */ | 450 | /* convenience macros for instructions */ |
451 | #ifdef CONFIG_MIPS64 | 451 | #ifdef CONFIG_64BIT |
452 | # define i_LW(buf, rs, rt, off) i_ld(buf, rs, rt, off) | 452 | # define i_LW(buf, rs, rt, off) i_ld(buf, rs, rt, off) |
453 | # define i_SW(buf, rs, rt, off) i_sd(buf, rs, rt, off) | 453 | # define i_SW(buf, rs, rt, off) i_sd(buf, rs, rt, off) |
454 | # define i_SLL(buf, rs, rt, sh) i_dsll(buf, rs, rt, sh) | 454 | # define i_SLL(buf, rs, rt, sh) i_dsll(buf, rs, rt, sh) |
@@ -486,7 +486,7 @@ L_LA(_r3000_write_probe_ok) | |||
486 | #define i_ssnop(buf) i_sll(buf, 0, 0, 1) | 486 | #define i_ssnop(buf) i_sll(buf, 0, 0, 1) |
487 | #define i_ehb(buf) i_sll(buf, 0, 0, 3) | 487 | #define i_ehb(buf) i_sll(buf, 0, 0, 3) |
488 | 488 | ||
489 | #ifdef CONFIG_MIPS64 | 489 | #ifdef CONFIG_64BIT |
490 | static __init int __attribute__((unused)) in_compat_space_p(long addr) | 490 | static __init int __attribute__((unused)) in_compat_space_p(long addr) |
491 | { | 491 | { |
492 | /* Is this address in 32bit compat space? */ | 492 | /* Is this address in 32bit compat space? */ |
@@ -516,7 +516,7 @@ static __init int rel_lo(long val) | |||
516 | 516 | ||
517 | static __init void i_LA_mostly(u32 **buf, unsigned int rs, long addr) | 517 | static __init void i_LA_mostly(u32 **buf, unsigned int rs, long addr) |
518 | { | 518 | { |
519 | #if CONFIG_MIPS64 | 519 | #ifdef CONFIG_64BIT |
520 | if (!in_compat_space_p(addr)) { | 520 | if (!in_compat_space_p(addr)) { |
521 | i_lui(buf, rs, rel_highest(addr)); | 521 | i_lui(buf, rs, rel_highest(addr)); |
522 | if (rel_higher(addr)) | 522 | if (rel_higher(addr)) |
@@ -682,7 +682,7 @@ static void il_bgezl(u32 **p, struct reloc **r, unsigned int reg, | |||
682 | #define C0_EPC 14 | 682 | #define C0_EPC 14 |
683 | #define C0_XCONTEXT 20 | 683 | #define C0_XCONTEXT 20 |
684 | 684 | ||
685 | #ifdef CONFIG_MIPS64 | 685 | #ifdef CONFIG_64BIT |
686 | # define GET_CONTEXT(buf, reg) i_MFC0(buf, reg, C0_XCONTEXT) | 686 | # define GET_CONTEXT(buf, reg) i_MFC0(buf, reg, C0_XCONTEXT) |
687 | #else | 687 | #else |
688 | # define GET_CONTEXT(buf, reg) i_MFC0(buf, reg, C0_CONTEXT) | 688 | # define GET_CONTEXT(buf, reg) i_MFC0(buf, reg, C0_CONTEXT) |
@@ -923,7 +923,7 @@ static __init void build_tlb_write_entry(u32 **p, struct label **l, | |||
923 | } | 923 | } |
924 | } | 924 | } |
925 | 925 | ||
926 | #ifdef CONFIG_MIPS64 | 926 | #ifdef CONFIG_64BIT |
927 | /* | 927 | /* |
928 | * TMP and PTR are scratch. | 928 | * TMP and PTR are scratch. |
929 | * TMP will be clobbered, PTR will hold the pmd entry. | 929 | * TMP will be clobbered, PTR will hold the pmd entry. |
@@ -1010,7 +1010,7 @@ build_get_pgd_vmalloc64(u32 **p, struct label **l, struct reloc **r, | |||
1010 | } | 1010 | } |
1011 | } | 1011 | } |
1012 | 1012 | ||
1013 | #else /* !CONFIG_MIPS64 */ | 1013 | #else /* !CONFIG_64BIT */ |
1014 | 1014 | ||
1015 | /* | 1015 | /* |
1016 | * TMP and PTR are scratch. | 1016 | * TMP and PTR are scratch. |
@@ -1038,7 +1038,7 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) | |||
1038 | i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ | 1038 | i_addu(p, ptr, ptr, tmp); /* add in pgd offset */ |
1039 | } | 1039 | } |
1040 | 1040 | ||
1041 | #endif /* !CONFIG_MIPS64 */ | 1041 | #endif /* !CONFIG_64BIT */ |
1042 | 1042 | ||
1043 | static __init void build_adjust_context(u32 **p, unsigned int ctx) | 1043 | static __init void build_adjust_context(u32 **p, unsigned int ctx) |
1044 | { | 1044 | { |
@@ -1159,7 +1159,7 @@ static void __init build_r4000_tlb_refill_handler(void) | |||
1159 | /* No need for i_nop */ | 1159 | /* No need for i_nop */ |
1160 | } | 1160 | } |
1161 | 1161 | ||
1162 | #ifdef CONFIG_MIPS64 | 1162 | #ifdef CONFIG_64BIT |
1163 | build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */ | 1163 | build_get_pmde64(&p, &l, &r, K0, K1); /* get pmd in K1 */ |
1164 | #else | 1164 | #else |
1165 | build_get_pgde32(&p, K0, K1); /* get pgd in K1 */ | 1165 | build_get_pgde32(&p, K0, K1); /* get pgd in K1 */ |
@@ -1171,7 +1171,7 @@ static void __init build_r4000_tlb_refill_handler(void) | |||
1171 | l_leave(&l, p); | 1171 | l_leave(&l, p); |
1172 | i_eret(&p); /* return from trap */ | 1172 | i_eret(&p); /* return from trap */ |
1173 | 1173 | ||
1174 | #ifdef CONFIG_MIPS64 | 1174 | #ifdef CONFIG_64BIT |
1175 | build_get_pgd_vmalloc64(&p, &l, &r, K0, K1); | 1175 | build_get_pgd_vmalloc64(&p, &l, &r, K0, K1); |
1176 | #endif | 1176 | #endif |
1177 | 1177 | ||
@@ -1182,7 +1182,7 @@ static void __init build_r4000_tlb_refill_handler(void) | |||
1182 | * need three, with the the second nop'ed and the third being | 1182 | * need three, with the the second nop'ed and the third being |
1183 | * unused. | 1183 | * unused. |
1184 | */ | 1184 | */ |
1185 | #ifdef CONFIG_MIPS32 | 1185 | #ifdef CONFIG_32BIT |
1186 | if ((p - tlb_handler) > 64) | 1186 | if ((p - tlb_handler) > 64) |
1187 | panic("TLB refill handler space exceeded"); | 1187 | panic("TLB refill handler space exceeded"); |
1188 | #else | 1188 | #else |
@@ -1195,12 +1195,12 @@ static void __init build_r4000_tlb_refill_handler(void) | |||
1195 | /* | 1195 | /* |
1196 | * Now fold the handler in the TLB refill handler space. | 1196 | * Now fold the handler in the TLB refill handler space. |
1197 | */ | 1197 | */ |
1198 | #ifdef CONFIG_MIPS32 | 1198 | #ifdef CONFIG_32BIT |
1199 | f = final_handler; | 1199 | f = final_handler; |
1200 | /* Simplest case, just copy the handler. */ | 1200 | /* Simplest case, just copy the handler. */ |
1201 | copy_handler(relocs, labels, tlb_handler, p, f); | 1201 | copy_handler(relocs, labels, tlb_handler, p, f); |
1202 | final_len = p - tlb_handler; | 1202 | final_len = p - tlb_handler; |
1203 | #else /* CONFIG_MIPS64 */ | 1203 | #else /* CONFIG_64BIT */ |
1204 | f = final_handler + 32; | 1204 | f = final_handler + 32; |
1205 | if ((p - tlb_handler) <= 32) { | 1205 | if ((p - tlb_handler) <= 32) { |
1206 | /* Just copy the handler. */ | 1206 | /* Just copy the handler. */ |
@@ -1235,7 +1235,7 @@ static void __init build_r4000_tlb_refill_handler(void) | |||
1235 | copy_handler(relocs, labels, split, p, final_handler); | 1235 | copy_handler(relocs, labels, split, p, final_handler); |
1236 | final_len = (f - (final_handler + 32)) + (p - split); | 1236 | final_len = (f - (final_handler + 32)) + (p - split); |
1237 | } | 1237 | } |
1238 | #endif /* CONFIG_MIPS64 */ | 1238 | #endif /* CONFIG_64BIT */ |
1239 | 1239 | ||
1240 | resolve_relocs(relocs, labels); | 1240 | resolve_relocs(relocs, labels); |
1241 | printk("Synthesized TLB refill handler (%u instructions).\n", | 1241 | printk("Synthesized TLB refill handler (%u instructions).\n", |
@@ -1605,7 +1605,7 @@ build_r4000_tlbchange_handler_head(u32 **p, struct label **l, | |||
1605 | struct reloc **r, unsigned int pte, | 1605 | struct reloc **r, unsigned int pte, |
1606 | unsigned int ptr) | 1606 | unsigned int ptr) |
1607 | { | 1607 | { |
1608 | #ifdef CONFIG_MIPS64 | 1608 | #ifdef CONFIG_64BIT |
1609 | build_get_pmde64(p, l, r, pte, ptr); /* get pmd in ptr */ | 1609 | build_get_pmde64(p, l, r, pte, ptr); /* get pmd in ptr */ |
1610 | #else | 1610 | #else |
1611 | build_get_pgde32(p, pte, ptr); /* get pgd in ptr */ | 1611 | build_get_pgde32(p, pte, ptr); /* get pgd in ptr */ |
@@ -1636,7 +1636,7 @@ build_r4000_tlbchange_handler_tail(u32 **p, struct label **l, | |||
1636 | l_leave(l, *p); | 1636 | l_leave(l, *p); |
1637 | i_eret(p); /* return from trap */ | 1637 | i_eret(p); /* return from trap */ |
1638 | 1638 | ||
1639 | #ifdef CONFIG_MIPS64 | 1639 | #ifdef CONFIG_64BIT |
1640 | build_get_pgd_vmalloc64(p, l, r, tmp, ptr); | 1640 | build_get_pgd_vmalloc64(p, l, r, tmp, ptr); |
1641 | #endif | 1641 | #endif |
1642 | } | 1642 | } |
diff --git a/arch/mips/momentum/jaguar_atx/int-handler.S b/arch/mips/momentum/jaguar_atx/int-handler.S index 43fd5a58077c..55bc789733f2 100644 --- a/arch/mips/momentum/jaguar_atx/int-handler.S +++ b/arch/mips/momentum/jaguar_atx/int-handler.S | |||
@@ -27,11 +27,11 @@ | |||
27 | SAVE_ALL | 27 | SAVE_ALL |
28 | CLI | 28 | CLI |
29 | .set at | 29 | .set at |
30 | mfc0 t0, CP0_CAUSE | 30 | mfc0 t0, CP0_CAUSE |
31 | mfc0 t2, CP0_STATUS | 31 | mfc0 t2, CP0_STATUS |
32 | 32 | ||
33 | and t0, t2 | 33 | and t0, t2 |
34 | 34 | ||
35 | andi t1, t0, STATUSF_IP0 /* sw0 software interrupt */ | 35 | andi t1, t0, STATUSF_IP0 /* sw0 software interrupt */ |
36 | bnez t1, ll_sw0_irq | 36 | bnez t1, ll_sw0_irq |
37 | andi t1, t0, STATUSF_IP1 /* sw1 software interrupt */ | 37 | andi t1, t0, STATUSF_IP1 /* sw1 software interrupt */ |
@@ -103,25 +103,25 @@ ll_pcia_irq: | |||
103 | move a1, sp | 103 | move a1, sp |
104 | jal do_IRQ | 104 | jal do_IRQ |
105 | j ret_from_irq | 105 | j ret_from_irq |
106 | 106 | ||
107 | ll_pcib_irq: | 107 | ll_pcib_irq: |
108 | li a0, 5 | 108 | li a0, 5 |
109 | move a1, sp | 109 | move a1, sp |
110 | jal do_IRQ | 110 | jal do_IRQ |
111 | j ret_from_irq | 111 | j ret_from_irq |
112 | 112 | ||
113 | ll_uart_irq: | 113 | ll_uart_irq: |
114 | li a0, 6 | 114 | li a0, 6 |
115 | move a1, sp | 115 | move a1, sp |
116 | jal do_IRQ | 116 | jal do_IRQ |
117 | j ret_from_irq | 117 | j ret_from_irq |
118 | 118 | ||
119 | ll_cputimer_irq: | 119 | ll_cputimer_irq: |
120 | li a0, 7 | 120 | li a0, 7 |
121 | move a1, sp | 121 | move a1, sp |
122 | jal ll_timer_interrupt | 122 | jal ll_timer_interrupt |
123 | j ret_from_irq | 123 | j ret_from_irq |
124 | 124 | ||
125 | ll_mv64340_decode_irq: | 125 | ll_mv64340_decode_irq: |
126 | move a0, sp | 126 | move a0, sp |
127 | jal ll_mv64340_irq | 127 | jal ll_mv64340_irq |
diff --git a/arch/mips/momentum/jaguar_atx/prom.c b/arch/mips/momentum/jaguar_atx/prom.c index fa5982ac0ac6..14ae2e713585 100644 --- a/arch/mips/momentum/jaguar_atx/prom.c +++ b/arch/mips/momentum/jaguar_atx/prom.c | |||
@@ -64,7 +64,7 @@ static u8 exchange_bit(u8 val, u8 cs) | |||
64 | 64 | ||
65 | /* turn the clock off and read-strobe */ | 65 | /* turn the clock off and read-strobe */ |
66 | JAGUAR_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE); | 66 | JAGUAR_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE); |
67 | 67 | ||
68 | /* return the data */ | 68 | /* return the data */ |
69 | return ((JAGUAR_FPGA_READ(EEPROM_MODE) >> 3) & 0x1); | 69 | return ((JAGUAR_FPGA_READ(EEPROM_MODE) >> 3) & 0x1); |
70 | } | 70 | } |
@@ -90,7 +90,7 @@ void get_mac(char dest[6]) | |||
90 | } | 90 | } |
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | #ifdef CONFIG_MIPS64 | 93 | #ifdef CONFIG_64BIT |
94 | 94 | ||
95 | unsigned long signext(unsigned long addr) | 95 | unsigned long signext(unsigned long addr) |
96 | { | 96 | { |
@@ -143,7 +143,7 @@ char *arg64(unsigned long addrin, int arg_index) | |||
143 | 143 | ||
144 | return p; | 144 | return p; |
145 | } | 145 | } |
146 | #endif /* CONFIG_MIPS64 */ | 146 | #endif /* CONFIG_64BIT */ |
147 | 147 | ||
148 | /* PMON passes arguments in C main() style */ | 148 | /* PMON passes arguments in C main() style */ |
149 | void __init prom_init(void) | 149 | void __init prom_init(void) |
@@ -158,7 +158,7 @@ void __init prom_init(void) | |||
158 | // ja_setup_console(); /* The very first thing. */ | 158 | // ja_setup_console(); /* The very first thing. */ |
159 | #endif | 159 | #endif |
160 | 160 | ||
161 | #ifdef CONFIG_MIPS64 | 161 | #ifdef CONFIG_64BIT |
162 | char *ptr; | 162 | char *ptr; |
163 | 163 | ||
164 | printk("Mips64 Jaguar-ATX\n"); | 164 | printk("Mips64 Jaguar-ATX\n"); |
@@ -201,7 +201,7 @@ void __init prom_init(void) | |||
201 | } | 201 | } |
202 | printk("arcs_cmdline: %s\n", arcs_cmdline); | 202 | printk("arcs_cmdline: %s\n", arcs_cmdline); |
203 | 203 | ||
204 | #else /* CONFIG_MIPS64 */ | 204 | #else /* CONFIG_64BIT */ |
205 | /* save the PROM vectors for debugging use */ | 205 | /* save the PROM vectors for debugging use */ |
206 | debug_vectors = cv; | 206 | debug_vectors = cv; |
207 | 207 | ||
@@ -226,7 +226,7 @@ void __init prom_init(void) | |||
226 | } | 226 | } |
227 | env++; | 227 | env++; |
228 | } | 228 | } |
229 | #endif /* CONFIG_MIPS64 */ | 229 | #endif /* CONFIG_64BIT */ |
230 | mips_machgroup = MACH_GROUP_MOMENCO; | 230 | mips_machgroup = MACH_GROUP_MOMENCO; |
231 | mips_machtype = MACH_MOMENCO_JAGUAR_ATX; | 231 | mips_machtype = MACH_MOMENCO_JAGUAR_ATX; |
232 | 232 | ||
diff --git a/arch/mips/momentum/jaguar_atx/reset.c b/arch/mips/momentum/jaguar_atx/reset.c index 48039484cdf9..c4236b1e59fa 100644 --- a/arch/mips/momentum/jaguar_atx/reset.c +++ b/arch/mips/momentum/jaguar_atx/reset.c | |||
@@ -27,7 +27,7 @@ | |||
27 | void momenco_jaguar_restart(char *command) | 27 | void momenco_jaguar_restart(char *command) |
28 | { | 28 | { |
29 | /* base address of timekeeper portion of part */ | 29 | /* base address of timekeeper portion of part */ |
30 | #ifdef CONFIG_MIPS64 | 30 | #ifdef CONFIG_64BIT |
31 | void *nvram = (void*) 0xfffffffffc807000; | 31 | void *nvram = (void*) 0xfffffffffc807000; |
32 | #else | 32 | #else |
33 | void *nvram = (void*) 0xfc807000; | 33 | void *nvram = (void*) 0xfc807000; |
diff --git a/arch/mips/momentum/jaguar_atx/setup.c b/arch/mips/momentum/jaguar_atx/setup.c index 30462e715066..90288cf2b1e0 100644 --- a/arch/mips/momentum/jaguar_atx/setup.c +++ b/arch/mips/momentum/jaguar_atx/setup.c | |||
@@ -105,7 +105,7 @@ void __init bus_error_init(void) { /* nothing */ } | |||
105 | 105 | ||
106 | static __init void wire_stupidity_into_tlb(void) | 106 | static __init void wire_stupidity_into_tlb(void) |
107 | { | 107 | { |
108 | #ifdef CONFIG_MIPS32 | 108 | #ifdef CONFIG_32BIT |
109 | write_c0_wired(0); | 109 | write_c0_wired(0); |
110 | local_flush_tlb_all(); | 110 | local_flush_tlb_all(); |
111 | 111 | ||
@@ -451,7 +451,7 @@ static int __init momenco_jaguar_atx_setup(void) | |||
451 | #ifdef GEMDEBUG_TRACEBUFFER | 451 | #ifdef GEMDEBUG_TRACEBUFFER |
452 | { | 452 | { |
453 | unsigned int tbControl; | 453 | unsigned int tbControl; |
454 | tbControl = | 454 | tbControl = |
455 | 0 << 26 | /* post trigger delay 0 */ | 455 | 0 << 26 | /* post trigger delay 0 */ |
456 | 0x2 << 16 | /* sequential trace mode */ | 456 | 0x2 << 16 | /* sequential trace mode */ |
457 | // 0x0 << 16 | /* non-sequential trace mode */ | 457 | // 0x0 << 16 | /* non-sequential trace mode */ |
diff --git a/arch/mips/momentum/ocelot_3/prom.c b/arch/mips/momentum/ocelot_3/prom.c index 89c17a0c0bed..c4fa9c525faa 100644 --- a/arch/mips/momentum/ocelot_3/prom.c +++ b/arch/mips/momentum/ocelot_3/prom.c | |||
@@ -93,7 +93,7 @@ void get_mac(char dest[6]) | |||
93 | #endif | 93 | #endif |
94 | 94 | ||
95 | 95 | ||
96 | #ifdef CONFIG_MIPS64 | 96 | #ifdef CONFIG_64BIT |
97 | 97 | ||
98 | unsigned long signext(unsigned long addr) | 98 | unsigned long signext(unsigned long addr) |
99 | { | 99 | { |
@@ -145,7 +145,7 @@ char *arg64(unsigned long addrin, int arg_index) | |||
145 | 145 | ||
146 | return p; | 146 | return p; |
147 | } | 147 | } |
148 | #endif /* CONFIG_MIPS64 */ | 148 | #endif /* CONFIG_64BIT */ |
149 | 149 | ||
150 | void __init prom_init(void) | 150 | void __init prom_init(void) |
151 | { | 151 | { |
@@ -155,7 +155,7 @@ void __init prom_init(void) | |||
155 | struct callvectors *cv = (struct callvectors *) fw_arg3; | 155 | struct callvectors *cv = (struct callvectors *) fw_arg3; |
156 | int i; | 156 | int i; |
157 | 157 | ||
158 | #ifdef CONFIG_MIPS64 | 158 | #ifdef CONFIG_64BIT |
159 | char *ptr; | 159 | char *ptr; |
160 | printk("prom_init - MIPS64\n"); | 160 | printk("prom_init - MIPS64\n"); |
161 | 161 | ||
@@ -198,7 +198,7 @@ void __init prom_init(void) | |||
198 | } | 198 | } |
199 | printk("arcs_cmdline: %s\n", arcs_cmdline); | 199 | printk("arcs_cmdline: %s\n", arcs_cmdline); |
200 | 200 | ||
201 | #else /* CONFIG_MIPS64 */ | 201 | #else /* CONFIG_64BIT */ |
202 | 202 | ||
203 | /* save the PROM vectors for debugging use */ | 203 | /* save the PROM vectors for debugging use */ |
204 | debug_vectors = cv; | 204 | debug_vectors = cv; |
@@ -224,7 +224,7 @@ void __init prom_init(void) | |||
224 | } | 224 | } |
225 | env++; | 225 | env++; |
226 | } | 226 | } |
227 | #endif /* CONFIG_MIPS64 */ | 227 | #endif /* CONFIG_64BIT */ |
228 | 228 | ||
229 | mips_machgroup = MACH_GROUP_MOMENCO; | 229 | mips_machgroup = MACH_GROUP_MOMENCO; |
230 | mips_machtype = MACH_MOMENCO_OCELOT_3; | 230 | mips_machtype = MACH_MOMENCO_OCELOT_3; |
@@ -234,7 +234,7 @@ void __init prom_init(void) | |||
234 | get_mac(prom_mac_addr_base); | 234 | get_mac(prom_mac_addr_base); |
235 | #endif | 235 | #endif |
236 | 236 | ||
237 | #ifndef CONFIG_MIPS64 | 237 | #ifndef CONFIG_64BIT |
238 | debug_vectors->printf("Booting Linux kernel...\n"); | 238 | debug_vectors->printf("Booting Linux kernel...\n"); |
239 | #endif | 239 | #endif |
240 | } | 240 | } |
diff --git a/arch/mips/momentum/ocelot_c/int-handler.S b/arch/mips/momentum/ocelot_c/int-handler.S index 2f2430648abc..52349d9bf1be 100644 --- a/arch/mips/momentum/ocelot_c/int-handler.S +++ b/arch/mips/momentum/ocelot_c/int-handler.S | |||
@@ -27,11 +27,11 @@ | |||
27 | SAVE_ALL | 27 | SAVE_ALL |
28 | CLI | 28 | CLI |
29 | .set at | 29 | .set at |
30 | mfc0 t0, CP0_CAUSE | 30 | mfc0 t0, CP0_CAUSE |
31 | mfc0 t2, CP0_STATUS | 31 | mfc0 t2, CP0_STATUS |
32 | 32 | ||
33 | and t0, t2 | 33 | and t0, t2 |
34 | 34 | ||
35 | andi t1, t0, STATUSF_IP0 /* sw0 software interrupt */ | 35 | andi t1, t0, STATUSF_IP0 /* sw0 software interrupt */ |
36 | bnez t1, ll_sw0_irq | 36 | bnez t1, ll_sw0_irq |
37 | andi t1, t0, STATUSF_IP1 /* sw1 software interrupt */ | 37 | andi t1, t0, STATUSF_IP1 /* sw1 software interrupt */ |
@@ -83,7 +83,7 @@ ll_pmc_irq: | |||
83 | move a1, sp | 83 | move a1, sp |
84 | jal do_IRQ | 84 | jal do_IRQ |
85 | j ret_from_irq | 85 | j ret_from_irq |
86 | 86 | ||
87 | ll_cpci_decode_irq: | 87 | ll_cpci_decode_irq: |
88 | move a0, sp | 88 | move a0, sp |
89 | jal ll_cpci_irq | 89 | jal ll_cpci_irq |
@@ -99,4 +99,4 @@ ll_cputimer_irq: | |||
99 | move a1, sp | 99 | move a1, sp |
100 | jal do_IRQ | 100 | jal do_IRQ |
101 | j ret_from_irq | 101 | j ret_from_irq |
102 | 102 | ||
diff --git a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h b/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h index a6cf7a7959b3..97fb77dad723 100644 --- a/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h +++ b/arch/mips/momentum/ocelot_c/ocelot_c_fpga.h | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #include <linux/config.h> | 33 | #include <linux/config.h> |
34 | 34 | ||
35 | #ifdef CONFIG_MIPS64 | 35 | #ifdef CONFIG_64BIT |
36 | #define OCELOT_C_CS0_ADDR (0xfffffffffc000000) | 36 | #define OCELOT_C_CS0_ADDR (0xfffffffffc000000) |
37 | #else | 37 | #else |
38 | #define OCELOT_C_CS0_ADDR (0xfc000000) | 38 | #define OCELOT_C_CS0_ADDR (0xfc000000) |
diff --git a/arch/mips/momentum/ocelot_c/prom.c b/arch/mips/momentum/ocelot_c/prom.c index 49ac302d8901..5b6809724b15 100644 --- a/arch/mips/momentum/ocelot_c/prom.c +++ b/arch/mips/momentum/ocelot_c/prom.c | |||
@@ -67,7 +67,7 @@ static u8 exchange_bit(u8 val, u8 cs) | |||
67 | 67 | ||
68 | /* turn the clock off and read-strobe */ | 68 | /* turn the clock off and read-strobe */ |
69 | OCELOT_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE); | 69 | OCELOT_FPGA_WRITE((val << 2) | cs | 0x10, EEPROM_MODE); |
70 | 70 | ||
71 | /* return the data */ | 71 | /* return the data */ |
72 | return ((OCELOT_FPGA_READ(EEPROM_MODE) >> 3) & 0x1); | 72 | return ((OCELOT_FPGA_READ(EEPROM_MODE) >> 3) & 0x1); |
73 | } | 73 | } |
@@ -94,7 +94,7 @@ void get_mac(char dest[6]) | |||
94 | #endif | 94 | #endif |
95 | 95 | ||
96 | 96 | ||
97 | #ifdef CONFIG_MIPS64 | 97 | #ifdef CONFIG_64BIT |
98 | 98 | ||
99 | unsigned long signext(unsigned long addr) | 99 | unsigned long signext(unsigned long addr) |
100 | { | 100 | { |
@@ -144,7 +144,7 @@ char *arg64(unsigned long addrin, int arg_index) | |||
144 | p = (char *)get_arg(args, arg_index); | 144 | p = (char *)get_arg(args, arg_index); |
145 | return p; | 145 | return p; |
146 | } | 146 | } |
147 | #endif /* CONFIG_MIPS64 */ | 147 | #endif /* CONFIG_64BIT */ |
148 | 148 | ||
149 | 149 | ||
150 | void __init prom_init(void) | 150 | void __init prom_init(void) |
@@ -155,7 +155,7 @@ void __init prom_init(void) | |||
155 | struct callvectors *cv = (struct callvectors *) fw_arg3; | 155 | struct callvectors *cv = (struct callvectors *) fw_arg3; |
156 | int i; | 156 | int i; |
157 | 157 | ||
158 | #ifdef CONFIG_MIPS64 | 158 | #ifdef CONFIG_64BIT |
159 | char *ptr; | 159 | char *ptr; |
160 | 160 | ||
161 | printk("prom_init - MIPS64\n"); | 161 | printk("prom_init - MIPS64\n"); |
@@ -197,7 +197,7 @@ void __init prom_init(void) | |||
197 | } | 197 | } |
198 | printk("arcs_cmdline: %s\n", arcs_cmdline); | 198 | printk("arcs_cmdline: %s\n", arcs_cmdline); |
199 | 199 | ||
200 | #else /* CONFIG_MIPS64 */ | 200 | #else /* CONFIG_64BIT */ |
201 | /* save the PROM vectors for debugging use */ | 201 | /* save the PROM vectors for debugging use */ |
202 | debug_vectors = cv; | 202 | debug_vectors = cv; |
203 | 203 | ||
@@ -222,7 +222,7 @@ void __init prom_init(void) | |||
222 | } | 222 | } |
223 | env++; | 223 | env++; |
224 | } | 224 | } |
225 | #endif /* CONFIG_MIPS64 */ | 225 | #endif /* CONFIG_64BIT */ |
226 | 226 | ||
227 | mips_machgroup = MACH_GROUP_MOMENCO; | 227 | mips_machgroup = MACH_GROUP_MOMENCO; |
228 | mips_machtype = MACH_MOMENCO_OCELOT_C; | 228 | mips_machtype = MACH_MOMENCO_OCELOT_C; |
@@ -232,7 +232,7 @@ void __init prom_init(void) | |||
232 | get_mac(prom_mac_addr_base); | 232 | get_mac(prom_mac_addr_base); |
233 | #endif | 233 | #endif |
234 | 234 | ||
235 | #ifndef CONFIG_MIPS64 | 235 | #ifndef CONFIG_64BIT |
236 | debug_vectors->printf("Booting Linux kernel...\n"); | 236 | debug_vectors->printf("Booting Linux kernel...\n"); |
237 | #endif | 237 | #endif |
238 | } | 238 | } |
diff --git a/arch/mips/momentum/ocelot_c/reset.c b/arch/mips/momentum/ocelot_c/reset.c index 1f2b4263cc8c..6a2489f3b9a0 100644 --- a/arch/mips/momentum/ocelot_c/reset.c +++ b/arch/mips/momentum/ocelot_c/reset.c | |||
@@ -28,7 +28,7 @@ void momenco_ocelot_restart(char *command) | |||
28 | { | 28 | { |
29 | /* base address of timekeeper portion of part */ | 29 | /* base address of timekeeper portion of part */ |
30 | void *nvram = (void *) | 30 | void *nvram = (void *) |
31 | #ifdef CONFIG_MIPS64 | 31 | #ifdef CONFIG_64BIT |
32 | 0xfffffffffc807000; | 32 | 0xfffffffffc807000; |
33 | #else | 33 | #else |
34 | 0xfc807000; | 34 | 0xfc807000; |
diff --git a/arch/mips/momentum/ocelot_c/setup.c b/arch/mips/momentum/ocelot_c/setup.c index 021c00e3c07c..844ddd06349b 100644 --- a/arch/mips/momentum/ocelot_c/setup.c +++ b/arch/mips/momentum/ocelot_c/setup.c | |||
@@ -109,7 +109,7 @@ void PMON_v2_setup(void) | |||
109 | */ | 109 | */ |
110 | printk("PMON_v2_setup\n"); | 110 | printk("PMON_v2_setup\n"); |
111 | 111 | ||
112 | #ifdef CONFIG_MIPS64 | 112 | #ifdef CONFIG_64BIT |
113 | /* marvell and extra space */ | 113 | /* marvell and extra space */ |
114 | add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xfffffffff4000000, PM_64K); | 114 | add_wired_entry(ENTRYLO(0xf4000000), ENTRYLO(0xf4010000), 0xfffffffff4000000, PM_64K); |
115 | /* fpga, rtc, and uart */ | 115 | /* fpga, rtc, and uart */ |
@@ -134,7 +134,7 @@ void PMON_v2_setup(void) | |||
134 | 134 | ||
135 | unsigned long m48t37y_get_time(void) | 135 | unsigned long m48t37y_get_time(void) |
136 | { | 136 | { |
137 | #ifdef CONFIG_MIPS64 | 137 | #ifdef CONFIG_64BIT |
138 | unsigned char *rtc_base = (unsigned char*)0xfffffffffc800000; | 138 | unsigned char *rtc_base = (unsigned char*)0xfffffffffc800000; |
139 | #else | 139 | #else |
140 | unsigned char* rtc_base = (unsigned char*)0xfc800000; | 140 | unsigned char* rtc_base = (unsigned char*)0xfc800000; |
@@ -163,7 +163,7 @@ unsigned long m48t37y_get_time(void) | |||
163 | 163 | ||
164 | int m48t37y_set_time(unsigned long sec) | 164 | int m48t37y_set_time(unsigned long sec) |
165 | { | 165 | { |
166 | #ifdef CONFIG_MIPS64 | 166 | #ifdef CONFIG_64BIT |
167 | unsigned char* rtc_base = (unsigned char*)0xfffffffffc800000; | 167 | unsigned char* rtc_base = (unsigned char*)0xfffffffffc800000; |
168 | #else | 168 | #else |
169 | unsigned char* rtc_base = (unsigned char*)0xfc800000; | 169 | unsigned char* rtc_base = (unsigned char*)0xfc800000; |
@@ -342,7 +342,7 @@ static void __init momenco_ocelot_c_setup(void) | |||
342 | 342 | ||
343 | early_initcall(momenco_ocelot_c_setup); | 343 | early_initcall(momenco_ocelot_c_setup); |
344 | 344 | ||
345 | #ifndef CONFIG_MIPS64 | 345 | #ifndef CONFIG_64BIT |
346 | /* This needs to be one of the first initcalls, because no I/O port access | 346 | /* This needs to be one of the first initcalls, because no I/O port access |
347 | can work before this */ | 347 | can work before this */ |
348 | static int io_base_ioremap(void) | 348 | static int io_base_ioremap(void) |
diff --git a/arch/mips/pci/fixup-ddb5074.c b/arch/mips/pci/fixup-ddb5074.c index b345e528a53c..5a4a7c239c42 100644 --- a/arch/mips/pci/fixup-ddb5074.c +++ b/arch/mips/pci/fixup-ddb5074.c | |||
@@ -5,7 +5,7 @@ static void ddb5074_fixup(struct pci_dev *dev) | |||
5 | { | 5 | { |
6 | extern struct pci_dev *pci_pmu; | 6 | extern struct pci_dev *pci_pmu; |
7 | u8 t8; | 7 | u8 t8; |
8 | 8 | ||
9 | pci_pmu = dev; /* for LEDs D2 and D3 */ | 9 | pci_pmu = dev; /* for LEDs D2 and D3 */ |
10 | /* Program the lines for LEDs D2 and D3 to output */ | 10 | /* Program the lines for LEDs D2 and D3 to output */ |
11 | pci_read_config_byte(dev, 0x7d, &t8); | 11 | pci_read_config_byte(dev, 0x7d, &t8); |
diff --git a/arch/mips/pci/fixup-ddb5477.c b/arch/mips/pci/fixup-ddb5477.c index 6abdc88bab1e..2f1444e60654 100644 --- a/arch/mips/pci/fixup-ddb5477.c +++ b/arch/mips/pci/fixup-ddb5477.c | |||
@@ -65,7 +65,7 @@ static void ddb5477_amd_lance_fixup(struct pci_dev *dev) | |||
65 | ioaddr = pci_resource_start(dev, 0); | 65 | ioaddr = pci_resource_start(dev, 0); |
66 | 66 | ||
67 | inw(ioaddr + PCNET32_WIO_RESET); /* reset chip */ | 67 | inw(ioaddr + PCNET32_WIO_RESET); /* reset chip */ |
68 | 68 | ||
69 | /* bcr_18 |= 0x0800 */ | 69 | /* bcr_18 |= 0x0800 */ |
70 | outw(18, ioaddr + PCNET32_WIO_RAP); | 70 | outw(18, ioaddr + PCNET32_WIO_RAP); |
71 | temp = inw(ioaddr + PCNET32_WIO_BDP); | 71 | temp = inw(ioaddr + PCNET32_WIO_BDP); |
diff --git a/arch/mips/pci/fixup-malta.c b/arch/mips/pci/fixup-malta.c index b9296d9942b3..bf2c41d1e9c5 100644 --- a/arch/mips/pci/fixup-malta.c +++ b/arch/mips/pci/fixup-malta.c | |||
@@ -56,7 +56,7 @@ static void __init malta_piix_func0_fixup(struct pci_dev *pdev) | |||
56 | 0, 0, 0, 3, | 56 | 0, 0, 0, 3, |
57 | 4, 5, 6, 7, | 57 | 4, 5, 6, 7, |
58 | 0, 9, 10, 11, | 58 | 0, 9, 10, 11, |
59 | 12, 0, 14, 15 | 59 | 12, 0, 14, 15 |
60 | }; | 60 | }; |
61 | int i; | 61 | int i; |
62 | 62 | ||
diff --git a/arch/mips/pci/fixup-rbtx4927.c b/arch/mips/pci/fixup-rbtx4927.c index de4e443da208..ceeb1860895a 100644 --- a/arch/mips/pci/fixup-rbtx4927.c +++ b/arch/mips/pci/fixup-rbtx4927.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Author: MontaVista Software, Inc. | 7 | * Author: MontaVista Software, Inc. |
8 | * ppopov@mvista.com or source@mvista.com | 8 | * ppopov@mvista.com or source@mvista.com |
9 | * | 9 | * |
10 | * Copyright (C) 2000-2001 Toshiba Corporation | 10 | * Copyright (C) 2000-2001 Toshiba Corporation |
11 | * | 11 | * |
12 | * Copyright (C) 2004 MontaVista Software Inc. | 12 | * Copyright (C) 2004 MontaVista Software Inc. |
13 | * Author: Manish Lachwani (mlachwani@mvista.com) | 13 | * Author: Manish Lachwani (mlachwani@mvista.com) |
diff --git a/arch/mips/pci/fixup-sni.c b/arch/mips/pci/fixup-sni.c index c8ef01a017cc..a176f2ca8656 100644 --- a/arch/mips/pci/fixup-sni.c +++ b/arch/mips/pci/fixup-sni.c | |||
@@ -32,7 +32,7 @@ | |||
32 | * Device 4: Unused | 32 | * Device 4: Unused |
33 | * Device 5: Slot 2 | 33 | * Device 5: Slot 2 |
34 | * Device 6: Slot 3 | 34 | * Device 6: Slot 3 |
35 | * Device 7: Slot 4 | 35 | * Device 7: Slot 4 |
36 | * | 36 | * |
37 | * Documentation says the VGA is device 5 and device 3 is unused but that | 37 | * Documentation says the VGA is device 5 and device 3 is unused but that |
38 | * seem to be a documentation error. At least on my RM200C the Cirrus | 38 | * seem to be a documentation error. At least on my RM200C the Cirrus |
diff --git a/arch/mips/pci/fixup-tb0219.c b/arch/mips/pci/fixup-tb0219.c index 850a900f0eb4..bc55b06e1904 100644 --- a/arch/mips/pci/fixup-tb0219.c +++ b/arch/mips/pci/fixup-tb0219.c | |||
@@ -29,27 +29,12 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
29 | 29 | ||
30 | switch (slot) { | 30 | switch (slot) { |
31 | case 12: | 31 | case 12: |
32 | vr41xx_set_irq_trigger(TB0219_PCI_SLOT1_PIN, | ||
33 | TRIGGER_LEVEL, | ||
34 | SIGNAL_THROUGH); | ||
35 | vr41xx_set_irq_level(TB0219_PCI_SLOT1_PIN, | ||
36 | LEVEL_LOW); | ||
37 | irq = TB0219_PCI_SLOT1_IRQ; | 32 | irq = TB0219_PCI_SLOT1_IRQ; |
38 | break; | 33 | break; |
39 | case 13: | 34 | case 13: |
40 | vr41xx_set_irq_trigger(TB0219_PCI_SLOT2_PIN, | ||
41 | TRIGGER_LEVEL, | ||
42 | SIGNAL_THROUGH); | ||
43 | vr41xx_set_irq_level(TB0219_PCI_SLOT2_PIN, | ||
44 | LEVEL_LOW); | ||
45 | irq = TB0219_PCI_SLOT2_IRQ; | 35 | irq = TB0219_PCI_SLOT2_IRQ; |
46 | break; | 36 | break; |
47 | case 14: | 37 | case 14: |
48 | vr41xx_set_irq_trigger(TB0219_PCI_SLOT3_PIN, | ||
49 | TRIGGER_LEVEL, | ||
50 | SIGNAL_THROUGH); | ||
51 | vr41xx_set_irq_level(TB0219_PCI_SLOT3_PIN, | ||
52 | LEVEL_LOW); | ||
53 | irq = TB0219_PCI_SLOT3_IRQ; | 38 | irq = TB0219_PCI_SLOT3_IRQ; |
54 | break; | 39 | break; |
55 | default: | 40 | default: |
diff --git a/arch/mips/pci/ops-ddb5477.c b/arch/mips/pci/ops-ddb5477.c index e955443fedf9..0406b50a37d8 100644 --- a/arch/mips/pci/ops-ddb5477.c +++ b/arch/mips/pci/ops-ddb5477.c | |||
@@ -127,7 +127,7 @@ static inline void ddb_close_config_base(struct pci_config_swap *swap) | |||
127 | } | 127 | } |
128 | 128 | ||
129 | static int read_config_dword(struct pci_config_swap *swap, | 129 | static int read_config_dword(struct pci_config_swap *swap, |
130 | struct pci_bus *bus, u32 devfn, u32 where, | 130 | struct pci_bus *bus, u32 devfn, u32 where, |
131 | u32 * val) | 131 | u32 * val) |
132 | { | 132 | { |
133 | u32 bus_num, slot_num, func_num; | 133 | u32 bus_num, slot_num, func_num; |
@@ -153,7 +153,7 @@ static int read_config_dword(struct pci_config_swap *swap, | |||
153 | } | 153 | } |
154 | 154 | ||
155 | static int read_config_word(struct pci_config_swap *swap, | 155 | static int read_config_word(struct pci_config_swap *swap, |
156 | struct pci_bus *bus, u32 devfn, u32 where, | 156 | struct pci_bus *bus, u32 devfn, u32 where, |
157 | u16 * val) | 157 | u16 * val) |
158 | { | 158 | { |
159 | int status; | 159 | int status; |
diff --git a/arch/mips/pci/ops-tx4927.c b/arch/mips/pci/ops-tx4927.c index 2a9d7227fe87..7688b7711329 100644 --- a/arch/mips/pci/ops-tx4927.c +++ b/arch/mips/pci/ops-tx4927.c | |||
@@ -1,16 +1,16 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright 2001 MontaVista Software Inc. | 2 | * Copyright 2001 MontaVista Software Inc. |
3 | * Author: MontaVista Software, Inc. | 3 | * Author: MontaVista Software, Inc. |
4 | * ahennessy@mvista.com | 4 | * ahennessy@mvista.com |
5 | * | 5 | * |
6 | * Copyright (C) 2000-2001 Toshiba Corporation | 6 | * Copyright (C) 2000-2001 Toshiba Corporation |
7 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) | 7 | * Copyright (C) 2004 by Ralf Baechle (ralf@linux-mips.org) |
8 | * | 8 | * |
9 | * Based on arch/mips/ddb5xxx/ddb5477/pci_ops.c | 9 | * Based on arch/mips/ddb5xxx/ddb5477/pci_ops.c |
10 | * | 10 | * |
11 | * Define the pci_ops for the Toshiba rbtx4927 | 11 | * Define the pci_ops for the Toshiba rbtx4927 |
12 | * | 12 | * |
13 | * Much of the code is derived from the original DDB5074 port by | 13 | * Much of the code is derived from the original DDB5074 port by |
14 | * Geert Uytterhoeven <geert@sonycom.com> | 14 | * Geert Uytterhoeven <geert@sonycom.com> |
15 | * | 15 | * |
16 | * Copyright 2004 MontaVista Software Inc. | 16 | * Copyright 2004 MontaVista Software Inc. |
diff --git a/arch/mips/pci/pci-ddb5477.c b/arch/mips/pci/pci-ddb5477.c index 4ddd53eaf656..826d653184e5 100644 --- a/arch/mips/pci/pci-ddb5477.c +++ b/arch/mips/pci/pci-ddb5477.c | |||
@@ -76,7 +76,7 @@ struct pci_controller ddb5477_io_controller = { | |||
76 | */ | 76 | */ |
77 | 77 | ||
78 | /* | 78 | /* |
79 | * irq mapping : device -> pci int # -> vrc4377 irq# , | 79 | * irq mapping : device -> pci int # -> vrc4377 irq# , |
80 | * ddb5477 board manual page 4 and vrc5477 manual page 46 | 80 | * ddb5477 board manual page 4 and vrc5477 manual page 46 |
81 | */ | 81 | */ |
82 | 82 | ||
@@ -137,9 +137,9 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
137 | unsigned char *slot_irq_map; | 137 | unsigned char *slot_irq_map; |
138 | unsigned char irq; | 138 | unsigned char irq; |
139 | 139 | ||
140 | /* | 140 | /* |
141 | * We ignore the swizzled slot and pin values. The original | 141 | * We ignore the swizzled slot and pin values. The original |
142 | * pci_fixup_irq() codes largely base irq number on the dev slot | 142 | * pci_fixup_irq() codes largely base irq number on the dev slot |
143 | * numbers because except for one case they are unique even | 143 | * numbers because except for one case they are unique even |
144 | * though there are multiple pci buses. | 144 | * though there are multiple pci buses. |
145 | */ | 145 | */ |
@@ -160,7 +160,7 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
160 | 160 | ||
161 | if (mips_machtype == MACH_NEC_ROCKHOPPERII) { | 161 | if (mips_machtype == MACH_NEC_ROCKHOPPERII) { |
162 | /* hack to distinquish overlapping slot 20s, one | 162 | /* hack to distinquish overlapping slot 20s, one |
163 | * on bus 0 (ALI USB on the M1535 on the backplane), | 163 | * on bus 0 (ALI USB on the M1535 on the backplane), |
164 | * and one on bus 2 (NEC USB controller on the CPU board) | 164 | * and one on bus 2 (NEC USB controller on the CPU board) |
165 | * Make the M1535 USB - ISA IRQ number 9. | 165 | * Make the M1535 USB - ISA IRQ number 9. |
166 | */ | 166 | */ |
diff --git a/arch/mips/pci/pci-ip32.c b/arch/mips/pci/pci-ip32.c index 1faeb034f06e..000dc6af6cd3 100644 --- a/arch/mips/pci/pci-ip32.c +++ b/arch/mips/pci/pci-ip32.c | |||
@@ -84,7 +84,7 @@ static irqreturn_t macepci_error(int irq, void *dev, struct pt_regs *regs) | |||
84 | 84 | ||
85 | 85 | ||
86 | extern struct pci_ops mace_pci_ops; | 86 | extern struct pci_ops mace_pci_ops; |
87 | #ifdef CONFIG_MIPS64 | 87 | #ifdef CONFIG_64BIT |
88 | static struct resource mace_pci_mem_resource = { | 88 | static struct resource mace_pci_mem_resource = { |
89 | .name = "SGI O2 PCI MEM", | 89 | .name = "SGI O2 PCI MEM", |
90 | .start = MACEPCI_HI_MEMORY, | 90 | .start = MACEPCI_HI_MEMORY, |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 8141dffac241..a8d499b0a36f 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -132,7 +132,7 @@ static int __init pcibios_init(void) | |||
132 | hose->need_domain_info = need_domain_info; | 132 | hose->need_domain_info = need_domain_info; |
133 | next_busno = bus->subordinate + 1; | 133 | next_busno = bus->subordinate + 1; |
134 | /* Don't allow 8-bit bus number overflow inside the hose - | 134 | /* Don't allow 8-bit bus number overflow inside the hose - |
135 | reserve some space for bridges. */ | 135 | reserve some space for bridges. */ |
136 | if (next_busno > 224) { | 136 | if (next_busno > 224) { |
137 | next_busno = 0; | 137 | next_busno = 0; |
138 | need_domain_info = 1; | 138 | need_domain_info = 1; |
@@ -260,7 +260,7 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus) | |||
260 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { | 260 | (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) { |
261 | pci_read_bridge_bases(bus); | 261 | pci_read_bridge_bases(bus); |
262 | pcibios_fixup_device_resources(dev, bus); | 262 | pcibios_fixup_device_resources(dev, bus); |
263 | } | 263 | } |
264 | 264 | ||
265 | for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { | 265 | for (ln = bus->devices.next; ln != &bus->devices; ln = ln->next) { |
266 | struct pci_dev *dev = pci_dev_b(ln); | 266 | struct pci_dev *dev = pci_dev_b(ln); |
@@ -292,8 +292,25 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | |||
292 | region->end = res->end - offset; | 292 | region->end = res->end - offset; |
293 | } | 293 | } |
294 | 294 | ||
295 | void __devinit | ||
296 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
297 | struct pci_bus_region *region) | ||
298 | { | ||
299 | struct pci_controller *hose = (struct pci_controller *)dev->sysdata; | ||
300 | unsigned long offset = 0; | ||
301 | |||
302 | if (res->flags & IORESOURCE_IO) | ||
303 | offset = hose->io_offset; | ||
304 | else if (res->flags & IORESOURCE_MEM) | ||
305 | offset = hose->mem_offset; | ||
306 | |||
307 | res->start = region->start + offset; | ||
308 | res->end = region->end + offset; | ||
309 | } | ||
310 | |||
295 | #ifdef CONFIG_HOTPLUG | 311 | #ifdef CONFIG_HOTPLUG |
296 | EXPORT_SYMBOL(pcibios_resource_to_bus); | 312 | EXPORT_SYMBOL(pcibios_resource_to_bus); |
313 | EXPORT_SYMBOL(pcibios_bus_to_resource); | ||
297 | EXPORT_SYMBOL(PCIBIOS_MIN_IO); | 314 | EXPORT_SYMBOL(PCIBIOS_MIN_IO); |
298 | EXPORT_SYMBOL(PCIBIOS_MIN_MEM); | 315 | EXPORT_SYMBOL(PCIBIOS_MIN_MEM); |
299 | #endif | 316 | #endif |
diff --git a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c index b067988614c3..97862f45496d 100644 --- a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c +++ b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.c | |||
@@ -30,7 +30,7 @@ | |||
30 | * | 30 | * |
31 | * This code reads the ATMEL 24CXX EEPROM. The PMC-Sierra Yosemite board uses the ATMEL | 31 | * This code reads the ATMEL 24CXX EEPROM. The PMC-Sierra Yosemite board uses the ATMEL |
32 | * 24C32/24C64 which uses two byte addressing as compared to 24C16. Note that this program | 32 | * 24C32/24C64 which uses two byte addressing as compared to 24C16. Note that this program |
33 | * uses the serial port like /dev/ttyS0, to communicate with the EEPROM. Hence, you are | 33 | * uses the serial port like /dev/ttyS0, to communicate with the EEPROM. Hence, you are |
34 | * expected to have a connectivity from the EEPROM to the serial port. This program does | 34 | * expected to have a connectivity from the EEPROM to the serial port. This program does |
35 | * __not__ communicate using the I2C protocol | 35 | * __not__ communicate using the I2C protocol |
36 | */ | 36 | */ |
@@ -64,14 +64,14 @@ static void send_ack(void) | |||
64 | static void send_byte(unsigned char byte) | 64 | static void send_byte(unsigned char byte) |
65 | { | 65 | { |
66 | int i = 0; | 66 | int i = 0; |
67 | 67 | ||
68 | for (i = 7; i >= 0; i--) | 68 | for (i = 7; i >= 0; i--) |
69 | send_bit((byte >> i) & 0x01); | 69 | send_bit((byte >> i) & 0x01); |
70 | } | 70 | } |
71 | 71 | ||
72 | static void send_start(void) | 72 | static void send_start(void) |
73 | { | 73 | { |
74 | sda_hi; | 74 | sda_hi; |
75 | delay(TXX); | 75 | delay(TXX); |
76 | scl_hi; | 76 | scl_hi; |
77 | delay(TXX); | 77 | delay(TXX); |
@@ -114,9 +114,9 @@ static unsigned char recv_byte(void) { | |||
114 | int i; | 114 | int i; |
115 | unsigned char byte=0; | 115 | unsigned char byte=0; |
116 | 116 | ||
117 | for (i=7;i>=0;i--) | 117 | for (i=7;i>=0;i--) |
118 | byte |= (recv_bit() << i); | 118 | byte |= (recv_bit() << i); |
119 | 119 | ||
120 | return byte; | 120 | return byte; |
121 | } | 121 | } |
122 | 122 | ||
diff --git a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.h b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.h index d27566d99ffc..c19f01a32045 100644 --- a/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.h +++ b/arch/mips/pmc-sierra/yosemite/atmel_read_eeprom.h | |||
@@ -27,7 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * Header file for atmel_read_eeprom.c | 30 | * Header file for atmel_read_eeprom.c |
31 | */ | 31 | */ |
32 | 32 | ||
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
@@ -46,7 +46,7 @@ | |||
46 | #define DEFAULT_PORT "/dev/ttyS0" /* Port to open */ | 46 | #define DEFAULT_PORT "/dev/ttyS0" /* Port to open */ |
47 | #define TXX 0 /* Dummy loop for spinning */ | 47 | #define TXX 0 /* Dummy loop for spinning */ |
48 | 48 | ||
49 | #define BLOCK_SEL 0x00 | 49 | #define BLOCK_SEL 0x00 |
50 | #define SLAVE_ADDR 0xa0 | 50 | #define SLAVE_ADDR 0xa0 |
51 | #define READ_BIT 0x01 | 51 | #define READ_BIT 0x01 |
52 | #define WRITE_BIT 0x00 | 52 | #define WRITE_BIT 0x00 |
diff --git a/arch/mips/qemu/Makefile b/arch/mips/qemu/Makefile new file mode 100644 index 000000000000..934944ab9e85 --- /dev/null +++ b/arch/mips/qemu/Makefile | |||
@@ -0,0 +1,5 @@ | |||
1 | # | ||
2 | # Makefile for Qemu specific kernel interface routines under Linux. | ||
3 | # | ||
4 | |||
5 | obj-y = q-firmware.o q-int.o q-irq.o q-mem.o q-setup.o | ||
diff --git a/arch/mips/qemu/q-firmware.c b/arch/mips/qemu/q-firmware.c new file mode 100644 index 000000000000..5980f02b2df9 --- /dev/null +++ b/arch/mips/qemu/q-firmware.c | |||
@@ -0,0 +1,7 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <asm/bootinfo.h> | ||
3 | |||
4 | void __init prom_init(void) | ||
5 | { | ||
6 | add_memory_region(0x0<<20, 0x10<<20, BOOT_MEM_RAM); | ||
7 | } | ||
diff --git a/arch/mips/qemu/q-int.S b/arch/mips/qemu/q-int.S new file mode 100644 index 000000000000..6e3dfe5eb14b --- /dev/null +++ b/arch/mips/qemu/q-int.S | |||
@@ -0,0 +1,17 @@ | |||
1 | /* | ||
2 | * Qemu interrupt handler code. | ||
3 | * | ||
4 | * Copyright (C) 2005 by Ralf Baechle | ||
5 | */ | ||
6 | #include <asm/asm.h> | ||
7 | #include <asm/regdef.h> | ||
8 | #include <asm/stackframe.h> | ||
9 | |||
10 | .align 5 | ||
11 | NESTED(qemu_handle_int, PT_SIZE, sp) | ||
12 | SAVE_ALL | ||
13 | CLI | ||
14 | move a0, sp | ||
15 | PTR_LA ra, ret_from_irq | ||
16 | j do_qemu_int | ||
17 | END(qemu_handle_int) | ||
diff --git a/arch/mips/qemu/q-irq.c b/arch/mips/qemu/q-irq.c new file mode 100644 index 000000000000..2c4e0704ff10 --- /dev/null +++ b/arch/mips/qemu/q-irq.c | |||
@@ -0,0 +1,37 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <linux/linkage.h> | ||
3 | |||
4 | #include <asm/i8259.h> | ||
5 | #include <asm/mipsregs.h> | ||
6 | #include <asm/qemu.h> | ||
7 | #include <asm/system.h> | ||
8 | #include <asm/time.h> | ||
9 | |||
10 | extern asmlinkage void qemu_handle_int(void); | ||
11 | |||
12 | asmlinkage void do_qemu_int(struct pt_regs *regs) | ||
13 | { | ||
14 | unsigned int pending = read_c0_status() & read_c0_cause(); | ||
15 | |||
16 | if (pending & 0x8000) { | ||
17 | ll_timer_interrupt(Q_COUNT_COMPARE_IRQ, regs); | ||
18 | return; | ||
19 | } | ||
20 | if (pending & 0x0400) { | ||
21 | int irq = i8259_irq(); | ||
22 | |||
23 | if (likely(irq >= 0)) | ||
24 | do_IRQ(irq, regs); | ||
25 | |||
26 | return; | ||
27 | } | ||
28 | } | ||
29 | |||
30 | void __init arch_init_irq(void) | ||
31 | { | ||
32 | set_except_vector(0, qemu_handle_int); | ||
33 | mips_hpt_frequency = QEMU_C0_COUNTER_CLOCK; /* 100MHz */ | ||
34 | |||
35 | init_i8259_irqs(); | ||
36 | set_c0_status(0x8400); | ||
37 | } | ||
diff --git a/arch/mips/qemu/q-mem.c b/arch/mips/qemu/q-mem.c new file mode 100644 index 000000000000..d174fac43031 --- /dev/null +++ b/arch/mips/qemu/q-mem.c | |||
@@ -0,0 +1,6 @@ | |||
1 | #include <linux/init.h> | ||
2 | |||
3 | unsigned long __init prom_free_prom_memory(void) | ||
4 | { | ||
5 | return 0UL; | ||
6 | } | ||
diff --git a/arch/mips/qemu/q-setup.c b/arch/mips/qemu/q-setup.c new file mode 100644 index 000000000000..1a80eee8cd35 --- /dev/null +++ b/arch/mips/qemu/q-setup.c | |||
@@ -0,0 +1,20 @@ | |||
1 | #include <linux/init.h> | ||
2 | #include <asm/io.h> | ||
3 | #include <asm/time.h> | ||
4 | |||
5 | #define QEMU_PORT_BASE 0xb4000000 | ||
6 | |||
7 | static void __init qemu_timer_setup(struct irqaction *irq) | ||
8 | { | ||
9 | /* set the clock to 100 Hz */ | ||
10 | outb_p(0x34,0x43); /* binary, mode 2, LSB/MSB, ch 0 */ | ||
11 | outb_p(LATCH & 0xff , 0x40); /* LSB */ | ||
12 | outb(LATCH >> 8 , 0x40); /* MSB */ | ||
13 | setup_irq(0, irq); | ||
14 | } | ||
15 | |||
16 | void __init plat_setup(void) | ||
17 | { | ||
18 | set_io_port_base(QEMU_PORT_BASE); | ||
19 | board_timer_setup = qemu_timer_setup; | ||
20 | } | ||
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c index 0ab4abf65d58..fa0e719c5bd1 100644 --- a/arch/mips/sgi-ip22/ip22-eisa.c +++ b/arch/mips/sgi-ip22/ip22-eisa.c | |||
@@ -242,7 +242,7 @@ int __init ip22_eisa_init(void) | |||
242 | int i, c; | 242 | int i, c; |
243 | char *str; | 243 | char *str; |
244 | u8 *slot_addr; | 244 | u8 *slot_addr; |
245 | 245 | ||
246 | if (!(sgimc->systemid & SGIMC_SYSID_EPRESENT)) { | 246 | if (!(sgimc->systemid & SGIMC_SYSID_EPRESENT)) { |
247 | printk(KERN_INFO "EISA: bus not present.\n"); | 247 | printk(KERN_INFO "EISA: bus not present.\n"); |
248 | return 1; | 248 | return 1; |
diff --git a/arch/mips/sgi-ip22/ip22-hpc.c b/arch/mips/sgi-ip22/ip22-hpc.c index c0afeccb08c4..5c00cdd20d8e 100644 --- a/arch/mips/sgi-ip22/ip22-hpc.c +++ b/arch/mips/sgi-ip22/ip22-hpc.c | |||
@@ -49,7 +49,7 @@ void __init sgihpc_init(void) | |||
49 | sgint = &sgioc->int3; | 49 | sgint = &sgioc->int3; |
50 | system_type = "SGI Indy"; | 50 | system_type = "SGI Indy"; |
51 | } | 51 | } |
52 | 52 | ||
53 | sgi_ioc_reset = (SGIOC_RESET_PPORT | SGIOC_RESET_KBDMOUSE | | 53 | sgi_ioc_reset = (SGIOC_RESET_PPORT | SGIOC_RESET_KBDMOUSE | |
54 | SGIOC_RESET_EISA | SGIOC_RESET_ISDN | | 54 | SGIOC_RESET_EISA | SGIOC_RESET_ISDN | |
55 | SGIOC_RESET_LC0OFF); | 55 | SGIOC_RESET_LC0OFF); |
diff --git a/arch/mips/sgi-ip22/ip22-int.c b/arch/mips/sgi-ip22/ip22-int.c index ea2844d29e6e..d16fb43b1a93 100644 --- a/arch/mips/sgi-ip22/ip22-int.c +++ b/arch/mips/sgi-ip22/ip22-int.c | |||
@@ -28,7 +28,7 @@ | |||
28 | /* #define DEBUG_SGINT */ | 28 | /* #define DEBUG_SGINT */ |
29 | 29 | ||
30 | /* So far nothing hangs here */ | 30 | /* So far nothing hangs here */ |
31 | #undef USE_LIO3_IRQ | 31 | #undef USE_LIO3_IRQ |
32 | 32 | ||
33 | struct sgint_regs *sgint; | 33 | struct sgint_regs *sgint; |
34 | 34 | ||
@@ -272,32 +272,32 @@ void indy_buserror_irq(struct pt_regs *regs) | |||
272 | irq_exit(); | 272 | irq_exit(); |
273 | } | 273 | } |
274 | 274 | ||
275 | static struct irqaction local0_cascade = { | 275 | static struct irqaction local0_cascade = { |
276 | .handler = no_action, | 276 | .handler = no_action, |
277 | .flags = SA_INTERRUPT, | 277 | .flags = SA_INTERRUPT, |
278 | .name = "local0 cascade", | 278 | .name = "local0 cascade", |
279 | }; | 279 | }; |
280 | 280 | ||
281 | static struct irqaction local1_cascade = { | 281 | static struct irqaction local1_cascade = { |
282 | .handler = no_action, | 282 | .handler = no_action, |
283 | .flags = SA_INTERRUPT, | 283 | .flags = SA_INTERRUPT, |
284 | .name = "local1 cascade", | 284 | .name = "local1 cascade", |
285 | }; | 285 | }; |
286 | 286 | ||
287 | static struct irqaction buserr = { | 287 | static struct irqaction buserr = { |
288 | .handler = no_action, | 288 | .handler = no_action, |
289 | .flags = SA_INTERRUPT, | 289 | .flags = SA_INTERRUPT, |
290 | .name = "Bus Error", | 290 | .name = "Bus Error", |
291 | }; | 291 | }; |
292 | 292 | ||
293 | static struct irqaction map0_cascade = { | 293 | static struct irqaction map0_cascade = { |
294 | .handler = no_action, | 294 | .handler = no_action, |
295 | .flags = SA_INTERRUPT, | 295 | .flags = SA_INTERRUPT, |
296 | .name = "mapable0 cascade", | 296 | .name = "mapable0 cascade", |
297 | }; | 297 | }; |
298 | 298 | ||
299 | #ifdef USE_LIO3_IRQ | 299 | #ifdef USE_LIO3_IRQ |
300 | static struct irqaction map1_cascade = { | 300 | static struct irqaction map1_cascade = { |
301 | .handler = no_action, | 301 | .handler = no_action, |
302 | .flags = SA_INTERRUPT, | 302 | .flags = SA_INTERRUPT, |
303 | .name = "mapable1 cascade", | 303 | .name = "mapable1 cascade", |
diff --git a/arch/mips/sgi-ip22/ip22-nvram.c b/arch/mips/sgi-ip22/ip22-nvram.c index de43e86fa17c..fd29fd407ae8 100644 --- a/arch/mips/sgi-ip22/ip22-nvram.c +++ b/arch/mips/sgi-ip22/ip22-nvram.c | |||
@@ -39,7 +39,7 @@ | |||
39 | *ptr |= EEPROM_CSEL; \ | 39 | *ptr |= EEPROM_CSEL; \ |
40 | *ptr |= EEPROM_ECLK; }) | 40 | *ptr |= EEPROM_ECLK; }) |
41 | 41 | ||
42 | 42 | ||
43 | #define eeprom_cs_off(ptr) ({ \ | 43 | #define eeprom_cs_off(ptr) ({ \ |
44 | *ptr &= ~EEPROM_ECLK; \ | 44 | *ptr &= ~EEPROM_ECLK; \ |
45 | *ptr &= ~EEPROM_CSEL; \ | 45 | *ptr &= ~EEPROM_CSEL; \ |
@@ -50,7 +50,7 @@ | |||
50 | /* | 50 | /* |
51 | * clock in the nvram command and the register number. For the | 51 | * clock in the nvram command and the register number. For the |
52 | * national semiconductor nv ram chip the op code is 3 bits and | 52 | * national semiconductor nv ram chip the op code is 3 bits and |
53 | * the address is 6/8 bits. | 53 | * the address is 6/8 bits. |
54 | */ | 54 | */ |
55 | static inline void eeprom_cmd(volatile unsigned int *ctrl, unsigned cmd, | 55 | static inline void eeprom_cmd(volatile unsigned int *ctrl, unsigned cmd, |
56 | unsigned reg) | 56 | unsigned reg) |
@@ -90,7 +90,7 @@ unsigned short ip22_eeprom_read(volatile unsigned int *ctrl, int reg) | |||
90 | if (*ctrl & EEPROM_DATI) | 90 | if (*ctrl & EEPROM_DATI) |
91 | res |= 1; | 91 | res |= 1; |
92 | } | 92 | } |
93 | 93 | ||
94 | eeprom_cs_off(ctrl); | 94 | eeprom_cs_off(ctrl); |
95 | 95 | ||
96 | return res; | 96 | return res; |
@@ -113,7 +113,7 @@ unsigned short ip22_nvram_read(int reg) | |||
113 | reg <<= 1; | 113 | reg <<= 1; |
114 | tmp = hpc3c0->bbram[reg++] & 0xff; | 114 | tmp = hpc3c0->bbram[reg++] & 0xff; |
115 | return (tmp << 8) | (hpc3c0->bbram[reg] & 0xff); | 115 | return (tmp << 8) | (hpc3c0->bbram[reg] & 0xff); |
116 | } | 116 | } |
117 | } | 117 | } |
118 | 118 | ||
119 | EXPORT_SYMBOL(ip22_nvram_read); | 119 | EXPORT_SYMBOL(ip22_nvram_read); |
diff --git a/arch/mips/sgi-ip22/ip22-reset.c b/arch/mips/sgi-ip22/ip22-reset.c index ed5c60adce63..214ffd2e98a3 100644 --- a/arch/mips/sgi-ip22/ip22-reset.c +++ b/arch/mips/sgi-ip22/ip22-reset.c | |||
@@ -185,7 +185,7 @@ static irqreturn_t panel_int(int irq, void *dev_id, struct pt_regs *regs) | |||
185 | add_timer(&debounce_timer); | 185 | add_timer(&debounce_timer); |
186 | } | 186 | } |
187 | 187 | ||
188 | /* Power button was pressed | 188 | /* Power button was pressed |
189 | * ioc.ps page 22: "The Panel Register is called Power Control by Full | 189 | * ioc.ps page 22: "The Panel Register is called Power Control by Full |
190 | * House. Only lowest 2 bits are used. Guiness uses upper four bits | 190 | * House. Only lowest 2 bits are used. Guiness uses upper four bits |
191 | * for volume control". This is not true, all bits are pulled high | 191 | * for volume control". This is not true, all bits are pulled high |
diff --git a/arch/mips/sgi-ip22/ip22-time.c b/arch/mips/sgi-ip22/ip22-time.c index 173f76805ea3..df9b5694328a 100644 --- a/arch/mips/sgi-ip22/ip22-time.c +++ b/arch/mips/sgi-ip22/ip22-time.c | |||
@@ -126,7 +126,7 @@ static __init void indy_time_init(void) | |||
126 | unsigned long r4k_ticks[3]; | 126 | unsigned long r4k_ticks[3]; |
127 | unsigned long r4k_tick; | 127 | unsigned long r4k_tick; |
128 | 128 | ||
129 | /* | 129 | /* |
130 | * Figure out the r4k offset, the algorithm is very simple and works in | 130 | * Figure out the r4k offset, the algorithm is very simple and works in |
131 | * _all_ cases as long as the 8254 counter register itself works ok (as | 131 | * _all_ cases as long as the 8254 counter register itself works ok (as |
132 | * an interrupt driving timer it does not because of bug, this is why | 132 | * an interrupt driving timer it does not because of bug, this is why |
diff --git a/arch/mips/sgi-ip27/ip27-memory.c b/arch/mips/sgi-ip27/ip27-memory.c index a160d04f7dbe..ef20d9ac0ba3 100644 --- a/arch/mips/sgi-ip27/ip27-memory.c +++ b/arch/mips/sgi-ip27/ip27-memory.c | |||
@@ -538,7 +538,7 @@ void __init mem_init(void) | |||
538 | for_each_online_node(node) { | 538 | for_each_online_node(node) { |
539 | unsigned slot, numslots; | 539 | unsigned slot, numslots; |
540 | struct page *end, *p; | 540 | struct page *end, *p; |
541 | 541 | ||
542 | /* | 542 | /* |
543 | * This will free up the bootmem, ie, slot 0 memory. | 543 | * This will free up the bootmem, ie, slot 0 memory. |
544 | */ | 544 | */ |
diff --git a/arch/mips/sgi-ip32/ip32-reset.c b/arch/mips/sgi-ip32/ip32-reset.c index 281f090e48a4..88e1f52059ff 100644 --- a/arch/mips/sgi-ip32/ip32-reset.c +++ b/arch/mips/sgi-ip32/ip32-reset.c | |||
@@ -140,7 +140,7 @@ static irqreturn_t ip32_rtc_int(int irq, void *dev_id, struct pt_regs *regs) | |||
140 | 140 | ||
141 | reg_c = CMOS_READ(RTC_INTR_FLAGS); | 141 | reg_c = CMOS_READ(RTC_INTR_FLAGS); |
142 | if (!(reg_c & RTC_IRQF)) { | 142 | if (!(reg_c & RTC_IRQF)) { |
143 | printk(KERN_WARNING | 143 | printk(KERN_WARNING |
144 | "%s: RTC IRQ without RTC_IRQF\n", __FUNCTION__); | 144 | "%s: RTC IRQ without RTC_IRQF\n", __FUNCTION__); |
145 | } | 145 | } |
146 | /* Wait until interrupt goes away */ | 146 | /* Wait until interrupt goes away */ |
diff --git a/arch/mips/sibyte/cfe/cfe_error.h b/arch/mips/sibyte/cfe/cfe_error.h index 77eb4935bfb4..975f00002cbe 100644 --- a/arch/mips/sibyte/cfe/cfe_error.h +++ b/arch/mips/sibyte/cfe/cfe_error.h | |||
@@ -17,15 +17,15 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | /* ********************************************************************* | 19 | /* ********************************************************************* |
20 | * | 20 | * |
21 | * Broadcom Common Firmware Environment (CFE) | 21 | * Broadcom Common Firmware Environment (CFE) |
22 | * | 22 | * |
23 | * Error codes File: cfe_error.h | 23 | * Error codes File: cfe_error.h |
24 | * | 24 | * |
25 | * CFE's global error code list is here. | 25 | * CFE's global error code list is here. |
26 | * | 26 | * |
27 | * Author: Mitch Lichtenberg | 27 | * Author: Mitch Lichtenberg |
28 | * | 28 | * |
29 | ********************************************************************* */ | 29 | ********************************************************************* */ |
30 | 30 | ||
31 | 31 | ||
diff --git a/arch/mips/sibyte/cfe/console.c b/arch/mips/sibyte/cfe/console.c index 53a5c1eb5611..7721100d0275 100644 --- a/arch/mips/sibyte/cfe/console.c +++ b/arch/mips/sibyte/cfe/console.c | |||
@@ -38,7 +38,7 @@ static void cfe_console_write(struct console *cons, const char *str, | |||
38 | last += written; | 38 | last += written; |
39 | } while (last < count); | 39 | } while (last < count); |
40 | } | 40 | } |
41 | 41 | ||
42 | } | 42 | } |
43 | 43 | ||
44 | static int cfe_console_setup(struct console *cons, char *str) | 44 | static int cfe_console_setup(struct console *cons, char *str) |
diff --git a/arch/mips/sibyte/cfe/setup.c b/arch/mips/sibyte/cfe/setup.c index d6d0364fa760..7a2c7a8510d4 100644 --- a/arch/mips/sibyte/cfe/setup.c +++ b/arch/mips/sibyte/cfe/setup.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include "cfe_error.h" | 33 | #include "cfe_error.h" |
34 | 34 | ||
35 | /* Max ram addressable in 32-bit segments */ | 35 | /* Max ram addressable in 32-bit segments */ |
36 | #ifdef CONFIG_MIPS64 | 36 | #ifdef CONFIG_64BIT |
37 | #define MAX_RAM_SIZE (~0ULL) | 37 | #define MAX_RAM_SIZE (~0ULL) |
38 | #else | 38 | #else |
39 | #ifdef CONFIG_HIGHMEM | 39 | #ifdef CONFIG_HIGHMEM |
@@ -285,7 +285,7 @@ void __init prom_init(void) | |||
285 | while (1) ; | 285 | while (1) ; |
286 | } | 286 | } |
287 | cfe_init(cfe_handle, cfe_ept); | 287 | cfe_init(cfe_handle, cfe_ept); |
288 | /* | 288 | /* |
289 | * Get the handle for (at least) prom_putchar, possibly for | 289 | * Get the handle for (at least) prom_putchar, possibly for |
290 | * boot console | 290 | * boot console |
291 | */ | 291 | */ |
diff --git a/arch/mips/sibyte/cfe/smp.c b/arch/mips/sibyte/cfe/smp.c index 73392190d2b1..e44ce1a9eea9 100644 --- a/arch/mips/sibyte/cfe/smp.c +++ b/arch/mips/sibyte/cfe/smp.c | |||
@@ -57,7 +57,7 @@ void __init prom_prepare_cpus(unsigned int max_cpus) | |||
57 | void prom_boot_secondary(int cpu, struct task_struct *idle) | 57 | void prom_boot_secondary(int cpu, struct task_struct *idle) |
58 | { | 58 | { |
59 | int retval; | 59 | int retval; |
60 | 60 | ||
61 | retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap, | 61 | retval = cfe_cpu_start(cpu_logical_map(cpu), &smp_bootstrap, |
62 | __KSTK_TOS(idle), | 62 | __KSTK_TOS(idle), |
63 | (unsigned long)idle->thread_info, 0); | 63 | (unsigned long)idle->thread_info, 0); |
diff --git a/arch/mips/sibyte/sb1250/bus_watcher.c b/arch/mips/sibyte/sb1250/bus_watcher.c index 182a16f42e2d..1a97e3127aeb 100644 --- a/arch/mips/sibyte/sb1250/bus_watcher.c +++ b/arch/mips/sibyte/sb1250/bus_watcher.c | |||
@@ -10,13 +10,13 @@ | |||
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. | 12 | * GNU General Public License for more details. |
13 | * | 13 | * |
14 | * You should have received a copy of the GNU General Public License | 14 | * You should have received a copy of the GNU General Public License |
15 | * along with this program; if not, write to the Free Software | 15 | * along with this program; if not, write to the Free Software |
16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
17 | */ | 17 | */ |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * The Bus Watcher monitors internal bus transactions and maintains | 20 | * The Bus Watcher monitors internal bus transactions and maintains |
21 | * counts of transactions with error status, logging details and | 21 | * counts of transactions with error status, logging details and |
22 | * causing one of several interrupts. This driver provides a handler | 22 | * causing one of several interrupts. This driver provides a handler |
@@ -155,7 +155,7 @@ static int bw_read_proc(char *page, char **start, off_t off, | |||
155 | static void create_proc_decoder(struct bw_stats_struct *stats) | 155 | static void create_proc_decoder(struct bw_stats_struct *stats) |
156 | { | 156 | { |
157 | struct proc_dir_entry *ent; | 157 | struct proc_dir_entry *ent; |
158 | 158 | ||
159 | ent = create_proc_read_entry("bus_watcher", S_IWUSR | S_IRUGO, NULL, | 159 | ent = create_proc_read_entry("bus_watcher", S_IWUSR | S_IRUGO, NULL, |
160 | bw_read_proc, stats); | 160 | bw_read_proc, stats); |
161 | if (!ent) { | 161 | if (!ent) { |
diff --git a/arch/mips/sibyte/sb1250/irq.c b/arch/mips/sibyte/sb1250/irq.c index 2728abbc94d2..2725b263cced 100644 --- a/arch/mips/sibyte/sb1250/irq.c +++ b/arch/mips/sibyte/sb1250/irq.c | |||
@@ -377,7 +377,7 @@ void __init arch_init_irq(void) | |||
377 | 377 | ||
378 | /* | 378 | /* |
379 | * Note that the timer interrupts are also mapped, but this is | 379 | * Note that the timer interrupts are also mapped, but this is |
380 | * done in sb1250_time_init(). Also, the profiling driver | 380 | * done in sb1250_time_init(). Also, the profiling driver |
381 | * does its own management of IP7. | 381 | * does its own management of IP7. |
382 | */ | 382 | */ |
383 | 383 | ||
@@ -392,7 +392,7 @@ void __init arch_init_irq(void) | |||
392 | if (kgdb_flag) { | 392 | if (kgdb_flag) { |
393 | kgdb_irq = K_INT_UART_0 + kgdb_port; | 393 | kgdb_irq = K_INT_UART_0 + kgdb_port; |
394 | 394 | ||
395 | #ifdef CONFIG_SIBYTE_SB1250_DUART | 395 | #ifdef CONFIG_SIBYTE_SB1250_DUART |
396 | sb1250_duart_present[kgdb_port] = 0; | 396 | sb1250_duart_present[kgdb_port] = 0; |
397 | #endif | 397 | #endif |
398 | /* Setup uart 1 settings, mapper */ | 398 | /* Setup uart 1 settings, mapper */ |
diff --git a/arch/mips/sibyte/swarm/rtc_m41t81.c b/arch/mips/sibyte/swarm/rtc_m41t81.c index 0e633ee8d83c..a686bb716ec6 100644 --- a/arch/mips/sibyte/swarm/rtc_m41t81.c +++ b/arch/mips/sibyte/swarm/rtc_m41t81.c | |||
@@ -128,7 +128,7 @@ static int m41t81_write(uint8_t addr, int b) | |||
128 | /* Clear error bit by writing a 1 */ | 128 | /* Clear error bit by writing a 1 */ |
129 | bus_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); | 129 | bus_writeq(M_SMB_ERROR, SMB_CSR(R_SMB_STATUS)); |
130 | return -1; | 130 | return -1; |
131 | } | 131 | } |
132 | 132 | ||
133 | /* read the same byte again to make sure it is written */ | 133 | /* read the same byte again to make sure it is written */ |
134 | bus_writeq(V_SMB_ADDR(M41T81_CCR_ADDRESS) | V_SMB_TT_RD1BYTE, | 134 | bus_writeq(V_SMB_ADDR(M41T81_CCR_ADDRESS) | V_SMB_TT_RD1BYTE, |
@@ -136,7 +136,7 @@ static int m41t81_write(uint8_t addr, int b) | |||
136 | 136 | ||
137 | while (bus_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) | 137 | while (bus_readq(SMB_CSR(R_SMB_STATUS)) & M_SMB_BUSY) |
138 | ; | 138 | ; |
139 | 139 | ||
140 | return 0; | 140 | return 0; |
141 | } | 141 | } |
142 | 142 | ||
@@ -148,13 +148,13 @@ int m41t81_set_time(unsigned long t) | |||
148 | 148 | ||
149 | /* | 149 | /* |
150 | * Note the write order matters as it ensures the correctness. | 150 | * Note the write order matters as it ensures the correctness. |
151 | * When we write sec, 10th sec is clear. It is reasonable to | 151 | * When we write sec, 10th sec is clear. It is reasonable to |
152 | * believe we should finish writing min within a second. | 152 | * believe we should finish writing min within a second. |
153 | */ | 153 | */ |
154 | 154 | ||
155 | tm.tm_sec = BIN2BCD(tm.tm_sec); | 155 | tm.tm_sec = BIN2BCD(tm.tm_sec); |
156 | m41t81_write(M41T81REG_SC, tm.tm_sec); | 156 | m41t81_write(M41T81REG_SC, tm.tm_sec); |
157 | 157 | ||
158 | tm.tm_min = BIN2BCD(tm.tm_min); | 158 | tm.tm_min = BIN2BCD(tm.tm_min); |
159 | m41t81_write(M41T81REG_MN, tm.tm_min); | 159 | m41t81_write(M41T81REG_MN, tm.tm_min); |
160 | 160 | ||
@@ -187,7 +187,7 @@ unsigned long m41t81_get_time(void) | |||
187 | { | 187 | { |
188 | unsigned int year, mon, day, hour, min, sec; | 188 | unsigned int year, mon, day, hour, min, sec; |
189 | 189 | ||
190 | /* | 190 | /* |
191 | * min is valid if two reads of sec are the same. | 191 | * min is valid if two reads of sec are the same. |
192 | */ | 192 | */ |
193 | for (;;) { | 193 | for (;;) { |
diff --git a/arch/mips/sibyte/swarm/setup.c b/arch/mips/sibyte/swarm/setup.c index 457aeb7be858..4daeaa413def 100644 --- a/arch/mips/sibyte/swarm/setup.c +++ b/arch/mips/sibyte/swarm/setup.c | |||
@@ -73,7 +73,7 @@ int swarm_be_handler(struct pt_regs *regs, int is_fixup) | |||
73 | { | 73 | { |
74 | if (!is_fixup && (regs->cp0_cause & 4)) { | 74 | if (!is_fixup && (regs->cp0_cause & 4)) { |
75 | /* Data bus error - print PA */ | 75 | /* Data bus error - print PA */ |
76 | #ifdef CONFIG_MIPS64 | 76 | #ifdef CONFIG_64BIT |
77 | printk("DBE physical address: %010lx\n", | 77 | printk("DBE physical address: %010lx\n", |
78 | __read_64bit_c0_register($26, 1)); | 78 | __read_64bit_c0_register($26, 1)); |
79 | #else | 79 | #else |
@@ -98,7 +98,7 @@ static int __init swarm_setup(void) | |||
98 | rtc_get_time = xicor_get_time; | 98 | rtc_get_time = xicor_get_time; |
99 | rtc_set_time = xicor_set_time; | 99 | rtc_set_time = xicor_set_time; |
100 | } | 100 | } |
101 | 101 | ||
102 | if (m41t81_probe()) { | 102 | if (m41t81_probe()) { |
103 | printk("swarm setup: M41T81 RTC detected.\n"); | 103 | printk("swarm setup: M41T81 RTC detected.\n"); |
104 | rtc_get_time = m41t81_get_time; | 104 | rtc_get_time = m41t81_get_time; |
diff --git a/arch/mips/sni/irq.c b/arch/mips/sni/irq.c index 62c760f14674..141a310d74d8 100644 --- a/arch/mips/sni/irq.c +++ b/arch/mips/sni/irq.c | |||
@@ -103,7 +103,7 @@ static unsigned int ls1bit8(unsigned int x) | |||
103 | 103 | ||
104 | /* | 104 | /* |
105 | * hwint 1 deals with EISA and SCSI interrupts, | 105 | * hwint 1 deals with EISA and SCSI interrupts, |
106 | * | 106 | * |
107 | * The EISA_INT bit in CSITPEND is high active, all others are low active. | 107 | * The EISA_INT bit in CSITPEND is high active, all others are low active. |
108 | */ | 108 | */ |
109 | void pciasic_hwint1(struct pt_regs *regs) | 109 | void pciasic_hwint1(struct pt_regs *regs) |
diff --git a/arch/mips/sni/setup.c b/arch/mips/sni/setup.c index 8f67cee4317b..1b3f8a0903e1 100644 --- a/arch/mips/sni/setup.c +++ b/arch/mips/sni/setup.c | |||
@@ -111,7 +111,7 @@ static struct resource sni_mem_resource = { | |||
111 | * The RM200/RM300 has a few holes in it's PCI/EISA memory address space used | 111 | * The RM200/RM300 has a few holes in it's PCI/EISA memory address space used |
112 | * for other purposes. Be paranoid and allocate all of the before the PCI | 112 | * for other purposes. Be paranoid and allocate all of the before the PCI |
113 | * code gets a chance to to map anything else there ... | 113 | * code gets a chance to to map anything else there ... |
114 | * | 114 | * |
115 | * This leaves the following areas available: | 115 | * This leaves the following areas available: |
116 | * | 116 | * |
117 | * 0x10000000 - 0x1009ffff (640kB) PCI/EISA/ISA Bus Memory | 117 | * 0x10000000 - 0x1009ffff (640kB) PCI/EISA/ISA Bus Memory |
diff --git a/arch/mips/tx4927/common/tx4927_irq_handler.S b/arch/mips/tx4927/common/tx4927_irq_handler.S index ca123e28d1ef..dd3ceda9d712 100644 --- a/arch/mips/tx4927/common/tx4927_irq_handler.S +++ b/arch/mips/tx4927/common/tx4927_irq_handler.S | |||
@@ -42,13 +42,13 @@ | |||
42 | CLI | 42 | CLI |
43 | .set at | 43 | .set at |
44 | 44 | ||
45 | mfc0 t0, CP0_CAUSE | 45 | mfc0 t0, CP0_CAUSE |
46 | mfc0 t1, CP0_STATUS | 46 | mfc0 t1, CP0_STATUS |
47 | and t0, t1 | 47 | and t0, t1 |
48 | 48 | ||
49 | andi t1, t0, STATUSF_IP7 /* cpu timer */ | 49 | andi t1, t0, STATUSF_IP7 /* cpu timer */ |
50 | bnez t1, ll_ip7 | 50 | bnez t1, ll_ip7 |
51 | 51 | ||
52 | /* IP6..IP3 multiplexed -- do not use */ | 52 | /* IP6..IP3 multiplexed -- do not use */ |
53 | 53 | ||
54 | andi t1, t0, STATUSF_IP2 /* tx4927 pic */ | 54 | andi t1, t0, STATUSF_IP2 /* tx4927 pic */ |
diff --git a/arch/mips/tx4927/common/tx4927_setup.c b/arch/mips/tx4927/common/tx4927_setup.c index 16bcbdc6d1cc..26d7c53612a8 100644 --- a/arch/mips/tx4927/common/tx4927_setup.c +++ b/arch/mips/tx4927/common/tx4927_setup.c | |||
@@ -152,7 +152,7 @@ dump_cp0(char *key) | |||
152 | print_cp0(key, 16, "CONFIG ", read_c0_config()); | 152 | print_cp0(key, 16, "CONFIG ", read_c0_config()); |
153 | return; | 153 | return; |
154 | } | 154 | } |
155 | 155 | ||
156 | void print_pic(char *key, u32 reg, char *name) | 156 | void print_pic(char *key, u32 reg, char *name) |
157 | { | 157 | { |
158 | printk("%s pic:0x%08x:%s=0x%08x\n", key, reg, name, | 158 | printk("%s pic:0x%08x:%s=0x%08x\n", key, reg, name, |
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/Makefile b/arch/mips/tx4927/toshiba_rbtx4927/Makefile index 86ca4cf2d587..c1a377a80a5d 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/Makefile +++ b/arch/mips/tx4927/toshiba_rbtx4927/Makefile | |||
@@ -1,5 +1,5 @@ | |||
1 | obj-y += toshiba_rbtx4927_prom.o | 1 | obj-y += toshiba_rbtx4927_prom.o |
2 | obj-y += toshiba_rbtx4927_setup.o | 2 | obj-y += toshiba_rbtx4927_setup.o |
3 | obj-y += toshiba_rbtx4927_irq.o | 3 | obj-y += toshiba_rbtx4927_irq.o |
4 | 4 | ||
5 | EXTRA_AFLAGS := $(CFLAGS) | 5 | EXTRA_AFLAGS := $(CFLAGS) |
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c index fd5b433f83b7..aee07ff2212a 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c | |||
@@ -31,7 +31,7 @@ | |||
31 | 31 | ||
32 | 32 | ||
33 | /* | 33 | /* |
34 | IRQ Device | 34 | IRQ Device |
35 | 00 RBTX4927-ISA/00 | 35 | 00 RBTX4927-ISA/00 |
36 | 01 RBTX4927-ISA/01 PS2/Keyboard | 36 | 01 RBTX4927-ISA/01 PS2/Keyboard |
37 | 02 RBTX4927-ISA/02 Cascade RBTX4927-ISA (irqs 8-15) | 37 | 02 RBTX4927-ISA/02 Cascade RBTX4927-ISA (irqs 8-15) |
@@ -52,15 +52,15 @@ IRQ Device | |||
52 | 16 TX4927-CP0/00 Software 0 | 52 | 16 TX4927-CP0/00 Software 0 |
53 | 17 TX4927-CP0/01 Software 1 | 53 | 17 TX4927-CP0/01 Software 1 |
54 | 18 TX4927-CP0/02 Cascade TX4927-CP0 | 54 | 18 TX4927-CP0/02 Cascade TX4927-CP0 |
55 | 19 TX4927-CP0/03 Multiplexed -- do not use | 55 | 19 TX4927-CP0/03 Multiplexed -- do not use |
56 | 20 TX4927-CP0/04 Multiplexed -- do not use | 56 | 20 TX4927-CP0/04 Multiplexed -- do not use |
57 | 21 TX4927-CP0/05 Multiplexed -- do not use | 57 | 21 TX4927-CP0/05 Multiplexed -- do not use |
58 | 22 TX4927-CP0/06 Multiplexed -- do not use | 58 | 22 TX4927-CP0/06 Multiplexed -- do not use |
59 | 23 TX4927-CP0/07 CPU TIMER | 59 | 23 TX4927-CP0/07 CPU TIMER |
60 | 60 | ||
61 | 24 TX4927-PIC/00 | 61 | 24 TX4927-PIC/00 |
62 | 25 TX4927-PIC/01 | 62 | 25 TX4927-PIC/01 |
63 | 26 TX4927-PIC/02 | 63 | 26 TX4927-PIC/02 |
64 | 27 TX4927-PIC/03 Cascade RBTX4927-IOC | 64 | 27 TX4927-PIC/03 Cascade RBTX4927-IOC |
65 | 28 TX4927-PIC/04 | 65 | 28 TX4927-PIC/04 |
66 | 29 TX4927-PIC/05 RBTX4927 RTL-8019AS ethernet | 66 | 29 TX4927-PIC/05 RBTX4927 RTL-8019AS ethernet |
@@ -80,7 +80,7 @@ IRQ Device | |||
80 | 43 TX4927-PIC/19 | 80 | 43 TX4927-PIC/19 |
81 | 44 TX4927-PIC/20 | 81 | 44 TX4927-PIC/20 |
82 | 45 TX4927-PIC/21 | 82 | 45 TX4927-PIC/21 |
83 | 46 TX4927-PIC/22 TX4927 PCI PCI-ERR | 83 | 46 TX4927-PIC/22 TX4927 PCI PCI-ERR |
84 | 47 TX4927-PIC/23 TX4927 PCI PCI-PMA (not used) | 84 | 47 TX4927-PIC/23 TX4927 PCI PCI-PMA (not used) |
85 | 48 TX4927-PIC/24 | 85 | 48 TX4927-PIC/24 |
86 | 49 TX4927-PIC/25 | 86 | 49 TX4927-PIC/25 |
@@ -100,7 +100,7 @@ IRQ Device | |||
100 | 62 RBTX4927-IOC/06 | 100 | 62 RBTX4927-IOC/06 |
101 | 63 RBTX4927-IOC/07 | 101 | 63 RBTX4927-IOC/07 |
102 | 102 | ||
103 | NOTES: | 103 | NOTES: |
104 | SouthBridge/INTR is mapped to SouthBridge/A=PCI-B/#58 | 104 | SouthBridge/INTR is mapped to SouthBridge/A=PCI-B/#58 |
105 | SouthBridge/ISA/pin=0 no pci irq used by this device | 105 | SouthBridge/ISA/pin=0 no pci irq used by this device |
106 | SouthBridge/IDE/pin=1 no pci irq used by this device, using INTR via ISA IRQ14 | 106 | SouthBridge/IDE/pin=1 no pci irq used by this device, using INTR via ISA IRQ14 |
@@ -175,19 +175,19 @@ JP7 is not bus master -- do NOT use -- only 4 pci bus master's allowed -- SouthB | |||
175 | static const u32 toshiba_rbtx4927_irq_debug_flag = | 175 | static const u32 toshiba_rbtx4927_irq_debug_flag = |
176 | (TOSHIBA_RBTX4927_IRQ_NONE | TOSHIBA_RBTX4927_IRQ_INFO | | 176 | (TOSHIBA_RBTX4927_IRQ_NONE | TOSHIBA_RBTX4927_IRQ_INFO | |
177 | TOSHIBA_RBTX4927_IRQ_WARN | TOSHIBA_RBTX4927_IRQ_EROR | 177 | TOSHIBA_RBTX4927_IRQ_WARN | TOSHIBA_RBTX4927_IRQ_EROR |
178 | // | TOSHIBA_RBTX4927_IRQ_IOC_INIT | 178 | // | TOSHIBA_RBTX4927_IRQ_IOC_INIT |
179 | // | TOSHIBA_RBTX4927_IRQ_IOC_STARTUP | 179 | // | TOSHIBA_RBTX4927_IRQ_IOC_STARTUP |
180 | // | TOSHIBA_RBTX4927_IRQ_IOC_SHUTDOWN | 180 | // | TOSHIBA_RBTX4927_IRQ_IOC_SHUTDOWN |
181 | // | TOSHIBA_RBTX4927_IRQ_IOC_ENABLE | 181 | // | TOSHIBA_RBTX4927_IRQ_IOC_ENABLE |
182 | // | TOSHIBA_RBTX4927_IRQ_IOC_DISABLE | 182 | // | TOSHIBA_RBTX4927_IRQ_IOC_DISABLE |
183 | // | TOSHIBA_RBTX4927_IRQ_IOC_MASK | 183 | // | TOSHIBA_RBTX4927_IRQ_IOC_MASK |
184 | // | TOSHIBA_RBTX4927_IRQ_IOC_ENDIRQ | 184 | // | TOSHIBA_RBTX4927_IRQ_IOC_ENDIRQ |
185 | // | TOSHIBA_RBTX4927_IRQ_ISA_INIT | 185 | // | TOSHIBA_RBTX4927_IRQ_ISA_INIT |
186 | // | TOSHIBA_RBTX4927_IRQ_ISA_STARTUP | 186 | // | TOSHIBA_RBTX4927_IRQ_ISA_STARTUP |
187 | // | TOSHIBA_RBTX4927_IRQ_ISA_SHUTDOWN | 187 | // | TOSHIBA_RBTX4927_IRQ_ISA_SHUTDOWN |
188 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENABLE | 188 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENABLE |
189 | // | TOSHIBA_RBTX4927_IRQ_ISA_DISABLE | 189 | // | TOSHIBA_RBTX4927_IRQ_ISA_DISABLE |
190 | // | TOSHIBA_RBTX4927_IRQ_ISA_MASK | 190 | // | TOSHIBA_RBTX4927_IRQ_ISA_MASK |
191 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ | 191 | // | TOSHIBA_RBTX4927_IRQ_ISA_ENDIRQ |
192 | ); | 192 | ); |
193 | #endif | 193 | #endif |
diff --git a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c index 8724ea3ae04e..fc0720599fd9 100644 --- a/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +++ b/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c | |||
@@ -395,7 +395,7 @@ static int __init tx4927_pcibios_init(void) | |||
395 | /* enable secondary ide */ | 395 | /* enable secondary ide */ |
396 | v08_43 |= 0x80; | 396 | v08_43 |= 0x80; |
397 | 397 | ||
398 | /* | 398 | /* |
399 | * !!! DO NOT REMOVE THIS COMMENT IT IS REQUIRED BY SMSC !!! | 399 | * !!! DO NOT REMOVE THIS COMMENT IT IS REQUIRED BY SMSC !!! |
400 | * | 400 | * |
401 | * This line of code is intended to provide the user with a work | 401 | * This line of code is intended to provide the user with a work |
diff --git a/arch/mips/vr4181/common/Makefile b/arch/mips/vr4181/common/Makefile deleted file mode 100644 index f7587ca64ead..000000000000 --- a/arch/mips/vr4181/common/Makefile +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for common code of NEC vr4181 based boards | ||
3 | # | ||
4 | |||
5 | obj-y := irq.o int_handler.o serial.o time.o | ||
6 | |||
7 | EXTRA_AFLAGS := $(CFLAGS) | ||
diff --git a/arch/mips/vr4181/common/int_handler.S b/arch/mips/vr4181/common/int_handler.S deleted file mode 100644 index 2c041b8ee52b..000000000000 --- a/arch/mips/vr4181/common/int_handler.S +++ /dev/null | |||
@@ -1,206 +0,0 @@ | |||
1 | /* | ||
2 | * arch/mips/vr4181/common/int_handler.S | ||
3 | * | ||
4 | * Adapted to the VR4181 and almost entirely rewritten: | ||
5 | * Copyright (C) 1999 Bradley D. LaRonde and Michael Klar | ||
6 | * | ||
7 | * Clean up to conform to the new IRQ | ||
8 | * Copyright (C) 2001 MontaVista Software Inc. | ||
9 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
10 | * | ||
11 | * This file is subject to the terms and conditions of the GNU General Public | ||
12 | * License. See the file "COPYING" in the main directory of this archive | ||
13 | * for more details. | ||
14 | * | ||
15 | */ | ||
16 | |||
17 | #include <asm/asm.h> | ||
18 | #include <asm/regdef.h> | ||
19 | #include <asm/mipsregs.h> | ||
20 | #include <asm/stackframe.h> | ||
21 | |||
22 | #include <asm/vr4181/vr4181.h> | ||
23 | |||
24 | /* | ||
25 | * [jsun] | ||
26 | * See include/asm/vr4181/irq.h for IRQ assignment and strategy. | ||
27 | */ | ||
28 | |||
29 | .text | ||
30 | .set noreorder | ||
31 | |||
32 | .align 5 | ||
33 | NESTED(vr4181_handle_irq, PT_SIZE, ra) | ||
34 | |||
35 | .set noat | ||
36 | SAVE_ALL | ||
37 | CLI | ||
38 | |||
39 | .set at | ||
40 | .set noreorder | ||
41 | |||
42 | mfc0 t0, CP0_CAUSE | ||
43 | mfc0 t2, CP0_STATUS | ||
44 | |||
45 | and t0, t2 | ||
46 | |||
47 | /* we check IP3 first; it happens most frequently */ | ||
48 | andi t1, t0, STATUSF_IP3 | ||
49 | bnez t1, ll_cpu_ip3 | ||
50 | andi t1, t0, STATUSF_IP2 | ||
51 | bnez t1, ll_cpu_ip2 | ||
52 | andi t1, t0, STATUSF_IP7 /* cpu timer */ | ||
53 | bnez t1, ll_cputimer_irq | ||
54 | andi t1, t0, STATUSF_IP4 | ||
55 | bnez t1, ll_cpu_ip4 | ||
56 | andi t1, t0, STATUSF_IP5 | ||
57 | bnez t1, ll_cpu_ip5 | ||
58 | andi t1, t0, STATUSF_IP6 | ||
59 | bnez t1, ll_cpu_ip6 | ||
60 | andi t1, t0, STATUSF_IP0 /* software int 0 */ | ||
61 | bnez t1, ll_cpu_ip0 | ||
62 | andi t1, t0, STATUSF_IP1 /* software int 1 */ | ||
63 | bnez t1, ll_cpu_ip1 | ||
64 | nop | ||
65 | |||
66 | .set reorder | ||
67 | do_spurious: | ||
68 | j spurious_interrupt | ||
69 | |||
70 | /* | ||
71 | * regular CPU irqs | ||
72 | */ | ||
73 | ll_cputimer_irq: | ||
74 | li a0, VR4181_IRQ_TIMER | ||
75 | move a1, sp | ||
76 | jal do_IRQ | ||
77 | j ret_from_irq | ||
78 | |||
79 | |||
80 | ll_cpu_ip0: | ||
81 | li a0, VR4181_IRQ_SW1 | ||
82 | move a1, sp | ||
83 | jal do_IRQ | ||
84 | j ret_from_irq | ||
85 | |||
86 | ll_cpu_ip1: | ||
87 | li a0, VR4181_IRQ_SW2 | ||
88 | move a1, sp | ||
89 | jal do_IRQ | ||
90 | j ret_from_irq | ||
91 | |||
92 | ll_cpu_ip3: | ||
93 | li a0, VR4181_IRQ_INT1 | ||
94 | move a1, sp | ||
95 | jal do_IRQ | ||
96 | j ret_from_irq | ||
97 | |||
98 | ll_cpu_ip4: | ||
99 | li a0, VR4181_IRQ_INT2 | ||
100 | move a1, sp | ||
101 | jal do_IRQ | ||
102 | j ret_from_irq | ||
103 | |||
104 | ll_cpu_ip5: | ||
105 | li a0, VR4181_IRQ_INT3 | ||
106 | move a1, sp | ||
107 | jal do_IRQ | ||
108 | j ret_from_irq | ||
109 | |||
110 | ll_cpu_ip6: | ||
111 | li a0, VR4181_IRQ_INT4 | ||
112 | move a1, sp | ||
113 | jal do_IRQ | ||
114 | j ret_from_irq | ||
115 | |||
116 | /* | ||
117 | * One of the sys irq has happend. | ||
118 | * | ||
119 | * In the interest of speed, we first determine in the following order | ||
120 | * which 16-irq block have pending interrupts: | ||
121 | * sysint1 (16 sources, including cascading intrs from GPIO) | ||
122 | * sysint2 | ||
123 | * gpio (16 intr sources) | ||
124 | * | ||
125 | * Then we do binary search to find the exact interrupt source. | ||
126 | */ | ||
127 | ll_cpu_ip2: | ||
128 | |||
129 | lui t3,%hi(VR4181_SYSINT1REG) | ||
130 | lhu t0,%lo(VR4181_SYSINT1REG)(t3) | ||
131 | lhu t2,%lo(VR4181_MSYSINT1REG)(t3) | ||
132 | and t0, 0xfffb /* hack - remove RTC Long 1 intr */ | ||
133 | and t0, t2 | ||
134 | beqz t0, check_sysint2 | ||
135 | |||
136 | /* check for GPIO interrupts */ | ||
137 | andi t1, t0, 0x0100 | ||
138 | bnez t1, check_gpio_int | ||
139 | |||
140 | /* so we have an interrupt in sysint1 which is not gpio int */ | ||
141 | li a0, VR4181_SYS_IRQ_BASE - 1 | ||
142 | j check_16 | ||
143 | |||
144 | check_sysint2: | ||
145 | |||
146 | lhu t0,%lo(VR4181_SYSINT2REG)(t3) | ||
147 | lhu t2,%lo(VR4181_MSYSINT2REG)(t3) | ||
148 | and t0, 0xfffe /* hack - remove RTC Long 2 intr */ | ||
149 | and t0, t2 | ||
150 | li a0, VR4181_SYS_IRQ_BASE + 16 - 1 | ||
151 | j check_16 | ||
152 | |||
153 | check_gpio_int: | ||
154 | lui t3,%hi(VR4181_GPINTMSK) | ||
155 | lhu t0,%lo(VR4181_GPINTMSK)(t3) | ||
156 | lhu t2,%lo(VR4181_GPINTSTAT)(t3) | ||
157 | xori t0, 0xffff /* why? reverse logic? */ | ||
158 | and t0, t2 | ||
159 | li a0, VR4181_GPIO_IRQ_BASE - 1 | ||
160 | j check_16 | ||
161 | |||
162 | /* | ||
163 | * When we reach check_16, we have 16-bit status in t0 and base irq number | ||
164 | * in a0. | ||
165 | */ | ||
166 | check_16: | ||
167 | andi t1, t0, 0xff | ||
168 | bnez t1, check_8 | ||
169 | |||
170 | srl t0, 8 | ||
171 | addi a0, 8 | ||
172 | j check_8 | ||
173 | |||
174 | /* | ||
175 | * When we reach check_8, we have 8-bit status in t0 and base irq number | ||
176 | * in a0. | ||
177 | */ | ||
178 | check_8: | ||
179 | andi t1, t0, 0xf | ||
180 | bnez t1, check_4 | ||
181 | |||
182 | srl t0, 4 | ||
183 | addi a0, 4 | ||
184 | j check_4 | ||
185 | |||
186 | /* | ||
187 | * When we reach check_4, we have 4-bit status in t0 and base irq number | ||
188 | * in a0. | ||
189 | */ | ||
190 | check_4: | ||
191 | andi t0, t0, 0xf | ||
192 | beqz t0, do_spurious | ||
193 | |||
194 | loop: | ||
195 | andi t2, t0, 0x1 | ||
196 | srl t0, 1 | ||
197 | addi a0, 1 | ||
198 | beqz t2, loop | ||
199 | |||
200 | found_it: | ||
201 | move a1, sp | ||
202 | jal do_IRQ | ||
203 | |||
204 | j ret_from_irq | ||
205 | |||
206 | END(vr4181_handle_irq) | ||
diff --git a/arch/mips/vr4181/common/irq.c b/arch/mips/vr4181/common/irq.c deleted file mode 100644 index 2cdf77c5cb3e..000000000000 --- a/arch/mips/vr4181/common/irq.c +++ /dev/null | |||
@@ -1,239 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2001 MontaVista Software Inc. | ||
3 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
4 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) | ||
5 | * | ||
6 | * linux/arch/mips/vr4181/common/irq.c | ||
7 | * Completely re-written to use the new irq.c | ||
8 | * | ||
9 | * Credits to Bradley D. LaRonde and Michael Klar for writing the original | ||
10 | * irq.c file which was derived from the common irq.c file. | ||
11 | * | ||
12 | * This file is subject to the terms and conditions of the GNU General Public | ||
13 | * License. See the file "COPYING" in the main directory of this archive | ||
14 | * for more details. | ||
15 | */ | ||
16 | #include <linux/types.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/kernel_stat.h> | ||
19 | #include <linux/signal.h> | ||
20 | #include <linux/sched.h> | ||
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/slab.h> | ||
23 | #include <linux/random.h> | ||
24 | |||
25 | #include <asm/irq.h> | ||
26 | #include <asm/mipsregs.h> | ||
27 | #include <asm/gdb-stub.h> | ||
28 | |||
29 | #include <asm/vr4181/vr4181.h> | ||
30 | |||
31 | /* | ||
32 | * Strategy: | ||
33 | * | ||
34 | * We essentially have three irq controllers, CPU, system, and gpio. | ||
35 | * | ||
36 | * CPU irq controller is taken care by arch/mips/kernel/irq_cpu.c and | ||
37 | * CONFIG_IRQ_CPU config option. | ||
38 | * | ||
39 | * We here provide sys_irq and gpio_irq controller code. | ||
40 | */ | ||
41 | |||
42 | static int sys_irq_base; | ||
43 | static int gpio_irq_base; | ||
44 | |||
45 | /* ---------------------- sys irq ------------------------ */ | ||
46 | static void | ||
47 | sys_irq_enable(unsigned int irq) | ||
48 | { | ||
49 | irq -= sys_irq_base; | ||
50 | if (irq < 16) { | ||
51 | *VR4181_MSYSINT1REG |= (u16)(1 << irq); | ||
52 | } else { | ||
53 | irq -= 16; | ||
54 | *VR4181_MSYSINT2REG |= (u16)(1 << irq); | ||
55 | } | ||
56 | } | ||
57 | |||
58 | static void | ||
59 | sys_irq_disable(unsigned int irq) | ||
60 | { | ||
61 | irq -= sys_irq_base; | ||
62 | if (irq < 16) { | ||
63 | *VR4181_MSYSINT1REG &= ~((u16)(1 << irq)); | ||
64 | } else { | ||
65 | irq -= 16; | ||
66 | *VR4181_MSYSINT2REG &= ~((u16)(1 << irq)); | ||
67 | } | ||
68 | |||
69 | } | ||
70 | |||
71 | static unsigned int | ||
72 | sys_irq_startup(unsigned int irq) | ||
73 | { | ||
74 | sys_irq_enable(irq); | ||
75 | return 0; | ||
76 | } | ||
77 | |||
78 | #define sys_irq_shutdown sys_irq_disable | ||
79 | #define sys_irq_ack sys_irq_disable | ||
80 | |||
81 | static void | ||
82 | sys_irq_end(unsigned int irq) | ||
83 | { | ||
84 | if(!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | ||
85 | sys_irq_enable(irq); | ||
86 | } | ||
87 | |||
88 | static hw_irq_controller sys_irq_controller = { | ||
89 | "vr4181_sys_irq", | ||
90 | sys_irq_startup, | ||
91 | sys_irq_shutdown, | ||
92 | sys_irq_enable, | ||
93 | sys_irq_disable, | ||
94 | sys_irq_ack, | ||
95 | sys_irq_end, | ||
96 | NULL /* no affinity stuff for UP */ | ||
97 | }; | ||
98 | |||
99 | /* ---------------------- gpio irq ------------------------ */ | ||
100 | /* gpio irq lines use reverse logic */ | ||
101 | static void | ||
102 | gpio_irq_enable(unsigned int irq) | ||
103 | { | ||
104 | irq -= gpio_irq_base; | ||
105 | *VR4181_GPINTMSK &= ~((u16)(1 << irq)); | ||
106 | } | ||
107 | |||
108 | static void | ||
109 | gpio_irq_disable(unsigned int irq) | ||
110 | { | ||
111 | irq -= gpio_irq_base; | ||
112 | *VR4181_GPINTMSK |= (u16)(1 << irq); | ||
113 | } | ||
114 | |||
115 | static unsigned int | ||
116 | gpio_irq_startup(unsigned int irq) | ||
117 | { | ||
118 | gpio_irq_enable(irq); | ||
119 | |||
120 | irq -= gpio_irq_base; | ||
121 | *VR4181_GPINTEN |= (u16)(1 << irq ); | ||
122 | |||
123 | return 0; | ||
124 | } | ||
125 | |||
126 | static void | ||
127 | gpio_irq_shutdown(unsigned int irq) | ||
128 | { | ||
129 | gpio_irq_disable(irq); | ||
130 | |||
131 | irq -= gpio_irq_base; | ||
132 | *VR4181_GPINTEN &= ~((u16)(1 << irq )); | ||
133 | } | ||
134 | |||
135 | static void | ||
136 | gpio_irq_ack(unsigned int irq) | ||
137 | { | ||
138 | u16 irqtype; | ||
139 | u16 irqshift; | ||
140 | |||
141 | gpio_irq_disable(irq); | ||
142 | |||
143 | /* we clear interrupt if it is edge triggered */ | ||
144 | irq -= gpio_irq_base; | ||
145 | if (irq < 8) { | ||
146 | irqtype = *VR4181_GPINTTYPL; | ||
147 | irqshift = 2 << (irq*2); | ||
148 | } else { | ||
149 | irqtype = *VR4181_GPINTTYPH; | ||
150 | irqshift = 2 << ((irq-8)*2); | ||
151 | } | ||
152 | if ( ! (irqtype & irqshift) ) { | ||
153 | *VR4181_GPINTSTAT = (u16) (1 << irq); | ||
154 | } | ||
155 | } | ||
156 | |||
157 | static void | ||
158 | gpio_irq_end(unsigned int irq) | ||
159 | { | ||
160 | if(!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | ||
161 | gpio_irq_enable(irq); | ||
162 | } | ||
163 | |||
164 | static hw_irq_controller gpio_irq_controller = { | ||
165 | "vr4181_gpio_irq", | ||
166 | gpio_irq_startup, | ||
167 | gpio_irq_shutdown, | ||
168 | gpio_irq_enable, | ||
169 | gpio_irq_disable, | ||
170 | gpio_irq_ack, | ||
171 | gpio_irq_end, | ||
172 | NULL /* no affinity stuff for UP */ | ||
173 | }; | ||
174 | |||
175 | /* --------------------- IRQ init stuff ---------------------- */ | ||
176 | |||
177 | extern asmlinkage void vr4181_handle_irq(void); | ||
178 | extern void breakpoint(void); | ||
179 | extern int setup_irq(unsigned int irq, struct irqaction *irqaction); | ||
180 | extern void mips_cpu_irq_init(u32 irq_base); | ||
181 | |||
182 | static struct irqaction cascade = | ||
183 | { no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade", NULL, NULL }; | ||
184 | static struct irqaction reserved = | ||
185 | { no_action, SA_INTERRUPT, CPU_MASK_NONE, "cascade", NULL, NULL }; | ||
186 | |||
187 | void __init arch_init_irq(void) | ||
188 | { | ||
189 | int i; | ||
190 | |||
191 | set_except_vector(0, vr4181_handle_irq); | ||
192 | |||
193 | /* init CPU irqs */ | ||
194 | mips_cpu_irq_init(VR4181_CPU_IRQ_BASE); | ||
195 | |||
196 | /* init sys irqs */ | ||
197 | sys_irq_base = VR4181_SYS_IRQ_BASE; | ||
198 | for (i=sys_irq_base; i < sys_irq_base + VR4181_NUM_SYS_IRQ; i++) { | ||
199 | irq_desc[i].status = IRQ_DISABLED; | ||
200 | irq_desc[i].action = NULL; | ||
201 | irq_desc[i].depth = 1; | ||
202 | irq_desc[i].handler = &sys_irq_controller; | ||
203 | } | ||
204 | |||
205 | /* init gpio irqs */ | ||
206 | gpio_irq_base = VR4181_GPIO_IRQ_BASE; | ||
207 | for (i=gpio_irq_base; i < gpio_irq_base + VR4181_NUM_GPIO_IRQ; i++) { | ||
208 | irq_desc[i].status = IRQ_DISABLED; | ||
209 | irq_desc[i].action = NULL; | ||
210 | irq_desc[i].depth = 1; | ||
211 | irq_desc[i].handler = &gpio_irq_controller; | ||
212 | } | ||
213 | |||
214 | /* Default all ICU IRQs to off ... */ | ||
215 | *VR4181_MSYSINT1REG = 0; | ||
216 | *VR4181_MSYSINT2REG = 0; | ||
217 | |||
218 | /* We initialize the level 2 ICU registers to all bits disabled. */ | ||
219 | *VR4181_MPIUINTREG = 0; | ||
220 | *VR4181_MAIUINTREG = 0; | ||
221 | *VR4181_MKIUINTREG = 0; | ||
222 | |||
223 | /* disable all GPIO intrs */ | ||
224 | *VR4181_GPINTMSK = 0xffff; | ||
225 | |||
226 | /* vector handler. What these do is register the IRQ as non-sharable */ | ||
227 | setup_irq(VR4181_IRQ_INT0, &cascade); | ||
228 | setup_irq(VR4181_IRQ_GIU, &cascade); | ||
229 | |||
230 | /* | ||
231 | * RTC interrupts are interesting. They have two destinations. | ||
232 | * One is at sys irq controller, and the other is at CPU IP3 and IP4. | ||
233 | * RTC timer is used as system timer. | ||
234 | * We enable them here, but timer routine will register later | ||
235 | * with CPU IP3/IP4. | ||
236 | */ | ||
237 | setup_irq(VR4181_IRQ_RTCL1, &reserved); | ||
238 | setup_irq(VR4181_IRQ_RTCL2, &reserved); | ||
239 | } | ||
diff --git a/arch/mips/vr4181/common/serial.c b/arch/mips/vr4181/common/serial.c deleted file mode 100644 index 3f62c62b107f..000000000000 --- a/arch/mips/vr4181/common/serial.c +++ /dev/null | |||
@@ -1,51 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2001 MontaVista Software Inc. | ||
3 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
4 | * | ||
5 | * arch/mips/vr4181/common/serial.c | ||
6 | * initialize serial port on vr4181. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | /* | ||
16 | * [jsun, 010925] | ||
17 | * You need to make sure rs_table has at least one element in | ||
18 | * drivers/char/serial.c file. There is no good way to do it right | ||
19 | * now. A workaround is to include CONFIG_SERIAL_MANY_PORTS in your | ||
20 | * configure file, which would gives you 64 ports and wastes 11K ram. | ||
21 | */ | ||
22 | |||
23 | #include <linux/types.h> | ||
24 | #include <linux/kernel.h> | ||
25 | #include <linux/init.h> | ||
26 | #include <linux/serial.h> | ||
27 | |||
28 | #include <asm/vr4181/vr4181.h> | ||
29 | |||
30 | void __init vr4181_init_serial(void) | ||
31 | { | ||
32 | struct serial_struct s; | ||
33 | |||
34 | /* turn on UART clock */ | ||
35 | *VR4181_CMUCLKMSK |= VR4181_CMUCLKMSK_MSKSIU; | ||
36 | |||
37 | /* clear memory */ | ||
38 | memset(&s, 0, sizeof(s)); | ||
39 | |||
40 | s.line = 0; /* we set the first one */ | ||
41 | s.baud_base = 1152000; | ||
42 | s.irq = VR4181_IRQ_SIU; | ||
43 | s.flags = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST; /* STD_COM_FLAGS */ | ||
44 | s.iomem_base = (u8*)VR4181_SIURB; | ||
45 | s.iomem_reg_shift = 0; | ||
46 | s.io_type = SERIAL_IO_MEM; | ||
47 | if (early_serial_setup(&s) != 0) { | ||
48 | panic("vr4181_init_serial() failed!"); | ||
49 | } | ||
50 | } | ||
51 | |||
diff --git a/arch/mips/vr4181/common/time.c b/arch/mips/vr4181/common/time.c deleted file mode 100644 index 17814076b6f4..000000000000 --- a/arch/mips/vr4181/common/time.c +++ /dev/null | |||
@@ -1,145 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2001 MontaVista Software Inc. | ||
3 | * Author: jsun@mvista.com or jsun@junsun.net | ||
4 | * | ||
5 | * rtc and time ops for vr4181. Part of code is drived from | ||
6 | * linux-vr, originally written by Bradley D. LaRonde & Michael Klar. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/spinlock.h> | ||
17 | #include <linux/param.h> /* for HZ */ | ||
18 | #include <linux/time.h> | ||
19 | #include <linux/interrupt.h> | ||
20 | |||
21 | #include <asm/system.h> | ||
22 | #include <asm/time.h> | ||
23 | |||
24 | #include <asm/vr4181/vr4181.h> | ||
25 | |||
26 | #define COUNTS_PER_JIFFY ((32768 + HZ/2) / HZ) | ||
27 | |||
28 | /* | ||
29 | * RTC ops | ||
30 | */ | ||
31 | |||
32 | DEFINE_SPINLOCK(rtc_lock); | ||
33 | |||
34 | /* per VR41xx docs, bad data can be read if between 2 counts */ | ||
35 | static inline unsigned short | ||
36 | read_time_reg(volatile unsigned short *reg) | ||
37 | { | ||
38 | unsigned short value; | ||
39 | do { | ||
40 | value = *reg; | ||
41 | barrier(); | ||
42 | } while (value != *reg); | ||
43 | return value; | ||
44 | } | ||
45 | |||
46 | static unsigned long | ||
47 | vr4181_rtc_get_time(void) | ||
48 | { | ||
49 | unsigned short regh, regm, regl; | ||
50 | |||
51 | // why this crazy order, you ask? to guarantee that neither m | ||
52 | // nor l wrap before all 3 read | ||
53 | do { | ||
54 | regm = read_time_reg(VR4181_ETIMEMREG); | ||
55 | barrier(); | ||
56 | regh = read_time_reg(VR4181_ETIMEHREG); | ||
57 | barrier(); | ||
58 | regl = read_time_reg(VR4181_ETIMELREG); | ||
59 | } while (regm != read_time_reg(VR4181_ETIMEMREG)); | ||
60 | return ((regh << 17) | (regm << 1) | (regl >> 15)); | ||
61 | } | ||
62 | |||
63 | static int | ||
64 | vr4181_rtc_set_time(unsigned long timeval) | ||
65 | { | ||
66 | unsigned short intreg; | ||
67 | unsigned long flags; | ||
68 | |||
69 | spin_lock_irqsave(&rtc_lock, flags); | ||
70 | intreg = *VR4181_RTCINTREG & 0x05; | ||
71 | barrier(); | ||
72 | *VR4181_ETIMELREG = timeval << 15; | ||
73 | *VR4181_ETIMEMREG = timeval >> 1; | ||
74 | *VR4181_ETIMEHREG = timeval >> 17; | ||
75 | barrier(); | ||
76 | // assume that any ints that just triggered are invalid, since the | ||
77 | // time value is written non-atomically in 3 separate regs | ||
78 | *VR4181_RTCINTREG = 0x05 ^ intreg; | ||
79 | spin_unlock_irqrestore(&rtc_lock, flags); | ||
80 | |||
81 | return 0; | ||
82 | } | ||
83 | |||
84 | |||
85 | /* | ||
86 | * timer interrupt routine (wrapper) | ||
87 | * | ||
88 | * we need our own interrupt routine because we need to clear | ||
89 | * RTC1 interrupt. | ||
90 | */ | ||
91 | static void | ||
92 | vr4181_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | ||
93 | { | ||
94 | /* Clear the interrupt. */ | ||
95 | *VR4181_RTCINTREG = 0x2; | ||
96 | |||
97 | /* call the generic one */ | ||
98 | timer_interrupt(irq, dev_id, regs); | ||
99 | } | ||
100 | |||
101 | |||
102 | /* | ||
103 | * vr4181_time_init: | ||
104 | * | ||
105 | * We pick the following choices: | ||
106 | * . we use elapsed timer as the RTC. We set some reasonable init data since | ||
107 | * it does not persist across reset | ||
108 | * . we use RTC1 as the system timer interrupt source. | ||
109 | * . we use CPU counter for fast_gettimeoffset and we calivrate the cpu | ||
110 | * frequency. In other words, we use calibrate_div64_gettimeoffset(). | ||
111 | * . we use our own timer interrupt routine which clears the interrupt | ||
112 | * and then calls the generic high-level timer interrupt routine. | ||
113 | * | ||
114 | */ | ||
115 | |||
116 | extern int setup_irq(unsigned int irq, struct irqaction *irqaction); | ||
117 | |||
118 | static void | ||
119 | vr4181_timer_setup(struct irqaction *irq) | ||
120 | { | ||
121 | /* over-write the handler to be our own one */ | ||
122 | irq->handler = vr4181_timer_interrupt; | ||
123 | |||
124 | /* sets up the frequency */ | ||
125 | *VR4181_RTCL1LREG = COUNTS_PER_JIFFY; | ||
126 | *VR4181_RTCL1HREG = 0; | ||
127 | |||
128 | /* and ack any pending ints */ | ||
129 | *VR4181_RTCINTREG = 0x2; | ||
130 | |||
131 | /* setup irqaction */ | ||
132 | setup_irq(VR4181_IRQ_INT1, irq); | ||
133 | |||
134 | } | ||
135 | |||
136 | void | ||
137 | vr4181_init_time(void) | ||
138 | { | ||
139 | /* setup hookup functions */ | ||
140 | rtc_get_time = vr4181_rtc_get_time; | ||
141 | rtc_set_time = vr4181_rtc_set_time; | ||
142 | |||
143 | board_timer_setup = vr4181_timer_setup; | ||
144 | } | ||
145 | |||
diff --git a/arch/mips/vr4181/osprey/Makefile b/arch/mips/vr4181/osprey/Makefile deleted file mode 100644 index 34be05790883..000000000000 --- a/arch/mips/vr4181/osprey/Makefile +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for common code of NEC Osprey board | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o prom.o reset.o | ||
6 | |||
7 | obj-$(CONFIG_KGDB) += dbg_io.o | ||
diff --git a/arch/mips/vr4181/osprey/dbg_io.c b/arch/mips/vr4181/osprey/dbg_io.c deleted file mode 100644 index 5e8a84072d5b..000000000000 --- a/arch/mips/vr4181/osprey/dbg_io.c +++ /dev/null | |||
@@ -1,136 +0,0 @@ | |||
1 | /* | ||
2 | * kgdb io functions for osprey. We use the serial port on debug board. | ||
3 | * | ||
4 | * Copyright (C) 2001 MontaVista Software Inc. | ||
5 | * Author: jsun@mvista.com or jsun@junsun.net | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | /* ======================= CONFIG ======================== */ | ||
15 | |||
16 | /* [jsun] we use the second serial port for kdb */ | ||
17 | #define BASE 0xb7fffff0 | ||
18 | #define MAX_BAUD 115200 | ||
19 | |||
20 | /* distance in bytes between two serial registers */ | ||
21 | #define REG_OFFSET 1 | ||
22 | |||
23 | /* | ||
24 | * 0 - kgdb does serial init | ||
25 | * 1 - kgdb skip serial init | ||
26 | */ | ||
27 | static int remoteDebugInitialized = 1; | ||
28 | |||
29 | /* | ||
30 | * the default baud rate *if* kgdb does serial init | ||
31 | */ | ||
32 | #define BAUD_DEFAULT UART16550_BAUD_38400 | ||
33 | |||
34 | /* ======================= END OF CONFIG ======================== */ | ||
35 | |||
36 | typedef unsigned char uint8; | ||
37 | typedef unsigned int uint32; | ||
38 | |||
39 | #define UART16550_BAUD_2400 2400 | ||
40 | #define UART16550_BAUD_4800 4800 | ||
41 | #define UART16550_BAUD_9600 9600 | ||
42 | #define UART16550_BAUD_19200 19200 | ||
43 | #define UART16550_BAUD_38400 38400 | ||
44 | #define UART16550_BAUD_57600 57600 | ||
45 | #define UART16550_BAUD_115200 115200 | ||
46 | |||
47 | #define UART16550_PARITY_NONE 0 | ||
48 | #define UART16550_PARITY_ODD 0x08 | ||
49 | #define UART16550_PARITY_EVEN 0x18 | ||
50 | #define UART16550_PARITY_MARK 0x28 | ||
51 | #define UART16550_PARITY_SPACE 0x38 | ||
52 | |||
53 | #define UART16550_DATA_5BIT 0x0 | ||
54 | #define UART16550_DATA_6BIT 0x1 | ||
55 | #define UART16550_DATA_7BIT 0x2 | ||
56 | #define UART16550_DATA_8BIT 0x3 | ||
57 | |||
58 | #define UART16550_STOP_1BIT 0x0 | ||
59 | #define UART16550_STOP_2BIT 0x4 | ||
60 | |||
61 | /* register offset */ | ||
62 | #define OFS_RCV_BUFFER 0 | ||
63 | #define OFS_TRANS_HOLD 0 | ||
64 | #define OFS_SEND_BUFFER 0 | ||
65 | #define OFS_INTR_ENABLE (1*REG_OFFSET) | ||
66 | #define OFS_INTR_ID (2*REG_OFFSET) | ||
67 | #define OFS_DATA_FORMAT (3*REG_OFFSET) | ||
68 | #define OFS_LINE_CONTROL (3*REG_OFFSET) | ||
69 | #define OFS_MODEM_CONTROL (4*REG_OFFSET) | ||
70 | #define OFS_RS232_OUTPUT (4*REG_OFFSET) | ||
71 | #define OFS_LINE_STATUS (5*REG_OFFSET) | ||
72 | #define OFS_MODEM_STATUS (6*REG_OFFSET) | ||
73 | #define OFS_RS232_INPUT (6*REG_OFFSET) | ||
74 | #define OFS_SCRATCH_PAD (7*REG_OFFSET) | ||
75 | |||
76 | #define OFS_DIVISOR_LSB (0*REG_OFFSET) | ||
77 | #define OFS_DIVISOR_MSB (1*REG_OFFSET) | ||
78 | |||
79 | |||
80 | /* memory-mapped read/write of the port */ | ||
81 | #define UART16550_READ(y) (*((volatile uint8*)(BASE + y))) | ||
82 | #define UART16550_WRITE(y, z) ((*((volatile uint8*)(BASE + y))) = z) | ||
83 | |||
84 | void debugInit(uint32 baud, uint8 data, uint8 parity, uint8 stop) | ||
85 | { | ||
86 | /* disable interrupts */ | ||
87 | UART16550_WRITE(OFS_INTR_ENABLE, 0); | ||
88 | |||
89 | /* set up buad rate */ | ||
90 | { | ||
91 | uint32 divisor; | ||
92 | |||
93 | /* set DIAB bit */ | ||
94 | UART16550_WRITE(OFS_LINE_CONTROL, 0x80); | ||
95 | |||
96 | /* set divisor */ | ||
97 | divisor = MAX_BAUD / baud; | ||
98 | UART16550_WRITE(OFS_DIVISOR_LSB, divisor & 0xff); | ||
99 | UART16550_WRITE(OFS_DIVISOR_MSB, (divisor & 0xff00) >> 8); | ||
100 | |||
101 | /* clear DIAB bit */ | ||
102 | UART16550_WRITE(OFS_LINE_CONTROL, 0x0); | ||
103 | } | ||
104 | |||
105 | /* set data format */ | ||
106 | UART16550_WRITE(OFS_DATA_FORMAT, data | parity | stop); | ||
107 | } | ||
108 | |||
109 | |||
110 | uint8 getDebugChar(void) | ||
111 | { | ||
112 | if (!remoteDebugInitialized) { | ||
113 | remoteDebugInitialized = 1; | ||
114 | debugInit(BAUD_DEFAULT, | ||
115 | UART16550_DATA_8BIT, | ||
116 | UART16550_PARITY_NONE, UART16550_STOP_1BIT); | ||
117 | } | ||
118 | |||
119 | while ((UART16550_READ(OFS_LINE_STATUS) & 0x1) == 0); | ||
120 | return UART16550_READ(OFS_RCV_BUFFER); | ||
121 | } | ||
122 | |||
123 | |||
124 | int putDebugChar(uint8 byte) | ||
125 | { | ||
126 | if (!remoteDebugInitialized) { | ||
127 | remoteDebugInitialized = 1; | ||
128 | debugInit(BAUD_DEFAULT, | ||
129 | UART16550_DATA_8BIT, | ||
130 | UART16550_PARITY_NONE, UART16550_STOP_1BIT); | ||
131 | } | ||
132 | |||
133 | while ((UART16550_READ(OFS_LINE_STATUS) & 0x20) == 0); | ||
134 | UART16550_WRITE(OFS_SEND_BUFFER, byte); | ||
135 | return 1; | ||
136 | } | ||
diff --git a/arch/mips/vr4181/osprey/prom.c b/arch/mips/vr4181/osprey/prom.c deleted file mode 100644 index af0d14561619..000000000000 --- a/arch/mips/vr4181/osprey/prom.c +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright 2001 MontaVista Software Inc. | ||
3 | * Author: jsun@mvista.com or jsun@junsun.net | ||
4 | * | ||
5 | * arch/mips/vr4181/osprey/prom.c | ||
6 | * prom code for osprey. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License as published by the | ||
10 | * Free Software Foundation; either version 2 of the License, or (at your | ||
11 | * option) any later version. | ||
12 | * | ||
13 | */ | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/kernel.h> | ||
16 | #include <linux/string.h> | ||
17 | #include <linux/mm.h> | ||
18 | #include <linux/bootmem.h> | ||
19 | #include <asm/bootinfo.h> | ||
20 | #include <asm/addrspace.h> | ||
21 | |||
22 | const char *get_system_type(void) | ||
23 | { | ||
24 | return "NEC_Vr41xx Osprey"; | ||
25 | } | ||
26 | |||
27 | /* | ||
28 | * [jsun] right now we assume it is the nec debug monitor, which does | ||
29 | * not pass any arguments. | ||
30 | */ | ||
31 | void __init prom_init(void) | ||
32 | { | ||
33 | // cmdline is now set in default config | ||
34 | // strcpy(arcs_cmdline, "ip=bootp "); | ||
35 | // strcat(arcs_cmdline, "ether=46,0x03fe0300,eth0 "); | ||
36 | // strcpy(arcs_cmdline, "ether=0,0x0300,eth0 " | ||
37 | // strcat(arcs_cmdline, "video=vr4181fb:xres:240,yres:320,bpp:8 "); | ||
38 | |||
39 | mips_machgroup = MACH_GROUP_NEC_VR41XX; | ||
40 | mips_machtype = MACH_NEC_OSPREY; | ||
41 | |||
42 | /* 16MB fixed */ | ||
43 | add_memory_region(0, 16 << 20, BOOT_MEM_RAM); | ||
44 | } | ||
45 | |||
46 | unsigned long __init prom_free_prom_memory(void) | ||
47 | { | ||
48 | return 0; | ||
49 | } | ||
diff --git a/arch/mips/vr4181/osprey/reset.c b/arch/mips/vr4181/osprey/reset.c deleted file mode 100644 index 036ae83d89d6..000000000000 --- a/arch/mips/vr4181/osprey/reset.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | /* | ||
2 | * This program is free software; you can redistribute it and/or modify it | ||
3 | * under the terms of the GNU General Public License as published by the | ||
4 | * Free Software Foundation; either version 2 of the License, or (at your | ||
5 | * option) any later version. | ||
6 | * | ||
7 | * Copyright (C) 1997, 2001 Ralf Baechle | ||
8 | * Copyright 2001 MontaVista Software Inc. | ||
9 | * Author: jsun@mvista.com or jsun@junsun.net | ||
10 | */ | ||
11 | #include <linux/sched.h> | ||
12 | #include <linux/mm.h> | ||
13 | #include <asm/io.h> | ||
14 | #include <asm/cacheflush.h> | ||
15 | #include <asm/processor.h> | ||
16 | #include <asm/reboot.h> | ||
17 | #include <asm/system.h> | ||
18 | |||
19 | void nec_osprey_restart(char *command) | ||
20 | { | ||
21 | set_c0_status(ST0_ERL); | ||
22 | change_c0_config(CONF_CM_CMASK, CONF_CM_UNCACHED); | ||
23 | flush_cache_all(); | ||
24 | write_c0_wired(0); | ||
25 | __asm__ __volatile__("jr\t%0"::"r"(0xbfc00000)); | ||
26 | } | ||
27 | |||
28 | void nec_osprey_halt(void) | ||
29 | { | ||
30 | printk(KERN_NOTICE "\n** You can safely turn off the power\n"); | ||
31 | while (1) | ||
32 | __asm__(".set\tmips3\n\t" | ||
33 | "wait\n\t" | ||
34 | ".set\tmips0"); | ||
35 | } | ||
36 | |||
37 | void nec_osprey_power_off(void) | ||
38 | { | ||
39 | nec_osprey_halt(); | ||
40 | } | ||
diff --git a/arch/mips/vr4181/osprey/setup.c b/arch/mips/vr4181/osprey/setup.c deleted file mode 100644 index 2ff7140e7ed7..000000000000 --- a/arch/mips/vr4181/osprey/setup.c +++ /dev/null | |||
@@ -1,68 +0,0 @@ | |||
1 | /* | ||
2 | * linux/arch/mips/vr4181/setup.c | ||
3 | * | ||
4 | * VR41xx setup routines | ||
5 | * | ||
6 | * Copyright (C) 1999 Bradley D. LaRonde | ||
7 | * Copyright (C) 1999, 2000 Michael Klar | ||
8 | * | ||
9 | * Copyright 2001 MontaVista Software Inc. | ||
10 | * Author: jsun@mvista.com or jsun@junsun.net | ||
11 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) | ||
12 | * | ||
13 | * This file is subject to the terms and conditions of the GNU General Public | ||
14 | * License. See the file "COPYING" in the main directory of this archive | ||
15 | * for more details. | ||
16 | * | ||
17 | */ | ||
18 | |||
19 | #include <linux/ide.h> | ||
20 | #include <linux/init.h> | ||
21 | #include <linux/delay.h> | ||
22 | #include <asm/reboot.h> | ||
23 | #include <asm/vr4181/vr4181.h> | ||
24 | #include <asm/io.h> | ||
25 | |||
26 | |||
27 | extern void nec_osprey_restart(char* c); | ||
28 | extern void nec_osprey_halt(void); | ||
29 | extern void nec_osprey_power_off(void); | ||
30 | |||
31 | extern void vr4181_init_serial(void); | ||
32 | extern void vr4181_init_time(void); | ||
33 | |||
34 | static void __init nec_osprey_setup(void) | ||
35 | { | ||
36 | set_io_port_base(VR4181_PORT_BASE); | ||
37 | isa_slot_offset = VR4181_ISAMEM_BASE; | ||
38 | |||
39 | vr4181_init_serial(); | ||
40 | vr4181_init_time(); | ||
41 | |||
42 | _machine_restart = nec_osprey_restart; | ||
43 | _machine_halt = nec_osprey_halt; | ||
44 | _machine_power_off = nec_osprey_power_off; | ||
45 | |||
46 | /* setup resource limit */ | ||
47 | ioport_resource.end = 0xffffffff; | ||
48 | iomem_resource.end = 0xffffffff; | ||
49 | |||
50 | /* [jsun] hack */ | ||
51 | /* | ||
52 | printk("[jsun] hack to change external ISA control register, %x -> %x\n", | ||
53 | (*VR4181_XISACTL), | ||
54 | (*VR4181_XISACTL) | 0x2); | ||
55 | *VR4181_XISACTL |= 0x2; | ||
56 | */ | ||
57 | |||
58 | // *VR4181_GPHIBSTH = 0x2000; | ||
59 | // *VR4181_GPMD0REG = 0x00c0; | ||
60 | // *VR4181_GPINTEN = 1<<6; | ||
61 | |||
62 | /* [jsun] I believe this will get the interrupt type right | ||
63 | * for the ether port. | ||
64 | */ | ||
65 | *VR4181_GPINTTYPL = 0x3000; | ||
66 | } | ||
67 | |||
68 | early_initcall(nec_osprey_setup); | ||
diff --git a/arch/mips/vr41xx/casio-e55/setup.c b/arch/mips/vr41xx/casio-e55/setup.c index aa8605ab76ff..d29201acc4f3 100644 --- a/arch/mips/vr41xx/casio-e55/setup.c +++ b/arch/mips/vr41xx/casio-e55/setup.c | |||
@@ -23,11 +23,6 @@ | |||
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/vr41xx/e55.h> | 24 | #include <asm/vr41xx/e55.h> |
25 | 25 | ||
26 | const char *get_system_type(void) | ||
27 | { | ||
28 | return "CASIO CASSIOPEIA E-11/15/55/65"; | ||
29 | } | ||
30 | |||
31 | static int __init casio_e55_setup(void) | 26 | static int __init casio_e55_setup(void) |
32 | { | 27 | { |
33 | set_io_port_base(IO_PORT_BASE); | 28 | set_io_port_base(IO_PORT_BASE); |
diff --git a/arch/mips/vr41xx/common/Makefile b/arch/mips/vr41xx/common/Makefile index fa98ef3855bc..9096302a7ecc 100644 --- a/arch/mips/vr41xx/common/Makefile +++ b/arch/mips/vr41xx/common/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for common code of the NEC VR4100 series. | 2 | # Makefile for common code of the NEC VR4100 series. |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += bcu.o cmu.o icu.o init.o int-handler.o pmu.o | 5 | obj-y += bcu.o cmu.o icu.o init.o int-handler.o irq.o pmu.o type.o |
6 | obj-$(CONFIG_VRC4173) += vrc4173.o | 6 | obj-$(CONFIG_VRC4173) += vrc4173.o |
7 | 7 | ||
8 | EXTRA_AFLAGS := $(CFLAGS) | 8 | EXTRA_AFLAGS := $(CFLAGS) |
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c index c842661144cb..0b73c5ab3c0c 100644 --- a/arch/mips/vr41xx/common/icu.c +++ b/arch/mips/vr41xx/common/icu.c | |||
@@ -3,8 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001-2002 MontaVista Software Inc. | 4 | * Copyright (C) 2001-2002 MontaVista Software Inc. |
5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> | 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> |
6 | * Copyright (C) 2003-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | 6 | * Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> |
7 | * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) | ||
8 | * | 7 | * |
9 | * 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 |
10 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -31,7 +30,7 @@ | |||
31 | */ | 30 | */ |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/interrupt.h> | 33 | #include <linux/ioport.h> |
35 | #include <linux/irq.h> | 34 | #include <linux/irq.h> |
36 | #include <linux/module.h> | 35 | #include <linux/module.h> |
37 | #include <linux/smp.h> | 36 | #include <linux/smp.h> |
@@ -39,34 +38,24 @@ | |||
39 | 38 | ||
40 | #include <asm/cpu.h> | 39 | #include <asm/cpu.h> |
41 | #include <asm/io.h> | 40 | #include <asm/io.h> |
42 | #include <asm/irq.h> | ||
43 | #include <asm/irq_cpu.h> | ||
44 | #include <asm/vr41xx/vr41xx.h> | 41 | #include <asm/vr41xx/vr41xx.h> |
45 | 42 | ||
46 | extern asmlinkage void vr41xx_handle_interrupt(void); | 43 | static void __iomem *icu1_base; |
47 | 44 | static void __iomem *icu2_base; | |
48 | extern void init_vr41xx_giuint_irq(void); | ||
49 | extern void giuint_irq_dispatch(struct pt_regs *regs); | ||
50 | |||
51 | static uint32_t icu1_base; | ||
52 | static uint32_t icu2_base; | ||
53 | |||
54 | static struct irqaction icu_cascade = { | ||
55 | .handler = no_action, | ||
56 | .mask = CPU_MASK_NONE, | ||
57 | .name = "cascade", | ||
58 | }; | ||
59 | 45 | ||
60 | static unsigned char sysint1_assign[16] = { | 46 | static unsigned char sysint1_assign[16] = { |
61 | 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; | 47 | 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
62 | static unsigned char sysint2_assign[16] = { | 48 | static unsigned char sysint2_assign[16] = { |
63 | 2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; | 49 | 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; |
64 | 50 | ||
65 | #define SYSINT1REG_TYPE1 KSEG1ADDR(0x0b000080) | 51 | #define ICU1_TYPE1_BASE 0x0b000080UL |
66 | #define SYSINT2REG_TYPE1 KSEG1ADDR(0x0b000200) | 52 | #define ICU2_TYPE1_BASE 0x0b000200UL |
67 | 53 | ||
68 | #define SYSINT1REG_TYPE2 KSEG1ADDR(0x0f000080) | 54 | #define ICU1_TYPE2_BASE 0x0f000080UL |
69 | #define SYSINT2REG_TYPE2 KSEG1ADDR(0x0f0000a0) | 55 | #define ICU2_TYPE2_BASE 0x0f0000a0UL |
56 | |||
57 | #define ICU1_SIZE 0x20 | ||
58 | #define ICU2_SIZE 0x1c | ||
70 | 59 | ||
71 | #define SYSINT1REG 0x00 | 60 | #define SYSINT1REG 0x00 |
72 | #define PIUINTREG 0x02 | 61 | #define PIUINTREG 0x02 |
@@ -106,61 +95,61 @@ static unsigned char sysint2_assign[16] = { | |||
106 | #define SYSINT1_IRQ_TO_PIN(x) ((x) - SYSINT1_IRQ_BASE) /* Pin 0-15 */ | 95 | #define SYSINT1_IRQ_TO_PIN(x) ((x) - SYSINT1_IRQ_BASE) /* Pin 0-15 */ |
107 | #define SYSINT2_IRQ_TO_PIN(x) ((x) - SYSINT2_IRQ_BASE) /* Pin 0-15 */ | 96 | #define SYSINT2_IRQ_TO_PIN(x) ((x) - SYSINT2_IRQ_BASE) /* Pin 0-15 */ |
108 | 97 | ||
109 | #define read_icu1(offset) readw(icu1_base + (offset)) | 98 | #define INT_TO_IRQ(x) ((x) + 2) /* Int0-4 -> IRQ2-6 */ |
110 | #define write_icu1(val, offset) writew((val), icu1_base + (offset)) | 99 | |
100 | #define icu1_read(offset) readw(icu1_base + (offset)) | ||
101 | #define icu1_write(offset, value) writew((value), icu1_base + (offset)) | ||
111 | 102 | ||
112 | #define read_icu2(offset) readw(icu2_base + (offset)) | 103 | #define icu2_read(offset) readw(icu2_base + (offset)) |
113 | #define write_icu2(val, offset) writew((val), icu2_base + (offset)) | 104 | #define icu2_write(offset, value) writew((value), icu2_base + (offset)) |
114 | 105 | ||
115 | #define INTASSIGN_MAX 4 | 106 | #define INTASSIGN_MAX 4 |
116 | #define INTASSIGN_MASK 0x0007 | 107 | #define INTASSIGN_MASK 0x0007 |
117 | 108 | ||
118 | static inline uint16_t set_icu1(uint8_t offset, uint16_t set) | 109 | static inline uint16_t icu1_set(uint8_t offset, uint16_t set) |
119 | { | 110 | { |
120 | uint16_t res; | 111 | uint16_t data; |
121 | 112 | ||
122 | res = read_icu1(offset); | 113 | data = icu1_read(offset); |
123 | res |= set; | 114 | data |= set; |
124 | write_icu1(res, offset); | 115 | icu1_write(offset, data); |
125 | 116 | ||
126 | return res; | 117 | return data; |
127 | } | 118 | } |
128 | 119 | ||
129 | static inline uint16_t clear_icu1(uint8_t offset, uint16_t clear) | 120 | static inline uint16_t icu1_clear(uint8_t offset, uint16_t clear) |
130 | { | 121 | { |
131 | uint16_t res; | 122 | uint16_t data; |
132 | 123 | ||
133 | res = read_icu1(offset); | 124 | data = icu1_read(offset); |
134 | res &= ~clear; | 125 | data &= ~clear; |
135 | write_icu1(res, offset); | 126 | icu1_write(offset, data); |
136 | 127 | ||
137 | return res; | 128 | return data; |
138 | } | 129 | } |
139 | 130 | ||
140 | static inline uint16_t set_icu2(uint8_t offset, uint16_t set) | 131 | static inline uint16_t icu2_set(uint8_t offset, uint16_t set) |
141 | { | 132 | { |
142 | uint16_t res; | 133 | uint16_t data; |
143 | 134 | ||
144 | res = read_icu2(offset); | 135 | data = icu2_read(offset); |
145 | res |= set; | 136 | data |= set; |
146 | write_icu2(res, offset); | 137 | icu2_write(offset, data); |
147 | 138 | ||
148 | return res; | 139 | return data; |
149 | } | 140 | } |
150 | 141 | ||
151 | static inline uint16_t clear_icu2(uint8_t offset, uint16_t clear) | 142 | static inline uint16_t icu2_clear(uint8_t offset, uint16_t clear) |
152 | { | 143 | { |
153 | uint16_t res; | 144 | uint16_t data; |
154 | 145 | ||
155 | res = read_icu2(offset); | 146 | data = icu2_read(offset); |
156 | res &= ~clear; | 147 | data &= ~clear; |
157 | write_icu2(res, offset); | 148 | icu2_write(offset, data); |
158 | 149 | ||
159 | return res; | 150 | return data; |
160 | } | 151 | } |
161 | 152 | ||
162 | /*=======================================================================*/ | ||
163 | |||
164 | void vr41xx_enable_piuint(uint16_t mask) | 153 | void vr41xx_enable_piuint(uint16_t mask) |
165 | { | 154 | { |
166 | irq_desc_t *desc = irq_desc + PIU_IRQ; | 155 | irq_desc_t *desc = irq_desc + PIU_IRQ; |
@@ -169,7 +158,7 @@ void vr41xx_enable_piuint(uint16_t mask) | |||
169 | if (current_cpu_data.cputype == CPU_VR4111 || | 158 | if (current_cpu_data.cputype == CPU_VR4111 || |
170 | current_cpu_data.cputype == CPU_VR4121) { | 159 | current_cpu_data.cputype == CPU_VR4121) { |
171 | spin_lock_irqsave(&desc->lock, flags); | 160 | spin_lock_irqsave(&desc->lock, flags); |
172 | set_icu1(MPIUINTREG, mask); | 161 | icu1_set(MPIUINTREG, mask); |
173 | spin_unlock_irqrestore(&desc->lock, flags); | 162 | spin_unlock_irqrestore(&desc->lock, flags); |
174 | } | 163 | } |
175 | } | 164 | } |
@@ -184,7 +173,7 @@ void vr41xx_disable_piuint(uint16_t mask) | |||
184 | if (current_cpu_data.cputype == CPU_VR4111 || | 173 | if (current_cpu_data.cputype == CPU_VR4111 || |
185 | current_cpu_data.cputype == CPU_VR4121) { | 174 | current_cpu_data.cputype == CPU_VR4121) { |
186 | spin_lock_irqsave(&desc->lock, flags); | 175 | spin_lock_irqsave(&desc->lock, flags); |
187 | clear_icu1(MPIUINTREG, mask); | 176 | icu1_clear(MPIUINTREG, mask); |
188 | spin_unlock_irqrestore(&desc->lock, flags); | 177 | spin_unlock_irqrestore(&desc->lock, flags); |
189 | } | 178 | } |
190 | } | 179 | } |
@@ -199,7 +188,7 @@ void vr41xx_enable_aiuint(uint16_t mask) | |||
199 | if (current_cpu_data.cputype == CPU_VR4111 || | 188 | if (current_cpu_data.cputype == CPU_VR4111 || |
200 | current_cpu_data.cputype == CPU_VR4121) { | 189 | current_cpu_data.cputype == CPU_VR4121) { |
201 | spin_lock_irqsave(&desc->lock, flags); | 190 | spin_lock_irqsave(&desc->lock, flags); |
202 | set_icu1(MAIUINTREG, mask); | 191 | icu1_set(MAIUINTREG, mask); |
203 | spin_unlock_irqrestore(&desc->lock, flags); | 192 | spin_unlock_irqrestore(&desc->lock, flags); |
204 | } | 193 | } |
205 | } | 194 | } |
@@ -214,7 +203,7 @@ void vr41xx_disable_aiuint(uint16_t mask) | |||
214 | if (current_cpu_data.cputype == CPU_VR4111 || | 203 | if (current_cpu_data.cputype == CPU_VR4111 || |
215 | current_cpu_data.cputype == CPU_VR4121) { | 204 | current_cpu_data.cputype == CPU_VR4121) { |
216 | spin_lock_irqsave(&desc->lock, flags); | 205 | spin_lock_irqsave(&desc->lock, flags); |
217 | clear_icu1(MAIUINTREG, mask); | 206 | icu1_clear(MAIUINTREG, mask); |
218 | spin_unlock_irqrestore(&desc->lock, flags); | 207 | spin_unlock_irqrestore(&desc->lock, flags); |
219 | } | 208 | } |
220 | } | 209 | } |
@@ -229,7 +218,7 @@ void vr41xx_enable_kiuint(uint16_t mask) | |||
229 | if (current_cpu_data.cputype == CPU_VR4111 || | 218 | if (current_cpu_data.cputype == CPU_VR4111 || |
230 | current_cpu_data.cputype == CPU_VR4121) { | 219 | current_cpu_data.cputype == CPU_VR4121) { |
231 | spin_lock_irqsave(&desc->lock, flags); | 220 | spin_lock_irqsave(&desc->lock, flags); |
232 | set_icu1(MKIUINTREG, mask); | 221 | icu1_set(MKIUINTREG, mask); |
233 | spin_unlock_irqrestore(&desc->lock, flags); | 222 | spin_unlock_irqrestore(&desc->lock, flags); |
234 | } | 223 | } |
235 | } | 224 | } |
@@ -244,7 +233,7 @@ void vr41xx_disable_kiuint(uint16_t mask) | |||
244 | if (current_cpu_data.cputype == CPU_VR4111 || | 233 | if (current_cpu_data.cputype == CPU_VR4111 || |
245 | current_cpu_data.cputype == CPU_VR4121) { | 234 | current_cpu_data.cputype == CPU_VR4121) { |
246 | spin_lock_irqsave(&desc->lock, flags); | 235 | spin_lock_irqsave(&desc->lock, flags); |
247 | clear_icu1(MKIUINTREG, mask); | 236 | icu1_clear(MKIUINTREG, mask); |
248 | spin_unlock_irqrestore(&desc->lock, flags); | 237 | spin_unlock_irqrestore(&desc->lock, flags); |
249 | } | 238 | } |
250 | } | 239 | } |
@@ -257,7 +246,7 @@ void vr41xx_enable_dsiuint(uint16_t mask) | |||
257 | unsigned long flags; | 246 | unsigned long flags; |
258 | 247 | ||
259 | spin_lock_irqsave(&desc->lock, flags); | 248 | spin_lock_irqsave(&desc->lock, flags); |
260 | set_icu1(MDSIUINTREG, mask); | 249 | icu1_set(MDSIUINTREG, mask); |
261 | spin_unlock_irqrestore(&desc->lock, flags); | 250 | spin_unlock_irqrestore(&desc->lock, flags); |
262 | } | 251 | } |
263 | 252 | ||
@@ -269,7 +258,7 @@ void vr41xx_disable_dsiuint(uint16_t mask) | |||
269 | unsigned long flags; | 258 | unsigned long flags; |
270 | 259 | ||
271 | spin_lock_irqsave(&desc->lock, flags); | 260 | spin_lock_irqsave(&desc->lock, flags); |
272 | clear_icu1(MDSIUINTREG, mask); | 261 | icu1_clear(MDSIUINTREG, mask); |
273 | spin_unlock_irqrestore(&desc->lock, flags); | 262 | spin_unlock_irqrestore(&desc->lock, flags); |
274 | } | 263 | } |
275 | 264 | ||
@@ -281,7 +270,7 @@ void vr41xx_enable_firint(uint16_t mask) | |||
281 | unsigned long flags; | 270 | unsigned long flags; |
282 | 271 | ||
283 | spin_lock_irqsave(&desc->lock, flags); | 272 | spin_lock_irqsave(&desc->lock, flags); |
284 | set_icu2(MFIRINTREG, mask); | 273 | icu2_set(MFIRINTREG, mask); |
285 | spin_unlock_irqrestore(&desc->lock, flags); | 274 | spin_unlock_irqrestore(&desc->lock, flags); |
286 | } | 275 | } |
287 | 276 | ||
@@ -293,7 +282,7 @@ void vr41xx_disable_firint(uint16_t mask) | |||
293 | unsigned long flags; | 282 | unsigned long flags; |
294 | 283 | ||
295 | spin_lock_irqsave(&desc->lock, flags); | 284 | spin_lock_irqsave(&desc->lock, flags); |
296 | clear_icu2(MFIRINTREG, mask); | 285 | icu2_clear(MFIRINTREG, mask); |
297 | spin_unlock_irqrestore(&desc->lock, flags); | 286 | spin_unlock_irqrestore(&desc->lock, flags); |
298 | } | 287 | } |
299 | 288 | ||
@@ -308,7 +297,7 @@ void vr41xx_enable_pciint(void) | |||
308 | current_cpu_data.cputype == CPU_VR4131 || | 297 | current_cpu_data.cputype == CPU_VR4131 || |
309 | current_cpu_data.cputype == CPU_VR4133) { | 298 | current_cpu_data.cputype == CPU_VR4133) { |
310 | spin_lock_irqsave(&desc->lock, flags); | 299 | spin_lock_irqsave(&desc->lock, flags); |
311 | write_icu2(PCIINT0, MPCIINTREG); | 300 | icu2_write(MPCIINTREG, PCIINT0); |
312 | spin_unlock_irqrestore(&desc->lock, flags); | 301 | spin_unlock_irqrestore(&desc->lock, flags); |
313 | } | 302 | } |
314 | } | 303 | } |
@@ -324,7 +313,7 @@ void vr41xx_disable_pciint(void) | |||
324 | current_cpu_data.cputype == CPU_VR4131 || | 313 | current_cpu_data.cputype == CPU_VR4131 || |
325 | current_cpu_data.cputype == CPU_VR4133) { | 314 | current_cpu_data.cputype == CPU_VR4133) { |
326 | spin_lock_irqsave(&desc->lock, flags); | 315 | spin_lock_irqsave(&desc->lock, flags); |
327 | write_icu2(0, MPCIINTREG); | 316 | icu2_write(MPCIINTREG, 0); |
328 | spin_unlock_irqrestore(&desc->lock, flags); | 317 | spin_unlock_irqrestore(&desc->lock, flags); |
329 | } | 318 | } |
330 | } | 319 | } |
@@ -340,7 +329,7 @@ void vr41xx_enable_scuint(void) | |||
340 | current_cpu_data.cputype == CPU_VR4131 || | 329 | current_cpu_data.cputype == CPU_VR4131 || |
341 | current_cpu_data.cputype == CPU_VR4133) { | 330 | current_cpu_data.cputype == CPU_VR4133) { |
342 | spin_lock_irqsave(&desc->lock, flags); | 331 | spin_lock_irqsave(&desc->lock, flags); |
343 | write_icu2(SCUINT0, MSCUINTREG); | 332 | icu2_write(MSCUINTREG, SCUINT0); |
344 | spin_unlock_irqrestore(&desc->lock, flags); | 333 | spin_unlock_irqrestore(&desc->lock, flags); |
345 | } | 334 | } |
346 | } | 335 | } |
@@ -356,7 +345,7 @@ void vr41xx_disable_scuint(void) | |||
356 | current_cpu_data.cputype == CPU_VR4131 || | 345 | current_cpu_data.cputype == CPU_VR4131 || |
357 | current_cpu_data.cputype == CPU_VR4133) { | 346 | current_cpu_data.cputype == CPU_VR4133) { |
358 | spin_lock_irqsave(&desc->lock, flags); | 347 | spin_lock_irqsave(&desc->lock, flags); |
359 | write_icu2(0, MSCUINTREG); | 348 | icu2_write(MSCUINTREG, 0); |
360 | spin_unlock_irqrestore(&desc->lock, flags); | 349 | spin_unlock_irqrestore(&desc->lock, flags); |
361 | } | 350 | } |
362 | } | 351 | } |
@@ -372,7 +361,7 @@ void vr41xx_enable_csiint(uint16_t mask) | |||
372 | current_cpu_data.cputype == CPU_VR4131 || | 361 | current_cpu_data.cputype == CPU_VR4131 || |
373 | current_cpu_data.cputype == CPU_VR4133) { | 362 | current_cpu_data.cputype == CPU_VR4133) { |
374 | spin_lock_irqsave(&desc->lock, flags); | 363 | spin_lock_irqsave(&desc->lock, flags); |
375 | set_icu2(MCSIINTREG, mask); | 364 | icu2_set(MCSIINTREG, mask); |
376 | spin_unlock_irqrestore(&desc->lock, flags); | 365 | spin_unlock_irqrestore(&desc->lock, flags); |
377 | } | 366 | } |
378 | } | 367 | } |
@@ -388,7 +377,7 @@ void vr41xx_disable_csiint(uint16_t mask) | |||
388 | current_cpu_data.cputype == CPU_VR4131 || | 377 | current_cpu_data.cputype == CPU_VR4131 || |
389 | current_cpu_data.cputype == CPU_VR4133) { | 378 | current_cpu_data.cputype == CPU_VR4133) { |
390 | spin_lock_irqsave(&desc->lock, flags); | 379 | spin_lock_irqsave(&desc->lock, flags); |
391 | clear_icu2(MCSIINTREG, mask); | 380 | icu2_clear(MCSIINTREG, mask); |
392 | spin_unlock_irqrestore(&desc->lock, flags); | 381 | spin_unlock_irqrestore(&desc->lock, flags); |
393 | } | 382 | } |
394 | } | 383 | } |
@@ -404,7 +393,7 @@ void vr41xx_enable_bcuint(void) | |||
404 | current_cpu_data.cputype == CPU_VR4131 || | 393 | current_cpu_data.cputype == CPU_VR4131 || |
405 | current_cpu_data.cputype == CPU_VR4133) { | 394 | current_cpu_data.cputype == CPU_VR4133) { |
406 | spin_lock_irqsave(&desc->lock, flags); | 395 | spin_lock_irqsave(&desc->lock, flags); |
407 | write_icu2(BCUINTR, MBCUINTREG); | 396 | icu2_write(MBCUINTREG, BCUINTR); |
408 | spin_unlock_irqrestore(&desc->lock, flags); | 397 | spin_unlock_irqrestore(&desc->lock, flags); |
409 | } | 398 | } |
410 | } | 399 | } |
@@ -420,30 +409,28 @@ void vr41xx_disable_bcuint(void) | |||
420 | current_cpu_data.cputype == CPU_VR4131 || | 409 | current_cpu_data.cputype == CPU_VR4131 || |
421 | current_cpu_data.cputype == CPU_VR4133) { | 410 | current_cpu_data.cputype == CPU_VR4133) { |
422 | spin_lock_irqsave(&desc->lock, flags); | 411 | spin_lock_irqsave(&desc->lock, flags); |
423 | write_icu2(0, MBCUINTREG); | 412 | icu2_write(MBCUINTREG, 0); |
424 | spin_unlock_irqrestore(&desc->lock, flags); | 413 | spin_unlock_irqrestore(&desc->lock, flags); |
425 | } | 414 | } |
426 | } | 415 | } |
427 | 416 | ||
428 | EXPORT_SYMBOL(vr41xx_disable_bcuint); | 417 | EXPORT_SYMBOL(vr41xx_disable_bcuint); |
429 | 418 | ||
430 | /*=======================================================================*/ | ||
431 | |||
432 | static unsigned int startup_sysint1_irq(unsigned int irq) | 419 | static unsigned int startup_sysint1_irq(unsigned int irq) |
433 | { | 420 | { |
434 | set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq)); | 421 | icu1_set(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq)); |
435 | 422 | ||
436 | return 0; /* never anything pending */ | 423 | return 0; /* never anything pending */ |
437 | } | 424 | } |
438 | 425 | ||
439 | static void shutdown_sysint1_irq(unsigned int irq) | 426 | static void shutdown_sysint1_irq(unsigned int irq) |
440 | { | 427 | { |
441 | clear_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq)); | 428 | icu1_clear(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq)); |
442 | } | 429 | } |
443 | 430 | ||
444 | static void enable_sysint1_irq(unsigned int irq) | 431 | static void enable_sysint1_irq(unsigned int irq) |
445 | { | 432 | { |
446 | set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq)); | 433 | icu1_set(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq)); |
447 | } | 434 | } |
448 | 435 | ||
449 | #define disable_sysint1_irq shutdown_sysint1_irq | 436 | #define disable_sysint1_irq shutdown_sysint1_irq |
@@ -452,7 +439,7 @@ static void enable_sysint1_irq(unsigned int irq) | |||
452 | static void end_sysint1_irq(unsigned int irq) | 439 | static void end_sysint1_irq(unsigned int irq) |
453 | { | 440 | { |
454 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | 441 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) |
455 | set_icu1(MSYSINT1REG, (uint16_t)1 << SYSINT1_IRQ_TO_PIN(irq)); | 442 | icu1_set(MSYSINT1REG, 1 << SYSINT1_IRQ_TO_PIN(irq)); |
456 | } | 443 | } |
457 | 444 | ||
458 | static struct hw_interrupt_type sysint1_irq_type = { | 445 | static struct hw_interrupt_type sysint1_irq_type = { |
@@ -465,23 +452,21 @@ static struct hw_interrupt_type sysint1_irq_type = { | |||
465 | .end = end_sysint1_irq, | 452 | .end = end_sysint1_irq, |
466 | }; | 453 | }; |
467 | 454 | ||
468 | /*=======================================================================*/ | ||
469 | |||
470 | static unsigned int startup_sysint2_irq(unsigned int irq) | 455 | static unsigned int startup_sysint2_irq(unsigned int irq) |
471 | { | 456 | { |
472 | set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq)); | 457 | icu2_set(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq)); |
473 | 458 | ||
474 | return 0; /* never anything pending */ | 459 | return 0; /* never anything pending */ |
475 | } | 460 | } |
476 | 461 | ||
477 | static void shutdown_sysint2_irq(unsigned int irq) | 462 | static void shutdown_sysint2_irq(unsigned int irq) |
478 | { | 463 | { |
479 | clear_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq)); | 464 | icu2_clear(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq)); |
480 | } | 465 | } |
481 | 466 | ||
482 | static void enable_sysint2_irq(unsigned int irq) | 467 | static void enable_sysint2_irq(unsigned int irq) |
483 | { | 468 | { |
484 | set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq)); | 469 | icu2_set(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq)); |
485 | } | 470 | } |
486 | 471 | ||
487 | #define disable_sysint2_irq shutdown_sysint2_irq | 472 | #define disable_sysint2_irq shutdown_sysint2_irq |
@@ -490,7 +475,7 @@ static void enable_sysint2_irq(unsigned int irq) | |||
490 | static void end_sysint2_irq(unsigned int irq) | 475 | static void end_sysint2_irq(unsigned int irq) |
491 | { | 476 | { |
492 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | 477 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) |
493 | set_icu2(MSYSINT2REG, (uint16_t)1 << SYSINT2_IRQ_TO_PIN(irq)); | 478 | icu2_set(MSYSINT2REG, 1 << SYSINT2_IRQ_TO_PIN(irq)); |
494 | } | 479 | } |
495 | 480 | ||
496 | static struct hw_interrupt_type sysint2_irq_type = { | 481 | static struct hw_interrupt_type sysint2_irq_type = { |
@@ -503,8 +488,6 @@ static struct hw_interrupt_type sysint2_irq_type = { | |||
503 | .end = end_sysint2_irq, | 488 | .end = end_sysint2_irq, |
504 | }; | 489 | }; |
505 | 490 | ||
506 | /*=======================================================================*/ | ||
507 | |||
508 | static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) | 491 | static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) |
509 | { | 492 | { |
510 | irq_desc_t *desc = irq_desc + irq; | 493 | irq_desc_t *desc = irq_desc + irq; |
@@ -515,8 +498,8 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) | |||
515 | 498 | ||
516 | spin_lock_irq(&desc->lock); | 499 | spin_lock_irq(&desc->lock); |
517 | 500 | ||
518 | intassign0 = read_icu1(INTASSIGN0); | 501 | intassign0 = icu1_read(INTASSIGN0); |
519 | intassign1 = read_icu1(INTASSIGN1); | 502 | intassign1 = icu1_read(INTASSIGN1); |
520 | 503 | ||
521 | switch (pin) { | 504 | switch (pin) { |
522 | case 0: | 505 | case 0: |
@@ -556,8 +539,8 @@ static inline int set_sysint1_assign(unsigned int irq, unsigned char assign) | |||
556 | } | 539 | } |
557 | 540 | ||
558 | sysint1_assign[pin] = assign; | 541 | sysint1_assign[pin] = assign; |
559 | write_icu1(intassign0, INTASSIGN0); | 542 | icu1_write(INTASSIGN0, intassign0); |
560 | write_icu1(intassign1, INTASSIGN1); | 543 | icu1_write(INTASSIGN1, intassign1); |
561 | 544 | ||
562 | spin_unlock_irq(&desc->lock); | 545 | spin_unlock_irq(&desc->lock); |
563 | 546 | ||
@@ -574,8 +557,8 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign) | |||
574 | 557 | ||
575 | spin_lock_irq(&desc->lock); | 558 | spin_lock_irq(&desc->lock); |
576 | 559 | ||
577 | intassign2 = read_icu1(INTASSIGN2); | 560 | intassign2 = icu1_read(INTASSIGN2); |
578 | intassign3 = read_icu1(INTASSIGN3); | 561 | intassign3 = icu1_read(INTASSIGN3); |
579 | 562 | ||
580 | switch (pin) { | 563 | switch (pin) { |
581 | case 0: | 564 | case 0: |
@@ -623,8 +606,8 @@ static inline int set_sysint2_assign(unsigned int irq, unsigned char assign) | |||
623 | } | 606 | } |
624 | 607 | ||
625 | sysint2_assign[pin] = assign; | 608 | sysint2_assign[pin] = assign; |
626 | write_icu1(intassign2, INTASSIGN2); | 609 | icu1_write(INTASSIGN2, intassign2); |
627 | write_icu1(intassign3, INTASSIGN3); | 610 | icu1_write(INTASSIGN3, intassign3); |
628 | 611 | ||
629 | spin_unlock_irq(&desc->lock); | 612 | spin_unlock_irq(&desc->lock); |
630 | 613 | ||
@@ -651,88 +634,92 @@ int vr41xx_set_intassign(unsigned int irq, unsigned char intassign) | |||
651 | 634 | ||
652 | EXPORT_SYMBOL(vr41xx_set_intassign); | 635 | EXPORT_SYMBOL(vr41xx_set_intassign); |
653 | 636 | ||
654 | /*=======================================================================*/ | 637 | static int icu_get_irq(unsigned int irq, struct pt_regs *regs) |
655 | |||
656 | asmlinkage void irq_dispatch(unsigned char intnum, struct pt_regs *regs) | ||
657 | { | 638 | { |
658 | uint16_t pend1, pend2; | 639 | uint16_t pend1, pend2; |
659 | uint16_t mask1, mask2; | 640 | uint16_t mask1, mask2; |
660 | int i; | 641 | int i; |
661 | 642 | ||
662 | pend1 = read_icu1(SYSINT1REG); | 643 | pend1 = icu1_read(SYSINT1REG); |
663 | mask1 = read_icu1(MSYSINT1REG); | 644 | mask1 = icu1_read(MSYSINT1REG); |
664 | 645 | ||
665 | pend2 = read_icu2(SYSINT2REG); | 646 | pend2 = icu2_read(SYSINT2REG); |
666 | mask2 = read_icu2(MSYSINT2REG); | 647 | mask2 = icu2_read(MSYSINT2REG); |
667 | 648 | ||
668 | mask1 &= pend1; | 649 | mask1 &= pend1; |
669 | mask2 &= pend2; | 650 | mask2 &= pend2; |
670 | 651 | ||
671 | if (mask1) { | 652 | if (mask1) { |
672 | for (i = 0; i < 16; i++) { | 653 | for (i = 0; i < 16; i++) { |
673 | if (intnum == sysint1_assign[i] && | 654 | if (irq == INT_TO_IRQ(sysint1_assign[i]) && (mask1 & (1 << i))) |
674 | (mask1 & ((uint16_t)1 << i))) { | 655 | return SYSINT1_IRQ(i); |
675 | if (i == 8) | ||
676 | giuint_irq_dispatch(regs); | ||
677 | else | ||
678 | do_IRQ(SYSINT1_IRQ(i), regs); | ||
679 | return; | ||
680 | } | ||
681 | } | 656 | } |
682 | } | 657 | } |
683 | 658 | ||
684 | if (mask2) { | 659 | if (mask2) { |
685 | for (i = 0; i < 16; i++) { | 660 | for (i = 0; i < 16; i++) { |
686 | if (intnum == sysint2_assign[i] && | 661 | if (irq == INT_TO_IRQ(sysint2_assign[i]) && (mask2 & (1 << i))) |
687 | (mask2 & ((uint16_t)1 << i))) { | 662 | return SYSINT2_IRQ(i); |
688 | do_IRQ(SYSINT2_IRQ(i), regs); | ||
689 | return; | ||
690 | } | ||
691 | } | 663 | } |
692 | } | 664 | } |
693 | 665 | ||
694 | printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2); | 666 | printk(KERN_ERR "spurious ICU interrupt: %04x,%04x\n", pend1, pend2); |
695 | 667 | ||
696 | atomic_inc(&irq_err_count); | 668 | atomic_inc(&irq_err_count); |
697 | } | ||
698 | 669 | ||
699 | /*=======================================================================*/ | 670 | return -1; |
671 | } | ||
700 | 672 | ||
701 | static int __init vr41xx_icu_init(void) | 673 | static int __init vr41xx_icu_init(void) |
702 | { | 674 | { |
675 | unsigned long icu1_start, icu2_start; | ||
676 | int i; | ||
677 | |||
703 | switch (current_cpu_data.cputype) { | 678 | switch (current_cpu_data.cputype) { |
704 | case CPU_VR4111: | 679 | case CPU_VR4111: |
705 | case CPU_VR4121: | 680 | case CPU_VR4121: |
706 | icu1_base = SYSINT1REG_TYPE1; | 681 | icu1_start = ICU1_TYPE1_BASE; |
707 | icu2_base = SYSINT2REG_TYPE1; | 682 | icu2_start = ICU2_TYPE1_BASE; |
708 | break; | 683 | break; |
709 | case CPU_VR4122: | 684 | case CPU_VR4122: |
710 | case CPU_VR4131: | 685 | case CPU_VR4131: |
711 | case CPU_VR4133: | 686 | case CPU_VR4133: |
712 | icu1_base = SYSINT1REG_TYPE2; | 687 | icu1_start = ICU1_TYPE2_BASE; |
713 | icu2_base = SYSINT2REG_TYPE2; | 688 | icu2_start = ICU2_TYPE2_BASE; |
714 | break; | 689 | break; |
715 | default: | 690 | default: |
716 | printk(KERN_ERR "ICU: Unexpected CPU of NEC VR4100 series\n"); | 691 | printk(KERN_ERR "ICU: Unexpected CPU of NEC VR4100 series\n"); |
717 | return -EINVAL; | 692 | return -ENODEV; |
718 | } | 693 | } |
719 | 694 | ||
720 | write_icu1(0, MSYSINT1REG); | 695 | if (request_mem_region(icu1_start, ICU1_SIZE, "ICU") == NULL) |
721 | write_icu1(0xffff, MGIUINTLREG); | 696 | return -EBUSY; |
722 | 697 | ||
723 | write_icu2(0, MSYSINT2REG); | 698 | if (request_mem_region(icu2_start, ICU2_SIZE, "ICU") == NULL) { |
724 | write_icu2(0xffff, MGIUINTHREG); | 699 | release_mem_region(icu1_start, ICU1_SIZE); |
700 | return -EBUSY; | ||
701 | } | ||
725 | 702 | ||
726 | return 0; | 703 | icu1_base = ioremap(icu1_start, ICU1_SIZE); |
727 | } | 704 | if (icu1_base == NULL) { |
705 | release_mem_region(icu1_start, ICU1_SIZE); | ||
706 | release_mem_region(icu2_start, ICU2_SIZE); | ||
707 | return -ENOMEM; | ||
708 | } | ||
728 | 709 | ||
729 | early_initcall(vr41xx_icu_init); | 710 | icu2_base = ioremap(icu2_start, ICU2_SIZE); |
711 | if (icu2_base == NULL) { | ||
712 | iounmap(icu1_base); | ||
713 | release_mem_region(icu1_start, ICU1_SIZE); | ||
714 | release_mem_region(icu2_start, ICU2_SIZE); | ||
715 | return -ENOMEM; | ||
716 | } | ||
730 | 717 | ||
731 | /*=======================================================================*/ | 718 | icu1_write(MSYSINT1REG, 0); |
719 | icu1_write(MGIUINTLREG, 0xffff); | ||
732 | 720 | ||
733 | static inline void init_vr41xx_icu_irq(void) | 721 | icu2_write(MSYSINT2REG, 0); |
734 | { | 722 | icu2_write(MGIUINTHREG, 0xffff); |
735 | int i; | ||
736 | 723 | ||
737 | for (i = SYSINT1_IRQ_BASE; i <= SYSINT1_IRQ_LAST; i++) | 724 | for (i = SYSINT1_IRQ_BASE; i <= SYSINT1_IRQ_LAST; i++) |
738 | irq_desc[i].handler = &sysint1_irq_type; | 725 | irq_desc[i].handler = &sysint1_irq_type; |
@@ -740,18 +727,13 @@ static inline void init_vr41xx_icu_irq(void) | |||
740 | for (i = SYSINT2_IRQ_BASE; i <= SYSINT2_IRQ_LAST; i++) | 727 | for (i = SYSINT2_IRQ_BASE; i <= SYSINT2_IRQ_LAST; i++) |
741 | irq_desc[i].handler = &sysint2_irq_type; | 728 | irq_desc[i].handler = &sysint2_irq_type; |
742 | 729 | ||
743 | setup_irq(INT0_CASCADE_IRQ, &icu_cascade); | 730 | cascade_irq(INT0_IRQ, icu_get_irq); |
744 | setup_irq(INT1_CASCADE_IRQ, &icu_cascade); | 731 | cascade_irq(INT1_IRQ, icu_get_irq); |
745 | setup_irq(INT2_CASCADE_IRQ, &icu_cascade); | 732 | cascade_irq(INT2_IRQ, icu_get_irq); |
746 | setup_irq(INT3_CASCADE_IRQ, &icu_cascade); | 733 | cascade_irq(INT3_IRQ, icu_get_irq); |
747 | setup_irq(INT4_CASCADE_IRQ, &icu_cascade); | 734 | cascade_irq(INT4_IRQ, icu_get_irq); |
748 | } | ||
749 | 735 | ||
750 | void __init arch_init_irq(void) | 736 | return 0; |
751 | { | ||
752 | mips_cpu_irq_init(MIPS_CPU_IRQ_BASE); | ||
753 | init_vr41xx_icu_irq(); | ||
754 | init_vr41xx_giuint_irq(); | ||
755 | |||
756 | set_except_vector(0, vr41xx_handle_interrupt); | ||
757 | } | 737 | } |
738 | |||
739 | core_initcall(vr41xx_icu_init); | ||
diff --git a/arch/mips/vr41xx/common/int-handler.S b/arch/mips/vr41xx/common/int-handler.S index 38ff89b505f2..272c13aee4fd 100644 --- a/arch/mips/vr41xx/common/int-handler.S +++ b/arch/mips/vr41xx/common/int-handler.S | |||
@@ -71,24 +71,24 @@ | |||
71 | 71 | ||
72 | andi t1, t0, CAUSEF_IP3 # check for Int1 | 72 | andi t1, t0, CAUSEF_IP3 # check for Int1 |
73 | bnez t1, handle_int | 73 | bnez t1, handle_int |
74 | li a0, 1 | 74 | li a0, 3 |
75 | 75 | ||
76 | andi t1, t0, CAUSEF_IP4 # check for Int2 | 76 | andi t1, t0, CAUSEF_IP4 # check for Int2 |
77 | bnez t1, handle_int | 77 | bnez t1, handle_int |
78 | li a0, 2 | 78 | li a0, 4 |
79 | 79 | ||
80 | andi t1, t0, CAUSEF_IP5 # check for Int3 | 80 | andi t1, t0, CAUSEF_IP5 # check for Int3 |
81 | bnez t1, handle_int | 81 | bnez t1, handle_int |
82 | li a0, 3 | 82 | li a0, 5 |
83 | 83 | ||
84 | andi t1, t0, CAUSEF_IP6 # check for Int4 | 84 | andi t1, t0, CAUSEF_IP6 # check for Int4 |
85 | bnez t1, handle_int | 85 | bnez t1, handle_int |
86 | li a0, 4 | 86 | li a0, 6 |
87 | 87 | ||
88 | 1: | 88 | 1: |
89 | andi t1, t0, CAUSEF_IP2 # check for Int0 | 89 | andi t1, t0, CAUSEF_IP2 # check for Int0 |
90 | bnez t1, handle_int | 90 | bnez t1, handle_int |
91 | li a0, 0 | 91 | li a0, 2 |
92 | 92 | ||
93 | andi t1, t0, CAUSEF_IP0 # check for IP0 | 93 | andi t1, t0, CAUSEF_IP0 # check for IP0 |
94 | bnez t1, handle_irq | 94 | bnez t1, handle_irq |
diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c new file mode 100644 index 000000000000..43b214d39438 --- /dev/null +++ b/arch/mips/vr41xx/common/irq.c | |||
@@ -0,0 +1,94 @@ | |||
1 | /* | ||
2 | * Interrupt handing routines for NEC VR4100 series. | ||
3 | * | ||
4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/interrupt.h> | ||
21 | #include <linux/module.h> | ||
22 | |||
23 | #include <asm/irq_cpu.h> | ||
24 | #include <asm/system.h> | ||
25 | #include <asm/vr41xx/vr41xx.h> | ||
26 | |||
27 | typedef struct irq_cascade { | ||
28 | int (*get_irq)(unsigned int, struct pt_regs *); | ||
29 | } irq_cascade_t; | ||
30 | |||
31 | static irq_cascade_t irq_cascade[NR_IRQS] __cacheline_aligned; | ||
32 | |||
33 | static struct irqaction cascade_irqaction = { | ||
34 | .handler = no_action, | ||
35 | .mask = CPU_MASK_NONE, | ||
36 | .name = "cascade", | ||
37 | }; | ||
38 | |||
39 | int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *)) | ||
40 | { | ||
41 | int retval = 0; | ||
42 | |||
43 | if (irq >= NR_IRQS) | ||
44 | return -EINVAL; | ||
45 | |||
46 | if (irq_cascade[irq].get_irq != NULL) | ||
47 | free_irq(irq, NULL); | ||
48 | |||
49 | irq_cascade[irq].get_irq = get_irq; | ||
50 | |||
51 | if (get_irq != NULL) { | ||
52 | retval = setup_irq(irq, &cascade_irqaction); | ||
53 | if (retval < 0) | ||
54 | irq_cascade[irq].get_irq = NULL; | ||
55 | } | ||
56 | |||
57 | return retval; | ||
58 | } | ||
59 | |||
60 | EXPORT_SYMBOL_GPL(cascade_irq); | ||
61 | |||
62 | asmlinkage void irq_dispatch(unsigned int irq, struct pt_regs *regs) | ||
63 | { | ||
64 | irq_cascade_t *cascade; | ||
65 | irq_desc_t *desc; | ||
66 | |||
67 | if (irq >= NR_IRQS) { | ||
68 | atomic_inc(&irq_err_count); | ||
69 | return; | ||
70 | } | ||
71 | |||
72 | cascade = irq_cascade + irq; | ||
73 | if (cascade->get_irq != NULL) { | ||
74 | unsigned int source_irq = irq; | ||
75 | desc = irq_desc + source_irq; | ||
76 | desc->handler->ack(source_irq); | ||
77 | irq = cascade->get_irq(irq, regs); | ||
78 | if (irq < 0) | ||
79 | atomic_inc(&irq_err_count); | ||
80 | else | ||
81 | irq_dispatch(irq, regs); | ||
82 | desc->handler->end(source_irq); | ||
83 | } else | ||
84 | do_IRQ(irq, regs); | ||
85 | } | ||
86 | |||
87 | extern asmlinkage void vr41xx_handle_interrupt(void); | ||
88 | |||
89 | void __init arch_init_irq(void) | ||
90 | { | ||
91 | mips_cpu_irq_init(MIPS_CPU_IRQ_BASE); | ||
92 | |||
93 | set_except_vector(0, vr41xx_handle_interrupt); | ||
94 | } | ||
diff --git a/arch/mips/vr41xx/tanbac-tb0226/setup.c b/arch/mips/vr41xx/common/type.c index 60027e5dea25..bcb5f71b5026 100644 --- a/arch/mips/vr41xx/tanbac-tb0226/setup.c +++ b/arch/mips/vr41xx/common/type.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * setup.c, Setup for the TANBAC TB0226. | 2 | * type.c, System type for NEC VR4100 series. |
3 | * | 3 | * |
4 | * Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | 4 | * Copyright (C) 2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -20,5 +20,5 @@ | |||
20 | 20 | ||
21 | const char *get_system_type(void) | 21 | const char *get_system_type(void) |
22 | { | 22 | { |
23 | return "TANBAC TB0226"; | 23 | return "NEC VR4100 series"; |
24 | } | 24 | } |
diff --git a/arch/mips/vr41xx/common/vrc4173.c b/arch/mips/vr41xx/common/vrc4173.c index 5475dd72e264..ba58764ef8ea 100644 --- a/arch/mips/vr41xx/common/vrc4173.c +++ b/arch/mips/vr41xx/common/vrc4173.c | |||
@@ -476,7 +476,7 @@ static inline int vrc4173_icu_init(int cascade_irq) | |||
476 | 476 | ||
477 | if (cascade_irq < GIU_IRQ(0) || cascade_irq > GIU_IRQ(15)) | 477 | if (cascade_irq < GIU_IRQ(0) || cascade_irq > GIU_IRQ(15)) |
478 | return -EINVAL; | 478 | return -EINVAL; |
479 | 479 | ||
480 | vrc4173_outw(0, VRC4173_MSYSINT1REG); | 480 | vrc4173_outw(0, VRC4173_MSYSINT1REG); |
481 | 481 | ||
482 | vr41xx_set_irq_trigger(GIU_IRQ_TO_PIN(cascade_irq), TRIGGER_LEVEL, SIGNAL_THROUGH); | 482 | vr41xx_set_irq_trigger(GIU_IRQ_TO_PIN(cascade_irq), TRIGGER_LEVEL, SIGNAL_THROUGH); |
diff --git a/arch/mips/vr41xx/ibm-workpad/setup.c b/arch/mips/vr41xx/ibm-workpad/setup.c index cff44602d3d4..e4b34ad6ea61 100644 --- a/arch/mips/vr41xx/ibm-workpad/setup.c +++ b/arch/mips/vr41xx/ibm-workpad/setup.c | |||
@@ -23,11 +23,6 @@ | |||
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/vr41xx/workpad.h> | 24 | #include <asm/vr41xx/workpad.h> |
25 | 25 | ||
26 | const char *get_system_type(void) | ||
27 | { | ||
28 | return "IBM WorkPad z50"; | ||
29 | } | ||
30 | |||
31 | static int __init ibm_workpad_setup(void) | 26 | static int __init ibm_workpad_setup(void) |
32 | { | 27 | { |
33 | set_io_port_base(IO_PORT_BASE); | 28 | set_io_port_base(IO_PORT_BASE); |
diff --git a/arch/mips/vr41xx/nec-cmbvr4133/init.c b/arch/mips/vr41xx/nec-cmbvr4133/init.c index 87f06b3f5a9c..be590edb0b83 100644 --- a/arch/mips/vr41xx/nec-cmbvr4133/init.c +++ b/arch/mips/vr41xx/nec-cmbvr4133/init.c | |||
@@ -16,11 +16,6 @@ | |||
16 | * Manish Lachwani (mlachwani@mvista.com) | 16 | * Manish Lachwani (mlachwani@mvista.com) |
17 | */ | 17 | */ |
18 | #include <linux/config.h> | 18 | #include <linux/config.h> |
19 | #include <linux/init.h> | ||
20 | #include <linux/kernel.h> | ||
21 | #include <linux/string.h> | ||
22 | |||
23 | #include <asm/bootinfo.h> | ||
24 | 19 | ||
25 | #ifdef CONFIG_ROCKHOPPER | 20 | #ifdef CONFIG_ROCKHOPPER |
26 | #include <asm/io.h> | 21 | #include <asm/io.h> |
@@ -28,14 +23,7 @@ | |||
28 | 23 | ||
29 | #define PCICONFDREG 0xaf000c14 | 24 | #define PCICONFDREG 0xaf000c14 |
30 | #define PCICONFAREG 0xaf000c18 | 25 | #define PCICONFAREG 0xaf000c18 |
31 | #endif | ||
32 | |||
33 | const char *get_system_type(void) | ||
34 | { | ||
35 | return "NEC CMB-VR4133"; | ||
36 | } | ||
37 | 26 | ||
38 | #ifdef CONFIG_ROCKHOPPER | ||
39 | void disable_pcnet(void) | 27 | void disable_pcnet(void) |
40 | { | 28 | { |
41 | u32 data; | 29 | u32 data; |
diff --git a/arch/mips/vr41xx/tanbac-tb0226/Makefile b/arch/mips/vr41xx/tanbac-tb0226/Makefile deleted file mode 100644 index 372f953d240b..000000000000 --- a/arch/mips/vr41xx/tanbac-tb0226/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the TANBAC TB0226 specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y += setup.o | ||
diff --git a/arch/mips/vr41xx/tanbac-tb0229/Makefile b/arch/mips/vr41xx/tanbac-tb0229/Makefile deleted file mode 100644 index 9c6b864ef2ef..000000000000 --- a/arch/mips/vr41xx/tanbac-tb0229/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the TANBAC TB0229(VR4131DIMM) specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y := setup.o | ||
diff --git a/arch/mips/vr41xx/tanbac-tb0229/setup.c b/arch/mips/vr41xx/tanbac-tb0229/setup.c deleted file mode 100644 index 5c1b757bfb0c..000000000000 --- a/arch/mips/vr41xx/tanbac-tb0229/setup.c +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | /* | ||
2 | * setup.c, Setup for the TANBAC TB0229 (VR4131DIMM) | ||
3 | * | ||
4 | * Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | ||
5 | * | ||
6 | * Modified for TANBAC TB0229: | ||
7 | * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp> | ||
8 | * | ||
9 | * This program is free software; you can redistribute it and/or modify | ||
10 | * it under the terms of the GNU General Public License as published by | ||
11 | * the Free Software Foundation; either version 2 of the License, or | ||
12 | * (at your option) any later version. | ||
13 | * | ||
14 | * This program is distributed in the hope that it will be useful, | ||
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | * GNU General Public License for more details. | ||
18 | * | ||
19 | * You should have received a copy of the GNU General Public License | ||
20 | * along with this program; if not, write to the Free Software | ||
21 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
22 | */ | ||
23 | |||
24 | const char *get_system_type(void) | ||
25 | { | ||
26 | return "TANBAC TB0229"; | ||
27 | } | ||
diff --git a/arch/mips/vr41xx/victor-mpc30x/Makefile b/arch/mips/vr41xx/victor-mpc30x/Makefile deleted file mode 100644 index a2e8086a31a6..000000000000 --- a/arch/mips/vr41xx/victor-mpc30x/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the Victor MP-C303/304 specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y += setup.o | ||
diff --git a/arch/mips/vr41xx/victor-mpc30x/setup.c b/arch/mips/vr41xx/victor-mpc30x/setup.c deleted file mode 100644 index f591e36726e6..000000000000 --- a/arch/mips/vr41xx/victor-mpc30x/setup.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * setup.c, Setup for the Victor MP-C303/304. | ||
3 | * | ||
4 | * Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | const char *get_system_type(void) | ||
22 | { | ||
23 | return "Victor MP-C303/304"; | ||
24 | } | ||
diff --git a/arch/mips/vr41xx/zao-capcella/Makefile b/arch/mips/vr41xx/zao-capcella/Makefile deleted file mode 100644 index cf420197cd23..000000000000 --- a/arch/mips/vr41xx/zao-capcella/Makefile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | # | ||
2 | # Makefile for the ZAO Networks Capcella specific parts of the kernel | ||
3 | # | ||
4 | |||
5 | obj-y += setup.o | ||
diff --git a/arch/mips/vr41xx/zao-capcella/setup.c b/arch/mips/vr41xx/zao-capcella/setup.c deleted file mode 100644 index 17bade241fe2..000000000000 --- a/arch/mips/vr41xx/zao-capcella/setup.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | /* | ||
2 | * setup.c, Setup for the ZAO Networks Capcella. | ||
3 | * | ||
4 | * Copyright (C) 2002-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | ||
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 as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | const char *get_system_type(void) | ||
22 | { | ||
23 | return "ZAO Networks Capcella"; | ||
24 | } | ||
diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig index e6fa1d1cc03a..36dee0ff5ca0 100644 --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig | |||
@@ -330,14 +330,6 @@ config RPXLITE | |||
330 | End of life: end 2000 ? | 330 | End of life: end 2000 ? |
331 | URL: see TQM850L | 331 | URL: see TQM850L |
332 | 332 | ||
333 | SPD823TS: | ||
334 | MPC823 based board used in the "Tele Server" product | ||
335 | Manufacturer: Speech Design, <http://www.speech-design.de/> | ||
336 | Date of Release: Mid 2000 (?) | ||
337 | End of life: - | ||
338 | URL: <http://www.speech-design.de/> | ||
339 | select "English", then "Teleteam Solutions", then "TeleServer" | ||
340 | |||
341 | IVMS8: | 333 | IVMS8: |
342 | MPC860 based board used in the "Integrated Voice Mail System", | 334 | MPC860 based board used in the "Integrated Voice Mail System", |
343 | Small Version (8 voice channels) | 335 | Small Version (8 voice channels) |
@@ -354,13 +346,6 @@ config RPXLITE | |||
354 | End of life: - | 346 | End of life: - |
355 | URL: <http://www.speech-design.de/> | 347 | URL: <http://www.speech-design.de/> |
356 | 348 | ||
357 | SM850: | ||
358 | Service Module (based on TQM850L) | ||
359 | Manufacturer: Dependable Computer Systems, <http://www.decomsys.com/> | ||
360 | Date of Release: end 2000 (?) | ||
361 | End of life: mid 2001 (?) | ||
362 | URL: <http://www.tz-mikroelektronik.de/ServiceModule/index.html> | ||
363 | |||
364 | HERMES: | 349 | HERMES: |
365 | Hermes-Pro ISDN/LAN router with integrated 8 x hub | 350 | Hermes-Pro ISDN/LAN router with integrated 8 x hub |
366 | Manufacturer: Multidata Gesellschaft fur Datentechnik und Informatik | 351 | Manufacturer: Multidata Gesellschaft fur Datentechnik und Informatik |
@@ -464,13 +449,6 @@ config TQM860L | |||
464 | config FPS850L | 449 | config FPS850L |
465 | bool "FPS850L" | 450 | bool "FPS850L" |
466 | 451 | ||
467 | config SPD823TS | ||
468 | bool "SPD823TS" | ||
469 | help | ||
470 | Say Y here to support the Speech Design 823 Tele-Server from Speech | ||
471 | Design, released in 2000. The manufacturer's website is at | ||
472 | <http://www.speech-design.de/>. | ||
473 | |||
474 | config IVMS8 | 452 | config IVMS8 |
475 | bool "IVMS8" | 453 | bool "IVMS8" |
476 | help | 454 | help |
@@ -485,14 +463,6 @@ config IVML24 | |||
485 | from Speech Design, released March 2001. The manufacturer's website | 463 | from Speech Design, released March 2001. The manufacturer's website |
486 | is at <http://www.speech-design.de/>. | 464 | is at <http://www.speech-design.de/>. |
487 | 465 | ||
488 | config SM850 | ||
489 | bool "SM850" | ||
490 | help | ||
491 | Say Y here to support the Service Module 850 from Dependable | ||
492 | Computer Systems, an SBC based on the TQM850L module by TQ | ||
493 | Components. This board is no longer in production. The | ||
494 | manufacturer's website is at <http://www.decomsys.com/>. | ||
495 | |||
496 | config HERMES_PRO | 466 | config HERMES_PRO |
497 | bool "HERMES" | 467 | bool "HERMES" |
498 | 468 | ||
@@ -525,6 +495,11 @@ config WINCEPT | |||
525 | MPC821 PowerPC, introduced in 1998 and designed to be used in | 495 | MPC821 PowerPC, introduced in 1998 and designed to be used in |
526 | thin-client machines. Say Y to support it directly. | 496 | thin-client machines. Say Y to support it directly. |
527 | 497 | ||
498 | Be aware that PCI buses can only function when SYS board is plugged | ||
499 | into the PIB (Platform IO Board) board from Freescale which provide | ||
500 | 3 PCI slots. The PIBs PCI initialization is the bootloader's | ||
501 | responsiblilty. | ||
502 | |||
528 | endchoice | 503 | endchoice |
529 | 504 | ||
530 | choice | 505 | choice |
@@ -578,9 +553,6 @@ config CPCI690 | |||
578 | help | 553 | help |
579 | Select CPCI690 if configuring a Force CPCI690 cPCI board. | 554 | Select CPCI690 if configuring a Force CPCI690 cPCI board. |
580 | 555 | ||
581 | config PCORE | ||
582 | bool "Force-PowerCore" | ||
583 | |||
584 | config POWERPMC250 | 556 | config POWERPMC250 |
585 | bool "Force-PowerPMC250" | 557 | bool "Force-PowerPMC250" |
586 | 558 | ||
@@ -613,9 +585,6 @@ config EV64260 | |||
613 | config LOPEC | 585 | config LOPEC |
614 | bool "Motorola-LoPEC" | 586 | bool "Motorola-LoPEC" |
615 | 587 | ||
616 | config MCPN765 | ||
617 | bool "Motorola-MCPN765" | ||
618 | |||
619 | config MVME5100 | 588 | config MVME5100 |
620 | bool "Motorola-MVME5100" | 589 | bool "Motorola-MVME5100" |
621 | 590 | ||
@@ -637,12 +606,6 @@ config SANDPOINT | |||
637 | config RADSTONE_PPC7D | 606 | config RADSTONE_PPC7D |
638 | bool "Radstone Technology PPC7D board" | 607 | bool "Radstone Technology PPC7D board" |
639 | 608 | ||
640 | config ADIR | ||
641 | bool "SBS-Adirondack" | ||
642 | |||
643 | config K2 | ||
644 | bool "SBS-K2" | ||
645 | |||
646 | config PAL4 | 609 | config PAL4 |
647 | bool "SBS-Palomar4" | 610 | bool "SBS-Palomar4" |
648 | 611 | ||
@@ -713,6 +676,11 @@ config MPC834x_SYS | |||
713 | help | 676 | help |
714 | This option enables support for the MPC 834x SYS evaluation board. | 677 | This option enables support for the MPC 834x SYS evaluation board. |
715 | 678 | ||
679 | config EV64360 | ||
680 | bool "Marvell-EV64360BP" | ||
681 | help | ||
682 | Select EV64360 if configuring a Marvell EV64360BP Evaluation | ||
683 | platform. | ||
716 | endchoice | 684 | endchoice |
717 | 685 | ||
718 | config PQ2ADS | 686 | config PQ2ADS |
@@ -722,7 +690,7 @@ config PQ2ADS | |||
722 | 690 | ||
723 | config TQM8xxL | 691 | config TQM8xxL |
724 | bool | 692 | bool |
725 | depends on 8xx && (TQM823L || TQM850L || FPS850L || TQM855L || TQM860L || SM850) | 693 | depends on 8xx && (TQM823L || TQM850L || FPS850L || TQM855L || TQM860L) |
726 | default y | 694 | default y |
727 | 695 | ||
728 | config EMBEDDEDBOOT | 696 | config EMBEDDEDBOOT |
@@ -796,15 +764,15 @@ config PPC_OF | |||
796 | 764 | ||
797 | config PPC_GEN550 | 765 | config PPC_GEN550 |
798 | bool | 766 | bool |
799 | depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || \ | 767 | depends on SANDPOINT || SPRUCE || PPLUS || \ |
800 | PRPMC750 || K2 || PRPMC800 || LOPEC || \ | 768 | PRPMC750 || PRPMC800 || LOPEC || \ |
801 | (EV64260 && !SERIAL_MPSC) || CHESTNUT || RADSTONE_PPC7D || \ | 769 | (EV64260 && !SERIAL_MPSC) || CHESTNUT || RADSTONE_PPC7D || \ |
802 | 83xx | 770 | 83xx |
803 | default y | 771 | default y |
804 | 772 | ||
805 | config FORCE | 773 | config FORCE |
806 | bool | 774 | bool |
807 | depends on 6xx && (PCORE || POWERPMC250) | 775 | depends on 6xx && POWERPMC250 |
808 | default y | 776 | default y |
809 | 777 | ||
810 | config GT64260 | 778 | config GT64260 |
@@ -814,7 +782,7 @@ config GT64260 | |||
814 | 782 | ||
815 | config MV64360 # Really MV64360 & MV64460 | 783 | config MV64360 # Really MV64360 & MV64460 |
816 | bool | 784 | bool |
817 | depends on CHESTNUT || KATANA || RADSTONE_PPC7D || HDPU | 785 | depends on CHESTNUT || KATANA || RADSTONE_PPC7D || HDPU || EV64360 |
818 | default y | 786 | default y |
819 | 787 | ||
820 | config MV64X60 | 788 | config MV64X60 |
@@ -867,7 +835,7 @@ config EPIC_SERIAL_MODE | |||
867 | 835 | ||
868 | config MPC10X_BRIDGE | 836 | config MPC10X_BRIDGE |
869 | bool | 837 | bool |
870 | depends on PCORE || POWERPMC250 || LOPEC || SANDPOINT | 838 | depends on POWERPMC250 || LOPEC || SANDPOINT |
871 | default y | 839 | default y |
872 | 840 | ||
873 | config MPC10X_OPENPIC | 841 | config MPC10X_OPENPIC |
@@ -886,10 +854,6 @@ config SANDPOINT_ENABLE_UART1 | |||
886 | If this option is enabled then the MPC824x processor will run | 854 | If this option is enabled then the MPC824x processor will run |
887 | in DUART mode instead of UART mode. | 855 | in DUART mode instead of UART mode. |
888 | 856 | ||
889 | config CPC710_DATA_GATHERING | ||
890 | bool "Enable CPC710 data gathering" | ||
891 | depends on K2 | ||
892 | |||
893 | config HARRIER_STORE_GATHERING | 857 | config HARRIER_STORE_GATHERING |
894 | bool "Enable Harrier store gathering" | 858 | bool "Enable Harrier store gathering" |
895 | depends on HARRIER | 859 | depends on HARRIER |
@@ -1194,6 +1158,11 @@ config PCI_DOMAINS | |||
1194 | bool | 1158 | bool |
1195 | default PCI | 1159 | default PCI |
1196 | 1160 | ||
1161 | config MPC83xx_PCI2 | ||
1162 | bool " Supprt for 2nd PCI host controller" | ||
1163 | depends on PCI && MPC834x | ||
1164 | default y if MPC834x_SYS | ||
1165 | |||
1197 | config PCI_QSPAN | 1166 | config PCI_QSPAN |
1198 | bool "QSpan PCI" | 1167 | bool "QSpan PCI" |
1199 | depends on !4xx && !CPM2 && 8xx | 1168 | depends on !4xx && !CPM2 && 8xx |
diff --git a/arch/ppc/Kconfig.debug b/arch/ppc/Kconfig.debug index e16c7710d4be..61653cb60c4e 100644 --- a/arch/ppc/Kconfig.debug +++ b/arch/ppc/Kconfig.debug | |||
@@ -62,7 +62,8 @@ config BOOTX_TEXT | |||
62 | 62 | ||
63 | config SERIAL_TEXT_DEBUG | 63 | config SERIAL_TEXT_DEBUG |
64 | bool "Support for early boot texts over serial port" | 64 | bool "Support for early boot texts over serial port" |
65 | depends on 4xx || GT64260 || LOPEC || PPLUS || PRPMC800 || PPC_GEN550 || PPC_MPC52xx | 65 | depends on 4xx || LOPEC || MV64X60 || PPLUS || PRPMC800 || \ |
66 | PPC_GEN550 || PPC_MPC52xx | ||
66 | 67 | ||
67 | config PPC_OCP | 68 | config PPC_OCP |
68 | bool | 69 | bool |
diff --git a/arch/ppc/boot/simple/Makefile b/arch/ppc/boot/simple/Makefile index d4dc4fa79647..b7bd8f61a4ad 100644 --- a/arch/ppc/boot/simple/Makefile +++ b/arch/ppc/boot/simple/Makefile | |||
@@ -96,10 +96,6 @@ zimageinitrd-$(CONFIG_OCOTEA) := zImage.initrd-TREE | |||
96 | zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF | 96 | zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF |
97 | end-$(CONFIG_GEMINI) := gemini | 97 | end-$(CONFIG_GEMINI) := gemini |
98 | 98 | ||
99 | extra.o-$(CONFIG_K2) := prepmap.o | ||
100 | end-$(CONFIG_K2) := k2 | ||
101 | cacheflag-$(CONFIG_K2) := -include $(clear_L2_L3) | ||
102 | |||
103 | extra.o-$(CONFIG_KATANA) := misc-katana.o | 99 | extra.o-$(CONFIG_KATANA) := misc-katana.o |
104 | end-$(CONFIG_KATANA) := katana | 100 | end-$(CONFIG_KATANA) := katana |
105 | cacheflag-$(CONFIG_KATANA) := -include $(clear_L2_L3) | 101 | cacheflag-$(CONFIG_KATANA) := -include $(clear_L2_L3) |
@@ -108,12 +104,15 @@ zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF | |||
108 | end-$(CONFIG_RADSTONE_PPC7D) := radstone_ppc7d | 104 | end-$(CONFIG_RADSTONE_PPC7D) := radstone_ppc7d |
109 | cacheflag-$(CONFIG_RADSTONE_PPC7D) := -include $(clear_L2_L3) | 105 | cacheflag-$(CONFIG_RADSTONE_PPC7D) := -include $(clear_L2_L3) |
110 | 106 | ||
107 | extra.o-$(CONFIG_EV64360) := misc-ev64360.o | ||
108 | end-$(CONFIG_EV64360) := ev64360 | ||
109 | cacheflag-$(CONFIG_EV64360) := -include $(clear_L2_L3) | ||
110 | |||
111 | # kconfig 'feature', only one of these will ever be 'y' at a time. | 111 | # kconfig 'feature', only one of these will ever be 'y' at a time. |
112 | # The rest will be unset. | 112 | # The rest will be unset. |
113 | motorola := $(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750) \ | 113 | motorola := $(CONFIG_MVME5100)$(CONFIG_PRPMC750) \ |
114 | $(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS) | 114 | $(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS) |
115 | motorola := $(strip $(motorola)) | 115 | motorola := $(strip $(motorola)) |
116 | pcore := $(CONFIG_PCORE)$(CONFIG_POWERPMC250) | ||
117 | 116 | ||
118 | zimage-$(motorola) := zImage-PPLUS | 117 | zimage-$(motorola) := zImage-PPLUS |
119 | zimageinitrd-$(motorola) := zImage.initrd-PPLUS | 118 | zimageinitrd-$(motorola) := zImage.initrd-PPLUS |
@@ -123,12 +122,6 @@ zimageinitrd-$(motorola) := zImage.initrd-PPLUS | |||
123 | extra.o-$(CONFIG_PPLUS) := prepmap.o | 122 | extra.o-$(CONFIG_PPLUS) := prepmap.o |
124 | extra.o-$(CONFIG_LOPEC) := mpc10x_memory.o | 123 | extra.o-$(CONFIG_LOPEC) := mpc10x_memory.o |
125 | 124 | ||
126 | zimage-$(pcore) := zImage-STRIPELF | ||
127 | zimageinitrd-$(pcore) := zImage.initrd-STRIPELF | ||
128 | extra.o-$(pcore) := chrpmap.o | ||
129 | end-$(pcore) := pcore | ||
130 | cacheflag-$(pcore) := -include $(clear_L2_L3) | ||
131 | |||
132 | # Really only valid if CONFIG_6xx=y | 125 | # Really only valid if CONFIG_6xx=y |
133 | zimage-$(CONFIG_PPC_PREP) := zImage-PPLUS | 126 | zimage-$(CONFIG_PPC_PREP) := zImage-PPLUS |
134 | zimageinitrd-$(CONFIG_PPC_PREP) := zImage.initrd-PPLUS | 127 | zimageinitrd-$(CONFIG_PPC_PREP) := zImage.initrd-PPLUS |
@@ -158,8 +151,6 @@ zimageinitrd-$(CONFIG_LITE5200) := zImage.initrd-STRIPELF | |||
158 | 151 | ||
159 | # This is a treeboot that needs init functions until the | 152 | # This is a treeboot that needs init functions until the |
160 | # boot rom is sorted out (i.e. this is short lived) | 153 | # boot rom is sorted out (i.e. this is short lived) |
161 | extra-aflags-$(CONFIG_REDWOOD_4) := -Wa,-m405 | ||
162 | extra.o-$(CONFIG_REDWOOD_4) := rw4/rw4_init.o rw4/rw4_init_brd.o | ||
163 | EXTRA_AFLAGS := $(extra-aflags-y) | 154 | EXTRA_AFLAGS := $(extra-aflags-y) |
164 | # head.o needs to get the cacheflags defined. | 155 | # head.o needs to get the cacheflags defined. |
165 | AFLAGS_head.o += $(cacheflag-y) | 156 | AFLAGS_head.o += $(cacheflag-y) |
diff --git a/arch/ppc/boot/simple/embed_config.c b/arch/ppc/boot/simple/embed_config.c index c342b47e763e..491a691d10cc 100644 --- a/arch/ppc/boot/simple/embed_config.c +++ b/arch/ppc/boot/simple/embed_config.c | |||
@@ -784,28 +784,12 @@ embed_config(bd_t ** bdp) | |||
784 | #ifdef CONFIG_IBM_OPENBIOS | 784 | #ifdef CONFIG_IBM_OPENBIOS |
785 | /* This could possibly work for all treeboot roms. | 785 | /* This could possibly work for all treeboot roms. |
786 | */ | 786 | */ |
787 | #if defined(CONFIG_ASH) || defined(CONFIG_BEECH) || defined(CONFIG_BUBINGA) | 787 | #if defined(CONFIG_BUBINGA) |
788 | #define BOARD_INFO_VECTOR 0xFFF80B50 /* openbios 1.19 moved this vector down - armin */ | 788 | #define BOARD_INFO_VECTOR 0xFFF80B50 /* openbios 1.19 moved this vector down - armin */ |
789 | #else | 789 | #else |
790 | #define BOARD_INFO_VECTOR 0xFFFE0B50 | 790 | #define BOARD_INFO_VECTOR 0xFFFE0B50 |
791 | #endif | 791 | #endif |
792 | 792 | ||
793 | #ifdef CONFIG_BEECH | ||
794 | static void | ||
795 | get_board_info(bd_t **bdp) | ||
796 | { | ||
797 | typedef void (*PFV)(bd_t *bd); | ||
798 | ((PFV)(*(unsigned long *)BOARD_INFO_VECTOR))(*bdp); | ||
799 | return; | ||
800 | } | ||
801 | |||
802 | void | ||
803 | embed_config(bd_t **bdp) | ||
804 | { | ||
805 | *bdp = &bdinfo; | ||
806 | get_board_info(bdp); | ||
807 | } | ||
808 | #else /* !CONFIG_BEECH */ | ||
809 | void | 793 | void |
810 | embed_config(bd_t **bdp) | 794 | embed_config(bd_t **bdp) |
811 | { | 795 | { |
@@ -860,7 +844,6 @@ embed_config(bd_t **bdp) | |||
860 | #endif | 844 | #endif |
861 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; | 845 | timebase_period_ns = 1000000000 / bd->bi_tbfreq; |
862 | } | 846 | } |
863 | #endif /* CONFIG_BEECH */ | ||
864 | #endif /* CONFIG_IBM_OPENBIOS */ | 847 | #endif /* CONFIG_IBM_OPENBIOS */ |
865 | 848 | ||
866 | #ifdef CONFIG_EP405 | 849 | #ifdef CONFIG_EP405 |
@@ -943,39 +926,3 @@ embed_config(bd_t **bdp) | |||
943 | #endif | 926 | #endif |
944 | } | 927 | } |
945 | #endif | 928 | #endif |
946 | |||
947 | #ifdef CONFIG_RAINIER | ||
948 | /* Rainier uses vxworks bootrom */ | ||
949 | void | ||
950 | embed_config(bd_t **bdp) | ||
951 | { | ||
952 | u_char *cp; | ||
953 | int i; | ||
954 | bd_t *bd; | ||
955 | |||
956 | bd = &bdinfo; | ||
957 | *bdp = bd; | ||
958 | |||
959 | for(i=0;i<8192;i+=32) { | ||
960 | __asm__("dccci 0,%0" :: "r" (i)); | ||
961 | } | ||
962 | __asm__("iccci 0,0"); | ||
963 | __asm__("sync;isync"); | ||
964 | |||
965 | /* init ram for parity */ | ||
966 | memset(0, 0,0x400000); /* Lo memory */ | ||
967 | |||
968 | |||
969 | bd->bi_memsize = (32 * 1024 * 1024) ; | ||
970 | bd->bi_intfreq = 133000000; //the internal clock is 133 MHz | ||
971 | bd->bi_busfreq = 100000000; | ||
972 | bd->bi_pci_busfreq= 33000000; | ||
973 | |||
974 | cp = (u_char *)def_enet_addr; | ||
975 | for (i=0; i<6; i++) { | ||
976 | bd->bi_enetaddr[i] = *cp++; | ||
977 | } | ||
978 | |||
979 | } | ||
980 | #endif | ||
981 | |||
diff --git a/arch/ppc/boot/simple/head.S b/arch/ppc/boot/simple/head.S index 524053202bb4..5e4adc298bf9 100644 --- a/arch/ppc/boot/simple/head.S +++ b/arch/ppc/boot/simple/head.S | |||
@@ -120,15 +120,6 @@ haveOF: | |||
120 | mtspr SPRN_DER,r4 | 120 | mtspr SPRN_DER,r4 |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | #ifdef CONFIG_REDWOOD_4 | ||
124 | /* All of this Redwood 4 stuff will soon disappear when the | ||
125 | * boot rom is straightened out. | ||
126 | */ | ||
127 | mr r29, r3 /* Easier than changing the other code */ | ||
128 | bl HdwInit | ||
129 | mr r3, r29 | ||
130 | #endif | ||
131 | |||
132 | #if defined(CONFIG_MBX) || defined(CONFIG_RPX8260) || defined(CONFIG_PPC_PREP) | 123 | #if defined(CONFIG_MBX) || defined(CONFIG_RPX8260) || defined(CONFIG_PPC_PREP) |
133 | mr r4,r29 /* put the board info pointer where the relocate | 124 | mr r4,r29 /* put the board info pointer where the relocate |
134 | * routine will find it | 125 | * routine will find it |
diff --git a/arch/ppc/boot/simple/misc-cpci690.c b/arch/ppc/boot/simple/misc-cpci690.c index ef08e86c9b25..26860300fa09 100644 --- a/arch/ppc/boot/simple/misc-cpci690.c +++ b/arch/ppc/boot/simple/misc-cpci690.c | |||
@@ -12,16 +12,56 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/types.h> | 14 | #include <linux/types.h> |
15 | #include <asm/io.h> | ||
15 | #include <platforms/cpci690.h> | 16 | #include <platforms/cpci690.h> |
16 | 17 | ||
18 | #define KB (1024UL) | ||
19 | #define MB (1024UL*KB) | ||
20 | #define GB (1024UL*MB) | ||
21 | |||
17 | extern u32 mv64x60_console_baud; | 22 | extern u32 mv64x60_console_baud; |
18 | extern u32 mv64x60_mpsc_clk_src; | 23 | extern u32 mv64x60_mpsc_clk_src; |
19 | extern u32 mv64x60_mpsc_clk_freq; | 24 | extern u32 mv64x60_mpsc_clk_freq; |
20 | 25 | ||
26 | u32 mag = 0xffff; | ||
27 | |||
28 | unsigned long | ||
29 | get_mem_size(void) | ||
30 | { | ||
31 | u32 size; | ||
32 | |||
33 | switch (in_8(((void __iomem *)CPCI690_BR_BASE + CPCI690_BR_MEM_CTLR)) | ||
34 | & 0x07) { | ||
35 | case 0x01: | ||
36 | size = 256*MB; | ||
37 | break; | ||
38 | case 0x02: | ||
39 | size = 512*MB; | ||
40 | break; | ||
41 | case 0x03: | ||
42 | size = 768*MB; | ||
43 | break; | ||
44 | case 0x04: | ||
45 | size = 1*GB; | ||
46 | break; | ||
47 | case 0x05: | ||
48 | size = 1*GB + 512*MB; | ||
49 | break; | ||
50 | case 0x06: | ||
51 | size = 2*GB; | ||
52 | break; | ||
53 | default: | ||
54 | size = 0; | ||
55 | } | ||
56 | |||
57 | return size; | ||
58 | } | ||
59 | |||
21 | void | 60 | void |
22 | mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) | 61 | mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) |
23 | { | 62 | { |
24 | mv64x60_console_baud = CPCI690_MPSC_BAUD; | 63 | mv64x60_console_baud = CPCI690_MPSC_BAUD; |
25 | mv64x60_mpsc_clk_src = CPCI690_MPSC_CLK_SRC; | 64 | mv64x60_mpsc_clk_src = CPCI690_MPSC_CLK_SRC; |
26 | mv64x60_mpsc_clk_freq = CPCI690_BUS_FREQ; | 65 | mv64x60_mpsc_clk_freq = |
66 | (get_mem_size() >= (1*GB)) ? 100000000 : 133333333; | ||
27 | } | 67 | } |
diff --git a/arch/ppc/boot/simple/misc-ev64360.c b/arch/ppc/boot/simple/misc-ev64360.c new file mode 100644 index 000000000000..cd1ccf2a1582 --- /dev/null +++ b/arch/ppc/boot/simple/misc-ev64360.c | |||
@@ -0,0 +1,44 @@ | |||
1 | /* | ||
2 | * arch/ppc/boot/simple/misc-ev64360.c | ||
3 | * Copyright (C) 2005 Lee Nicks <allinux@gmail.com> | ||
4 | * | ||
5 | * Based on arch/ppc/boot/simple/misc-katana.c from: | ||
6 | * Mark A. Greer <source@mvista.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * as published by the Free Software Foundation; either version 2 | ||
11 | * of the License, or (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/config.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <asm/io.h> | ||
26 | #include <asm/mv64x60_defs.h> | ||
27 | #include <platforms/ev64360.h> | ||
28 | |||
29 | extern u32 mv64x60_console_baud; | ||
30 | extern u32 mv64x60_mpsc_clk_src; | ||
31 | extern u32 mv64x60_mpsc_clk_freq; | ||
32 | |||
33 | /* Not in the kernel so won't include kernel.h to get its 'min' definition */ | ||
34 | #ifndef min | ||
35 | #define min(a,b) (((a) < (b)) ? (a) : (b)) | ||
36 | #endif | ||
37 | |||
38 | void | ||
39 | mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) | ||
40 | { | ||
41 | mv64x60_console_baud = EV64360_DEFAULT_BAUD; | ||
42 | mv64x60_mpsc_clk_src = EV64360_MPSC_CLK_SRC; | ||
43 | mv64x60_mpsc_clk_freq = EV64360_MPSC_CLK_FREQ; | ||
44 | } | ||
diff --git a/arch/ppc/boot/simple/misc-katana.c b/arch/ppc/boot/simple/misc-katana.c index b6e1bb833157..ec94a11bacac 100644 --- a/arch/ppc/boot/simple/misc-katana.c +++ b/arch/ppc/boot/simple/misc-katana.c | |||
@@ -26,6 +26,8 @@ extern u32 mv64x60_mpsc_clk_freq; | |||
26 | #define min(a,b) (((a) < (b)) ? (a) : (b)) | 26 | #define min(a,b) (((a) < (b)) ? (a) : (b)) |
27 | #endif | 27 | #endif |
28 | 28 | ||
29 | unsigned long mv64360_get_mem_size(void); | ||
30 | |||
29 | void | 31 | void |
30 | mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) | 32 | mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) |
31 | { | 33 | { |
@@ -35,3 +37,9 @@ mv64x60_board_init(void __iomem *old_base, void __iomem *new_base) | |||
35 | min(katana_bus_freq((void __iomem *)KATANA_CPLD_BASE), | 37 | min(katana_bus_freq((void __iomem *)KATANA_CPLD_BASE), |
36 | MV64x60_TCLK_FREQ_MAX); | 38 | MV64x60_TCLK_FREQ_MAX); |
37 | } | 39 | } |
40 | |||
41 | unsigned long | ||
42 | get_mem_size(void) | ||
43 | { | ||
44 | return mv64360_get_mem_size(); | ||
45 | } | ||
diff --git a/arch/ppc/boot/simple/misc-mv64x60.c b/arch/ppc/boot/simple/misc-mv64x60.c index 7e88fc6d207d..258d4599fadc 100644 --- a/arch/ppc/boot/simple/misc-mv64x60.c +++ b/arch/ppc/boot/simple/misc-mv64x60.c | |||
@@ -19,6 +19,33 @@ | |||
19 | extern struct bi_record *decompress_kernel(unsigned long load_addr, | 19 | extern struct bi_record *decompress_kernel(unsigned long load_addr, |
20 | int num_words, unsigned long cksum); | 20 | int num_words, unsigned long cksum); |
21 | 21 | ||
22 | |||
23 | u32 size_reg[MV64x60_CPU2MEM_WINDOWS] = { | ||
24 | MV64x60_CPU2MEM_0_SIZE, MV64x60_CPU2MEM_1_SIZE, | ||
25 | MV64x60_CPU2MEM_2_SIZE, MV64x60_CPU2MEM_3_SIZE | ||
26 | }; | ||
27 | |||
28 | /* Read mem ctlr to get the amount of mem in system */ | ||
29 | unsigned long | ||
30 | mv64360_get_mem_size(void) | ||
31 | { | ||
32 | u32 enables, i, v; | ||
33 | u32 mem = 0; | ||
34 | |||
35 | enables = in_le32((void __iomem *)CONFIG_MV64X60_NEW_BASE + | ||
36 | MV64360_CPU_BAR_ENABLE) & 0xf; | ||
37 | |||
38 | for (i=0; i<MV64x60_CPU2MEM_WINDOWS; i++) | ||
39 | if (!(enables & (1<<i))) { | ||
40 | v = in_le32((void __iomem *)CONFIG_MV64X60_NEW_BASE | ||
41 | + size_reg[i]) & 0xffff; | ||
42 | v = (v + 1) << 16; | ||
43 | mem += v; | ||
44 | } | ||
45 | |||
46 | return mem; | ||
47 | } | ||
48 | |||
22 | void | 49 | void |
23 | mv64x60_move_base(void __iomem *old_base, void __iomem *new_base) | 50 | mv64x60_move_base(void __iomem *old_base, void __iomem *new_base) |
24 | { | 51 | { |
diff --git a/arch/ppc/boot/simple/mv64x60_tty.c b/arch/ppc/boot/simple/mv64x60_tty.c index 5b45eb46b669..b9c24d4c738b 100644 --- a/arch/ppc/boot/simple/mv64x60_tty.c +++ b/arch/ppc/boot/simple/mv64x60_tty.c | |||
@@ -22,9 +22,16 @@ | |||
22 | #include <asm/mv64x60_defs.h> | 22 | #include <asm/mv64x60_defs.h> |
23 | #include <mpsc_defs.h> | 23 | #include <mpsc_defs.h> |
24 | 24 | ||
25 | #ifdef CONFIG_EV64360 | ||
26 | #include <platforms/ev64360.h> | ||
27 | u32 mv64x60_console_baud = EV64360_DEFAULT_BAUD; | ||
28 | u32 mv64x60_mpsc_clk_src = EV64360_MPSC_CLK_SRC; /* TCLK */ | ||
29 | u32 mv64x60_mpsc_clk_freq = EV64360_MPSC_CLK_FREQ; | ||
30 | #else | ||
25 | u32 mv64x60_console_baud = 9600; | 31 | u32 mv64x60_console_baud = 9600; |
26 | u32 mv64x60_mpsc_clk_src = 8; /* TCLK */ | 32 | u32 mv64x60_mpsc_clk_src = 8; /* TCLK */ |
27 | u32 mv64x60_mpsc_clk_freq = 100000000; | 33 | u32 mv64x60_mpsc_clk_freq = 100000000; |
34 | #endif | ||
28 | 35 | ||
29 | extern void udelay(long); | 36 | extern void udelay(long); |
30 | static void stop_dma(int chan); | 37 | static void stop_dma(int chan); |
diff --git a/arch/ppc/configs/SM850_defconfig b/arch/ppc/configs/SM850_defconfig deleted file mode 100644 index 021884b43029..000000000000 --- a/arch/ppc/configs/SM850_defconfig +++ /dev/null | |||
@@ -1,522 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | CONFIG_EMBEDDED=y | ||
22 | CONFIG_FUTEX=y | ||
23 | # CONFIG_EPOLL is not set | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | CONFIG_MODULE_UNLOAD=y | ||
30 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
31 | CONFIG_OBSOLETE_MODPARM=y | ||
32 | # CONFIG_MODVERSIONS is not set | ||
33 | CONFIG_KMOD=y | ||
34 | |||
35 | # | ||
36 | # Platform support | ||
37 | # | ||
38 | CONFIG_PPC=y | ||
39 | CONFIG_PPC32=y | ||
40 | # CONFIG_6xx is not set | ||
41 | # CONFIG_40x is not set | ||
42 | # CONFIG_POWER3 is not set | ||
43 | CONFIG_8xx=y | ||
44 | |||
45 | # | ||
46 | # IBM 4xx options | ||
47 | # | ||
48 | CONFIG_EMBEDDEDBOOT=y | ||
49 | CONFIG_SERIAL_CONSOLE=y | ||
50 | CONFIG_NOT_COHERENT_CACHE=y | ||
51 | # CONFIG_RPXLITE is not set | ||
52 | # CONFIG_RPXCLASSIC is not set | ||
53 | # CONFIG_BSEIP is not set | ||
54 | # CONFIG_FADS is not set | ||
55 | # CONFIG_TQM823L is not set | ||
56 | # CONFIG_TQM850L is not set | ||
57 | # CONFIG_TQM855L is not set | ||
58 | # CONFIG_TQM860L is not set | ||
59 | # CONFIG_FPS850L is not set | ||
60 | # CONFIG_SPD823TS is not set | ||
61 | # CONFIG_IVMS8 is not set | ||
62 | # CONFIG_IVML24 is not set | ||
63 | CONFIG_SM850=y | ||
64 | # CONFIG_HERMES_PRO is not set | ||
65 | # CONFIG_IP860 is not set | ||
66 | # CONFIG_LWMON is not set | ||
67 | # CONFIG_PCU_E is not set | ||
68 | # CONFIG_CCM is not set | ||
69 | # CONFIG_LANTEC is not set | ||
70 | # CONFIG_MBX is not set | ||
71 | # CONFIG_WINCEPT is not set | ||
72 | CONFIG_TQM8xxL=y | ||
73 | # CONFIG_SMP is not set | ||
74 | # CONFIG_PREEMPT is not set | ||
75 | CONFIG_MATH_EMULATION=y | ||
76 | # CONFIG_CPU_FREQ is not set | ||
77 | |||
78 | # | ||
79 | # General setup | ||
80 | # | ||
81 | # CONFIG_HIGHMEM is not set | ||
82 | # CONFIG_PCI is not set | ||
83 | # CONFIG_PCI_DOMAINS is not set | ||
84 | # CONFIG_PCI_QSPAN is not set | ||
85 | CONFIG_KCORE_ELF=y | ||
86 | CONFIG_BINFMT_ELF=y | ||
87 | CONFIG_KERNEL_ELF=y | ||
88 | # CONFIG_BINFMT_MISC is not set | ||
89 | # CONFIG_HOTPLUG is not set | ||
90 | |||
91 | # | ||
92 | # Parallel port support | ||
93 | # | ||
94 | # CONFIG_PARPORT is not set | ||
95 | CONFIG_CMDLINE_BOOL=y | ||
96 | CONFIG_CMDLINE="console=ttyCPM1" | ||
97 | |||
98 | # | ||
99 | # Advanced setup | ||
100 | # | ||
101 | # CONFIG_ADVANCED_OPTIONS is not set | ||
102 | |||
103 | # | ||
104 | # Default settings for advanced configuration options are used | ||
105 | # | ||
106 | CONFIG_HIGHMEM_START=0xfe000000 | ||
107 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
108 | CONFIG_KERNEL_START=0xc0000000 | ||
109 | CONFIG_TASK_SIZE=0x80000000 | ||
110 | CONFIG_BOOT_LOAD=0x00400000 | ||
111 | |||
112 | # | ||
113 | # Memory Technology Devices (MTD) | ||
114 | # | ||
115 | # CONFIG_MTD is not set | ||
116 | |||
117 | # | ||
118 | # Plug and Play support | ||
119 | # | ||
120 | # CONFIG_PNP is not set | ||
121 | |||
122 | # | ||
123 | # Block devices | ||
124 | # | ||
125 | # CONFIG_BLK_DEV_FD is not set | ||
126 | # CONFIG_BLK_DEV_LOOP is not set | ||
127 | # CONFIG_BLK_DEV_NBD is not set | ||
128 | # CONFIG_BLK_DEV_RAM is not set | ||
129 | # CONFIG_BLK_DEV_INITRD is not set | ||
130 | |||
131 | # | ||
132 | # Multi-device support (RAID and LVM) | ||
133 | # | ||
134 | # CONFIG_MD is not set | ||
135 | |||
136 | # | ||
137 | # ATA/IDE/MFM/RLL support | ||
138 | # | ||
139 | # CONFIG_IDE is not set | ||
140 | |||
141 | # | ||
142 | # SCSI support | ||
143 | # | ||
144 | # CONFIG_SCSI is not set | ||
145 | |||
146 | # | ||
147 | # Fusion MPT device support | ||
148 | # | ||
149 | |||
150 | # | ||
151 | # I2O device support | ||
152 | # | ||
153 | |||
154 | # | ||
155 | # Networking support | ||
156 | # | ||
157 | CONFIG_NET=y | ||
158 | |||
159 | # | ||
160 | # Networking options | ||
161 | # | ||
162 | CONFIG_PACKET=y | ||
163 | # CONFIG_PACKET_MMAP is not set | ||
164 | # CONFIG_NETLINK_DEV is not set | ||
165 | # CONFIG_NETFILTER is not set | ||
166 | CONFIG_UNIX=y | ||
167 | # CONFIG_NET_KEY is not set | ||
168 | CONFIG_INET=y | ||
169 | # CONFIG_IP_MULTICAST is not set | ||
170 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
171 | CONFIG_IP_PNP=y | ||
172 | CONFIG_IP_PNP_DHCP=y | ||
173 | # CONFIG_IP_PNP_BOOTP is not set | ||
174 | # CONFIG_IP_PNP_RARP is not set | ||
175 | # CONFIG_NET_IPIP is not set | ||
176 | # CONFIG_NET_IPGRE is not set | ||
177 | # CONFIG_ARPD is not set | ||
178 | # CONFIG_INET_ECN is not set | ||
179 | # CONFIG_SYN_COOKIES is not set | ||
180 | # CONFIG_INET_AH is not set | ||
181 | # CONFIG_INET_ESP is not set | ||
182 | # CONFIG_INET_IPCOMP is not set | ||
183 | # CONFIG_IPV6 is not set | ||
184 | # CONFIG_XFRM_USER is not set | ||
185 | |||
186 | # | ||
187 | # SCTP Configuration (EXPERIMENTAL) | ||
188 | # | ||
189 | CONFIG_IPV6_SCTP__=y | ||
190 | # CONFIG_IP_SCTP is not set | ||
191 | # CONFIG_ATM is not set | ||
192 | # CONFIG_VLAN_8021Q is not set | ||
193 | # CONFIG_LLC is not set | ||
194 | # CONFIG_DECNET is not set | ||
195 | # CONFIG_BRIDGE is not set | ||
196 | # CONFIG_X25 is not set | ||
197 | # CONFIG_LAPB is not set | ||
198 | # CONFIG_NET_DIVERT is not set | ||
199 | # CONFIG_ECONET is not set | ||
200 | # CONFIG_WAN_ROUTER is not set | ||
201 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
202 | |||
203 | # | ||
204 | # QoS and/or fair queueing | ||
205 | # | ||
206 | # CONFIG_NET_SCHED is not set | ||
207 | |||
208 | # | ||
209 | # Network testing | ||
210 | # | ||
211 | # CONFIG_NET_PKTGEN is not set | ||
212 | CONFIG_NETDEVICES=y | ||
213 | # CONFIG_DUMMY is not set | ||
214 | # CONFIG_BONDING is not set | ||
215 | # CONFIG_EQUALIZER is not set | ||
216 | # CONFIG_TUN is not set | ||
217 | # CONFIG_ETHERTAP is not set | ||
218 | |||
219 | # | ||
220 | # Ethernet (10 or 100Mbit) | ||
221 | # | ||
222 | CONFIG_NET_ETHERNET=y | ||
223 | # CONFIG_MII is not set | ||
224 | # CONFIG_OAKNET is not set | ||
225 | |||
226 | # | ||
227 | # Ethernet (1000 Mbit) | ||
228 | # | ||
229 | |||
230 | # | ||
231 | # Ethernet (10000 Mbit) | ||
232 | # | ||
233 | # CONFIG_PPP is not set | ||
234 | # CONFIG_SLIP is not set | ||
235 | |||
236 | # | ||
237 | # Wireless LAN (non-hamradio) | ||
238 | # | ||
239 | # CONFIG_NET_RADIO is not set | ||
240 | |||
241 | # | ||
242 | # Token Ring devices (depends on LLC=y) | ||
243 | # | ||
244 | # CONFIG_SHAPER is not set | ||
245 | |||
246 | # | ||
247 | # Wan interfaces | ||
248 | # | ||
249 | # CONFIG_WAN is not set | ||
250 | |||
251 | # | ||
252 | # Amateur Radio support | ||
253 | # | ||
254 | # CONFIG_HAMRADIO is not set | ||
255 | |||
256 | # | ||
257 | # IrDA (infrared) support | ||
258 | # | ||
259 | # CONFIG_IRDA is not set | ||
260 | |||
261 | # | ||
262 | # ISDN subsystem | ||
263 | # | ||
264 | # CONFIG_ISDN_BOOL is not set | ||
265 | |||
266 | # | ||
267 | # Graphics support | ||
268 | # | ||
269 | # CONFIG_FB is not set | ||
270 | |||
271 | # | ||
272 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
273 | # | ||
274 | # CONFIG_CD_NO_IDESCSI is not set | ||
275 | |||
276 | # | ||
277 | # Input device support | ||
278 | # | ||
279 | # CONFIG_INPUT is not set | ||
280 | |||
281 | # | ||
282 | # Userland interfaces | ||
283 | # | ||
284 | |||
285 | # | ||
286 | # Input I/O drivers | ||
287 | # | ||
288 | # CONFIG_GAMEPORT is not set | ||
289 | CONFIG_SOUND_GAMEPORT=y | ||
290 | # CONFIG_SERIO is not set | ||
291 | |||
292 | # | ||
293 | # Input Device Drivers | ||
294 | # | ||
295 | |||
296 | # | ||
297 | # Macintosh device drivers | ||
298 | # | ||
299 | |||
300 | # | ||
301 | # Serial drivers | ||
302 | # | ||
303 | # CONFIG_SERIAL_8250 is not set | ||
304 | |||
305 | # | ||
306 | # Non-8250 serial port support | ||
307 | # | ||
308 | CONFIG_SERIAL_CORE=y | ||
309 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
310 | CONFIG_SERIAL_CPM=y | ||
311 | CONFIG_SERIAL_CPM_CONSOLE=y | ||
312 | # CONFIG_SERIAL_CPM_SCC1 is not set | ||
313 | # CONFIG_SERIAL_CPM_SCC2 is not set | ||
314 | # CONFIG_SERIAL_CPM_SCC3 is not set | ||
315 | # CONFIG_SERIAL_CPM_SCC4 is not set | ||
316 | CONFIG_SERIAL_CPM_SMC1=y | ||
317 | CONFIG_SERIAL_CPM_SMC2=y | ||
318 | CONFIG_SERIAL_CPM_ALT_SMC2=y | ||
319 | CONFIG_UNIX98_PTYS=y | ||
320 | # CONFIG_LEGACY_PTYS is not set | ||
321 | |||
322 | # | ||
323 | # I2C support | ||
324 | # | ||
325 | # CONFIG_I2C is not set | ||
326 | |||
327 | # | ||
328 | # I2C Hardware Sensors Mainboard support | ||
329 | # | ||
330 | |||
331 | # | ||
332 | # I2C Hardware Sensors Chip support | ||
333 | # | ||
334 | # CONFIG_I2C_SENSOR is not set | ||
335 | |||
336 | # | ||
337 | # Mice | ||
338 | # | ||
339 | # CONFIG_BUSMOUSE is not set | ||
340 | # CONFIG_QIC02_TAPE is not set | ||
341 | |||
342 | # | ||
343 | # IPMI | ||
344 | # | ||
345 | # CONFIG_IPMI_HANDLER is not set | ||
346 | |||
347 | # | ||
348 | # Watchdog Cards | ||
349 | # | ||
350 | # CONFIG_WATCHDOG is not set | ||
351 | # CONFIG_NVRAM is not set | ||
352 | CONFIG_GEN_RTC=y | ||
353 | # CONFIG_GEN_RTC_X is not set | ||
354 | # CONFIG_DTLK is not set | ||
355 | # CONFIG_R3964 is not set | ||
356 | # CONFIG_APPLICOM is not set | ||
357 | |||
358 | # | ||
359 | # Ftape, the floppy tape device driver | ||
360 | # | ||
361 | # CONFIG_FTAPE is not set | ||
362 | # CONFIG_AGP is not set | ||
363 | # CONFIG_DRM is not set | ||
364 | # CONFIG_RAW_DRIVER is not set | ||
365 | # CONFIG_HANGCHECK_TIMER is not set | ||
366 | |||
367 | # | ||
368 | # Multimedia devices | ||
369 | # | ||
370 | # CONFIG_VIDEO_DEV is not set | ||
371 | |||
372 | # | ||
373 | # Digital Video Broadcasting Devices | ||
374 | # | ||
375 | # CONFIG_DVB is not set | ||
376 | |||
377 | # | ||
378 | # File systems | ||
379 | # | ||
380 | # CONFIG_EXT2_FS is not set | ||
381 | CONFIG_EXT3_FS=y | ||
382 | CONFIG_EXT3_FS_XATTR=y | ||
383 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
384 | # CONFIG_EXT3_FS_SECURITY is not set | ||
385 | CONFIG_JBD=y | ||
386 | # CONFIG_JBD_DEBUG is not set | ||
387 | CONFIG_FS_MBCACHE=y | ||
388 | # CONFIG_REISERFS_FS is not set | ||
389 | # CONFIG_JFS_FS is not set | ||
390 | # CONFIG_XFS_FS is not set | ||
391 | # CONFIG_MINIX_FS is not set | ||
392 | # CONFIG_ROMFS_FS is not set | ||
393 | # CONFIG_QUOTA is not set | ||
394 | # CONFIG_AUTOFS_FS is not set | ||
395 | # CONFIG_AUTOFS4_FS is not set | ||
396 | |||
397 | # | ||
398 | # CD-ROM/DVD Filesystems | ||
399 | # | ||
400 | # CONFIG_ISO9660_FS is not set | ||
401 | # CONFIG_UDF_FS is not set | ||
402 | |||
403 | # | ||
404 | # DOS/FAT/NT Filesystems | ||
405 | # | ||
406 | # CONFIG_FAT_FS is not set | ||
407 | # CONFIG_NTFS_FS is not set | ||
408 | |||
409 | # | ||
410 | # Pseudo filesystems | ||
411 | # | ||
412 | CONFIG_PROC_FS=y | ||
413 | # CONFIG_DEVFS_FS is not set | ||
414 | CONFIG_DEVPTS_FS=y | ||
415 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
416 | CONFIG_TMPFS=y | ||
417 | CONFIG_RAMFS=y | ||
418 | |||
419 | # | ||
420 | # Miscellaneous filesystems | ||
421 | # | ||
422 | # CONFIG_ADFS_FS is not set | ||
423 | # CONFIG_AFFS_FS is not set | ||
424 | # CONFIG_HFS_FS is not set | ||
425 | # CONFIG_BEFS_FS is not set | ||
426 | # CONFIG_BFS_FS is not set | ||
427 | # CONFIG_EFS_FS is not set | ||
428 | # CONFIG_CRAMFS is not set | ||
429 | # CONFIG_VXFS_FS is not set | ||
430 | # CONFIG_HPFS_FS is not set | ||
431 | # CONFIG_QNX4FS_FS is not set | ||
432 | # CONFIG_SYSV_FS is not set | ||
433 | # CONFIG_UFS_FS is not set | ||
434 | |||
435 | # | ||
436 | # Network File Systems | ||
437 | # | ||
438 | CONFIG_NFS_FS=y | ||
439 | # CONFIG_NFS_V3 is not set | ||
440 | # CONFIG_NFS_V4 is not set | ||
441 | # CONFIG_NFSD is not set | ||
442 | CONFIG_ROOT_NFS=y | ||
443 | CONFIG_LOCKD=y | ||
444 | # CONFIG_EXPORTFS is not set | ||
445 | CONFIG_SUNRPC=y | ||
446 | # CONFIG_SUNRPC_GSS is not set | ||
447 | # CONFIG_SMB_FS is not set | ||
448 | # CONFIG_CIFS is not set | ||
449 | # CONFIG_NCP_FS is not set | ||
450 | # CONFIG_CODA_FS is not set | ||
451 | # CONFIG_INTERMEZZO_FS is not set | ||
452 | # CONFIG_AFS_FS is not set | ||
453 | |||
454 | # | ||
455 | # Partition Types | ||
456 | # | ||
457 | CONFIG_PARTITION_ADVANCED=y | ||
458 | # CONFIG_ACORN_PARTITION is not set | ||
459 | # CONFIG_OSF_PARTITION is not set | ||
460 | # CONFIG_AMIGA_PARTITION is not set | ||
461 | # CONFIG_ATARI_PARTITION is not set | ||
462 | # CONFIG_MAC_PARTITION is not set | ||
463 | # CONFIG_MSDOS_PARTITION is not set | ||
464 | # CONFIG_LDM_PARTITION is not set | ||
465 | # CONFIG_NEC98_PARTITION is not set | ||
466 | # CONFIG_SGI_PARTITION is not set | ||
467 | # CONFIG_ULTRIX_PARTITION is not set | ||
468 | # CONFIG_SUN_PARTITION is not set | ||
469 | # CONFIG_EFI_PARTITION is not set | ||
470 | |||
471 | # | ||
472 | # Sound | ||
473 | # | ||
474 | # CONFIG_SOUND is not set | ||
475 | |||
476 | # | ||
477 | # MPC8xx CPM Options | ||
478 | # | ||
479 | CONFIG_SCC_ENET=y | ||
480 | # CONFIG_SCC1_ENET is not set | ||
481 | # CONFIG_SCC2_ENET is not set | ||
482 | CONFIG_SCC3_ENET=y | ||
483 | # CONFIG_FEC_ENET is not set | ||
484 | CONFIG_ENET_BIG_BUFFERS=y | ||
485 | |||
486 | # | ||
487 | # Generic MPC8xx Options | ||
488 | # | ||
489 | CONFIG_8xx_COPYBACK=y | ||
490 | CONFIG_8xx_CPU6=y | ||
491 | # CONFIG_UCODE_PATCH is not set | ||
492 | |||
493 | # | ||
494 | # USB support | ||
495 | # | ||
496 | # CONFIG_USB_GADGET is not set | ||
497 | |||
498 | # | ||
499 | # Bluetooth support | ||
500 | # | ||
501 | # CONFIG_BT is not set | ||
502 | |||
503 | # | ||
504 | # Library routines | ||
505 | # | ||
506 | # CONFIG_CRC32 is not set | ||
507 | |||
508 | # | ||
509 | # Kernel hacking | ||
510 | # | ||
511 | # CONFIG_DEBUG_KERNEL is not set | ||
512 | # CONFIG_KALLSYMS is not set | ||
513 | |||
514 | # | ||
515 | # Security options | ||
516 | # | ||
517 | # CONFIG_SECURITY is not set | ||
518 | |||
519 | # | ||
520 | # Cryptographic options | ||
521 | # | ||
522 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/SPD823TS_defconfig b/arch/ppc/configs/SPD823TS_defconfig deleted file mode 100644 index ba60fea2b834..000000000000 --- a/arch/ppc/configs/SPD823TS_defconfig +++ /dev/null | |||
@@ -1,520 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | CONFIG_EMBEDDED=y | ||
22 | CONFIG_FUTEX=y | ||
23 | # CONFIG_EPOLL is not set | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | CONFIG_MODULE_UNLOAD=y | ||
30 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
31 | CONFIG_OBSOLETE_MODPARM=y | ||
32 | # CONFIG_MODVERSIONS is not set | ||
33 | CONFIG_KMOD=y | ||
34 | |||
35 | # | ||
36 | # Platform support | ||
37 | # | ||
38 | CONFIG_PPC=y | ||
39 | CONFIG_PPC32=y | ||
40 | # CONFIG_6xx is not set | ||
41 | # CONFIG_40x is not set | ||
42 | # CONFIG_POWER3 is not set | ||
43 | CONFIG_8xx=y | ||
44 | |||
45 | # | ||
46 | # IBM 4xx options | ||
47 | # | ||
48 | CONFIG_EMBEDDEDBOOT=y | ||
49 | CONFIG_SERIAL_CONSOLE=y | ||
50 | CONFIG_NOT_COHERENT_CACHE=y | ||
51 | # CONFIG_RPXLITE is not set | ||
52 | # CONFIG_RPXCLASSIC is not set | ||
53 | # CONFIG_BSEIP is not set | ||
54 | # CONFIG_FADS is not set | ||
55 | # CONFIG_TQM823L is not set | ||
56 | # CONFIG_TQM850L is not set | ||
57 | # CONFIG_TQM855L is not set | ||
58 | # CONFIG_TQM860L is not set | ||
59 | # CONFIG_FPS850L is not set | ||
60 | CONFIG_SPD823TS=y | ||
61 | # CONFIG_IVMS8 is not set | ||
62 | # CONFIG_IVML24 is not set | ||
63 | # CONFIG_SM850 is not set | ||
64 | # CONFIG_HERMES_PRO is not set | ||
65 | # CONFIG_IP860 is not set | ||
66 | # CONFIG_LWMON is not set | ||
67 | # CONFIG_PCU_E is not set | ||
68 | # CONFIG_CCM is not set | ||
69 | # CONFIG_LANTEC is not set | ||
70 | # CONFIG_MBX is not set | ||
71 | # CONFIG_WINCEPT is not set | ||
72 | # CONFIG_SMP is not set | ||
73 | # CONFIG_PREEMPT is not set | ||
74 | CONFIG_MATH_EMULATION=y | ||
75 | # CONFIG_CPU_FREQ is not set | ||
76 | |||
77 | # | ||
78 | # General setup | ||
79 | # | ||
80 | # CONFIG_HIGHMEM is not set | ||
81 | # CONFIG_PCI is not set | ||
82 | # CONFIG_PCI_DOMAINS is not set | ||
83 | # CONFIG_PCI_QSPAN is not set | ||
84 | CONFIG_KCORE_ELF=y | ||
85 | CONFIG_BINFMT_ELF=y | ||
86 | CONFIG_KERNEL_ELF=y | ||
87 | # CONFIG_BINFMT_MISC is not set | ||
88 | # CONFIG_HOTPLUG is not set | ||
89 | |||
90 | # | ||
91 | # Parallel port support | ||
92 | # | ||
93 | # CONFIG_PARPORT is not set | ||
94 | # CONFIG_CMDLINE_BOOL is not set | ||
95 | |||
96 | # | ||
97 | # Advanced setup | ||
98 | # | ||
99 | # CONFIG_ADVANCED_OPTIONS is not set | ||
100 | |||
101 | # | ||
102 | # Default settings for advanced configuration options are used | ||
103 | # | ||
104 | CONFIG_HIGHMEM_START=0xfe000000 | ||
105 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
106 | CONFIG_KERNEL_START=0xc0000000 | ||
107 | CONFIG_TASK_SIZE=0x80000000 | ||
108 | CONFIG_BOOT_LOAD=0x00400000 | ||
109 | |||
110 | # | ||
111 | # Memory Technology Devices (MTD) | ||
112 | # | ||
113 | # CONFIG_MTD is not set | ||
114 | |||
115 | # | ||
116 | # Plug and Play support | ||
117 | # | ||
118 | # CONFIG_PNP is not set | ||
119 | |||
120 | # | ||
121 | # Block devices | ||
122 | # | ||
123 | # CONFIG_BLK_DEV_FD is not set | ||
124 | # CONFIG_BLK_DEV_LOOP is not set | ||
125 | # CONFIG_BLK_DEV_NBD is not set | ||
126 | # CONFIG_BLK_DEV_RAM is not set | ||
127 | # CONFIG_BLK_DEV_INITRD is not set | ||
128 | |||
129 | # | ||
130 | # Multi-device support (RAID and LVM) | ||
131 | # | ||
132 | # CONFIG_MD is not set | ||
133 | |||
134 | # | ||
135 | # ATA/IDE/MFM/RLL support | ||
136 | # | ||
137 | # CONFIG_IDE is not set | ||
138 | |||
139 | # | ||
140 | # SCSI support | ||
141 | # | ||
142 | # CONFIG_SCSI is not set | ||
143 | |||
144 | # | ||
145 | # Fusion MPT device support | ||
146 | # | ||
147 | |||
148 | # | ||
149 | # I2O device support | ||
150 | # | ||
151 | |||
152 | # | ||
153 | # Networking support | ||
154 | # | ||
155 | CONFIG_NET=y | ||
156 | |||
157 | # | ||
158 | # Networking options | ||
159 | # | ||
160 | CONFIG_PACKET=y | ||
161 | # CONFIG_PACKET_MMAP is not set | ||
162 | # CONFIG_NETLINK_DEV is not set | ||
163 | # CONFIG_NETFILTER is not set | ||
164 | CONFIG_UNIX=y | ||
165 | # CONFIG_NET_KEY is not set | ||
166 | CONFIG_INET=y | ||
167 | # CONFIG_IP_MULTICAST is not set | ||
168 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
169 | CONFIG_IP_PNP=y | ||
170 | CONFIG_IP_PNP_DHCP=y | ||
171 | # CONFIG_IP_PNP_BOOTP is not set | ||
172 | # CONFIG_IP_PNP_RARP is not set | ||
173 | # CONFIG_NET_IPIP is not set | ||
174 | # CONFIG_NET_IPGRE is not set | ||
175 | # CONFIG_ARPD is not set | ||
176 | # CONFIG_INET_ECN is not set | ||
177 | # CONFIG_SYN_COOKIES is not set | ||
178 | # CONFIG_INET_AH is not set | ||
179 | # CONFIG_INET_ESP is not set | ||
180 | # CONFIG_INET_IPCOMP is not set | ||
181 | # CONFIG_IPV6 is not set | ||
182 | # CONFIG_XFRM_USER is not set | ||
183 | |||
184 | # | ||
185 | # SCTP Configuration (EXPERIMENTAL) | ||
186 | # | ||
187 | CONFIG_IPV6_SCTP__=y | ||
188 | # CONFIG_IP_SCTP is not set | ||
189 | # CONFIG_ATM is not set | ||
190 | # CONFIG_VLAN_8021Q is not set | ||
191 | # CONFIG_LLC is not set | ||
192 | # CONFIG_DECNET is not set | ||
193 | # CONFIG_BRIDGE is not set | ||
194 | # CONFIG_X25 is not set | ||
195 | # CONFIG_LAPB is not set | ||
196 | # CONFIG_NET_DIVERT is not set | ||
197 | # CONFIG_ECONET is not set | ||
198 | # CONFIG_WAN_ROUTER is not set | ||
199 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
200 | |||
201 | # | ||
202 | # QoS and/or fair queueing | ||
203 | # | ||
204 | # CONFIG_NET_SCHED is not set | ||
205 | |||
206 | # | ||
207 | # Network testing | ||
208 | # | ||
209 | # CONFIG_NET_PKTGEN is not set | ||
210 | CONFIG_NETDEVICES=y | ||
211 | # CONFIG_DUMMY is not set | ||
212 | # CONFIG_BONDING is not set | ||
213 | # CONFIG_EQUALIZER is not set | ||
214 | # CONFIG_TUN is not set | ||
215 | # CONFIG_ETHERTAP is not set | ||
216 | |||
217 | # | ||
218 | # Ethernet (10 or 100Mbit) | ||
219 | # | ||
220 | CONFIG_NET_ETHERNET=y | ||
221 | # CONFIG_MII is not set | ||
222 | # CONFIG_OAKNET is not set | ||
223 | |||
224 | # | ||
225 | # Ethernet (1000 Mbit) | ||
226 | # | ||
227 | |||
228 | # | ||
229 | # Ethernet (10000 Mbit) | ||
230 | # | ||
231 | # CONFIG_PPP is not set | ||
232 | # CONFIG_SLIP is not set | ||
233 | |||
234 | # | ||
235 | # Wireless LAN (non-hamradio) | ||
236 | # | ||
237 | # CONFIG_NET_RADIO is not set | ||
238 | |||
239 | # | ||
240 | # Token Ring devices (depends on LLC=y) | ||
241 | # | ||
242 | # CONFIG_SHAPER is not set | ||
243 | |||
244 | # | ||
245 | # Wan interfaces | ||
246 | # | ||
247 | # CONFIG_WAN is not set | ||
248 | |||
249 | # | ||
250 | # Amateur Radio support | ||
251 | # | ||
252 | # CONFIG_HAMRADIO is not set | ||
253 | |||
254 | # | ||
255 | # IrDA (infrared) support | ||
256 | # | ||
257 | # CONFIG_IRDA is not set | ||
258 | |||
259 | # | ||
260 | # ISDN subsystem | ||
261 | # | ||
262 | # CONFIG_ISDN_BOOL is not set | ||
263 | |||
264 | # | ||
265 | # Graphics support | ||
266 | # | ||
267 | # CONFIG_FB is not set | ||
268 | |||
269 | # | ||
270 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
271 | # | ||
272 | # CONFIG_CD_NO_IDESCSI is not set | ||
273 | |||
274 | # | ||
275 | # Input device support | ||
276 | # | ||
277 | # CONFIG_INPUT is not set | ||
278 | |||
279 | # | ||
280 | # Userland interfaces | ||
281 | # | ||
282 | |||
283 | # | ||
284 | # Input I/O drivers | ||
285 | # | ||
286 | # CONFIG_GAMEPORT is not set | ||
287 | CONFIG_SOUND_GAMEPORT=y | ||
288 | # CONFIG_SERIO is not set | ||
289 | |||
290 | # | ||
291 | # Input Device Drivers | ||
292 | # | ||
293 | |||
294 | # | ||
295 | # Macintosh device drivers | ||
296 | # | ||
297 | |||
298 | # | ||
299 | # Serial drivers | ||
300 | # | ||
301 | # CONFIG_SERIAL_8250 is not set | ||
302 | |||
303 | # | ||
304 | # Non-8250 serial port support | ||
305 | # | ||
306 | CONFIG_SERIAL_CORE=y | ||
307 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
308 | CONFIG_SERIAL_CPM=y | ||
309 | CONFIG_SERIAL_CPM_CONSOLE=y | ||
310 | # CONFIG_SERIAL_CPM_SCC1 is not set | ||
311 | # CONFIG_SERIAL_CPM_SCC2 is not set | ||
312 | # CONFIG_SERIAL_CPM_SCC3 is not set | ||
313 | # CONFIG_SERIAL_CPM_SCC4 is not set | ||
314 | CONFIG_SERIAL_CPM_SMC1=y | ||
315 | # CONFIG_SERIAL_CPM_SMC2 is not set | ||
316 | CONFIG_SERIAL_CPM_ALT_SMC2=y | ||
317 | CONFIG_UNIX98_PTYS=y | ||
318 | # CONFIG_LEGACY_PTYS is not set | ||
319 | |||
320 | # | ||
321 | # I2C support | ||
322 | # | ||
323 | # CONFIG_I2C is not set | ||
324 | |||
325 | # | ||
326 | # I2C Hardware Sensors Mainboard support | ||
327 | # | ||
328 | |||
329 | # | ||
330 | # I2C Hardware Sensors Chip support | ||
331 | # | ||
332 | # CONFIG_I2C_SENSOR is not set | ||
333 | |||
334 | # | ||
335 | # Mice | ||
336 | # | ||
337 | # CONFIG_BUSMOUSE is not set | ||
338 | # CONFIG_QIC02_TAPE is not set | ||
339 | |||
340 | # | ||
341 | # IPMI | ||
342 | # | ||
343 | # CONFIG_IPMI_HANDLER is not set | ||
344 | |||
345 | # | ||
346 | # Watchdog Cards | ||
347 | # | ||
348 | # CONFIG_WATCHDOG is not set | ||
349 | # CONFIG_NVRAM is not set | ||
350 | CONFIG_GEN_RTC=y | ||
351 | # CONFIG_GEN_RTC_X is not set | ||
352 | # CONFIG_DTLK is not set | ||
353 | # CONFIG_R3964 is not set | ||
354 | # CONFIG_APPLICOM is not set | ||
355 | |||
356 | # | ||
357 | # Ftape, the floppy tape device driver | ||
358 | # | ||
359 | # CONFIG_FTAPE is not set | ||
360 | # CONFIG_AGP is not set | ||
361 | # CONFIG_DRM is not set | ||
362 | # CONFIG_RAW_DRIVER is not set | ||
363 | # CONFIG_HANGCHECK_TIMER is not set | ||
364 | |||
365 | # | ||
366 | # Multimedia devices | ||
367 | # | ||
368 | # CONFIG_VIDEO_DEV is not set | ||
369 | |||
370 | # | ||
371 | # Digital Video Broadcasting Devices | ||
372 | # | ||
373 | # CONFIG_DVB is not set | ||
374 | |||
375 | # | ||
376 | # File systems | ||
377 | # | ||
378 | # CONFIG_EXT2_FS is not set | ||
379 | CONFIG_EXT3_FS=y | ||
380 | CONFIG_EXT3_FS_XATTR=y | ||
381 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
382 | # CONFIG_EXT3_FS_SECURITY is not set | ||
383 | CONFIG_JBD=y | ||
384 | # CONFIG_JBD_DEBUG is not set | ||
385 | CONFIG_FS_MBCACHE=y | ||
386 | # CONFIG_REISERFS_FS is not set | ||
387 | # CONFIG_JFS_FS is not set | ||
388 | # CONFIG_XFS_FS is not set | ||
389 | # CONFIG_MINIX_FS is not set | ||
390 | # CONFIG_ROMFS_FS is not set | ||
391 | # CONFIG_QUOTA is not set | ||
392 | # CONFIG_AUTOFS_FS is not set | ||
393 | # CONFIG_AUTOFS4_FS is not set | ||
394 | |||
395 | # | ||
396 | # CD-ROM/DVD Filesystems | ||
397 | # | ||
398 | # CONFIG_ISO9660_FS is not set | ||
399 | # CONFIG_UDF_FS is not set | ||
400 | |||
401 | # | ||
402 | # DOS/FAT/NT Filesystems | ||
403 | # | ||
404 | # CONFIG_FAT_FS is not set | ||
405 | # CONFIG_NTFS_FS is not set | ||
406 | |||
407 | # | ||
408 | # Pseudo filesystems | ||
409 | # | ||
410 | CONFIG_PROC_FS=y | ||
411 | # CONFIG_DEVFS_FS is not set | ||
412 | CONFIG_DEVPTS_FS=y | ||
413 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
414 | CONFIG_TMPFS=y | ||
415 | CONFIG_RAMFS=y | ||
416 | |||
417 | # | ||
418 | # Miscellaneous filesystems | ||
419 | # | ||
420 | # CONFIG_ADFS_FS is not set | ||
421 | # CONFIG_AFFS_FS is not set | ||
422 | # CONFIG_HFS_FS is not set | ||
423 | # CONFIG_BEFS_FS is not set | ||
424 | # CONFIG_BFS_FS is not set | ||
425 | # CONFIG_EFS_FS is not set | ||
426 | # CONFIG_CRAMFS is not set | ||
427 | # CONFIG_VXFS_FS is not set | ||
428 | # CONFIG_HPFS_FS is not set | ||
429 | # CONFIG_QNX4FS_FS is not set | ||
430 | # CONFIG_SYSV_FS is not set | ||
431 | # CONFIG_UFS_FS is not set | ||
432 | |||
433 | # | ||
434 | # Network File Systems | ||
435 | # | ||
436 | CONFIG_NFS_FS=y | ||
437 | # CONFIG_NFS_V3 is not set | ||
438 | # CONFIG_NFS_V4 is not set | ||
439 | # CONFIG_NFSD is not set | ||
440 | CONFIG_ROOT_NFS=y | ||
441 | CONFIG_LOCKD=y | ||
442 | # CONFIG_EXPORTFS is not set | ||
443 | CONFIG_SUNRPC=y | ||
444 | # CONFIG_SUNRPC_GSS is not set | ||
445 | # CONFIG_SMB_FS is not set | ||
446 | # CONFIG_CIFS is not set | ||
447 | # CONFIG_NCP_FS is not set | ||
448 | # CONFIG_CODA_FS is not set | ||
449 | # CONFIG_INTERMEZZO_FS is not set | ||
450 | # CONFIG_AFS_FS is not set | ||
451 | |||
452 | # | ||
453 | # Partition Types | ||
454 | # | ||
455 | CONFIG_PARTITION_ADVANCED=y | ||
456 | # CONFIG_ACORN_PARTITION is not set | ||
457 | # CONFIG_OSF_PARTITION is not set | ||
458 | # CONFIG_AMIGA_PARTITION is not set | ||
459 | # CONFIG_ATARI_PARTITION is not set | ||
460 | # CONFIG_MAC_PARTITION is not set | ||
461 | # CONFIG_MSDOS_PARTITION is not set | ||
462 | # CONFIG_LDM_PARTITION is not set | ||
463 | # CONFIG_NEC98_PARTITION is not set | ||
464 | # CONFIG_SGI_PARTITION is not set | ||
465 | # CONFIG_ULTRIX_PARTITION is not set | ||
466 | # CONFIG_SUN_PARTITION is not set | ||
467 | # CONFIG_EFI_PARTITION is not set | ||
468 | |||
469 | # | ||
470 | # Sound | ||
471 | # | ||
472 | # CONFIG_SOUND is not set | ||
473 | |||
474 | # | ||
475 | # MPC8xx CPM Options | ||
476 | # | ||
477 | CONFIG_SCC_ENET=y | ||
478 | # CONFIG_SCC1_ENET is not set | ||
479 | CONFIG_SCC2_ENET=y | ||
480 | # CONFIG_SCC3_ENET is not set | ||
481 | # CONFIG_FEC_ENET is not set | ||
482 | CONFIG_ENET_BIG_BUFFERS=y | ||
483 | |||
484 | # | ||
485 | # Generic MPC8xx Options | ||
486 | # | ||
487 | CONFIG_8xx_COPYBACK=y | ||
488 | # CONFIG_8xx_CPU6 is not set | ||
489 | # CONFIG_UCODE_PATCH is not set | ||
490 | |||
491 | # | ||
492 | # USB support | ||
493 | # | ||
494 | # CONFIG_USB_GADGET is not set | ||
495 | |||
496 | # | ||
497 | # Bluetooth support | ||
498 | # | ||
499 | # CONFIG_BT is not set | ||
500 | |||
501 | # | ||
502 | # Library routines | ||
503 | # | ||
504 | # CONFIG_CRC32 is not set | ||
505 | |||
506 | # | ||
507 | # Kernel hacking | ||
508 | # | ||
509 | # CONFIG_DEBUG_KERNEL is not set | ||
510 | # CONFIG_KALLSYMS is not set | ||
511 | |||
512 | # | ||
513 | # Security options | ||
514 | # | ||
515 | # CONFIG_SECURITY is not set | ||
516 | |||
517 | # | ||
518 | # Cryptographic options | ||
519 | # | ||
520 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/adir_defconfig b/arch/ppc/configs/adir_defconfig deleted file mode 100644 index f20e6533dc79..000000000000 --- a/arch/ppc/configs/adir_defconfig +++ /dev/null | |||
@@ -1,805 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | # CONFIG_EMBEDDED is not set | ||
22 | CONFIG_FUTEX=y | ||
23 | CONFIG_EPOLL=y | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | CONFIG_MODULE_UNLOAD=y | ||
30 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
31 | CONFIG_OBSOLETE_MODPARM=y | ||
32 | # CONFIG_MODVERSIONS is not set | ||
33 | CONFIG_KMOD=y | ||
34 | |||
35 | # | ||
36 | # Platform support | ||
37 | # | ||
38 | CONFIG_PPC=y | ||
39 | CONFIG_PPC32=y | ||
40 | CONFIG_6xx=y | ||
41 | # CONFIG_40x is not set | ||
42 | # CONFIG_POWER3 is not set | ||
43 | # CONFIG_8xx is not set | ||
44 | |||
45 | # | ||
46 | # IBM 4xx options | ||
47 | # | ||
48 | # CONFIG_8260 is not set | ||
49 | CONFIG_GENERIC_ISA_DMA=y | ||
50 | CONFIG_PPC_STD_MMU=y | ||
51 | # CONFIG_PPC_MULTIPLATFORM is not set | ||
52 | # CONFIG_APUS is not set | ||
53 | # CONFIG_WILLOW_2 is not set | ||
54 | # CONFIG_PCORE is not set | ||
55 | # CONFIG_POWERPMC250 is not set | ||
56 | # CONFIG_EV64260 is not set | ||
57 | # CONFIG_SPRUCE is not set | ||
58 | # CONFIG_LOPEC is not set | ||
59 | # CONFIG_MCPN765 is not set | ||
60 | # CONFIG_MVME5100 is not set | ||
61 | # CONFIG_PPLUS is not set | ||
62 | # CONFIG_PRPMC750 is not set | ||
63 | # CONFIG_PRPMC800 is not set | ||
64 | # CONFIG_SANDPOINT is not set | ||
65 | CONFIG_ADIR=y | ||
66 | # CONFIG_K2 is not set | ||
67 | # CONFIG_PAL4 is not set | ||
68 | # CONFIG_GEMINI is not set | ||
69 | # CONFIG_SMP is not set | ||
70 | # CONFIG_PREEMPT is not set | ||
71 | # CONFIG_ALTIVEC is not set | ||
72 | # CONFIG_TAU is not set | ||
73 | # CONFIG_CPU_FREQ is not set | ||
74 | |||
75 | # | ||
76 | # General setup | ||
77 | # | ||
78 | # CONFIG_HIGHMEM is not set | ||
79 | CONFIG_PCI=y | ||
80 | CONFIG_PCI_DOMAINS=y | ||
81 | CONFIG_KCORE_ELF=y | ||
82 | CONFIG_BINFMT_ELF=y | ||
83 | CONFIG_KERNEL_ELF=y | ||
84 | # CONFIG_BINFMT_MISC is not set | ||
85 | CONFIG_PCI_LEGACY_PROC=y | ||
86 | # CONFIG_PCI_NAMES is not set | ||
87 | # CONFIG_HOTPLUG is not set | ||
88 | |||
89 | # | ||
90 | # Parallel port support | ||
91 | # | ||
92 | CONFIG_PARPORT=y | ||
93 | CONFIG_PARPORT_PC=y | ||
94 | CONFIG_PARPORT_PC_CML1=y | ||
95 | # CONFIG_PARPORT_SERIAL is not set | ||
96 | CONFIG_PARPORT_PC_FIFO=y | ||
97 | CONFIG_PARPORT_PC_SUPERIO=y | ||
98 | # CONFIG_PARPORT_OTHER is not set | ||
99 | CONFIG_PARPORT_1284=y | ||
100 | # CONFIG_PPC601_SYNC_FIX is not set | ||
101 | CONFIG_CMDLINE_BOOL=y | ||
102 | CONFIG_CMDLINE="ip=on" | ||
103 | |||
104 | # | ||
105 | # Advanced setup | ||
106 | # | ||
107 | # CONFIG_ADVANCED_OPTIONS is not set | ||
108 | |||
109 | # | ||
110 | # Default settings for advanced configuration options are used | ||
111 | # | ||
112 | CONFIG_HIGHMEM_START=0xfe000000 | ||
113 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
114 | CONFIG_KERNEL_START=0xc0000000 | ||
115 | CONFIG_TASK_SIZE=0x80000000 | ||
116 | CONFIG_BOOT_LOAD=0x00800000 | ||
117 | |||
118 | # | ||
119 | # Memory Technology Devices (MTD) | ||
120 | # | ||
121 | # CONFIG_MTD is not set | ||
122 | |||
123 | # | ||
124 | # Plug and Play support | ||
125 | # | ||
126 | # CONFIG_PNP is not set | ||
127 | |||
128 | # | ||
129 | # Block devices | ||
130 | # | ||
131 | CONFIG_BLK_DEV_FD=y | ||
132 | # CONFIG_PARIDE is not set | ||
133 | # CONFIG_BLK_CPQ_DA is not set | ||
134 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
135 | # CONFIG_BLK_DEV_DAC960 is not set | ||
136 | # CONFIG_BLK_DEV_UMEM is not set | ||
137 | CONFIG_BLK_DEV_LOOP=y | ||
138 | # CONFIG_BLK_DEV_NBD is not set | ||
139 | CONFIG_BLK_DEV_RAM=y | ||
140 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
141 | CONFIG_BLK_DEV_INITRD=y | ||
142 | |||
143 | # | ||
144 | # Multi-device support (RAID and LVM) | ||
145 | # | ||
146 | # CONFIG_MD is not set | ||
147 | |||
148 | # | ||
149 | # ATA/IDE/MFM/RLL support | ||
150 | # | ||
151 | # CONFIG_IDE is not set | ||
152 | |||
153 | # | ||
154 | # SCSI support | ||
155 | # | ||
156 | CONFIG_SCSI=y | ||
157 | |||
158 | # | ||
159 | # SCSI support type (disk, tape, CD-ROM) | ||
160 | # | ||
161 | CONFIG_BLK_DEV_SD=y | ||
162 | CONFIG_CHR_DEV_ST=y | ||
163 | # CONFIG_CHR_DEV_OSST is not set | ||
164 | CONFIG_BLK_DEV_SR=y | ||
165 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
166 | CONFIG_CHR_DEV_SG=y | ||
167 | |||
168 | # | ||
169 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
170 | # | ||
171 | # CONFIG_SCSI_MULTI_LUN is not set | ||
172 | # CONFIG_SCSI_REPORT_LUNS is not set | ||
173 | CONFIG_SCSI_CONSTANTS=y | ||
174 | # CONFIG_SCSI_LOGGING is not set | ||
175 | |||
176 | # | ||
177 | # SCSI low-level drivers | ||
178 | # | ||
179 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
180 | # CONFIG_SCSI_ACARD is not set | ||
181 | # CONFIG_SCSI_AACRAID is not set | ||
182 | # CONFIG_SCSI_AIC7XXX is not set | ||
183 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
184 | # CONFIG_SCSI_AIC79XX is not set | ||
185 | # CONFIG_SCSI_DPT_I2O is not set | ||
186 | # CONFIG_SCSI_ADVANSYS is not set | ||
187 | # CONFIG_SCSI_IN2000 is not set | ||
188 | # CONFIG_SCSI_AM53C974 is not set | ||
189 | # CONFIG_SCSI_MEGARAID is not set | ||
190 | # CONFIG_SCSI_BUSLOGIC is not set | ||
191 | # CONFIG_SCSI_CPQFCTS is not set | ||
192 | # CONFIG_SCSI_DMX3191D is not set | ||
193 | # CONFIG_SCSI_EATA is not set | ||
194 | # CONFIG_SCSI_EATA_PIO is not set | ||
195 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
196 | # CONFIG_SCSI_GDTH is not set | ||
197 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | ||
198 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set | ||
199 | # CONFIG_SCSI_INITIO is not set | ||
200 | # CONFIG_SCSI_INIA100 is not set | ||
201 | # CONFIG_SCSI_PPA is not set | ||
202 | # CONFIG_SCSI_IMM is not set | ||
203 | # CONFIG_SCSI_NCR53C7xx is not set | ||
204 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
205 | CONFIG_SCSI_NCR53C8XX=y | ||
206 | CONFIG_SCSI_SYM53C8XX=y | ||
207 | CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8 | ||
208 | CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32 | ||
209 | CONFIG_SCSI_NCR53C8XX_SYNC=20 | ||
210 | # CONFIG_SCSI_NCR53C8XX_PROFILE is not set | ||
211 | # CONFIG_SCSI_NCR53C8XX_IOMAPPED is not set | ||
212 | # CONFIG_SCSI_NCR53C8XX_PQS_PDS is not set | ||
213 | # CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set | ||
214 | # CONFIG_SCSI_PCI2000 is not set | ||
215 | # CONFIG_SCSI_PCI2220I is not set | ||
216 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
217 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
218 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
219 | # CONFIG_SCSI_DC395x is not set | ||
220 | # CONFIG_SCSI_DC390T is not set | ||
221 | # CONFIG_SCSI_U14_34F is not set | ||
222 | # CONFIG_SCSI_NSP32 is not set | ||
223 | # CONFIG_SCSI_DEBUG is not set | ||
224 | |||
225 | # | ||
226 | # Fusion MPT device support | ||
227 | # | ||
228 | # CONFIG_FUSION is not set | ||
229 | |||
230 | # | ||
231 | # IEEE 1394 (FireWire) support (EXPERIMENTAL) | ||
232 | # | ||
233 | # CONFIG_IEEE1394 is not set | ||
234 | |||
235 | # | ||
236 | # I2O device support | ||
237 | # | ||
238 | # CONFIG_I2O is not set | ||
239 | |||
240 | # | ||
241 | # Networking support | ||
242 | # | ||
243 | CONFIG_NET=y | ||
244 | |||
245 | # | ||
246 | # Networking options | ||
247 | # | ||
248 | CONFIG_PACKET=y | ||
249 | # CONFIG_PACKET_MMAP is not set | ||
250 | # CONFIG_NETLINK_DEV is not set | ||
251 | CONFIG_NETFILTER=y | ||
252 | # CONFIG_NETFILTER_DEBUG is not set | ||
253 | CONFIG_UNIX=y | ||
254 | # CONFIG_NET_KEY is not set | ||
255 | CONFIG_INET=y | ||
256 | # CONFIG_IP_MULTICAST is not set | ||
257 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
258 | CONFIG_IP_PNP=y | ||
259 | CONFIG_IP_PNP_DHCP=y | ||
260 | # CONFIG_IP_PNP_BOOTP is not set | ||
261 | # CONFIG_IP_PNP_RARP is not set | ||
262 | # CONFIG_NET_IPIP is not set | ||
263 | # CONFIG_NET_IPGRE is not set | ||
264 | # CONFIG_ARPD is not set | ||
265 | # CONFIG_INET_ECN is not set | ||
266 | # CONFIG_SYN_COOKIES is not set | ||
267 | # CONFIG_INET_AH is not set | ||
268 | # CONFIG_INET_ESP is not set | ||
269 | # CONFIG_INET_IPCOMP is not set | ||
270 | |||
271 | # | ||
272 | # IP: Netfilter Configuration | ||
273 | # | ||
274 | CONFIG_IP_NF_CONNTRACK=m | ||
275 | CONFIG_IP_NF_FTP=m | ||
276 | CONFIG_IP_NF_IRC=m | ||
277 | CONFIG_IP_NF_TFTP=m | ||
278 | CONFIG_IP_NF_AMANDA=m | ||
279 | # CONFIG_IP_NF_QUEUE is not set | ||
280 | CONFIG_IP_NF_IPTABLES=m | ||
281 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
282 | CONFIG_IP_NF_MATCH_MAC=m | ||
283 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
284 | CONFIG_IP_NF_MATCH_MARK=m | ||
285 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
286 | CONFIG_IP_NF_MATCH_TOS=m | ||
287 | CONFIG_IP_NF_MATCH_ECN=m | ||
288 | CONFIG_IP_NF_MATCH_DSCP=m | ||
289 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
290 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
291 | CONFIG_IP_NF_MATCH_TTL=m | ||
292 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
293 | CONFIG_IP_NF_MATCH_HELPER=m | ||
294 | CONFIG_IP_NF_MATCH_STATE=m | ||
295 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
296 | CONFIG_IP_NF_MATCH_UNCLEAN=m | ||
297 | CONFIG_IP_NF_MATCH_OWNER=m | ||
298 | CONFIG_IP_NF_FILTER=m | ||
299 | CONFIG_IP_NF_TARGET_REJECT=m | ||
300 | CONFIG_IP_NF_TARGET_MIRROR=m | ||
301 | CONFIG_IP_NF_NAT=m | ||
302 | CONFIG_IP_NF_NAT_NEEDED=y | ||
303 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
304 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
305 | CONFIG_IP_NF_NAT_SNMP_BASIC=m | ||
306 | CONFIG_IP_NF_NAT_IRC=m | ||
307 | CONFIG_IP_NF_NAT_FTP=m | ||
308 | CONFIG_IP_NF_NAT_TFTP=m | ||
309 | CONFIG_IP_NF_NAT_AMANDA=m | ||
310 | # CONFIG_IP_NF_MANGLE is not set | ||
311 | # CONFIG_IP_NF_TARGET_LOG is not set | ||
312 | # CONFIG_IP_NF_TARGET_ULOG is not set | ||
313 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
314 | CONFIG_IP_NF_ARPTABLES=m | ||
315 | CONFIG_IP_NF_ARPFILTER=m | ||
316 | CONFIG_IP_NF_COMPAT_IPCHAINS=m | ||
317 | # CONFIG_IP_NF_COMPAT_IPFWADM is not set | ||
318 | # CONFIG_IPV6 is not set | ||
319 | # CONFIG_XFRM_USER is not set | ||
320 | |||
321 | # | ||
322 | # SCTP Configuration (EXPERIMENTAL) | ||
323 | # | ||
324 | CONFIG_IPV6_SCTP__=y | ||
325 | # CONFIG_IP_SCTP is not set | ||
326 | # CONFIG_ATM is not set | ||
327 | # CONFIG_VLAN_8021Q is not set | ||
328 | # CONFIG_LLC is not set | ||
329 | # CONFIG_DECNET is not set | ||
330 | # CONFIG_BRIDGE is not set | ||
331 | # CONFIG_X25 is not set | ||
332 | # CONFIG_LAPB is not set | ||
333 | # CONFIG_NET_DIVERT is not set | ||
334 | # CONFIG_ECONET is not set | ||
335 | # CONFIG_WAN_ROUTER is not set | ||
336 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
337 | |||
338 | # | ||
339 | # QoS and/or fair queueing | ||
340 | # | ||
341 | # CONFIG_NET_SCHED is not set | ||
342 | |||
343 | # | ||
344 | # Network testing | ||
345 | # | ||
346 | # CONFIG_NET_PKTGEN is not set | ||
347 | CONFIG_NETDEVICES=y | ||
348 | |||
349 | # | ||
350 | # ARCnet devices | ||
351 | # | ||
352 | # CONFIG_ARCNET is not set | ||
353 | # CONFIG_DUMMY is not set | ||
354 | # CONFIG_BONDING is not set | ||
355 | # CONFIG_EQUALIZER is not set | ||
356 | # CONFIG_TUN is not set | ||
357 | # CONFIG_ETHERTAP is not set | ||
358 | |||
359 | # | ||
360 | # Ethernet (10 or 100Mbit) | ||
361 | # | ||
362 | CONFIG_NET_ETHERNET=y | ||
363 | CONFIG_MII=y | ||
364 | # CONFIG_OAKNET is not set | ||
365 | # CONFIG_HAPPYMEAL is not set | ||
366 | # CONFIG_SUNGEM is not set | ||
367 | # CONFIG_NET_VENDOR_3COM is not set | ||
368 | |||
369 | # | ||
370 | # Tulip family network device support | ||
371 | # | ||
372 | # CONFIG_NET_TULIP is not set | ||
373 | # CONFIG_HP100 is not set | ||
374 | CONFIG_NET_PCI=y | ||
375 | # CONFIG_PCNET32 is not set | ||
376 | # CONFIG_AMD8111_ETH is not set | ||
377 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
378 | # CONFIG_B44 is not set | ||
379 | # CONFIG_DGRS is not set | ||
380 | CONFIG_EEPRO100=y | ||
381 | # CONFIG_EEPRO100_PIO is not set | ||
382 | # CONFIG_E100 is not set | ||
383 | # CONFIG_FEALNX is not set | ||
384 | # CONFIG_NATSEMI is not set | ||
385 | # CONFIG_NE2K_PCI is not set | ||
386 | # CONFIG_8139CP is not set | ||
387 | # CONFIG_8139TOO is not set | ||
388 | # CONFIG_SIS900 is not set | ||
389 | # CONFIG_EPIC100 is not set | ||
390 | # CONFIG_SUNDANCE is not set | ||
391 | # CONFIG_TLAN is not set | ||
392 | # CONFIG_VIA_RHINE is not set | ||
393 | |||
394 | # | ||
395 | # Ethernet (1000 Mbit) | ||
396 | # | ||
397 | # CONFIG_ACENIC is not set | ||
398 | # CONFIG_DL2K is not set | ||
399 | # CONFIG_E1000 is not set | ||
400 | # CONFIG_NS83820 is not set | ||
401 | # CONFIG_HAMACHI is not set | ||
402 | # CONFIG_YELLOWFIN is not set | ||
403 | # CONFIG_R8169 is not set | ||
404 | # CONFIG_SK98LIN is not set | ||
405 | # CONFIG_TIGON3 is not set | ||
406 | |||
407 | # | ||
408 | # Ethernet (10000 Mbit) | ||
409 | # | ||
410 | # CONFIG_IXGB is not set | ||
411 | # CONFIG_FDDI is not set | ||
412 | # CONFIG_HIPPI is not set | ||
413 | # CONFIG_PLIP is not set | ||
414 | # CONFIG_PPP is not set | ||
415 | # CONFIG_SLIP is not set | ||
416 | |||
417 | # | ||
418 | # Wireless LAN (non-hamradio) | ||
419 | # | ||
420 | # CONFIG_NET_RADIO is not set | ||
421 | |||
422 | # | ||
423 | # Token Ring devices (depends on LLC=y) | ||
424 | # | ||
425 | # CONFIG_NET_FC is not set | ||
426 | # CONFIG_RCPCI is not set | ||
427 | # CONFIG_SHAPER is not set | ||
428 | |||
429 | # | ||
430 | # Wan interfaces | ||
431 | # | ||
432 | # CONFIG_WAN is not set | ||
433 | |||
434 | # | ||
435 | # Amateur Radio support | ||
436 | # | ||
437 | # CONFIG_HAMRADIO is not set | ||
438 | |||
439 | # | ||
440 | # IrDA (infrared) support | ||
441 | # | ||
442 | # CONFIG_IRDA is not set | ||
443 | |||
444 | # | ||
445 | # ISDN subsystem | ||
446 | # | ||
447 | # CONFIG_ISDN_BOOL is not set | ||
448 | |||
449 | # | ||
450 | # Graphics support | ||
451 | # | ||
452 | # CONFIG_FB is not set | ||
453 | |||
454 | # | ||
455 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
456 | # | ||
457 | # CONFIG_CD_NO_IDESCSI is not set | ||
458 | |||
459 | # | ||
460 | # Input device support | ||
461 | # | ||
462 | # CONFIG_INPUT is not set | ||
463 | |||
464 | # | ||
465 | # Userland interfaces | ||
466 | # | ||
467 | |||
468 | # | ||
469 | # Input I/O drivers | ||
470 | # | ||
471 | # CONFIG_GAMEPORT is not set | ||
472 | CONFIG_SOUND_GAMEPORT=y | ||
473 | # CONFIG_SERIO is not set | ||
474 | |||
475 | # | ||
476 | # Input Device Drivers | ||
477 | # | ||
478 | |||
479 | # | ||
480 | # Macintosh device drivers | ||
481 | # | ||
482 | |||
483 | # | ||
484 | # Character devices | ||
485 | # | ||
486 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
487 | |||
488 | # | ||
489 | # Serial drivers | ||
490 | # | ||
491 | CONFIG_SERIAL_8250=y | ||
492 | CONFIG_SERIAL_8250_CONSOLE=y | ||
493 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
494 | |||
495 | # | ||
496 | # Non-8250 serial port support | ||
497 | # | ||
498 | CONFIG_SERIAL_CORE=y | ||
499 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
500 | CONFIG_UNIX98_PTYS=y | ||
501 | CONFIG_UNIX98_PTY_COUNT=256 | ||
502 | # CONFIG_PRINTER is not set | ||
503 | # CONFIG_PPDEV is not set | ||
504 | # CONFIG_TIPAR is not set | ||
505 | |||
506 | # | ||
507 | # I2C support | ||
508 | # | ||
509 | # CONFIG_I2C is not set | ||
510 | |||
511 | # | ||
512 | # I2C Hardware Sensors Mainboard support | ||
513 | # | ||
514 | |||
515 | # | ||
516 | # I2C Hardware Sensors Chip support | ||
517 | # | ||
518 | # CONFIG_I2C_SENSOR is not set | ||
519 | |||
520 | # | ||
521 | # Mice | ||
522 | # | ||
523 | # CONFIG_BUSMOUSE is not set | ||
524 | # CONFIG_QIC02_TAPE is not set | ||
525 | |||
526 | # | ||
527 | # IPMI | ||
528 | # | ||
529 | # CONFIG_IPMI_HANDLER is not set | ||
530 | |||
531 | # | ||
532 | # Watchdog Cards | ||
533 | # | ||
534 | # CONFIG_WATCHDOG is not set | ||
535 | # CONFIG_NVRAM is not set | ||
536 | CONFIG_GEN_RTC=y | ||
537 | # CONFIG_GEN_RTC_X is not set | ||
538 | # CONFIG_DTLK is not set | ||
539 | # CONFIG_R3964 is not set | ||
540 | # CONFIG_APPLICOM is not set | ||
541 | |||
542 | # | ||
543 | # Ftape, the floppy tape device driver | ||
544 | # | ||
545 | # CONFIG_FTAPE is not set | ||
546 | # CONFIG_AGP is not set | ||
547 | # CONFIG_DRM is not set | ||
548 | # CONFIG_RAW_DRIVER is not set | ||
549 | # CONFIG_HANGCHECK_TIMER is not set | ||
550 | |||
551 | # | ||
552 | # Multimedia devices | ||
553 | # | ||
554 | # CONFIG_VIDEO_DEV is not set | ||
555 | |||
556 | # | ||
557 | # Digital Video Broadcasting Devices | ||
558 | # | ||
559 | # CONFIG_DVB is not set | ||
560 | |||
561 | # | ||
562 | # File systems | ||
563 | # | ||
564 | CONFIG_EXT2_FS=y | ||
565 | # CONFIG_EXT2_FS_XATTR is not set | ||
566 | CONFIG_EXT3_FS=y | ||
567 | CONFIG_EXT3_FS_XATTR=y | ||
568 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
569 | # CONFIG_EXT3_FS_SECURITY is not set | ||
570 | CONFIG_JBD=y | ||
571 | # CONFIG_JBD_DEBUG is not set | ||
572 | CONFIG_FS_MBCACHE=y | ||
573 | # CONFIG_REISERFS_FS is not set | ||
574 | # CONFIG_JFS_FS is not set | ||
575 | # CONFIG_XFS_FS is not set | ||
576 | # CONFIG_MINIX_FS is not set | ||
577 | # CONFIG_ROMFS_FS is not set | ||
578 | # CONFIG_QUOTA is not set | ||
579 | # CONFIG_AUTOFS_FS is not set | ||
580 | # CONFIG_AUTOFS4_FS is not set | ||
581 | |||
582 | # | ||
583 | # CD-ROM/DVD Filesystems | ||
584 | # | ||
585 | # CONFIG_ISO9660_FS is not set | ||
586 | # CONFIG_UDF_FS is not set | ||
587 | |||
588 | # | ||
589 | # DOS/FAT/NT Filesystems | ||
590 | # | ||
591 | # CONFIG_FAT_FS is not set | ||
592 | # CONFIG_NTFS_FS is not set | ||
593 | |||
594 | # | ||
595 | # Pseudo filesystems | ||
596 | # | ||
597 | CONFIG_PROC_FS=y | ||
598 | # CONFIG_DEVFS_FS is not set | ||
599 | CONFIG_DEVPTS_FS=y | ||
600 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
601 | CONFIG_TMPFS=y | ||
602 | CONFIG_RAMFS=y | ||
603 | |||
604 | # | ||
605 | # Miscellaneous filesystems | ||
606 | # | ||
607 | # CONFIG_ADFS_FS is not set | ||
608 | # CONFIG_AFFS_FS is not set | ||
609 | # CONFIG_HFS_FS is not set | ||
610 | # CONFIG_BEFS_FS is not set | ||
611 | # CONFIG_BFS_FS is not set | ||
612 | # CONFIG_EFS_FS is not set | ||
613 | # CONFIG_CRAMFS is not set | ||
614 | # CONFIG_VXFS_FS is not set | ||
615 | # CONFIG_HPFS_FS is not set | ||
616 | # CONFIG_QNX4FS_FS is not set | ||
617 | # CONFIG_SYSV_FS is not set | ||
618 | # CONFIG_UFS_FS is not set | ||
619 | |||
620 | # | ||
621 | # Network File Systems | ||
622 | # | ||
623 | CONFIG_NFS_FS=y | ||
624 | # CONFIG_NFS_V3 is not set | ||
625 | # CONFIG_NFS_V4 is not set | ||
626 | # CONFIG_NFSD is not set | ||
627 | CONFIG_ROOT_NFS=y | ||
628 | CONFIG_LOCKD=y | ||
629 | # CONFIG_EXPORTFS is not set | ||
630 | CONFIG_SUNRPC=y | ||
631 | # CONFIG_SUNRPC_GSS is not set | ||
632 | # CONFIG_SMB_FS is not set | ||
633 | # CONFIG_CIFS is not set | ||
634 | # CONFIG_NCP_FS is not set | ||
635 | # CONFIG_CODA_FS is not set | ||
636 | # CONFIG_INTERMEZZO_FS is not set | ||
637 | # CONFIG_AFS_FS is not set | ||
638 | |||
639 | # | ||
640 | # Partition Types | ||
641 | # | ||
642 | # CONFIG_PARTITION_ADVANCED is not set | ||
643 | CONFIG_MSDOS_PARTITION=y | ||
644 | |||
645 | # | ||
646 | # Sound | ||
647 | # | ||
648 | # CONFIG_SOUND is not set | ||
649 | |||
650 | # | ||
651 | # USB support | ||
652 | # | ||
653 | CONFIG_USB=y | ||
654 | # CONFIG_USB_DEBUG is not set | ||
655 | |||
656 | # | ||
657 | # Miscellaneous USB options | ||
658 | # | ||
659 | CONFIG_USB_DEVICEFS=y | ||
660 | # CONFIG_USB_BANDWIDTH is not set | ||
661 | CONFIG_USB_DYNAMIC_MINORS=y | ||
662 | |||
663 | # | ||
664 | # USB Host Controller Drivers | ||
665 | # | ||
666 | # CONFIG_USB_EHCI_HCD is not set | ||
667 | CONFIG_USB_OHCI_HCD=y | ||
668 | # CONFIG_USB_UHCI_HCD is not set | ||
669 | |||
670 | # | ||
671 | # USB Device Class drivers | ||
672 | # | ||
673 | # CONFIG_USB_BLUETOOTH_TTY is not set | ||
674 | CONFIG_USB_ACM=m | ||
675 | # CONFIG_USB_PRINTER is not set | ||
676 | CONFIG_USB_STORAGE=m | ||
677 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
678 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
679 | CONFIG_USB_STORAGE_FREECOM=y | ||
680 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
681 | CONFIG_USB_STORAGE_DPCM=y | ||
682 | # CONFIG_USB_STORAGE_HP8200e is not set | ||
683 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
684 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
685 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
686 | |||
687 | # | ||
688 | # USB Human Interface Devices (HID) | ||
689 | # | ||
690 | CONFIG_USB_HID=m | ||
691 | |||
692 | # | ||
693 | # Input core support is needed for USB HID input layer or HIDBP support | ||
694 | # | ||
695 | CONFIG_USB_HIDDEV=y | ||
696 | |||
697 | # | ||
698 | # USB HID Boot Protocol drivers | ||
699 | # | ||
700 | |||
701 | # | ||
702 | # USB Imaging devices | ||
703 | # | ||
704 | # CONFIG_USB_MDC800 is not set | ||
705 | # CONFIG_USB_SCANNER is not set | ||
706 | # CONFIG_USB_MICROTEK is not set | ||
707 | # CONFIG_USB_HPUSBSCSI is not set | ||
708 | |||
709 | # | ||
710 | # USB Multimedia devices | ||
711 | # | ||
712 | # CONFIG_USB_DABUSB is not set | ||
713 | |||
714 | # | ||
715 | # Video4Linux support is needed for USB Multimedia device support | ||
716 | # | ||
717 | |||
718 | # | ||
719 | # USB Network adaptors | ||
720 | # | ||
721 | # CONFIG_USB_CATC is not set | ||
722 | # CONFIG_USB_KAWETH is not set | ||
723 | # CONFIG_USB_PEGASUS is not set | ||
724 | # CONFIG_USB_RTL8150 is not set | ||
725 | # CONFIG_USB_USBNET is not set | ||
726 | |||
727 | # | ||
728 | # USB port drivers | ||
729 | # | ||
730 | # CONFIG_USB_USS720 is not set | ||
731 | |||
732 | # | ||
733 | # USB Serial Converter support | ||
734 | # | ||
735 | CONFIG_USB_SERIAL=m | ||
736 | # CONFIG_USB_SERIAL_GENERIC is not set | ||
737 | # CONFIG_USB_SERIAL_BELKIN is not set | ||
738 | # CONFIG_USB_SERIAL_WHITEHEAT is not set | ||
739 | # CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set | ||
740 | # CONFIG_USB_SERIAL_EMPEG is not set | ||
741 | # CONFIG_USB_SERIAL_FTDI_SIO is not set | ||
742 | CONFIG_USB_SERIAL_VISOR=m | ||
743 | # CONFIG_USB_SERIAL_IPAQ is not set | ||
744 | # CONFIG_USB_SERIAL_IR is not set | ||
745 | # CONFIG_USB_SERIAL_EDGEPORT is not set | ||
746 | # CONFIG_USB_SERIAL_EDGEPORT_TI is not set | ||
747 | # CONFIG_USB_SERIAL_KEYSPAN_PDA is not set | ||
748 | CONFIG_USB_SERIAL_KEYSPAN=m | ||
749 | # CONFIG_USB_SERIAL_KEYSPAN_MPR is not set | ||
750 | CONFIG_USB_SERIAL_KEYSPAN_USA28=y | ||
751 | CONFIG_USB_SERIAL_KEYSPAN_USA28X=y | ||
752 | # CONFIG_USB_SERIAL_KEYSPAN_USA28XA is not set | ||
753 | # CONFIG_USB_SERIAL_KEYSPAN_USA28XB is not set | ||
754 | CONFIG_USB_SERIAL_KEYSPAN_USA19=y | ||
755 | CONFIG_USB_SERIAL_KEYSPAN_USA18X=y | ||
756 | CONFIG_USB_SERIAL_KEYSPAN_USA19W=y | ||
757 | CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y | ||
758 | CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y | ||
759 | CONFIG_USB_SERIAL_KEYSPAN_USA49W=y | ||
760 | # CONFIG_USB_SERIAL_KEYSPAN_USA49WLC is not set | ||
761 | # CONFIG_USB_SERIAL_KLSI is not set | ||
762 | # CONFIG_USB_SERIAL_KOBIL_SCT is not set | ||
763 | # CONFIG_USB_SERIAL_MCT_U232 is not set | ||
764 | # CONFIG_USB_SERIAL_PL2303 is not set | ||
765 | # CONFIG_USB_SERIAL_SAFE is not set | ||
766 | # CONFIG_USB_SERIAL_CYBERJACK is not set | ||
767 | # CONFIG_USB_SERIAL_XIRCOM is not set | ||
768 | # CONFIG_USB_SERIAL_OMNINET is not set | ||
769 | CONFIG_USB_EZUSB=y | ||
770 | |||
771 | # | ||
772 | # USB Miscellaneous drivers | ||
773 | # | ||
774 | # CONFIG_USB_TIGL is not set | ||
775 | # CONFIG_USB_AUERSWALD is not set | ||
776 | # CONFIG_USB_RIO500 is not set | ||
777 | # CONFIG_USB_LCD is not set | ||
778 | # CONFIG_USB_TEST is not set | ||
779 | # CONFIG_USB_GADGET is not set | ||
780 | |||
781 | # | ||
782 | # Bluetooth support | ||
783 | # | ||
784 | # CONFIG_BT is not set | ||
785 | |||
786 | # | ||
787 | # Library routines | ||
788 | # | ||
789 | # CONFIG_CRC32 is not set | ||
790 | |||
791 | # | ||
792 | # Kernel hacking | ||
793 | # | ||
794 | # CONFIG_DEBUG_KERNEL is not set | ||
795 | # CONFIG_KALLSYMS is not set | ||
796 | |||
797 | # | ||
798 | # Security options | ||
799 | # | ||
800 | # CONFIG_SECURITY is not set | ||
801 | |||
802 | # | ||
803 | # Cryptographic options | ||
804 | # | ||
805 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/ash_defconfig b/arch/ppc/configs/ash_defconfig deleted file mode 100644 index c4a73cc16cf6..000000000000 --- a/arch/ppc/configs/ash_defconfig +++ /dev/null | |||
@@ -1,666 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | CONFIG_PPC=y | ||
8 | CONFIG_PPC32=y | ||
9 | CONFIG_GENERIC_NVRAM=y | ||
10 | |||
11 | # | ||
12 | # Code maturity level options | ||
13 | # | ||
14 | CONFIG_EXPERIMENTAL=y | ||
15 | CONFIG_CLEAN_COMPILE=y | ||
16 | CONFIG_STANDALONE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | |||
19 | # | ||
20 | # General setup | ||
21 | # | ||
22 | CONFIG_SWAP=y | ||
23 | CONFIG_SYSVIPC=y | ||
24 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
25 | CONFIG_SYSCTL=y | ||
26 | CONFIG_LOG_BUF_SHIFT=14 | ||
27 | # CONFIG_HOTPLUG is not set | ||
28 | # CONFIG_IKCONFIG is not set | ||
29 | CONFIG_EMBEDDED=y | ||
30 | # CONFIG_KALLSYMS is not set | ||
31 | CONFIG_FUTEX=y | ||
32 | # CONFIG_EPOLL is not set | ||
33 | CONFIG_IOSCHED_NOOP=y | ||
34 | CONFIG_IOSCHED_AS=y | ||
35 | CONFIG_IOSCHED_DEADLINE=y | ||
36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
37 | |||
38 | # | ||
39 | # Loadable module support | ||
40 | # | ||
41 | CONFIG_MODULES=y | ||
42 | CONFIG_MODULE_UNLOAD=y | ||
43 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
44 | CONFIG_OBSOLETE_MODPARM=y | ||
45 | # CONFIG_MODVERSIONS is not set | ||
46 | CONFIG_KMOD=y | ||
47 | |||
48 | # | ||
49 | # Processor | ||
50 | # | ||
51 | # CONFIG_6xx is not set | ||
52 | CONFIG_40x=y | ||
53 | # CONFIG_44x is not set | ||
54 | # CONFIG_POWER3 is not set | ||
55 | # CONFIG_POWER4 is not set | ||
56 | # CONFIG_8xx is not set | ||
57 | # CONFIG_MATH_EMULATION is not set | ||
58 | # CONFIG_CPU_FREQ is not set | ||
59 | CONFIG_4xx=y | ||
60 | |||
61 | # | ||
62 | # IBM 4xx options | ||
63 | # | ||
64 | CONFIG_ASH=y | ||
65 | # CONFIG_CPCI405 is not set | ||
66 | # CONFIG_EP405 is not set | ||
67 | # CONFIG_EVB405EP is not set | ||
68 | # CONFIG_OAK is not set | ||
69 | # CONFIG_REDWOOD_5 is not set | ||
70 | # CONFIG_REDWOOD_6 is not set | ||
71 | # CONFIG_SYCAMORE is not set | ||
72 | # CONFIG_WALNUT is not set | ||
73 | CONFIG_NP405H=y | ||
74 | CONFIG_IBM405_ERR77=y | ||
75 | CONFIG_IBM405_ERR51=y | ||
76 | CONFIG_IBM_OCP=y | ||
77 | CONFIG_PPC_OCP=y | ||
78 | CONFIG_IBM_OPENBIOS=y | ||
79 | # CONFIG_PM is not set | ||
80 | CONFIG_UART0_TTYS0=y | ||
81 | # CONFIG_UART0_TTYS1 is not set | ||
82 | CONFIG_NOT_COHERENT_CACHE=y | ||
83 | |||
84 | # | ||
85 | # Platform options | ||
86 | # | ||
87 | # CONFIG_PC_KEYBOARD is not set | ||
88 | # CONFIG_SMP is not set | ||
89 | # CONFIG_PREEMPT is not set | ||
90 | # CONFIG_HIGHMEM is not set | ||
91 | CONFIG_KERNEL_ELF=y | ||
92 | CONFIG_BINFMT_ELF=y | ||
93 | # CONFIG_BINFMT_MISC is not set | ||
94 | CONFIG_CMDLINE_BOOL=y | ||
95 | CONFIG_CMDLINE="ip=on" | ||
96 | |||
97 | # | ||
98 | # Bus options | ||
99 | # | ||
100 | CONFIG_PCI=y | ||
101 | CONFIG_PCI_DOMAINS=y | ||
102 | CONFIG_PCI_LEGACY_PROC=y | ||
103 | # CONFIG_PCI_NAMES is not set | ||
104 | |||
105 | # | ||
106 | # Advanced setup | ||
107 | # | ||
108 | # CONFIG_ADVANCED_OPTIONS is not set | ||
109 | |||
110 | # | ||
111 | # Default settings for advanced configuration options are used | ||
112 | # | ||
113 | CONFIG_HIGHMEM_START=0xfe000000 | ||
114 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
115 | CONFIG_KERNEL_START=0xc0000000 | ||
116 | CONFIG_TASK_SIZE=0x80000000 | ||
117 | CONFIG_BOOT_LOAD=0x00400000 | ||
118 | |||
119 | # | ||
120 | # Device Drivers | ||
121 | # | ||
122 | |||
123 | # | ||
124 | # Generic Driver Options | ||
125 | # | ||
126 | |||
127 | # | ||
128 | # Memory Technology Devices (MTD) | ||
129 | # | ||
130 | # CONFIG_MTD is not set | ||
131 | |||
132 | # | ||
133 | # Parallel port support | ||
134 | # | ||
135 | # CONFIG_PARPORT is not set | ||
136 | |||
137 | # | ||
138 | # Plug and Play support | ||
139 | # | ||
140 | |||
141 | # | ||
142 | # Block devices | ||
143 | # | ||
144 | # CONFIG_BLK_DEV_FD is not set | ||
145 | # CONFIG_BLK_CPQ_DA is not set | ||
146 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
147 | # CONFIG_BLK_DEV_DAC960 is not set | ||
148 | # CONFIG_BLK_DEV_UMEM is not set | ||
149 | CONFIG_BLK_DEV_LOOP=y | ||
150 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
151 | # CONFIG_BLK_DEV_NBD is not set | ||
152 | # CONFIG_BLK_DEV_CARMEL is not set | ||
153 | CONFIG_BLK_DEV_RAM=y | ||
154 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
155 | CONFIG_BLK_DEV_INITRD=y | ||
156 | # CONFIG_LBD is not set | ||
157 | |||
158 | # | ||
159 | # ATA/ATAPI/MFM/RLL support | ||
160 | # | ||
161 | # CONFIG_IDE is not set | ||
162 | |||
163 | # | ||
164 | # SCSI device support | ||
165 | # | ||
166 | # CONFIG_SCSI is not set | ||
167 | |||
168 | # | ||
169 | # Multi-device support (RAID and LVM) | ||
170 | # | ||
171 | # CONFIG_MD is not set | ||
172 | |||
173 | # | ||
174 | # Fusion MPT device support | ||
175 | # | ||
176 | # CONFIG_FUSION is not set | ||
177 | |||
178 | # | ||
179 | # IEEE 1394 (FireWire) support | ||
180 | # | ||
181 | # CONFIG_IEEE1394 is not set | ||
182 | |||
183 | # | ||
184 | # I2O device support | ||
185 | # | ||
186 | # CONFIG_I2O is not set | ||
187 | |||
188 | # | ||
189 | # Macintosh device drivers | ||
190 | # | ||
191 | |||
192 | # | ||
193 | # Networking support | ||
194 | # | ||
195 | CONFIG_NET=y | ||
196 | |||
197 | # | ||
198 | # Networking options | ||
199 | # | ||
200 | # CONFIG_PACKET is not set | ||
201 | # CONFIG_NETLINK_DEV is not set | ||
202 | CONFIG_UNIX=y | ||
203 | # CONFIG_NET_KEY is not set | ||
204 | CONFIG_INET=y | ||
205 | CONFIG_IP_MULTICAST=y | ||
206 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
207 | CONFIG_IP_PNP=y | ||
208 | # CONFIG_IP_PNP_DHCP is not set | ||
209 | CONFIG_IP_PNP_BOOTP=y | ||
210 | # CONFIG_IP_PNP_RARP is not set | ||
211 | # CONFIG_NET_IPIP is not set | ||
212 | # CONFIG_NET_IPGRE is not set | ||
213 | # CONFIG_IP_MROUTE is not set | ||
214 | # CONFIG_ARPD is not set | ||
215 | CONFIG_SYN_COOKIES=y | ||
216 | # CONFIG_INET_AH is not set | ||
217 | # CONFIG_INET_ESP is not set | ||
218 | # CONFIG_INET_IPCOMP is not set | ||
219 | # CONFIG_IPV6 is not set | ||
220 | # CONFIG_DECNET is not set | ||
221 | # CONFIG_BRIDGE is not set | ||
222 | # CONFIG_NETFILTER is not set | ||
223 | |||
224 | # | ||
225 | # SCTP Configuration (EXPERIMENTAL) | ||
226 | # | ||
227 | # CONFIG_IP_SCTP is not set | ||
228 | # CONFIG_ATM is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_LLC2 is not set | ||
231 | # CONFIG_IPX is not set | ||
232 | # CONFIG_ATALK is not set | ||
233 | # CONFIG_X25 is not set | ||
234 | # CONFIG_LAPB is not set | ||
235 | # CONFIG_NET_DIVERT is not set | ||
236 | # CONFIG_ECONET is not set | ||
237 | # CONFIG_WAN_ROUTER is not set | ||
238 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
239 | |||
240 | # | ||
241 | # QoS and/or fair queueing | ||
242 | # | ||
243 | # CONFIG_NET_SCHED is not set | ||
244 | |||
245 | # | ||
246 | # Network testing | ||
247 | # | ||
248 | # CONFIG_NET_PKTGEN is not set | ||
249 | CONFIG_NETDEVICES=y | ||
250 | |||
251 | # | ||
252 | # ARCnet devices | ||
253 | # | ||
254 | # CONFIG_ARCNET is not set | ||
255 | # CONFIG_DUMMY is not set | ||
256 | # CONFIG_BONDING is not set | ||
257 | # CONFIG_EQUALIZER is not set | ||
258 | # CONFIG_TUN is not set | ||
259 | |||
260 | # | ||
261 | # Ethernet (10 or 100Mbit) | ||
262 | # | ||
263 | # CONFIG_NET_ETHERNET is not set | ||
264 | |||
265 | # | ||
266 | # Ethernet (1000 Mbit) | ||
267 | # | ||
268 | # CONFIG_ACENIC is not set | ||
269 | # CONFIG_DL2K is not set | ||
270 | # CONFIG_E1000 is not set | ||
271 | # CONFIG_NS83820 is not set | ||
272 | # CONFIG_HAMACHI is not set | ||
273 | # CONFIG_YELLOWFIN is not set | ||
274 | # CONFIG_R8169 is not set | ||
275 | # CONFIG_SIS190 is not set | ||
276 | # CONFIG_SK98LIN is not set | ||
277 | # CONFIG_TIGON3 is not set | ||
278 | |||
279 | # | ||
280 | # Ethernet (10000 Mbit) | ||
281 | # | ||
282 | # CONFIG_IXGB is not set | ||
283 | CONFIG_IBM_EMAC=y | ||
284 | # CONFIG_IBM_EMAC_ERRMSG is not set | ||
285 | CONFIG_IBM_EMAC_RXB=64 | ||
286 | CONFIG_IBM_EMAC_TXB=8 | ||
287 | CONFIG_IBM_EMAC_FGAP=8 | ||
288 | CONFIG_IBM_EMAC_SKBRES=0 | ||
289 | # CONFIG_FDDI is not set | ||
290 | # CONFIG_HIPPI is not set | ||
291 | # CONFIG_PPP is not set | ||
292 | # CONFIG_SLIP is not set | ||
293 | |||
294 | # | ||
295 | # Wireless LAN (non-hamradio) | ||
296 | # | ||
297 | # CONFIG_NET_RADIO is not set | ||
298 | |||
299 | # | ||
300 | # Token Ring devices | ||
301 | # | ||
302 | # CONFIG_TR is not set | ||
303 | # CONFIG_RCPCI is not set | ||
304 | # CONFIG_SHAPER is not set | ||
305 | # CONFIG_NETCONSOLE is not set | ||
306 | |||
307 | # | ||
308 | # Wan interfaces | ||
309 | # | ||
310 | # CONFIG_WAN is not set | ||
311 | |||
312 | # | ||
313 | # Amateur Radio support | ||
314 | # | ||
315 | # CONFIG_HAMRADIO is not set | ||
316 | |||
317 | # | ||
318 | # IrDA (infrared) support | ||
319 | # | ||
320 | # CONFIG_IRDA is not set | ||
321 | |||
322 | # | ||
323 | # Bluetooth support | ||
324 | # | ||
325 | # CONFIG_BT is not set | ||
326 | # CONFIG_NETPOLL is not set | ||
327 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
328 | |||
329 | # | ||
330 | # ISDN subsystem | ||
331 | # | ||
332 | # CONFIG_ISDN is not set | ||
333 | |||
334 | # | ||
335 | # Telephony Support | ||
336 | # | ||
337 | # CONFIG_PHONE is not set | ||
338 | |||
339 | # | ||
340 | # Input device support | ||
341 | # | ||
342 | CONFIG_INPUT=y | ||
343 | |||
344 | # | ||
345 | # Userland interfaces | ||
346 | # | ||
347 | CONFIG_INPUT_MOUSEDEV=y | ||
348 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
349 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
350 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
351 | # CONFIG_INPUT_JOYDEV is not set | ||
352 | # CONFIG_INPUT_TSDEV is not set | ||
353 | # CONFIG_INPUT_EVDEV is not set | ||
354 | # CONFIG_INPUT_EVBUG is not set | ||
355 | |||
356 | # | ||
357 | # Input I/O drivers | ||
358 | # | ||
359 | # CONFIG_GAMEPORT is not set | ||
360 | CONFIG_SOUND_GAMEPORT=y | ||
361 | CONFIG_SERIO=y | ||
362 | CONFIG_SERIO_I8042=y | ||
363 | CONFIG_SERIO_SERPORT=y | ||
364 | # CONFIG_SERIO_CT82C710 is not set | ||
365 | # CONFIG_SERIO_PCIPS2 is not set | ||
366 | |||
367 | # | ||
368 | # Input Device Drivers | ||
369 | # | ||
370 | CONFIG_INPUT_KEYBOARD=y | ||
371 | CONFIG_KEYBOARD_ATKBD=y | ||
372 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
373 | # CONFIG_KEYBOARD_LKKBD is not set | ||
374 | # CONFIG_KEYBOARD_XTKBD is not set | ||
375 | # CONFIG_KEYBOARD_NEWTON is not set | ||
376 | CONFIG_INPUT_MOUSE=y | ||
377 | CONFIG_MOUSE_PS2=y | ||
378 | # CONFIG_MOUSE_SERIAL is not set | ||
379 | # CONFIG_MOUSE_VSXXXAA is not set | ||
380 | # CONFIG_INPUT_JOYSTICK is not set | ||
381 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
382 | # CONFIG_INPUT_MISC is not set | ||
383 | |||
384 | # | ||
385 | # Character devices | ||
386 | # | ||
387 | # CONFIG_VT is not set | ||
388 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
389 | |||
390 | # | ||
391 | # Serial drivers | ||
392 | # | ||
393 | CONFIG_SERIAL_8250=y | ||
394 | CONFIG_SERIAL_8250_CONSOLE=y | ||
395 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
396 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
397 | |||
398 | # | ||
399 | # Non-8250 serial port support | ||
400 | # | ||
401 | CONFIG_SERIAL_CORE=y | ||
402 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
403 | CONFIG_UNIX98_PTYS=y | ||
404 | CONFIG_LEGACY_PTYS=y | ||
405 | CONFIG_LEGACY_PTY_COUNT=256 | ||
406 | # CONFIG_QIC02_TAPE is not set | ||
407 | |||
408 | # | ||
409 | # IPMI | ||
410 | # | ||
411 | # CONFIG_IPMI_HANDLER is not set | ||
412 | |||
413 | # | ||
414 | # Watchdog Cards | ||
415 | # | ||
416 | CONFIG_WATCHDOG=y | ||
417 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
418 | |||
419 | # | ||
420 | # Watchdog Device Drivers | ||
421 | # | ||
422 | # CONFIG_SOFT_WATCHDOG is not set | ||
423 | |||
424 | # | ||
425 | # PCI-based Watchdog Cards | ||
426 | # | ||
427 | # CONFIG_PCIPCWATCHDOG is not set | ||
428 | # CONFIG_WDTPCI is not set | ||
429 | # CONFIG_NVRAM is not set | ||
430 | CONFIG_GEN_RTC=y | ||
431 | # CONFIG_GEN_RTC_X is not set | ||
432 | # CONFIG_DTLK is not set | ||
433 | # CONFIG_R3964 is not set | ||
434 | # CONFIG_APPLICOM is not set | ||
435 | |||
436 | # | ||
437 | # Ftape, the floppy tape device driver | ||
438 | # | ||
439 | # CONFIG_FTAPE is not set | ||
440 | # CONFIG_AGP is not set | ||
441 | # CONFIG_DRM is not set | ||
442 | # CONFIG_RAW_DRIVER is not set | ||
443 | |||
444 | # | ||
445 | # I2C support | ||
446 | # | ||
447 | CONFIG_I2C=y | ||
448 | # CONFIG_I2C_CHARDEV is not set | ||
449 | |||
450 | # | ||
451 | # I2C Algorithms | ||
452 | # | ||
453 | # CONFIG_I2C_ALGOBIT is not set | ||
454 | # CONFIG_I2C_ALGOPCF is not set | ||
455 | |||
456 | # | ||
457 | # I2C Hardware Bus support | ||
458 | # | ||
459 | # CONFIG_I2C_ALI1535 is not set | ||
460 | # CONFIG_I2C_ALI15X3 is not set | ||
461 | # CONFIG_I2C_AMD756 is not set | ||
462 | # CONFIG_I2C_AMD8111 is not set | ||
463 | # CONFIG_I2C_I801 is not set | ||
464 | # CONFIG_I2C_I810 is not set | ||
465 | # CONFIG_I2C_IBM_IIC is not set | ||
466 | # CONFIG_I2C_ISA is not set | ||
467 | # CONFIG_I2C_NFORCE2 is not set | ||
468 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
469 | # CONFIG_I2C_PIIX4 is not set | ||
470 | # CONFIG_I2C_PROSAVAGE is not set | ||
471 | # CONFIG_I2C_SAVAGE4 is not set | ||
472 | # CONFIG_SCx200_ACB is not set | ||
473 | # CONFIG_I2C_SIS5595 is not set | ||
474 | # CONFIG_I2C_SIS630 is not set | ||
475 | # CONFIG_I2C_SIS96X is not set | ||
476 | # CONFIG_I2C_VIA is not set | ||
477 | # CONFIG_I2C_VIAPRO is not set | ||
478 | # CONFIG_I2C_VOODOO3 is not set | ||
479 | |||
480 | # | ||
481 | # Hardware Sensors Chip support | ||
482 | # | ||
483 | # CONFIG_I2C_SENSOR is not set | ||
484 | # CONFIG_SENSORS_ADM1021 is not set | ||
485 | # CONFIG_SENSORS_ASB100 is not set | ||
486 | # CONFIG_SENSORS_DS1621 is not set | ||
487 | # CONFIG_SENSORS_FSCHER is not set | ||
488 | # CONFIG_SENSORS_GL518SM is not set | ||
489 | # CONFIG_SENSORS_IT87 is not set | ||
490 | # CONFIG_SENSORS_LM75 is not set | ||
491 | # CONFIG_SENSORS_LM78 is not set | ||
492 | # CONFIG_SENSORS_LM80 is not set | ||
493 | # CONFIG_SENSORS_LM83 is not set | ||
494 | # CONFIG_SENSORS_LM85 is not set | ||
495 | # CONFIG_SENSORS_LM90 is not set | ||
496 | # CONFIG_SENSORS_VIA686A is not set | ||
497 | # CONFIG_SENSORS_W83781D is not set | ||
498 | # CONFIG_SENSORS_W83L785TS is not set | ||
499 | # CONFIG_SENSORS_W83627HF is not set | ||
500 | |||
501 | # | ||
502 | # Other I2C Chip support | ||
503 | # | ||
504 | # CONFIG_SENSORS_EEPROM is not set | ||
505 | # CONFIG_I2C_DEBUG_CORE is not set | ||
506 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
507 | # CONFIG_I2C_DEBUG_BUS is not set | ||
508 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
509 | |||
510 | # | ||
511 | # Misc devices | ||
512 | # | ||
513 | |||
514 | # | ||
515 | # Multimedia devices | ||
516 | # | ||
517 | # CONFIG_VIDEO_DEV is not set | ||
518 | |||
519 | # | ||
520 | # Digital Video Broadcasting Devices | ||
521 | # | ||
522 | # CONFIG_DVB is not set | ||
523 | |||
524 | # | ||
525 | # Graphics support | ||
526 | # | ||
527 | # CONFIG_FB is not set | ||
528 | |||
529 | # | ||
530 | # Sound | ||
531 | # | ||
532 | # CONFIG_SOUND is not set | ||
533 | |||
534 | # | ||
535 | # USB support | ||
536 | # | ||
537 | # CONFIG_USB is not set | ||
538 | |||
539 | # | ||
540 | # USB Gadget Support | ||
541 | # | ||
542 | # CONFIG_USB_GADGET is not set | ||
543 | |||
544 | # | ||
545 | # File systems | ||
546 | # | ||
547 | CONFIG_EXT2_FS=y | ||
548 | # CONFIG_EXT2_FS_XATTR is not set | ||
549 | # CONFIG_EXT3_FS is not set | ||
550 | # CONFIG_JBD is not set | ||
551 | # CONFIG_REISERFS_FS is not set | ||
552 | # CONFIG_JFS_FS is not set | ||
553 | # CONFIG_XFS_FS is not set | ||
554 | # CONFIG_MINIX_FS is not set | ||
555 | # CONFIG_ROMFS_FS is not set | ||
556 | # CONFIG_QUOTA is not set | ||
557 | # CONFIG_AUTOFS_FS is not set | ||
558 | # CONFIG_AUTOFS4_FS is not set | ||
559 | |||
560 | # | ||
561 | # CD-ROM/DVD Filesystems | ||
562 | # | ||
563 | # CONFIG_ISO9660_FS is not set | ||
564 | # CONFIG_UDF_FS is not set | ||
565 | |||
566 | # | ||
567 | # DOS/FAT/NT Filesystems | ||
568 | # | ||
569 | # CONFIG_FAT_FS is not set | ||
570 | # CONFIG_NTFS_FS is not set | ||
571 | |||
572 | # | ||
573 | # Pseudo filesystems | ||
574 | # | ||
575 | CONFIG_PROC_FS=y | ||
576 | CONFIG_PROC_KCORE=y | ||
577 | # CONFIG_DEVFS_FS is not set | ||
578 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
579 | CONFIG_TMPFS=y | ||
580 | # CONFIG_HUGETLB_PAGE is not set | ||
581 | CONFIG_RAMFS=y | ||
582 | |||
583 | # | ||
584 | # Miscellaneous filesystems | ||
585 | # | ||
586 | # CONFIG_ADFS_FS is not set | ||
587 | # CONFIG_AFFS_FS is not set | ||
588 | # CONFIG_HFS_FS is not set | ||
589 | # CONFIG_HFSPLUS_FS is not set | ||
590 | # CONFIG_BEFS_FS is not set | ||
591 | # CONFIG_BFS_FS is not set | ||
592 | # CONFIG_EFS_FS is not set | ||
593 | # CONFIG_CRAMFS is not set | ||
594 | # CONFIG_VXFS_FS is not set | ||
595 | # CONFIG_HPFS_FS is not set | ||
596 | # CONFIG_QNX4FS_FS is not set | ||
597 | # CONFIG_SYSV_FS is not set | ||
598 | # CONFIG_UFS_FS is not set | ||
599 | |||
600 | # | ||
601 | # Network File Systems | ||
602 | # | ||
603 | CONFIG_NFS_FS=y | ||
604 | # CONFIG_NFS_V3 is not set | ||
605 | # CONFIG_NFS_V4 is not set | ||
606 | # CONFIG_NFS_DIRECTIO is not set | ||
607 | # CONFIG_NFSD is not set | ||
608 | CONFIG_ROOT_NFS=y | ||
609 | CONFIG_LOCKD=y | ||
610 | # CONFIG_EXPORTFS is not set | ||
611 | CONFIG_SUNRPC=y | ||
612 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
613 | # CONFIG_SMB_FS is not set | ||
614 | # CONFIG_CIFS is not set | ||
615 | # CONFIG_NCP_FS is not set | ||
616 | # CONFIG_CODA_FS is not set | ||
617 | # CONFIG_INTERMEZZO_FS is not set | ||
618 | # CONFIG_AFS_FS is not set | ||
619 | |||
620 | # | ||
621 | # Partition Types | ||
622 | # | ||
623 | CONFIG_PARTITION_ADVANCED=y | ||
624 | # CONFIG_ACORN_PARTITION is not set | ||
625 | # CONFIG_OSF_PARTITION is not set | ||
626 | # CONFIG_AMIGA_PARTITION is not set | ||
627 | # CONFIG_ATARI_PARTITION is not set | ||
628 | # CONFIG_MAC_PARTITION is not set | ||
629 | # CONFIG_MSDOS_PARTITION is not set | ||
630 | # CONFIG_LDM_PARTITION is not set | ||
631 | # CONFIG_NEC98_PARTITION is not set | ||
632 | # CONFIG_SGI_PARTITION is not set | ||
633 | # CONFIG_ULTRIX_PARTITION is not set | ||
634 | # CONFIG_SUN_PARTITION is not set | ||
635 | # CONFIG_EFI_PARTITION is not set | ||
636 | |||
637 | # | ||
638 | # Native Language Support | ||
639 | # | ||
640 | # CONFIG_NLS is not set | ||
641 | |||
642 | # | ||
643 | # IBM 40x options | ||
644 | # | ||
645 | |||
646 | # | ||
647 | # Library routines | ||
648 | # | ||
649 | CONFIG_CRC32=y | ||
650 | |||
651 | # | ||
652 | # Kernel hacking | ||
653 | # | ||
654 | # CONFIG_DEBUG_KERNEL is not set | ||
655 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
656 | CONFIG_OCP=y | ||
657 | |||
658 | # | ||
659 | # Security options | ||
660 | # | ||
661 | # CONFIG_SECURITY is not set | ||
662 | |||
663 | # | ||
664 | # Cryptographic options | ||
665 | # | ||
666 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/beech_defconfig b/arch/ppc/configs/beech_defconfig deleted file mode 100644 index 0bd671bdceb4..000000000000 --- a/arch/ppc/configs/beech_defconfig +++ /dev/null | |||
@@ -1,615 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | CONFIG_PPC=y | ||
8 | CONFIG_PPC32=y | ||
9 | |||
10 | # | ||
11 | # Code maturity level options | ||
12 | # | ||
13 | CONFIG_EXPERIMENTAL=y | ||
14 | CONFIG_CLEAN_COMPILE=y | ||
15 | # CONFIG_STANDALONE is not set | ||
16 | CONFIG_BROKEN_ON_SMP=y | ||
17 | |||
18 | # | ||
19 | # General setup | ||
20 | # | ||
21 | # CONFIG_SWAP is not set | ||
22 | CONFIG_SYSVIPC=y | ||
23 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
24 | CONFIG_SYSCTL=y | ||
25 | CONFIG_LOG_BUF_SHIFT=14 | ||
26 | # CONFIG_IKCONFIG is not set | ||
27 | CONFIG_EMBEDDED=y | ||
28 | # CONFIG_KALLSYMS is not set | ||
29 | CONFIG_FUTEX=y | ||
30 | # CONFIG_EPOLL is not set | ||
31 | CONFIG_IOSCHED_NOOP=y | ||
32 | CONFIG_IOSCHED_AS=y | ||
33 | CONFIG_IOSCHED_DEADLINE=y | ||
34 | |||
35 | # | ||
36 | # Loadable module support | ||
37 | # | ||
38 | CONFIG_MODULES=y | ||
39 | CONFIG_MODULE_UNLOAD=y | ||
40 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
41 | CONFIG_OBSOLETE_MODPARM=y | ||
42 | CONFIG_MODVERSIONS=y | ||
43 | CONFIG_KMOD=y | ||
44 | |||
45 | # | ||
46 | # Processor | ||
47 | # | ||
48 | # CONFIG_6xx is not set | ||
49 | CONFIG_40x=y | ||
50 | # CONFIG_44x is not set | ||
51 | # CONFIG_POWER3 is not set | ||
52 | # CONFIG_POWER4 is not set | ||
53 | # CONFIG_8xx is not set | ||
54 | # CONFIG_MATH_EMULATION is not set | ||
55 | # CONFIG_CPU_FREQ is not set | ||
56 | CONFIG_4xx=y | ||
57 | |||
58 | # | ||
59 | # IBM 4xx options | ||
60 | # | ||
61 | # CONFIG_ASH is not set | ||
62 | CONFIG_BEECH=y | ||
63 | # CONFIG_CEDAR is not set | ||
64 | # CONFIG_CPCI405 is not set | ||
65 | # CONFIG_EP405 is not set | ||
66 | # CONFIG_OAK is not set | ||
67 | # CONFIG_REDWOOD_4 is not set | ||
68 | # CONFIG_REDWOOD_5 is not set | ||
69 | # CONFIG_REDWOOD_6 is not set | ||
70 | # CONFIG_SYCAMORE is not set | ||
71 | # CONFIG_TIVO is not set | ||
72 | # CONFIG_WALNUT is not set | ||
73 | CONFIG_IBM405_ERR77=y | ||
74 | CONFIG_IBM405_ERR51=y | ||
75 | CONFIG_IBM_OCP=y | ||
76 | CONFIG_IBM_OPENBIOS=y | ||
77 | CONFIG_405_DMA=y | ||
78 | # CONFIG_PM is not set | ||
79 | CONFIG_UART0_TTYS0=y | ||
80 | # CONFIG_UART0_TTYS1 is not set | ||
81 | CONFIG_NOT_COHERENT_CACHE=y | ||
82 | |||
83 | # | ||
84 | # Platform options | ||
85 | # | ||
86 | # CONFIG_PC_KEYBOARD is not set | ||
87 | # CONFIG_SMP is not set | ||
88 | # CONFIG_PREEMPT is not set | ||
89 | # CONFIG_HIGHMEM is not set | ||
90 | CONFIG_KERNEL_ELF=y | ||
91 | CONFIG_BINFMT_ELF=y | ||
92 | # CONFIG_BINFMT_MISC is not set | ||
93 | # CONFIG_CMDLINE_BOOL is not set | ||
94 | |||
95 | # | ||
96 | # Bus options | ||
97 | # | ||
98 | # CONFIG_PCI is not set | ||
99 | # CONFIG_PCI_DOMAINS is not set | ||
100 | # CONFIG_HOTPLUG is not set | ||
101 | |||
102 | # | ||
103 | # Parallel port support | ||
104 | # | ||
105 | # CONFIG_PARPORT is not set | ||
106 | |||
107 | # | ||
108 | # Advanced setup | ||
109 | # | ||
110 | # CONFIG_ADVANCED_OPTIONS is not set | ||
111 | |||
112 | # | ||
113 | # Default settings for advanced configuration options are used | ||
114 | # | ||
115 | CONFIG_HIGHMEM_START=0xfe000000 | ||
116 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
117 | CONFIG_KERNEL_START=0xc0000000 | ||
118 | CONFIG_TASK_SIZE=0x80000000 | ||
119 | CONFIG_BOOT_LOAD=0x00400000 | ||
120 | |||
121 | # | ||
122 | # Generic Driver Options | ||
123 | # | ||
124 | |||
125 | # | ||
126 | # Memory Technology Devices (MTD) | ||
127 | # | ||
128 | CONFIG_MTD=y | ||
129 | # CONFIG_MTD_DEBUG is not set | ||
130 | CONFIG_MTD_PARTITIONS=y | ||
131 | # CONFIG_MTD_CONCAT is not set | ||
132 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
133 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
134 | |||
135 | # | ||
136 | # User Modules And Translation Layers | ||
137 | # | ||
138 | CONFIG_MTD_CHAR=y | ||
139 | CONFIG_MTD_BLOCK=y | ||
140 | # CONFIG_FTL is not set | ||
141 | # CONFIG_NFTL is not set | ||
142 | # CONFIG_INFTL is not set | ||
143 | |||
144 | # | ||
145 | # RAM/ROM/Flash chip drivers | ||
146 | # | ||
147 | CONFIG_MTD_CFI=y | ||
148 | CONFIG_MTD_JEDECPROBE=y | ||
149 | CONFIG_MTD_GEN_PROBE=y | ||
150 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
151 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
152 | CONFIG_MTD_CFI_AMDSTD=y | ||
153 | # CONFIG_MTD_CFI_STAA is not set | ||
154 | # CONFIG_MTD_RAM is not set | ||
155 | # CONFIG_MTD_ROM is not set | ||
156 | # CONFIG_MTD_ABSENT is not set | ||
157 | # CONFIG_MTD_OBSOLETE_CHIPS is not set | ||
158 | |||
159 | # | ||
160 | # Mapping drivers for chip access | ||
161 | # | ||
162 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
163 | # CONFIG_MTD_PHYSMAP is not set | ||
164 | CONFIG_MTD_BEECH=y | ||
165 | |||
166 | # | ||
167 | # Self-contained MTD device drivers | ||
168 | # | ||
169 | # CONFIG_MTD_SLRAM is not set | ||
170 | # CONFIG_MTD_MTDRAM is not set | ||
171 | # CONFIG_MTD_BLKMTD is not set | ||
172 | |||
173 | # | ||
174 | # Disk-On-Chip Device Drivers | ||
175 | # | ||
176 | # CONFIG_MTD_DOC2000 is not set | ||
177 | # CONFIG_MTD_DOC2001 is not set | ||
178 | # CONFIG_MTD_DOC2001PLUS is not set | ||
179 | |||
180 | # | ||
181 | # NAND Flash Device Drivers | ||
182 | # | ||
183 | # CONFIG_MTD_NAND is not set | ||
184 | |||
185 | # | ||
186 | # Plug and Play support | ||
187 | # | ||
188 | # CONFIG_PNP is not set | ||
189 | |||
190 | # | ||
191 | # Block devices | ||
192 | # | ||
193 | CONFIG_BLK_DEV_LOOP=y | ||
194 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
195 | # CONFIG_BLK_DEV_NBD is not set | ||
196 | CONFIG_BLK_DEV_RAM=y | ||
197 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
198 | CONFIG_BLK_DEV_INITRD=y | ||
199 | # CONFIG_LBD is not set | ||
200 | |||
201 | # | ||
202 | # Multi-device support (RAID and LVM) | ||
203 | # | ||
204 | # CONFIG_MD is not set | ||
205 | |||
206 | # | ||
207 | # ATA/ATAPI/MFM/RLL support | ||
208 | # | ||
209 | # CONFIG_IDE is not set | ||
210 | |||
211 | # | ||
212 | # SCSI device support | ||
213 | # | ||
214 | # CONFIG_SCSI is not set | ||
215 | |||
216 | # | ||
217 | # Fusion MPT device support | ||
218 | # | ||
219 | |||
220 | # | ||
221 | # I2O device support | ||
222 | # | ||
223 | |||
224 | # | ||
225 | # Networking support | ||
226 | # | ||
227 | CONFIG_NET=y | ||
228 | |||
229 | # | ||
230 | # Networking options | ||
231 | # | ||
232 | # CONFIG_PACKET is not set | ||
233 | # CONFIG_NETLINK_DEV is not set | ||
234 | CONFIG_UNIX=y | ||
235 | # CONFIG_NET_KEY is not set | ||
236 | CONFIG_INET=y | ||
237 | CONFIG_IP_MULTICAST=y | ||
238 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
239 | CONFIG_IP_PNP=y | ||
240 | # CONFIG_IP_PNP_DHCP is not set | ||
241 | CONFIG_IP_PNP_BOOTP=y | ||
242 | CONFIG_IP_PNP_RARP=y | ||
243 | # CONFIG_NET_IPIP is not set | ||
244 | # CONFIG_NET_IPGRE is not set | ||
245 | # CONFIG_IP_MROUTE is not set | ||
246 | # CONFIG_ARPD is not set | ||
247 | # CONFIG_INET_ECN is not set | ||
248 | CONFIG_SYN_COOKIES=y | ||
249 | # CONFIG_INET_AH is not set | ||
250 | # CONFIG_INET_ESP is not set | ||
251 | # CONFIG_INET_IPCOMP is not set | ||
252 | # CONFIG_IPV6 is not set | ||
253 | # CONFIG_DECNET is not set | ||
254 | # CONFIG_BRIDGE is not set | ||
255 | # CONFIG_NETFILTER is not set | ||
256 | |||
257 | # | ||
258 | # SCTP Configuration (EXPERIMENTAL) | ||
259 | # | ||
260 | CONFIG_IPV6_SCTP__=y | ||
261 | # CONFIG_IP_SCTP is not set | ||
262 | # CONFIG_ATM is not set | ||
263 | # CONFIG_VLAN_8021Q is not set | ||
264 | # CONFIG_LLC2 is not set | ||
265 | # CONFIG_IPX is not set | ||
266 | # CONFIG_ATALK is not set | ||
267 | # CONFIG_X25 is not set | ||
268 | # CONFIG_LAPB is not set | ||
269 | # CONFIG_NET_DIVERT is not set | ||
270 | # CONFIG_ECONET is not set | ||
271 | # CONFIG_WAN_ROUTER is not set | ||
272 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
273 | |||
274 | # | ||
275 | # QoS and/or fair queueing | ||
276 | # | ||
277 | # CONFIG_NET_SCHED is not set | ||
278 | |||
279 | # | ||
280 | # Network testing | ||
281 | # | ||
282 | # CONFIG_NET_PKTGEN is not set | ||
283 | CONFIG_NETDEVICES=y | ||
284 | # CONFIG_DUMMY is not set | ||
285 | # CONFIG_BONDING is not set | ||
286 | # CONFIG_EQUALIZER is not set | ||
287 | # CONFIG_TUN is not set | ||
288 | |||
289 | # | ||
290 | # Ethernet (10 or 100Mbit) | ||
291 | # | ||
292 | CONFIG_NET_ETHERNET=y | ||
293 | # CONFIG_MII is not set | ||
294 | # CONFIG_OAKNET is not set | ||
295 | |||
296 | # | ||
297 | # Ethernet (1000 Mbit) | ||
298 | # | ||
299 | |||
300 | # | ||
301 | # Ethernet (10000 Mbit) | ||
302 | # | ||
303 | # CONFIG_PPP is not set | ||
304 | # CONFIG_SLIP is not set | ||
305 | |||
306 | # | ||
307 | # Wireless LAN (non-hamradio) | ||
308 | # | ||
309 | # CONFIG_NET_RADIO is not set | ||
310 | |||
311 | # | ||
312 | # Token Ring devices | ||
313 | # | ||
314 | # CONFIG_SHAPER is not set | ||
315 | |||
316 | # | ||
317 | # Wan interfaces | ||
318 | # | ||
319 | # CONFIG_WAN is not set | ||
320 | |||
321 | # | ||
322 | # Amateur Radio support | ||
323 | # | ||
324 | # CONFIG_HAMRADIO is not set | ||
325 | |||
326 | # | ||
327 | # IrDA (infrared) support | ||
328 | # | ||
329 | # CONFIG_IRDA is not set | ||
330 | |||
331 | # | ||
332 | # Bluetooth support | ||
333 | # | ||
334 | # CONFIG_BT is not set | ||
335 | |||
336 | # | ||
337 | # ISDN subsystem | ||
338 | # | ||
339 | # CONFIG_ISDN_BOOL is not set | ||
340 | |||
341 | # | ||
342 | # Graphics support | ||
343 | # | ||
344 | CONFIG_FB=y | ||
345 | # CONFIG_FB_CT65550 is not set | ||
346 | # CONFIG_FB_S3TRIO is not set | ||
347 | # CONFIG_FB_VGA16 is not set | ||
348 | # CONFIG_FB_VIRTUAL is not set | ||
349 | |||
350 | # | ||
351 | # Logo configuration | ||
352 | # | ||
353 | # CONFIG_LOGO is not set | ||
354 | |||
355 | # | ||
356 | # Input device support | ||
357 | # | ||
358 | CONFIG_INPUT=y | ||
359 | |||
360 | # | ||
361 | # Userland interfaces | ||
362 | # | ||
363 | # CONFIG_INPUT_MOUSEDEV is not set | ||
364 | # CONFIG_INPUT_JOYDEV is not set | ||
365 | # CONFIG_INPUT_TSDEV is not set | ||
366 | # CONFIG_INPUT_EVDEV is not set | ||
367 | # CONFIG_INPUT_EVBUG is not set | ||
368 | |||
369 | # | ||
370 | # Input I/O drivers | ||
371 | # | ||
372 | # CONFIG_GAMEPORT is not set | ||
373 | CONFIG_SOUND_GAMEPORT=y | ||
374 | CONFIG_SERIO=y | ||
375 | # CONFIG_SERIO_I8042 is not set | ||
376 | # CONFIG_SERIO_SERPORT is not set | ||
377 | # CONFIG_SERIO_CT82C710 is not set | ||
378 | |||
379 | # | ||
380 | # Input Device Drivers | ||
381 | # | ||
382 | # CONFIG_INPUT_KEYBOARD is not set | ||
383 | # CONFIG_INPUT_MOUSE is not set | ||
384 | # CONFIG_INPUT_JOYSTICK is not set | ||
385 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
386 | # CONFIG_INPUT_MISC is not set | ||
387 | |||
388 | # | ||
389 | # Macintosh device drivers | ||
390 | # | ||
391 | |||
392 | # | ||
393 | # Character devices | ||
394 | # | ||
395 | # CONFIG_VT is not set | ||
396 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
397 | |||
398 | # | ||
399 | # Serial drivers | ||
400 | # | ||
401 | CONFIG_SERIAL_8250=y | ||
402 | CONFIG_SERIAL_8250_CONSOLE=y | ||
403 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
404 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
405 | |||
406 | # | ||
407 | # Non-8250 serial port support | ||
408 | # | ||
409 | CONFIG_SERIAL_CORE=y | ||
410 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
411 | CONFIG_UNIX98_PTYS=y | ||
412 | CONFIG_UNIX98_PTY_COUNT=256 | ||
413 | |||
414 | # | ||
415 | # I2C support | ||
416 | # | ||
417 | CONFIG_I2C=y | ||
418 | # CONFIG_I2C_CHARDEV is not set | ||
419 | |||
420 | # | ||
421 | # I2C Algorithms | ||
422 | # | ||
423 | # CONFIG_I2C_ALGOBIT is not set | ||
424 | # CONFIG_I2C_ALGOPCF is not set | ||
425 | |||
426 | # | ||
427 | # I2C Hardware Bus support | ||
428 | # | ||
429 | # CONFIG_I2C_AMD756 is not set | ||
430 | # CONFIG_I2C_AMD8111 is not set | ||
431 | CONFIG_I2C_IBM_IIC=y | ||
432 | |||
433 | # | ||
434 | # I2C Hardware Sensors Chip support | ||
435 | # | ||
436 | # CONFIG_I2C_SENSOR is not set | ||
437 | # CONFIG_SENSORS_ADM1021 is not set | ||
438 | # CONFIG_SENSORS_EEPROM is not set | ||
439 | # CONFIG_SENSORS_IT87 is not set | ||
440 | # CONFIG_SENSORS_LM75 is not set | ||
441 | # CONFIG_SENSORS_LM78 is not set | ||
442 | # CONFIG_SENSORS_LM85 is not set | ||
443 | # CONFIG_SENSORS_VIA686A is not set | ||
444 | # CONFIG_SENSORS_W83781D is not set | ||
445 | |||
446 | # | ||
447 | # Mice | ||
448 | # | ||
449 | # CONFIG_BUSMOUSE is not set | ||
450 | # CONFIG_QIC02_TAPE is not set | ||
451 | |||
452 | # | ||
453 | # IPMI | ||
454 | # | ||
455 | # CONFIG_IPMI_HANDLER is not set | ||
456 | |||
457 | # | ||
458 | # Watchdog Cards | ||
459 | # | ||
460 | # CONFIG_WATCHDOG is not set | ||
461 | # CONFIG_NVRAM is not set | ||
462 | CONFIG_GEN_RTC=y | ||
463 | # CONFIG_GEN_RTC_X is not set | ||
464 | # CONFIG_DTLK is not set | ||
465 | # CONFIG_R3964 is not set | ||
466 | # CONFIG_APPLICOM is not set | ||
467 | |||
468 | # | ||
469 | # Ftape, the floppy tape device driver | ||
470 | # | ||
471 | # CONFIG_FTAPE is not set | ||
472 | # CONFIG_AGP is not set | ||
473 | # CONFIG_DRM is not set | ||
474 | # CONFIG_RAW_DRIVER is not set | ||
475 | |||
476 | # | ||
477 | # Multimedia devices | ||
478 | # | ||
479 | # CONFIG_VIDEO_DEV is not set | ||
480 | |||
481 | # | ||
482 | # Digital Video Broadcasting Devices | ||
483 | # | ||
484 | # CONFIG_DVB is not set | ||
485 | |||
486 | # | ||
487 | # File systems | ||
488 | # | ||
489 | CONFIG_EXT2_FS=y | ||
490 | # CONFIG_EXT2_FS_XATTR is not set | ||
491 | # CONFIG_EXT3_FS is not set | ||
492 | # CONFIG_JBD is not set | ||
493 | # CONFIG_REISERFS_FS is not set | ||
494 | # CONFIG_JFS_FS is not set | ||
495 | # CONFIG_XFS_FS is not set | ||
496 | # CONFIG_MINIX_FS is not set | ||
497 | # CONFIG_ROMFS_FS is not set | ||
498 | # CONFIG_QUOTA is not set | ||
499 | # CONFIG_AUTOFS_FS is not set | ||
500 | # CONFIG_AUTOFS4_FS is not set | ||
501 | |||
502 | # | ||
503 | # CD-ROM/DVD Filesystems | ||
504 | # | ||
505 | # CONFIG_ISO9660_FS is not set | ||
506 | # CONFIG_UDF_FS is not set | ||
507 | |||
508 | # | ||
509 | # DOS/FAT/NT Filesystems | ||
510 | # | ||
511 | # CONFIG_FAT_FS is not set | ||
512 | # CONFIG_NTFS_FS is not set | ||
513 | |||
514 | # | ||
515 | # Pseudo filesystems | ||
516 | # | ||
517 | CONFIG_PROC_FS=y | ||
518 | CONFIG_PROC_KCORE=y | ||
519 | CONFIG_DEVFS_FS=y | ||
520 | # CONFIG_DEVFS_MOUNT is not set | ||
521 | # CONFIG_DEVFS_DEBUG is not set | ||
522 | CONFIG_DEVPTS_FS=y | ||
523 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
524 | CONFIG_TMPFS=y | ||
525 | # CONFIG_HUGETLB_PAGE is not set | ||
526 | CONFIG_RAMFS=y | ||
527 | |||
528 | # | ||
529 | # Miscellaneous filesystems | ||
530 | # | ||
531 | # CONFIG_ADFS_FS is not set | ||
532 | # CONFIG_AFFS_FS is not set | ||
533 | # CONFIG_HFS_FS is not set | ||
534 | # CONFIG_BEFS_FS is not set | ||
535 | # CONFIG_BFS_FS is not set | ||
536 | # CONFIG_EFS_FS is not set | ||
537 | # CONFIG_JFFS_FS is not set | ||
538 | # CONFIG_JFFS2_FS is not set | ||
539 | # CONFIG_CRAMFS is not set | ||
540 | # CONFIG_VXFS_FS is not set | ||
541 | # CONFIG_HPFS_FS is not set | ||
542 | # CONFIG_QNX4FS_FS is not set | ||
543 | # CONFIG_SYSV_FS is not set | ||
544 | # CONFIG_UFS_FS is not set | ||
545 | |||
546 | # | ||
547 | # Network File Systems | ||
548 | # | ||
549 | CONFIG_NFS_FS=y | ||
550 | # CONFIG_NFS_V3 is not set | ||
551 | # CONFIG_NFS_V4 is not set | ||
552 | # CONFIG_NFSD is not set | ||
553 | CONFIG_ROOT_NFS=y | ||
554 | CONFIG_LOCKD=y | ||
555 | # CONFIG_EXPORTFS is not set | ||
556 | CONFIG_SUNRPC=y | ||
557 | # CONFIG_SUNRPC_GSS is not set | ||
558 | # CONFIG_SMB_FS is not set | ||
559 | # CONFIG_CIFS is not set | ||
560 | # CONFIG_NCP_FS is not set | ||
561 | # CONFIG_CODA_FS is not set | ||
562 | # CONFIG_INTERMEZZO_FS is not set | ||
563 | # CONFIG_AFS_FS is not set | ||
564 | |||
565 | # | ||
566 | # Partition Types | ||
567 | # | ||
568 | # CONFIG_PARTITION_ADVANCED is not set | ||
569 | CONFIG_MSDOS_PARTITION=y | ||
570 | |||
571 | # | ||
572 | # Sound | ||
573 | # | ||
574 | CONFIG_SOUND=y | ||
575 | |||
576 | # | ||
577 | # Advanced Linux Sound Architecture | ||
578 | # | ||
579 | # CONFIG_SND is not set | ||
580 | |||
581 | # | ||
582 | # Open Sound System | ||
583 | # | ||
584 | # CONFIG_SOUND_PRIME is not set | ||
585 | |||
586 | # | ||
587 | # IBM 40x options | ||
588 | # | ||
589 | |||
590 | # | ||
591 | # USB support | ||
592 | # | ||
593 | # CONFIG_USB_GADGET is not set | ||
594 | |||
595 | # | ||
596 | # Library routines | ||
597 | # | ||
598 | # CONFIG_CRC32 is not set | ||
599 | |||
600 | # | ||
601 | # Kernel hacking | ||
602 | # | ||
603 | # CONFIG_DEBUG_KERNEL is not set | ||
604 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
605 | CONFIG_OCP=y | ||
606 | |||
607 | # | ||
608 | # Security options | ||
609 | # | ||
610 | # CONFIG_SECURITY is not set | ||
611 | |||
612 | # | ||
613 | # Cryptographic options | ||
614 | # | ||
615 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/cedar_defconfig b/arch/ppc/configs/cedar_defconfig deleted file mode 100644 index 5de8288a0673..000000000000 --- a/arch/ppc/configs/cedar_defconfig +++ /dev/null | |||
@@ -1,534 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | CONFIG_EMBEDDED=y | ||
22 | CONFIG_FUTEX=y | ||
23 | # CONFIG_EPOLL is not set | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | CONFIG_MODULE_UNLOAD=y | ||
30 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
31 | CONFIG_OBSOLETE_MODPARM=y | ||
32 | # CONFIG_MODVERSIONS is not set | ||
33 | CONFIG_KMOD=y | ||
34 | |||
35 | # | ||
36 | # Platform support | ||
37 | # | ||
38 | CONFIG_PPC=y | ||
39 | CONFIG_PPC32=y | ||
40 | # CONFIG_6xx is not set | ||
41 | CONFIG_40x=y | ||
42 | # CONFIG_POWER3 is not set | ||
43 | # CONFIG_8xx is not set | ||
44 | CONFIG_4xx=y | ||
45 | |||
46 | # | ||
47 | # IBM 4xx options | ||
48 | # | ||
49 | # CONFIG_ASH is not set | ||
50 | # CONFIG_BEECH is not set | ||
51 | CONFIG_CEDAR=y | ||
52 | # CONFIG_CPCI405 is not set | ||
53 | # CONFIG_EP405 is not set | ||
54 | # CONFIG_OAK is not set | ||
55 | # CONFIG_REDWOOD_4 is not set | ||
56 | # CONFIG_REDWOOD_5 is not set | ||
57 | # CONFIG_REDWOOD_6 is not set | ||
58 | # CONFIG_SYCAMORE is not set | ||
59 | # CONFIG_TIVO is not set | ||
60 | # CONFIG_WALNUT is not set | ||
61 | CONFIG_IBM405_ERR77=y | ||
62 | CONFIG_IBM405_ERR51=y | ||
63 | CONFIG_IBM_OCP=y | ||
64 | CONFIG_NP405L=y | ||
65 | CONFIG_BIOS_FIXUP=y | ||
66 | CONFIG_IBM_OPENBIOS=y | ||
67 | # CONFIG_405_DMA is not set | ||
68 | # CONFIG_PM is not set | ||
69 | CONFIG_UART0_TTYS0=y | ||
70 | # CONFIG_UART0_TTYS1 is not set | ||
71 | CONFIG_NOT_COHERENT_CACHE=y | ||
72 | # CONFIG_SMP is not set | ||
73 | # CONFIG_PREEMPT is not set | ||
74 | # CONFIG_MATH_EMULATION is not set | ||
75 | # CONFIG_CPU_FREQ is not set | ||
76 | |||
77 | # | ||
78 | # General setup | ||
79 | # | ||
80 | # CONFIG_HIGHMEM is not set | ||
81 | # CONFIG_PCI is not set | ||
82 | # CONFIG_PCI_DOMAINS is not set | ||
83 | # CONFIG_PC_KEYBOARD is not set | ||
84 | CONFIG_KCORE_ELF=y | ||
85 | CONFIG_BINFMT_ELF=y | ||
86 | CONFIG_KERNEL_ELF=y | ||
87 | # CONFIG_BINFMT_MISC is not set | ||
88 | # CONFIG_HOTPLUG is not set | ||
89 | |||
90 | # | ||
91 | # Parallel port support | ||
92 | # | ||
93 | # CONFIG_PARPORT is not set | ||
94 | # CONFIG_CMDLINE_BOOL is not set | ||
95 | |||
96 | # | ||
97 | # Advanced setup | ||
98 | # | ||
99 | # CONFIG_ADVANCED_OPTIONS is not set | ||
100 | |||
101 | # | ||
102 | # Default settings for advanced configuration options are used | ||
103 | # | ||
104 | CONFIG_HIGHMEM_START=0xfe000000 | ||
105 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
106 | CONFIG_KERNEL_START=0xc0000000 | ||
107 | CONFIG_TASK_SIZE=0x80000000 | ||
108 | CONFIG_BOOT_LOAD=0x00400000 | ||
109 | |||
110 | # | ||
111 | # Memory Technology Devices (MTD) | ||
112 | # | ||
113 | # CONFIG_MTD is not set | ||
114 | |||
115 | # | ||
116 | # Plug and Play support | ||
117 | # | ||
118 | # CONFIG_PNP is not set | ||
119 | |||
120 | # | ||
121 | # Block devices | ||
122 | # | ||
123 | # CONFIG_BLK_DEV_FD is not set | ||
124 | CONFIG_BLK_DEV_LOOP=y | ||
125 | # CONFIG_BLK_DEV_NBD is not set | ||
126 | CONFIG_BLK_DEV_RAM=y | ||
127 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
128 | CONFIG_BLK_DEV_INITRD=y | ||
129 | |||
130 | # | ||
131 | # Multi-device support (RAID and LVM) | ||
132 | # | ||
133 | # CONFIG_MD is not set | ||
134 | |||
135 | # | ||
136 | # ATA/IDE/MFM/RLL support | ||
137 | # | ||
138 | # CONFIG_IDE is not set | ||
139 | |||
140 | # | ||
141 | # SCSI support | ||
142 | # | ||
143 | # CONFIG_SCSI is not set | ||
144 | |||
145 | # | ||
146 | # Fusion MPT device support | ||
147 | # | ||
148 | |||
149 | # | ||
150 | # I2O device support | ||
151 | # | ||
152 | |||
153 | # | ||
154 | # Networking support | ||
155 | # | ||
156 | CONFIG_NET=y | ||
157 | |||
158 | # | ||
159 | # Networking options | ||
160 | # | ||
161 | # CONFIG_PACKET is not set | ||
162 | # CONFIG_NETLINK_DEV is not set | ||
163 | # CONFIG_NETFILTER is not set | ||
164 | CONFIG_UNIX=y | ||
165 | # CONFIG_NET_KEY is not set | ||
166 | CONFIG_INET=y | ||
167 | CONFIG_IP_MULTICAST=y | ||
168 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
169 | CONFIG_IP_PNP=y | ||
170 | CONFIG_IP_PNP_DHCP=y | ||
171 | CONFIG_IP_PNP_BOOTP=y | ||
172 | CONFIG_IP_PNP_RARP=y | ||
173 | # CONFIG_NET_IPIP is not set | ||
174 | # CONFIG_NET_IPGRE is not set | ||
175 | # CONFIG_IP_MROUTE is not set | ||
176 | # CONFIG_ARPD is not set | ||
177 | # CONFIG_INET_ECN is not set | ||
178 | CONFIG_SYN_COOKIES=y | ||
179 | # CONFIG_INET_AH is not set | ||
180 | # CONFIG_INET_ESP is not set | ||
181 | # CONFIG_INET_IPCOMP is not set | ||
182 | # CONFIG_IPV6 is not set | ||
183 | # CONFIG_XFRM_USER is not set | ||
184 | |||
185 | # | ||
186 | # SCTP Configuration (EXPERIMENTAL) | ||
187 | # | ||
188 | CONFIG_IPV6_SCTP__=y | ||
189 | # CONFIG_IP_SCTP is not set | ||
190 | # CONFIG_ATM is not set | ||
191 | # CONFIG_VLAN_8021Q is not set | ||
192 | # CONFIG_LLC is not set | ||
193 | # CONFIG_DECNET is not set | ||
194 | # CONFIG_BRIDGE is not set | ||
195 | # CONFIG_X25 is not set | ||
196 | # CONFIG_LAPB is not set | ||
197 | # CONFIG_NET_DIVERT is not set | ||
198 | # CONFIG_ECONET is not set | ||
199 | # CONFIG_WAN_ROUTER is not set | ||
200 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
201 | |||
202 | # | ||
203 | # QoS and/or fair queueing | ||
204 | # | ||
205 | # CONFIG_NET_SCHED is not set | ||
206 | |||
207 | # | ||
208 | # Network testing | ||
209 | # | ||
210 | # CONFIG_NET_PKTGEN is not set | ||
211 | CONFIG_NETDEVICES=y | ||
212 | # CONFIG_DUMMY is not set | ||
213 | # CONFIG_BONDING is not set | ||
214 | # CONFIG_EQUALIZER is not set | ||
215 | # CONFIG_TUN is not set | ||
216 | # CONFIG_ETHERTAP is not set | ||
217 | |||
218 | # | ||
219 | # Ethernet (10 or 100Mbit) | ||
220 | # | ||
221 | # CONFIG_NET_ETHERNET is not set | ||
222 | |||
223 | # | ||
224 | # Ethernet (1000 Mbit) | ||
225 | # | ||
226 | |||
227 | # | ||
228 | # Ethernet (10000 Mbit) | ||
229 | # | ||
230 | # CONFIG_PPP is not set | ||
231 | # CONFIG_SLIP is not set | ||
232 | |||
233 | # | ||
234 | # Wireless LAN (non-hamradio) | ||
235 | # | ||
236 | # CONFIG_NET_RADIO is not set | ||
237 | |||
238 | # | ||
239 | # Token Ring devices (depends on LLC=y) | ||
240 | # | ||
241 | # CONFIG_SHAPER is not set | ||
242 | |||
243 | # | ||
244 | # Wan interfaces | ||
245 | # | ||
246 | # CONFIG_WAN is not set | ||
247 | |||
248 | # | ||
249 | # Amateur Radio support | ||
250 | # | ||
251 | # CONFIG_HAMRADIO is not set | ||
252 | |||
253 | # | ||
254 | # IrDA (infrared) support | ||
255 | # | ||
256 | # CONFIG_IRDA is not set | ||
257 | |||
258 | # | ||
259 | # ISDN subsystem | ||
260 | # | ||
261 | # CONFIG_ISDN_BOOL is not set | ||
262 | |||
263 | # | ||
264 | # Graphics support | ||
265 | # | ||
266 | # CONFIG_FB is not set | ||
267 | |||
268 | # | ||
269 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
270 | # | ||
271 | # CONFIG_CD_NO_IDESCSI is not set | ||
272 | |||
273 | # | ||
274 | # Input device support | ||
275 | # | ||
276 | # CONFIG_INPUT is not set | ||
277 | |||
278 | # | ||
279 | # Userland interfaces | ||
280 | # | ||
281 | |||
282 | # | ||
283 | # Input I/O drivers | ||
284 | # | ||
285 | # CONFIG_GAMEPORT is not set | ||
286 | CONFIG_SOUND_GAMEPORT=y | ||
287 | # CONFIG_SERIO is not set | ||
288 | |||
289 | # | ||
290 | # Input Device Drivers | ||
291 | # | ||
292 | |||
293 | # | ||
294 | # Macintosh device drivers | ||
295 | # | ||
296 | |||
297 | # | ||
298 | # Character devices | ||
299 | # | ||
300 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
301 | |||
302 | # | ||
303 | # Serial drivers | ||
304 | # | ||
305 | CONFIG_SERIAL_8250=y | ||
306 | CONFIG_SERIAL_8250_CONSOLE=y | ||
307 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
308 | |||
309 | # | ||
310 | # Non-8250 serial port support | ||
311 | # | ||
312 | CONFIG_SERIAL_CORE=y | ||
313 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
314 | CONFIG_UNIX98_PTYS=y | ||
315 | CONFIG_UNIX98_PTY_COUNT=256 | ||
316 | |||
317 | # | ||
318 | # I2C support | ||
319 | # | ||
320 | CONFIG_I2C=y | ||
321 | # CONFIG_I2C_ALGOBIT is not set | ||
322 | # CONFIG_I2C_ALGOPCF is not set | ||
323 | CONFIG_I2C_IBM_OCP_ALGO=y | ||
324 | CONFIG_I2C_IBM_OCP_ADAP=y | ||
325 | # CONFIG_I2C_CHARDEV is not set | ||
326 | |||
327 | # | ||
328 | # I2C Hardware Sensors Mainboard support | ||
329 | # | ||
330 | # CONFIG_I2C_AMD756 is not set | ||
331 | # CONFIG_I2C_AMD8111 is not set | ||
332 | |||
333 | # | ||
334 | # I2C Hardware Sensors Chip support | ||
335 | # | ||
336 | # CONFIG_SENSORS_ADM1021 is not set | ||
337 | # CONFIG_SENSORS_IT87 is not set | ||
338 | # CONFIG_SENSORS_LM75 is not set | ||
339 | # CONFIG_SENSORS_LM85 is not set | ||
340 | # CONFIG_SENSORS_VIA686A is not set | ||
341 | # CONFIG_SENSORS_W83781D is not set | ||
342 | # CONFIG_I2C_SENSOR is not set | ||
343 | |||
344 | # | ||
345 | # Mice | ||
346 | # | ||
347 | # CONFIG_BUSMOUSE is not set | ||
348 | # CONFIG_QIC02_TAPE is not set | ||
349 | |||
350 | # | ||
351 | # IPMI | ||
352 | # | ||
353 | # CONFIG_IPMI_HANDLER is not set | ||
354 | |||
355 | # | ||
356 | # Watchdog Cards | ||
357 | # | ||
358 | CONFIG_WATCHDOG=y | ||
359 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
360 | # CONFIG_SOFT_WATCHDOG is not set | ||
361 | # CONFIG_WDT is not set | ||
362 | # CONFIG_WDTPCI is not set | ||
363 | # CONFIG_PCWATCHDOG is not set | ||
364 | # CONFIG_ACQUIRE_WDT is not set | ||
365 | # CONFIG_ADVANTECH_WDT is not set | ||
366 | # CONFIG_EUROTECH_WDT is not set | ||
367 | # CONFIG_IB700_WDT is not set | ||
368 | # CONFIG_MIXCOMWD is not set | ||
369 | # CONFIG_SCx200_WDT is not set | ||
370 | # CONFIG_60XX_WDT is not set | ||
371 | # CONFIG_W83877F_WDT is not set | ||
372 | # CONFIG_MACHZ_WDT is not set | ||
373 | # CONFIG_SC520_WDT is not set | ||
374 | # CONFIG_AMD7XX_TCO is not set | ||
375 | # CONFIG_ALIM7101_WDT is not set | ||
376 | # CONFIG_SC1200_WDT is not set | ||
377 | # CONFIG_WAFER_WDT is not set | ||
378 | # CONFIG_CPU5_WDT is not set | ||
379 | # CONFIG_NVRAM is not set | ||
380 | # CONFIG_GEN_RTC is not set | ||
381 | # CONFIG_DTLK is not set | ||
382 | # CONFIG_R3964 is not set | ||
383 | # CONFIG_APPLICOM is not set | ||
384 | |||
385 | # | ||
386 | # Ftape, the floppy tape device driver | ||
387 | # | ||
388 | # CONFIG_FTAPE is not set | ||
389 | # CONFIG_AGP is not set | ||
390 | # CONFIG_DRM is not set | ||
391 | # CONFIG_RAW_DRIVER is not set | ||
392 | # CONFIG_HANGCHECK_TIMER is not set | ||
393 | |||
394 | # | ||
395 | # Multimedia devices | ||
396 | # | ||
397 | # CONFIG_VIDEO_DEV is not set | ||
398 | |||
399 | # | ||
400 | # Digital Video Broadcasting Devices | ||
401 | # | ||
402 | # CONFIG_DVB is not set | ||
403 | |||
404 | # | ||
405 | # File systems | ||
406 | # | ||
407 | CONFIG_EXT2_FS=y | ||
408 | # CONFIG_EXT2_FS_XATTR is not set | ||
409 | # CONFIG_EXT3_FS is not set | ||
410 | # CONFIG_JBD is not set | ||
411 | # CONFIG_REISERFS_FS is not set | ||
412 | # CONFIG_JFS_FS is not set | ||
413 | # CONFIG_XFS_FS is not set | ||
414 | # CONFIG_MINIX_FS is not set | ||
415 | # CONFIG_ROMFS_FS is not set | ||
416 | # CONFIG_QUOTA is not set | ||
417 | # CONFIG_AUTOFS_FS is not set | ||
418 | # CONFIG_AUTOFS4_FS is not set | ||
419 | |||
420 | # | ||
421 | # CD-ROM/DVD Filesystems | ||
422 | # | ||
423 | # CONFIG_ISO9660_FS is not set | ||
424 | # CONFIG_UDF_FS is not set | ||
425 | |||
426 | # | ||
427 | # DOS/FAT/NT Filesystems | ||
428 | # | ||
429 | # CONFIG_FAT_FS is not set | ||
430 | # CONFIG_NTFS_FS is not set | ||
431 | |||
432 | # | ||
433 | # Pseudo filesystems | ||
434 | # | ||
435 | CONFIG_PROC_FS=y | ||
436 | # CONFIG_DEVFS_FS is not set | ||
437 | CONFIG_DEVPTS_FS=y | ||
438 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
439 | CONFIG_TMPFS=y | ||
440 | CONFIG_RAMFS=y | ||
441 | |||
442 | # | ||
443 | # Miscellaneous filesystems | ||
444 | # | ||
445 | # CONFIG_ADFS_FS is not set | ||
446 | # CONFIG_AFFS_FS is not set | ||
447 | # CONFIG_HFS_FS is not set | ||
448 | # CONFIG_BEFS_FS is not set | ||
449 | # CONFIG_BFS_FS is not set | ||
450 | # CONFIG_EFS_FS is not set | ||
451 | # CONFIG_CRAMFS is not set | ||
452 | # CONFIG_VXFS_FS is not set | ||
453 | # CONFIG_HPFS_FS is not set | ||
454 | # CONFIG_QNX4FS_FS is not set | ||
455 | # CONFIG_SYSV_FS is not set | ||
456 | # CONFIG_UFS_FS is not set | ||
457 | |||
458 | # | ||
459 | # Network File Systems | ||
460 | # | ||
461 | CONFIG_NFS_FS=y | ||
462 | # CONFIG_NFS_V3 is not set | ||
463 | # CONFIG_NFS_V4 is not set | ||
464 | # CONFIG_NFSD is not set | ||
465 | CONFIG_ROOT_NFS=y | ||
466 | CONFIG_LOCKD=y | ||
467 | # CONFIG_EXPORTFS is not set | ||
468 | CONFIG_SUNRPC=y | ||
469 | # CONFIG_SUNRPC_GSS is not set | ||
470 | # CONFIG_SMB_FS is not set | ||
471 | # CONFIG_CIFS is not set | ||
472 | # CONFIG_NCP_FS is not set | ||
473 | # CONFIG_CODA_FS is not set | ||
474 | # CONFIG_INTERMEZZO_FS is not set | ||
475 | # CONFIG_AFS_FS is not set | ||
476 | |||
477 | # | ||
478 | # Partition Types | ||
479 | # | ||
480 | CONFIG_PARTITION_ADVANCED=y | ||
481 | # CONFIG_ACORN_PARTITION is not set | ||
482 | # CONFIG_OSF_PARTITION is not set | ||
483 | # CONFIG_AMIGA_PARTITION is not set | ||
484 | # CONFIG_ATARI_PARTITION is not set | ||
485 | # CONFIG_MAC_PARTITION is not set | ||
486 | # CONFIG_MSDOS_PARTITION is not set | ||
487 | # CONFIG_LDM_PARTITION is not set | ||
488 | # CONFIG_NEC98_PARTITION is not set | ||
489 | # CONFIG_SGI_PARTITION is not set | ||
490 | # CONFIG_ULTRIX_PARTITION is not set | ||
491 | # CONFIG_SUN_PARTITION is not set | ||
492 | # CONFIG_EFI_PARTITION is not set | ||
493 | |||
494 | # | ||
495 | # Sound | ||
496 | # | ||
497 | # CONFIG_SOUND is not set | ||
498 | |||
499 | # | ||
500 | # IBM 40x options | ||
501 | # | ||
502 | |||
503 | # | ||
504 | # USB support | ||
505 | # | ||
506 | # CONFIG_USB_GADGET is not set | ||
507 | |||
508 | # | ||
509 | # Bluetooth support | ||
510 | # | ||
511 | # CONFIG_BT is not set | ||
512 | |||
513 | # | ||
514 | # Library routines | ||
515 | # | ||
516 | CONFIG_CRC32=y | ||
517 | |||
518 | # | ||
519 | # Kernel hacking | ||
520 | # | ||
521 | # CONFIG_DEBUG_KERNEL is not set | ||
522 | # CONFIG_KALLSYMS is not set | ||
523 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
524 | CONFIG_OCP=y | ||
525 | |||
526 | # | ||
527 | # Security options | ||
528 | # | ||
529 | # CONFIG_SECURITY is not set | ||
530 | |||
531 | # | ||
532 | # Cryptographic options | ||
533 | # | ||
534 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/cpci690_defconfig b/arch/ppc/configs/cpci690_defconfig index 53948793d9af..ff3f7e02ab0f 100644 --- a/arch/ppc/configs/cpci690_defconfig +++ b/arch/ppc/configs/cpci690_defconfig | |||
@@ -1,15 +1,17 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.10-rc2 | 3 | # Linux kernel version: 2.6.13-mm1 |
4 | # Fri Dec 3 15:56:10 2004 | 4 | # Thu Sep 1 17:10:37 2005 |
5 | # | 5 | # |
6 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_GENERIC_HARDIRQS=y | 7 | CONFIG_GENERIC_HARDIRQS=y |
8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
9 | CONFIG_HAVE_DEC_LOCK=y | 10 | CONFIG_HAVE_DEC_LOCK=y |
10 | CONFIG_PPC=y | 11 | CONFIG_PPC=y |
11 | CONFIG_PPC32=y | 12 | CONFIG_PPC32=y |
12 | CONFIG_GENERIC_NVRAM=y | 13 | CONFIG_GENERIC_NVRAM=y |
14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
13 | 15 | ||
14 | # | 16 | # |
15 | # Code maturity level options | 17 | # Code maturity level options |
@@ -17,33 +19,38 @@ CONFIG_GENERIC_NVRAM=y | |||
17 | CONFIG_EXPERIMENTAL=y | 19 | CONFIG_EXPERIMENTAL=y |
18 | CONFIG_CLEAN_COMPILE=y | 20 | CONFIG_CLEAN_COMPILE=y |
19 | CONFIG_BROKEN_ON_SMP=y | 21 | CONFIG_BROKEN_ON_SMP=y |
22 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
20 | 23 | ||
21 | # | 24 | # |
22 | # General setup | 25 | # General setup |
23 | # | 26 | # |
24 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
28 | CONFIG_LOCALVERSION_AUTO=y | ||
25 | # CONFIG_SWAP is not set | 29 | # CONFIG_SWAP is not set |
26 | CONFIG_SYSVIPC=y | 30 | CONFIG_SYSVIPC=y |
27 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
28 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
29 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
30 | # CONFIG_AUDIT is not set | 34 | # CONFIG_AUDIT is not set |
31 | CONFIG_LOG_BUF_SHIFT=14 | ||
32 | # CONFIG_HOTPLUG is not set | 35 | # CONFIG_HOTPLUG is not set |
33 | CONFIG_KOBJECT_UEVENT=y | 36 | CONFIG_KOBJECT_UEVENT=y |
34 | # CONFIG_IKCONFIG is not set | 37 | # CONFIG_IKCONFIG is not set |
38 | CONFIG_INITRAMFS_SOURCE="" | ||
35 | # CONFIG_EMBEDDED is not set | 39 | # CONFIG_EMBEDDED is not set |
36 | CONFIG_KALLSYMS=y | 40 | CONFIG_KALLSYMS=y |
37 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
42 | CONFIG_PRINTK=y | ||
43 | CONFIG_BUG=y | ||
44 | CONFIG_BASE_FULL=y | ||
38 | CONFIG_FUTEX=y | 45 | CONFIG_FUTEX=y |
39 | CONFIG_EPOLL=y | 46 | CONFIG_EPOLL=y |
40 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
41 | CONFIG_SHMEM=y | 47 | CONFIG_SHMEM=y |
42 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 48 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
43 | CONFIG_CC_ALIGN_LABELS=0 | 49 | CONFIG_CC_ALIGN_LABELS=0 |
44 | CONFIG_CC_ALIGN_LOOPS=0 | 50 | CONFIG_CC_ALIGN_LOOPS=0 |
45 | CONFIG_CC_ALIGN_JUMPS=0 | 51 | CONFIG_CC_ALIGN_JUMPS=0 |
46 | # CONFIG_TINY_SHMEM is not set | 52 | # CONFIG_TINY_SHMEM is not set |
53 | CONFIG_BASE_SMALL=0 | ||
47 | 54 | ||
48 | # | 55 | # |
49 | # Loadable module support | 56 | # Loadable module support |
@@ -65,38 +72,42 @@ CONFIG_6xx=y | |||
65 | # CONFIG_POWER3 is not set | 72 | # CONFIG_POWER3 is not set |
66 | # CONFIG_POWER4 is not set | 73 | # CONFIG_POWER4 is not set |
67 | # CONFIG_8xx is not set | 74 | # CONFIG_8xx is not set |
75 | # CONFIG_E200 is not set | ||
68 | # CONFIG_E500 is not set | 76 | # CONFIG_E500 is not set |
77 | CONFIG_PPC_FPU=y | ||
69 | CONFIG_ALTIVEC=y | 78 | CONFIG_ALTIVEC=y |
70 | # CONFIG_TAU is not set | 79 | # CONFIG_TAU is not set |
80 | # CONFIG_KEXEC is not set | ||
71 | # CONFIG_CPU_FREQ is not set | 81 | # CONFIG_CPU_FREQ is not set |
82 | # CONFIG_WANT_EARLY_SERIAL is not set | ||
72 | CONFIG_PPC_STD_MMU=y | 83 | CONFIG_PPC_STD_MMU=y |
73 | # CONFIG_NOT_COHERENT_CACHE is not set | 84 | # CONFIG_NOT_COHERENT_CACHE is not set |
74 | 85 | ||
75 | # | 86 | # |
87 | # Performance-monitoring counters support | ||
88 | # | ||
89 | # CONFIG_PERFCTR is not set | ||
90 | |||
91 | # | ||
76 | # Platform options | 92 | # Platform options |
77 | # | 93 | # |
78 | # CONFIG_PPC_MULTIPLATFORM is not set | 94 | # CONFIG_PPC_MULTIPLATFORM is not set |
79 | # CONFIG_APUS is not set | 95 | # CONFIG_APUS is not set |
80 | # CONFIG_KATANA is not set | 96 | # CONFIG_KATANA is not set |
81 | # CONFIG_DMV182 is not set | ||
82 | # CONFIG_WILLOW is not set | 97 | # CONFIG_WILLOW is not set |
83 | CONFIG_CPCI690=y | 98 | CONFIG_CPCI690=y |
84 | # CONFIG_PCORE is not set | ||
85 | # CONFIG_POWERPMC250 is not set | 99 | # CONFIG_POWERPMC250 is not set |
86 | # CONFIG_EV64260 is not set | ||
87 | # CONFIG_DB64360 is not set | ||
88 | # CONFIG_CHESTNUT is not set | 100 | # CONFIG_CHESTNUT is not set |
89 | # CONFIG_SPRUCE is not set | 101 | # CONFIG_SPRUCE is not set |
102 | # CONFIG_HDPU is not set | ||
103 | # CONFIG_EV64260 is not set | ||
90 | # CONFIG_LOPEC is not set | 104 | # CONFIG_LOPEC is not set |
91 | # CONFIG_MCPN765 is not set | ||
92 | # CONFIG_MVME5100 is not set | 105 | # CONFIG_MVME5100 is not set |
93 | # CONFIG_PPLUS is not set | 106 | # CONFIG_PPLUS is not set |
94 | # CONFIG_PRPMC750 is not set | 107 | # CONFIG_PRPMC750 is not set |
95 | # CONFIG_PRPMC800 is not set | 108 | # CONFIG_PRPMC800 is not set |
96 | # CONFIG_PRPMC880 is not set | ||
97 | # CONFIG_SANDPOINT is not set | 109 | # CONFIG_SANDPOINT is not set |
98 | # CONFIG_ADIR is not set | 110 | # CONFIG_RADSTONE_PPC7D is not set |
99 | # CONFIG_K2 is not set | ||
100 | # CONFIG_PAL4 is not set | 111 | # CONFIG_PAL4 is not set |
101 | # CONFIG_GEMINI is not set | 112 | # CONFIG_GEMINI is not set |
102 | # CONFIG_EST8260 is not set | 113 | # CONFIG_EST8260 is not set |
@@ -105,22 +116,41 @@ CONFIG_CPCI690=y | |||
105 | # CONFIG_RPX8260 is not set | 116 | # CONFIG_RPX8260 is not set |
106 | # CONFIG_TQM8260 is not set | 117 | # CONFIG_TQM8260 is not set |
107 | # CONFIG_ADS8272 is not set | 118 | # CONFIG_ADS8272 is not set |
119 | # CONFIG_PQ2FADS is not set | ||
108 | # CONFIG_LITE5200 is not set | 120 | # CONFIG_LITE5200 is not set |
121 | # CONFIG_MPC834x_SYS is not set | ||
122 | # CONFIG_EV64360 is not set | ||
123 | CONFIG_GT64260=y | ||
124 | CONFIG_MV64X60=y | ||
109 | 125 | ||
110 | # | 126 | # |
111 | # Set bridge options | 127 | # Set bridge options |
112 | # | 128 | # |
113 | CONFIG_MV64X60_BASE=0xf1000000 | 129 | CONFIG_MV64X60_BASE=0xf1000000 |
114 | CONFIG_MV64X60_NEW_BASE=0xf1000000 | 130 | CONFIG_MV64X60_NEW_BASE=0xf1000000 |
115 | CONFIG_GT64260=y | ||
116 | CONFIG_MV64X60=y | ||
117 | # CONFIG_SMP is not set | 131 | # CONFIG_SMP is not set |
132 | CONFIG_HIGHMEM=y | ||
133 | CONFIG_HZ_100=y | ||
134 | # CONFIG_HZ_250 is not set | ||
135 | # CONFIG_HZ_1000 is not set | ||
136 | CONFIG_HZ=100 | ||
137 | CONFIG_PREEMPT_NONE=y | ||
138 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
118 | # CONFIG_PREEMPT is not set | 139 | # CONFIG_PREEMPT is not set |
119 | # CONFIG_HIGHMEM is not set | 140 | CONFIG_SELECT_MEMORY_MODEL=y |
141 | CONFIG_FLATMEM_MANUAL=y | ||
142 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
143 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
144 | CONFIG_FLATMEM=y | ||
145 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
146 | # CONFIG_SPARSEMEM_STATIC is not set | ||
120 | CONFIG_BINFMT_ELF=y | 147 | CONFIG_BINFMT_ELF=y |
121 | CONFIG_BINFMT_MISC=y | 148 | CONFIG_BINFMT_MISC=y |
122 | CONFIG_CMDLINE_BOOL=y | 149 | CONFIG_CMDLINE_BOOL=y |
123 | CONFIG_CMDLINE="console=ttyMM0,9600 ip=on" | 150 | CONFIG_CMDLINE="console=ttyMM0 ip=on" |
151 | # CONFIG_PM is not set | ||
152 | CONFIG_SECCOMP=y | ||
153 | CONFIG_ISA_DMA_API=y | ||
124 | 154 | ||
125 | # | 155 | # |
126 | # Bus options | 156 | # Bus options |
@@ -129,7 +159,11 @@ CONFIG_GENERIC_ISA_DMA=y | |||
129 | CONFIG_PCI=y | 159 | CONFIG_PCI=y |
130 | CONFIG_PCI_DOMAINS=y | 160 | CONFIG_PCI_DOMAINS=y |
131 | CONFIG_PCI_LEGACY_PROC=y | 161 | CONFIG_PCI_LEGACY_PROC=y |
132 | CONFIG_PCI_NAMES=y | 162 | |
163 | # | ||
164 | # PCCARD (PCMCIA/CardBus) support | ||
165 | # | ||
166 | # CONFIG_PCCARD is not set | ||
133 | 167 | ||
134 | # | 168 | # |
135 | # Advanced setup | 169 | # Advanced setup |
@@ -146,6 +180,76 @@ CONFIG_TASK_SIZE=0x80000000 | |||
146 | CONFIG_BOOT_LOAD=0x00800000 | 180 | CONFIG_BOOT_LOAD=0x00800000 |
147 | 181 | ||
148 | # | 182 | # |
183 | # Networking | ||
184 | # | ||
185 | CONFIG_NET=y | ||
186 | |||
187 | # | ||
188 | # Networking options | ||
189 | # | ||
190 | CONFIG_PACKET=y | ||
191 | # CONFIG_PACKET_MMAP is not set | ||
192 | CONFIG_UNIX=y | ||
193 | # CONFIG_NET_KEY is not set | ||
194 | CONFIG_INET=y | ||
195 | CONFIG_IP_MULTICAST=y | ||
196 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
197 | CONFIG_IP_FIB_HASH=y | ||
198 | CONFIG_IP_PNP=y | ||
199 | CONFIG_IP_PNP_DHCP=y | ||
200 | # CONFIG_IP_PNP_BOOTP is not set | ||
201 | # CONFIG_IP_PNP_RARP is not set | ||
202 | # CONFIG_NET_IPIP is not set | ||
203 | # CONFIG_NET_IPGRE is not set | ||
204 | # CONFIG_IP_MROUTE is not set | ||
205 | # CONFIG_ARPD is not set | ||
206 | CONFIG_SYN_COOKIES=y | ||
207 | # CONFIG_INET_AH is not set | ||
208 | # CONFIG_INET_ESP is not set | ||
209 | # CONFIG_INET_IPCOMP is not set | ||
210 | # CONFIG_INET_TUNNEL is not set | ||
211 | CONFIG_INET_DIAG=y | ||
212 | CONFIG_INET_TCP_DIAG=y | ||
213 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
214 | CONFIG_TCP_CONG_BIC=y | ||
215 | # CONFIG_IPV6 is not set | ||
216 | # CONFIG_NETFILTER is not set | ||
217 | |||
218 | # | ||
219 | # DCCP Configuration (EXPERIMENTAL) | ||
220 | # | ||
221 | # CONFIG_IP_DCCP is not set | ||
222 | |||
223 | # | ||
224 | # SCTP Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_IP_SCTP is not set | ||
227 | # CONFIG_ATM is not set | ||
228 | # CONFIG_BRIDGE is not set | ||
229 | # CONFIG_VLAN_8021Q is not set | ||
230 | # CONFIG_DECNET is not set | ||
231 | # CONFIG_LLC2 is not set | ||
232 | # CONFIG_IPX is not set | ||
233 | # CONFIG_ATALK is not set | ||
234 | # CONFIG_X25 is not set | ||
235 | # CONFIG_LAPB is not set | ||
236 | # CONFIG_NET_DIVERT is not set | ||
237 | # CONFIG_ECONET is not set | ||
238 | # CONFIG_WAN_ROUTER is not set | ||
239 | # CONFIG_NET_SCHED is not set | ||
240 | # CONFIG_NET_CLS_ROUTE is not set | ||
241 | |||
242 | # | ||
243 | # Network testing | ||
244 | # | ||
245 | # CONFIG_NET_PKTGEN is not set | ||
246 | # CONFIG_NETFILTER_NETLINK is not set | ||
247 | # CONFIG_HAMRADIO is not set | ||
248 | # CONFIG_IRDA is not set | ||
249 | # CONFIG_BT is not set | ||
250 | # CONFIG_IEEE80211 is not set | ||
251 | |||
252 | # | ||
149 | # Device Drivers | 253 | # Device Drivers |
150 | # | 254 | # |
151 | 255 | ||
@@ -154,6 +258,7 @@ CONFIG_BOOT_LOAD=0x00800000 | |||
154 | # | 258 | # |
155 | CONFIG_STANDALONE=y | 259 | CONFIG_STANDALONE=y |
156 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 260 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
261 | # CONFIG_FW_LOADER is not set | ||
157 | 262 | ||
158 | # | 263 | # |
159 | # Memory Technology Devices (MTD) | 264 | # Memory Technology Devices (MTD) |
@@ -177,6 +282,7 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
177 | # CONFIG_BLK_CPQ_CISS_DA is not set | 282 | # CONFIG_BLK_CPQ_CISS_DA is not set |
178 | # CONFIG_BLK_DEV_DAC960 is not set | 283 | # CONFIG_BLK_DEV_DAC960 is not set |
179 | # CONFIG_BLK_DEV_UMEM is not set | 284 | # CONFIG_BLK_DEV_UMEM is not set |
285 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
180 | CONFIG_BLK_DEV_LOOP=y | 286 | CONFIG_BLK_DEV_LOOP=y |
181 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 287 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
182 | # CONFIG_BLK_DEV_NBD is not set | 288 | # CONFIG_BLK_DEV_NBD is not set |
@@ -185,7 +291,6 @@ CONFIG_BLK_DEV_RAM=y | |||
185 | CONFIG_BLK_DEV_RAM_COUNT=16 | 291 | CONFIG_BLK_DEV_RAM_COUNT=16 |
186 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 292 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
187 | CONFIG_BLK_DEV_INITRD=y | 293 | CONFIG_BLK_DEV_INITRD=y |
188 | CONFIG_INITRAMFS_SOURCE="" | ||
189 | # CONFIG_LBD is not set | 294 | # CONFIG_LBD is not set |
190 | # CONFIG_CDROM_PKTCDVD is not set | 295 | # CONFIG_CDROM_PKTCDVD is not set |
191 | 296 | ||
@@ -196,6 +301,7 @@ CONFIG_IOSCHED_NOOP=y | |||
196 | CONFIG_IOSCHED_AS=y | 301 | CONFIG_IOSCHED_AS=y |
197 | CONFIG_IOSCHED_DEADLINE=y | 302 | CONFIG_IOSCHED_DEADLINE=y |
198 | CONFIG_IOSCHED_CFQ=y | 303 | CONFIG_IOSCHED_CFQ=y |
304 | # CONFIG_ATA_OVER_ETH is not set | ||
199 | 305 | ||
200 | # | 306 | # |
201 | # ATA/ATAPI/MFM/RLL support | 307 | # ATA/ATAPI/MFM/RLL support |
@@ -205,6 +311,7 @@ CONFIG_IOSCHED_CFQ=y | |||
205 | # | 311 | # |
206 | # SCSI device support | 312 | # SCSI device support |
207 | # | 313 | # |
314 | # CONFIG_RAID_ATTRS is not set | ||
208 | # CONFIG_SCSI is not set | 315 | # CONFIG_SCSI is not set |
209 | 316 | ||
210 | # | 317 | # |
@@ -215,6 +322,7 @@ CONFIG_IOSCHED_CFQ=y | |||
215 | # | 322 | # |
216 | # Fusion MPT device support | 323 | # Fusion MPT device support |
217 | # | 324 | # |
325 | # CONFIG_FUSION is not set | ||
218 | 326 | ||
219 | # | 327 | # |
220 | # IEEE 1394 (FireWire) support | 328 | # IEEE 1394 (FireWire) support |
@@ -231,71 +339,8 @@ CONFIG_IOSCHED_CFQ=y | |||
231 | # | 339 | # |
232 | 340 | ||
233 | # | 341 | # |
234 | # Networking support | 342 | # Network device support |
235 | # | 343 | # |
236 | CONFIG_NET=y | ||
237 | |||
238 | # | ||
239 | # Networking options | ||
240 | # | ||
241 | CONFIG_PACKET=y | ||
242 | # CONFIG_PACKET_MMAP is not set | ||
243 | # CONFIG_NETLINK_DEV is not set | ||
244 | CONFIG_UNIX=y | ||
245 | # CONFIG_NET_KEY is not set | ||
246 | CONFIG_INET=y | ||
247 | CONFIG_IP_MULTICAST=y | ||
248 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
249 | CONFIG_IP_PNP=y | ||
250 | CONFIG_IP_PNP_DHCP=y | ||
251 | # CONFIG_IP_PNP_BOOTP is not set | ||
252 | # CONFIG_IP_PNP_RARP is not set | ||
253 | # CONFIG_NET_IPIP is not set | ||
254 | # CONFIG_NET_IPGRE is not set | ||
255 | # CONFIG_IP_MROUTE is not set | ||
256 | # CONFIG_ARPD is not set | ||
257 | CONFIG_SYN_COOKIES=y | ||
258 | # CONFIG_INET_AH is not set | ||
259 | # CONFIG_INET_ESP is not set | ||
260 | # CONFIG_INET_IPCOMP is not set | ||
261 | # CONFIG_INET_TUNNEL is not set | ||
262 | CONFIG_IP_TCPDIAG=y | ||
263 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
264 | # CONFIG_IPV6 is not set | ||
265 | # CONFIG_NETFILTER is not set | ||
266 | |||
267 | # | ||
268 | # SCTP Configuration (EXPERIMENTAL) | ||
269 | # | ||
270 | # CONFIG_IP_SCTP is not set | ||
271 | # CONFIG_ATM is not set | ||
272 | # CONFIG_BRIDGE is not set | ||
273 | # CONFIG_VLAN_8021Q is not set | ||
274 | # CONFIG_DECNET is not set | ||
275 | # CONFIG_LLC2 is not set | ||
276 | # CONFIG_IPX is not set | ||
277 | # CONFIG_ATALK is not set | ||
278 | # CONFIG_X25 is not set | ||
279 | # CONFIG_LAPB is not set | ||
280 | # CONFIG_NET_DIVERT is not set | ||
281 | # CONFIG_ECONET is not set | ||
282 | # CONFIG_WAN_ROUTER is not set | ||
283 | |||
284 | # | ||
285 | # QoS and/or fair queueing | ||
286 | # | ||
287 | # CONFIG_NET_SCHED is not set | ||
288 | # CONFIG_NET_CLS_ROUTE is not set | ||
289 | |||
290 | # | ||
291 | # Network testing | ||
292 | # | ||
293 | # CONFIG_NET_PKTGEN is not set | ||
294 | # CONFIG_NETPOLL is not set | ||
295 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
296 | # CONFIG_HAMRADIO is not set | ||
297 | # CONFIG_IRDA is not set | ||
298 | # CONFIG_BT is not set | ||
299 | CONFIG_NETDEVICES=y | 344 | CONFIG_NETDEVICES=y |
300 | # CONFIG_DUMMY is not set | 345 | # CONFIG_DUMMY is not set |
301 | # CONFIG_BONDING is not set | 346 | # CONFIG_BONDING is not set |
@@ -308,6 +353,11 @@ CONFIG_NETDEVICES=y | |||
308 | # CONFIG_ARCNET is not set | 353 | # CONFIG_ARCNET is not set |
309 | 354 | ||
310 | # | 355 | # |
356 | # PHY device support | ||
357 | # | ||
358 | # CONFIG_PHYLIB is not set | ||
359 | |||
360 | # | ||
311 | # Ethernet (10 or 100Mbit) | 361 | # Ethernet (10 or 100Mbit) |
312 | # | 362 | # |
313 | CONFIG_NET_ETHERNET=y | 363 | CONFIG_NET_ETHERNET=y |
@@ -328,6 +378,7 @@ CONFIG_TULIP=y | |||
328 | # CONFIG_DE4X5 is not set | 378 | # CONFIG_DE4X5 is not set |
329 | # CONFIG_WINBOND_840 is not set | 379 | # CONFIG_WINBOND_840 is not set |
330 | # CONFIG_DM9102 is not set | 380 | # CONFIG_DM9102 is not set |
381 | # CONFIG_ULI526X is not set | ||
331 | # CONFIG_HP100 is not set | 382 | # CONFIG_HP100 is not set |
332 | CONFIG_NET_PCI=y | 383 | CONFIG_NET_PCI=y |
333 | # CONFIG_PCNET32 is not set | 384 | # CONFIG_PCNET32 is not set |
@@ -337,7 +388,6 @@ CONFIG_NET_PCI=y | |||
337 | # CONFIG_FORCEDETH is not set | 388 | # CONFIG_FORCEDETH is not set |
338 | # CONFIG_DGRS is not set | 389 | # CONFIG_DGRS is not set |
339 | CONFIG_EEPRO100=y | 390 | CONFIG_EEPRO100=y |
340 | # CONFIG_EEPRO100_PIO is not set | ||
341 | # CONFIG_E100 is not set | 391 | # CONFIG_E100 is not set |
342 | # CONFIG_FEALNX is not set | 392 | # CONFIG_FEALNX is not set |
343 | # CONFIG_NATSEMI is not set | 393 | # CONFIG_NATSEMI is not set |
@@ -360,13 +410,18 @@ CONFIG_EEPRO100=y | |||
360 | # CONFIG_HAMACHI is not set | 410 | # CONFIG_HAMACHI is not set |
361 | # CONFIG_YELLOWFIN is not set | 411 | # CONFIG_YELLOWFIN is not set |
362 | # CONFIG_R8169 is not set | 412 | # CONFIG_R8169 is not set |
413 | # CONFIG_SIS190 is not set | ||
414 | # CONFIG_SKGE is not set | ||
415 | # CONFIG_SKY2 is not set | ||
363 | # CONFIG_SK98LIN is not set | 416 | # CONFIG_SK98LIN is not set |
364 | # CONFIG_VIA_VELOCITY is not set | 417 | # CONFIG_VIA_VELOCITY is not set |
365 | # CONFIG_TIGON3 is not set | 418 | # CONFIG_TIGON3 is not set |
419 | # CONFIG_BNX2 is not set | ||
366 | 420 | ||
367 | # | 421 | # |
368 | # Ethernet (10000 Mbit) | 422 | # Ethernet (10000 Mbit) |
369 | # | 423 | # |
424 | # CONFIG_CHELSIO_T1 is not set | ||
370 | # CONFIG_IXGB is not set | 425 | # CONFIG_IXGB is not set |
371 | # CONFIG_S2IO is not set | 426 | # CONFIG_S2IO is not set |
372 | 427 | ||
@@ -390,6 +445,11 @@ CONFIG_EEPRO100=y | |||
390 | # CONFIG_SLIP is not set | 445 | # CONFIG_SLIP is not set |
391 | # CONFIG_SHAPER is not set | 446 | # CONFIG_SHAPER is not set |
392 | # CONFIG_NETCONSOLE is not set | 447 | # CONFIG_NETCONSOLE is not set |
448 | # CONFIG_KGDBOE is not set | ||
449 | # CONFIG_NETPOLL is not set | ||
450 | # CONFIG_NETPOLL_RX is not set | ||
451 | # CONFIG_NETPOLL_TRAP is not set | ||
452 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
393 | 453 | ||
394 | # | 454 | # |
395 | # ISDN subsystem | 455 | # ISDN subsystem |
@@ -419,14 +479,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
419 | # CONFIG_INPUT_EVBUG is not set | 479 | # CONFIG_INPUT_EVBUG is not set |
420 | 480 | ||
421 | # | 481 | # |
422 | # Input I/O drivers | ||
423 | # | ||
424 | # CONFIG_GAMEPORT is not set | ||
425 | CONFIG_SOUND_GAMEPORT=y | ||
426 | # CONFIG_SERIO is not set | ||
427 | # CONFIG_SERIO_I8042 is not set | ||
428 | |||
429 | # | ||
430 | # Input Device Drivers | 482 | # Input Device Drivers |
431 | # | 483 | # |
432 | # CONFIG_INPUT_KEYBOARD is not set | 484 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -436,6 +488,12 @@ CONFIG_SOUND_GAMEPORT=y | |||
436 | # CONFIG_INPUT_MISC is not set | 488 | # CONFIG_INPUT_MISC is not set |
437 | 489 | ||
438 | # | 490 | # |
491 | # Hardware I/O ports | ||
492 | # | ||
493 | # CONFIG_SERIO is not set | ||
494 | # CONFIG_GAMEPORT is not set | ||
495 | |||
496 | # | ||
439 | # Character devices | 497 | # Character devices |
440 | # | 498 | # |
441 | CONFIG_VT=y | 499 | CONFIG_VT=y |
@@ -455,6 +513,7 @@ CONFIG_SERIAL_MPSC=y | |||
455 | CONFIG_SERIAL_MPSC_CONSOLE=y | 513 | CONFIG_SERIAL_MPSC_CONSOLE=y |
456 | CONFIG_SERIAL_CORE=y | 514 | CONFIG_SERIAL_CORE=y |
457 | CONFIG_SERIAL_CORE_CONSOLE=y | 515 | CONFIG_SERIAL_CORE_CONSOLE=y |
516 | # CONFIG_SERIAL_JSM is not set | ||
458 | CONFIG_UNIX98_PTYS=y | 517 | CONFIG_UNIX98_PTYS=y |
459 | CONFIG_LEGACY_PTYS=y | 518 | CONFIG_LEGACY_PTYS=y |
460 | CONFIG_LEGACY_PTY_COUNT=256 | 519 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -483,6 +542,11 @@ CONFIG_GEN_RTC=y | |||
483 | # CONFIG_RAW_DRIVER is not set | 542 | # CONFIG_RAW_DRIVER is not set |
484 | 543 | ||
485 | # | 544 | # |
545 | # TPM devices | ||
546 | # | ||
547 | # CONFIG_TCG_TPM is not set | ||
548 | |||
549 | # | ||
486 | # I2C support | 550 | # I2C support |
487 | # | 551 | # |
488 | # CONFIG_I2C is not set | 552 | # CONFIG_I2C is not set |
@@ -493,10 +557,21 @@ CONFIG_GEN_RTC=y | |||
493 | # CONFIG_W1 is not set | 557 | # CONFIG_W1 is not set |
494 | 558 | ||
495 | # | 559 | # |
560 | # Hardware Monitoring support | ||
561 | # | ||
562 | CONFIG_HWMON=y | ||
563 | # CONFIG_HWMON_VID is not set | ||
564 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
565 | |||
566 | # | ||
496 | # Misc devices | 567 | # Misc devices |
497 | # | 568 | # |
498 | 569 | ||
499 | # | 570 | # |
571 | # Multimedia Capabilities Port drivers | ||
572 | # | ||
573 | |||
574 | # | ||
500 | # Multimedia devices | 575 | # Multimedia devices |
501 | # | 576 | # |
502 | # CONFIG_VIDEO_DEV is not set | 577 | # CONFIG_VIDEO_DEV is not set |
@@ -518,6 +593,11 @@ CONFIG_GEN_RTC=y | |||
518 | CONFIG_DUMMY_CONSOLE=y | 593 | CONFIG_DUMMY_CONSOLE=y |
519 | 594 | ||
520 | # | 595 | # |
596 | # Speakup console speech | ||
597 | # | ||
598 | # CONFIG_SPEAKUP is not set | ||
599 | |||
600 | # | ||
521 | # Sound | 601 | # Sound |
522 | # | 602 | # |
523 | # CONFIG_SOUND is not set | 603 | # CONFIG_SOUND is not set |
@@ -525,35 +605,59 @@ CONFIG_DUMMY_CONSOLE=y | |||
525 | # | 605 | # |
526 | # USB support | 606 | # USB support |
527 | # | 607 | # |
528 | # CONFIG_USB is not set | ||
529 | CONFIG_USB_ARCH_HAS_HCD=y | 608 | CONFIG_USB_ARCH_HAS_HCD=y |
530 | CONFIG_USB_ARCH_HAS_OHCI=y | 609 | CONFIG_USB_ARCH_HAS_OHCI=y |
610 | # CONFIG_USB is not set | ||
531 | 611 | ||
532 | # | 612 | # |
533 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | 613 | # USB Gadget Support |
534 | # | 614 | # |
615 | # CONFIG_USB_GADGET is not set | ||
535 | 616 | ||
536 | # | 617 | # |
537 | # USB Gadget Support | 618 | # MMC/SD Card support |
538 | # | 619 | # |
539 | # CONFIG_USB_GADGET is not set | 620 | # CONFIG_MMC is not set |
621 | |||
622 | # | ||
623 | # InfiniBand support | ||
624 | # | ||
625 | # CONFIG_INFINIBAND is not set | ||
626 | |||
627 | # | ||
628 | # SN Devices | ||
629 | # | ||
630 | |||
631 | # | ||
632 | # Distributed Lock Manager | ||
633 | # | ||
634 | # CONFIG_DLM is not set | ||
540 | 635 | ||
541 | # | 636 | # |
542 | # File systems | 637 | # File systems |
543 | # | 638 | # |
544 | CONFIG_EXT2_FS=y | 639 | CONFIG_EXT2_FS=y |
545 | # CONFIG_EXT2_FS_XATTR is not set | 640 | # CONFIG_EXT2_FS_XATTR is not set |
641 | # CONFIG_EXT2_FS_XIP is not set | ||
546 | # CONFIG_EXT3_FS is not set | 642 | # CONFIG_EXT3_FS is not set |
547 | # CONFIG_JBD is not set | 643 | # CONFIG_REISER4_FS is not set |
548 | # CONFIG_REISERFS_FS is not set | 644 | # CONFIG_REISERFS_FS is not set |
549 | # CONFIG_JFS_FS is not set | 645 | # CONFIG_JFS_FS is not set |
646 | # CONFIG_FS_POSIX_ACL is not set | ||
647 | |||
648 | # | ||
649 | # XFS support | ||
650 | # | ||
550 | # CONFIG_XFS_FS is not set | 651 | # CONFIG_XFS_FS is not set |
652 | # CONFIG_OCFS2_FS is not set | ||
551 | # CONFIG_MINIX_FS is not set | 653 | # CONFIG_MINIX_FS is not set |
552 | # CONFIG_ROMFS_FS is not set | 654 | # CONFIG_ROMFS_FS is not set |
655 | CONFIG_INOTIFY=y | ||
553 | # CONFIG_QUOTA is not set | 656 | # CONFIG_QUOTA is not set |
554 | CONFIG_DNOTIFY=y | 657 | CONFIG_DNOTIFY=y |
555 | # CONFIG_AUTOFS_FS is not set | 658 | # CONFIG_AUTOFS_FS is not set |
556 | # CONFIG_AUTOFS4_FS is not set | 659 | # CONFIG_AUTOFS4_FS is not set |
660 | # CONFIG_FUSE_FS is not set | ||
557 | 661 | ||
558 | # | 662 | # |
559 | # CD-ROM/DVD Filesystems | 663 | # CD-ROM/DVD Filesystems |
@@ -574,20 +678,18 @@ CONFIG_DNOTIFY=y | |||
574 | CONFIG_PROC_FS=y | 678 | CONFIG_PROC_FS=y |
575 | CONFIG_PROC_KCORE=y | 679 | CONFIG_PROC_KCORE=y |
576 | CONFIG_SYSFS=y | 680 | CONFIG_SYSFS=y |
577 | CONFIG_DEVFS_FS=y | ||
578 | # CONFIG_DEVFS_MOUNT is not set | ||
579 | # CONFIG_DEVFS_DEBUG is not set | ||
580 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
581 | CONFIG_TMPFS=y | 681 | CONFIG_TMPFS=y |
582 | # CONFIG_TMPFS_XATTR is not set | ||
583 | # CONFIG_HUGETLB_PAGE is not set | 682 | # CONFIG_HUGETLB_PAGE is not set |
584 | CONFIG_RAMFS=y | 683 | CONFIG_RAMFS=y |
684 | # CONFIG_CONFIGFS_FS is not set | ||
685 | # CONFIG_RELAYFS_FS is not set | ||
585 | 686 | ||
586 | # | 687 | # |
587 | # Miscellaneous filesystems | 688 | # Miscellaneous filesystems |
588 | # | 689 | # |
589 | # CONFIG_ADFS_FS is not set | 690 | # CONFIG_ADFS_FS is not set |
590 | # CONFIG_AFFS_FS is not set | 691 | # CONFIG_AFFS_FS is not set |
692 | # CONFIG_ASFS_FS is not set | ||
591 | # CONFIG_HFS_FS is not set | 693 | # CONFIG_HFS_FS is not set |
592 | # CONFIG_HFSPLUS_FS is not set | 694 | # CONFIG_HFSPLUS_FS is not set |
593 | # CONFIG_BEFS_FS is not set | 695 | # CONFIG_BEFS_FS is not set |
@@ -605,13 +707,14 @@ CONFIG_RAMFS=y | |||
605 | # | 707 | # |
606 | CONFIG_NFS_FS=y | 708 | CONFIG_NFS_FS=y |
607 | CONFIG_NFS_V3=y | 709 | CONFIG_NFS_V3=y |
710 | # CONFIG_NFS_V3_ACL is not set | ||
608 | CONFIG_NFS_V4=y | 711 | CONFIG_NFS_V4=y |
609 | # CONFIG_NFS_DIRECTIO is not set | 712 | # CONFIG_NFS_DIRECTIO is not set |
610 | # CONFIG_NFSD is not set | 713 | # CONFIG_NFSD is not set |
611 | CONFIG_ROOT_NFS=y | 714 | CONFIG_ROOT_NFS=y |
612 | CONFIG_LOCKD=y | 715 | CONFIG_LOCKD=y |
613 | CONFIG_LOCKD_V4=y | 716 | CONFIG_LOCKD_V4=y |
614 | # CONFIG_EXPORTFS is not set | 717 | CONFIG_NFS_COMMON=y |
615 | CONFIG_SUNRPC=y | 718 | CONFIG_SUNRPC=y |
616 | CONFIG_SUNRPC_GSS=y | 719 | CONFIG_SUNRPC_GSS=y |
617 | CONFIG_RPCSEC_GSS_KRB5=y | 720 | CONFIG_RPCSEC_GSS_KRB5=y |
@@ -621,6 +724,7 @@ CONFIG_RPCSEC_GSS_KRB5=y | |||
621 | # CONFIG_NCP_FS is not set | 724 | # CONFIG_NCP_FS is not set |
622 | # CONFIG_CODA_FS is not set | 725 | # CONFIG_CODA_FS is not set |
623 | # CONFIG_AFS_FS is not set | 726 | # CONFIG_AFS_FS is not set |
727 | # CONFIG_9P_FS is not set | ||
624 | 728 | ||
625 | # | 729 | # |
626 | # Partition Types | 730 | # Partition Types |
@@ -637,6 +741,7 @@ CONFIG_MSDOS_PARTITION=y | |||
637 | # Library routines | 741 | # Library routines |
638 | # | 742 | # |
639 | # CONFIG_CRC_CCITT is not set | 743 | # CONFIG_CRC_CCITT is not set |
744 | # CONFIG_CRC16 is not set | ||
640 | CONFIG_CRC32=y | 745 | CONFIG_CRC32=y |
641 | # CONFIG_LIBCRC32C is not set | 746 | # CONFIG_LIBCRC32C is not set |
642 | 747 | ||
@@ -648,7 +753,9 @@ CONFIG_CRC32=y | |||
648 | # | 753 | # |
649 | # Kernel hacking | 754 | # Kernel hacking |
650 | # | 755 | # |
756 | # CONFIG_PRINTK_TIME is not set | ||
651 | # CONFIG_DEBUG_KERNEL is not set | 757 | # CONFIG_DEBUG_KERNEL is not set |
758 | CONFIG_LOG_BUF_SHIFT=14 | ||
652 | # CONFIG_SERIAL_TEXT_DEBUG is not set | 759 | # CONFIG_SERIAL_TEXT_DEBUG is not set |
653 | 760 | ||
654 | # | 761 | # |
@@ -669,6 +776,7 @@ CONFIG_CRYPTO_MD5=y | |||
669 | # CONFIG_CRYPTO_SHA256 is not set | 776 | # CONFIG_CRYPTO_SHA256 is not set |
670 | # CONFIG_CRYPTO_SHA512 is not set | 777 | # CONFIG_CRYPTO_SHA512 is not set |
671 | # CONFIG_CRYPTO_WP512 is not set | 778 | # CONFIG_CRYPTO_WP512 is not set |
779 | # CONFIG_CRYPTO_TGR192 is not set | ||
672 | CONFIG_CRYPTO_DES=y | 780 | CONFIG_CRYPTO_DES=y |
673 | # CONFIG_CRYPTO_BLOWFISH is not set | 781 | # CONFIG_CRYPTO_BLOWFISH is not set |
674 | # CONFIG_CRYPTO_TWOFISH is not set | 782 | # CONFIG_CRYPTO_TWOFISH is not set |
@@ -684,3 +792,7 @@ CONFIG_CRYPTO_DES=y | |||
684 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 792 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
685 | # CONFIG_CRYPTO_CRC32C is not set | 793 | # CONFIG_CRYPTO_CRC32C is not set |
686 | # CONFIG_CRYPTO_TEST is not set | 794 | # CONFIG_CRYPTO_TEST is not set |
795 | |||
796 | # | ||
797 | # Hardware crypto devices | ||
798 | # | ||
diff --git a/arch/ppc/configs/k2_defconfig b/arch/ppc/configs/ev64360_defconfig index f10f5a6d2dae..de9bbb791db9 100644 --- a/arch/ppc/configs/k2_defconfig +++ b/arch/ppc/configs/ev64360_defconfig | |||
@@ -1,52 +1,60 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.13-rc5 | ||
4 | # Fri Aug 5 15:18:23 2005 | ||
3 | # | 5 | # |
4 | CONFIG_MMU=y | 6 | CONFIG_MMU=y |
7 | CONFIG_GENERIC_HARDIRQS=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 8 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
9 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | 10 | CONFIG_HAVE_DEC_LOCK=y |
7 | CONFIG_PPC=y | 11 | CONFIG_PPC=y |
8 | CONFIG_PPC32=y | 12 | CONFIG_PPC32=y |
9 | CONFIG_GENERIC_NVRAM=y | 13 | CONFIG_GENERIC_NVRAM=y |
14 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
10 | 15 | ||
11 | # | 16 | # |
12 | # Code maturity level options | 17 | # Code maturity level options |
13 | # | 18 | # |
14 | CONFIG_EXPERIMENTAL=y | 19 | CONFIG_EXPERIMENTAL=y |
15 | CONFIG_CLEAN_COMPILE=y | 20 | CONFIG_CLEAN_COMPILE=y |
16 | CONFIG_STANDALONE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | 21 | CONFIG_BROKEN_ON_SMP=y |
22 | CONFIG_LOCK_KERNEL=y | ||
23 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
18 | 24 | ||
19 | # | 25 | # |
20 | # General setup | 26 | # General setup |
21 | # | 27 | # |
28 | CONFIG_LOCALVERSION="" | ||
22 | CONFIG_SWAP=y | 29 | CONFIG_SWAP=y |
23 | CONFIG_SYSVIPC=y | 30 | CONFIG_SYSVIPC=y |
24 | # CONFIG_POSIX_MQUEUE is not set | 31 | CONFIG_POSIX_MQUEUE=y |
25 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
26 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
27 | # CONFIG_AUDIT is not set | 34 | # CONFIG_AUDIT is not set |
28 | CONFIG_LOG_BUF_SHIFT=14 | 35 | CONFIG_HOTPLUG=y |
29 | # CONFIG_HOTPLUG is not set | 36 | CONFIG_KOBJECT_UEVENT=y |
30 | # CONFIG_IKCONFIG is not set | 37 | # CONFIG_IKCONFIG is not set |
31 | CONFIG_EMBEDDED=y | 38 | # CONFIG_EMBEDDED is not set |
32 | CONFIG_KALLSYMS=y | 39 | CONFIG_KALLSYMS=y |
40 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
41 | CONFIG_PRINTK=y | ||
42 | CONFIG_BUG=y | ||
43 | CONFIG_BASE_FULL=y | ||
33 | CONFIG_FUTEX=y | 44 | CONFIG_FUTEX=y |
34 | CONFIG_EPOLL=y | 45 | CONFIG_EPOLL=y |
35 | CONFIG_IOSCHED_NOOP=y | 46 | CONFIG_SHMEM=y |
36 | CONFIG_IOSCHED_AS=y | 47 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
37 | CONFIG_IOSCHED_DEADLINE=y | 48 | CONFIG_CC_ALIGN_LABELS=0 |
38 | CONFIG_IOSCHED_CFQ=y | 49 | CONFIG_CC_ALIGN_LOOPS=0 |
39 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 50 | CONFIG_CC_ALIGN_JUMPS=0 |
51 | # CONFIG_TINY_SHMEM is not set | ||
52 | CONFIG_BASE_SMALL=0 | ||
40 | 53 | ||
41 | # | 54 | # |
42 | # Loadable module support | 55 | # Loadable module support |
43 | # | 56 | # |
44 | CONFIG_MODULES=y | 57 | # CONFIG_MODULES is not set |
45 | CONFIG_MODULE_UNLOAD=y | ||
46 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
47 | CONFIG_OBSOLETE_MODPARM=y | ||
48 | # CONFIG_MODVERSIONS is not set | ||
49 | CONFIG_KMOD=y | ||
50 | 58 | ||
51 | # | 59 | # |
52 | # Processor | 60 | # Processor |
@@ -57,21 +65,33 @@ CONFIG_6xx=y | |||
57 | # CONFIG_POWER3 is not set | 65 | # CONFIG_POWER3 is not set |
58 | # CONFIG_POWER4 is not set | 66 | # CONFIG_POWER4 is not set |
59 | # CONFIG_8xx is not set | 67 | # CONFIG_8xx is not set |
60 | # CONFIG_ALTIVEC is not set | 68 | # CONFIG_E200 is not set |
61 | # CONFIG_TAU is not set | 69 | # CONFIG_E500 is not set |
70 | CONFIG_PPC_FPU=y | ||
71 | CONFIG_ALTIVEC=y | ||
72 | CONFIG_TAU=y | ||
73 | # CONFIG_TAU_INT is not set | ||
74 | # CONFIG_TAU_AVERAGE is not set | ||
75 | # CONFIG_KEXEC is not set | ||
62 | # CONFIG_CPU_FREQ is not set | 76 | # CONFIG_CPU_FREQ is not set |
77 | # CONFIG_PM is not set | ||
63 | CONFIG_PPC_STD_MMU=y | 78 | CONFIG_PPC_STD_MMU=y |
79 | CONFIG_NOT_COHERENT_CACHE=y | ||
64 | 80 | ||
65 | # | 81 | # |
66 | # Platform options | 82 | # Platform options |
67 | # | 83 | # |
68 | # CONFIG_PPC_MULTIPLATFORM is not set | 84 | # CONFIG_PPC_MULTIPLATFORM is not set |
69 | # CONFIG_APUS is not set | 85 | # CONFIG_APUS is not set |
86 | # CONFIG_KATANA is not set | ||
70 | # CONFIG_WILLOW is not set | 87 | # CONFIG_WILLOW is not set |
88 | # CONFIG_CPCI690 is not set | ||
71 | # CONFIG_PCORE is not set | 89 | # CONFIG_PCORE is not set |
72 | # CONFIG_POWERPMC250 is not set | 90 | # CONFIG_POWERPMC250 is not set |
73 | # CONFIG_EV64260 is not set | 91 | # CONFIG_CHESTNUT is not set |
74 | # CONFIG_SPRUCE is not set | 92 | # CONFIG_SPRUCE is not set |
93 | # CONFIG_HDPU is not set | ||
94 | # CONFIG_EV64260 is not set | ||
75 | # CONFIG_LOPEC is not set | 95 | # CONFIG_LOPEC is not set |
76 | # CONFIG_MCPN765 is not set | 96 | # CONFIG_MCPN765 is not set |
77 | # CONFIG_MVME5100 is not set | 97 | # CONFIG_MVME5100 is not set |
@@ -79,24 +99,51 @@ CONFIG_PPC_STD_MMU=y | |||
79 | # CONFIG_PRPMC750 is not set | 99 | # CONFIG_PRPMC750 is not set |
80 | # CONFIG_PRPMC800 is not set | 100 | # CONFIG_PRPMC800 is not set |
81 | # CONFIG_SANDPOINT is not set | 101 | # CONFIG_SANDPOINT is not set |
102 | # CONFIG_RADSTONE_PPC7D is not set | ||
82 | # CONFIG_ADIR is not set | 103 | # CONFIG_ADIR is not set |
83 | CONFIG_K2=y | 104 | # CONFIG_K2 is not set |
84 | # CONFIG_PAL4 is not set | 105 | # CONFIG_PAL4 is not set |
85 | # CONFIG_GEMINI is not set | 106 | # CONFIG_GEMINI is not set |
86 | # CONFIG_EST8260 is not set | 107 | # CONFIG_EST8260 is not set |
108 | # CONFIG_SBC82xx is not set | ||
87 | # CONFIG_SBS8260 is not set | 109 | # CONFIG_SBS8260 is not set |
88 | # CONFIG_RPX6 is not set | 110 | # CONFIG_RPX8260 is not set |
89 | # CONFIG_TQM8260 is not set | 111 | # CONFIG_TQM8260 is not set |
90 | CONFIG_PPC_GEN550=y | 112 | # CONFIG_ADS8272 is not set |
91 | # CONFIG_CPC710_DATA_GATHERING is not set | 113 | # CONFIG_PQ2FADS is not set |
114 | # CONFIG_LITE5200 is not set | ||
115 | # CONFIG_MPC834x_SYS is not set | ||
116 | CONFIG_EV64360=y | ||
117 | CONFIG_MV64360=y | ||
118 | CONFIG_MV64X60=y | ||
119 | |||
120 | # | ||
121 | # Set bridge options | ||
122 | # | ||
123 | CONFIG_MV64X60_BASE=0xf1000000 | ||
124 | CONFIG_MV64X60_NEW_BASE=0xf1000000 | ||
92 | # CONFIG_SMP is not set | 125 | # CONFIG_SMP is not set |
93 | # CONFIG_PREEMPT is not set | ||
94 | # CONFIG_HIGHMEM is not set | 126 | # CONFIG_HIGHMEM is not set |
95 | CONFIG_KERNEL_ELF=y | 127 | # CONFIG_HZ_100 is not set |
128 | CONFIG_HZ_250=y | ||
129 | # CONFIG_HZ_1000 is not set | ||
130 | CONFIG_HZ=250 | ||
131 | # CONFIG_PREEMPT_NONE is not set | ||
132 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
133 | CONFIG_PREEMPT=y | ||
134 | CONFIG_PREEMPT_BKL=y | ||
135 | CONFIG_SELECT_MEMORY_MODEL=y | ||
136 | CONFIG_FLATMEM_MANUAL=y | ||
137 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
138 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
139 | CONFIG_FLATMEM=y | ||
140 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
96 | CONFIG_BINFMT_ELF=y | 141 | CONFIG_BINFMT_ELF=y |
97 | # CONFIG_BINFMT_MISC is not set | 142 | CONFIG_BINFMT_MISC=y |
98 | CONFIG_CMDLINE_BOOL=y | 143 | CONFIG_CMDLINE_BOOL=y |
99 | CONFIG_CMDLINE="ip=on" | 144 | CONFIG_CMDLINE="console=ttyMM0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2" |
145 | CONFIG_SECCOMP=y | ||
146 | CONFIG_ISA_DMA_API=y | ||
100 | 147 | ||
101 | # | 148 | # |
102 | # Bus options | 149 | # Bus options |
@@ -108,31 +155,182 @@ CONFIG_PCI_DOMAINS=y | |||
108 | # CONFIG_PCI_NAMES is not set | 155 | # CONFIG_PCI_NAMES is not set |
109 | 156 | ||
110 | # | 157 | # |
111 | # Advanced setup | 158 | # PCCARD (PCMCIA/CardBus) support |
112 | # | 159 | # |
113 | # CONFIG_ADVANCED_OPTIONS is not set | 160 | # CONFIG_PCCARD is not set |
114 | 161 | ||
115 | # | 162 | # |
116 | # Default settings for advanced configuration options are used | 163 | # Advanced setup |
117 | # | 164 | # |
165 | CONFIG_ADVANCED_OPTIONS=y | ||
118 | CONFIG_HIGHMEM_START=0xfe000000 | 166 | CONFIG_HIGHMEM_START=0xfe000000 |
167 | # CONFIG_LOWMEM_SIZE_BOOL is not set | ||
119 | CONFIG_LOWMEM_SIZE=0x30000000 | 168 | CONFIG_LOWMEM_SIZE=0x30000000 |
169 | # CONFIG_KERNEL_START_BOOL is not set | ||
120 | CONFIG_KERNEL_START=0xc0000000 | 170 | CONFIG_KERNEL_START=0xc0000000 |
171 | # CONFIG_TASK_SIZE_BOOL is not set | ||
121 | CONFIG_TASK_SIZE=0x80000000 | 172 | CONFIG_TASK_SIZE=0x80000000 |
173 | # CONFIG_CONSISTENT_START_BOOL is not set | ||
174 | CONFIG_CONSISTENT_START=0xff100000 | ||
175 | # CONFIG_CONSISTENT_SIZE_BOOL is not set | ||
176 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
177 | # CONFIG_BOOT_LOAD_BOOL is not set | ||
122 | CONFIG_BOOT_LOAD=0x00800000 | 178 | CONFIG_BOOT_LOAD=0x00800000 |
123 | 179 | ||
124 | # | 180 | # |
181 | # Networking | ||
182 | # | ||
183 | CONFIG_NET=y | ||
184 | |||
185 | # | ||
186 | # Networking options | ||
187 | # | ||
188 | CONFIG_PACKET=y | ||
189 | # CONFIG_PACKET_MMAP is not set | ||
190 | CONFIG_UNIX=y | ||
191 | # CONFIG_NET_KEY is not set | ||
192 | CONFIG_INET=y | ||
193 | CONFIG_IP_MULTICAST=y | ||
194 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
195 | CONFIG_IP_FIB_HASH=y | ||
196 | CONFIG_IP_PNP=y | ||
197 | CONFIG_IP_PNP_DHCP=y | ||
198 | # CONFIG_IP_PNP_BOOTP is not set | ||
199 | # CONFIG_IP_PNP_RARP is not set | ||
200 | # CONFIG_NET_IPIP is not set | ||
201 | # CONFIG_NET_IPGRE is not set | ||
202 | # CONFIG_IP_MROUTE is not set | ||
203 | # CONFIG_ARPD is not set | ||
204 | CONFIG_SYN_COOKIES=y | ||
205 | # CONFIG_INET_AH is not set | ||
206 | # CONFIG_INET_ESP is not set | ||
207 | # CONFIG_INET_IPCOMP is not set | ||
208 | # CONFIG_INET_TUNNEL is not set | ||
209 | CONFIG_IP_TCPDIAG=y | ||
210 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
211 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
212 | CONFIG_TCP_CONG_BIC=y | ||
213 | # CONFIG_IPV6 is not set | ||
214 | # CONFIG_NETFILTER is not set | ||
215 | |||
216 | # | ||
217 | # SCTP Configuration (EXPERIMENTAL) | ||
218 | # | ||
219 | # CONFIG_IP_SCTP is not set | ||
220 | # CONFIG_ATM is not set | ||
221 | # CONFIG_BRIDGE is not set | ||
222 | # CONFIG_VLAN_8021Q is not set | ||
223 | # CONFIG_DECNET is not set | ||
224 | # CONFIG_LLC2 is not set | ||
225 | # CONFIG_IPX is not set | ||
226 | # CONFIG_ATALK is not set | ||
227 | # CONFIG_X25 is not set | ||
228 | # CONFIG_LAPB is not set | ||
229 | # CONFIG_NET_DIVERT is not set | ||
230 | # CONFIG_ECONET is not set | ||
231 | # CONFIG_WAN_ROUTER is not set | ||
232 | # CONFIG_NET_SCHED is not set | ||
233 | # CONFIG_NET_CLS_ROUTE is not set | ||
234 | |||
235 | # | ||
236 | # Network testing | ||
237 | # | ||
238 | # CONFIG_NET_PKTGEN is not set | ||
239 | # CONFIG_HAMRADIO is not set | ||
240 | # CONFIG_IRDA is not set | ||
241 | # CONFIG_BT is not set | ||
242 | |||
243 | # | ||
125 | # Device Drivers | 244 | # Device Drivers |
126 | # | 245 | # |
127 | 246 | ||
128 | # | 247 | # |
129 | # Generic Driver Options | 248 | # Generic Driver Options |
130 | # | 249 | # |
250 | CONFIG_STANDALONE=y | ||
251 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
252 | # CONFIG_FW_LOADER is not set | ||
131 | 253 | ||
132 | # | 254 | # |
133 | # Memory Technology Devices (MTD) | 255 | # Memory Technology Devices (MTD) |
134 | # | 256 | # |
135 | # CONFIG_MTD is not set | 257 | CONFIG_MTD=y |
258 | # CONFIG_MTD_DEBUG is not set | ||
259 | CONFIG_MTD_CONCAT=y | ||
260 | CONFIG_MTD_PARTITIONS=y | ||
261 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
262 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
263 | |||
264 | # | ||
265 | # User Modules And Translation Layers | ||
266 | # | ||
267 | CONFIG_MTD_CHAR=y | ||
268 | CONFIG_MTD_BLOCK=y | ||
269 | # CONFIG_FTL is not set | ||
270 | # CONFIG_NFTL is not set | ||
271 | # CONFIG_INFTL is not set | ||
272 | |||
273 | # | ||
274 | # RAM/ROM/Flash chip drivers | ||
275 | # | ||
276 | CONFIG_MTD_CFI=y | ||
277 | # CONFIG_MTD_JEDECPROBE is not set | ||
278 | CONFIG_MTD_GEN_PROBE=y | ||
279 | CONFIG_MTD_CFI_ADV_OPTIONS=y | ||
280 | CONFIG_MTD_CFI_NOSWAP=y | ||
281 | # CONFIG_MTD_CFI_BE_BYTE_SWAP is not set | ||
282 | # CONFIG_MTD_CFI_LE_BYTE_SWAP is not set | ||
283 | CONFIG_MTD_CFI_GEOMETRY=y | ||
284 | # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set | ||
285 | # CONFIG_MTD_MAP_BANK_WIDTH_2 is not set | ||
286 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
287 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
288 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
289 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
290 | # CONFIG_MTD_CFI_I1 is not set | ||
291 | CONFIG_MTD_CFI_I2=y | ||
292 | # CONFIG_MTD_CFI_I4 is not set | ||
293 | # CONFIG_MTD_CFI_I8 is not set | ||
294 | # CONFIG_MTD_OTP is not set | ||
295 | CONFIG_MTD_CFI_INTELEXT=y | ||
296 | # CONFIG_MTD_CFI_AMDSTD is not set | ||
297 | # CONFIG_MTD_CFI_STAA is not set | ||
298 | CONFIG_MTD_CFI_UTIL=y | ||
299 | # CONFIG_MTD_RAM is not set | ||
300 | # CONFIG_MTD_ROM is not set | ||
301 | # CONFIG_MTD_ABSENT is not set | ||
302 | |||
303 | # | ||
304 | # Mapping drivers for chip access | ||
305 | # | ||
306 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
307 | CONFIG_MTD_PHYSMAP=y | ||
308 | CONFIG_MTD_PHYSMAP_START=0xff000000 | ||
309 | CONFIG_MTD_PHYSMAP_LEN=0x01000000 | ||
310 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | ||
311 | # CONFIG_MTD_PLATRAM is not set | ||
312 | |||
313 | # | ||
314 | # Self-contained MTD device drivers | ||
315 | # | ||
316 | # CONFIG_MTD_PMC551 is not set | ||
317 | # CONFIG_MTD_SLRAM is not set | ||
318 | CONFIG_MTD_PHRAM=y | ||
319 | # CONFIG_MTD_MTDRAM is not set | ||
320 | # CONFIG_MTD_BLKMTD is not set | ||
321 | # CONFIG_MTD_BLOCK2MTD is not set | ||
322 | |||
323 | # | ||
324 | # Disk-On-Chip Device Drivers | ||
325 | # | ||
326 | # CONFIG_MTD_DOC2000 is not set | ||
327 | # CONFIG_MTD_DOC2001 is not set | ||
328 | # CONFIG_MTD_DOC2001PLUS is not set | ||
329 | |||
330 | # | ||
331 | # NAND Flash Device Drivers | ||
332 | # | ||
333 | # CONFIG_MTD_NAND is not set | ||
136 | 334 | ||
137 | # | 335 | # |
138 | # Parallel port support | 336 | # Parallel port support |
@@ -151,72 +349,32 @@ CONFIG_BOOT_LOAD=0x00800000 | |||
151 | # CONFIG_BLK_CPQ_CISS_DA is not set | 349 | # CONFIG_BLK_CPQ_CISS_DA is not set |
152 | # CONFIG_BLK_DEV_DAC960 is not set | 350 | # CONFIG_BLK_DEV_DAC960 is not set |
153 | # CONFIG_BLK_DEV_UMEM is not set | 351 | # CONFIG_BLK_DEV_UMEM is not set |
352 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
154 | CONFIG_BLK_DEV_LOOP=y | 353 | CONFIG_BLK_DEV_LOOP=y |
155 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | 354 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set |
156 | # CONFIG_BLK_DEV_NBD is not set | 355 | # CONFIG_BLK_DEV_NBD is not set |
157 | # CONFIG_BLK_DEV_CARMEL is not set | 356 | # CONFIG_BLK_DEV_SX8 is not set |
158 | CONFIG_BLK_DEV_RAM=y | 357 | CONFIG_BLK_DEV_RAM=y |
159 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 358 | CONFIG_BLK_DEV_RAM_COUNT=16 |
359 | CONFIG_BLK_DEV_RAM_SIZE=32768 | ||
160 | CONFIG_BLK_DEV_INITRD=y | 360 | CONFIG_BLK_DEV_INITRD=y |
361 | CONFIG_INITRAMFS_SOURCE="" | ||
161 | # CONFIG_LBD is not set | 362 | # CONFIG_LBD is not set |
363 | # CONFIG_CDROM_PKTCDVD is not set | ||
364 | |||
365 | # | ||
366 | # IO Schedulers | ||
367 | # | ||
368 | CONFIG_IOSCHED_NOOP=y | ||
369 | CONFIG_IOSCHED_AS=y | ||
370 | CONFIG_IOSCHED_DEADLINE=y | ||
371 | CONFIG_IOSCHED_CFQ=y | ||
372 | # CONFIG_ATA_OVER_ETH is not set | ||
162 | 373 | ||
163 | # | 374 | # |
164 | # ATA/ATAPI/MFM/RLL support | 375 | # ATA/ATAPI/MFM/RLL support |
165 | # | 376 | # |
166 | CONFIG_IDE=y | 377 | # CONFIG_IDE is not set |
167 | CONFIG_BLK_DEV_IDE=y | ||
168 | |||
169 | # | ||
170 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
171 | # | ||
172 | CONFIG_BLK_DEV_IDEDISK=y | ||
173 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
174 | # CONFIG_IDEDISK_STROKE is not set | ||
175 | # CONFIG_BLK_DEV_IDECD is not set | ||
176 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
177 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
178 | # CONFIG_IDE_TASK_IOCTL is not set | ||
179 | # CONFIG_IDE_TASKFILE_IO is not set | ||
180 | |||
181 | # | ||
182 | # IDE chipset support/bugfixes | ||
183 | # | ||
184 | # CONFIG_IDE_GENERIC is not set | ||
185 | CONFIG_BLK_DEV_IDEPCI=y | ||
186 | # CONFIG_IDEPCI_SHARE_IRQ is not set | ||
187 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
188 | # CONFIG_BLK_DEV_GENERIC is not set | ||
189 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
190 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
191 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
192 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
193 | # CONFIG_IDEDMA_PCI_AUTO is not set | ||
194 | CONFIG_BLK_DEV_ADMA=y | ||
195 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
196 | CONFIG_BLK_DEV_ALI15X3=y | ||
197 | # CONFIG_WDC_ALI15X3 is not set | ||
198 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
199 | # CONFIG_BLK_DEV_CMD64X is not set | ||
200 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
201 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
202 | # CONFIG_BLK_DEV_CS5520 is not set | ||
203 | # CONFIG_BLK_DEV_CS5530 is not set | ||
204 | # CONFIG_BLK_DEV_HPT34X is not set | ||
205 | # CONFIG_BLK_DEV_HPT366 is not set | ||
206 | # CONFIG_BLK_DEV_SC1200 is not set | ||
207 | # CONFIG_BLK_DEV_PIIX is not set | ||
208 | # CONFIG_BLK_DEV_NS87415 is not set | ||
209 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
210 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
211 | # CONFIG_BLK_DEV_SVWKS is not set | ||
212 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
213 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
214 | # CONFIG_BLK_DEV_TRM290 is not set | ||
215 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
216 | CONFIG_BLK_DEV_IDEDMA=y | ||
217 | # CONFIG_IDEDMA_IVB is not set | ||
218 | # CONFIG_IDEDMA_AUTO is not set | ||
219 | # CONFIG_BLK_DEV_HD is not set | ||
220 | 378 | ||
221 | # | 379 | # |
222 | # SCSI device support | 380 | # SCSI device support |
@@ -248,122 +406,8 @@ CONFIG_BLK_DEV_IDEDMA=y | |||
248 | # | 406 | # |
249 | 407 | ||
250 | # | 408 | # |
251 | # Networking support | 409 | # Network device support |
252 | # | ||
253 | CONFIG_NET=y | ||
254 | |||
255 | # | 410 | # |
256 | # Networking options | ||
257 | # | ||
258 | CONFIG_PACKET=y | ||
259 | # CONFIG_PACKET_MMAP is not set | ||
260 | # CONFIG_NETLINK_DEV is not set | ||
261 | CONFIG_UNIX=y | ||
262 | # CONFIG_NET_KEY is not set | ||
263 | CONFIG_INET=y | ||
264 | # CONFIG_IP_MULTICAST is not set | ||
265 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
266 | CONFIG_IP_PNP=y | ||
267 | CONFIG_IP_PNP_DHCP=y | ||
268 | # CONFIG_IP_PNP_BOOTP is not set | ||
269 | # CONFIG_IP_PNP_RARP is not set | ||
270 | # CONFIG_NET_IPIP is not set | ||
271 | # CONFIG_NET_IPGRE is not set | ||
272 | # CONFIG_ARPD is not set | ||
273 | # CONFIG_SYN_COOKIES is not set | ||
274 | # CONFIG_INET_AH is not set | ||
275 | # CONFIG_INET_ESP is not set | ||
276 | # CONFIG_INET_IPCOMP is not set | ||
277 | |||
278 | # | ||
279 | # IP: Virtual Server Configuration | ||
280 | # | ||
281 | # CONFIG_IP_VS is not set | ||
282 | # CONFIG_IPV6 is not set | ||
283 | CONFIG_NETFILTER=y | ||
284 | # CONFIG_NETFILTER_DEBUG is not set | ||
285 | |||
286 | # | ||
287 | # IP: Netfilter Configuration | ||
288 | # | ||
289 | CONFIG_IP_NF_CONNTRACK=m | ||
290 | CONFIG_IP_NF_FTP=m | ||
291 | # CONFIG_IP_NF_IRC is not set | ||
292 | # CONFIG_IP_NF_TFTP is not set | ||
293 | # CONFIG_IP_NF_AMANDA is not set | ||
294 | # CONFIG_IP_NF_QUEUE is not set | ||
295 | CONFIG_IP_NF_IPTABLES=m | ||
296 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
297 | # CONFIG_IP_NF_MATCH_IPRANGE is not set | ||
298 | CONFIG_IP_NF_MATCH_MAC=m | ||
299 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
300 | CONFIG_IP_NF_MATCH_MARK=m | ||
301 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
302 | CONFIG_IP_NF_MATCH_TOS=m | ||
303 | # CONFIG_IP_NF_MATCH_RECENT is not set | ||
304 | CONFIG_IP_NF_MATCH_ECN=m | ||
305 | CONFIG_IP_NF_MATCH_DSCP=m | ||
306 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
307 | # CONFIG_IP_NF_MATCH_LENGTH is not set | ||
308 | # CONFIG_IP_NF_MATCH_TTL is not set | ||
309 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
310 | CONFIG_IP_NF_MATCH_HELPER=m | ||
311 | CONFIG_IP_NF_MATCH_STATE=m | ||
312 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
313 | CONFIG_IP_NF_MATCH_OWNER=m | ||
314 | CONFIG_IP_NF_FILTER=m | ||
315 | CONFIG_IP_NF_TARGET_REJECT=m | ||
316 | CONFIG_IP_NF_NAT=m | ||
317 | CONFIG_IP_NF_NAT_NEEDED=y | ||
318 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
319 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
320 | # CONFIG_IP_NF_TARGET_NETMAP is not set | ||
321 | # CONFIG_IP_NF_TARGET_SAME is not set | ||
322 | # CONFIG_IP_NF_NAT_SNMP_BASIC is not set | ||
323 | CONFIG_IP_NF_NAT_FTP=m | ||
324 | # CONFIG_IP_NF_MANGLE is not set | ||
325 | # CONFIG_IP_NF_TARGET_LOG is not set | ||
326 | CONFIG_IP_NF_TARGET_ULOG=m | ||
327 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
328 | CONFIG_IP_NF_ARPTABLES=m | ||
329 | CONFIG_IP_NF_ARPFILTER=m | ||
330 | # CONFIG_IP_NF_ARP_MANGLE is not set | ||
331 | CONFIG_IP_NF_COMPAT_IPCHAINS=m | ||
332 | # CONFIG_IP_NF_COMPAT_IPFWADM is not set | ||
333 | # CONFIG_IP_NF_RAW is not set | ||
334 | |||
335 | # | ||
336 | # SCTP Configuration (EXPERIMENTAL) | ||
337 | # | ||
338 | # CONFIG_IP_SCTP is not set | ||
339 | # CONFIG_ATM is not set | ||
340 | # CONFIG_BRIDGE is not set | ||
341 | # CONFIG_VLAN_8021Q is not set | ||
342 | # CONFIG_DECNET is not set | ||
343 | # CONFIG_LLC2 is not set | ||
344 | # CONFIG_IPX is not set | ||
345 | # CONFIG_ATALK is not set | ||
346 | # CONFIG_X25 is not set | ||
347 | # CONFIG_LAPB is not set | ||
348 | # CONFIG_NET_DIVERT is not set | ||
349 | # CONFIG_ECONET is not set | ||
350 | # CONFIG_WAN_ROUTER is not set | ||
351 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
352 | |||
353 | # | ||
354 | # QoS and/or fair queueing | ||
355 | # | ||
356 | # CONFIG_NET_SCHED is not set | ||
357 | |||
358 | # | ||
359 | # Network testing | ||
360 | # | ||
361 | # CONFIG_NET_PKTGEN is not set | ||
362 | # CONFIG_NETPOLL is not set | ||
363 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
364 | # CONFIG_HAMRADIO is not set | ||
365 | # CONFIG_IRDA is not set | ||
366 | # CONFIG_BT is not set | ||
367 | CONFIG_NETDEVICES=y | 411 | CONFIG_NETDEVICES=y |
368 | # CONFIG_DUMMY is not set | 412 | # CONFIG_DUMMY is not set |
369 | # CONFIG_BONDING is not set | 413 | # CONFIG_BONDING is not set |
@@ -378,38 +422,7 @@ CONFIG_NETDEVICES=y | |||
378 | # | 422 | # |
379 | # Ethernet (10 or 100Mbit) | 423 | # Ethernet (10 or 100Mbit) |
380 | # | 424 | # |
381 | CONFIG_NET_ETHERNET=y | 425 | # CONFIG_NET_ETHERNET is not set |
382 | CONFIG_MII=y | ||
383 | # CONFIG_OAKNET is not set | ||
384 | # CONFIG_HAPPYMEAL is not set | ||
385 | # CONFIG_SUNGEM is not set | ||
386 | # CONFIG_NET_VENDOR_3COM is not set | ||
387 | |||
388 | # | ||
389 | # Tulip family network device support | ||
390 | # | ||
391 | # CONFIG_NET_TULIP is not set | ||
392 | # CONFIG_HP100 is not set | ||
393 | CONFIG_NET_PCI=y | ||
394 | # CONFIG_PCNET32 is not set | ||
395 | # CONFIG_AMD8111_ETH is not set | ||
396 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
397 | # CONFIG_B44 is not set | ||
398 | # CONFIG_FORCEDETH is not set | ||
399 | # CONFIG_DGRS is not set | ||
400 | CONFIG_EEPRO100=y | ||
401 | # CONFIG_EEPRO100_PIO is not set | ||
402 | # CONFIG_E100 is not set | ||
403 | # CONFIG_FEALNX is not set | ||
404 | # CONFIG_NATSEMI is not set | ||
405 | # CONFIG_NE2K_PCI is not set | ||
406 | # CONFIG_8139CP is not set | ||
407 | # CONFIG_8139TOO is not set | ||
408 | # CONFIG_SIS900 is not set | ||
409 | # CONFIG_EPIC100 is not set | ||
410 | # CONFIG_SUNDANCE is not set | ||
411 | # CONFIG_TLAN is not set | ||
412 | # CONFIG_VIA_RHINE is not set | ||
413 | 426 | ||
414 | # | 427 | # |
415 | # Ethernet (1000 Mbit) | 428 | # Ethernet (1000 Mbit) |
@@ -421,8 +434,14 @@ CONFIG_EEPRO100=y | |||
421 | # CONFIG_HAMACHI is not set | 434 | # CONFIG_HAMACHI is not set |
422 | # CONFIG_YELLOWFIN is not set | 435 | # CONFIG_YELLOWFIN is not set |
423 | # CONFIG_R8169 is not set | 436 | # CONFIG_R8169 is not set |
437 | # CONFIG_SKGE is not set | ||
424 | # CONFIG_SK98LIN is not set | 438 | # CONFIG_SK98LIN is not set |
425 | # CONFIG_TIGON3 is not set | 439 | # CONFIG_TIGON3 is not set |
440 | # CONFIG_BNX2 is not set | ||
441 | CONFIG_MV643XX_ETH=y | ||
442 | CONFIG_MV643XX_ETH_0=y | ||
443 | # CONFIG_MV643XX_ETH_1 is not set | ||
444 | # CONFIG_MV643XX_ETH_2 is not set | ||
426 | 445 | ||
427 | # | 446 | # |
428 | # Ethernet (10000 Mbit) | 447 | # Ethernet (10000 Mbit) |
@@ -448,9 +467,10 @@ CONFIG_EEPRO100=y | |||
448 | # CONFIG_HIPPI is not set | 467 | # CONFIG_HIPPI is not set |
449 | # CONFIG_PPP is not set | 468 | # CONFIG_PPP is not set |
450 | # CONFIG_SLIP is not set | 469 | # CONFIG_SLIP is not set |
451 | # CONFIG_RCPCI is not set | ||
452 | # CONFIG_SHAPER is not set | 470 | # CONFIG_SHAPER is not set |
453 | # CONFIG_NETCONSOLE is not set | 471 | # CONFIG_NETCONSOLE is not set |
472 | # CONFIG_NETPOLL is not set | ||
473 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
454 | 474 | ||
455 | # | 475 | # |
456 | # ISDN subsystem | 476 | # ISDN subsystem |
@@ -465,47 +485,59 @@ CONFIG_EEPRO100=y | |||
465 | # | 485 | # |
466 | # Input device support | 486 | # Input device support |
467 | # | 487 | # |
468 | # CONFIG_INPUT is not set | 488 | CONFIG_INPUT=y |
469 | 489 | ||
470 | # | 490 | # |
471 | # Userland interfaces | 491 | # Userland interfaces |
472 | # | 492 | # |
493 | CONFIG_INPUT_MOUSEDEV=y | ||
494 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
495 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
496 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
497 | # CONFIG_INPUT_JOYDEV is not set | ||
498 | # CONFIG_INPUT_TSDEV is not set | ||
499 | # CONFIG_INPUT_EVDEV is not set | ||
500 | # CONFIG_INPUT_EVBUG is not set | ||
473 | 501 | ||
474 | # | 502 | # |
475 | # Input I/O drivers | 503 | # Input Device Drivers |
476 | # | 504 | # |
477 | # CONFIG_GAMEPORT is not set | 505 | # CONFIG_INPUT_KEYBOARD is not set |
478 | CONFIG_SOUND_GAMEPORT=y | 506 | # CONFIG_INPUT_MOUSE is not set |
479 | # CONFIG_SERIO is not set | 507 | # CONFIG_INPUT_JOYSTICK is not set |
480 | # CONFIG_SERIO_I8042 is not set | 508 | # CONFIG_INPUT_TOUCHSCREEN is not set |
509 | # CONFIG_INPUT_MISC is not set | ||
481 | 510 | ||
482 | # | 511 | # |
483 | # Input Device Drivers | 512 | # Hardware I/O ports |
484 | # | 513 | # |
514 | # CONFIG_SERIO is not set | ||
515 | # CONFIG_GAMEPORT is not set | ||
485 | 516 | ||
486 | # | 517 | # |
487 | # Character devices | 518 | # Character devices |
488 | # | 519 | # |
489 | # CONFIG_VT is not set | 520 | CONFIG_VT=y |
521 | CONFIG_VT_CONSOLE=y | ||
522 | CONFIG_HW_CONSOLE=y | ||
490 | # CONFIG_SERIAL_NONSTANDARD is not set | 523 | # CONFIG_SERIAL_NONSTANDARD is not set |
491 | 524 | ||
492 | # | 525 | # |
493 | # Serial drivers | 526 | # Serial drivers |
494 | # | 527 | # |
495 | CONFIG_SERIAL_8250=y | 528 | # CONFIG_SERIAL_8250 is not set |
496 | CONFIG_SERIAL_8250_CONSOLE=y | ||
497 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
498 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
499 | 529 | ||
500 | # | 530 | # |
501 | # Non-8250 serial port support | 531 | # Non-8250 serial port support |
502 | # | 532 | # |
533 | CONFIG_SERIAL_MPSC=y | ||
534 | CONFIG_SERIAL_MPSC_CONSOLE=y | ||
503 | CONFIG_SERIAL_CORE=y | 535 | CONFIG_SERIAL_CORE=y |
504 | CONFIG_SERIAL_CORE_CONSOLE=y | 536 | CONFIG_SERIAL_CORE_CONSOLE=y |
537 | # CONFIG_SERIAL_JSM is not set | ||
505 | CONFIG_UNIX98_PTYS=y | 538 | CONFIG_UNIX98_PTYS=y |
506 | CONFIG_LEGACY_PTYS=y | 539 | CONFIG_LEGACY_PTYS=y |
507 | CONFIG_LEGACY_PTY_COUNT=256 | 540 | CONFIG_LEGACY_PTY_COUNT=256 |
508 | # CONFIG_QIC02_TAPE is not set | ||
509 | 541 | ||
510 | # | 542 | # |
511 | # IPMI | 543 | # IPMI |
@@ -526,15 +558,31 @@ CONFIG_GEN_RTC=y | |||
526 | # | 558 | # |
527 | # Ftape, the floppy tape device driver | 559 | # Ftape, the floppy tape device driver |
528 | # | 560 | # |
529 | # CONFIG_FTAPE is not set | ||
530 | # CONFIG_AGP is not set | 561 | # CONFIG_AGP is not set |
531 | # CONFIG_DRM is not set | 562 | # CONFIG_DRM is not set |
532 | # CONFIG_RAW_DRIVER is not set | 563 | # CONFIG_RAW_DRIVER is not set |
533 | 564 | ||
534 | # | 565 | # |
566 | # TPM devices | ||
567 | # | ||
568 | # CONFIG_TCG_TPM is not set | ||
569 | |||
570 | # | ||
535 | # I2C support | 571 | # I2C support |
536 | # | 572 | # |
537 | # CONFIG_I2C is not set | 573 | # CONFIG_I2C is not set |
574 | # CONFIG_I2C_SENSOR is not set | ||
575 | |||
576 | # | ||
577 | # Dallas's 1-wire bus | ||
578 | # | ||
579 | # CONFIG_W1 is not set | ||
580 | |||
581 | # | ||
582 | # Hardware Monitoring support | ||
583 | # | ||
584 | CONFIG_HWMON=y | ||
585 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
538 | 586 | ||
539 | # | 587 | # |
540 | # Misc devices | 588 | # Misc devices |
@@ -556,6 +604,12 @@ CONFIG_GEN_RTC=y | |||
556 | # CONFIG_FB is not set | 604 | # CONFIG_FB is not set |
557 | 605 | ||
558 | # | 606 | # |
607 | # Console display driver support | ||
608 | # | ||
609 | # CONFIG_VGA_CONSOLE is not set | ||
610 | CONFIG_DUMMY_CONSOLE=y | ||
611 | |||
612 | # | ||
559 | # Sound | 613 | # Sound |
560 | # | 614 | # |
561 | # CONFIG_SOUND is not set | 615 | # CONFIG_SOUND is not set |
@@ -563,6 +617,8 @@ CONFIG_GEN_RTC=y | |||
563 | # | 617 | # |
564 | # USB support | 618 | # USB support |
565 | # | 619 | # |
620 | CONFIG_USB_ARCH_HAS_HCD=y | ||
621 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
566 | # CONFIG_USB is not set | 622 | # CONFIG_USB is not set |
567 | 623 | ||
568 | # | 624 | # |
@@ -571,18 +627,40 @@ CONFIG_GEN_RTC=y | |||
571 | # CONFIG_USB_GADGET is not set | 627 | # CONFIG_USB_GADGET is not set |
572 | 628 | ||
573 | # | 629 | # |
630 | # MMC/SD Card support | ||
631 | # | ||
632 | # CONFIG_MMC is not set | ||
633 | |||
634 | # | ||
635 | # InfiniBand support | ||
636 | # | ||
637 | # CONFIG_INFINIBAND is not set | ||
638 | |||
639 | # | ||
640 | # SN Devices | ||
641 | # | ||
642 | |||
643 | # | ||
574 | # File systems | 644 | # File systems |
575 | # | 645 | # |
576 | CONFIG_EXT2_FS=y | 646 | CONFIG_EXT2_FS=y |
577 | # CONFIG_EXT2_FS_XATTR is not set | 647 | # CONFIG_EXT2_FS_XATTR is not set |
648 | # CONFIG_EXT2_FS_XIP is not set | ||
578 | # CONFIG_EXT3_FS is not set | 649 | # CONFIG_EXT3_FS is not set |
579 | # CONFIG_JBD is not set | 650 | # CONFIG_JBD is not set |
580 | # CONFIG_REISERFS_FS is not set | 651 | # CONFIG_REISERFS_FS is not set |
581 | # CONFIG_JFS_FS is not set | 652 | # CONFIG_JFS_FS is not set |
653 | # CONFIG_FS_POSIX_ACL is not set | ||
654 | |||
655 | # | ||
656 | # XFS support | ||
657 | # | ||
582 | # CONFIG_XFS_FS is not set | 658 | # CONFIG_XFS_FS is not set |
583 | # CONFIG_MINIX_FS is not set | 659 | # CONFIG_MINIX_FS is not set |
584 | # CONFIG_ROMFS_FS is not set | 660 | # CONFIG_ROMFS_FS is not set |
661 | CONFIG_INOTIFY=y | ||
585 | # CONFIG_QUOTA is not set | 662 | # CONFIG_QUOTA is not set |
663 | CONFIG_DNOTIFY=y | ||
586 | # CONFIG_AUTOFS_FS is not set | 664 | # CONFIG_AUTOFS_FS is not set |
587 | # CONFIG_AUTOFS4_FS is not set | 665 | # CONFIG_AUTOFS4_FS is not set |
588 | 666 | ||
@@ -595,7 +673,8 @@ CONFIG_EXT2_FS=y | |||
595 | # | 673 | # |
596 | # DOS/FAT/NT Filesystems | 674 | # DOS/FAT/NT Filesystems |
597 | # | 675 | # |
598 | # CONFIG_FAT_FS is not set | 676 | # CONFIG_MSDOS_FS is not set |
677 | # CONFIG_VFAT_FS is not set | ||
599 | # CONFIG_NTFS_FS is not set | 678 | # CONFIG_NTFS_FS is not set |
600 | 679 | ||
601 | # | 680 | # |
@@ -604,9 +683,9 @@ CONFIG_EXT2_FS=y | |||
604 | CONFIG_PROC_FS=y | 683 | CONFIG_PROC_FS=y |
605 | CONFIG_PROC_KCORE=y | 684 | CONFIG_PROC_KCORE=y |
606 | CONFIG_SYSFS=y | 685 | CONFIG_SYSFS=y |
607 | # CONFIG_DEVFS_FS is not set | ||
608 | # CONFIG_DEVPTS_FS_XATTR is not set | 686 | # CONFIG_DEVPTS_FS_XATTR is not set |
609 | CONFIG_TMPFS=y | 687 | CONFIG_TMPFS=y |
688 | # CONFIG_TMPFS_XATTR is not set | ||
610 | # CONFIG_HUGETLB_PAGE is not set | 689 | # CONFIG_HUGETLB_PAGE is not set |
611 | CONFIG_RAMFS=y | 690 | CONFIG_RAMFS=y |
612 | 691 | ||
@@ -620,6 +699,14 @@ CONFIG_RAMFS=y | |||
620 | # CONFIG_BEFS_FS is not set | 699 | # CONFIG_BEFS_FS is not set |
621 | # CONFIG_BFS_FS is not set | 700 | # CONFIG_BFS_FS is not set |
622 | # CONFIG_EFS_FS is not set | 701 | # CONFIG_EFS_FS is not set |
702 | # CONFIG_JFFS_FS is not set | ||
703 | CONFIG_JFFS2_FS=y | ||
704 | CONFIG_JFFS2_FS_DEBUG=0 | ||
705 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
706 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
707 | CONFIG_JFFS2_ZLIB=y | ||
708 | CONFIG_JFFS2_RTIME=y | ||
709 | # CONFIG_JFFS2_RUBIN is not set | ||
623 | # CONFIG_CRAMFS is not set | 710 | # CONFIG_CRAMFS is not set |
624 | # CONFIG_VXFS_FS is not set | 711 | # CONFIG_VXFS_FS is not set |
625 | # CONFIG_HPFS_FS is not set | 712 | # CONFIG_HPFS_FS is not set |
@@ -631,20 +718,22 @@ CONFIG_RAMFS=y | |||
631 | # Network File Systems | 718 | # Network File Systems |
632 | # | 719 | # |
633 | CONFIG_NFS_FS=y | 720 | CONFIG_NFS_FS=y |
634 | # CONFIG_NFS_V3 is not set | 721 | CONFIG_NFS_V3=y |
722 | # CONFIG_NFS_V3_ACL is not set | ||
635 | # CONFIG_NFS_V4 is not set | 723 | # CONFIG_NFS_V4 is not set |
636 | # CONFIG_NFS_DIRECTIO is not set | 724 | # CONFIG_NFS_DIRECTIO is not set |
637 | # CONFIG_NFSD is not set | 725 | # CONFIG_NFSD is not set |
638 | CONFIG_ROOT_NFS=y | 726 | CONFIG_ROOT_NFS=y |
639 | CONFIG_LOCKD=y | 727 | CONFIG_LOCKD=y |
640 | # CONFIG_EXPORTFS is not set | 728 | CONFIG_LOCKD_V4=y |
729 | CONFIG_NFS_COMMON=y | ||
641 | CONFIG_SUNRPC=y | 730 | CONFIG_SUNRPC=y |
642 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 731 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
732 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
643 | # CONFIG_SMB_FS is not set | 733 | # CONFIG_SMB_FS is not set |
644 | # CONFIG_CIFS is not set | 734 | # CONFIG_CIFS is not set |
645 | # CONFIG_NCP_FS is not set | 735 | # CONFIG_NCP_FS is not set |
646 | # CONFIG_CODA_FS is not set | 736 | # CONFIG_CODA_FS is not set |
647 | # CONFIG_INTERMEZZO_FS is not set | ||
648 | # CONFIG_AFS_FS is not set | 737 | # CONFIG_AFS_FS is not set |
649 | 738 | ||
650 | # | 739 | # |
@@ -661,20 +750,35 @@ CONFIG_MSDOS_PARTITION=y | |||
661 | # | 750 | # |
662 | # Library routines | 751 | # Library routines |
663 | # | 752 | # |
664 | # CONFIG_CRC32 is not set | 753 | # CONFIG_CRC_CCITT is not set |
754 | CONFIG_CRC32=y | ||
755 | # CONFIG_LIBCRC32C is not set | ||
756 | CONFIG_ZLIB_INFLATE=y | ||
757 | CONFIG_ZLIB_DEFLATE=y | ||
758 | |||
759 | # | ||
760 | # Profiling support | ||
761 | # | ||
762 | # CONFIG_PROFILING is not set | ||
665 | 763 | ||
666 | # | 764 | # |
667 | # Kernel hacking | 765 | # Kernel hacking |
668 | # | 766 | # |
767 | # CONFIG_PRINTK_TIME is not set | ||
669 | # CONFIG_DEBUG_KERNEL is not set | 768 | # CONFIG_DEBUG_KERNEL is not set |
670 | # CONFIG_SERIAL_TEXT_DEBUG is not set | 769 | CONFIG_LOG_BUF_SHIFT=14 |
671 | 770 | ||
672 | # | 771 | # |
673 | # Security options | 772 | # Security options |
674 | # | 773 | # |
774 | # CONFIG_KEYS is not set | ||
675 | # CONFIG_SECURITY is not set | 775 | # CONFIG_SECURITY is not set |
676 | 776 | ||
677 | # | 777 | # |
678 | # Cryptographic options | 778 | # Cryptographic options |
679 | # | 779 | # |
680 | # CONFIG_CRYPTO is not set | 780 | # CONFIG_CRYPTO is not set |
781 | |||
782 | # | ||
783 | # Hardware crypto devices | ||
784 | # | ||
diff --git a/arch/ppc/configs/katana_defconfig b/arch/ppc/configs/katana_defconfig index f0b0d5720154..0f3bb9af9c22 100644 --- a/arch/ppc/configs/katana_defconfig +++ b/arch/ppc/configs/katana_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.13-mm1 |
4 | # Tue Mar 8 17:31:00 2005 | 4 | # Thu Sep 1 17:16:03 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,28 +19,31 @@ 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 |
24 | # | 26 | # |
25 | CONFIG_LOCALVERSION="" | 27 | CONFIG_LOCALVERSION="" |
28 | CONFIG_LOCALVERSION_AUTO=y | ||
26 | CONFIG_SWAP=y | 29 | CONFIG_SWAP=y |
27 | CONFIG_SYSVIPC=y | 30 | CONFIG_SYSVIPC=y |
28 | # CONFIG_POSIX_MQUEUE is not set | 31 | # CONFIG_POSIX_MQUEUE is not set |
29 | # CONFIG_BSD_PROCESS_ACCT is not set | 32 | # CONFIG_BSD_PROCESS_ACCT is not set |
30 | CONFIG_SYSCTL=y | 33 | CONFIG_SYSCTL=y |
31 | # CONFIG_AUDIT is not set | 34 | # CONFIG_AUDIT is not set |
32 | CONFIG_LOG_BUF_SHIFT=14 | ||
33 | # CONFIG_HOTPLUG is not set | 35 | # CONFIG_HOTPLUG is not set |
34 | CONFIG_KOBJECT_UEVENT=y | 36 | CONFIG_KOBJECT_UEVENT=y |
35 | # CONFIG_IKCONFIG is not set | 37 | # CONFIG_IKCONFIG is not set |
38 | CONFIG_INITRAMFS_SOURCE="" | ||
36 | # CONFIG_EMBEDDED is not set | 39 | # CONFIG_EMBEDDED is not set |
37 | CONFIG_KALLSYMS=y | 40 | CONFIG_KALLSYMS=y |
38 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | 41 | # CONFIG_KALLSYMS_EXTRA_PASS is not set |
42 | CONFIG_PRINTK=y | ||
43 | CONFIG_BUG=y | ||
39 | CONFIG_BASE_FULL=y | 44 | CONFIG_BASE_FULL=y |
40 | CONFIG_FUTEX=y | 45 | CONFIG_FUTEX=y |
41 | CONFIG_EPOLL=y | 46 | CONFIG_EPOLL=y |
42 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
43 | CONFIG_SHMEM=y | 47 | CONFIG_SHMEM=y |
44 | CONFIG_CC_ALIGN_FUNCTIONS=0 | 48 | CONFIG_CC_ALIGN_FUNCTIONS=0 |
45 | CONFIG_CC_ALIGN_LABELS=0 | 49 | CONFIG_CC_ALIGN_LABELS=0 |
@@ -68,15 +72,23 @@ CONFIG_6xx=y | |||
68 | # CONFIG_POWER3 is not set | 72 | # CONFIG_POWER3 is not set |
69 | # CONFIG_POWER4 is not set | 73 | # CONFIG_POWER4 is not set |
70 | # CONFIG_8xx is not set | 74 | # CONFIG_8xx is not set |
75 | # CONFIG_E200 is not set | ||
71 | # CONFIG_E500 is not set | 76 | # CONFIG_E500 is not set |
77 | CONFIG_PPC_FPU=y | ||
72 | CONFIG_ALTIVEC=y | 78 | CONFIG_ALTIVEC=y |
73 | # CONFIG_TAU is not set | 79 | # CONFIG_TAU is not set |
80 | # CONFIG_KEXEC is not set | ||
74 | # CONFIG_CPU_FREQ is not set | 81 | # CONFIG_CPU_FREQ is not set |
75 | # CONFIG_83xx is not set | 82 | # CONFIG_WANT_EARLY_SERIAL is not set |
76 | CONFIG_PPC_STD_MMU=y | 83 | CONFIG_PPC_STD_MMU=y |
77 | CONFIG_NOT_COHERENT_CACHE=y | 84 | CONFIG_NOT_COHERENT_CACHE=y |
78 | 85 | ||
79 | # | 86 | # |
87 | # Performance-monitoring counters support | ||
88 | # | ||
89 | # CONFIG_PERFCTR is not set | ||
90 | |||
91 | # | ||
80 | # Platform options | 92 | # Platform options |
81 | # | 93 | # |
82 | # CONFIG_PPC_MULTIPLATFORM is not set | 94 | # CONFIG_PPC_MULTIPLATFORM is not set |
@@ -84,21 +96,18 @@ CONFIG_NOT_COHERENT_CACHE=y | |||
84 | CONFIG_KATANA=y | 96 | CONFIG_KATANA=y |
85 | # CONFIG_WILLOW is not set | 97 | # CONFIG_WILLOW is not set |
86 | # CONFIG_CPCI690 is not set | 98 | # CONFIG_CPCI690 is not set |
87 | # CONFIG_PCORE is not set | ||
88 | # CONFIG_POWERPMC250 is not set | 99 | # CONFIG_POWERPMC250 is not set |
89 | # CONFIG_CHESTNUT is not set | 100 | # CONFIG_CHESTNUT is not set |
90 | # CONFIG_SPRUCE is not set | 101 | # CONFIG_SPRUCE is not set |
102 | # CONFIG_HDPU is not set | ||
91 | # CONFIG_EV64260 is not set | 103 | # CONFIG_EV64260 is not set |
92 | # CONFIG_LOPEC is not set | 104 | # CONFIG_LOPEC is not set |
93 | # CONFIG_MCPN765 is not set | ||
94 | # CONFIG_MVME5100 is not set | 105 | # CONFIG_MVME5100 is not set |
95 | # CONFIG_PPLUS is not set | 106 | # CONFIG_PPLUS is not set |
96 | # CONFIG_PRPMC750 is not set | 107 | # CONFIG_PRPMC750 is not set |
97 | # CONFIG_PRPMC800 is not set | 108 | # CONFIG_PRPMC800 is not set |
98 | # CONFIG_SANDPOINT is not set | 109 | # CONFIG_SANDPOINT is not set |
99 | # CONFIG_RADSTONE_PPC7D is not set | 110 | # CONFIG_RADSTONE_PPC7D is not set |
100 | # CONFIG_ADIR is not set | ||
101 | # CONFIG_K2 is not set | ||
102 | # CONFIG_PAL4 is not set | 111 | # CONFIG_PAL4 is not set |
103 | # CONFIG_GEMINI is not set | 112 | # CONFIG_GEMINI is not set |
104 | # CONFIG_EST8260 is not set | 113 | # CONFIG_EST8260 is not set |
@@ -109,6 +118,8 @@ CONFIG_KATANA=y | |||
109 | # CONFIG_ADS8272 is not set | 118 | # CONFIG_ADS8272 is not set |
110 | # CONFIG_PQ2FADS is not set | 119 | # CONFIG_PQ2FADS is not set |
111 | # CONFIG_LITE5200 is not set | 120 | # CONFIG_LITE5200 is not set |
121 | # CONFIG_MPC834x_SYS is not set | ||
122 | # CONFIG_EV64360 is not set | ||
112 | CONFIG_MV64360=y | 123 | CONFIG_MV64360=y |
113 | CONFIG_MV64X60=y | 124 | CONFIG_MV64X60=y |
114 | 125 | ||
@@ -118,12 +129,28 @@ CONFIG_MV64X60=y | |||
118 | CONFIG_MV64X60_BASE=0xf8100000 | 129 | CONFIG_MV64X60_BASE=0xf8100000 |
119 | CONFIG_MV64X60_NEW_BASE=0xf8100000 | 130 | CONFIG_MV64X60_NEW_BASE=0xf8100000 |
120 | # CONFIG_SMP is not set | 131 | # CONFIG_SMP is not set |
132 | CONFIG_HIGHMEM=y | ||
133 | # CONFIG_HZ_100 is not set | ||
134 | CONFIG_HZ_250=y | ||
135 | # CONFIG_HZ_1000 is not set | ||
136 | CONFIG_HZ=250 | ||
137 | CONFIG_PREEMPT_NONE=y | ||
138 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
121 | # CONFIG_PREEMPT is not set | 139 | # CONFIG_PREEMPT is not set |
122 | # CONFIG_HIGHMEM is not set | 140 | CONFIG_SELECT_MEMORY_MODEL=y |
141 | CONFIG_FLATMEM_MANUAL=y | ||
142 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
143 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
144 | CONFIG_FLATMEM=y | ||
145 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
146 | # CONFIG_SPARSEMEM_STATIC is not set | ||
123 | CONFIG_BINFMT_ELF=y | 147 | CONFIG_BINFMT_ELF=y |
124 | CONFIG_BINFMT_MISC=y | 148 | CONFIG_BINFMT_MISC=y |
125 | CONFIG_CMDLINE_BOOL=y | 149 | CONFIG_CMDLINE_BOOL=y |
126 | CONFIG_CMDLINE="console=ttyMM0,9600 ip=on" | 150 | CONFIG_CMDLINE="console=ttyMM0 ip=on" |
151 | # CONFIG_PM is not set | ||
152 | CONFIG_SECCOMP=y | ||
153 | CONFIG_ISA_DMA_API=y | ||
127 | 154 | ||
128 | # | 155 | # |
129 | # Bus options | 156 | # Bus options |
@@ -132,7 +159,6 @@ CONFIG_GENERIC_ISA_DMA=y | |||
132 | CONFIG_PCI=y | 159 | CONFIG_PCI=y |
133 | CONFIG_PCI_DOMAINS=y | 160 | CONFIG_PCI_DOMAINS=y |
134 | CONFIG_PCI_LEGACY_PROC=y | 161 | CONFIG_PCI_LEGACY_PROC=y |
135 | CONFIG_PCI_NAMES=y | ||
136 | 162 | ||
137 | # | 163 | # |
138 | # PCCARD (PCMCIA/CardBus) support | 164 | # PCCARD (PCMCIA/CardBus) support |
@@ -140,13 +166,10 @@ CONFIG_PCI_NAMES=y | |||
140 | # CONFIG_PCCARD is not set | 166 | # CONFIG_PCCARD is not set |
141 | 167 | ||
142 | # | 168 | # |
143 | # PC-card bridges | ||
144 | # | ||
145 | |||
146 | # | ||
147 | # Advanced setup | 169 | # Advanced setup |
148 | # | 170 | # |
149 | CONFIG_ADVANCED_OPTIONS=y | 171 | CONFIG_ADVANCED_OPTIONS=y |
172 | # CONFIG_HIGHMEM_START_BOOL is not set | ||
150 | CONFIG_HIGHMEM_START=0xfe000000 | 173 | CONFIG_HIGHMEM_START=0xfe000000 |
151 | # CONFIG_LOWMEM_SIZE_BOOL is not set | 174 | # CONFIG_LOWMEM_SIZE_BOOL is not set |
152 | CONFIG_LOWMEM_SIZE=0x30000000 | 175 | CONFIG_LOWMEM_SIZE=0x30000000 |
@@ -162,6 +185,76 @@ CONFIG_CONSISTENT_SIZE=0x00400000 | |||
162 | CONFIG_BOOT_LOAD=0x00800000 | 185 | CONFIG_BOOT_LOAD=0x00800000 |
163 | 186 | ||
164 | # | 187 | # |
188 | # Networking | ||
189 | # | ||
190 | CONFIG_NET=y | ||
191 | |||
192 | # | ||
193 | # Networking options | ||
194 | # | ||
195 | CONFIG_PACKET=y | ||
196 | # CONFIG_PACKET_MMAP is not set | ||
197 | CONFIG_UNIX=y | ||
198 | # CONFIG_NET_KEY is not set | ||
199 | CONFIG_INET=y | ||
200 | CONFIG_IP_MULTICAST=y | ||
201 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
202 | CONFIG_IP_FIB_HASH=y | ||
203 | CONFIG_IP_PNP=y | ||
204 | CONFIG_IP_PNP_DHCP=y | ||
205 | # CONFIG_IP_PNP_BOOTP is not set | ||
206 | # CONFIG_IP_PNP_RARP is not set | ||
207 | # CONFIG_NET_IPIP is not set | ||
208 | # CONFIG_NET_IPGRE is not set | ||
209 | # CONFIG_IP_MROUTE is not set | ||
210 | # CONFIG_ARPD is not set | ||
211 | CONFIG_SYN_COOKIES=y | ||
212 | # CONFIG_INET_AH is not set | ||
213 | # CONFIG_INET_ESP is not set | ||
214 | # CONFIG_INET_IPCOMP is not set | ||
215 | # CONFIG_INET_TUNNEL is not set | ||
216 | CONFIG_INET_DIAG=y | ||
217 | CONFIG_INET_TCP_DIAG=y | ||
218 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
219 | CONFIG_TCP_CONG_BIC=y | ||
220 | # CONFIG_IPV6 is not set | ||
221 | # CONFIG_NETFILTER is not set | ||
222 | |||
223 | # | ||
224 | # DCCP Configuration (EXPERIMENTAL) | ||
225 | # | ||
226 | # CONFIG_IP_DCCP is not set | ||
227 | |||
228 | # | ||
229 | # SCTP Configuration (EXPERIMENTAL) | ||
230 | # | ||
231 | # CONFIG_IP_SCTP is not set | ||
232 | # CONFIG_ATM is not set | ||
233 | # CONFIG_BRIDGE is not set | ||
234 | # CONFIG_VLAN_8021Q is not set | ||
235 | # CONFIG_DECNET is not set | ||
236 | # CONFIG_LLC2 is not set | ||
237 | # CONFIG_IPX is not set | ||
238 | # CONFIG_ATALK is not set | ||
239 | # CONFIG_X25 is not set | ||
240 | # CONFIG_LAPB is not set | ||
241 | # CONFIG_NET_DIVERT is not set | ||
242 | # CONFIG_ECONET is not set | ||
243 | # CONFIG_WAN_ROUTER is not set | ||
244 | # CONFIG_NET_SCHED is not set | ||
245 | # CONFIG_NET_CLS_ROUTE is not set | ||
246 | |||
247 | # | ||
248 | # Network testing | ||
249 | # | ||
250 | # CONFIG_NET_PKTGEN is not set | ||
251 | # CONFIG_NETFILTER_NETLINK is not set | ||
252 | # CONFIG_HAMRADIO is not set | ||
253 | # CONFIG_IRDA is not set | ||
254 | # CONFIG_BT is not set | ||
255 | # CONFIG_IEEE80211 is not set | ||
256 | |||
257 | # | ||
165 | # Device Drivers | 258 | # Device Drivers |
166 | # | 259 | # |
167 | 260 | ||
@@ -177,8 +270,8 @@ CONFIG_PREVENT_FIRMWARE_BUILD=y | |||
177 | # | 270 | # |
178 | CONFIG_MTD=y | 271 | CONFIG_MTD=y |
179 | # CONFIG_MTD_DEBUG is not set | 272 | # CONFIG_MTD_DEBUG is not set |
180 | CONFIG_MTD_PARTITIONS=y | ||
181 | CONFIG_MTD_CONCAT=y | 273 | CONFIG_MTD_CONCAT=y |
274 | CONFIG_MTD_PARTITIONS=y | ||
182 | # CONFIG_MTD_REDBOOT_PARTS is not set | 275 | # CONFIG_MTD_REDBOOT_PARTS is not set |
183 | # CONFIG_MTD_CMDLINE_PARTS is not set | 276 | # CONFIG_MTD_CMDLINE_PARTS is not set |
184 | 277 | ||
@@ -212,6 +305,7 @@ CONFIG_MTD_MAP_BANK_WIDTH_4=y | |||
212 | CONFIG_MTD_CFI_I2=y | 305 | CONFIG_MTD_CFI_I2=y |
213 | # CONFIG_MTD_CFI_I4 is not set | 306 | # CONFIG_MTD_CFI_I4 is not set |
214 | # CONFIG_MTD_CFI_I8 is not set | 307 | # CONFIG_MTD_CFI_I8 is not set |
308 | # CONFIG_MTD_OTP is not set | ||
215 | CONFIG_MTD_CFI_INTELEXT=y | 309 | CONFIG_MTD_CFI_INTELEXT=y |
216 | # CONFIG_MTD_CFI_AMDSTD is not set | 310 | # CONFIG_MTD_CFI_AMDSTD is not set |
217 | # CONFIG_MTD_CFI_STAA is not set | 311 | # CONFIG_MTD_CFI_STAA is not set |
@@ -219,7 +313,6 @@ CONFIG_MTD_CFI_UTIL=y | |||
219 | # CONFIG_MTD_RAM is not set | 313 | # CONFIG_MTD_RAM is not set |
220 | # CONFIG_MTD_ROM is not set | 314 | # CONFIG_MTD_ROM is not set |
221 | # CONFIG_MTD_ABSENT is not set | 315 | # CONFIG_MTD_ABSENT is not set |
222 | # CONFIG_MTD_XIP is not set | ||
223 | 316 | ||
224 | # | 317 | # |
225 | # Mapping drivers for chip access | 318 | # Mapping drivers for chip access |
@@ -229,6 +322,7 @@ CONFIG_MTD_PHYSMAP=y | |||
229 | CONFIG_MTD_PHYSMAP_START=0xe0000000 | 322 | CONFIG_MTD_PHYSMAP_START=0xe0000000 |
230 | CONFIG_MTD_PHYSMAP_LEN=0x0 | 323 | CONFIG_MTD_PHYSMAP_LEN=0x0 |
231 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 | 324 | CONFIG_MTD_PHYSMAP_BANKWIDTH=4 |
325 | # CONFIG_MTD_PLATRAM is not set | ||
232 | 326 | ||
233 | # | 327 | # |
234 | # Self-contained MTD device drivers | 328 | # Self-contained MTD device drivers |
@@ -278,7 +372,6 @@ CONFIG_BLK_DEV_RAM=y | |||
278 | CONFIG_BLK_DEV_RAM_COUNT=16 | 372 | CONFIG_BLK_DEV_RAM_COUNT=16 |
279 | CONFIG_BLK_DEV_RAM_SIZE=4096 | 373 | CONFIG_BLK_DEV_RAM_SIZE=4096 |
280 | CONFIG_BLK_DEV_INITRD=y | 374 | CONFIG_BLK_DEV_INITRD=y |
281 | CONFIG_INITRAMFS_SOURCE="" | ||
282 | # CONFIG_LBD is not set | 375 | # CONFIG_LBD is not set |
283 | # CONFIG_CDROM_PKTCDVD is not set | 376 | # CONFIG_CDROM_PKTCDVD is not set |
284 | 377 | ||
@@ -299,6 +392,7 @@ CONFIG_IOSCHED_CFQ=y | |||
299 | # | 392 | # |
300 | # SCSI device support | 393 | # SCSI device support |
301 | # | 394 | # |
395 | # CONFIG_RAID_ATTRS is not set | ||
302 | # CONFIG_SCSI is not set | 396 | # CONFIG_SCSI is not set |
303 | 397 | ||
304 | # | 398 | # |
@@ -309,6 +403,7 @@ CONFIG_IOSCHED_CFQ=y | |||
309 | # | 403 | # |
310 | # Fusion MPT device support | 404 | # Fusion MPT device support |
311 | # | 405 | # |
406 | # CONFIG_FUSION is not set | ||
312 | 407 | ||
313 | # | 408 | # |
314 | # IEEE 1394 (FireWire) support | 409 | # IEEE 1394 (FireWire) support |
@@ -325,71 +420,8 @@ CONFIG_IOSCHED_CFQ=y | |||
325 | # | 420 | # |
326 | 421 | ||
327 | # | 422 | # |
328 | # Networking support | 423 | # Network device support |
329 | # | ||
330 | CONFIG_NET=y | ||
331 | |||
332 | # | ||
333 | # Networking options | ||
334 | # | ||
335 | CONFIG_PACKET=y | ||
336 | # CONFIG_PACKET_MMAP is not set | ||
337 | # CONFIG_NETLINK_DEV is not set | ||
338 | CONFIG_UNIX=y | ||
339 | # CONFIG_NET_KEY is not set | ||
340 | CONFIG_INET=y | ||
341 | CONFIG_IP_MULTICAST=y | ||
342 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
343 | CONFIG_IP_PNP=y | ||
344 | CONFIG_IP_PNP_DHCP=y | ||
345 | # CONFIG_IP_PNP_BOOTP is not set | ||
346 | # CONFIG_IP_PNP_RARP is not set | ||
347 | # CONFIG_NET_IPIP is not set | ||
348 | # CONFIG_NET_IPGRE is not set | ||
349 | # CONFIG_IP_MROUTE is not set | ||
350 | # CONFIG_ARPD is not set | ||
351 | CONFIG_SYN_COOKIES=y | ||
352 | # CONFIG_INET_AH is not set | ||
353 | # CONFIG_INET_ESP is not set | ||
354 | # CONFIG_INET_IPCOMP is not set | ||
355 | # CONFIG_INET_TUNNEL is not set | ||
356 | CONFIG_IP_TCPDIAG=y | ||
357 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
358 | # CONFIG_IPV6 is not set | ||
359 | # CONFIG_NETFILTER is not set | ||
360 | |||
361 | # | ||
362 | # SCTP Configuration (EXPERIMENTAL) | ||
363 | # | ||
364 | # CONFIG_IP_SCTP is not set | ||
365 | # CONFIG_ATM is not set | ||
366 | # CONFIG_BRIDGE is not set | ||
367 | # CONFIG_VLAN_8021Q is not set | ||
368 | # CONFIG_DECNET is not set | ||
369 | # CONFIG_LLC2 is not set | ||
370 | # CONFIG_IPX is not set | ||
371 | # CONFIG_ATALK is not set | ||
372 | # CONFIG_X25 is not set | ||
373 | # CONFIG_LAPB is not set | ||
374 | # CONFIG_NET_DIVERT is not set | ||
375 | # CONFIG_ECONET is not set | ||
376 | # CONFIG_WAN_ROUTER is not set | ||
377 | |||
378 | # | ||
379 | # QoS and/or fair queueing | ||
380 | # | ||
381 | # CONFIG_NET_SCHED is not set | ||
382 | # CONFIG_NET_CLS_ROUTE is not set | ||
383 | |||
384 | # | ||
385 | # Network testing | ||
386 | # | 424 | # |
387 | # CONFIG_NET_PKTGEN is not set | ||
388 | # CONFIG_NETPOLL is not set | ||
389 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
390 | # CONFIG_HAMRADIO is not set | ||
391 | # CONFIG_IRDA is not set | ||
392 | # CONFIG_BT is not set | ||
393 | CONFIG_NETDEVICES=y | 425 | CONFIG_NETDEVICES=y |
394 | # CONFIG_DUMMY is not set | 426 | # CONFIG_DUMMY is not set |
395 | # CONFIG_BONDING is not set | 427 | # CONFIG_BONDING is not set |
@@ -402,6 +434,11 @@ CONFIG_NETDEVICES=y | |||
402 | # CONFIG_ARCNET is not set | 434 | # CONFIG_ARCNET is not set |
403 | 435 | ||
404 | # | 436 | # |
437 | # PHY device support | ||
438 | # | ||
439 | # CONFIG_PHYLIB is not set | ||
440 | |||
441 | # | ||
405 | # Ethernet (10 or 100Mbit) | 442 | # Ethernet (10 or 100Mbit) |
406 | # | 443 | # |
407 | CONFIG_NET_ETHERNET=y | 444 | CONFIG_NET_ETHERNET=y |
@@ -422,6 +459,7 @@ CONFIG_TULIP=y | |||
422 | # CONFIG_DE4X5 is not set | 459 | # CONFIG_DE4X5 is not set |
423 | # CONFIG_WINBOND_840 is not set | 460 | # CONFIG_WINBOND_840 is not set |
424 | # CONFIG_DM9102 is not set | 461 | # CONFIG_DM9102 is not set |
462 | # CONFIG_ULI526X is not set | ||
425 | # CONFIG_HP100 is not set | 463 | # CONFIG_HP100 is not set |
426 | CONFIG_NET_PCI=y | 464 | CONFIG_NET_PCI=y |
427 | # CONFIG_PCNET32 is not set | 465 | # CONFIG_PCNET32 is not set |
@@ -448,14 +486,19 @@ CONFIG_E100=y | |||
448 | # | 486 | # |
449 | # CONFIG_ACENIC is not set | 487 | # CONFIG_ACENIC is not set |
450 | # CONFIG_DL2K is not set | 488 | # CONFIG_DL2K is not set |
451 | # CONFIG_E1000 is not set | 489 | CONFIG_E1000=y |
490 | # CONFIG_E1000_NAPI is not set | ||
452 | # CONFIG_NS83820 is not set | 491 | # CONFIG_NS83820 is not set |
453 | # CONFIG_HAMACHI is not set | 492 | # CONFIG_HAMACHI is not set |
454 | # CONFIG_YELLOWFIN is not set | 493 | # CONFIG_YELLOWFIN is not set |
455 | # CONFIG_R8169 is not set | 494 | # CONFIG_R8169 is not set |
495 | # CONFIG_SIS190 is not set | ||
496 | # CONFIG_SKGE is not set | ||
497 | # CONFIG_SKY2 is not set | ||
456 | # CONFIG_SK98LIN is not set | 498 | # CONFIG_SK98LIN is not set |
457 | # CONFIG_VIA_VELOCITY is not set | 499 | # CONFIG_VIA_VELOCITY is not set |
458 | # CONFIG_TIGON3 is not set | 500 | # CONFIG_TIGON3 is not set |
501 | # CONFIG_BNX2 is not set | ||
459 | CONFIG_MV643XX_ETH=y | 502 | CONFIG_MV643XX_ETH=y |
460 | CONFIG_MV643XX_ETH_0=y | 503 | CONFIG_MV643XX_ETH_0=y |
461 | CONFIG_MV643XX_ETH_1=y | 504 | CONFIG_MV643XX_ETH_1=y |
@@ -464,6 +507,7 @@ CONFIG_MV643XX_ETH_2=y | |||
464 | # | 507 | # |
465 | # Ethernet (10000 Mbit) | 508 | # Ethernet (10000 Mbit) |
466 | # | 509 | # |
510 | # CONFIG_CHELSIO_T1 is not set | ||
467 | # CONFIG_IXGB is not set | 511 | # CONFIG_IXGB is not set |
468 | # CONFIG_S2IO is not set | 512 | # CONFIG_S2IO is not set |
469 | 513 | ||
@@ -487,6 +531,11 @@ CONFIG_MV643XX_ETH_2=y | |||
487 | # CONFIG_SLIP is not set | 531 | # CONFIG_SLIP is not set |
488 | # CONFIG_SHAPER is not set | 532 | # CONFIG_SHAPER is not set |
489 | # CONFIG_NETCONSOLE is not set | 533 | # CONFIG_NETCONSOLE is not set |
534 | # CONFIG_KGDBOE is not set | ||
535 | # CONFIG_NETPOLL is not set | ||
536 | # CONFIG_NETPOLL_RX is not set | ||
537 | # CONFIG_NETPOLL_TRAP is not set | ||
538 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
490 | 539 | ||
491 | # | 540 | # |
492 | # ISDN subsystem | 541 | # ISDN subsystem |
@@ -516,14 +565,6 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | |||
516 | # CONFIG_INPUT_EVBUG is not set | 565 | # CONFIG_INPUT_EVBUG is not set |
517 | 566 | ||
518 | # | 567 | # |
519 | # Input I/O drivers | ||
520 | # | ||
521 | # CONFIG_GAMEPORT is not set | ||
522 | CONFIG_SOUND_GAMEPORT=y | ||
523 | # CONFIG_SERIO is not set | ||
524 | # CONFIG_SERIO_I8042 is not set | ||
525 | |||
526 | # | ||
527 | # Input Device Drivers | 568 | # Input Device Drivers |
528 | # | 569 | # |
529 | # CONFIG_INPUT_KEYBOARD is not set | 570 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -533,6 +574,12 @@ CONFIG_SOUND_GAMEPORT=y | |||
533 | # CONFIG_INPUT_MISC is not set | 574 | # CONFIG_INPUT_MISC is not set |
534 | 575 | ||
535 | # | 576 | # |
577 | # Hardware I/O ports | ||
578 | # | ||
579 | # CONFIG_SERIO is not set | ||
580 | # CONFIG_GAMEPORT is not set | ||
581 | |||
582 | # | ||
536 | # Character devices | 583 | # Character devices |
537 | # | 584 | # |
538 | CONFIG_VT=y | 585 | CONFIG_VT=y |
@@ -552,6 +599,7 @@ CONFIG_SERIAL_MPSC=y | |||
552 | CONFIG_SERIAL_MPSC_CONSOLE=y | 599 | CONFIG_SERIAL_MPSC_CONSOLE=y |
553 | CONFIG_SERIAL_CORE=y | 600 | CONFIG_SERIAL_CORE=y |
554 | CONFIG_SERIAL_CORE_CONSOLE=y | 601 | CONFIG_SERIAL_CORE_CONSOLE=y |
602 | # CONFIG_SERIAL_JSM is not set | ||
555 | CONFIG_UNIX98_PTYS=y | 603 | CONFIG_UNIX98_PTYS=y |
556 | CONFIG_LEGACY_PTYS=y | 604 | CONFIG_LEGACY_PTYS=y |
557 | CONFIG_LEGACY_PTY_COUNT=256 | 605 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -580,6 +628,11 @@ CONFIG_GEN_RTC=y | |||
580 | # CONFIG_RAW_DRIVER is not set | 628 | # CONFIG_RAW_DRIVER is not set |
581 | 629 | ||
582 | # | 630 | # |
631 | # TPM devices | ||
632 | # | ||
633 | # CONFIG_TCG_TPM is not set | ||
634 | |||
635 | # | ||
583 | # I2C support | 636 | # I2C support |
584 | # | 637 | # |
585 | CONFIG_I2C=y | 638 | CONFIG_I2C=y |
@@ -602,11 +655,10 @@ CONFIG_I2C_CHARDEV=y | |||
602 | # CONFIG_I2C_AMD8111 is not set | 655 | # CONFIG_I2C_AMD8111 is not set |
603 | # CONFIG_I2C_I801 is not set | 656 | # CONFIG_I2C_I801 is not set |
604 | # CONFIG_I2C_I810 is not set | 657 | # CONFIG_I2C_I810 is not set |
605 | # CONFIG_I2C_ISA is not set | 658 | # CONFIG_I2C_PIIX4 is not set |
606 | # CONFIG_I2C_MPC is not set | 659 | # CONFIG_I2C_MPC is not set |
607 | # CONFIG_I2C_NFORCE2 is not set | 660 | # CONFIG_I2C_NFORCE2 is not set |
608 | # CONFIG_I2C_PARPORT_LIGHT is not set | 661 | # CONFIG_I2C_PARPORT_LIGHT is not set |
609 | # CONFIG_I2C_PIIX4 is not set | ||
610 | # CONFIG_I2C_PROSAVAGE is not set | 662 | # CONFIG_I2C_PROSAVAGE is not set |
611 | # CONFIG_I2C_SAVAGE4 is not set | 663 | # CONFIG_I2C_SAVAGE4 is not set |
612 | # CONFIG_SCx200_ACB is not set | 664 | # CONFIG_SCx200_ACB is not set |
@@ -621,14 +673,39 @@ CONFIG_I2C_CHARDEV=y | |||
621 | CONFIG_I2C_MV64XXX=y | 673 | CONFIG_I2C_MV64XXX=y |
622 | 674 | ||
623 | # | 675 | # |
624 | # Hardware Sensors Chip support | 676 | # Miscellaneous I2C Chip support |
625 | # | 677 | # |
626 | # CONFIG_I2C_SENSOR is not set | 678 | # CONFIG_SENSORS_DS1337 is not set |
679 | # CONFIG_SENSORS_DS1374 is not set | ||
680 | # CONFIG_SENSORS_EEPROM is not set | ||
681 | # CONFIG_SENSORS_PCF8574 is not set | ||
682 | # CONFIG_SENSORS_PCA9539 is not set | ||
683 | # CONFIG_SENSORS_PCF8591 is not set | ||
684 | # CONFIG_SENSORS_RTC8564 is not set | ||
685 | CONFIG_SENSORS_M41T00=y | ||
686 | # CONFIG_SENSORS_MAX6875 is not set | ||
687 | # CONFIG_I2C_DEBUG_CORE is not set | ||
688 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
689 | # CONFIG_I2C_DEBUG_BUS is not set | ||
690 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
691 | |||
692 | # | ||
693 | # Dallas's 1-wire bus | ||
694 | # | ||
695 | # CONFIG_W1 is not set | ||
696 | |||
697 | # | ||
698 | # Hardware Monitoring support | ||
699 | # | ||
700 | CONFIG_HWMON=y | ||
701 | # CONFIG_HWMON_VID is not set | ||
627 | # CONFIG_SENSORS_ADM1021 is not set | 702 | # CONFIG_SENSORS_ADM1021 is not set |
628 | # CONFIG_SENSORS_ADM1025 is not set | 703 | # CONFIG_SENSORS_ADM1025 is not set |
629 | # CONFIG_SENSORS_ADM1026 is not set | 704 | # CONFIG_SENSORS_ADM1026 is not set |
630 | # CONFIG_SENSORS_ADM1031 is not set | 705 | # CONFIG_SENSORS_ADM1031 is not set |
706 | # CONFIG_SENSORS_ADM9240 is not set | ||
631 | # CONFIG_SENSORS_ASB100 is not set | 707 | # CONFIG_SENSORS_ASB100 is not set |
708 | # CONFIG_SENSORS_ATXP1 is not set | ||
632 | # CONFIG_SENSORS_DS1621 is not set | 709 | # CONFIG_SENSORS_DS1621 is not set |
633 | # CONFIG_SENSORS_FSCHER is not set | 710 | # CONFIG_SENSORS_FSCHER is not set |
634 | # CONFIG_SENSORS_FSCPOS is not set | 711 | # CONFIG_SENSORS_FSCPOS is not set |
@@ -644,36 +721,26 @@ CONFIG_I2C_MV64XXX=y | |||
644 | # CONFIG_SENSORS_LM85 is not set | 721 | # CONFIG_SENSORS_LM85 is not set |
645 | # CONFIG_SENSORS_LM87 is not set | 722 | # CONFIG_SENSORS_LM87 is not set |
646 | # CONFIG_SENSORS_LM90 is not set | 723 | # CONFIG_SENSORS_LM90 is not set |
724 | # CONFIG_SENSORS_LM92 is not set | ||
647 | # CONFIG_SENSORS_MAX1619 is not set | 725 | # CONFIG_SENSORS_MAX1619 is not set |
648 | # CONFIG_SENSORS_PC87360 is not set | 726 | # CONFIG_SENSORS_PC87360 is not set |
649 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
650 | # CONFIG_SENSORS_SIS5595 is not set | 727 | # CONFIG_SENSORS_SIS5595 is not set |
651 | # CONFIG_SENSORS_SMSC47M1 is not set | 728 | # CONFIG_SENSORS_SMSC47M1 is not set |
729 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
652 | # CONFIG_SENSORS_VIA686A is not set | 730 | # CONFIG_SENSORS_VIA686A is not set |
653 | # CONFIG_SENSORS_W83781D is not set | 731 | # CONFIG_SENSORS_W83781D is not set |
732 | # CONFIG_SENSORS_W83792D is not set | ||
654 | # CONFIG_SENSORS_W83L785TS is not set | 733 | # CONFIG_SENSORS_W83L785TS is not set |
655 | # CONFIG_SENSORS_W83627HF is not set | 734 | # CONFIG_SENSORS_W83627HF is not set |
735 | # CONFIG_SENSORS_W83627EHF is not set | ||
736 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
656 | 737 | ||
657 | # | 738 | # |
658 | # Other I2C Chip support | 739 | # Misc devices |
659 | # | ||
660 | # CONFIG_SENSORS_EEPROM is not set | ||
661 | # CONFIG_SENSORS_PCF8574 is not set | ||
662 | # CONFIG_SENSORS_PCF8591 is not set | ||
663 | # CONFIG_SENSORS_RTC8564 is not set | ||
664 | CONFIG_SENSORS_M41T00=y | ||
665 | # CONFIG_I2C_DEBUG_CORE is not set | ||
666 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
667 | # CONFIG_I2C_DEBUG_BUS is not set | ||
668 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
669 | |||
670 | # | ||
671 | # Dallas's 1-wire bus | ||
672 | # | 740 | # |
673 | # CONFIG_W1 is not set | ||
674 | 741 | ||
675 | # | 742 | # |
676 | # Misc devices | 743 | # Multimedia Capabilities Port drivers |
677 | # | 744 | # |
678 | 745 | ||
679 | # | 746 | # |
@@ -698,6 +765,11 @@ CONFIG_SENSORS_M41T00=y | |||
698 | CONFIG_DUMMY_CONSOLE=y | 765 | CONFIG_DUMMY_CONSOLE=y |
699 | 766 | ||
700 | # | 767 | # |
768 | # Speakup console speech | ||
769 | # | ||
770 | # CONFIG_SPEAKUP is not set | ||
771 | |||
772 | # | ||
701 | # Sound | 773 | # Sound |
702 | # | 774 | # |
703 | # CONFIG_SOUND is not set | 775 | # CONFIG_SOUND is not set |
@@ -705,13 +777,9 @@ CONFIG_DUMMY_CONSOLE=y | |||
705 | # | 777 | # |
706 | # USB support | 778 | # USB support |
707 | # | 779 | # |
708 | # CONFIG_USB is not set | ||
709 | CONFIG_USB_ARCH_HAS_HCD=y | 780 | CONFIG_USB_ARCH_HAS_HCD=y |
710 | CONFIG_USB_ARCH_HAS_OHCI=y | 781 | CONFIG_USB_ARCH_HAS_OHCI=y |
711 | 782 | # CONFIG_USB is not set | |
712 | # | ||
713 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
714 | # | ||
715 | 783 | ||
716 | # | 784 | # |
717 | # USB Gadget Support | 785 | # USB Gadget Support |
@@ -729,25 +797,39 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
729 | # CONFIG_INFINIBAND is not set | 797 | # CONFIG_INFINIBAND is not set |
730 | 798 | ||
731 | # | 799 | # |
800 | # SN Devices | ||
801 | # | ||
802 | |||
803 | # | ||
804 | # Distributed Lock Manager | ||
805 | # | ||
806 | # CONFIG_DLM is not set | ||
807 | |||
808 | # | ||
732 | # File systems | 809 | # File systems |
733 | # | 810 | # |
734 | CONFIG_EXT2_FS=y | 811 | CONFIG_EXT2_FS=y |
735 | # CONFIG_EXT2_FS_XATTR is not set | 812 | # CONFIG_EXT2_FS_XATTR is not set |
813 | # CONFIG_EXT2_FS_XIP is not set | ||
736 | # CONFIG_EXT3_FS is not set | 814 | # CONFIG_EXT3_FS is not set |
737 | # CONFIG_JBD is not set | 815 | # CONFIG_REISER4_FS is not set |
738 | # CONFIG_REISERFS_FS is not set | 816 | # CONFIG_REISERFS_FS is not set |
739 | # CONFIG_JFS_FS is not set | 817 | # CONFIG_JFS_FS is not set |
818 | # CONFIG_FS_POSIX_ACL is not set | ||
740 | 819 | ||
741 | # | 820 | # |
742 | # XFS support | 821 | # XFS support |
743 | # | 822 | # |
744 | # CONFIG_XFS_FS is not set | 823 | # CONFIG_XFS_FS is not set |
824 | # CONFIG_OCFS2_FS is not set | ||
745 | # CONFIG_MINIX_FS is not set | 825 | # CONFIG_MINIX_FS is not set |
746 | # CONFIG_ROMFS_FS is not set | 826 | # CONFIG_ROMFS_FS is not set |
827 | CONFIG_INOTIFY=y | ||
747 | # CONFIG_QUOTA is not set | 828 | # CONFIG_QUOTA is not set |
748 | CONFIG_DNOTIFY=y | 829 | CONFIG_DNOTIFY=y |
749 | # CONFIG_AUTOFS_FS is not set | 830 | # CONFIG_AUTOFS_FS is not set |
750 | # CONFIG_AUTOFS4_FS is not set | 831 | # CONFIG_AUTOFS4_FS is not set |
832 | # CONFIG_FUSE_FS is not set | ||
751 | 833 | ||
752 | # | 834 | # |
753 | # CD-ROM/DVD Filesystems | 835 | # CD-ROM/DVD Filesystems |
@@ -768,20 +850,18 @@ CONFIG_DNOTIFY=y | |||
768 | CONFIG_PROC_FS=y | 850 | CONFIG_PROC_FS=y |
769 | CONFIG_PROC_KCORE=y | 851 | CONFIG_PROC_KCORE=y |
770 | CONFIG_SYSFS=y | 852 | CONFIG_SYSFS=y |
771 | CONFIG_DEVFS_FS=y | ||
772 | # CONFIG_DEVFS_MOUNT is not set | ||
773 | # CONFIG_DEVFS_DEBUG is not set | ||
774 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
775 | CONFIG_TMPFS=y | 853 | CONFIG_TMPFS=y |
776 | # CONFIG_TMPFS_XATTR is not set | ||
777 | # CONFIG_HUGETLB_PAGE is not set | 854 | # CONFIG_HUGETLB_PAGE is not set |
778 | CONFIG_RAMFS=y | 855 | CONFIG_RAMFS=y |
856 | # CONFIG_CONFIGFS_FS is not set | ||
857 | # CONFIG_RELAYFS_FS is not set | ||
779 | 858 | ||
780 | # | 859 | # |
781 | # Miscellaneous filesystems | 860 | # Miscellaneous filesystems |
782 | # | 861 | # |
783 | # CONFIG_ADFS_FS is not set | 862 | # CONFIG_ADFS_FS is not set |
784 | # CONFIG_AFFS_FS is not set | 863 | # CONFIG_AFFS_FS is not set |
864 | # CONFIG_ASFS_FS is not set | ||
785 | # CONFIG_HFS_FS is not set | 865 | # CONFIG_HFS_FS is not set |
786 | # CONFIG_HFSPLUS_FS is not set | 866 | # CONFIG_HFSPLUS_FS is not set |
787 | # CONFIG_BEFS_FS is not set | 867 | # CONFIG_BEFS_FS is not set |
@@ -801,12 +881,14 @@ CONFIG_RAMFS=y | |||
801 | # | 881 | # |
802 | CONFIG_NFS_FS=y | 882 | CONFIG_NFS_FS=y |
803 | CONFIG_NFS_V3=y | 883 | CONFIG_NFS_V3=y |
884 | # CONFIG_NFS_V3_ACL is not set | ||
804 | # CONFIG_NFS_V4 is not set | 885 | # CONFIG_NFS_V4 is not set |
805 | # CONFIG_NFS_DIRECTIO is not set | 886 | # CONFIG_NFS_DIRECTIO is not set |
806 | # CONFIG_NFSD is not set | 887 | # CONFIG_NFSD is not set |
807 | CONFIG_ROOT_NFS=y | 888 | CONFIG_ROOT_NFS=y |
808 | CONFIG_LOCKD=y | 889 | CONFIG_LOCKD=y |
809 | CONFIG_LOCKD_V4=y | 890 | CONFIG_LOCKD_V4=y |
891 | CONFIG_NFS_COMMON=y | ||
810 | CONFIG_SUNRPC=y | 892 | CONFIG_SUNRPC=y |
811 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 893 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
812 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 894 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -815,6 +897,7 @@ CONFIG_SUNRPC=y | |||
815 | # CONFIG_NCP_FS is not set | 897 | # CONFIG_NCP_FS is not set |
816 | # CONFIG_CODA_FS is not set | 898 | # CONFIG_CODA_FS is not set |
817 | # CONFIG_AFS_FS is not set | 899 | # CONFIG_AFS_FS is not set |
900 | # CONFIG_9P_FS is not set | ||
818 | 901 | ||
819 | # | 902 | # |
820 | # Partition Types | 903 | # Partition Types |
@@ -831,6 +914,7 @@ CONFIG_MSDOS_PARTITION=y | |||
831 | # Library routines | 914 | # Library routines |
832 | # | 915 | # |
833 | # CONFIG_CRC_CCITT is not set | 916 | # CONFIG_CRC_CCITT is not set |
917 | # CONFIG_CRC16 is not set | ||
834 | CONFIG_CRC32=y | 918 | CONFIG_CRC32=y |
835 | # CONFIG_LIBCRC32C is not set | 919 | # CONFIG_LIBCRC32C is not set |
836 | 920 | ||
@@ -842,8 +926,10 @@ CONFIG_CRC32=y | |||
842 | # | 926 | # |
843 | # Kernel hacking | 927 | # Kernel hacking |
844 | # | 928 | # |
845 | # CONFIG_DEBUG_KERNEL is not set | ||
846 | # CONFIG_PRINTK_TIME is not set | 929 | # CONFIG_PRINTK_TIME is not set |
930 | # CONFIG_DEBUG_KERNEL is not set | ||
931 | CONFIG_LOG_BUF_SHIFT=14 | ||
932 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
847 | 933 | ||
848 | # | 934 | # |
849 | # Security options | 935 | # Security options |
diff --git a/arch/ppc/configs/mcpn765_defconfig b/arch/ppc/configs/mcpn765_defconfig deleted file mode 100644 index 899e89a9ea6a..000000000000 --- a/arch/ppc/configs/mcpn765_defconfig +++ /dev/null | |||
@@ -1,579 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | CONFIG_PPC=y | ||
8 | CONFIG_PPC32=y | ||
9 | CONFIG_GENERIC_NVRAM=y | ||
10 | |||
11 | # | ||
12 | # Code maturity level options | ||
13 | # | ||
14 | # CONFIG_EXPERIMENTAL is not set | ||
15 | CONFIG_CLEAN_COMPILE=y | ||
16 | CONFIG_STANDALONE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | |||
19 | # | ||
20 | # General setup | ||
21 | # | ||
22 | # CONFIG_SWAP is not set | ||
23 | CONFIG_SYSVIPC=y | ||
24 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
25 | CONFIG_SYSCTL=y | ||
26 | CONFIG_LOG_BUF_SHIFT=14 | ||
27 | # CONFIG_HOTPLUG is not set | ||
28 | # CONFIG_IKCONFIG is not set | ||
29 | CONFIG_EMBEDDED=y | ||
30 | CONFIG_KALLSYMS=y | ||
31 | CONFIG_FUTEX=y | ||
32 | CONFIG_EPOLL=y | ||
33 | CONFIG_IOSCHED_NOOP=y | ||
34 | CONFIG_IOSCHED_AS=y | ||
35 | CONFIG_IOSCHED_DEADLINE=y | ||
36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
37 | |||
38 | # | ||
39 | # Loadable module support | ||
40 | # | ||
41 | CONFIG_MODULES=y | ||
42 | # CONFIG_MODULE_UNLOAD is not set | ||
43 | CONFIG_OBSOLETE_MODPARM=y | ||
44 | # CONFIG_KMOD is not set | ||
45 | |||
46 | # | ||
47 | # Processor | ||
48 | # | ||
49 | CONFIG_6xx=y | ||
50 | # CONFIG_40x is not set | ||
51 | # CONFIG_44x is not set | ||
52 | # CONFIG_POWER3 is not set | ||
53 | # CONFIG_POWER4 is not set | ||
54 | # CONFIG_8xx is not set | ||
55 | CONFIG_ALTIVEC=y | ||
56 | # CONFIG_TAU is not set | ||
57 | # CONFIG_CPU_FREQ is not set | ||
58 | CONFIG_PPC_STD_MMU=y | ||
59 | |||
60 | # | ||
61 | # Platform options | ||
62 | # | ||
63 | # CONFIG_PPC_MULTIPLATFORM is not set | ||
64 | # CONFIG_APUS is not set | ||
65 | # CONFIG_WILLOW is not set | ||
66 | # CONFIG_PCORE is not set | ||
67 | # CONFIG_POWERPMC250 is not set | ||
68 | # CONFIG_EV64260 is not set | ||
69 | # CONFIG_SPRUCE is not set | ||
70 | # CONFIG_LOPEC is not set | ||
71 | CONFIG_MCPN765=y | ||
72 | # CONFIG_MVME5100 is not set | ||
73 | # CONFIG_PPLUS is not set | ||
74 | # CONFIG_PRPMC750 is not set | ||
75 | # CONFIG_PRPMC800 is not set | ||
76 | # CONFIG_SANDPOINT is not set | ||
77 | # CONFIG_ADIR is not set | ||
78 | # CONFIG_K2 is not set | ||
79 | # CONFIG_PAL4 is not set | ||
80 | # CONFIG_GEMINI is not set | ||
81 | # CONFIG_EST8260 is not set | ||
82 | # CONFIG_SBS8260 is not set | ||
83 | # CONFIG_RPX6 is not set | ||
84 | # CONFIG_TQM8260 is not set | ||
85 | CONFIG_PPC_GEN550=y | ||
86 | # CONFIG_SMP is not set | ||
87 | # CONFIG_PREEMPT is not set | ||
88 | CONFIG_HIGHMEM=y | ||
89 | CONFIG_KERNEL_ELF=y | ||
90 | CONFIG_BINFMT_ELF=y | ||
91 | # CONFIG_BINFMT_MISC is not set | ||
92 | CONFIG_CMDLINE_BOOL=y | ||
93 | CONFIG_CMDLINE="ip=on" | ||
94 | |||
95 | # | ||
96 | # Bus options | ||
97 | # | ||
98 | CONFIG_GENERIC_ISA_DMA=y | ||
99 | CONFIG_PCI=y | ||
100 | CONFIG_PCI_DOMAINS=y | ||
101 | # CONFIG_PCI_LEGACY_PROC is not set | ||
102 | # CONFIG_PCI_NAMES is not set | ||
103 | |||
104 | # | ||
105 | # Advanced setup | ||
106 | # | ||
107 | # CONFIG_ADVANCED_OPTIONS is not set | ||
108 | |||
109 | # | ||
110 | # Default settings for advanced configuration options are used | ||
111 | # | ||
112 | CONFIG_HIGHMEM_START=0xfe000000 | ||
113 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
114 | CONFIG_KERNEL_START=0xc0000000 | ||
115 | CONFIG_TASK_SIZE=0x80000000 | ||
116 | CONFIG_BOOT_LOAD=0x00800000 | ||
117 | |||
118 | # | ||
119 | # Device Drivers | ||
120 | # | ||
121 | |||
122 | # | ||
123 | # Generic Driver Options | ||
124 | # | ||
125 | |||
126 | # | ||
127 | # Memory Technology Devices (MTD) | ||
128 | # | ||
129 | # CONFIG_MTD is not set | ||
130 | |||
131 | # | ||
132 | # Parallel port support | ||
133 | # | ||
134 | # CONFIG_PARPORT is not set | ||
135 | |||
136 | # | ||
137 | # Plug and Play support | ||
138 | # | ||
139 | |||
140 | # | ||
141 | # Block devices | ||
142 | # | ||
143 | # CONFIG_BLK_DEV_FD is not set | ||
144 | # CONFIG_BLK_CPQ_DA is not set | ||
145 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
146 | # CONFIG_BLK_DEV_DAC960 is not set | ||
147 | CONFIG_BLK_DEV_LOOP=y | ||
148 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
149 | # CONFIG_BLK_DEV_NBD is not set | ||
150 | # CONFIG_BLK_DEV_CARMEL is not set | ||
151 | CONFIG_BLK_DEV_RAM=y | ||
152 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
153 | CONFIG_BLK_DEV_INITRD=y | ||
154 | # CONFIG_LBD is not set | ||
155 | |||
156 | # | ||
157 | # ATA/ATAPI/MFM/RLL support | ||
158 | # | ||
159 | CONFIG_IDE=y | ||
160 | CONFIG_BLK_DEV_IDE=y | ||
161 | |||
162 | # | ||
163 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
164 | # | ||
165 | CONFIG_BLK_DEV_IDEDISK=y | ||
166 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
167 | # CONFIG_IDEDISK_STROKE is not set | ||
168 | # CONFIG_BLK_DEV_IDECD is not set | ||
169 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
170 | # CONFIG_IDE_TASK_IOCTL is not set | ||
171 | |||
172 | # | ||
173 | # IDE chipset support/bugfixes | ||
174 | # | ||
175 | # CONFIG_IDE_GENERIC is not set | ||
176 | CONFIG_BLK_DEV_IDEPCI=y | ||
177 | # CONFIG_IDEPCI_SHARE_IRQ is not set | ||
178 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
179 | # CONFIG_BLK_DEV_GENERIC is not set | ||
180 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
181 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
182 | # CONFIG_BLK_DEV_IDEDMA_FORCED is not set | ||
183 | # CONFIG_IDEDMA_PCI_AUTO is not set | ||
184 | CONFIG_BLK_DEV_ADMA=y | ||
185 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
186 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
187 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
188 | # CONFIG_BLK_DEV_CMD64X is not set | ||
189 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
190 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
191 | # CONFIG_BLK_DEV_CS5530 is not set | ||
192 | # CONFIG_BLK_DEV_HPT34X is not set | ||
193 | # CONFIG_BLK_DEV_HPT366 is not set | ||
194 | # CONFIG_BLK_DEV_SC1200 is not set | ||
195 | # CONFIG_BLK_DEV_PIIX is not set | ||
196 | # CONFIG_BLK_DEV_NS87415 is not set | ||
197 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
198 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
199 | # CONFIG_BLK_DEV_SVWKS is not set | ||
200 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
201 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
202 | # CONFIG_BLK_DEV_TRM290 is not set | ||
203 | CONFIG_BLK_DEV_VIA82CXXX=y | ||
204 | CONFIG_BLK_DEV_IDEDMA=y | ||
205 | # CONFIG_IDEDMA_IVB is not set | ||
206 | # CONFIG_IDEDMA_AUTO is not set | ||
207 | # CONFIG_BLK_DEV_HD is not set | ||
208 | |||
209 | # | ||
210 | # SCSI device support | ||
211 | # | ||
212 | # CONFIG_SCSI is not set | ||
213 | |||
214 | # | ||
215 | # Multi-device support (RAID and LVM) | ||
216 | # | ||
217 | # CONFIG_MD is not set | ||
218 | |||
219 | # | ||
220 | # Fusion MPT device support | ||
221 | # | ||
222 | # CONFIG_FUSION is not set | ||
223 | |||
224 | # | ||
225 | # IEEE 1394 (FireWire) support | ||
226 | # | ||
227 | # CONFIG_IEEE1394 is not set | ||
228 | |||
229 | # | ||
230 | # I2O device support | ||
231 | # | ||
232 | # CONFIG_I2O is not set | ||
233 | |||
234 | # | ||
235 | # Macintosh device drivers | ||
236 | # | ||
237 | |||
238 | # | ||
239 | # Networking support | ||
240 | # | ||
241 | CONFIG_NET=y | ||
242 | |||
243 | # | ||
244 | # Networking options | ||
245 | # | ||
246 | CONFIG_PACKET=y | ||
247 | # CONFIG_PACKET_MMAP is not set | ||
248 | # CONFIG_NETLINK_DEV is not set | ||
249 | CONFIG_UNIX=y | ||
250 | # CONFIG_NET_KEY is not set | ||
251 | CONFIG_INET=y | ||
252 | # CONFIG_IP_MULTICAST is not set | ||
253 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
254 | CONFIG_IP_PNP=y | ||
255 | CONFIG_IP_PNP_DHCP=y | ||
256 | # CONFIG_IP_PNP_BOOTP is not set | ||
257 | # CONFIG_IP_PNP_RARP is not set | ||
258 | # CONFIG_NET_IPIP is not set | ||
259 | # CONFIG_NET_IPGRE is not set | ||
260 | # CONFIG_SYN_COOKIES is not set | ||
261 | # CONFIG_INET_AH is not set | ||
262 | # CONFIG_INET_ESP is not set | ||
263 | # CONFIG_INET_IPCOMP is not set | ||
264 | # CONFIG_DECNET is not set | ||
265 | # CONFIG_BRIDGE is not set | ||
266 | # CONFIG_NETFILTER is not set | ||
267 | # CONFIG_VLAN_8021Q is not set | ||
268 | # CONFIG_LLC2 is not set | ||
269 | # CONFIG_IPX is not set | ||
270 | # CONFIG_ATALK is not set | ||
271 | |||
272 | # | ||
273 | # QoS and/or fair queueing | ||
274 | # | ||
275 | # CONFIG_NET_SCHED is not set | ||
276 | |||
277 | # | ||
278 | # Network testing | ||
279 | # | ||
280 | # CONFIG_NET_PKTGEN is not set | ||
281 | CONFIG_NETDEVICES=y | ||
282 | |||
283 | # | ||
284 | # ARCnet devices | ||
285 | # | ||
286 | # CONFIG_ARCNET is not set | ||
287 | # CONFIG_DUMMY is not set | ||
288 | # CONFIG_BONDING is not set | ||
289 | # CONFIG_EQUALIZER is not set | ||
290 | # CONFIG_TUN is not set | ||
291 | |||
292 | # | ||
293 | # Ethernet (10 or 100Mbit) | ||
294 | # | ||
295 | CONFIG_NET_ETHERNET=y | ||
296 | CONFIG_MII=y | ||
297 | # CONFIG_OAKNET is not set | ||
298 | # CONFIG_HAPPYMEAL is not set | ||
299 | # CONFIG_SUNGEM is not set | ||
300 | # CONFIG_NET_VENDOR_3COM is not set | ||
301 | |||
302 | # | ||
303 | # Tulip family network device support | ||
304 | # | ||
305 | CONFIG_NET_TULIP=y | ||
306 | CONFIG_TULIP=y | ||
307 | # CONFIG_TULIP_MMIO is not set | ||
308 | # CONFIG_TULIP_NAPI is not set | ||
309 | # CONFIG_DE4X5 is not set | ||
310 | # CONFIG_WINBOND_840 is not set | ||
311 | # CONFIG_DM9102 is not set | ||
312 | # CONFIG_HP100 is not set | ||
313 | # CONFIG_NET_PCI is not set | ||
314 | |||
315 | # | ||
316 | # Ethernet (1000 Mbit) | ||
317 | # | ||
318 | # CONFIG_ACENIC is not set | ||
319 | # CONFIG_DL2K is not set | ||
320 | # CONFIG_E1000 is not set | ||
321 | # CONFIG_NS83820 is not set | ||
322 | # CONFIG_HAMACHI is not set | ||
323 | # CONFIG_R8169 is not set | ||
324 | # CONFIG_SK98LIN is not set | ||
325 | # CONFIG_TIGON3 is not set | ||
326 | |||
327 | # | ||
328 | # Ethernet (10000 Mbit) | ||
329 | # | ||
330 | # CONFIG_IXGB is not set | ||
331 | # CONFIG_FDDI is not set | ||
332 | # CONFIG_PPP is not set | ||
333 | # CONFIG_SLIP is not set | ||
334 | |||
335 | # | ||
336 | # Wireless LAN (non-hamradio) | ||
337 | # | ||
338 | # CONFIG_NET_RADIO is not set | ||
339 | |||
340 | # | ||
341 | # Token Ring devices | ||
342 | # | ||
343 | # CONFIG_TR is not set | ||
344 | |||
345 | # | ||
346 | # Wan interfaces | ||
347 | # | ||
348 | # CONFIG_WAN is not set | ||
349 | |||
350 | # | ||
351 | # Amateur Radio support | ||
352 | # | ||
353 | # CONFIG_HAMRADIO is not set | ||
354 | |||
355 | # | ||
356 | # IrDA (infrared) support | ||
357 | # | ||
358 | # CONFIG_IRDA is not set | ||
359 | |||
360 | # | ||
361 | # Bluetooth support | ||
362 | # | ||
363 | # CONFIG_BT is not set | ||
364 | # CONFIG_NETPOLL is not set | ||
365 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
366 | |||
367 | # | ||
368 | # ISDN subsystem | ||
369 | # | ||
370 | # CONFIG_ISDN is not set | ||
371 | |||
372 | # | ||
373 | # Telephony Support | ||
374 | # | ||
375 | # CONFIG_PHONE is not set | ||
376 | |||
377 | # | ||
378 | # Input device support | ||
379 | # | ||
380 | # CONFIG_INPUT is not set | ||
381 | |||
382 | # | ||
383 | # Userland interfaces | ||
384 | # | ||
385 | |||
386 | # | ||
387 | # Input I/O drivers | ||
388 | # | ||
389 | # CONFIG_GAMEPORT is not set | ||
390 | CONFIG_SOUND_GAMEPORT=y | ||
391 | # CONFIG_SERIO is not set | ||
392 | # CONFIG_SERIO_I8042 is not set | ||
393 | |||
394 | # | ||
395 | # Input Device Drivers | ||
396 | # | ||
397 | |||
398 | # | ||
399 | # Character devices | ||
400 | # | ||
401 | # CONFIG_VT is not set | ||
402 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
403 | |||
404 | # | ||
405 | # Serial drivers | ||
406 | # | ||
407 | CONFIG_SERIAL_8250=y | ||
408 | CONFIG_SERIAL_8250_CONSOLE=y | ||
409 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
410 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
411 | |||
412 | # | ||
413 | # Non-8250 serial port support | ||
414 | # | ||
415 | CONFIG_SERIAL_CORE=y | ||
416 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
417 | CONFIG_UNIX98_PTYS=y | ||
418 | CONFIG_LEGACY_PTYS=y | ||
419 | CONFIG_LEGACY_PTY_COUNT=256 | ||
420 | # CONFIG_QIC02_TAPE is not set | ||
421 | |||
422 | # | ||
423 | # IPMI | ||
424 | # | ||
425 | # CONFIG_IPMI_HANDLER is not set | ||
426 | |||
427 | # | ||
428 | # Watchdog Cards | ||
429 | # | ||
430 | # CONFIG_WATCHDOG is not set | ||
431 | # CONFIG_NVRAM is not set | ||
432 | CONFIG_GEN_RTC=y | ||
433 | # CONFIG_GEN_RTC_X is not set | ||
434 | # CONFIG_DTLK is not set | ||
435 | # CONFIG_R3964 is not set | ||
436 | # CONFIG_APPLICOM is not set | ||
437 | |||
438 | # | ||
439 | # Ftape, the floppy tape device driver | ||
440 | # | ||
441 | # CONFIG_FTAPE is not set | ||
442 | # CONFIG_AGP is not set | ||
443 | # CONFIG_DRM is not set | ||
444 | # CONFIG_RAW_DRIVER is not set | ||
445 | |||
446 | # | ||
447 | # I2C support | ||
448 | # | ||
449 | # CONFIG_I2C is not set | ||
450 | |||
451 | # | ||
452 | # Misc devices | ||
453 | # | ||
454 | |||
455 | # | ||
456 | # Multimedia devices | ||
457 | # | ||
458 | # CONFIG_VIDEO_DEV is not set | ||
459 | |||
460 | # | ||
461 | # Digital Video Broadcasting Devices | ||
462 | # | ||
463 | # CONFIG_DVB is not set | ||
464 | |||
465 | # | ||
466 | # Graphics support | ||
467 | # | ||
468 | # CONFIG_FB is not set | ||
469 | |||
470 | # | ||
471 | # Sound | ||
472 | # | ||
473 | # CONFIG_SOUND is not set | ||
474 | |||
475 | # | ||
476 | # USB support | ||
477 | # | ||
478 | # CONFIG_USB is not set | ||
479 | |||
480 | # | ||
481 | # USB Gadget Support | ||
482 | # | ||
483 | # CONFIG_USB_GADGET is not set | ||
484 | |||
485 | # | ||
486 | # File systems | ||
487 | # | ||
488 | CONFIG_EXT2_FS=y | ||
489 | # CONFIG_EXT2_FS_XATTR is not set | ||
490 | # CONFIG_EXT3_FS is not set | ||
491 | # CONFIG_JBD is not set | ||
492 | # CONFIG_REISERFS_FS is not set | ||
493 | # CONFIG_JFS_FS is not set | ||
494 | # CONFIG_XFS_FS is not set | ||
495 | # CONFIG_MINIX_FS is not set | ||
496 | # CONFIG_ROMFS_FS is not set | ||
497 | # CONFIG_QUOTA is not set | ||
498 | # CONFIG_AUTOFS_FS is not set | ||
499 | # CONFIG_AUTOFS4_FS is not set | ||
500 | |||
501 | # | ||
502 | # CD-ROM/DVD Filesystems | ||
503 | # | ||
504 | # CONFIG_ISO9660_FS is not set | ||
505 | # CONFIG_UDF_FS is not set | ||
506 | |||
507 | # | ||
508 | # DOS/FAT/NT Filesystems | ||
509 | # | ||
510 | # CONFIG_FAT_FS is not set | ||
511 | # CONFIG_NTFS_FS is not set | ||
512 | |||
513 | # | ||
514 | # Pseudo filesystems | ||
515 | # | ||
516 | CONFIG_PROC_FS=y | ||
517 | CONFIG_PROC_KCORE=y | ||
518 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
519 | CONFIG_TMPFS=y | ||
520 | # CONFIG_HUGETLB_PAGE is not set | ||
521 | CONFIG_RAMFS=y | ||
522 | |||
523 | # | ||
524 | # Miscellaneous filesystems | ||
525 | # | ||
526 | # CONFIG_HFSPLUS_FS is not set | ||
527 | # CONFIG_CRAMFS is not set | ||
528 | # CONFIG_VXFS_FS is not set | ||
529 | # CONFIG_HPFS_FS is not set | ||
530 | # CONFIG_QNX4FS_FS is not set | ||
531 | # CONFIG_SYSV_FS is not set | ||
532 | # CONFIG_UFS_FS is not set | ||
533 | |||
534 | # | ||
535 | # Network File Systems | ||
536 | # | ||
537 | CONFIG_NFS_FS=y | ||
538 | # CONFIG_NFS_V3 is not set | ||
539 | # CONFIG_NFSD is not set | ||
540 | CONFIG_ROOT_NFS=y | ||
541 | CONFIG_LOCKD=y | ||
542 | # CONFIG_EXPORTFS is not set | ||
543 | CONFIG_SUNRPC=y | ||
544 | # CONFIG_SMB_FS is not set | ||
545 | # CONFIG_CIFS is not set | ||
546 | # CONFIG_NCP_FS is not set | ||
547 | # CONFIG_CODA_FS is not set | ||
548 | |||
549 | # | ||
550 | # Partition Types | ||
551 | # | ||
552 | # CONFIG_PARTITION_ADVANCED is not set | ||
553 | CONFIG_MSDOS_PARTITION=y | ||
554 | |||
555 | # | ||
556 | # Native Language Support | ||
557 | # | ||
558 | # CONFIG_NLS is not set | ||
559 | |||
560 | # | ||
561 | # Library routines | ||
562 | # | ||
563 | CONFIG_CRC32=y | ||
564 | |||
565 | # | ||
566 | # Kernel hacking | ||
567 | # | ||
568 | # CONFIG_DEBUG_KERNEL is not set | ||
569 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
570 | |||
571 | # | ||
572 | # Security options | ||
573 | # | ||
574 | # CONFIG_SECURITY is not set | ||
575 | |||
576 | # | ||
577 | # Cryptographic options | ||
578 | # | ||
579 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/menf1_defconfig b/arch/ppc/configs/menf1_defconfig deleted file mode 100644 index 321659b5505f..000000000000 --- a/arch/ppc/configs/menf1_defconfig +++ /dev/null | |||
@@ -1,621 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | # CONFIG_EMBEDDED is not set | ||
22 | CONFIG_FUTEX=y | ||
23 | CONFIG_EPOLL=y | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | CONFIG_MODULE_UNLOAD=y | ||
30 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
31 | CONFIG_OBSOLETE_MODPARM=y | ||
32 | # CONFIG_MODVERSIONS is not set | ||
33 | CONFIG_KMOD=y | ||
34 | |||
35 | # | ||
36 | # Platform support | ||
37 | # | ||
38 | CONFIG_PPC=y | ||
39 | CONFIG_PPC32=y | ||
40 | CONFIG_6xx=y | ||
41 | # CONFIG_40x is not set | ||
42 | # CONFIG_POWER3 is not set | ||
43 | # CONFIG_8xx is not set | ||
44 | |||
45 | # | ||
46 | # IBM 4xx options | ||
47 | # | ||
48 | # CONFIG_8260 is not set | ||
49 | CONFIG_GENERIC_ISA_DMA=y | ||
50 | CONFIG_PPC_STD_MMU=y | ||
51 | # CONFIG_PPC_MULTIPLATFORM is not set | ||
52 | # CONFIG_APUS is not set | ||
53 | # CONFIG_WILLOW_2 is not set | ||
54 | # CONFIG_PCORE is not set | ||
55 | # CONFIG_POWERPMC250 is not set | ||
56 | # CONFIG_EV64260 is not set | ||
57 | # CONFIG_SPRUCE is not set | ||
58 | CONFIG_MENF1=y | ||
59 | # CONFIG_LOPEC is not set | ||
60 | # CONFIG_MCPN765 is not set | ||
61 | # CONFIG_MVME5100 is not set | ||
62 | # CONFIG_PPLUS is not set | ||
63 | # CONFIG_PRPMC750 is not set | ||
64 | # CONFIG_PRPMC800 is not set | ||
65 | # CONFIG_SANDPOINT is not set | ||
66 | # CONFIG_ADIR is not set | ||
67 | # CONFIG_K2 is not set | ||
68 | # CONFIG_PAL4 is not set | ||
69 | # CONFIG_GEMINI is not set | ||
70 | CONFIG_MPC10X_STORE_GATHERING=y | ||
71 | # CONFIG_SMP is not set | ||
72 | # CONFIG_PREEMPT is not set | ||
73 | # CONFIG_ALTIVEC is not set | ||
74 | # CONFIG_TAU is not set | ||
75 | # CONFIG_CPU_FREQ is not set | ||
76 | |||
77 | # | ||
78 | # General setup | ||
79 | # | ||
80 | # CONFIG_HIGHMEM is not set | ||
81 | CONFIG_PCI=y | ||
82 | CONFIG_PCI_DOMAINS=y | ||
83 | CONFIG_KCORE_ELF=y | ||
84 | CONFIG_BINFMT_ELF=y | ||
85 | CONFIG_KERNEL_ELF=y | ||
86 | # CONFIG_BINFMT_MISC is not set | ||
87 | # CONFIG_PCI_LEGACY_PROC is not set | ||
88 | # CONFIG_PCI_NAMES is not set | ||
89 | # CONFIG_HOTPLUG is not set | ||
90 | |||
91 | # | ||
92 | # Parallel port support | ||
93 | # | ||
94 | # CONFIG_PARPORT is not set | ||
95 | # CONFIG_PPC601_SYNC_FIX is not set | ||
96 | CONFIG_CMDLINE_BOOL=y | ||
97 | CONFIG_CMDLINE="ip=on" | ||
98 | |||
99 | # | ||
100 | # Advanced setup | ||
101 | # | ||
102 | # CONFIG_ADVANCED_OPTIONS is not set | ||
103 | |||
104 | # | ||
105 | # Default settings for advanced configuration options are used | ||
106 | # | ||
107 | CONFIG_HIGHMEM_START=0xfe000000 | ||
108 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
109 | CONFIG_KERNEL_START=0xc0000000 | ||
110 | CONFIG_TASK_SIZE=0x80000000 | ||
111 | CONFIG_BOOT_LOAD=0x00800000 | ||
112 | |||
113 | # | ||
114 | # Memory Technology Devices (MTD) | ||
115 | # | ||
116 | # CONFIG_MTD is not set | ||
117 | |||
118 | # | ||
119 | # Plug and Play support | ||
120 | # | ||
121 | # CONFIG_PNP is not set | ||
122 | |||
123 | # | ||
124 | # Block devices | ||
125 | # | ||
126 | # CONFIG_BLK_DEV_FD is not set | ||
127 | # CONFIG_BLK_CPQ_DA is not set | ||
128 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
129 | # CONFIG_BLK_DEV_DAC960 is not set | ||
130 | # CONFIG_BLK_DEV_UMEM is not set | ||
131 | # CONFIG_BLK_DEV_LOOP is not set | ||
132 | # CONFIG_BLK_DEV_NBD is not set | ||
133 | # CONFIG_BLK_DEV_RAM is not set | ||
134 | # CONFIG_BLK_DEV_INITRD is not set | ||
135 | |||
136 | # | ||
137 | # Multi-device support (RAID and LVM) | ||
138 | # | ||
139 | # CONFIG_MD is not set | ||
140 | |||
141 | # | ||
142 | # ATA/IDE/MFM/RLL support | ||
143 | # | ||
144 | CONFIG_IDE=y | ||
145 | |||
146 | # | ||
147 | # IDE, ATA and ATAPI Block devices | ||
148 | # | ||
149 | CONFIG_BLK_DEV_IDE=y | ||
150 | |||
151 | # | ||
152 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
153 | # | ||
154 | # CONFIG_BLK_DEV_HD is not set | ||
155 | CONFIG_BLK_DEV_IDEDISK=y | ||
156 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
157 | # CONFIG_IDEDISK_STROKE is not set | ||
158 | CONFIG_BLK_DEV_IDECD=y | ||
159 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
160 | # CONFIG_IDE_TASK_IOCTL is not set | ||
161 | |||
162 | # | ||
163 | # IDE chipset support/bugfixes | ||
164 | # | ||
165 | # CONFIG_BLK_DEV_IDEPCI is not set | ||
166 | |||
167 | # | ||
168 | # SCSI support | ||
169 | # | ||
170 | # CONFIG_SCSI is not set | ||
171 | |||
172 | # | ||
173 | # Fusion MPT device support | ||
174 | # | ||
175 | |||
176 | # | ||
177 | # IEEE 1394 (FireWire) support (EXPERIMENTAL) | ||
178 | # | ||
179 | # CONFIG_IEEE1394 is not set | ||
180 | |||
181 | # | ||
182 | # I2O device support | ||
183 | # | ||
184 | # CONFIG_I2O is not set | ||
185 | |||
186 | # | ||
187 | # Networking support | ||
188 | # | ||
189 | CONFIG_NET=y | ||
190 | |||
191 | # | ||
192 | # Networking options | ||
193 | # | ||
194 | CONFIG_PACKET=y | ||
195 | # CONFIG_PACKET_MMAP is not set | ||
196 | # CONFIG_NETLINK_DEV is not set | ||
197 | CONFIG_NETFILTER=y | ||
198 | # CONFIG_NETFILTER_DEBUG is not set | ||
199 | CONFIG_UNIX=y | ||
200 | # CONFIG_NET_KEY is not set | ||
201 | CONFIG_INET=y | ||
202 | CONFIG_IP_MULTICAST=y | ||
203 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
204 | CONFIG_IP_PNP=y | ||
205 | CONFIG_IP_PNP_DHCP=y | ||
206 | # CONFIG_IP_PNP_BOOTP is not set | ||
207 | # CONFIG_IP_PNP_RARP is not set | ||
208 | # CONFIG_NET_IPIP is not set | ||
209 | # CONFIG_NET_IPGRE is not set | ||
210 | # CONFIG_IP_MROUTE is not set | ||
211 | # CONFIG_ARPD is not set | ||
212 | # CONFIG_INET_ECN is not set | ||
213 | # CONFIG_SYN_COOKIES is not set | ||
214 | # CONFIG_INET_AH is not set | ||
215 | # CONFIG_INET_ESP is not set | ||
216 | # CONFIG_INET_IPCOMP is not set | ||
217 | |||
218 | # | ||
219 | # IP: Netfilter Configuration | ||
220 | # | ||
221 | CONFIG_IP_NF_CONNTRACK=m | ||
222 | CONFIG_IP_NF_FTP=m | ||
223 | CONFIG_IP_NF_IRC=m | ||
224 | # CONFIG_IP_NF_TFTP is not set | ||
225 | # CONFIG_IP_NF_AMANDA is not set | ||
226 | # CONFIG_IP_NF_QUEUE is not set | ||
227 | CONFIG_IP_NF_IPTABLES=m | ||
228 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
229 | CONFIG_IP_NF_MATCH_MAC=m | ||
230 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
231 | CONFIG_IP_NF_MATCH_MARK=m | ||
232 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
233 | CONFIG_IP_NF_MATCH_TOS=m | ||
234 | CONFIG_IP_NF_MATCH_ECN=m | ||
235 | CONFIG_IP_NF_MATCH_DSCP=m | ||
236 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
237 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
238 | CONFIG_IP_NF_MATCH_TTL=m | ||
239 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
240 | CONFIG_IP_NF_MATCH_HELPER=m | ||
241 | CONFIG_IP_NF_MATCH_STATE=m | ||
242 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
243 | CONFIG_IP_NF_MATCH_UNCLEAN=m | ||
244 | CONFIG_IP_NF_MATCH_OWNER=m | ||
245 | CONFIG_IP_NF_FILTER=m | ||
246 | CONFIG_IP_NF_TARGET_REJECT=m | ||
247 | CONFIG_IP_NF_TARGET_MIRROR=m | ||
248 | CONFIG_IP_NF_NAT=m | ||
249 | CONFIG_IP_NF_NAT_NEEDED=y | ||
250 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
251 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
252 | # CONFIG_IP_NF_NAT_SNMP_BASIC is not set | ||
253 | CONFIG_IP_NF_NAT_IRC=m | ||
254 | CONFIG_IP_NF_NAT_FTP=m | ||
255 | # CONFIG_IP_NF_MANGLE is not set | ||
256 | # CONFIG_IP_NF_TARGET_LOG is not set | ||
257 | CONFIG_IP_NF_TARGET_ULOG=m | ||
258 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
259 | CONFIG_IP_NF_ARPTABLES=m | ||
260 | CONFIG_IP_NF_ARPFILTER=m | ||
261 | CONFIG_IP_NF_COMPAT_IPCHAINS=m | ||
262 | # CONFIG_IP_NF_COMPAT_IPFWADM is not set | ||
263 | # CONFIG_IPV6 is not set | ||
264 | # CONFIG_XFRM_USER is not set | ||
265 | |||
266 | # | ||
267 | # SCTP Configuration (EXPERIMENTAL) | ||
268 | # | ||
269 | CONFIG_IPV6_SCTP__=y | ||
270 | # CONFIG_IP_SCTP is not set | ||
271 | # CONFIG_ATM is not set | ||
272 | # CONFIG_VLAN_8021Q is not set | ||
273 | # CONFIG_LLC is not set | ||
274 | # CONFIG_DECNET is not set | ||
275 | # CONFIG_BRIDGE is not set | ||
276 | # CONFIG_X25 is not set | ||
277 | # CONFIG_LAPB is not set | ||
278 | # CONFIG_NET_DIVERT is not set | ||
279 | # CONFIG_ECONET is not set | ||
280 | # CONFIG_WAN_ROUTER is not set | ||
281 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
282 | |||
283 | # | ||
284 | # QoS and/or fair queueing | ||
285 | # | ||
286 | # CONFIG_NET_SCHED is not set | ||
287 | |||
288 | # | ||
289 | # Network testing | ||
290 | # | ||
291 | # CONFIG_NET_PKTGEN is not set | ||
292 | CONFIG_NETDEVICES=y | ||
293 | |||
294 | # | ||
295 | # ARCnet devices | ||
296 | # | ||
297 | # CONFIG_ARCNET is not set | ||
298 | # CONFIG_DUMMY is not set | ||
299 | # CONFIG_BONDING is not set | ||
300 | # CONFIG_EQUALIZER is not set | ||
301 | # CONFIG_TUN is not set | ||
302 | # CONFIG_ETHERTAP is not set | ||
303 | |||
304 | # | ||
305 | # Ethernet (10 or 100Mbit) | ||
306 | # | ||
307 | CONFIG_NET_ETHERNET=y | ||
308 | CONFIG_MII=y | ||
309 | # CONFIG_OAKNET is not set | ||
310 | # CONFIG_HAPPYMEAL is not set | ||
311 | # CONFIG_SUNGEM is not set | ||
312 | # CONFIG_NET_VENDOR_3COM is not set | ||
313 | |||
314 | # | ||
315 | # Tulip family network device support | ||
316 | # | ||
317 | # CONFIG_NET_TULIP is not set | ||
318 | # CONFIG_HP100 is not set | ||
319 | CONFIG_NET_PCI=y | ||
320 | # CONFIG_PCNET32 is not set | ||
321 | # CONFIG_AMD8111_ETH is not set | ||
322 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
323 | # CONFIG_B44 is not set | ||
324 | # CONFIG_DGRS is not set | ||
325 | # CONFIG_EEPRO100 is not set | ||
326 | # CONFIG_E100 is not set | ||
327 | # CONFIG_FEALNX is not set | ||
328 | # CONFIG_NATSEMI is not set | ||
329 | # CONFIG_NE2K_PCI is not set | ||
330 | # CONFIG_8139CP is not set | ||
331 | # CONFIG_8139TOO is not set | ||
332 | # CONFIG_SIS900 is not set | ||
333 | # CONFIG_EPIC100 is not set | ||
334 | # CONFIG_SUNDANCE is not set | ||
335 | # CONFIG_TLAN is not set | ||
336 | # CONFIG_VIA_RHINE is not set | ||
337 | |||
338 | # | ||
339 | # Ethernet (1000 Mbit) | ||
340 | # | ||
341 | # CONFIG_ACENIC is not set | ||
342 | # CONFIG_DL2K is not set | ||
343 | # CONFIG_E1000 is not set | ||
344 | # CONFIG_NS83820 is not set | ||
345 | # CONFIG_HAMACHI is not set | ||
346 | # CONFIG_YELLOWFIN is not set | ||
347 | # CONFIG_R8169 is not set | ||
348 | # CONFIG_SK98LIN is not set | ||
349 | # CONFIG_TIGON3 is not set | ||
350 | |||
351 | # | ||
352 | # Ethernet (10000 Mbit) | ||
353 | # | ||
354 | # CONFIG_IXGB is not set | ||
355 | # CONFIG_FDDI is not set | ||
356 | # CONFIG_HIPPI is not set | ||
357 | # CONFIG_PPP is not set | ||
358 | # CONFIG_SLIP is not set | ||
359 | |||
360 | # | ||
361 | # Wireless LAN (non-hamradio) | ||
362 | # | ||
363 | # CONFIG_NET_RADIO is not set | ||
364 | |||
365 | # | ||
366 | # Token Ring devices (depends on LLC=y) | ||
367 | # | ||
368 | # CONFIG_RCPCI is not set | ||
369 | # CONFIG_SHAPER is not set | ||
370 | |||
371 | # | ||
372 | # Wan interfaces | ||
373 | # | ||
374 | # CONFIG_WAN is not set | ||
375 | |||
376 | # | ||
377 | # Amateur Radio support | ||
378 | # | ||
379 | # CONFIG_HAMRADIO is not set | ||
380 | |||
381 | # | ||
382 | # IrDA (infrared) support | ||
383 | # | ||
384 | # CONFIG_IRDA is not set | ||
385 | |||
386 | # | ||
387 | # ISDN subsystem | ||
388 | # | ||
389 | # CONFIG_ISDN_BOOL is not set | ||
390 | |||
391 | # | ||
392 | # Graphics support | ||
393 | # | ||
394 | # CONFIG_FB is not set | ||
395 | |||
396 | # | ||
397 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
398 | # | ||
399 | # CONFIG_CD_NO_IDESCSI is not set | ||
400 | |||
401 | # | ||
402 | # Input device support | ||
403 | # | ||
404 | # CONFIG_INPUT is not set | ||
405 | |||
406 | # | ||
407 | # Userland interfaces | ||
408 | # | ||
409 | |||
410 | # | ||
411 | # Input I/O drivers | ||
412 | # | ||
413 | # CONFIG_GAMEPORT is not set | ||
414 | CONFIG_SOUND_GAMEPORT=y | ||
415 | # CONFIG_SERIO is not set | ||
416 | |||
417 | # | ||
418 | # Input Device Drivers | ||
419 | # | ||
420 | |||
421 | # | ||
422 | # Macintosh device drivers | ||
423 | # | ||
424 | |||
425 | # | ||
426 | # Character devices | ||
427 | # | ||
428 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
429 | |||
430 | # | ||
431 | # Serial drivers | ||
432 | # | ||
433 | CONFIG_SERIAL_8250=y | ||
434 | CONFIG_SERIAL_8250_CONSOLE=y | ||
435 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
436 | |||
437 | # | ||
438 | # Non-8250 serial port support | ||
439 | # | ||
440 | CONFIG_SERIAL_CORE=y | ||
441 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
442 | CONFIG_UNIX98_PTYS=y | ||
443 | CONFIG_UNIX98_PTY_COUNT=256 | ||
444 | |||
445 | # | ||
446 | # I2C support | ||
447 | # | ||
448 | # CONFIG_I2C is not set | ||
449 | |||
450 | # | ||
451 | # I2C Hardware Sensors Mainboard support | ||
452 | # | ||
453 | |||
454 | # | ||
455 | # I2C Hardware Sensors Chip support | ||
456 | # | ||
457 | # CONFIG_I2C_SENSOR is not set | ||
458 | |||
459 | # | ||
460 | # Mice | ||
461 | # | ||
462 | # CONFIG_BUSMOUSE is not set | ||
463 | # CONFIG_QIC02_TAPE is not set | ||
464 | |||
465 | # | ||
466 | # IPMI | ||
467 | # | ||
468 | # CONFIG_IPMI_HANDLER is not set | ||
469 | |||
470 | # | ||
471 | # Watchdog Cards | ||
472 | # | ||
473 | # CONFIG_WATCHDOG is not set | ||
474 | # CONFIG_NVRAM is not set | ||
475 | CONFIG_GEN_RTC=y | ||
476 | # CONFIG_GEN_RTC_X is not set | ||
477 | # CONFIG_DTLK is not set | ||
478 | # CONFIG_R3964 is not set | ||
479 | # CONFIG_APPLICOM is not set | ||
480 | |||
481 | # | ||
482 | # Ftape, the floppy tape device driver | ||
483 | # | ||
484 | # CONFIG_FTAPE is not set | ||
485 | # CONFIG_AGP is not set | ||
486 | # CONFIG_DRM is not set | ||
487 | # CONFIG_RAW_DRIVER is not set | ||
488 | # CONFIG_HANGCHECK_TIMER is not set | ||
489 | |||
490 | # | ||
491 | # Multimedia devices | ||
492 | # | ||
493 | # CONFIG_VIDEO_DEV is not set | ||
494 | |||
495 | # | ||
496 | # Digital Video Broadcasting Devices | ||
497 | # | ||
498 | # CONFIG_DVB is not set | ||
499 | |||
500 | # | ||
501 | # File systems | ||
502 | # | ||
503 | CONFIG_EXT2_FS=y | ||
504 | # CONFIG_EXT2_FS_XATTR is not set | ||
505 | CONFIG_EXT3_FS=y | ||
506 | CONFIG_EXT3_FS_XATTR=y | ||
507 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
508 | # CONFIG_EXT3_FS_SECURITY is not set | ||
509 | CONFIG_JBD=y | ||
510 | # CONFIG_JBD_DEBUG is not set | ||
511 | CONFIG_FS_MBCACHE=y | ||
512 | # CONFIG_REISERFS_FS is not set | ||
513 | # CONFIG_JFS_FS is not set | ||
514 | # CONFIG_XFS_FS is not set | ||
515 | # CONFIG_MINIX_FS is not set | ||
516 | # CONFIG_ROMFS_FS is not set | ||
517 | # CONFIG_QUOTA is not set | ||
518 | # CONFIG_AUTOFS_FS is not set | ||
519 | # CONFIG_AUTOFS4_FS is not set | ||
520 | |||
521 | # | ||
522 | # CD-ROM/DVD Filesystems | ||
523 | # | ||
524 | CONFIG_ISO9660_FS=y | ||
525 | # CONFIG_JOLIET is not set | ||
526 | # CONFIG_ZISOFS is not set | ||
527 | # CONFIG_UDF_FS is not set | ||
528 | |||
529 | # | ||
530 | # DOS/FAT/NT Filesystems | ||
531 | # | ||
532 | # CONFIG_FAT_FS is not set | ||
533 | # CONFIG_NTFS_FS is not set | ||
534 | |||
535 | # | ||
536 | # Pseudo filesystems | ||
537 | # | ||
538 | CONFIG_PROC_FS=y | ||
539 | # CONFIG_DEVFS_FS is not set | ||
540 | CONFIG_DEVPTS_FS=y | ||
541 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
542 | CONFIG_TMPFS=y | ||
543 | CONFIG_RAMFS=y | ||
544 | |||
545 | # | ||
546 | # Miscellaneous filesystems | ||
547 | # | ||
548 | # CONFIG_ADFS_FS is not set | ||
549 | # CONFIG_AFFS_FS is not set | ||
550 | # CONFIG_HFS_FS is not set | ||
551 | # CONFIG_BEFS_FS is not set | ||
552 | # CONFIG_BFS_FS is not set | ||
553 | # CONFIG_EFS_FS is not set | ||
554 | # CONFIG_CRAMFS is not set | ||
555 | # CONFIG_VXFS_FS is not set | ||
556 | # CONFIG_HPFS_FS is not set | ||
557 | # CONFIG_QNX4FS_FS is not set | ||
558 | # CONFIG_SYSV_FS is not set | ||
559 | # CONFIG_UFS_FS is not set | ||
560 | |||
561 | # | ||
562 | # Network File Systems | ||
563 | # | ||
564 | CONFIG_NFS_FS=y | ||
565 | # CONFIG_NFS_V3 is not set | ||
566 | # CONFIG_NFS_V4 is not set | ||
567 | # CONFIG_NFSD is not set | ||
568 | CONFIG_ROOT_NFS=y | ||
569 | CONFIG_LOCKD=y | ||
570 | # CONFIG_EXPORTFS is not set | ||
571 | CONFIG_SUNRPC=y | ||
572 | # CONFIG_SUNRPC_GSS is not set | ||
573 | # CONFIG_SMB_FS is not set | ||
574 | # CONFIG_CIFS is not set | ||
575 | # CONFIG_NCP_FS is not set | ||
576 | # CONFIG_CODA_FS is not set | ||
577 | # CONFIG_INTERMEZZO_FS is not set | ||
578 | # CONFIG_AFS_FS is not set | ||
579 | |||
580 | # | ||
581 | # Partition Types | ||
582 | # | ||
583 | # CONFIG_PARTITION_ADVANCED is not set | ||
584 | CONFIG_MSDOS_PARTITION=y | ||
585 | |||
586 | # | ||
587 | # Sound | ||
588 | # | ||
589 | # CONFIG_SOUND is not set | ||
590 | |||
591 | # | ||
592 | # USB support | ||
593 | # | ||
594 | # CONFIG_USB is not set | ||
595 | # CONFIG_USB_GADGET is not set | ||
596 | |||
597 | # | ||
598 | # Bluetooth support | ||
599 | # | ||
600 | # CONFIG_BT is not set | ||
601 | |||
602 | # | ||
603 | # Library routines | ||
604 | # | ||
605 | # CONFIG_CRC32 is not set | ||
606 | |||
607 | # | ||
608 | # Kernel hacking | ||
609 | # | ||
610 | # CONFIG_DEBUG_KERNEL is not set | ||
611 | # CONFIG_KALLSYMS is not set | ||
612 | |||
613 | # | ||
614 | # Security options | ||
615 | # | ||
616 | # CONFIG_SECURITY is not set | ||
617 | |||
618 | # | ||
619 | # Cryptographic options | ||
620 | # | ||
621 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/mpc8560_ads_defconfig b/arch/ppc/configs/mpc8560_ads_defconfig index 38a343c9056a..f834fb541ad5 100644 --- a/arch/ppc/configs/mpc8560_ads_defconfig +++ b/arch/ppc/configs/mpc8560_ads_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.13-rc6 |
4 | # Thu Jan 20 01:24:56 2005 | 4 | # Thu Aug 11 18:14:45 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 |
@@ -59,12 +64,16 @@ CONFIG_CC_ALIGN_JUMPS=0 | |||
59 | # CONFIG_POWER3 is not set | 64 | # CONFIG_POWER3 is not set |
60 | # CONFIG_POWER4 is not set | 65 | # CONFIG_POWER4 is not set |
61 | # CONFIG_8xx is not set | 66 | # CONFIG_8xx is not set |
67 | # CONFIG_E200 is not set | ||
62 | CONFIG_E500=y | 68 | CONFIG_E500=y |
63 | CONFIG_BOOKE=y | 69 | CONFIG_BOOKE=y |
64 | CONFIG_FSL_BOOKE=y | 70 | CONFIG_FSL_BOOKE=y |
71 | # CONFIG_PHYS_64BIT is not set | ||
65 | CONFIG_SPE=y | 72 | CONFIG_SPE=y |
66 | CONFIG_MATH_EMULATION=y | 73 | CONFIG_MATH_EMULATION=y |
74 | # CONFIG_KEXEC is not set | ||
67 | # CONFIG_CPU_FREQ is not set | 75 | # CONFIG_CPU_FREQ is not set |
76 | # CONFIG_PM is not set | ||
68 | CONFIG_85xx=y | 77 | CONFIG_85xx=y |
69 | CONFIG_PPC_INDIRECT_PCI_BE=y | 78 | CONFIG_PPC_INDIRECT_PCI_BE=y |
70 | 79 | ||
@@ -72,9 +81,11 @@ CONFIG_PPC_INDIRECT_PCI_BE=y | |||
72 | # Freescale 85xx options | 81 | # Freescale 85xx options |
73 | # | 82 | # |
74 | # CONFIG_MPC8540_ADS is not set | 83 | # CONFIG_MPC8540_ADS is not set |
84 | # CONFIG_MPC8548_CDS is not set | ||
75 | # CONFIG_MPC8555_CDS is not set | 85 | # CONFIG_MPC8555_CDS is not set |
76 | CONFIG_MPC8560_ADS=y | 86 | CONFIG_MPC8560_ADS=y |
77 | # CONFIG_SBC8560 is not set | 87 | # CONFIG_SBC8560 is not set |
88 | # CONFIG_STX_GP3 is not set | ||
78 | CONFIG_MPC8560=y | 89 | CONFIG_MPC8560=y |
79 | 90 | ||
80 | # | 91 | # |
@@ -83,11 +94,25 @@ CONFIG_MPC8560=y | |||
83 | CONFIG_CPM2=y | 94 | CONFIG_CPM2=y |
84 | # CONFIG_PC_KEYBOARD is not set | 95 | # CONFIG_PC_KEYBOARD is not set |
85 | # CONFIG_SMP is not set | 96 | # CONFIG_SMP is not set |
86 | # CONFIG_PREEMPT is not set | ||
87 | # CONFIG_HIGHMEM is not set | 97 | # CONFIG_HIGHMEM is not set |
98 | # CONFIG_HZ_100 is not set | ||
99 | CONFIG_HZ_250=y | ||
100 | # CONFIG_HZ_1000 is not set | ||
101 | CONFIG_HZ=250 | ||
102 | CONFIG_PREEMPT_NONE=y | ||
103 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
104 | # CONFIG_PREEMPT is not set | ||
105 | CONFIG_SELECT_MEMORY_MODEL=y | ||
106 | CONFIG_FLATMEM_MANUAL=y | ||
107 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
108 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
109 | CONFIG_FLATMEM=y | ||
110 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
88 | CONFIG_BINFMT_ELF=y | 111 | CONFIG_BINFMT_ELF=y |
89 | # CONFIG_BINFMT_MISC is not set | 112 | # CONFIG_BINFMT_MISC is not set |
90 | # CONFIG_CMDLINE_BOOL is not set | 113 | # CONFIG_CMDLINE_BOOL is not set |
114 | CONFIG_SECCOMP=y | ||
115 | CONFIG_ISA_DMA_API=y | ||
91 | 116 | ||
92 | # | 117 | # |
93 | # Bus options | 118 | # Bus options |
@@ -103,10 +128,6 @@ CONFIG_PCI_NAMES=y | |||
103 | # CONFIG_PCCARD is not set | 128 | # CONFIG_PCCARD is not set |
104 | 129 | ||
105 | # | 130 | # |
106 | # PC-card bridges | ||
107 | # | ||
108 | |||
109 | # | ||
110 | # Advanced setup | 131 | # Advanced setup |
111 | # | 132 | # |
112 | # CONFIG_ADVANCED_OPTIONS is not set | 133 | # CONFIG_ADVANCED_OPTIONS is not set |
@@ -121,6 +142,69 @@ CONFIG_TASK_SIZE=0x80000000 | |||
121 | CONFIG_BOOT_LOAD=0x00800000 | 142 | CONFIG_BOOT_LOAD=0x00800000 |
122 | 143 | ||
123 | # | 144 | # |
145 | # Networking | ||
146 | # | ||
147 | CONFIG_NET=y | ||
148 | |||
149 | # | ||
150 | # Networking options | ||
151 | # | ||
152 | CONFIG_PACKET=y | ||
153 | # CONFIG_PACKET_MMAP is not set | ||
154 | CONFIG_UNIX=y | ||
155 | # CONFIG_NET_KEY is not set | ||
156 | CONFIG_INET=y | ||
157 | CONFIG_IP_MULTICAST=y | ||
158 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
159 | CONFIG_IP_FIB_HASH=y | ||
160 | CONFIG_IP_PNP=y | ||
161 | CONFIG_IP_PNP_DHCP=y | ||
162 | CONFIG_IP_PNP_BOOTP=y | ||
163 | # CONFIG_IP_PNP_RARP is not set | ||
164 | # CONFIG_NET_IPIP is not set | ||
165 | # CONFIG_NET_IPGRE is not set | ||
166 | # CONFIG_IP_MROUTE is not set | ||
167 | # CONFIG_ARPD is not set | ||
168 | CONFIG_SYN_COOKIES=y | ||
169 | # CONFIG_INET_AH is not set | ||
170 | # CONFIG_INET_ESP is not set | ||
171 | # CONFIG_INET_IPCOMP is not set | ||
172 | # CONFIG_INET_TUNNEL is not set | ||
173 | CONFIG_IP_TCPDIAG=y | ||
174 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
175 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
176 | CONFIG_TCP_CONG_BIC=y | ||
177 | # CONFIG_IPV6 is not set | ||
178 | # CONFIG_NETFILTER is not set | ||
179 | |||
180 | # | ||
181 | # SCTP Configuration (EXPERIMENTAL) | ||
182 | # | ||
183 | # CONFIG_IP_SCTP is not set | ||
184 | # CONFIG_ATM is not set | ||
185 | # CONFIG_BRIDGE is not set | ||
186 | # CONFIG_VLAN_8021Q is not set | ||
187 | # CONFIG_DECNET is not set | ||
188 | # CONFIG_LLC2 is not set | ||
189 | # CONFIG_IPX is not set | ||
190 | # CONFIG_ATALK is not set | ||
191 | # CONFIG_X25 is not set | ||
192 | # CONFIG_LAPB is not set | ||
193 | # CONFIG_NET_DIVERT is not set | ||
194 | # CONFIG_ECONET is not set | ||
195 | # CONFIG_WAN_ROUTER is not set | ||
196 | # CONFIG_NET_SCHED is not set | ||
197 | # CONFIG_NET_CLS_ROUTE is not set | ||
198 | |||
199 | # | ||
200 | # Network testing | ||
201 | # | ||
202 | # CONFIG_NET_PKTGEN is not set | ||
203 | # CONFIG_HAMRADIO is not set | ||
204 | # CONFIG_IRDA is not set | ||
205 | # CONFIG_BT is not set | ||
206 | |||
207 | # | ||
124 | # Device Drivers | 208 | # Device Drivers |
125 | # | 209 | # |
126 | 210 | ||
@@ -193,6 +277,7 @@ CONFIG_IOSCHED_CFQ=y | |||
193 | # | 277 | # |
194 | # Fusion MPT device support | 278 | # Fusion MPT device support |
195 | # | 279 | # |
280 | # CONFIG_FUSION is not set | ||
196 | 281 | ||
197 | # | 282 | # |
198 | # IEEE 1394 (FireWire) support | 283 | # IEEE 1394 (FireWire) support |
@@ -209,71 +294,8 @@ CONFIG_IOSCHED_CFQ=y | |||
209 | # | 294 | # |
210 | 295 | ||
211 | # | 296 | # |
212 | # Networking support | 297 | # Network device support |
213 | # | ||
214 | CONFIG_NET=y | ||
215 | |||
216 | # | ||
217 | # Networking options | ||
218 | # | ||
219 | CONFIG_PACKET=y | ||
220 | # CONFIG_PACKET_MMAP is not set | ||
221 | # CONFIG_NETLINK_DEV is not set | ||
222 | CONFIG_UNIX=y | ||
223 | # CONFIG_NET_KEY is not set | ||
224 | CONFIG_INET=y | ||
225 | CONFIG_IP_MULTICAST=y | ||
226 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
227 | CONFIG_IP_PNP=y | ||
228 | CONFIG_IP_PNP_DHCP=y | ||
229 | CONFIG_IP_PNP_BOOTP=y | ||
230 | # CONFIG_IP_PNP_RARP is not set | ||
231 | # CONFIG_NET_IPIP is not set | ||
232 | # CONFIG_NET_IPGRE is not set | ||
233 | # CONFIG_IP_MROUTE is not set | ||
234 | # CONFIG_ARPD is not set | ||
235 | CONFIG_SYN_COOKIES=y | ||
236 | # CONFIG_INET_AH is not set | ||
237 | # CONFIG_INET_ESP is not set | ||
238 | # CONFIG_INET_IPCOMP is not set | ||
239 | # CONFIG_INET_TUNNEL is not set | ||
240 | CONFIG_IP_TCPDIAG=y | ||
241 | # CONFIG_IP_TCPDIAG_IPV6 is not set | ||
242 | # CONFIG_IPV6 is not set | ||
243 | # CONFIG_NETFILTER is not set | ||
244 | |||
245 | # | 298 | # |
246 | # SCTP Configuration (EXPERIMENTAL) | ||
247 | # | ||
248 | # CONFIG_IP_SCTP is not set | ||
249 | # CONFIG_ATM is not set | ||
250 | # CONFIG_BRIDGE is not set | ||
251 | # CONFIG_VLAN_8021Q is not set | ||
252 | # CONFIG_DECNET is not set | ||
253 | # CONFIG_LLC2 is not set | ||
254 | # CONFIG_IPX is not set | ||
255 | # CONFIG_ATALK is not set | ||
256 | # CONFIG_X25 is not set | ||
257 | # CONFIG_LAPB is not set | ||
258 | # CONFIG_NET_DIVERT is not set | ||
259 | # CONFIG_ECONET is not set | ||
260 | # CONFIG_WAN_ROUTER is not set | ||
261 | |||
262 | # | ||
263 | # QoS and/or fair queueing | ||
264 | # | ||
265 | # CONFIG_NET_SCHED is not set | ||
266 | # CONFIG_NET_CLS_ROUTE is not set | ||
267 | |||
268 | # | ||
269 | # Network testing | ||
270 | # | ||
271 | # CONFIG_NET_PKTGEN is not set | ||
272 | # CONFIG_NETPOLL is not set | ||
273 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
274 | # CONFIG_HAMRADIO is not set | ||
275 | # CONFIG_IRDA is not set | ||
276 | # CONFIG_BT is not set | ||
277 | CONFIG_NETDEVICES=y | 299 | CONFIG_NETDEVICES=y |
278 | # CONFIG_DUMMY is not set | 300 | # CONFIG_DUMMY is not set |
279 | # CONFIG_BONDING is not set | 301 | # CONFIG_BONDING is not set |
@@ -311,8 +333,10 @@ CONFIG_MII=y | |||
311 | # CONFIG_HAMACHI is not set | 333 | # CONFIG_HAMACHI is not set |
312 | # CONFIG_YELLOWFIN is not set | 334 | # CONFIG_YELLOWFIN is not set |
313 | # CONFIG_R8169 is not set | 335 | # CONFIG_R8169 is not set |
336 | # CONFIG_SKGE is not set | ||
314 | # CONFIG_SK98LIN is not set | 337 | # CONFIG_SK98LIN is not set |
315 | # CONFIG_TIGON3 is not set | 338 | # CONFIG_TIGON3 is not set |
339 | # CONFIG_BNX2 is not set | ||
316 | CONFIG_GIANFAR=y | 340 | CONFIG_GIANFAR=y |
317 | CONFIG_GFAR_NAPI=y | 341 | CONFIG_GFAR_NAPI=y |
318 | 342 | ||
@@ -342,6 +366,8 @@ CONFIG_GFAR_NAPI=y | |||
342 | # CONFIG_SLIP is not set | 366 | # CONFIG_SLIP is not set |
343 | # CONFIG_SHAPER is not set | 367 | # CONFIG_SHAPER is not set |
344 | # CONFIG_NETCONSOLE is not set | 368 | # CONFIG_NETCONSOLE is not set |
369 | # CONFIG_NETPOLL is not set | ||
370 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
345 | 371 | ||
346 | # | 372 | # |
347 | # ISDN subsystem | 373 | # ISDN subsystem |
@@ -368,14 +394,6 @@ CONFIG_INPUT=y | |||
368 | # CONFIG_INPUT_EVBUG is not set | 394 | # CONFIG_INPUT_EVBUG is not set |
369 | 395 | ||
370 | # | 396 | # |
371 | # Input I/O drivers | ||
372 | # | ||
373 | # CONFIG_GAMEPORT is not set | ||
374 | CONFIG_SOUND_GAMEPORT=y | ||
375 | # CONFIG_SERIO is not set | ||
376 | # CONFIG_SERIO_I8042 is not set | ||
377 | |||
378 | # | ||
379 | # Input Device Drivers | 397 | # Input Device Drivers |
380 | # | 398 | # |
381 | # CONFIG_INPUT_KEYBOARD is not set | 399 | # CONFIG_INPUT_KEYBOARD is not set |
@@ -385,6 +403,12 @@ CONFIG_SOUND_GAMEPORT=y | |||
385 | # CONFIG_INPUT_MISC is not set | 403 | # CONFIG_INPUT_MISC is not set |
386 | 404 | ||
387 | # | 405 | # |
406 | # Hardware I/O ports | ||
407 | # | ||
408 | # CONFIG_SERIO is not set | ||
409 | # CONFIG_GAMEPORT is not set | ||
410 | |||
411 | # | ||
388 | # Character devices | 412 | # Character devices |
389 | # | 413 | # |
390 | # CONFIG_VT is not set | 414 | # CONFIG_VT is not set |
@@ -403,11 +427,12 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
403 | CONFIG_SERIAL_CPM=y | 427 | CONFIG_SERIAL_CPM=y |
404 | CONFIG_SERIAL_CPM_CONSOLE=y | 428 | CONFIG_SERIAL_CPM_CONSOLE=y |
405 | CONFIG_SERIAL_CPM_SCC1=y | 429 | CONFIG_SERIAL_CPM_SCC1=y |
406 | # CONFIG_SERIAL_CPM_SCC2 is not set | 430 | CONFIG_SERIAL_CPM_SCC2=y |
407 | # CONFIG_SERIAL_CPM_SCC3 is not set | 431 | # CONFIG_SERIAL_CPM_SCC3 is not set |
408 | CONFIG_SERIAL_CPM_SCC4=y | 432 | # CONFIG_SERIAL_CPM_SCC4 is not set |
409 | # CONFIG_SERIAL_CPM_SMC1 is not set | 433 | # CONFIG_SERIAL_CPM_SMC1 is not set |
410 | # CONFIG_SERIAL_CPM_SMC2 is not set | 434 | # CONFIG_SERIAL_CPM_SMC2 is not set |
435 | # CONFIG_SERIAL_JSM is not set | ||
411 | CONFIG_UNIX98_PTYS=y | 436 | CONFIG_UNIX98_PTYS=y |
412 | CONFIG_LEGACY_PTYS=y | 437 | CONFIG_LEGACY_PTYS=y |
413 | CONFIG_LEGACY_PTY_COUNT=256 | 438 | CONFIG_LEGACY_PTY_COUNT=256 |
@@ -436,6 +461,11 @@ CONFIG_GEN_RTC=y | |||
436 | # CONFIG_RAW_DRIVER is not set | 461 | # CONFIG_RAW_DRIVER is not set |
437 | 462 | ||
438 | # | 463 | # |
464 | # TPM devices | ||
465 | # | ||
466 | # CONFIG_TCG_TPM is not set | ||
467 | |||
468 | # | ||
439 | # I2C support | 469 | # I2C support |
440 | # | 470 | # |
441 | CONFIG_I2C=y | 471 | CONFIG_I2C=y |
@@ -458,11 +488,11 @@ CONFIG_I2C_CHARDEV=y | |||
458 | # CONFIG_I2C_AMD8111 is not set | 488 | # CONFIG_I2C_AMD8111 is not set |
459 | # CONFIG_I2C_I801 is not set | 489 | # CONFIG_I2C_I801 is not set |
460 | # CONFIG_I2C_I810 is not set | 490 | # CONFIG_I2C_I810 is not set |
491 | # CONFIG_I2C_PIIX4 is not set | ||
461 | # CONFIG_I2C_ISA is not set | 492 | # CONFIG_I2C_ISA is not set |
462 | CONFIG_I2C_MPC=y | 493 | CONFIG_I2C_MPC=y |
463 | # CONFIG_I2C_NFORCE2 is not set | 494 | # CONFIG_I2C_NFORCE2 is not set |
464 | # CONFIG_I2C_PARPORT_LIGHT is not set | 495 | # CONFIG_I2C_PARPORT_LIGHT is not set |
465 | # CONFIG_I2C_PIIX4 is not set | ||
466 | # CONFIG_I2C_PROSAVAGE is not set | 496 | # CONFIG_I2C_PROSAVAGE is not set |
467 | # CONFIG_I2C_SAVAGE4 is not set | 497 | # CONFIG_I2C_SAVAGE4 is not set |
468 | # CONFIG_SCx200_ACB is not set | 498 | # CONFIG_SCx200_ACB is not set |
@@ -473,19 +503,46 @@ CONFIG_I2C_MPC=y | |||
473 | # CONFIG_I2C_VIAPRO is not set | 503 | # CONFIG_I2C_VIAPRO is not set |
474 | # CONFIG_I2C_VOODOO3 is not set | 504 | # CONFIG_I2C_VOODOO3 is not set |
475 | # CONFIG_I2C_PCA_ISA is not set | 505 | # CONFIG_I2C_PCA_ISA is not set |
506 | # CONFIG_I2C_SENSOR is not set | ||
476 | 507 | ||
477 | # | 508 | # |
478 | # Hardware Sensors Chip support | 509 | # Miscellaneous I2C Chip support |
479 | # | 510 | # |
480 | # CONFIG_I2C_SENSOR is not set | 511 | # CONFIG_SENSORS_DS1337 is not set |
512 | # CONFIG_SENSORS_DS1374 is not set | ||
513 | # CONFIG_SENSORS_EEPROM is not set | ||
514 | # CONFIG_SENSORS_PCF8574 is not set | ||
515 | # CONFIG_SENSORS_PCA9539 is not set | ||
516 | # CONFIG_SENSORS_PCF8591 is not set | ||
517 | # CONFIG_SENSORS_RTC8564 is not set | ||
518 | # CONFIG_SENSORS_M41T00 is not set | ||
519 | # CONFIG_SENSORS_MAX6875 is not set | ||
520 | # CONFIG_I2C_DEBUG_CORE is not set | ||
521 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
522 | # CONFIG_I2C_DEBUG_BUS is not set | ||
523 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
524 | |||
525 | # | ||
526 | # Dallas's 1-wire bus | ||
527 | # | ||
528 | # CONFIG_W1 is not set | ||
529 | |||
530 | # | ||
531 | # Hardware Monitoring support | ||
532 | # | ||
533 | CONFIG_HWMON=y | ||
481 | # CONFIG_SENSORS_ADM1021 is not set | 534 | # CONFIG_SENSORS_ADM1021 is not set |
482 | # CONFIG_SENSORS_ADM1025 is not set | 535 | # CONFIG_SENSORS_ADM1025 is not set |
483 | # CONFIG_SENSORS_ADM1026 is not set | 536 | # CONFIG_SENSORS_ADM1026 is not set |
484 | # CONFIG_SENSORS_ADM1031 is not set | 537 | # CONFIG_SENSORS_ADM1031 is not set |
538 | # CONFIG_SENSORS_ADM9240 is not set | ||
485 | # CONFIG_SENSORS_ASB100 is not set | 539 | # CONFIG_SENSORS_ASB100 is not set |
540 | # CONFIG_SENSORS_ATXP1 is not set | ||
486 | # CONFIG_SENSORS_DS1621 is not set | 541 | # CONFIG_SENSORS_DS1621 is not set |
487 | # CONFIG_SENSORS_FSCHER is not set | 542 | # CONFIG_SENSORS_FSCHER is not set |
543 | # CONFIG_SENSORS_FSCPOS is not set | ||
488 | # CONFIG_SENSORS_GL518SM is not set | 544 | # CONFIG_SENSORS_GL518SM is not set |
545 | # CONFIG_SENSORS_GL520SM is not set | ||
489 | # CONFIG_SENSORS_IT87 is not set | 546 | # CONFIG_SENSORS_IT87 is not set |
490 | # CONFIG_SENSORS_LM63 is not set | 547 | # CONFIG_SENSORS_LM63 is not set |
491 | # CONFIG_SENSORS_LM75 is not set | 548 | # CONFIG_SENSORS_LM75 is not set |
@@ -496,31 +553,18 @@ CONFIG_I2C_MPC=y | |||
496 | # CONFIG_SENSORS_LM85 is not set | 553 | # CONFIG_SENSORS_LM85 is not set |
497 | # CONFIG_SENSORS_LM87 is not set | 554 | # CONFIG_SENSORS_LM87 is not set |
498 | # CONFIG_SENSORS_LM90 is not set | 555 | # CONFIG_SENSORS_LM90 is not set |
556 | # CONFIG_SENSORS_LM92 is not set | ||
499 | # CONFIG_SENSORS_MAX1619 is not set | 557 | # CONFIG_SENSORS_MAX1619 is not set |
500 | # CONFIG_SENSORS_PC87360 is not set | 558 | # CONFIG_SENSORS_PC87360 is not set |
501 | # CONFIG_SENSORS_SMSC47B397 is not set | 559 | # CONFIG_SENSORS_SIS5595 is not set |
502 | # CONFIG_SENSORS_SMSC47M1 is not set | 560 | # CONFIG_SENSORS_SMSC47M1 is not set |
561 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
503 | # CONFIG_SENSORS_VIA686A is not set | 562 | # CONFIG_SENSORS_VIA686A is not set |
504 | # CONFIG_SENSORS_W83781D is not set | 563 | # CONFIG_SENSORS_W83781D is not set |
505 | # CONFIG_SENSORS_W83L785TS is not set | 564 | # CONFIG_SENSORS_W83L785TS is not set |
506 | # CONFIG_SENSORS_W83627HF is not set | 565 | # CONFIG_SENSORS_W83627HF is not set |
507 | 566 | # CONFIG_SENSORS_W83627EHF is not set | |
508 | # | 567 | # CONFIG_HWMON_DEBUG_CHIP is not set |
509 | # Other I2C Chip support | ||
510 | # | ||
511 | # CONFIG_SENSORS_EEPROM is not set | ||
512 | # CONFIG_SENSORS_PCF8574 is not set | ||
513 | # CONFIG_SENSORS_PCF8591 is not set | ||
514 | # CONFIG_SENSORS_RTC8564 is not set | ||
515 | # CONFIG_I2C_DEBUG_CORE is not set | ||
516 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
517 | # CONFIG_I2C_DEBUG_BUS is not set | ||
518 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
519 | |||
520 | # | ||
521 | # Dallas's 1-wire bus | ||
522 | # | ||
523 | # CONFIG_W1 is not set | ||
524 | 568 | ||
525 | # | 569 | # |
526 | # Misc devices | 570 | # Misc devices |
@@ -540,7 +584,6 @@ CONFIG_I2C_MPC=y | |||
540 | # Graphics support | 584 | # Graphics support |
541 | # | 585 | # |
542 | # CONFIG_FB is not set | 586 | # CONFIG_FB is not set |
543 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
544 | 587 | ||
545 | # | 588 | # |
546 | # Sound | 589 | # Sound |
@@ -550,13 +593,9 @@ CONFIG_I2C_MPC=y | |||
550 | # | 593 | # |
551 | # USB support | 594 | # USB support |
552 | # | 595 | # |
553 | # CONFIG_USB is not set | ||
554 | CONFIG_USB_ARCH_HAS_HCD=y | 596 | CONFIG_USB_ARCH_HAS_HCD=y |
555 | CONFIG_USB_ARCH_HAS_OHCI=y | 597 | CONFIG_USB_ARCH_HAS_OHCI=y |
556 | 598 | # CONFIG_USB is not set | |
557 | # | ||
558 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' may also be needed; see USB_STORAGE Help for more information | ||
559 | # | ||
560 | 599 | ||
561 | # | 600 | # |
562 | # USB Gadget Support | 601 | # USB Gadget Support |
@@ -574,10 +613,15 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
574 | # CONFIG_INFINIBAND is not set | 613 | # CONFIG_INFINIBAND is not set |
575 | 614 | ||
576 | # | 615 | # |
616 | # SN Devices | ||
617 | # | ||
618 | |||
619 | # | ||
577 | # File systems | 620 | # File systems |
578 | # | 621 | # |
579 | CONFIG_EXT2_FS=y | 622 | CONFIG_EXT2_FS=y |
580 | # CONFIG_EXT2_FS_XATTR is not set | 623 | # CONFIG_EXT2_FS_XATTR is not set |
624 | # CONFIG_EXT2_FS_XIP is not set | ||
581 | CONFIG_EXT3_FS=y | 625 | CONFIG_EXT3_FS=y |
582 | CONFIG_EXT3_FS_XATTR=y | 626 | CONFIG_EXT3_FS_XATTR=y |
583 | # CONFIG_EXT3_FS_POSIX_ACL is not set | 627 | # CONFIG_EXT3_FS_POSIX_ACL is not set |
@@ -587,9 +631,15 @@ CONFIG_JBD=y | |||
587 | CONFIG_FS_MBCACHE=y | 631 | CONFIG_FS_MBCACHE=y |
588 | # CONFIG_REISERFS_FS is not set | 632 | # CONFIG_REISERFS_FS is not set |
589 | # CONFIG_JFS_FS is not set | 633 | # CONFIG_JFS_FS is not set |
634 | # CONFIG_FS_POSIX_ACL is not set | ||
635 | |||
636 | # | ||
637 | # XFS support | ||
638 | # | ||
590 | # CONFIG_XFS_FS is not set | 639 | # CONFIG_XFS_FS is not set |
591 | # CONFIG_MINIX_FS is not set | 640 | # CONFIG_MINIX_FS is not set |
592 | # CONFIG_ROMFS_FS is not set | 641 | # CONFIG_ROMFS_FS is not set |
642 | CONFIG_INOTIFY=y | ||
593 | # CONFIG_QUOTA is not set | 643 | # CONFIG_QUOTA is not set |
594 | CONFIG_DNOTIFY=y | 644 | CONFIG_DNOTIFY=y |
595 | # CONFIG_AUTOFS_FS is not set | 645 | # CONFIG_AUTOFS_FS is not set |
@@ -614,7 +664,6 @@ CONFIG_DNOTIFY=y | |||
614 | CONFIG_PROC_FS=y | 664 | CONFIG_PROC_FS=y |
615 | CONFIG_PROC_KCORE=y | 665 | CONFIG_PROC_KCORE=y |
616 | CONFIG_SYSFS=y | 666 | CONFIG_SYSFS=y |
617 | # CONFIG_DEVFS_FS is not set | ||
618 | # CONFIG_DEVPTS_FS_XATTR is not set | 667 | # CONFIG_DEVPTS_FS_XATTR is not set |
619 | CONFIG_TMPFS=y | 668 | CONFIG_TMPFS=y |
620 | # CONFIG_TMPFS_XATTR is not set | 669 | # CONFIG_TMPFS_XATTR is not set |
@@ -648,7 +697,7 @@ CONFIG_NFS_FS=y | |||
648 | # CONFIG_NFSD is not set | 697 | # CONFIG_NFSD is not set |
649 | CONFIG_ROOT_NFS=y | 698 | CONFIG_ROOT_NFS=y |
650 | CONFIG_LOCKD=y | 699 | CONFIG_LOCKD=y |
651 | # CONFIG_EXPORTFS is not set | 700 | CONFIG_NFS_COMMON=y |
652 | CONFIG_SUNRPC=y | 701 | CONFIG_SUNRPC=y |
653 | # CONFIG_RPCSEC_GSS_KRB5 is not set | 702 | # CONFIG_RPCSEC_GSS_KRB5 is not set |
654 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | 703 | # CONFIG_RPCSEC_GSS_SPKM3 is not set |
@@ -700,7 +749,9 @@ CONFIG_CRC32=y | |||
700 | # | 749 | # |
701 | # Kernel hacking | 750 | # Kernel hacking |
702 | # | 751 | # |
752 | # CONFIG_PRINTK_TIME is not set | ||
703 | # CONFIG_DEBUG_KERNEL is not set | 753 | # CONFIG_DEBUG_KERNEL is not set |
754 | CONFIG_LOG_BUF_SHIFT=14 | ||
704 | # CONFIG_KGDB_CONSOLE is not set | 755 | # CONFIG_KGDB_CONSOLE is not set |
705 | 756 | ||
706 | # | 757 | # |
diff --git a/arch/ppc/configs/oak_defconfig b/arch/ppc/configs/oak_defconfig deleted file mode 100644 index 366cc480cea3..000000000000 --- a/arch/ppc/configs/oak_defconfig +++ /dev/null | |||
@@ -1,485 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | CONFIG_EMBEDDED=y | ||
22 | CONFIG_FUTEX=y | ||
23 | # CONFIG_EPOLL is not set | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | CONFIG_MODULE_UNLOAD=y | ||
30 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
31 | CONFIG_OBSOLETE_MODPARM=y | ||
32 | # CONFIG_MODVERSIONS is not set | ||
33 | CONFIG_KMOD=y | ||
34 | |||
35 | # | ||
36 | # Platform support | ||
37 | # | ||
38 | CONFIG_PPC=y | ||
39 | CONFIG_PPC32=y | ||
40 | # CONFIG_6xx is not set | ||
41 | CONFIG_40x=y | ||
42 | # CONFIG_POWER3 is not set | ||
43 | # CONFIG_8xx is not set | ||
44 | CONFIG_4xx=y | ||
45 | |||
46 | # | ||
47 | # IBM 4xx options | ||
48 | # | ||
49 | # CONFIG_ASH is not set | ||
50 | # CONFIG_BEECH is not set | ||
51 | # CONFIG_CEDAR is not set | ||
52 | # CONFIG_CPCI405 is not set | ||
53 | # CONFIG_EP405 is not set | ||
54 | CONFIG_OAK=y | ||
55 | # CONFIG_REDWOOD_4 is not set | ||
56 | # CONFIG_REDWOOD_5 is not set | ||
57 | # CONFIG_REDWOOD_6 is not set | ||
58 | # CONFIG_SYCAMORE is not set | ||
59 | # CONFIG_TIVO is not set | ||
60 | # CONFIG_WALNUT is not set | ||
61 | CONFIG_IBM405_ERR51=y | ||
62 | CONFIG_403GCX=y | ||
63 | # CONFIG_405_DMA is not set | ||
64 | # CONFIG_PM is not set | ||
65 | CONFIG_UART0_TTYS0=y | ||
66 | # CONFIG_UART0_TTYS1 is not set | ||
67 | CONFIG_NOT_COHERENT_CACHE=y | ||
68 | # CONFIG_SMP is not set | ||
69 | # CONFIG_PREEMPT is not set | ||
70 | # CONFIG_MATH_EMULATION is not set | ||
71 | # CONFIG_CPU_FREQ is not set | ||
72 | |||
73 | # | ||
74 | # General setup | ||
75 | # | ||
76 | # CONFIG_HIGHMEM is not set | ||
77 | # CONFIG_PCI is not set | ||
78 | # CONFIG_PCI_DOMAINS is not set | ||
79 | # CONFIG_PC_KEYBOARD is not set | ||
80 | CONFIG_KCORE_ELF=y | ||
81 | CONFIG_BINFMT_ELF=y | ||
82 | CONFIG_KERNEL_ELF=y | ||
83 | # CONFIG_BINFMT_MISC is not set | ||
84 | # CONFIG_HOTPLUG is not set | ||
85 | |||
86 | # | ||
87 | # Parallel port support | ||
88 | # | ||
89 | # CONFIG_PARPORT is not set | ||
90 | # CONFIG_CMDLINE_BOOL is not set | ||
91 | |||
92 | # | ||
93 | # Advanced setup | ||
94 | # | ||
95 | # CONFIG_ADVANCED_OPTIONS is not set | ||
96 | |||
97 | # | ||
98 | # Default settings for advanced configuration options are used | ||
99 | # | ||
100 | CONFIG_HIGHMEM_START=0xfe000000 | ||
101 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
102 | CONFIG_KERNEL_START=0xc0000000 | ||
103 | CONFIG_TASK_SIZE=0x80000000 | ||
104 | CONFIG_BOOT_LOAD=0x00400000 | ||
105 | |||
106 | # | ||
107 | # Memory Technology Devices (MTD) | ||
108 | # | ||
109 | # CONFIG_MTD is not set | ||
110 | |||
111 | # | ||
112 | # Plug and Play support | ||
113 | # | ||
114 | # CONFIG_PNP is not set | ||
115 | |||
116 | # | ||
117 | # Block devices | ||
118 | # | ||
119 | # CONFIG_BLK_DEV_FD is not set | ||
120 | CONFIG_BLK_DEV_LOOP=y | ||
121 | # CONFIG_BLK_DEV_NBD is not set | ||
122 | CONFIG_BLK_DEV_RAM=y | ||
123 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
124 | CONFIG_BLK_DEV_INITRD=y | ||
125 | |||
126 | # | ||
127 | # Multi-device support (RAID and LVM) | ||
128 | # | ||
129 | # CONFIG_MD is not set | ||
130 | |||
131 | # | ||
132 | # ATA/IDE/MFM/RLL support | ||
133 | # | ||
134 | # CONFIG_IDE is not set | ||
135 | |||
136 | # | ||
137 | # SCSI support | ||
138 | # | ||
139 | # CONFIG_SCSI is not set | ||
140 | |||
141 | # | ||
142 | # Fusion MPT device support | ||
143 | # | ||
144 | |||
145 | # | ||
146 | # I2O device support | ||
147 | # | ||
148 | |||
149 | # | ||
150 | # Networking support | ||
151 | # | ||
152 | CONFIG_NET=y | ||
153 | |||
154 | # | ||
155 | # Networking options | ||
156 | # | ||
157 | # CONFIG_PACKET is not set | ||
158 | # CONFIG_NETLINK_DEV is not set | ||
159 | # CONFIG_NETFILTER is not set | ||
160 | CONFIG_UNIX=y | ||
161 | # CONFIG_NET_KEY is not set | ||
162 | CONFIG_INET=y | ||
163 | CONFIG_IP_MULTICAST=y | ||
164 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
165 | CONFIG_IP_PNP=y | ||
166 | # CONFIG_IP_PNP_DHCP is not set | ||
167 | CONFIG_IP_PNP_BOOTP=y | ||
168 | CONFIG_IP_PNP_RARP=y | ||
169 | # CONFIG_NET_IPIP is not set | ||
170 | # CONFIG_NET_IPGRE is not set | ||
171 | # CONFIG_IP_MROUTE is not set | ||
172 | # CONFIG_ARPD is not set | ||
173 | # CONFIG_INET_ECN is not set | ||
174 | CONFIG_SYN_COOKIES=y | ||
175 | # CONFIG_INET_AH is not set | ||
176 | # CONFIG_INET_ESP is not set | ||
177 | # CONFIG_INET_IPCOMP is not set | ||
178 | # CONFIG_IPV6 is not set | ||
179 | # CONFIG_XFRM_USER is not set | ||
180 | |||
181 | # | ||
182 | # SCTP Configuration (EXPERIMENTAL) | ||
183 | # | ||
184 | CONFIG_IPV6_SCTP__=y | ||
185 | # CONFIG_IP_SCTP is not set | ||
186 | # CONFIG_ATM is not set | ||
187 | # CONFIG_VLAN_8021Q is not set | ||
188 | # CONFIG_LLC is not set | ||
189 | # CONFIG_DECNET is not set | ||
190 | # CONFIG_BRIDGE is not set | ||
191 | # CONFIG_X25 is not set | ||
192 | # CONFIG_LAPB is not set | ||
193 | # CONFIG_NET_DIVERT is not set | ||
194 | # CONFIG_ECONET is not set | ||
195 | # CONFIG_WAN_ROUTER is not set | ||
196 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
197 | |||
198 | # | ||
199 | # QoS and/or fair queueing | ||
200 | # | ||
201 | # CONFIG_NET_SCHED is not set | ||
202 | |||
203 | # | ||
204 | # Network testing | ||
205 | # | ||
206 | # CONFIG_NET_PKTGEN is not set | ||
207 | CONFIG_NETDEVICES=y | ||
208 | # CONFIG_DUMMY is not set | ||
209 | # CONFIG_BONDING is not set | ||
210 | # CONFIG_EQUALIZER is not set | ||
211 | # CONFIG_TUN is not set | ||
212 | # CONFIG_ETHERTAP is not set | ||
213 | |||
214 | # | ||
215 | # Ethernet (10 or 100Mbit) | ||
216 | # | ||
217 | CONFIG_NET_ETHERNET=y | ||
218 | # CONFIG_MII is not set | ||
219 | CONFIG_OAKNET=y | ||
220 | |||
221 | # | ||
222 | # Ethernet (1000 Mbit) | ||
223 | # | ||
224 | |||
225 | # | ||
226 | # Ethernet (10000 Mbit) | ||
227 | # | ||
228 | # CONFIG_PPP is not set | ||
229 | # CONFIG_SLIP is not set | ||
230 | |||
231 | # | ||
232 | # Wireless LAN (non-hamradio) | ||
233 | # | ||
234 | # CONFIG_NET_RADIO is not set | ||
235 | |||
236 | # | ||
237 | # Token Ring devices (depends on LLC=y) | ||
238 | # | ||
239 | # CONFIG_SHAPER is not set | ||
240 | |||
241 | # | ||
242 | # Wan interfaces | ||
243 | # | ||
244 | # CONFIG_WAN is not set | ||
245 | |||
246 | # | ||
247 | # Amateur Radio support | ||
248 | # | ||
249 | # CONFIG_HAMRADIO is not set | ||
250 | |||
251 | # | ||
252 | # IrDA (infrared) support | ||
253 | # | ||
254 | # CONFIG_IRDA is not set | ||
255 | |||
256 | # | ||
257 | # ISDN subsystem | ||
258 | # | ||
259 | # CONFIG_ISDN_BOOL is not set | ||
260 | |||
261 | # | ||
262 | # Graphics support | ||
263 | # | ||
264 | # CONFIG_FB is not set | ||
265 | |||
266 | # | ||
267 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
268 | # | ||
269 | # CONFIG_CD_NO_IDESCSI is not set | ||
270 | |||
271 | # | ||
272 | # Input device support | ||
273 | # | ||
274 | # CONFIG_INPUT is not set | ||
275 | |||
276 | # | ||
277 | # Userland interfaces | ||
278 | # | ||
279 | |||
280 | # | ||
281 | # Input I/O drivers | ||
282 | # | ||
283 | # CONFIG_GAMEPORT is not set | ||
284 | CONFIG_SOUND_GAMEPORT=y | ||
285 | # CONFIG_SERIO is not set | ||
286 | |||
287 | # | ||
288 | # Input Device Drivers | ||
289 | # | ||
290 | |||
291 | # | ||
292 | # Macintosh device drivers | ||
293 | # | ||
294 | |||
295 | # | ||
296 | # Character devices | ||
297 | # | ||
298 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
299 | |||
300 | # | ||
301 | # Serial drivers | ||
302 | # | ||
303 | CONFIG_SERIAL_8250=y | ||
304 | CONFIG_SERIAL_8250_CONSOLE=y | ||
305 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
306 | |||
307 | # | ||
308 | # Non-8250 serial port support | ||
309 | # | ||
310 | CONFIG_SERIAL_CORE=y | ||
311 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
312 | # CONFIG_UNIX98_PTYS is not set | ||
313 | |||
314 | # | ||
315 | # I2C support | ||
316 | # | ||
317 | # CONFIG_I2C is not set | ||
318 | |||
319 | # | ||
320 | # I2C Hardware Sensors Mainboard support | ||
321 | # | ||
322 | |||
323 | # | ||
324 | # I2C Hardware Sensors Chip support | ||
325 | # | ||
326 | # CONFIG_I2C_SENSOR is not set | ||
327 | |||
328 | # | ||
329 | # Mice | ||
330 | # | ||
331 | # CONFIG_BUSMOUSE is not set | ||
332 | # CONFIG_QIC02_TAPE is not set | ||
333 | |||
334 | # | ||
335 | # IPMI | ||
336 | # | ||
337 | # CONFIG_IPMI_HANDLER is not set | ||
338 | |||
339 | # | ||
340 | # Watchdog Cards | ||
341 | # | ||
342 | # CONFIG_WATCHDOG is not set | ||
343 | # CONFIG_NVRAM is not set | ||
344 | CONFIG_GEN_RTC=y | ||
345 | # CONFIG_GEN_RTC_X is not set | ||
346 | # CONFIG_DTLK is not set | ||
347 | # CONFIG_R3964 is not set | ||
348 | # CONFIG_APPLICOM is not set | ||
349 | |||
350 | # | ||
351 | # Ftape, the floppy tape device driver | ||
352 | # | ||
353 | # CONFIG_FTAPE is not set | ||
354 | # CONFIG_AGP is not set | ||
355 | # CONFIG_DRM is not set | ||
356 | # CONFIG_RAW_DRIVER is not set | ||
357 | # CONFIG_HANGCHECK_TIMER is not set | ||
358 | |||
359 | # | ||
360 | # Multimedia devices | ||
361 | # | ||
362 | # CONFIG_VIDEO_DEV is not set | ||
363 | |||
364 | # | ||
365 | # Digital Video Broadcasting Devices | ||
366 | # | ||
367 | # CONFIG_DVB is not set | ||
368 | |||
369 | # | ||
370 | # File systems | ||
371 | # | ||
372 | CONFIG_EXT2_FS=y | ||
373 | # CONFIG_EXT2_FS_XATTR is not set | ||
374 | # CONFIG_EXT3_FS is not set | ||
375 | # CONFIG_JBD is not set | ||
376 | # CONFIG_REISERFS_FS is not set | ||
377 | # CONFIG_JFS_FS is not set | ||
378 | # CONFIG_XFS_FS is not set | ||
379 | # CONFIG_MINIX_FS is not set | ||
380 | # CONFIG_ROMFS_FS is not set | ||
381 | # CONFIG_QUOTA is not set | ||
382 | # CONFIG_AUTOFS_FS is not set | ||
383 | # CONFIG_AUTOFS4_FS is not set | ||
384 | |||
385 | # | ||
386 | # CD-ROM/DVD Filesystems | ||
387 | # | ||
388 | # CONFIG_ISO9660_FS is not set | ||
389 | # CONFIG_UDF_FS is not set | ||
390 | |||
391 | # | ||
392 | # DOS/FAT/NT Filesystems | ||
393 | # | ||
394 | # CONFIG_FAT_FS is not set | ||
395 | # CONFIG_NTFS_FS is not set | ||
396 | |||
397 | # | ||
398 | # Pseudo filesystems | ||
399 | # | ||
400 | CONFIG_PROC_FS=y | ||
401 | # CONFIG_DEVFS_FS is not set | ||
402 | CONFIG_TMPFS=y | ||
403 | CONFIG_RAMFS=y | ||
404 | |||
405 | # | ||
406 | # Miscellaneous filesystems | ||
407 | # | ||
408 | # CONFIG_ADFS_FS is not set | ||
409 | # CONFIG_AFFS_FS is not set | ||
410 | # CONFIG_HFS_FS is not set | ||
411 | # CONFIG_BEFS_FS is not set | ||
412 | # CONFIG_BFS_FS is not set | ||
413 | # CONFIG_EFS_FS is not set | ||
414 | # CONFIG_CRAMFS is not set | ||
415 | # CONFIG_VXFS_FS is not set | ||
416 | # CONFIG_HPFS_FS is not set | ||
417 | # CONFIG_QNX4FS_FS is not set | ||
418 | # CONFIG_SYSV_FS is not set | ||
419 | # CONFIG_UFS_FS is not set | ||
420 | |||
421 | # | ||
422 | # Network File Systems | ||
423 | # | ||
424 | CONFIG_NFS_FS=y | ||
425 | # CONFIG_NFS_V3 is not set | ||
426 | # CONFIG_NFS_V4 is not set | ||
427 | # CONFIG_NFSD is not set | ||
428 | CONFIG_ROOT_NFS=y | ||
429 | CONFIG_LOCKD=y | ||
430 | # CONFIG_EXPORTFS is not set | ||
431 | CONFIG_SUNRPC=y | ||
432 | # CONFIG_SUNRPC_GSS is not set | ||
433 | # CONFIG_SMB_FS is not set | ||
434 | # CONFIG_CIFS is not set | ||
435 | # CONFIG_NCP_FS is not set | ||
436 | # CONFIG_CODA_FS is not set | ||
437 | # CONFIG_INTERMEZZO_FS is not set | ||
438 | # CONFIG_AFS_FS is not set | ||
439 | |||
440 | # | ||
441 | # Partition Types | ||
442 | # | ||
443 | # CONFIG_PARTITION_ADVANCED is not set | ||
444 | CONFIG_MSDOS_PARTITION=y | ||
445 | |||
446 | # | ||
447 | # Sound | ||
448 | # | ||
449 | # CONFIG_SOUND is not set | ||
450 | |||
451 | # | ||
452 | # IBM 40x options | ||
453 | # | ||
454 | |||
455 | # | ||
456 | # USB support | ||
457 | # | ||
458 | # CONFIG_USB_GADGET is not set | ||
459 | |||
460 | # | ||
461 | # Bluetooth support | ||
462 | # | ||
463 | # CONFIG_BT is not set | ||
464 | |||
465 | # | ||
466 | # Library routines | ||
467 | # | ||
468 | # CONFIG_CRC32 is not set | ||
469 | |||
470 | # | ||
471 | # Kernel hacking | ||
472 | # | ||
473 | # CONFIG_DEBUG_KERNEL is not set | ||
474 | # CONFIG_KALLSYMS is not set | ||
475 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
476 | |||
477 | # | ||
478 | # Security options | ||
479 | # | ||
480 | # CONFIG_SECURITY is not set | ||
481 | |||
482 | # | ||
483 | # Cryptographic options | ||
484 | # | ||
485 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/pcore_defconfig b/arch/ppc/configs/pcore_defconfig deleted file mode 100644 index ed34405a7574..000000000000 --- a/arch/ppc/configs/pcore_defconfig +++ /dev/null | |||
@@ -1,716 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | CONFIG_PPC=y | ||
8 | CONFIG_PPC32=y | ||
9 | CONFIG_GENERIC_NVRAM=y | ||
10 | |||
11 | # | ||
12 | # Code maturity level options | ||
13 | # | ||
14 | CONFIG_EXPERIMENTAL=y | ||
15 | CONFIG_CLEAN_COMPILE=y | ||
16 | CONFIG_STANDALONE=y | ||
17 | CONFIG_BROKEN_ON_SMP=y | ||
18 | |||
19 | # | ||
20 | # General setup | ||
21 | # | ||
22 | CONFIG_SWAP=y | ||
23 | CONFIG_SYSVIPC=y | ||
24 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
25 | CONFIG_SYSCTL=y | ||
26 | CONFIG_LOG_BUF_SHIFT=14 | ||
27 | # CONFIG_HOTPLUG is not set | ||
28 | # CONFIG_IKCONFIG is not set | ||
29 | CONFIG_EMBEDDED=y | ||
30 | CONFIG_KALLSYMS=y | ||
31 | CONFIG_FUTEX=y | ||
32 | CONFIG_EPOLL=y | ||
33 | CONFIG_IOSCHED_NOOP=y | ||
34 | CONFIG_IOSCHED_AS=y | ||
35 | CONFIG_IOSCHED_DEADLINE=y | ||
36 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
37 | |||
38 | # | ||
39 | # Loadable module support | ||
40 | # | ||
41 | CONFIG_MODULES=y | ||
42 | CONFIG_MODULE_UNLOAD=y | ||
43 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
44 | CONFIG_OBSOLETE_MODPARM=y | ||
45 | # CONFIG_MODVERSIONS is not set | ||
46 | CONFIG_KMOD=y | ||
47 | |||
48 | # | ||
49 | # Processor | ||
50 | # | ||
51 | CONFIG_6xx=y | ||
52 | # CONFIG_40x is not set | ||
53 | # CONFIG_44x is not set | ||
54 | # CONFIG_POWER3 is not set | ||
55 | # CONFIG_POWER4 is not set | ||
56 | # CONFIG_8xx is not set | ||
57 | CONFIG_ALTIVEC=y | ||
58 | # CONFIG_TAU is not set | ||
59 | # CONFIG_CPU_FREQ is not set | ||
60 | CONFIG_PPC_STD_MMU=y | ||
61 | |||
62 | # | ||
63 | # Platform options | ||
64 | # | ||
65 | # CONFIG_PPC_MULTIPLATFORM is not set | ||
66 | # CONFIG_APUS is not set | ||
67 | # CONFIG_WILLOW is not set | ||
68 | CONFIG_PCORE=y | ||
69 | # CONFIG_POWERPMC250 is not set | ||
70 | # CONFIG_EV64260 is not set | ||
71 | # CONFIG_SPRUCE is not set | ||
72 | # CONFIG_LOPEC is not set | ||
73 | # CONFIG_MCPN765 is not set | ||
74 | # CONFIG_MVME5100 is not set | ||
75 | # CONFIG_PPLUS is not set | ||
76 | # CONFIG_PRPMC750 is not set | ||
77 | # CONFIG_PRPMC800 is not set | ||
78 | # CONFIG_SANDPOINT is not set | ||
79 | # CONFIG_ADIR is not set | ||
80 | # CONFIG_K2 is not set | ||
81 | # CONFIG_PAL4 is not set | ||
82 | # CONFIG_GEMINI is not set | ||
83 | # CONFIG_EST8260 is not set | ||
84 | # CONFIG_SBS8260 is not set | ||
85 | # CONFIG_RPX6 is not set | ||
86 | # CONFIG_TQM8260 is not set | ||
87 | CONFIG_PPC_GEN550=y | ||
88 | CONFIG_FORCE=y | ||
89 | # CONFIG_MPC10X_STORE_GATHERING is not set | ||
90 | # CONFIG_SMP is not set | ||
91 | # CONFIG_PREEMPT is not set | ||
92 | # CONFIG_HIGHMEM is not set | ||
93 | CONFIG_KERNEL_ELF=y | ||
94 | CONFIG_BINFMT_ELF=y | ||
95 | # CONFIG_BINFMT_MISC is not set | ||
96 | CONFIG_CMDLINE_BOOL=y | ||
97 | CONFIG_CMDLINE="ip=on" | ||
98 | |||
99 | # | ||
100 | # Bus options | ||
101 | # | ||
102 | CONFIG_GENERIC_ISA_DMA=y | ||
103 | CONFIG_PCI=y | ||
104 | CONFIG_PCI_DOMAINS=y | ||
105 | # CONFIG_PCI_LEGACY_PROC is not set | ||
106 | # CONFIG_PCI_NAMES is not set | ||
107 | |||
108 | # | ||
109 | # Advanced setup | ||
110 | # | ||
111 | # CONFIG_ADVANCED_OPTIONS is not set | ||
112 | |||
113 | # | ||
114 | # Default settings for advanced configuration options are used | ||
115 | # | ||
116 | CONFIG_HIGHMEM_START=0xfe000000 | ||
117 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
118 | CONFIG_KERNEL_START=0xc0000000 | ||
119 | CONFIG_TASK_SIZE=0x80000000 | ||
120 | CONFIG_BOOT_LOAD=0x00800000 | ||
121 | |||
122 | # | ||
123 | # Device Drivers | ||
124 | # | ||
125 | |||
126 | # | ||
127 | # Generic Driver Options | ||
128 | # | ||
129 | |||
130 | # | ||
131 | # Memory Technology Devices (MTD) | ||
132 | # | ||
133 | # CONFIG_MTD is not set | ||
134 | |||
135 | # | ||
136 | # Parallel port support | ||
137 | # | ||
138 | # CONFIG_PARPORT is not set | ||
139 | |||
140 | # | ||
141 | # Plug and Play support | ||
142 | # | ||
143 | |||
144 | # | ||
145 | # Block devices | ||
146 | # | ||
147 | # CONFIG_BLK_DEV_FD is not set | ||
148 | # CONFIG_BLK_CPQ_DA is not set | ||
149 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
150 | # CONFIG_BLK_DEV_DAC960 is not set | ||
151 | # CONFIG_BLK_DEV_UMEM is not set | ||
152 | # CONFIG_BLK_DEV_LOOP is not set | ||
153 | # CONFIG_BLK_DEV_NBD is not set | ||
154 | # CONFIG_BLK_DEV_CARMEL is not set | ||
155 | CONFIG_BLK_DEV_RAM=y | ||
156 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
157 | CONFIG_BLK_DEV_INITRD=y | ||
158 | # CONFIG_LBD is not set | ||
159 | |||
160 | # | ||
161 | # ATA/ATAPI/MFM/RLL support | ||
162 | # | ||
163 | # CONFIG_IDE is not set | ||
164 | |||
165 | # | ||
166 | # SCSI device support | ||
167 | # | ||
168 | CONFIG_SCSI=y | ||
169 | CONFIG_SCSI_PROC_FS=y | ||
170 | |||
171 | # | ||
172 | # SCSI support type (disk, tape, CD-ROM) | ||
173 | # | ||
174 | CONFIG_BLK_DEV_SD=y | ||
175 | # CONFIG_CHR_DEV_ST is not set | ||
176 | # CONFIG_CHR_DEV_OSST is not set | ||
177 | CONFIG_BLK_DEV_SR=y | ||
178 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
179 | # CONFIG_CHR_DEV_SG is not set | ||
180 | |||
181 | # | ||
182 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
183 | # | ||
184 | # CONFIG_SCSI_MULTI_LUN is not set | ||
185 | # CONFIG_SCSI_REPORT_LUNS is not set | ||
186 | # CONFIG_SCSI_CONSTANTS is not set | ||
187 | # CONFIG_SCSI_LOGGING is not set | ||
188 | |||
189 | # | ||
190 | # SCSI Transport Attributes | ||
191 | # | ||
192 | # CONFIG_SCSI_SPI_ATTRS is not set | ||
193 | # CONFIG_SCSI_FC_ATTRS is not set | ||
194 | |||
195 | # | ||
196 | # SCSI low-level drivers | ||
197 | # | ||
198 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
199 | # CONFIG_SCSI_ACARD is not set | ||
200 | # CONFIG_SCSI_AACRAID is not set | ||
201 | # CONFIG_SCSI_AIC7XXX is not set | ||
202 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
203 | # CONFIG_SCSI_AIC79XX is not set | ||
204 | # CONFIG_SCSI_ADVANSYS is not set | ||
205 | # CONFIG_SCSI_MEGARAID is not set | ||
206 | # CONFIG_SCSI_SATA is not set | ||
207 | # CONFIG_SCSI_BUSLOGIC is not set | ||
208 | # CONFIG_SCSI_CPQFCTS is not set | ||
209 | # CONFIG_SCSI_DMX3191D is not set | ||
210 | # CONFIG_SCSI_EATA is not set | ||
211 | # CONFIG_SCSI_EATA_PIO is not set | ||
212 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
213 | # CONFIG_SCSI_GDTH is not set | ||
214 | # CONFIG_SCSI_IPS is not set | ||
215 | # CONFIG_SCSI_INIA100 is not set | ||
216 | CONFIG_SCSI_SYM53C8XX_2=y | ||
217 | CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1 | ||
218 | CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16 | ||
219 | CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64 | ||
220 | # CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set | ||
221 | # CONFIG_SCSI_QLOGIC_ISP is not set | ||
222 | # CONFIG_SCSI_QLOGIC_FC is not set | ||
223 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
224 | CONFIG_SCSI_QLA2XXX=y | ||
225 | # CONFIG_SCSI_QLA21XX is not set | ||
226 | # CONFIG_SCSI_QLA22XX is not set | ||
227 | # CONFIG_SCSI_QLA2300 is not set | ||
228 | # CONFIG_SCSI_QLA2322 is not set | ||
229 | # CONFIG_SCSI_QLA6312 is not set | ||
230 | # CONFIG_SCSI_QLA6322 is not set | ||
231 | # CONFIG_SCSI_DC395x is not set | ||
232 | # CONFIG_SCSI_DC390T is not set | ||
233 | # CONFIG_SCSI_NSP32 is not set | ||
234 | # CONFIG_SCSI_DEBUG is not set | ||
235 | |||
236 | # | ||
237 | # Multi-device support (RAID and LVM) | ||
238 | # | ||
239 | # CONFIG_MD is not set | ||
240 | |||
241 | # | ||
242 | # Fusion MPT device support | ||
243 | # | ||
244 | # CONFIG_FUSION is not set | ||
245 | |||
246 | # | ||
247 | # IEEE 1394 (FireWire) support | ||
248 | # | ||
249 | # CONFIG_IEEE1394 is not set | ||
250 | |||
251 | # | ||
252 | # I2O device support | ||
253 | # | ||
254 | # CONFIG_I2O is not set | ||
255 | |||
256 | # | ||
257 | # Macintosh device drivers | ||
258 | # | ||
259 | |||
260 | # | ||
261 | # Networking support | ||
262 | # | ||
263 | CONFIG_NET=y | ||
264 | |||
265 | # | ||
266 | # Networking options | ||
267 | # | ||
268 | CONFIG_PACKET=y | ||
269 | # CONFIG_PACKET_MMAP is not set | ||
270 | # CONFIG_NETLINK_DEV is not set | ||
271 | CONFIG_UNIX=y | ||
272 | # CONFIG_NET_KEY is not set | ||
273 | CONFIG_INET=y | ||
274 | CONFIG_IP_MULTICAST=y | ||
275 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
276 | CONFIG_IP_PNP=y | ||
277 | CONFIG_IP_PNP_DHCP=y | ||
278 | # CONFIG_IP_PNP_BOOTP is not set | ||
279 | # CONFIG_IP_PNP_RARP is not set | ||
280 | # CONFIG_NET_IPIP is not set | ||
281 | # CONFIG_NET_IPGRE is not set | ||
282 | # CONFIG_IP_MROUTE is not set | ||
283 | # CONFIG_ARPD is not set | ||
284 | # CONFIG_SYN_COOKIES is not set | ||
285 | # CONFIG_INET_AH is not set | ||
286 | # CONFIG_INET_ESP is not set | ||
287 | # CONFIG_INET_IPCOMP is not set | ||
288 | |||
289 | # | ||
290 | # IP: Virtual Server Configuration | ||
291 | # | ||
292 | # CONFIG_IP_VS is not set | ||
293 | # CONFIG_IPV6 is not set | ||
294 | # CONFIG_DECNET is not set | ||
295 | # CONFIG_BRIDGE is not set | ||
296 | CONFIG_NETFILTER=y | ||
297 | # CONFIG_NETFILTER_DEBUG is not set | ||
298 | |||
299 | # | ||
300 | # IP: Netfilter Configuration | ||
301 | # | ||
302 | CONFIG_IP_NF_CONNTRACK=m | ||
303 | CONFIG_IP_NF_FTP=m | ||
304 | CONFIG_IP_NF_IRC=m | ||
305 | # CONFIG_IP_NF_TFTP is not set | ||
306 | # CONFIG_IP_NF_AMANDA is not set | ||
307 | # CONFIG_IP_NF_QUEUE is not set | ||
308 | CONFIG_IP_NF_IPTABLES=m | ||
309 | CONFIG_IP_NF_MATCH_LIMIT=m | ||
310 | # CONFIG_IP_NF_MATCH_IPRANGE is not set | ||
311 | CONFIG_IP_NF_MATCH_MAC=m | ||
312 | CONFIG_IP_NF_MATCH_PKTTYPE=m | ||
313 | CONFIG_IP_NF_MATCH_MARK=m | ||
314 | CONFIG_IP_NF_MATCH_MULTIPORT=m | ||
315 | CONFIG_IP_NF_MATCH_TOS=m | ||
316 | # CONFIG_IP_NF_MATCH_RECENT is not set | ||
317 | CONFIG_IP_NF_MATCH_ECN=m | ||
318 | CONFIG_IP_NF_MATCH_DSCP=m | ||
319 | CONFIG_IP_NF_MATCH_AH_ESP=m | ||
320 | CONFIG_IP_NF_MATCH_LENGTH=m | ||
321 | CONFIG_IP_NF_MATCH_TTL=m | ||
322 | CONFIG_IP_NF_MATCH_TCPMSS=m | ||
323 | CONFIG_IP_NF_MATCH_HELPER=m | ||
324 | CONFIG_IP_NF_MATCH_STATE=m | ||
325 | CONFIG_IP_NF_MATCH_CONNTRACK=m | ||
326 | CONFIG_IP_NF_MATCH_OWNER=m | ||
327 | CONFIG_IP_NF_FILTER=m | ||
328 | CONFIG_IP_NF_TARGET_REJECT=m | ||
329 | CONFIG_IP_NF_NAT=m | ||
330 | CONFIG_IP_NF_NAT_NEEDED=y | ||
331 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
332 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
333 | # CONFIG_IP_NF_TARGET_NETMAP is not set | ||
334 | # CONFIG_IP_NF_TARGET_SAME is not set | ||
335 | # CONFIG_IP_NF_NAT_SNMP_BASIC is not set | ||
336 | CONFIG_IP_NF_NAT_IRC=m | ||
337 | CONFIG_IP_NF_NAT_FTP=m | ||
338 | # CONFIG_IP_NF_MANGLE is not set | ||
339 | # CONFIG_IP_NF_TARGET_LOG is not set | ||
340 | CONFIG_IP_NF_TARGET_ULOG=m | ||
341 | CONFIG_IP_NF_TARGET_TCPMSS=m | ||
342 | CONFIG_IP_NF_ARPTABLES=m | ||
343 | CONFIG_IP_NF_ARPFILTER=m | ||
344 | # CONFIG_IP_NF_ARP_MANGLE is not set | ||
345 | CONFIG_IP_NF_COMPAT_IPCHAINS=m | ||
346 | # CONFIG_IP_NF_COMPAT_IPFWADM is not set | ||
347 | |||
348 | # | ||
349 | # SCTP Configuration (EXPERIMENTAL) | ||
350 | # | ||
351 | # CONFIG_IP_SCTP is not set | ||
352 | # CONFIG_ATM is not set | ||
353 | # CONFIG_VLAN_8021Q is not set | ||
354 | # CONFIG_LLC2 is not set | ||
355 | # CONFIG_IPX is not set | ||
356 | # CONFIG_ATALK is not set | ||
357 | # CONFIG_X25 is not set | ||
358 | # CONFIG_LAPB is not set | ||
359 | # CONFIG_NET_DIVERT is not set | ||
360 | # CONFIG_ECONET is not set | ||
361 | # CONFIG_WAN_ROUTER is not set | ||
362 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
363 | |||
364 | # | ||
365 | # QoS and/or fair queueing | ||
366 | # | ||
367 | # CONFIG_NET_SCHED is not set | ||
368 | |||
369 | # | ||
370 | # Network testing | ||
371 | # | ||
372 | # CONFIG_NET_PKTGEN is not set | ||
373 | CONFIG_NETDEVICES=y | ||
374 | |||
375 | # | ||
376 | # ARCnet devices | ||
377 | # | ||
378 | # CONFIG_ARCNET is not set | ||
379 | # CONFIG_DUMMY is not set | ||
380 | # CONFIG_BONDING is not set | ||
381 | # CONFIG_EQUALIZER is not set | ||
382 | # CONFIG_TUN is not set | ||
383 | |||
384 | # | ||
385 | # Ethernet (10 or 100Mbit) | ||
386 | # | ||
387 | CONFIG_NET_ETHERNET=y | ||
388 | CONFIG_MII=y | ||
389 | # CONFIG_OAKNET is not set | ||
390 | # CONFIG_HAPPYMEAL is not set | ||
391 | # CONFIG_SUNGEM is not set | ||
392 | # CONFIG_NET_VENDOR_3COM is not set | ||
393 | |||
394 | # | ||
395 | # Tulip family network device support | ||
396 | # | ||
397 | CONFIG_NET_TULIP=y | ||
398 | # CONFIG_DE2104X is not set | ||
399 | CONFIG_TULIP=y | ||
400 | # CONFIG_TULIP_MWI is not set | ||
401 | # CONFIG_TULIP_MMIO is not set | ||
402 | # CONFIG_TULIP_NAPI is not set | ||
403 | # CONFIG_DE4X5 is not set | ||
404 | # CONFIG_WINBOND_840 is not set | ||
405 | # CONFIG_DM9102 is not set | ||
406 | # CONFIG_HP100 is not set | ||
407 | CONFIG_NET_PCI=y | ||
408 | # CONFIG_PCNET32 is not set | ||
409 | # CONFIG_AMD8111_ETH is not set | ||
410 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
411 | # CONFIG_B44 is not set | ||
412 | # CONFIG_FORCEDETH is not set | ||
413 | # CONFIG_DGRS is not set | ||
414 | CONFIG_EEPRO100=y | ||
415 | # CONFIG_EEPRO100_PIO is not set | ||
416 | # CONFIG_E100 is not set | ||
417 | # CONFIG_FEALNX is not set | ||
418 | # CONFIG_NATSEMI is not set | ||
419 | # CONFIG_NE2K_PCI is not set | ||
420 | # CONFIG_8139CP is not set | ||
421 | # CONFIG_8139TOO is not set | ||
422 | # CONFIG_SIS900 is not set | ||
423 | # CONFIG_EPIC100 is not set | ||
424 | # CONFIG_SUNDANCE is not set | ||
425 | # CONFIG_TLAN is not set | ||
426 | # CONFIG_VIA_RHINE is not set | ||
427 | |||
428 | # | ||
429 | # Ethernet (1000 Mbit) | ||
430 | # | ||
431 | # CONFIG_ACENIC is not set | ||
432 | # CONFIG_DL2K is not set | ||
433 | # CONFIG_E1000 is not set | ||
434 | # CONFIG_NS83820 is not set | ||
435 | # CONFIG_HAMACHI is not set | ||
436 | # CONFIG_YELLOWFIN is not set | ||
437 | # CONFIG_R8169 is not set | ||
438 | # CONFIG_SIS190 is not set | ||
439 | # CONFIG_SK98LIN is not set | ||
440 | # CONFIG_TIGON3 is not set | ||
441 | |||
442 | # | ||
443 | # Ethernet (10000 Mbit) | ||
444 | # | ||
445 | # CONFIG_IXGB is not set | ||
446 | # CONFIG_FDDI is not set | ||
447 | # CONFIG_HIPPI is not set | ||
448 | # CONFIG_PPP is not set | ||
449 | # CONFIG_SLIP is not set | ||
450 | |||
451 | # | ||
452 | # Wireless LAN (non-hamradio) | ||
453 | # | ||
454 | # CONFIG_NET_RADIO is not set | ||
455 | |||
456 | # | ||
457 | # Token Ring devices | ||
458 | # | ||
459 | # CONFIG_TR is not set | ||
460 | # CONFIG_NET_FC is not set | ||
461 | # CONFIG_RCPCI is not set | ||
462 | # CONFIG_SHAPER is not set | ||
463 | # CONFIG_NETCONSOLE is not set | ||
464 | |||
465 | # | ||
466 | # Wan interfaces | ||
467 | # | ||
468 | # CONFIG_WAN is not set | ||
469 | |||
470 | # | ||
471 | # Amateur Radio support | ||
472 | # | ||
473 | # CONFIG_HAMRADIO is not set | ||
474 | |||
475 | # | ||
476 | # IrDA (infrared) support | ||
477 | # | ||
478 | # CONFIG_IRDA is not set | ||
479 | |||
480 | # | ||
481 | # Bluetooth support | ||
482 | # | ||
483 | # CONFIG_BT is not set | ||
484 | # CONFIG_NETPOLL is not set | ||
485 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
486 | |||
487 | # | ||
488 | # ISDN subsystem | ||
489 | # | ||
490 | # CONFIG_ISDN is not set | ||
491 | |||
492 | # | ||
493 | # Telephony Support | ||
494 | # | ||
495 | # CONFIG_PHONE is not set | ||
496 | |||
497 | # | ||
498 | # Input device support | ||
499 | # | ||
500 | # CONFIG_INPUT is not set | ||
501 | |||
502 | # | ||
503 | # Userland interfaces | ||
504 | # | ||
505 | |||
506 | # | ||
507 | # Input I/O drivers | ||
508 | # | ||
509 | # CONFIG_GAMEPORT is not set | ||
510 | CONFIG_SOUND_GAMEPORT=y | ||
511 | # CONFIG_SERIO is not set | ||
512 | # CONFIG_SERIO_I8042 is not set | ||
513 | |||
514 | # | ||
515 | # Input Device Drivers | ||
516 | # | ||
517 | |||
518 | # | ||
519 | # Character devices | ||
520 | # | ||
521 | # CONFIG_VT is not set | ||
522 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
523 | |||
524 | # | ||
525 | # Serial drivers | ||
526 | # | ||
527 | CONFIG_SERIAL_8250=y | ||
528 | CONFIG_SERIAL_8250_CONSOLE=y | ||
529 | CONFIG_SERIAL_8250_NR_UARTS=2 | ||
530 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
531 | |||
532 | # | ||
533 | # Non-8250 serial port support | ||
534 | # | ||
535 | CONFIG_SERIAL_CORE=y | ||
536 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
537 | CONFIG_UNIX98_PTYS=y | ||
538 | CONFIG_LEGACY_PTYS=y | ||
539 | CONFIG_LEGACY_PTY_COUNT=256 | ||
540 | # CONFIG_QIC02_TAPE is not set | ||
541 | |||
542 | # | ||
543 | # IPMI | ||
544 | # | ||
545 | # CONFIG_IPMI_HANDLER is not set | ||
546 | |||
547 | # | ||
548 | # Watchdog Cards | ||
549 | # | ||
550 | # CONFIG_WATCHDOG is not set | ||
551 | # CONFIG_NVRAM is not set | ||
552 | CONFIG_GEN_RTC=y | ||
553 | # CONFIG_GEN_RTC_X is not set | ||
554 | # CONFIG_DTLK is not set | ||
555 | # CONFIG_R3964 is not set | ||
556 | # CONFIG_APPLICOM is not set | ||
557 | |||
558 | # | ||
559 | # Ftape, the floppy tape device driver | ||
560 | # | ||
561 | # CONFIG_FTAPE is not set | ||
562 | # CONFIG_AGP is not set | ||
563 | # CONFIG_DRM is not set | ||
564 | # CONFIG_RAW_DRIVER is not set | ||
565 | |||
566 | # | ||
567 | # I2C support | ||
568 | # | ||
569 | # CONFIG_I2C is not set | ||
570 | |||
571 | # | ||
572 | # Misc devices | ||
573 | # | ||
574 | |||
575 | # | ||
576 | # Multimedia devices | ||
577 | # | ||
578 | # CONFIG_VIDEO_DEV is not set | ||
579 | |||
580 | # | ||
581 | # Digital Video Broadcasting Devices | ||
582 | # | ||
583 | # CONFIG_DVB is not set | ||
584 | |||
585 | # | ||
586 | # Graphics support | ||
587 | # | ||
588 | # CONFIG_FB is not set | ||
589 | |||
590 | # | ||
591 | # Sound | ||
592 | # | ||
593 | # CONFIG_SOUND is not set | ||
594 | |||
595 | # | ||
596 | # USB support | ||
597 | # | ||
598 | # CONFIG_USB is not set | ||
599 | |||
600 | # | ||
601 | # USB Gadget Support | ||
602 | # | ||
603 | # CONFIG_USB_GADGET is not set | ||
604 | |||
605 | # | ||
606 | # File systems | ||
607 | # | ||
608 | CONFIG_EXT2_FS=y | ||
609 | # CONFIG_EXT2_FS_XATTR is not set | ||
610 | CONFIG_EXT3_FS=y | ||
611 | CONFIG_EXT3_FS_XATTR=y | ||
612 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
613 | # CONFIG_EXT3_FS_SECURITY is not set | ||
614 | CONFIG_JBD=y | ||
615 | # CONFIG_JBD_DEBUG is not set | ||
616 | CONFIG_FS_MBCACHE=y | ||
617 | # CONFIG_REISERFS_FS is not set | ||
618 | # CONFIG_JFS_FS is not set | ||
619 | # CONFIG_XFS_FS is not set | ||
620 | # CONFIG_MINIX_FS is not set | ||
621 | # CONFIG_ROMFS_FS is not set | ||
622 | # CONFIG_QUOTA is not set | ||
623 | # CONFIG_AUTOFS_FS is not set | ||
624 | # CONFIG_AUTOFS4_FS is not set | ||
625 | |||
626 | # | ||
627 | # CD-ROM/DVD Filesystems | ||
628 | # | ||
629 | # CONFIG_ISO9660_FS is not set | ||
630 | # CONFIG_UDF_FS is not set | ||
631 | |||
632 | # | ||
633 | # DOS/FAT/NT Filesystems | ||
634 | # | ||
635 | # CONFIG_FAT_FS is not set | ||
636 | # CONFIG_NTFS_FS is not set | ||
637 | |||
638 | # | ||
639 | # Pseudo filesystems | ||
640 | # | ||
641 | CONFIG_PROC_FS=y | ||
642 | CONFIG_PROC_KCORE=y | ||
643 | # CONFIG_DEVFS_FS is not set | ||
644 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
645 | CONFIG_TMPFS=y | ||
646 | # CONFIG_HUGETLB_PAGE is not set | ||
647 | CONFIG_RAMFS=y | ||
648 | |||
649 | # | ||
650 | # Miscellaneous filesystems | ||
651 | # | ||
652 | # CONFIG_ADFS_FS is not set | ||
653 | # CONFIG_AFFS_FS is not set | ||
654 | # CONFIG_HFS_FS is not set | ||
655 | # CONFIG_HFSPLUS_FS is not set | ||
656 | # CONFIG_BEFS_FS is not set | ||
657 | # CONFIG_BFS_FS is not set | ||
658 | # CONFIG_EFS_FS is not set | ||
659 | # CONFIG_CRAMFS is not set | ||
660 | # CONFIG_VXFS_FS is not set | ||
661 | # CONFIG_HPFS_FS is not set | ||
662 | # CONFIG_QNX4FS_FS is not set | ||
663 | # CONFIG_SYSV_FS is not set | ||
664 | # CONFIG_UFS_FS is not set | ||
665 | |||
666 | # | ||
667 | # Network File Systems | ||
668 | # | ||
669 | CONFIG_NFS_FS=y | ||
670 | # CONFIG_NFS_V3 is not set | ||
671 | # CONFIG_NFS_V4 is not set | ||
672 | # CONFIG_NFS_DIRECTIO is not set | ||
673 | # CONFIG_NFSD is not set | ||
674 | CONFIG_ROOT_NFS=y | ||
675 | CONFIG_LOCKD=y | ||
676 | # CONFIG_EXPORTFS is not set | ||
677 | CONFIG_SUNRPC=y | ||
678 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
679 | # CONFIG_SMB_FS is not set | ||
680 | # CONFIG_CIFS is not set | ||
681 | # CONFIG_NCP_FS is not set | ||
682 | # CONFIG_CODA_FS is not set | ||
683 | # CONFIG_INTERMEZZO_FS is not set | ||
684 | # CONFIG_AFS_FS is not set | ||
685 | |||
686 | # | ||
687 | # Partition Types | ||
688 | # | ||
689 | # CONFIG_PARTITION_ADVANCED is not set | ||
690 | CONFIG_MSDOS_PARTITION=y | ||
691 | |||
692 | # | ||
693 | # Native Language Support | ||
694 | # | ||
695 | # CONFIG_NLS is not set | ||
696 | |||
697 | # | ||
698 | # Library routines | ||
699 | # | ||
700 | CONFIG_CRC32=y | ||
701 | |||
702 | # | ||
703 | # Kernel hacking | ||
704 | # | ||
705 | # CONFIG_DEBUG_KERNEL is not set | ||
706 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
707 | |||
708 | # | ||
709 | # Security options | ||
710 | # | ||
711 | # CONFIG_SECURITY is not set | ||
712 | |||
713 | # | ||
714 | # Cryptographic options | ||
715 | # | ||
716 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/rainier_defconfig b/arch/ppc/configs/rainier_defconfig deleted file mode 100644 index 4d4fcdc61bb7..000000000000 --- a/arch/ppc/configs/rainier_defconfig +++ /dev/null | |||
@@ -1,599 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | |||
8 | # | ||
9 | # Code maturity level options | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | |||
13 | # | ||
14 | # General setup | ||
15 | # | ||
16 | # CONFIG_SWAP is not set | ||
17 | CONFIG_SYSVIPC=y | ||
18 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
19 | CONFIG_SYSCTL=y | ||
20 | CONFIG_LOG_BUF_SHIFT=14 | ||
21 | CONFIG_EMBEDDED=y | ||
22 | CONFIG_FUTEX=y | ||
23 | # CONFIG_EPOLL is not set | ||
24 | |||
25 | # | ||
26 | # Loadable module support | ||
27 | # | ||
28 | CONFIG_MODULES=y | ||
29 | # CONFIG_MODULE_UNLOAD is not set | ||
30 | CONFIG_OBSOLETE_MODPARM=y | ||
31 | CONFIG_MODVERSIONS=y | ||
32 | CONFIG_KMOD=y | ||
33 | |||
34 | # | ||
35 | # Platform support | ||
36 | # | ||
37 | CONFIG_PPC=y | ||
38 | CONFIG_PPC32=y | ||
39 | # CONFIG_6xx is not set | ||
40 | CONFIG_40x=y | ||
41 | # CONFIG_POWER3 is not set | ||
42 | # CONFIG_8xx is not set | ||
43 | CONFIG_4xx=y | ||
44 | |||
45 | # | ||
46 | # IBM 4xx options | ||
47 | # | ||
48 | # CONFIG_ASH is not set | ||
49 | # CONFIG_BEECH is not set | ||
50 | # CONFIG_CEDAR is not set | ||
51 | # CONFIG_CPCI405 is not set | ||
52 | # CONFIG_EP405 is not set | ||
53 | # CONFIG_OAK is not set | ||
54 | # CONFIG_REDWOOD_4 is not set | ||
55 | # CONFIG_REDWOOD_5 is not set | ||
56 | # CONFIG_REDWOOD_6 is not set | ||
57 | # CONFIG_SYCAMORE is not set | ||
58 | # CONFIG_TIVO is not set | ||
59 | CONFIG_WALNUT=y | ||
60 | CONFIG_IBM405_ERR77=y | ||
61 | CONFIG_IBM405_ERR51=y | ||
62 | CONFIG_IBM_OCP=y | ||
63 | CONFIG_BIOS_FIXUP=y | ||
64 | CONFIG_405GP=y | ||
65 | CONFIG_IBM_OPENBIOS=y | ||
66 | CONFIG_405_DMA=y | ||
67 | # CONFIG_PM is not set | ||
68 | CONFIG_UART0_TTYS0=y | ||
69 | # CONFIG_UART0_TTYS1 is not set | ||
70 | CONFIG_NOT_COHERENT_CACHE=y | ||
71 | # CONFIG_SMP is not set | ||
72 | # CONFIG_PREEMPT is not set | ||
73 | # CONFIG_MATH_EMULATION is not set | ||
74 | # CONFIG_CPU_FREQ is not set | ||
75 | |||
76 | # | ||
77 | # General setup | ||
78 | # | ||
79 | # CONFIG_HIGHMEM is not set | ||
80 | CONFIG_PCI=y | ||
81 | CONFIG_PCI_DOMAINS=y | ||
82 | # CONFIG_PC_KEYBOARD is not set | ||
83 | CONFIG_KCORE_ELF=y | ||
84 | CONFIG_BINFMT_ELF=y | ||
85 | CONFIG_KERNEL_ELF=y | ||
86 | # CONFIG_BINFMT_MISC is not set | ||
87 | # CONFIG_PCI_LEGACY_PROC is not set | ||
88 | CONFIG_PCI_NAMES=y | ||
89 | # CONFIG_HOTPLUG is not set | ||
90 | |||
91 | # | ||
92 | # Parallel port support | ||
93 | # | ||
94 | # CONFIG_PARPORT is not set | ||
95 | # CONFIG_CMDLINE_BOOL is not set | ||
96 | |||
97 | # | ||
98 | # Advanced setup | ||
99 | # | ||
100 | # CONFIG_ADVANCED_OPTIONS is not set | ||
101 | |||
102 | # | ||
103 | # Default settings for advanced configuration options are used | ||
104 | # | ||
105 | CONFIG_HIGHMEM_START=0xfe000000 | ||
106 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
107 | CONFIG_KERNEL_START=0xc0000000 | ||
108 | CONFIG_TASK_SIZE=0x80000000 | ||
109 | CONFIG_BOOT_LOAD=0x00400000 | ||
110 | |||
111 | # | ||
112 | # Memory Technology Devices (MTD) | ||
113 | # | ||
114 | # CONFIG_MTD is not set | ||
115 | |||
116 | # | ||
117 | # Plug and Play support | ||
118 | # | ||
119 | # CONFIG_PNP is not set | ||
120 | |||
121 | # | ||
122 | # Block devices | ||
123 | # | ||
124 | # CONFIG_BLK_DEV_FD is not set | ||
125 | # CONFIG_BLK_CPQ_DA is not set | ||
126 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
127 | # CONFIG_BLK_DEV_DAC960 is not set | ||
128 | # CONFIG_BLK_DEV_UMEM is not set | ||
129 | CONFIG_BLK_DEV_LOOP=y | ||
130 | CONFIG_BLK_DEV_NBD=y | ||
131 | CONFIG_BLK_DEV_RAM=y | ||
132 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
133 | CONFIG_BLK_DEV_INITRD=y | ||
134 | |||
135 | # | ||
136 | # Multi-device support (RAID and LVM) | ||
137 | # | ||
138 | # CONFIG_MD is not set | ||
139 | |||
140 | # | ||
141 | # ATA/IDE/MFM/RLL support | ||
142 | # | ||
143 | # CONFIG_IDE is not set | ||
144 | |||
145 | # | ||
146 | # SCSI support | ||
147 | # | ||
148 | # CONFIG_SCSI is not set | ||
149 | |||
150 | # | ||
151 | # Fusion MPT device support | ||
152 | # | ||
153 | |||
154 | # | ||
155 | # IEEE 1394 (FireWire) support (EXPERIMENTAL) | ||
156 | # | ||
157 | # CONFIG_IEEE1394 is not set | ||
158 | |||
159 | # | ||
160 | # I2O device support | ||
161 | # | ||
162 | # CONFIG_I2O is not set | ||
163 | |||
164 | # | ||
165 | # Networking support | ||
166 | # | ||
167 | CONFIG_NET=y | ||
168 | |||
169 | # | ||
170 | # Networking options | ||
171 | # | ||
172 | CONFIG_PACKET=y | ||
173 | # CONFIG_PACKET_MMAP is not set | ||
174 | # CONFIG_NETLINK_DEV is not set | ||
175 | # CONFIG_NETFILTER is not set | ||
176 | CONFIG_UNIX=y | ||
177 | # CONFIG_NET_KEY is not set | ||
178 | CONFIG_INET=y | ||
179 | CONFIG_IP_MULTICAST=y | ||
180 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
181 | CONFIG_IP_PNP=y | ||
182 | # CONFIG_IP_PNP_DHCP is not set | ||
183 | CONFIG_IP_PNP_BOOTP=y | ||
184 | CONFIG_IP_PNP_RARP=y | ||
185 | # CONFIG_NET_IPIP is not set | ||
186 | # CONFIG_NET_IPGRE is not set | ||
187 | # CONFIG_IP_MROUTE is not set | ||
188 | # CONFIG_ARPD is not set | ||
189 | # CONFIG_INET_ECN is not set | ||
190 | CONFIG_SYN_COOKIES=y | ||
191 | # CONFIG_INET_AH is not set | ||
192 | # CONFIG_INET_ESP is not set | ||
193 | # CONFIG_INET_IPCOMP is not set | ||
194 | # CONFIG_IPV6 is not set | ||
195 | # CONFIG_XFRM_USER is not set | ||
196 | |||
197 | # | ||
198 | # SCTP Configuration (EXPERIMENTAL) | ||
199 | # | ||
200 | CONFIG_IPV6_SCTP__=y | ||
201 | # CONFIG_IP_SCTP is not set | ||
202 | # CONFIG_ATM is not set | ||
203 | # CONFIG_VLAN_8021Q is not set | ||
204 | # CONFIG_LLC is not set | ||
205 | # CONFIG_DECNET is not set | ||
206 | # CONFIG_BRIDGE is not set | ||
207 | # CONFIG_X25 is not set | ||
208 | # CONFIG_LAPB is not set | ||
209 | # CONFIG_NET_DIVERT is not set | ||
210 | # CONFIG_ECONET is not set | ||
211 | # CONFIG_WAN_ROUTER is not set | ||
212 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
213 | |||
214 | # | ||
215 | # QoS and/or fair queueing | ||
216 | # | ||
217 | # CONFIG_NET_SCHED is not set | ||
218 | |||
219 | # | ||
220 | # Network testing | ||
221 | # | ||
222 | # CONFIG_NET_PKTGEN is not set | ||
223 | CONFIG_NETDEVICES=y | ||
224 | |||
225 | # | ||
226 | # ARCnet devices | ||
227 | # | ||
228 | # CONFIG_ARCNET is not set | ||
229 | # CONFIG_DUMMY is not set | ||
230 | # CONFIG_BONDING is not set | ||
231 | # CONFIG_EQUALIZER is not set | ||
232 | # CONFIG_TUN is not set | ||
233 | # CONFIG_ETHERTAP is not set | ||
234 | |||
235 | # | ||
236 | # Ethernet (10 or 100Mbit) | ||
237 | # | ||
238 | CONFIG_NET_ETHERNET=y | ||
239 | CONFIG_MII=y | ||
240 | # CONFIG_OAKNET is not set | ||
241 | # CONFIG_HAPPYMEAL is not set | ||
242 | # CONFIG_SUNGEM is not set | ||
243 | # CONFIG_NET_VENDOR_3COM is not set | ||
244 | |||
245 | # | ||
246 | # Tulip family network device support | ||
247 | # | ||
248 | # CONFIG_NET_TULIP is not set | ||
249 | # CONFIG_HP100 is not set | ||
250 | CONFIG_NET_PCI=y | ||
251 | CONFIG_PCNET32=y | ||
252 | # CONFIG_AMD8111_ETH is not set | ||
253 | # CONFIG_ADAPTEC_STARFIRE is not set | ||
254 | # CONFIG_B44 is not set | ||
255 | # CONFIG_DGRS is not set | ||
256 | CONFIG_EEPRO100=y | ||
257 | # CONFIG_EEPRO100_PIO is not set | ||
258 | # CONFIG_E100 is not set | ||
259 | # CONFIG_FEALNX is not set | ||
260 | # CONFIG_NATSEMI is not set | ||
261 | # CONFIG_NE2K_PCI is not set | ||
262 | # CONFIG_8139CP is not set | ||
263 | # CONFIG_8139TOO is not set | ||
264 | # CONFIG_SIS900 is not set | ||
265 | # CONFIG_EPIC100 is not set | ||
266 | # CONFIG_SUNDANCE is not set | ||
267 | # CONFIG_TLAN is not set | ||
268 | # CONFIG_VIA_RHINE is not set | ||
269 | |||
270 | # | ||
271 | # Ethernet (1000 Mbit) | ||
272 | # | ||
273 | # CONFIG_ACENIC is not set | ||
274 | # CONFIG_DL2K is not set | ||
275 | # CONFIG_E1000 is not set | ||
276 | # CONFIG_NS83820 is not set | ||
277 | # CONFIG_HAMACHI is not set | ||
278 | # CONFIG_YELLOWFIN is not set | ||
279 | # CONFIG_R8169 is not set | ||
280 | # CONFIG_SK98LIN is not set | ||
281 | # CONFIG_TIGON3 is not set | ||
282 | |||
283 | # | ||
284 | # Ethernet (10000 Mbit) | ||
285 | # | ||
286 | # CONFIG_IXGB is not set | ||
287 | # CONFIG_FDDI is not set | ||
288 | # CONFIG_HIPPI is not set | ||
289 | CONFIG_PPP=y | ||
290 | # CONFIG_PPP_MULTILINK is not set | ||
291 | # CONFIG_PPP_FILTER is not set | ||
292 | # CONFIG_PPP_ASYNC is not set | ||
293 | # CONFIG_PPP_SYNC_TTY is not set | ||
294 | # CONFIG_PPP_DEFLATE is not set | ||
295 | # CONFIG_PPP_BSDCOMP is not set | ||
296 | # CONFIG_PPPOE is not set | ||
297 | # CONFIG_SLIP is not set | ||
298 | |||
299 | # | ||
300 | # Wireless LAN (non-hamradio) | ||
301 | # | ||
302 | # CONFIG_NET_RADIO is not set | ||
303 | |||
304 | # | ||
305 | # Token Ring devices (depends on LLC=y) | ||
306 | # | ||
307 | # CONFIG_RCPCI is not set | ||
308 | # CONFIG_SHAPER is not set | ||
309 | |||
310 | # | ||
311 | # Wan interfaces | ||
312 | # | ||
313 | # CONFIG_WAN is not set | ||
314 | |||
315 | # | ||
316 | # Amateur Radio support | ||
317 | # | ||
318 | # CONFIG_HAMRADIO is not set | ||
319 | |||
320 | # | ||
321 | # IrDA (infrared) support | ||
322 | # | ||
323 | # CONFIG_IRDA is not set | ||
324 | |||
325 | # | ||
326 | # ISDN subsystem | ||
327 | # | ||
328 | # CONFIG_ISDN_BOOL is not set | ||
329 | |||
330 | # | ||
331 | # Graphics support | ||
332 | # | ||
333 | # CONFIG_FB is not set | ||
334 | |||
335 | # | ||
336 | # Old CD-ROM drivers (not SCSI, not IDE) | ||
337 | # | ||
338 | # CONFIG_CD_NO_IDESCSI is not set | ||
339 | |||
340 | # | ||
341 | # Input device support | ||
342 | # | ||
343 | # CONFIG_INPUT is not set | ||
344 | |||
345 | # | ||
346 | # Userland interfaces | ||
347 | # | ||
348 | |||
349 | # | ||
350 | # Input I/O drivers | ||
351 | # | ||
352 | # CONFIG_GAMEPORT is not set | ||
353 | CONFIG_SOUND_GAMEPORT=y | ||
354 | CONFIG_SERIO=y | ||
355 | CONFIG_SERIO_I8042=y | ||
356 | CONFIG_SERIO_SERPORT=y | ||
357 | # CONFIG_SERIO_CT82C710 is not set | ||
358 | |||
359 | # | ||
360 | # Input Device Drivers | ||
361 | # | ||
362 | |||
363 | # | ||
364 | # Macintosh device drivers | ||
365 | # | ||
366 | |||
367 | # | ||
368 | # Character devices | ||
369 | # | ||
370 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
371 | |||
372 | # | ||
373 | # Serial drivers | ||
374 | # | ||
375 | # CONFIG_SERIAL_8250 is not set | ||
376 | |||
377 | # | ||
378 | # Non-8250 serial port support | ||
379 | # | ||
380 | CONFIG_UNIX98_PTYS=y | ||
381 | CONFIG_UNIX98_PTY_COUNT=256 | ||
382 | |||
383 | # | ||
384 | # I2C support | ||
385 | # | ||
386 | CONFIG_I2C=y | ||
387 | # CONFIG_I2C_ALGOBIT is not set | ||
388 | # CONFIG_I2C_ALGOPCF is not set | ||
389 | # CONFIG_I2C_IBM_OCP_ALGO is not set | ||
390 | CONFIG_I2C_CHARDEV=y | ||
391 | |||
392 | # | ||
393 | # I2C Hardware Sensors Mainboard support | ||
394 | # | ||
395 | # CONFIG_I2C_ALI15X3 is not set | ||
396 | # CONFIG_I2C_AMD756 is not set | ||
397 | # CONFIG_I2C_AMD8111 is not set | ||
398 | # CONFIG_I2C_I801 is not set | ||
399 | # CONFIG_I2C_PIIX4 is not set | ||
400 | # CONFIG_I2C_SIS96X is not set | ||
401 | # CONFIG_I2C_VIAPRO is not set | ||
402 | |||
403 | # | ||
404 | # I2C Hardware Sensors Chip support | ||
405 | # | ||
406 | # CONFIG_SENSORS_ADM1021 is not set | ||
407 | # CONFIG_SENSORS_IT87 is not set | ||
408 | # CONFIG_SENSORS_LM75 is not set | ||
409 | # CONFIG_SENSORS_LM85 is not set | ||
410 | # CONFIG_SENSORS_VIA686A is not set | ||
411 | # CONFIG_SENSORS_W83781D is not set | ||
412 | # CONFIG_I2C_SENSOR is not set | ||
413 | |||
414 | # | ||
415 | # Mice | ||
416 | # | ||
417 | CONFIG_BUSMOUSE=y | ||
418 | # CONFIG_QIC02_TAPE is not set | ||
419 | |||
420 | # | ||
421 | # IPMI | ||
422 | # | ||
423 | # CONFIG_IPMI_HANDLER is not set | ||
424 | |||
425 | # | ||
426 | # Watchdog Cards | ||
427 | # | ||
428 | CONFIG_WATCHDOG=y | ||
429 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
430 | # CONFIG_SOFT_WATCHDOG is not set | ||
431 | # CONFIG_WDT is not set | ||
432 | # CONFIG_WDTPCI is not set | ||
433 | # CONFIG_PCWATCHDOG is not set | ||
434 | # CONFIG_ACQUIRE_WDT is not set | ||
435 | # CONFIG_ADVANTECH_WDT is not set | ||
436 | # CONFIG_EUROTECH_WDT is not set | ||
437 | # CONFIG_IB700_WDT is not set | ||
438 | # CONFIG_MIXCOMWD is not set | ||
439 | # CONFIG_SCx200_WDT is not set | ||
440 | # CONFIG_60XX_WDT is not set | ||
441 | # CONFIG_W83877F_WDT is not set | ||
442 | # CONFIG_MACHZ_WDT is not set | ||
443 | # CONFIG_SC520_WDT is not set | ||
444 | # CONFIG_AMD7XX_TCO is not set | ||
445 | # CONFIG_ALIM7101_WDT is not set | ||
446 | # CONFIG_SC1200_WDT is not set | ||
447 | # CONFIG_WAFER_WDT is not set | ||
448 | # CONFIG_CPU5_WDT is not set | ||
449 | # CONFIG_NVRAM is not set | ||
450 | CONFIG_GEN_RTC=y | ||
451 | # CONFIG_GEN_RTC_X is not set | ||
452 | # CONFIG_DTLK is not set | ||
453 | # CONFIG_R3964 is not set | ||
454 | # CONFIG_APPLICOM is not set | ||
455 | |||
456 | # | ||
457 | # Ftape, the floppy tape device driver | ||
458 | # | ||
459 | # CONFIG_FTAPE is not set | ||
460 | # CONFIG_AGP is not set | ||
461 | # CONFIG_DRM is not set | ||
462 | # CONFIG_RAW_DRIVER is not set | ||
463 | # CONFIG_HANGCHECK_TIMER is not set | ||
464 | |||
465 | # | ||
466 | # Multimedia devices | ||
467 | # | ||
468 | # CONFIG_VIDEO_DEV is not set | ||
469 | |||
470 | # | ||
471 | # Digital Video Broadcasting Devices | ||
472 | # | ||
473 | # CONFIG_DVB is not set | ||
474 | |||
475 | # | ||
476 | # File systems | ||
477 | # | ||
478 | CONFIG_EXT2_FS=y | ||
479 | # CONFIG_EXT2_FS_XATTR is not set | ||
480 | # CONFIG_EXT3_FS is not set | ||
481 | # CONFIG_JBD is not set | ||
482 | # CONFIG_REISERFS_FS is not set | ||
483 | # CONFIG_JFS_FS is not set | ||
484 | # CONFIG_XFS_FS is not set | ||
485 | # CONFIG_MINIX_FS is not set | ||
486 | # CONFIG_ROMFS_FS is not set | ||
487 | # CONFIG_QUOTA is not set | ||
488 | CONFIG_AUTOFS_FS=y | ||
489 | # CONFIG_AUTOFS4_FS is not set | ||
490 | |||
491 | # | ||
492 | # CD-ROM/DVD Filesystems | ||
493 | # | ||
494 | CONFIG_ISO9660_FS=y | ||
495 | # CONFIG_JOLIET is not set | ||
496 | # CONFIG_ZISOFS is not set | ||
497 | # CONFIG_UDF_FS is not set | ||
498 | |||
499 | # | ||
500 | # DOS/FAT/NT Filesystems | ||
501 | # | ||
502 | # CONFIG_FAT_FS is not set | ||
503 | # CONFIG_NTFS_FS is not set | ||
504 | |||
505 | # | ||
506 | # Pseudo filesystems | ||
507 | # | ||
508 | CONFIG_PROC_FS=y | ||
509 | # CONFIG_DEVFS_FS is not set | ||
510 | CONFIG_DEVPTS_FS=y | ||
511 | # CONFIG_DEVPTS_FS_XATTR is not set | ||
512 | CONFIG_TMPFS=y | ||
513 | CONFIG_RAMFS=y | ||
514 | |||
515 | # | ||
516 | # Miscellaneous filesystems | ||
517 | # | ||
518 | # CONFIG_ADFS_FS is not set | ||
519 | # CONFIG_AFFS_FS is not set | ||
520 | # CONFIG_HFS_FS is not set | ||
521 | # CONFIG_BEFS_FS is not set | ||
522 | # CONFIG_BFS_FS is not set | ||
523 | # CONFIG_EFS_FS is not set | ||
524 | # CONFIG_CRAMFS is not set | ||
525 | # CONFIG_VXFS_FS is not set | ||
526 | # CONFIG_HPFS_FS is not set | ||
527 | # CONFIG_QNX4FS_FS is not set | ||
528 | # CONFIG_SYSV_FS is not set | ||
529 | # CONFIG_UFS_FS is not set | ||
530 | |||
531 | # | ||
532 | # Network File Systems | ||
533 | # | ||
534 | CONFIG_NFS_FS=y | ||
535 | # CONFIG_NFS_V3 is not set | ||
536 | # CONFIG_NFS_V4 is not set | ||
537 | CONFIG_NFSD=y | ||
538 | # CONFIG_NFSD_V3 is not set | ||
539 | # CONFIG_NFSD_TCP is not set | ||
540 | CONFIG_ROOT_NFS=y | ||
541 | CONFIG_LOCKD=y | ||
542 | CONFIG_EXPORTFS=y | ||
543 | CONFIG_SUNRPC=y | ||
544 | # CONFIG_SUNRPC_GSS is not set | ||
545 | # CONFIG_SMB_FS is not set | ||
546 | # CONFIG_CIFS is not set | ||
547 | # CONFIG_NCP_FS is not set | ||
548 | # CONFIG_CODA_FS is not set | ||
549 | # CONFIG_INTERMEZZO_FS is not set | ||
550 | # CONFIG_AFS_FS is not set | ||
551 | |||
552 | # | ||
553 | # Partition Types | ||
554 | # | ||
555 | # CONFIG_PARTITION_ADVANCED is not set | ||
556 | CONFIG_MSDOS_PARTITION=y | ||
557 | |||
558 | # | ||
559 | # Sound | ||
560 | # | ||
561 | # CONFIG_SOUND is not set | ||
562 | |||
563 | # | ||
564 | # IBM 40x options | ||
565 | # | ||
566 | |||
567 | # | ||
568 | # USB support | ||
569 | # | ||
570 | # CONFIG_USB is not set | ||
571 | # CONFIG_USB_GADGET is not set | ||
572 | |||
573 | # | ||
574 | # Bluetooth support | ||
575 | # | ||
576 | # CONFIG_BT is not set | ||
577 | |||
578 | # | ||
579 | # Library routines | ||
580 | # | ||
581 | # CONFIG_CRC32 is not set | ||
582 | |||
583 | # | ||
584 | # Kernel hacking | ||
585 | # | ||
586 | # CONFIG_DEBUG_KERNEL is not set | ||
587 | # CONFIG_KALLSYMS is not set | ||
588 | # CONFIG_SERIAL_TEXT_DEBUG is not set | ||
589 | CONFIG_OCP=y | ||
590 | |||
591 | # | ||
592 | # Security options | ||
593 | # | ||
594 | # CONFIG_SECURITY is not set | ||
595 | |||
596 | # | ||
597 | # Cryptographic options | ||
598 | # | ||
599 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/configs/redwood_defconfig b/arch/ppc/configs/redwood_defconfig deleted file mode 100644 index 4aa348dcf22c..000000000000 --- a/arch/ppc/configs/redwood_defconfig +++ /dev/null | |||
@@ -1,540 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # | ||
4 | CONFIG_MMU=y | ||
5 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
6 | CONFIG_HAVE_DEC_LOCK=y | ||
7 | CONFIG_PPC=y | ||
8 | CONFIG_PPC32=y | ||
9 | |||
10 | # | ||
11 | # Code maturity level options | ||
12 | # | ||
13 | CONFIG_EXPERIMENTAL=y | ||
14 | CONFIG_CLEAN_COMPILE=y | ||
15 | # CONFIG_STANDALONE is not set | ||
16 | CONFIG_BROKEN_ON_SMP=y | ||
17 | |||
18 | # | ||
19 | # General setup | ||
20 | # | ||
21 | CONFIG_SWAP=y | ||
22 | CONFIG_SYSVIPC=y | ||
23 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
24 | CONFIG_SYSCTL=y | ||
25 | CONFIG_LOG_BUF_SHIFT=14 | ||
26 | # CONFIG_IKCONFIG is not set | ||
27 | CONFIG_EMBEDDED=y | ||
28 | # CONFIG_KALLSYMS is not set | ||
29 | CONFIG_FUTEX=y | ||
30 | # CONFIG_EPOLL is not set | ||
31 | CONFIG_IOSCHED_NOOP=y | ||
32 | CONFIG_IOSCHED_AS=y | ||
33 | CONFIG_IOSCHED_DEADLINE=y | ||
34 | |||
35 | # | ||
36 | # Loadable module support | ||
37 | # | ||
38 | CONFIG_MODULES=y | ||
39 | # CONFIG_MODULE_UNLOAD is not set | ||
40 | CONFIG_OBSOLETE_MODPARM=y | ||
41 | # CONFIG_MODVERSIONS is not set | ||
42 | CONFIG_KMOD=y | ||
43 | |||
44 | # | ||
45 | # Processor | ||
46 | # | ||
47 | # CONFIG_6xx is not set | ||
48 | CONFIG_40x=y | ||
49 | # CONFIG_44x is not set | ||
50 | # CONFIG_POWER3 is not set | ||
51 | # CONFIG_POWER4 is not set | ||
52 | # CONFIG_8xx is not set | ||
53 | # CONFIG_MATH_EMULATION is not set | ||
54 | # CONFIG_CPU_FREQ is not set | ||
55 | CONFIG_4xx=y | ||
56 | |||
57 | # | ||
58 | # IBM 4xx options | ||
59 | # | ||
60 | # CONFIG_ASH is not set | ||
61 | # CONFIG_BEECH is not set | ||
62 | # CONFIG_CEDAR is not set | ||
63 | # CONFIG_CPCI405 is not set | ||
64 | # CONFIG_EP405 is not set | ||
65 | # CONFIG_OAK is not set | ||
66 | CONFIG_REDWOOD_4=y | ||
67 | # CONFIG_REDWOOD_5 is not set | ||
68 | # CONFIG_REDWOOD_6 is not set | ||
69 | # CONFIG_SYCAMORE is not set | ||
70 | # CONFIG_TIVO is not set | ||
71 | # CONFIG_WALNUT is not set | ||
72 | CONFIG_IBM405_ERR77=y | ||
73 | CONFIG_IBM405_ERR51=y | ||
74 | CONFIG_IBM_OCP=y | ||
75 | CONFIG_STB03xxx=y | ||
76 | CONFIG_IBM_OPENBIOS=y | ||
77 | # CONFIG_405_DMA is not set | ||
78 | # CONFIG_PM is not set | ||
79 | CONFIG_UART0_TTYS0=y | ||
80 | # CONFIG_UART0_TTYS1 is not set | ||
81 | # CONFIG_SERIAL_SICC is not set | ||
82 | CONFIG_NOT_COHERENT_CACHE=y | ||
83 | |||
84 | # | ||
85 | # Platform options | ||
86 | # | ||
87 | # CONFIG_PC_KEYBOARD is not set | ||
88 | # CONFIG_SMP is not set | ||
89 | # CONFIG_PREEMPT is not set | ||
90 | # CONFIG_HIGHMEM is not set | ||
91 | CONFIG_KERNEL_ELF=y | ||
92 | CONFIG_BINFMT_ELF=y | ||
93 | # CONFIG_BINFMT_MISC is not set | ||
94 | # CONFIG_CMDLINE_BOOL is not set | ||
95 | |||
96 | # | ||
97 | # Bus options | ||
98 | # | ||
99 | # CONFIG_PCI is not set | ||
100 | # CONFIG_PCI_DOMAINS is not set | ||
101 | # CONFIG_HOTPLUG is not set | ||
102 | |||
103 | # | ||
104 | # Parallel port support | ||
105 | # | ||
106 | # CONFIG_PARPORT is not set | ||
107 | |||
108 | # | ||
109 | # Advanced setup | ||
110 | # | ||
111 | # CONFIG_ADVANCED_OPTIONS is not set | ||
112 | |||
113 | # | ||
114 | # Default settings for advanced configuration options are used | ||
115 | # | ||
116 | CONFIG_HIGHMEM_START=0xfe000000 | ||
117 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
118 | CONFIG_KERNEL_START=0xc0000000 | ||
119 | CONFIG_TASK_SIZE=0x80000000 | ||
120 | CONFIG_BOOT_LOAD=0x00400000 | ||
121 | |||
122 | # | ||
123 | # Generic Driver Options | ||
124 | # | ||
125 | |||
126 | # | ||
127 | # Memory Technology Devices (MTD) | ||
128 | # | ||
129 | # CONFIG_MTD is not set | ||
130 | |||
131 | # | ||
132 | # Plug and Play support | ||
133 | # | ||
134 | # CONFIG_PNP is not set | ||
135 | |||
136 | # | ||
137 | # Block devices | ||
138 | # | ||
139 | CONFIG_BLK_DEV_LOOP=y | ||
140 | # CONFIG_BLK_DEV_CRYPTOLOOP is not set | ||
141 | # CONFIG_BLK_DEV_NBD is not set | ||
142 | CONFIG_BLK_DEV_RAM=y | ||
143 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
144 | CONFIG_BLK_DEV_INITRD=y | ||
145 | # CONFIG_LBD is not set | ||
146 | |||
147 | # | ||
148 | # Multi-device support (RAID and LVM) | ||
149 | # | ||
150 | # CONFIG_MD is not set | ||
151 | |||
152 | # | ||
153 | # ATA/ATAPI/MFM/RLL support | ||
154 | # | ||
155 | # CONFIG_IDE is not set | ||
156 | |||
157 | # | ||
158 | # SCSI device support | ||
159 | # | ||
160 | # CONFIG_SCSI is not set | ||
161 | |||
162 | # | ||
163 | # Fusion MPT device support | ||
164 | # | ||
165 | |||
166 | # | ||
167 | # I2O device support | ||
168 | # | ||
169 | |||
170 | # | ||
171 | # Networking support | ||
172 | # | ||
173 | CONFIG_NET=y | ||
174 | |||
175 | # | ||
176 | # Networking options | ||
177 | # | ||
178 | # CONFIG_PACKET is not set | ||
179 | # CONFIG_NETLINK_DEV is not set | ||
180 | CONFIG_UNIX=y | ||
181 | # CONFIG_NET_KEY is not set | ||
182 | CONFIG_INET=y | ||
183 | CONFIG_IP_MULTICAST=y | ||
184 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
185 | CONFIG_IP_PNP=y | ||
186 | CONFIG_IP_PNP_DHCP=y | ||
187 | CONFIG_IP_PNP_BOOTP=y | ||
188 | CONFIG_IP_PNP_RARP=y | ||
189 | # CONFIG_NET_IPIP is not set | ||
190 | # CONFIG_NET_IPGRE is not set | ||
191 | # CONFIG_IP_MROUTE is not set | ||
192 | # CONFIG_ARPD is not set | ||
193 | # CONFIG_INET_ECN is not set | ||
194 | CONFIG_SYN_COOKIES=y | ||
195 | # CONFIG_INET_AH is not set | ||
196 | # CONFIG_INET_ESP is not set | ||
197 | # CONFIG_INET_IPCOMP is not set | ||
198 | # CONFIG_IPV6 is not set | ||
199 | # CONFIG_DECNET is not set | ||
200 | # CONFIG_BRIDGE is not set | ||
201 | # CONFIG_NETFILTER is not set | ||
202 | |||
203 | # | ||
204 | # SCTP Configuration (EXPERIMENTAL) | ||
205 | # | ||
206 | CONFIG_IPV6_SCTP__=y | ||
207 | # CONFIG_IP_SCTP is not set | ||
208 | # CONFIG_ATM is not set | ||
209 | # CONFIG_VLAN_8021Q is not set | ||
210 | # CONFIG_LLC2 is not set | ||
211 | # CONFIG_IPX is not set | ||
212 | # CONFIG_ATALK is not set | ||
213 | # CONFIG_X25 is not set | ||
214 | # CONFIG_LAPB is not set | ||
215 | # CONFIG_NET_DIVERT is not set | ||
216 | # CONFIG_ECONET is not set | ||
217 | # CONFIG_WAN_ROUTER is not set | ||
218 | # CONFIG_NET_HW_FLOWCONTROL is not set | ||
219 | |||
220 | # | ||
221 | # QoS and/or fair queueing | ||
222 | # | ||
223 | # CONFIG_NET_SCHED is not set | ||
224 | |||
225 | # | ||
226 | # Network testing | ||
227 | # | ||
228 | # CONFIG_NET_PKTGEN is not set | ||
229 | CONFIG_NETDEVICES=y | ||
230 | # CONFIG_DUMMY is not set | ||
231 | # CONFIG_BONDING is not set | ||
232 | # CONFIG_EQUALIZER is not set | ||
233 | # CONFIG_TUN is not set | ||
234 | |||
235 | # | ||
236 | # Ethernet (10 or 100Mbit) | ||
237 | # | ||
238 | CONFIG_NET_ETHERNET=y | ||
239 | CONFIG_MII=y | ||
240 | CONFIG_OAKNET=y | ||
241 | |||
242 | # | ||
243 | # Ethernet (1000 Mbit) | ||
244 | # | ||
245 | |||
246 | # | ||
247 | # Ethernet (10000 Mbit) | ||
248 | # | ||
249 | # CONFIG_PPP is not set | ||
250 | # CONFIG_SLIP is not set | ||
251 | |||
252 | # | ||
253 | # Wireless LAN (non-hamradio) | ||
254 | # | ||
255 | # CONFIG_NET_RADIO is not set | ||
256 | |||
257 | # | ||
258 | # Token Ring devices | ||
259 | # | ||
260 | # CONFIG_SHAPER is not set | ||
261 | |||
262 | # | ||
263 | # Wan interfaces | ||
264 | # | ||
265 | # CONFIG_WAN is not set | ||
266 | |||
267 | # | ||
268 | # Amateur Radio support | ||
269 | # | ||
270 | # CONFIG_HAMRADIO is not set | ||
271 | |||
272 | # | ||
273 | # IrDA (infrared) support | ||
274 | # | ||
275 | # CONFIG_IRDA is not set | ||
276 | |||
277 | # | ||
278 | # Bluetooth support | ||
279 | # | ||
280 | # CONFIG_BT is not set | ||
281 | |||
282 | # | ||
283 | # ISDN subsystem | ||
284 | # | ||
285 | # CONFIG_ISDN_BOOL is not set | ||
286 | |||
287 | # | ||
288 | # Graphics support | ||
289 | # | ||
290 | # CONFIG_FB is not set | ||
291 | |||
292 | # | ||
293 | # Input device support | ||
294 | # | ||
295 | CONFIG_INPUT=y | ||
296 | |||
297 | # | ||
298 | # Userland interfaces | ||
299 | # | ||
300 | # CONFIG_INPUT_MOUSEDEV is not set | ||
301 | # CONFIG_INPUT_JOYDEV is not set | ||
302 | # CONFIG_INPUT_TSDEV is not set | ||
303 | # CONFIG_INPUT_EVDEV is not set | ||
304 | # CONFIG_INPUT_EVBUG is not set | ||
305 | |||
306 | # | ||
307 | # Input I/O drivers | ||
308 | # | ||
309 | # CONFIG_GAMEPORT is not set | ||
310 | CONFIG_SOUND_GAMEPORT=y | ||
311 | CONFIG_SERIO=y | ||
312 | # CONFIG_SERIO_I8042 is not set | ||
313 | # CONFIG_SERIO_SERPORT is not set | ||
314 | # CONFIG_SERIO_CT82C710 is not set | ||
315 | |||
316 | # | ||
317 | # Input Device Drivers | ||
318 | # | ||
319 | # CONFIG_INPUT_KEYBOARD is not set | ||
320 | # CONFIG_INPUT_MOUSE is not set | ||
321 | # CONFIG_INPUT_JOYSTICK is not set | ||
322 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
323 | # CONFIG_INPUT_MISC is not set | ||
324 | |||
325 | # | ||
326 | # Macintosh device drivers | ||
327 | # | ||
328 | |||
329 | # | ||
330 | # Character devices | ||
331 | # | ||
332 | # CONFIG_VT is not set | ||
333 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
334 | |||
335 | # | ||
336 | # Serial drivers | ||
337 | # | ||
338 | CONFIG_SERIAL_8250=y | ||
339 | CONFIG_SERIAL_8250_CONSOLE=y | ||
340 | CONFIG_SERIAL_8250_NR_UARTS=4 | ||
341 | # CONFIG_SERIAL_8250_EXTENDED is not set | ||
342 | |||
343 | # | ||
344 | # Non-8250 serial port support | ||
345 | # | ||
346 | CONFIG_SERIAL_CORE=y | ||
347 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
348 | # CONFIG_UNIX98_PTYS is not set | ||
349 | |||
350 | # | ||
351 | # I2C support | ||
352 | # | ||
353 | CONFIG_I2C=y | ||
354 | # CONFIG_I2C_CHARDEV is not set | ||
355 | |||
356 | # | ||
357 | # I2C Algorithms | ||
358 | # | ||
359 | # CONFIG_I2C_ALGOBIT is not set | ||
360 | # CONFIG_I2C_ALGOPCF is not set | ||
361 | |||
362 | # | ||
363 | # I2C Hardware Bus support | ||
364 | # | ||
365 | # CONFIG_I2C_AMD756 is not set | ||
366 | # CONFIG_I2C_AMD8111 is not set | ||
367 | CONFIG_I2C_IBM_IIC=y | ||
368 | |||
369 | # | ||
370 | # I2C Hardware Sensors Chip support | ||
371 | # | ||
372 | # CONFIG_I2C_SENSOR is not set | ||
373 | # CONFIG_SENSORS_ADM1021 is not set | ||
374 | # CONFIG_SENSORS_EEPROM is not set | ||
375 | # CONFIG_SENSORS_IT87 is not set | ||
376 | # CONFIG_SENSORS_LM75 is not set | ||
377 | # CONFIG_SENSORS_LM78 is not set | ||
378 | # CONFIG_SENSORS_LM85 is not set | ||
379 | # CONFIG_SENSORS_VIA686A is not set | ||
380 | # CONFIG_SENSORS_W83781D is not set | ||
381 | |||
382 | # | ||
383 | # Mice | ||
384 | # | ||
385 | # CONFIG_BUSMOUSE is not set | ||
386 | # CONFIG_QIC02_TAPE is not set | ||
387 | |||
388 | # | ||
389 | # IPMI | ||
390 | # | ||
391 | # CONFIG_IPMI_HANDLER is not set | ||
392 | |||
393 | # | ||
394 | # Watchdog Cards | ||
395 | # | ||
396 | # CONFIG_WATCHDOG is not set | ||
397 | # CONFIG_NVRAM is not set | ||
398 | CONFIG_GEN_RTC=y | ||
399 | # CONFIG_GEN_RTC_X is not set | ||
400 | # CONFIG_DTLK is not set | ||
401 | # CONFIG_R3964 is not set | ||
402 | # CONFIG_APPLICOM is not set | ||
403 | |||
404 | # | ||
405 | # Ftape, the floppy tape device driver | ||
406 | # | ||
407 | # CONFIG_FTAPE is not set | ||
408 | # CONFIG_AGP is not set | ||
409 | # CONFIG_DRM is not set | ||
410 | # CONFIG_RAW_DRIVER is not set | ||
411 | |||
412 | # | ||
413 | # Multimedia devices | ||
414 | # | ||
415 | # CONFIG_VIDEO_DEV is not set | ||
416 | |||
417 | # | ||
418 | # Digital Video Broadcasting Devices | ||
419 | # | ||
420 | # CONFIG_DVB is not set | ||
421 | |||
422 | # | ||
423 | # File systems | ||
424 | # | ||
425 | CONFIG_EXT2_FS=y | ||
426 | # CONFIG_EXT2_FS_XATTR is not set | ||
427 | CONFIG_EXT3_FS=y | ||
428 | CONFIG_EXT3_FS_XATTR=y | ||
429 | # CONFIG_EXT3_FS_POSIX_ACL is not set | ||
430 | # CONFIG_EXT3_FS_SECURITY is not set | ||
431 | CONFIG_JBD=y | ||
432 | # CONFIG_JBD_DEBUG is not set | ||
433 | CONFIG_FS_MBCACHE=y | ||
434 | # CONFIG_REISERFS_FS is not set | ||
435 | # CONFIG_JFS_FS is not set | ||
436 | # CONFIG_XFS_FS is not set | ||
437 | # CONFIG_MINIX_FS is not set | ||
438 | # CONFIG_ROMFS_FS is not set | ||
439 | # CONFIG_QUOTA is not set | ||
440 | # CONFIG_AUTOFS_FS is not set | ||
441 | # CONFIG_AUTOFS4_FS is not set | ||
442 | |||
443 | # | ||
444 | # CD-ROM/DVD Filesystems | ||
445 | # | ||
446 | # CONFIG_ISO9660_FS is not set | ||
447 | # CONFIG_UDF_FS is not set | ||
448 | |||
449 | # | ||
450 | # DOS/FAT/NT Filesystems | ||
451 | # | ||
452 | # CONFIG_FAT_FS is not set | ||
453 | # CONFIG_NTFS_FS is not set | ||
454 | |||
455 | # | ||
456 | # Pseudo filesystems | ||
457 | # | ||
458 | CONFIG_PROC_FS=y | ||
459 | CONFIG_PROC_KCORE=y | ||
460 | # CONFIG_DEVFS_FS is not set | ||
461 | CONFIG_TMPFS=y | ||
462 | # CONFIG_HUGETLB_PAGE is not set | ||
463 | CONFIG_RAMFS=y | ||
464 | |||
465 | # | ||
466 | # Miscellaneous filesystems | ||
467 | # | ||
468 | # CONFIG_ADFS_FS is not set | ||
469 | # CONFIG_AFFS_FS is not set | ||
470 | # CONFIG_HFS_FS is not set | ||
471 | # CONFIG_BEFS_FS is not set | ||
472 | # CONFIG_BFS_FS is not set | ||
473 | # CONFIG_EFS_FS is not set | ||
474 | # CONFIG_CRAMFS is not set | ||
475 | # CONFIG_VXFS_FS is not set | ||
476 | # CONFIG_HPFS_FS is not set | ||
477 | # CONFIG_QNX4FS_FS is not set | ||
478 | # CONFIG_SYSV_FS is not set | ||
479 | # CONFIG_UFS_FS is not set | ||
480 | |||
481 | # | ||
482 | # Network File Systems | ||
483 | # | ||
484 | CONFIG_NFS_FS=y | ||
485 | # CONFIG_NFS_V3 is not set | ||
486 | # CONFIG_NFS_V4 is not set | ||
487 | # CONFIG_NFSD is not set | ||
488 | CONFIG_ROOT_NFS=y | ||
489 | CONFIG_LOCKD=y | ||
490 | # CONFIG_EXPORTFS is not set | ||
491 | CONFIG_SUNRPC=y | ||
492 | # CONFIG_SUNRPC_GSS is not set | ||
493 | # CONFIG_SMB_FS is not set | ||
494 | # CONFIG_CIFS is not set | ||
495 | # CONFIG_NCP_FS is not set | ||
496 | # CONFIG_CODA_FS is not set | ||
497 | # CONFIG_INTERMEZZO_FS is not set | ||
498 | # CONFIG_AFS_FS is not set | ||
499 | |||
500 | # | ||
501 | # Partition Types | ||
502 | # | ||
503 | # CONFIG_PARTITION_ADVANCED is not set | ||
504 | CONFIG_MSDOS_PARTITION=y | ||
505 | |||
506 | # | ||
507 | # Sound | ||
508 | # | ||
509 | # CONFIG_SOUND is not set | ||
510 | |||
511 | # | ||
512 | # IBM 40x options | ||
513 | # | ||
514 | |||
515 | # | ||
516 | # USB support | ||
517 | # | ||
518 | # CONFIG_USB_GADGET is not set | ||
519 | |||
520 | # | ||
521 | # Library routines | ||
522 | # | ||
523 | CONFIG_CRC32=y | ||
524 | |||
525 | # | ||
526 | # Kernel hacking | ||
527 | # | ||
528 | # CONFIG_DEBUG_KERNEL is not set | ||
529 | CONFIG_SERIAL_TEXT_DEBUG=y | ||
530 | CONFIG_OCP=y | ||
531 | |||
532 | # | ||
533 | # Security options | ||
534 | # | ||
535 | # CONFIG_SECURITY is not set | ||
536 | |||
537 | # | ||
538 | # Cryptographic options | ||
539 | # | ||
540 | # CONFIG_CRYPTO is not set | ||
diff --git a/arch/ppc/kernel/cpu_setup_6xx.S b/arch/ppc/kernel/cpu_setup_6xx.S index 3fb1fb619d2c..bd037caa4055 100644 --- a/arch/ppc/kernel/cpu_setup_6xx.S +++ b/arch/ppc/kernel/cpu_setup_6xx.S | |||
@@ -327,6 +327,7 @@ _GLOBAL(__save_cpu_setup) | |||
327 | cmplwi cr4,r3,0x8002 /* 7457 */ | 327 | cmplwi cr4,r3,0x8002 /* 7457 */ |
328 | cmplwi cr5,r3,0x8003 /* 7447A */ | 328 | cmplwi cr5,r3,0x8003 /* 7447A */ |
329 | cmplwi cr6,r3,0x7000 /* 750FX */ | 329 | cmplwi cr6,r3,0x7000 /* 750FX */ |
330 | cmplwi cr7,r3,0x8004 /* 7448 */ | ||
330 | /* cr1 is 7400 || 7410 */ | 331 | /* cr1 is 7400 || 7410 */ |
331 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq | 332 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq |
332 | /* cr0 is 74xx */ | 333 | /* cr0 is 74xx */ |
@@ -334,6 +335,7 @@ _GLOBAL(__save_cpu_setup) | |||
334 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq | 335 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq |
335 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 336 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq |
336 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq | 337 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq |
338 | cror 4*cr0+eq,4*cr0+eq,4*cr7+eq | ||
337 | bne 1f | 339 | bne 1f |
338 | /* Backup 74xx specific regs */ | 340 | /* Backup 74xx specific regs */ |
339 | mfspr r4,SPRN_MSSCR0 | 341 | mfspr r4,SPRN_MSSCR0 |
@@ -396,6 +398,7 @@ _GLOBAL(__restore_cpu_setup) | |||
396 | cmplwi cr4,r3,0x8002 /* 7457 */ | 398 | cmplwi cr4,r3,0x8002 /* 7457 */ |
397 | cmplwi cr5,r3,0x8003 /* 7447A */ | 399 | cmplwi cr5,r3,0x8003 /* 7447A */ |
398 | cmplwi cr6,r3,0x7000 /* 750FX */ | 400 | cmplwi cr6,r3,0x7000 /* 750FX */ |
401 | cmplwi cr7,r3,0x8004 /* 7448 */ | ||
399 | /* cr1 is 7400 || 7410 */ | 402 | /* cr1 is 7400 || 7410 */ |
400 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq | 403 | cror 4*cr1+eq,4*cr1+eq,4*cr2+eq |
401 | /* cr0 is 74xx */ | 404 | /* cr0 is 74xx */ |
@@ -403,6 +406,7 @@ _GLOBAL(__restore_cpu_setup) | |||
403 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq | 406 | cror 4*cr0+eq,4*cr0+eq,4*cr4+eq |
404 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq | 407 | cror 4*cr0+eq,4*cr0+eq,4*cr1+eq |
405 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq | 408 | cror 4*cr0+eq,4*cr0+eq,4*cr5+eq |
409 | cror 4*cr0+eq,4*cr0+eq,4*cr7+eq | ||
406 | bne 2f | 410 | bne 2f |
407 | /* Restore 74xx specific regs */ | 411 | /* Restore 74xx specific regs */ |
408 | lwz r4,CS_MSSCR0(r5) | 412 | lwz r4,CS_MSSCR0(r5) |
diff --git a/arch/ppc/kernel/cputable.c b/arch/ppc/kernel/cputable.c index 8a3d74f2531e..546e1ea4cafa 100644 --- a/arch/ppc/kernel/cputable.c +++ b/arch/ppc/kernel/cputable.c | |||
@@ -198,10 +198,10 @@ struct cpu_spec cpu_specs[] = { | |||
198 | .num_pmcs = 4, | 198 | .num_pmcs = 4, |
199 | .cpu_setup = __setup_cpu_750 | 199 | .cpu_setup = __setup_cpu_750 |
200 | }, | 200 | }, |
201 | { /* 745/755 */ | 201 | { /* 750CX (80100 and 8010x?) */ |
202 | .pvr_mask = 0xfffff000, | 202 | .pvr_mask = 0xfffffff0, |
203 | .pvr_value = 0x00083000, | 203 | .pvr_value = 0x00080100, |
204 | .cpu_name = "745/755", | 204 | .cpu_name = "750CX", |
205 | .cpu_features = CPU_FTR_COMMON | | 205 | .cpu_features = CPU_FTR_COMMON | |
206 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 206 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
207 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | | 207 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | |
@@ -210,11 +210,11 @@ struct cpu_spec cpu_specs[] = { | |||
210 | .icache_bsize = 32, | 210 | .icache_bsize = 32, |
211 | .dcache_bsize = 32, | 211 | .dcache_bsize = 32, |
212 | .num_pmcs = 4, | 212 | .num_pmcs = 4, |
213 | .cpu_setup = __setup_cpu_750 | 213 | .cpu_setup = __setup_cpu_750cx |
214 | }, | 214 | }, |
215 | { /* 750CX (80100 and 8010x?) */ | 215 | { /* 750CX (82201 and 82202) */ |
216 | .pvr_mask = 0xfffffff0, | 216 | .pvr_mask = 0xfffffff0, |
217 | .pvr_value = 0x00080100, | 217 | .pvr_value = 0x00082200, |
218 | .cpu_name = "750CX", | 218 | .cpu_name = "750CX", |
219 | .cpu_features = CPU_FTR_COMMON | | 219 | .cpu_features = CPU_FTR_COMMON | |
220 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 220 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
@@ -226,10 +226,10 @@ struct cpu_spec cpu_specs[] = { | |||
226 | .num_pmcs = 4, | 226 | .num_pmcs = 4, |
227 | .cpu_setup = __setup_cpu_750cx | 227 | .cpu_setup = __setup_cpu_750cx |
228 | }, | 228 | }, |
229 | { /* 750CX (82201 and 82202) */ | 229 | { /* 750CXe (82214) */ |
230 | .pvr_mask = 0xfffffff0, | 230 | .pvr_mask = 0xfffffff0, |
231 | .pvr_value = 0x00082200, | 231 | .pvr_value = 0x00082210, |
232 | .cpu_name = "750CX", | 232 | .cpu_name = "750CXe", |
233 | .cpu_features = CPU_FTR_COMMON | | 233 | .cpu_features = CPU_FTR_COMMON | |
234 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 234 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
235 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | | 235 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | |
@@ -240,9 +240,9 @@ struct cpu_spec cpu_specs[] = { | |||
240 | .num_pmcs = 4, | 240 | .num_pmcs = 4, |
241 | .cpu_setup = __setup_cpu_750cx | 241 | .cpu_setup = __setup_cpu_750cx |
242 | }, | 242 | }, |
243 | { /* 750CXe (82214) */ | 243 | { /* 750CXe "Gekko" (83214) */ |
244 | .pvr_mask = 0xfffffff0, | 244 | .pvr_mask = 0xffffffff, |
245 | .pvr_value = 0x00082210, | 245 | .pvr_value = 0x00083214, |
246 | .cpu_name = "750CXe", | 246 | .cpu_name = "750CXe", |
247 | .cpu_features = CPU_FTR_COMMON | | 247 | .cpu_features = CPU_FTR_COMMON | |
248 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | 248 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | |
@@ -254,6 +254,20 @@ struct cpu_spec cpu_specs[] = { | |||
254 | .num_pmcs = 4, | 254 | .num_pmcs = 4, |
255 | .cpu_setup = __setup_cpu_750cx | 255 | .cpu_setup = __setup_cpu_750cx |
256 | }, | 256 | }, |
257 | { /* 745/755 */ | ||
258 | .pvr_mask = 0xfffff000, | ||
259 | .pvr_value = 0x00083000, | ||
260 | .cpu_name = "745/755", | ||
261 | .cpu_features = CPU_FTR_COMMON | | ||
262 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | | ||
263 | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | | ||
264 | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, | ||
265 | .cpu_user_features = COMMON_PPC, | ||
266 | .icache_bsize = 32, | ||
267 | .dcache_bsize = 32, | ||
268 | .num_pmcs = 4, | ||
269 | .cpu_setup = __setup_cpu_750 | ||
270 | }, | ||
257 | { /* 750FX rev 1.x */ | 271 | { /* 750FX rev 1.x */ |
258 | .pvr_mask = 0xffffff00, | 272 | .pvr_mask = 0xffffff00, |
259 | .pvr_value = 0x70000100, | 273 | .pvr_value = 0x70000100, |
@@ -536,6 +550,22 @@ struct cpu_spec cpu_specs[] = { | |||
536 | .num_pmcs = 6, | 550 | .num_pmcs = 6, |
537 | .cpu_setup = __setup_cpu_745x | 551 | .cpu_setup = __setup_cpu_745x |
538 | }, | 552 | }, |
553 | { /* 7448 */ | ||
554 | .pvr_mask = 0xffff0000, | ||
555 | .pvr_value = 0x80040000, | ||
556 | .cpu_name = "7448", | ||
557 | .cpu_features = CPU_FTR_COMMON | | ||
558 | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | | ||
559 | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | | ||
560 | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | | ||
561 | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | | ||
562 | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT, | ||
563 | .cpu_user_features = COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, | ||
564 | .icache_bsize = 32, | ||
565 | .dcache_bsize = 32, | ||
566 | .num_pmcs = 6, | ||
567 | .cpu_setup = __setup_cpu_745x | ||
568 | }, | ||
539 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ | 569 | { /* 82xx (8240, 8245, 8260 are all 603e cores) */ |
540 | .pvr_mask = 0x7fff0000, | 570 | .pvr_mask = 0x7fff0000, |
541 | .pvr_value = 0x00810000, | 571 | .pvr_value = 0x00810000, |
@@ -922,6 +952,26 @@ struct cpu_spec cpu_specs[] = { | |||
922 | .icache_bsize = 32, | 952 | .icache_bsize = 32, |
923 | .dcache_bsize = 32, | 953 | .dcache_bsize = 32, |
924 | }, | 954 | }, |
955 | { /* 440GX Rev. F */ | ||
956 | .pvr_mask = 0xf0000fff, | ||
957 | .pvr_value = 0x50000894, | ||
958 | .cpu_name = "440GX Rev. F", | ||
959 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
960 | CPU_FTR_USE_TB, | ||
961 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, | ||
962 | .icache_bsize = 32, | ||
963 | .dcache_bsize = 32, | ||
964 | }, | ||
965 | { /* 440SP Rev. A */ | ||
966 | .pvr_mask = 0xff000fff, | ||
967 | .pvr_value = 0x53000891, | ||
968 | .cpu_name = "440SP Rev. A", | ||
969 | .cpu_features = CPU_FTR_SPLIT_ID_CACHE | | ||
970 | CPU_FTR_USE_TB, | ||
971 | .cpu_user_features = PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, | ||
972 | .icache_bsize = 32, | ||
973 | .dcache_bsize = 32, | ||
974 | }, | ||
925 | #endif /* CONFIG_44x */ | 975 | #endif /* CONFIG_44x */ |
926 | #ifdef CONFIG_FSL_BOOKE | 976 | #ifdef CONFIG_FSL_BOOKE |
927 | { /* e200z5 */ | 977 | { /* e200z5 */ |
diff --git a/arch/ppc/kernel/find_name.c b/arch/ppc/kernel/find_name.c deleted file mode 100644 index 3c0fa8e0c077..000000000000 --- a/arch/ppc/kernel/find_name.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | #include <stdio.h> | ||
2 | #include <asm/page.h> | ||
3 | #include <sys/mman.h> | ||
4 | #include <strings.h> | ||
5 | /* | ||
6 | * Finds a given address in the System.map and prints it out | ||
7 | * with its neighbors. -- Cort | ||
8 | */ | ||
9 | |||
10 | int main(int argc, char **argv) | ||
11 | { | ||
12 | unsigned long addr, cmp, i; | ||
13 | FILE *f; | ||
14 | char s[256], last[256]; | ||
15 | |||
16 | if ( argc < 2 ) | ||
17 | { | ||
18 | fprintf(stderr, "Usage: %s <address>\n", argv[0]); | ||
19 | return -1; | ||
20 | } | ||
21 | |||
22 | for ( i = 1 ; argv[i] ; i++ ) | ||
23 | { | ||
24 | sscanf( argv[i], "%0lx", &addr ); | ||
25 | /* adjust if addr is relative to kernelbase */ | ||
26 | if ( addr < PAGE_OFFSET ) | ||
27 | addr += PAGE_OFFSET; | ||
28 | |||
29 | if ( (f = fopen( "System.map", "r" )) == NULL ) | ||
30 | { | ||
31 | perror("fopen()\n"); | ||
32 | exit(-1); | ||
33 | } | ||
34 | |||
35 | while ( !feof(f) ) | ||
36 | { | ||
37 | fgets(s, 255 , f); | ||
38 | sscanf( s, "%0lx", &cmp ); | ||
39 | if ( addr < cmp ) | ||
40 | break; | ||
41 | strcpy( last, s); | ||
42 | } | ||
43 | |||
44 | printf( "%s%s", last, s ); | ||
45 | } | ||
46 | fclose(f); | ||
47 | return 0; | ||
48 | } | ||
diff --git a/arch/ppc/kernel/head_44x.S b/arch/ppc/kernel/head_44x.S index 69ff3a9961e8..9e68e32edb60 100644 --- a/arch/ppc/kernel/head_44x.S +++ b/arch/ppc/kernel/head_44x.S | |||
@@ -462,7 +462,11 @@ interrupt_base: | |||
462 | 462 | ||
463 | /* Watchdog Timer Interrupt */ | 463 | /* Watchdog Timer Interrupt */ |
464 | /* TODO: Add watchdog support */ | 464 | /* TODO: Add watchdog support */ |
465 | #ifdef CONFIG_BOOKE_WDT | ||
466 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, WatchdogException) | ||
467 | #else | ||
465 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException) | 468 | CRITICAL_EXCEPTION(0x1020, WatchdogTimer, UnknownException) |
469 | #endif | ||
466 | 470 | ||
467 | /* Data TLB Error Interrupt */ | 471 | /* Data TLB Error Interrupt */ |
468 | START_EXCEPTION(DataTLBError) | 472 | START_EXCEPTION(DataTLBError) |
diff --git a/arch/ppc/kernel/head_4xx.S b/arch/ppc/kernel/head_4xx.S index 23fb51819ba5..0a5e723d3be6 100644 --- a/arch/ppc/kernel/head_4xx.S +++ b/arch/ppc/kernel/head_4xx.S | |||
@@ -448,7 +448,9 @@ label: | |||
448 | 448 | ||
449 | /* 0x1020 - Watchdog Timer (WDT) Exception | 449 | /* 0x1020 - Watchdog Timer (WDT) Exception |
450 | */ | 450 | */ |
451 | 451 | #ifdef CONFIG_BOOKE_WDT | |
452 | CRITICAL_EXCEPTION(0x1020, WDTException, WatchdogException) | ||
453 | #else | ||
452 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) | 454 | CRITICAL_EXCEPTION(0x1020, WDTException, UnknownException) |
453 | #endif | 455 | #endif |
454 | 456 | ||
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S index eb804b7a3cb2..4028f4c7d978 100644 --- a/arch/ppc/kernel/head_fsl_booke.S +++ b/arch/ppc/kernel/head_fsl_booke.S | |||
@@ -564,8 +564,11 @@ interrupt_base: | |||
564 | EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE) | 564 | EXCEPTION(0x3100, FixedIntervalTimer, UnknownException, EXC_XFER_EE) |
565 | 565 | ||
566 | /* Watchdog Timer Interrupt */ | 566 | /* Watchdog Timer Interrupt */ |
567 | /* TODO: Add watchdog support */ | 567 | #ifdef CONFIG_BOOKE_WDT |
568 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, WatchdogException) | ||
569 | #else | ||
568 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException) | 570 | CRITICAL_EXCEPTION(0x3200, WatchdogTimer, UnknownException) |
571 | #endif | ||
569 | 572 | ||
570 | /* Data TLB Error Interrupt */ | 573 | /* Data TLB Error Interrupt */ |
571 | START_EXCEPTION(DataTLBError) | 574 | START_EXCEPTION(DataTLBError) |
diff --git a/arch/ppc/kernel/ppc_ksyms.c b/arch/ppc/kernel/ppc_ksyms.c index e7d40cc6c1b6..88f6bb7b6964 100644 --- a/arch/ppc/kernel/ppc_ksyms.c +++ b/arch/ppc/kernel/ppc_ksyms.c | |||
@@ -51,9 +51,6 @@ | |||
51 | #include <asm/commproc.h> | 51 | #include <asm/commproc.h> |
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | /* Tell string.h we don't want memcpy etc. as cpp defines */ | ||
55 | #define EXPORT_SYMTAB_STROPS | ||
56 | |||
57 | extern void transfer_to_handler(void); | 54 | extern void transfer_to_handler(void); |
58 | extern void do_IRQ(struct pt_regs *regs); | 55 | extern void do_IRQ(struct pt_regs *regs); |
59 | extern void MachineCheckException(struct pt_regs *regs); | 56 | extern void MachineCheckException(struct pt_regs *regs); |
@@ -263,6 +260,7 @@ EXPORT_SYMBOL(__ashrdi3); | |||
263 | EXPORT_SYMBOL(__ashldi3); | 260 | EXPORT_SYMBOL(__ashldi3); |
264 | EXPORT_SYMBOL(__lshrdi3); | 261 | EXPORT_SYMBOL(__lshrdi3); |
265 | EXPORT_SYMBOL(memcpy); | 262 | EXPORT_SYMBOL(memcpy); |
263 | EXPORT_SYMBOL(cacheable_memcpy); | ||
266 | EXPORT_SYMBOL(memset); | 264 | EXPORT_SYMBOL(memset); |
267 | EXPORT_SYMBOL(memmove); | 265 | EXPORT_SYMBOL(memmove); |
268 | EXPORT_SYMBOL(memscan); | 266 | EXPORT_SYMBOL(memscan); |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index 929e5d1cc7fe..545cfd0fab59 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -41,7 +41,11 @@ | |||
41 | #include <asm/xmon.h> | 41 | #include <asm/xmon.h> |
42 | #include <asm/ocp.h> | 42 | #include <asm/ocp.h> |
43 | 43 | ||
44 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) || defined(CONFIG_MPC10X_BRIDGE) | 44 | #define USES_PPC_SYS (defined(CONFIG_85xx) || defined(CONFIG_83xx) || \ |
45 | defined(CONFIG_MPC10X_BRIDGE) || defined(CONFIG_8260) || \ | ||
46 | defined(CONFIG_PPC_MPC52xx)) | ||
47 | |||
48 | #if USES_PPC_SYS | ||
45 | #include <asm/ppc_sys.h> | 49 | #include <asm/ppc_sys.h> |
46 | #endif | 50 | #endif |
47 | 51 | ||
@@ -241,7 +245,7 @@ int show_cpuinfo(struct seq_file *m, void *v) | |||
241 | seq_printf(m, "bogomips\t: %lu.%02lu\n", | 245 | seq_printf(m, "bogomips\t: %lu.%02lu\n", |
242 | lpj / (500000/HZ), (lpj / (5000/HZ)) % 100); | 246 | lpj / (500000/HZ), (lpj / (5000/HZ)) % 100); |
243 | 247 | ||
244 | #if defined(CONFIG_85xx) || defined(CONFIG_83xx) || defined(CONFIG_MPC10X_BRIDGE) | 248 | #if USES_PPC_SYS |
245 | if (cur_ppc_sys_spec->ppc_sys_name) | 249 | if (cur_ppc_sys_spec->ppc_sys_name) |
246 | seq_printf(m, "chipset\t\t: %s\n", | 250 | seq_printf(m, "chipset\t\t: %s\n", |
247 | cur_ppc_sys_spec->ppc_sys_name); | 251 | cur_ppc_sys_spec->ppc_sys_name); |
@@ -615,6 +619,26 @@ machine_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
615 | if (ppc_md.progress) | 619 | if (ppc_md.progress) |
616 | ppc_md.progress("id mach(): done", 0x200); | 620 | ppc_md.progress("id mach(): done", 0x200); |
617 | } | 621 | } |
622 | #ifdef CONFIG_BOOKE_WDT | ||
623 | /* Checks wdt=x and wdt_period=xx command-line option */ | ||
624 | int __init early_parse_wdt(char *p) | ||
625 | { | ||
626 | if (p && strncmp(p, "0", 1) != 0) | ||
627 | booke_wdt_enabled = 1; | ||
628 | |||
629 | return 0; | ||
630 | } | ||
631 | early_param("wdt", early_parse_wdt); | ||
632 | |||
633 | int __init early_parse_wdt_period (char *p) | ||
634 | { | ||
635 | if (p) | ||
636 | booke_wdt_period = simple_strtoul(p, NULL, 0); | ||
637 | |||
638 | return 0; | ||
639 | } | ||
640 | early_param("wdt_period", early_parse_wdt_period); | ||
641 | #endif /* CONFIG_BOOKE_WDT */ | ||
618 | 642 | ||
619 | /* Checks "l2cr=xxxx" command-line option */ | 643 | /* Checks "l2cr=xxxx" command-line option */ |
620 | int __init ppc_setup_l2cr(char *str) | 644 | int __init ppc_setup_l2cr(char *str) |
diff --git a/arch/ppc/kernel/traps.c b/arch/ppc/kernel/traps.c index 9e6ae5696650..d87423d1003a 100644 --- a/arch/ppc/kernel/traps.c +++ b/arch/ppc/kernel/traps.c | |||
@@ -904,6 +904,25 @@ void SPEFloatingPointException(struct pt_regs *regs) | |||
904 | } | 904 | } |
905 | #endif | 905 | #endif |
906 | 906 | ||
907 | #ifdef CONFIG_BOOKE_WDT | ||
908 | /* | ||
909 | * Default handler for a Watchdog exception, | ||
910 | * spins until a reboot occurs | ||
911 | */ | ||
912 | void __attribute__ ((weak)) WatchdogHandler(struct pt_regs *regs) | ||
913 | { | ||
914 | /* Generic WatchdogHandler, implement your own */ | ||
915 | mtspr(SPRN_TCR, mfspr(SPRN_TCR)&(~TCR_WIE)); | ||
916 | return; | ||
917 | } | ||
918 | |||
919 | void WatchdogException(struct pt_regs *regs) | ||
920 | { | ||
921 | printk (KERN_EMERG "PowerPC Book-E Watchdog Exception\n"); | ||
922 | WatchdogHandler(regs); | ||
923 | } | ||
924 | #endif | ||
925 | |||
907 | void __init trap_init(void) | 926 | void __init trap_init(void) |
908 | { | 927 | { |
909 | } | 928 | } |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 33ada72c7330..f421a4b337f6 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -560,9 +560,10 @@ void flush_dcache_page(struct page *page) | |||
560 | void flush_dcache_icache_page(struct page *page) | 560 | void flush_dcache_icache_page(struct page *page) |
561 | { | 561 | { |
562 | #ifdef CONFIG_BOOKE | 562 | #ifdef CONFIG_BOOKE |
563 | __flush_dcache_icache(kmap(page)); | 563 | void *start = kmap_atomic(page, KM_PPC_SYNC_ICACHE); |
564 | kunmap(page); | 564 | __flush_dcache_icache(start); |
565 | #elif CONFIG_8xx | 565 | kunmap_atomic(start, KM_PPC_SYNC_ICACHE); |
566 | #elif defined(CONFIG_8xx) | ||
566 | /* On 8xx there is no need to kmap since highmem is not supported */ | 567 | /* On 8xx there is no need to kmap since highmem is not supported */ |
567 | __flush_dcache_icache(page_address(page)); | 568 | __flush_dcache_icache(page_address(page)); |
568 | #else | 569 | #else |
diff --git a/arch/ppc/platforms/4xx/Kconfig b/arch/ppc/platforms/4xx/Kconfig index 805dd98908a3..76f4476cab44 100644 --- a/arch/ppc/platforms/4xx/Kconfig +++ b/arch/ppc/platforms/4xx/Kconfig | |||
@@ -16,11 +16,6 @@ choice | |||
16 | depends on 40x | 16 | depends on 40x |
17 | default WALNUT | 17 | default WALNUT |
18 | 18 | ||
19 | config ASH | ||
20 | bool "Ash" | ||
21 | help | ||
22 | This option enables support for the IBM NP405H evaluation board. | ||
23 | |||
24 | config BUBINGA | 19 | config BUBINGA |
25 | bool "Bubinga" | 20 | bool "Bubinga" |
26 | select WANT_EARLY_SERIAL | 21 | select WANT_EARLY_SERIAL |
@@ -37,11 +32,6 @@ config EP405 | |||
37 | help | 32 | help |
38 | This option enables support for the EP405/EP405PC boards. | 33 | This option enables support for the EP405/EP405PC boards. |
39 | 34 | ||
40 | config OAK | ||
41 | bool "Oak" | ||
42 | help | ||
43 | This option enables support for the IBM 403GCX evaluation board. | ||
44 | |||
45 | config REDWOOD_5 | 35 | config REDWOOD_5 |
46 | bool "Redwood-5" | 36 | bool "Redwood-5" |
47 | help | 37 | help |
@@ -152,13 +142,13 @@ config IBM440EP_ERR42 | |||
152 | # All 405-based cores up until the 405GPR and 405EP have this errata. | 142 | # All 405-based cores up until the 405GPR and 405EP have this errata. |
153 | config IBM405_ERR77 | 143 | config IBM405_ERR77 |
154 | bool | 144 | bool |
155 | depends on 40x && !403GCX && !405GPR | 145 | depends on 40x && !403GCX && !405GPR && !405EP |
156 | default y | 146 | default y |
157 | 147 | ||
158 | # All 40x-based cores, up until the 405GPR and 405EP have this errata. | 148 | # All 40x-based cores, up until the 405GPR and 405EP have this errata. |
159 | config IBM405_ERR51 | 149 | config IBM405_ERR51 |
160 | bool | 150 | bool |
161 | depends on 40x && !405GPR | 151 | depends on 40x && !405GPR && !405EP |
162 | default y | 152 | default y |
163 | 153 | ||
164 | config BOOKE | 154 | config BOOKE |
@@ -186,6 +176,7 @@ config BIOS_FIXUP | |||
186 | depends on BUBINGA || EP405 || SYCAMORE || WALNUT | 176 | depends on BUBINGA || EP405 || SYCAMORE || WALNUT |
187 | default y | 177 | default y |
188 | 178 | ||
179 | # OAK doesn't exist but wanted to keep this around for any future 403GCX boards | ||
189 | config 403GCX | 180 | config 403GCX |
190 | bool | 181 | bool |
191 | depends OAK | 182 | depends OAK |
diff --git a/arch/ppc/platforms/4xx/Makefile b/arch/ppc/platforms/4xx/Makefile index 844c3b5066e8..1dd6d7fd6a9a 100644 --- a/arch/ppc/platforms/4xx/Makefile +++ b/arch/ppc/platforms/4xx/Makefile | |||
@@ -1,14 +1,12 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the PowerPC 4xx linux kernel. | 2 | # Makefile for the PowerPC 4xx linux kernel. |
3 | 3 | ||
4 | obj-$(CONFIG_ASH) += ash.o | ||
5 | obj-$(CONFIG_BAMBOO) += bamboo.o | 4 | obj-$(CONFIG_BAMBOO) += bamboo.o |
6 | obj-$(CONFIG_CPCI405) += cpci405.o | 5 | obj-$(CONFIG_CPCI405) += cpci405.o |
7 | obj-$(CONFIG_EBONY) += ebony.o | 6 | obj-$(CONFIG_EBONY) += ebony.o |
8 | obj-$(CONFIG_EP405) += ep405.o | 7 | obj-$(CONFIG_EP405) += ep405.o |
9 | obj-$(CONFIG_BUBINGA) += bubinga.o | 8 | obj-$(CONFIG_BUBINGA) += bubinga.o |
10 | obj-$(CONFIG_LUAN) += luan.o | 9 | obj-$(CONFIG_LUAN) += luan.o |
11 | obj-$(CONFIG_OAK) += oak.o | ||
12 | obj-$(CONFIG_OCOTEA) += ocotea.o | 10 | obj-$(CONFIG_OCOTEA) += ocotea.o |
13 | obj-$(CONFIG_REDWOOD_5) += redwood5.o | 11 | obj-$(CONFIG_REDWOOD_5) += redwood5.o |
14 | obj-$(CONFIG_REDWOOD_6) += redwood6.o | 12 | obj-$(CONFIG_REDWOOD_6) += redwood6.o |
diff --git a/arch/ppc/platforms/4xx/ash.c b/arch/ppc/platforms/4xx/ash.c deleted file mode 100644 index ce2911793716..000000000000 --- a/arch/ppc/platforms/4xx/ash.c +++ /dev/null | |||
@@ -1,250 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/ash.c | ||
3 | * | ||
4 | * Support for the IBM NP405H ash eval board | ||
5 | * | ||
6 | * Author: Armin Kuster <akuster@mvista.com> | ||
7 | * | ||
8 | * 2001-2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | #include <linux/config.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/pagemap.h> | ||
16 | #include <linux/pci.h> | ||
17 | |||
18 | #include <asm/machdep.h> | ||
19 | #include <asm/pci-bridge.h> | ||
20 | #include <asm/io.h> | ||
21 | #include <asm/ocp.h> | ||
22 | #include <asm/ibm_ocp_pci.h> | ||
23 | #include <asm/todc.h> | ||
24 | |||
25 | #ifdef DEBUG | ||
26 | #define DBG(x...) printk(x) | ||
27 | #else | ||
28 | #define DBG(x...) | ||
29 | #endif | ||
30 | |||
31 | void *ash_rtc_base; | ||
32 | |||
33 | /* Some IRQs unique to Walnut. | ||
34 | * Used by the generic 405 PCI setup functions in ppc4xx_pci.c | ||
35 | */ | ||
36 | int __init | ||
37 | ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
38 | { | ||
39 | static char pci_irq_table[][4] = | ||
40 | /* | ||
41 | * PCI IDSEL/INTPIN->INTLINE | ||
42 | * A B C D | ||
43 | */ | ||
44 | { | ||
45 | {24, 24, 24, 24}, /* IDSEL 1 - PCI slot 1 */ | ||
46 | {25, 25, 25, 25}, /* IDSEL 2 - PCI slot 2 */ | ||
47 | {26, 26, 26, 26}, /* IDSEL 3 - PCI slot 3 */ | ||
48 | {27, 27, 27, 27}, /* IDSEL 4 - PCI slot 4 */ | ||
49 | }; | ||
50 | |||
51 | const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4; | ||
52 | return PCI_IRQ_TABLE_LOOKUP; | ||
53 | } | ||
54 | |||
55 | void __init | ||
56 | ash_setup_arch(void) | ||
57 | { | ||
58 | ppc4xx_setup_arch(); | ||
59 | |||
60 | ibm_ocp_set_emac(0, 3); | ||
61 | |||
62 | #ifdef CONFIG_DEBUG_BRINGUP | ||
63 | int i; | ||
64 | printk("\n"); | ||
65 | printk("machine\t: %s\n", PPC4xx_MACHINE_NAME); | ||
66 | printk("\n"); | ||
67 | printk("bi_s_version\t %s\n", bip->bi_s_version); | ||
68 | printk("bi_r_version\t %s\n", bip->bi_r_version); | ||
69 | printk("bi_memsize\t 0x%8.8x\t %dMBytes\n", bip->bi_memsize, | ||
70 | bip->bi_memsize / (1024 * 1000)); | ||
71 | for (i = 0; i < EMAC_NUMS; i++) { | ||
72 | printk("bi_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", i, | ||
73 | bip->bi_enetaddr[i][0], bip->bi_enetaddr[i][1], | ||
74 | bip->bi_enetaddr[i][2], bip->bi_enetaddr[i][3], | ||
75 | bip->bi_enetaddr[i][4], bip->bi_enetaddr[i][5]); | ||
76 | } | ||
77 | printk("bi_pci_enetaddr %d\t %2.2x%2.2x%2.2x-%2.2x%2.2x%2.2x\n", 0, | ||
78 | bip->bi_pci_enetaddr[0], bip->bi_pci_enetaddr[1], | ||
79 | bip->bi_pci_enetaddr[2], bip->bi_pci_enetaddr[3], | ||
80 | bip->bi_pci_enetaddr[4], bip->bi_pci_enetaddr[5]); | ||
81 | |||
82 | printk("bi_intfreq\t 0x%8.8x\t clock:\t %dMhz\n", | ||
83 | bip->bi_intfreq, bip->bi_intfreq / 1000000); | ||
84 | |||
85 | printk("bi_busfreq\t 0x%8.8x\t plb bus clock:\t %dMHz\n", | ||
86 | bip->bi_busfreq, bip->bi_busfreq / 1000000); | ||
87 | printk("bi_pci_busfreq\t 0x%8.8x\t pci bus clock:\t %dMHz\n", | ||
88 | bip->bi_pci_busfreq, bip->bi_pci_busfreq / 1000000); | ||
89 | |||
90 | printk("\n"); | ||
91 | #endif | ||
92 | /* RTC step for ash */ | ||
93 | ash_rtc_base = (void *) ASH_RTC_VADDR; | ||
94 | TODC_INIT(TODC_TYPE_DS1743, ash_rtc_base, ash_rtc_base, ash_rtc_base, | ||
95 | 8); | ||
96 | } | ||
97 | |||
98 | void __init | ||
99 | bios_fixup(struct pci_controller *hose, struct pcil0_regs *pcip) | ||
100 | { | ||
101 | /* | ||
102 | * Expected PCI mapping: | ||
103 | * | ||
104 | * PLB addr PCI memory addr | ||
105 | * --------------------- --------------------- | ||
106 | * 0000'0000 - 7fff'ffff <--- 0000'0000 - 7fff'ffff | ||
107 | * 8000'0000 - Bfff'ffff ---> 8000'0000 - Bfff'ffff | ||
108 | * | ||
109 | * PLB addr PCI io addr | ||
110 | * --------------------- --------------------- | ||
111 | * e800'0000 - e800'ffff ---> 0000'0000 - 0001'0000 | ||
112 | * | ||
113 | * The following code is simplified by assuming that the bootrom | ||
114 | * has been well behaved in following this mapping. | ||
115 | */ | ||
116 | |||
117 | #ifdef DEBUG | ||
118 | int i; | ||
119 | |||
120 | printk("ioremap PCLIO_BASE = 0x%x\n", pcip); | ||
121 | printk("PCI bridge regs before fixup \n"); | ||
122 | for (i = 0; i <= 2; i++) { | ||
123 | printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma))); | ||
124 | printk(" pmm%dla\t0x%x\n", i, in_le32(&(pcip->pmm[i].la))); | ||
125 | printk(" pmm%dpcila\t0x%x\n", i, | ||
126 | in_le32(&(pcip->pmm[i].pcila))); | ||
127 | printk(" pmm%dpciha\t0x%x\n", i, | ||
128 | in_le32(&(pcip->pmm[i].pciha))); | ||
129 | } | ||
130 | printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms))); | ||
131 | printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la))); | ||
132 | printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms))); | ||
133 | printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la))); | ||
134 | for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) { | ||
135 | early_read_config_dword(hose, hose->first_busno, | ||
136 | PCI_FUNC(hose->first_busno), bar, | ||
137 | &bar_response); | ||
138 | DBG("BUS %d, device %d, Function %d bar 0x%8.8x is 0x%8.8x\n", | ||
139 | hose->first_busno, PCI_SLOT(hose->first_busno), | ||
140 | PCI_FUNC(hose->first_busno), bar, bar_response); | ||
141 | } | ||
142 | |||
143 | #endif | ||
144 | if (ppc_md.progress) | ||
145 | ppc_md.progress("bios_fixup(): enter", 0x800); | ||
146 | |||
147 | /* added for IBM boot rom version 1.15 bios bar changes -AK */ | ||
148 | |||
149 | /* Disable region first */ | ||
150 | out_le32((void *) &(pcip->pmm[0].ma), 0x00000000); | ||
151 | /* PLB starting addr, PCI: 0x80000000 */ | ||
152 | out_le32((void *) &(pcip->pmm[0].la), 0x80000000); | ||
153 | /* PCI start addr, 0x80000000 */ | ||
154 | out_le32((void *) &(pcip->pmm[0].pcila), PPC405_PCI_MEM_BASE); | ||
155 | /* 512MB range of PLB to PCI */ | ||
156 | out_le32((void *) &(pcip->pmm[0].pciha), 0x00000000); | ||
157 | /* Enable no pre-fetch, enable region */ | ||
158 | out_le32((void *) &(pcip->pmm[0].ma), ((0xffffffff - | ||
159 | (PPC405_PCI_UPPER_MEM - | ||
160 | PPC405_PCI_MEM_BASE)) | 0x01)); | ||
161 | |||
162 | /* Disable region one */ | ||
163 | out_le32((void *) &(pcip->pmm[1].ma), 0x00000000); | ||
164 | out_le32((void *) &(pcip->pmm[1].la), 0x00000000); | ||
165 | out_le32((void *) &(pcip->pmm[1].pcila), 0x00000000); | ||
166 | out_le32((void *) &(pcip->pmm[1].pciha), 0x00000000); | ||
167 | out_le32((void *) &(pcip->pmm[1].ma), 0x00000000); | ||
168 | |||
169 | /* Disable region two */ | ||
170 | out_le32((void *) &(pcip->pmm[2].ma), 0x00000000); | ||
171 | out_le32((void *) &(pcip->pmm[2].la), 0x00000000); | ||
172 | out_le32((void *) &(pcip->pmm[2].pcila), 0x00000000); | ||
173 | out_le32((void *) &(pcip->pmm[2].pciha), 0x00000000); | ||
174 | out_le32((void *) &(pcip->pmm[2].ma), 0x00000000); | ||
175 | |||
176 | /* Enable PTM1 and PTM2, mapped to PLB address 0. */ | ||
177 | |||
178 | out_le32((void *) &(pcip->ptm1la), 0x00000000); | ||
179 | out_le32((void *) &(pcip->ptm1ms), 0x00000001); | ||
180 | out_le32((void *) &(pcip->ptm2la), 0x00000000); | ||
181 | out_le32((void *) &(pcip->ptm2ms), 0x00000001); | ||
182 | |||
183 | /* Write zero to PTM1 BAR. */ | ||
184 | |||
185 | early_write_config_dword(hose, hose->first_busno, | ||
186 | PCI_FUNC(hose->first_busno), | ||
187 | PCI_BASE_ADDRESS_1, | ||
188 | 0x00000000); | ||
189 | |||
190 | /* Disable PTM2 (unused) */ | ||
191 | |||
192 | out_le32((void *) &(pcip->ptm2la), 0x00000000); | ||
193 | out_le32((void *) &(pcip->ptm2ms), 0x00000000); | ||
194 | |||
195 | /* end work arround */ | ||
196 | if (ppc_md.progress) | ||
197 | ppc_md.progress("bios_fixup(): done", 0x800); | ||
198 | |||
199 | #ifdef DEBUG | ||
200 | printk("PCI bridge regs after fixup \n"); | ||
201 | for (i = 0; i <= 2; i++) { | ||
202 | printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma))); | ||
203 | printk(" pmm%dla\t0x%x\n", i, in_le32(&(pcip->pmm[i].la))); | ||
204 | printk(" pmm%dpcila\t0x%x\n", i, | ||
205 | in_le32(&(pcip->pmm[i].pcila))); | ||
206 | printk(" pmm%dpciha\t0x%x\n", i, | ||
207 | in_le32(&(pcip->pmm[i].pciha))); | ||
208 | } | ||
209 | printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms))); | ||
210 | printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la))); | ||
211 | printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms))); | ||
212 | printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la))); | ||
213 | |||
214 | for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) { | ||
215 | early_read_config_dword(hose, hose->first_busno, | ||
216 | PCI_FUNC(hose->first_busno), bar, | ||
217 | &bar_response); | ||
218 | DBG("BUS %d, device %d, Function %d bar 0x%8.8x is 0x%8.8x\n", | ||
219 | hose->first_busno, PCI_SLOT(hose->first_busno), | ||
220 | PCI_FUNC(hose->first_busno), bar, bar_response); | ||
221 | } | ||
222 | |||
223 | |||
224 | #endif | ||
225 | } | ||
226 | |||
227 | void __init | ||
228 | ash_map_io(void) | ||
229 | { | ||
230 | ppc4xx_map_io(); | ||
231 | io_block_mapping(ASH_RTC_VADDR, ASH_RTC_PADDR, ASH_RTC_SIZE, _PAGE_IO); | ||
232 | } | ||
233 | |||
234 | void __init | ||
235 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
236 | unsigned long r6, unsigned long r7) | ||
237 | { | ||
238 | ppc4xx_init(r3, r4, r5, r6, r7); | ||
239 | |||
240 | ppc_md.setup_arch = ash_setup_arch; | ||
241 | ppc_md.setup_io_mappings = ash_map_io; | ||
242 | |||
243 | #ifdef CONFIG_PPC_RTC | ||
244 | ppc_md.time_init = todc_time_init; | ||
245 | ppc_md.set_rtc_time = todc_set_rtc_time; | ||
246 | ppc_md.get_rtc_time = todc_get_rtc_time; | ||
247 | ppc_md.nvram_read_val = todc_direct_read_val; | ||
248 | ppc_md.nvram_write_val = todc_direct_write_val; | ||
249 | #endif | ||
250 | } | ||
diff --git a/arch/ppc/platforms/4xx/ash.h b/arch/ppc/platforms/4xx/ash.h deleted file mode 100644 index 5f7448ea418d..000000000000 --- a/arch/ppc/platforms/4xx/ash.h +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/4xx/ash.h | ||
3 | * | ||
4 | * Macros, definitions, and data structures specific to the IBM PowerPC | ||
5 | * Ash eval board. | ||
6 | * | ||
7 | * Author: Armin Kuster <akuster@mvista.com> | ||
8 | * | ||
9 | * 2000-2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
10 | * the terms of the GNU General Public License version 2. This program | ||
11 | * is licensed "as is" without any warranty of any kind, whether express | ||
12 | * or implied. | ||
13 | */ | ||
14 | |||
15 | #ifdef __KERNEL__ | ||
16 | #ifndef __ASM_ASH_H__ | ||
17 | #define __ASM_ASH_H__ | ||
18 | #include <platforms/4xx/ibmnp405h.h> | ||
19 | |||
20 | #ifndef __ASSEMBLY__ | ||
21 | /* | ||
22 | * Data structure defining board information maintained by the boot | ||
23 | * ROM on IBM's "Ash" evaluation board. An effort has been made to | ||
24 | * keep the field names consistent with the 8xx 'bd_t' board info | ||
25 | * structures. | ||
26 | */ | ||
27 | |||
28 | typedef struct board_info { | ||
29 | unsigned char bi_s_version[4]; /* Version of this structure */ | ||
30 | unsigned char bi_r_version[30]; /* Version of the IBM ROM */ | ||
31 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
32 | unsigned char bi_enetaddr[4][6]; /* Local Ethernet MAC address */ | ||
33 | unsigned char bi_pci_enetaddr[6]; | ||
34 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
35 | unsigned int bi_busfreq; /* PLB Bus speed, in Hz */ | ||
36 | unsigned int bi_pci_busfreq; /* PCI speed in Hz */ | ||
37 | } bd_t; | ||
38 | |||
39 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
40 | */ | ||
41 | #define bi_tbfreq bi_intfreq | ||
42 | |||
43 | /* Memory map for the IBM "Ash" NP405H evaluation board. | ||
44 | */ | ||
45 | |||
46 | extern void *ash_rtc_base; | ||
47 | #define ASH_RTC_PADDR ((uint)0xf0000000) | ||
48 | #define ASH_RTC_VADDR ASH_RTC_PADDR | ||
49 | #define ASH_RTC_SIZE ((uint)8*1024) | ||
50 | |||
51 | |||
52 | /* Early initialization address mapping for block_io. | ||
53 | * Standard 405GP map. | ||
54 | */ | ||
55 | #define PPC4xx_PCI_IO_PADDR ((uint)PPC405_PCI_PHY_IO_BASE) | ||
56 | #define PPC4xx_PCI_IO_VADDR PPC4xx_PCI_IO_PADDR | ||
57 | #define PPC4xx_PCI_IO_SIZE ((uint)64*1024) | ||
58 | #define PPC4xx_PCI_CFG_PADDR ((uint)PPC405_PCI_CONFIG_ADDR) | ||
59 | #define PPC4xx_PCI_CFG_VADDR PPC4xx_PCI_CFG_PADDR | ||
60 | #define PPC4xx_PCI_CFG_SIZE ((uint)4*1024) | ||
61 | #define PPC4xx_PCI_LCFG_PADDR ((uint)0xef400000) | ||
62 | #define PPC4xx_PCI_LCFG_VADDR PPC4xx_PCI_LCFG_PADDR | ||
63 | #define PPC4xx_PCI_LCFG_SIZE ((uint)4*1024) | ||
64 | #define PPC4xx_ONB_IO_PADDR ((uint)0xef600000) | ||
65 | #define PPC4xx_ONB_IO_VADDR PPC4xx_ONB_IO_PADDR | ||
66 | #define PPC4xx_ONB_IO_SIZE ((uint)4*1024) | ||
67 | |||
68 | #define NR_BOARD_IRQS 32 | ||
69 | |||
70 | #ifdef CONFIG_PPC405GP_INTERNAL_CLOCK | ||
71 | #define BASE_BAUD 201600 | ||
72 | #else | ||
73 | #define BASE_BAUD 691200 | ||
74 | #endif | ||
75 | |||
76 | #define PPC4xx_MACHINE_NAME "IBM NP405H Ash" | ||
77 | |||
78 | extern char pci_irq_table[][4]; | ||
79 | |||
80 | |||
81 | #endif /* !__ASSEMBLY__ */ | ||
82 | #endif /* __ASM_ASH_H__ */ | ||
83 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/bamboo.c b/arch/ppc/platforms/4xx/bamboo.c index f116787b0b76..ac391d463d78 100644 --- a/arch/ppc/platforms/4xx/bamboo.c +++ b/arch/ppc/platforms/4xx/bamboo.c | |||
@@ -52,13 +52,6 @@ | |||
52 | #include <syslib/gen550.h> | 52 | #include <syslib/gen550.h> |
53 | #include <syslib/ibm440gx_common.h> | 53 | #include <syslib/ibm440gx_common.h> |
54 | 54 | ||
55 | /* | ||
56 | * This is a horrible kludge, we eventually need to abstract this | ||
57 | * generic PHY stuff, so the standard phy mode defines can be | ||
58 | * easily used from arch code. | ||
59 | */ | ||
60 | #include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h" | ||
61 | |||
62 | bd_t __res; | 55 | bd_t __res; |
63 | 56 | ||
64 | static struct ibm44x_clocks clocks __initdata; | 57 | static struct ibm44x_clocks clocks __initdata; |
@@ -123,33 +116,69 @@ bamboo_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
123 | 116 | ||
124 | static void __init bamboo_set_emacdata(void) | 117 | static void __init bamboo_set_emacdata(void) |
125 | { | 118 | { |
126 | unsigned char * selection1_base; | 119 | u8 * base_addr; |
127 | struct ocp_def *def; | 120 | struct ocp_def *def; |
128 | struct ocp_func_emac_data *emacdata; | 121 | struct ocp_func_emac_data *emacdata; |
129 | u8 selection1_val; | 122 | u8 val; |
130 | int mode; | 123 | int mode; |
124 | u32 excluded = 0; | ||
131 | 125 | ||
132 | selection1_base = ioremap64(BAMBOO_FPGA_SELECTION1_REG_ADDR, 16); | 126 | base_addr = ioremap64(BAMBOO_FPGA_SELECTION1_REG_ADDR, 16); |
133 | selection1_val = readb(selection1_base); | 127 | val = readb(base_addr); |
134 | iounmap((void *) selection1_base); | 128 | iounmap((void *) base_addr); |
135 | if (BAMBOO_SEL_MII(selection1_val)) | 129 | if (BAMBOO_SEL_MII(val)) |
136 | mode = PHY_MODE_MII; | 130 | mode = PHY_MODE_MII; |
137 | else if (BAMBOO_SEL_RMII(selection1_val)) | 131 | else if (BAMBOO_SEL_RMII(val)) |
138 | mode = PHY_MODE_RMII; | 132 | mode = PHY_MODE_RMII; |
139 | else | 133 | else |
140 | mode = PHY_MODE_SMII; | 134 | mode = PHY_MODE_SMII; |
141 | 135 | ||
142 | /* Set mac_addr and phy mode for each EMAC */ | 136 | /* |
137 | * SW2 on the Bamboo is used for ethernet configuration and is accessed | ||
138 | * via the CONFIG2 register in the FPGA. If the ANEG pin is set, | ||
139 | * overwrite the supported features with the settings in SW2. | ||
140 | * | ||
141 | * This is used as a workaround for the improperly biased RJ-45 sockets | ||
142 | * on the Rev. 0 Bamboo. By default only 10baseT is functional. | ||
143 | * Removing inductors L17 and L18 from the board allows 100baseT, but | ||
144 | * disables 10baseT. The Rev. 1 has no such limitations. | ||
145 | */ | ||
146 | |||
147 | base_addr = ioremap64(BAMBOO_FPGA_CONFIG2_REG_ADDR, 8); | ||
148 | val = readb(base_addr); | ||
149 | iounmap((void *) base_addr); | ||
150 | if (!BAMBOO_AUTONEGOTIATE(val)) { | ||
151 | excluded |= SUPPORTED_Autoneg; | ||
152 | if (BAMBOO_FORCE_100Mbps(val)) { | ||
153 | excluded |= SUPPORTED_10baseT_Full; | ||
154 | excluded |= SUPPORTED_10baseT_Half; | ||
155 | if (BAMBOO_FULL_DUPLEX_EN(val)) | ||
156 | excluded |= SUPPORTED_100baseT_Half; | ||
157 | else | ||
158 | excluded |= SUPPORTED_100baseT_Full; | ||
159 | } else { | ||
160 | excluded |= SUPPORTED_100baseT_Full; | ||
161 | excluded |= SUPPORTED_100baseT_Half; | ||
162 | if (BAMBOO_FULL_DUPLEX_EN(val)) | ||
163 | excluded |= SUPPORTED_10baseT_Half; | ||
164 | else | ||
165 | excluded |= SUPPORTED_10baseT_Full; | ||
166 | } | ||
167 | } | ||
168 | |||
169 | /* Set mac_addr, phy mode and unsupported phy features for each EMAC */ | ||
143 | 170 | ||
144 | def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0); | 171 | def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 0); |
145 | emacdata = def->additions; | 172 | emacdata = def->additions; |
146 | memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6); | 173 | memcpy(emacdata->mac_addr, __res.bi_enetaddr, 6); |
147 | emacdata->phy_mode = mode; | 174 | emacdata->phy_mode = mode; |
175 | emacdata->phy_feat_exc = excluded; | ||
148 | 176 | ||
149 | def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1); | 177 | def = ocp_get_one_device(OCP_VENDOR_IBM, OCP_FUNC_EMAC, 1); |
150 | emacdata = def->additions; | 178 | emacdata = def->additions; |
151 | memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6); | 179 | memcpy(emacdata->mac_addr, __res.bi_enet1addr, 6); |
152 | emacdata->phy_mode = mode; | 180 | emacdata->phy_mode = mode; |
181 | emacdata->phy_feat_exc = excluded; | ||
153 | } | 182 | } |
154 | 183 | ||
155 | static int | 184 | static int |
diff --git a/arch/ppc/platforms/4xx/bamboo.h b/arch/ppc/platforms/4xx/bamboo.h index 63d714504148..5c0192826494 100644 --- a/arch/ppc/platforms/4xx/bamboo.h +++ b/arch/ppc/platforms/4xx/bamboo.h | |||
@@ -88,7 +88,7 @@ | |||
88 | #define STD_UART_OP(num) \ | 88 | #define STD_UART_OP(num) \ |
89 | { 0, BASE_BAUD, 0, UART##num##_INT, \ | 89 | { 0, BASE_BAUD, 0, UART##num##_INT, \ |
90 | (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ | 90 | (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ |
91 | iomem_base: UART##num##_IO_BASE, \ | 91 | iomem_base: (void*)UART##num##_IO_BASE, \ |
92 | io_type: SERIAL_IO_MEM}, | 92 | io_type: SERIAL_IO_MEM}, |
93 | 93 | ||
94 | #define SERIAL_PORT_DFNS \ | 94 | #define SERIAL_PORT_DFNS \ |
diff --git a/arch/ppc/platforms/4xx/ebony.c b/arch/ppc/platforms/4xx/ebony.c index 509e69a095f0..0fd3442f5131 100644 --- a/arch/ppc/platforms/4xx/ebony.c +++ b/arch/ppc/platforms/4xx/ebony.c | |||
@@ -55,13 +55,6 @@ | |||
55 | #include <syslib/gen550.h> | 55 | #include <syslib/gen550.h> |
56 | #include <syslib/ibm440gp_common.h> | 56 | #include <syslib/ibm440gp_common.h> |
57 | 57 | ||
58 | /* | ||
59 | * This is a horrible kludge, we eventually need to abstract this | ||
60 | * generic PHY stuff, so the standard phy mode defines can be | ||
61 | * easily used from arch code. | ||
62 | */ | ||
63 | #include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h" | ||
64 | |||
65 | bd_t __res; | 58 | bd_t __res; |
66 | 59 | ||
67 | static struct ibm44x_clocks clocks __initdata; | 60 | static struct ibm44x_clocks clocks __initdata; |
diff --git a/arch/ppc/platforms/4xx/ibm405ep.c b/arch/ppc/platforms/4xx/ibm405ep.c index 6d44567f4dd2..093b28d27a41 100644 --- a/arch/ppc/platforms/4xx/ibm405ep.c +++ b/arch/ppc/platforms/4xx/ibm405ep.c | |||
@@ -33,6 +33,7 @@ static struct ocp_func_mal_data ibm405ep_mal0_def = { | |||
33 | .txde_irq = 13, /* TX Descriptor Error IRQ */ | 33 | .txde_irq = 13, /* TX Descriptor Error IRQ */ |
34 | .rxde_irq = 14, /* RX Descriptor Error IRQ */ | 34 | .rxde_irq = 14, /* RX Descriptor Error IRQ */ |
35 | .serr_irq = 10, /* MAL System Error IRQ */ | 35 | .serr_irq = 10, /* MAL System Error IRQ */ |
36 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
36 | }; | 37 | }; |
37 | OCP_SYSFS_MAL_DATA() | 38 | OCP_SYSFS_MAL_DATA() |
38 | 39 | ||
diff --git a/arch/ppc/platforms/4xx/ibm405gp.c b/arch/ppc/platforms/4xx/ibm405gp.c index dfd7ef3ba5f8..e5700469a682 100644 --- a/arch/ppc/platforms/4xx/ibm405gp.c +++ b/arch/ppc/platforms/4xx/ibm405gp.c | |||
@@ -46,6 +46,7 @@ static struct ocp_func_mal_data ibm405gp_mal0_def = { | |||
46 | .txde_irq = 13, /* TX Descriptor Error IRQ */ | 46 | .txde_irq = 13, /* TX Descriptor Error IRQ */ |
47 | .rxde_irq = 14, /* RX Descriptor Error IRQ */ | 47 | .rxde_irq = 14, /* RX Descriptor Error IRQ */ |
48 | .serr_irq = 10, /* MAL System Error IRQ */ | 48 | .serr_irq = 10, /* MAL System Error IRQ */ |
49 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
49 | }; | 50 | }; |
50 | OCP_SYSFS_MAL_DATA() | 51 | OCP_SYSFS_MAL_DATA() |
51 | 52 | ||
diff --git a/arch/ppc/platforms/4xx/ibm405gpr.c b/arch/ppc/platforms/4xx/ibm405gpr.c index 01c8ccbc7214..cd0d00d8e8ee 100644 --- a/arch/ppc/platforms/4xx/ibm405gpr.c +++ b/arch/ppc/platforms/4xx/ibm405gpr.c | |||
@@ -42,6 +42,7 @@ static struct ocp_func_mal_data ibm405gpr_mal0_def = { | |||
42 | .txde_irq = 13, /* TX Descriptor Error IRQ */ | 42 | .txde_irq = 13, /* TX Descriptor Error IRQ */ |
43 | .rxde_irq = 14, /* RX Descriptor Error IRQ */ | 43 | .rxde_irq = 14, /* RX Descriptor Error IRQ */ |
44 | .serr_irq = 10, /* MAL System Error IRQ */ | 44 | .serr_irq = 10, /* MAL System Error IRQ */ |
45 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
45 | }; | 46 | }; |
46 | OCP_SYSFS_MAL_DATA() | 47 | OCP_SYSFS_MAL_DATA() |
47 | 48 | ||
diff --git a/arch/ppc/platforms/4xx/ibm440ep.c b/arch/ppc/platforms/4xx/ibm440ep.c index 284da01f1ffd..4712de8ff80f 100644 --- a/arch/ppc/platforms/4xx/ibm440ep.c +++ b/arch/ppc/platforms/4xx/ibm440ep.c | |||
@@ -53,6 +53,7 @@ static struct ocp_func_mal_data ibm440ep_mal0_def = { | |||
53 | .txde_irq = 33, /* TX Descriptor Error IRQ */ | 53 | .txde_irq = 33, /* TX Descriptor Error IRQ */ |
54 | .rxde_irq = 34, /* RX Descriptor Error IRQ */ | 54 | .rxde_irq = 34, /* RX Descriptor Error IRQ */ |
55 | .serr_irq = 32, /* MAL System Error IRQ */ | 55 | .serr_irq = 32, /* MAL System Error IRQ */ |
56 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
56 | }; | 57 | }; |
57 | OCP_SYSFS_MAL_DATA() | 58 | OCP_SYSFS_MAL_DATA() |
58 | 59 | ||
diff --git a/arch/ppc/platforms/4xx/ibm440gp.c b/arch/ppc/platforms/4xx/ibm440gp.c index 27615ef8309c..d926245e8b3e 100644 --- a/arch/ppc/platforms/4xx/ibm440gp.c +++ b/arch/ppc/platforms/4xx/ibm440gp.c | |||
@@ -56,6 +56,7 @@ static struct ocp_func_mal_data ibm440gp_mal0_def = { | |||
56 | .txde_irq = 33, /* TX Descriptor Error IRQ */ | 56 | .txde_irq = 33, /* TX Descriptor Error IRQ */ |
57 | .rxde_irq = 34, /* RX Descriptor Error IRQ */ | 57 | .rxde_irq = 34, /* RX Descriptor Error IRQ */ |
58 | .serr_irq = 32, /* MAL System Error IRQ */ | 58 | .serr_irq = 32, /* MAL System Error IRQ */ |
59 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
59 | }; | 60 | }; |
60 | OCP_SYSFS_MAL_DATA() | 61 | OCP_SYSFS_MAL_DATA() |
61 | 62 | ||
diff --git a/arch/ppc/platforms/4xx/ibm440gx.c b/arch/ppc/platforms/4xx/ibm440gx.c index 1f38f42835b4..956f45e4ef97 100644 --- a/arch/ppc/platforms/4xx/ibm440gx.c +++ b/arch/ppc/platforms/4xx/ibm440gx.c | |||
@@ -84,6 +84,7 @@ static struct ocp_func_mal_data ibm440gx_mal0_def = { | |||
84 | .txde_irq = 33, /* TX Descriptor Error IRQ */ | 84 | .txde_irq = 33, /* TX Descriptor Error IRQ */ |
85 | .rxde_irq = 34, /* RX Descriptor Error IRQ */ | 85 | .rxde_irq = 34, /* RX Descriptor Error IRQ */ |
86 | .serr_irq = 32, /* MAL System Error IRQ */ | 86 | .serr_irq = 32, /* MAL System Error IRQ */ |
87 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
87 | }; | 88 | }; |
88 | OCP_SYSFS_MAL_DATA() | 89 | OCP_SYSFS_MAL_DATA() |
89 | 90 | ||
diff --git a/arch/ppc/platforms/4xx/ibm440sp.c b/arch/ppc/platforms/4xx/ibm440sp.c index fa3e003a0db9..feb17e41ef69 100644 --- a/arch/ppc/platforms/4xx/ibm440sp.c +++ b/arch/ppc/platforms/4xx/ibm440sp.c | |||
@@ -43,6 +43,7 @@ static struct ocp_func_mal_data ibm440sp_mal0_def = { | |||
43 | .txde_irq = 34, /* TX Descriptor Error IRQ */ | 43 | .txde_irq = 34, /* TX Descriptor Error IRQ */ |
44 | .rxde_irq = 35, /* RX Descriptor Error IRQ */ | 44 | .rxde_irq = 35, /* RX Descriptor Error IRQ */ |
45 | .serr_irq = 33, /* MAL System Error IRQ */ | 45 | .serr_irq = 33, /* MAL System Error IRQ */ |
46 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
46 | }; | 47 | }; |
47 | OCP_SYSFS_MAL_DATA() | 48 | OCP_SYSFS_MAL_DATA() |
48 | 49 | ||
diff --git a/arch/ppc/platforms/4xx/ibmnp405h.c b/arch/ppc/platforms/4xx/ibmnp405h.c index ecdc5be6ae28..a477a78f4902 100644 --- a/arch/ppc/platforms/4xx/ibmnp405h.c +++ b/arch/ppc/platforms/4xx/ibmnp405h.c | |||
@@ -34,7 +34,7 @@ static struct ocp_func_emac_data ibmnp405h_emac1_def = { | |||
34 | .zmii_mux = 1, /* ZMII input of this EMAC */ | 34 | .zmii_mux = 1, /* ZMII input of this EMAC */ |
35 | .mal_idx = 0, /* MAL device index */ | 35 | .mal_idx = 0, /* MAL device index */ |
36 | .mal_rx_chan = 1, /* MAL rx channel number */ | 36 | .mal_rx_chan = 1, /* MAL rx channel number */ |
37 | .mal_tx_chan = 1, /* MAL tx channel number */ | 37 | .mal_tx_chan = 2, /* MAL tx channel number */ |
38 | .wol_irq = 41, /* WOL interrupt number */ | 38 | .wol_irq = 41, /* WOL interrupt number */ |
39 | .mdio_idx = -1, /* No shared MDIO */ | 39 | .mdio_idx = -1, /* No shared MDIO */ |
40 | .tah_idx = -1, /* No TAH */ | 40 | .tah_idx = -1, /* No TAH */ |
@@ -46,7 +46,7 @@ static struct ocp_func_emac_data ibmnp405h_emac2_def = { | |||
46 | .zmii_mux = 2, /* ZMII input of this EMAC */ | 46 | .zmii_mux = 2, /* ZMII input of this EMAC */ |
47 | .mal_idx = 0, /* MAL device index */ | 47 | .mal_idx = 0, /* MAL device index */ |
48 | .mal_rx_chan = 2, /* MAL rx channel number */ | 48 | .mal_rx_chan = 2, /* MAL rx channel number */ |
49 | .mal_tx_chan = 2, /* MAL tx channel number */ | 49 | .mal_tx_chan = 4, /* MAL tx channel number */ |
50 | .wol_irq = 41, /* WOL interrupt number */ | 50 | .wol_irq = 41, /* WOL interrupt number */ |
51 | .mdio_idx = -1, /* No shared MDIO */ | 51 | .mdio_idx = -1, /* No shared MDIO */ |
52 | .tah_idx = -1, /* No TAH */ | 52 | .tah_idx = -1, /* No TAH */ |
@@ -58,7 +58,7 @@ static struct ocp_func_emac_data ibmnp405h_emac3_def = { | |||
58 | .zmii_mux = 3, /* ZMII input of this EMAC */ | 58 | .zmii_mux = 3, /* ZMII input of this EMAC */ |
59 | .mal_idx = 0, /* MAL device index */ | 59 | .mal_idx = 0, /* MAL device index */ |
60 | .mal_rx_chan = 3, /* MAL rx channel number */ | 60 | .mal_rx_chan = 3, /* MAL rx channel number */ |
61 | .mal_tx_chan = 3, /* MAL tx channel number */ | 61 | .mal_tx_chan = 6, /* MAL tx channel number */ |
62 | .wol_irq = 41, /* WOL interrupt number */ | 62 | .wol_irq = 41, /* WOL interrupt number */ |
63 | .mdio_idx = -1, /* No shared MDIO */ | 63 | .mdio_idx = -1, /* No shared MDIO */ |
64 | .tah_idx = -1, /* No TAH */ | 64 | .tah_idx = -1, /* No TAH */ |
@@ -73,6 +73,7 @@ static struct ocp_func_mal_data ibmnp405h_mal0_def = { | |||
73 | .txde_irq = 46, /* TX Descriptor Error IRQ */ | 73 | .txde_irq = 46, /* TX Descriptor Error IRQ */ |
74 | .rxde_irq = 47, /* RX Descriptor Error IRQ */ | 74 | .rxde_irq = 47, /* RX Descriptor Error IRQ */ |
75 | .serr_irq = 45, /* MAL System Error IRQ */ | 75 | .serr_irq = 45, /* MAL System Error IRQ */ |
76 | .dcr_base = DCRN_MAL_BASE /* MAL0_CFG DCR number */ | ||
76 | }; | 77 | }; |
77 | OCP_SYSFS_MAL_DATA() | 78 | OCP_SYSFS_MAL_DATA() |
78 | 79 | ||
diff --git a/arch/ppc/platforms/4xx/ibmstb4.c b/arch/ppc/platforms/4xx/ibmstb4.c index 874d16bab73c..d90627b68faa 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.c +++ b/arch/ppc/platforms/4xx/ibmstb4.c | |||
@@ -11,6 +11,7 @@ | |||
11 | 11 | ||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <asm/ocp.h> | 13 | #include <asm/ocp.h> |
14 | #include <asm/ppc4xx_pic.h> | ||
14 | #include <platforms/4xx/ibmstb4.h> | 15 | #include <platforms/4xx/ibmstb4.h> |
15 | 16 | ||
16 | static struct ocp_func_iic_data ibmstb4_iic0_def = { | 17 | static struct ocp_func_iic_data ibmstb4_iic0_def = { |
@@ -72,12 +73,51 @@ struct ocp_def core_ocp[] __initdata = { | |||
72 | .irq = IDE0_IRQ, | 73 | .irq = IDE0_IRQ, |
73 | .pm = OCP_CPM_NA, | 74 | .pm = OCP_CPM_NA, |
74 | }, | 75 | }, |
75 | { .vendor = OCP_VENDOR_IBM, | ||
76 | .function = OCP_FUNC_USB, | ||
77 | .paddr = USB0_BASE, | ||
78 | .irq = USB0_IRQ, | ||
79 | .pm = OCP_CPM_NA, | ||
80 | }, | ||
81 | { .vendor = OCP_VENDOR_INVALID, | 76 | { .vendor = OCP_VENDOR_INVALID, |
82 | } | 77 | } |
83 | }; | 78 | }; |
79 | |||
80 | /* Polarity and triggering settings for internal interrupt sources */ | ||
81 | struct ppc4xx_uic_settings ppc4xx_core_uic_cfg[] __initdata = { | ||
82 | { .polarity = 0x7fffff01, | ||
83 | .triggering = 0x00000000, | ||
84 | .ext_irq_mask = 0x0000007e, /* IRQ0 - IRQ5 */ | ||
85 | } | ||
86 | }; | ||
87 | |||
88 | static struct resource ohci_usb_resources[] = { | ||
89 | [0] = { | ||
90 | .start = USB0_BASE, | ||
91 | .end = USB0_BASE + USB0_SIZE - 1, | ||
92 | .flags = IORESOURCE_MEM, | ||
93 | }, | ||
94 | [1] = { | ||
95 | .start = USB0_IRQ, | ||
96 | .end = USB0_IRQ, | ||
97 | .flags = IORESOURCE_IRQ, | ||
98 | }, | ||
99 | }; | ||
100 | |||
101 | static u64 dma_mask = 0xffffffffULL; | ||
102 | |||
103 | static struct platform_device ohci_usb_device = { | ||
104 | .name = "ppc-soc-ohci", | ||
105 | .id = 0, | ||
106 | .num_resources = ARRAY_SIZE(ohci_usb_resources), | ||
107 | .resource = ohci_usb_resources, | ||
108 | .dev = { | ||
109 | .dma_mask = &dma_mask, | ||
110 | .coherent_dma_mask = 0xffffffffULL, | ||
111 | } | ||
112 | }; | ||
113 | |||
114 | static struct platform_device *ibmstb4_devs[] __initdata = { | ||
115 | &ohci_usb_device, | ||
116 | }; | ||
117 | |||
118 | static int __init | ||
119 | ibmstb4_platform_add_devices(void) | ||
120 | { | ||
121 | return platform_add_devices(ibmstb4_devs, ARRAY_SIZE(ibmstb4_devs)); | ||
122 | } | ||
123 | arch_initcall(ibmstb4_platform_add_devices); | ||
diff --git a/arch/ppc/platforms/4xx/ibmstb4.h b/arch/ppc/platforms/4xx/ibmstb4.h index bcb4b1ee71f2..9f21d4c88a3d 100644 --- a/arch/ppc/platforms/4xx/ibmstb4.h +++ b/arch/ppc/platforms/4xx/ibmstb4.h | |||
@@ -73,9 +73,9 @@ | |||
73 | #define OPB0_BASE 0x40000000 | 73 | #define OPB0_BASE 0x40000000 |
74 | #define GPIO0_BASE 0x40060000 | 74 | #define GPIO0_BASE 0x40060000 |
75 | 75 | ||
76 | #define USB0_BASE 0x40010000 | ||
77 | #define USB0_SIZE 0xA0 | ||
76 | #define USB0_IRQ 18 | 78 | #define USB0_IRQ 18 |
77 | #define USB0_BASE STB04xxx_MAP_IO_ADDR(0x40010000) | ||
78 | #define USB0_EXTENT 4096 | ||
79 | 79 | ||
80 | #define IIC_NUMS 2 | 80 | #define IIC_NUMS 2 |
81 | #define UART_NUMS 3 | 81 | #define UART_NUMS 3 |
diff --git a/arch/ppc/platforms/4xx/luan.c b/arch/ppc/platforms/4xx/luan.c index 95359f748e7b..a38e6f9ef858 100644 --- a/arch/ppc/platforms/4xx/luan.c +++ b/arch/ppc/platforms/4xx/luan.c | |||
@@ -53,13 +53,6 @@ | |||
53 | #include <syslib/ibm440gx_common.h> | 53 | #include <syslib/ibm440gx_common.h> |
54 | #include <syslib/ibm440sp_common.h> | 54 | #include <syslib/ibm440sp_common.h> |
55 | 55 | ||
56 | /* | ||
57 | * This is a horrible kludge, we eventually need to abstract this | ||
58 | * generic PHY stuff, so the standard phy mode defines can be | ||
59 | * easily used from arch code. | ||
60 | */ | ||
61 | #include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h" | ||
62 | |||
63 | bd_t __res; | 56 | bd_t __res; |
64 | 57 | ||
65 | static struct ibm44x_clocks clocks __initdata; | 58 | static struct ibm44x_clocks clocks __initdata; |
diff --git a/arch/ppc/platforms/4xx/luan.h b/arch/ppc/platforms/4xx/luan.h index 09b444c87816..bbe7d0766db8 100644 --- a/arch/ppc/platforms/4xx/luan.h +++ b/arch/ppc/platforms/4xx/luan.h | |||
@@ -55,7 +55,7 @@ | |||
55 | #define STD_UART_OP(num) \ | 55 | #define STD_UART_OP(num) \ |
56 | { 0, BASE_BAUD, 0, UART##num##_INT, \ | 56 | { 0, BASE_BAUD, 0, UART##num##_INT, \ |
57 | (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ | 57 | (ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST), \ |
58 | iomem_base: UART##num##_IO_BASE, \ | 58 | iomem_base: (void*)UART##num##_IO_BASE, \ |
59 | io_type: SERIAL_IO_MEM}, | 59 | io_type: SERIAL_IO_MEM}, |
60 | 60 | ||
61 | #define SERIAL_PORT_DFNS \ | 61 | #define SERIAL_PORT_DFNS \ |
diff --git a/arch/ppc/platforms/4xx/oak.c b/arch/ppc/platforms/4xx/oak.c deleted file mode 100644 index fa25ee1fa733..000000000000 --- a/arch/ppc/platforms/4xx/oak.c +++ /dev/null | |||
@@ -1,255 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu> | ||
4 | * | ||
5 | * Module name: oak.c | ||
6 | * | ||
7 | * Description: | ||
8 | * Architecture- / platform-specific boot-time initialization code for | ||
9 | * the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original | ||
10 | * code by Gary Thomas, Cort Dougan <cort@fsmlabs.com>, and Dan Malek | ||
11 | * <dan@net4x.com>. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #include <linux/config.h> | ||
16 | #include <linux/init.h> | ||
17 | #include <linux/smp.h> | ||
18 | #include <linux/threads.h> | ||
19 | #include <linux/param.h> | ||
20 | #include <linux/string.h> | ||
21 | #include <linux/initrd.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/seq_file.h> | ||
24 | |||
25 | #include <asm/board.h> | ||
26 | #include <asm/machdep.h> | ||
27 | #include <asm/page.h> | ||
28 | #include <asm/bootinfo.h> | ||
29 | #include <asm/ppc4xx_pic.h> | ||
30 | #include <asm/time.h> | ||
31 | |||
32 | #include "oak.h" | ||
33 | |||
34 | /* Function Prototypes */ | ||
35 | |||
36 | extern void abort(void); | ||
37 | |||
38 | /* Global Variables */ | ||
39 | |||
40 | unsigned char __res[sizeof(bd_t)]; | ||
41 | |||
42 | |||
43 | /* | ||
44 | * void __init oak_init() | ||
45 | * | ||
46 | * Description: | ||
47 | * This routine... | ||
48 | * | ||
49 | * Input(s): | ||
50 | * r3 - Optional pointer to a board information structure. | ||
51 | * r4 - Optional pointer to the physical starting address of the init RAM | ||
52 | * disk. | ||
53 | * r5 - Optional pointer to the physical ending address of the init RAM | ||
54 | * disk. | ||
55 | * r6 - Optional pointer to the physical starting address of any kernel | ||
56 | * command-line parameters. | ||
57 | * r7 - Optional pointer to the physical ending address of any kernel | ||
58 | * command-line parameters. | ||
59 | * | ||
60 | * Output(s): | ||
61 | * N/A | ||
62 | * | ||
63 | * Returns: | ||
64 | * N/A | ||
65 | * | ||
66 | */ | ||
67 | void __init | ||
68 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
69 | unsigned long r6, unsigned long r7) | ||
70 | { | ||
71 | parse_bootinfo(find_bootinfo()); | ||
72 | |||
73 | /* | ||
74 | * If we were passed in a board information, copy it into the | ||
75 | * residual data area. | ||
76 | */ | ||
77 | if (r3) { | ||
78 | memcpy((void *)__res, (void *)(r3 + KERNELBASE), sizeof(bd_t)); | ||
79 | } | ||
80 | |||
81 | #if defined(CONFIG_BLK_DEV_INITRD) | ||
82 | /* | ||
83 | * If the init RAM disk has been configured in, and there's a valid | ||
84 | * starting address for it, set it up. | ||
85 | */ | ||
86 | if (r4) { | ||
87 | initrd_start = r4 + KERNELBASE; | ||
88 | initrd_end = r5 + KERNELBASE; | ||
89 | } | ||
90 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
91 | |||
92 | /* Copy the kernel command line arguments to a safe place. */ | ||
93 | |||
94 | if (r6) { | ||
95 | *(char *)(r7 + KERNELBASE) = 0; | ||
96 | strcpy(cmd_line, (char *)(r6 + KERNELBASE)); | ||
97 | } | ||
98 | |||
99 | /* Initialize machine-dependency vectors */ | ||
100 | |||
101 | ppc_md.setup_arch = oak_setup_arch; | ||
102 | ppc_md.show_percpuinfo = oak_show_percpuinfo; | ||
103 | ppc_md.irq_canonicalize = NULL; | ||
104 | ppc_md.init_IRQ = ppc4xx_pic_init; | ||
105 | ppc_md.get_irq = NULL; /* Set in ppc4xx_pic_init() */ | ||
106 | ppc_md.init = NULL; | ||
107 | |||
108 | ppc_md.restart = oak_restart; | ||
109 | ppc_md.power_off = oak_power_off; | ||
110 | ppc_md.halt = oak_halt; | ||
111 | |||
112 | ppc_md.time_init = oak_time_init; | ||
113 | ppc_md.set_rtc_time = oak_set_rtc_time; | ||
114 | ppc_md.get_rtc_time = oak_get_rtc_time; | ||
115 | ppc_md.calibrate_decr = oak_calibrate_decr; | ||
116 | } | ||
117 | |||
118 | /* | ||
119 | * Document me. | ||
120 | */ | ||
121 | void __init | ||
122 | oak_setup_arch(void) | ||
123 | { | ||
124 | /* XXX - Implement me */ | ||
125 | } | ||
126 | |||
127 | /* | ||
128 | * int oak_show_percpuinfo() | ||
129 | * | ||
130 | * Description: | ||
131 | * This routine pretty-prints the platform's internal CPU and bus clock | ||
132 | * frequencies into the buffer for usage in /proc/cpuinfo. | ||
133 | * | ||
134 | * Input(s): | ||
135 | * *buffer - Buffer into which CPU and bus clock frequencies are to be | ||
136 | * printed. | ||
137 | * | ||
138 | * Output(s): | ||
139 | * *buffer - Buffer with the CPU and bus clock frequencies. | ||
140 | * | ||
141 | * Returns: | ||
142 | * The number of bytes copied into 'buffer' if OK, otherwise zero or less | ||
143 | * on error. | ||
144 | */ | ||
145 | int | ||
146 | oak_show_percpuinfo(struct seq_file *m, int i) | ||
147 | { | ||
148 | bd_t *bp = (bd_t *)__res; | ||
149 | |||
150 | seq_printf(m, "clock\t\t: %dMHz\n" | ||
151 | "bus clock\t\t: %dMHz\n", | ||
152 | bp->bi_intfreq / 1000000, | ||
153 | bp->bi_busfreq / 1000000); | ||
154 | |||
155 | return 0; | ||
156 | } | ||
157 | |||
158 | /* | ||
159 | * Document me. | ||
160 | */ | ||
161 | void | ||
162 | oak_restart(char *cmd) | ||
163 | { | ||
164 | abort(); | ||
165 | } | ||
166 | |||
167 | /* | ||
168 | * Document me. | ||
169 | */ | ||
170 | void | ||
171 | oak_power_off(void) | ||
172 | { | ||
173 | oak_restart(NULL); | ||
174 | } | ||
175 | |||
176 | /* | ||
177 | * Document me. | ||
178 | */ | ||
179 | void | ||
180 | oak_halt(void) | ||
181 | { | ||
182 | oak_restart(NULL); | ||
183 | } | ||
184 | |||
185 | /* | ||
186 | * Document me. | ||
187 | */ | ||
188 | long __init | ||
189 | oak_time_init(void) | ||
190 | { | ||
191 | /* XXX - Implement me */ | ||
192 | return 0; | ||
193 | } | ||
194 | |||
195 | /* | ||
196 | * Document me. | ||
197 | */ | ||
198 | int __init | ||
199 | oak_set_rtc_time(unsigned long time) | ||
200 | { | ||
201 | /* XXX - Implement me */ | ||
202 | |||
203 | return (0); | ||
204 | } | ||
205 | |||
206 | /* | ||
207 | * Document me. | ||
208 | */ | ||
209 | unsigned long __init | ||
210 | oak_get_rtc_time(void) | ||
211 | { | ||
212 | /* XXX - Implement me */ | ||
213 | |||
214 | return (0); | ||
215 | } | ||
216 | |||
217 | /* | ||
218 | * void __init oak_calibrate_decr() | ||
219 | * | ||
220 | * Description: | ||
221 | * This routine retrieves the internal processor frequency from the board | ||
222 | * information structure, sets up the kernel timer decrementer based on | ||
223 | * that value, enables the 403 programmable interval timer (PIT) and sets | ||
224 | * it up for auto-reload. | ||
225 | * | ||
226 | * Input(s): | ||
227 | * N/A | ||
228 | * | ||
229 | * Output(s): | ||
230 | * N/A | ||
231 | * | ||
232 | * Returns: | ||
233 | * N/A | ||
234 | * | ||
235 | */ | ||
236 | void __init | ||
237 | oak_calibrate_decr(void) | ||
238 | { | ||
239 | unsigned int freq; | ||
240 | bd_t *bip = (bd_t *)__res; | ||
241 | |||
242 | freq = bip->bi_intfreq; | ||
243 | |||
244 | decrementer_count = freq / HZ; | ||
245 | count_period_num = 1; | ||
246 | count_period_den = freq; | ||
247 | |||
248 | /* Enable the PIT and set auto-reload of its value */ | ||
249 | |||
250 | mtspr(SPRN_TCR, TCR_PIE | TCR_ARE); | ||
251 | |||
252 | /* Clear any pending timer interrupts */ | ||
253 | |||
254 | mtspr(SPRN_TSR, TSR_ENW | TSR_WIS | TSR_PIS | TSR_FIS); | ||
255 | } | ||
diff --git a/arch/ppc/platforms/4xx/oak.h b/arch/ppc/platforms/4xx/oak.h deleted file mode 100644 index 1b86a4c66b04..000000000000 --- a/arch/ppc/platforms/4xx/oak.h +++ /dev/null | |||
@@ -1,96 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (c) 1999 Grant Erickson <grant@lcse.umn.edu> | ||
4 | * | ||
5 | * Module name: oak.h | ||
6 | * | ||
7 | * Description: | ||
8 | * Macros, definitions, and data structures specific to the IBM PowerPC | ||
9 | * 403G{A,B,C,CX} "Oak" evaluation board. Anything specific to the pro- | ||
10 | * cessor itself is defined elsewhere. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | #ifndef __ASM_OAK_H__ | ||
16 | #define __ASM_OAK_H__ | ||
17 | |||
18 | /* We have an IBM 403G{A,B,C,CX} core */ | ||
19 | #include <asm/ibm403.h> | ||
20 | |||
21 | #define _IO_BASE 0 | ||
22 | #define _ISA_MEM_BASE 0 | ||
23 | #define PCI_DRAM_OFFSET 0 | ||
24 | |||
25 | /* Memory map for the "Oak" evaluation board */ | ||
26 | |||
27 | #define PPC403SPU_IO_BASE 0x40000000 /* 403 On-chip serial port */ | ||
28 | #define PPC403SPU_IO_SIZE 0x00000008 | ||
29 | #define OAKSERIAL_IO_BASE 0x7E000000 /* NS16550DV serial port */ | ||
30 | #define OAKSERIAL_IO_SIZE 0x00000008 | ||
31 | #define OAKNET_IO_BASE 0xF4000000 /* NS83902AV Ethernet */ | ||
32 | #define OAKNET_IO_SIZE 0x00000040 | ||
33 | #define OAKPROM_IO_BASE 0xFFFE0000 /* AMD 29F010 Flash ROM */ | ||
34 | #define OAKPROM_IO_SIZE 0x00020000 | ||
35 | |||
36 | |||
37 | /* Interrupt assignments fixed by the hardware implementation */ | ||
38 | |||
39 | /* This is annoying kbuild-2.4 problem. -- Tom */ | ||
40 | |||
41 | #define PPC403SPU_RX_INT 4 /* AIC_INT4 */ | ||
42 | #define PPC403SPU_TX_INT 5 /* AIC_INT5 */ | ||
43 | #define OAKNET_INT 27 /* AIC_INT27 */ | ||
44 | #define OAKSERIAL_INT 28 /* AIC_INT28 */ | ||
45 | |||
46 | #ifndef __ASSEMBLY__ | ||
47 | /* | ||
48 | * Data structure defining board information maintained by the boot | ||
49 | * ROM on IBM's "Oak" evaluation board. An effort has been made to | ||
50 | * keep the field names consistent with the 8xx 'bd_t' board info | ||
51 | * structures. | ||
52 | */ | ||
53 | |||
54 | typedef struct board_info { | ||
55 | unsigned char bi_s_version[4]; /* Version of this structure */ | ||
56 | unsigned char bi_r_version[30]; /* Version of the IBM ROM */ | ||
57 | unsigned int bi_memsize; /* DRAM installed, in bytes */ | ||
58 | unsigned char bi_enetaddr[6]; /* Ethernet MAC address */ | ||
59 | unsigned int bi_intfreq; /* Processor speed, in Hz */ | ||
60 | unsigned int bi_busfreq; /* Bus speed, in Hz */ | ||
61 | } bd_t; | ||
62 | |||
63 | #ifdef __cplusplus | ||
64 | extern "C" { | ||
65 | #endif | ||
66 | |||
67 | extern void oak_init(unsigned long r3, | ||
68 | unsigned long ird_start, | ||
69 | unsigned long ird_end, | ||
70 | unsigned long cline_start, | ||
71 | unsigned long cline_end); | ||
72 | extern void oak_setup_arch(void); | ||
73 | extern int oak_setup_residual(char *buffer); | ||
74 | extern void oak_init_IRQ(void); | ||
75 | extern int oak_get_irq(struct pt_regs *regs); | ||
76 | extern void oak_restart(char *cmd); | ||
77 | extern void oak_power_off(void); | ||
78 | extern void oak_halt(void); | ||
79 | extern void oak_time_init(void); | ||
80 | extern int oak_set_rtc_time(unsigned long now); | ||
81 | extern unsigned long oak_get_rtc_time(void); | ||
82 | extern void oak_calibrate_decr(void); | ||
83 | |||
84 | #ifdef __cplusplus | ||
85 | } | ||
86 | #endif | ||
87 | |||
88 | /* Some 4xx parts use a different timebase frequency from the internal clock. | ||
89 | */ | ||
90 | #define bi_tbfreq bi_intfreq | ||
91 | |||
92 | #define PPC4xx_MACHINE_NAME "IBM Oak" | ||
93 | |||
94 | #endif /* !__ASSEMBLY__ */ | ||
95 | #endif /* __ASM_OAK_H__ */ | ||
96 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/4xx/oak_setup.h b/arch/ppc/platforms/4xx/oak_setup.h deleted file mode 100644 index 8648bd084df8..000000000000 --- a/arch/ppc/platforms/4xx/oak_setup.h +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * | ||
3 | * Copyright (c) 1999-2000 Grant Erickson <grant@lcse.umn.edu> | ||
4 | * | ||
5 | * Module name: oak_setup.h | ||
6 | * | ||
7 | * Description: | ||
8 | * Architecture- / platform-specific boot-time initialization code for | ||
9 | * the IBM PowerPC 403GCX "Oak" evaluation board. Adapted from original | ||
10 | * code by Gary Thomas, Cort Dougan <cort@cs.nmt.edu>, and Dan Malek | ||
11 | * <dan@netx4.com>. | ||
12 | * | ||
13 | */ | ||
14 | |||
15 | #ifndef __OAK_SETUP_H__ | ||
16 | #define __OAK_SETUP_H__ | ||
17 | |||
18 | #include <asm/ptrace.h> | ||
19 | #include <asm/board.h> | ||
20 | |||
21 | |||
22 | #ifdef __cplusplus | ||
23 | extern "C" { | ||
24 | #endif | ||
25 | |||
26 | extern unsigned char __res[sizeof(bd_t)]; | ||
27 | |||
28 | extern void oak_init(unsigned long r3, | ||
29 | unsigned long ird_start, | ||
30 | unsigned long ird_end, | ||
31 | unsigned long cline_start, | ||
32 | unsigned long cline_end); | ||
33 | extern void oak_setup_arch(void); | ||
34 | extern int oak_setup_residual(char *buffer); | ||
35 | extern void oak_init_IRQ(void); | ||
36 | extern int oak_get_irq(struct pt_regs *regs); | ||
37 | extern void oak_restart(char *cmd); | ||
38 | extern void oak_power_off(void); | ||
39 | extern void oak_halt(void); | ||
40 | extern void oak_time_init(void); | ||
41 | extern int oak_set_rtc_time(unsigned long now); | ||
42 | extern unsigned long oak_get_rtc_time(void); | ||
43 | extern void oak_calibrate_decr(void); | ||
44 | |||
45 | |||
46 | #ifdef __cplusplus | ||
47 | } | ||
48 | #endif | ||
49 | |||
50 | #endif /* __OAK_SETUP_H__ */ | ||
diff --git a/arch/ppc/platforms/4xx/ocotea.c b/arch/ppc/platforms/4xx/ocotea.c index 8fc34a344769..80028df1b445 100644 --- a/arch/ppc/platforms/4xx/ocotea.c +++ b/arch/ppc/platforms/4xx/ocotea.c | |||
@@ -53,13 +53,6 @@ | |||
53 | #include <syslib/gen550.h> | 53 | #include <syslib/gen550.h> |
54 | #include <syslib/ibm440gx_common.h> | 54 | #include <syslib/ibm440gx_common.h> |
55 | 55 | ||
56 | /* | ||
57 | * This is a horrible kludge, we eventually need to abstract this | ||
58 | * generic PHY stuff, so the standard phy mode defines can be | ||
59 | * easily used from arch code. | ||
60 | */ | ||
61 | #include "../../../../drivers/net/ibm_emac/ibm_emac_phy.h" | ||
62 | |||
63 | bd_t __res; | 56 | bd_t __res; |
64 | 57 | ||
65 | static struct ibm44x_clocks clocks __initdata; | 58 | static struct ibm44x_clocks clocks __initdata; |
diff --git a/arch/ppc/platforms/4xx/redwood5.c b/arch/ppc/platforms/4xx/redwood5.c index 2f5e410afbc5..bee8b4ac8afd 100644 --- a/arch/ppc/platforms/4xx/redwood5.c +++ b/arch/ppc/platforms/4xx/redwood5.c | |||
@@ -18,6 +18,19 @@ | |||
18 | #include <linux/ioport.h> | 18 | #include <linux/ioport.h> |
19 | #include <asm/io.h> | 19 | #include <asm/io.h> |
20 | #include <asm/machdep.h> | 20 | #include <asm/machdep.h> |
21 | #include <asm/ppc4xx_pic.h> | ||
22 | |||
23 | /* | ||
24 | * Define external IRQ senses and polarities. | ||
25 | */ | ||
26 | unsigned char ppc4xx_uic_ext_irq_cfg[] __initdata = { | ||
27 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 0 */ | ||
28 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 1 */ | ||
29 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 2 */ | ||
30 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 3 */ | ||
31 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 4 */ | ||
32 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* Ext Int 5 */ | ||
33 | }; | ||
21 | 34 | ||
22 | static struct resource smc91x_resources[] = { | 35 | static struct resource smc91x_resources[] = { |
23 | [0] = { | 36 | [0] = { |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c index ddd04d4c1ea9..b38a851a64ec 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/arch/ppc/platforms/83xx/mpc834x_sys.c | |||
@@ -62,9 +62,29 @@ extern unsigned long total_memory; /* in mm/init */ | |||
62 | unsigned char __res[sizeof (bd_t)]; | 62 | unsigned char __res[sizeof (bd_t)]; |
63 | 63 | ||
64 | #ifdef CONFIG_PCI | 64 | #ifdef CONFIG_PCI |
65 | #error "PCI is not supported" | 65 | int |
66 | /* NEED mpc83xx_map_irq & mpc83xx_exclude_device | 66 | mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) |
67 | see platforms/85xx/mpc85xx_ads_common.c */ | 67 | { |
68 | static char pci_irq_table[][4] = | ||
69 | /* | ||
70 | * PCI IDSEL/INTPIN->INTLINE | ||
71 | * A B C D | ||
72 | */ | ||
73 | { | ||
74 | {PIRQA, PIRQB, PIRQC, PIRQD}, /* idsel 0x11 */ | ||
75 | {PIRQC, PIRQD, PIRQA, PIRQB}, /* idsel 0x12 */ | ||
76 | {PIRQD, PIRQA, PIRQB, PIRQC} /* idsel 0x13 */ | ||
77 | }; | ||
78 | |||
79 | const long min_idsel = 0x11, max_idsel = 0x13, irqs_per_slot = 4; | ||
80 | return PCI_IRQ_TABLE_LOOKUP; | ||
81 | } | ||
82 | |||
83 | int | ||
84 | mpc83xx_exclude_device(u_char bus, u_char devfn) | ||
85 | { | ||
86 | return PCIBIOS_SUCCESSFUL; | ||
87 | } | ||
68 | #endif /* CONFIG_PCI */ | 88 | #endif /* CONFIG_PCI */ |
69 | 89 | ||
70 | /* ************************************************************************ | 90 | /* ************************************************************************ |
@@ -88,7 +108,7 @@ mpc834x_sys_setup_arch(void) | |||
88 | 108 | ||
89 | #ifdef CONFIG_PCI | 109 | #ifdef CONFIG_PCI |
90 | /* setup PCI host bridges */ | 110 | /* setup PCI host bridges */ |
91 | mpc83xx_sys_setup_hose(); | 111 | mpc83xx_setup_hose(); |
92 | #endif | 112 | #endif |
93 | mpc83xx_early_serial_map(); | 113 | mpc83xx_early_serial_map(); |
94 | 114 | ||
@@ -175,10 +195,17 @@ mpc834x_sys_init_IRQ(void) | |||
175 | IRQ_SENSE_LEVEL, /* EXT 1 */ | 195 | IRQ_SENSE_LEVEL, /* EXT 1 */ |
176 | IRQ_SENSE_LEVEL, /* EXT 2 */ | 196 | IRQ_SENSE_LEVEL, /* EXT 2 */ |
177 | 0, /* EXT 3 */ | 197 | 0, /* EXT 3 */ |
198 | #ifdef CONFIG_PCI | ||
199 | IRQ_SENSE_LEVEL, /* EXT 4 */ | ||
200 | IRQ_SENSE_LEVEL, /* EXT 5 */ | ||
201 | IRQ_SENSE_LEVEL, /* EXT 6 */ | ||
202 | IRQ_SENSE_LEVEL, /* EXT 7 */ | ||
203 | #else | ||
178 | 0, /* EXT 4 */ | 204 | 0, /* EXT 4 */ |
179 | 0, /* EXT 5 */ | 205 | 0, /* EXT 5 */ |
180 | 0, /* EXT 6 */ | 206 | 0, /* EXT 6 */ |
181 | 0, /* EXT 7 */ | 207 | 0, /* EXT 7 */ |
208 | #endif | ||
182 | }; | 209 | }; |
183 | 210 | ||
184 | ipic_init(binfo->bi_immr_base + 0x00700, 0, MPC83xx_IPIC_IRQ_OFFSET, senses, 8); | 211 | ipic_init(binfo->bi_immr_base + 0x00700, 0, MPC83xx_IPIC_IRQ_OFFSET, senses, 8); |
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.h b/arch/ppc/platforms/83xx/mpc834x_sys.h index a2f6e49d7151..1584cd77a9ef 100644 --- a/arch/ppc/platforms/83xx/mpc834x_sys.h +++ b/arch/ppc/platforms/83xx/mpc834x_sys.h | |||
@@ -26,7 +26,7 @@ | |||
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_SIZE ((uint)(32 * 1024)) | 29 | #define BCSR_SIZE ((uint)(128 * 1024)) |
30 | 30 | ||
31 | #define BCSR_MISC_REG2_OFF 0x07 | 31 | #define BCSR_MISC_REG2_OFF 0x07 |
32 | #define BCSR_MISC_REG2_PORESET 0x01 | 32 | #define BCSR_MISC_REG2_PORESET 0x01 |
@@ -34,23 +34,25 @@ | |||
34 | #define BCSR_MISC_REG3_OFF 0x08 | 34 | #define BCSR_MISC_REG3_OFF 0x08 |
35 | #define BCSR_MISC_REG3_CNFLOCK 0x80 | 35 | #define BCSR_MISC_REG3_CNFLOCK 0x80 |
36 | 36 | ||
37 | #ifdef CONFIG_PCI | 37 | #define PIRQA MPC83xx_IRQ_EXT4 |
38 | /* PCI interrupt controller */ | 38 | #define PIRQB MPC83xx_IRQ_EXT5 |
39 | #define PIRQA MPC83xx_IRQ_IRQ4 | 39 | #define PIRQC MPC83xx_IRQ_EXT6 |
40 | #define PIRQB MPC83xx_IRQ_IRQ5 | 40 | #define PIRQD MPC83xx_IRQ_EXT7 |
41 | #define PIRQC MPC83xx_IRQ_IRQ6 | 41 | |
42 | #define PIRQD MPC83xx_IRQ_IRQ7 | 42 | #define MPC83xx_PCI1_LOWER_IO 0x00000000 |
43 | 43 | #define MPC83xx_PCI1_UPPER_IO 0x00ffffff | |
44 | #define MPC834x_SYS_PCI1_LOWER_IO 0x00000000 | 44 | #define MPC83xx_PCI1_LOWER_MEM 0x80000000 |
45 | #define MPC834x_SYS_PCI1_UPPER_IO 0x00ffffff | 45 | #define MPC83xx_PCI1_UPPER_MEM 0x9fffffff |
46 | 46 | #define MPC83xx_PCI1_IO_BASE 0xe2000000 | |
47 | #define MPC834x_SYS_PCI1_LOWER_MEM 0x80000000 | 47 | #define MPC83xx_PCI1_MEM_OFFSET 0x00000000 |
48 | #define MPC834x_SYS_PCI1_UPPER_MEM 0x9fffffff | 48 | #define MPC83xx_PCI1_IO_SIZE 0x01000000 |
49 | 49 | ||
50 | #define MPC834x_SYS_PCI1_IO_BASE 0xe2000000 | 50 | #define MPC83xx_PCI2_LOWER_IO 0x00000000 |
51 | #define MPC834x_SYS_PCI1_MEM_OFFSET 0x00000000 | 51 | #define MPC83xx_PCI2_UPPER_IO 0x00ffffff |
52 | 52 | #define MPC83xx_PCI2_LOWER_MEM 0xa0000000 | |
53 | #define MPC834x_SYS_PCI1_IO_SIZE 0x01000000 | 53 | #define MPC83xx_PCI2_UPPER_MEM 0xbfffffff |
54 | #endif /* CONFIG_PCI */ | 54 | #define MPC83xx_PCI2_IO_BASE 0xe3000000 |
55 | #define MPC83xx_PCI2_MEM_OFFSET 0x00000000 | ||
56 | #define MPC83xx_PCI2_IO_SIZE 0x01000000 | ||
55 | 57 | ||
56 | #endif /* __MACH_MPC83XX_SYS_H__ */ | 58 | #endif /* __MACH_MPC83XX_SYS_H__ */ |
diff --git a/arch/ppc/platforms/Makefile b/arch/ppc/platforms/Makefile index 5488a053f415..ff7452e5d8e5 100644 --- a/arch/ppc/platforms/Makefile +++ b/arch/ppc/platforms/Makefile | |||
@@ -21,22 +21,17 @@ obj-$(CONFIG_CPU_FREQ_PMAC) += pmac_cpufreq.o | |||
21 | endif | 21 | endif |
22 | obj-$(CONFIG_PMAC_BACKLIGHT) += pmac_backlight.o | 22 | obj-$(CONFIG_PMAC_BACKLIGHT) += pmac_backlight.o |
23 | obj-$(CONFIG_PREP_RESIDUAL) += residual.o | 23 | obj-$(CONFIG_PREP_RESIDUAL) += residual.o |
24 | obj-$(CONFIG_ADIR) += adir_setup.o adir_pic.o adir_pci.o | ||
25 | obj-$(CONFIG_PQ2ADS) += pq2ads.o | 24 | obj-$(CONFIG_PQ2ADS) += pq2ads.o |
26 | obj-$(CONFIG_TQM8260) += tqm8260_setup.o | 25 | obj-$(CONFIG_TQM8260) += tqm8260_setup.o |
27 | obj-$(CONFIG_CPCI690) += cpci690.o | 26 | obj-$(CONFIG_CPCI690) += cpci690.o |
28 | obj-$(CONFIG_EV64260) += ev64260.o | 27 | obj-$(CONFIG_EV64260) += ev64260.o |
29 | obj-$(CONFIG_CHESTNUT) += chestnut.o | 28 | obj-$(CONFIG_CHESTNUT) += chestnut.o |
30 | obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o | 29 | obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o |
31 | obj-$(CONFIG_K2) += k2.o | ||
32 | obj-$(CONFIG_LOPEC) += lopec.o | 30 | obj-$(CONFIG_LOPEC) += lopec.o |
33 | obj-$(CONFIG_KATANA) += katana.o | 31 | obj-$(CONFIG_KATANA) += katana.o |
34 | obj-$(CONFIG_HDPU) += hdpu.o | 32 | obj-$(CONFIG_HDPU) += hdpu.o |
35 | obj-$(CONFIG_MCPN765) += mcpn765.o | ||
36 | obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o | ||
37 | obj-$(CONFIG_MVME5100) += mvme5100.o | 33 | obj-$(CONFIG_MVME5100) += mvme5100.o |
38 | obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o | 34 | obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o |
39 | obj-$(CONFIG_PCORE) += pcore.o | ||
40 | obj-$(CONFIG_POWERPMC250) += powerpmc250.o | 35 | obj-$(CONFIG_POWERPMC250) += powerpmc250.o |
41 | obj-$(CONFIG_PPLUS) += pplus.o | 36 | obj-$(CONFIG_PPLUS) += pplus.o |
42 | obj-$(CONFIG_PRPMC750) += prpmc750.o | 37 | obj-$(CONFIG_PRPMC750) += prpmc750.o |
@@ -46,6 +41,7 @@ obj-$(CONFIG_SANDPOINT) += sandpoint.o | |||
46 | obj-$(CONFIG_SBC82xx) += sbc82xx.o | 41 | obj-$(CONFIG_SBC82xx) += sbc82xx.o |
47 | obj-$(CONFIG_SPRUCE) += spruce.o | 42 | obj-$(CONFIG_SPRUCE) += spruce.o |
48 | obj-$(CONFIG_LITE5200) += lite5200.o | 43 | obj-$(CONFIG_LITE5200) += lite5200.o |
44 | obj-$(CONFIG_EV64360) += ev64360.o | ||
49 | 45 | ||
50 | ifeq ($(CONFIG_SMP),y) | 46 | ifeq ($(CONFIG_SMP),y) |
51 | obj-$(CONFIG_PPC_PMAC) += pmac_smp.o | 47 | obj-$(CONFIG_PPC_PMAC) += pmac_smp.o |
diff --git a/arch/ppc/platforms/adir.h b/arch/ppc/platforms/adir.h deleted file mode 100644 index 13a748b46956..000000000000 --- a/arch/ppc/platforms/adir.h +++ /dev/null | |||
@@ -1,95 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/adir.h | ||
3 | * | ||
4 | * Definitions for SBS Adirondack board support | ||
5 | * | ||
6 | * By Michael Sokolov <msokolov@ivan.Harhan.ORG> | ||
7 | */ | ||
8 | |||
9 | #ifndef __PPC_PLATFORMS_ADIR_H | ||
10 | #define __PPC_PLATFORMS_ADIR_H | ||
11 | |||
12 | /* | ||
13 | * SBS Adirondack definitions | ||
14 | */ | ||
15 | |||
16 | /* PPC physical address space layout. We use the one set up by the firmware. */ | ||
17 | #define ADIR_PCI32_MEM_BASE 0x80000000 | ||
18 | #define ADIR_PCI32_MEM_SIZE 0x20000000 | ||
19 | #define ADIR_PCI64_MEM_BASE 0xA0000000 | ||
20 | #define ADIR_PCI64_MEM_SIZE 0x20000000 | ||
21 | #define ADIR_PCI32_IO_BASE 0xC0000000 | ||
22 | #define ADIR_PCI32_IO_SIZE 0x10000000 | ||
23 | #define ADIR_PCI64_IO_BASE 0xD0000000 | ||
24 | #define ADIR_PCI64_IO_SIZE 0x10000000 | ||
25 | #define ADIR_PCI64_PHB 0xFF400000 | ||
26 | #define ADIR_PCI32_PHB 0xFF500000 | ||
27 | |||
28 | #define ADIR_PCI64_CONFIG_ADDR (ADIR_PCI64_PHB + 0x000f8000) | ||
29 | #define ADIR_PCI64_CONFIG_DATA (ADIR_PCI64_PHB + 0x000f8010) | ||
30 | |||
31 | #define ADIR_PCI32_CONFIG_ADDR (ADIR_PCI32_PHB + 0x000f8000) | ||
32 | #define ADIR_PCI32_CONFIG_DATA (ADIR_PCI32_PHB + 0x000f8010) | ||
33 | |||
34 | /* System memory as seen from PCI */ | ||
35 | #define ADIR_PCI_SYS_MEM_BASE 0x80000000 | ||
36 | |||
37 | /* Static virtual mapping of PCI I/O */ | ||
38 | #define ADIR_PCI32_VIRT_IO_BASE 0xFE000000 | ||
39 | #define ADIR_PCI32_VIRT_IO_SIZE 0x01000000 | ||
40 | #define ADIR_PCI64_VIRT_IO_BASE 0xFF000000 | ||
41 | #define ADIR_PCI64_VIRT_IO_SIZE 0x01000000 | ||
42 | |||
43 | /* Registers */ | ||
44 | #define ADIR_NVRAM_RTC_ADDR 0x74 | ||
45 | #define ADIR_NVRAM_RTC_DATA 0x75 | ||
46 | |||
47 | #define ADIR_BOARD_ID_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF0) | ||
48 | #define ADIR_CPLD1REV_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF1) | ||
49 | #define ADIR_CPLD2REV_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF2) | ||
50 | #define ADIR_FLASHCTL_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF3) | ||
51 | #define ADIR_CPC710_STAT_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF4) | ||
52 | #define ADIR_CLOCK_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF5) | ||
53 | #define ADIR_GPIO_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF8) | ||
54 | #define ADIR_MISC_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFF9) | ||
55 | #define ADIR_LED_REG (ADIR_PCI32_VIRT_IO_BASE + 0x08FFFA) | ||
56 | |||
57 | #define ADIR_CLOCK_REG_PD 0x10 | ||
58 | #define ADIR_CLOCK_REG_SPREAD 0x08 | ||
59 | #define ADIR_CLOCK_REG_SEL133 0x04 | ||
60 | #define ADIR_CLOCK_REG_SEL1 0x02 | ||
61 | #define ADIR_CLOCK_REG_SEL0 0x01 | ||
62 | |||
63 | #define ADIR_PROCA_INT_MASK (ADIR_PCI32_VIRT_IO_BASE + 0x0EFFF0) | ||
64 | #define ADIR_PROCB_INT_MASK (ADIR_PCI32_VIRT_IO_BASE + 0x0EFFF2) | ||
65 | #define ADIR_PROCA_INT_STAT (ADIR_PCI32_VIRT_IO_BASE + 0x0EFFF4) | ||
66 | #define ADIR_PROCB_INT_STAT (ADIR_PCI32_VIRT_IO_BASE + 0x0EFFF6) | ||
67 | |||
68 | /* Linux IRQ numbers */ | ||
69 | #define ADIR_IRQ_NONE -1 | ||
70 | #define ADIR_IRQ_SERIAL2 3 | ||
71 | #define ADIR_IRQ_SERIAL1 4 | ||
72 | #define ADIR_IRQ_FDC 6 | ||
73 | #define ADIR_IRQ_PARALLEL 7 | ||
74 | #define ADIR_IRQ_VIA_AUDIO 10 | ||
75 | #define ADIR_IRQ_VIA_USB 11 | ||
76 | #define ADIR_IRQ_IDE0 14 | ||
77 | #define ADIR_IRQ_IDE1 15 | ||
78 | #define ADIR_IRQ_PCI0_INTA 16 | ||
79 | #define ADIR_IRQ_PCI0_INTB 17 | ||
80 | #define ADIR_IRQ_PCI0_INTC 18 | ||
81 | #define ADIR_IRQ_PCI0_INTD 19 | ||
82 | #define ADIR_IRQ_PCI1_INTA 20 | ||
83 | #define ADIR_IRQ_PCI1_INTB 21 | ||
84 | #define ADIR_IRQ_PCI1_INTC 22 | ||
85 | #define ADIR_IRQ_PCI1_INTD 23 | ||
86 | #define ADIR_IRQ_MBSCSI 24 /* motherboard SCSI */ | ||
87 | #define ADIR_IRQ_MBETH1 25 /* motherboard Ethernet 1 */ | ||
88 | #define ADIR_IRQ_MBETH0 26 /* motherboard Ethernet 0 */ | ||
89 | #define ADIR_IRQ_CPC710_INT1 27 | ||
90 | #define ADIR_IRQ_CPC710_INT2 28 | ||
91 | #define ADIR_IRQ_VT82C686_NMI 29 | ||
92 | #define ADIR_IRQ_VT82C686_INTR 30 | ||
93 | #define ADIR_IRQ_INTERPROC 31 | ||
94 | |||
95 | #endif /* __PPC_PLATFORMS_ADIR_H */ | ||
diff --git a/arch/ppc/platforms/adir_pci.c b/arch/ppc/platforms/adir_pci.c deleted file mode 100644 index f94ac53e0711..000000000000 --- a/arch/ppc/platforms/adir_pci.c +++ /dev/null | |||
@@ -1,247 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/adir_pci.c | ||
3 | * | ||
4 | * PCI support for SBS Adirondack | ||
5 | * | ||
6 | * By Michael Sokolov <msokolov@ivan.Harhan.ORG> | ||
7 | * based on the K2 version by Matt Porter <mporter@mvista.com> | ||
8 | */ | ||
9 | |||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/pci.h> | ||
13 | #include <linux/slab.h> | ||
14 | |||
15 | #include <asm/byteorder.h> | ||
16 | #include <asm/io.h> | ||
17 | #include <asm/uaccess.h> | ||
18 | #include <asm/machdep.h> | ||
19 | #include <asm/pci-bridge.h> | ||
20 | |||
21 | #include <syslib/cpc710.h> | ||
22 | #include "adir.h" | ||
23 | |||
24 | #undef DEBUG | ||
25 | #ifdef DEBUG | ||
26 | #define DBG(x...) printk(x) | ||
27 | #else | ||
28 | #define DBG(x...) | ||
29 | #endif /* DEBUG */ | ||
30 | |||
31 | static inline int __init | ||
32 | adir_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
33 | { | ||
34 | #define PCIIRQ(a,b,c,d) {ADIR_IRQ_##a,ADIR_IRQ_##b,ADIR_IRQ_##c,ADIR_IRQ_##d}, | ||
35 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | ||
36 | /* | ||
37 | * The three PCI devices on the motherboard have dedicated lines to the | ||
38 | * CPLD interrupt controller, bypassing the standard PCI INTA-D and the | ||
39 | * PC interrupt controller. All other PCI devices (slots) have usual | ||
40 | * staggered INTA-D lines, resulting in 8 lines total (PCI0 INTA-D and | ||
41 | * PCI1 INTA-D). All 8 go to the CPLD interrupt controller. PCI0 INTA-D | ||
42 | * also go to the south bridge, so we have the option of taking them | ||
43 | * via the CPLD interrupt controller or via the south bridge 8259 | ||
44 | * 8258 thingy. PCI1 INTA-D can only be taken via the CPLD interrupt | ||
45 | * controller. We take all PCI interrupts via the CPLD interrupt | ||
46 | * controller as recommended by SBS. | ||
47 | * | ||
48 | * We also have some monkey business with the PCI devices within the | ||
49 | * VT82C686B south bridge itself. This chip actually has 7 functions on | ||
50 | * its IDSEL. Function 0 is the actual south bridge, function 1 is IDE, | ||
51 | * and function 4 is some special stuff. The other 4 functions are just | ||
52 | * regular PCI devices bundled in the chip. 2 and 3 are USB UHCIs and 5 | ||
53 | * and 6 are audio (not supported on the Adirondack). | ||
54 | * | ||
55 | * This is where the monkey business begins. PCI devices are supposed | ||
56 | * to signal normal PCI interrupts. But the 4 functions in question are | ||
57 | * located in the south bridge chip, which is designed with the | ||
58 | * assumption that it will be fielding PCI INTA-D interrupts rather | ||
59 | * than generating them. Here's what it does. Each of the functions in | ||
60 | * question routes its interrupt to one of the IRQs on the 8259 thingy. | ||
61 | * Which one? It looks at the Interrupt Line register in the PCI config | ||
62 | * space, even though the PCI spec says it's for BIOS/OS interaction | ||
63 | * only. | ||
64 | * | ||
65 | * How do we deal with this? We take these interrupts via 8259 IRQs as | ||
66 | * we have to. We return the desired IRQ numbers from this routine when | ||
67 | * called for the functions in question. The PCI scan code will then | ||
68 | * stick our return value into the Interrupt Line register in the PCI | ||
69 | * config space, and the interrupt will actually go there. We identify | ||
70 | * these functions within the south bridge IDSEL by their interrupt pin | ||
71 | * numbers, as the VT82C686B has 04 in the Interrupt Pin register for | ||
72 | * USB and 03 for audio. | ||
73 | */ | ||
74 | if (!hose->index) { | ||
75 | static char pci_irq_table[][4] = | ||
76 | /* | ||
77 | * PCI IDSEL/INTPIN->INTLINE | ||
78 | * A B C D | ||
79 | */ | ||
80 | { | ||
81 | /* south bridge */ PCIIRQ(IDE0, NONE, VIA_AUDIO, VIA_USB) | ||
82 | /* Ethernet 0 */ PCIIRQ(MBETH0, MBETH0, MBETH0, MBETH0) | ||
83 | /* PCI0 slot 1 */ PCIIRQ(PCI0_INTB, PCI0_INTC, PCI0_INTD, PCI0_INTA) | ||
84 | /* PCI0 slot 2 */ PCIIRQ(PCI0_INTC, PCI0_INTD, PCI0_INTA, PCI0_INTB) | ||
85 | /* PCI0 slot 3 */ PCIIRQ(PCI0_INTD, PCI0_INTA, PCI0_INTB, PCI0_INTC) | ||
86 | }; | ||
87 | const long min_idsel = 3, max_idsel = 7, irqs_per_slot = 4; | ||
88 | return PCI_IRQ_TABLE_LOOKUP; | ||
89 | } else { | ||
90 | static char pci_irq_table[][4] = | ||
91 | /* | ||
92 | * PCI IDSEL/INTPIN->INTLINE | ||
93 | * A B C D | ||
94 | */ | ||
95 | { | ||
96 | /* Ethernet 1 */ PCIIRQ(MBETH1, MBETH1, MBETH1, MBETH1) | ||
97 | /* SCSI */ PCIIRQ(MBSCSI, MBSCSI, MBSCSI, MBSCSI) | ||
98 | /* PCI1 slot 1 */ PCIIRQ(PCI1_INTB, PCI1_INTC, PCI1_INTD, PCI1_INTA) | ||
99 | /* PCI1 slot 2 */ PCIIRQ(PCI1_INTC, PCI1_INTD, PCI1_INTA, PCI1_INTB) | ||
100 | /* PCI1 slot 3 */ PCIIRQ(PCI1_INTD, PCI1_INTA, PCI1_INTB, PCI1_INTC) | ||
101 | }; | ||
102 | const long min_idsel = 3, max_idsel = 7, irqs_per_slot = 4; | ||
103 | return PCI_IRQ_TABLE_LOOKUP; | ||
104 | } | ||
105 | #undef PCIIRQ | ||
106 | } | ||
107 | |||
108 | static void | ||
109 | adir_pcibios_fixup_resources(struct pci_dev *dev) | ||
110 | { | ||
111 | int i; | ||
112 | |||
113 | if ((dev->vendor == PCI_VENDOR_ID_IBM) && | ||
114 | (dev->device == PCI_DEVICE_ID_IBM_CPC710_PCI64)) | ||
115 | { | ||
116 | DBG("Fixup CPC710 resources\n"); | ||
117 | for (i=0; i<DEVICE_COUNT_RESOURCE; i++) | ||
118 | { | ||
119 | dev->resource[i].start = 0; | ||
120 | dev->resource[i].end = 0; | ||
121 | } | ||
122 | } | ||
123 | } | ||
124 | |||
125 | /* | ||
126 | * CPC710 DD3 has an errata causing it to hang the system if a type 0 config | ||
127 | * cycle is attempted on its PCI32 interface with a device number > 21. | ||
128 | * CPC710's PCI bridges map device numbers 1 through 21 to AD11 through AD31. | ||
129 | * Per the PCI spec it MUST accept all other device numbers and do nothing, and | ||
130 | * software MUST scan all device numbers without assuming how IDSELs are | ||
131 | * mapped. However, as the CPC710 DD3's errata causes such correct scanning | ||
132 | * procedure to hang the system, we have no choice but to introduce this hack | ||
133 | * of knowingly avoiding device numbers > 21 on PCI0, | ||
134 | */ | ||
135 | static int | ||
136 | adir_exclude_device(u_char bus, u_char devfn) | ||
137 | { | ||
138 | if ((bus == 0) && (PCI_SLOT(devfn) > 21)) | ||
139 | return PCIBIOS_DEVICE_NOT_FOUND; | ||
140 | else | ||
141 | return PCIBIOS_SUCCESSFUL; | ||
142 | } | ||
143 | |||
144 | void adir_find_bridges(void) | ||
145 | { | ||
146 | struct pci_controller *hose_a, *hose_b; | ||
147 | |||
148 | /* Setup PCI32 hose */ | ||
149 | hose_a = pcibios_alloc_controller(); | ||
150 | if (!hose_a) | ||
151 | return; | ||
152 | |||
153 | hose_a->first_busno = 0; | ||
154 | hose_a->last_busno = 0xff; | ||
155 | hose_a->pci_mem_offset = ADIR_PCI32_MEM_BASE; | ||
156 | hose_a->io_space.start = 0; | ||
157 | hose_a->io_space.end = ADIR_PCI32_VIRT_IO_SIZE - 1; | ||
158 | hose_a->mem_space.start = 0; | ||
159 | hose_a->mem_space.end = ADIR_PCI32_MEM_SIZE - 1; | ||
160 | hose_a->io_resource.start = 0; | ||
161 | hose_a->io_resource.end = ADIR_PCI32_VIRT_IO_SIZE - 1; | ||
162 | hose_a->io_resource.flags = IORESOURCE_IO; | ||
163 | hose_a->mem_resources[0].start = ADIR_PCI32_MEM_BASE; | ||
164 | hose_a->mem_resources[0].end = ADIR_PCI32_MEM_BASE + | ||
165 | ADIR_PCI32_MEM_SIZE - 1; | ||
166 | hose_a->mem_resources[0].flags = IORESOURCE_MEM; | ||
167 | hose_a->io_base_phys = ADIR_PCI32_IO_BASE; | ||
168 | hose_a->io_base_virt = (void *) ADIR_PCI32_VIRT_IO_BASE; | ||
169 | |||
170 | ppc_md.pci_exclude_device = adir_exclude_device; | ||
171 | setup_indirect_pci(hose_a, ADIR_PCI32_CONFIG_ADDR, | ||
172 | ADIR_PCI32_CONFIG_DATA); | ||
173 | |||
174 | /* Initialize PCI32 bus registers */ | ||
175 | early_write_config_byte(hose_a, | ||
176 | hose_a->first_busno, | ||
177 | PCI_DEVFN(0, 0), | ||
178 | CPC710_BUS_NUMBER, | ||
179 | hose_a->first_busno); | ||
180 | early_write_config_byte(hose_a, | ||
181 | hose_a->first_busno, | ||
182 | PCI_DEVFN(0, 0), | ||
183 | CPC710_SUB_BUS_NUMBER, | ||
184 | hose_a->last_busno); | ||
185 | |||
186 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); | ||
187 | |||
188 | /* Write out correct max subordinate bus number for hose A */ | ||
189 | early_write_config_byte(hose_a, | ||
190 | hose_a->first_busno, | ||
191 | PCI_DEVFN(0, 0), | ||
192 | CPC710_SUB_BUS_NUMBER, | ||
193 | hose_a->last_busno); | ||
194 | |||
195 | /* Setup PCI64 hose */ | ||
196 | hose_b = pcibios_alloc_controller(); | ||
197 | if (!hose_b) | ||
198 | return; | ||
199 | |||
200 | hose_b->first_busno = hose_a->last_busno + 1; | ||
201 | hose_b->last_busno = 0xff; | ||
202 | hose_b->pci_mem_offset = ADIR_PCI64_MEM_BASE; | ||
203 | hose_b->io_space.start = 0; | ||
204 | hose_b->io_space.end = ADIR_PCI64_VIRT_IO_SIZE - 1; | ||
205 | hose_b->mem_space.start = 0; | ||
206 | hose_b->mem_space.end = ADIR_PCI64_MEM_SIZE - 1; | ||
207 | hose_b->io_resource.start = 0; | ||
208 | hose_b->io_resource.end = ADIR_PCI64_VIRT_IO_SIZE - 1; | ||
209 | hose_b->io_resource.flags = IORESOURCE_IO; | ||
210 | hose_b->mem_resources[0].start = ADIR_PCI64_MEM_BASE; | ||
211 | hose_b->mem_resources[0].end = ADIR_PCI64_MEM_BASE + | ||
212 | ADIR_PCI64_MEM_SIZE - 1; | ||
213 | hose_b->mem_resources[0].flags = IORESOURCE_MEM; | ||
214 | hose_b->io_base_phys = ADIR_PCI64_IO_BASE; | ||
215 | hose_b->io_base_virt = (void *) ADIR_PCI64_VIRT_IO_BASE; | ||
216 | |||
217 | setup_indirect_pci(hose_b, ADIR_PCI64_CONFIG_ADDR, | ||
218 | ADIR_PCI64_CONFIG_DATA); | ||
219 | |||
220 | /* Initialize PCI64 bus registers */ | ||
221 | early_write_config_byte(hose_b, | ||
222 | 0, | ||
223 | PCI_DEVFN(0, 0), | ||
224 | CPC710_SUB_BUS_NUMBER, | ||
225 | 0xff); | ||
226 | |||
227 | early_write_config_byte(hose_b, | ||
228 | 0, | ||
229 | PCI_DEVFN(0, 0), | ||
230 | CPC710_BUS_NUMBER, | ||
231 | hose_b->first_busno); | ||
232 | |||
233 | hose_b->last_busno = pciauto_bus_scan(hose_b, | ||
234 | hose_b->first_busno); | ||
235 | |||
236 | /* Write out correct max subordinate bus number for hose B */ | ||
237 | early_write_config_byte(hose_b, | ||
238 | hose_b->first_busno, | ||
239 | PCI_DEVFN(0, 0), | ||
240 | CPC710_SUB_BUS_NUMBER, | ||
241 | hose_b->last_busno); | ||
242 | |||
243 | ppc_md.pcibios_fixup = NULL; | ||
244 | ppc_md.pcibios_fixup_resources = adir_pcibios_fixup_resources; | ||
245 | ppc_md.pci_swizzle = common_swizzle; | ||
246 | ppc_md.pci_map_irq = adir_map_irq; | ||
247 | } | ||
diff --git a/arch/ppc/platforms/adir_pic.c b/arch/ppc/platforms/adir_pic.c deleted file mode 100644 index 9947cba52af5..000000000000 --- a/arch/ppc/platforms/adir_pic.c +++ /dev/null | |||
@@ -1,130 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/adir_pic.c | ||
3 | * | ||
4 | * Interrupt controller support for SBS Adirondack | ||
5 | * | ||
6 | * By Michael Sokolov <msokolov@ivan.Harhan.ORG> | ||
7 | * based on the K2 and SCM versions by Matt Porter <mporter@mvista.com> | ||
8 | */ | ||
9 | |||
10 | #include <linux/stddef.h> | ||
11 | #include <linux/init.h> | ||
12 | #include <linux/sched.h> | ||
13 | #include <linux/pci.h> | ||
14 | #include <linux/interrupt.h> | ||
15 | |||
16 | #include <asm/io.h> | ||
17 | #include <asm/i8259.h> | ||
18 | #include "adir.h" | ||
19 | |||
20 | static void adir_onboard_pic_enable(unsigned int irq); | ||
21 | static void adir_onboard_pic_disable(unsigned int irq); | ||
22 | |||
23 | __init static void | ||
24 | adir_onboard_pic_init(void) | ||
25 | { | ||
26 | volatile u_short *maskreg = (volatile u_short *) ADIR_PROCA_INT_MASK; | ||
27 | |||
28 | /* Disable all Adirondack onboard interrupts */ | ||
29 | out_be16(maskreg, 0xFFFF); | ||
30 | } | ||
31 | |||
32 | static int | ||
33 | adir_onboard_pic_get_irq(void) | ||
34 | { | ||
35 | volatile u_short *statreg = (volatile u_short *) ADIR_PROCA_INT_STAT; | ||
36 | int irq; | ||
37 | u_short int_status, int_test; | ||
38 | |||
39 | int_status = in_be16(statreg); | ||
40 | for (irq = 0, int_test = 1; irq < 16; irq++, int_test <<= 1) { | ||
41 | if (int_status & int_test) | ||
42 | break; | ||
43 | } | ||
44 | |||
45 | if (irq == 16) | ||
46 | return -1; | ||
47 | |||
48 | return (irq+16); | ||
49 | } | ||
50 | |||
51 | static void | ||
52 | adir_onboard_pic_enable(unsigned int irq) | ||
53 | { | ||
54 | volatile u_short *maskreg = (volatile u_short *) ADIR_PROCA_INT_MASK; | ||
55 | |||
56 | /* Change irq to Adirondack onboard native value */ | ||
57 | irq -= 16; | ||
58 | |||
59 | /* Enable requested irq number */ | ||
60 | out_be16(maskreg, in_be16(maskreg) & ~(1 << irq)); | ||
61 | } | ||
62 | |||
63 | static void | ||
64 | adir_onboard_pic_disable(unsigned int irq) | ||
65 | { | ||
66 | volatile u_short *maskreg = (volatile u_short *) ADIR_PROCA_INT_MASK; | ||
67 | |||
68 | /* Change irq to Adirondack onboard native value */ | ||
69 | irq -= 16; | ||
70 | |||
71 | /* Disable requested irq number */ | ||
72 | out_be16(maskreg, in_be16(maskreg) | (1 << irq)); | ||
73 | } | ||
74 | |||
75 | static struct hw_interrupt_type adir_onboard_pic = { | ||
76 | " ADIR PIC ", | ||
77 | NULL, | ||
78 | NULL, | ||
79 | adir_onboard_pic_enable, /* unmask */ | ||
80 | adir_onboard_pic_disable, /* mask */ | ||
81 | adir_onboard_pic_disable, /* mask and ack */ | ||
82 | NULL, | ||
83 | NULL | ||
84 | }; | ||
85 | |||
86 | static struct irqaction noop_action = { | ||
87 | .handler = no_action, | ||
88 | .flags = SA_INTERRUPT, | ||
89 | .mask = CPU_MASK_NONE, | ||
90 | .name = "82c59 primary cascade", | ||
91 | }; | ||
92 | |||
93 | /* | ||
94 | * Linux interrupt values are assigned as follows: | ||
95 | * | ||
96 | * 0-15 VT82C686 8259 interrupts | ||
97 | * 16-31 Adirondack CPLD interrupts | ||
98 | */ | ||
99 | __init void | ||
100 | adir_init_IRQ(void) | ||
101 | { | ||
102 | int i; | ||
103 | |||
104 | /* Initialize the cascaded 8259's on the VT82C686 */ | ||
105 | for (i=0; i<16; i++) | ||
106 | irq_desc[i].handler = &i8259_pic; | ||
107 | i8259_init(NULL); | ||
108 | |||
109 | /* Initialize Adirondack CPLD PIC and enable 8259 interrupt cascade */ | ||
110 | for (i=16; i<32; i++) | ||
111 | irq_desc[i].handler = &adir_onboard_pic; | ||
112 | adir_onboard_pic_init(); | ||
113 | |||
114 | /* Enable 8259 interrupt cascade */ | ||
115 | setup_irq(ADIR_IRQ_VT82C686_INTR, &noop_action); | ||
116 | } | ||
117 | |||
118 | int | ||
119 | adir_get_irq(struct pt_regs *regs) | ||
120 | { | ||
121 | int irq; | ||
122 | |||
123 | if ((irq = adir_onboard_pic_get_irq()) < 0) | ||
124 | return irq; | ||
125 | |||
126 | if (irq == ADIR_IRQ_VT82C686_INTR) | ||
127 | irq = i8259_irq(regs); | ||
128 | |||
129 | return irq; | ||
130 | } | ||
diff --git a/arch/ppc/platforms/adir_setup.c b/arch/ppc/platforms/adir_setup.c deleted file mode 100644 index 6a6754ee0617..000000000000 --- a/arch/ppc/platforms/adir_setup.c +++ /dev/null | |||
@@ -1,210 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/adir_setup.c | ||
3 | * | ||
4 | * Board setup routines for SBS Adirondack | ||
5 | * | ||
6 | * By Michael Sokolov <msokolov@ivan.Harhan.ORG> | ||
7 | * based on the K2 version by Matt Porter <mporter@mvista.com> | ||
8 | */ | ||
9 | |||
10 | #include <linux/config.h> | ||
11 | #include <linux/stddef.h> | ||
12 | #include <linux/kernel.h> | ||
13 | #include <linux/init.h> | ||
14 | #include <linux/errno.h> | ||
15 | #include <linux/reboot.h> | ||
16 | #include <linux/pci.h> | ||
17 | #include <linux/kdev_t.h> | ||
18 | #include <linux/types.h> | ||
19 | #include <linux/major.h> | ||
20 | #include <linux/initrd.h> | ||
21 | #include <linux/console.h> | ||
22 | #include <linux/delay.h> | ||
23 | #include <linux/ide.h> | ||
24 | #include <linux/seq_file.h> | ||
25 | #include <linux/root_dev.h> | ||
26 | |||
27 | #include <asm/system.h> | ||
28 | #include <asm/pgtable.h> | ||
29 | #include <asm/page.h> | ||
30 | #include <asm/dma.h> | ||
31 | #include <asm/io.h> | ||
32 | #include <asm/machdep.h> | ||
33 | #include <asm/time.h> | ||
34 | #include <asm/todc.h> | ||
35 | #include <asm/bootinfo.h> | ||
36 | |||
37 | #include "adir.h" | ||
38 | |||
39 | extern void adir_init_IRQ(void); | ||
40 | extern int adir_get_irq(struct pt_regs *); | ||
41 | extern void adir_find_bridges(void); | ||
42 | extern unsigned long loops_per_jiffy; | ||
43 | |||
44 | static unsigned int cpu_750cx[16] = { | ||
45 | 5, 15, 14, 0, 4, 13, 0, 9, 6, 11, 8, 10, 16, 12, 7, 0 | ||
46 | }; | ||
47 | |||
48 | static int | ||
49 | adir_get_bus_speed(void) | ||
50 | { | ||
51 | if (!(*((u_char *) ADIR_CLOCK_REG) & ADIR_CLOCK_REG_SEL133)) | ||
52 | return 100000000; | ||
53 | else | ||
54 | return 133333333; | ||
55 | } | ||
56 | |||
57 | static int | ||
58 | adir_get_cpu_speed(void) | ||
59 | { | ||
60 | unsigned long hid1; | ||
61 | int cpu_speed; | ||
62 | |||
63 | hid1 = mfspr(SPRN_HID1) >> 28; | ||
64 | |||
65 | hid1 = cpu_750cx[hid1]; | ||
66 | |||
67 | cpu_speed = adir_get_bus_speed()*hid1/2; | ||
68 | return cpu_speed; | ||
69 | } | ||
70 | |||
71 | static void __init | ||
72 | adir_calibrate_decr(void) | ||
73 | { | ||
74 | int freq, divisor = 4; | ||
75 | |||
76 | /* determine processor bus speed */ | ||
77 | freq = adir_get_bus_speed(); | ||
78 | tb_ticks_per_jiffy = freq / HZ / divisor; | ||
79 | tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); | ||
80 | } | ||
81 | |||
82 | static int | ||
83 | adir_show_cpuinfo(struct seq_file *m) | ||
84 | { | ||
85 | seq_printf(m, "vendor\t\t: SBS\n"); | ||
86 | seq_printf(m, "machine\t\t: Adirondack\n"); | ||
87 | seq_printf(m, "cpu speed\t: %dMhz\n", adir_get_cpu_speed()/1000000); | ||
88 | seq_printf(m, "bus speed\t: %dMhz\n", adir_get_bus_speed()/1000000); | ||
89 | seq_printf(m, "memory type\t: SDRAM\n"); | ||
90 | |||
91 | return 0; | ||
92 | } | ||
93 | |||
94 | extern char cmd_line[]; | ||
95 | |||
96 | TODC_ALLOC(); | ||
97 | |||
98 | static void __init | ||
99 | adir_setup_arch(void) | ||
100 | { | ||
101 | unsigned int cpu; | ||
102 | |||
103 | /* Setup TODC access */ | ||
104 | TODC_INIT(TODC_TYPE_MC146818, ADIR_NVRAM_RTC_ADDR, 0, | ||
105 | ADIR_NVRAM_RTC_DATA, 8); | ||
106 | |||
107 | /* init to some ~sane value until calibrate_delay() runs */ | ||
108 | loops_per_jiffy = 50000000/HZ; | ||
109 | |||
110 | /* Setup PCI host bridges */ | ||
111 | adir_find_bridges(); | ||
112 | |||
113 | #ifdef CONFIG_BLK_DEV_INITRD | ||
114 | if (initrd_start) | ||
115 | ROOT_DEV = Root_RAM0; | ||
116 | else | ||
117 | #endif | ||
118 | #ifdef CONFIG_ROOT_NFS | ||
119 | ROOT_DEV = Root_NFS; | ||
120 | #else | ||
121 | ROOT_DEV = Root_SDA1; | ||
122 | #endif | ||
123 | |||
124 | /* Identify the system */ | ||
125 | printk("System Identification: SBS Adirondack - PowerPC 750CXe @ %d Mhz\n", adir_get_cpu_speed()/1000000); | ||
126 | printk("SBS Adirondack port (C) 2001 SBS Technologies, Inc.\n"); | ||
127 | |||
128 | /* Identify the CPU manufacturer */ | ||
129 | cpu = mfspr(SPRN_PVR); | ||
130 | printk("CPU manufacturer: IBM [rev=%04x]\n", (cpu & 0xffff)); | ||
131 | } | ||
132 | |||
133 | static void | ||
134 | adir_restart(char *cmd) | ||
135 | { | ||
136 | local_irq_disable(); | ||
137 | /* SRR0 has system reset vector, SRR1 has default MSR value */ | ||
138 | /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ | ||
139 | __asm__ __volatile__ | ||
140 | ("lis 3,0xfff0\n\t" | ||
141 | "ori 3,3,0x0100\n\t" | ||
142 | "mtspr 26,3\n\t" | ||
143 | "li 3,0\n\t" | ||
144 | "mtspr 27,3\n\t" | ||
145 | "rfi\n\t"); | ||
146 | for(;;); | ||
147 | } | ||
148 | |||
149 | static void | ||
150 | adir_power_off(void) | ||
151 | { | ||
152 | for(;;); | ||
153 | } | ||
154 | |||
155 | static void | ||
156 | adir_halt(void) | ||
157 | { | ||
158 | adir_restart(NULL); | ||
159 | } | ||
160 | |||
161 | static unsigned long __init | ||
162 | adir_find_end_of_memory(void) | ||
163 | { | ||
164 | return boot_mem_size; | ||
165 | } | ||
166 | |||
167 | static void __init | ||
168 | adir_map_io(void) | ||
169 | { | ||
170 | io_block_mapping(ADIR_PCI32_VIRT_IO_BASE, ADIR_PCI32_IO_BASE, | ||
171 | ADIR_PCI32_VIRT_IO_SIZE, _PAGE_IO); | ||
172 | io_block_mapping(ADIR_PCI64_VIRT_IO_BASE, ADIR_PCI64_IO_BASE, | ||
173 | ADIR_PCI64_VIRT_IO_SIZE, _PAGE_IO); | ||
174 | } | ||
175 | |||
176 | void __init | ||
177 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
178 | unsigned long r6, unsigned long r7) | ||
179 | { | ||
180 | /* | ||
181 | * On the Adirondack we use bi_recs and pass the pointer to them in R3. | ||
182 | */ | ||
183 | parse_bootinfo((struct bi_record *) (r3 + KERNELBASE)); | ||
184 | |||
185 | /* Remember, isa_io_base is virtual but isa_mem_base is physical! */ | ||
186 | isa_io_base = ADIR_PCI32_VIRT_IO_BASE; | ||
187 | isa_mem_base = ADIR_PCI32_MEM_BASE; | ||
188 | pci_dram_offset = ADIR_PCI_SYS_MEM_BASE; | ||
189 | |||
190 | ppc_md.setup_arch = adir_setup_arch; | ||
191 | ppc_md.show_cpuinfo = adir_show_cpuinfo; | ||
192 | ppc_md.irq_canonicalize = NULL; | ||
193 | ppc_md.init_IRQ = adir_init_IRQ; | ||
194 | ppc_md.get_irq = adir_get_irq; | ||
195 | ppc_md.init = NULL; | ||
196 | |||
197 | ppc_md.find_end_of_memory = adir_find_end_of_memory; | ||
198 | ppc_md.setup_io_mappings = adir_map_io; | ||
199 | |||
200 | ppc_md.restart = adir_restart; | ||
201 | ppc_md.power_off = adir_power_off; | ||
202 | ppc_md.halt = adir_halt; | ||
203 | |||
204 | ppc_md.time_init = todc_time_init; | ||
205 | ppc_md.set_rtc_time = todc_set_rtc_time; | ||
206 | ppc_md.get_rtc_time = todc_get_rtc_time; | ||
207 | ppc_md.nvram_read_val = todc_mc146818_read_val; | ||
208 | ppc_md.nvram_write_val = todc_mc146818_write_val; | ||
209 | ppc_md.calibrate_decr = adir_calibrate_decr; | ||
210 | } | ||
diff --git a/arch/ppc/platforms/cpci690.c b/arch/ppc/platforms/cpci690.c index 507870c9a97a..f64ac2acb603 100644 --- a/arch/ppc/platforms/cpci690.c +++ b/arch/ppc/platforms/cpci690.c | |||
@@ -35,11 +35,7 @@ | |||
35 | #define SET_PCI_IDE_NATIVE | 35 | #define SET_PCI_IDE_NATIVE |
36 | 36 | ||
37 | static struct mv64x60_handle bh; | 37 | static struct mv64x60_handle bh; |
38 | static u32 cpci690_br_base; | 38 | static void __iomem *cpci690_br_base; |
39 | |||
40 | static const unsigned int cpu_7xx[16] = { /* 7xx & 74xx (but not 745x) */ | ||
41 | 18, 15, 14, 2, 4, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0 | ||
42 | }; | ||
43 | 39 | ||
44 | TODC_ALLOC(); | 40 | TODC_ALLOC(); |
45 | 41 | ||
@@ -55,7 +51,7 @@ cpci690_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
55 | * A B C D | 51 | * A B C D |
56 | */ | 52 | */ |
57 | { | 53 | { |
58 | { 90, 91, 88, 89}, /* IDSEL 30/20 - Sentinel */ | 54 | { 90, 91, 88, 89 }, /* IDSEL 30/20 - Sentinel */ |
59 | }; | 55 | }; |
60 | 56 | ||
61 | const long min_idsel = 20, max_idsel = 20, irqs_per_slot = 4; | 57 | const long min_idsel = 20, max_idsel = 20, irqs_per_slot = 4; |
@@ -67,9 +63,9 @@ cpci690_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
67 | * A B C D | 63 | * A B C D |
68 | */ | 64 | */ |
69 | { | 65 | { |
70 | { 93, 94, 95, 92}, /* IDSEL 28/18 - PMC slot 2 */ | 66 | { 93, 94, 95, 92 }, /* IDSEL 28/18 - PMC slot 2 */ |
71 | { 0, 0, 0, 0}, /* IDSEL 29/19 - Not used */ | 67 | { 0, 0, 0, 0 }, /* IDSEL 29/19 - Not used */ |
72 | { 94, 95, 92, 93}, /* IDSEL 30/20 - PMC slot 1 */ | 68 | { 94, 95, 92, 93 }, /* IDSEL 30/20 - PMC slot 1 */ |
73 | }; | 69 | }; |
74 | 70 | ||
75 | const long min_idsel = 18, max_idsel = 20, irqs_per_slot = 4; | 71 | const long min_idsel = 18, max_idsel = 20, irqs_per_slot = 4; |
@@ -77,68 +73,29 @@ cpci690_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | |||
77 | } | 73 | } |
78 | } | 74 | } |
79 | 75 | ||
80 | static int | 76 | #define GB (1024UL * 1024UL * 1024UL) |
81 | cpci690_get_cpu_speed(void) | ||
82 | { | ||
83 | unsigned long hid1; | ||
84 | 77 | ||
85 | hid1 = mfspr(SPRN_HID1) >> 28; | 78 | static u32 |
86 | return CPCI690_BUS_FREQ * cpu_7xx[hid1]/2; | 79 | cpci690_get_bus_freq(void) |
80 | { | ||
81 | if (boot_mem_size >= (1*GB)) /* bus speed based on mem size */ | ||
82 | return 100000000; | ||
83 | else | ||
84 | return 133333333; | ||
87 | } | 85 | } |
88 | 86 | ||
89 | #define KB (1024UL) | 87 | static const unsigned int cpu_750xx[32] = { /* 750FX & 750GX */ |
90 | #define MB (1024UL * KB) | 88 | 0, 0, 2, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,/* 0-15*/ |
91 | #define GB (1024UL * MB) | 89 | 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 0 /*16-31*/ |
90 | }; | ||
92 | 91 | ||
93 | unsigned long __init | 92 | static int |
94 | cpci690_find_end_of_memory(void) | 93 | cpci690_get_cpu_freq(void) |
95 | { | 94 | { |
96 | u32 mem_ctlr_size; | 95 | unsigned long pll_cfg; |
97 | static u32 board_size; | 96 | |
98 | static u8 first_time = 1; | 97 | pll_cfg = (mfspr(SPRN_HID1) & 0xf8000000) >> 27; |
99 | 98 | return cpci690_get_bus_freq() * cpu_750xx[pll_cfg]/2; | |
100 | if (first_time) { | ||
101 | /* Using cpci690_set_bat() mapping ==> virt addr == phys addr */ | ||
102 | switch (in_8((u8 *) (cpci690_br_base + | ||
103 | CPCI690_BR_MEM_CTLR)) & 0x07) { | ||
104 | case 0x01: | ||
105 | board_size = 256*MB; | ||
106 | break; | ||
107 | case 0x02: | ||
108 | board_size = 512*MB; | ||
109 | break; | ||
110 | case 0x03: | ||
111 | board_size = 768*MB; | ||
112 | break; | ||
113 | case 0x04: | ||
114 | board_size = 1*GB; | ||
115 | break; | ||
116 | case 0x05: | ||
117 | board_size = 1*GB + 512*MB; | ||
118 | break; | ||
119 | case 0x06: | ||
120 | board_size = 2*GB; | ||
121 | break; | ||
122 | default: | ||
123 | board_size = 0xffffffff; /* use mem ctlr size */ | ||
124 | } /* switch */ | ||
125 | |||
126 | mem_ctlr_size = mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE, | ||
127 | MV64x60_TYPE_GT64260A); | ||
128 | |||
129 | /* Check that mem ctlr & board reg agree. If not, pick MIN. */ | ||
130 | if (board_size != mem_ctlr_size) { | ||
131 | printk(KERN_WARNING "Board register & memory controller" | ||
132 | "mem size disagree (board reg: 0x%lx, " | ||
133 | "mem ctlr: 0x%lx)\n", | ||
134 | (ulong)board_size, (ulong)mem_ctlr_size); | ||
135 | board_size = min(board_size, mem_ctlr_size); | ||
136 | } | ||
137 | |||
138 | first_time = 0; | ||
139 | } /* if */ | ||
140 | |||
141 | return board_size; | ||
142 | } | 99 | } |
143 | 100 | ||
144 | static void __init | 101 | static void __init |
@@ -228,7 +185,7 @@ cpci690_setup_peripherals(void) | |||
228 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, CPCI690_BR_BASE, | 185 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_0_WIN, CPCI690_BR_BASE, |
229 | CPCI690_BR_SIZE, 0); | 186 | CPCI690_BR_SIZE, 0); |
230 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN); | 187 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_0_WIN); |
231 | cpci690_br_base = (u32)ioremap(CPCI690_BR_BASE, CPCI690_BR_SIZE); | 188 | cpci690_br_base = ioremap(CPCI690_BR_BASE, CPCI690_BR_SIZE); |
232 | 189 | ||
233 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, CPCI690_TODC_BASE, | 190 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, CPCI690_TODC_BASE, |
234 | CPCI690_TODC_SIZE, 0); | 191 | CPCI690_TODC_SIZE, 0); |
@@ -329,7 +286,7 @@ cpci690_fixup_mpsc_pdata(struct platform_device *pdev) | |||
329 | pdata->max_idle = 40; | 286 | pdata->max_idle = 40; |
330 | pdata->default_baud = CPCI690_MPSC_BAUD; | 287 | pdata->default_baud = CPCI690_MPSC_BAUD; |
331 | pdata->brg_clk_src = CPCI690_MPSC_CLK_SRC; | 288 | pdata->brg_clk_src = CPCI690_MPSC_CLK_SRC; |
332 | pdata->brg_clk_freq = CPCI690_BUS_FREQ; | 289 | pdata->brg_clk_freq = cpci690_get_bus_freq(); |
333 | } | 290 | } |
334 | 291 | ||
335 | static int __init | 292 | static int __init |
@@ -365,7 +322,7 @@ cpci690_reset_board(void) | |||
365 | u32 i = 10000; | 322 | u32 i = 10000; |
366 | 323 | ||
367 | local_irq_disable(); | 324 | local_irq_disable(); |
368 | out_8((u8 *)(cpci690_br_base + CPCI690_BR_SW_RESET), 0x11); | 325 | out_8((cpci690_br_base + CPCI690_BR_SW_RESET), 0x11); |
369 | 326 | ||
370 | while (i != 0) i++; | 327 | while (i != 0) i++; |
371 | panic("restart failed\n"); | 328 | panic("restart failed\n"); |
@@ -394,10 +351,40 @@ cpci690_power_off(void) | |||
394 | static int | 351 | static int |
395 | cpci690_show_cpuinfo(struct seq_file *m) | 352 | cpci690_show_cpuinfo(struct seq_file *m) |
396 | { | 353 | { |
354 | char *s; | ||
355 | |||
356 | seq_printf(m, "cpu MHz\t\t: %d\n", | ||
357 | (cpci690_get_cpu_freq() + 500000) / 1000000); | ||
358 | seq_printf(m, "bus MHz\t\t: %d\n", | ||
359 | (cpci690_get_bus_freq() + 500000) / 1000000); | ||
397 | seq_printf(m, "vendor\t\t: " BOARD_VENDOR "\n"); | 360 | seq_printf(m, "vendor\t\t: " BOARD_VENDOR "\n"); |
398 | seq_printf(m, "machine\t\t: " BOARD_MACHINE "\n"); | 361 | seq_printf(m, "machine\t\t: " BOARD_MACHINE "\n"); |
399 | seq_printf(m, "cpu MHz\t\t: %d\n", cpci690_get_cpu_speed()/1000/1000); | 362 | seq_printf(m, "FPGA Revision\t: %d\n", |
400 | seq_printf(m, "bus MHz\t\t: %d\n", CPCI690_BUS_FREQ/1000/1000); | 363 | in_8(cpci690_br_base + CPCI690_BR_MEM_CTLR) >> 5); |
364 | |||
365 | switch(bh.type) { | ||
366 | case MV64x60_TYPE_GT64260A: | ||
367 | s = "gt64260a"; | ||
368 | break; | ||
369 | case MV64x60_TYPE_GT64260B: | ||
370 | s = "gt64260b"; | ||
371 | break; | ||
372 | case MV64x60_TYPE_MV64360: | ||
373 | s = "mv64360"; | ||
374 | break; | ||
375 | case MV64x60_TYPE_MV64460: | ||
376 | s = "mv64460"; | ||
377 | break; | ||
378 | default: | ||
379 | s = "Unknown"; | ||
380 | } | ||
381 | seq_printf(m, "bridge type\t: %s\n", s); | ||
382 | seq_printf(m, "bridge rev\t: 0x%x\n", bh.rev); | ||
383 | #if defined(CONFIG_NOT_COHERENT_CACHE) | ||
384 | seq_printf(m, "coherency\t: %s\n", "off"); | ||
385 | #else | ||
386 | seq_printf(m, "coherency\t: %s\n", "on"); | ||
387 | #endif | ||
401 | 388 | ||
402 | return 0; | 389 | return 0; |
403 | } | 390 | } |
@@ -407,7 +394,7 @@ cpci690_calibrate_decr(void) | |||
407 | { | 394 | { |
408 | ulong freq; | 395 | ulong freq; |
409 | 396 | ||
410 | freq = CPCI690_BUS_FREQ / 4; | 397 | freq = cpci690_get_bus_freq() / 4; |
411 | 398 | ||
412 | printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", | 399 | printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", |
413 | freq/1000000, freq%1000000); | 400 | freq/1000000, freq%1000000); |
@@ -416,25 +403,12 @@ cpci690_calibrate_decr(void) | |||
416 | tb_to_us = mulhwu_scale_factor(freq, 1000000); | 403 | tb_to_us = mulhwu_scale_factor(freq, 1000000); |
417 | } | 404 | } |
418 | 405 | ||
419 | static __inline__ void | 406 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_MPSC) |
420 | cpci690_set_bat(u32 addr, u32 size) | ||
421 | { | ||
422 | addr &= 0xfffe0000; | ||
423 | size &= 0x1ffe0000; | ||
424 | size = ((size >> 17) - 1) << 2; | ||
425 | |||
426 | mb(); | ||
427 | mtspr(SPRN_DBAT1U, addr | size | 0x2); /* Vs == 1; Vp == 0 */ | ||
428 | mtspr(SPRN_DBAT1L, addr | 0x2a); /* WIMG bits == 0101; PP == r/w access */ | ||
429 | mb(); | ||
430 | } | ||
431 | |||
432 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB) | ||
433 | static void __init | 407 | static void __init |
434 | cpci690_map_io(void) | 408 | cpci690_map_io(void) |
435 | { | 409 | { |
436 | io_block_mapping(CONFIG_MV64X60_NEW_BASE, CONFIG_MV64X60_NEW_BASE, | 410 | io_block_mapping(CONFIG_MV64X60_NEW_BASE, CONFIG_MV64X60_NEW_BASE, |
437 | 128 * KB, _PAGE_IO); | 411 | 128 * 1024, _PAGE_IO); |
438 | } | 412 | } |
439 | #endif | 413 | #endif |
440 | 414 | ||
@@ -442,14 +416,15 @@ void __init | |||
442 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | 416 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, |
443 | unsigned long r6, unsigned long r7) | 417 | unsigned long r6, unsigned long r7) |
444 | { | 418 | { |
445 | #ifdef CONFIG_BLK_DEV_INITRD | ||
446 | initrd_start=initrd_end=0; | ||
447 | initrd_below_start_ok=0; | ||
448 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
449 | |||
450 | parse_bootinfo(find_bootinfo()); | 419 | parse_bootinfo(find_bootinfo()); |
451 | 420 | ||
452 | loops_per_jiffy = cpci690_get_cpu_speed() / HZ; | 421 | #ifdef CONFIG_BLK_DEV_INITRD |
422 | /* take care of initrd if we have one */ | ||
423 | if (r4) { | ||
424 | initrd_start = r4 + KERNELBASE; | ||
425 | initrd_end = r5 + KERNELBASE; | ||
426 | } | ||
427 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
453 | 428 | ||
454 | isa_mem_base = 0; | 429 | isa_mem_base = 0; |
455 | 430 | ||
@@ -460,7 +435,6 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
460 | ppc_md.restart = cpci690_restart; | 435 | ppc_md.restart = cpci690_restart; |
461 | ppc_md.power_off = cpci690_power_off; | 436 | ppc_md.power_off = cpci690_power_off; |
462 | ppc_md.halt = cpci690_halt; | 437 | ppc_md.halt = cpci690_halt; |
463 | ppc_md.find_end_of_memory = cpci690_find_end_of_memory; | ||
464 | ppc_md.time_init = todc_time_init; | 438 | ppc_md.time_init = todc_time_init; |
465 | ppc_md.set_rtc_time = todc_set_rtc_time; | 439 | ppc_md.set_rtc_time = todc_set_rtc_time; |
466 | ppc_md.get_rtc_time = todc_get_rtc_time; | 440 | ppc_md.get_rtc_time = todc_get_rtc_time; |
@@ -468,22 +442,13 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
468 | ppc_md.nvram_write_val = todc_direct_write_val; | 442 | ppc_md.nvram_write_val = todc_direct_write_val; |
469 | ppc_md.calibrate_decr = cpci690_calibrate_decr; | 443 | ppc_md.calibrate_decr = cpci690_calibrate_decr; |
470 | 444 | ||
471 | /* | 445 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_MPSC) |
472 | * Need to map in board regs (used by cpci690_find_end_of_memory()) | ||
473 | * and the bridge's regs (used by progress); | ||
474 | */ | ||
475 | cpci690_set_bat(CPCI690_BR_BASE, 32 * MB); | ||
476 | cpci690_br_base = CPCI690_BR_BASE; | ||
477 | |||
478 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | ||
479 | ppc_md.setup_io_mappings = cpci690_map_io; | 446 | ppc_md.setup_io_mappings = cpci690_map_io; |
447 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | ||
480 | ppc_md.progress = mv64x60_mpsc_progress; | 448 | ppc_md.progress = mv64x60_mpsc_progress; |
481 | mv64x60_progress_init(CONFIG_MV64X60_NEW_BASE); | 449 | mv64x60_progress_init(CONFIG_MV64X60_NEW_BASE); |
482 | #endif /* CONFIG_SERIAL_TEXT_DEBUG */ | 450 | #endif /* CONFIG_SERIAL_TEXT_DEBUG */ |
483 | #ifdef CONFIG_KGDB | 451 | #endif /* defined(CONFIG_SERIAL_TEXT_DEBUG) || defined(CONFIG_KGDB_MPSC) */ |
484 | ppc_md.setup_io_mappings = cpci690_map_io; | ||
485 | ppc_md.early_serial_map = cpci690_early_serial_map; | ||
486 | #endif /* CONFIG_KGDB */ | ||
487 | 452 | ||
488 | #if defined(CONFIG_SERIAL_MPSC) | 453 | #if defined(CONFIG_SERIAL_MPSC) |
489 | platform_notify = cpci690_platform_notify; | 454 | platform_notify = cpci690_platform_notify; |
diff --git a/arch/ppc/platforms/cpci690.h b/arch/ppc/platforms/cpci690.h index 36cd2673c742..49584c9cedf3 100644 --- a/arch/ppc/platforms/cpci690.h +++ b/arch/ppc/platforms/cpci690.h | |||
@@ -73,6 +73,4 @@ typedef struct board_info { | |||
73 | #define CPCI690_MPSC_BAUD 9600 | 73 | #define CPCI690_MPSC_BAUD 9600 |
74 | #define CPCI690_MPSC_CLK_SRC 8 /* TCLK */ | 74 | #define CPCI690_MPSC_CLK_SRC 8 /* TCLK */ |
75 | 75 | ||
76 | #define CPCI690_BUS_FREQ 133333333 | ||
77 | |||
78 | #endif /* __PPC_PLATFORMS_CPCI690_H */ | 76 | #endif /* __PPC_PLATFORMS_CPCI690_H */ |
diff --git a/arch/ppc/platforms/ev64360.c b/arch/ppc/platforms/ev64360.c new file mode 100644 index 000000000000..9811a8a52c25 --- /dev/null +++ b/arch/ppc/platforms/ev64360.c | |||
@@ -0,0 +1,510 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/ev64360.c | ||
3 | * | ||
4 | * Board setup routines for the Marvell EV-64360-BP Evaluation Board. | ||
5 | * | ||
6 | * Author: Lee Nicks <allinux@gmail.com> | ||
7 | * | ||
8 | * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il | ||
9 | * Based on code done by - Mark A. Greer <mgreer@mvista.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | #include <linux/config.h> | ||
17 | #include <linux/kernel.h> | ||
18 | #include <linux/pci.h> | ||
19 | #include <linux/kdev_t.h> | ||
20 | #include <linux/console.h> | ||
21 | #include <linux/initrd.h> | ||
22 | #include <linux/root_dev.h> | ||
23 | #include <linux/delay.h> | ||
24 | #include <linux/seq_file.h> | ||
25 | #include <linux/bootmem.h> | ||
26 | #include <linux/mtd/physmap.h> | ||
27 | #include <linux/mv643xx.h> | ||
28 | #ifdef CONFIG_BOOTIMG | ||
29 | #include <linux/bootimg.h> | ||
30 | #endif | ||
31 | #include <asm/page.h> | ||
32 | #include <asm/time.h> | ||
33 | #include <asm/smp.h> | ||
34 | #include <asm/todc.h> | ||
35 | #include <asm/bootinfo.h> | ||
36 | #include <asm/ppcboot.h> | ||
37 | #include <asm/mv64x60.h> | ||
38 | #include <platforms/ev64360.h> | ||
39 | |||
40 | #define BOARD_VENDOR "Marvell" | ||
41 | #define BOARD_MACHINE "EV-64360-BP" | ||
42 | |||
43 | static struct mv64x60_handle bh; | ||
44 | static void __iomem *sram_base; | ||
45 | |||
46 | static u32 ev64360_flash_size_0; | ||
47 | static u32 ev64360_flash_size_1; | ||
48 | |||
49 | static u32 ev64360_bus_frequency; | ||
50 | |||
51 | unsigned char __res[sizeof(bd_t)]; | ||
52 | |||
53 | static int __init | ||
54 | ev64360_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
55 | { | ||
56 | return 0; | ||
57 | } | ||
58 | |||
59 | static void __init | ||
60 | ev64360_setup_bridge(void) | ||
61 | { | ||
62 | struct mv64x60_setup_info si; | ||
63 | int i; | ||
64 | |||
65 | memset(&si, 0, sizeof(si)); | ||
66 | |||
67 | si.phys_reg_base = CONFIG_MV64X60_NEW_BASE; | ||
68 | |||
69 | #ifdef CONFIG_PCI | ||
70 | si.pci_1.enable_bus = 1; | ||
71 | si.pci_1.pci_io.cpu_base = EV64360_PCI1_IO_START_PROC_ADDR; | ||
72 | si.pci_1.pci_io.pci_base_hi = 0; | ||
73 | si.pci_1.pci_io.pci_base_lo = EV64360_PCI1_IO_START_PCI_ADDR; | ||
74 | si.pci_1.pci_io.size = EV64360_PCI1_IO_SIZE; | ||
75 | si.pci_1.pci_io.swap = MV64x60_CPU2PCI_SWAP_NONE; | ||
76 | si.pci_1.pci_mem[0].cpu_base = EV64360_PCI1_MEM_START_PROC_ADDR; | ||
77 | si.pci_1.pci_mem[0].pci_base_hi = EV64360_PCI1_MEM_START_PCI_HI_ADDR; | ||
78 | si.pci_1.pci_mem[0].pci_base_lo = EV64360_PCI1_MEM_START_PCI_LO_ADDR; | ||
79 | si.pci_1.pci_mem[0].size = EV64360_PCI1_MEM_SIZE; | ||
80 | si.pci_1.pci_mem[0].swap = MV64x60_CPU2PCI_SWAP_NONE; | ||
81 | si.pci_1.pci_cmd_bits = 0; | ||
82 | si.pci_1.latency_timer = 0x80; | ||
83 | #else | ||
84 | si.pci_0.enable_bus = 0; | ||
85 | si.pci_1.enable_bus = 0; | ||
86 | #endif | ||
87 | |||
88 | for (i = 0; i < MV64x60_CPU2MEM_WINDOWS; i++) { | ||
89 | #if defined(CONFIG_NOT_COHERENT_CACHE) | ||
90 | si.cpu_prot_options[i] = 0; | ||
91 | si.enet_options[i] = MV64360_ENET2MEM_SNOOP_NONE; | ||
92 | si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE; | ||
93 | si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE; | ||
94 | |||
95 | si.pci_1.acc_cntl_options[i] = | ||
96 | MV64360_PCI_ACC_CNTL_SNOOP_NONE | | ||
97 | MV64360_PCI_ACC_CNTL_SWAP_NONE | | ||
98 | MV64360_PCI_ACC_CNTL_MBURST_128_BYTES | | ||
99 | MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES; | ||
100 | #else | ||
101 | si.cpu_prot_options[i] = 0; | ||
102 | si.enet_options[i] = MV64360_ENET2MEM_SNOOP_NONE; /* errata */ | ||
103 | si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE; /* errata */ | ||
104 | si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE; /* errata */ | ||
105 | |||
106 | si.pci_1.acc_cntl_options[i] = | ||
107 | MV64360_PCI_ACC_CNTL_SNOOP_WB | | ||
108 | MV64360_PCI_ACC_CNTL_SWAP_NONE | | ||
109 | MV64360_PCI_ACC_CNTL_MBURST_32_BYTES | | ||
110 | MV64360_PCI_ACC_CNTL_RDSIZE_32_BYTES; | ||
111 | #endif | ||
112 | } | ||
113 | |||
114 | if (mv64x60_init(&bh, &si)) | ||
115 | printk(KERN_WARNING "Bridge initialization failed.\n"); | ||
116 | |||
117 | #ifdef CONFIG_PCI | ||
118 | pci_dram_offset = 0; /* sys mem at same addr on PCI & cpu bus */ | ||
119 | ppc_md.pci_swizzle = common_swizzle; | ||
120 | ppc_md.pci_map_irq = ev64360_map_irq; | ||
121 | ppc_md.pci_exclude_device = mv64x60_pci_exclude_device; | ||
122 | |||
123 | mv64x60_set_bus(&bh, 1, 0); | ||
124 | bh.hose_b->first_busno = 0; | ||
125 | bh.hose_b->last_busno = 0xff; | ||
126 | #endif | ||
127 | } | ||
128 | |||
129 | /* Bridge & platform setup routines */ | ||
130 | void __init | ||
131 | ev64360_intr_setup(void) | ||
132 | { | ||
133 | /* MPP 8, 9, and 10 */ | ||
134 | mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_1, 0xfff); | ||
135 | |||
136 | /* | ||
137 | * Define GPP 8,9,and 10 interrupt polarity as active low | ||
138 | * input signal and level triggered | ||
139 | */ | ||
140 | mv64x60_set_bits(&bh, MV64x60_GPP_LEVEL_CNTL, 0x700); | ||
141 | mv64x60_clr_bits(&bh, MV64x60_GPP_IO_CNTL, 0x700); | ||
142 | |||
143 | /* Config GPP intr ctlr to respond to level trigger */ | ||
144 | mv64x60_set_bits(&bh, MV64x60_COMM_ARBITER_CNTL, (1<<10)); | ||
145 | |||
146 | /* Erranum FEr PCI-#8 */ | ||
147 | mv64x60_clr_bits(&bh, MV64x60_PCI0_CMD, (1<<5) | (1<<9)); | ||
148 | mv64x60_clr_bits(&bh, MV64x60_PCI1_CMD, (1<<5) | (1<<9)); | ||
149 | |||
150 | /* | ||
151 | * Dismiss and then enable interrupt on GPP interrupt cause | ||
152 | * for CPU #0 | ||
153 | */ | ||
154 | mv64x60_write(&bh, MV64x60_GPP_INTR_CAUSE, ~0x700); | ||
155 | mv64x60_set_bits(&bh, MV64x60_GPP_INTR_MASK, 0x700); | ||
156 | |||
157 | /* | ||
158 | * Dismiss and then enable interrupt on CPU #0 high cause reg | ||
159 | * BIT25 summarizes GPP interrupts 8-15 | ||
160 | */ | ||
161 | mv64x60_set_bits(&bh, MV64360_IC_CPU0_INTR_MASK_HI, (1<<25)); | ||
162 | } | ||
163 | |||
164 | void __init | ||
165 | ev64360_setup_peripherals(void) | ||
166 | { | ||
167 | u32 base; | ||
168 | |||
169 | /* Set up window for boot CS */ | ||
170 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2BOOT_WIN, | ||
171 | EV64360_BOOT_WINDOW_BASE, EV64360_BOOT_WINDOW_SIZE, 0); | ||
172 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2BOOT_WIN); | ||
173 | |||
174 | /* We only use the 32-bit flash */ | ||
175 | mv64x60_get_32bit_window(&bh, MV64x60_CPU2BOOT_WIN, &base, | ||
176 | &ev64360_flash_size_0); | ||
177 | ev64360_flash_size_1 = 0; | ||
178 | |||
179 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2DEV_1_WIN, | ||
180 | EV64360_RTC_WINDOW_BASE, EV64360_RTC_WINDOW_SIZE, 0); | ||
181 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2DEV_1_WIN); | ||
182 | |||
183 | mv64x60_set_32bit_window(&bh, MV64x60_CPU2SRAM_WIN, | ||
184 | EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0); | ||
185 | bh.ci->enable_window_32bit(&bh, MV64x60_CPU2SRAM_WIN); | ||
186 | sram_base = ioremap(EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE); | ||
187 | |||
188 | /* Set up Enet->SRAM window */ | ||
189 | mv64x60_set_32bit_window(&bh, MV64x60_ENET2MEM_4_WIN, | ||
190 | EV64360_INTERNAL_SRAM_BASE, MV64360_SRAM_SIZE, 0x2); | ||
191 | bh.ci->enable_window_32bit(&bh, MV64x60_ENET2MEM_4_WIN); | ||
192 | |||
193 | /* Give enet r/w access to memory region */ | ||
194 | mv64x60_set_bits(&bh, MV64360_ENET2MEM_ACC_PROT_0, (0x3 << (4 << 1))); | ||
195 | mv64x60_set_bits(&bh, MV64360_ENET2MEM_ACC_PROT_1, (0x3 << (4 << 1))); | ||
196 | mv64x60_set_bits(&bh, MV64360_ENET2MEM_ACC_PROT_2, (0x3 << (4 << 1))); | ||
197 | |||
198 | mv64x60_clr_bits(&bh, MV64x60_PCI1_PCI_DECODE_CNTL, (1 << 3)); | ||
199 | mv64x60_clr_bits(&bh, MV64x60_TIMR_CNTR_0_3_CNTL, | ||
200 | ((1 << 0) | (1 << 8) | (1 << 16) | (1 << 24))); | ||
201 | |||
202 | #if defined(CONFIG_NOT_COHERENT_CACHE) | ||
203 | mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x00160000); | ||
204 | #else | ||
205 | mv64x60_write(&bh, MV64360_SRAM_CONFIG, 0x001600b2); | ||
206 | #endif | ||
207 | |||
208 | /* | ||
209 | * Setting the SRAM to 0. Note that this generates parity errors on | ||
210 | * internal data path in SRAM since it's first time accessing it | ||
211 | * while after reset it's not configured. | ||
212 | */ | ||
213 | memset(sram_base, 0, MV64360_SRAM_SIZE); | ||
214 | |||
215 | /* set up PCI interrupt controller */ | ||
216 | ev64360_intr_setup(); | ||
217 | } | ||
218 | |||
219 | static void __init | ||
220 | ev64360_setup_arch(void) | ||
221 | { | ||
222 | if (ppc_md.progress) | ||
223 | ppc_md.progress("ev64360_setup_arch: enter", 0); | ||
224 | |||
225 | set_tb(0, 0); | ||
226 | |||
227 | #ifdef CONFIG_BLK_DEV_INITRD | ||
228 | if (initrd_start) | ||
229 | ROOT_DEV = Root_RAM0; | ||
230 | else | ||
231 | #endif | ||
232 | #ifdef CONFIG_ROOT_NFS | ||
233 | ROOT_DEV = Root_NFS; | ||
234 | #else | ||
235 | ROOT_DEV = Root_SDA2; | ||
236 | #endif | ||
237 | |||
238 | /* | ||
239 | * Set up the L2CR register. | ||
240 | */ | ||
241 | _set_L2CR(L2CR_L2E | L2CR_L2PE); | ||
242 | |||
243 | if (ppc_md.progress) | ||
244 | ppc_md.progress("ev64360_setup_arch: calling setup_bridge", 0); | ||
245 | |||
246 | ev64360_setup_bridge(); | ||
247 | ev64360_setup_peripherals(); | ||
248 | ev64360_bus_frequency = ev64360_bus_freq(); | ||
249 | |||
250 | printk(KERN_INFO "%s %s port (C) 2005 Lee Nicks " | ||
251 | "(allinux@gmail.com)\n", BOARD_VENDOR, BOARD_MACHINE); | ||
252 | if (ppc_md.progress) | ||
253 | ppc_md.progress("ev64360_setup_arch: exit", 0); | ||
254 | } | ||
255 | |||
256 | /* Platform device data fixup routines. */ | ||
257 | #if defined(CONFIG_SERIAL_MPSC) | ||
258 | static void __init | ||
259 | ev64360_fixup_mpsc_pdata(struct platform_device *pdev) | ||
260 | { | ||
261 | struct mpsc_pdata *pdata; | ||
262 | |||
263 | pdata = (struct mpsc_pdata *)pdev->dev.platform_data; | ||
264 | |||
265 | pdata->max_idle = 40; | ||
266 | pdata->default_baud = EV64360_DEFAULT_BAUD; | ||
267 | pdata->brg_clk_src = EV64360_MPSC_CLK_SRC; | ||
268 | /* | ||
269 | * TCLK (not SysCLk) is routed to BRG, then to the MPSC. On most parts, | ||
270 | * TCLK == SysCLK but on 64460, they are separate pins. | ||
271 | * SysCLK can go up to 200 MHz but TCLK can only go up to 133 MHz. | ||
272 | */ | ||
273 | pdata->brg_clk_freq = min(ev64360_bus_frequency, MV64x60_TCLK_FREQ_MAX); | ||
274 | } | ||
275 | #endif | ||
276 | |||
277 | #if defined(CONFIG_MV643XX_ETH) | ||
278 | static void __init | ||
279 | ev64360_fixup_eth_pdata(struct platform_device *pdev) | ||
280 | { | ||
281 | struct mv643xx_eth_platform_data *eth_pd; | ||
282 | static u16 phy_addr[] = { | ||
283 | EV64360_ETH0_PHY_ADDR, | ||
284 | EV64360_ETH1_PHY_ADDR, | ||
285 | EV64360_ETH2_PHY_ADDR, | ||
286 | }; | ||
287 | |||
288 | eth_pd = pdev->dev.platform_data; | ||
289 | eth_pd->force_phy_addr = 1; | ||
290 | eth_pd->phy_addr = phy_addr[pdev->id]; | ||
291 | eth_pd->tx_queue_size = EV64360_ETH_TX_QUEUE_SIZE; | ||
292 | eth_pd->rx_queue_size = EV64360_ETH_RX_QUEUE_SIZE; | ||
293 | } | ||
294 | #endif | ||
295 | |||
296 | static int __init | ||
297 | ev64360_platform_notify(struct device *dev) | ||
298 | { | ||
299 | static struct { | ||
300 | char *bus_id; | ||
301 | void ((*rtn)(struct platform_device *pdev)); | ||
302 | } dev_map[] = { | ||
303 | #if defined(CONFIG_SERIAL_MPSC) | ||
304 | { MPSC_CTLR_NAME ".0", ev64360_fixup_mpsc_pdata }, | ||
305 | { MPSC_CTLR_NAME ".1", ev64360_fixup_mpsc_pdata }, | ||
306 | #endif | ||
307 | #if defined(CONFIG_MV643XX_ETH) | ||
308 | { MV643XX_ETH_NAME ".0", ev64360_fixup_eth_pdata }, | ||
309 | { MV643XX_ETH_NAME ".1", ev64360_fixup_eth_pdata }, | ||
310 | { MV643XX_ETH_NAME ".2", ev64360_fixup_eth_pdata }, | ||
311 | #endif | ||
312 | }; | ||
313 | struct platform_device *pdev; | ||
314 | int i; | ||
315 | |||
316 | if (dev && dev->bus_id) | ||
317 | for (i=0; i<ARRAY_SIZE(dev_map); i++) | ||
318 | if (!strncmp(dev->bus_id, dev_map[i].bus_id, | ||
319 | BUS_ID_SIZE)) { | ||
320 | |||
321 | pdev = container_of(dev, | ||
322 | struct platform_device, dev); | ||
323 | dev_map[i].rtn(pdev); | ||
324 | } | ||
325 | |||
326 | return 0; | ||
327 | } | ||
328 | |||
329 | #ifdef CONFIG_MTD_PHYSMAP | ||
330 | |||
331 | #ifndef MB | ||
332 | #define MB (1 << 20) | ||
333 | #endif | ||
334 | |||
335 | /* | ||
336 | * MTD Layout. | ||
337 | * | ||
338 | * FLASH Amount: 0xff000000 - 0xffffffff | ||
339 | * ------------- ----------------------- | ||
340 | * Reserved: 0xff000000 - 0xff03ffff | ||
341 | * JFFS2 file system: 0xff040000 - 0xffefffff | ||
342 | * U-boot: 0xfff00000 - 0xffffffff | ||
343 | */ | ||
344 | static int __init | ||
345 | ev64360_setup_mtd(void) | ||
346 | { | ||
347 | u32 size; | ||
348 | int ptbl_entries; | ||
349 | static struct mtd_partition *ptbl; | ||
350 | |||
351 | size = ev64360_flash_size_0 + ev64360_flash_size_1; | ||
352 | if (!size) | ||
353 | return -ENOMEM; | ||
354 | |||
355 | ptbl_entries = 3; | ||
356 | |||
357 | if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), | ||
358 | GFP_KERNEL)) == NULL) { | ||
359 | |||
360 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); | ||
361 | return -ENOMEM; | ||
362 | } | ||
363 | memset(ptbl, 0, ptbl_entries * sizeof(struct mtd_partition)); | ||
364 | |||
365 | ptbl[0].name = "reserved"; | ||
366 | ptbl[0].offset = 0; | ||
367 | ptbl[0].size = EV64360_MTD_RESERVED_SIZE; | ||
368 | ptbl[1].name = "jffs2"; | ||
369 | ptbl[1].offset = EV64360_MTD_RESERVED_SIZE; | ||
370 | ptbl[1].size = EV64360_MTD_JFFS2_SIZE; | ||
371 | ptbl[2].name = "U-BOOT"; | ||
372 | ptbl[2].offset = EV64360_MTD_RESERVED_SIZE + EV64360_MTD_JFFS2_SIZE; | ||
373 | ptbl[2].size = EV64360_MTD_UBOOT_SIZE; | ||
374 | |||
375 | physmap_map.size = size; | ||
376 | physmap_set_partitions(ptbl, ptbl_entries); | ||
377 | return 0; | ||
378 | } | ||
379 | |||
380 | arch_initcall(ev64360_setup_mtd); | ||
381 | #endif | ||
382 | |||
383 | static void | ||
384 | ev64360_restart(char *cmd) | ||
385 | { | ||
386 | ulong i = 0xffffffff; | ||
387 | volatile unsigned char * rtc_base = ioremap(EV64360_RTC_WINDOW_BASE,0x4000); | ||
388 | |||
389 | /* issue hard reset */ | ||
390 | rtc_base[0xf] = 0x80; | ||
391 | rtc_base[0xc] = 0x00; | ||
392 | rtc_base[0xd] = 0x01; | ||
393 | rtc_base[0xf] = 0x83; | ||
394 | |||
395 | while (i-- > 0) ; | ||
396 | panic("restart failed\n"); | ||
397 | } | ||
398 | |||
399 | static void | ||
400 | ev64360_halt(void) | ||
401 | { | ||
402 | while (1) ; | ||
403 | /* NOTREACHED */ | ||
404 | } | ||
405 | |||
406 | static void | ||
407 | ev64360_power_off(void) | ||
408 | { | ||
409 | ev64360_halt(); | ||
410 | /* NOTREACHED */ | ||
411 | } | ||
412 | |||
413 | static int | ||
414 | ev64360_show_cpuinfo(struct seq_file *m) | ||
415 | { | ||
416 | seq_printf(m, "vendor\t\t: " BOARD_VENDOR "\n"); | ||
417 | seq_printf(m, "machine\t\t: " BOARD_MACHINE "\n"); | ||
418 | seq_printf(m, "bus speed\t: %dMHz\n", ev64360_bus_frequency/1000/1000); | ||
419 | |||
420 | return 0; | ||
421 | } | ||
422 | |||
423 | static void __init | ||
424 | ev64360_calibrate_decr(void) | ||
425 | { | ||
426 | u32 freq; | ||
427 | |||
428 | freq = ev64360_bus_frequency / 4; | ||
429 | |||
430 | printk(KERN_INFO "time_init: decrementer frequency = %lu.%.6lu MHz\n", | ||
431 | (long)freq / 1000000, (long)freq % 1000000); | ||
432 | |||
433 | tb_ticks_per_jiffy = freq / HZ; | ||
434 | tb_to_us = mulhwu_scale_factor(freq, 1000000); | ||
435 | } | ||
436 | |||
437 | unsigned long __init | ||
438 | ev64360_find_end_of_memory(void) | ||
439 | { | ||
440 | return mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE, | ||
441 | MV64x60_TYPE_MV64360); | ||
442 | } | ||
443 | |||
444 | static inline void | ||
445 | ev64360_set_bat(void) | ||
446 | { | ||
447 | mb(); | ||
448 | mtspr(SPRN_DBAT2U, 0xf0001ffe); | ||
449 | mtspr(SPRN_DBAT2L, 0xf000002a); | ||
450 | mb(); | ||
451 | } | ||
452 | |||
453 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) | ||
454 | static void __init | ||
455 | ev64360_map_io(void) | ||
456 | { | ||
457 | io_block_mapping(CONFIG_MV64X60_NEW_BASE, \ | ||
458 | CONFIG_MV64X60_NEW_BASE, \ | ||
459 | 0x00020000, _PAGE_IO); | ||
460 | } | ||
461 | #endif | ||
462 | |||
463 | void __init | ||
464 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
465 | unsigned long r6, unsigned long r7) | ||
466 | { | ||
467 | parse_bootinfo(find_bootinfo()); | ||
468 | |||
469 | /* ASSUMPTION: If both r3 (bd_t pointer) and r6 (cmdline pointer) | ||
470 | * are non-zero, then we should use the board info from the bd_t | ||
471 | * structure and the cmdline pointed to by r6 instead of the | ||
472 | * information from birecs, if any. Otherwise, use the information | ||
473 | * from birecs as discovered by the preceeding call to | ||
474 | * parse_bootinfo(). This rule should work with both PPCBoot, which | ||
475 | * uses a bd_t board info structure, and the kernel boot wrapper, | ||
476 | * which uses birecs. | ||
477 | */ | ||
478 | if (r3 && r6) { | ||
479 | /* copy board info structure */ | ||
480 | memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) ); | ||
481 | /* copy command line */ | ||
482 | *(char *)(r7+KERNELBASE) = 0; | ||
483 | strcpy(cmd_line, (char *)(r6+KERNELBASE)); | ||
484 | } | ||
485 | #ifdef CONFIG_ISA | ||
486 | isa_mem_base = 0; | ||
487 | #endif | ||
488 | |||
489 | ppc_md.setup_arch = ev64360_setup_arch; | ||
490 | ppc_md.show_cpuinfo = ev64360_show_cpuinfo; | ||
491 | ppc_md.init_IRQ = mv64360_init_irq; | ||
492 | ppc_md.get_irq = mv64360_get_irq; | ||
493 | ppc_md.restart = ev64360_restart; | ||
494 | ppc_md.power_off = ev64360_power_off; | ||
495 | ppc_md.halt = ev64360_halt; | ||
496 | ppc_md.find_end_of_memory = ev64360_find_end_of_memory; | ||
497 | ppc_md.calibrate_decr = ev64360_calibrate_decr; | ||
498 | |||
499 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) | ||
500 | ppc_md.setup_io_mappings = ev64360_map_io; | ||
501 | ppc_md.progress = mv64x60_mpsc_progress; | ||
502 | mv64x60_progress_init(CONFIG_MV64X60_NEW_BASE); | ||
503 | #endif | ||
504 | |||
505 | #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) | ||
506 | platform_notify = ev64360_platform_notify; | ||
507 | #endif | ||
508 | |||
509 | ev64360_set_bat(); /* Need for ev64360_find_end_of_memory and progress */ | ||
510 | } | ||
diff --git a/arch/ppc/platforms/ev64360.h b/arch/ppc/platforms/ev64360.h new file mode 100644 index 000000000000..68eabe490397 --- /dev/null +++ b/arch/ppc/platforms/ev64360.h | |||
@@ -0,0 +1,116 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/ev64360.h | ||
3 | * | ||
4 | * Definitions for Marvell EV-64360-BP Evaluation Board. | ||
5 | * | ||
6 | * Author: Lee Nicks <allinux@gmail.com> | ||
7 | * | ||
8 | * Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il | ||
9 | * Based on code done by Mark A. Greer <mgreer@mvista.com> | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * The MV64360 has 2 PCI buses each with 1 window from the CPU bus to | ||
19 | * PCI I/O space and 4 windows from the CPU bus to PCI MEM space. | ||
20 | * We'll only use one PCI MEM window on each PCI bus. | ||
21 | * | ||
22 | * This is the CPU physical memory map (windows must be at least 64KB and start | ||
23 | * on a boundary that is a multiple of the window size): | ||
24 | * | ||
25 | * 0x42000000-0x4203ffff - Internal SRAM | ||
26 | * 0xf1000000-0xf100ffff - MV64360 Registers (CONFIG_MV64X60_NEW_BASE) | ||
27 | * 0xfc800000-0xfcffffff - RTC | ||
28 | * 0xff000000-0xffffffff - Boot window, 16 MB flash | ||
29 | * 0xc0000000-0xc3ffffff - PCI I/O (second hose) | ||
30 | * 0x80000000-0xbfffffff - PCI MEM (second hose) | ||
31 | */ | ||
32 | |||
33 | #ifndef __PPC_PLATFORMS_EV64360_H | ||
34 | #define __PPC_PLATFORMS_EV64360_H | ||
35 | |||
36 | /* CPU Physical Memory Map setup. */ | ||
37 | #define EV64360_BOOT_WINDOW_BASE 0xff000000 | ||
38 | #define EV64360_BOOT_WINDOW_SIZE 0x01000000 /* 16 MB */ | ||
39 | #define EV64360_INTERNAL_SRAM_BASE 0x42000000 | ||
40 | #define EV64360_RTC_WINDOW_BASE 0xfc800000 | ||
41 | #define EV64360_RTC_WINDOW_SIZE 0x00800000 /* 8 MB */ | ||
42 | |||
43 | #define EV64360_PCI1_MEM_START_PROC_ADDR 0x80000000 | ||
44 | #define EV64360_PCI1_MEM_START_PCI_HI_ADDR 0x00000000 | ||
45 | #define EV64360_PCI1_MEM_START_PCI_LO_ADDR 0x80000000 | ||
46 | #define EV64360_PCI1_MEM_SIZE 0x40000000 /* 1 GB */ | ||
47 | #define EV64360_PCI1_IO_START_PROC_ADDR 0xc0000000 | ||
48 | #define EV64360_PCI1_IO_START_PCI_ADDR 0x00000000 | ||
49 | #define EV64360_PCI1_IO_SIZE 0x04000000 /* 64 MB */ | ||
50 | |||
51 | #define EV64360_DEFAULT_BAUD 115200 | ||
52 | #define EV64360_MPSC_CLK_SRC 8 /* TCLK */ | ||
53 | #define EV64360_MPSC_CLK_FREQ 133333333 | ||
54 | |||
55 | #define EV64360_MTD_RESERVED_SIZE 0x40000 | ||
56 | #define EV64360_MTD_JFFS2_SIZE 0xec0000 | ||
57 | #define EV64360_MTD_UBOOT_SIZE 0x100000 | ||
58 | |||
59 | #define EV64360_ETH0_PHY_ADDR 8 | ||
60 | #define EV64360_ETH1_PHY_ADDR 9 | ||
61 | #define EV64360_ETH2_PHY_ADDR 10 | ||
62 | |||
63 | #define EV64360_ETH_TX_QUEUE_SIZE 800 | ||
64 | #define EV64360_ETH_RX_QUEUE_SIZE 400 | ||
65 | |||
66 | #define EV64360_ETH_PORT_CONFIG_VALUE \ | ||
67 | ETH_UNICAST_NORMAL_MODE | \ | ||
68 | ETH_DEFAULT_RX_QUEUE_0 | \ | ||
69 | ETH_DEFAULT_RX_ARP_QUEUE_0 | \ | ||
70 | ETH_RECEIVE_BC_IF_NOT_IP_OR_ARP | \ | ||
71 | ETH_RECEIVE_BC_IF_IP | \ | ||
72 | ETH_RECEIVE_BC_IF_ARP | \ | ||
73 | ETH_CAPTURE_TCP_FRAMES_DIS | \ | ||
74 | ETH_CAPTURE_UDP_FRAMES_DIS | \ | ||
75 | ETH_DEFAULT_RX_TCP_QUEUE_0 | \ | ||
76 | ETH_DEFAULT_RX_UDP_QUEUE_0 | \ | ||
77 | ETH_DEFAULT_RX_BPDU_QUEUE_0 | ||
78 | |||
79 | #define EV64360_ETH_PORT_CONFIG_EXTEND_VALUE \ | ||
80 | ETH_SPAN_BPDU_PACKETS_AS_NORMAL | \ | ||
81 | ETH_PARTITION_DISABLE | ||
82 | |||
83 | #define GT_ETH_IPG_INT_RX(value) \ | ||
84 | ((value & 0x3fff) << 8) | ||
85 | |||
86 | #define EV64360_ETH_PORT_SDMA_CONFIG_VALUE \ | ||
87 | ETH_RX_BURST_SIZE_4_64BIT | \ | ||
88 | GT_ETH_IPG_INT_RX(0) | \ | ||
89 | ETH_TX_BURST_SIZE_4_64BIT | ||
90 | |||
91 | #define EV64360_ETH_PORT_SERIAL_CONTROL_VALUE \ | ||
92 | ETH_FORCE_LINK_PASS | \ | ||
93 | ETH_ENABLE_AUTO_NEG_FOR_DUPLX | \ | ||
94 | ETH_DISABLE_AUTO_NEG_FOR_FLOW_CTRL | \ | ||
95 | ETH_ADV_SYMMETRIC_FLOW_CTRL | \ | ||
96 | ETH_FORCE_FC_MODE_NO_PAUSE_DIS_TX | \ | ||
97 | ETH_FORCE_BP_MODE_NO_JAM | \ | ||
98 | BIT9 | \ | ||
99 | ETH_DO_NOT_FORCE_LINK_FAIL | \ | ||
100 | ETH_RETRANSMIT_16_ATTEMPTS | \ | ||
101 | ETH_ENABLE_AUTO_NEG_SPEED_GMII | \ | ||
102 | ETH_DTE_ADV_0 | \ | ||
103 | ETH_DISABLE_AUTO_NEG_BYPASS | \ | ||
104 | ETH_AUTO_NEG_NO_CHANGE | \ | ||
105 | ETH_MAX_RX_PACKET_9700BYTE | \ | ||
106 | ETH_CLR_EXT_LOOPBACK | \ | ||
107 | ETH_SET_FULL_DUPLEX_MODE | \ | ||
108 | ETH_ENABLE_FLOW_CTRL_TX_RX_IN_FULL_DUPLEX | ||
109 | |||
110 | static inline u32 | ||
111 | ev64360_bus_freq(void) | ||
112 | { | ||
113 | return 133333333; | ||
114 | } | ||
115 | |||
116 | #endif /* __PPC_PLATFORMS_EV64360_H */ | ||
diff --git a/arch/ppc/platforms/k2.c b/arch/ppc/platforms/k2.c deleted file mode 100644 index aacb438708ff..000000000000 --- a/arch/ppc/platforms/k2.c +++ /dev/null | |||
@@ -1,613 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/k2.c | ||
3 | * | ||
4 | * Board setup routines for SBS K2 | ||
5 | * | ||
6 | * Author: Matt Porter <mporter@mvista.com> | ||
7 | * | ||
8 | * Updated by: Randy Vinson <rvinson@mvista.com. | ||
9 | * | ||
10 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under | ||
11 | * the terms of the GNU General Public License version 2. This program | ||
12 | * is licensed "as is" without any warranty of any kind, whether express | ||
13 | * or implied. | ||
14 | */ | ||
15 | |||
16 | #include <linux/config.h> | ||
17 | #include <linux/stddef.h> | ||
18 | #include <linux/kernel.h> | ||
19 | #include <linux/init.h> | ||
20 | #include <linux/errno.h> | ||
21 | #include <linux/reboot.h> | ||
22 | #include <linux/pci.h> | ||
23 | #include <linux/kdev_t.h> | ||
24 | #include <linux/types.h> | ||
25 | #include <linux/major.h> | ||
26 | #include <linux/initrd.h> | ||
27 | #include <linux/console.h> | ||
28 | #include <linux/delay.h> | ||
29 | #include <linux/ide.h> | ||
30 | #include <linux/irq.h> | ||
31 | #include <linux/seq_file.h> | ||
32 | #include <linux/root_dev.h> | ||
33 | |||
34 | #include <asm/system.h> | ||
35 | #include <asm/pgtable.h> | ||
36 | #include <asm/page.h> | ||
37 | #include <asm/dma.h> | ||
38 | #include <asm/io.h> | ||
39 | #include <asm/machdep.h> | ||
40 | #include <asm/time.h> | ||
41 | #include <asm/i8259.h> | ||
42 | #include <asm/todc.h> | ||
43 | #include <asm/bootinfo.h> | ||
44 | |||
45 | #include <syslib/cpc710.h> | ||
46 | #include "k2.h" | ||
47 | |||
48 | extern unsigned long loops_per_jiffy; | ||
49 | extern void gen550_progress(char *, unsigned short); | ||
50 | |||
51 | static unsigned int cpu_7xx[16] = { | ||
52 | 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0 | ||
53 | }; | ||
54 | static unsigned int cpu_6xx[16] = { | ||
55 | 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0 | ||
56 | }; | ||
57 | |||
58 | static inline int __init | ||
59 | k2_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
60 | { | ||
61 | struct pci_controller *hose = pci_bus_to_hose(dev->bus->number); | ||
62 | /* | ||
63 | * Check our hose index. If we are zero then we are on the | ||
64 | * local PCI hose, otherwise we are on the cPCI hose. | ||
65 | */ | ||
66 | if (!hose->index) { | ||
67 | static char pci_irq_table[][4] = | ||
68 | /* | ||
69 | * PCI IDSEL/INTPIN->INTLINE | ||
70 | * A B C D | ||
71 | */ | ||
72 | { | ||
73 | {1, 0, 0, 0}, /* Ethernet */ | ||
74 | {5, 5, 5, 5}, /* PMC Site 1 */ | ||
75 | {6, 6, 6, 6}, /* PMC Site 2 */ | ||
76 | {0, 0, 0, 0}, /* unused */ | ||
77 | {0, 0, 0, 0}, /* unused */ | ||
78 | {0, 0, 0, 0}, /* PCI-ISA Bridge */ | ||
79 | {0, 0, 0, 0}, /* unused */ | ||
80 | {0, 0, 0, 0}, /* unused */ | ||
81 | {0, 0, 0, 0}, /* unused */ | ||
82 | {0, 0, 0, 0}, /* unused */ | ||
83 | {0, 0, 0, 0}, /* unused */ | ||
84 | {0, 0, 0, 0}, /* unused */ | ||
85 | {0, 0, 0, 0}, /* unused */ | ||
86 | {0, 0, 0, 0}, /* unused */ | ||
87 | {15, 0, 0, 0}, /* M5229 IDE */ | ||
88 | }; | ||
89 | const long min_idsel = 3, max_idsel = 17, irqs_per_slot = 4; | ||
90 | return PCI_IRQ_TABLE_LOOKUP; | ||
91 | } else { | ||
92 | static char pci_irq_table[][4] = | ||
93 | /* | ||
94 | * PCI IDSEL/INTPIN->INTLINE | ||
95 | * A B C D | ||
96 | */ | ||
97 | { | ||
98 | {10, 11, 12, 9}, /* cPCI slot 8 */ | ||
99 | {11, 12, 9, 10}, /* cPCI slot 7 */ | ||
100 | {12, 9, 10, 11}, /* cPCI slot 6 */ | ||
101 | {9, 10, 11, 12}, /* cPCI slot 5 */ | ||
102 | {10, 11, 12, 9}, /* cPCI slot 4 */ | ||
103 | {11, 12, 9, 10}, /* cPCI slot 3 */ | ||
104 | {12, 9, 10, 11}, /* cPCI slot 2 */ | ||
105 | }; | ||
106 | const long min_idsel = 15, max_idsel = 21, irqs_per_slot = 4; | ||
107 | return PCI_IRQ_TABLE_LOOKUP; | ||
108 | } | ||
109 | } | ||
110 | |||
111 | void k2_pcibios_fixup(void) | ||
112 | { | ||
113 | #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) | ||
114 | struct pci_dev *ide_dev; | ||
115 | |||
116 | /* | ||
117 | * Enable DMA support on hdc | ||
118 | */ | ||
119 | ide_dev = pci_get_device(PCI_VENDOR_ID_AL, | ||
120 | PCI_DEVICE_ID_AL_M5229, NULL); | ||
121 | |||
122 | if (ide_dev) { | ||
123 | |||
124 | unsigned long ide_dma_base; | ||
125 | |||
126 | ide_dma_base = pci_resource_start(ide_dev, 4); | ||
127 | outb(0x00, ide_dma_base + 0x2); | ||
128 | outb(0x20, ide_dma_base + 0xa); | ||
129 | pci_dev_put(ide_dev); | ||
130 | } | ||
131 | #endif | ||
132 | } | ||
133 | |||
134 | void k2_pcibios_fixup_resources(struct pci_dev *dev) | ||
135 | { | ||
136 | int i; | ||
137 | |||
138 | if ((dev->vendor == PCI_VENDOR_ID_IBM) && | ||
139 | (dev->device == PCI_DEVICE_ID_IBM_CPC710_PCI64)) { | ||
140 | pr_debug("Fixup CPC710 resources\n"); | ||
141 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { | ||
142 | dev->resource[i].start = 0; | ||
143 | dev->resource[i].end = 0; | ||
144 | } | ||
145 | } | ||
146 | } | ||
147 | |||
148 | void k2_setup_hoses(void) | ||
149 | { | ||
150 | struct pci_controller *hose_a, *hose_b; | ||
151 | |||
152 | /* | ||
153 | * Reconfigure CPC710 memory map so | ||
154 | * we have some more PCI memory space. | ||
155 | */ | ||
156 | |||
157 | /* Set FPHB mode */ | ||
158 | __raw_writel(0x808000e0, PGCHP); /* Set FPHB mode */ | ||
159 | |||
160 | /* PCI32 mappings */ | ||
161 | __raw_writel(0x00000000, K2_PCI32_BAR + PIBAR); /* PCI I/O base */ | ||
162 | __raw_writel(0x00000000, K2_PCI32_BAR + PMBAR); /* PCI Mem base */ | ||
163 | __raw_writel(0xf0000000, K2_PCI32_BAR + MSIZE); /* 256MB */ | ||
164 | __raw_writel(0xfff00000, K2_PCI32_BAR + IOSIZE); /* 1MB */ | ||
165 | __raw_writel(0xc0000000, K2_PCI32_BAR + SMBAR); /* Base@0xc0000000 */ | ||
166 | __raw_writel(0x80000000, K2_PCI32_BAR + SIBAR); /* Base@0x80000000 */ | ||
167 | __raw_writel(0x000000c0, K2_PCI32_BAR + PSSIZE); /* 1GB space */ | ||
168 | __raw_writel(0x000000c0, K2_PCI32_BAR + PPSIZE); /* 1GB space */ | ||
169 | __raw_writel(0x00000000, K2_PCI32_BAR + BARPS); /* Base@0x00000000 */ | ||
170 | __raw_writel(0x00000000, K2_PCI32_BAR + BARPP); /* Base@0x00000000 */ | ||
171 | __raw_writel(0x00000080, K2_PCI32_BAR + PSBAR); /* Base@0x80 */ | ||
172 | __raw_writel(0x00000000, K2_PCI32_BAR + PPBAR); | ||
173 | |||
174 | __raw_writel(0xc0000000, K2_PCI32_BAR + BPMDLK); | ||
175 | __raw_writel(0xd0000000, K2_PCI32_BAR + TPMDLK); | ||
176 | __raw_writel(0x80000000, K2_PCI32_BAR + BIODLK); | ||
177 | __raw_writel(0x80100000, K2_PCI32_BAR + TIODLK); | ||
178 | __raw_writel(0xe0008000, K2_PCI32_BAR + DLKCTRL); | ||
179 | __raw_writel(0xffffffff, K2_PCI32_BAR + DLKDEV); | ||
180 | |||
181 | /* PCI64 mappings */ | ||
182 | __raw_writel(0x00100000, K2_PCI64_BAR + PIBAR); /* PCI I/O base */ | ||
183 | __raw_writel(0x10000000, K2_PCI64_BAR + PMBAR); /* PCI Mem base */ | ||
184 | __raw_writel(0xf0000000, K2_PCI64_BAR + MSIZE); /* 256MB */ | ||
185 | __raw_writel(0xfff00000, K2_PCI64_BAR + IOSIZE); /* 1MB */ | ||
186 | __raw_writel(0xd0000000, K2_PCI64_BAR + SMBAR); /* Base@0xd0000000 */ | ||
187 | __raw_writel(0x80100000, K2_PCI64_BAR + SIBAR); /* Base@0x80100000 */ | ||
188 | __raw_writel(0x000000c0, K2_PCI64_BAR + PSSIZE); /* 1GB space */ | ||
189 | __raw_writel(0x000000c0, K2_PCI64_BAR + PPSIZE); /* 1GB space */ | ||
190 | __raw_writel(0x00000000, K2_PCI64_BAR + BARPS); /* Base@0x00000000 */ | ||
191 | __raw_writel(0x00000000, K2_PCI64_BAR + BARPP); /* Base@0x00000000 */ | ||
192 | |||
193 | /* Setup PCI32 hose */ | ||
194 | hose_a = pcibios_alloc_controller(); | ||
195 | if (!hose_a) | ||
196 | return; | ||
197 | |||
198 | hose_a->first_busno = 0; | ||
199 | hose_a->last_busno = 0xff; | ||
200 | hose_a->pci_mem_offset = K2_PCI32_MEM_BASE; | ||
201 | |||
202 | pci_init_resource(&hose_a->io_resource, | ||
203 | K2_PCI32_LOWER_IO, | ||
204 | K2_PCI32_UPPER_IO, | ||
205 | IORESOURCE_IO, "PCI32 host bridge"); | ||
206 | |||
207 | pci_init_resource(&hose_a->mem_resources[0], | ||
208 | K2_PCI32_LOWER_MEM + K2_PCI32_MEM_BASE, | ||
209 | K2_PCI32_UPPER_MEM + K2_PCI32_MEM_BASE, | ||
210 | IORESOURCE_MEM, "PCI32 host bridge"); | ||
211 | |||
212 | hose_a->io_space.start = K2_PCI32_LOWER_IO; | ||
213 | hose_a->io_space.end = K2_PCI32_UPPER_IO; | ||
214 | hose_a->mem_space.start = K2_PCI32_LOWER_MEM; | ||
215 | hose_a->mem_space.end = K2_PCI32_UPPER_MEM; | ||
216 | hose_a->io_base_virt = (void *)K2_ISA_IO_BASE; | ||
217 | |||
218 | setup_indirect_pci(hose_a, K2_PCI32_CONFIG_ADDR, K2_PCI32_CONFIG_DATA); | ||
219 | |||
220 | /* Initialize PCI32 bus registers */ | ||
221 | early_write_config_byte(hose_a, | ||
222 | hose_a->first_busno, | ||
223 | PCI_DEVFN(0, 0), | ||
224 | CPC710_BUS_NUMBER, hose_a->first_busno); | ||
225 | |||
226 | early_write_config_byte(hose_a, | ||
227 | hose_a->first_busno, | ||
228 | PCI_DEVFN(0, 0), | ||
229 | CPC710_SUB_BUS_NUMBER, hose_a->last_busno); | ||
230 | |||
231 | /* Enable PCI interrupt polling */ | ||
232 | early_write_config_byte(hose_a, | ||
233 | hose_a->first_busno, | ||
234 | PCI_DEVFN(8, 0), 0x45, 0x80); | ||
235 | |||
236 | /* Route polled PCI interrupts */ | ||
237 | early_write_config_byte(hose_a, | ||
238 | hose_a->first_busno, | ||
239 | PCI_DEVFN(8, 0), 0x48, 0x58); | ||
240 | |||
241 | early_write_config_byte(hose_a, | ||
242 | hose_a->first_busno, | ||
243 | PCI_DEVFN(8, 0), 0x49, 0x07); | ||
244 | |||
245 | early_write_config_byte(hose_a, | ||
246 | hose_a->first_busno, | ||
247 | PCI_DEVFN(8, 0), 0x4a, 0x31); | ||
248 | |||
249 | early_write_config_byte(hose_a, | ||
250 | hose_a->first_busno, | ||
251 | PCI_DEVFN(8, 0), 0x4b, 0xb9); | ||
252 | |||
253 | /* route secondary IDE channel interrupt to IRQ 15 */ | ||
254 | early_write_config_byte(hose_a, | ||
255 | hose_a->first_busno, | ||
256 | PCI_DEVFN(8, 0), 0x75, 0x0f); | ||
257 | |||
258 | /* enable IDE controller IDSEL */ | ||
259 | early_write_config_byte(hose_a, | ||
260 | hose_a->first_busno, | ||
261 | PCI_DEVFN(8, 0), 0x58, 0x48); | ||
262 | |||
263 | /* Enable IDE function */ | ||
264 | early_write_config_byte(hose_a, | ||
265 | hose_a->first_busno, | ||
266 | PCI_DEVFN(17, 0), 0x50, 0x03); | ||
267 | |||
268 | /* Set M5229 IDE controller to native mode */ | ||
269 | early_write_config_byte(hose_a, | ||
270 | hose_a->first_busno, | ||
271 | PCI_DEVFN(17, 0), PCI_CLASS_PROG, 0xdf); | ||
272 | |||
273 | hose_a->last_busno = pciauto_bus_scan(hose_a, hose_a->first_busno); | ||
274 | |||
275 | /* Write out correct max subordinate bus number for hose A */ | ||
276 | early_write_config_byte(hose_a, | ||
277 | hose_a->first_busno, | ||
278 | PCI_DEVFN(0, 0), | ||
279 | CPC710_SUB_BUS_NUMBER, hose_a->last_busno); | ||
280 | |||
281 | /* Only setup PCI64 hose if we are in the system slot */ | ||
282 | if (!(readb(K2_MISC_REG) & K2_SYS_SLOT_MASK)) { | ||
283 | /* Setup PCI64 hose */ | ||
284 | hose_b = pcibios_alloc_controller(); | ||
285 | if (!hose_b) | ||
286 | return; | ||
287 | |||
288 | hose_b->first_busno = hose_a->last_busno + 1; | ||
289 | hose_b->last_busno = 0xff; | ||
290 | |||
291 | /* Reminder: quit changing the following, it is correct. */ | ||
292 | hose_b->pci_mem_offset = K2_PCI32_MEM_BASE; | ||
293 | |||
294 | pci_init_resource(&hose_b->io_resource, | ||
295 | K2_PCI64_LOWER_IO, | ||
296 | K2_PCI64_UPPER_IO, | ||
297 | IORESOURCE_IO, "PCI64 host bridge"); | ||
298 | |||
299 | pci_init_resource(&hose_b->mem_resources[0], | ||
300 | K2_PCI64_LOWER_MEM + K2_PCI32_MEM_BASE, | ||
301 | K2_PCI64_UPPER_MEM + K2_PCI32_MEM_BASE, | ||
302 | IORESOURCE_MEM, "PCI64 host bridge"); | ||
303 | |||
304 | hose_b->io_space.start = K2_PCI64_LOWER_IO; | ||
305 | hose_b->io_space.end = K2_PCI64_UPPER_IO; | ||
306 | hose_b->mem_space.start = K2_PCI64_LOWER_MEM; | ||
307 | hose_b->mem_space.end = K2_PCI64_UPPER_MEM; | ||
308 | hose_b->io_base_virt = (void *)K2_ISA_IO_BASE; | ||
309 | |||
310 | setup_indirect_pci(hose_b, | ||
311 | K2_PCI64_CONFIG_ADDR, K2_PCI64_CONFIG_DATA); | ||
312 | |||
313 | /* Initialize PCI64 bus registers */ | ||
314 | early_write_config_byte(hose_b, | ||
315 | 0, | ||
316 | PCI_DEVFN(0, 0), | ||
317 | CPC710_SUB_BUS_NUMBER, 0xff); | ||
318 | |||
319 | early_write_config_byte(hose_b, | ||
320 | 0, | ||
321 | PCI_DEVFN(0, 0), | ||
322 | CPC710_BUS_NUMBER, hose_b->first_busno); | ||
323 | |||
324 | hose_b->last_busno = pciauto_bus_scan(hose_b, | ||
325 | hose_b->first_busno); | ||
326 | |||
327 | /* Write out correct max subordinate bus number for hose B */ | ||
328 | early_write_config_byte(hose_b, | ||
329 | hose_b->first_busno, | ||
330 | PCI_DEVFN(0, 0), | ||
331 | CPC710_SUB_BUS_NUMBER, | ||
332 | hose_b->last_busno); | ||
333 | |||
334 | /* Configure PCI64 PSBAR */ | ||
335 | early_write_config_dword(hose_b, | ||
336 | hose_b->first_busno, | ||
337 | PCI_DEVFN(0, 0), | ||
338 | PCI_BASE_ADDRESS_0, | ||
339 | K2_PCI64_SYS_MEM_BASE); | ||
340 | } | ||
341 | |||
342 | /* Configure i8259 level/edge settings */ | ||
343 | outb(0x62, 0x4d0); | ||
344 | outb(0xde, 0x4d1); | ||
345 | |||
346 | #ifdef CONFIG_CPC710_DATA_GATHERING | ||
347 | { | ||
348 | unsigned int tmp; | ||
349 | tmp = __raw_readl(ABCNTL); | ||
350 | /* Enable data gathering on both PCI interfaces */ | ||
351 | __raw_writel(tmp | 0x05000000, ABCNTL); | ||
352 | } | ||
353 | #endif | ||
354 | |||
355 | ppc_md.pcibios_fixup = k2_pcibios_fixup; | ||
356 | ppc_md.pcibios_fixup_resources = k2_pcibios_fixup_resources; | ||
357 | ppc_md.pci_swizzle = common_swizzle; | ||
358 | ppc_md.pci_map_irq = k2_map_irq; | ||
359 | } | ||
360 | |||
361 | static int k2_get_bus_speed(void) | ||
362 | { | ||
363 | int bus_speed; | ||
364 | unsigned char board_id; | ||
365 | |||
366 | board_id = *(unsigned char *)K2_BOARD_ID_REG; | ||
367 | |||
368 | switch (K2_BUS_SPD(board_id)) { | ||
369 | |||
370 | case 0: | ||
371 | default: | ||
372 | bus_speed = 100000000; | ||
373 | break; | ||
374 | |||
375 | case 1: | ||
376 | bus_speed = 83333333; | ||
377 | break; | ||
378 | |||
379 | case 2: | ||
380 | bus_speed = 75000000; | ||
381 | break; | ||
382 | |||
383 | case 3: | ||
384 | bus_speed = 66666666; | ||
385 | break; | ||
386 | } | ||
387 | return bus_speed; | ||
388 | } | ||
389 | |||
390 | static int k2_get_cpu_speed(void) | ||
391 | { | ||
392 | unsigned long hid1; | ||
393 | int cpu_speed; | ||
394 | |||
395 | hid1 = mfspr(SPRN_HID1) >> 28; | ||
396 | |||
397 | if ((mfspr(SPRN_PVR) >> 16) == 8) | ||
398 | hid1 = cpu_7xx[hid1]; | ||
399 | else | ||
400 | hid1 = cpu_6xx[hid1]; | ||
401 | |||
402 | cpu_speed = k2_get_bus_speed() * hid1 / 2; | ||
403 | return cpu_speed; | ||
404 | } | ||
405 | |||
406 | static void __init k2_calibrate_decr(void) | ||
407 | { | ||
408 | int freq, divisor = 4; | ||
409 | |||
410 | /* determine processor bus speed */ | ||
411 | freq = k2_get_bus_speed(); | ||
412 | tb_ticks_per_jiffy = freq / HZ / divisor; | ||
413 | tb_to_us = mulhwu_scale_factor(freq / divisor, 1000000); | ||
414 | } | ||
415 | |||
416 | static int k2_show_cpuinfo(struct seq_file *m) | ||
417 | { | ||
418 | unsigned char k2_geo_bits, k2_system_slot; | ||
419 | |||
420 | seq_printf(m, "vendor\t\t: SBS\n"); | ||
421 | seq_printf(m, "machine\t\t: K2\n"); | ||
422 | seq_printf(m, "cpu speed\t: %dMhz\n", k2_get_cpu_speed() / 1000000); | ||
423 | seq_printf(m, "bus speed\t: %dMhz\n", k2_get_bus_speed() / 1000000); | ||
424 | seq_printf(m, "memory type\t: SDRAM\n"); | ||
425 | |||
426 | k2_geo_bits = readb(K2_MSIZ_GEO_REG) & K2_GEO_ADR_MASK; | ||
427 | k2_system_slot = !(readb(K2_MISC_REG) & K2_SYS_SLOT_MASK); | ||
428 | seq_printf(m, "backplane\t: %s slot board", | ||
429 | k2_system_slot ? "System" : "Non system"); | ||
430 | seq_printf(m, "with geographical address %x\n", k2_geo_bits); | ||
431 | |||
432 | return 0; | ||
433 | } | ||
434 | |||
435 | TODC_ALLOC(); | ||
436 | |||
437 | static void __init k2_setup_arch(void) | ||
438 | { | ||
439 | unsigned int cpu; | ||
440 | |||
441 | /* Setup TODC access */ | ||
442 | TODC_INIT(TODC_TYPE_MK48T37, 0, 0, | ||
443 | ioremap(K2_RTC_BASE_ADDRESS, K2_RTC_SIZE), 8); | ||
444 | |||
445 | /* init to some ~sane value until calibrate_delay() runs */ | ||
446 | loops_per_jiffy = 50000000 / HZ; | ||
447 | |||
448 | /* make FLASH transactions higher priority than PCI to avoid deadlock */ | ||
449 | __raw_writel(__raw_readl(SIOC1) | 0x80000000, SIOC1); | ||
450 | |||
451 | /* Set hardware to access FLASH page 2 */ | ||
452 | __raw_writel(1 << 29, GPOUT); | ||
453 | |||
454 | /* Setup PCI host bridges */ | ||
455 | k2_setup_hoses(); | ||
456 | |||
457 | #ifdef CONFIG_BLK_DEV_INITRD | ||
458 | if (initrd_start) | ||
459 | ROOT_DEV = Root_RAM0; | ||
460 | else | ||
461 | #endif | ||
462 | #ifdef CONFIG_ROOT_NFS | ||
463 | ROOT_DEV = Root_NFS; | ||
464 | #else | ||
465 | ROOT_DEV = Root_HDC1; | ||
466 | #endif | ||
467 | |||
468 | /* Identify the system */ | ||
469 | printk(KERN_INFO "System Identification: SBS K2 - PowerPC 750 @ " | ||
470 | "%d Mhz\n", k2_get_cpu_speed() / 1000000); | ||
471 | printk(KERN_INFO "Port by MontaVista Software, Inc. " | ||
472 | "(source@mvista.com)\n"); | ||
473 | |||
474 | /* Identify the CPU manufacturer */ | ||
475 | cpu = PVR_REV(mfspr(SPRN_PVR)); | ||
476 | printk(KERN_INFO "CPU manufacturer: %s [rev=%04x]\n", | ||
477 | (cpu & (1 << 15)) ? "IBM" : "Motorola", cpu); | ||
478 | } | ||
479 | |||
480 | static void k2_restart(char *cmd) | ||
481 | { | ||
482 | local_irq_disable(); | ||
483 | |||
484 | /* Flip FLASH back to page 1 to access firmware image */ | ||
485 | __raw_writel(0, GPOUT); | ||
486 | |||
487 | /* SRR0 has system reset vector, SRR1 has default MSR value */ | ||
488 | /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ | ||
489 | mtspr(SPRN_SRR0, 0xfff00100); | ||
490 | mtspr(SPRN_SRR1, 0); | ||
491 | __asm__ __volatile__("rfi\n\t"); | ||
492 | |||
493 | /* not reached */ | ||
494 | for (;;) ; | ||
495 | } | ||
496 | |||
497 | static void k2_power_off(void) | ||
498 | { | ||
499 | for (;;) ; | ||
500 | } | ||
501 | |||
502 | static void k2_halt(void) | ||
503 | { | ||
504 | k2_restart(NULL); | ||
505 | } | ||
506 | |||
507 | /* | ||
508 | * Set BAT 3 to map PCI32 I/O space. | ||
509 | */ | ||
510 | static __inline__ void k2_set_bat(void) | ||
511 | { | ||
512 | /* wait for all outstanding memory accesses to complete */ | ||
513 | mb(); | ||
514 | |||
515 | /* setup DBATs */ | ||
516 | mtspr(SPRN_DBAT2U, 0x80001ffe); | ||
517 | mtspr(SPRN_DBAT2L, 0x8000002a); | ||
518 | mtspr(SPRN_DBAT3U, 0xf0001ffe); | ||
519 | mtspr(SPRN_DBAT3L, 0xf000002a); | ||
520 | |||
521 | /* wait for updates */ | ||
522 | mb(); | ||
523 | } | ||
524 | |||
525 | static unsigned long __init k2_find_end_of_memory(void) | ||
526 | { | ||
527 | unsigned long total; | ||
528 | unsigned char msize = 7; /* Default to 128MB */ | ||
529 | |||
530 | msize = K2_MEM_SIZE(readb(K2_MSIZ_GEO_REG)); | ||
531 | |||
532 | switch (msize) { | ||
533 | case 2: | ||
534 | /* | ||
535 | * This will break without a lowered | ||
536 | * KERNELBASE or CONFIG_HIGHMEM on. | ||
537 | * It seems non 1GB builds exist yet, | ||
538 | * though. | ||
539 | */ | ||
540 | total = K2_MEM_SIZE_1GB; | ||
541 | break; | ||
542 | case 3: | ||
543 | case 4: | ||
544 | total = K2_MEM_SIZE_512MB; | ||
545 | break; | ||
546 | case 5: | ||
547 | case 6: | ||
548 | total = K2_MEM_SIZE_256MB; | ||
549 | break; | ||
550 | case 7: | ||
551 | total = K2_MEM_SIZE_128MB; | ||
552 | break; | ||
553 | default: | ||
554 | printk | ||
555 | ("K2: Invalid memory size detected, defaulting to 128MB\n"); | ||
556 | total = K2_MEM_SIZE_128MB; | ||
557 | break; | ||
558 | } | ||
559 | return total; | ||
560 | } | ||
561 | |||
562 | static void __init k2_map_io(void) | ||
563 | { | ||
564 | io_block_mapping(K2_PCI32_IO_BASE, | ||
565 | K2_PCI32_IO_BASE, 0x00200000, _PAGE_IO); | ||
566 | io_block_mapping(0xff000000, 0xff000000, 0x01000000, _PAGE_IO); | ||
567 | } | ||
568 | |||
569 | static void __init k2_init_irq(void) | ||
570 | { | ||
571 | int i; | ||
572 | |||
573 | for (i = 0; i < 16; i++) | ||
574 | irq_desc[i].handler = &i8259_pic; | ||
575 | |||
576 | i8259_init(0); | ||
577 | } | ||
578 | |||
579 | void __init platform_init(unsigned long r3, unsigned long r4, | ||
580 | unsigned long r5, unsigned long r6, unsigned long r7) | ||
581 | { | ||
582 | parse_bootinfo((struct bi_record *)(r3 + KERNELBASE)); | ||
583 | |||
584 | k2_set_bat(); | ||
585 | |||
586 | isa_io_base = K2_ISA_IO_BASE; | ||
587 | isa_mem_base = K2_ISA_MEM_BASE; | ||
588 | pci_dram_offset = K2_PCI32_SYS_MEM_BASE; | ||
589 | |||
590 | ppc_md.setup_arch = k2_setup_arch; | ||
591 | ppc_md.show_cpuinfo = k2_show_cpuinfo; | ||
592 | ppc_md.init_IRQ = k2_init_irq; | ||
593 | ppc_md.get_irq = i8259_irq; | ||
594 | |||
595 | ppc_md.find_end_of_memory = k2_find_end_of_memory; | ||
596 | ppc_md.setup_io_mappings = k2_map_io; | ||
597 | |||
598 | ppc_md.restart = k2_restart; | ||
599 | ppc_md.power_off = k2_power_off; | ||
600 | ppc_md.halt = k2_halt; | ||
601 | |||
602 | ppc_md.time_init = todc_time_init; | ||
603 | ppc_md.set_rtc_time = todc_set_rtc_time; | ||
604 | ppc_md.get_rtc_time = todc_get_rtc_time; | ||
605 | ppc_md.calibrate_decr = k2_calibrate_decr; | ||
606 | |||
607 | ppc_md.nvram_read_val = todc_direct_read_val; | ||
608 | ppc_md.nvram_write_val = todc_direct_write_val; | ||
609 | |||
610 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | ||
611 | ppc_md.progress = gen550_progress; | ||
612 | #endif | ||
613 | } | ||
diff --git a/arch/ppc/platforms/k2.h b/arch/ppc/platforms/k2.h deleted file mode 100644 index 78326aba1988..000000000000 --- a/arch/ppc/platforms/k2.h +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/k2.h | ||
3 | * | ||
4 | * Definitions for SBS K2 board support | ||
5 | * | ||
6 | * Author: Matt Porter <mporter@mvista.com> | ||
7 | * | ||
8 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PPC_PLATFORMS_K2_H | ||
15 | #define __PPC_PLATFORMS_K2_H | ||
16 | |||
17 | /* | ||
18 | * SBS K2 definitions | ||
19 | */ | ||
20 | |||
21 | #define K2_PCI64_BAR 0xff400000 | ||
22 | #define K2_PCI32_BAR 0xff500000 | ||
23 | |||
24 | #define K2_PCI64_CONFIG_ADDR (K2_PCI64_BAR + 0x000f8000) | ||
25 | #define K2_PCI64_CONFIG_DATA (K2_PCI64_BAR + 0x000f8010) | ||
26 | |||
27 | #define K2_PCI32_CONFIG_ADDR (K2_PCI32_BAR + 0x000f8000) | ||
28 | #define K2_PCI32_CONFIG_DATA (K2_PCI32_BAR + 0x000f8010) | ||
29 | |||
30 | #define K2_PCI64_MEM_BASE 0xd0000000 | ||
31 | #define K2_PCI64_IO_BASE 0x80100000 | ||
32 | |||
33 | #define K2_PCI32_MEM_BASE 0xc0000000 | ||
34 | #define K2_PCI32_IO_BASE 0x80000000 | ||
35 | |||
36 | #define K2_PCI32_SYS_MEM_BASE 0x80000000 | ||
37 | #define K2_PCI64_SYS_MEM_BASE K2_PCI32_SYS_MEM_BASE | ||
38 | |||
39 | #define K2_PCI32_LOWER_MEM 0x00000000 | ||
40 | #define K2_PCI32_UPPER_MEM 0x0fffffff | ||
41 | #define K2_PCI32_LOWER_IO 0x00000000 | ||
42 | #define K2_PCI32_UPPER_IO 0x000fffff | ||
43 | |||
44 | #define K2_PCI64_LOWER_MEM 0x10000000 | ||
45 | #define K2_PCI64_UPPER_MEM 0x1fffffff | ||
46 | #define K2_PCI64_LOWER_IO 0x00100000 | ||
47 | #define K2_PCI64_UPPER_IO 0x001fffff | ||
48 | |||
49 | #define K2_ISA_IO_BASE K2_PCI32_IO_BASE | ||
50 | #define K2_ISA_MEM_BASE K2_PCI32_MEM_BASE | ||
51 | |||
52 | #define K2_BOARD_ID_REG (K2_ISA_IO_BASE + 0x800) | ||
53 | #define K2_MISC_REG (K2_ISA_IO_BASE + 0x804) | ||
54 | #define K2_MSIZ_GEO_REG (K2_ISA_IO_BASE + 0x808) | ||
55 | #define K2_HOT_SWAP_REG (K2_ISA_IO_BASE + 0x80c) | ||
56 | #define K2_PLD2_REG (K2_ISA_IO_BASE + 0x80e) | ||
57 | #define K2_PLD3_REG (K2_ISA_IO_BASE + 0x80f) | ||
58 | |||
59 | #define K2_BUS_SPD(board_id) (board_id >> 2) & 3 | ||
60 | |||
61 | #define K2_RTC_BASE_OFFSET 0x90000 | ||
62 | #define K2_RTC_BASE_ADDRESS (K2_PCI32_MEM_BASE + K2_RTC_BASE_OFFSET) | ||
63 | #define K2_RTC_SIZE 0x8000 | ||
64 | |||
65 | #define K2_MEM_SIZE_MASK 0xe0 | ||
66 | #define K2_MEM_SIZE(size_reg) (size_reg & K2_MEM_SIZE_MASK) >> 5 | ||
67 | #define K2_MEM_SIZE_1GB 0x40000000 | ||
68 | #define K2_MEM_SIZE_512MB 0x20000000 | ||
69 | #define K2_MEM_SIZE_256MB 0x10000000 | ||
70 | #define K2_MEM_SIZE_128MB 0x08000000 | ||
71 | |||
72 | #define K2_L2CACHE_MASK 0x03 /* Mask for 2 L2 Cache bits */ | ||
73 | #define K2_L2CACHE_512KB 0x00 /* 512KB */ | ||
74 | #define K2_L2CACHE_256KB 0x01 /* 256KB */ | ||
75 | #define K2_L2CACHE_1MB 0x02 /* 1MB */ | ||
76 | #define K2_L2CACHE_NONE 0x03 /* None */ | ||
77 | |||
78 | #define K2_GEO_ADR_MASK 0x1f | ||
79 | |||
80 | #define K2_SYS_SLOT_MASK 0x08 | ||
81 | |||
82 | #endif /* __PPC_PLATFORMS_K2_H */ | ||
diff --git a/arch/ppc/platforms/katana.c b/arch/ppc/platforms/katana.c index 169dbf6534b9..2b53afae0e9c 100644 --- a/arch/ppc/platforms/katana.c +++ b/arch/ppc/platforms/katana.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <linux/bootimg.h> | 33 | #include <linux/bootimg.h> |
34 | #endif | 34 | #endif |
35 | #include <asm/io.h> | 35 | #include <asm/io.h> |
36 | #include <asm/unistd.h> | ||
36 | #include <asm/page.h> | 37 | #include <asm/page.h> |
37 | #include <asm/time.h> | 38 | #include <asm/time.h> |
38 | #include <asm/smp.h> | 39 | #include <asm/smp.h> |
@@ -42,15 +43,14 @@ | |||
42 | #include <asm/mv64x60.h> | 43 | #include <asm/mv64x60.h> |
43 | #include <platforms/katana.h> | 44 | #include <platforms/katana.h> |
44 | 45 | ||
45 | static struct mv64x60_handle bh; | 46 | static struct mv64x60_handle bh; |
46 | static katana_id_t katana_id; | 47 | static katana_id_t katana_id; |
47 | static void __iomem *cpld_base; | 48 | static void __iomem *cpld_base; |
48 | static void __iomem *sram_base; | 49 | static void __iomem *sram_base; |
49 | 50 | static u32 katana_flash_size_0; | |
50 | static u32 katana_flash_size_0; | 51 | static u32 katana_flash_size_1; |
51 | static u32 katana_flash_size_1; | 52 | static u32 katana_bus_frequency; |
52 | 53 | static struct pci_controller katana_hose_a; | |
53 | static u32 katana_bus_frequency; | ||
54 | 54 | ||
55 | unsigned char __res[sizeof(bd_t)]; | 55 | unsigned char __res[sizeof(bd_t)]; |
56 | 56 | ||
@@ -71,8 +71,12 @@ katana_irq_lookup_750i(unsigned char idsel, unsigned char pin) | |||
71 | KATANA_PCI_INTA_IRQ_750i, KATANA_PCI_INTB_IRQ_750i }, | 71 | KATANA_PCI_INTA_IRQ_750i, KATANA_PCI_INTB_IRQ_750i }, |
72 | /* IDSEL 6 (T8110) */ | 72 | /* IDSEL 6 (T8110) */ |
73 | {KATANA_PCI_INTD_IRQ_750i, 0, 0, 0 }, | 73 | {KATANA_PCI_INTD_IRQ_750i, 0, 0, 0 }, |
74 | /* IDSEL 7 (unused) */ | ||
75 | {0, 0, 0, 0 }, | ||
76 | /* IDSEL 8 (Intel 82544) (752i only but doesn't harm 750i) */ | ||
77 | {KATANA_PCI_INTD_IRQ_750i, 0, 0, 0 }, | ||
74 | }; | 78 | }; |
75 | const long min_idsel = 4, max_idsel = 6, irqs_per_slot = 4; | 79 | const long min_idsel = 4, max_idsel = 8, irqs_per_slot = 4; |
76 | 80 | ||
77 | return PCI_IRQ_TABLE_LOOKUP; | 81 | return PCI_IRQ_TABLE_LOOKUP; |
78 | } | 82 | } |
@@ -148,7 +152,7 @@ katana_get_proc_num(void) | |||
148 | save_exclude = mv64x60_pci_exclude_bridge; | 152 | save_exclude = mv64x60_pci_exclude_bridge; |
149 | mv64x60_pci_exclude_bridge = 0; | 153 | mv64x60_pci_exclude_bridge = 0; |
150 | 154 | ||
151 | early_read_config_word(bh.hose_a, 0, | 155 | early_read_config_word(bh.hose_b, 0, |
152 | PCI_DEVFN(0,0), PCI_DEVICE_ID, &val); | 156 | PCI_DEVFN(0,0), PCI_DEVICE_ID, &val); |
153 | 157 | ||
154 | mv64x60_pci_exclude_bridge = save_exclude; | 158 | mv64x60_pci_exclude_bridge = save_exclude; |
@@ -191,7 +195,8 @@ katana_setup_bridge(void) | |||
191 | struct mv64x60_setup_info si; | 195 | struct mv64x60_setup_info si; |
192 | void __iomem *vaddr; | 196 | void __iomem *vaddr; |
193 | int i; | 197 | int i; |
194 | u16 val; | 198 | u32 v; |
199 | u16 val, type; | ||
195 | u8 save_exclude; | 200 | u8 save_exclude; |
196 | 201 | ||
197 | /* | 202 | /* |
@@ -222,6 +227,20 @@ katana_setup_bridge(void) | |||
222 | PCI_DEVICE_ID, val); | 227 | PCI_DEVICE_ID, val); |
223 | } | 228 | } |
224 | 229 | ||
230 | /* | ||
231 | * While we're in here, set the hotswap register correctly. | ||
232 | * Turn off blue LED; mask ENUM#, clear insertion & extraction bits. | ||
233 | */ | ||
234 | early_read_config_dword(&hose, 0, PCI_DEVFN(0, 0), | ||
235 | MV64360_PCICFG_CPCI_HOTSWAP, &v); | ||
236 | v &= ~(1<<19); | ||
237 | v |= ((1<<17) | (1<<22) | (1<<23)); | ||
238 | early_write_config_dword(&hose, 0, PCI_DEVFN(0, 0), | ||
239 | MV64360_PCICFG_CPCI_HOTSWAP, v); | ||
240 | |||
241 | /* While we're at it, grab the bridge type for later */ | ||
242 | early_read_config_word(&hose, 0, PCI_DEVFN(0, 0), PCI_DEVICE_ID, &type); | ||
243 | |||
225 | mv64x60_pci_exclude_bridge = save_exclude; | 244 | mv64x60_pci_exclude_bridge = save_exclude; |
226 | iounmap(vaddr); | 245 | iounmap(vaddr); |
227 | 246 | ||
@@ -251,21 +270,23 @@ katana_setup_bridge(void) | |||
251 | si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE; | 270 | si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE; |
252 | 271 | ||
253 | si.pci_1.acc_cntl_options[i] = | 272 | si.pci_1.acc_cntl_options[i] = |
254 | MV64360_PCI_ACC_CNTL_SNOOP_NONE | | 273 | MV64360_PCI_ACC_CNTL_SNOOP_NONE | |
255 | MV64360_PCI_ACC_CNTL_SWAP_NONE | | 274 | MV64360_PCI_ACC_CNTL_SWAP_NONE | |
256 | MV64360_PCI_ACC_CNTL_MBURST_128_BYTES | | 275 | MV64360_PCI_ACC_CNTL_MBURST_128_BYTES | |
257 | MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES; | 276 | MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES; |
258 | #else | 277 | #else |
259 | si.cpu_prot_options[i] = 0; | 278 | si.cpu_prot_options[i] = 0; |
260 | si.enet_options[i] = MV64360_ENET2MEM_SNOOP_NONE; /* errata */ | 279 | si.enet_options[i] = MV64360_ENET2MEM_SNOOP_WB; |
261 | si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_NONE; /* errata */ | 280 | si.mpsc_options[i] = MV64360_MPSC2MEM_SNOOP_WB; |
262 | si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_NONE; /* errata */ | 281 | si.idma_options[i] = MV64360_IDMA2MEM_SNOOP_WB; |
263 | 282 | ||
264 | si.pci_1.acc_cntl_options[i] = | 283 | si.pci_1.acc_cntl_options[i] = |
265 | MV64360_PCI_ACC_CNTL_SNOOP_WB | | 284 | MV64360_PCI_ACC_CNTL_SNOOP_WB | |
266 | MV64360_PCI_ACC_CNTL_SWAP_NONE | | 285 | MV64360_PCI_ACC_CNTL_SWAP_NONE | |
267 | MV64360_PCI_ACC_CNTL_MBURST_32_BYTES | | 286 | MV64360_PCI_ACC_CNTL_MBURST_32_BYTES | |
268 | MV64360_PCI_ACC_CNTL_RDSIZE_32_BYTES; | 287 | ((type == PCI_DEVICE_ID_MARVELL_MV64360) ? |
288 | MV64360_PCI_ACC_CNTL_RDSIZE_32_BYTES : | ||
289 | MV64360_PCI_ACC_CNTL_RDSIZE_256_BYTES); | ||
269 | #endif | 290 | #endif |
270 | } | 291 | } |
271 | 292 | ||
@@ -281,12 +302,26 @@ katana_setup_bridge(void) | |||
281 | mv64x60_set_bus(&bh, 1, 0); | 302 | mv64x60_set_bus(&bh, 1, 0); |
282 | bh.hose_b->first_busno = 0; | 303 | bh.hose_b->first_busno = 0; |
283 | bh.hose_b->last_busno = 0xff; | 304 | bh.hose_b->last_busno = 0xff; |
305 | |||
306 | /* | ||
307 | * Need to access hotswap reg which is in the pci config area of the | ||
308 | * bridge's hose 0. Note that pcibios_alloc_controller() can't be used | ||
309 | * to alloc hose_a b/c that would make hose 0 known to the generic | ||
310 | * pci code which we don't want. | ||
311 | */ | ||
312 | bh.hose_a = &katana_hose_a; | ||
313 | setup_indirect_pci_nomap(bh.hose_a, | ||
314 | bh.v_base + MV64x60_PCI0_CONFIG_ADDR, | ||
315 | bh.v_base + MV64x60_PCI0_CONFIG_DATA); | ||
284 | } | 316 | } |
285 | 317 | ||
286 | /* Bridge & platform setup routines */ | 318 | /* Bridge & platform setup routines */ |
287 | void __init | 319 | void __init |
288 | katana_intr_setup(void) | 320 | katana_intr_setup(void) |
289 | { | 321 | { |
322 | if (bh.type == MV64x60_TYPE_MV64460) /* As per instns from Marvell */ | ||
323 | mv64x60_clr_bits(&bh, MV64x60_CPU_MASTER_CNTL, 1 << 15); | ||
324 | |||
290 | /* MPP 8, 9, and 10 */ | 325 | /* MPP 8, 9, and 10 */ |
291 | mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_1, 0xfff); | 326 | mv64x60_clr_bits(&bh, MV64x60_MPP_CNTL_1, 0xfff); |
292 | 327 | ||
@@ -309,9 +344,16 @@ katana_intr_setup(void) | |||
309 | /* Config GPP intr ctlr to respond to level trigger */ | 344 | /* Config GPP intr ctlr to respond to level trigger */ |
310 | mv64x60_set_bits(&bh, MV64x60_COMM_ARBITER_CNTL, (1<<10)); | 345 | mv64x60_set_bits(&bh, MV64x60_COMM_ARBITER_CNTL, (1<<10)); |
311 | 346 | ||
312 | /* Erranum FEr PCI-#8 */ | 347 | if (bh.type == MV64x60_TYPE_MV64360) { |
313 | mv64x60_clr_bits(&bh, MV64x60_PCI0_CMD, (1<<5) | (1<<9)); | 348 | /* Erratum FEr PCI-#9 */ |
314 | mv64x60_clr_bits(&bh, MV64x60_PCI1_CMD, (1<<5) | (1<<9)); | 349 | mv64x60_clr_bits(&bh, MV64x60_PCI1_CMD, |
350 | (1<<4) | (1<<5) | (1<<6) | (1<<7)); | ||
351 | mv64x60_set_bits(&bh, MV64x60_PCI1_CMD, (1<<8) | (1<<9)); | ||
352 | } else { | ||
353 | mv64x60_clr_bits(&bh, MV64x60_PCI1_CMD, (1<<6) | (1<<7)); | ||
354 | mv64x60_set_bits(&bh, MV64x60_PCI1_CMD, | ||
355 | (1<<4) | (1<<5) | (1<<8) | (1<<9)); | ||
356 | } | ||
315 | 357 | ||
316 | /* | 358 | /* |
317 | * Dismiss and then enable interrupt on GPP interrupt cause | 359 | * Dismiss and then enable interrupt on GPP interrupt cause |
@@ -473,17 +515,46 @@ katana_setup_arch(void) | |||
473 | ppc_md.progress("katana_setup_arch: exit", 0); | 515 | ppc_md.progress("katana_setup_arch: exit", 0); |
474 | } | 516 | } |
475 | 517 | ||
518 | void | ||
519 | katana_fixup_resources(struct pci_dev *dev) | ||
520 | { | ||
521 | u16 v16; | ||
522 | |||
523 | pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, L1_CACHE_LINE_SIZE>>2); | ||
524 | |||
525 | pci_read_config_word(dev, PCI_COMMAND, &v16); | ||
526 | v16 |= PCI_COMMAND_INVALIDATE | PCI_COMMAND_FAST_BACK; | ||
527 | pci_write_config_word(dev, PCI_COMMAND, v16); | ||
528 | } | ||
529 | |||
530 | static const unsigned int cpu_750xx[32] = { /* 750FX & 750GX */ | ||
531 | 0, 0, 2, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,/* 0-15*/ | ||
532 | 16, 17, 18, 19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 0 /*16-31*/ | ||
533 | }; | ||
534 | |||
535 | static int | ||
536 | katana_get_cpu_freq(void) | ||
537 | { | ||
538 | unsigned long pll_cfg; | ||
539 | |||
540 | pll_cfg = (mfspr(SPRN_HID1) & 0xf8000000) >> 27; | ||
541 | return katana_bus_frequency * cpu_750xx[pll_cfg]/2; | ||
542 | } | ||
543 | |||
476 | /* Platform device data fixup routines. */ | 544 | /* Platform device data fixup routines. */ |
477 | #if defined(CONFIG_SERIAL_MPSC) | 545 | #if defined(CONFIG_SERIAL_MPSC) |
478 | static void __init | 546 | static void __init |
479 | katana_fixup_mpsc_pdata(struct platform_device *pdev) | 547 | katana_fixup_mpsc_pdata(struct platform_device *pdev) |
480 | { | 548 | { |
481 | struct mpsc_pdata *pdata; | 549 | struct mpsc_pdata *pdata = (struct mpsc_pdata *)pdev->dev.platform_data; |
550 | bd_t *bdp = (bd_t *)__res; | ||
482 | 551 | ||
483 | pdata = (struct mpsc_pdata *)pdev->dev.platform_data; | 552 | if (bdp->bi_baudrate) |
553 | pdata->default_baud = bdp->bi_baudrate; | ||
554 | else | ||
555 | pdata->default_baud = KATANA_DEFAULT_BAUD; | ||
484 | 556 | ||
485 | pdata->max_idle = 40; | 557 | pdata->max_idle = 40; |
486 | pdata->default_baud = KATANA_DEFAULT_BAUD; | ||
487 | pdata->brg_clk_src = KATANA_MPSC_CLK_SRC; | 558 | pdata->brg_clk_src = KATANA_MPSC_CLK_SRC; |
488 | /* | 559 | /* |
489 | * TCLK (not SysCLk) is routed to BRG, then to the MPSC. On most parts, | 560 | * TCLK (not SysCLk) is routed to BRG, then to the MPSC. On most parts, |
@@ -513,6 +584,18 @@ katana_fixup_eth_pdata(struct platform_device *pdev) | |||
513 | } | 584 | } |
514 | #endif | 585 | #endif |
515 | 586 | ||
587 | #if defined(CONFIG_SYSFS) | ||
588 | static void __init | ||
589 | katana_fixup_mv64xxx_pdata(struct platform_device *pdev) | ||
590 | { | ||
591 | struct mv64xxx_pdata *pdata = (struct mv64xxx_pdata *) | ||
592 | pdev->dev.platform_data; | ||
593 | |||
594 | /* Katana supports the mv64xxx hotswap register */ | ||
595 | pdata->hs_reg_valid = 1; | ||
596 | } | ||
597 | #endif | ||
598 | |||
516 | static int __init | 599 | static int __init |
517 | katana_platform_notify(struct device *dev) | 600 | katana_platform_notify(struct device *dev) |
518 | { | 601 | { |
@@ -529,6 +612,9 @@ katana_platform_notify(struct device *dev) | |||
529 | { MV643XX_ETH_NAME ".1", katana_fixup_eth_pdata }, | 612 | { MV643XX_ETH_NAME ".1", katana_fixup_eth_pdata }, |
530 | { MV643XX_ETH_NAME ".2", katana_fixup_eth_pdata }, | 613 | { MV643XX_ETH_NAME ".2", katana_fixup_eth_pdata }, |
531 | #endif | 614 | #endif |
615 | #if defined(CONFIG_SYSFS) | ||
616 | { MV64XXX_DEV_NAME ".0", katana_fixup_mv64xxx_pdata }, | ||
617 | #endif | ||
532 | }; | 618 | }; |
533 | struct platform_device *pdev; | 619 | struct platform_device *pdev; |
534 | int i; | 620 | int i; |
@@ -536,8 +622,7 @@ katana_platform_notify(struct device *dev) | |||
536 | if (dev && dev->bus_id) | 622 | if (dev && dev->bus_id) |
537 | for (i=0; i<ARRAY_SIZE(dev_map); i++) | 623 | for (i=0; i<ARRAY_SIZE(dev_map); i++) |
538 | if (!strncmp(dev->bus_id, dev_map[i].bus_id, | 624 | if (!strncmp(dev->bus_id, dev_map[i].bus_id, |
539 | BUS_ID_SIZE)) { | 625 | BUS_ID_SIZE)) { |
540 | |||
541 | pdev = container_of(dev, | 626 | pdev = container_of(dev, |
542 | struct platform_device, dev); | 627 | struct platform_device, dev); |
543 | dev_map[i].rtn(pdev); | 628 | dev_map[i].rtn(pdev); |
@@ -578,8 +663,7 @@ katana_setup_mtd(void) | |||
578 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; | 663 | ptbl_entries = (size >= (64*MB)) ? 6 : 4; |
579 | 664 | ||
580 | if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), | 665 | if ((ptbl = kmalloc(ptbl_entries * sizeof(struct mtd_partition), |
581 | GFP_KERNEL)) == NULL) { | 666 | GFP_KERNEL)) == NULL) { |
582 | |||
583 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); | 667 | printk(KERN_WARNING "Can't alloc MTD partition table\n"); |
584 | return -ENOMEM; | 668 | return -ENOMEM; |
585 | } | 669 | } |
@@ -611,7 +695,6 @@ katana_setup_mtd(void) | |||
611 | physmap_set_partitions(ptbl, ptbl_entries); | 695 | physmap_set_partitions(ptbl, ptbl_entries); |
612 | return 0; | 696 | return 0; |
613 | } | 697 | } |
614 | |||
615 | arch_initcall(katana_setup_mtd); | 698 | arch_initcall(katana_setup_mtd); |
616 | #endif | 699 | #endif |
617 | 700 | ||
@@ -632,7 +715,22 @@ katana_halt(void) | |||
632 | { | 715 | { |
633 | u8 v; | 716 | u8 v; |
634 | 717 | ||
635 | if (katana_id == KATANA_ID_752I) { | 718 | /* Turn on blue LED to indicate its okay to remove */ |
719 | if (katana_id == KATANA_ID_750I) { | ||
720 | u32 v; | ||
721 | u8 save_exclude; | ||
722 | |||
723 | /* Set LOO bit in cPCI HotSwap reg of hose 0 to turn on LED. */ | ||
724 | save_exclude = mv64x60_pci_exclude_bridge; | ||
725 | mv64x60_pci_exclude_bridge = 0; | ||
726 | early_read_config_dword(bh.hose_a, 0, PCI_DEVFN(0, 0), | ||
727 | MV64360_PCICFG_CPCI_HOTSWAP, &v); | ||
728 | v &= 0xff; | ||
729 | v |= (1 << 19); | ||
730 | early_write_config_dword(bh.hose_a, 0, PCI_DEVFN(0, 0), | ||
731 | MV64360_PCICFG_CPCI_HOTSWAP, v); | ||
732 | mv64x60_pci_exclude_bridge = save_exclude; | ||
733 | } else if (katana_id == KATANA_ID_752I) { | ||
636 | v = in_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF); | 734 | v = in_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF); |
637 | v |= HSL_PLD_HOT_SWAP_LED_BIT; | 735 | v |= HSL_PLD_HOT_SWAP_LED_BIT; |
638 | out_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF, v); | 736 | out_8(cpld_base + HSL_PLD_BASE + HSL_PLD_HOT_SWAP_OFF, v); |
@@ -652,37 +750,65 @@ katana_power_off(void) | |||
652 | static int | 750 | static int |
653 | katana_show_cpuinfo(struct seq_file *m) | 751 | katana_show_cpuinfo(struct seq_file *m) |
654 | { | 752 | { |
753 | char *s; | ||
754 | |||
755 | seq_printf(m, "cpu freq\t: %dMHz\n", | ||
756 | (katana_get_cpu_freq() + 500000) / 1000000); | ||
757 | seq_printf(m, "bus freq\t: %ldMHz\n", | ||
758 | ((long)katana_bus_frequency + 500000) / 1000000); | ||
655 | seq_printf(m, "vendor\t\t: Artesyn Communication Products, LLC\n"); | 759 | seq_printf(m, "vendor\t\t: Artesyn Communication Products, LLC\n"); |
656 | 760 | ||
657 | seq_printf(m, "board\t\t: "); | 761 | seq_printf(m, "board\t\t: "); |
658 | |||
659 | switch (katana_id) { | 762 | switch (katana_id) { |
660 | case KATANA_ID_3750: | 763 | case KATANA_ID_3750: |
661 | seq_printf(m, "Katana 3750\n"); | 764 | seq_printf(m, "Katana 3750"); |
662 | break; | 765 | break; |
663 | 766 | ||
664 | case KATANA_ID_750I: | 767 | case KATANA_ID_750I: |
665 | seq_printf(m, "Katana 750i\n"); | 768 | seq_printf(m, "Katana 750i"); |
666 | break; | 769 | break; |
667 | 770 | ||
668 | case KATANA_ID_752I: | 771 | case KATANA_ID_752I: |
669 | seq_printf(m, "Katana 752i\n"); | 772 | seq_printf(m, "Katana 752i"); |
670 | break; | 773 | break; |
671 | 774 | ||
672 | default: | 775 | default: |
673 | seq_printf(m, "Unknown\n"); | 776 | seq_printf(m, "Unknown"); |
674 | break; | 777 | break; |
675 | } | 778 | } |
676 | 779 | seq_printf(m, " (product id: 0x%x)\n", | |
677 | seq_printf(m, "product ID\t: 0x%x\n", | ||
678 | in_8(cpld_base + KATANA_CPLD_PRODUCT_ID)); | 780 | in_8(cpld_base + KATANA_CPLD_PRODUCT_ID)); |
781 | |||
782 | seq_printf(m, "pci mode\t: %sMonarch\n", | ||
783 | katana_is_monarch()? "" : "Non-"); | ||
679 | seq_printf(m, "hardware rev\t: 0x%x\n", | 784 | seq_printf(m, "hardware rev\t: 0x%x\n", |
680 | in_8(cpld_base+KATANA_CPLD_HARDWARE_VER)); | 785 | in_8(cpld_base+KATANA_CPLD_HARDWARE_VER)); |
681 | seq_printf(m, "PLD rev\t\t: 0x%x\n", | 786 | seq_printf(m, "pld rev\t\t: 0x%x\n", |
682 | in_8(cpld_base + KATANA_CPLD_PLD_VER)); | 787 | in_8(cpld_base + KATANA_CPLD_PLD_VER)); |
683 | seq_printf(m, "PLB freq\t: %ldMhz\n", | 788 | |
684 | (long)katana_bus_frequency / 1000000); | 789 | switch(bh.type) { |
685 | seq_printf(m, "PCI\t\t: %sMonarch\n", katana_is_monarch()? "" : "Non-"); | 790 | case MV64x60_TYPE_GT64260A: |
791 | s = "gt64260a"; | ||
792 | break; | ||
793 | case MV64x60_TYPE_GT64260B: | ||
794 | s = "gt64260b"; | ||
795 | break; | ||
796 | case MV64x60_TYPE_MV64360: | ||
797 | s = "mv64360"; | ||
798 | break; | ||
799 | case MV64x60_TYPE_MV64460: | ||
800 | s = "mv64460"; | ||
801 | break; | ||
802 | default: | ||
803 | s = "Unknown"; | ||
804 | } | ||
805 | seq_printf(m, "bridge type\t: %s\n", s); | ||
806 | seq_printf(m, "bridge rev\t: 0x%x\n", bh.rev); | ||
807 | #if defined(CONFIG_NOT_COHERENT_CACHE) | ||
808 | seq_printf(m, "coherency\t: %s\n", "off"); | ||
809 | #else | ||
810 | seq_printf(m, "coherency\t: %s\n", "on"); | ||
811 | #endif | ||
686 | 812 | ||
687 | return 0; | 813 | return 0; |
688 | } | 814 | } |
@@ -701,11 +827,20 @@ katana_calibrate_decr(void) | |||
701 | tb_to_us = mulhwu_scale_factor(freq, 1000000); | 827 | tb_to_us = mulhwu_scale_factor(freq, 1000000); |
702 | } | 828 | } |
703 | 829 | ||
830 | /* | ||
831 | * The katana supports both uImage and zImage. If uImage, get the mem size | ||
832 | * from the bd info. If zImage, the bootwrapper adds a BI_MEMSIZE entry in | ||
833 | * the bi_rec data which is sucked out and put into boot_mem_size by | ||
834 | * parse_bootinfo(). MMU_init() will then use the boot_mem_size for the mem | ||
835 | * size and not call this routine. The only way this will fail is when a uImage | ||
836 | * is used but the fw doesn't pass in a valid bi_memsize. This should never | ||
837 | * happen, though. | ||
838 | */ | ||
704 | unsigned long __init | 839 | unsigned long __init |
705 | katana_find_end_of_memory(void) | 840 | katana_find_end_of_memory(void) |
706 | { | 841 | { |
707 | return mv64x60_get_mem_size(CONFIG_MV64X60_NEW_BASE, | 842 | bd_t *bdp = (bd_t *)__res; |
708 | MV64x60_TYPE_MV64360); | 843 | return bdp->bi_memsize; |
709 | } | 844 | } |
710 | 845 | ||
711 | #if defined(CONFIG_I2C_MV64XXX) && defined(CONFIG_SENSORS_M41T00) | 846 | #if defined(CONFIG_I2C_MV64XXX) && defined(CONFIG_SENSORS_M41T00) |
@@ -729,15 +864,6 @@ katana_rtc_hookup(void) | |||
729 | late_initcall(katana_rtc_hookup); | 864 | late_initcall(katana_rtc_hookup); |
730 | #endif | 865 | #endif |
731 | 866 | ||
732 | static inline void | ||
733 | katana_set_bat(void) | ||
734 | { | ||
735 | mb(); | ||
736 | mtspr(SPRN_DBAT2U, 0xf0001ffe); | ||
737 | mtspr(SPRN_DBAT2L, 0xf000002a); | ||
738 | mb(); | ||
739 | } | ||
740 | |||
741 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) | 867 | #if defined(CONFIG_SERIAL_TEXT_DEBUG) && defined(CONFIG_SERIAL_MPSC_CONSOLE) |
742 | static void __init | 868 | static void __init |
743 | katana_map_io(void) | 869 | katana_map_io(void) |
@@ -763,15 +889,24 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
763 | */ | 889 | */ |
764 | if (r3 && r6) { | 890 | if (r3 && r6) { |
765 | /* copy board info structure */ | 891 | /* copy board info structure */ |
766 | memcpy( (void *)__res,(void *)(r3+KERNELBASE), sizeof(bd_t) ); | 892 | memcpy((void *)__res, (void *)(r3+KERNELBASE), sizeof(bd_t)); |
767 | /* copy command line */ | 893 | /* copy command line */ |
768 | *(char *)(r7+KERNELBASE) = 0; | 894 | *(char *)(r7+KERNELBASE) = 0; |
769 | strcpy(cmd_line, (char *)(r6+KERNELBASE)); | 895 | strcpy(cmd_line, (char *)(r6+KERNELBASE)); |
770 | } | 896 | } |
771 | 897 | ||
898 | #ifdef CONFIG_BLK_DEV_INITRD | ||
899 | /* take care of initrd if we have one */ | ||
900 | if (r4) { | ||
901 | initrd_start = r4 + KERNELBASE; | ||
902 | initrd_end = r5 + KERNELBASE; | ||
903 | } | ||
904 | #endif /* CONFIG_BLK_DEV_INITRD */ | ||
905 | |||
772 | isa_mem_base = 0; | 906 | isa_mem_base = 0; |
773 | 907 | ||
774 | ppc_md.setup_arch = katana_setup_arch; | 908 | ppc_md.setup_arch = katana_setup_arch; |
909 | ppc_md.pcibios_fixup_resources = katana_fixup_resources; | ||
775 | ppc_md.show_cpuinfo = katana_show_cpuinfo; | 910 | ppc_md.show_cpuinfo = katana_show_cpuinfo; |
776 | ppc_md.init_IRQ = mv64360_init_irq; | 911 | ppc_md.init_IRQ = mv64360_init_irq; |
777 | ppc_md.get_irq = mv64360_get_irq; | 912 | ppc_md.get_irq = mv64360_get_irq; |
@@ -790,6 +925,4 @@ platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
790 | #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) | 925 | #if defined(CONFIG_SERIAL_MPSC) || defined(CONFIG_MV643XX_ETH) |
791 | platform_notify = katana_platform_notify; | 926 | platform_notify = katana_platform_notify; |
792 | #endif | 927 | #endif |
793 | |||
794 | katana_set_bat(); /* Need for katana_find_end_of_memory and progress */ | ||
795 | } | 928 | } |
diff --git a/arch/ppc/platforms/katana.h b/arch/ppc/platforms/katana.h index b82ed81950f5..597257eff2ec 100644 --- a/arch/ppc/platforms/katana.h +++ b/arch/ppc/platforms/katana.h | |||
@@ -56,14 +56,14 @@ | |||
56 | #define KATANA_PCI1_IO_SIZE 0x04000000 /* 64 MB */ | 56 | #define KATANA_PCI1_IO_SIZE 0x04000000 /* 64 MB */ |
57 | 57 | ||
58 | /* Board-specific IRQ info */ | 58 | /* Board-specific IRQ info */ |
59 | #define KATANA_PCI_INTA_IRQ_3750 64+8 | 59 | #define KATANA_PCI_INTA_IRQ_3750 (64+8) |
60 | #define KATANA_PCI_INTB_IRQ_3750 64+9 | 60 | #define KATANA_PCI_INTB_IRQ_3750 (64+9) |
61 | #define KATANA_PCI_INTC_IRQ_3750 64+10 | 61 | #define KATANA_PCI_INTC_IRQ_3750 (64+10) |
62 | 62 | ||
63 | #define KATANA_PCI_INTA_IRQ_750i 64+8 | 63 | #define KATANA_PCI_INTA_IRQ_750i (64+8) |
64 | #define KATANA_PCI_INTB_IRQ_750i 64+9 | 64 | #define KATANA_PCI_INTB_IRQ_750i (64+9) |
65 | #define KATANA_PCI_INTC_IRQ_750i 64+10 | 65 | #define KATANA_PCI_INTC_IRQ_750i (64+10) |
66 | #define KATANA_PCI_INTD_IRQ_750i 64+14 | 66 | #define KATANA_PCI_INTD_IRQ_750i (64+14) |
67 | 67 | ||
68 | #define KATANA_CPLD_RST_EVENT 0x00000000 | 68 | #define KATANA_CPLD_RST_EVENT 0x00000000 |
69 | #define KATANA_CPLD_RST_CMD 0x00001000 | 69 | #define KATANA_CPLD_RST_CMD 0x00001000 |
diff --git a/arch/ppc/platforms/mcpn765.c b/arch/ppc/platforms/mcpn765.c deleted file mode 100644 index e88d294ea593..000000000000 --- a/arch/ppc/platforms/mcpn765.c +++ /dev/null | |||
@@ -1,527 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/mcpn765.c | ||
3 | * | ||
4 | * Board setup routines for the Motorola MCG MCPN765 cPCI Board. | ||
5 | * | ||
6 | * Author: Mark A. Greer | ||
7 | * mgreer@mvista.com | ||
8 | * | ||
9 | * Modified by Randy Vinson (rvinson@mvista.com) | ||
10 | * | ||
11 | * 2001-2002 (c) MontaVista, Software, Inc. This file is licensed under | ||
12 | * the terms of the GNU General Public License version 2. This program | ||
13 | * is licensed "as is" without any warranty of any kind, whether express | ||
14 | * or implied. | ||
15 | */ | ||
16 | |||
17 | /* | ||
18 | * This file adds support for the Motorola MCG MCPN765. | ||
19 | */ | ||
20 | #include <linux/config.h> | ||
21 | #include <linux/stddef.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/init.h> | ||
24 | #include <linux/errno.h> | ||
25 | #include <linux/reboot.h> | ||
26 | #include <linux/pci.h> | ||
27 | #include <linux/kdev_t.h> | ||
28 | #include <linux/major.h> | ||
29 | #include <linux/initrd.h> | ||
30 | #include <linux/console.h> | ||
31 | #include <linux/delay.h> | ||
32 | #include <linux/irq.h> | ||
33 | #include <linux/seq_file.h> | ||
34 | #include <linux/root_dev.h> | ||
35 | #include <linux/serial.h> | ||
36 | #include <linux/tty.h> /* for linux/serial_core.h */ | ||
37 | #include <linux/serial_core.h> | ||
38 | #include <linux/slab.h> | ||
39 | |||
40 | #include <asm/system.h> | ||
41 | #include <asm/pgtable.h> | ||
42 | #include <asm/page.h> | ||
43 | #include <asm/time.h> | ||
44 | #include <asm/dma.h> | ||
45 | #include <asm/byteorder.h> | ||
46 | #include <asm/io.h> | ||
47 | #include <asm/machdep.h> | ||
48 | #include <asm/prom.h> | ||
49 | #include <asm/smp.h> | ||
50 | #include <asm/open_pic.h> | ||
51 | #include <asm/i8259.h> | ||
52 | #include <asm/todc.h> | ||
53 | #include <asm/pci-bridge.h> | ||
54 | #include <asm/irq.h> | ||
55 | #include <asm/uaccess.h> | ||
56 | #include <asm/bootinfo.h> | ||
57 | #include <asm/hawk.h> | ||
58 | #include <asm/kgdb.h> | ||
59 | |||
60 | #include "mcpn765.h" | ||
61 | |||
62 | static u_char mcpn765_openpic_initsenses[] __initdata = { | ||
63 | (IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE),/* 16: i8259 cascade */ | ||
64 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 17: COM1,2,3,4 */ | ||
65 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 18: Enet 1 (front) */ | ||
66 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 19: HAWK WDT XXXX */ | ||
67 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 20: 21554 bridge */ | ||
68 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 21: cPCI INTA# */ | ||
69 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 22: cPCI INTB# */ | ||
70 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 23: cPCI INTC# */ | ||
71 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 24: cPCI INTD# */ | ||
72 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 25: PMC1 INTA#,PMC2 INTB#*/ | ||
73 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 26: PMC1 INTB#,PMC2 INTC#*/ | ||
74 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 27: PMC1 INTC#,PMC2 INTD#*/ | ||
75 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 28: PMC1 INTD#,PMC2 INTA#*/ | ||
76 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 29: Enet 2 (J3) */ | ||
77 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 30: Abort Switch */ | ||
78 | (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE),/* 31: RTC Alarm */ | ||
79 | }; | ||
80 | |||
81 | extern void mcpn765_set_VIA_IDE_native(void); | ||
82 | |||
83 | extern u_int openpic_irq(void); | ||
84 | extern char cmd_line[]; | ||
85 | |||
86 | extern void gen550_progress(char *, unsigned short); | ||
87 | extern void gen550_init(int, struct uart_port *); | ||
88 | |||
89 | int use_of_interrupt_tree = 0; | ||
90 | |||
91 | static void mcpn765_halt(void); | ||
92 | |||
93 | TODC_ALLOC(); | ||
94 | |||
95 | /* | ||
96 | * Motorola MCG MCPN765 interrupt routing. | ||
97 | */ | ||
98 | static inline int | ||
99 | mcpn765_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
100 | { | ||
101 | static char pci_irq_table[][4] = | ||
102 | /* | ||
103 | * PCI IDSEL/INTPIN->INTLINE | ||
104 | * A B C D | ||
105 | */ | ||
106 | { | ||
107 | { 14, 0, 0, 0 }, /* IDSEL 11 - have to manually set */ | ||
108 | { 0, 0, 0, 0 }, /* IDSEL 12 - unused */ | ||
109 | { 0, 0, 0, 0 }, /* IDSEL 13 - unused */ | ||
110 | { 18, 0, 0, 0 }, /* IDSEL 14 - Enet 0 */ | ||
111 | { 0, 0, 0, 0 }, /* IDSEL 15 - unused */ | ||
112 | { 25, 26, 27, 28 }, /* IDSEL 16 - PMC Slot 1 */ | ||
113 | { 28, 25, 26, 27 }, /* IDSEL 17 - PMC Slot 2 */ | ||
114 | { 0, 0, 0, 0 }, /* IDSEL 18 - PMC 2B Connector XXXX */ | ||
115 | { 29, 0, 0, 0 }, /* IDSEL 19 - Enet 1 */ | ||
116 | { 20, 0, 0, 0 }, /* IDSEL 20 - 21554 cPCI bridge */ | ||
117 | }; | ||
118 | |||
119 | const long min_idsel = 11, max_idsel = 20, irqs_per_slot = 4; | ||
120 | return PCI_IRQ_TABLE_LOOKUP; | ||
121 | } | ||
122 | |||
123 | void __init | ||
124 | mcpn765_set_VIA_IDE_legacy(void) | ||
125 | { | ||
126 | unsigned short vend, dev; | ||
127 | |||
128 | early_read_config_word(0, 0, PCI_DEVFN(0xb, 1), PCI_VENDOR_ID, &vend); | ||
129 | early_read_config_word(0, 0, PCI_DEVFN(0xb, 1), PCI_DEVICE_ID, &dev); | ||
130 | |||
131 | if ((vend == PCI_VENDOR_ID_VIA) && | ||
132 | (dev == PCI_DEVICE_ID_VIA_82C586_1)) { | ||
133 | |||
134 | unsigned char temp; | ||
135 | |||
136 | /* put back original "standard" port base addresses */ | ||
137 | early_write_config_dword(0, 0, PCI_DEVFN(0xb, 1), | ||
138 | PCI_BASE_ADDRESS_0, 0x1f1); | ||
139 | early_write_config_dword(0, 0, PCI_DEVFN(0xb, 1), | ||
140 | PCI_BASE_ADDRESS_1, 0x3f5); | ||
141 | early_write_config_dword(0, 0, PCI_DEVFN(0xb, 1), | ||
142 | PCI_BASE_ADDRESS_2, 0x171); | ||
143 | early_write_config_dword(0, 0, PCI_DEVFN(0xb, 1), | ||
144 | PCI_BASE_ADDRESS_3, 0x375); | ||
145 | early_write_config_dword(0, 0, PCI_DEVFN(0xb, 1), | ||
146 | PCI_BASE_ADDRESS_4, 0xcc01); | ||
147 | |||
148 | /* put into legacy mode */ | ||
149 | early_read_config_byte(0, 0, PCI_DEVFN(0xb, 1), PCI_CLASS_PROG, | ||
150 | &temp); | ||
151 | temp &= ~0x05; | ||
152 | early_write_config_byte(0, 0, PCI_DEVFN(0xb, 1), PCI_CLASS_PROG, | ||
153 | temp); | ||
154 | } | ||
155 | } | ||
156 | |||
157 | void | ||
158 | mcpn765_set_VIA_IDE_native(void) | ||
159 | { | ||
160 | unsigned short vend, dev; | ||
161 | |||
162 | early_read_config_word(0, 0, PCI_DEVFN(0xb, 1), PCI_VENDOR_ID, &vend); | ||
163 | early_read_config_word(0, 0, PCI_DEVFN(0xb, 1), PCI_DEVICE_ID, &dev); | ||
164 | |||
165 | if ((vend == PCI_VENDOR_ID_VIA) && | ||
166 | (dev == PCI_DEVICE_ID_VIA_82C586_1)) { | ||
167 | |||
168 | unsigned char temp; | ||
169 | |||
170 | /* put into native mode */ | ||
171 | early_read_config_byte(0, 0, PCI_DEVFN(0xb, 1), PCI_CLASS_PROG, | ||
172 | &temp); | ||
173 | temp |= 0x05; | ||
174 | early_write_config_byte(0, 0, PCI_DEVFN(0xb, 1), PCI_CLASS_PROG, | ||
175 | temp); | ||
176 | } | ||
177 | } | ||
178 | |||
179 | /* | ||
180 | * Initialize the VIA 82c586b. | ||
181 | */ | ||
182 | static void __init | ||
183 | mcpn765_setup_via_82c586b(void) | ||
184 | { | ||
185 | struct pci_dev *dev; | ||
186 | u_char c; | ||
187 | |||
188 | if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, | ||
189 | PCI_DEVICE_ID_VIA_82C586_0, | ||
190 | NULL)) == NULL) { | ||
191 | printk("No VIA ISA bridge found\n"); | ||
192 | mcpn765_halt(); | ||
193 | /* NOTREACHED */ | ||
194 | } | ||
195 | |||
196 | /* | ||
197 | * If the firmware left the EISA 4d0/4d1 ports enabled, make sure | ||
198 | * IRQ 14 is set for edge. | ||
199 | */ | ||
200 | pci_read_config_byte(dev, 0x47, &c); | ||
201 | |||
202 | if (c & (1<<5)) { | ||
203 | c = inb(0x4d1); | ||
204 | c &= ~(1<<6); | ||
205 | outb(c, 0x4d1); | ||
206 | } | ||
207 | |||
208 | /* Disable PNP IRQ routing since we use the Hawk's MPIC */ | ||
209 | pci_write_config_dword(dev, 0x54, 0); | ||
210 | pci_write_config_byte(dev, 0x58, 0); | ||
211 | |||
212 | pci_dev_put(dev); | ||
213 | if ((dev = pci_get_device(PCI_VENDOR_ID_VIA, | ||
214 | PCI_DEVICE_ID_VIA_82C586_1, | ||
215 | NULL)) == NULL) { | ||
216 | printk("No VIA ISA bridge found\n"); | ||
217 | mcpn765_halt(); | ||
218 | /* NOTREACHED */ | ||
219 | } | ||
220 | |||
221 | /* | ||
222 | * PPCBug doesn't set the enable bits for the IDE device. | ||
223 | * Turn them on now. | ||
224 | */ | ||
225 | pci_read_config_byte(dev, 0x40, &c); | ||
226 | c |= 0x03; | ||
227 | pci_write_config_byte(dev, 0x40, c); | ||
228 | pci_dev_put(dev); | ||
229 | |||
230 | return; | ||
231 | } | ||
232 | |||
233 | void __init | ||
234 | mcpn765_pcibios_fixup(void) | ||
235 | { | ||
236 | /* Do MCPN765 board specific initialization. */ | ||
237 | mcpn765_setup_via_82c586b(); | ||
238 | } | ||
239 | |||
240 | void __init | ||
241 | mcpn765_find_bridges(void) | ||
242 | { | ||
243 | struct pci_controller *hose; | ||
244 | |||
245 | hose = pcibios_alloc_controller(); | ||
246 | |||
247 | if (!hose) | ||
248 | return; | ||
249 | |||
250 | hose->first_busno = 0; | ||
251 | hose->last_busno = 0xff; | ||
252 | hose->pci_mem_offset = MCPN765_PCI_PHY_MEM_OFFSET; | ||
253 | |||
254 | pci_init_resource(&hose->io_resource, | ||
255 | MCPN765_PCI_IO_START, | ||
256 | MCPN765_PCI_IO_END, | ||
257 | IORESOURCE_IO, | ||
258 | "PCI host bridge"); | ||
259 | |||
260 | pci_init_resource(&hose->mem_resources[0], | ||
261 | MCPN765_PCI_MEM_START, | ||
262 | MCPN765_PCI_MEM_END, | ||
263 | IORESOURCE_MEM, | ||
264 | "PCI host bridge"); | ||
265 | |||
266 | hose->io_space.start = MCPN765_PCI_IO_START; | ||
267 | hose->io_space.end = MCPN765_PCI_IO_END; | ||
268 | hose->mem_space.start = MCPN765_PCI_MEM_START; | ||
269 | hose->mem_space.end = MCPN765_PCI_MEM_END - HAWK_MPIC_SIZE; | ||
270 | |||
271 | if (hawk_init(hose, | ||
272 | MCPN765_HAWK_PPC_REG_BASE, | ||
273 | MCPN765_PROC_PCI_MEM_START, | ||
274 | MCPN765_PROC_PCI_MEM_END - HAWK_MPIC_SIZE, | ||
275 | MCPN765_PROC_PCI_IO_START, | ||
276 | MCPN765_PROC_PCI_IO_END, | ||
277 | MCPN765_PCI_MEM_END - HAWK_MPIC_SIZE + 1) != 0) { | ||
278 | printk("Could not initialize HAWK bridge\n"); | ||
279 | } | ||
280 | |||
281 | /* VIA IDE BAR decoders are only 16-bits wide. PCI Auto Config | ||
282 | * will reassign the bars outside of 16-bit I/O space, which will | ||
283 | * "break" things. To prevent this, we'll set the IDE chip into | ||
284 | * legacy mode and seed the bars with their legacy addresses (in 16-bit | ||
285 | * I/O space). The Auto Config code will skip the IDE contoller in | ||
286 | * legacy mode, so our bar values will stick. | ||
287 | */ | ||
288 | mcpn765_set_VIA_IDE_legacy(); | ||
289 | |||
290 | hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); | ||
291 | |||
292 | /* Now that we've got 16-bit addresses in the bars, we can switch the | ||
293 | * IDE controller back into native mode so we can do "modern" resource | ||
294 | * and interrupt management. | ||
295 | */ | ||
296 | mcpn765_set_VIA_IDE_native(); | ||
297 | |||
298 | ppc_md.pcibios_fixup = mcpn765_pcibios_fixup; | ||
299 | ppc_md.pcibios_fixup_bus = NULL; | ||
300 | ppc_md.pci_swizzle = common_swizzle; | ||
301 | ppc_md.pci_map_irq = mcpn765_map_irq; | ||
302 | |||
303 | return; | ||
304 | } | ||
305 | static void __init | ||
306 | mcpn765_setup_arch(void) | ||
307 | { | ||
308 | struct pci_controller *hose; | ||
309 | |||
310 | if ( ppc_md.progress ) | ||
311 | ppc_md.progress("mcpn765_setup_arch: enter", 0); | ||
312 | |||
313 | loops_per_jiffy = 50000000 / HZ; | ||
314 | |||
315 | #ifdef CONFIG_BLK_DEV_INITRD | ||
316 | if (initrd_start) | ||
317 | ROOT_DEV = Root_RAM0; | ||
318 | else | ||
319 | #endif | ||
320 | #ifdef CONFIG_ROOT_NFS | ||
321 | ROOT_DEV = Root_NFS; | ||
322 | #else | ||
323 | ROOT_DEV = Root_SDA2; | ||
324 | #endif | ||
325 | |||
326 | if ( ppc_md.progress ) | ||
327 | ppc_md.progress("mcpn765_setup_arch: find_bridges", 0); | ||
328 | |||
329 | /* Lookup PCI host bridges */ | ||
330 | mcpn765_find_bridges(); | ||
331 | |||
332 | hose = pci_bus_to_hose(0); | ||
333 | isa_io_base = (ulong)hose->io_base_virt; | ||
334 | |||
335 | TODC_INIT(TODC_TYPE_MK48T37, | ||
336 | (MCPN765_PHYS_NVRAM_AS0 - isa_io_base), | ||
337 | (MCPN765_PHYS_NVRAM_AS1 - isa_io_base), | ||
338 | (MCPN765_PHYS_NVRAM_DATA - isa_io_base), | ||
339 | 8); | ||
340 | |||
341 | OpenPIC_InitSenses = mcpn765_openpic_initsenses; | ||
342 | OpenPIC_NumInitSenses = sizeof(mcpn765_openpic_initsenses); | ||
343 | |||
344 | printk("Motorola MCG MCPN765 cPCI Non-System Board\n"); | ||
345 | printk("MCPN765 port (MontaVista Software, Inc. (source@mvista.com))\n"); | ||
346 | |||
347 | if ( ppc_md.progress ) | ||
348 | ppc_md.progress("mcpn765_setup_arch: exit", 0); | ||
349 | |||
350 | return; | ||
351 | } | ||
352 | |||
353 | static void __init | ||
354 | mcpn765_init2(void) | ||
355 | { | ||
356 | |||
357 | request_region(0x00,0x20,"dma1"); | ||
358 | request_region(0x20,0x20,"pic1"); | ||
359 | request_region(0x40,0x20,"timer"); | ||
360 | request_region(0x80,0x10,"dma page reg"); | ||
361 | request_region(0xa0,0x20,"pic2"); | ||
362 | request_region(0xc0,0x20,"dma2"); | ||
363 | |||
364 | return; | ||
365 | } | ||
366 | |||
367 | /* | ||
368 | * Interrupt setup and service. | ||
369 | * Have MPIC on HAWK and cascaded 8259s on VIA 82586 cascaded to MPIC. | ||
370 | */ | ||
371 | static void __init | ||
372 | mcpn765_init_IRQ(void) | ||
373 | { | ||
374 | int i; | ||
375 | |||
376 | if ( ppc_md.progress ) | ||
377 | ppc_md.progress("init_irq: enter", 0); | ||
378 | |||
379 | openpic_init(NUM_8259_INTERRUPTS); | ||
380 | openpic_hookup_cascade(NUM_8259_INTERRUPTS, "82c59 cascade", | ||
381 | i8259_irq); | ||
382 | |||
383 | for(i=0; i < NUM_8259_INTERRUPTS; i++) | ||
384 | irq_desc[i].handler = &i8259_pic; | ||
385 | |||
386 | i8259_init(0); | ||
387 | |||
388 | if ( ppc_md.progress ) | ||
389 | ppc_md.progress("init_irq: exit", 0); | ||
390 | |||
391 | return; | ||
392 | } | ||
393 | |||
394 | static u32 | ||
395 | mcpn765_irq_canonicalize(u32 irq) | ||
396 | { | ||
397 | if (irq == 2) | ||
398 | return 9; | ||
399 | else | ||
400 | return irq; | ||
401 | } | ||
402 | |||
403 | static unsigned long __init | ||
404 | mcpn765_find_end_of_memory(void) | ||
405 | { | ||
406 | return hawk_get_mem_size(MCPN765_HAWK_SMC_BASE); | ||
407 | } | ||
408 | |||
409 | static void __init | ||
410 | mcpn765_map_io(void) | ||
411 | { | ||
412 | io_block_mapping(0xfe800000, 0xfe800000, 0x00800000, _PAGE_IO); | ||
413 | } | ||
414 | |||
415 | static void | ||
416 | mcpn765_reset_board(void) | ||
417 | { | ||
418 | local_irq_disable(); | ||
419 | |||
420 | /* set VIA IDE controller into native mode */ | ||
421 | mcpn765_set_VIA_IDE_native(); | ||
422 | |||
423 | /* Set exception prefix high - to the firmware */ | ||
424 | _nmask_and_or_msr(0, MSR_IP); | ||
425 | |||
426 | out_8((u_char *)MCPN765_BOARD_MODRST_REG, 0x01); | ||
427 | |||
428 | return; | ||
429 | } | ||
430 | |||
431 | static void | ||
432 | mcpn765_restart(char *cmd) | ||
433 | { | ||
434 | volatile ulong i = 10000000; | ||
435 | |||
436 | mcpn765_reset_board(); | ||
437 | |||
438 | while (i-- > 0); | ||
439 | panic("restart failed\n"); | ||
440 | } | ||
441 | |||
442 | static void | ||
443 | mcpn765_power_off(void) | ||
444 | { | ||
445 | mcpn765_halt(); | ||
446 | /* NOTREACHED */ | ||
447 | } | ||
448 | |||
449 | static void | ||
450 | mcpn765_halt(void) | ||
451 | { | ||
452 | local_irq_disable(); | ||
453 | while (1); | ||
454 | /* NOTREACHED */ | ||
455 | } | ||
456 | |||
457 | static int | ||
458 | mcpn765_show_cpuinfo(struct seq_file *m) | ||
459 | { | ||
460 | seq_printf(m, "vendor\t\t: Motorola MCG\n"); | ||
461 | seq_printf(m, "machine\t\t: MCPN765\n"); | ||
462 | |||
463 | return 0; | ||
464 | } | ||
465 | |||
466 | /* | ||
467 | * Set BAT 3 to map 0xf0000000 to end of physical memory space. | ||
468 | */ | ||
469 | static __inline__ void | ||
470 | mcpn765_set_bat(void) | ||
471 | { | ||
472 | mb(); | ||
473 | mtspr(SPRN_DBAT1U, 0xfe8000fe); | ||
474 | mtspr(SPRN_DBAT1L, 0xfe80002a); | ||
475 | mb(); | ||
476 | } | ||
477 | |||
478 | void __init | ||
479 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
480 | unsigned long r6, unsigned long r7) | ||
481 | { | ||
482 | parse_bootinfo(find_bootinfo()); | ||
483 | |||
484 | /* Map in board regs, etc. */ | ||
485 | mcpn765_set_bat(); | ||
486 | |||
487 | isa_mem_base = MCPN765_ISA_MEM_BASE; | ||
488 | pci_dram_offset = MCPN765_PCI_DRAM_OFFSET; | ||
489 | ISA_DMA_THRESHOLD = 0x00ffffff; | ||
490 | DMA_MODE_READ = 0x44; | ||
491 | DMA_MODE_WRITE = 0x48; | ||
492 | |||
493 | ppc_md.setup_arch = mcpn765_setup_arch; | ||
494 | ppc_md.show_cpuinfo = mcpn765_show_cpuinfo; | ||
495 | ppc_md.irq_canonicalize = mcpn765_irq_canonicalize; | ||
496 | ppc_md.init_IRQ = mcpn765_init_IRQ; | ||
497 | ppc_md.get_irq = openpic_get_irq; | ||
498 | ppc_md.init = mcpn765_init2; | ||
499 | |||
500 | ppc_md.restart = mcpn765_restart; | ||
501 | ppc_md.power_off = mcpn765_power_off; | ||
502 | ppc_md.halt = mcpn765_halt; | ||
503 | |||
504 | ppc_md.find_end_of_memory = mcpn765_find_end_of_memory; | ||
505 | ppc_md.setup_io_mappings = mcpn765_map_io; | ||
506 | |||
507 | ppc_md.time_init = todc_time_init; | ||
508 | ppc_md.set_rtc_time = todc_set_rtc_time; | ||
509 | ppc_md.get_rtc_time = todc_get_rtc_time; | ||
510 | ppc_md.calibrate_decr = todc_calibrate_decr; | ||
511 | |||
512 | ppc_md.nvram_read_val = todc_m48txx_read_val; | ||
513 | ppc_md.nvram_write_val = todc_m48txx_write_val; | ||
514 | |||
515 | ppc_md.heartbeat = NULL; | ||
516 | ppc_md.heartbeat_reset = 0; | ||
517 | ppc_md.heartbeat_count = 0; | ||
518 | |||
519 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | ||
520 | ppc_md.progress = gen550_progress; | ||
521 | #endif | ||
522 | #ifdef CONFIG_KGDB | ||
523 | ppc_md.kgdb_map_scc = gen550_kgdb_map_scc; | ||
524 | #endif | ||
525 | |||
526 | return; | ||
527 | } | ||
diff --git a/arch/ppc/platforms/mcpn765.h b/arch/ppc/platforms/mcpn765.h deleted file mode 100644 index 4d35ecad097b..000000000000 --- a/arch/ppc/platforms/mcpn765.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/mcpn765.h | ||
3 | * | ||
4 | * Definitions for Motorola MCG MCPN765 cPCI Board. | ||
5 | * | ||
6 | * Author: Mark A. Greer | ||
7 | * mgreer@mvista.com | ||
8 | * | ||
9 | * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under | ||
10 | * the terms of the GNU General Public License version 2. This program | ||
11 | * is licensed "as is" without any warranty of any kind, whether express | ||
12 | * or implied. | ||
13 | */ | ||
14 | |||
15 | /* | ||
16 | * From Processor to PCI: | ||
17 | * PCI Mem Space: 0x80000000 - 0xc0000000 -> 0x80000000 - 0xc0000000 (1 GB) | ||
18 | * PCI I/O Space: 0xfd800000 - 0xfe000000 -> 0x00000000 - 0x00800000 (8 MB) | ||
19 | * Note: Must skip 0xfe000000-0xfe400000 for CONFIG_HIGHMEM/PKMAP area | ||
20 | * MPIC in PCI Mem Space: 0xfe800000 - 0xfe830000 (not all used by MPIC) | ||
21 | * | ||
22 | * From PCI to Processor: | ||
23 | * System Memory: 0x00000000 -> 0x00000000 | ||
24 | */ | ||
25 | |||
26 | #ifndef __PPC_PLATFORMS_MCPN765_H | ||
27 | #define __PPC_PLATFORMS_MCPN765_H | ||
28 | #include <linux/config.h> | ||
29 | |||
30 | /* PCI Memory space mapping info */ | ||
31 | #define MCPN765_PCI_MEM_SIZE 0x40000000U | ||
32 | #define MCPN765_PROC_PCI_MEM_START 0x80000000U | ||
33 | #define MCPN765_PROC_PCI_MEM_END (MCPN765_PROC_PCI_MEM_START + \ | ||
34 | MCPN765_PCI_MEM_SIZE - 1) | ||
35 | #define MCPN765_PCI_MEM_START 0x80000000U | ||
36 | #define MCPN765_PCI_MEM_END (MCPN765_PCI_MEM_START + \ | ||
37 | MCPN765_PCI_MEM_SIZE - 1) | ||
38 | |||
39 | /* PCI I/O space mapping info */ | ||
40 | #define MCPN765_PCI_IO_SIZE 0x00800000U | ||
41 | #define MCPN765_PROC_PCI_IO_START 0xfd800000U | ||
42 | #define MCPN765_PROC_PCI_IO_END (MCPN765_PROC_PCI_IO_START + \ | ||
43 | MCPN765_PCI_IO_SIZE - 1) | ||
44 | #define MCPN765_PCI_IO_START 0x00000000U | ||
45 | #define MCPN765_PCI_IO_END (MCPN765_PCI_IO_START + \ | ||
46 | MCPN765_PCI_IO_SIZE - 1) | ||
47 | |||
48 | /* System memory mapping info */ | ||
49 | #define MCPN765_PCI_DRAM_OFFSET 0x00000000U | ||
50 | #define MCPN765_PCI_PHY_MEM_OFFSET 0x00000000U | ||
51 | |||
52 | #define MCPN765_ISA_MEM_BASE 0x00000000U | ||
53 | #define MCPN765_ISA_IO_BASE MCPN765_PROC_PCI_IO_START | ||
54 | |||
55 | /* Define base addresses for important sets of registers */ | ||
56 | #define MCPN765_HAWK_MPIC_BASE 0xfe800000U | ||
57 | #define MCPN765_HAWK_SMC_BASE 0xfef80000U | ||
58 | #define MCPN765_HAWK_PPC_REG_BASE 0xfeff0000U | ||
59 | |||
60 | /* Define MCPN765 board register addresses. */ | ||
61 | #define MCPN765_BOARD_STATUS_REG 0xfef88080U | ||
62 | #define MCPN765_BOARD_MODFAIL_REG 0xfef88090U | ||
63 | #define MCPN765_BOARD_MODRST_REG 0xfef880a0U | ||
64 | #define MCPN765_BOARD_TBEN_REG 0xfef880c0U | ||
65 | #define MCPN765_BOARD_GEOGRAPHICAL_REG 0xfef880e8U | ||
66 | #define MCPN765_BOARD_EXT_FEATURE_REG 0xfef880f0U | ||
67 | #define MCPN765_BOARD_LAST_RESET_REG 0xfef880f8U | ||
68 | |||
69 | /* Defines for UART */ | ||
70 | |||
71 | /* Define the UART base addresses */ | ||
72 | #define MCPN765_SERIAL_1 0xfef88000 | ||
73 | #define MCPN765_SERIAL_2 0xfef88200 | ||
74 | #define MCPN765_SERIAL_3 0xfef88400 | ||
75 | #define MCPN765_SERIAL_4 0xfef88600 | ||
76 | |||
77 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
78 | #define RS_TABLE_SIZE 64 | ||
79 | #else | ||
80 | #define RS_TABLE_SIZE 4 | ||
81 | #endif | ||
82 | |||
83 | /* Rate for the 1.8432 Mhz clock for the onboard serial chip */ | ||
84 | #define BASE_BAUD ( 1843200 / 16 ) | ||
85 | #define UART_CLK 1843200 | ||
86 | |||
87 | #ifdef CONFIG_SERIAL_DETECT_IRQ | ||
88 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ) | ||
89 | #else | ||
90 | #define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST) | ||
91 | #endif | ||
92 | |||
93 | /* All UART IRQ's are wire-OR'd to IRQ 17 */ | ||
94 | #define STD_SERIAL_PORT_DFNS \ | ||
95 | { 0, BASE_BAUD, MCPN765_SERIAL_1, 17, STD_COM_FLAGS, /* ttyS0 */\ | ||
96 | iomem_base: (u8 *)MCPN765_SERIAL_1, \ | ||
97 | iomem_reg_shift: 4, \ | ||
98 | io_type: SERIAL_IO_MEM }, \ | ||
99 | { 0, BASE_BAUD, MCPN765_SERIAL_2, 17, STD_COM_FLAGS, /* ttyS1 */\ | ||
100 | iomem_base: (u8 *)MCPN765_SERIAL_2, \ | ||
101 | iomem_reg_shift: 4, \ | ||
102 | io_type: SERIAL_IO_MEM }, \ | ||
103 | { 0, BASE_BAUD, MCPN765_SERIAL_3, 17, STD_COM_FLAGS, /* ttyS2 */\ | ||
104 | iomem_base: (u8 *)MCPN765_SERIAL_3, \ | ||
105 | iomem_reg_shift: 4, \ | ||
106 | io_type: SERIAL_IO_MEM }, \ | ||
107 | { 0, BASE_BAUD, MCPN765_SERIAL_4, 17, STD_COM_FLAGS, /* ttyS3 */\ | ||
108 | iomem_base: (u8 *)MCPN765_SERIAL_4, \ | ||
109 | iomem_reg_shift: 4, \ | ||
110 | io_type: SERIAL_IO_MEM }, | ||
111 | |||
112 | #define SERIAL_PORT_DFNS \ | ||
113 | STD_SERIAL_PORT_DFNS | ||
114 | |||
115 | /* Define the NVRAM/RTC address strobe & data registers */ | ||
116 | #define MCPN765_PHYS_NVRAM_AS0 0xfef880c8U | ||
117 | #define MCPN765_PHYS_NVRAM_AS1 0xfef880d0U | ||
118 | #define MCPN765_PHYS_NVRAM_DATA 0xfef880d8U | ||
119 | |||
120 | extern void mcpn765_find_bridges(void); | ||
121 | |||
122 | #endif /* __PPC_PLATFORMS_MCPN765_H */ | ||
diff --git a/arch/ppc/platforms/pcore.c b/arch/ppc/platforms/pcore.c deleted file mode 100644 index d7191630a650..000000000000 --- a/arch/ppc/platforms/pcore.c +++ /dev/null | |||
@@ -1,352 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/pcore_setup.c | ||
3 | * | ||
4 | * Setup routines for Force PCORE boards | ||
5 | * | ||
6 | * Author: Matt Porter <mporter@mvista.com> | ||
7 | * | ||
8 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | |||
14 | #include <linux/config.h> | ||
15 | #include <linux/stddef.h> | ||
16 | #include <linux/kernel.h> | ||
17 | #include <linux/init.h> | ||
18 | #include <linux/errno.h> | ||
19 | #include <linux/reboot.h> | ||
20 | #include <linux/pci.h> | ||
21 | #include <linux/kdev_t.h> | ||
22 | #include <linux/types.h> | ||
23 | #include <linux/major.h> | ||
24 | #include <linux/initrd.h> | ||
25 | #include <linux/console.h> | ||
26 | #include <linux/irq.h> | ||
27 | #include <linux/seq_file.h> | ||
28 | #include <linux/root_dev.h> | ||
29 | |||
30 | #include <asm/io.h> | ||
31 | #include <asm/machdep.h> | ||
32 | #include <asm/time.h> | ||
33 | #include <asm/i8259.h> | ||
34 | #include <asm/mpc10x.h> | ||
35 | #include <asm/todc.h> | ||
36 | #include <asm/bootinfo.h> | ||
37 | #include <asm/kgdb.h> | ||
38 | |||
39 | #include "pcore.h" | ||
40 | |||
41 | extern unsigned long loops_per_jiffy; | ||
42 | |||
43 | static int board_type; | ||
44 | |||
45 | static inline int __init | ||
46 | pcore_6750_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
47 | { | ||
48 | static char pci_irq_table[][4] = | ||
49 | /* | ||
50 | * PCI IDSEL/INTPIN->INTLINE | ||
51 | * A B C D | ||
52 | */ | ||
53 | { | ||
54 | {9, 10, 11, 12}, /* IDSEL 24 - DEC 21554 */ | ||
55 | {10, 0, 0, 0}, /* IDSEL 25 - DEC 21143 */ | ||
56 | {11, 12, 9, 10}, /* IDSEL 26 - PMC I */ | ||
57 | {12, 9, 10, 11}, /* IDSEL 27 - PMC II */ | ||
58 | {0, 0, 0, 0}, /* IDSEL 28 - unused */ | ||
59 | {0, 0, 9, 0}, /* IDSEL 29 - unused */ | ||
60 | {0, 0, 0, 0}, /* IDSEL 30 - Winbond */ | ||
61 | }; | ||
62 | const long min_idsel = 24, max_idsel = 30, irqs_per_slot = 4; | ||
63 | return PCI_IRQ_TABLE_LOOKUP; | ||
64 | }; | ||
65 | |||
66 | static inline int __init | ||
67 | pcore_680_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin) | ||
68 | { | ||
69 | static char pci_irq_table[][4] = | ||
70 | /* | ||
71 | * PCI IDSEL/INTPIN->INTLINE | ||
72 | * A B C D | ||
73 | */ | ||
74 | { | ||
75 | {9, 10, 11, 12}, /* IDSEL 24 - Sentinel */ | ||
76 | {10, 0, 0, 0}, /* IDSEL 25 - i82559 #1 */ | ||
77 | {11, 12, 9, 10}, /* IDSEL 26 - PMC I */ | ||
78 | {12, 9, 10, 11}, /* IDSEL 27 - PMC II */ | ||
79 | {9, 0, 0, 0}, /* IDSEL 28 - i82559 #2 */ | ||
80 | {0, 0, 0, 0}, /* IDSEL 29 - unused */ | ||
81 | {0, 0, 0, 0}, /* IDSEL 30 - Winbond */ | ||
82 | }; | ||
83 | const long min_idsel = 24, max_idsel = 30, irqs_per_slot = 4; | ||
84 | return PCI_IRQ_TABLE_LOOKUP; | ||
85 | }; | ||
86 | |||
87 | void __init | ||
88 | pcore_pcibios_fixup(void) | ||
89 | { | ||
90 | struct pci_dev *dev; | ||
91 | |||
92 | if ((dev = pci_get_device(PCI_VENDOR_ID_WINBOND, | ||
93 | PCI_DEVICE_ID_WINBOND_83C553, | ||
94 | 0))) | ||
95 | { | ||
96 | /* Reroute interrupts both IDE channels to 15 */ | ||
97 | pci_write_config_byte(dev, | ||
98 | PCORE_WINBOND_IDE_INT, | ||
99 | 0xff); | ||
100 | |||
101 | /* Route INTA-D to IRQ9-12, respectively */ | ||
102 | pci_write_config_word(dev, | ||
103 | PCORE_WINBOND_PCI_INT, | ||
104 | 0x9abc); | ||
105 | |||
106 | /* | ||
107 | * Set up 8259 edge/level triggering | ||
108 | */ | ||
109 | outb(0x00, PCORE_WINBOND_PRI_EDG_LVL); | ||
110 | outb(0x1e, PCORE_WINBOND_SEC_EDG_LVL); | ||
111 | pci_dev_put(dev); | ||
112 | } | ||
113 | } | ||
114 | |||
115 | int __init | ||
116 | pcore_find_bridges(void) | ||
117 | { | ||
118 | struct pci_controller* hose; | ||
119 | int host_bridge, board_type; | ||
120 | |||
121 | hose = pcibios_alloc_controller(); | ||
122 | if (!hose) | ||
123 | return 0; | ||
124 | |||
125 | mpc10x_bridge_init(hose, | ||
126 | MPC10X_MEM_MAP_B, | ||
127 | MPC10X_MEM_MAP_B, | ||
128 | MPC10X_MAPB_EUMB_BASE); | ||
129 | |||
130 | /* Determine board type */ | ||
131 | early_read_config_dword(hose, | ||
132 | 0, | ||
133 | PCI_DEVFN(0,0), | ||
134 | PCI_VENDOR_ID, | ||
135 | &host_bridge); | ||
136 | if (host_bridge == MPC10X_BRIDGE_106) | ||
137 | board_type = PCORE_TYPE_6750; | ||
138 | else /* MPC10X_BRIDGE_107 */ | ||
139 | board_type = PCORE_TYPE_680; | ||
140 | |||
141 | hose->last_busno = pciauto_bus_scan(hose, hose->first_busno); | ||
142 | |||
143 | ppc_md.pcibios_fixup = pcore_pcibios_fixup; | ||
144 | ppc_md.pci_swizzle = common_swizzle; | ||
145 | |||
146 | if (board_type == PCORE_TYPE_6750) | ||
147 | ppc_md.pci_map_irq = pcore_6750_map_irq; | ||
148 | else /* PCORE_TYPE_680 */ | ||
149 | ppc_md.pci_map_irq = pcore_680_map_irq; | ||
150 | |||
151 | return board_type; | ||
152 | } | ||
153 | |||
154 | /* Dummy variable to satisfy mpc10x_common.o */ | ||
155 | void *OpenPIC_Addr; | ||
156 | |||
157 | static int | ||
158 | pcore_show_cpuinfo(struct seq_file *m) | ||
159 | { | ||
160 | seq_printf(m, "vendor\t\t: Force Computers\n"); | ||
161 | |||
162 | if (board_type == PCORE_TYPE_6750) | ||
163 | seq_printf(m, "machine\t\t: PowerCore 6750\n"); | ||
164 | else /* PCORE_TYPE_680 */ | ||
165 | seq_printf(m, "machine\t\t: PowerCore 680\n"); | ||
166 | |||
167 | seq_printf(m, "L2\t\t: " ); | ||
168 | if (board_type == PCORE_TYPE_6750) | ||
169 | switch (readb(PCORE_DCCR_REG) & PCORE_DCCR_L2_MASK) | ||
170 | { | ||
171 | case PCORE_DCCR_L2_0KB: | ||
172 | seq_printf(m, "nocache"); | ||
173 | break; | ||
174 | case PCORE_DCCR_L2_256KB: | ||
175 | seq_printf(m, "256KB"); | ||
176 | break; | ||
177 | case PCORE_DCCR_L2_1MB: | ||
178 | seq_printf(m, "1MB"); | ||
179 | break; | ||
180 | case PCORE_DCCR_L2_512KB: | ||
181 | seq_printf(m, "512KB"); | ||
182 | break; | ||
183 | default: | ||
184 | seq_printf(m, "error"); | ||
185 | break; | ||
186 | } | ||
187 | else /* PCORE_TYPE_680 */ | ||
188 | switch (readb(PCORE_DCCR_REG) & PCORE_DCCR_L2_MASK) | ||
189 | { | ||
190 | case PCORE_DCCR_L2_2MB: | ||
191 | seq_printf(m, "2MB"); | ||
192 | break; | ||
193 | case PCORE_DCCR_L2_256KB: | ||
194 | seq_printf(m, "reserved"); | ||
195 | break; | ||
196 | case PCORE_DCCR_L2_1MB: | ||
197 | seq_printf(m, "1MB"); | ||
198 | break; | ||
199 | case PCORE_DCCR_L2_512KB: | ||
200 | seq_printf(m, "512KB"); | ||
201 | break; | ||
202 | default: | ||
203 | seq_printf(m, "error"); | ||
204 | break; | ||
205 | } | ||
206 | |||
207 | seq_printf(m, "\n"); | ||
208 | |||
209 | return 0; | ||
210 | } | ||
211 | |||
212 | static void __init | ||
213 | pcore_setup_arch(void) | ||
214 | { | ||
215 | /* init to some ~sane value until calibrate_delay() runs */ | ||
216 | loops_per_jiffy = 50000000/HZ; | ||
217 | |||
218 | /* Lookup PCI host bridges */ | ||
219 | board_type = pcore_find_bridges(); | ||
220 | |||
221 | #ifdef CONFIG_BLK_DEV_INITRD | ||
222 | if (initrd_start) | ||
223 | ROOT_DEV = Root_RAM0; | ||
224 | else | ||
225 | #endif | ||
226 | #ifdef CONFIG_ROOT_NFS | ||
227 | ROOT_DEV = Root_NFS; | ||
228 | #else | ||
229 | ROOT_DEV = Root_SDA2; | ||
230 | #endif | ||
231 | |||
232 | printk(KERN_INFO "Force PowerCore "); | ||
233 | if (board_type == PCORE_TYPE_6750) | ||
234 | printk("6750\n"); | ||
235 | else | ||
236 | printk("680\n"); | ||
237 | printk(KERN_INFO "Port by MontaVista Software, Inc. (source@mvista.com)\n"); | ||
238 | _set_L2CR(L2CR_L2E | _get_L2CR()); | ||
239 | |||
240 | } | ||
241 | |||
242 | static void | ||
243 | pcore_restart(char *cmd) | ||
244 | { | ||
245 | local_irq_disable(); | ||
246 | /* Hard reset */ | ||
247 | writeb(0x11, 0xfe000332); | ||
248 | while(1); | ||
249 | } | ||
250 | |||
251 | static void | ||
252 | pcore_halt(void) | ||
253 | { | ||
254 | local_irq_disable(); | ||
255 | /* Turn off user LEDs */ | ||
256 | writeb(0x00, 0xfe000300); | ||
257 | while (1); | ||
258 | } | ||
259 | |||
260 | static void | ||
261 | pcore_power_off(void) | ||
262 | { | ||
263 | pcore_halt(); | ||
264 | } | ||
265 | |||
266 | |||
267 | static void __init | ||
268 | pcore_init_IRQ(void) | ||
269 | { | ||
270 | int i; | ||
271 | |||
272 | for ( i = 0 ; i < 16 ; i++ ) | ||
273 | irq_desc[i].handler = &i8259_pic; | ||
274 | |||
275 | i8259_init(0); | ||
276 | } | ||
277 | |||
278 | /* | ||
279 | * Set BAT 3 to map 0xf0000000 to end of physical memory space. | ||
280 | */ | ||
281 | static __inline__ void | ||
282 | pcore_set_bat(void) | ||
283 | { | ||
284 | mb(); | ||
285 | mtspr(SPRN_DBAT3U, 0xf0001ffe); | ||
286 | mtspr(SPRN_DBAT3L, 0xfe80002a); | ||
287 | mb(); | ||
288 | |||
289 | } | ||
290 | |||
291 | static unsigned long __init | ||
292 | pcore_find_end_of_memory(void) | ||
293 | { | ||
294 | |||
295 | return mpc10x_get_mem_size(MPC10X_MEM_MAP_B); | ||
296 | } | ||
297 | |||
298 | static void __init | ||
299 | pcore_map_io(void) | ||
300 | { | ||
301 | io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO); | ||
302 | } | ||
303 | |||
304 | TODC_ALLOC(); | ||
305 | |||
306 | void __init | ||
307 | platform_init(unsigned long r3, unsigned long r4, unsigned long r5, | ||
308 | unsigned long r6, unsigned long r7) | ||
309 | { | ||
310 | parse_bootinfo(find_bootinfo()); | ||
311 | |||
312 | /* Cover I/O space with a BAT */ | ||
313 | /* yuck, better hope your ram size is a power of 2 -- paulus */ | ||
314 | pcore_set_bat(); | ||
315 | |||
316 | isa_io_base = MPC10X_MAPB_ISA_IO_BASE; | ||
317 | isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE; | ||
318 | pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET; | ||
319 | |||
320 | ppc_md.setup_arch = pcore_setup_arch; | ||
321 | ppc_md.show_cpuinfo = pcore_show_cpuinfo; | ||
322 | ppc_md.init_IRQ = pcore_init_IRQ; | ||
323 | ppc_md.get_irq = i8259_irq; | ||
324 | |||
325 | ppc_md.find_end_of_memory = pcore_find_end_of_memory; | ||
326 | ppc_md.setup_io_mappings = pcore_map_io; | ||
327 | |||
328 | ppc_md.restart = pcore_restart; | ||
329 | ppc_md.power_off = pcore_power_off; | ||
330 | ppc_md.halt = pcore_halt; | ||
331 | |||
332 | TODC_INIT(TODC_TYPE_MK48T59, | ||
333 | PCORE_NVRAM_AS0, | ||
334 | PCORE_NVRAM_AS1, | ||
335 | PCORE_NVRAM_DATA, | ||
336 | 8); | ||
337 | |||
338 | ppc_md.time_init = todc_time_init; | ||
339 | ppc_md.get_rtc_time = todc_get_rtc_time; | ||
340 | ppc_md.set_rtc_time = todc_set_rtc_time; | ||
341 | ppc_md.calibrate_decr = todc_calibrate_decr; | ||
342 | |||
343 | ppc_md.nvram_read_val = todc_m48txx_read_val; | ||
344 | ppc_md.nvram_write_val = todc_m48txx_write_val; | ||
345 | |||
346 | #ifdef CONFIG_SERIAL_TEXT_DEBUG | ||
347 | ppc_md.progress = gen550_progress; | ||
348 | #endif | ||
349 | #ifdef CONFIG_KGDB | ||
350 | ppc_md.kgdb_map_scc = gen550_kgdb_map_scc; | ||
351 | #endif | ||
352 | } | ||
diff --git a/arch/ppc/platforms/pcore.h b/arch/ppc/platforms/pcore.h deleted file mode 100644 index c6a26e764926..000000000000 --- a/arch/ppc/platforms/pcore.h +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | /* | ||
2 | * arch/ppc/platforms/pcore.h | ||
3 | * | ||
4 | * Definitions for Force PowerCore board support | ||
5 | * | ||
6 | * Author: Matt Porter <mporter@mvista.com> | ||
7 | * | ||
8 | * 2001 (c) MontaVista, Software, Inc. This file is licensed under | ||
9 | * the terms of the GNU General Public License version 2. This program | ||
10 | * is licensed "as is" without any warranty of any kind, whether express | ||
11 | * or implied. | ||
12 | */ | ||
13 | |||
14 | #ifndef __PPC_PLATFORMS_PCORE_H | ||
15 | #define __PPC_PLATFORMS_PCORE_H | ||
16 | |||
17 | #include <asm/mpc10x.h> | ||
18 | |||
19 | #define PCORE_TYPE_6750 1 | ||
20 | #define PCORE_TYPE_680 2 | ||
21 | |||
22 | #define PCORE_NVRAM_AS0 0x73 | ||
23 | #define PCORE_NVRAM_AS1 0x75 | ||
24 | #define PCORE_NVRAM_DATA 0x77 | ||
25 | |||
26 | #define PCORE_DCCR_REG (MPC10X_MAPB_ISA_IO_BASE + 0x308) | ||
27 | #define PCORE_DCCR_L2_MASK 0xc0 | ||
28 | #define PCORE_DCCR_L2_0KB 0x00 | ||
29 | #define PCORE_DCCR_L2_256KB 0x40 | ||
30 | #define PCORE_DCCR_L2_512KB 0xc0 | ||
31 | #define PCORE_DCCR_L2_1MB 0x80 | ||
32 | #define PCORE_DCCR_L2_2MB 0x00 | ||
33 | |||
34 | #define PCORE_WINBOND_IDE_INT 0x43 | ||
35 | #define PCORE_WINBOND_PCI_INT 0x44 | ||
36 | #define PCORE_WINBOND_PRI_EDG_LVL 0x4d0 | ||
37 | #define PCORE_WINBOND_SEC_EDG_LVL 0x4d1 | ||
38 | |||
39 | #endif /* __PPC_PLATFORMS_PCORE_H */ | ||
diff --git a/arch/ppc/platforms/pmac_pic.c b/arch/ppc/platforms/pmac_pic.c index 9f92e1bb7f34..2ce058895e03 100644 --- a/arch/ppc/platforms/pmac_pic.c +++ b/arch/ppc/platforms/pmac_pic.c | |||
@@ -619,7 +619,7 @@ not_found: | |||
619 | return viaint; | 619 | return viaint; |
620 | } | 620 | } |
621 | 621 | ||
622 | static int pmacpic_suspend(struct sys_device *sysdev, u32 state) | 622 | static int pmacpic_suspend(struct sys_device *sysdev, pm_message_t state) |
623 | { | 623 | { |
624 | int viaint = pmacpic_find_viaint(); | 624 | int viaint = pmacpic_find_viaint(); |
625 | 625 | ||
diff --git a/arch/ppc/platforms/spd8xx.h b/arch/ppc/platforms/spd8xx.h deleted file mode 100644 index ed48d144f415..000000000000 --- a/arch/ppc/platforms/spd8xx.h +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * Speech Design SPD8xxTS board specific definitions | ||
3 | * | ||
4 | * Copyright (c) 2000,2001 Wolfgang Denk (wd@denx.de) | ||
5 | */ | ||
6 | |||
7 | #ifdef __KERNEL__ | ||
8 | #ifndef __ASM_SPD8XX_H__ | ||
9 | #define __ASM_SPD8XX_H__ | ||
10 | |||
11 | #include <linux/config.h> | ||
12 | |||
13 | #include <asm/ppcboot.h> | ||
14 | |||
15 | #ifndef __ASSEMBLY__ | ||
16 | #define SPD_IMMR_BASE 0xFFF00000 /* phys. addr of IMMR */ | ||
17 | #define SPD_IMAP_SIZE (64 * 1024) /* size of mapped area */ | ||
18 | |||
19 | #define IMAP_ADDR SPD_IMMR_BASE /* physical base address of IMMR area */ | ||
20 | #define IMAP_SIZE SPD_IMAP_SIZE /* mapped size of IMMR area */ | ||
21 | |||
22 | #define PCMCIA_MEM_ADDR ((uint)0xFE100000) | ||
23 | #define PCMCIA_MEM_SIZE ((uint)(64 * 1024)) | ||
24 | |||
25 | #define IDE0_INTERRUPT 10 /* = IRQ5 */ | ||
26 | #define IDE1_INTERRUPT 12 /* = IRQ6 */ | ||
27 | #define CPM_INTERRUPT 13 /* = SIU_LEVEL6 (was: SIU_LEVEL2) */ | ||
28 | |||
29 | /* override the default number of IDE hardware interfaces */ | ||
30 | #define MAX_HWIFS 2 | ||
31 | |||
32 | /* | ||
33 | * Definitions for IDE0 Interface | ||
34 | */ | ||
35 | #define IDE0_BASE_OFFSET 0x0000 /* Offset in PCMCIA memory */ | ||
36 | #define IDE0_DATA_REG_OFFSET 0x0000 | ||
37 | #define IDE0_ERROR_REG_OFFSET 0x0081 | ||
38 | #define IDE0_NSECTOR_REG_OFFSET 0x0082 | ||
39 | #define IDE0_SECTOR_REG_OFFSET 0x0083 | ||
40 | #define IDE0_LCYL_REG_OFFSET 0x0084 | ||
41 | #define IDE0_HCYL_REG_OFFSET 0x0085 | ||
42 | #define IDE0_SELECT_REG_OFFSET 0x0086 | ||
43 | #define IDE0_STATUS_REG_OFFSET 0x0087 | ||
44 | #define IDE0_CONTROL_REG_OFFSET 0x0106 | ||
45 | #define IDE0_IRQ_REG_OFFSET 0x000A /* not used */ | ||
46 | |||
47 | /* | ||
48 | * Definitions for IDE1 Interface | ||
49 | */ | ||
50 | #define IDE1_BASE_OFFSET 0x0C00 /* Offset in PCMCIA memory */ | ||
51 | #define IDE1_DATA_REG_OFFSET 0x0000 | ||
52 | #define IDE1_ERROR_REG_OFFSET 0x0081 | ||
53 | #define IDE1_NSECTOR_REG_OFFSET 0x0082 | ||
54 | #define IDE1_SECTOR_REG_OFFSET 0x0083 | ||
55 | #define IDE1_LCYL_REG_OFFSET 0x0084 | ||
56 | #define IDE1_HCYL_REG_OFFSET 0x0085 | ||
57 | #define IDE1_SELECT_REG_OFFSET 0x0086 | ||
58 | #define IDE1_STATUS_REG_OFFSET 0x0087 | ||
59 | #define IDE1_CONTROL_REG_OFFSET 0x0106 | ||
60 | #define IDE1_IRQ_REG_OFFSET 0x000A /* not used */ | ||
61 | |||
62 | /* CPM Ethernet through SCCx. | ||
63 | * | ||
64 | * Bits in parallel I/O port registers that have to be set/cleared | ||
65 | * to configure the pins for SCC2 use. | ||
66 | */ | ||
67 | #define PA_ENET_MDC ((ushort)0x0001) /* PA 15 !!! */ | ||
68 | #define PA_ENET_MDIO ((ushort)0x0002) /* PA 14 !!! */ | ||
69 | #define PA_ENET_RXD ((ushort)0x0004) /* PA 13 */ | ||
70 | #define PA_ENET_TXD ((ushort)0x0008) /* PA 12 */ | ||
71 | #define PA_ENET_RCLK ((ushort)0x0200) /* PA 6 */ | ||
72 | #define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */ | ||
73 | |||
74 | #define PB_ENET_TENA ((uint)0x00002000) /* PB 18 */ | ||
75 | |||
76 | #define PC_ENET_CLSN ((ushort)0x0040) /* PC 9 */ | ||
77 | #define PC_ENET_RENA ((ushort)0x0080) /* PC 8 */ | ||
78 | #define PC_ENET_RESET ((ushort)0x0100) /* PC 7 !!! */ | ||
79 | |||
80 | /* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK2) to | ||
81 | * SCC2. Also, make sure GR2 (bit 16) and SC2 (bit 17) are zero. | ||
82 | */ | ||
83 | #define SICR_ENET_MASK ((uint)0x0000ff00) | ||
84 | #define SICR_ENET_CLKRT ((uint)0x00002E00) | ||
85 | |||
86 | /* We don't use the 8259. | ||
87 | */ | ||
88 | #define NR_8259_INTS 0 | ||
89 | |||
90 | #endif /* !__ASSEMBLY__ */ | ||
91 | #endif /* __ASM_SPD8XX_H__ */ | ||
92 | #endif /* __KERNEL__ */ | ||
diff --git a/arch/ppc/platforms/tqm8xx.h b/arch/ppc/platforms/tqm8xx.h index 2150dc87b18f..43ac064ebe5a 100644 --- a/arch/ppc/platforms/tqm8xx.h +++ b/arch/ppc/platforms/tqm8xx.h | |||
@@ -147,29 +147,6 @@ static __inline__ void ide_led(int on) | |||
147 | #define SICR_ENET_CLKRT ((uint)0x00002600) | 147 | #define SICR_ENET_CLKRT ((uint)0x00002600) |
148 | #endif /* CONFIG_FPS850L */ | 148 | #endif /* CONFIG_FPS850L */ |
149 | 149 | ||
150 | /*** SM850 *********************************************************/ | ||
151 | |||
152 | /* The SM850 Service Module uses SCC2 for IrDA and SCC3 for Ethernet */ | ||
153 | |||
154 | #ifdef CONFIG_SM850 | ||
155 | #define PB_ENET_RXD ((uint)0x00000004) /* PB 29 */ | ||
156 | #define PB_ENET_TXD ((uint)0x00000002) /* PB 30 */ | ||
157 | #define PA_ENET_RCLK ((ushort)0x0100) /* PA 7 */ | ||
158 | #define PA_ENET_TCLK ((ushort)0x0400) /* PA 5 */ | ||
159 | |||
160 | #define PC_ENET_LBK ((ushort)0x0008) /* PC 12 */ | ||
161 | #define PC_ENET_TENA ((ushort)0x0004) /* PC 13 */ | ||
162 | |||
163 | #define PC_ENET_RENA ((ushort)0x0800) /* PC 4 */ | ||
164 | #define PC_ENET_CLSN ((ushort)0x0400) /* PC 5 */ | ||
165 | |||
166 | /* Control bits in the SICR to route TCLK (CLK3) and RCLK (CLK1) to | ||
167 | * SCC3. Also, make sure GR3 (bit 8) and SC3 (bit 9) are zero. | ||
168 | */ | ||
169 | #define SICR_ENET_MASK ((uint)0x00FF0000) | ||
170 | #define SICR_ENET_CLKRT ((uint)0x00260000) | ||
171 | #endif /* CONFIG_SM850 */ | ||
172 | |||
173 | /* We don't use the 8259. | 150 | /* We don't use the 8259. |
174 | */ | 151 | */ |
175 | #define NR_8259_INTS 0 | 152 | #define NR_8259_INTS 0 |
diff --git a/arch/ppc/syslib/Makefile b/arch/ppc/syslib/Makefile index 220a65ab0a51..8b9b226005d1 100644 --- a/arch/ppc/syslib/Makefile +++ b/arch/ppc/syslib/Makefile | |||
@@ -43,8 +43,6 @@ obj-$(CONFIG_PPC_PMAC) += open_pic.o indirect_pci.o | |||
43 | obj-$(CONFIG_POWER4) += open_pic2.o | 43 | obj-$(CONFIG_POWER4) += open_pic2.o |
44 | obj-$(CONFIG_PPC_CHRP) += open_pic.o indirect_pci.o i8259.o | 44 | obj-$(CONFIG_PPC_CHRP) += open_pic.o indirect_pci.o i8259.o |
45 | obj-$(CONFIG_PPC_PREP) += open_pic.o indirect_pci.o i8259.o todc_time.o | 45 | obj-$(CONFIG_PPC_PREP) += open_pic.o indirect_pci.o i8259.o todc_time.o |
46 | obj-$(CONFIG_ADIR) += i8259.o indirect_pci.o pci_auto.o \ | ||
47 | todc_time.o | ||
48 | obj-$(CONFIG_BAMBOO) += indirect_pci.o pci_auto.o todc_time.o | 46 | obj-$(CONFIG_BAMBOO) += indirect_pci.o pci_auto.o todc_time.o |
49 | obj-$(CONFIG_CPCI690) += todc_time.o pci_auto.o | 47 | obj-$(CONFIG_CPCI690) += todc_time.o pci_auto.o |
50 | obj-$(CONFIG_EBONY) += indirect_pci.o pci_auto.o todc_time.o | 48 | obj-$(CONFIG_EBONY) += indirect_pci.o pci_auto.o todc_time.o |
@@ -52,16 +50,10 @@ obj-$(CONFIG_EV64260) += todc_time.o pci_auto.o | |||
52 | obj-$(CONFIG_CHESTNUT) += mv64360_pic.o pci_auto.o | 50 | obj-$(CONFIG_CHESTNUT) += mv64360_pic.o pci_auto.o |
53 | obj-$(CONFIG_GEMINI) += open_pic.o indirect_pci.o | 51 | obj-$(CONFIG_GEMINI) += open_pic.o indirect_pci.o |
54 | obj-$(CONFIG_GT64260) += gt64260_pic.o | 52 | obj-$(CONFIG_GT64260) += gt64260_pic.o |
55 | obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \ | ||
56 | pci_auto.o | ||
57 | obj-$(CONFIG_LOPEC) += i8259.o pci_auto.o todc_time.o | 53 | obj-$(CONFIG_LOPEC) += i8259.o pci_auto.o todc_time.o |
58 | obj-$(CONFIG_HDPU) += pci_auto.o | 54 | obj-$(CONFIG_HDPU) += pci_auto.o |
59 | obj-$(CONFIG_LUAN) += indirect_pci.o pci_auto.o todc_time.o | 55 | obj-$(CONFIG_LUAN) += indirect_pci.o pci_auto.o todc_time.o |
60 | obj-$(CONFIG_KATANA) += pci_auto.o | 56 | obj-$(CONFIG_KATANA) += pci_auto.o |
61 | obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \ | ||
62 | open_pic.o i8259.o hawk_common.o | ||
63 | obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \ | ||
64 | pci_auto.o indirect_pci.o | ||
65 | obj-$(CONFIG_MV64360) += mv64360_pic.o | 57 | obj-$(CONFIG_MV64360) += mv64360_pic.o |
66 | obj-$(CONFIG_MV64X60) += mv64x60.o mv64x60_win.o indirect_pci.o | 58 | obj-$(CONFIG_MV64X60) += mv64x60.o mv64x60_win.o indirect_pci.o |
67 | obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \ | 59 | obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \ |
@@ -69,7 +61,6 @@ obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \ | |||
69 | obj-$(CONFIG_MVME5100_IPMC761_PRESENT) += i8259.o | 61 | obj-$(CONFIG_MVME5100_IPMC761_PRESENT) += i8259.o |
70 | obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o | 62 | obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o |
71 | obj-$(CONFIG_PAL4) += cpc700_pic.o | 63 | obj-$(CONFIG_PAL4) += cpc700_pic.o |
72 | obj-$(CONFIG_PCORE) += todc_time.o i8259.o pci_auto.o | ||
73 | obj-$(CONFIG_POWERPMC250) += pci_auto.o | 64 | obj-$(CONFIG_POWERPMC250) += pci_auto.o |
74 | obj-$(CONFIG_PPLUS) += hawk_common.o open_pic.o i8259.o \ | 65 | obj-$(CONFIG_PPLUS) += hawk_common.o open_pic.o i8259.o \ |
75 | indirect_pci.o todc_time.o pci_auto.o | 66 | indirect_pci.o todc_time.o pci_auto.o |
@@ -82,7 +73,8 @@ obj-$(CONFIG_SANDPOINT) += i8259.o pci_auto.o todc_time.o | |||
82 | obj-$(CONFIG_SBC82xx) += todc_time.o | 73 | obj-$(CONFIG_SBC82xx) += todc_time.o |
83 | obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ | 74 | obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ |
84 | todc_time.o | 75 | todc_time.o |
85 | obj-$(CONFIG_8260) += m8260_setup.o | 76 | obj-$(CONFIG_8260) += m8260_setup.o pq2_devices.o pq2_sys.o \ |
77 | ppc_sys.o | ||
86 | obj-$(CONFIG_PCI_8260) += m82xx_pci.o indirect_pci.o pci_auto.o | 78 | obj-$(CONFIG_PCI_8260) += m82xx_pci.o indirect_pci.o pci_auto.o |
87 | obj-$(CONFIG_8260_PCI9) += m8260_pci_erratum9.o | 79 | obj-$(CONFIG_8260_PCI9) += m8260_pci_erratum9.o |
88 | obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o | 80 | obj-$(CONFIG_CPM2) += cpm2_common.o cpm2_pic.o |
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 74d8996418e9..8356da4678a2 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -366,10 +366,16 @@ mv64360_pci_error_int_handler(int irq, void *dev_id, struct pt_regs *regs) | |||
366 | return IRQ_HANDLED; | 366 | return IRQ_HANDLED; |
367 | } | 367 | } |
368 | 368 | ||
369 | /* | ||
370 | * Bit 0 of MV64x60_PCIx_ERR_MASK does not exist on the 64360 and because of | ||
371 | * errata FEr-#11 and FEr-##16 for the 64460, it should be 0 on that chip as | ||
372 | * well. IOW, don't set bit 0. | ||
373 | */ | ||
374 | #define MV64360_PCI0_ERR_MASK_VAL 0x00a50c24 | ||
375 | |||
369 | static int __init | 376 | static int __init |
370 | mv64360_register_hdlrs(void) | 377 | mv64360_register_hdlrs(void) |
371 | { | 378 | { |
372 | u32 mask; | ||
373 | int rc; | 379 | int rc; |
374 | 380 | ||
375 | /* Clear old errors and register CPU interface error intr handler */ | 381 | /* Clear old errors and register CPU interface error intr handler */ |
@@ -387,17 +393,6 @@ mv64360_register_hdlrs(void) | |||
387 | mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) | 393 | mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0))) |
388 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); | 394 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); |
389 | 395 | ||
390 | /* | ||
391 | * Bit 0 reserved on 64360 and erratum FEr PCI-#11 (PCI internal | ||
392 | * data parity error set incorrectly) on rev 0 & 1 of 64460 requires | ||
393 | * bit 0 to be cleared. | ||
394 | */ | ||
395 | mask = 0x00a50c24; | ||
396 | |||
397 | if ((mv64x60_get_bridge_type() == MV64x60_TYPE_MV64460) && | ||
398 | (mv64x60_get_bridge_rev() > 1)) | ||
399 | mask |= 0x1; /* enable DPErr on 64460 */ | ||
400 | |||
401 | /* Clear old errors and register PCI 0 error intr handler */ | 396 | /* Clear old errors and register PCI 0 error intr handler */ |
402 | mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); | 397 | mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0); |
403 | if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, | 398 | if ((rc = request_irq(MV64360_IRQ_PCI0 + mv64360_irq_base, |
@@ -407,7 +402,11 @@ mv64360_register_hdlrs(void) | |||
407 | rc); | 402 | rc); |
408 | 403 | ||
409 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0); | 404 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0); |
410 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, mask); | 405 | mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, MV64360_PCI0_ERR_MASK_VAL); |
406 | |||
407 | /* Erratum FEr PCI-#16 says to clear bit 0 of PCI SERRn Mask reg. */ | ||
408 | mv64x60_write(&bh, MV64x60_PCI0_ERR_SERR_MASK, | ||
409 | mv64x60_read(&bh, MV64x60_PCI0_ERR_SERR_MASK) & ~0x1UL); | ||
411 | 410 | ||
412 | /* Clear old errors and register PCI 1 error intr handler */ | 411 | /* Clear old errors and register PCI 1 error intr handler */ |
413 | mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); | 412 | mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0); |
@@ -418,7 +417,11 @@ mv64360_register_hdlrs(void) | |||
418 | rc); | 417 | rc); |
419 | 418 | ||
420 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, 0); | 419 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, 0); |
421 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, mask); | 420 | mv64x60_write(&bh, MV64x60_PCI1_ERR_MASK, MV64360_PCI0_ERR_MASK_VAL); |
421 | |||
422 | /* Erratum FEr PCI-#16 says to clear bit 0 of PCI Intr Mask reg. */ | ||
423 | mv64x60_write(&bh, MV64x60_PCI1_ERR_SERR_MASK, | ||
424 | mv64x60_read(&bh, MV64x60_PCI1_ERR_SERR_MASK) & ~0x1UL); | ||
422 | 425 | ||
423 | return 0; | 426 | return 0; |
424 | } | 427 | } |
diff --git a/arch/ppc/syslib/mv64x60.c b/arch/ppc/syslib/mv64x60.c index cc77177fa1c6..6262b11f366f 100644 --- a/arch/ppc/syslib/mv64x60.c +++ b/arch/ppc/syslib/mv64x60.c | |||
@@ -30,13 +30,16 @@ | |||
30 | #include <asm/mv64x60.h> | 30 | #include <asm/mv64x60.h> |
31 | 31 | ||
32 | 32 | ||
33 | u8 mv64x60_pci_exclude_bridge = 1; | 33 | u8 mv64x60_pci_exclude_bridge = 1; |
34 | spinlock_t mv64x60_lock = SPIN_LOCK_UNLOCKED; | 34 | spinlock_t mv64x60_lock = SPIN_LOCK_UNLOCKED; |
35 | 35 | ||
36 | static phys_addr_t mv64x60_bridge_pbase = 0; | 36 | static phys_addr_t mv64x60_bridge_pbase; |
37 | static void *mv64x60_bridge_vbase = 0; | 37 | static void *mv64x60_bridge_vbase; |
38 | static u32 mv64x60_bridge_type = MV64x60_TYPE_INVALID; | 38 | static u32 mv64x60_bridge_type = MV64x60_TYPE_INVALID; |
39 | static u32 mv64x60_bridge_rev = 0; | 39 | static u32 mv64x60_bridge_rev; |
40 | #if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260) | ||
41 | static struct pci_controller sysfs_hose_a; | ||
42 | #endif | ||
40 | 43 | ||
41 | static u32 gt64260_translate_size(u32 base, u32 size, u32 num_bits); | 44 | static u32 gt64260_translate_size(u32 base, u32 size, u32 num_bits); |
42 | static u32 gt64260_untranslate_size(u32 base, u32 size, u32 num_bits); | 45 | static u32 gt64260_untranslate_size(u32 base, u32 size, u32 num_bits); |
@@ -432,6 +435,20 @@ static struct platform_device i2c_device = { | |||
432 | }; | 435 | }; |
433 | #endif | 436 | #endif |
434 | 437 | ||
438 | #if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260) | ||
439 | static struct mv64xxx_pdata mv64xxx_pdata = { | ||
440 | .hs_reg_valid = 0, | ||
441 | }; | ||
442 | |||
443 | static struct platform_device mv64xxx_device = { /* general mv64x60 stuff */ | ||
444 | .name = MV64XXX_DEV_NAME, | ||
445 | .id = 0, | ||
446 | .dev = { | ||
447 | .platform_data = &mv64xxx_pdata, | ||
448 | }, | ||
449 | }; | ||
450 | #endif | ||
451 | |||
435 | static struct platform_device *mv64x60_pd_devs[] __initdata = { | 452 | static struct platform_device *mv64x60_pd_devs[] __initdata = { |
436 | #ifdef CONFIG_SERIAL_MPSC | 453 | #ifdef CONFIG_SERIAL_MPSC |
437 | &mpsc_shared_device, | 454 | &mpsc_shared_device, |
@@ -453,6 +470,9 @@ static struct platform_device *mv64x60_pd_devs[] __initdata = { | |||
453 | #ifdef CONFIG_I2C_MV64XXX | 470 | #ifdef CONFIG_I2C_MV64XXX |
454 | &i2c_device, | 471 | &i2c_device, |
455 | #endif | 472 | #endif |
473 | #if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260) | ||
474 | &mv64xxx_device, | ||
475 | #endif | ||
456 | }; | 476 | }; |
457 | 477 | ||
458 | /* | 478 | /* |
@@ -574,6 +594,11 @@ mv64x60_early_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si) | |||
574 | bh->hose_a = &hose_a; | 594 | bh->hose_a = &hose_a; |
575 | bh->hose_b = &hose_b; | 595 | bh->hose_b = &hose_b; |
576 | 596 | ||
597 | #if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260) | ||
598 | /* Save a copy of hose_a for sysfs functions -- hack */ | ||
599 | memcpy(&sysfs_hose_a, &hose_a, sizeof(hose_a)); | ||
600 | #endif | ||
601 | |||
577 | mv64x60_set_bus(bh, 0, 0); | 602 | mv64x60_set_bus(bh, 0, 0); |
578 | mv64x60_set_bus(bh, 1, 0); | 603 | mv64x60_set_bus(bh, 1, 0); |
579 | 604 | ||
@@ -590,8 +615,6 @@ mv64x60_early_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si) | |||
590 | 615 | ||
591 | mv64x60_set_bits(bh, MV64x60_PCI0_TO_RETRY, 0xffff); | 616 | mv64x60_set_bits(bh, MV64x60_PCI0_TO_RETRY, 0xffff); |
592 | mv64x60_set_bits(bh, MV64x60_PCI1_TO_RETRY, 0xffff); | 617 | mv64x60_set_bits(bh, MV64x60_PCI1_TO_RETRY, 0xffff); |
593 | |||
594 | return; | ||
595 | } | 618 | } |
596 | 619 | ||
597 | /* | 620 | /* |
@@ -628,19 +651,15 @@ mv64x60_get_32bit_window(struct mv64x60_handle *bh, u32 window, | |||
628 | val = mv64x60_read(bh, size_reg); | 651 | val = mv64x60_read(bh, size_reg); |
629 | val = get_from_field(val, size_bits); | 652 | val = get_from_field(val, size_bits); |
630 | *size = bh->ci->untranslate_size(*base, val, size_bits); | 653 | *size = bh->ci->untranslate_size(*base, val, size_bits); |
631 | } | 654 | } else |
632 | else | ||
633 | *size = 0; | 655 | *size = 0; |
634 | } | 656 | } else { |
635 | else { | ||
636 | *base = 0; | 657 | *base = 0; |
637 | *size = 0; | 658 | *size = 0; |
638 | } | 659 | } |
639 | 660 | ||
640 | pr_debug("get 32bit window: %d, base: 0x%x, size: 0x%x\n", | 661 | pr_debug("get 32bit window: %d, base: 0x%x, size: 0x%x\n", |
641 | window, *base, *size); | 662 | window, *base, *size); |
642 | |||
643 | return; | ||
644 | } | 663 | } |
645 | 664 | ||
646 | /* | 665 | /* |
@@ -677,8 +696,6 @@ mv64x60_set_32bit_window(struct mv64x60_handle *bh, u32 window, | |||
677 | 696 | ||
678 | (void)mv64x60_read(bh, base_reg); /* Flush FIFO */ | 697 | (void)mv64x60_read(bh, base_reg); /* Flush FIFO */ |
679 | } | 698 | } |
680 | |||
681 | return; | ||
682 | } | 699 | } |
683 | 700 | ||
684 | /* | 701 | /* |
@@ -712,11 +729,9 @@ mv64x60_get_64bit_window(struct mv64x60_handle *bh, u32 window, | |||
712 | val = get_from_field(val, size_bits); | 729 | val = get_from_field(val, size_bits); |
713 | *size = bh->ci->untranslate_size(*base_lo, val, | 730 | *size = bh->ci->untranslate_size(*base_lo, val, |
714 | size_bits); | 731 | size_bits); |
715 | } | 732 | } else |
716 | else | ||
717 | *size = 0; | 733 | *size = 0; |
718 | } | 734 | } else { |
719 | else { | ||
720 | *base_hi = 0; | 735 | *base_hi = 0; |
721 | *base_lo = 0; | 736 | *base_lo = 0; |
722 | *size = 0; | 737 | *size = 0; |
@@ -724,8 +739,6 @@ mv64x60_get_64bit_window(struct mv64x60_handle *bh, u32 window, | |||
724 | 739 | ||
725 | pr_debug("get 64bit window: %d, base hi: 0x%x, base lo: 0x%x, " | 740 | pr_debug("get 64bit window: %d, base hi: 0x%x, base lo: 0x%x, " |
726 | "size: 0x%x\n", window, *base_hi, *base_lo, *size); | 741 | "size: 0x%x\n", window, *base_hi, *base_lo, *size); |
727 | |||
728 | return; | ||
729 | } | 742 | } |
730 | 743 | ||
731 | /* | 744 | /* |
@@ -766,8 +779,6 @@ mv64x60_set_64bit_window(struct mv64x60_handle *bh, u32 window, | |||
766 | 779 | ||
767 | (void)mv64x60_read(bh, base_lo_reg); /* Flush FIFO */ | 780 | (void)mv64x60_read(bh, base_lo_reg); /* Flush FIFO */ |
768 | } | 781 | } |
769 | |||
770 | return; | ||
771 | } | 782 | } |
772 | 783 | ||
773 | /* | 784 | /* |
@@ -1008,8 +1019,6 @@ mv64x60_get_mem_windows(struct mv64x60_handle *bh, | |||
1008 | mem_windows[i][0] = 0; | 1019 | mem_windows[i][0] = 0; |
1009 | mem_windows[i][1] = 0; | 1020 | mem_windows[i][1] = 0; |
1010 | } | 1021 | } |
1011 | |||
1012 | return; | ||
1013 | } | 1022 | } |
1014 | 1023 | ||
1015 | /* | 1024 | /* |
@@ -1077,8 +1086,6 @@ mv64x60_config_cpu2mem_windows(struct mv64x60_handle *bh, | |||
1077 | } | 1086 | } |
1078 | 1087 | ||
1079 | } | 1088 | } |
1080 | |||
1081 | return; | ||
1082 | } | 1089 | } |
1083 | 1090 | ||
1084 | /* | 1091 | /* |
@@ -1112,8 +1119,7 @@ mv64x60_config_cpu2pci_windows(struct mv64x60_handle *bh, | |||
1112 | mv64x60_set_32bit_window(bh, remap_tab[bus][0], | 1119 | mv64x60_set_32bit_window(bh, remap_tab[bus][0], |
1113 | pi->pci_io.pci_base_lo, 0, 0); | 1120 | pi->pci_io.pci_base_lo, 0, 0); |
1114 | bh->ci->enable_window_32bit(bh, win_tab[bus][0]); | 1121 | bh->ci->enable_window_32bit(bh, win_tab[bus][0]); |
1115 | } | 1122 | } else /* Actually, the window should already be disabled */ |
1116 | else /* Actually, the window should already be disabled */ | ||
1117 | bh->ci->disable_window_32bit(bh, win_tab[bus][0]); | 1123 | bh->ci->disable_window_32bit(bh, win_tab[bus][0]); |
1118 | 1124 | ||
1119 | for (i=0; i<3; i++) | 1125 | for (i=0; i<3; i++) |
@@ -1125,11 +1131,8 @@ mv64x60_config_cpu2pci_windows(struct mv64x60_handle *bh, | |||
1125 | pi->pci_mem[i].pci_base_hi, | 1131 | pi->pci_mem[i].pci_base_hi, |
1126 | pi->pci_mem[i].pci_base_lo, 0, 0); | 1132 | pi->pci_mem[i].pci_base_lo, 0, 0); |
1127 | bh->ci->enable_window_32bit(bh, win_tab[bus][i+1]); | 1133 | bh->ci->enable_window_32bit(bh, win_tab[bus][i+1]); |
1128 | } | 1134 | } else /* Actually, the window should already be disabled */ |
1129 | else /* Actually, the window should already be disabled */ | ||
1130 | bh->ci->disable_window_32bit(bh, win_tab[bus][i+1]); | 1135 | bh->ci->disable_window_32bit(bh, win_tab[bus][i+1]); |
1131 | |||
1132 | return; | ||
1133 | } | 1136 | } |
1134 | 1137 | ||
1135 | /* | 1138 | /* |
@@ -1206,8 +1209,6 @@ mv64x60_config_pci2mem_windows(struct mv64x60_handle *bh, | |||
1206 | MV64x60_PCI0_BAR_ENABLE : | 1209 | MV64x60_PCI0_BAR_ENABLE : |
1207 | MV64x60_PCI1_BAR_ENABLE), (1 << i)); | 1210 | MV64x60_PCI1_BAR_ENABLE), (1 << i)); |
1208 | } | 1211 | } |
1209 | |||
1210 | return; | ||
1211 | } | 1212 | } |
1212 | 1213 | ||
1213 | /* | 1214 | /* |
@@ -1229,7 +1230,6 @@ mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr, u32 cfg_data, | |||
1229 | *hose = pcibios_alloc_controller(); | 1230 | *hose = pcibios_alloc_controller(); |
1230 | setup_indirect_pci_nomap(*hose, bh->v_base + cfg_addr, | 1231 | setup_indirect_pci_nomap(*hose, bh->v_base + cfg_addr, |
1231 | bh->v_base + cfg_data); | 1232 | bh->v_base + cfg_data); |
1232 | return; | ||
1233 | } | 1233 | } |
1234 | 1234 | ||
1235 | /* | 1235 | /* |
@@ -1272,7 +1272,6 @@ mv64x60_config_resources(struct pci_controller *hose, | |||
1272 | pi->pci_mem[0].size - 1; | 1272 | pi->pci_mem[0].size - 1; |
1273 | hose->pci_mem_offset = pi->pci_mem[0].cpu_base - | 1273 | hose->pci_mem_offset = pi->pci_mem[0].cpu_base - |
1274 | pi->pci_mem[0].pci_base_lo; | 1274 | pi->pci_mem[0].pci_base_lo; |
1275 | return; | ||
1276 | } | 1275 | } |
1277 | 1276 | ||
1278 | /* | 1277 | /* |
@@ -1309,7 +1308,6 @@ mv64x60_config_pci_params(struct pci_controller *hose, | |||
1309 | early_write_config_word(hose, 0, devfn, PCI_CACHE_LINE_SIZE, u16_val); | 1308 | early_write_config_word(hose, 0, devfn, PCI_CACHE_LINE_SIZE, u16_val); |
1310 | 1309 | ||
1311 | mv64x60_pci_exclude_bridge = save_exclude; | 1310 | mv64x60_pci_exclude_bridge = save_exclude; |
1312 | return; | ||
1313 | } | 1311 | } |
1314 | 1312 | ||
1315 | /* | 1313 | /* |
@@ -1336,8 +1334,7 @@ mv64x60_set_bus(struct mv64x60_handle *bh, u32 bus, u32 child_bus) | |||
1336 | p2p_cfg = MV64x60_PCI0_P2P_CONFIG; | 1334 | p2p_cfg = MV64x60_PCI0_P2P_CONFIG; |
1337 | pci_cfg_offset = 0x64; | 1335 | pci_cfg_offset = 0x64; |
1338 | hose = bh->hose_a; | 1336 | hose = bh->hose_a; |
1339 | } | 1337 | } else { |
1340 | else { | ||
1341 | pci_mode = bh->pci_mode_b; | 1338 | pci_mode = bh->pci_mode_b; |
1342 | p2p_cfg = MV64x60_PCI1_P2P_CONFIG; | 1339 | p2p_cfg = MV64x60_PCI1_P2P_CONFIG; |
1343 | pci_cfg_offset = 0xe4; | 1340 | pci_cfg_offset = 0xe4; |
@@ -1352,8 +1349,7 @@ mv64x60_set_bus(struct mv64x60_handle *bh, u32 bus, u32 child_bus) | |||
1352 | val |= (child_bus << 16) | 0xff; | 1349 | val |= (child_bus << 16) | 0xff; |
1353 | mv64x60_write(bh, p2p_cfg, val); | 1350 | mv64x60_write(bh, p2p_cfg, val); |
1354 | (void)mv64x60_read(bh, p2p_cfg); /* Flush FIFO */ | 1351 | (void)mv64x60_read(bh, p2p_cfg); /* Flush FIFO */ |
1355 | } | 1352 | } else { /* PCI-X */ |
1356 | else { /* PCI-X */ | ||
1357 | /* | 1353 | /* |
1358 | * Need to use the current bus/dev number (that's in the | 1354 | * Need to use the current bus/dev number (that's in the |
1359 | * P2P CONFIG reg) to access the bridge's pci config space. | 1355 | * P2P CONFIG reg) to access the bridge's pci config space. |
@@ -1365,8 +1361,6 @@ mv64x60_set_bus(struct mv64x60_handle *bh, u32 bus, u32 child_bus) | |||
1365 | pci_cfg_offset, child_bus << 8); | 1361 | pci_cfg_offset, child_bus << 8); |
1366 | mv64x60_pci_exclude_bridge = save_exclude; | 1362 | mv64x60_pci_exclude_bridge = save_exclude; |
1367 | } | 1363 | } |
1368 | |||
1369 | return; | ||
1370 | } | 1364 | } |
1371 | 1365 | ||
1372 | /* | 1366 | /* |
@@ -1423,8 +1417,6 @@ mv64x60_pd_fixup(struct mv64x60_handle *bh, struct platform_device *pd_devs[], | |||
1423 | j++; | 1417 | j++; |
1424 | } | 1418 | } |
1425 | } | 1419 | } |
1426 | |||
1427 | return; | ||
1428 | } | 1420 | } |
1429 | 1421 | ||
1430 | /* | 1422 | /* |
@@ -1498,8 +1490,6 @@ gt64260_set_pci2mem_window(struct pci_controller *hose, u32 bus, u32 window, | |||
1498 | early_write_config_dword(hose, 0, PCI_DEVFN(0, 0), | 1490 | early_write_config_dword(hose, 0, PCI_DEVFN(0, 0), |
1499 | gt64260_reg_addrs[bus][window], mv64x60_mask(base, 20) | 0x8); | 1491 | gt64260_reg_addrs[bus][window], mv64x60_mask(base, 20) | 0x8); |
1500 | mv64x60_pci_exclude_bridge = save_exclude; | 1492 | mv64x60_pci_exclude_bridge = save_exclude; |
1501 | |||
1502 | return; | ||
1503 | } | 1493 | } |
1504 | 1494 | ||
1505 | /* | 1495 | /* |
@@ -1523,8 +1513,6 @@ gt64260_set_pci2regs_window(struct mv64x60_handle *bh, | |||
1523 | early_write_config_dword(hose, 0, PCI_DEVFN(0,0), gt64260_offset[bus], | 1513 | early_write_config_dword(hose, 0, PCI_DEVFN(0,0), gt64260_offset[bus], |
1524 | (base << 16)); | 1514 | (base << 16)); |
1525 | mv64x60_pci_exclude_bridge = save_exclude; | 1515 | mv64x60_pci_exclude_bridge = save_exclude; |
1526 | |||
1527 | return; | ||
1528 | } | 1516 | } |
1529 | 1517 | ||
1530 | /* | 1518 | /* |
@@ -1561,7 +1549,6 @@ static void __init | |||
1561 | gt64260_enable_window_32bit(struct mv64x60_handle *bh, u32 window) | 1549 | gt64260_enable_window_32bit(struct mv64x60_handle *bh, u32 window) |
1562 | { | 1550 | { |
1563 | pr_debug("enable 32bit window: %d\n", window); | 1551 | pr_debug("enable 32bit window: %d\n", window); |
1564 | return; | ||
1565 | } | 1552 | } |
1566 | 1553 | ||
1567 | /* | 1554 | /* |
@@ -1584,8 +1571,6 @@ gt64260_disable_window_32bit(struct mv64x60_handle *bh, u32 window) | |||
1584 | mv64x60_write(bh, gt64260_32bit_windows[window].base_reg,0xfff); | 1571 | mv64x60_write(bh, gt64260_32bit_windows[window].base_reg,0xfff); |
1585 | mv64x60_write(bh, gt64260_32bit_windows[window].size_reg, 0); | 1572 | mv64x60_write(bh, gt64260_32bit_windows[window].size_reg, 0); |
1586 | } | 1573 | } |
1587 | |||
1588 | return; | ||
1589 | } | 1574 | } |
1590 | 1575 | ||
1591 | /* | 1576 | /* |
@@ -1599,7 +1584,6 @@ static void __init | |||
1599 | gt64260_enable_window_64bit(struct mv64x60_handle *bh, u32 window) | 1584 | gt64260_enable_window_64bit(struct mv64x60_handle *bh, u32 window) |
1600 | { | 1585 | { |
1601 | pr_debug("enable 64bit window: %d\n", window); | 1586 | pr_debug("enable 64bit window: %d\n", window); |
1602 | return; /* Enabled when window configured (i.e., when top >= base) */ | ||
1603 | } | 1587 | } |
1604 | 1588 | ||
1605 | /* | 1589 | /* |
@@ -1624,8 +1608,6 @@ gt64260_disable_window_64bit(struct mv64x60_handle *bh, u32 window) | |||
1624 | mv64x60_write(bh, gt64260_64bit_windows[window].base_hi_reg, 0); | 1608 | mv64x60_write(bh, gt64260_64bit_windows[window].base_hi_reg, 0); |
1625 | mv64x60_write(bh, gt64260_64bit_windows[window].size_reg, 0); | 1609 | mv64x60_write(bh, gt64260_64bit_windows[window].size_reg, 0); |
1626 | } | 1610 | } |
1627 | |||
1628 | return; | ||
1629 | } | 1611 | } |
1630 | 1612 | ||
1631 | /* | 1613 | /* |
@@ -1712,8 +1694,6 @@ gt64260_disable_all_windows(struct mv64x60_handle *bh, | |||
1712 | mv64x60_write(bh, GT64260_IC_CPU_INT_1_MASK, 0); | 1694 | mv64x60_write(bh, GT64260_IC_CPU_INT_1_MASK, 0); |
1713 | mv64x60_write(bh, GT64260_IC_CPU_INT_2_MASK, 0); | 1695 | mv64x60_write(bh, GT64260_IC_CPU_INT_2_MASK, 0); |
1714 | mv64x60_write(bh, GT64260_IC_CPU_INT_3_MASK, 0); | 1696 | mv64x60_write(bh, GT64260_IC_CPU_INT_3_MASK, 0); |
1715 | |||
1716 | return; | ||
1717 | } | 1697 | } |
1718 | 1698 | ||
1719 | /* | 1699 | /* |
@@ -1781,14 +1761,11 @@ gt64260a_chip_specific_init(struct mv64x60_handle *bh, | |||
1781 | mv64x60_mpsc1_pdata.cache_mgmt = 1; | 1761 | mv64x60_mpsc1_pdata.cache_mgmt = 1; |
1782 | 1762 | ||
1783 | if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0)) | 1763 | if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0)) |
1784 | != NULL) { | 1764 | != NULL) { |
1785 | |||
1786 | r->start = MV64x60_IRQ_SDMA_0; | 1765 | r->start = MV64x60_IRQ_SDMA_0; |
1787 | r->end = MV64x60_IRQ_SDMA_0; | 1766 | r->end = MV64x60_IRQ_SDMA_0; |
1788 | } | 1767 | } |
1789 | #endif | 1768 | #endif |
1790 | |||
1791 | return; | ||
1792 | } | 1769 | } |
1793 | 1770 | ||
1794 | /* | 1771 | /* |
@@ -1861,14 +1838,11 @@ gt64260b_chip_specific_init(struct mv64x60_handle *bh, | |||
1861 | mv64x60_mpsc1_pdata.cache_mgmt = 1; | 1838 | mv64x60_mpsc1_pdata.cache_mgmt = 1; |
1862 | 1839 | ||
1863 | if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0)) | 1840 | if ((r = platform_get_resource(&mpsc1_device, IORESOURCE_IRQ, 0)) |
1864 | != NULL) { | 1841 | != NULL) { |
1865 | |||
1866 | r->start = MV64x60_IRQ_SDMA_0; | 1842 | r->start = MV64x60_IRQ_SDMA_0; |
1867 | r->end = MV64x60_IRQ_SDMA_0; | 1843 | r->end = MV64x60_IRQ_SDMA_0; |
1868 | } | 1844 | } |
1869 | #endif | 1845 | #endif |
1870 | |||
1871 | return; | ||
1872 | } | 1846 | } |
1873 | 1847 | ||
1874 | /* | 1848 | /* |
@@ -1945,8 +1919,6 @@ mv64360_set_pci2mem_window(struct pci_controller *hose, u32 bus, u32 window, | |||
1945 | mv64360_reg_addrs[bus][window].base_lo_bar, | 1919 | mv64360_reg_addrs[bus][window].base_lo_bar, |
1946 | mv64x60_mask(base,20) | 0xc); | 1920 | mv64x60_mask(base,20) | 0xc); |
1947 | mv64x60_pci_exclude_bridge = save_exclude; | 1921 | mv64x60_pci_exclude_bridge = save_exclude; |
1948 | |||
1949 | return; | ||
1950 | } | 1922 | } |
1951 | 1923 | ||
1952 | /* | 1924 | /* |
@@ -1972,8 +1944,6 @@ mv64360_set_pci2regs_window(struct mv64x60_handle *bh, | |||
1972 | early_write_config_dword(hose, 0, PCI_DEVFN(0,0), | 1944 | early_write_config_dword(hose, 0, PCI_DEVFN(0,0), |
1973 | mv64360_offset[bus][1], 0); | 1945 | mv64360_offset[bus][1], 0); |
1974 | mv64x60_pci_exclude_bridge = save_exclude; | 1946 | mv64x60_pci_exclude_bridge = save_exclude; |
1975 | |||
1976 | return; | ||
1977 | } | 1947 | } |
1978 | 1948 | ||
1979 | /* | 1949 | /* |
@@ -2082,8 +2052,6 @@ mv64360_enable_window_32bit(struct mv64x60_handle *bh, u32 window) | |||
2082 | "32bit table corrupted"); | 2052 | "32bit table corrupted"); |
2083 | } | 2053 | } |
2084 | } | 2054 | } |
2085 | |||
2086 | return; | ||
2087 | } | 2055 | } |
2088 | 2056 | ||
2089 | /* | 2057 | /* |
@@ -2139,8 +2107,6 @@ mv64360_disable_window_32bit(struct mv64x60_handle *bh, u32 window) | |||
2139 | "32bit table corrupted"); | 2107 | "32bit table corrupted"); |
2140 | } | 2108 | } |
2141 | } | 2109 | } |
2142 | |||
2143 | return; | ||
2144 | } | 2110 | } |
2145 | 2111 | ||
2146 | /* | 2112 | /* |
@@ -2158,8 +2124,7 @@ mv64360_enable_window_64bit(struct mv64x60_handle *bh, u32 window) | |||
2158 | (mv64360_64bit_windows[window].size_reg != 0)) { | 2124 | (mv64360_64bit_windows[window].size_reg != 0)) { |
2159 | 2125 | ||
2160 | if ((mv64360_64bit_windows[window].extra & MV64x60_EXTRA_MASK) | 2126 | if ((mv64360_64bit_windows[window].extra & MV64x60_EXTRA_MASK) |
2161 | == MV64x60_EXTRA_PCIACC_ENAB) | 2127 | == MV64x60_EXTRA_PCIACC_ENAB) |
2162 | |||
2163 | mv64x60_set_bits(bh, | 2128 | mv64x60_set_bits(bh, |
2164 | mv64360_64bit_windows[window].base_lo_reg, | 2129 | mv64360_64bit_windows[window].base_lo_reg, |
2165 | (1 << (mv64360_64bit_windows[window].extra & | 2130 | (1 << (mv64360_64bit_windows[window].extra & |
@@ -2168,8 +2133,6 @@ mv64360_enable_window_64bit(struct mv64x60_handle *bh, u32 window) | |||
2168 | printk(KERN_ERR "mv64360_enable: %s\n", | 2133 | printk(KERN_ERR "mv64360_enable: %s\n", |
2169 | "64bit table corrupted"); | 2134 | "64bit table corrupted"); |
2170 | } | 2135 | } |
2171 | |||
2172 | return; | ||
2173 | } | 2136 | } |
2174 | 2137 | ||
2175 | /* | 2138 | /* |
@@ -2186,11 +2149,9 @@ mv64360_disable_window_64bit(struct mv64x60_handle *bh, u32 window) | |||
2186 | mv64360_64bit_windows[window].size_reg); | 2149 | mv64360_64bit_windows[window].size_reg); |
2187 | 2150 | ||
2188 | if ((mv64360_64bit_windows[window].base_lo_reg != 0) && | 2151 | if ((mv64360_64bit_windows[window].base_lo_reg != 0) && |
2189 | (mv64360_64bit_windows[window].size_reg != 0)) { | 2152 | (mv64360_64bit_windows[window].size_reg != 0)) { |
2190 | |||
2191 | if ((mv64360_64bit_windows[window].extra & MV64x60_EXTRA_MASK) | 2153 | if ((mv64360_64bit_windows[window].extra & MV64x60_EXTRA_MASK) |
2192 | == MV64x60_EXTRA_PCIACC_ENAB) | 2154 | == MV64x60_EXTRA_PCIACC_ENAB) |
2193 | |||
2194 | mv64x60_clr_bits(bh, | 2155 | mv64x60_clr_bits(bh, |
2195 | mv64360_64bit_windows[window].base_lo_reg, | 2156 | mv64360_64bit_windows[window].base_lo_reg, |
2196 | (1 << (mv64360_64bit_windows[window].extra & | 2157 | (1 << (mv64360_64bit_windows[window].extra & |
@@ -2199,8 +2160,6 @@ mv64360_disable_window_64bit(struct mv64x60_handle *bh, u32 window) | |||
2199 | printk(KERN_ERR "mv64360_disable: %s\n", | 2160 | printk(KERN_ERR "mv64360_disable: %s\n", |
2200 | "64bit table corrupted"); | 2161 | "64bit table corrupted"); |
2201 | } | 2162 | } |
2202 | |||
2203 | return; | ||
2204 | } | 2163 | } |
2205 | 2164 | ||
2206 | /* | 2165 | /* |
@@ -2241,8 +2200,6 @@ mv64360_disable_all_windows(struct mv64x60_handle *bh, | |||
2241 | /* Disable all PCI-><whatever> windows */ | 2200 | /* Disable all PCI-><whatever> windows */ |
2242 | mv64x60_set_bits(bh, MV64x60_PCI0_BAR_ENABLE, 0x0000f9ff); | 2201 | mv64x60_set_bits(bh, MV64x60_PCI0_BAR_ENABLE, 0x0000f9ff); |
2243 | mv64x60_set_bits(bh, MV64x60_PCI1_BAR_ENABLE, 0x0000f9ff); | 2202 | mv64x60_set_bits(bh, MV64x60_PCI1_BAR_ENABLE, 0x0000f9ff); |
2244 | |||
2245 | return; | ||
2246 | } | 2203 | } |
2247 | 2204 | ||
2248 | /* | 2205 | /* |
@@ -2335,8 +2292,6 @@ mv64360_config_io2mem_windows(struct mv64x60_handle *bh, | |||
2335 | mv64x60_set_bits(bh, MV64360_IDMA2MEM_ACC_PROT_3, | 2292 | mv64x60_set_bits(bh, MV64360_IDMA2MEM_ACC_PROT_3, |
2336 | (0x3 << (i << 1))); | 2293 | (0x3 << (i << 1))); |
2337 | } | 2294 | } |
2338 | |||
2339 | return; | ||
2340 | } | 2295 | } |
2341 | 2296 | ||
2342 | /* | 2297 | /* |
@@ -2350,42 +2305,145 @@ static void __init | |||
2350 | mv64360_set_mpsc2regs_window(struct mv64x60_handle *bh, u32 base) | 2305 | mv64360_set_mpsc2regs_window(struct mv64x60_handle *bh, u32 base) |
2351 | { | 2306 | { |
2352 | pr_debug("set mpsc->internal regs, base: 0x%x\n", base); | 2307 | pr_debug("set mpsc->internal regs, base: 0x%x\n", base); |
2353 | |||
2354 | mv64x60_write(bh, MV64360_MPSC2REGS_BASE, base & 0xffff0000); | 2308 | mv64x60_write(bh, MV64360_MPSC2REGS_BASE, base & 0xffff0000); |
2355 | return; | ||
2356 | } | 2309 | } |
2357 | 2310 | ||
2358 | /* | 2311 | /* |
2359 | * mv64360_chip_specific_init() | 2312 | * mv64360_chip_specific_init() |
2360 | * | 2313 | * |
2361 | * No errata work arounds for the MV64360 implemented at this point. | 2314 | * Implement errata work arounds for the MV64360. |
2362 | */ | 2315 | */ |
2363 | static void __init | 2316 | static void __init |
2364 | mv64360_chip_specific_init(struct mv64x60_handle *bh, | 2317 | mv64360_chip_specific_init(struct mv64x60_handle *bh, |
2365 | struct mv64x60_setup_info *si) | 2318 | struct mv64x60_setup_info *si) |
2366 | { | 2319 | { |
2320 | #if !defined(CONFIG_NOT_COHERENT_CACHE) | ||
2321 | mv64x60_set_bits(bh, MV64360_D_UNIT_CONTROL_HIGH, (1<<24)); | ||
2322 | #endif | ||
2367 | #ifdef CONFIG_SERIAL_MPSC | 2323 | #ifdef CONFIG_SERIAL_MPSC |
2368 | mv64x60_mpsc0_pdata.brg_can_tune = 1; | 2324 | mv64x60_mpsc0_pdata.brg_can_tune = 1; |
2369 | mv64x60_mpsc0_pdata.cache_mgmt = 1; | 2325 | mv64x60_mpsc0_pdata.cache_mgmt = 1; |
2370 | mv64x60_mpsc1_pdata.brg_can_tune = 1; | 2326 | mv64x60_mpsc1_pdata.brg_can_tune = 1; |
2371 | mv64x60_mpsc1_pdata.cache_mgmt = 1; | 2327 | mv64x60_mpsc1_pdata.cache_mgmt = 1; |
2372 | #endif | 2328 | #endif |
2373 | |||
2374 | return; | ||
2375 | } | 2329 | } |
2376 | 2330 | ||
2377 | /* | 2331 | /* |
2378 | * mv64460_chip_specific_init() | 2332 | * mv64460_chip_specific_init() |
2379 | * | 2333 | * |
2380 | * No errata work arounds for the MV64460 implemented at this point. | 2334 | * Implement errata work arounds for the MV64460. |
2381 | */ | 2335 | */ |
2382 | static void __init | 2336 | static void __init |
2383 | mv64460_chip_specific_init(struct mv64x60_handle *bh, | 2337 | mv64460_chip_specific_init(struct mv64x60_handle *bh, |
2384 | struct mv64x60_setup_info *si) | 2338 | struct mv64x60_setup_info *si) |
2385 | { | 2339 | { |
2340 | #if !defined(CONFIG_NOT_COHERENT_CACHE) | ||
2341 | mv64x60_set_bits(bh, MV64360_D_UNIT_CONTROL_HIGH, (1<<24) | (1<<25)); | ||
2342 | mv64x60_set_bits(bh, MV64460_D_UNIT_MMASK, (1<<1) | (1<<4)); | ||
2343 | #endif | ||
2386 | #ifdef CONFIG_SERIAL_MPSC | 2344 | #ifdef CONFIG_SERIAL_MPSC |
2387 | mv64x60_mpsc0_pdata.brg_can_tune = 1; | 2345 | mv64x60_mpsc0_pdata.brg_can_tune = 1; |
2346 | mv64x60_mpsc0_pdata.cache_mgmt = 1; | ||
2388 | mv64x60_mpsc1_pdata.brg_can_tune = 1; | 2347 | mv64x60_mpsc1_pdata.brg_can_tune = 1; |
2348 | mv64x60_mpsc1_pdata.cache_mgmt = 1; | ||
2389 | #endif | 2349 | #endif |
2390 | return; | ||
2391 | } | 2350 | } |
2351 | |||
2352 | |||
2353 | #if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260) | ||
2354 | /* Export the hotswap register via sysfs for enum event monitoring */ | ||
2355 | #define VAL_LEN_MAX 11 /* 32-bit hex or dec stringified number + '\n' */ | ||
2356 | |||
2357 | DECLARE_MUTEX(mv64xxx_hs_lock); | ||
2358 | |||
2359 | static ssize_t | ||
2360 | mv64xxx_hs_reg_read(struct kobject *kobj, char *buf, loff_t off, size_t count) | ||
2361 | { | ||
2362 | u32 v; | ||
2363 | u8 save_exclude; | ||
2364 | |||
2365 | if (off > 0) | ||
2366 | return 0; | ||
2367 | if (count < VAL_LEN_MAX) | ||
2368 | return -EINVAL; | ||
2369 | |||
2370 | if (down_interruptible(&mv64xxx_hs_lock)) | ||
2371 | return -ERESTARTSYS; | ||
2372 | save_exclude = mv64x60_pci_exclude_bridge; | ||
2373 | mv64x60_pci_exclude_bridge = 0; | ||
2374 | early_read_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0), | ||
2375 | MV64360_PCICFG_CPCI_HOTSWAP, &v); | ||
2376 | mv64x60_pci_exclude_bridge = save_exclude; | ||
2377 | up(&mv64xxx_hs_lock); | ||
2378 | |||
2379 | return sprintf(buf, "0x%08x\n", v); | ||
2380 | } | ||
2381 | |||
2382 | static ssize_t | ||
2383 | mv64xxx_hs_reg_write(struct kobject *kobj, char *buf, loff_t off, size_t count) | ||
2384 | { | ||
2385 | u32 v; | ||
2386 | u8 save_exclude; | ||
2387 | |||
2388 | if (off > 0) | ||
2389 | return 0; | ||
2390 | if (count <= 0) | ||
2391 | return -EINVAL; | ||
2392 | |||
2393 | if (sscanf(buf, "%i", &v) == 1) { | ||
2394 | if (down_interruptible(&mv64xxx_hs_lock)) | ||
2395 | return -ERESTARTSYS; | ||
2396 | save_exclude = mv64x60_pci_exclude_bridge; | ||
2397 | mv64x60_pci_exclude_bridge = 0; | ||
2398 | early_write_config_dword(&sysfs_hose_a, 0, PCI_DEVFN(0, 0), | ||
2399 | MV64360_PCICFG_CPCI_HOTSWAP, v); | ||
2400 | mv64x60_pci_exclude_bridge = save_exclude; | ||
2401 | up(&mv64xxx_hs_lock); | ||
2402 | } | ||
2403 | else | ||
2404 | count = -EINVAL; | ||
2405 | |||
2406 | return count; | ||
2407 | } | ||
2408 | |||
2409 | static struct bin_attribute mv64xxx_hs_reg_attr = { /* Hotswap register */ | ||
2410 | .attr = { | ||
2411 | .name = "hs_reg", | ||
2412 | .mode = S_IRUGO | S_IWUSR, | ||
2413 | .owner = THIS_MODULE, | ||
2414 | }, | ||
2415 | .size = VAL_LEN_MAX, | ||
2416 | .read = mv64xxx_hs_reg_read, | ||
2417 | .write = mv64xxx_hs_reg_write, | ||
2418 | }; | ||
2419 | |||
2420 | /* Provide sysfs file indicating if this platform supports the hs_reg */ | ||
2421 | static ssize_t | ||
2422 | mv64xxx_hs_reg_valid_show(struct device *dev, struct device_attribute *attr, | ||
2423 | char *buf) | ||
2424 | { | ||
2425 | struct platform_device *pdev; | ||
2426 | struct mv64xxx_pdata *pdp; | ||
2427 | u32 v; | ||
2428 | |||
2429 | pdev = container_of(dev, struct platform_device, dev); | ||
2430 | pdp = (struct mv64xxx_pdata *)pdev->dev.platform_data; | ||
2431 | |||
2432 | if (down_interruptible(&mv64xxx_hs_lock)) | ||
2433 | return -ERESTARTSYS; | ||
2434 | v = pdp->hs_reg_valid; | ||
2435 | up(&mv64xxx_hs_lock); | ||
2436 | |||
2437 | return sprintf(buf, "%i\n", v); | ||
2438 | } | ||
2439 | static DEVICE_ATTR(hs_reg_valid, S_IRUGO, mv64xxx_hs_reg_valid_show, NULL); | ||
2440 | |||
2441 | static int __init | ||
2442 | mv64xxx_sysfs_init(void) | ||
2443 | { | ||
2444 | sysfs_create_bin_file(&mv64xxx_device.dev.kobj, &mv64xxx_hs_reg_attr); | ||
2445 | sysfs_create_file(&mv64xxx_device.dev.kobj,&dev_attr_hs_reg_valid.attr); | ||
2446 | return 0; | ||
2447 | } | ||
2448 | subsys_initcall(mv64xxx_sysfs_init); | ||
2449 | #endif | ||
diff --git a/arch/ppc/syslib/of_device.c b/arch/ppc/syslib/of_device.c index 1eb4f726ca9f..da8a0f2128dc 100644 --- a/arch/ppc/syslib/of_device.c +++ b/arch/ppc/syslib/of_device.c | |||
@@ -105,7 +105,7 @@ static int of_device_remove(struct device *dev) | |||
105 | return 0; | 105 | return 0; |
106 | } | 106 | } |
107 | 107 | ||
108 | static int of_device_suspend(struct device *dev, u32 state) | 108 | static int of_device_suspend(struct device *dev, pm_message_t state) |
109 | { | 109 | { |
110 | struct of_device * of_dev = to_of_device(dev); | 110 | struct of_device * of_dev = to_of_device(dev); |
111 | struct of_platform_driver * drv = to_of_platform_driver(dev->driver); | 111 | struct of_platform_driver * drv = to_of_platform_driver(dev->driver); |
diff --git a/arch/ppc/syslib/open_pic.c b/arch/ppc/syslib/open_pic.c index ad39b86ca92c..53da58523e39 100644 --- a/arch/ppc/syslib/open_pic.c +++ b/arch/ppc/syslib/open_pic.c | |||
@@ -948,7 +948,7 @@ static void openpic_cached_disable_irq(u_int irq) | |||
948 | * we need something better to deal with that... Maybe switch to S1 for | 948 | * we need something better to deal with that... Maybe switch to S1 for |
949 | * cpufreq changes | 949 | * cpufreq changes |
950 | */ | 950 | */ |
951 | int openpic_suspend(struct sys_device *sysdev, u32 state) | 951 | int openpic_suspend(struct sys_device *sysdev, pm_message_t state) |
952 | { | 952 | { |
953 | int i; | 953 | int i; |
954 | unsigned long flags; | 954 | unsigned long flags; |
diff --git a/arch/ppc/syslib/ppc4xx_setup.c b/arch/ppc/syslib/ppc4xx_setup.c index e170aebeb69b..b843c4fef25e 100644 --- a/arch/ppc/syslib/ppc4xx_setup.c +++ b/arch/ppc/syslib/ppc4xx_setup.c | |||
@@ -48,10 +48,6 @@ | |||
48 | extern void abort(void); | 48 | extern void abort(void); |
49 | extern void ppc4xx_find_bridges(void); | 49 | extern void ppc4xx_find_bridges(void); |
50 | 50 | ||
51 | extern void ppc4xx_wdt_heartbeat(void); | ||
52 | extern int wdt_enable; | ||
53 | extern unsigned long wdt_period; | ||
54 | |||
55 | /* Global Variables */ | 51 | /* Global Variables */ |
56 | bd_t __res; | 52 | bd_t __res; |
57 | 53 | ||
@@ -171,7 +167,7 @@ ppc4xx_calibrate_decr(void) | |||
171 | unsigned int freq; | 167 | unsigned int freq; |
172 | bd_t *bip = &__res; | 168 | bd_t *bip = &__res; |
173 | 169 | ||
174 | #if defined(CONFIG_WALNUT) || defined(CONFIG_ASH) || defined(CONFIG_SYCAMORE) | 170 | #if defined(CONFIG_WALNUT) || defined(CONFIG_SYCAMORE) |
175 | /* Walnut boot rom sets DCR CHCR1 (aka CPC0_CR1) bit CETE to 1 */ | 171 | /* Walnut boot rom sets DCR CHCR1 (aka CPC0_CR1) bit CETE to 1 */ |
176 | mtdcr(DCRN_CHCR1, mfdcr(DCRN_CHCR1) & ~CHR1_CETE); | 172 | mtdcr(DCRN_CHCR1, mfdcr(DCRN_CHCR1) & ~CHR1_CETE); |
177 | #endif | 173 | #endif |
@@ -257,22 +253,6 @@ ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
257 | *(char *) (r7 + KERNELBASE) = 0; | 253 | *(char *) (r7 + KERNELBASE) = 0; |
258 | strcpy(cmd_line, (char *) (r6 + KERNELBASE)); | 254 | strcpy(cmd_line, (char *) (r6 + KERNELBASE)); |
259 | } | 255 | } |
260 | #if defined(CONFIG_PPC405_WDT) | ||
261 | /* Look for wdt= option on command line */ | ||
262 | if (strstr(cmd_line, "wdt=")) { | ||
263 | int valid_wdt = 0; | ||
264 | char *p, *q; | ||
265 | for (q = cmd_line; (p = strstr(q, "wdt=")) != 0;) { | ||
266 | q = p + 4; | ||
267 | if (p > cmd_line && p[-1] != ' ') | ||
268 | continue; | ||
269 | wdt_period = simple_strtoul(q, &q, 0); | ||
270 | valid_wdt = 1; | ||
271 | ++q; | ||
272 | } | ||
273 | wdt_enable = valid_wdt; | ||
274 | } | ||
275 | #endif | ||
276 | 256 | ||
277 | /* Initialize machine-dependent vectors */ | 257 | /* Initialize machine-dependent vectors */ |
278 | 258 | ||
@@ -287,11 +267,6 @@ ppc4xx_init(unsigned long r3, unsigned long r4, unsigned long r5, | |||
287 | 267 | ||
288 | ppc_md.calibrate_decr = ppc4xx_calibrate_decr; | 268 | ppc_md.calibrate_decr = ppc4xx_calibrate_decr; |
289 | 269 | ||
290 | #ifdef CONFIG_PPC405_WDT | ||
291 | ppc_md.heartbeat = ppc4xx_wdt_heartbeat; | ||
292 | #endif | ||
293 | ppc_md.heartbeat_count = 0; | ||
294 | |||
295 | ppc_md.find_end_of_memory = ppc4xx_find_end_of_memory; | 270 | ppc_md.find_end_of_memory = ppc4xx_find_end_of_memory; |
296 | ppc_md.setup_io_mappings = ppc4xx_map_io; | 271 | ppc_md.setup_io_mappings = ppc4xx_map_io; |
297 | 272 | ||
diff --git a/arch/ppc/syslib/ppc83xx_pci.h b/arch/ppc/syslib/ppc83xx_pci.h new file mode 100644 index 000000000000..ec691640f6be --- /dev/null +++ b/arch/ppc/syslib/ppc83xx_pci.h | |||
@@ -0,0 +1,151 @@ | |||
1 | /* Created by Tony Li <tony.li@freescale.com> | ||
2 | * Copyright (c) 2005 freescale semiconductor | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms of the GNU General Public License as published by the | ||
6 | * Free Software Foundation; either version 2 of the License, or (at your | ||
7 | * option) any later version. | ||
8 | * | ||
9 | * This program is distributed in the hope that it will be useful, but | ||
10 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
12 | * General Public License for more details. | ||
13 | * | ||
14 | * You should have received a copy of the GNU General Public License along | ||
15 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
16 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
17 | */ | ||
18 | |||
19 | #ifndef __PPC_SYSLIB_PPC83XX_PCI_H | ||
20 | #define __PPC_SYSLIB_PPC83XX_PCI_H | ||
21 | |||
22 | typedef struct immr_clk { | ||
23 | u32 spmr; /* system PLL mode Register */ | ||
24 | u32 occr; /* output clock control Register */ | ||
25 | u32 sccr; /* system clock control Register */ | ||
26 | u8 res0[0xF4]; | ||
27 | } immr_clk_t; | ||
28 | |||
29 | /* | ||
30 | * Sequencer | ||
31 | */ | ||
32 | typedef struct immr_ios { | ||
33 | u32 potar0; | ||
34 | u8 res0[4]; | ||
35 | u32 pobar0; | ||
36 | u8 res1[4]; | ||
37 | u32 pocmr0; | ||
38 | u8 res2[4]; | ||
39 | u32 potar1; | ||
40 | u8 res3[4]; | ||
41 | u32 pobar1; | ||
42 | u8 res4[4]; | ||
43 | u32 pocmr1; | ||
44 | u8 res5[4]; | ||
45 | u32 potar2; | ||
46 | u8 res6[4]; | ||
47 | u32 pobar2; | ||
48 | u8 res7[4]; | ||
49 | u32 pocmr2; | ||
50 | u8 res8[4]; | ||
51 | u32 potar3; | ||
52 | u8 res9[4]; | ||
53 | u32 pobar3; | ||
54 | u8 res10[4]; | ||
55 | u32 pocmr3; | ||
56 | u8 res11[4]; | ||
57 | u32 potar4; | ||
58 | u8 res12[4]; | ||
59 | u32 pobar4; | ||
60 | u8 res13[4]; | ||
61 | u32 pocmr4; | ||
62 | u8 res14[4]; | ||
63 | u32 potar5; | ||
64 | u8 res15[4]; | ||
65 | u32 pobar5; | ||
66 | u8 res16[4]; | ||
67 | u32 pocmr5; | ||
68 | u8 res17[4]; | ||
69 | u8 res18[0x60]; | ||
70 | u32 pmcr; | ||
71 | u8 res19[4]; | ||
72 | u32 dtcr; | ||
73 | u8 res20[4]; | ||
74 | } immr_ios_t; | ||
75 | #define POTAR_TA_MASK 0x000fffff | ||
76 | #define POBAR_BA_MASK 0x000fffff | ||
77 | #define POCMR_EN 0x80000000 | ||
78 | #define POCMR_IO 0x40000000 /* 0--memory space 1--I/O space */ | ||
79 | #define POCMR_SE 0x20000000 /* streaming enable */ | ||
80 | #define POCMR_DST 0x10000000 /* 0--PCI1 1--PCI2 */ | ||
81 | #define POCMR_CM_MASK 0x000fffff | ||
82 | |||
83 | /* | ||
84 | * PCI Controller Control and Status Registers | ||
85 | */ | ||
86 | typedef struct immr_pcictrl { | ||
87 | u32 esr; | ||
88 | u32 ecdr; | ||
89 | u32 eer; | ||
90 | u32 eatcr; | ||
91 | u32 eacr; | ||
92 | u32 eeacr; | ||
93 | u32 edlcr; | ||
94 | u32 edhcr; | ||
95 | u32 gcr; | ||
96 | u32 ecr; | ||
97 | u32 gsr; | ||
98 | u8 res0[12]; | ||
99 | u32 pitar2; | ||
100 | u8 res1[4]; | ||
101 | u32 pibar2; | ||
102 | u32 piebar2; | ||
103 | u32 piwar2; | ||
104 | u8 res2[4]; | ||
105 | u32 pitar1; | ||
106 | u8 res3[4]; | ||
107 | u32 pibar1; | ||
108 | u32 piebar1; | ||
109 | u32 piwar1; | ||
110 | u8 res4[4]; | ||
111 | u32 pitar0; | ||
112 | u8 res5[4]; | ||
113 | u32 pibar0; | ||
114 | u8 res6[4]; | ||
115 | u32 piwar0; | ||
116 | u8 res7[132]; | ||
117 | } immr_pcictrl_t; | ||
118 | #define PITAR_TA_MASK 0x000fffff | ||
119 | #define PIBAR_MASK 0xffffffff | ||
120 | #define PIEBAR_EBA_MASK 0x000fffff | ||
121 | #define PIWAR_EN 0x80000000 | ||
122 | #define PIWAR_PF 0x20000000 | ||
123 | #define PIWAR_RTT_MASK 0x000f0000 | ||
124 | #define PIWAR_RTT_NO_SNOOP 0x00040000 | ||
125 | #define PIWAR_RTT_SNOOP 0x00050000 | ||
126 | #define PIWAR_WTT_MASK 0x0000f000 | ||
127 | #define PIWAR_WTT_NO_SNOOP 0x00004000 | ||
128 | #define PIWAR_WTT_SNOOP 0x00005000 | ||
129 | #define PIWAR_IWS_MASK 0x0000003F | ||
130 | #define PIWAR_IWS_4K 0x0000000B | ||
131 | #define PIWAR_IWS_8K 0x0000000C | ||
132 | #define PIWAR_IWS_16K 0x0000000D | ||
133 | #define PIWAR_IWS_32K 0x0000000E | ||
134 | #define PIWAR_IWS_64K 0x0000000F | ||
135 | #define PIWAR_IWS_128K 0x00000010 | ||
136 | #define PIWAR_IWS_256K 0x00000011 | ||
137 | #define PIWAR_IWS_512K 0x00000012 | ||
138 | #define PIWAR_IWS_1M 0x00000013 | ||
139 | #define PIWAR_IWS_2M 0x00000014 | ||
140 | #define PIWAR_IWS_4M 0x00000015 | ||
141 | #define PIWAR_IWS_8M 0x00000016 | ||
142 | #define PIWAR_IWS_16M 0x00000017 | ||
143 | #define PIWAR_IWS_32M 0x00000018 | ||
144 | #define PIWAR_IWS_64M 0x00000019 | ||
145 | #define PIWAR_IWS_128M 0x0000001A | ||
146 | #define PIWAR_IWS_256M 0x0000001B | ||
147 | #define PIWAR_IWS_512M 0x0000001C | ||
148 | #define PIWAR_IWS_1G 0x0000001D | ||
149 | #define PIWAR_IWS_2G 0x0000001E | ||
150 | |||
151 | #endif /* __PPC_SYSLIB_PPC83XX_PCI_H */ | ||
diff --git a/arch/ppc/syslib/ppc83xx_setup.c b/arch/ppc/syslib/ppc83xx_setup.c index 602a86891f7f..890484e576e7 100644 --- a/arch/ppc/syslib/ppc83xx_setup.c +++ b/arch/ppc/syslib/ppc83xx_setup.c | |||
@@ -11,6 +11,17 @@ | |||
11 | * under the terms of the GNU General Public License as published by the | 11 | * under the terms of the GNU General Public License as published by the |
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | ||
15 | * This program is distributed in the hope that it will be useful, but | ||
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | * General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License along | ||
21 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
22 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
23 | * | ||
24 | * Added PCI support -- Tony Li <tony.li@freescale.com> | ||
14 | */ | 25 | */ |
15 | 26 | ||
16 | #include <linux/config.h> | 27 | #include <linux/config.h> |
@@ -31,6 +42,10 @@ | |||
31 | #include <asm/delay.h> | 42 | #include <asm/delay.h> |
32 | 43 | ||
33 | #include <syslib/ppc83xx_setup.h> | 44 | #include <syslib/ppc83xx_setup.h> |
45 | #if defined(CONFIG_PCI) | ||
46 | #include <asm/delay.h> | ||
47 | #include <syslib/ppc83xx_pci.h> | ||
48 | #endif | ||
34 | 49 | ||
35 | phys_addr_t immrbar; | 50 | phys_addr_t immrbar; |
36 | 51 | ||
@@ -162,4 +177,237 @@ mpc83xx_halt(void) | |||
162 | for(;;); | 177 | for(;;); |
163 | } | 178 | } |
164 | 179 | ||
165 | /* PCI SUPPORT DOES NOT EXIT, MODEL after ppc85xx_setup.c */ | 180 | #if defined(CONFIG_PCI) |
181 | void __init | ||
182 | mpc83xx_setup_pci1(struct pci_controller *hose) | ||
183 | { | ||
184 | u16 reg16; | ||
185 | volatile immr_pcictrl_t * pci_ctrl; | ||
186 | volatile immr_ios_t * ios; | ||
187 | bd_t *binfo = (bd_t *) __res; | ||
188 | |||
189 | pci_ctrl = ioremap(binfo->bi_immr_base + 0x8500, sizeof(immr_pcictrl_t)); | ||
190 | ios = ioremap(binfo->bi_immr_base + 0x8400, sizeof(immr_ios_t)); | ||
191 | |||
192 | /* | ||
193 | * Configure PCI Outbound Translation Windows | ||
194 | */ | ||
195 | ios->potar0 = (MPC83xx_PCI1_LOWER_MEM >> 12) & POTAR_TA_MASK; | ||
196 | ios->pobar0 = (MPC83xx_PCI1_LOWER_MEM >> 12) & POBAR_BA_MASK; | ||
197 | ios->pocmr0 = POCMR_EN | | ||
198 | (((0xffffffff - (MPC83xx_PCI1_UPPER_MEM - | ||
199 | MPC83xx_PCI1_LOWER_MEM)) >> 12) & POCMR_CM_MASK); | ||
200 | |||
201 | /* mapped to PCI1 IO space */ | ||
202 | ios->potar1 = (MPC83xx_PCI1_LOWER_IO >> 12) & POTAR_TA_MASK; | ||
203 | ios->pobar1 = (MPC83xx_PCI1_IO_BASE >> 12) & POBAR_BA_MASK; | ||
204 | ios->pocmr1 = POCMR_EN | POCMR_IO | | ||
205 | (((0xffffffff - (MPC83xx_PCI1_UPPER_IO - | ||
206 | MPC83xx_PCI1_LOWER_IO)) >> 12) & POCMR_CM_MASK); | ||
207 | |||
208 | /* | ||
209 | * Configure PCI Inbound Translation Windows | ||
210 | */ | ||
211 | pci_ctrl->pitar1 = 0x0; | ||
212 | pci_ctrl->pibar1 = 0x0; | ||
213 | pci_ctrl->piebar1 = 0x0; | ||
214 | pci_ctrl->piwar1 = PIWAR_EN | PIWAR_PF | PIWAR_RTT_SNOOP | PIWAR_WTT_SNOOP | PIWAR_IWS_2G; | ||
215 | |||
216 | /* | ||
217 | * Release PCI RST signal | ||
218 | */ | ||
219 | pci_ctrl->gcr = 0; | ||
220 | udelay(2000); | ||
221 | pci_ctrl->gcr = 1; | ||
222 | udelay(2000); | ||
223 | |||
224 | reg16 = 0xff; | ||
225 | early_read_config_word(hose, hose->first_busno, 0, PCI_COMMAND, ®16); | ||
226 | reg16 |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; | ||
227 | early_write_config_word(hose, hose->first_busno, 0, PCI_COMMAND, reg16); | ||
228 | |||
229 | /* | ||
230 | * Clear non-reserved bits in status register. | ||
231 | */ | ||
232 | early_write_config_word(hose, hose->first_busno, 0, PCI_STATUS, 0xffff); | ||
233 | early_write_config_byte(hose, hose->first_busno, 0, PCI_LATENCY_TIMER, 0x80); | ||
234 | |||
235 | iounmap(pci_ctrl); | ||
236 | iounmap(ios); | ||
237 | } | ||
238 | |||
239 | void __init | ||
240 | mpc83xx_setup_pci2(struct pci_controller *hose) | ||
241 | { | ||
242 | u16 reg16; | ||
243 | volatile immr_pcictrl_t * pci_ctrl; | ||
244 | volatile immr_ios_t * ios; | ||
245 | bd_t *binfo = (bd_t *) __res; | ||
246 | |||
247 | pci_ctrl = ioremap(binfo->bi_immr_base + 0x8600, sizeof(immr_pcictrl_t)); | ||
248 | ios = ioremap(binfo->bi_immr_base + 0x8400, sizeof(immr_ios_t)); | ||
249 | |||
250 | /* | ||
251 | * Configure PCI Outbound Translation Windows | ||
252 | */ | ||
253 | ios->potar3 = (MPC83xx_PCI2_LOWER_MEM >> 12) & POTAR_TA_MASK; | ||
254 | ios->pobar3 = (MPC83xx_PCI2_LOWER_MEM >> 12) & POBAR_BA_MASK; | ||
255 | ios->pocmr3 = POCMR_EN | POCMR_DST | | ||
256 | (((0xffffffff - (MPC83xx_PCI2_UPPER_MEM - | ||
257 | MPC83xx_PCI2_LOWER_MEM)) >> 12) & POCMR_CM_MASK); | ||
258 | |||
259 | /* mapped to PCI2 IO space */ | ||
260 | ios->potar4 = (MPC83xx_PCI2_LOWER_IO >> 12) & POTAR_TA_MASK; | ||
261 | ios->pobar4 = (MPC83xx_PCI2_IO_BASE >> 12) & POBAR_BA_MASK; | ||
262 | ios->pocmr4 = POCMR_EN | POCMR_DST | POCMR_IO | | ||
263 | (((0xffffffff - (MPC83xx_PCI2_UPPER_IO - | ||
264 | MPC83xx_PCI2_LOWER_IO)) >> 12) & POCMR_CM_MASK); | ||
265 | |||
266 | /* | ||
267 | * Configure PCI Inbound Translation Windows | ||
268 | */ | ||
269 | pci_ctrl->pitar1 = 0x0; | ||
270 | pci_ctrl->pibar1 = 0x0; | ||
271 | pci_ctrl->piebar1 = 0x0; | ||
272 | pci_ctrl->piwar1 = PIWAR_EN | PIWAR_PF | PIWAR_RTT_SNOOP | PIWAR_WTT_SNOOP | PIWAR_IWS_2G; | ||
273 | |||
274 | /* | ||
275 | * Release PCI RST signal | ||
276 | */ | ||
277 | pci_ctrl->gcr = 0; | ||
278 | udelay(2000); | ||
279 | pci_ctrl->gcr = 1; | ||
280 | udelay(2000); | ||
281 | |||
282 | reg16 = 0xff; | ||
283 | early_read_config_word(hose, hose->first_busno, 0, PCI_COMMAND, ®16); | ||
284 | reg16 |= PCI_COMMAND_SERR | PCI_COMMAND_MASTER | PCI_COMMAND_MEMORY; | ||
285 | early_write_config_word(hose, hose->first_busno, 0, PCI_COMMAND, reg16); | ||
286 | |||
287 | /* | ||
288 | * Clear non-reserved bits in status register. | ||
289 | */ | ||
290 | early_write_config_word(hose, hose->first_busno, 0, PCI_STATUS, 0xffff); | ||
291 | early_write_config_byte(hose, hose->first_busno, 0, PCI_LATENCY_TIMER, 0x80); | ||
292 | |||
293 | iounmap(pci_ctrl); | ||
294 | iounmap(ios); | ||
295 | } | ||
296 | |||
297 | /* | ||
298 | * PCI buses can be enabled only if SYS board combinates with PIB | ||
299 | * (Platform IO Board) board which provide 3 PCI slots. There is 2 PCI buses | ||
300 | * and 3 PCI slots, so people must configure the routes between them before | ||
301 | * enable PCI bus. This routes are under the control of PCA9555PW device which | ||
302 | * can be accessed via I2C bus 2 and are configured by firmware. Refer to | ||
303 | * Freescale to get more information about firmware configuration. | ||
304 | */ | ||
305 | |||
306 | extern int mpc83xx_exclude_device(u_char bus, u_char devfn); | ||
307 | extern int mpc83xx_map_irq(struct pci_dev *dev, unsigned char idsel, | ||
308 | unsigned char pin); | ||
309 | void __init | ||
310 | mpc83xx_setup_hose(void) | ||
311 | { | ||
312 | u32 val32; | ||
313 | volatile immr_clk_t * clk; | ||
314 | struct pci_controller * hose1; | ||
315 | #ifdef CONFIG_MPC83xx_PCI2 | ||
316 | struct pci_controller * hose2; | ||
317 | #endif | ||
318 | bd_t * binfo = (bd_t *)__res; | ||
319 | |||
320 | clk = ioremap(binfo->bi_immr_base + 0xA00, | ||
321 | sizeof(immr_clk_t)); | ||
322 | |||
323 | /* | ||
324 | * Configure PCI controller and PCI_CLK_OUTPUT both in 66M mode | ||
325 | */ | ||
326 | val32 = clk->occr; | ||
327 | udelay(2000); | ||
328 | clk->occr = 0xff000000; | ||
329 | udelay(2000); | ||
330 | |||
331 | iounmap(clk); | ||
332 | |||
333 | hose1 = pcibios_alloc_controller(); | ||
334 | if(!hose1) | ||
335 | return; | ||
336 | |||
337 | ppc_md.pci_swizzle = common_swizzle; | ||
338 | ppc_md.pci_map_irq = mpc83xx_map_irq; | ||
339 | |||
340 | hose1->bus_offset = 0; | ||
341 | hose1->first_busno = 0; | ||
342 | hose1->last_busno = 0xff; | ||
343 | |||
344 | setup_indirect_pci(hose1, binfo->bi_immr_base + PCI1_CFG_ADDR_OFFSET, | ||
345 | binfo->bi_immr_base + PCI1_CFG_DATA_OFFSET); | ||
346 | hose1->set_cfg_type = 1; | ||
347 | |||
348 | mpc83xx_setup_pci1(hose1); | ||
349 | |||
350 | hose1->pci_mem_offset = MPC83xx_PCI1_MEM_OFFSET; | ||
351 | hose1->mem_space.start = MPC83xx_PCI1_LOWER_MEM; | ||
352 | hose1->mem_space.end = MPC83xx_PCI1_UPPER_MEM; | ||
353 | |||
354 | hose1->io_base_phys = MPC83xx_PCI1_IO_BASE; | ||
355 | hose1->io_space.start = MPC83xx_PCI1_LOWER_IO; | ||
356 | hose1->io_space.end = MPC83xx_PCI1_UPPER_IO; | ||
357 | #ifdef CONFIG_MPC83xx_PCI2 | ||
358 | isa_io_base = (unsigned long)ioremap(MPC83xx_PCI1_IO_BASE, | ||
359 | MPC83xx_PCI1_IO_SIZE + MPC83xx_PCI2_IO_SIZE); | ||
360 | #else | ||
361 | isa_io_base = (unsigned long)ioremap(MPC83xx_PCI1_IO_BASE, | ||
362 | MPC83xx_PCI1_IO_SIZE); | ||
363 | #endif /* CONFIG_MPC83xx_PCI2 */ | ||
364 | hose1->io_base_virt = (void *)isa_io_base; | ||
365 | /* setup resources */ | ||
366 | pci_init_resource(&hose1->io_resource, | ||
367 | MPC83xx_PCI1_LOWER_IO, | ||
368 | MPC83xx_PCI1_UPPER_IO, | ||
369 | IORESOURCE_IO, "PCI host bridge 1"); | ||
370 | pci_init_resource(&hose1->mem_resources[0], | ||
371 | MPC83xx_PCI1_LOWER_MEM, | ||
372 | MPC83xx_PCI1_UPPER_MEM, | ||
373 | IORESOURCE_MEM, "PCI host bridge 1"); | ||
374 | |||
375 | ppc_md.pci_exclude_device = mpc83xx_exclude_device; | ||
376 | hose1->last_busno = pciauto_bus_scan(hose1, hose1->first_busno); | ||
377 | |||
378 | #ifdef CONFIG_MPC83xx_PCI2 | ||
379 | hose2 = pcibios_alloc_controller(); | ||
380 | if(!hose2) | ||
381 | return; | ||
382 | |||
383 | hose2->bus_offset = hose1->last_busno + 1; | ||
384 | hose2->first_busno = hose1->last_busno + 1; | ||
385 | hose2->last_busno = 0xff; | ||
386 | setup_indirect_pci(hose2, binfo->bi_immr_base + PCI2_CFG_ADDR_OFFSET, | ||
387 | binfo->bi_immr_base + PCI2_CFG_DATA_OFFSET); | ||
388 | hose2->set_cfg_type = 1; | ||
389 | |||
390 | mpc83xx_setup_pci2(hose2); | ||
391 | |||
392 | hose2->pci_mem_offset = MPC83xx_PCI2_MEM_OFFSET; | ||
393 | hose2->mem_space.start = MPC83xx_PCI2_LOWER_MEM; | ||
394 | hose2->mem_space.end = MPC83xx_PCI2_UPPER_MEM; | ||
395 | |||
396 | hose2->io_base_phys = MPC83xx_PCI2_IO_BASE; | ||
397 | hose2->io_space.start = MPC83xx_PCI2_LOWER_IO; | ||
398 | hose2->io_space.end = MPC83xx_PCI2_UPPER_IO; | ||
399 | hose2->io_base_virt = (void *)(isa_io_base + MPC83xx_PCI1_IO_SIZE); | ||
400 | /* setup resources */ | ||
401 | pci_init_resource(&hose2->io_resource, | ||
402 | MPC83xx_PCI2_LOWER_IO, | ||
403 | MPC83xx_PCI2_UPPER_IO, | ||
404 | IORESOURCE_IO, "PCI host bridge 2"); | ||
405 | pci_init_resource(&hose2->mem_resources[0], | ||
406 | MPC83xx_PCI2_LOWER_MEM, | ||
407 | MPC83xx_PCI2_UPPER_MEM, | ||
408 | IORESOURCE_MEM, "PCI host bridge 2"); | ||
409 | |||
410 | hose2->last_busno = pciauto_bus_scan(hose2, hose2->first_busno); | ||
411 | #endif /* CONFIG_MPC83xx_PCI2 */ | ||
412 | } | ||
413 | #endif /*CONFIG_PCI*/ | ||
diff --git a/arch/ppc/syslib/ppc83xx_setup.h b/arch/ppc/syslib/ppc83xx_setup.h index 683f179b746c..c766c1a5f786 100644 --- a/arch/ppc/syslib/ppc83xx_setup.h +++ b/arch/ppc/syslib/ppc83xx_setup.h | |||
@@ -12,6 +12,14 @@ | |||
12 | * Free Software Foundation; either version 2 of the License, or (at your | 12 | * Free Software Foundation; either version 2 of the License, or (at your |
13 | * option) any later version. | 13 | * option) any later version. |
14 | * | 14 | * |
15 | * This program is distributed in the hope that it will be useful, but | ||
16 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
18 | * General Public License for more details. | ||
19 | * | ||
20 | * You should have received a copy of the GNU General Public License along | ||
21 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
22 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
15 | */ | 23 | */ |
16 | 24 | ||
17 | #ifndef __PPC_SYSLIB_PPC83XX_SETUP_H | 25 | #ifndef __PPC_SYSLIB_PPC83XX_SETUP_H |
@@ -19,7 +27,6 @@ | |||
19 | 27 | ||
20 | #include <linux/config.h> | 28 | #include <linux/config.h> |
21 | #include <linux/init.h> | 29 | #include <linux/init.h> |
22 | #include <asm/ppcboot.h> | ||
23 | 30 | ||
24 | extern unsigned long mpc83xx_find_end_of_memory(void) __init; | 31 | extern unsigned long mpc83xx_find_end_of_memory(void) __init; |
25 | extern long mpc83xx_time_init(void) __init; | 32 | extern long mpc83xx_time_init(void) __init; |
@@ -31,13 +38,11 @@ extern void mpc83xx_halt(void); | |||
31 | extern void mpc83xx_setup_hose(void) __init; | 38 | extern void mpc83xx_setup_hose(void) __init; |
32 | 39 | ||
33 | /* PCI config */ | 40 | /* PCI config */ |
34 | #if 0 | 41 | #define PCI1_CFG_ADDR_OFFSET (0x8300) |
35 | #define PCI1_CFG_ADDR_OFFSET (FIXME) | 42 | #define PCI1_CFG_DATA_OFFSET (0x8304) |
36 | #define PCI1_CFG_DATA_OFFSET (FIXME) | ||
37 | 43 | ||
38 | #define PCI2_CFG_ADDR_OFFSET (FIXME) | 44 | #define PCI2_CFG_ADDR_OFFSET (0x8380) |
39 | #define PCI2_CFG_DATA_OFFSET (FIXME) | 45 | #define PCI2_CFG_DATA_OFFSET (0x8384) |
40 | #endif | ||
41 | 46 | ||
42 | /* Serial Config */ | 47 | /* Serial Config */ |
43 | #ifdef CONFIG_SERIAL_MANY_PORTS | 48 | #ifdef CONFIG_SERIAL_MANY_PORTS |
diff --git a/arch/ppc/syslib/ppc_sys.c b/arch/ppc/syslib/ppc_sys.c index 879202352560..52ba0c68078d 100644 --- a/arch/ppc/syslib/ppc_sys.c +++ b/arch/ppc/syslib/ppc_sys.c | |||
@@ -6,6 +6,7 @@ | |||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | 6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> |
7 | * | 7 | * |
8 | * Copyright 2005 Freescale Semiconductor Inc. | 8 | * Copyright 2005 Freescale Semiconductor Inc. |
9 | * Copyright 2005 MontaVista, Inc. by Vitaly Bordug <vbordug@ru.mvista.com> | ||
9 | * | 10 | * |
10 | * This program is free software; you can redistribute it and/or modify it | 11 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU General Public License as published by the | 12 | * under the terms of the GNU General Public License as published by the |
@@ -35,10 +36,59 @@ void __init identify_ppc_sys_by_id(u32 id) | |||
35 | 36 | ||
36 | void __init identify_ppc_sys_by_name(char *name) | 37 | void __init identify_ppc_sys_by_name(char *name) |
37 | { | 38 | { |
38 | /* TODO */ | 39 | unsigned int i = 0; |
40 | while (ppc_sys_specs[i].ppc_sys_name[0]) | ||
41 | { | ||
42 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) | ||
43 | break; | ||
44 | i++; | ||
45 | } | ||
46 | cur_ppc_sys_spec = &ppc_sys_specs[i]; | ||
39 | return; | 47 | return; |
40 | } | 48 | } |
41 | 49 | ||
50 | static int __init count_sys_specs(void) | ||
51 | { | ||
52 | int i = 0; | ||
53 | while (ppc_sys_specs[i].ppc_sys_name[0]) | ||
54 | i++; | ||
55 | return i; | ||
56 | } | ||
57 | |||
58 | static int __init find_chip_by_name_and_id(char *name, u32 id) | ||
59 | { | ||
60 | int ret = -1; | ||
61 | unsigned int i = 0; | ||
62 | unsigned int j = 0; | ||
63 | unsigned int dups = 0; | ||
64 | |||
65 | unsigned char matched[count_sys_specs()]; | ||
66 | |||
67 | while (ppc_sys_specs[i].ppc_sys_name[0]) { | ||
68 | if (!strcmp(ppc_sys_specs[i].ppc_sys_name, name)) | ||
69 | matched[j++] = i; | ||
70 | i++; | ||
71 | } | ||
72 | if (j != 0) { | ||
73 | for (i = 0; i < j; i++) { | ||
74 | if ((ppc_sys_specs[matched[i]].mask & id) == | ||
75 | ppc_sys_specs[matched[i]].value) { | ||
76 | ret = matched[i]; | ||
77 | dups++; | ||
78 | } | ||
79 | } | ||
80 | ret = (dups == 1) ? ret : (-1 * dups); | ||
81 | } | ||
82 | return ret; | ||
83 | } | ||
84 | |||
85 | void __init identify_ppc_sys_by_name_and_id(char *name, u32 id) | ||
86 | { | ||
87 | int i = find_chip_by_name_and_id(name, id); | ||
88 | BUG_ON(i < 0); | ||
89 | cur_ppc_sys_spec = &ppc_sys_specs[i]; | ||
90 | } | ||
91 | |||
42 | /* Update all memory resources by paddr, call before platform_device_register */ | 92 | /* Update all memory resources by paddr, call before platform_device_register */ |
43 | void __init | 93 | void __init |
44 | ppc_sys_fixup_mem_resource(struct platform_device *pdev, phys_addr_t paddr) | 94 | ppc_sys_fixup_mem_resource(struct platform_device *pdev, phys_addr_t paddr) |
diff --git a/arch/ppc/syslib/pq2_devices.c b/arch/ppc/syslib/pq2_devices.c new file mode 100644 index 000000000000..1d3869768f96 --- /dev/null +++ b/arch/ppc/syslib/pq2_devices.c | |||
@@ -0,0 +1,389 @@ | |||
1 | /* | ||
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 Device descriptions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public License | ||
9 | * version 2. This program is licensed "as is" without any warranty of any | ||
10 | * kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | |||
14 | #include <linux/init.h> | ||
15 | #include <linux/module.h> | ||
16 | #include <linux/device.h> | ||
17 | #include <linux/ioport.h> | ||
18 | #include <asm/cpm2.h> | ||
19 | #include <asm/irq.h> | ||
20 | #include <asm/ppc_sys.h> | ||
21 | |||
22 | struct platform_device ppc_sys_platform_devices[] = { | ||
23 | [MPC82xx_CPM_FCC1] = { | ||
24 | .name = "fsl-cpm-fcc", | ||
25 | .id = 1, | ||
26 | .num_resources = 3, | ||
27 | .resource = (struct resource[]) { | ||
28 | { | ||
29 | .name = "fcc_regs", | ||
30 | .start = 0x11300, | ||
31 | .end = 0x1131f, | ||
32 | .flags = IORESOURCE_MEM, | ||
33 | }, | ||
34 | { | ||
35 | .name = "fcc_pram", | ||
36 | .start = 0x8400, | ||
37 | .end = 0x84ff, | ||
38 | .flags = IORESOURCE_MEM, | ||
39 | }, | ||
40 | { | ||
41 | .start = SIU_INT_FCC1, | ||
42 | .end = SIU_INT_FCC1, | ||
43 | .flags = IORESOURCE_IRQ, | ||
44 | }, | ||
45 | }, | ||
46 | }, | ||
47 | [MPC82xx_CPM_FCC2] = { | ||
48 | .name = "fsl-cpm-fcc", | ||
49 | .id = 2, | ||
50 | .num_resources = 3, | ||
51 | .resource = (struct resource[]) { | ||
52 | { | ||
53 | .name = "fcc_regs", | ||
54 | .start = 0x11320, | ||
55 | .end = 0x1133f, | ||
56 | .flags = IORESOURCE_MEM, | ||
57 | }, | ||
58 | { | ||
59 | .name = "fcc_pram", | ||
60 | .start = 0x8500, | ||
61 | .end = 0x85ff, | ||
62 | .flags = IORESOURCE_MEM, | ||
63 | }, | ||
64 | { | ||
65 | .start = SIU_INT_FCC2, | ||
66 | .end = SIU_INT_FCC2, | ||
67 | .flags = IORESOURCE_IRQ, | ||
68 | }, | ||
69 | }, | ||
70 | }, | ||
71 | [MPC82xx_CPM_FCC3] = { | ||
72 | .name = "fsl-cpm-fcc", | ||
73 | .id = 3, | ||
74 | .num_resources = 3, | ||
75 | .resource = (struct resource[]) { | ||
76 | { | ||
77 | .name = "fcc_regs", | ||
78 | .start = 0x11340, | ||
79 | .end = 0x1135f, | ||
80 | .flags = IORESOURCE_MEM, | ||
81 | }, | ||
82 | { | ||
83 | .name = "fcc_pram", | ||
84 | .start = 0x8600, | ||
85 | .end = 0x86ff, | ||
86 | .flags = IORESOURCE_MEM, | ||
87 | }, | ||
88 | { | ||
89 | .start = SIU_INT_FCC3, | ||
90 | .end = SIU_INT_FCC3, | ||
91 | .flags = IORESOURCE_IRQ, | ||
92 | }, | ||
93 | }, | ||
94 | }, | ||
95 | [MPC82xx_CPM_I2C] = { | ||
96 | .name = "fsl-cpm-i2c", | ||
97 | .id = 1, | ||
98 | .num_resources = 3, | ||
99 | .resource = (struct resource[]) { | ||
100 | { | ||
101 | .name = "i2c_mem", | ||
102 | .start = 0x11860, | ||
103 | .end = 0x118BF, | ||
104 | .flags = IORESOURCE_MEM, | ||
105 | }, | ||
106 | { | ||
107 | .name = "i2c_pram", | ||
108 | .start = 0x8afc, | ||
109 | .end = 0x8afd, | ||
110 | .flags = IORESOURCE_MEM, | ||
111 | }, | ||
112 | { | ||
113 | .start = SIU_INT_I2C, | ||
114 | .end = SIU_INT_I2C, | ||
115 | .flags = IORESOURCE_IRQ, | ||
116 | }, | ||
117 | }, | ||
118 | }, | ||
119 | [MPC82xx_CPM_SCC1] = { | ||
120 | .name = "fsl-cpm-scc", | ||
121 | .id = 1, | ||
122 | .num_resources = 3, | ||
123 | .resource = (struct resource[]) { | ||
124 | { | ||
125 | .name = "scc_mem", | ||
126 | .start = 0x11A00, | ||
127 | .end = 0x11A1F, | ||
128 | .flags = IORESOURCE_MEM, | ||
129 | }, | ||
130 | { | ||
131 | .name = "scc_pram", | ||
132 | .start = 0x8000, | ||
133 | .end = 0x80ff, | ||
134 | .flags = IORESOURCE_MEM, | ||
135 | }, | ||
136 | { | ||
137 | .start = SIU_INT_SCC1, | ||
138 | .end = SIU_INT_SCC1, | ||
139 | .flags = IORESOURCE_IRQ, | ||
140 | }, | ||
141 | }, | ||
142 | }, | ||
143 | [MPC82xx_CPM_SCC2] = { | ||
144 | .name = "fsl-cpm-scc", | ||
145 | .id = 2, | ||
146 | .num_resources = 3, | ||
147 | .resource = (struct resource[]) { | ||
148 | { | ||
149 | .name = "scc_mem", | ||
150 | .start = 0x11A20, | ||
151 | .end = 0x11A3F, | ||
152 | .flags = IORESOURCE_MEM, | ||
153 | }, | ||
154 | { | ||
155 | .name = "scc_pram", | ||
156 | .start = 0x8100, | ||
157 | .end = 0x81ff, | ||
158 | .flags = IORESOURCE_MEM, | ||
159 | }, | ||
160 | { | ||
161 | .start = SIU_INT_SCC2, | ||
162 | .end = SIU_INT_SCC2, | ||
163 | .flags = IORESOURCE_IRQ, | ||
164 | }, | ||
165 | }, | ||
166 | }, | ||
167 | [MPC82xx_CPM_SCC3] = { | ||
168 | .name = "fsl-cpm-scc", | ||
169 | .id = 3, | ||
170 | .num_resources = 3, | ||
171 | .resource = (struct resource[]) { | ||
172 | { | ||
173 | .name = "scc_mem", | ||
174 | .start = 0x11A40, | ||
175 | .end = 0x11A5F, | ||
176 | .flags = IORESOURCE_MEM, | ||
177 | }, | ||
178 | { | ||
179 | .name = "scc_pram", | ||
180 | .start = 0x8200, | ||
181 | .end = 0x82ff, | ||
182 | .flags = IORESOURCE_MEM, | ||
183 | }, | ||
184 | { | ||
185 | .start = SIU_INT_SCC3, | ||
186 | .end = SIU_INT_SCC3, | ||
187 | .flags = IORESOURCE_IRQ, | ||
188 | }, | ||
189 | }, | ||
190 | }, | ||
191 | [MPC82xx_CPM_SCC4] = { | ||
192 | .name = "fsl-cpm-scc", | ||
193 | .id = 4, | ||
194 | .num_resources = 3, | ||
195 | .resource = (struct resource[]) { | ||
196 | { | ||
197 | .name = "scc_mem", | ||
198 | .start = 0x11A60, | ||
199 | .end = 0x11A7F, | ||
200 | .flags = IORESOURCE_MEM, | ||
201 | }, | ||
202 | { | ||
203 | .name = "scc_pram", | ||
204 | .start = 0x8300, | ||
205 | .end = 0x83ff, | ||
206 | .flags = IORESOURCE_MEM, | ||
207 | }, | ||
208 | { | ||
209 | .start = SIU_INT_SCC4, | ||
210 | .end = SIU_INT_SCC4, | ||
211 | .flags = IORESOURCE_IRQ, | ||
212 | }, | ||
213 | }, | ||
214 | }, | ||
215 | [MPC82xx_CPM_SPI] = { | ||
216 | .name = "fsl-cpm-spi", | ||
217 | .id = 1, | ||
218 | .num_resources = 3, | ||
219 | .resource = (struct resource[]) { | ||
220 | { | ||
221 | .name = "spi_mem", | ||
222 | .start = 0x11AA0, | ||
223 | .end = 0x11AFF, | ||
224 | .flags = IORESOURCE_MEM, | ||
225 | }, | ||
226 | { | ||
227 | .name = "spi_pram", | ||
228 | .start = 0x89fc, | ||
229 | .end = 0x89fd, | ||
230 | .flags = IORESOURCE_MEM, | ||
231 | }, | ||
232 | { | ||
233 | .start = SIU_INT_SPI, | ||
234 | .end = SIU_INT_SPI, | ||
235 | .flags = IORESOURCE_IRQ, | ||
236 | }, | ||
237 | }, | ||
238 | }, | ||
239 | [MPC82xx_CPM_MCC1] = { | ||
240 | .name = "fsl-cpm-mcc", | ||
241 | .id = 1, | ||
242 | .num_resources = 3, | ||
243 | .resource = (struct resource[]) { | ||
244 | { | ||
245 | .name = "mcc_mem", | ||
246 | .start = 0x11B30, | ||
247 | .end = 0x11B3F, | ||
248 | .flags = IORESOURCE_MEM, | ||
249 | }, | ||
250 | { | ||
251 | .name = "mcc_pram", | ||
252 | .start = 0x8700, | ||
253 | .end = 0x877f, | ||
254 | .flags = IORESOURCE_MEM, | ||
255 | }, | ||
256 | { | ||
257 | .start = SIU_INT_MCC1, | ||
258 | .end = SIU_INT_MCC1, | ||
259 | .flags = IORESOURCE_IRQ, | ||
260 | }, | ||
261 | }, | ||
262 | }, | ||
263 | [MPC82xx_CPM_MCC2] = { | ||
264 | .name = "fsl-cpm-mcc", | ||
265 | .id = 2, | ||
266 | .num_resources = 3, | ||
267 | .resource = (struct resource[]) { | ||
268 | { | ||
269 | .name = "mcc_mem", | ||
270 | .start = 0x11B50, | ||
271 | .end = 0x11B5F, | ||
272 | .flags = IORESOURCE_MEM, | ||
273 | }, | ||
274 | { | ||
275 | .name = "mcc_pram", | ||
276 | .start = 0x8800, | ||
277 | .end = 0x887f, | ||
278 | .flags = IORESOURCE_MEM, | ||
279 | }, | ||
280 | { | ||
281 | .start = SIU_INT_MCC2, | ||
282 | .end = SIU_INT_MCC2, | ||
283 | .flags = IORESOURCE_IRQ, | ||
284 | }, | ||
285 | }, | ||
286 | }, | ||
287 | [MPC82xx_CPM_SMC1] = { | ||
288 | .name = "fsl-cpm-smc", | ||
289 | .id = 1, | ||
290 | .num_resources = 3, | ||
291 | .resource = (struct resource[]) { | ||
292 | { | ||
293 | .name = "smc_mem", | ||
294 | .start = 0x11A80, | ||
295 | .end = 0x11A8F, | ||
296 | .flags = IORESOURCE_MEM, | ||
297 | }, | ||
298 | { | ||
299 | .name = "smc_pram", | ||
300 | .start = 0x87fc, | ||
301 | .end = 0x87fd, | ||
302 | .flags = IORESOURCE_MEM, | ||
303 | }, | ||
304 | { | ||
305 | .start = SIU_INT_SMC1, | ||
306 | .end = SIU_INT_SMC1, | ||
307 | .flags = IORESOURCE_IRQ, | ||
308 | }, | ||
309 | }, | ||
310 | }, | ||
311 | [MPC82xx_CPM_SMC2] = { | ||
312 | .name = "fsl-cpm-smc", | ||
313 | .id = 2, | ||
314 | .num_resources = 3, | ||
315 | .resource = (struct resource[]) { | ||
316 | { | ||
317 | .name = "smc_mem", | ||
318 | .start = 0x11A90, | ||
319 | .end = 0x11A9F, | ||
320 | .flags = IORESOURCE_MEM, | ||
321 | }, | ||
322 | { | ||
323 | .name = "smc_pram", | ||
324 | .start = 0x88fc, | ||
325 | .end = 0x88fd, | ||
326 | .flags = IORESOURCE_MEM, | ||
327 | }, | ||
328 | { | ||
329 | .start = SIU_INT_SMC2, | ||
330 | .end = SIU_INT_SMC2, | ||
331 | .flags = IORESOURCE_IRQ, | ||
332 | }, | ||
333 | }, | ||
334 | }, | ||
335 | [MPC82xx_CPM_USB] = { | ||
336 | .name = "fsl-cpm-usb", | ||
337 | .id = 1, | ||
338 | .num_resources = 3, | ||
339 | .resource = (struct resource[]) { | ||
340 | { | ||
341 | .name = "usb_mem", | ||
342 | .start = 0x11b60, | ||
343 | .end = 0x11b78, | ||
344 | .flags = IORESOURCE_MEM, | ||
345 | }, | ||
346 | { | ||
347 | .name = "usb_pram", | ||
348 | .start = 0x8b00, | ||
349 | .end = 0x8bff, | ||
350 | .flags = IORESOURCE_MEM, | ||
351 | }, | ||
352 | { | ||
353 | .start = SIU_INT_USB, | ||
354 | .end = SIU_INT_USB, | ||
355 | .flags = IORESOURCE_IRQ, | ||
356 | }, | ||
357 | |||
358 | }, | ||
359 | }, | ||
360 | [MPC82xx_SEC1] = { | ||
361 | .name = "fsl-sec", | ||
362 | .id = 1, | ||
363 | .num_resources = 1, | ||
364 | .resource = (struct resource[]) { | ||
365 | { | ||
366 | .name = "sec_mem", | ||
367 | .start = 0x40000, | ||
368 | .end = 0x52fff, | ||
369 | .flags = IORESOURCE_MEM, | ||
370 | }, | ||
371 | }, | ||
372 | }, | ||
373 | }; | ||
374 | |||
375 | static int __init mach_mpc82xx_fixup(struct platform_device *pdev) | ||
376 | { | ||
377 | ppc_sys_fixup_mem_resource(pdev, CPM_MAP_ADDR); | ||
378 | return 0; | ||
379 | } | ||
380 | |||
381 | static int __init mach_mpc82xx_init(void) | ||
382 | { | ||
383 | if (ppc_md.progress) | ||
384 | ppc_md.progress("mach_mpc82xx_init:enter", 0); | ||
385 | ppc_sys_device_fixup = mach_mpc82xx_fixup; | ||
386 | return 0; | ||
387 | } | ||
388 | |||
389 | postcore_initcall(mach_mpc82xx_init); | ||
diff --git a/arch/ppc/syslib/pq2_sys.c b/arch/ppc/syslib/pq2_sys.c new file mode 100644 index 000000000000..7b6c9ebdb9e3 --- /dev/null +++ b/arch/ppc/syslib/pq2_sys.c | |||
@@ -0,0 +1,200 @@ | |||
1 | /* | ||
2 | * arch/ppc/syslib/pq2_devices.c | ||
3 | * | ||
4 | * PQ2 System descriptions | ||
5 | * | ||
6 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
7 | * | ||
8 | * This file is licensed under the terms of the GNU General Public License | ||
9 | * version 2. This program is licensed "as is" without any warranty of any | ||
10 | * kind, whether express or implied. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/module.h> | ||
15 | #include <linux/device.h> | ||
16 | |||
17 | #include <asm/ppc_sys.h> | ||
18 | |||
19 | struct ppc_sys_spec *cur_ppc_sys_spec; | ||
20 | struct ppc_sys_spec ppc_sys_specs[] = { | ||
21 | /* below is a list of the 8260 family of processors */ | ||
22 | { | ||
23 | .ppc_sys_name = "8250", | ||
24 | .mask = 0x0000ff00, | ||
25 | .value = 0x00000000, | ||
26 | .num_devices = 12, | ||
27 | .device_list = (enum ppc_sys_devices[]) | ||
28 | { | ||
29 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
30 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
31 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, | ||
32 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
33 | } | ||
34 | }, | ||
35 | { | ||
36 | .ppc_sys_name = "8255", | ||
37 | .mask = 0x0000ff00, | ||
38 | .value = 0x00000000, | ||
39 | .num_devices = 11, | ||
40 | .device_list = (enum ppc_sys_devices[]) | ||
41 | { | ||
42 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | ||
43 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SCC4, | ||
44 | MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, | ||
45 | MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
46 | } | ||
47 | }, | ||
48 | { | ||
49 | .ppc_sys_name = "8260", | ||
50 | .mask = 0x0000ff00, | ||
51 | .value = 0x00000000, | ||
52 | .num_devices = 12, | ||
53 | .device_list = (enum ppc_sys_devices[]) | ||
54 | { | ||
55 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
56 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
57 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, | ||
58 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
59 | } | ||
60 | }, | ||
61 | { | ||
62 | .ppc_sys_name = "8264", | ||
63 | .mask = 0x0000ff00, | ||
64 | .value = 0x00000000, | ||
65 | .num_devices = 12, | ||
66 | .device_list = (enum ppc_sys_devices[]) | ||
67 | { | ||
68 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
69 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
70 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, | ||
71 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
72 | } | ||
73 | }, | ||
74 | { | ||
75 | .ppc_sys_name = "8265", | ||
76 | .mask = 0x0000ff00, | ||
77 | .value = 0x00000000, | ||
78 | .num_devices = 12, | ||
79 | .device_list = (enum ppc_sys_devices[]) | ||
80 | { | ||
81 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
82 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
83 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, | ||
84 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
85 | } | ||
86 | }, | ||
87 | { | ||
88 | .ppc_sys_name = "8266", | ||
89 | .mask = 0x0000ff00, | ||
90 | .value = 0x00000000, | ||
91 | .num_devices = 12, | ||
92 | .device_list = (enum ppc_sys_devices[]) | ||
93 | { | ||
94 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
95 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
96 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, | ||
97 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
98 | } | ||
99 | }, | ||
100 | /* below is a list of the 8272 family of processors */ | ||
101 | { | ||
102 | .ppc_sys_name = "8247", | ||
103 | .mask = 0x0000ff00, | ||
104 | .value = 0x00000d00, | ||
105 | .num_devices = 10, | ||
106 | .device_list = (enum ppc_sys_devices[]) | ||
107 | { | ||
108 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | ||
109 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, | ||
110 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
111 | MPC82xx_CPM_USB, | ||
112 | }, | ||
113 | }, | ||
114 | { | ||
115 | .ppc_sys_name = "8248", | ||
116 | .mask = 0x0000ff00, | ||
117 | .value = 0x00000c00, | ||
118 | .num_devices = 11, | ||
119 | .device_list = (enum ppc_sys_devices[]) | ||
120 | { | ||
121 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | ||
122 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, | ||
123 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
124 | MPC82xx_CPM_USB, MPC82xx_SEC1, | ||
125 | }, | ||
126 | }, | ||
127 | { | ||
128 | .ppc_sys_name = "8271", | ||
129 | .mask = 0x0000ff00, | ||
130 | .value = 0x00000d00, | ||
131 | .num_devices = 10, | ||
132 | .device_list = (enum ppc_sys_devices[]) | ||
133 | { | ||
134 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | ||
135 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, | ||
136 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
137 | MPC82xx_CPM_USB, | ||
138 | }, | ||
139 | }, | ||
140 | { | ||
141 | .ppc_sys_name = "8272", | ||
142 | .mask = 0x0000ff00, | ||
143 | .value = 0x00000c00, | ||
144 | .num_devices = 11, | ||
145 | .device_list = (enum ppc_sys_devices[]) | ||
146 | { | ||
147 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_SCC1, | ||
148 | MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, MPC82xx_CPM_SMC1, | ||
149 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
150 | MPC82xx_CPM_USB, MPC82xx_SEC1, | ||
151 | }, | ||
152 | }, | ||
153 | /* below is a list of the 8280 family of processors */ | ||
154 | { | ||
155 | .ppc_sys_name = "8270", | ||
156 | .mask = 0x0000ff00, | ||
157 | .value = 0x00000a00, | ||
158 | .num_devices = 12, | ||
159 | .device_list = (enum ppc_sys_devices[]) | ||
160 | { | ||
161 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
162 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
163 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, | ||
164 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
165 | }, | ||
166 | }, | ||
167 | { | ||
168 | .ppc_sys_name = "8275", | ||
169 | .mask = 0x0000ff00, | ||
170 | .value = 0x00000a00, | ||
171 | .num_devices = 12, | ||
172 | .device_list = (enum ppc_sys_devices[]) | ||
173 | { | ||
174 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
175 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
176 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_SMC1, | ||
177 | MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, MPC82xx_CPM_I2C, | ||
178 | }, | ||
179 | }, | ||
180 | { | ||
181 | .ppc_sys_name = "8280", | ||
182 | .mask = 0x0000ff00, | ||
183 | .value = 0x00000a00, | ||
184 | .num_devices = 13, | ||
185 | .device_list = (enum ppc_sys_devices[]) | ||
186 | { | ||
187 | MPC82xx_CPM_FCC1, MPC82xx_CPM_FCC2, MPC82xx_CPM_FCC3, | ||
188 | MPC82xx_CPM_SCC1, MPC82xx_CPM_SCC2, MPC82xx_CPM_SCC3, | ||
189 | MPC82xx_CPM_SCC4, MPC82xx_CPM_MCC1, MPC82xx_CPM_MCC2, | ||
190 | MPC82xx_CPM_SMC1, MPC82xx_CPM_SMC2, MPC82xx_CPM_SPI, | ||
191 | MPC82xx_CPM_I2C, | ||
192 | }, | ||
193 | }, | ||
194 | { | ||
195 | /* default match */ | ||
196 | .ppc_sys_name = "", | ||
197 | .mask = 0x00000000, | ||
198 | .value = 0x00000000, | ||
199 | }, | ||
200 | }; | ||
diff --git a/arch/ppc64/Kconfig.debug b/arch/ppc64/Kconfig.debug index 46b1ce58da3b..f16a5030527b 100644 --- a/arch/ppc64/Kconfig.debug +++ b/arch/ppc64/Kconfig.debug | |||
@@ -41,10 +41,19 @@ config XMON | |||
41 | help | 41 | help |
42 | Include in-kernel hooks for the xmon kernel monitor/debugger. | 42 | Include in-kernel hooks for the xmon kernel monitor/debugger. |
43 | Unless you are intending to debug the kernel, say N here. | 43 | Unless you are intending to debug the kernel, say N here. |
44 | Make sure to enable also CONFIG_BOOTX_TEXT on Macs. Otherwise | ||
45 | nothing will appear on the screen (xmon writes directly to the | ||
46 | framebuffer memory). | ||
47 | The cmdline option 'xmon' or 'xmon=early' will drop into xmon very | ||
48 | early during boot. 'xmon=on' will just enable the xmon debugger hooks. | ||
49 | 'xmon=off' will disable the debugger hooks if CONFIG_XMON_DEFAULT is set. | ||
44 | 50 | ||
45 | config XMON_DEFAULT | 51 | config XMON_DEFAULT |
46 | bool "Enable xmon by default" | 52 | bool "Enable xmon by default" |
47 | depends on XMON | 53 | depends on XMON |
54 | help | ||
55 | xmon is normally disabled unless booted with 'xmon=on'. | ||
56 | Use 'xmon=off' to disable xmon init during runtime. | ||
48 | 57 | ||
49 | config PPCDBG | 58 | config PPCDBG |
50 | bool "Include PPCDBG realtime debugging" | 59 | bool "Include PPCDBG realtime debugging" |
diff --git a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c index 0a3ddc9227c5..a1d5fdfea4a8 100644 --- a/arch/ppc64/kernel/pSeries_lpar.c +++ b/arch/ppc64/kernel/pSeries_lpar.c | |||
@@ -266,6 +266,10 @@ void vpa_init(int cpu) | |||
266 | 266 | ||
267 | /* Register the Virtual Processor Area (VPA) */ | 267 | /* Register the Virtual Processor Area (VPA) */ |
268 | flags = 1UL << (63 - 18); | 268 | flags = 1UL << (63 - 18); |
269 | |||
270 | if (cpu_has_feature(CPU_FTR_ALTIVEC)) | ||
271 | paca[cpu].lppaca.vmxregs_in_use = 1; | ||
272 | |||
269 | ret = register_vpa(flags, hwcpu, __pa(vpa)); | 273 | ret = register_vpa(flags, hwcpu, __pa(vpa)); |
270 | 274 | ||
271 | if (ret) | 275 | if (ret) |
diff --git a/arch/ppc64/kernel/pacaData.c b/arch/ppc64/kernel/pacaData.c index 6182a2cd90a5..33a2d8db3f21 100644 --- a/arch/ppc64/kernel/pacaData.c +++ b/arch/ppc64/kernel/pacaData.c | |||
@@ -59,6 +59,7 @@ extern unsigned long __toc_start; | |||
59 | .fpregs_in_use = 1, \ | 59 | .fpregs_in_use = 1, \ |
60 | .end_of_quantum = 0xfffffffffffffffful, \ | 60 | .end_of_quantum = 0xfffffffffffffffful, \ |
61 | .slb_count = 64, \ | 61 | .slb_count = 64, \ |
62 | .vmxregs_in_use = 0, \ | ||
62 | }, \ | 63 | }, \ |
63 | 64 | ||
64 | #ifdef CONFIG_PPC_ISERIES | 65 | #ifdef CONFIG_PPC_ISERIES |
diff --git a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c index b0c3b829fe47..e26b0420b6dd 100644 --- a/arch/ppc64/kernel/rtasd.c +++ b/arch/ppc64/kernel/rtasd.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/vmalloc.h> | 19 | #include <linux/vmalloc.h> |
20 | #include <linux/spinlock.h> | 20 | #include <linux/spinlock.h> |
21 | #include <linux/cpu.h> | 21 | #include <linux/cpu.h> |
22 | #include <linux/delay.h> | ||
22 | 23 | ||
23 | #include <asm/uaccess.h> | 24 | #include <asm/uaccess.h> |
24 | #include <asm/io.h> | 25 | #include <asm/io.h> |
@@ -412,8 +413,7 @@ static void do_event_scan_all_cpus(long delay) | |||
412 | 413 | ||
413 | /* Drop hotplug lock, and sleep for the specified delay */ | 414 | /* Drop hotplug lock, and sleep for the specified delay */ |
414 | unlock_cpu_hotplug(); | 415 | unlock_cpu_hotplug(); |
415 | set_current_state(TASK_INTERRUPTIBLE); | 416 | msleep_interruptible(delay); |
416 | schedule_timeout(delay); | ||
417 | lock_cpu_hotplug(); | 417 | lock_cpu_hotplug(); |
418 | 418 | ||
419 | cpu = next_cpu(cpu, cpu_online_map); | 419 | cpu = next_cpu(cpu, cpu_online_map); |
@@ -442,7 +442,7 @@ static int rtasd(void *unused) | |||
442 | 442 | ||
443 | printk(KERN_INFO "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 milliseconds\n", (30000/rtas_event_scan_rate)); |
446 | 446 | ||
447 | /* See if we have any error stored in NVRAM */ | 447 | /* See if we have any error stored in NVRAM */ |
448 | memset(logdata, 0, rtas_error_log_max); | 448 | memset(logdata, 0, rtas_error_log_max); |
@@ -459,7 +459,7 @@ static int rtasd(void *unused) | |||
459 | } | 459 | } |
460 | 460 | ||
461 | /* First pass. */ | 461 | /* First pass. */ |
462 | do_event_scan_all_cpus(HZ); | 462 | do_event_scan_all_cpus(1000); |
463 | 463 | ||
464 | if (surveillance_timeout != -1) { | 464 | if (surveillance_timeout != -1) { |
465 | DEBUG("enabling surveillance\n"); | 465 | DEBUG("enabling surveillance\n"); |
@@ -471,7 +471,7 @@ static int rtasd(void *unused) | |||
471 | * machines have problems if we call event-scan too | 471 | * machines have problems if we call event-scan too |
472 | * quickly. */ | 472 | * quickly. */ |
473 | for (;;) | 473 | for (;;) |
474 | do_event_scan_all_cpus((HZ*60/rtas_event_scan_rate) / 2); | 474 | do_event_scan_all_cpus(30000/rtas_event_scan_rate); |
475 | 475 | ||
476 | error: | 476 | error: |
477 | /* Should delete proc entries */ | 477 | /* Should delete proc entries */ |
diff --git a/arch/ppc64/kernel/rtc.c b/arch/ppc64/kernel/rtc.c index d729fefa0df5..6ff52bc61325 100644 --- a/arch/ppc64/kernel/rtc.c +++ b/arch/ppc64/kernel/rtc.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
36 | #include <linux/bcd.h> | 36 | #include <linux/bcd.h> |
37 | #include <linux/interrupt.h> | 37 | #include <linux/interrupt.h> |
38 | #include <linux/delay.h> | ||
38 | 39 | ||
39 | #include <asm/io.h> | 40 | #include <asm/io.h> |
40 | #include <asm/uaccess.h> | 41 | #include <asm/uaccess.h> |
@@ -351,8 +352,7 @@ void rtas_get_rtc_time(struct rtc_time *rtc_tm) | |||
351 | return; /* delay not allowed */ | 352 | return; /* delay not allowed */ |
352 | } | 353 | } |
353 | wait_time = rtas_extended_busy_delay_time(error); | 354 | wait_time = rtas_extended_busy_delay_time(error); |
354 | set_current_state(TASK_INTERRUPTIBLE); | 355 | msleep_interruptible(wait_time); |
355 | schedule_timeout(wait_time); | ||
356 | error = RTAS_CLOCK_BUSY; | 356 | error = RTAS_CLOCK_BUSY; |
357 | } | 357 | } |
358 | } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); | 358 | } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); |
@@ -386,8 +386,7 @@ int rtas_set_rtc_time(struct rtc_time *tm) | |||
386 | if (in_interrupt()) | 386 | if (in_interrupt()) |
387 | return 1; /* probably decrementer */ | 387 | return 1; /* probably decrementer */ |
388 | wait_time = rtas_extended_busy_delay_time(error); | 388 | wait_time = rtas_extended_busy_delay_time(error); |
389 | set_current_state(TASK_INTERRUPTIBLE); | 389 | msleep_interruptible(wait_time); |
390 | schedule_timeout(wait_time); | ||
391 | error = RTAS_CLOCK_BUSY; | 390 | error = RTAS_CLOCK_BUSY; |
392 | } | 391 | } |
393 | } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); | 392 | } while (error == RTAS_CLOCK_BUSY && (__get_tb() < max_wait_tb)); |
diff --git a/arch/ppc64/kernel/scanlog.c b/arch/ppc64/kernel/scanlog.c index 4d70736619c7..215bf8900304 100644 --- a/arch/ppc64/kernel/scanlog.c +++ b/arch/ppc64/kernel/scanlog.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/errno.h> | 25 | #include <linux/errno.h> |
26 | #include <linux/proc_fs.h> | 26 | #include <linux/proc_fs.h> |
27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
28 | #include <linux/delay.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | #include <asm/rtas.h> | 30 | #include <asm/rtas.h> |
30 | #include <asm/prom.h> | 31 | #include <asm/prom.h> |
@@ -77,7 +78,7 @@ static ssize_t scanlog_read(struct file *file, char __user *buf, | |||
77 | return -EFAULT; | 78 | return -EFAULT; |
78 | 79 | ||
79 | for (;;) { | 80 | for (;;) { |
80 | wait_time = HZ/2; /* default wait if no data */ | 81 | wait_time = 500; /* default wait if no data */ |
81 | spin_lock(&rtas_data_buf_lock); | 82 | spin_lock(&rtas_data_buf_lock); |
82 | memcpy(rtas_data_buf, data, RTAS_DATA_BUF_SIZE); | 83 | memcpy(rtas_data_buf, data, RTAS_DATA_BUF_SIZE); |
83 | status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, | 84 | status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, |
@@ -107,24 +108,14 @@ static ssize_t scanlog_read(struct file *file, char __user *buf, | |||
107 | break; | 108 | break; |
108 | default: | 109 | default: |
109 | if (status > 9900 && status <= 9905) { | 110 | if (status > 9900 && status <= 9905) { |
110 | /* No data. RTAS is hinting at a delay required | 111 | wait_time = rtas_extended_busy_delay_time(status); |
111 | * between 1-100000 milliseconds | ||
112 | */ | ||
113 | int ms = 1; | ||
114 | for (; status > 9900; status--) | ||
115 | ms = ms * 10; | ||
116 | /* Use microseconds for reasonable accuracy */ | ||
117 | ms *= 1000; | ||
118 | wait_time = ms / (1000000/HZ); /* round down is fine */ | ||
119 | /* Fall through to sleep */ | ||
120 | } else { | 112 | } else { |
121 | printk(KERN_ERR "scanlog: unknown error from rtas: %d\n", status); | 113 | printk(KERN_ERR "scanlog: unknown error from rtas: %d\n", status); |
122 | return -EIO; | 114 | return -EIO; |
123 | } | 115 | } |
124 | } | 116 | } |
125 | /* Apparently no data yet. Wait and try again. */ | 117 | /* Apparently no data yet. Wait and try again. */ |
126 | set_current_state(TASK_INTERRUPTIBLE); | 118 | msleep_interruptible(wait_time); |
127 | schedule_timeout(wait_time); | ||
128 | } | 119 | } |
129 | /*NOTREACHED*/ | 120 | /*NOTREACHED*/ |
130 | } | 121 | } |
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c index c02dc9809ca5..b3b1e9c1770a 100644 --- a/arch/ppc64/mm/init.c +++ b/arch/ppc64/mm/init.c | |||
@@ -552,27 +552,18 @@ void __init do_init_bootmem(void) | |||
552 | /* Add all physical memory to the bootmem map, mark each area | 552 | /* Add all physical memory to the bootmem map, mark each area |
553 | * present. | 553 | * present. |
554 | */ | 554 | */ |
555 | for (i=0; i < lmb.memory.cnt; i++) { | 555 | for (i=0; i < lmb.memory.cnt; i++) |
556 | unsigned long base, size; | 556 | free_bootmem(lmb_start_pfn(&lmb.memory, i), |
557 | unsigned long start_pfn, end_pfn; | 557 | lmb_size_bytes(&lmb.memory, i)); |
558 | |||
559 | base = lmb.memory.region[i].base; | ||
560 | size = lmb.memory.region[i].size; | ||
561 | |||
562 | start_pfn = base >> PAGE_SHIFT; | ||
563 | end_pfn = start_pfn + (size >> PAGE_SHIFT); | ||
564 | memory_present(0, start_pfn, end_pfn); | ||
565 | |||
566 | free_bootmem(base, size); | ||
567 | } | ||
568 | 558 | ||
569 | /* reserve the sections we're already using */ | 559 | /* reserve the sections we're already using */ |
570 | for (i=0; i < lmb.reserved.cnt; i++) { | 560 | for (i=0; i < lmb.reserved.cnt; i++) |
571 | unsigned long base = lmb.reserved.region[i].base; | 561 | reserve_bootmem(lmb_start_pfn(&lmb.reserved, i), |
572 | unsigned long size = lmb.reserved.region[i].size; | 562 | lmb_size_bytes(&lmb.reserved, i)); |
573 | 563 | ||
574 | reserve_bootmem(base, size); | 564 | for (i=0; i < lmb.memory.cnt; i++) |
575 | } | 565 | memory_present(0, lmb_start_pfn(&lmb.memory, i), |
566 | lmb_end_pfn(&lmb.memory, i)); | ||
576 | } | 567 | } |
577 | 568 | ||
578 | /* | 569 | /* |
diff --git a/arch/ppc64/mm/numa.c b/arch/ppc64/mm/numa.c index c3116f0d788c..cb864b8f2750 100644 --- a/arch/ppc64/mm/numa.c +++ b/arch/ppc64/mm/numa.c | |||
@@ -440,8 +440,6 @@ new_range: | |||
440 | for (i = start ; i < (start+size); i += MEMORY_INCREMENT) | 440 | for (i = start ; i < (start+size); i += MEMORY_INCREMENT) |
441 | numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = | 441 | numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = |
442 | numa_domain; | 442 | numa_domain; |
443 | memory_present(numa_domain, start >> PAGE_SHIFT, | ||
444 | (start + size) >> PAGE_SHIFT); | ||
445 | 443 | ||
446 | if (--ranges) | 444 | if (--ranges) |
447 | goto new_range; | 445 | goto new_range; |
@@ -483,7 +481,6 @@ static void __init setup_nonnuma(void) | |||
483 | 481 | ||
484 | for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT) | 482 | for (i = 0 ; i < top_of_ram; i += MEMORY_INCREMENT) |
485 | numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = 0; | 483 | numa_memory_lookup_table[i >> MEMORY_INCREMENT_SHIFT] = 0; |
486 | memory_present(0, 0, init_node_data[0].node_end_pfn); | ||
487 | } | 484 | } |
488 | 485 | ||
489 | static void __init dump_numa_topology(void) | 486 | static void __init dump_numa_topology(void) |
@@ -695,6 +692,46 @@ new_range: | |||
695 | size); | 692 | size); |
696 | } | 693 | } |
697 | } | 694 | } |
695 | /* | ||
696 | * This loop may look famaliar, but we have to do it again | ||
697 | * after marking our reserved memory to mark memory present | ||
698 | * for sparsemem. | ||
699 | */ | ||
700 | addr_cells = get_mem_addr_cells(); | ||
701 | size_cells = get_mem_size_cells(); | ||
702 | memory = NULL; | ||
703 | while ((memory = of_find_node_by_type(memory, "memory")) != NULL) { | ||
704 | unsigned long mem_start, mem_size; | ||
705 | int numa_domain, ranges; | ||
706 | unsigned int *memcell_buf; | ||
707 | unsigned int len; | ||
708 | |||
709 | memcell_buf = (unsigned int *)get_property(memory, "reg", &len); | ||
710 | if (!memcell_buf || len <= 0) | ||
711 | continue; | ||
712 | |||
713 | ranges = memory->n_addrs; /* ranges in cell */ | ||
714 | new_range2: | ||
715 | mem_start = read_n_cells(addr_cells, &memcell_buf); | ||
716 | mem_size = read_n_cells(size_cells, &memcell_buf); | ||
717 | if (numa_enabled) { | ||
718 | numa_domain = of_node_numa_domain(memory); | ||
719 | if (numa_domain >= MAX_NUMNODES) | ||
720 | numa_domain = 0; | ||
721 | } else | ||
722 | numa_domain = 0; | ||
723 | |||
724 | if (numa_domain != nid) | ||
725 | continue; | ||
726 | |||
727 | mem_size = numa_enforce_memory_limit(mem_start, mem_size); | ||
728 | memory_present(numa_domain, mem_start >> PAGE_SHIFT, | ||
729 | (mem_start + mem_size) >> PAGE_SHIFT); | ||
730 | |||
731 | if (--ranges) /* process all ranges in cell */ | ||
732 | goto new_range2; | ||
733 | } | ||
734 | |||
698 | } | 735 | } |
699 | } | 736 | } |
700 | 737 | ||
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 960ba6029c3a..bc59282da762 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -62,7 +62,7 @@ typedef struct | |||
62 | } debug_sprintf_entry_t; | 62 | } debug_sprintf_entry_t; |
63 | 63 | ||
64 | 64 | ||
65 | extern void tod_to_timeval(uint64_t todval, struct timeval *xtime); | 65 | extern void tod_to_timeval(uint64_t todval, struct timespec *xtime); |
66 | 66 | ||
67 | /* internal function prototyes */ | 67 | /* internal function prototyes */ |
68 | 68 | ||
@@ -374,9 +374,24 @@ debug_info_copy(debug_info_t* in, int mode) | |||
374 | { | 374 | { |
375 | int i,j; | 375 | int i,j; |
376 | debug_info_t* rc; | 376 | debug_info_t* rc; |
377 | unsigned long flags; | ||
378 | |||
379 | /* get a consistent copy of the debug areas */ | ||
380 | do { | ||
381 | rc = debug_info_alloc(in->name, in->pages_per_area, | ||
382 | in->nr_areas, in->buf_size, in->level, mode); | ||
383 | spin_lock_irqsave(&in->lock, flags); | ||
384 | if(!rc) | ||
385 | goto out; | ||
386 | /* has something changed in the meantime ? */ | ||
387 | if((rc->pages_per_area == in->pages_per_area) && | ||
388 | (rc->nr_areas == in->nr_areas)) { | ||
389 | break; | ||
390 | } | ||
391 | spin_unlock_irqrestore(&in->lock, flags); | ||
392 | debug_info_free(rc); | ||
393 | } while (1); | ||
377 | 394 | ||
378 | rc = debug_info_alloc(in->name, in->pages_per_area, in->nr_areas, | ||
379 | in->buf_size, in->level, mode); | ||
380 | if(!rc || (mode == NO_AREAS)) | 395 | if(!rc || (mode == NO_AREAS)) |
381 | goto out; | 396 | goto out; |
382 | 397 | ||
@@ -386,6 +401,7 @@ debug_info_copy(debug_info_t* in, int mode) | |||
386 | } | 401 | } |
387 | } | 402 | } |
388 | out: | 403 | out: |
404 | spin_unlock_irqrestore(&in->lock, flags); | ||
389 | return rc; | 405 | return rc; |
390 | } | 406 | } |
391 | 407 | ||
@@ -593,19 +609,15 @@ debug_open(struct inode *inode, struct file *file) | |||
593 | debug_info_t *debug_info, *debug_info_snapshot; | 609 | debug_info_t *debug_info, *debug_info_snapshot; |
594 | 610 | ||
595 | down(&debug_lock); | 611 | down(&debug_lock); |
596 | 612 | debug_info = (struct debug_info*)file->f_dentry->d_inode->u.generic_ip; | |
597 | /* find debug log and view */ | 613 | /* find debug view */ |
598 | debug_info = debug_area_first; | 614 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { |
599 | while(debug_info != NULL){ | 615 | if (!debug_info->views[i]) |
600 | for (i = 0; i < DEBUG_MAX_VIEWS; i++) { | 616 | continue; |
601 | if (!debug_info->views[i]) | 617 | else if (debug_info->debugfs_entries[i] == |
602 | continue; | 618 | file->f_dentry) { |
603 | else if (debug_info->debugfs_entries[i] == | 619 | goto found; /* found view ! */ |
604 | file->f_dentry) { | ||
605 | goto found; /* found view ! */ | ||
606 | } | ||
607 | } | 620 | } |
608 | debug_info = debug_info->next; | ||
609 | } | 621 | } |
610 | /* no entry found */ | 622 | /* no entry found */ |
611 | rc = -EINVAL; | 623 | rc = -EINVAL; |
@@ -833,7 +845,7 @@ extern inline void | |||
833 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, | 845 | debug_finish_entry(debug_info_t * id, debug_entry_t* active, int level, |
834 | int exception) | 846 | int exception) |
835 | { | 847 | { |
836 | STCK(active->id.stck); | 848 | active->id.stck = get_clock(); |
837 | active->id.fields.cpuid = smp_processor_id(); | 849 | active->id.fields.cpuid = smp_processor_id(); |
838 | active->caller = __builtin_return_address(0); | 850 | active->caller = __builtin_return_address(0); |
839 | active->id.fields.exception = exception; | 851 | active->id.fields.exception = exception; |
@@ -1078,7 +1090,7 @@ debug_register_view(debug_info_t * id, struct debug_view *view) | |||
1078 | if (view->input_proc) | 1090 | if (view->input_proc) |
1079 | mode |= S_IWUSR; | 1091 | mode |= S_IWUSR; |
1080 | pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry, | 1092 | pde = debugfs_create_file(view->name, mode, id->debugfs_root_entry, |
1081 | NULL, &debug_file_ops); | 1093 | id , &debug_file_ops); |
1082 | if (!pde){ | 1094 | if (!pde){ |
1083 | printk(KERN_WARNING "debug: debugfs_create_file() failed!"\ | 1095 | printk(KERN_WARNING "debug: debugfs_create_file() failed!"\ |
1084 | " Cannot register view %s/%s\n", id->name,view->name); | 1096 | " Cannot register view %s/%s\n", id->name,view->name); |
@@ -1432,7 +1444,7 @@ int | |||
1432 | debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, | 1444 | debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, |
1433 | int area, debug_entry_t * entry, char *out_buf) | 1445 | int area, debug_entry_t * entry, char *out_buf) |
1434 | { | 1446 | { |
1435 | struct timeval time_val; | 1447 | struct timespec time_spec; |
1436 | unsigned long long time; | 1448 | unsigned long long time; |
1437 | char *except_str; | 1449 | char *except_str; |
1438 | unsigned long caller; | 1450 | unsigned long caller; |
@@ -1443,7 +1455,7 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, | |||
1443 | time = entry->id.stck; | 1455 | time = entry->id.stck; |
1444 | /* adjust todclock to 1970 */ | 1456 | /* adjust todclock to 1970 */ |
1445 | time -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096); | 1457 | time -= 0x8126d60e46000000LL - (0x3c26700LL * 1000000 * 4096); |
1446 | tod_to_timeval(time, &time_val); | 1458 | tod_to_timeval(time, &time_spec); |
1447 | 1459 | ||
1448 | if (entry->id.fields.exception) | 1460 | if (entry->id.fields.exception) |
1449 | except_str = "*"; | 1461 | except_str = "*"; |
@@ -1451,7 +1463,7 @@ debug_dflt_header_fn(debug_info_t * id, struct debug_view *view, | |||
1451 | except_str = "-"; | 1463 | except_str = "-"; |
1452 | caller = ((unsigned long) entry->caller) & PSW_ADDR_INSN; | 1464 | caller = ((unsigned long) entry->caller) & PSW_ADDR_INSN; |
1453 | rc += sprintf(out_buf, "%02i %011lu:%06lu %1u %1s %02i %p ", | 1465 | rc += sprintf(out_buf, "%02i %011lu:%06lu %1u %1s %02i %p ", |
1454 | area, time_val.tv_sec, time_val.tv_usec, level, | 1466 | area, time_spec.tv_sec, time_spec.tv_nsec / 1000, level, |
1455 | except_str, entry->id.fields.cpuid, (void *) caller); | 1467 | except_str, entry->id.fields.cpuid, (void *) caller); |
1456 | return rc; | 1468 | return rc; |
1457 | } | 1469 | } |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 1a271b16cb5c..cbe7d6a2d02c 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -138,14 +138,14 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
138 | st %r12,__SF_BACKCHAIN(%r15) # clear back chain | 138 | st %r12,__SF_BACKCHAIN(%r15) # clear back chain |
139 | .endm | 139 | .endm |
140 | 140 | ||
141 | .macro RESTORE_ALL sync | 141 | .macro RESTORE_ALL psworg,sync |
142 | mvc __LC_RETURN_PSW(8),SP_PSW(%r15) # move user PSW to lowcore | 142 | mvc \psworg(8),SP_PSW(%r15) # move user PSW to lowcore |
143 | .if !\sync | 143 | .if !\sync |
144 | ni __LC_RETURN_PSW+1,0xfd # clear wait state bit | 144 | ni \psworg+1,0xfd # clear wait state bit |
145 | .endif | 145 | .endif |
146 | lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user | 146 | lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user |
147 | STORE_TIMER __LC_EXIT_TIMER | 147 | STORE_TIMER __LC_EXIT_TIMER |
148 | lpsw __LC_RETURN_PSW # back to caller | 148 | lpsw \psworg # back to caller |
149 | .endm | 149 | .endm |
150 | 150 | ||
151 | /* | 151 | /* |
@@ -235,7 +235,7 @@ sysc_return: | |||
235 | tm __TI_flags+3(%r9),_TIF_WORK_SVC | 235 | tm __TI_flags+3(%r9),_TIF_WORK_SVC |
236 | bnz BASED(sysc_work) # there is work to do (signals etc.) | 236 | bnz BASED(sysc_work) # there is work to do (signals etc.) |
237 | sysc_leave: | 237 | sysc_leave: |
238 | RESTORE_ALL 1 | 238 | RESTORE_ALL __LC_RETURN_PSW,1 |
239 | 239 | ||
240 | # | 240 | # |
241 | # recheck if there is more work to do | 241 | # recheck if there is more work to do |
@@ -312,8 +312,6 @@ sysc_singlestep: | |||
312 | la %r14,BASED(sysc_return) # load adr. of system return | 312 | la %r14,BASED(sysc_return) # load adr. of system return |
313 | br %r1 # branch to do_single_step | 313 | br %r1 # branch to do_single_step |
314 | 314 | ||
315 | __critical_end: | ||
316 | |||
317 | # | 315 | # |
318 | # call trace before and after sys_call | 316 | # call trace before and after sys_call |
319 | # | 317 | # |
@@ -571,7 +569,8 @@ io_return: | |||
571 | tm __TI_flags+3(%r9),_TIF_WORK_INT | 569 | tm __TI_flags+3(%r9),_TIF_WORK_INT |
572 | bnz BASED(io_work) # there is work to do (signals etc.) | 570 | bnz BASED(io_work) # there is work to do (signals etc.) |
573 | io_leave: | 571 | io_leave: |
574 | RESTORE_ALL 0 | 572 | RESTORE_ALL __LC_RETURN_PSW,0 |
573 | io_done: | ||
575 | 574 | ||
576 | #ifdef CONFIG_PREEMPT | 575 | #ifdef CONFIG_PREEMPT |
577 | io_preempt: | 576 | io_preempt: |
@@ -621,7 +620,7 @@ io_work_loop: | |||
621 | # | 620 | # |
622 | io_mcck_pending: | 621 | io_mcck_pending: |
623 | l %r1,BASED(.Ls390_handle_mcck) | 622 | l %r1,BASED(.Ls390_handle_mcck) |
624 | l %r14,BASED(io_work_loop) | 623 | la %r14,BASED(io_work_loop) |
625 | br %r1 # TIF bit will be cleared by handler | 624 | br %r1 # TIF bit will be cleared by handler |
626 | 625 | ||
627 | # | 626 | # |
@@ -674,6 +673,8 @@ ext_no_vtime: | |||
674 | basr %r14,%r1 | 673 | basr %r14,%r1 |
675 | b BASED(io_return) | 674 | b BASED(io_return) |
676 | 675 | ||
676 | __critical_end: | ||
677 | |||
677 | /* | 678 | /* |
678 | * Machine check handler routines | 679 | * Machine check handler routines |
679 | */ | 680 | */ |
@@ -681,6 +682,7 @@ ext_no_vtime: | |||
681 | .globl mcck_int_handler | 682 | .globl mcck_int_handler |
682 | mcck_int_handler: | 683 | mcck_int_handler: |
683 | spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer | 684 | spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer |
685 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA | ||
684 | lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs | 686 | lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs |
685 | SAVE_ALL_BASE __LC_SAVE_AREA+32 | 687 | SAVE_ALL_BASE __LC_SAVE_AREA+32 |
686 | la %r12,__LC_MCK_OLD_PSW | 688 | la %r12,__LC_MCK_OLD_PSW |
@@ -693,17 +695,8 @@ mcck_int_handler: | |||
693 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 695 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER |
694 | mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 696 | mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER |
695 | mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER | 697 | mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER |
696 | 0: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | ||
697 | bno BASED(mcck_no_vtime) # no -> skip cleanup critical | ||
698 | tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? | ||
699 | bz BASED(mcck_no_vtime) | ||
700 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER | ||
701 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | ||
702 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER | ||
703 | mcck_no_vtime: | ||
704 | #endif | 698 | #endif |
705 | 0: | 699 | 0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? |
706 | tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? | ||
707 | bno BASED(mcck_int_main) # no -> skip cleanup critical | 700 | bno BASED(mcck_int_main) # no -> skip cleanup critical |
708 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit | 701 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit |
709 | bnz BASED(mcck_int_main) # from user -> load async stack | 702 | bnz BASED(mcck_int_main) # from user -> load async stack |
@@ -720,6 +713,16 @@ mcck_int_main: | |||
720 | be BASED(0f) | 713 | be BASED(0f) |
721 | l %r15,__LC_PANIC_STACK # load panic stack | 714 | l %r15,__LC_PANIC_STACK # load panic stack |
722 | 0: CREATE_STACK_FRAME __LC_MCK_OLD_PSW,__LC_SAVE_AREA+32 | 715 | 0: CREATE_STACK_FRAME __LC_MCK_OLD_PSW,__LC_SAVE_AREA+32 |
716 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
717 | tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | ||
718 | bno BASED(mcck_no_vtime) # no -> skip cleanup critical | ||
719 | tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? | ||
720 | bz BASED(mcck_no_vtime) | ||
721 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER | ||
722 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | ||
723 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER | ||
724 | mcck_no_vtime: | ||
725 | #endif | ||
723 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 726 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
724 | la %r2,SP_PTREGS(%r15) # load pt_regs | 727 | la %r2,SP_PTREGS(%r15) # load pt_regs |
725 | l %r1,BASED(.Ls390_mcck) | 728 | l %r1,BASED(.Ls390_mcck) |
@@ -737,7 +740,7 @@ mcck_int_main: | |||
737 | l %r1,BASED(.Ls390_handle_mcck) | 740 | l %r1,BASED(.Ls390_handle_mcck) |
738 | basr %r14,%r1 # call machine check handler | 741 | basr %r14,%r1 # call machine check handler |
739 | mcck_return: | 742 | mcck_return: |
740 | RESTORE_ALL 0 | 743 | RESTORE_ALL __LC_RETURN_MCCK_PSW,0 |
741 | 744 | ||
742 | #ifdef CONFIG_SMP | 745 | #ifdef CONFIG_SMP |
743 | /* | 746 | /* |
@@ -803,6 +806,10 @@ cleanup_table_sysc_leave: | |||
803 | .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 | 806 | .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 |
804 | cleanup_table_sysc_work_loop: | 807 | cleanup_table_sysc_work_loop: |
805 | .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 | 808 | .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 |
809 | cleanup_table_io_leave: | ||
810 | .long io_leave + 0x80000000, io_done + 0x80000000 | ||
811 | cleanup_table_io_work_loop: | ||
812 | .long io_work_loop + 0x80000000, io_mcck_pending + 0x80000000 | ||
806 | 813 | ||
807 | cleanup_critical: | 814 | cleanup_critical: |
808 | clc 4(4,%r12),BASED(cleanup_table_system_call) | 815 | clc 4(4,%r12),BASED(cleanup_table_system_call) |
@@ -825,10 +832,26 @@ cleanup_critical: | |||
825 | clc 4(4,%r12),BASED(cleanup_table_sysc_work_loop+4) | 832 | clc 4(4,%r12),BASED(cleanup_table_sysc_work_loop+4) |
826 | bl BASED(cleanup_sysc_return) | 833 | bl BASED(cleanup_sysc_return) |
827 | 0: | 834 | 0: |
835 | clc 4(4,%r12),BASED(cleanup_table_io_leave) | ||
836 | bl BASED(0f) | ||
837 | clc 4(4,%r12),BASED(cleanup_table_io_leave+4) | ||
838 | bl BASED(cleanup_io_leave) | ||
839 | 0: | ||
840 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop) | ||
841 | bl BASED(0f) | ||
842 | clc 4(4,%r12),BASED(cleanup_table_io_work_loop+4) | ||
843 | bl BASED(cleanup_io_return) | ||
844 | 0: | ||
828 | br %r14 | 845 | br %r14 |
829 | 846 | ||
830 | cleanup_system_call: | 847 | cleanup_system_call: |
831 | mvc __LC_RETURN_PSW(8),0(%r12) | 848 | mvc __LC_RETURN_PSW(8),0(%r12) |
849 | c %r12,BASED(.Lmck_old_psw) | ||
850 | be BASED(0f) | ||
851 | la %r12,__LC_SAVE_AREA+16 | ||
852 | b BASED(1f) | ||
853 | 0: la %r12,__LC_SAVE_AREA+32 | ||
854 | 1: | ||
832 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 855 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
833 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+4) | 856 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+4) |
834 | bh BASED(0f) | 857 | bh BASED(0f) |
@@ -838,11 +861,13 @@ cleanup_system_call: | |||
838 | #endif | 861 | #endif |
839 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn) | 862 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn) |
840 | bh BASED(0f) | 863 | bh BASED(0f) |
841 | mvc __LC_SAVE_AREA(16),__LC_SAVE_AREA+16 | 864 | mvc __LC_SAVE_AREA(16),0(%r12) |
842 | 0: st %r13,__LC_SAVE_AREA+20 | 865 | 0: st %r13,4(%r12) |
866 | st %r12,__LC_SAVE_AREA+48 # argh | ||
843 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 867 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 |
844 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 868 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
845 | st %r15,__LC_SAVE_AREA+28 | 869 | l %r12,__LC_SAVE_AREA+48 # argh |
870 | st %r15,12(%r12) | ||
846 | lh %r7,0x8a | 871 | lh %r7,0x8a |
847 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 872 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
848 | cleanup_vtime: | 873 | cleanup_vtime: |
@@ -879,17 +904,21 @@ cleanup_sysc_return: | |||
879 | 904 | ||
880 | cleanup_sysc_leave: | 905 | cleanup_sysc_leave: |
881 | clc 4(4,%r12),BASED(cleanup_sysc_leave_insn) | 906 | clc 4(4,%r12),BASED(cleanup_sysc_leave_insn) |
882 | be BASED(0f) | 907 | be BASED(2f) |
883 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 908 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
884 | mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER | 909 | mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER |
885 | clc 4(4,%r12),BASED(cleanup_sysc_leave_insn+4) | 910 | clc 4(4,%r12),BASED(cleanup_sysc_leave_insn+4) |
886 | be BASED(0f) | 911 | be BASED(2f) |
887 | #endif | 912 | #endif |
888 | mvc __LC_RETURN_PSW(8),SP_PSW(%r15) | 913 | mvc __LC_RETURN_PSW(8),SP_PSW(%r15) |
889 | mvc __LC_SAVE_AREA+16(16),SP_R12(%r15) | 914 | c %r12,BASED(.Lmck_old_psw) |
890 | lm %r0,%r11,SP_R0(%r15) | 915 | bne BASED(0f) |
916 | mvc __LC_SAVE_AREA+32(16),SP_R12(%r15) | ||
917 | b BASED(1f) | ||
918 | 0: mvc __LC_SAVE_AREA+16(16),SP_R12(%r15) | ||
919 | 1: lm %r0,%r11,SP_R0(%r15) | ||
891 | l %r15,SP_R15(%r15) | 920 | l %r15,SP_R15(%r15) |
892 | 0: la %r12,__LC_RETURN_PSW | 921 | 2: la %r12,__LC_RETURN_PSW |
893 | br %r14 | 922 | br %r14 |
894 | cleanup_sysc_leave_insn: | 923 | cleanup_sysc_leave_insn: |
895 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 924 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
@@ -897,6 +926,36 @@ cleanup_sysc_leave_insn: | |||
897 | #endif | 926 | #endif |
898 | .long sysc_leave + 10 + 0x80000000 | 927 | .long sysc_leave + 10 + 0x80000000 |
899 | 928 | ||
929 | cleanup_io_return: | ||
930 | mvc __LC_RETURN_PSW(4),0(%r12) | ||
931 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_io_work_loop) | ||
932 | la %r12,__LC_RETURN_PSW | ||
933 | br %r14 | ||
934 | |||
935 | cleanup_io_leave: | ||
936 | clc 4(4,%r12),BASED(cleanup_io_leave_insn) | ||
937 | be BASED(2f) | ||
938 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
939 | mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER | ||
940 | clc 4(4,%r12),BASED(cleanup_io_leave_insn+4) | ||
941 | be BASED(2f) | ||
942 | #endif | ||
943 | mvc __LC_RETURN_PSW(8),SP_PSW(%r15) | ||
944 | c %r12,BASED(.Lmck_old_psw) | ||
945 | bne BASED(0f) | ||
946 | mvc __LC_SAVE_AREA+32(16),SP_R12(%r15) | ||
947 | b BASED(1f) | ||
948 | 0: mvc __LC_SAVE_AREA+16(16),SP_R12(%r15) | ||
949 | 1: lm %r0,%r11,SP_R0(%r15) | ||
950 | l %r15,SP_R15(%r15) | ||
951 | 2: la %r12,__LC_RETURN_PSW | ||
952 | br %r14 | ||
953 | cleanup_io_leave_insn: | ||
954 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
955 | .long io_leave + 18 + 0x80000000 | ||
956 | #endif | ||
957 | .long io_leave + 14 + 0x80000000 | ||
958 | |||
900 | /* | 959 | /* |
901 | * Integer constants | 960 | * Integer constants |
902 | */ | 961 | */ |
@@ -918,6 +977,7 @@ cleanup_sysc_leave_insn: | |||
918 | .Ls390_mcck: .long s390_do_machine_check | 977 | .Ls390_mcck: .long s390_do_machine_check |
919 | .Ls390_handle_mcck: | 978 | .Ls390_handle_mcck: |
920 | .long s390_handle_mcck | 979 | .long s390_handle_mcck |
980 | .Lmck_old_psw: .long __LC_MCK_OLD_PSW | ||
921 | .Ldo_IRQ: .long do_IRQ | 981 | .Ldo_IRQ: .long do_IRQ |
922 | .Ldo_extint: .long do_extint | 982 | .Ldo_extint: .long do_extint |
923 | .Ldo_signal: .long do_signal | 983 | .Ldo_signal: .long do_signal |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index d9f22915008c..fb77b72ab262 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -131,14 +131,14 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_NEED_RESCHED | _TIF_MCCK_PENDING) | |||
131 | stg %r12,__SF_BACKCHAIN(%r15) | 131 | stg %r12,__SF_BACKCHAIN(%r15) |
132 | .endm | 132 | .endm |
133 | 133 | ||
134 | .macro RESTORE_ALL sync | 134 | .macro RESTORE_ALL psworg,sync |
135 | mvc __LC_RETURN_PSW(16),SP_PSW(%r15) # move user PSW to lowcore | 135 | mvc \psworg(16),SP_PSW(%r15) # move user PSW to lowcore |
136 | .if !\sync | 136 | .if !\sync |
137 | ni __LC_RETURN_PSW+1,0xfd # clear wait state bit | 137 | ni \psworg+1,0xfd # clear wait state bit |
138 | .endif | 138 | .endif |
139 | lmg %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user | 139 | lmg %r0,%r15,SP_R0(%r15) # load gprs 0-15 of user |
140 | STORE_TIMER __LC_EXIT_TIMER | 140 | STORE_TIMER __LC_EXIT_TIMER |
141 | lpswe __LC_RETURN_PSW # back to caller | 141 | lpswe \psworg # back to caller |
142 | .endm | 142 | .endm |
143 | 143 | ||
144 | /* | 144 | /* |
@@ -214,8 +214,8 @@ sysc_nr_ok: | |||
214 | sysc_do_restart: | 214 | sysc_do_restart: |
215 | larl %r10,sys_call_table | 215 | larl %r10,sys_call_table |
216 | #ifdef CONFIG_S390_SUPPORT | 216 | #ifdef CONFIG_S390_SUPPORT |
217 | tm SP_PSW+3(%r15),0x01 # are we running in 31 bit mode ? | 217 | tm __TI_flags+5(%r9),(_TIF_31BIT>>16) # running in 31 bit mode ? |
218 | jo sysc_noemu | 218 | jno sysc_noemu |
219 | larl %r10,sys_call_table_emu # use 31 bit emulation system calls | 219 | larl %r10,sys_call_table_emu # use 31 bit emulation system calls |
220 | sysc_noemu: | 220 | sysc_noemu: |
221 | #endif | 221 | #endif |
@@ -233,7 +233,7 @@ sysc_return: | |||
233 | tm __TI_flags+7(%r9),_TIF_WORK_SVC | 233 | tm __TI_flags+7(%r9),_TIF_WORK_SVC |
234 | jnz sysc_work # there is work to do (signals etc.) | 234 | jnz sysc_work # there is work to do (signals etc.) |
235 | sysc_leave: | 235 | sysc_leave: |
236 | RESTORE_ALL 1 | 236 | RESTORE_ALL __LC_RETURN_PSW,1 |
237 | 237 | ||
238 | # | 238 | # |
239 | # recheck if there is more work to do | 239 | # recheck if there is more work to do |
@@ -308,8 +308,6 @@ sysc_singlestep: | |||
308 | jg do_single_step # branch to do_sigtrap | 308 | jg do_single_step # branch to do_sigtrap |
309 | 309 | ||
310 | 310 | ||
311 | __critical_end: | ||
312 | |||
313 | # | 311 | # |
314 | # call syscall_trace before and after system call | 312 | # call syscall_trace before and after system call |
315 | # special linkage: %r12 contains the return address for trace_svc | 313 | # special linkage: %r12 contains the return address for trace_svc |
@@ -612,7 +610,8 @@ io_return: | |||
612 | tm __TI_flags+7(%r9),_TIF_WORK_INT | 610 | tm __TI_flags+7(%r9),_TIF_WORK_INT |
613 | jnz io_work # there is work to do (signals etc.) | 611 | jnz io_work # there is work to do (signals etc.) |
614 | io_leave: | 612 | io_leave: |
615 | RESTORE_ALL 0 | 613 | RESTORE_ALL __LC_RETURN_PSW,0 |
614 | io_done: | ||
616 | 615 | ||
617 | #ifdef CONFIG_PREEMPT | 616 | #ifdef CONFIG_PREEMPT |
618 | io_preempt: | 617 | io_preempt: |
@@ -711,6 +710,8 @@ ext_no_vtime: | |||
711 | brasl %r14,do_extint | 710 | brasl %r14,do_extint |
712 | j io_return | 711 | j io_return |
713 | 712 | ||
713 | __critical_end: | ||
714 | |||
714 | /* | 715 | /* |
715 | * Machine check handler routines | 716 | * Machine check handler routines |
716 | */ | 717 | */ |
@@ -718,6 +719,7 @@ ext_no_vtime: | |||
718 | mcck_int_handler: | 719 | mcck_int_handler: |
719 | la %r1,4095 # revalidate r1 | 720 | la %r1,4095 # revalidate r1 |
720 | spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer | 721 | spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer |
722 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA-4095(%r1) | ||
721 | lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs | 723 | lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs |
722 | SAVE_ALL_BASE __LC_SAVE_AREA+64 | 724 | SAVE_ALL_BASE __LC_SAVE_AREA+64 |
723 | la %r12,__LC_MCK_OLD_PSW | 725 | la %r12,__LC_MCK_OLD_PSW |
@@ -730,17 +732,8 @@ mcck_int_handler: | |||
730 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 732 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER |
731 | mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 733 | mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER |
732 | mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER | 734 | mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER |
733 | 0: tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | ||
734 | jno mcck_no_vtime # no -> no timer update | ||
735 | tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? | ||
736 | jz mcck_no_vtime | ||
737 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER | ||
738 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | ||
739 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER | ||
740 | mcck_no_vtime: | ||
741 | #endif | 735 | #endif |
742 | 0: | 736 | 0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? |
743 | tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? | ||
744 | jno mcck_int_main # no -> skip cleanup critical | 737 | jno mcck_int_main # no -> skip cleanup critical |
745 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit | 738 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit |
746 | jnz mcck_int_main # from user -> load kernel stack | 739 | jnz mcck_int_main # from user -> load kernel stack |
@@ -756,6 +749,16 @@ mcck_int_main: | |||
756 | jz 0f | 749 | jz 0f |
757 | lg %r15,__LC_PANIC_STACK # load panic stack | 750 | lg %r15,__LC_PANIC_STACK # load panic stack |
758 | 0: CREATE_STACK_FRAME __LC_MCK_OLD_PSW,__LC_SAVE_AREA+64 | 751 | 0: CREATE_STACK_FRAME __LC_MCK_OLD_PSW,__LC_SAVE_AREA+64 |
752 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
753 | tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | ||
754 | jno mcck_no_vtime # no -> no timer update | ||
755 | tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? | ||
756 | jz mcck_no_vtime | ||
757 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER | ||
758 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | ||
759 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_ASYNC_ENTER_TIMER | ||
760 | mcck_no_vtime: | ||
761 | #endif | ||
759 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 762 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
760 | la %r2,SP_PTREGS(%r15) # load pt_regs | 763 | la %r2,SP_PTREGS(%r15) # load pt_regs |
761 | brasl %r14,s390_do_machine_check | 764 | brasl %r14,s390_do_machine_check |
@@ -771,7 +774,7 @@ mcck_int_main: | |||
771 | jno mcck_return | 774 | jno mcck_return |
772 | brasl %r14,s390_handle_mcck | 775 | brasl %r14,s390_handle_mcck |
773 | mcck_return: | 776 | mcck_return: |
774 | RESTORE_ALL 0 | 777 | RESTORE_ALL __LC_RETURN_MCCK_PSW,0 |
775 | 778 | ||
776 | #ifdef CONFIG_SMP | 779 | #ifdef CONFIG_SMP |
777 | /* | 780 | /* |
@@ -833,6 +836,10 @@ cleanup_table_sysc_leave: | |||
833 | .quad sysc_leave, sysc_work_loop | 836 | .quad sysc_leave, sysc_work_loop |
834 | cleanup_table_sysc_work_loop: | 837 | cleanup_table_sysc_work_loop: |
835 | .quad sysc_work_loop, sysc_reschedule | 838 | .quad sysc_work_loop, sysc_reschedule |
839 | cleanup_table_io_leave: | ||
840 | .quad io_leave, io_done | ||
841 | cleanup_table_io_work_loop: | ||
842 | .quad io_work_loop, io_mcck_pending | ||
836 | 843 | ||
837 | cleanup_critical: | 844 | cleanup_critical: |
838 | clc 8(8,%r12),BASED(cleanup_table_system_call) | 845 | clc 8(8,%r12),BASED(cleanup_table_system_call) |
@@ -855,10 +862,26 @@ cleanup_critical: | |||
855 | clc 8(8,%r12),BASED(cleanup_table_sysc_work_loop+8) | 862 | clc 8(8,%r12),BASED(cleanup_table_sysc_work_loop+8) |
856 | jl cleanup_sysc_return | 863 | jl cleanup_sysc_return |
857 | 0: | 864 | 0: |
865 | clc 8(8,%r12),BASED(cleanup_table_io_leave) | ||
866 | jl 0f | ||
867 | clc 8(8,%r12),BASED(cleanup_table_io_leave+8) | ||
868 | jl cleanup_io_leave | ||
869 | 0: | ||
870 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop) | ||
871 | jl 0f | ||
872 | clc 8(8,%r12),BASED(cleanup_table_io_work_loop+8) | ||
873 | jl cleanup_io_return | ||
874 | 0: | ||
858 | br %r14 | 875 | br %r14 |
859 | 876 | ||
860 | cleanup_system_call: | 877 | cleanup_system_call: |
861 | mvc __LC_RETURN_PSW(16),0(%r12) | 878 | mvc __LC_RETURN_PSW(16),0(%r12) |
879 | cghi %r12,__LC_MCK_OLD_PSW | ||
880 | je 0f | ||
881 | la %r12,__LC_SAVE_AREA+32 | ||
882 | j 1f | ||
883 | 0: la %r12,__LC_SAVE_AREA+64 | ||
884 | 1: | ||
862 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 885 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
863 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+8) | 886 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+8) |
864 | jh 0f | 887 | jh 0f |
@@ -868,11 +891,13 @@ cleanup_system_call: | |||
868 | #endif | 891 | #endif |
869 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn) | 892 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn) |
870 | jh 0f | 893 | jh 0f |
871 | mvc __LC_SAVE_AREA(32),__LC_SAVE_AREA+32 | 894 | mvc __LC_SAVE_AREA(32),0(%r12) |
872 | 0: stg %r13,__LC_SAVE_AREA+40 | 895 | 0: stg %r13,8(%r12) |
896 | stg %r12,__LC_SAVE_AREA+96 # argh | ||
873 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 897 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 |
874 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 898 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
875 | stg %r15,__LC_SAVE_AREA+56 | 899 | lg %r12,__LC_SAVE_AREA+96 # argh |
900 | stg %r15,24(%r12) | ||
876 | llgh %r7,__LC_SVC_INT_CODE | 901 | llgh %r7,__LC_SVC_INT_CODE |
877 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 902 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
878 | cleanup_vtime: | 903 | cleanup_vtime: |
@@ -909,17 +934,21 @@ cleanup_sysc_return: | |||
909 | 934 | ||
910 | cleanup_sysc_leave: | 935 | cleanup_sysc_leave: |
911 | clc 8(8,%r12),BASED(cleanup_sysc_leave_insn) | 936 | clc 8(8,%r12),BASED(cleanup_sysc_leave_insn) |
912 | je 0f | 937 | je 2f |
913 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 938 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
914 | mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER | 939 | mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER |
915 | clc 8(8,%r12),BASED(cleanup_sysc_leave_insn+8) | 940 | clc 8(8,%r12),BASED(cleanup_sysc_leave_insn+8) |
916 | je 0f | 941 | je 2f |
917 | #endif | 942 | #endif |
918 | mvc __LC_RETURN_PSW(16),SP_PSW(%r15) | 943 | mvc __LC_RETURN_PSW(16),SP_PSW(%r15) |
919 | mvc __LC_SAVE_AREA+32(32),SP_R12(%r15) | 944 | cghi %r12,__LC_MCK_OLD_PSW |
920 | lmg %r0,%r11,SP_R0(%r15) | 945 | jne 0f |
946 | mvc __LC_SAVE_AREA+64(32),SP_R12(%r15) | ||
947 | j 1f | ||
948 | 0: mvc __LC_SAVE_AREA+32(32),SP_R12(%r15) | ||
949 | 1: lmg %r0,%r11,SP_R0(%r15) | ||
921 | lg %r15,SP_R15(%r15) | 950 | lg %r15,SP_R15(%r15) |
922 | 0: la %r12,__LC_RETURN_PSW | 951 | 2: la %r12,__LC_RETURN_PSW |
923 | br %r14 | 952 | br %r14 |
924 | cleanup_sysc_leave_insn: | 953 | cleanup_sysc_leave_insn: |
925 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 954 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
@@ -927,6 +956,36 @@ cleanup_sysc_leave_insn: | |||
927 | #endif | 956 | #endif |
928 | .quad sysc_leave + 12 | 957 | .quad sysc_leave + 12 |
929 | 958 | ||
959 | cleanup_io_return: | ||
960 | mvc __LC_RETURN_PSW(8),0(%r12) | ||
961 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_io_work_loop) | ||
962 | la %r12,__LC_RETURN_PSW | ||
963 | br %r14 | ||
964 | |||
965 | cleanup_io_leave: | ||
966 | clc 8(8,%r12),BASED(cleanup_io_leave_insn) | ||
967 | je 2f | ||
968 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
969 | mvc __LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER | ||
970 | clc 8(8,%r12),BASED(cleanup_io_leave_insn+8) | ||
971 | je 2f | ||
972 | #endif | ||
973 | mvc __LC_RETURN_PSW(16),SP_PSW(%r15) | ||
974 | cghi %r12,__LC_MCK_OLD_PSW | ||
975 | jne 0f | ||
976 | mvc __LC_SAVE_AREA+64(32),SP_R12(%r15) | ||
977 | j 1f | ||
978 | 0: mvc __LC_SAVE_AREA+32(32),SP_R12(%r15) | ||
979 | 1: lmg %r0,%r11,SP_R0(%r15) | ||
980 | lg %r15,SP_R15(%r15) | ||
981 | 2: la %r12,__LC_RETURN_PSW | ||
982 | br %r14 | ||
983 | cleanup_io_leave_insn: | ||
984 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
985 | .quad io_leave + 20 | ||
986 | #endif | ||
987 | .quad io_leave + 16 | ||
988 | |||
930 | /* | 989 | /* |
931 | * Integer constants | 990 | * Integer constants |
932 | */ | 991 | */ |
diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c index 75fde949d125..856a971759b1 100644 --- a/arch/s390/mm/fault.c +++ b/arch/s390/mm/fault.c | |||
@@ -563,12 +563,14 @@ pfault_interrupt(struct pt_regs *regs, __u16 error_code) | |||
563 | * interrupt. pfault_wait is valid. Set pfault_wait | 563 | * interrupt. pfault_wait is valid. Set pfault_wait |
564 | * back to zero and wake up the process. This can | 564 | * back to zero and wake up the process. This can |
565 | * safely be done because the task is still sleeping | 565 | * safely be done because the task is still sleeping |
566 | * and can't procude new pfaults. */ | 566 | * and can't produce new pfaults. */ |
567 | tsk->thread.pfault_wait = 0; | 567 | tsk->thread.pfault_wait = 0; |
568 | wake_up_process(tsk); | 568 | wake_up_process(tsk); |
569 | put_task_struct(tsk); | ||
569 | } | 570 | } |
570 | } else { | 571 | } else { |
571 | /* signal bit not set -> a real page is missing. */ | 572 | /* signal bit not set -> a real page is missing. */ |
573 | get_task_struct(tsk); | ||
572 | set_task_state(tsk, TASK_UNINTERRUPTIBLE); | 574 | set_task_state(tsk, TASK_UNINTERRUPTIBLE); |
573 | if (xchg(&tsk->thread.pfault_wait, 1) != 0) { | 575 | if (xchg(&tsk->thread.pfault_wait, 1) != 0) { |
574 | /* Completion interrupt was faster than the initial | 576 | /* Completion interrupt was faster than the initial |
@@ -578,6 +580,7 @@ pfault_interrupt(struct pt_regs *regs, __u16 error_code) | |||
578 | * mode and can't produce new pfaults. */ | 580 | * mode and can't produce new pfaults. */ |
579 | tsk->thread.pfault_wait = 0; | 581 | tsk->thread.pfault_wait = 0; |
580 | set_task_state(tsk, TASK_RUNNING); | 582 | set_task_state(tsk, TASK_RUNNING); |
583 | put_task_struct(tsk); | ||
581 | } else | 584 | } else |
582 | set_tsk_need_resched(tsk); | 585 | set_tsk_need_resched(tsk); |
583 | } | 586 | } |
diff --git a/arch/sh64/Kconfig b/arch/sh64/Kconfig index 4c3e5334adb3..fb35b45dc130 100644 --- a/arch/sh64/Kconfig +++ b/arch/sh64/Kconfig | |||
@@ -29,10 +29,6 @@ config GENERIC_CALIBRATE_DELAY | |||
29 | bool | 29 | bool |
30 | default y | 30 | default y |
31 | 31 | ||
32 | config LOG_BUF_SHIFT | ||
33 | int | ||
34 | default 14 | ||
35 | |||
36 | config RWSEM_XCHGADD_ALGORITHM | 32 | config RWSEM_XCHGADD_ALGORITHM |
37 | bool | 33 | bool |
38 | 34 | ||
diff --git a/arch/sparc/kernel/sparc_ksyms.c b/arch/sparc/kernel/sparc_ksyms.c index 8faa8dc4de43..5d974a2b735a 100644 --- a/arch/sparc/kernel/sparc_ksyms.c +++ b/arch/sparc/kernel/sparc_ksyms.c | |||
@@ -175,7 +175,6 @@ EXPORT_SYMBOL(set_auxio); | |||
175 | EXPORT_SYMBOL(get_auxio); | 175 | EXPORT_SYMBOL(get_auxio); |
176 | #endif | 176 | #endif |
177 | EXPORT_SYMBOL(request_fast_irq); | 177 | EXPORT_SYMBOL(request_fast_irq); |
178 | EXPORT_SYMBOL(io_remap_page_range); | ||
179 | EXPORT_SYMBOL(io_remap_pfn_range); | 178 | EXPORT_SYMBOL(io_remap_pfn_range); |
180 | /* P3: iounit_xxx may be needed, sun4d users */ | 179 | /* P3: iounit_xxx may be needed, sun4d users */ |
181 | /* EXPORT_SYMBOL(iounit_map_dma_init); */ | 180 | /* EXPORT_SYMBOL(iounit_map_dma_init); */ |
diff --git a/arch/sparc/mm/generic.c b/arch/sparc/mm/generic.c index db27eee3bda1..20ccb957fb77 100644 --- a/arch/sparc/mm/generic.c +++ b/arch/sparc/mm/generic.c | |||
@@ -16,31 +16,6 @@ | |||
16 | #include <asm/cacheflush.h> | 16 | #include <asm/cacheflush.h> |
17 | #include <asm/tlbflush.h> | 17 | #include <asm/tlbflush.h> |
18 | 18 | ||
19 | static inline void forget_pte(pte_t page) | ||
20 | { | ||
21 | #if 0 /* old 2.4 code */ | ||
22 | if (pte_none(page)) | ||
23 | return; | ||
24 | if (pte_present(page)) { | ||
25 | unsigned long pfn = pte_pfn(page); | ||
26 | struct page *ptpage; | ||
27 | if (!pfn_valid(pfn)) | ||
28 | return; | ||
29 | ptpage = pfn_to_page(pfn); | ||
30 | if (PageReserved(ptpage)) | ||
31 | return; | ||
32 | page_cache_release(ptpage); | ||
33 | return; | ||
34 | } | ||
35 | swap_free(pte_to_swp_entry(page)); | ||
36 | #else | ||
37 | if (!pte_none(page)) { | ||
38 | printk("forget_pte: old mapping existed!\n"); | ||
39 | BUG(); | ||
40 | } | ||
41 | #endif | ||
42 | } | ||
43 | |||
44 | /* Remap IO memory, the same way as remap_pfn_range(), but use | 19 | /* Remap IO memory, the same way as remap_pfn_range(), but use |
45 | * the obio memory space. | 20 | * the obio memory space. |
46 | * | 21 | * |
@@ -60,7 +35,6 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigne | |||
60 | pte_t oldpage = *pte; | 35 | pte_t oldpage = *pte; |
61 | pte_clear(mm, address, pte); | 36 | pte_clear(mm, address, pte); |
62 | set_pte(pte, mk_pte_io(offset, prot, space)); | 37 | set_pte(pte, mk_pte_io(offset, prot, space)); |
63 | forget_pte(oldpage); | ||
64 | address += PAGE_SIZE; | 38 | address += PAGE_SIZE; |
65 | offset += PAGE_SIZE; | 39 | offset += PAGE_SIZE; |
66 | pte++; | 40 | pte++; |
@@ -88,37 +62,6 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned | |||
88 | return 0; | 62 | return 0; |
89 | } | 63 | } |
90 | 64 | ||
91 | int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space) | ||
92 | { | ||
93 | int error = 0; | ||
94 | pgd_t * dir; | ||
95 | unsigned long beg = from; | ||
96 | unsigned long end = from + size; | ||
97 | struct mm_struct *mm = vma->vm_mm; | ||
98 | |||
99 | prot = __pgprot(pg_iobits); | ||
100 | offset -= from; | ||
101 | dir = pgd_offset(mm, from); | ||
102 | flush_cache_range(vma, beg, end); | ||
103 | |||
104 | spin_lock(&mm->page_table_lock); | ||
105 | while (from < end) { | ||
106 | pmd_t *pmd = pmd_alloc(current->mm, dir, from); | ||
107 | error = -ENOMEM; | ||
108 | if (!pmd) | ||
109 | break; | ||
110 | error = io_remap_pmd_range(mm, pmd, from, end - from, offset + from, prot, space); | ||
111 | if (error) | ||
112 | break; | ||
113 | from = (from + PGDIR_SIZE) & PGDIR_MASK; | ||
114 | dir++; | ||
115 | } | ||
116 | spin_unlock(&mm->page_table_lock); | ||
117 | |||
118 | flush_tlb_range(vma, beg, end); | ||
119 | return error; | ||
120 | } | ||
121 | |||
122 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 65 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
123 | unsigned long pfn, unsigned long size, pgprot_t prot) | 66 | unsigned long pfn, unsigned long size, pgprot_t prot) |
124 | { | 67 | { |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index 9afd28e2c4d5..17846f4ba9b6 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -5,6 +5,16 @@ | |||
5 | 5 | ||
6 | mainmenu "Linux/UltraSPARC Kernel Configuration" | 6 | mainmenu "Linux/UltraSPARC Kernel Configuration" |
7 | 7 | ||
8 | config SPARC64 | ||
9 | bool | ||
10 | default y | ||
11 | help | ||
12 | SPARC is a family of RISC microprocessors designed and marketed by | ||
13 | Sun Microsystems, incorporated. This port covers the newer 64-bit | ||
14 | UltraSPARC. The UltraLinux project maintains both the SPARC32 and | ||
15 | SPARC64 ports; its web page is available at | ||
16 | <http://www.ultralinux.org/>. | ||
17 | |||
8 | config 64BIT | 18 | config 64BIT |
9 | def_bool y | 19 | def_bool y |
10 | 20 | ||
@@ -71,75 +81,6 @@ config SYSVIPC_COMPAT | |||
71 | 81 | ||
72 | menu "General machine setup" | 82 | menu "General machine setup" |
73 | 83 | ||
74 | config BBC_I2C | ||
75 | tristate "UltraSPARC-III bootbus i2c controller driver" | ||
76 | depends on PCI | ||
77 | help | ||
78 | The BBC devices on the UltraSPARC III have two I2C controllers. The | ||
79 | first I2C controller connects mainly to configuration PROMs (NVRAM, | ||
80 | CPU configuration, DIMM types, etc.). The second I2C controller | ||
81 | connects to environmental control devices such as fans and | ||
82 | temperature sensors. The second controller also connects to the | ||
83 | smartcard reader, if present. Say Y to enable support for these. | ||
84 | |||
85 | config VT | ||
86 | bool "Virtual terminal" if EMBEDDED | ||
87 | select INPUT | ||
88 | default y | ||
89 | ---help--- | ||
90 | If you say Y here, you will get support for terminal devices with | ||
91 | display and keyboard devices. These are called "virtual" because you | ||
92 | can run several virtual terminals (also called virtual consoles) on | ||
93 | one physical terminal. This is rather useful, for example one | ||
94 | virtual terminal can collect system messages and warnings, another | ||
95 | one can be used for a text-mode user session, and a third could run | ||
96 | an X session, all in parallel. Switching between virtual terminals | ||
97 | is done with certain key combinations, usually Alt-<function key>. | ||
98 | |||
99 | The setterm command ("man setterm") can be used to change the | ||
100 | properties (such as colors or beeping) of a virtual terminal. The | ||
101 | man page console_codes(4) ("man console_codes") contains the special | ||
102 | character sequences that can be used to change those properties | ||
103 | directly. The fonts used on virtual terminals can be changed with | ||
104 | the setfont ("man setfont") command and the key bindings are defined | ||
105 | with the loadkeys ("man loadkeys") command. | ||
106 | |||
107 | You need at least one virtual terminal device in order to make use | ||
108 | of your keyboard and monitor. Therefore, only people configuring an | ||
109 | embedded system would want to say N here in order to save some | ||
110 | memory; the only way to log into such a system is then via a serial | ||
111 | or network connection. | ||
112 | |||
113 | If unsure, say Y, or else you won't be able to do much with your new | ||
114 | shiny Linux system :-) | ||
115 | |||
116 | config VT_CONSOLE | ||
117 | bool "Support for console on virtual terminal" if EMBEDDED | ||
118 | depends on VT | ||
119 | default y | ||
120 | ---help--- | ||
121 | The system console is the device which receives all kernel messages | ||
122 | and warnings and which allows logins in single user mode. If you | ||
123 | answer Y here, a virtual terminal (the device used to interact with | ||
124 | a physical terminal) can be used as system console. This is the most | ||
125 | common mode of operations, so you should say Y here unless you want | ||
126 | the kernel messages be output only to a serial port (in which case | ||
127 | you should say Y to "Console on serial port", below). | ||
128 | |||
129 | If you do say Y here, by default the currently visible virtual | ||
130 | terminal (/dev/tty0) will be used as system console. You can change | ||
131 | that with a kernel command line option such as "console=tty3" which | ||
132 | would use the third virtual terminal as system console. (Try "man | ||
133 | bootparam" or see the documentation of your boot loader (lilo or | ||
134 | loadlin) about how to pass options to the kernel at boot time.) | ||
135 | |||
136 | If unsure, say Y. | ||
137 | |||
138 | config HW_CONSOLE | ||
139 | bool | ||
140 | depends on VT | ||
141 | default y | ||
142 | |||
143 | config SMP | 84 | config SMP |
144 | bool "Symmetric multi-processing support" | 85 | bool "Symmetric multi-processing support" |
145 | ---help--- | 86 | ---help--- |
@@ -205,17 +146,6 @@ config US2E_FREQ | |||
205 | 146 | ||
206 | If in doubt, say N. | 147 | If in doubt, say N. |
207 | 148 | ||
208 | # Identify this as a Sparc64 build | ||
209 | config SPARC64 | ||
210 | bool | ||
211 | default y | ||
212 | help | ||
213 | SPARC is a family of RISC microprocessors designed and marketed by | ||
214 | Sun Microsystems, incorporated. This port covers the newer 64-bit | ||
215 | UltraSPARC. The UltraLinux project maintains both the SPARC32 and | ||
216 | SPARC64 ports; its web page is available at | ||
217 | <http://www.ultralinux.org/>. | ||
218 | |||
219 | # Global things across all Sun machines. | 149 | # Global things across all Sun machines. |
220 | config RWSEM_GENERIC_SPINLOCK | 150 | config RWSEM_GENERIC_SPINLOCK |
221 | bool | 151 | bool |
@@ -246,6 +176,12 @@ config HUGETLB_PAGE_SIZE_64K | |||
246 | 176 | ||
247 | endchoice | 177 | endchoice |
248 | 178 | ||
179 | endmenu | ||
180 | |||
181 | source "drivers/firmware/Kconfig" | ||
182 | |||
183 | source "mm/Kconfig" | ||
184 | |||
249 | config GENERIC_ISA_DMA | 185 | config GENERIC_ISA_DMA |
250 | bool | 186 | bool |
251 | default y | 187 | default y |
@@ -344,33 +280,6 @@ config PCI_DOMAINS | |||
344 | bool | 280 | bool |
345 | default PCI | 281 | default PCI |
346 | 282 | ||
347 | config RTC | ||
348 | tristate | ||
349 | depends on PCI | ||
350 | default y | ||
351 | ---help--- | ||
352 | If you say Y here and create a character special file /dev/rtc with | ||
353 | major number 10 and minor number 135 using mknod ("man mknod"), you | ||
354 | will get access to the real time clock (or hardware clock) built | ||
355 | into your computer. | ||
356 | |||
357 | Every PC has such a clock built in. It can be used to generate | ||
358 | signals from as low as 1Hz up to 8192Hz, and can also be used | ||
359 | as a 24 hour alarm. It reports status information via the file | ||
360 | /proc/driver/rtc and its behaviour is set by various ioctls on | ||
361 | /dev/rtc. | ||
362 | |||
363 | If you run Linux on a multiprocessor machine and said Y to | ||
364 | "Symmetric Multi Processing" above, you should say Y here to read | ||
365 | and set the RTC in an SMP compatible fashion. | ||
366 | |||
367 | If you think you have a use for such a device (such as periodic data | ||
368 | sampling), then say Y here, and read <file:Documentation/rtc.txt> | ||
369 | for details. | ||
370 | |||
371 | To compile this driver as a module, choose M here: the | ||
372 | module will be called rtc. | ||
373 | |||
374 | source "drivers/pci/Kconfig" | 283 | source "drivers/pci/Kconfig" |
375 | 284 | ||
376 | config SUN_OPENPROMFS | 285 | config SUN_OPENPROMFS |
@@ -414,6 +323,8 @@ config BINFMT_AOUT32 | |||
414 | If you want to run SunOS binaries (see SunOS binary emulation below) | 323 | If you want to run SunOS binaries (see SunOS binary emulation below) |
415 | or other a.out binaries, say Y. If unsure, say N. | 324 | or other a.out binaries, say Y. If unsure, say N. |
416 | 325 | ||
326 | menu "Executable file formats" | ||
327 | |||
417 | source "fs/Kconfig.binfmt" | 328 | source "fs/Kconfig.binfmt" |
418 | 329 | ||
419 | config SUNOS_EMUL | 330 | config SUNOS_EMUL |
@@ -436,74 +347,7 @@ config SOLARIS_EMUL | |||
436 | To compile this code as a module, choose M here: the | 347 | To compile this code as a module, choose M here: the |
437 | module will be called solaris. | 348 | module will be called solaris. |
438 | 349 | ||
439 | source "drivers/parport/Kconfig" | 350 | endmenu |
440 | |||
441 | config PRINTER | ||
442 | tristate "Parallel printer support" | ||
443 | depends on PARPORT | ||
444 | ---help--- | ||
445 | If you intend to attach a printer to the parallel port of your Linux | ||
446 | box (as opposed to using a serial printer; if the connector at the | ||
447 | printer has 9 or 25 holes ["female"], then it's serial), say Y. | ||
448 | Also read the Printing-HOWTO, available from | ||
449 | <http://www.tldp.org/docs.html#howto>. | ||
450 | |||
451 | It is possible to share one parallel port among several devices | ||
452 | (e.g. printer and ZIP drive) and it is safe to compile the | ||
453 | corresponding drivers into the kernel. | ||
454 | To compile this driver as a module, choose M here and read | ||
455 | <file:Documentation/parport.txt>. The module will be called lp. | ||
456 | |||
457 | If you have several parallel ports, you can specify which ports to | ||
458 | use with the "lp" kernel command line option. (Try "man bootparam" | ||
459 | or see the documentation of your boot loader (lilo or loadlin) about | ||
460 | how to pass options to the kernel at boot time.) The syntax of the | ||
461 | "lp" command line option can be found in <file:drivers/char/lp.c>. | ||
462 | |||
463 | If you have more than 8 printers, you need to increase the LP_NO | ||
464 | macro in lp.c and the PARPORT_MAX macro in parport.h. | ||
465 | |||
466 | config PPDEV | ||
467 | tristate "Support for user-space parallel port device drivers" | ||
468 | depends on PARPORT | ||
469 | ---help--- | ||
470 | Saying Y to this adds support for /dev/parport device nodes. This | ||
471 | is needed for programs that want portable access to the parallel | ||
472 | port, for instance deviceid (which displays Plug-and-Play device | ||
473 | IDs). | ||
474 | |||
475 | This is the parallel port equivalent of SCSI generic support (sg). | ||
476 | It is safe to say N to this -- it is not needed for normal printing | ||
477 | or parallel port CD-ROM/disk support. | ||
478 | |||
479 | To compile this driver as a module, choose M here: the | ||
480 | module will be called ppdev. | ||
481 | |||
482 | If unsure, say N. | ||
483 | |||
484 | config ENVCTRL | ||
485 | tristate "SUNW, envctrl support" | ||
486 | depends on PCI | ||
487 | help | ||
488 | Kernel support for temperature and fan monitoring on Sun SME | ||
489 | machines. | ||
490 | |||
491 | To compile this driver as a module, choose M here: the | ||
492 | module will be called envctrl. | ||
493 | |||
494 | config DISPLAY7SEG | ||
495 | tristate "7-Segment Display support" | ||
496 | depends on PCI | ||
497 | ---help--- | ||
498 | This is the driver for the 7-segment display and LED present on | ||
499 | Sun Microsystems CompactPCI models CP1400 and CP1500. | ||
500 | |||
501 | To compile this driver as a module, choose M here: the | ||
502 | module will be called display7seg. | ||
503 | |||
504 | If you do not have a CompactPCI model CP1400 or CP1500, or | ||
505 | another UltraSPARC-IIi-cEngine boardset with a 7-segment display, | ||
506 | you should say N to this option. | ||
507 | 351 | ||
508 | config CMDLINE_BOOL | 352 | config CMDLINE_BOOL |
509 | bool "Default bootloader kernel arguments" | 353 | bool "Default bootloader kernel arguments" |
@@ -521,148 +365,16 @@ config CMDLINE | |||
521 | 365 | ||
522 | NOTE: This option WILL override the PROM bootargs setting! | 366 | NOTE: This option WILL override the PROM bootargs setting! |
523 | 367 | ||
524 | source "mm/Kconfig" | ||
525 | |||
526 | endmenu | ||
527 | |||
528 | source "net/Kconfig" | 368 | source "net/Kconfig" |
529 | 369 | ||
530 | source "drivers/base/Kconfig" | 370 | source "drivers/Kconfig" |
531 | |||
532 | source "drivers/video/Kconfig" | ||
533 | |||
534 | source "drivers/serial/Kconfig" | ||
535 | 371 | ||
536 | source "drivers/sbus/char/Kconfig" | 372 | source "drivers/sbus/char/Kconfig" |
537 | 373 | ||
538 | source "drivers/mtd/Kconfig" | ||
539 | |||
540 | source "drivers/block/Kconfig" | ||
541 | |||
542 | source "drivers/ide/Kconfig" | ||
543 | |||
544 | source "drivers/scsi/Kconfig" | ||
545 | |||
546 | source "drivers/fc4/Kconfig" | 374 | source "drivers/fc4/Kconfig" |
547 | 375 | ||
548 | source "drivers/md/Kconfig" | ||
549 | |||
550 | if PCI | ||
551 | source "drivers/message/fusion/Kconfig" | ||
552 | endif | ||
553 | |||
554 | source "drivers/ieee1394/Kconfig" | ||
555 | |||
556 | source "drivers/net/Kconfig" | ||
557 | |||
558 | source "drivers/isdn/Kconfig" | ||
559 | |||
560 | source "drivers/telephony/Kconfig" | ||
561 | |||
562 | # This one must be before the filesystem configs. -DaveM | ||
563 | |||
564 | menu "Unix98 PTY support" | ||
565 | |||
566 | config UNIX98_PTYS | ||
567 | bool "Unix98 PTY support" | ||
568 | ---help--- | ||
569 | A pseudo terminal (PTY) is a software device consisting of two | ||
570 | halves: a master and a slave. The slave device behaves identical to | ||
571 | a physical terminal; the master device is used by a process to | ||
572 | read data from and write data to the slave, thereby emulating a | ||
573 | terminal. Typical programs for the master side are telnet servers | ||
574 | and xterms. | ||
575 | |||
576 | Linux has traditionally used the BSD-like names /dev/ptyxx for | ||
577 | masters and /dev/ttyxx for slaves of pseudo terminals. This scheme | ||
578 | has a number of problems. The GNU C library glibc 2.1 and later, | ||
579 | however, supports the Unix98 naming standard: in order to acquire a | ||
580 | pseudo terminal, a process opens /dev/ptmx; the number of the pseudo | ||
581 | terminal is then made available to the process and the pseudo | ||
582 | terminal slave can be accessed as /dev/pts/<number>. What was | ||
583 | traditionally /dev/ttyp2 will then be /dev/pts/2, for example. | ||
584 | |||
585 | The entries in /dev/pts/ are created on the fly by a virtual | ||
586 | file system; therefore, if you say Y here you should say Y to | ||
587 | "/dev/pts file system for Unix98 PTYs" as well. | ||
588 | |||
589 | If you want to say Y here, you need to have the C library glibc 2.1 | ||
590 | or later (equal to libc-6.1, check with "ls -l /lib/libc.so.*"). | ||
591 | Read the instructions in <file:Documentation/Changes> pertaining to | ||
592 | pseudo terminals. It's safe to say N. | ||
593 | |||
594 | config UNIX98_PTY_COUNT | ||
595 | int "Maximum number of Unix98 PTYs in use (0-2048)" | ||
596 | depends on UNIX98_PTYS | ||
597 | default "256" | ||
598 | help | ||
599 | The maximum number of Unix98 PTYs that can be used at any one time. | ||
600 | The default is 256, and should be enough for desktop systems. Server | ||
601 | machines which support incoming telnet/rlogin/ssh connections and/or | ||
602 | serve several X terminals may want to increase this: every incoming | ||
603 | connection and every xterm uses up one PTY. | ||
604 | |||
605 | When not in use, each additional set of 256 PTYs occupy | ||
606 | approximately 8 KB of kernel memory on 32-bit architectures. | ||
607 | |||
608 | endmenu | ||
609 | |||
610 | menu "XFree86 DRI support" | ||
611 | |||
612 | config DRM | ||
613 | bool "Direct Rendering Manager (XFree86 DRI support)" | ||
614 | help | ||
615 | Kernel-level support for the Direct Rendering Infrastructure (DRI) | ||
616 | introduced in XFree86 4.0. If you say Y here, you need to select | ||
617 | the module that's right for your graphics card from the list below. | ||
618 | These modules provide support for synchronization, security, and | ||
619 | DMA transfers. Please see <http://dri.sourceforge.net/> for more | ||
620 | details. You should also select and configure AGP | ||
621 | (/dev/agpgart) support. | ||
622 | |||
623 | config DRM_FFB | ||
624 | tristate "Creator/Creator3D" | ||
625 | depends on DRM && BROKEN | ||
626 | help | ||
627 | Choose this option if you have one of Sun's Creator3D-based graphics | ||
628 | and frame buffer cards. Product page at | ||
629 | <http://www.sun.com/desktop/products/Graphics/creator3d.html>. | ||
630 | |||
631 | config DRM_TDFX | ||
632 | tristate "3dfx Banshee/Voodoo3+" | ||
633 | depends on DRM | ||
634 | help | ||
635 | Choose this option if you have a 3dfx Banshee or Voodoo3 (or later), | ||
636 | graphics card. If M is selected, the module will be called tdfx. | ||
637 | |||
638 | config DRM_R128 | ||
639 | tristate "ATI Rage 128" | ||
640 | depends on DRM | ||
641 | help | ||
642 | Choose this option if you have an ATI Rage 128 graphics card. If M | ||
643 | is selected, the module will be called r128. AGP support for | ||
644 | this card is strongly suggested (unless you have a PCI version). | ||
645 | |||
646 | endmenu | ||
647 | |||
648 | source "drivers/input/Kconfig" | ||
649 | |||
650 | source "drivers/i2c/Kconfig" | ||
651 | |||
652 | source "drivers/hwmon/Kconfig" | ||
653 | |||
654 | source "fs/Kconfig" | 376 | source "fs/Kconfig" |
655 | 377 | ||
656 | source "drivers/media/Kconfig" | ||
657 | |||
658 | source "sound/Kconfig" | ||
659 | |||
660 | source "drivers/usb/Kconfig" | ||
661 | |||
662 | source "drivers/infiniband/Kconfig" | ||
663 | |||
664 | source "drivers/char/watchdog/Kconfig" | ||
665 | |||
666 | source "arch/sparc64/oprofile/Kconfig" | 378 | source "arch/sparc64/oprofile/Kconfig" |
667 | 379 | ||
668 | source "arch/sparc64/Kconfig.debug" | 380 | source "arch/sparc64/Kconfig.debug" |
diff --git a/arch/sparc64/kernel/entry.S b/arch/sparc64/kernel/entry.S index cecdc0a7521f..3e0badb820c5 100644 --- a/arch/sparc64/kernel/entry.S +++ b/arch/sparc64/kernel/entry.S | |||
@@ -927,139 +927,6 @@ __spitfire_insn_access_exception: | |||
927 | ba,pt %xcc, rtrap | 927 | ba,pt %xcc, rtrap |
928 | clr %l6 | 928 | clr %l6 |
929 | 929 | ||
930 | /* Capture I/D/E-cache state into per-cpu error scoreboard. | ||
931 | * | ||
932 | * %g1: (TL>=0) ? 1 : 0 | ||
933 | * %g2: scratch | ||
934 | * %g3: scratch | ||
935 | * %g4: AFSR | ||
936 | * %g5: AFAR | ||
937 | * %g6: current thread ptr | ||
938 | * %g7: scratch | ||
939 | */ | ||
940 | #define CHEETAH_LOG_ERROR \ | ||
941 | /* Put "TL1" software bit into AFSR. */ \ | ||
942 | and %g1, 0x1, %g1; \ | ||
943 | sllx %g1, 63, %g2; \ | ||
944 | or %g4, %g2, %g4; \ | ||
945 | /* Get log entry pointer for this cpu at this trap level. */ \ | ||
946 | BRANCH_IF_JALAPENO(g2,g3,50f) \ | ||
947 | ldxa [%g0] ASI_SAFARI_CONFIG, %g2; \ | ||
948 | srlx %g2, 17, %g2; \ | ||
949 | ba,pt %xcc, 60f; \ | ||
950 | and %g2, 0x3ff, %g2; \ | ||
951 | 50: ldxa [%g0] ASI_JBUS_CONFIG, %g2; \ | ||
952 | srlx %g2, 17, %g2; \ | ||
953 | and %g2, 0x1f, %g2; \ | ||
954 | 60: sllx %g2, 9, %g2; \ | ||
955 | sethi %hi(cheetah_error_log), %g3; \ | ||
956 | ldx [%g3 + %lo(cheetah_error_log)], %g3; \ | ||
957 | brz,pn %g3, 80f; \ | ||
958 | nop; \ | ||
959 | add %g3, %g2, %g3; \ | ||
960 | sllx %g1, 8, %g1; \ | ||
961 | add %g3, %g1, %g1; \ | ||
962 | /* %g1 holds pointer to the top of the logging scoreboard */ \ | ||
963 | ldx [%g1 + 0x0], %g7; \ | ||
964 | cmp %g7, -1; \ | ||
965 | bne,pn %xcc, 80f; \ | ||
966 | nop; \ | ||
967 | stx %g4, [%g1 + 0x0]; \ | ||
968 | stx %g5, [%g1 + 0x8]; \ | ||
969 | add %g1, 0x10, %g1; \ | ||
970 | /* %g1 now points to D-cache logging area */ \ | ||
971 | set 0x3ff8, %g2; /* DC_addr mask */ \ | ||
972 | and %g5, %g2, %g2; /* DC_addr bits of AFAR */ \ | ||
973 | srlx %g5, 12, %g3; \ | ||
974 | or %g3, 1, %g3; /* PHYS tag + valid */ \ | ||
975 | 10: ldxa [%g2] ASI_DCACHE_TAG, %g7; \ | ||
976 | cmp %g3, %g7; /* TAG match? */ \ | ||
977 | bne,pt %xcc, 13f; \ | ||
978 | nop; \ | ||
979 | /* Yep, what we want, capture state. */ \ | ||
980 | stx %g2, [%g1 + 0x20]; \ | ||
981 | stx %g7, [%g1 + 0x28]; \ | ||
982 | /* A membar Sync is required before and after utag access. */ \ | ||
983 | membar #Sync; \ | ||
984 | ldxa [%g2] ASI_DCACHE_UTAG, %g7; \ | ||
985 | membar #Sync; \ | ||
986 | stx %g7, [%g1 + 0x30]; \ | ||
987 | ldxa [%g2] ASI_DCACHE_SNOOP_TAG, %g7; \ | ||
988 | stx %g7, [%g1 + 0x38]; \ | ||
989 | clr %g3; \ | ||
990 | 12: ldxa [%g2 + %g3] ASI_DCACHE_DATA, %g7; \ | ||
991 | stx %g7, [%g1]; \ | ||
992 | add %g3, (1 << 5), %g3; \ | ||
993 | cmp %g3, (4 << 5); \ | ||
994 | bl,pt %xcc, 12b; \ | ||
995 | add %g1, 0x8, %g1; \ | ||
996 | ba,pt %xcc, 20f; \ | ||
997 | add %g1, 0x20, %g1; \ | ||
998 | 13: sethi %hi(1 << 14), %g7; \ | ||
999 | add %g2, %g7, %g2; \ | ||
1000 | srlx %g2, 14, %g7; \ | ||
1001 | cmp %g7, 4; \ | ||
1002 | bl,pt %xcc, 10b; \ | ||
1003 | nop; \ | ||
1004 | add %g1, 0x40, %g1; \ | ||
1005 | 20: /* %g1 now points to I-cache logging area */ \ | ||
1006 | set 0x1fe0, %g2; /* IC_addr mask */ \ | ||
1007 | and %g5, %g2, %g2; /* IC_addr bits of AFAR */ \ | ||
1008 | sllx %g2, 1, %g2; /* IC_addr[13:6]==VA[12:5] */ \ | ||
1009 | srlx %g5, (13 - 8), %g3; /* Make PTAG */ \ | ||
1010 | andn %g3, 0xff, %g3; /* Mask off undefined bits */ \ | ||
1011 | 21: ldxa [%g2] ASI_IC_TAG, %g7; \ | ||
1012 | andn %g7, 0xff, %g7; \ | ||
1013 | cmp %g3, %g7; \ | ||
1014 | bne,pt %xcc, 23f; \ | ||
1015 | nop; \ | ||
1016 | /* Yep, what we want, capture state. */ \ | ||
1017 | stx %g2, [%g1 + 0x40]; \ | ||
1018 | stx %g7, [%g1 + 0x48]; \ | ||
1019 | add %g2, (1 << 3), %g2; \ | ||
1020 | ldxa [%g2] ASI_IC_TAG, %g7; \ | ||
1021 | add %g2, (1 << 3), %g2; \ | ||
1022 | stx %g7, [%g1 + 0x50]; \ | ||
1023 | ldxa [%g2] ASI_IC_TAG, %g7; \ | ||
1024 | add %g2, (1 << 3), %g2; \ | ||
1025 | stx %g7, [%g1 + 0x60]; \ | ||
1026 | ldxa [%g2] ASI_IC_TAG, %g7; \ | ||
1027 | stx %g7, [%g1 + 0x68]; \ | ||
1028 | sub %g2, (3 << 3), %g2; \ | ||
1029 | ldxa [%g2] ASI_IC_STAG, %g7; \ | ||
1030 | stx %g7, [%g1 + 0x58]; \ | ||
1031 | clr %g3; \ | ||
1032 | srlx %g2, 2, %g2; \ | ||
1033 | 22: ldxa [%g2 + %g3] ASI_IC_INSTR, %g7; \ | ||
1034 | stx %g7, [%g1]; \ | ||
1035 | add %g3, (1 << 3), %g3; \ | ||
1036 | cmp %g3, (8 << 3); \ | ||
1037 | bl,pt %xcc, 22b; \ | ||
1038 | add %g1, 0x8, %g1; \ | ||
1039 | ba,pt %xcc, 30f; \ | ||
1040 | add %g1, 0x30, %g1; \ | ||
1041 | 23: sethi %hi(1 << 14), %g7; \ | ||
1042 | add %g2, %g7, %g2; \ | ||
1043 | srlx %g2, 14, %g7; \ | ||
1044 | cmp %g7, 4; \ | ||
1045 | bl,pt %xcc, 21b; \ | ||
1046 | nop; \ | ||
1047 | add %g1, 0x70, %g1; \ | ||
1048 | 30: /* %g1 now points to E-cache logging area */ \ | ||
1049 | andn %g5, (32 - 1), %g2; /* E-cache subblock */ \ | ||
1050 | stx %g2, [%g1 + 0x20]; \ | ||
1051 | ldxa [%g2] ASI_EC_TAG_DATA, %g7; \ | ||
1052 | stx %g7, [%g1 + 0x28]; \ | ||
1053 | ldxa [%g2] ASI_EC_R, %g0; \ | ||
1054 | clr %g3; \ | ||
1055 | 31: ldxa [%g3] ASI_EC_DATA, %g7; \ | ||
1056 | stx %g7, [%g1 + %g3]; \ | ||
1057 | add %g3, 0x8, %g3; \ | ||
1058 | cmp %g3, 0x20; \ | ||
1059 | bl,pt %xcc, 31b; \ | ||
1060 | nop; \ | ||
1061 | 80: /* DONE */ | ||
1062 | |||
1063 | /* These get patched into the trap table at boot time | 930 | /* These get patched into the trap table at boot time |
1064 | * once we know we have a cheetah processor. | 931 | * once we know we have a cheetah processor. |
1065 | */ | 932 | */ |
@@ -1296,6 +1163,170 @@ dcpe_icpe_tl1_common: | |||
1296 | membar #Sync | 1163 | membar #Sync |
1297 | retry | 1164 | retry |
1298 | 1165 | ||
1166 | /* Capture I/D/E-cache state into per-cpu error scoreboard. | ||
1167 | * | ||
1168 | * %g1: (TL>=0) ? 1 : 0 | ||
1169 | * %g2: scratch | ||
1170 | * %g3: scratch | ||
1171 | * %g4: AFSR | ||
1172 | * %g5: AFAR | ||
1173 | * %g6: current thread ptr | ||
1174 | * %g7: scratch | ||
1175 | */ | ||
1176 | __cheetah_log_error: | ||
1177 | /* Put "TL1" software bit into AFSR. */ | ||
1178 | and %g1, 0x1, %g1 | ||
1179 | sllx %g1, 63, %g2 | ||
1180 | or %g4, %g2, %g4 | ||
1181 | |||
1182 | /* Get log entry pointer for this cpu at this trap level. */ | ||
1183 | BRANCH_IF_JALAPENO(g2,g3,50f) | ||
1184 | ldxa [%g0] ASI_SAFARI_CONFIG, %g2 | ||
1185 | srlx %g2, 17, %g2 | ||
1186 | ba,pt %xcc, 60f | ||
1187 | and %g2, 0x3ff, %g2 | ||
1188 | |||
1189 | 50: ldxa [%g0] ASI_JBUS_CONFIG, %g2 | ||
1190 | srlx %g2, 17, %g2 | ||
1191 | and %g2, 0x1f, %g2 | ||
1192 | |||
1193 | 60: sllx %g2, 9, %g2 | ||
1194 | sethi %hi(cheetah_error_log), %g3 | ||
1195 | ldx [%g3 + %lo(cheetah_error_log)], %g3 | ||
1196 | brz,pn %g3, 80f | ||
1197 | nop | ||
1198 | |||
1199 | add %g3, %g2, %g3 | ||
1200 | sllx %g1, 8, %g1 | ||
1201 | add %g3, %g1, %g1 | ||
1202 | |||
1203 | /* %g1 holds pointer to the top of the logging scoreboard */ | ||
1204 | ldx [%g1 + 0x0], %g7 | ||
1205 | cmp %g7, -1 | ||
1206 | bne,pn %xcc, 80f | ||
1207 | nop | ||
1208 | |||
1209 | stx %g4, [%g1 + 0x0] | ||
1210 | stx %g5, [%g1 + 0x8] | ||
1211 | add %g1, 0x10, %g1 | ||
1212 | |||
1213 | /* %g1 now points to D-cache logging area */ | ||
1214 | set 0x3ff8, %g2 /* DC_addr mask */ | ||
1215 | and %g5, %g2, %g2 /* DC_addr bits of AFAR */ | ||
1216 | srlx %g5, 12, %g3 | ||
1217 | or %g3, 1, %g3 /* PHYS tag + valid */ | ||
1218 | |||
1219 | 10: ldxa [%g2] ASI_DCACHE_TAG, %g7 | ||
1220 | cmp %g3, %g7 /* TAG match? */ | ||
1221 | bne,pt %xcc, 13f | ||
1222 | nop | ||
1223 | |||
1224 | /* Yep, what we want, capture state. */ | ||
1225 | stx %g2, [%g1 + 0x20] | ||
1226 | stx %g7, [%g1 + 0x28] | ||
1227 | |||
1228 | /* A membar Sync is required before and after utag access. */ | ||
1229 | membar #Sync | ||
1230 | ldxa [%g2] ASI_DCACHE_UTAG, %g7 | ||
1231 | membar #Sync | ||
1232 | stx %g7, [%g1 + 0x30] | ||
1233 | ldxa [%g2] ASI_DCACHE_SNOOP_TAG, %g7 | ||
1234 | stx %g7, [%g1 + 0x38] | ||
1235 | clr %g3 | ||
1236 | |||
1237 | 12: ldxa [%g2 + %g3] ASI_DCACHE_DATA, %g7 | ||
1238 | stx %g7, [%g1] | ||
1239 | add %g3, (1 << 5), %g3 | ||
1240 | cmp %g3, (4 << 5) | ||
1241 | bl,pt %xcc, 12b | ||
1242 | add %g1, 0x8, %g1 | ||
1243 | |||
1244 | ba,pt %xcc, 20f | ||
1245 | add %g1, 0x20, %g1 | ||
1246 | |||
1247 | 13: sethi %hi(1 << 14), %g7 | ||
1248 | add %g2, %g7, %g2 | ||
1249 | srlx %g2, 14, %g7 | ||
1250 | cmp %g7, 4 | ||
1251 | bl,pt %xcc, 10b | ||
1252 | nop | ||
1253 | |||
1254 | add %g1, 0x40, %g1 | ||
1255 | |||
1256 | /* %g1 now points to I-cache logging area */ | ||
1257 | 20: set 0x1fe0, %g2 /* IC_addr mask */ | ||
1258 | and %g5, %g2, %g2 /* IC_addr bits of AFAR */ | ||
1259 | sllx %g2, 1, %g2 /* IC_addr[13:6]==VA[12:5] */ | ||
1260 | srlx %g5, (13 - 8), %g3 /* Make PTAG */ | ||
1261 | andn %g3, 0xff, %g3 /* Mask off undefined bits */ | ||
1262 | |||
1263 | 21: ldxa [%g2] ASI_IC_TAG, %g7 | ||
1264 | andn %g7, 0xff, %g7 | ||
1265 | cmp %g3, %g7 | ||
1266 | bne,pt %xcc, 23f | ||
1267 | nop | ||
1268 | |||
1269 | /* Yep, what we want, capture state. */ | ||
1270 | stx %g2, [%g1 + 0x40] | ||
1271 | stx %g7, [%g1 + 0x48] | ||
1272 | add %g2, (1 << 3), %g2 | ||
1273 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
1274 | add %g2, (1 << 3), %g2 | ||
1275 | stx %g7, [%g1 + 0x50] | ||
1276 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
1277 | add %g2, (1 << 3), %g2 | ||
1278 | stx %g7, [%g1 + 0x60] | ||
1279 | ldxa [%g2] ASI_IC_TAG, %g7 | ||
1280 | stx %g7, [%g1 + 0x68] | ||
1281 | sub %g2, (3 << 3), %g2 | ||
1282 | ldxa [%g2] ASI_IC_STAG, %g7 | ||
1283 | stx %g7, [%g1 + 0x58] | ||
1284 | clr %g3 | ||
1285 | srlx %g2, 2, %g2 | ||
1286 | |||
1287 | 22: ldxa [%g2 + %g3] ASI_IC_INSTR, %g7 | ||
1288 | stx %g7, [%g1] | ||
1289 | add %g3, (1 << 3), %g3 | ||
1290 | cmp %g3, (8 << 3) | ||
1291 | bl,pt %xcc, 22b | ||
1292 | add %g1, 0x8, %g1 | ||
1293 | |||
1294 | ba,pt %xcc, 30f | ||
1295 | add %g1, 0x30, %g1 | ||
1296 | |||
1297 | 23: sethi %hi(1 << 14), %g7 | ||
1298 | add %g2, %g7, %g2 | ||
1299 | srlx %g2, 14, %g7 | ||
1300 | cmp %g7, 4 | ||
1301 | bl,pt %xcc, 21b | ||
1302 | nop | ||
1303 | |||
1304 | add %g1, 0x70, %g1 | ||
1305 | |||
1306 | /* %g1 now points to E-cache logging area */ | ||
1307 | 30: andn %g5, (32 - 1), %g2 | ||
1308 | stx %g2, [%g1 + 0x20] | ||
1309 | ldxa [%g2] ASI_EC_TAG_DATA, %g7 | ||
1310 | stx %g7, [%g1 + 0x28] | ||
1311 | ldxa [%g2] ASI_EC_R, %g0 | ||
1312 | clr %g3 | ||
1313 | |||
1314 | 31: ldxa [%g3] ASI_EC_DATA, %g7 | ||
1315 | stx %g7, [%g1 + %g3] | ||
1316 | add %g3, 0x8, %g3 | ||
1317 | cmp %g3, 0x20 | ||
1318 | |||
1319 | bl,pt %xcc, 31b | ||
1320 | nop | ||
1321 | 80: | ||
1322 | rdpr %tt, %g2 | ||
1323 | cmp %g2, 0x70 | ||
1324 | be c_fast_ecc | ||
1325 | cmp %g2, 0x63 | ||
1326 | be c_cee | ||
1327 | nop | ||
1328 | ba,pt %xcc, c_deferred | ||
1329 | |||
1299 | /* Cheetah FECC trap handling, we get here from tl{0,1}_fecc | 1330 | /* Cheetah FECC trap handling, we get here from tl{0,1}_fecc |
1300 | * in the trap table. That code has done a memory barrier | 1331 | * in the trap table. That code has done a memory barrier |
1301 | * and has disabled both the I-cache and D-cache in the DCU | 1332 | * and has disabled both the I-cache and D-cache in the DCU |
@@ -1321,8 +1352,10 @@ cheetah_fast_ecc: | |||
1321 | stxa %g4, [%g0] ASI_AFSR | 1352 | stxa %g4, [%g0] ASI_AFSR |
1322 | membar #Sync | 1353 | membar #Sync |
1323 | 1354 | ||
1324 | CHEETAH_LOG_ERROR | 1355 | ba,pt %xcc, __cheetah_log_error |
1356 | nop | ||
1325 | 1357 | ||
1358 | c_fast_ecc: | ||
1326 | rdpr %pil, %g2 | 1359 | rdpr %pil, %g2 |
1327 | wrpr %g0, 15, %pil | 1360 | wrpr %g0, 15, %pil |
1328 | ba,pt %xcc, etrap_irq | 1361 | ba,pt %xcc, etrap_irq |
@@ -1347,8 +1380,10 @@ cheetah_cee: | |||
1347 | stxa %g4, [%g0] ASI_AFSR | 1380 | stxa %g4, [%g0] ASI_AFSR |
1348 | membar #Sync | 1381 | membar #Sync |
1349 | 1382 | ||
1350 | CHEETAH_LOG_ERROR | 1383 | ba,pt %xcc, __cheetah_log_error |
1384 | nop | ||
1351 | 1385 | ||
1386 | c_cee: | ||
1352 | rdpr %pil, %g2 | 1387 | rdpr %pil, %g2 |
1353 | wrpr %g0, 15, %pil | 1388 | wrpr %g0, 15, %pil |
1354 | ba,pt %xcc, etrap_irq | 1389 | ba,pt %xcc, etrap_irq |
@@ -1373,8 +1408,10 @@ cheetah_deferred_trap: | |||
1373 | stxa %g4, [%g0] ASI_AFSR | 1408 | stxa %g4, [%g0] ASI_AFSR |
1374 | membar #Sync | 1409 | membar #Sync |
1375 | 1410 | ||
1376 | CHEETAH_LOG_ERROR | 1411 | ba,pt %xcc, __cheetah_log_error |
1412 | nop | ||
1377 | 1413 | ||
1414 | c_deferred: | ||
1378 | rdpr %pil, %g2 | 1415 | rdpr %pil, %g2 |
1379 | wrpr %g0, 15, %pil | 1416 | wrpr %g0, 15, %pil |
1380 | ba,pt %xcc, etrap_irq | 1417 | ba,pt %xcc, etrap_irq |
diff --git a/arch/sparc64/kernel/head.S b/arch/sparc64/kernel/head.S index 8104a56ca2d8..1fa06c4e3bdb 100644 --- a/arch/sparc64/kernel/head.S +++ b/arch/sparc64/kernel/head.S | |||
@@ -538,11 +538,12 @@ cheetah_tlb_fixup: | |||
538 | nop | 538 | nop |
539 | call cheetah_plus_patch_winfixup | 539 | call cheetah_plus_patch_winfixup |
540 | nop | 540 | nop |
541 | |||
542 | 541 | ||
543 | 2: /* Patch copy/page operations to cheetah optimized versions. */ | 542 | 2: /* Patch copy/page operations to cheetah optimized versions. */ |
544 | call cheetah_patch_copyops | 543 | call cheetah_patch_copyops |
545 | nop | 544 | nop |
545 | call cheetah_patch_copy_page | ||
546 | nop | ||
546 | call cheetah_patch_cachetlbops | 547 | call cheetah_patch_cachetlbops |
547 | nop | 548 | nop |
548 | 549 | ||
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index f21c993f8856..ec8bf4012c0c 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -736,8 +736,7 @@ static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma | |||
736 | static void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, | 736 | static void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, |
737 | enum pci_mmap_state mmap_state) | 737 | enum pci_mmap_state mmap_state) |
738 | { | 738 | { |
739 | /* Our io_remap_page_range/io_remap_pfn_range takes care of this, | 739 | /* Our io_remap_pfn_range takes care of this, do nothing. */ |
740 | do nothing. */ | ||
741 | } | 740 | } |
742 | 741 | ||
743 | /* Perform the actual remap of the pages for a PCI device mapping, as appropriate | 742 | /* Perform the actual remap of the pages for a PCI device mapping, as appropriate |
diff --git a/arch/sparc64/kernel/rtrap.S b/arch/sparc64/kernel/rtrap.S index 0696ed4b9d64..fafd227735fa 100644 --- a/arch/sparc64/kernel/rtrap.S +++ b/arch/sparc64/kernel/rtrap.S | |||
@@ -153,11 +153,14 @@ __handle_signal: | |||
153 | rtrap_irq: | 153 | rtrap_irq: |
154 | rtrap_clr_l6: clr %l6 | 154 | rtrap_clr_l6: clr %l6 |
155 | rtrap: | 155 | rtrap: |
156 | ldub [%g6 + TI_CPU], %l0 | 156 | #ifndef CONFIG_SMP |
157 | sethi %hi(irq_stat), %l2 ! &softirq_active | 157 | sethi %hi(per_cpu____cpu_data), %l0 |
158 | or %l2, %lo(irq_stat), %l2 ! &softirq_active | 158 | lduw [%l0 + %lo(per_cpu____cpu_data)], %l1 |
159 | irqsz_patchme: sllx %l0, 0, %l0 | 159 | #else |
160 | lduw [%l2 + %l0], %l1 ! softirq_pending | 160 | sethi %hi(per_cpu____cpu_data), %l0 |
161 | or %l0, %lo(per_cpu____cpu_data), %l0 | ||
162 | lduw [%l0 + %g5], %l1 | ||
163 | #endif | ||
161 | cmp %l1, 0 | 164 | cmp %l1, 0 |
162 | 165 | ||
163 | /* mm/ultra.S:xcall_report_regs KNOWS about this load. */ | 166 | /* mm/ultra.S:xcall_report_regs KNOWS about this load. */ |
diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index fbdfed3798d8..ddbed3341a23 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c | |||
@@ -511,18 +511,6 @@ void __init setup_arch(char **cmdline_p) | |||
511 | conswitchp = &prom_con; | 511 | conswitchp = &prom_con; |
512 | #endif | 512 | #endif |
513 | 513 | ||
514 | #ifdef CONFIG_SMP | ||
515 | i = (unsigned long)&irq_stat[1] - (unsigned long)&irq_stat[0]; | ||
516 | if ((i == SMP_CACHE_BYTES) || (i == (2 * SMP_CACHE_BYTES))) { | ||
517 | extern unsigned int irqsz_patchme[1]; | ||
518 | irqsz_patchme[0] |= ((i == SMP_CACHE_BYTES) ? SMP_CACHE_BYTES_SHIFT : \ | ||
519 | SMP_CACHE_BYTES_SHIFT + 1); | ||
520 | flushi((long)&irqsz_patchme[0]); | ||
521 | } else { | ||
522 | prom_printf("Unexpected size of irq_stat[] elements\n"); | ||
523 | prom_halt(); | ||
524 | } | ||
525 | #endif | ||
526 | /* Work out if we are starfire early on */ | 514 | /* Work out if we are starfire early on */ |
527 | check_if_starfire(); | 515 | check_if_starfire(); |
528 | 516 | ||
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index a3ea697f1adb..d89fc24808d3 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -88,8 +88,6 @@ extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs); | |||
88 | extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); | 88 | extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); |
89 | extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); | 89 | extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); |
90 | extern long sparc32_open(const char __user * filename, int flags, int mode); | 90 | extern long sparc32_open(const char __user * filename, int flags, int mode); |
91 | extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, | ||
92 | unsigned long offset, unsigned long size, pgprot_t prot, int space); | ||
93 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 91 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
94 | unsigned long pfn, unsigned long size, pgprot_t prot); | 92 | unsigned long pfn, unsigned long size, pgprot_t prot); |
95 | extern void (*prom_palette)(int); | 93 | extern void (*prom_palette)(int); |
@@ -245,7 +243,6 @@ EXPORT_SYMBOL(pci_dma_supported); | |||
245 | #endif | 243 | #endif |
246 | 244 | ||
247 | /* I/O device mmaping on Sparc64. */ | 245 | /* I/O device mmaping on Sparc64. */ |
248 | EXPORT_SYMBOL(io_remap_page_range); | ||
249 | EXPORT_SYMBOL(io_remap_pfn_range); | 246 | EXPORT_SYMBOL(io_remap_pfn_range); |
250 | 247 | ||
251 | /* Solaris/SunOS binary compatibility */ | 248 | /* Solaris/SunOS binary compatibility */ |
diff --git a/arch/sparc64/lib/PeeCeeI.c b/arch/sparc64/lib/PeeCeeI.c index 3008d536e8c2..3c6cfbb20360 100644 --- a/arch/sparc64/lib/PeeCeeI.c +++ b/arch/sparc64/lib/PeeCeeI.c | |||
@@ -7,28 +7,31 @@ | |||
7 | #include <asm/io.h> | 7 | #include <asm/io.h> |
8 | #include <asm/byteorder.h> | 8 | #include <asm/byteorder.h> |
9 | 9 | ||
10 | void outsb(void __iomem *addr, const void *src, unsigned long count) | 10 | void outsb(unsigned long __addr, const void *src, unsigned long count) |
11 | { | 11 | { |
12 | void __iomem *addr = (void __iomem *) __addr; | ||
12 | const u8 *p = src; | 13 | const u8 *p = src; |
13 | 14 | ||
14 | while(count--) | 15 | while (count--) |
15 | outb(*p++, addr); | 16 | outb(*p++, addr); |
16 | } | 17 | } |
17 | 18 | ||
18 | void outsw(void __iomem *addr, const void *src, unsigned long count) | 19 | void outsw(unsigned long __addr, const void *src, unsigned long count) |
19 | { | 20 | { |
20 | if(count) { | 21 | void __iomem *addr = (void __iomem *) __addr; |
22 | |||
23 | if (count) { | ||
21 | u16 *ps = (u16 *)src; | 24 | u16 *ps = (u16 *)src; |
22 | u32 *pi; | 25 | u32 *pi; |
23 | 26 | ||
24 | if(((u64)src) & 0x2) { | 27 | if (((u64)src) & 0x2) { |
25 | u16 val = le16_to_cpup(ps); | 28 | u16 val = le16_to_cpup(ps); |
26 | outw(val, addr); | 29 | outw(val, addr); |
27 | ps++; | 30 | ps++; |
28 | count--; | 31 | count--; |
29 | } | 32 | } |
30 | pi = (u32 *)ps; | 33 | pi = (u32 *)ps; |
31 | while(count >= 2) { | 34 | while (count >= 2) { |
32 | u32 w = le32_to_cpup(pi); | 35 | u32 w = le32_to_cpup(pi); |
33 | 36 | ||
34 | pi++; | 37 | pi++; |
@@ -37,19 +40,21 @@ void outsw(void __iomem *addr, const void *src, unsigned long count) | |||
37 | count -= 2; | 40 | count -= 2; |
38 | } | 41 | } |
39 | ps = (u16 *)pi; | 42 | ps = (u16 *)pi; |
40 | if(count) { | 43 | if (count) { |
41 | u16 val = le16_to_cpup(ps); | 44 | u16 val = le16_to_cpup(ps); |
42 | outw(val, addr); | 45 | outw(val, addr); |
43 | } | 46 | } |
44 | } | 47 | } |
45 | } | 48 | } |
46 | 49 | ||
47 | void outsl(void __iomem *addr, const void *src, unsigned long count) | 50 | void outsl(unsigned long __addr, const void *src, unsigned long count) |
48 | { | 51 | { |
49 | if(count) { | 52 | void __iomem *addr = (void __iomem *) __addr; |
50 | if((((u64)src) & 0x3) == 0) { | 53 | |
54 | if (count) { | ||
55 | if ((((u64)src) & 0x3) == 0) { | ||
51 | u32 *p = (u32 *)src; | 56 | u32 *p = (u32 *)src; |
52 | while(count--) { | 57 | while (count--) { |
53 | u32 val = cpu_to_le32p(p); | 58 | u32 val = cpu_to_le32p(p); |
54 | outl(val, addr); | 59 | outl(val, addr); |
55 | p++; | 60 | p++; |
@@ -60,13 +65,13 @@ void outsl(void __iomem *addr, const void *src, unsigned long count) | |||
60 | u32 l = 0, l2; | 65 | u32 l = 0, l2; |
61 | u32 *pi; | 66 | u32 *pi; |
62 | 67 | ||
63 | switch(((u64)src) & 0x3) { | 68 | switch (((u64)src) & 0x3) { |
64 | case 0x2: | 69 | case 0x2: |
65 | count -= 1; | 70 | count -= 1; |
66 | l = cpu_to_le16p(ps) << 16; | 71 | l = cpu_to_le16p(ps) << 16; |
67 | ps++; | 72 | ps++; |
68 | pi = (u32 *)ps; | 73 | pi = (u32 *)ps; |
69 | while(count--) { | 74 | while (count--) { |
70 | l2 = cpu_to_le32p(pi); | 75 | l2 = cpu_to_le32p(pi); |
71 | pi++; | 76 | pi++; |
72 | outl(((l >> 16) | (l2 << 16)), addr); | 77 | outl(((l >> 16) | (l2 << 16)), addr); |
@@ -86,7 +91,7 @@ void outsl(void __iomem *addr, const void *src, unsigned long count) | |||
86 | ps++; | 91 | ps++; |
87 | l |= (l2 << 16); | 92 | l |= (l2 << 16); |
88 | pi = (u32 *)ps; | 93 | pi = (u32 *)ps; |
89 | while(count--) { | 94 | while (count--) { |
90 | l2 = cpu_to_le32p(pi); | 95 | l2 = cpu_to_le32p(pi); |
91 | pi++; | 96 | pi++; |
92 | outl(((l >> 8) | (l2 << 24)), addr); | 97 | outl(((l >> 8) | (l2 << 24)), addr); |
@@ -101,7 +106,7 @@ void outsl(void __iomem *addr, const void *src, unsigned long count) | |||
101 | pb = (u8 *)src; | 106 | pb = (u8 *)src; |
102 | l = (*pb++ << 24); | 107 | l = (*pb++ << 24); |
103 | pi = (u32 *)pb; | 108 | pi = (u32 *)pb; |
104 | while(count--) { | 109 | while (count--) { |
105 | l2 = cpu_to_le32p(pi); | 110 | l2 = cpu_to_le32p(pi); |
106 | pi++; | 111 | pi++; |
107 | outl(((l >> 24) | (l2 << 8)), addr); | 112 | outl(((l >> 24) | (l2 << 8)), addr); |
@@ -119,16 +124,18 @@ void outsl(void __iomem *addr, const void *src, unsigned long count) | |||
119 | } | 124 | } |
120 | } | 125 | } |
121 | 126 | ||
122 | void insb(void __iomem *addr, void *dst, unsigned long count) | 127 | void insb(unsigned long __addr, void *dst, unsigned long count) |
123 | { | 128 | { |
124 | if(count) { | 129 | void __iomem *addr = (void __iomem *) __addr; |
130 | |||
131 | if (count) { | ||
125 | u32 *pi; | 132 | u32 *pi; |
126 | u8 *pb = dst; | 133 | u8 *pb = dst; |
127 | 134 | ||
128 | while((((unsigned long)pb) & 0x3) && count--) | 135 | while ((((unsigned long)pb) & 0x3) && count--) |
129 | *pb++ = inb(addr); | 136 | *pb++ = inb(addr); |
130 | pi = (u32 *)pb; | 137 | pi = (u32 *)pb; |
131 | while(count >= 4) { | 138 | while (count >= 4) { |
132 | u32 w; | 139 | u32 w; |
133 | 140 | ||
134 | w = (inb(addr) << 24); | 141 | w = (inb(addr) << 24); |
@@ -139,23 +146,25 @@ void insb(void __iomem *addr, void *dst, unsigned long count) | |||
139 | count -= 4; | 146 | count -= 4; |
140 | } | 147 | } |
141 | pb = (u8 *)pi; | 148 | pb = (u8 *)pi; |
142 | while(count--) | 149 | while (count--) |
143 | *pb++ = inb(addr); | 150 | *pb++ = inb(addr); |
144 | } | 151 | } |
145 | } | 152 | } |
146 | 153 | ||
147 | void insw(void __iomem *addr, void *dst, unsigned long count) | 154 | void insw(unsigned long __addr, void *dst, unsigned long count) |
148 | { | 155 | { |
149 | if(count) { | 156 | void __iomem *addr = (void __iomem *) __addr; |
157 | |||
158 | if (count) { | ||
150 | u16 *ps = dst; | 159 | u16 *ps = dst; |
151 | u32 *pi; | 160 | u32 *pi; |
152 | 161 | ||
153 | if(((unsigned long)ps) & 0x2) { | 162 | if (((unsigned long)ps) & 0x2) { |
154 | *ps++ = le16_to_cpu(inw(addr)); | 163 | *ps++ = le16_to_cpu(inw(addr)); |
155 | count--; | 164 | count--; |
156 | } | 165 | } |
157 | pi = (u32 *)ps; | 166 | pi = (u32 *)ps; |
158 | while(count >= 2) { | 167 | while (count >= 2) { |
159 | u32 w; | 168 | u32 w; |
160 | 169 | ||
161 | w = (le16_to_cpu(inw(addr)) << 16); | 170 | w = (le16_to_cpu(inw(addr)) << 16); |
@@ -164,31 +173,33 @@ void insw(void __iomem *addr, void *dst, unsigned long count) | |||
164 | count -= 2; | 173 | count -= 2; |
165 | } | 174 | } |
166 | ps = (u16 *)pi; | 175 | ps = (u16 *)pi; |
167 | if(count) | 176 | if (count) |
168 | *ps = le16_to_cpu(inw(addr)); | 177 | *ps = le16_to_cpu(inw(addr)); |
169 | } | 178 | } |
170 | } | 179 | } |
171 | 180 | ||
172 | void insl(void __iomem *addr, void *dst, unsigned long count) | 181 | void insl(unsigned long __addr, void *dst, unsigned long count) |
173 | { | 182 | { |
174 | if(count) { | 183 | void __iomem *addr = (void __iomem *) __addr; |
175 | if((((unsigned long)dst) & 0x3) == 0) { | 184 | |
185 | if (count) { | ||
186 | if ((((unsigned long)dst) & 0x3) == 0) { | ||
176 | u32 *pi = dst; | 187 | u32 *pi = dst; |
177 | while(count--) | 188 | while (count--) |
178 | *pi++ = le32_to_cpu(inl(addr)); | 189 | *pi++ = le32_to_cpu(inl(addr)); |
179 | } else { | 190 | } else { |
180 | u32 l = 0, l2, *pi; | 191 | u32 l = 0, l2, *pi; |
181 | u16 *ps; | 192 | u16 *ps; |
182 | u8 *pb; | 193 | u8 *pb; |
183 | 194 | ||
184 | switch(((unsigned long)dst) & 3) { | 195 | switch (((unsigned long)dst) & 3) { |
185 | case 0x2: | 196 | case 0x2: |
186 | ps = dst; | 197 | ps = dst; |
187 | count -= 1; | 198 | count -= 1; |
188 | l = le32_to_cpu(inl(addr)); | 199 | l = le32_to_cpu(inl(addr)); |
189 | *ps++ = l; | 200 | *ps++ = l; |
190 | pi = (u32 *)ps; | 201 | pi = (u32 *)ps; |
191 | while(count--) { | 202 | while (count--) { |
192 | l2 = le32_to_cpu(inl(addr)); | 203 | l2 = le32_to_cpu(inl(addr)); |
193 | *pi++ = (l << 16) | (l2 >> 16); | 204 | *pi++ = (l << 16) | (l2 >> 16); |
194 | l = l2; | 205 | l = l2; |
@@ -205,7 +216,7 @@ void insl(void __iomem *addr, void *dst, unsigned long count) | |||
205 | ps = (u16 *)pb; | 216 | ps = (u16 *)pb; |
206 | *ps++ = ((l >> 8) & 0xffff); | 217 | *ps++ = ((l >> 8) & 0xffff); |
207 | pi = (u32 *)ps; | 218 | pi = (u32 *)ps; |
208 | while(count--) { | 219 | while (count--) { |
209 | l2 = le32_to_cpu(inl(addr)); | 220 | l2 = le32_to_cpu(inl(addr)); |
210 | *pi++ = (l << 24) | (l2 >> 8); | 221 | *pi++ = (l << 24) | (l2 >> 8); |
211 | l = l2; | 222 | l = l2; |
@@ -220,7 +231,7 @@ void insl(void __iomem *addr, void *dst, unsigned long count) | |||
220 | l = le32_to_cpu(inl(addr)); | 231 | l = le32_to_cpu(inl(addr)); |
221 | *pb++ = l >> 24; | 232 | *pb++ = l >> 24; |
222 | pi = (u32 *)pb; | 233 | pi = (u32 *)pb; |
223 | while(count--) { | 234 | while (count--) { |
224 | l2 = le32_to_cpu(inl(addr)); | 235 | l2 = le32_to_cpu(inl(addr)); |
225 | *pi++ = (l << 8) | (l2 >> 24); | 236 | *pi++ = (l << 8) | (l2 >> 24); |
226 | l = l2; | 237 | l = l2; |
diff --git a/arch/sparc64/lib/copy_page.S b/arch/sparc64/lib/copy_page.S index 23ebf2c970b7..feebb14fd27a 100644 --- a/arch/sparc64/lib/copy_page.S +++ b/arch/sparc64/lib/copy_page.S | |||
@@ -87,7 +87,7 @@ copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ | |||
87 | membar #Sync | 87 | membar #Sync |
88 | wrpr %o2, 0x0, %pstate | 88 | wrpr %o2, 0x0, %pstate |
89 | 89 | ||
90 | BRANCH_IF_ANY_CHEETAH(g3,o2,1f) | 90 | cheetah_copy_page_insn: |
91 | ba,pt %xcc, 9f | 91 | ba,pt %xcc, 9f |
92 | nop | 92 | nop |
93 | 93 | ||
@@ -240,3 +240,14 @@ copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ | |||
240 | stw %o4, [%g6 + TI_PRE_COUNT] | 240 | stw %o4, [%g6 + TI_PRE_COUNT] |
241 | 241 | ||
242 | .size copy_user_page, .-copy_user_page | 242 | .size copy_user_page, .-copy_user_page |
243 | |||
244 | .globl cheetah_patch_copy_page | ||
245 | cheetah_patch_copy_page: | ||
246 | sethi %hi(0x01000000), %o1 ! NOP | ||
247 | sethi %hi(cheetah_copy_page_insn), %o0 | ||
248 | or %o0, %lo(cheetah_copy_page_insn), %o0 | ||
249 | stw %o1, [%o0] | ||
250 | membar #StoreStore | ||
251 | flush %o0 | ||
252 | retl | ||
253 | nop | ||
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c index 6b31f6117a95..c954d91f01d0 100644 --- a/arch/sparc64/mm/generic.c +++ b/arch/sparc64/mm/generic.c | |||
@@ -116,37 +116,6 @@ static inline int io_remap_pud_range(struct mm_struct *mm, pud_t * pud, unsigned | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space) | ||
120 | { | ||
121 | int error = 0; | ||
122 | pgd_t * dir; | ||
123 | unsigned long beg = from; | ||
124 | unsigned long end = from + size; | ||
125 | struct mm_struct *mm = vma->vm_mm; | ||
126 | |||
127 | prot = __pgprot(pg_iobits); | ||
128 | offset -= from; | ||
129 | dir = pgd_offset(mm, from); | ||
130 | flush_cache_range(vma, beg, end); | ||
131 | |||
132 | spin_lock(&mm->page_table_lock); | ||
133 | while (from < end) { | ||
134 | pud_t *pud = pud_alloc(mm, dir, from); | ||
135 | error = -ENOMEM; | ||
136 | if (!pud) | ||
137 | break; | ||
138 | error = io_remap_pud_range(mm, pud, from, end - from, offset + from, prot, space); | ||
139 | if (error) | ||
140 | break; | ||
141 | from = (from + PGDIR_SIZE) & PGDIR_MASK; | ||
142 | dir++; | ||
143 | } | ||
144 | flush_tlb_range(vma, beg, end); | ||
145 | spin_unlock(&mm->page_table_lock); | ||
146 | |||
147 | return error; | ||
148 | } | ||
149 | |||
150 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 119 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
151 | unsigned long pfn, unsigned long size, pgprot_t prot) | 120 | unsigned long pfn, unsigned long size, pgprot_t prot) |
152 | { | 121 | { |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 363770893797..8dfa825eca51 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <asm/page.h> | 10 | #include <asm/page.h> |
11 | #include <asm/spitfire.h> | 11 | #include <asm/spitfire.h> |
12 | #include <asm/mmu_context.h> | 12 | #include <asm/mmu_context.h> |
13 | #include <asm/mmu.h> | ||
13 | #include <asm/pil.h> | 14 | #include <asm/pil.h> |
14 | #include <asm/head.h> | 15 | #include <asm/head.h> |
15 | #include <asm/thread_info.h> | 16 | #include <asm/thread_info.h> |
@@ -45,6 +46,8 @@ __flush_tlb_mm: /* %o0=(ctx & TAG_CONTEXT_BITS), %o1=SECONDARY_CONTEXT */ | |||
45 | nop | 46 | nop |
46 | nop | 47 | nop |
47 | nop | 48 | nop |
49 | nop | ||
50 | nop | ||
48 | 51 | ||
49 | .align 32 | 52 | .align 32 |
50 | .globl __flush_tlb_pending | 53 | .globl __flush_tlb_pending |
@@ -73,6 +76,9 @@ __flush_tlb_pending: | |||
73 | retl | 76 | retl |
74 | wrpr %g7, 0x0, %pstate | 77 | wrpr %g7, 0x0, %pstate |
75 | nop | 78 | nop |
79 | nop | ||
80 | nop | ||
81 | nop | ||
76 | 82 | ||
77 | .align 32 | 83 | .align 32 |
78 | .globl __flush_tlb_kernel_range | 84 | .globl __flush_tlb_kernel_range |
@@ -224,16 +230,8 @@ __update_mmu_cache: /* %o0=hw_context, %o1=address, %o2=pte, %o3=fault_code */ | |||
224 | or %o5, %o0, %o5 | 230 | or %o5, %o0, %o5 |
225 | ba,a,pt %xcc, __prefill_itlb | 231 | ba,a,pt %xcc, __prefill_itlb |
226 | 232 | ||
227 | /* Cheetah specific versions, patched at boot time. | 233 | /* Cheetah specific versions, patched at boot time. */ |
228 | * | 234 | __cheetah_flush_tlb_mm: /* 18 insns */ |
229 | * This writes of the PRIMARY_CONTEXT register in this file are | ||
230 | * safe even on Cheetah+ and later wrt. the page size fields. | ||
231 | * The nucleus page size fields do not matter because we make | ||
232 | * no data references, and these instructions execute out of a | ||
233 | * locked I-TLB entry sitting in the fully assosciative I-TLB. | ||
234 | * This sequence should also never trap. | ||
235 | */ | ||
236 | __cheetah_flush_tlb_mm: /* 15 insns */ | ||
237 | rdpr %pstate, %g7 | 235 | rdpr %pstate, %g7 |
238 | andn %g7, PSTATE_IE, %g2 | 236 | andn %g7, PSTATE_IE, %g2 |
239 | wrpr %g2, 0x0, %pstate | 237 | wrpr %g2, 0x0, %pstate |
@@ -241,6 +239,9 @@ __cheetah_flush_tlb_mm: /* 15 insns */ | |||
241 | mov PRIMARY_CONTEXT, %o2 | 239 | mov PRIMARY_CONTEXT, %o2 |
242 | mov 0x40, %g3 | 240 | mov 0x40, %g3 |
243 | ldxa [%o2] ASI_DMMU, %g2 | 241 | ldxa [%o2] ASI_DMMU, %g2 |
242 | srlx %g2, CTX_PGSZ1_NUC_SHIFT, %o1 | ||
243 | sllx %o1, CTX_PGSZ1_NUC_SHIFT, %o1 | ||
244 | or %o0, %o1, %o0 /* Preserve nucleus page size fields */ | ||
244 | stxa %o0, [%o2] ASI_DMMU | 245 | stxa %o0, [%o2] ASI_DMMU |
245 | stxa %g0, [%g3] ASI_DMMU_DEMAP | 246 | stxa %g0, [%g3] ASI_DMMU_DEMAP |
246 | stxa %g0, [%g3] ASI_IMMU_DEMAP | 247 | stxa %g0, [%g3] ASI_IMMU_DEMAP |
@@ -250,7 +251,7 @@ __cheetah_flush_tlb_mm: /* 15 insns */ | |||
250 | retl | 251 | retl |
251 | wrpr %g7, 0x0, %pstate | 252 | wrpr %g7, 0x0, %pstate |
252 | 253 | ||
253 | __cheetah_flush_tlb_pending: /* 23 insns */ | 254 | __cheetah_flush_tlb_pending: /* 26 insns */ |
254 | /* %o0 = context, %o1 = nr, %o2 = vaddrs[] */ | 255 | /* %o0 = context, %o1 = nr, %o2 = vaddrs[] */ |
255 | rdpr %pstate, %g7 | 256 | rdpr %pstate, %g7 |
256 | sllx %o1, 3, %o1 | 257 | sllx %o1, 3, %o1 |
@@ -259,6 +260,9 @@ __cheetah_flush_tlb_pending: /* 23 insns */ | |||
259 | wrpr %g0, 1, %tl | 260 | wrpr %g0, 1, %tl |
260 | mov PRIMARY_CONTEXT, %o4 | 261 | mov PRIMARY_CONTEXT, %o4 |
261 | ldxa [%o4] ASI_DMMU, %g2 | 262 | ldxa [%o4] ASI_DMMU, %g2 |
263 | srlx %g2, CTX_PGSZ1_NUC_SHIFT, %o3 | ||
264 | sllx %o3, CTX_PGSZ1_NUC_SHIFT, %o3 | ||
265 | or %o0, %o3, %o0 /* Preserve nucleus page size fields */ | ||
262 | stxa %o0, [%o4] ASI_DMMU | 266 | stxa %o0, [%o4] ASI_DMMU |
263 | 1: sub %o1, (1 << 3), %o1 | 267 | 1: sub %o1, (1 << 3), %o1 |
264 | ldx [%o2 + %o1], %o3 | 268 | ldx [%o2 + %o1], %o3 |
@@ -311,14 +315,14 @@ cheetah_patch_cachetlbops: | |||
311 | sethi %hi(__cheetah_flush_tlb_mm), %o1 | 315 | sethi %hi(__cheetah_flush_tlb_mm), %o1 |
312 | or %o1, %lo(__cheetah_flush_tlb_mm), %o1 | 316 | or %o1, %lo(__cheetah_flush_tlb_mm), %o1 |
313 | call cheetah_patch_one | 317 | call cheetah_patch_one |
314 | mov 15, %o2 | 318 | mov 18, %o2 |
315 | 319 | ||
316 | sethi %hi(__flush_tlb_pending), %o0 | 320 | sethi %hi(__flush_tlb_pending), %o0 |
317 | or %o0, %lo(__flush_tlb_pending), %o0 | 321 | or %o0, %lo(__flush_tlb_pending), %o0 |
318 | sethi %hi(__cheetah_flush_tlb_pending), %o1 | 322 | sethi %hi(__cheetah_flush_tlb_pending), %o1 |
319 | or %o1, %lo(__cheetah_flush_tlb_pending), %o1 | 323 | or %o1, %lo(__cheetah_flush_tlb_pending), %o1 |
320 | call cheetah_patch_one | 324 | call cheetah_patch_one |
321 | mov 23, %o2 | 325 | mov 26, %o2 |
322 | 326 | ||
323 | #ifdef DCACHE_ALIASING_POSSIBLE | 327 | #ifdef DCACHE_ALIASING_POSSIBLE |
324 | sethi %hi(__flush_dcache_page), %o0 | 328 | sethi %hi(__flush_dcache_page), %o0 |
@@ -352,9 +356,12 @@ cheetah_patch_cachetlbops: | |||
352 | .globl xcall_flush_tlb_mm | 356 | .globl xcall_flush_tlb_mm |
353 | xcall_flush_tlb_mm: | 357 | xcall_flush_tlb_mm: |
354 | mov PRIMARY_CONTEXT, %g2 | 358 | mov PRIMARY_CONTEXT, %g2 |
355 | mov 0x40, %g4 | ||
356 | ldxa [%g2] ASI_DMMU, %g3 | 359 | ldxa [%g2] ASI_DMMU, %g3 |
360 | srlx %g3, CTX_PGSZ1_NUC_SHIFT, %g4 | ||
361 | sllx %g4, CTX_PGSZ1_NUC_SHIFT, %g4 | ||
362 | or %g5, %g4, %g5 /* Preserve nucleus page size fields */ | ||
357 | stxa %g5, [%g2] ASI_DMMU | 363 | stxa %g5, [%g2] ASI_DMMU |
364 | mov 0x40, %g4 | ||
358 | stxa %g0, [%g4] ASI_DMMU_DEMAP | 365 | stxa %g0, [%g4] ASI_DMMU_DEMAP |
359 | stxa %g0, [%g4] ASI_IMMU_DEMAP | 366 | stxa %g0, [%g4] ASI_IMMU_DEMAP |
360 | stxa %g3, [%g2] ASI_DMMU | 367 | stxa %g3, [%g2] ASI_DMMU |
@@ -366,6 +373,10 @@ xcall_flush_tlb_pending: | |||
366 | sllx %g1, 3, %g1 | 373 | sllx %g1, 3, %g1 |
367 | mov PRIMARY_CONTEXT, %g4 | 374 | mov PRIMARY_CONTEXT, %g4 |
368 | ldxa [%g4] ASI_DMMU, %g2 | 375 | ldxa [%g4] ASI_DMMU, %g2 |
376 | srlx %g2, CTX_PGSZ1_NUC_SHIFT, %g4 | ||
377 | sllx %g4, CTX_PGSZ1_NUC_SHIFT, %g4 | ||
378 | or %g5, %g4, %g5 | ||
379 | mov PRIMARY_CONTEXT, %g4 | ||
369 | stxa %g5, [%g4] ASI_DMMU | 380 | stxa %g5, [%g4] ASI_DMMU |
370 | 1: sub %g1, (1 << 3), %g1 | 381 | 1: sub %g1, (1 << 3), %g1 |
371 | ldx [%g7 + %g1], %g5 | 382 | ldx [%g7 + %g1], %g5 |
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index f945444df49c..684e1f8b2755 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig | |||
@@ -73,7 +73,7 @@ config MODE_SKAS | |||
73 | to CONFIG_MODE_TT). Otherwise, it is safe to say Y. Disabling this | 73 | to CONFIG_MODE_TT). Otherwise, it is safe to say Y. Disabling this |
74 | option will shrink the UML binary slightly. | 74 | option will shrink the UML binary slightly. |
75 | 75 | ||
76 | source "arch/um/Kconfig_arch" | 76 | source "arch/um/Kconfig.arch" |
77 | source "mm/Kconfig" | 77 | source "mm/Kconfig" |
78 | 78 | ||
79 | config LD_SCRIPT_STATIC | 79 | config LD_SCRIPT_STATIC |
@@ -196,7 +196,7 @@ config HOST_2G_2G | |||
196 | config SMP | 196 | config SMP |
197 | bool "Symmetric multi-processing support (EXPERIMENTAL)" | 197 | bool "Symmetric multi-processing support (EXPERIMENTAL)" |
198 | default n | 198 | default n |
199 | depends on MODE_TT && EXPERIMENTAL | 199 | depends on (MODE_TT && EXPERIMENTAL && !SMP_BROKEN) || (BROKEN && SMP_BROKEN) |
200 | help | 200 | help |
201 | This option enables UML SMP support. | 201 | This option enables UML SMP support. |
202 | It is NOT related to having a real SMP box. Not directly, at least. | 202 | It is NOT related to having a real SMP box. Not directly, at least. |
@@ -279,7 +279,7 @@ source "net/Kconfig" | |||
279 | 279 | ||
280 | source "drivers/base/Kconfig" | 280 | source "drivers/base/Kconfig" |
281 | 281 | ||
282 | source "arch/um/Kconfig_char" | 282 | source "arch/um/Kconfig.char" |
283 | 283 | ||
284 | source "drivers/block/Kconfig" | 284 | source "drivers/block/Kconfig" |
285 | 285 | ||
@@ -287,7 +287,7 @@ config NETDEVICES | |||
287 | bool | 287 | bool |
288 | default NET | 288 | default NET |
289 | 289 | ||
290 | source "arch/um/Kconfig_net" | 290 | source "arch/um/Kconfig.net" |
291 | 291 | ||
292 | source "drivers/net/Kconfig" | 292 | source "drivers/net/Kconfig" |
293 | 293 | ||
@@ -311,7 +311,7 @@ config GENERIC_ISA_DMA | |||
311 | depends on SCSI | 311 | depends on SCSI |
312 | default y | 312 | default y |
313 | 313 | ||
314 | source "arch/um/Kconfig_scsi" | 314 | source "arch/um/Kconfig.scsi" |
315 | 315 | ||
316 | endmenu | 316 | endmenu |
317 | 317 | ||
diff --git a/arch/um/Kconfig_char b/arch/um/Kconfig.char index 62d87b71179b..62d87b71179b 100644 --- a/arch/um/Kconfig_char +++ b/arch/um/Kconfig.char | |||
diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index bd41e4286d0d..5681a8bd370b 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug | |||
@@ -2,6 +2,17 @@ menu "Kernel hacking" | |||
2 | 2 | ||
3 | source "lib/Kconfig.debug" | 3 | source "lib/Kconfig.debug" |
4 | 4 | ||
5 | config CMDLINE_ON_HOST | ||
6 | bool "Show command line arguments on the host in TT mode" | ||
7 | depends on MODE_TT | ||
8 | default !DEBUG_INFO | ||
9 | help | ||
10 | This controls whether arguments in guest processes should be shown on | ||
11 | the host's ps output. | ||
12 | Enabling this option hinders debugging on some recent GDB versions | ||
13 | (because GDB gets "confused" when we do an execvp()). So probably you | ||
14 | should disable it. | ||
15 | |||
5 | config PT_PROXY | 16 | config PT_PROXY |
6 | bool "Enable ptrace proxy" | 17 | bool "Enable ptrace proxy" |
7 | depends on XTERM_CHAN && DEBUG_INFO && MODE_TT | 18 | depends on XTERM_CHAN && DEBUG_INFO && MODE_TT |
diff --git a/arch/um/Kconfig_i386 b/arch/um/Kconfig.i386 index 27c18a8d9d17..8ad156a00499 100644 --- a/arch/um/Kconfig_i386 +++ b/arch/um/Kconfig.i386 | |||
@@ -6,6 +6,10 @@ config 64BIT | |||
6 | bool | 6 | bool |
7 | default n | 7 | default n |
8 | 8 | ||
9 | config SEMAPHORE_SLEEPERS | ||
10 | bool | ||
11 | default y | ||
12 | |||
9 | config TOP_ADDR | 13 | config TOP_ADDR |
10 | hex | 14 | hex |
11 | default 0xc0000000 if !HOST_2G_2G | 15 | default 0xc0000000 if !HOST_2G_2G |
diff --git a/arch/um/Kconfig_net b/arch/um/Kconfig.net index fa2ab2dd78b7..14a04ebdeae9 100644 --- a/arch/um/Kconfig_net +++ b/arch/um/Kconfig.net | |||
@@ -34,7 +34,7 @@ config UML_NET_ETHERTAP | |||
34 | link with the host. | 34 | link with the host. |
35 | 35 | ||
36 | To use this, your host kernel must have support for Ethertap | 36 | To use this, your host kernel must have support for Ethertap |
37 | devices. Also, if your host kernel is 2.4.x, it must have | 37 | devices. Also, if your host kernel is 2.4.x, it must have |
38 | CONFIG_NETLINK_DEV configured as Y or M. | 38 | CONFIG_NETLINK_DEV configured as Y or M. |
39 | 39 | ||
40 | For more information, see | 40 | For more information, see |
@@ -43,7 +43,7 @@ config UML_NET_ETHERTAP | |||
43 | networking. | 43 | networking. |
44 | 44 | ||
45 | If you'd like to set up an IP network with the host and/or the | 45 | If you'd like to set up an IP network with the host and/or the |
46 | outside world, say Y to this, the Daemon Transport and/or the | 46 | outside world, say Y to this, the Daemon Transport and/or the |
47 | Slip Transport. You'll need at least one of them, but may choose | 47 | Slip Transport. You'll need at least one of them, but may choose |
48 | more than one without conflict. If you don't need UML networking, | 48 | more than one without conflict. If you don't need UML networking, |
49 | say N. | 49 | say N. |
@@ -78,7 +78,7 @@ config UML_NET_SLIP | |||
78 | 78 | ||
79 | The Ethertap Transport is preferred over slip because of its | 79 | The Ethertap Transport is preferred over slip because of its |
80 | limitations. If you prefer slip, however, say Y here. Otherwise | 80 | limitations. If you prefer slip, however, say Y here. Otherwise |
81 | choose the Multicast transport (to network multiple UMLs on | 81 | choose the Multicast transport (to network multiple UMLs on |
82 | multiple hosts), Ethertap (to network with the host and the | 82 | multiple hosts), Ethertap (to network with the host and the |
83 | outside world), and/or the Daemon transport (to network multiple | 83 | outside world), and/or the Daemon transport (to network multiple |
84 | UMLs on a single host). You may choose more than one without | 84 | UMLs on a single host). You may choose more than one without |
@@ -138,7 +138,7 @@ config UML_NET_PCAP | |||
138 | depends on UML_NET && EXPERIMENTAL | 138 | depends on UML_NET && EXPERIMENTAL |
139 | help | 139 | help |
140 | The pcap transport makes a pcap packet stream on the host look | 140 | The pcap transport makes a pcap packet stream on the host look |
141 | like an ethernet device inside UML. This is useful for making | 141 | like an ethernet device inside UML. This is useful for making |
142 | UML act as a network monitor for the host. You must have libcap | 142 | UML act as a network monitor for the host. You must have libcap |
143 | installed in order to build the pcap transport into UML. | 143 | installed in order to build the pcap transport into UML. |
144 | 144 | ||
@@ -169,11 +169,11 @@ config UML_NET_SLIRP | |||
169 | setup string. The effect of this transport on the UML is similar | 169 | setup string. The effect of this transport on the UML is similar |
170 | that of a host behind a firewall that masquerades all network | 170 | that of a host behind a firewall that masquerades all network |
171 | connections passing through it (but is less secure). | 171 | connections passing through it (but is less secure). |
172 | 172 | ||
173 | To use this you should first have slirp compiled somewhere | 173 | To use this you should first have slirp compiled somewhere |
174 | accessible on the host, and have read its documentation. If you | 174 | accessible on the host, and have read its documentation. If you |
175 | don't need UML networking, say N. | 175 | don't need UML networking, say N. |
176 | 176 | ||
177 | Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp" | 177 | Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp" |
178 | 178 | ||
179 | endmenu | 179 | endmenu |
diff --git a/arch/um/Kconfig_scsi b/arch/um/Kconfig.scsi index c291c942b1a8..c291c942b1a8 100644 --- a/arch/um/Kconfig_scsi +++ b/arch/um/Kconfig.scsi | |||
diff --git a/arch/um/Kconfig_x86_64 b/arch/um/Kconfig.x86_64 index 735a047c890c..bd35e59419c8 100644 --- a/arch/um/Kconfig_x86_64 +++ b/arch/um/Kconfig.x86_64 | |||
@@ -6,6 +6,10 @@ config 64BIT | |||
6 | bool | 6 | bool |
7 | default y | 7 | default y |
8 | 8 | ||
9 | config SEMAPHORE_SLEEPERS | ||
10 | bool | ||
11 | default y | ||
12 | |||
9 | config TOP_ADDR | 13 | config TOP_ADDR |
10 | hex | 14 | hex |
11 | default 0x80000000 | 15 | default 0x80000000 |
@@ -33,3 +37,7 @@ config ARCH_HAS_SC_SIGNALS | |||
33 | config ARCH_REUSE_HOST_VSYSCALL_AREA | 37 | config ARCH_REUSE_HOST_VSYSCALL_AREA |
34 | bool | 38 | bool |
35 | default n | 39 | default n |
40 | |||
41 | config SMP_BROKEN | ||
42 | bool | ||
43 | default y | ||
diff --git a/arch/um/Makefile b/arch/um/Makefile index f5a83a72aa75..b15f6048caae 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -56,6 +56,7 @@ SYS_DIR := $(ARCH_DIR)/include/sysdep-$(SUBARCH) | |||
56 | 56 | ||
57 | CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ | 57 | CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \ |
58 | $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap | 58 | $(ARCH_INCLUDE) $(MODE_INCLUDE) -Dvmap=kernel_vmap |
59 | AFLAGS += $(ARCH_INCLUDE) | ||
59 | 60 | ||
60 | USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) | 61 | USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) |
61 | USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ | 62 | USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \ |
@@ -101,10 +102,10 @@ define archhelp | |||
101 | endef | 102 | endef |
102 | 103 | ||
103 | ifneq ($(KBUILD_SRC),) | 104 | ifneq ($(KBUILD_SRC),) |
104 | $(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig_$(SUBARCH) $(ARCH_DIR)/Kconfig_arch) | 105 | $(shell mkdir -p $(ARCH_DIR) && ln -fsn $(srctree)/$(ARCH_DIR)/Kconfig.$(SUBARCH) $(ARCH_DIR)/Kconfig.arch) |
105 | CLEAN_FILES += $(ARCH_DIR)/Kconfig_arch | 106 | CLEAN_FILES += $(ARCH_DIR)/Kconfig.arch |
106 | else | 107 | else |
107 | $(shell cd $(ARCH_DIR) && ln -sf Kconfig_$(SUBARCH) Kconfig_arch) | 108 | $(shell cd $(ARCH_DIR) && ln -sf Kconfig.$(SUBARCH) Kconfig.arch) |
108 | endif | 109 | endif |
109 | 110 | ||
110 | prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) | 111 | prepare: $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) |
@@ -147,7 +148,7 @@ CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/include/uml-config.h \ | |||
147 | 148 | ||
148 | MRPROPER_FILES += $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) \ | 149 | MRPROPER_FILES += $(SYMLINK_HEADERS) $(ARCH_SYMLINKS) \ |
149 | $(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) $(ARCH_DIR)/os \ | 150 | $(addprefix $(ARCH_DIR)/kernel/,$(KERN_SYMLINKS)) $(ARCH_DIR)/os \ |
150 | $(ARCH_DIR)/Kconfig_arch | 151 | $(ARCH_DIR)/Kconfig.arch |
151 | 152 | ||
152 | archclean: | 153 | archclean: |
153 | $(Q)$(MAKE) $(clean)=$(ARCH_DIR)/util | 154 | $(Q)$(MAKE) $(clean)=$(ARCH_DIR)/util |
diff --git a/arch/um/Makefile-x86_64 b/arch/um/Makefile-x86_64 index aa2f7174ebca..baddb5d64ca5 100644 --- a/arch/um/Makefile-x86_64 +++ b/arch/um/Makefile-x86_64 | |||
@@ -6,7 +6,7 @@ START := 0x60000000 | |||
6 | 6 | ||
7 | #We #undef __x86_64__ for kernelspace, not for userspace where | 7 | #We #undef __x86_64__ for kernelspace, not for userspace where |
8 | #it's needed for headers to work! | 8 | #it's needed for headers to work! |
9 | CFLAGS += -U__$(SUBARCH)__ -fno-builtin $(STUB_CFLAGS) | 9 | CFLAGS += -U__$(SUBARCH)__ -fno-builtin |
10 | USER_CFLAGS += -fno-builtin | 10 | USER_CFLAGS += -fno-builtin |
11 | 11 | ||
12 | ELF_ARCH := i386:x86-64 | 12 | ELF_ARCH := i386:x86-64 |
diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile index de17d4c6e02d..783e18cae090 100644 --- a/arch/um/drivers/Makefile +++ b/arch/um/drivers/Makefile | |||
@@ -13,7 +13,7 @@ mcast-objs := mcast_kern.o mcast_user.o | |||
13 | net-objs := net_kern.o net_user.o | 13 | net-objs := net_kern.o net_user.o |
14 | mconsole-objs := mconsole_kern.o mconsole_user.o | 14 | mconsole-objs := mconsole_kern.o mconsole_user.o |
15 | hostaudio-objs := hostaudio_kern.o | 15 | hostaudio-objs := hostaudio_kern.o |
16 | ubd-objs := ubd_kern.o ubd_user.o | 16 | ubd-objs := ubd_kern.o |
17 | port-objs := port_kern.o port_user.o | 17 | port-objs := port_kern.o port_user.o |
18 | harddog-objs := harddog_kern.o harddog_user.o | 18 | harddog-objs := harddog_kern.o harddog_user.o |
19 | 19 | ||
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index 5d3768156c92..de3bce71aeb3 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c | |||
@@ -63,7 +63,7 @@ error: | |||
63 | * | 63 | * |
64 | * SIGWINCH can't be received synchronously, so you have to set up to receive it | 64 | * SIGWINCH can't be received synchronously, so you have to set up to receive it |
65 | * as a signal. That being the case, if you are going to wait for it, it is | 65 | * as a signal. That being the case, if you are going to wait for it, it is |
66 | * convenient to sit in a pause() and wait for the signal to bounce you out of | 66 | * convenient to sit in sigsuspend() and wait for the signal to bounce you out of |
67 | * it (see below for how we make sure to exit only on SIGWINCH). | 67 | * it (see below for how we make sure to exit only on SIGWINCH). |
68 | */ | 68 | */ |
69 | 69 | ||
@@ -94,18 +94,19 @@ static int winch_thread(void *arg) | |||
94 | "byte, err = %d\n", -count); | 94 | "byte, err = %d\n", -count); |
95 | 95 | ||
96 | /* We are not using SIG_IGN on purpose, so don't fix it as I thought to | 96 | /* We are not using SIG_IGN on purpose, so don't fix it as I thought to |
97 | * do! If using SIG_IGN, the pause() call below would not stop on | 97 | * do! If using SIG_IGN, the sigsuspend() call below would not stop on |
98 | * SIGWINCH. */ | 98 | * SIGWINCH. */ |
99 | 99 | ||
100 | signal(SIGWINCH, winch_handler); | 100 | signal(SIGWINCH, winch_handler); |
101 | sigfillset(&sigs); | 101 | sigfillset(&sigs); |
102 | sigdelset(&sigs, SIGWINCH); | 102 | /* Block all signals possible. */ |
103 | /* Block anything else than SIGWINCH. */ | ||
104 | if(sigprocmask(SIG_SETMASK, &sigs, NULL) < 0){ | 103 | if(sigprocmask(SIG_SETMASK, &sigs, NULL) < 0){ |
105 | printk("winch_thread : sigprocmask failed, errno = %d\n", | 104 | printk("winch_thread : sigprocmask failed, errno = %d\n", |
106 | errno); | 105 | errno); |
107 | exit(1); | 106 | exit(1); |
108 | } | 107 | } |
108 | /* In sigsuspend(), block anything else than SIGWINCH. */ | ||
109 | sigdelset(&sigs, SIGWINCH); | ||
109 | 110 | ||
110 | if(setsid() < 0){ | 111 | if(setsid() < 0){ |
111 | printk("winch_thread : setsid failed, errno = %d\n", errno); | 112 | printk("winch_thread : setsid failed, errno = %d\n", errno); |
@@ -130,7 +131,7 @@ static int winch_thread(void *arg) | |||
130 | while(1){ | 131 | while(1){ |
131 | /* This will be interrupted by SIGWINCH only, since other signals | 132 | /* This will be interrupted by SIGWINCH only, since other signals |
132 | * are blocked.*/ | 133 | * are blocked.*/ |
133 | pause(); | 134 | sigsuspend(&sigs); |
134 | 135 | ||
135 | count = os_write_file(pipe_fd, &c, sizeof(c)); | 136 | count = os_write_file(pipe_fd, &c, sizeof(c)); |
136 | if(count != sizeof(c)) | 137 | if(count != sizeof(c)) |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 344b24d09a7c..e77a38da4350 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include "linux/blkpg.h" | 35 | #include "linux/blkpg.h" |
36 | #include "linux/genhd.h" | 36 | #include "linux/genhd.h" |
37 | #include "linux/spinlock.h" | 37 | #include "linux/spinlock.h" |
38 | #include "asm/atomic.h" | ||
38 | #include "asm/segment.h" | 39 | #include "asm/segment.h" |
39 | #include "asm/uaccess.h" | 40 | #include "asm/uaccess.h" |
40 | #include "asm/irq.h" | 41 | #include "asm/irq.h" |
@@ -53,20 +54,21 @@ | |||
53 | #include "mem.h" | 54 | #include "mem.h" |
54 | #include "mem_kern.h" | 55 | #include "mem_kern.h" |
55 | #include "cow.h" | 56 | #include "cow.h" |
57 | #include "aio.h" | ||
56 | 58 | ||
57 | enum ubd_req { UBD_READ, UBD_WRITE }; | 59 | enum ubd_req { UBD_READ, UBD_WRITE }; |
58 | 60 | ||
59 | struct io_thread_req { | 61 | struct io_thread_req { |
60 | enum ubd_req op; | 62 | enum aio_type op; |
61 | int fds[2]; | 63 | int fds[2]; |
62 | unsigned long offsets[2]; | 64 | unsigned long offsets[2]; |
63 | unsigned long long offset; | 65 | unsigned long long offset; |
64 | unsigned long length; | 66 | unsigned long length; |
65 | char *buffer; | 67 | char *buffer; |
66 | int sectorsize; | 68 | int sectorsize; |
67 | unsigned long sector_mask; | 69 | int bitmap_offset; |
68 | unsigned long long cow_offset; | 70 | long bitmap_start; |
69 | unsigned long bitmap_words[2]; | 71 | long bitmap_end; |
70 | int error; | 72 | int error; |
71 | }; | 73 | }; |
72 | 74 | ||
@@ -80,28 +82,31 @@ extern int create_cow_file(char *cow_file, char *backing_file, | |||
80 | unsigned long *bitmap_len_out, | 82 | unsigned long *bitmap_len_out, |
81 | int *data_offset_out); | 83 | int *data_offset_out); |
82 | extern int read_cow_bitmap(int fd, void *buf, int offset, int len); | 84 | extern int read_cow_bitmap(int fd, void *buf, int offset, int len); |
83 | extern void do_io(struct io_thread_req *req); | 85 | extern void do_io(struct io_thread_req *req, struct request *r, |
86 | unsigned long *bitmap); | ||
84 | 87 | ||
85 | static inline int ubd_test_bit(__u64 bit, unsigned char *data) | 88 | static inline int ubd_test_bit(__u64 bit, void *data) |
86 | { | 89 | { |
90 | unsigned char *buffer = data; | ||
87 | __u64 n; | 91 | __u64 n; |
88 | int bits, off; | 92 | int bits, off; |
89 | 93 | ||
90 | bits = sizeof(data[0]) * 8; | 94 | bits = sizeof(buffer[0]) * 8; |
91 | n = bit / bits; | 95 | n = bit / bits; |
92 | off = bit % bits; | 96 | off = bit % bits; |
93 | return((data[n] & (1 << off)) != 0); | 97 | return((buffer[n] & (1 << off)) != 0); |
94 | } | 98 | } |
95 | 99 | ||
96 | static inline void ubd_set_bit(__u64 bit, unsigned char *data) | 100 | static inline void ubd_set_bit(__u64 bit, void *data) |
97 | { | 101 | { |
102 | unsigned char *buffer = data; | ||
98 | __u64 n; | 103 | __u64 n; |
99 | int bits, off; | 104 | int bits, off; |
100 | 105 | ||
101 | bits = sizeof(data[0]) * 8; | 106 | bits = sizeof(buffer[0]) * 8; |
102 | n = bit / bits; | 107 | n = bit / bits; |
103 | off = bit % bits; | 108 | off = bit % bits; |
104 | data[n] |= (1 << off); | 109 | buffer[n] |= (1 << off); |
105 | } | 110 | } |
106 | /*End stuff from ubd_user.h*/ | 111 | /*End stuff from ubd_user.h*/ |
107 | 112 | ||
@@ -110,8 +115,6 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data) | |||
110 | static DEFINE_SPINLOCK(ubd_io_lock); | 115 | static DEFINE_SPINLOCK(ubd_io_lock); |
111 | static DEFINE_SPINLOCK(ubd_lock); | 116 | static DEFINE_SPINLOCK(ubd_lock); |
112 | 117 | ||
113 | static void (*do_ubd)(void); | ||
114 | |||
115 | static int ubd_open(struct inode * inode, struct file * filp); | 118 | static int ubd_open(struct inode * inode, struct file * filp); |
116 | static int ubd_release(struct inode * inode, struct file * file); | 119 | static int ubd_release(struct inode * inode, struct file * file); |
117 | static int ubd_ioctl(struct inode * inode, struct file * file, | 120 | static int ubd_ioctl(struct inode * inode, struct file * file, |
@@ -158,6 +161,8 @@ struct cow { | |||
158 | int data_offset; | 161 | int data_offset; |
159 | }; | 162 | }; |
160 | 163 | ||
164 | #define MAX_SG 64 | ||
165 | |||
161 | struct ubd { | 166 | struct ubd { |
162 | char *file; | 167 | char *file; |
163 | int count; | 168 | int count; |
@@ -168,6 +173,7 @@ struct ubd { | |||
168 | int no_cow; | 173 | int no_cow; |
169 | struct cow cow; | 174 | struct cow cow; |
170 | struct platform_device pdev; | 175 | struct platform_device pdev; |
176 | struct scatterlist sg[MAX_SG]; | ||
171 | }; | 177 | }; |
172 | 178 | ||
173 | #define DEFAULT_COW { \ | 179 | #define DEFAULT_COW { \ |
@@ -460,80 +466,113 @@ __uml_help(fakehd, | |||
460 | ); | 466 | ); |
461 | 467 | ||
462 | static void do_ubd_request(request_queue_t * q); | 468 | static void do_ubd_request(request_queue_t * q); |
463 | 469 | static int in_ubd; | |
464 | /* Only changed by ubd_init, which is an initcall. */ | ||
465 | int thread_fd = -1; | ||
466 | 470 | ||
467 | /* Changed by ubd_handler, which is serialized because interrupts only | 471 | /* Changed by ubd_handler, which is serialized because interrupts only |
468 | * happen on CPU 0. | 472 | * happen on CPU 0. |
469 | */ | 473 | */ |
470 | int intr_count = 0; | 474 | int intr_count = 0; |
471 | 475 | ||
472 | /* call ubd_finish if you need to serialize */ | 476 | static void ubd_end_request(struct request *req, int bytes, int uptodate) |
473 | static void __ubd_finish(struct request *req, int error) | ||
474 | { | 477 | { |
475 | int nsect; | 478 | if (!end_that_request_first(req, uptodate, bytes >> 9)) { |
476 | 479 | add_disk_randomness(req->rq_disk); | |
477 | if(error){ | 480 | end_that_request_last(req); |
478 | end_request(req, 0); | ||
479 | return; | ||
480 | } | 481 | } |
481 | nsect = req->current_nr_sectors; | ||
482 | req->sector += nsect; | ||
483 | req->buffer += nsect << 9; | ||
484 | req->errors = 0; | ||
485 | req->nr_sectors -= nsect; | ||
486 | req->current_nr_sectors = 0; | ||
487 | end_request(req, 1); | ||
488 | } | 482 | } |
489 | 483 | ||
490 | static inline void ubd_finish(struct request *req, int error) | 484 | /* call ubd_finish if you need to serialize */ |
485 | static void __ubd_finish(struct request *req, int bytes) | ||
491 | { | 486 | { |
492 | spin_lock(&ubd_io_lock); | 487 | if(bytes < 0){ |
493 | __ubd_finish(req, error); | 488 | ubd_end_request(req, 0, 0); |
494 | spin_unlock(&ubd_io_lock); | 489 | return; |
490 | } | ||
491 | |||
492 | ubd_end_request(req, bytes, 1); | ||
495 | } | 493 | } |
496 | 494 | ||
497 | /* Called without ubd_io_lock held */ | 495 | static inline void ubd_finish(struct request *req, int bytes) |
498 | static void ubd_handler(void) | ||
499 | { | 496 | { |
500 | struct io_thread_req req; | 497 | spin_lock(&ubd_io_lock); |
501 | struct request *rq = elv_next_request(ubd_queue); | 498 | __ubd_finish(req, bytes); |
502 | int n; | 499 | spin_unlock(&ubd_io_lock); |
503 | |||
504 | do_ubd = NULL; | ||
505 | intr_count++; | ||
506 | n = os_read_file(thread_fd, &req, sizeof(req)); | ||
507 | if(n != sizeof(req)){ | ||
508 | printk(KERN_ERR "Pid %d - spurious interrupt in ubd_handler, " | ||
509 | "err = %d\n", os_getpid(), -n); | ||
510 | spin_lock(&ubd_io_lock); | ||
511 | end_request(rq, 0); | ||
512 | spin_unlock(&ubd_io_lock); | ||
513 | return; | ||
514 | } | ||
515 | |||
516 | ubd_finish(rq, req.error); | ||
517 | reactivate_fd(thread_fd, UBD_IRQ); | ||
518 | do_ubd_request(ubd_queue); | ||
519 | } | 500 | } |
520 | 501 | ||
502 | struct bitmap_io { | ||
503 | atomic_t count; | ||
504 | struct aio_context aio; | ||
505 | }; | ||
506 | |||
507 | struct ubd_aio { | ||
508 | struct aio_context aio; | ||
509 | struct request *req; | ||
510 | int len; | ||
511 | struct bitmap_io *bitmap; | ||
512 | void *bitmap_buf; | ||
513 | }; | ||
514 | |||
515 | static int ubd_reply_fd = -1; | ||
516 | |||
521 | static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused) | 517 | static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused) |
522 | { | 518 | { |
523 | ubd_handler(); | 519 | struct aio_thread_reply reply; |
524 | return(IRQ_HANDLED); | 520 | struct ubd_aio *aio; |
525 | } | 521 | struct request *req; |
522 | int err, n, fd = (int) (long) dev; | ||
523 | |||
524 | while(1){ | ||
525 | err = os_read_file(fd, &reply, sizeof(reply)); | ||
526 | if(err == -EAGAIN) | ||
527 | break; | ||
528 | if(err < 0){ | ||
529 | printk("ubd_aio_handler - read returned err %d\n", | ||
530 | -err); | ||
531 | break; | ||
532 | } | ||
526 | 533 | ||
527 | /* Only changed by ubd_init, which is an initcall. */ | 534 | aio = container_of(reply.data, struct ubd_aio, aio); |
528 | static int io_pid = -1; | 535 | n = reply.err; |
529 | 536 | ||
530 | void kill_io_thread(void) | 537 | if(n == 0){ |
531 | { | 538 | req = aio->req; |
532 | if(io_pid != -1) | 539 | req->nr_sectors -= aio->len >> 9; |
533 | os_kill_process(io_pid, 1); | 540 | |
534 | } | 541 | if((aio->bitmap != NULL) && |
542 | (atomic_dec_and_test(&aio->bitmap->count))){ | ||
543 | aio->aio = aio->bitmap->aio; | ||
544 | aio->len = 0; | ||
545 | kfree(aio->bitmap); | ||
546 | aio->bitmap = NULL; | ||
547 | submit_aio(&aio->aio); | ||
548 | } | ||
549 | else { | ||
550 | if((req->nr_sectors == 0) && | ||
551 | (aio->bitmap == NULL)){ | ||
552 | int len = req->hard_nr_sectors << 9; | ||
553 | ubd_finish(req, len); | ||
554 | } | ||
555 | |||
556 | if(aio->bitmap_buf != NULL) | ||
557 | kfree(aio->bitmap_buf); | ||
558 | kfree(aio); | ||
559 | } | ||
560 | } | ||
561 | else if(n < 0){ | ||
562 | ubd_finish(aio->req, n); | ||
563 | if(aio->bitmap != NULL) | ||
564 | kfree(aio->bitmap); | ||
565 | if(aio->bitmap_buf != NULL) | ||
566 | kfree(aio->bitmap_buf); | ||
567 | kfree(aio); | ||
568 | } | ||
569 | } | ||
570 | reactivate_fd(fd, UBD_IRQ); | ||
535 | 571 | ||
536 | __uml_exitcall(kill_io_thread); | 572 | do_ubd_request(ubd_queue); |
573 | |||
574 | return(IRQ_HANDLED); | ||
575 | } | ||
537 | 576 | ||
538 | static int ubd_file_size(struct ubd *dev, __u64 *size_out) | 577 | static int ubd_file_size(struct ubd *dev, __u64 *size_out) |
539 | { | 578 | { |
@@ -569,7 +608,7 @@ static int ubd_open_dev(struct ubd *dev) | |||
569 | &dev->cow.data_offset, create_ptr); | 608 | &dev->cow.data_offset, create_ptr); |
570 | 609 | ||
571 | if((dev->fd == -ENOENT) && create_cow){ | 610 | if((dev->fd == -ENOENT) && create_cow){ |
572 | dev->fd = create_cow_file(dev->file, dev->cow.file, | 611 | dev->fd = create_cow_file(dev->file, dev->cow.file, |
573 | dev->openflags, 1 << 9, PAGE_SIZE, | 612 | dev->openflags, 1 << 9, PAGE_SIZE, |
574 | &dev->cow.bitmap_offset, | 613 | &dev->cow.bitmap_offset, |
575 | &dev->cow.bitmap_len, | 614 | &dev->cow.bitmap_len, |
@@ -668,21 +707,22 @@ static int ubd_add(int n) | |||
668 | struct ubd *dev = &ubd_dev[n]; | 707 | struct ubd *dev = &ubd_dev[n]; |
669 | int err; | 708 | int err; |
670 | 709 | ||
710 | err = -ENODEV; | ||
671 | if(dev->file == NULL) | 711 | if(dev->file == NULL) |
672 | return(-ENODEV); | 712 | goto out; |
673 | 713 | ||
674 | if (ubd_open_dev(dev)) | 714 | if (ubd_open_dev(dev)) |
675 | return(-ENODEV); | 715 | goto out; |
676 | 716 | ||
677 | err = ubd_file_size(dev, &dev->size); | 717 | err = ubd_file_size(dev, &dev->size); |
678 | if(err < 0) | 718 | if(err < 0) |
679 | return(err); | 719 | goto out_close; |
680 | 720 | ||
681 | dev->size = ROUND_BLOCK(dev->size); | 721 | dev->size = ROUND_BLOCK(dev->size); |
682 | 722 | ||
683 | err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]); | 723 | err = ubd_new_disk(MAJOR_NR, dev->size, n, &ubd_gendisk[n]); |
684 | if(err) | 724 | if(err) |
685 | return(err); | 725 | goto out_close; |
686 | 726 | ||
687 | if(fake_major != MAJOR_NR) | 727 | if(fake_major != MAJOR_NR) |
688 | ubd_new_disk(fake_major, dev->size, n, | 728 | ubd_new_disk(fake_major, dev->size, n, |
@@ -693,8 +733,11 @@ static int ubd_add(int n) | |||
693 | if (fake_ide) | 733 | if (fake_ide) |
694 | make_ide_entries(ubd_gendisk[n]->disk_name); | 734 | make_ide_entries(ubd_gendisk[n]->disk_name); |
695 | 735 | ||
736 | err = 0; | ||
737 | out_close: | ||
696 | ubd_close(dev); | 738 | ubd_close(dev); |
697 | return 0; | 739 | out: |
740 | return err; | ||
698 | } | 741 | } |
699 | 742 | ||
700 | static int ubd_config(char *str) | 743 | static int ubd_config(char *str) |
@@ -827,6 +870,10 @@ int ubd_init(void) | |||
827 | { | 870 | { |
828 | int i; | 871 | int i; |
829 | 872 | ||
873 | ubd_reply_fd = init_aio_irq(UBD_IRQ, "ubd", ubd_intr); | ||
874 | if(ubd_reply_fd < 0) | ||
875 | printk("Setting up ubd AIO failed, err = %d\n", ubd_reply_fd); | ||
876 | |||
830 | devfs_mk_dir("ubd"); | 877 | devfs_mk_dir("ubd"); |
831 | if (register_blkdev(MAJOR_NR, "ubd")) | 878 | if (register_blkdev(MAJOR_NR, "ubd")) |
832 | return -1; | 879 | return -1; |
@@ -837,6 +884,7 @@ int ubd_init(void) | |||
837 | return -1; | 884 | return -1; |
838 | } | 885 | } |
839 | 886 | ||
887 | blk_queue_max_hw_segments(ubd_queue, MAX_SG); | ||
840 | if (fake_major != MAJOR_NR) { | 888 | if (fake_major != MAJOR_NR) { |
841 | char name[sizeof("ubd_nnn\0")]; | 889 | char name[sizeof("ubd_nnn\0")]; |
842 | 890 | ||
@@ -848,40 +896,12 @@ int ubd_init(void) | |||
848 | driver_register(&ubd_driver); | 896 | driver_register(&ubd_driver); |
849 | for (i = 0; i < MAX_DEV; i++) | 897 | for (i = 0; i < MAX_DEV; i++) |
850 | ubd_add(i); | 898 | ubd_add(i); |
899 | |||
851 | return 0; | 900 | return 0; |
852 | } | 901 | } |
853 | 902 | ||
854 | late_initcall(ubd_init); | 903 | late_initcall(ubd_init); |
855 | 904 | ||
856 | int ubd_driver_init(void){ | ||
857 | unsigned long stack; | ||
858 | int err; | ||
859 | |||
860 | /* Set by CONFIG_BLK_DEV_UBD_SYNC or ubd=sync.*/ | ||
861 | if(global_openflags.s){ | ||
862 | printk(KERN_INFO "ubd: Synchronous mode\n"); | ||
863 | /* Letting ubd=sync be like using ubd#s= instead of ubd#= is | ||
864 | * enough. So use anyway the io thread. */ | ||
865 | } | ||
866 | stack = alloc_stack(0, 0); | ||
867 | io_pid = start_io_thread(stack + PAGE_SIZE - sizeof(void *), | ||
868 | &thread_fd); | ||
869 | if(io_pid < 0){ | ||
870 | printk(KERN_ERR | ||
871 | "ubd : Failed to start I/O thread (errno = %d) - " | ||
872 | "falling back to synchronous I/O\n", -io_pid); | ||
873 | io_pid = -1; | ||
874 | return(0); | ||
875 | } | ||
876 | err = um_request_irq(UBD_IRQ, thread_fd, IRQ_READ, ubd_intr, | ||
877 | SA_INTERRUPT, "ubd", ubd_dev); | ||
878 | if(err != 0) | ||
879 | printk(KERN_ERR "um_request_irq failed - errno = %d\n", -err); | ||
880 | return(err); | ||
881 | } | ||
882 | |||
883 | device_initcall(ubd_driver_init); | ||
884 | |||
885 | static int ubd_open(struct inode *inode, struct file *filp) | 905 | static int ubd_open(struct inode *inode, struct file *filp) |
886 | { | 906 | { |
887 | struct gendisk *disk = inode->i_bdev->bd_disk; | 907 | struct gendisk *disk = inode->i_bdev->bd_disk; |
@@ -919,105 +939,55 @@ static int ubd_release(struct inode * inode, struct file * file) | |||
919 | return(0); | 939 | return(0); |
920 | } | 940 | } |
921 | 941 | ||
922 | static void cowify_bitmap(__u64 io_offset, int length, unsigned long *cow_mask, | 942 | static void cowify_bitmap(struct io_thread_req *req, unsigned long *bitmap) |
923 | __u64 *cow_offset, unsigned long *bitmap, | ||
924 | __u64 bitmap_offset, unsigned long *bitmap_words, | ||
925 | __u64 bitmap_len) | ||
926 | { | 943 | { |
927 | __u64 sector = io_offset >> 9; | 944 | __u64 sector = req->offset / req->sectorsize; |
928 | int i, update_bitmap = 0; | 945 | int i; |
929 | |||
930 | for(i = 0; i < length >> 9; i++){ | ||
931 | if(cow_mask != NULL) | ||
932 | ubd_set_bit(i, (unsigned char *) cow_mask); | ||
933 | if(ubd_test_bit(sector + i, (unsigned char *) bitmap)) | ||
934 | continue; | ||
935 | |||
936 | update_bitmap = 1; | ||
937 | ubd_set_bit(sector + i, (unsigned char *) bitmap); | ||
938 | } | ||
939 | |||
940 | if(!update_bitmap) | ||
941 | return; | ||
942 | |||
943 | *cow_offset = sector / (sizeof(unsigned long) * 8); | ||
944 | |||
945 | /* This takes care of the case where we're exactly at the end of the | ||
946 | * device, and *cow_offset + 1 is off the end. So, just back it up | ||
947 | * by one word. Thanks to Lynn Kerby for the fix and James McMechan | ||
948 | * for the original diagnosis. | ||
949 | */ | ||
950 | if(*cow_offset == ((bitmap_len + sizeof(unsigned long) - 1) / | ||
951 | sizeof(unsigned long) - 1)) | ||
952 | (*cow_offset)--; | ||
953 | |||
954 | bitmap_words[0] = bitmap[*cow_offset]; | ||
955 | bitmap_words[1] = bitmap[*cow_offset + 1]; | ||
956 | |||
957 | *cow_offset *= sizeof(unsigned long); | ||
958 | *cow_offset += bitmap_offset; | ||
959 | } | ||
960 | 946 | ||
961 | static void cowify_req(struct io_thread_req *req, unsigned long *bitmap, | 947 | for(i = 0; i < req->length / req->sectorsize; i++){ |
962 | __u64 bitmap_offset, __u64 bitmap_len) | 948 | if(ubd_test_bit(sector + i, bitmap)) |
963 | { | 949 | continue; |
964 | __u64 sector = req->offset >> 9; | ||
965 | int i; | ||
966 | 950 | ||
967 | if(req->length > (sizeof(req->sector_mask) * 8) << 9) | 951 | if(req->bitmap_start == -1) |
968 | panic("Operation too long"); | 952 | req->bitmap_start = sector + i; |
953 | req->bitmap_end = sector + i + 1; | ||
969 | 954 | ||
970 | if(req->op == UBD_READ) { | 955 | ubd_set_bit(sector + i, bitmap); |
971 | for(i = 0; i < req->length >> 9; i++){ | 956 | } |
972 | if(ubd_test_bit(sector + i, (unsigned char *) bitmap)) | ||
973 | ubd_set_bit(i, (unsigned char *) | ||
974 | &req->sector_mask); | ||
975 | } | ||
976 | } | ||
977 | else cowify_bitmap(req->offset, req->length, &req->sector_mask, | ||
978 | &req->cow_offset, bitmap, bitmap_offset, | ||
979 | req->bitmap_words, bitmap_len); | ||
980 | } | 957 | } |
981 | 958 | ||
982 | /* Called with ubd_io_lock held */ | 959 | /* Called with ubd_io_lock held */ |
983 | static int prepare_request(struct request *req, struct io_thread_req *io_req) | 960 | static int prepare_request(struct request *req, struct io_thread_req *io_req, |
961 | unsigned long long offset, int page_offset, | ||
962 | int len, struct page *page) | ||
984 | { | 963 | { |
985 | struct gendisk *disk = req->rq_disk; | 964 | struct gendisk *disk = req->rq_disk; |
986 | struct ubd *dev = disk->private_data; | 965 | struct ubd *dev = disk->private_data; |
987 | __u64 offset; | ||
988 | int len; | ||
989 | |||
990 | if(req->rq_status == RQ_INACTIVE) return(1); | ||
991 | 966 | ||
992 | /* This should be impossible now */ | 967 | /* This should be impossible now */ |
993 | if((rq_data_dir(req) == WRITE) && !dev->openflags.w){ | 968 | if((rq_data_dir(req) == WRITE) && !dev->openflags.w){ |
994 | printk("Write attempted on readonly ubd device %s\n", | 969 | printk("Write attempted on readonly ubd device %s\n", |
995 | disk->disk_name); | 970 | disk->disk_name); |
996 | end_request(req, 0); | 971 | ubd_end_request(req, 0, 0); |
997 | return(1); | 972 | return(1); |
998 | } | 973 | } |
999 | 974 | ||
1000 | offset = ((__u64) req->sector) << 9; | ||
1001 | len = req->current_nr_sectors << 9; | ||
1002 | |||
1003 | io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd; | 975 | io_req->fds[0] = (dev->cow.file != NULL) ? dev->cow.fd : dev->fd; |
1004 | io_req->fds[1] = dev->fd; | 976 | io_req->fds[1] = dev->fd; |
1005 | io_req->cow_offset = -1; | ||
1006 | io_req->offset = offset; | 977 | io_req->offset = offset; |
1007 | io_req->length = len; | 978 | io_req->length = len; |
1008 | io_req->error = 0; | 979 | io_req->error = 0; |
1009 | io_req->sector_mask = 0; | 980 | io_req->op = (rq_data_dir(req) == READ) ? AIO_READ : AIO_WRITE; |
1010 | |||
1011 | io_req->op = (rq_data_dir(req) == READ) ? UBD_READ : UBD_WRITE; | ||
1012 | io_req->offsets[0] = 0; | 981 | io_req->offsets[0] = 0; |
1013 | io_req->offsets[1] = dev->cow.data_offset; | 982 | io_req->offsets[1] = dev->cow.data_offset; |
1014 | io_req->buffer = req->buffer; | 983 | io_req->buffer = page_address(page) + page_offset; |
1015 | io_req->sectorsize = 1 << 9; | 984 | io_req->sectorsize = 1 << 9; |
985 | io_req->bitmap_offset = dev->cow.bitmap_offset; | ||
986 | io_req->bitmap_start = -1; | ||
987 | io_req->bitmap_end = -1; | ||
1016 | 988 | ||
1017 | if(dev->cow.file != NULL) | 989 | if((dev->cow.file != NULL) && (io_req->op == UBD_WRITE)) |
1018 | cowify_req(io_req, dev->cow.bitmap, dev->cow.bitmap_offset, | 990 | cowify_bitmap(io_req, dev->cow.bitmap); |
1019 | dev->cow.bitmap_len); | ||
1020 | |||
1021 | return(0); | 991 | return(0); |
1022 | } | 992 | } |
1023 | 993 | ||
@@ -1026,30 +996,36 @@ static void do_ubd_request(request_queue_t *q) | |||
1026 | { | 996 | { |
1027 | struct io_thread_req io_req; | 997 | struct io_thread_req io_req; |
1028 | struct request *req; | 998 | struct request *req; |
1029 | int err, n; | 999 | __u64 sector; |
1030 | 1000 | int err; | |
1031 | if(thread_fd == -1){ | 1001 | |
1032 | while((req = elv_next_request(q)) != NULL){ | 1002 | if(in_ubd) |
1033 | err = prepare_request(req, &io_req); | 1003 | return; |
1034 | if(!err){ | 1004 | in_ubd = 1; |
1035 | do_io(&io_req); | 1005 | while((req = elv_next_request(q)) != NULL){ |
1036 | __ubd_finish(req, io_req.error); | 1006 | struct gendisk *disk = req->rq_disk; |
1037 | } | 1007 | struct ubd *dev = disk->private_data; |
1038 | } | 1008 | int n, i; |
1039 | } | 1009 | |
1040 | else { | 1010 | blkdev_dequeue_request(req); |
1041 | if(do_ubd || (req = elv_next_request(q)) == NULL) | 1011 | |
1042 | return; | 1012 | sector = req->sector; |
1043 | err = prepare_request(req, &io_req); | 1013 | n = blk_rq_map_sg(q, req, dev->sg); |
1044 | if(!err){ | 1014 | |
1045 | do_ubd = ubd_handler; | 1015 | for(i = 0; i < n; i++){ |
1046 | n = os_write_file(thread_fd, (char *) &io_req, | 1016 | struct scatterlist *sg = &dev->sg[i]; |
1047 | sizeof(io_req)); | 1017 | |
1048 | if(n != sizeof(io_req)) | 1018 | err = prepare_request(req, &io_req, sector << 9, |
1049 | printk("write to io thread failed, " | 1019 | sg->offset, sg->length, |
1050 | "errno = %d\n", -n); | 1020 | sg->page); |
1021 | if(err) | ||
1022 | continue; | ||
1023 | |||
1024 | sector += sg->length >> 9; | ||
1025 | do_io(&io_req, req, dev->cow.bitmap); | ||
1051 | } | 1026 | } |
1052 | } | 1027 | } |
1028 | in_ubd = 0; | ||
1053 | } | 1029 | } |
1054 | 1030 | ||
1055 | static int ubd_ioctl(struct inode * inode, struct file * file, | 1031 | static int ubd_ioctl(struct inode * inode, struct file * file, |
@@ -1265,131 +1241,95 @@ int create_cow_file(char *cow_file, char *backing_file, struct openflags flags, | |||
1265 | return(err); | 1241 | return(err); |
1266 | } | 1242 | } |
1267 | 1243 | ||
1268 | static int update_bitmap(struct io_thread_req *req) | 1244 | void do_io(struct io_thread_req *req, struct request *r, unsigned long *bitmap) |
1269 | { | ||
1270 | int n; | ||
1271 | |||
1272 | if(req->cow_offset == -1) | ||
1273 | return(0); | ||
1274 | |||
1275 | n = os_seek_file(req->fds[1], req->cow_offset); | ||
1276 | if(n < 0){ | ||
1277 | printk("do_io - bitmap lseek failed : err = %d\n", -n); | ||
1278 | return(1); | ||
1279 | } | ||
1280 | |||
1281 | n = os_write_file(req->fds[1], &req->bitmap_words, | ||
1282 | sizeof(req->bitmap_words)); | ||
1283 | if(n != sizeof(req->bitmap_words)){ | ||
1284 | printk("do_io - bitmap update failed, err = %d fd = %d\n", -n, | ||
1285 | req->fds[1]); | ||
1286 | return(1); | ||
1287 | } | ||
1288 | |||
1289 | return(0); | ||
1290 | } | ||
1291 | |||
1292 | void do_io(struct io_thread_req *req) | ||
1293 | { | 1245 | { |
1294 | char *buf; | 1246 | struct ubd_aio *aio; |
1295 | unsigned long len; | 1247 | struct bitmap_io *bitmap_io = NULL; |
1296 | int n, nsectors, start, end, bit; | 1248 | char *buf; |
1297 | int err; | 1249 | void *bitmap_buf = NULL; |
1298 | __u64 off; | 1250 | unsigned long len, sector; |
1299 | 1251 | int nsectors, start, end, bit, err; | |
1300 | nsectors = req->length / req->sectorsize; | 1252 | __u64 off; |
1301 | start = 0; | 1253 | |
1302 | do { | 1254 | if(req->bitmap_start != -1){ |
1303 | bit = ubd_test_bit(start, (unsigned char *) &req->sector_mask); | 1255 | /* Round up to the nearest word */ |
1304 | end = start; | 1256 | int round = sizeof(unsigned long); |
1305 | while((end < nsectors) && | 1257 | len = (req->bitmap_end - req->bitmap_start + |
1306 | (ubd_test_bit(end, (unsigned char *) | 1258 | round * 8 - 1) / (round * 8); |
1307 | &req->sector_mask) == bit)) | 1259 | len *= round; |
1308 | end++; | 1260 | |
1309 | 1261 | off = req->bitmap_start / (8 * round); | |
1310 | off = req->offset + req->offsets[bit] + | 1262 | off *= round; |
1311 | start * req->sectorsize; | 1263 | |
1312 | len = (end - start) * req->sectorsize; | 1264 | bitmap_io = kmalloc(sizeof(*bitmap_io), GFP_KERNEL); |
1313 | buf = &req->buffer[start * req->sectorsize]; | 1265 | if(bitmap_io == NULL){ |
1314 | 1266 | printk("Failed to kmalloc bitmap IO\n"); | |
1315 | err = os_seek_file(req->fds[bit], off); | 1267 | req->error = 1; |
1316 | if(err < 0){ | 1268 | return; |
1317 | printk("do_io - lseek failed : err = %d\n", -err); | 1269 | } |
1318 | req->error = 1; | ||
1319 | return; | ||
1320 | } | ||
1321 | if(req->op == UBD_READ){ | ||
1322 | n = 0; | ||
1323 | do { | ||
1324 | buf = &buf[n]; | ||
1325 | len -= n; | ||
1326 | n = os_read_file(req->fds[bit], buf, len); | ||
1327 | if (n < 0) { | ||
1328 | printk("do_io - read failed, err = %d " | ||
1329 | "fd = %d\n", -n, req->fds[bit]); | ||
1330 | req->error = 1; | ||
1331 | return; | ||
1332 | } | ||
1333 | } while((n < len) && (n != 0)); | ||
1334 | if (n < len) memset(&buf[n], 0, len - n); | ||
1335 | } else { | ||
1336 | n = os_write_file(req->fds[bit], buf, len); | ||
1337 | if(n != len){ | ||
1338 | printk("do_io - write failed err = %d " | ||
1339 | "fd = %d\n", -n, req->fds[bit]); | ||
1340 | req->error = 1; | ||
1341 | return; | ||
1342 | } | ||
1343 | } | ||
1344 | 1270 | ||
1345 | start = end; | 1271 | bitmap_buf = kmalloc(len, GFP_KERNEL); |
1346 | } while(start < nsectors); | 1272 | if(bitmap_buf == NULL){ |
1273 | printk("do_io : kmalloc of bitmap chunk " | ||
1274 | "failed\n"); | ||
1275 | kfree(bitmap_io); | ||
1276 | req->error = 1; | ||
1277 | return; | ||
1278 | } | ||
1279 | memcpy(bitmap_buf, &bitmap[off / sizeof(bitmap[0])], len); | ||
1280 | |||
1281 | *bitmap_io = ((struct bitmap_io) | ||
1282 | { .count = ATOMIC_INIT(0), | ||
1283 | .aio = INIT_AIO(AIO_WRITE, req->fds[1], | ||
1284 | bitmap_buf, len, | ||
1285 | req->bitmap_offset + off, | ||
1286 | ubd_reply_fd) } ); | ||
1287 | } | ||
1347 | 1288 | ||
1348 | req->error = update_bitmap(req); | 1289 | nsectors = req->length / req->sectorsize; |
1349 | } | 1290 | start = 0; |
1291 | end = nsectors; | ||
1292 | bit = 0; | ||
1293 | do { | ||
1294 | if(bitmap != NULL){ | ||
1295 | sector = req->offset / req->sectorsize; | ||
1296 | bit = ubd_test_bit(sector + start, bitmap); | ||
1297 | end = start; | ||
1298 | while((end < nsectors) && | ||
1299 | (ubd_test_bit(sector + end, bitmap) == bit)) | ||
1300 | end++; | ||
1301 | } | ||
1350 | 1302 | ||
1351 | /* Changed in start_io_thread, which is serialized by being called only | 1303 | off = req->offsets[bit] + req->offset + |
1352 | * from ubd_init, which is an initcall. | 1304 | start * req->sectorsize; |
1353 | */ | 1305 | len = (end - start) * req->sectorsize; |
1354 | int kernel_fd = -1; | 1306 | buf = &req->buffer[start * req->sectorsize]; |
1355 | 1307 | ||
1356 | /* Only changed by the io thread */ | 1308 | aio = kmalloc(sizeof(*aio), GFP_KERNEL); |
1357 | int io_count = 0; | 1309 | if(aio == NULL){ |
1310 | req->error = 1; | ||
1311 | return; | ||
1312 | } | ||
1358 | 1313 | ||
1359 | int io_thread(void *arg) | 1314 | *aio = ((struct ubd_aio) |
1360 | { | 1315 | { .aio = INIT_AIO(req->op, req->fds[bit], buf, |
1361 | struct io_thread_req req; | 1316 | len, off, ubd_reply_fd), |
1362 | int n; | 1317 | .len = len, |
1318 | .req = r, | ||
1319 | .bitmap = bitmap_io, | ||
1320 | .bitmap_buf = bitmap_buf }); | ||
1321 | |||
1322 | if(aio->bitmap != NULL) | ||
1323 | atomic_inc(&aio->bitmap->count); | ||
1324 | |||
1325 | err = submit_aio(&aio->aio); | ||
1326 | if(err){ | ||
1327 | printk("do_io - submit_aio failed, " | ||
1328 | "err = %d\n", err); | ||
1329 | req->error = 1; | ||
1330 | return; | ||
1331 | } | ||
1363 | 1332 | ||
1364 | ignore_sigwinch_sig(); | 1333 | start = end; |
1365 | while(1){ | 1334 | } while(start < nsectors); |
1366 | n = os_read_file(kernel_fd, &req, sizeof(req)); | ||
1367 | if(n != sizeof(req)){ | ||
1368 | if(n < 0) | ||
1369 | printk("io_thread - read failed, fd = %d, " | ||
1370 | "err = %d\n", kernel_fd, -n); | ||
1371 | else { | ||
1372 | printk("io_thread - short read, fd = %d, " | ||
1373 | "length = %d\n", kernel_fd, n); | ||
1374 | } | ||
1375 | continue; | ||
1376 | } | ||
1377 | io_count++; | ||
1378 | do_io(&req); | ||
1379 | n = os_write_file(kernel_fd, &req, sizeof(req)); | ||
1380 | if(n != sizeof(req)) | ||
1381 | printk("io_thread - write failed, fd = %d, err = %d\n", | ||
1382 | kernel_fd, -n); | ||
1383 | } | ||
1384 | } | 1335 | } |
1385 | |||
1386 | /* | ||
1387 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
1388 | * Emacs will notice this stuff at the end of the file and automatically | ||
1389 | * adjust the settings for this buffer only. This must remain at the end | ||
1390 | * of the file. | ||
1391 | * --------------------------------------------------------------------------- | ||
1392 | * Local variables: | ||
1393 | * c-file-style: "linux" | ||
1394 | * End: | ||
1395 | */ | ||
diff --git a/arch/um/include/aio.h b/arch/um/include/aio.h new file mode 100644 index 000000000000..83f16877ab08 --- /dev/null +++ b/arch/um/include/aio.h | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef AIO_H__ | ||
7 | #define AIO_H__ | ||
8 | |||
9 | enum aio_type { AIO_READ, AIO_WRITE, AIO_MMAP }; | ||
10 | |||
11 | struct aio_thread_reply { | ||
12 | void *data; | ||
13 | int err; | ||
14 | }; | ||
15 | |||
16 | struct aio_context { | ||
17 | enum aio_type type; | ||
18 | int fd; | ||
19 | void *data; | ||
20 | int len; | ||
21 | unsigned long long offset; | ||
22 | int reply_fd; | ||
23 | struct aio_context *next; | ||
24 | }; | ||
25 | |||
26 | #define INIT_AIO(aio_type, aio_fd, aio_data, aio_len, aio_offset, \ | ||
27 | aio_reply_fd) \ | ||
28 | { .type = aio_type, \ | ||
29 | .fd = aio_fd, \ | ||
30 | .data = aio_data, \ | ||
31 | .len = aio_len, \ | ||
32 | .offset = aio_offset, \ | ||
33 | .reply_fd = aio_reply_fd } | ||
34 | |||
35 | #define INIT_AIO_CONTEXT { .reply_fd = -1, \ | ||
36 | .next = NULL } | ||
37 | |||
38 | extern int submit_aio(struct aio_context *aio); | ||
39 | |||
40 | #endif | ||
diff --git a/arch/um/include/init.h b/arch/um/include/init.h index 55c2693f8778..cbd79a8d213d 100644 --- a/arch/um/include/init.h +++ b/arch/um/include/init.h | |||
@@ -111,7 +111,15 @@ extern struct uml_param __uml_setup_start, __uml_setup_end; | |||
111 | 111 | ||
112 | #ifndef __KERNEL__ | 112 | #ifndef __KERNEL__ |
113 | 113 | ||
114 | #define __initcall(fn) static initcall_t __initcall_##fn __init_call = fn | 114 | #define __define_initcall(level,fn) \ |
115 | static initcall_t __initcall_##fn __attribute_used__ \ | ||
116 | __attribute__((__section__(".initcall" level ".init"))) = fn | ||
117 | |||
118 | /* Userspace initcalls shouldn't depend on anything in the kernel, so we'll | ||
119 | * make them run first. | ||
120 | */ | ||
121 | #define __initcall(fn) __define_initcall("1", fn) | ||
122 | |||
115 | #define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn | 123 | #define __exitcall(fn) static exitcall_t __exitcall_##fn __exit_call = fn |
116 | 124 | ||
117 | #define __init_call __attribute__ ((unused,__section__ (".initcall.init"))) | 125 | #define __init_call __attribute__ ((unused,__section__ (".initcall.init"))) |
diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h index 3af52a634c4c..c222d56b1494 100644 --- a/arch/um/include/irq_kern.h +++ b/arch/um/include/irq_kern.h | |||
@@ -7,12 +7,15 @@ | |||
7 | #define __IRQ_KERN_H__ | 7 | #define __IRQ_KERN_H__ |
8 | 8 | ||
9 | #include "linux/interrupt.h" | 9 | #include "linux/interrupt.h" |
10 | #include "asm/ptrace.h" | ||
10 | 11 | ||
11 | extern int um_request_irq(unsigned int irq, int fd, int type, | 12 | extern int um_request_irq(unsigned int irq, int fd, int type, |
12 | irqreturn_t (*handler)(int, void *, | 13 | irqreturn_t (*handler)(int, void *, |
13 | struct pt_regs *), | 14 | struct pt_regs *), |
14 | unsigned long irqflags, const char * devname, | 15 | unsigned long irqflags, const char * devname, |
15 | void *dev_id); | 16 | void *dev_id); |
17 | extern int init_aio_irq(int irq, char *name, | ||
18 | irqreturn_t (*handler)(int, void *, struct pt_regs *)); | ||
16 | 19 | ||
17 | #endif | 20 | #endif |
18 | 21 | ||
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 881d2988d2d8..4c362458052c 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -153,6 +153,11 @@ extern int os_file_type(char *file); | |||
153 | extern int os_file_mode(char *file, struct openflags *mode_out); | 153 | extern int os_file_mode(char *file, struct openflags *mode_out); |
154 | extern int os_lock_file(int fd, int excl); | 154 | extern int os_lock_file(int fd, int excl); |
155 | 155 | ||
156 | /* start_up.c */ | ||
157 | extern void os_early_checks(void); | ||
158 | extern int can_do_skas(void); | ||
159 | |||
160 | /* process.c */ | ||
156 | extern unsigned long os_process_pc(int pid); | 161 | extern unsigned long os_process_pc(int pid); |
157 | extern int os_process_parent(int pid); | 162 | extern int os_process_parent(int pid); |
158 | extern void os_stop_process(int pid); | 163 | extern void os_stop_process(int pid); |
@@ -161,6 +166,9 @@ extern void os_kill_ptraced_process(int pid, int reap_child); | |||
161 | extern void os_usr1_process(int pid); | 166 | extern void os_usr1_process(int pid); |
162 | extern int os_getpid(void); | 167 | extern int os_getpid(void); |
163 | extern int os_getpgrp(void); | 168 | extern int os_getpgrp(void); |
169 | extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); | ||
170 | extern void init_new_thread_signals(int altstack); | ||
171 | extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); | ||
164 | 172 | ||
165 | extern int os_map_memory(void *virt, int fd, unsigned long long off, | 173 | extern int os_map_memory(void *virt, int fd, unsigned long long off, |
166 | unsigned long len, int r, int w, int x); | 174 | unsigned long len, int r, int w, int x); |
@@ -170,6 +178,13 @@ extern int os_unmap_memory(void *addr, int len); | |||
170 | extern void os_flush_stdout(void); | 178 | extern void os_flush_stdout(void); |
171 | extern unsigned long long os_usecs(void); | 179 | extern unsigned long long os_usecs(void); |
172 | 180 | ||
181 | /* tt.c | ||
182 | * for tt mode only (will be deleted in future...) | ||
183 | */ | ||
184 | extern void forward_pending_sigio(int target); | ||
185 | extern int start_fork_tramp(void *arg, unsigned long temp_stack, | ||
186 | int clone_flags, int (*tramp)(void *)); | ||
187 | |||
173 | #endif | 188 | #endif |
174 | 189 | ||
175 | /* | 190 | /* |
diff --git a/arch/um/include/syscall.h b/arch/um/include/syscall.h new file mode 100644 index 000000000000..dda1df901a08 --- /dev/null +++ b/arch/um/include/syscall.h | |||
@@ -0,0 +1,12 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __SYSCALL_USER_H | ||
7 | #define __SYSCALL_USER_H | ||
8 | |||
9 | extern int record_syscall_start(int syscall); | ||
10 | extern void record_syscall_end(int index, long result); | ||
11 | |||
12 | #endif | ||
diff --git a/arch/um/include/syscall_user.h b/arch/um/include/syscall_user.h deleted file mode 100644 index 811d0ec2445e..000000000000 --- a/arch/um/include/syscall_user.h +++ /dev/null | |||
@@ -1,23 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #ifndef __SYSCALL_USER_H | ||
7 | #define __SYSCALL_USER_H | ||
8 | |||
9 | extern int record_syscall_start(int syscall); | ||
10 | extern void record_syscall_end(int index, long result); | ||
11 | |||
12 | #endif | ||
13 | |||
14 | /* | ||
15 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
16 | * Emacs will notice this stuff at the end of the file and automatically | ||
17 | * adjust the settings for this buffer only. This must remain at the end | ||
18 | * of the file. | ||
19 | * --------------------------------------------------------------------------- | ||
20 | * Local variables: | ||
21 | * c-file-style: "linux" | ||
22 | * End: | ||
23 | */ | ||
diff --git a/arch/um/include/sysdep-i386/syscalls.h b/arch/um/include/sysdep-i386/syscalls.h index be0a3e3469eb..a0d5b74d3731 100644 --- a/arch/um/include/sysdep-i386/syscalls.h +++ b/arch/um/include/sysdep-i386/syscalls.h | |||
@@ -16,6 +16,8 @@ extern syscall_handler_t sys_rt_sigaction; | |||
16 | 16 | ||
17 | extern syscall_handler_t old_mmap_i386; | 17 | extern syscall_handler_t old_mmap_i386; |
18 | 18 | ||
19 | extern syscall_handler_t *sys_call_table[]; | ||
20 | |||
19 | #define EXECUTE_SYSCALL(syscall, regs) \ | 21 | #define EXECUTE_SYSCALL(syscall, regs) \ |
20 | ((long (*)(struct syscall_args)) (*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs)) | 22 | ((long (*)(struct syscall_args)) (*sys_call_table[syscall]))(SYSCALL_ARGS(®s->regs)) |
21 | 23 | ||
diff --git a/arch/um/include/sysdep-x86_64/ptrace.h b/arch/um/include/sysdep-x86_64/ptrace.h index be8acd5efd97..331aa2d1f3f5 100644 --- a/arch/um/include/sysdep-x86_64/ptrace.h +++ b/arch/um/include/sysdep-x86_64/ptrace.h | |||
@@ -227,7 +227,7 @@ struct syscall_args { | |||
227 | panic("Bad register in UPT_SET : %d\n", reg); \ | 227 | panic("Bad register in UPT_SET : %d\n", reg); \ |
228 | break; \ | 228 | break; \ |
229 | } \ | 229 | } \ |
230 | val; \ | 230 | __upt_val; \ |
231 | }) | 231 | }) |
232 | 232 | ||
233 | #define UPT_SET_SYSCALL_RETURN(r, res) \ | 233 | #define UPT_SET_SYSCALL_RETURN(r, res) \ |
diff --git a/arch/um/include/sysdep-x86_64/syscalls.h b/arch/um/include/sysdep-x86_64/syscalls.h index 67923cca5691..e06f83e80f4a 100644 --- a/arch/um/include/sysdep-x86_64/syscalls.h +++ b/arch/um/include/sysdep-x86_64/syscalls.h | |||
@@ -14,6 +14,8 @@ typedef long syscall_handler_t(void); | |||
14 | 14 | ||
15 | extern syscall_handler_t *ia32_sys_call_table[]; | 15 | extern syscall_handler_t *ia32_sys_call_table[]; |
16 | 16 | ||
17 | extern syscall_handler_t *sys_call_table[]; | ||
18 | |||
17 | #define EXECUTE_SYSCALL(syscall, regs) \ | 19 | #define EXECUTE_SYSCALL(syscall, regs) \ |
18 | (((long (*)(long, long, long, long, long, long)) \ | 20 | (((long (*)(long, long, long, long, long, long)) \ |
19 | (*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \ | 21 | (*sys_call_table[syscall]))(UPT_SYSCALL_ARG1(®s->regs), \ |
diff --git a/arch/um/include/tlb.h b/arch/um/include/tlb.h index c6f9628f39bf..45d7da6c3b2c 100644 --- a/arch/um/include/tlb.h +++ b/arch/um/include/tlb.h | |||
@@ -9,7 +9,7 @@ | |||
9 | #include "um_mmu.h" | 9 | #include "um_mmu.h" |
10 | 10 | ||
11 | struct host_vm_op { | 11 | struct host_vm_op { |
12 | enum { MMAP, MUNMAP, MPROTECT } type; | 12 | enum { NONE, MMAP, MUNMAP, MPROTECT } type; |
13 | union { | 13 | union { |
14 | struct { | 14 | struct { |
15 | unsigned long addr; | 15 | unsigned long addr; |
@@ -38,24 +38,10 @@ extern void mprotect_kernel_vm(int w); | |||
38 | extern void force_flush_all(void); | 38 | extern void force_flush_all(void); |
39 | extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr, | 39 | extern void fix_range_common(struct mm_struct *mm, unsigned long start_addr, |
40 | unsigned long end_addr, int force, | 40 | unsigned long end_addr, int force, |
41 | void (*do_ops)(union mm_context *, | 41 | int (*do_ops)(union mm_context *, |
42 | struct host_vm_op *, int)); | 42 | struct host_vm_op *, int, int, |
43 | void **)); | ||
43 | extern int flush_tlb_kernel_range_common(unsigned long start, | 44 | extern int flush_tlb_kernel_range_common(unsigned long start, |
44 | unsigned long end); | 45 | unsigned long end); |
45 | 46 | ||
46 | extern int add_mmap(unsigned long virt, unsigned long phys, unsigned long len, | ||
47 | int r, int w, int x, struct host_vm_op *ops, int index, | ||
48 | int last_filled, union mm_context *mmu, | ||
49 | void (*do_ops)(union mm_context *, struct host_vm_op *, | ||
50 | int)); | ||
51 | extern int add_munmap(unsigned long addr, unsigned long len, | ||
52 | struct host_vm_op *ops, int index, int last_filled, | ||
53 | union mm_context *mmu, | ||
54 | void (*do_ops)(union mm_context *, struct host_vm_op *, | ||
55 | int)); | ||
56 | extern int add_mprotect(unsigned long addr, unsigned long len, int r, int w, | ||
57 | int x, struct host_vm_op *ops, int index, | ||
58 | int last_filled, union mm_context *mmu, | ||
59 | void (*do_ops)(union mm_context *, struct host_vm_op *, | ||
60 | int)); | ||
61 | #endif | 47 | #endif |
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index 7b6a24dfd302..bb505e01d994 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h | |||
@@ -54,8 +54,6 @@ extern void stack_protections(unsigned long address); | |||
54 | extern void task_protections(unsigned long address); | 54 | extern void task_protections(unsigned long address); |
55 | extern int wait_for_stop(int pid, int sig, int cont_type, void *relay); | 55 | extern int wait_for_stop(int pid, int sig, int cont_type, void *relay); |
56 | extern void *add_signal_handler(int sig, void (*handler)(int)); | 56 | extern void *add_signal_handler(int sig, void (*handler)(int)); |
57 | extern int start_fork_tramp(void *arg, unsigned long temp_stack, | ||
58 | int clone_flags, int (*tramp)(void *)); | ||
59 | extern int linux_main(int argc, char **argv); | 57 | extern int linux_main(int argc, char **argv); |
60 | extern void set_cmdline(char *cmd); | 58 | extern void set_cmdline(char *cmd); |
61 | extern void input_cb(void (*proc)(void *), void *arg, int arg_len); | 59 | extern void input_cb(void (*proc)(void *), void *arg, int arg_len); |
@@ -64,8 +62,6 @@ extern void *um_kmalloc(int size); | |||
64 | extern int switcheroo(int fd, int prot, void *from, void *to, int size); | 62 | extern int switcheroo(int fd, int prot, void *from, void *to, int size); |
65 | extern void setup_machinename(char *machine_out); | 63 | extern void setup_machinename(char *machine_out); |
66 | extern void setup_hostinfo(void); | 64 | extern void setup_hostinfo(void); |
67 | extern void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)); | ||
68 | extern void init_new_thread_signals(int altstack); | ||
69 | extern void do_exec(int old_pid, int new_pid); | 65 | extern void do_exec(int old_pid, int new_pid); |
70 | extern void tracer_panic(char *msg, ...); | 66 | extern void tracer_panic(char *msg, ...); |
71 | extern char *get_umid(int only_if_set); | 67 | extern char *get_umid(int only_if_set); |
@@ -74,16 +70,12 @@ extern int detach(int pid, int sig); | |||
74 | extern int attach(int pid); | 70 | extern int attach(int pid); |
75 | extern void kill_child_dead(int pid); | 71 | extern void kill_child_dead(int pid); |
76 | extern int cont(int pid); | 72 | extern int cont(int pid); |
77 | extern void check_ptrace(void); | ||
78 | extern void check_sigio(void); | 73 | extern void check_sigio(void); |
79 | extern int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr); | ||
80 | extern void write_sigio_workaround(void); | 74 | extern void write_sigio_workaround(void); |
81 | extern void arch_check_bugs(void); | 75 | extern void arch_check_bugs(void); |
82 | extern int cpu_feature(char *what, char *buf, int len); | 76 | extern int cpu_feature(char *what, char *buf, int len); |
83 | extern int arch_handle_signal(int sig, union uml_pt_regs *regs); | 77 | extern int arch_handle_signal(int sig, union uml_pt_regs *regs); |
84 | extern int arch_fixup(unsigned long address, void *sc_ptr); | 78 | extern int arch_fixup(unsigned long address, void *sc_ptr); |
85 | extern void forward_pending_sigio(int target); | ||
86 | extern int can_do_skas(void); | ||
87 | extern void arch_init_thread(void); | 79 | extern void arch_init_thread(void); |
88 | extern int setjmp_wrapper(void (*proc)(void *, void *), ...); | 80 | extern int setjmp_wrapper(void (*proc)(void *, void *), ...); |
89 | extern int raw(int fd); | 81 | extern int raw(int fd); |
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile index a8918e80df96..614b8ebeb0ed 100644 --- a/arch/um/kernel/Makefile +++ b/arch/um/kernel/Makefile | |||
@@ -8,25 +8,24 @@ clean-files := | |||
8 | 8 | ||
9 | obj-y = config.o exec_kern.o exitcode.o \ | 9 | obj-y = config.o exec_kern.o exitcode.o \ |
10 | helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ | 10 | helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ |
11 | physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \ | 11 | physmem.o process_kern.o ptrace.o reboot.o resource.o sigio_user.o \ |
12 | sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \ | 12 | sigio_kern.o signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o \ |
13 | syscall_kern.o sysrq.o tempfile.o time.o time_kern.o \ | 13 | tempfile.o time.o time_kern.o tlb.o trap_kern.o trap_user.o \ |
14 | tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o umid.o \ | 14 | uaccess_user.o um_arch.o umid.o user_util.o |
15 | user_util.o | ||
16 | 15 | ||
17 | obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o | 16 | obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o |
18 | obj-$(CONFIG_GPROF) += gprof_syms.o | 17 | obj-$(CONFIG_GPROF) += gprof_syms.o |
19 | obj-$(CONFIG_GCOV) += gmon_syms.o | 18 | obj-$(CONFIG_GCOV) += gmon_syms.o |
20 | obj-$(CONFIG_TTY_LOG) += tty_log.o | 19 | obj-$(CONFIG_TTY_LOG) += tty_log.o |
21 | obj-$(CONFIG_SYSCALL_DEBUG) += syscall_user.o | 20 | obj-$(CONFIG_SYSCALL_DEBUG) += syscall.o |
22 | 21 | ||
23 | obj-$(CONFIG_MODE_TT) += tt/ | 22 | obj-$(CONFIG_MODE_TT) += tt/ |
24 | obj-$(CONFIG_MODE_SKAS) += skas/ | 23 | obj-$(CONFIG_MODE_SKAS) += skas/ |
25 | 24 | ||
26 | user-objs-$(CONFIG_TTY_LOG) += tty_log.o | 25 | user-objs-$(CONFIG_TTY_LOG) += tty_log.o |
27 | 26 | ||
28 | USER_OBJS := $(user-objs-y) config.o helper.o main.o process.o tempfile.o \ | 27 | USER_OBJS := $(user-objs-y) config.o helper.o main.o tempfile.o time.o \ |
29 | time.o tty_log.o umid.o user_util.o | 28 | tty_log.o umid.o user_util.o |
30 | 29 | ||
31 | include arch/um/scripts/Makefile.rules | 30 | include arch/um/scripts/Makefile.rules |
32 | 31 | ||
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 9f18061ef4c9..dcd814971995 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include "kern_util.h" | 31 | #include "kern_util.h" |
32 | #include "irq_user.h" | 32 | #include "irq_user.h" |
33 | #include "irq_kern.h" | 33 | #include "irq_kern.h" |
34 | 34 | #include "os.h" | |
35 | 35 | ||
36 | /* | 36 | /* |
37 | * Generic, controller-independent functions: | 37 | * Generic, controller-independent functions: |
@@ -168,13 +168,32 @@ void __init init_IRQ(void) | |||
168 | } | 168 | } |
169 | } | 169 | } |
170 | 170 | ||
171 | /* | 171 | int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *, |
172 | * Overrides for Emacs so that we follow Linus's tabbing style. | 172 | struct pt_regs *)) |
173 | * Emacs will notice this stuff at the end of the file and automatically | 173 | { |
174 | * adjust the settings for this buffer only. This must remain at the end | 174 | int fds[2], err; |
175 | * of the file. | 175 | |
176 | * --------------------------------------------------------------------------- | 176 | err = os_pipe(fds, 1, 1); |
177 | * Local variables: | 177 | if(err){ |
178 | * c-file-style: "linux" | 178 | printk("init_aio_irq - os_pipe failed, err = %d\n", -err); |
179 | * End: | 179 | goto out; |
180 | */ | 180 | } |
181 | |||
182 | err = um_request_irq(irq, fds[0], IRQ_READ, handler, | ||
183 | SA_INTERRUPT | SA_SAMPLE_RANDOM, name, | ||
184 | (void *) (long) fds[0]); | ||
185 | if(err){ | ||
186 | printk("init_aio_irq - : um_request_irq failed, err = %d\n", | ||
187 | err); | ||
188 | goto out_close; | ||
189 | } | ||
190 | |||
191 | err = fds[1]; | ||
192 | goto out; | ||
193 | |||
194 | out_close: | ||
195 | os_close_file(fds[0]); | ||
196 | os_close_file(fds[1]); | ||
197 | out: | ||
198 | return(err); | ||
199 | } | ||
diff --git a/arch/um/kernel/ksyms.c b/arch/um/kernel/ksyms.c index 99439fa15ef4..32d3076dd220 100644 --- a/arch/um/kernel/ksyms.c +++ b/arch/um/kernel/ksyms.c | |||
@@ -114,22 +114,3 @@ extern void FASTCALL( __read_lock_failed(rwlock_t *rw)); | |||
114 | EXPORT_SYMBOL(__read_lock_failed); | 114 | EXPORT_SYMBOL(__read_lock_failed); |
115 | 115 | ||
116 | #endif | 116 | #endif |
117 | |||
118 | #ifdef CONFIG_HIGHMEM | ||
119 | EXPORT_SYMBOL(kmap); | ||
120 | EXPORT_SYMBOL(kunmap); | ||
121 | EXPORT_SYMBOL(kmap_atomic); | ||
122 | EXPORT_SYMBOL(kunmap_atomic); | ||
123 | EXPORT_SYMBOL(kmap_atomic_to_page); | ||
124 | #endif | ||
125 | |||
126 | /* | ||
127 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
128 | * Emacs will notice this stuff at the end of the file and automatically | ||
129 | * adjust the settings for this buffer only. This must remain at the end | ||
130 | * of the file. | ||
131 | * --------------------------------------------------------------------------- | ||
132 | * Local variables: | ||
133 | * c-file-style: "linux" | ||
134 | * End: | ||
135 | */ | ||
diff --git a/arch/um/kernel/main.c b/arch/um/kernel/main.c index 1e1a87f1c510..d31027f0fe39 100644 --- a/arch/um/kernel/main.c +++ b/arch/um/kernel/main.c | |||
@@ -97,7 +97,7 @@ int main(int argc, char **argv, char **envp) | |||
97 | exit(1); | 97 | exit(1); |
98 | } | 98 | } |
99 | 99 | ||
100 | #ifdef UML_CONFIG_MODE_TT | 100 | #ifdef UML_CONFIG_CMDLINE_ON_HOST |
101 | /* Allocate memory for thread command lines */ | 101 | /* Allocate memory for thread command lines */ |
102 | if(argc < 2 || strlen(argv[1]) < THREAD_NAME_LEN - 1){ | 102 | if(argc < 2 || strlen(argv[1]) < THREAD_NAME_LEN - 1){ |
103 | 103 | ||
diff --git a/arch/um/kernel/skas/Makefile b/arch/um/kernel/skas/Makefile index d296d55ade4b..db36c7c95940 100644 --- a/arch/um/kernel/skas/Makefile +++ b/arch/um/kernel/skas/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | # | 4 | # |
5 | 5 | ||
6 | obj-y := clone.o exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \ | 6 | obj-y := clone.o exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \ |
7 | syscall_kern.o syscall_user.o tlb.o trap_user.o uaccess.o \ | 7 | syscall.o tlb.o trap_user.o uaccess.o |
8 | 8 | ||
9 | subdir- := util | 9 | subdir- := util |
10 | 10 | ||
diff --git a/arch/um/kernel/skas/include/mmu-skas.h b/arch/um/kernel/skas/include/mmu-skas.h index 278b72f1d9ad..09536f81ee42 100644 --- a/arch/um/kernel/skas/include/mmu-skas.h +++ b/arch/um/kernel/skas/include/mmu-skas.h | |||
@@ -6,11 +6,15 @@ | |||
6 | #ifndef __SKAS_MMU_H | 6 | #ifndef __SKAS_MMU_H |
7 | #define __SKAS_MMU_H | 7 | #define __SKAS_MMU_H |
8 | 8 | ||
9 | #include "linux/config.h" | ||
9 | #include "mm_id.h" | 10 | #include "mm_id.h" |
10 | 11 | ||
11 | struct mmu_context_skas { | 12 | struct mmu_context_skas { |
12 | struct mm_id id; | 13 | struct mm_id id; |
13 | unsigned long last_page_table; | 14 | unsigned long last_page_table; |
15 | #ifdef CONFIG_3_LEVEL_PGTABLES | ||
16 | unsigned long last_pmd; | ||
17 | #endif | ||
14 | }; | 18 | }; |
15 | 19 | ||
16 | extern void switch_mm_skas(struct mm_id * mm_idp); | 20 | extern void switch_mm_skas(struct mm_id * mm_idp); |
diff --git a/arch/um/kernel/skas/include/skas.h b/arch/um/kernel/skas/include/skas.h index d983ea842547..060934740f9f 100644 --- a/arch/um/kernel/skas/include/skas.h +++ b/arch/um/kernel/skas/include/skas.h | |||
@@ -24,28 +24,26 @@ extern void new_thread_proc(void *stack, void (*handler)(int sig)); | |||
24 | extern void remove_sigstack(void); | 24 | extern void remove_sigstack(void); |
25 | extern void new_thread_handler(int sig); | 25 | extern void new_thread_handler(int sig); |
26 | extern void handle_syscall(union uml_pt_regs *regs); | 26 | extern void handle_syscall(union uml_pt_regs *regs); |
27 | extern int map(struct mm_id * mm_idp, unsigned long virt, unsigned long len, | 27 | extern int map(struct mm_id * mm_idp, unsigned long virt, |
28 | int r, int w, int x, int phys_fd, unsigned long long offset); | 28 | unsigned long len, int r, int w, int x, int phys_fd, |
29 | extern int unmap(struct mm_id * mm_idp, void *addr, unsigned long len); | 29 | unsigned long long offset, int done, void **data); |
30 | extern int unmap(struct mm_id * mm_idp, void *addr, unsigned long len, | ||
31 | int done, void **data); | ||
30 | extern int protect(struct mm_id * mm_idp, unsigned long addr, | 32 | extern int protect(struct mm_id * mm_idp, unsigned long addr, |
31 | unsigned long len, int r, int w, int x); | 33 | unsigned long len, int r, int w, int x, int done, |
34 | void **data); | ||
32 | extern void user_signal(int sig, union uml_pt_regs *regs, int pid); | 35 | extern void user_signal(int sig, union uml_pt_regs *regs, int pid); |
33 | extern int new_mm(int from); | 36 | extern int new_mm(int from, unsigned long stack); |
34 | extern int start_userspace(unsigned long stub_stack); | 37 | extern int start_userspace(unsigned long stub_stack); |
35 | extern int copy_context_skas0(unsigned long stack, int pid); | 38 | extern int copy_context_skas0(unsigned long stack, int pid); |
36 | extern void get_skas_faultinfo(int pid, struct faultinfo * fi); | 39 | extern void get_skas_faultinfo(int pid, struct faultinfo * fi); |
37 | extern long execute_syscall_skas(void *r); | 40 | extern long execute_syscall_skas(void *r); |
38 | extern unsigned long current_stub_stack(void); | 41 | extern unsigned long current_stub_stack(void); |
42 | extern long run_syscall_stub(struct mm_id * mm_idp, | ||
43 | int syscall, unsigned long *args, long expected, | ||
44 | void **addr, int done); | ||
45 | extern long syscall_stub_data(struct mm_id * mm_idp, | ||
46 | unsigned long *data, int data_count, | ||
47 | void **addr, void **stub_addr); | ||
39 | 48 | ||
40 | #endif | 49 | #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/kernel/skas/mem_user.c b/arch/um/kernel/skas/mem_user.c index b0980ff3bd95..1d89640bd502 100644 --- a/arch/um/kernel/skas/mem_user.c +++ b/arch/um/kernel/skas/mem_user.c | |||
@@ -5,13 +5,14 @@ | |||
5 | 5 | ||
6 | #include <signal.h> | 6 | #include <signal.h> |
7 | #include <errno.h> | 7 | #include <errno.h> |
8 | #include <string.h> | ||
8 | #include <sys/mman.h> | 9 | #include <sys/mman.h> |
9 | #include <sys/wait.h> | 10 | #include <sys/wait.h> |
10 | #include <asm/page.h> | 11 | #include <asm/page.h> |
11 | #include <asm/unistd.h> | 12 | #include <asm/unistd.h> |
12 | #include "mem_user.h" | 13 | #include "mem_user.h" |
13 | #include "mem.h" | 14 | #include "mem.h" |
14 | #include "mm_id.h" | 15 | #include "skas.h" |
15 | #include "user.h" | 16 | #include "user.h" |
16 | #include "os.h" | 17 | #include "os.h" |
17 | #include "proc_mm.h" | 18 | #include "proc_mm.h" |
@@ -23,46 +24,155 @@ | |||
23 | #include "uml-config.h" | 24 | #include "uml-config.h" |
24 | #include "sysdep/ptrace.h" | 25 | #include "sysdep/ptrace.h" |
25 | #include "sysdep/stub.h" | 26 | #include "sysdep/stub.h" |
26 | #include "skas.h" | ||
27 | 27 | ||
28 | extern unsigned long syscall_stub, __syscall_stub_start; | 28 | extern unsigned long batch_syscall_stub, __syscall_stub_start; |
29 | 29 | ||
30 | extern void wait_stub_done(int pid, int sig, char * fname); | 30 | extern void wait_stub_done(int pid, int sig, char * fname); |
31 | 31 | ||
32 | static long run_syscall_stub(struct mm_id * mm_idp, int syscall, | 32 | static inline unsigned long *check_init_stack(struct mm_id * mm_idp, |
33 | unsigned long *args) | 33 | unsigned long *stack) |
34 | { | ||
35 | if(stack == NULL){ | ||
36 | stack = (unsigned long *) mm_idp->stack + 2; | ||
37 | *stack = 0; | ||
38 | } | ||
39 | return stack; | ||
40 | } | ||
41 | |||
42 | extern int proc_mm; | ||
43 | |||
44 | int single_count = 0; | ||
45 | int multi_count = 0; | ||
46 | int multi_op_count = 0; | ||
47 | |||
48 | static long do_syscall_stub(struct mm_id *mm_idp, void **addr) | ||
34 | { | 49 | { |
50 | unsigned long regs[MAX_REG_NR]; | ||
51 | unsigned long *data; | ||
52 | unsigned long *syscall; | ||
53 | long ret, offset; | ||
35 | int n, pid = mm_idp->u.pid; | 54 | int n, pid = mm_idp->u.pid; |
36 | unsigned long regs[MAX_REG_NR]; | 55 | |
56 | if(proc_mm) | ||
57 | #warning Need to look up userspace_pid by cpu | ||
58 | pid = userspace_pid[0]; | ||
59 | |||
60 | multi_count++; | ||
37 | 61 | ||
38 | get_safe_registers(regs); | 62 | get_safe_registers(regs); |
39 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + | 63 | regs[REGS_IP_INDEX] = UML_CONFIG_STUB_CODE + |
40 | ((unsigned long) &syscall_stub - | 64 | ((unsigned long) &batch_syscall_stub - |
41 | (unsigned long) &__syscall_stub_start); | 65 | (unsigned long) &__syscall_stub_start); |
42 | /* XXX Don't have a define for starting a syscall */ | 66 | n = ptrace_setregs(pid, regs); |
43 | regs[REGS_SYSCALL_NR] = syscall; | 67 | if(n < 0) |
44 | regs[REGS_SYSCALL_ARG1] = args[0]; | 68 | panic("do_syscall_stub : PTRACE_SETREGS failed, errno = %d\n", |
45 | regs[REGS_SYSCALL_ARG2] = args[1]; | 69 | n); |
46 | regs[REGS_SYSCALL_ARG3] = args[2]; | 70 | |
47 | regs[REGS_SYSCALL_ARG4] = args[3]; | 71 | wait_stub_done(pid, 0, "do_syscall_stub"); |
48 | regs[REGS_SYSCALL_ARG5] = args[4]; | 72 | |
49 | regs[REGS_SYSCALL_ARG6] = args[5]; | 73 | /* When the stub stops, we find the following values on the |
50 | n = ptrace_setregs(pid, regs); | 74 | * beginning of the stack: |
51 | if(n < 0){ | 75 | * (long )return_value |
52 | printk("run_syscall_stub : PTRACE_SETREGS failed, " | 76 | * (long )offset to failed sycall-data (0, if no error) |
53 | "errno = %d\n", n); | 77 | */ |
54 | return(n); | 78 | ret = *((unsigned long *) mm_idp->stack); |
79 | offset = *((unsigned long *) mm_idp->stack + 1); | ||
80 | if (offset) { | ||
81 | data = (unsigned long *)(mm_idp->stack + | ||
82 | offset - UML_CONFIG_STUB_DATA); | ||
83 | syscall = (unsigned long *)((unsigned long)data + data[0]); | ||
84 | printk("do_syscall_stub: syscall %ld failed, return value = " | ||
85 | "0x%lx, expected return value = 0x%lx\n", | ||
86 | syscall[0], ret, syscall[7]); | ||
87 | printk(" syscall parameters: " | ||
88 | "0x%lx 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx\n", | ||
89 | syscall[1], syscall[2], syscall[3], | ||
90 | syscall[4], syscall[5], syscall[6]); | ||
91 | for(n = 1; n < data[0]/sizeof(long); n++) { | ||
92 | if(n == 1) | ||
93 | printk(" additional syscall data:"); | ||
94 | if(n % 4 == 1) | ||
95 | printk("\n "); | ||
96 | printk(" 0x%lx", data[n]); | ||
97 | } | ||
98 | if(n > 1) | ||
99 | printk("\n"); | ||
100 | } | ||
101 | else ret = 0; | ||
102 | |||
103 | *addr = check_init_stack(mm_idp, NULL); | ||
104 | |||
105 | return ret; | ||
106 | } | ||
107 | |||
108 | long run_syscall_stub(struct mm_id * mm_idp, int syscall, | ||
109 | unsigned long *args, long expected, void **addr, | ||
110 | int done) | ||
111 | { | ||
112 | unsigned long *stack = check_init_stack(mm_idp, *addr); | ||
113 | |||
114 | if(done && *addr == NULL) | ||
115 | single_count++; | ||
116 | |||
117 | *stack += sizeof(long); | ||
118 | stack += *stack / sizeof(long); | ||
119 | |||
120 | *stack++ = syscall; | ||
121 | *stack++ = args[0]; | ||
122 | *stack++ = args[1]; | ||
123 | *stack++ = args[2]; | ||
124 | *stack++ = args[3]; | ||
125 | *stack++ = args[4]; | ||
126 | *stack++ = args[5]; | ||
127 | *stack++ = expected; | ||
128 | *stack = 0; | ||
129 | multi_op_count++; | ||
130 | |||
131 | if(!done && ((((unsigned long) stack) & ~PAGE_MASK) < | ||
132 | PAGE_SIZE - 10 * sizeof(long))){ | ||
133 | *addr = stack; | ||
134 | return 0; | ||
55 | } | 135 | } |
56 | 136 | ||
57 | wait_stub_done(pid, 0, "run_syscall_stub"); | 137 | return do_syscall_stub(mm_idp, addr); |
138 | } | ||
139 | |||
140 | long syscall_stub_data(struct mm_id * mm_idp, | ||
141 | unsigned long *data, int data_count, | ||
142 | void **addr, void **stub_addr) | ||
143 | { | ||
144 | unsigned long *stack; | ||
145 | int ret = 0; | ||
58 | 146 | ||
59 | return(*((unsigned long *) mm_idp->stack)); | 147 | /* If *addr still is uninitialized, it *must* contain NULL. |
148 | * Thus in this case do_syscall_stub correctly won't be called. | ||
149 | */ | ||
150 | if((((unsigned long) *addr) & ~PAGE_MASK) >= | ||
151 | PAGE_SIZE - (10 + data_count) * sizeof(long)) { | ||
152 | ret = do_syscall_stub(mm_idp, addr); | ||
153 | /* in case of error, don't overwrite data on stack */ | ||
154 | if(ret) | ||
155 | return ret; | ||
156 | } | ||
157 | |||
158 | stack = check_init_stack(mm_idp, *addr); | ||
159 | *addr = stack; | ||
160 | |||
161 | *stack = data_count * sizeof(long); | ||
162 | |||
163 | memcpy(stack + 1, data, data_count * sizeof(long)); | ||
164 | |||
165 | *stub_addr = (void *)(((unsigned long)(stack + 1) & ~PAGE_MASK) + | ||
166 | UML_CONFIG_STUB_DATA); | ||
167 | |||
168 | return 0; | ||
60 | } | 169 | } |
61 | 170 | ||
62 | int map(struct mm_id *mm_idp, unsigned long virt, unsigned long len, | 171 | int map(struct mm_id * mm_idp, unsigned long virt, unsigned long len, |
63 | int r, int w, int x, int phys_fd, unsigned long long offset) | 172 | int r, int w, int x, int phys_fd, unsigned long long offset, |
173 | int done, void **data) | ||
64 | { | 174 | { |
65 | int prot, n; | 175 | int prot, ret; |
66 | 176 | ||
67 | prot = (r ? PROT_READ : 0) | (w ? PROT_WRITE : 0) | | 177 | prot = (r ? PROT_READ : 0) | (w ? PROT_WRITE : 0) | |
68 | (x ? PROT_EXEC : 0); | 178 | (x ? PROT_EXEC : 0); |
@@ -70,6 +180,7 @@ int map(struct mm_id *mm_idp, unsigned long virt, unsigned long len, | |||
70 | if(proc_mm){ | 180 | if(proc_mm){ |
71 | struct proc_mm_op map; | 181 | struct proc_mm_op map; |
72 | int fd = mm_idp->u.mm_fd; | 182 | int fd = mm_idp->u.mm_fd; |
183 | |||
73 | map = ((struct proc_mm_op) { .op = MM_MMAP, | 184 | map = ((struct proc_mm_op) { .op = MM_MMAP, |
74 | .u = | 185 | .u = |
75 | { .mmap = | 186 | { .mmap = |
@@ -81,63 +192,61 @@ int map(struct mm_id *mm_idp, unsigned long virt, unsigned long len, | |||
81 | .fd = phys_fd, | 192 | .fd = phys_fd, |
82 | .offset= offset | 193 | .offset= offset |
83 | } } } ); | 194 | } } } ); |
84 | n = os_write_file(fd, &map, sizeof(map)); | 195 | ret = os_write_file(fd, &map, sizeof(map)); |
85 | if(n != sizeof(map)) | 196 | if(ret != sizeof(map)) |
86 | printk("map : /proc/mm map failed, err = %d\n", -n); | 197 | printk("map : /proc/mm map failed, err = %d\n", -ret); |
198 | else ret = 0; | ||
87 | } | 199 | } |
88 | else { | 200 | else { |
89 | long res; | ||
90 | unsigned long args[] = { virt, len, prot, | 201 | unsigned long args[] = { virt, len, prot, |
91 | MAP_SHARED | MAP_FIXED, phys_fd, | 202 | MAP_SHARED | MAP_FIXED, phys_fd, |
92 | MMAP_OFFSET(offset) }; | 203 | MMAP_OFFSET(offset) }; |
93 | 204 | ||
94 | res = run_syscall_stub(mm_idp, STUB_MMAP_NR, args); | 205 | ret = run_syscall_stub(mm_idp, STUB_MMAP_NR, args, virt, |
95 | if((void *) res == MAP_FAILED) | 206 | data, done); |
96 | printk("mmap stub failed, errno = %d\n", res); | ||
97 | } | 207 | } |
98 | 208 | ||
99 | return 0; | 209 | return ret; |
100 | } | 210 | } |
101 | 211 | ||
102 | int unmap(struct mm_id *mm_idp, void *addr, unsigned long len) | 212 | int unmap(struct mm_id * mm_idp, void *addr, unsigned long len, int done, |
213 | void **data) | ||
103 | { | 214 | { |
104 | int n; | 215 | int ret; |
105 | 216 | ||
106 | if(proc_mm){ | 217 | if(proc_mm){ |
107 | struct proc_mm_op unmap; | 218 | struct proc_mm_op unmap; |
108 | int fd = mm_idp->u.mm_fd; | 219 | int fd = mm_idp->u.mm_fd; |
220 | |||
109 | unmap = ((struct proc_mm_op) { .op = MM_MUNMAP, | 221 | unmap = ((struct proc_mm_op) { .op = MM_MUNMAP, |
110 | .u = | 222 | .u = |
111 | { .munmap = | 223 | { .munmap = |
112 | { .addr = | 224 | { .addr = |
113 | (unsigned long) addr, | 225 | (unsigned long) addr, |
114 | .len = len } } } ); | 226 | .len = len } } } ); |
115 | n = os_write_file(fd, &unmap, sizeof(unmap)); | 227 | ret = os_write_file(fd, &unmap, sizeof(unmap)); |
116 | if(n != sizeof(unmap)) { | 228 | if(ret != sizeof(unmap)) |
117 | if(n < 0) | 229 | printk("unmap - proc_mm write returned %d\n", ret); |
118 | return(n); | 230 | else ret = 0; |
119 | else if(n > 0) | ||
120 | return(-EIO); | ||
121 | } | ||
122 | } | 231 | } |
123 | else { | 232 | else { |
124 | int res; | ||
125 | unsigned long args[] = { (unsigned long) addr, len, 0, 0, 0, | 233 | unsigned long args[] = { (unsigned long) addr, len, 0, 0, 0, |
126 | 0 }; | 234 | 0 }; |
127 | 235 | ||
128 | res = run_syscall_stub(mm_idp, __NR_munmap, args); | 236 | ret = run_syscall_stub(mm_idp, __NR_munmap, args, 0, |
129 | if(res < 0) | 237 | data, done); |
130 | printk("munmap stub failed, errno = %d\n", res); | 238 | if(ret < 0) |
239 | printk("munmap stub failed, errno = %d\n", ret); | ||
131 | } | 240 | } |
132 | 241 | ||
133 | return(0); | 242 | return ret; |
134 | } | 243 | } |
135 | 244 | ||
136 | int protect(struct mm_id *mm_idp, unsigned long addr, unsigned long len, | 245 | int protect(struct mm_id * mm_idp, unsigned long addr, unsigned long len, |
137 | int r, int w, int x) | 246 | int r, int w, int x, int done, void **data) |
138 | { | 247 | { |
139 | struct proc_mm_op protect; | 248 | struct proc_mm_op protect; |
140 | int prot, n; | 249 | int prot, ret; |
141 | 250 | ||
142 | prot = (r ? PROT_READ : 0) | (w ? PROT_WRITE : 0) | | 251 | prot = (r ? PROT_READ : 0) | (w ? PROT_WRITE : 0) | |
143 | (x ? PROT_EXEC : 0); | 252 | (x ? PROT_EXEC : 0); |
@@ -152,20 +261,19 @@ int protect(struct mm_id *mm_idp, unsigned long addr, unsigned long len, | |||
152 | .len = len, | 261 | .len = len, |
153 | .prot = prot } } } ); | 262 | .prot = prot } } } ); |
154 | 263 | ||
155 | n = os_write_file(fd, &protect, sizeof(protect)); | 264 | ret = os_write_file(fd, &protect, sizeof(protect)); |
156 | if(n != sizeof(protect)) | 265 | if(ret != sizeof(protect)) |
157 | panic("protect failed, err = %d", -n); | 266 | printk("protect failed, err = %d", -ret); |
267 | else ret = 0; | ||
158 | } | 268 | } |
159 | else { | 269 | else { |
160 | int res; | ||
161 | unsigned long args[] = { addr, len, prot, 0, 0, 0 }; | 270 | unsigned long args[] = { addr, len, prot, 0, 0, 0 }; |
162 | 271 | ||
163 | res = run_syscall_stub(mm_idp, __NR_mprotect, args); | 272 | ret = run_syscall_stub(mm_idp, __NR_mprotect, args, 0, |
164 | if(res < 0) | 273 | data, done); |
165 | panic("mprotect stub failed, errno = %d\n", res); | ||
166 | } | 274 | } |
167 | 275 | ||
168 | return(0); | 276 | return ret; |
169 | } | 277 | } |
170 | 278 | ||
171 | void before_mem_skas(unsigned long unused) | 279 | void before_mem_skas(unsigned long unused) |
diff --git a/arch/um/kernel/skas/mmu.c b/arch/um/kernel/skas/mmu.c index d232daa42c31..240143b616a2 100644 --- a/arch/um/kernel/skas/mmu.c +++ b/arch/um/kernel/skas/mmu.c | |||
@@ -56,6 +56,9 @@ static int init_stub_pte(struct mm_struct *mm, unsigned long proc, | |||
56 | */ | 56 | */ |
57 | 57 | ||
58 | mm->context.skas.last_page_table = pmd_page_kernel(*pmd); | 58 | mm->context.skas.last_page_table = pmd_page_kernel(*pmd); |
59 | #ifdef CONFIG_3_LEVEL_PGTABLES | ||
60 | mm->context.skas.last_pmd = (unsigned long) __va(pud_val(*pud)); | ||
61 | #endif | ||
59 | 62 | ||
60 | *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT)); | 63 | *pte = mk_pte(virt_to_page(kernel), __pgprot(_PAGE_PRESENT)); |
61 | *pte = pte_mkexec(*pte); | 64 | *pte = pte_mkexec(*pte); |
@@ -77,23 +80,14 @@ int init_new_context_skas(struct task_struct *task, struct mm_struct *mm) | |||
77 | struct mm_struct *cur_mm = current->mm; | 80 | struct mm_struct *cur_mm = current->mm; |
78 | struct mm_id *cur_mm_id = &cur_mm->context.skas.id; | 81 | struct mm_id *cur_mm_id = &cur_mm->context.skas.id; |
79 | struct mm_id *mm_id = &mm->context.skas.id; | 82 | struct mm_id *mm_id = &mm->context.skas.id; |
80 | unsigned long stack; | 83 | unsigned long stack = 0; |
81 | int from, ret; | 84 | int from, ret = -ENOMEM; |
82 | 85 | ||
83 | if(proc_mm){ | 86 | if(!proc_mm || !ptrace_faultinfo){ |
84 | if((cur_mm != NULL) && (cur_mm != &init_mm)) | 87 | stack = get_zeroed_page(GFP_KERNEL); |
85 | from = cur_mm->context.skas.id.u.mm_fd; | 88 | if(stack == 0) |
86 | else from = -1; | 89 | goto out; |
87 | 90 | ||
88 | ret = new_mm(from); | ||
89 | if(ret < 0){ | ||
90 | printk("init_new_context_skas - new_mm failed, " | ||
91 | "errno = %d\n", ret); | ||
92 | return ret; | ||
93 | } | ||
94 | mm_id->u.mm_fd = ret; | ||
95 | } | ||
96 | else { | ||
97 | /* This zeros the entry that pgd_alloc didn't, needed since | 91 | /* This zeros the entry that pgd_alloc didn't, needed since |
98 | * we are about to reinitialize it, and want mm.nr_ptes to | 92 | * we are about to reinitialize it, and want mm.nr_ptes to |
99 | * be accurate. | 93 | * be accurate. |
@@ -103,20 +97,30 @@ int init_new_context_skas(struct task_struct *task, struct mm_struct *mm) | |||
103 | ret = init_stub_pte(mm, CONFIG_STUB_CODE, | 97 | ret = init_stub_pte(mm, CONFIG_STUB_CODE, |
104 | (unsigned long) &__syscall_stub_start); | 98 | (unsigned long) &__syscall_stub_start); |
105 | if(ret) | 99 | if(ret) |
106 | goto out; | 100 | goto out_free; |
107 | |||
108 | ret = -ENOMEM; | ||
109 | stack = get_zeroed_page(GFP_KERNEL); | ||
110 | if(stack == 0) | ||
111 | goto out; | ||
112 | mm_id->stack = stack; | ||
113 | 101 | ||
114 | ret = init_stub_pte(mm, CONFIG_STUB_DATA, stack); | 102 | ret = init_stub_pte(mm, CONFIG_STUB_DATA, stack); |
115 | if(ret) | 103 | if(ret) |
116 | goto out_free; | 104 | goto out_free; |
117 | 105 | ||
118 | mm->nr_ptes--; | 106 | mm->nr_ptes--; |
107 | } | ||
108 | mm_id->stack = stack; | ||
119 | 109 | ||
110 | if(proc_mm){ | ||
111 | if((cur_mm != NULL) && (cur_mm != &init_mm)) | ||
112 | from = cur_mm_id->u.mm_fd; | ||
113 | else from = -1; | ||
114 | |||
115 | ret = new_mm(from, stack); | ||
116 | if(ret < 0){ | ||
117 | printk("init_new_context_skas - new_mm failed, " | ||
118 | "errno = %d\n", ret); | ||
119 | goto out_free; | ||
120 | } | ||
121 | mm_id->u.mm_fd = ret; | ||
122 | } | ||
123 | else { | ||
120 | if((cur_mm != NULL) && (cur_mm != &init_mm)) | 124 | if((cur_mm != NULL) && (cur_mm != &init_mm)) |
121 | mm_id->u.pid = copy_context_skas0(stack, | 125 | mm_id->u.pid = copy_context_skas0(stack, |
122 | cur_mm_id->u.pid); | 126 | cur_mm_id->u.pid); |
@@ -126,7 +130,8 @@ int init_new_context_skas(struct task_struct *task, struct mm_struct *mm) | |||
126 | return 0; | 130 | return 0; |
127 | 131 | ||
128 | out_free: | 132 | out_free: |
129 | free_page(mm_id->stack); | 133 | if(mm_id->stack != 0) |
134 | free_page(mm_id->stack); | ||
130 | out: | 135 | out: |
131 | return ret; | 136 | return ret; |
132 | } | 137 | } |
@@ -137,9 +142,15 @@ void destroy_context_skas(struct mm_struct *mm) | |||
137 | 142 | ||
138 | if(proc_mm) | 143 | if(proc_mm) |
139 | os_close_file(mmu->id.u.mm_fd); | 144 | os_close_file(mmu->id.u.mm_fd); |
140 | else { | 145 | else |
141 | os_kill_ptraced_process(mmu->id.u.pid, 1); | 146 | os_kill_ptraced_process(mmu->id.u.pid, 1); |
147 | |||
148 | if(!proc_mm || !ptrace_faultinfo){ | ||
142 | free_page(mmu->id.stack); | 149 | free_page(mmu->id.stack); |
143 | free_page(mmu->last_page_table); | 150 | pte_free_kernel((pte_t *) mmu->last_page_table); |
151 | dec_page_state(nr_page_table_pages); | ||
152 | #ifdef CONFIG_3_LEVEL_PGTABLES | ||
153 | pmd_free((pmd_t *) mmu->last_pmd); | ||
154 | #endif | ||
144 | } | 155 | } |
145 | } | 156 | } |
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c index f228f8b54194..5cd0e9929789 100644 --- a/arch/um/kernel/skas/process.c +++ b/arch/um/kernel/skas/process.c | |||
@@ -138,6 +138,8 @@ static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu | |||
138 | } | 138 | } |
139 | 139 | ||
140 | extern int __syscall_stub_start; | 140 | extern int __syscall_stub_start; |
141 | int stub_code_fd = -1; | ||
142 | __u64 stub_code_offset; | ||
141 | 143 | ||
142 | static int userspace_tramp(void *stack) | 144 | static int userspace_tramp(void *stack) |
143 | { | 145 | { |
@@ -152,31 +154,31 @@ static int userspace_tramp(void *stack) | |||
152 | /* This has a pte, but it can't be mapped in with the usual | 154 | /* This has a pte, but it can't be mapped in with the usual |
153 | * tlb_flush mechanism because this is part of that mechanism | 155 | * tlb_flush mechanism because this is part of that mechanism |
154 | */ | 156 | */ |
155 | int fd; | ||
156 | __u64 offset; | ||
157 | |||
158 | fd = phys_mapping(to_phys(&__syscall_stub_start), &offset); | ||
159 | addr = mmap64((void *) UML_CONFIG_STUB_CODE, page_size(), | 157 | addr = mmap64((void *) UML_CONFIG_STUB_CODE, page_size(), |
160 | PROT_EXEC, MAP_FIXED | MAP_PRIVATE, fd, offset); | 158 | PROT_EXEC, MAP_FIXED | MAP_PRIVATE, |
159 | stub_code_fd, stub_code_offset); | ||
161 | if(addr == MAP_FAILED){ | 160 | if(addr == MAP_FAILED){ |
162 | printk("mapping mmap stub failed, errno = %d\n", | 161 | printk("mapping stub code failed, errno = %d\n", |
163 | errno); | 162 | errno); |
164 | exit(1); | 163 | exit(1); |
165 | } | 164 | } |
166 | 165 | ||
167 | if(stack != NULL){ | 166 | if(stack != NULL){ |
167 | int fd; | ||
168 | __u64 offset; | ||
169 | |||
168 | fd = phys_mapping(to_phys(stack), &offset); | 170 | fd = phys_mapping(to_phys(stack), &offset); |
169 | addr = mmap((void *) UML_CONFIG_STUB_DATA, page_size(), | 171 | addr = mmap((void *) UML_CONFIG_STUB_DATA, page_size(), |
170 | PROT_READ | PROT_WRITE, | 172 | PROT_READ | PROT_WRITE, |
171 | MAP_FIXED | MAP_SHARED, fd, offset); | 173 | MAP_FIXED | MAP_SHARED, fd, offset); |
172 | if(addr == MAP_FAILED){ | 174 | if(addr == MAP_FAILED){ |
173 | printk("mapping segfault stack failed, " | 175 | printk("mapping stub stack failed, " |
174 | "errno = %d\n", errno); | 176 | "errno = %d\n", errno); |
175 | exit(1); | 177 | exit(1); |
176 | } | 178 | } |
177 | } | 179 | } |
178 | } | 180 | } |
179 | if(!ptrace_faultinfo && (stack != NULL)){ | 181 | if(!ptrace_faultinfo){ |
180 | unsigned long v = UML_CONFIG_STUB_CODE + | 182 | unsigned long v = UML_CONFIG_STUB_CODE + |
181 | (unsigned long) stub_segv_handler - | 183 | (unsigned long) stub_segv_handler - |
182 | (unsigned long) &__syscall_stub_start; | 184 | (unsigned long) &__syscall_stub_start; |
@@ -202,6 +204,10 @@ int start_userspace(unsigned long stub_stack) | |||
202 | unsigned long sp; | 204 | unsigned long sp; |
203 | int pid, status, n, flags; | 205 | int pid, status, n, flags; |
204 | 206 | ||
207 | if ( stub_code_fd == -1 ) | ||
208 | stub_code_fd = phys_mapping(to_phys(&__syscall_stub_start), | ||
209 | &stub_code_offset); | ||
210 | |||
205 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, | 211 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, |
206 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); | 212 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); |
207 | if(stack == MAP_FAILED) | 213 | if(stack == MAP_FAILED) |
@@ -363,6 +369,53 @@ int copy_context_skas0(unsigned long new_stack, int pid) | |||
363 | return pid; | 369 | return pid; |
364 | } | 370 | } |
365 | 371 | ||
372 | /* | ||
373 | * This is used only, if proc_mm is available, while PTRACE_FAULTINFO | ||
374 | * isn't. Opening /proc/mm creates a new mm_context, which lacks the stub-pages | ||
375 | * Thus, we map them using /proc/mm-fd | ||
376 | */ | ||
377 | void map_stub_pages(int fd, unsigned long code, | ||
378 | unsigned long data, unsigned long stack) | ||
379 | { | ||
380 | struct proc_mm_op mmop; | ||
381 | int n; | ||
382 | |||
383 | mmop = ((struct proc_mm_op) { .op = MM_MMAP, | ||
384 | .u = | ||
385 | { .mmap = | ||
386 | { .addr = code, | ||
387 | .len = PAGE_SIZE, | ||
388 | .prot = PROT_EXEC, | ||
389 | .flags = MAP_FIXED | MAP_PRIVATE, | ||
390 | .fd = stub_code_fd, | ||
391 | .offset = stub_code_offset | ||
392 | } } }); | ||
393 | n = os_write_file(fd, &mmop, sizeof(mmop)); | ||
394 | if(n != sizeof(mmop)) | ||
395 | panic("map_stub_pages : /proc/mm map for code failed, " | ||
396 | "err = %d\n", -n); | ||
397 | |||
398 | if ( stack ) { | ||
399 | __u64 map_offset; | ||
400 | int map_fd = phys_mapping(to_phys((void *)stack), &map_offset); | ||
401 | mmop = ((struct proc_mm_op) | ||
402 | { .op = MM_MMAP, | ||
403 | .u = | ||
404 | { .mmap = | ||
405 | { .addr = data, | ||
406 | .len = PAGE_SIZE, | ||
407 | .prot = PROT_READ | PROT_WRITE, | ||
408 | .flags = MAP_FIXED | MAP_SHARED, | ||
409 | .fd = map_fd, | ||
410 | .offset = map_offset | ||
411 | } } }); | ||
412 | n = os_write_file(fd, &mmop, sizeof(mmop)); | ||
413 | if(n != sizeof(mmop)) | ||
414 | panic("map_stub_pages : /proc/mm map for data failed, " | ||
415 | "err = %d\n", -n); | ||
416 | } | ||
417 | } | ||
418 | |||
366 | void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, | 419 | void new_thread(void *stack, void **switch_buf_ptr, void **fork_buf_ptr, |
367 | void (*handler)(int)) | 420 | void (*handler)(int)) |
368 | { | 421 | { |
diff --git a/arch/um/kernel/skas/process_kern.c b/arch/um/kernel/skas/process_kern.c index cbabab104ac3..3d1b227226e6 100644 --- a/arch/um/kernel/skas/process_kern.c +++ b/arch/um/kernel/skas/process_kern.c | |||
@@ -129,7 +129,9 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp, | |||
129 | return(0); | 129 | return(0); |
130 | } | 130 | } |
131 | 131 | ||
132 | int new_mm(int from) | 132 | extern void map_stub_pages(int fd, unsigned long code, |
133 | unsigned long data, unsigned long stack); | ||
134 | int new_mm(int from, unsigned long stack) | ||
133 | { | 135 | { |
134 | struct proc_mm_op copy; | 136 | struct proc_mm_op copy; |
135 | int n, fd; | 137 | int n, fd; |
@@ -148,6 +150,9 @@ int new_mm(int from) | |||
148 | "err = %d\n", -n); | 150 | "err = %d\n", -n); |
149 | } | 151 | } |
150 | 152 | ||
153 | if(!ptrace_faultinfo) | ||
154 | map_stub_pages(fd, CONFIG_STUB_CODE, CONFIG_STUB_DATA, stack); | ||
155 | |||
151 | return(fd); | 156 | return(fd); |
152 | } | 157 | } |
153 | 158 | ||
diff --git a/arch/um/kernel/skas/syscall.c b/arch/um/kernel/skas/syscall.c new file mode 100644 index 000000000000..51fb94076fcf --- /dev/null +++ b/arch/um/kernel/skas/syscall.c | |||
@@ -0,0 +1,50 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "linux/sys.h" | ||
7 | #include "linux/ptrace.h" | ||
8 | #include "asm/errno.h" | ||
9 | #include "asm/unistd.h" | ||
10 | #include "asm/ptrace.h" | ||
11 | #include "asm/current.h" | ||
12 | #include "sysdep/syscalls.h" | ||
13 | #include "kern_util.h" | ||
14 | #include "syscall.h" | ||
15 | |||
16 | void handle_syscall(union uml_pt_regs *r) | ||
17 | { | ||
18 | struct pt_regs *regs = container_of(r, struct pt_regs, regs); | ||
19 | long result; | ||
20 | int syscall; | ||
21 | #ifdef UML_CONFIG_SYSCALL_DEBUG | ||
22 | int index; | ||
23 | |||
24 | index = record_syscall_start(UPT_SYSCALL_NR(r)); | ||
25 | #endif | ||
26 | syscall_trace(r, 0); | ||
27 | |||
28 | current->thread.nsyscalls++; | ||
29 | nsyscalls++; | ||
30 | |||
31 | /* This should go in the declaration of syscall, but when I do that, | ||
32 | * strace -f -c bash -c 'ls ; ls' breaks, sometimes not tracing | ||
33 | * children at all, sometimes hanging when bash doesn't see the first | ||
34 | * ls exit. | ||
35 | * The assembly looks functionally the same to me. This is | ||
36 | * gcc version 4.0.1 20050727 (Red Hat 4.0.1-5) | ||
37 | * in case it's a compiler bug. | ||
38 | */ | ||
39 | syscall = UPT_SYSCALL_NR(r); | ||
40 | if((syscall >= NR_syscalls) || (syscall < 0)) | ||
41 | result = -ENOSYS; | ||
42 | else result = EXECUTE_SYSCALL(syscall, regs); | ||
43 | |||
44 | REGS_SET_SYSCALL_RETURN(r->skas.regs, result); | ||
45 | |||
46 | syscall_trace(r, 1); | ||
47 | #ifdef UML_CONFIG_SYSCALL_DEBUG | ||
48 | record_syscall_end(index, result); | ||
49 | #endif | ||
50 | } | ||
diff --git a/arch/um/kernel/skas/syscall_kern.c b/arch/um/kernel/skas/syscall_kern.c deleted file mode 100644 index bdf040ce5b8e..000000000000 --- a/arch/um/kernel/skas/syscall_kern.c +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 - 2003 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "linux/sys.h" | ||
7 | #include "linux/ptrace.h" | ||
8 | #include "asm/errno.h" | ||
9 | #include "asm/unistd.h" | ||
10 | #include "asm/ptrace.h" | ||
11 | #include "asm/current.h" | ||
12 | #include "sysdep/syscalls.h" | ||
13 | #include "kern_util.h" | ||
14 | |||
15 | extern syscall_handler_t *sys_call_table[]; | ||
16 | |||
17 | long execute_syscall_skas(void *r) | ||
18 | { | ||
19 | struct pt_regs *regs = r; | ||
20 | long res; | ||
21 | int syscall; | ||
22 | |||
23 | current->thread.nsyscalls++; | ||
24 | nsyscalls++; | ||
25 | syscall = UPT_SYSCALL_NR(®s->regs); | ||
26 | |||
27 | if((syscall >= NR_syscalls) || (syscall < 0)) | ||
28 | res = -ENOSYS; | ||
29 | else res = EXECUTE_SYSCALL(syscall, regs); | ||
30 | |||
31 | return(res); | ||
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/kernel/skas/syscall_user.c b/arch/um/kernel/skas/syscall_user.c deleted file mode 100644 index 6b0664970147..000000000000 --- a/arch/um/kernel/skas/syscall_user.c +++ /dev/null | |||
@@ -1,44 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <stdlib.h> | ||
7 | #include <signal.h> | ||
8 | #include "kern_util.h" | ||
9 | #include "uml-config.h" | ||
10 | #include "syscall_user.h" | ||
11 | #include "sysdep/ptrace.h" | ||
12 | #include "sysdep/sigcontext.h" | ||
13 | #include "skas.h" | ||
14 | |||
15 | void handle_syscall(union uml_pt_regs *regs) | ||
16 | { | ||
17 | long result; | ||
18 | #ifdef UML_CONFIG_SYSCALL_DEBUG | ||
19 | int index; | ||
20 | |||
21 | index = record_syscall_start(UPT_SYSCALL_NR(regs)); | ||
22 | #endif | ||
23 | |||
24 | syscall_trace(regs, 0); | ||
25 | result = execute_syscall_skas(regs); | ||
26 | |||
27 | REGS_SET_SYSCALL_RETURN(regs->skas.regs, result); | ||
28 | |||
29 | syscall_trace(regs, 1); | ||
30 | #ifdef UML_CONFIG_SYSCALL_DEBUG | ||
31 | record_syscall_end(index, result); | ||
32 | #endif | ||
33 | } | ||
34 | |||
35 | /* | ||
36 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
37 | * Emacs will notice this stuff at the end of the file and automatically | ||
38 | * adjust the settings for this buffer only. This must remain at the end | ||
39 | * of the file. | ||
40 | * --------------------------------------------------------------------------- | ||
41 | * Local variables: | ||
42 | * c-file-style: "linux" | ||
43 | * End: | ||
44 | */ | ||
diff --git a/arch/um/kernel/skas/tlb.c b/arch/um/kernel/skas/tlb.c index 6230999c672c..6e84963dfc29 100644 --- a/arch/um/kernel/skas/tlb.c +++ b/arch/um/kernel/skas/tlb.c | |||
@@ -18,33 +18,39 @@ | |||
18 | #include "os.h" | 18 | #include "os.h" |
19 | #include "tlb.h" | 19 | #include "tlb.h" |
20 | 20 | ||
21 | static void do_ops(union mm_context *mmu, struct host_vm_op *ops, int last) | 21 | static int do_ops(union mm_context *mmu, struct host_vm_op *ops, int last, |
22 | int finished, void **flush) | ||
22 | { | 23 | { |
23 | struct host_vm_op *op; | 24 | struct host_vm_op *op; |
24 | int i; | 25 | int i, ret = 0; |
25 | 26 | ||
26 | for(i = 0; i <= last; i++){ | 27 | for(i = 0; i <= last && !ret; i++){ |
27 | op = &ops[i]; | 28 | op = &ops[i]; |
28 | switch(op->type){ | 29 | switch(op->type){ |
29 | case MMAP: | 30 | case MMAP: |
30 | map(&mmu->skas.id, op->u.mmap.addr, op->u.mmap.len, | 31 | ret = map(&mmu->skas.id, op->u.mmap.addr, |
31 | op->u.mmap.r, op->u.mmap.w, op->u.mmap.x, | 32 | op->u.mmap.len, op->u.mmap.r, op->u.mmap.w, |
32 | op->u.mmap.fd, op->u.mmap.offset); | 33 | op->u.mmap.x, op->u.mmap.fd, |
34 | op->u.mmap.offset, finished, flush); | ||
33 | break; | 35 | break; |
34 | case MUNMAP: | 36 | case MUNMAP: |
35 | unmap(&mmu->skas.id, (void *) op->u.munmap.addr, | 37 | ret = unmap(&mmu->skas.id, |
36 | op->u.munmap.len); | 38 | (void *) op->u.munmap.addr, |
39 | op->u.munmap.len, finished, flush); | ||
37 | break; | 40 | break; |
38 | case MPROTECT: | 41 | case MPROTECT: |
39 | protect(&mmu->skas.id, op->u.mprotect.addr, | 42 | ret = protect(&mmu->skas.id, op->u.mprotect.addr, |
40 | op->u.mprotect.len, op->u.mprotect.r, | 43 | op->u.mprotect.len, op->u.mprotect.r, |
41 | op->u.mprotect.w, op->u.mprotect.x); | 44 | op->u.mprotect.w, op->u.mprotect.x, |
45 | finished, flush); | ||
42 | break; | 46 | break; |
43 | default: | 47 | default: |
44 | printk("Unknown op type %d in do_ops\n", op->type); | 48 | printk("Unknown op type %d in do_ops\n", op->type); |
45 | break; | 49 | break; |
46 | } | 50 | } |
47 | } | 51 | } |
52 | |||
53 | return ret; | ||
48 | } | 54 | } |
49 | 55 | ||
50 | extern int proc_mm; | 56 | extern int proc_mm; |
diff --git a/arch/um/kernel/syscall.c b/arch/um/kernel/syscall.c new file mode 100644 index 000000000000..1429c131879d --- /dev/null +++ b/arch/um/kernel/syscall.c | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "kern_util.h" | ||
7 | #include "syscall.h" | ||
8 | #include "os.h" | ||
9 | |||
10 | struct { | ||
11 | int syscall; | ||
12 | int pid; | ||
13 | long result; | ||
14 | unsigned long long start; | ||
15 | unsigned long long end; | ||
16 | } syscall_record[1024]; | ||
17 | |||
18 | int record_syscall_start(int syscall) | ||
19 | { | ||
20 | int max, index; | ||
21 | |||
22 | max = sizeof(syscall_record)/sizeof(syscall_record[0]); | ||
23 | index = next_syscall_index(max); | ||
24 | |||
25 | syscall_record[index].syscall = syscall; | ||
26 | syscall_record[index].pid = current_pid(); | ||
27 | syscall_record[index].result = 0xdeadbeef; | ||
28 | syscall_record[index].start = os_usecs(); | ||
29 | return(index); | ||
30 | } | ||
31 | |||
32 | void record_syscall_end(int index, long result) | ||
33 | { | ||
34 | syscall_record[index].result = result; | ||
35 | syscall_record[index].end = os_usecs(); | ||
36 | } | ||
diff --git a/arch/um/kernel/syscall_user.c b/arch/um/kernel/syscall_user.c deleted file mode 100644 index 01b711e00a85..000000000000 --- a/arch/um/kernel/syscall_user.c +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <stdlib.h> | ||
7 | #include <sys/time.h> | ||
8 | #include "kern_util.h" | ||
9 | #include "syscall_user.h" | ||
10 | |||
11 | struct { | ||
12 | int syscall; | ||
13 | int pid; | ||
14 | long result; | ||
15 | struct timeval start; | ||
16 | struct timeval end; | ||
17 | } syscall_record[1024]; | ||
18 | |||
19 | int record_syscall_start(int syscall) | ||
20 | { | ||
21 | int max, index; | ||
22 | |||
23 | max = sizeof(syscall_record)/sizeof(syscall_record[0]); | ||
24 | index = next_syscall_index(max); | ||
25 | |||
26 | syscall_record[index].syscall = syscall; | ||
27 | syscall_record[index].pid = current_pid(); | ||
28 | syscall_record[index].result = 0xdeadbeef; | ||
29 | gettimeofday(&syscall_record[index].start, NULL); | ||
30 | return(index); | ||
31 | } | ||
32 | |||
33 | void record_syscall_end(int index, long result) | ||
34 | { | ||
35 | syscall_record[index].result = result; | ||
36 | gettimeofday(&syscall_record[index].end, NULL); | ||
37 | } | ||
38 | |||
39 | /* | ||
40 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
41 | * Emacs will notice this stuff at the end of the file and automatically | ||
42 | * adjust the settings for this buffer only. This must remain at the end | ||
43 | * of the file. | ||
44 | * --------------------------------------------------------------------------- | ||
45 | * Local variables: | ||
46 | * c-file-style: "linux" | ||
47 | * End: | ||
48 | */ | ||
diff --git a/arch/um/kernel/tlb.c b/arch/um/kernel/tlb.c index 83ec8d4747fd..80ed6188e8a2 100644 --- a/arch/um/kernel/tlb.c +++ b/arch/um/kernel/tlb.c | |||
@@ -15,12 +15,118 @@ | |||
15 | #include "mem_user.h" | 15 | #include "mem_user.h" |
16 | #include "os.h" | 16 | #include "os.h" |
17 | 17 | ||
18 | static int add_mmap(unsigned long virt, unsigned long phys, unsigned long len, | ||
19 | int r, int w, int x, struct host_vm_op *ops, int *index, | ||
20 | int last_filled, union mm_context *mmu, void **flush, | ||
21 | int (*do_ops)(union mm_context *, struct host_vm_op *, | ||
22 | int, int, void **)) | ||
23 | { | ||
24 | __u64 offset; | ||
25 | struct host_vm_op *last; | ||
26 | int fd, ret = 0; | ||
27 | |||
28 | fd = phys_mapping(phys, &offset); | ||
29 | if(*index != -1){ | ||
30 | last = &ops[*index]; | ||
31 | if((last->type == MMAP) && | ||
32 | (last->u.mmap.addr + last->u.mmap.len == virt) && | ||
33 | (last->u.mmap.r == r) && (last->u.mmap.w == w) && | ||
34 | (last->u.mmap.x == x) && (last->u.mmap.fd == fd) && | ||
35 | (last->u.mmap.offset + last->u.mmap.len == offset)){ | ||
36 | last->u.mmap.len += len; | ||
37 | return 0; | ||
38 | } | ||
39 | } | ||
40 | |||
41 | if(*index == last_filled){ | ||
42 | ret = (*do_ops)(mmu, ops, last_filled, 0, flush); | ||
43 | *index = -1; | ||
44 | } | ||
45 | |||
46 | ops[++*index] = ((struct host_vm_op) { .type = MMAP, | ||
47 | .u = { .mmap = { | ||
48 | .addr = virt, | ||
49 | .len = len, | ||
50 | .r = r, | ||
51 | .w = w, | ||
52 | .x = x, | ||
53 | .fd = fd, | ||
54 | .offset = offset } | ||
55 | } }); | ||
56 | return ret; | ||
57 | } | ||
58 | |||
59 | static int add_munmap(unsigned long addr, unsigned long len, | ||
60 | struct host_vm_op *ops, int *index, int last_filled, | ||
61 | union mm_context *mmu, void **flush, | ||
62 | int (*do_ops)(union mm_context *, struct host_vm_op *, | ||
63 | int, int, void **)) | ||
64 | { | ||
65 | struct host_vm_op *last; | ||
66 | int ret = 0; | ||
67 | |||
68 | if(*index != -1){ | ||
69 | last = &ops[*index]; | ||
70 | if((last->type == MUNMAP) && | ||
71 | (last->u.munmap.addr + last->u.mmap.len == addr)){ | ||
72 | last->u.munmap.len += len; | ||
73 | return 0; | ||
74 | } | ||
75 | } | ||
76 | |||
77 | if(*index == last_filled){ | ||
78 | ret = (*do_ops)(mmu, ops, last_filled, 0, flush); | ||
79 | *index = -1; | ||
80 | } | ||
81 | |||
82 | ops[++*index] = ((struct host_vm_op) { .type = MUNMAP, | ||
83 | .u = { .munmap = { | ||
84 | .addr = addr, | ||
85 | .len = len } } }); | ||
86 | return ret; | ||
87 | } | ||
88 | |||
89 | static int add_mprotect(unsigned long addr, unsigned long len, int r, int w, | ||
90 | int x, struct host_vm_op *ops, int *index, | ||
91 | int last_filled, union mm_context *mmu, void **flush, | ||
92 | int (*do_ops)(union mm_context *, struct host_vm_op *, | ||
93 | int, int, void **)) | ||
94 | { | ||
95 | struct host_vm_op *last; | ||
96 | int ret = 0; | ||
97 | |||
98 | if(*index != -1){ | ||
99 | last = &ops[*index]; | ||
100 | if((last->type == MPROTECT) && | ||
101 | (last->u.mprotect.addr + last->u.mprotect.len == addr) && | ||
102 | (last->u.mprotect.r == r) && (last->u.mprotect.w == w) && | ||
103 | (last->u.mprotect.x == x)){ | ||
104 | last->u.mprotect.len += len; | ||
105 | return 0; | ||
106 | } | ||
107 | } | ||
108 | |||
109 | if(*index == last_filled){ | ||
110 | ret = (*do_ops)(mmu, ops, last_filled, 0, flush); | ||
111 | *index = -1; | ||
112 | } | ||
113 | |||
114 | ops[++*index] = ((struct host_vm_op) { .type = MPROTECT, | ||
115 | .u = { .mprotect = { | ||
116 | .addr = addr, | ||
117 | .len = len, | ||
118 | .r = r, | ||
119 | .w = w, | ||
120 | .x = x } } }); | ||
121 | return ret; | ||
122 | } | ||
123 | |||
18 | #define ADD_ROUND(n, inc) (((n) + (inc)) & ~((inc) - 1)) | 124 | #define ADD_ROUND(n, inc) (((n) + (inc)) & ~((inc) - 1)) |
19 | 125 | ||
20 | void fix_range_common(struct mm_struct *mm, unsigned long start_addr, | 126 | void fix_range_common(struct mm_struct *mm, unsigned long start_addr, |
21 | unsigned long end_addr, int force, | 127 | unsigned long end_addr, int force, |
22 | void (*do_ops)(union mm_context *, struct host_vm_op *, | 128 | int (*do_ops)(union mm_context *, struct host_vm_op *, |
23 | int)) | 129 | int, int, void **)) |
24 | { | 130 | { |
25 | pgd_t *npgd; | 131 | pgd_t *npgd; |
26 | pud_t *npud; | 132 | pud_t *npud; |
@@ -29,21 +135,24 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr, | |||
29 | union mm_context *mmu = &mm->context; | 135 | union mm_context *mmu = &mm->context; |
30 | unsigned long addr, end; | 136 | unsigned long addr, end; |
31 | int r, w, x; | 137 | int r, w, x; |
32 | struct host_vm_op ops[16]; | 138 | struct host_vm_op ops[1]; |
139 | void *flush = NULL; | ||
33 | int op_index = -1, last_op = sizeof(ops) / sizeof(ops[0]) - 1; | 140 | int op_index = -1, last_op = sizeof(ops) / sizeof(ops[0]) - 1; |
141 | int ret = 0; | ||
34 | 142 | ||
35 | if(mm == NULL) return; | 143 | if(mm == NULL) return; |
36 | 144 | ||
37 | for(addr = start_addr; addr < end_addr;){ | 145 | ops[0].type = NONE; |
146 | for(addr = start_addr; addr < end_addr && !ret;){ | ||
38 | npgd = pgd_offset(mm, addr); | 147 | npgd = pgd_offset(mm, addr); |
39 | if(!pgd_present(*npgd)){ | 148 | if(!pgd_present(*npgd)){ |
40 | end = ADD_ROUND(addr, PGDIR_SIZE); | 149 | end = ADD_ROUND(addr, PGDIR_SIZE); |
41 | if(end > end_addr) | 150 | if(end > end_addr) |
42 | end = end_addr; | 151 | end = end_addr; |
43 | if(force || pgd_newpage(*npgd)){ | 152 | if(force || pgd_newpage(*npgd)){ |
44 | op_index = add_munmap(addr, end - addr, ops, | 153 | ret = add_munmap(addr, end - addr, ops, |
45 | op_index, last_op, mmu, | 154 | &op_index, last_op, mmu, |
46 | do_ops); | 155 | &flush, do_ops); |
47 | pgd_mkuptodate(*npgd); | 156 | pgd_mkuptodate(*npgd); |
48 | } | 157 | } |
49 | addr = end; | 158 | addr = end; |
@@ -56,9 +165,9 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr, | |||
56 | if(end > end_addr) | 165 | if(end > end_addr) |
57 | end = end_addr; | 166 | end = end_addr; |
58 | if(force || pud_newpage(*npud)){ | 167 | if(force || pud_newpage(*npud)){ |
59 | op_index = add_munmap(addr, end - addr, ops, | 168 | ret = add_munmap(addr, end - addr, ops, |
60 | op_index, last_op, mmu, | 169 | &op_index, last_op, mmu, |
61 | do_ops); | 170 | &flush, do_ops); |
62 | pud_mkuptodate(*npud); | 171 | pud_mkuptodate(*npud); |
63 | } | 172 | } |
64 | addr = end; | 173 | addr = end; |
@@ -71,9 +180,9 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr, | |||
71 | if(end > end_addr) | 180 | if(end > end_addr) |
72 | end = end_addr; | 181 | end = end_addr; |
73 | if(force || pmd_newpage(*npmd)){ | 182 | if(force || pmd_newpage(*npmd)){ |
74 | op_index = add_munmap(addr, end - addr, ops, | 183 | ret = add_munmap(addr, end - addr, ops, |
75 | op_index, last_op, mmu, | 184 | &op_index, last_op, mmu, |
76 | do_ops); | 185 | &flush, do_ops); |
77 | pmd_mkuptodate(*npmd); | 186 | pmd_mkuptodate(*npmd); |
78 | } | 187 | } |
79 | addr = end; | 188 | addr = end; |
@@ -92,24 +201,32 @@ void fix_range_common(struct mm_struct *mm, unsigned long start_addr, | |||
92 | } | 201 | } |
93 | if(force || pte_newpage(*npte)){ | 202 | if(force || pte_newpage(*npte)){ |
94 | if(pte_present(*npte)) | 203 | if(pte_present(*npte)) |
95 | op_index = add_mmap(addr, | 204 | ret = add_mmap(addr, |
96 | pte_val(*npte) & PAGE_MASK, | 205 | pte_val(*npte) & PAGE_MASK, |
97 | PAGE_SIZE, r, w, x, ops, | 206 | PAGE_SIZE, r, w, x, ops, |
98 | op_index, last_op, mmu, | 207 | &op_index, last_op, mmu, |
99 | do_ops); | 208 | &flush, do_ops); |
100 | else op_index = add_munmap(addr, PAGE_SIZE, ops, | 209 | else ret = add_munmap(addr, PAGE_SIZE, ops, |
101 | op_index, last_op, mmu, | 210 | &op_index, last_op, mmu, |
102 | do_ops); | 211 | &flush, do_ops); |
103 | } | 212 | } |
104 | else if(pte_newprot(*npte)) | 213 | else if(pte_newprot(*npte)) |
105 | op_index = add_mprotect(addr, PAGE_SIZE, r, w, x, ops, | 214 | ret = add_mprotect(addr, PAGE_SIZE, r, w, x, ops, |
106 | op_index, last_op, mmu, | 215 | &op_index, last_op, mmu, |
107 | do_ops); | 216 | &flush, do_ops); |
108 | 217 | ||
109 | *npte = pte_mkuptodate(*npte); | 218 | *npte = pte_mkuptodate(*npte); |
110 | addr += PAGE_SIZE; | 219 | addr += PAGE_SIZE; |
111 | } | 220 | } |
112 | (*do_ops)(mmu, ops, op_index); | 221 | |
222 | if(!ret) | ||
223 | ret = (*do_ops)(mmu, ops, op_index, 1, &flush); | ||
224 | |||
225 | /* This is not an else because ret is modified above */ | ||
226 | if(ret) { | ||
227 | printk("fix_range_common: failed, killing current process\n"); | ||
228 | force_sig(SIGKILL, current); | ||
229 | } | ||
113 | } | 230 | } |
114 | 231 | ||
115 | int flush_tlb_kernel_range_common(unsigned long start, unsigned long end) | 232 | int flush_tlb_kernel_range_common(unsigned long start, unsigned long end) |
@@ -226,106 +343,6 @@ pte_t *addr_pte(struct task_struct *task, unsigned long addr) | |||
226 | return(pte_offset_map(pmd, addr)); | 343 | return(pte_offset_map(pmd, addr)); |
227 | } | 344 | } |
228 | 345 | ||
229 | int add_mmap(unsigned long virt, unsigned long phys, unsigned long len, | ||
230 | int r, int w, int x, struct host_vm_op *ops, int index, | ||
231 | int last_filled, union mm_context *mmu, | ||
232 | void (*do_ops)(union mm_context *, struct host_vm_op *, int)) | ||
233 | { | ||
234 | __u64 offset; | ||
235 | struct host_vm_op *last; | ||
236 | int fd; | ||
237 | |||
238 | fd = phys_mapping(phys, &offset); | ||
239 | if(index != -1){ | ||
240 | last = &ops[index]; | ||
241 | if((last->type == MMAP) && | ||
242 | (last->u.mmap.addr + last->u.mmap.len == virt) && | ||
243 | (last->u.mmap.r == r) && (last->u.mmap.w == w) && | ||
244 | (last->u.mmap.x == x) && (last->u.mmap.fd == fd) && | ||
245 | (last->u.mmap.offset + last->u.mmap.len == offset)){ | ||
246 | last->u.mmap.len += len; | ||
247 | return(index); | ||
248 | } | ||
249 | } | ||
250 | |||
251 | if(index == last_filled){ | ||
252 | (*do_ops)(mmu, ops, last_filled); | ||
253 | index = -1; | ||
254 | } | ||
255 | |||
256 | ops[++index] = ((struct host_vm_op) { .type = MMAP, | ||
257 | .u = { .mmap = { | ||
258 | .addr = virt, | ||
259 | .len = len, | ||
260 | .r = r, | ||
261 | .w = w, | ||
262 | .x = x, | ||
263 | .fd = fd, | ||
264 | .offset = offset } | ||
265 | } }); | ||
266 | return(index); | ||
267 | } | ||
268 | |||
269 | int add_munmap(unsigned long addr, unsigned long len, struct host_vm_op *ops, | ||
270 | int index, int last_filled, union mm_context *mmu, | ||
271 | void (*do_ops)(union mm_context *, struct host_vm_op *, int)) | ||
272 | { | ||
273 | struct host_vm_op *last; | ||
274 | |||
275 | if(index != -1){ | ||
276 | last = &ops[index]; | ||
277 | if((last->type == MUNMAP) && | ||
278 | (last->u.munmap.addr + last->u.mmap.len == addr)){ | ||
279 | last->u.munmap.len += len; | ||
280 | return(index); | ||
281 | } | ||
282 | } | ||
283 | |||
284 | if(index == last_filled){ | ||
285 | (*do_ops)(mmu, ops, last_filled); | ||
286 | index = -1; | ||
287 | } | ||
288 | |||
289 | ops[++index] = ((struct host_vm_op) { .type = MUNMAP, | ||
290 | .u = { .munmap = { | ||
291 | .addr = addr, | ||
292 | .len = len } } }); | ||
293 | return(index); | ||
294 | } | ||
295 | |||
296 | int add_mprotect(unsigned long addr, unsigned long len, int r, int w, int x, | ||
297 | struct host_vm_op *ops, int index, int last_filled, | ||
298 | union mm_context *mmu, | ||
299 | void (*do_ops)(union mm_context *, struct host_vm_op *, int)) | ||
300 | { | ||
301 | struct host_vm_op *last; | ||
302 | |||
303 | if(index != -1){ | ||
304 | last = &ops[index]; | ||
305 | if((last->type == MPROTECT) && | ||
306 | (last->u.mprotect.addr + last->u.mprotect.len == addr) && | ||
307 | (last->u.mprotect.r == r) && (last->u.mprotect.w == w) && | ||
308 | (last->u.mprotect.x == x)){ | ||
309 | last->u.mprotect.len += len; | ||
310 | return(index); | ||
311 | } | ||
312 | } | ||
313 | |||
314 | if(index == last_filled){ | ||
315 | (*do_ops)(mmu, ops, last_filled); | ||
316 | index = -1; | ||
317 | } | ||
318 | |||
319 | ops[++index] = ((struct host_vm_op) { .type = MPROTECT, | ||
320 | .u = { .mprotect = { | ||
321 | .addr = addr, | ||
322 | .len = len, | ||
323 | .r = r, | ||
324 | .w = w, | ||
325 | .x = x } } }); | ||
326 | return(index); | ||
327 | } | ||
328 | |||
329 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long address) | 346 | void flush_tlb_page(struct vm_area_struct *vma, unsigned long address) |
330 | { | 347 | { |
331 | address &= PAGE_MASK; | 348 | address &= PAGE_MASK; |
diff --git a/arch/um/kernel/trap_kern.c b/arch/um/kernel/trap_kern.c index c20aef120598..b5fc89fe9eab 100644 --- a/arch/um/kernel/trap_kern.c +++ b/arch/um/kernel/trap_kern.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include "mem.h" | 26 | #include "mem.h" |
27 | #include "mem_kern.h" | 27 | #include "mem_kern.h" |
28 | 28 | ||
29 | /* Note this is constrained to return 0, -EFAULT, -EACCESS, -ENOMEM by segv(). */ | ||
29 | int handle_page_fault(unsigned long address, unsigned long ip, | 30 | int handle_page_fault(unsigned long address, unsigned long ip, |
30 | int is_write, int is_user, int *code_out) | 31 | int is_write, int is_user, int *code_out) |
31 | { | 32 | { |
@@ -35,7 +36,6 @@ int handle_page_fault(unsigned long address, unsigned long ip, | |||
35 | pud_t *pud; | 36 | pud_t *pud; |
36 | pmd_t *pmd; | 37 | pmd_t *pmd; |
37 | pte_t *pte; | 38 | pte_t *pte; |
38 | unsigned long page; | ||
39 | int err = -EFAULT; | 39 | int err = -EFAULT; |
40 | 40 | ||
41 | *code_out = SEGV_MAPERR; | 41 | *code_out = SEGV_MAPERR; |
@@ -52,7 +52,7 @@ int handle_page_fault(unsigned long address, unsigned long ip, | |||
52 | else if(expand_stack(vma, address)) | 52 | else if(expand_stack(vma, address)) |
53 | goto out; | 53 | goto out; |
54 | 54 | ||
55 | good_area: | 55 | good_area: |
56 | *code_out = SEGV_ACCERR; | 56 | *code_out = SEGV_ACCERR; |
57 | if(is_write && !(vma->vm_flags & VM_WRITE)) | 57 | if(is_write && !(vma->vm_flags & VM_WRITE)) |
58 | goto out; | 58 | goto out; |
@@ -60,9 +60,8 @@ int handle_page_fault(unsigned long address, unsigned long ip, | |||
60 | if(!(vma->vm_flags & (VM_READ | VM_EXEC))) | 60 | if(!(vma->vm_flags & (VM_READ | VM_EXEC))) |
61 | goto out; | 61 | goto out; |
62 | 62 | ||
63 | page = address & PAGE_MASK; | ||
64 | do { | 63 | do { |
65 | survive: | 64 | survive: |
66 | switch (handle_mm_fault(mm, vma, address, is_write)){ | 65 | switch (handle_mm_fault(mm, vma, address, is_write)){ |
67 | case VM_FAULT_MINOR: | 66 | case VM_FAULT_MINOR: |
68 | current->min_flt++; | 67 | current->min_flt++; |
@@ -79,16 +78,16 @@ int handle_page_fault(unsigned long address, unsigned long ip, | |||
79 | default: | 78 | default: |
80 | BUG(); | 79 | BUG(); |
81 | } | 80 | } |
82 | pgd = pgd_offset(mm, page); | 81 | pgd = pgd_offset(mm, address); |
83 | pud = pud_offset(pgd, page); | 82 | pud = pud_offset(pgd, address); |
84 | pmd = pmd_offset(pud, page); | 83 | pmd = pmd_offset(pud, address); |
85 | pte = pte_offset_kernel(pmd, page); | 84 | pte = pte_offset_kernel(pmd, address); |
86 | } while(!pte_present(*pte)); | 85 | } while(!pte_present(*pte)); |
87 | err = 0; | 86 | err = 0; |
88 | *pte = pte_mkyoung(*pte); | 87 | *pte = pte_mkyoung(*pte); |
89 | if(pte_write(*pte)) *pte = pte_mkdirty(*pte); | 88 | if(pte_write(*pte)) *pte = pte_mkdirty(*pte); |
90 | flush_tlb_page(vma, page); | 89 | flush_tlb_page(vma, address); |
91 | out: | 90 | out: |
92 | up_read(&mm->mmap_sem); | 91 | up_read(&mm->mmap_sem); |
93 | return(err); | 92 | return(err); |
94 | 93 | ||
@@ -144,19 +143,18 @@ unsigned long segv(struct faultinfo fi, unsigned long ip, int is_user, void *sc) | |||
144 | panic("Kernel mode fault at addr 0x%lx, ip 0x%lx", | 143 | panic("Kernel mode fault at addr 0x%lx, ip 0x%lx", |
145 | address, ip); | 144 | address, ip); |
146 | 145 | ||
147 | if(err == -EACCES){ | 146 | if (err == -EACCES) { |
148 | si.si_signo = SIGBUS; | 147 | si.si_signo = SIGBUS; |
149 | si.si_errno = 0; | 148 | si.si_errno = 0; |
150 | si.si_code = BUS_ADRERR; | 149 | si.si_code = BUS_ADRERR; |
151 | si.si_addr = (void *)address; | 150 | si.si_addr = (void *)address; |
152 | current->thread.arch.faultinfo = fi; | 151 | current->thread.arch.faultinfo = fi; |
153 | force_sig_info(SIGBUS, &si, current); | 152 | force_sig_info(SIGBUS, &si, current); |
154 | } | 153 | } else if (err == -ENOMEM) { |
155 | else if(err == -ENOMEM){ | ||
156 | printk("VM: killing process %s\n", current->comm); | 154 | printk("VM: killing process %s\n", current->comm); |
157 | do_exit(SIGKILL); | 155 | do_exit(SIGKILL); |
158 | } | 156 | } else { |
159 | else { | 157 | BUG_ON(err != -EFAULT); |
160 | si.si_signo = SIGSEGV; | 158 | si.si_signo = SIGSEGV; |
161 | si.si_addr = (void *) address; | 159 | si.si_addr = (void *) address; |
162 | current->thread.arch.faultinfo = fi; | 160 | current->thread.arch.faultinfo = fi; |
@@ -200,30 +198,3 @@ void winch(int sig, union uml_pt_regs *regs) | |||
200 | void trap_init(void) | 198 | void trap_init(void) |
201 | { | 199 | { |
202 | } | 200 | } |
203 | |||
204 | DEFINE_SPINLOCK(trap_lock); | ||
205 | |||
206 | static int trap_index = 0; | ||
207 | |||
208 | int next_trap_index(int limit) | ||
209 | { | ||
210 | int ret; | ||
211 | |||
212 | spin_lock(&trap_lock); | ||
213 | ret = trap_index; | ||
214 | if(++trap_index == limit) | ||
215 | trap_index = 0; | ||
216 | spin_unlock(&trap_lock); | ||
217 | return(ret); | ||
218 | } | ||
219 | |||
220 | /* | ||
221 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
222 | * Emacs will notice this stuff at the end of the file and automatically | ||
223 | * adjust the settings for this buffer only. This must remain at the end | ||
224 | * of the file. | ||
225 | * --------------------------------------------------------------------------- | ||
226 | * Local variables: | ||
227 | * c-file-style: "linux" | ||
228 | * End: | ||
229 | */ | ||
diff --git a/arch/um/kernel/trap_user.c b/arch/um/kernel/trap_user.c index f825a6eda3f5..e9ccd6b8d3c7 100644 --- a/arch/um/kernel/trap_user.c +++ b/arch/um/kernel/trap_user.c | |||
@@ -40,35 +40,14 @@ void kill_child_dead(int pid) | |||
40 | } while(1); | 40 | } while(1); |
41 | } | 41 | } |
42 | 42 | ||
43 | /* Unlocked - don't care if this is a bit off */ | ||
44 | int nsegfaults = 0; | ||
45 | |||
46 | struct { | ||
47 | unsigned long address; | ||
48 | int is_write; | ||
49 | int pid; | ||
50 | unsigned long sp; | ||
51 | int is_user; | ||
52 | } segfault_record[1024]; | ||
53 | |||
54 | void segv_handler(int sig, union uml_pt_regs *regs) | 43 | void segv_handler(int sig, union uml_pt_regs *regs) |
55 | { | 44 | { |
56 | int index, max; | ||
57 | struct faultinfo * fi = UPT_FAULTINFO(regs); | 45 | struct faultinfo * fi = UPT_FAULTINFO(regs); |
58 | 46 | ||
59 | if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){ | 47 | if(UPT_IS_USER(regs) && !SEGV_IS_FIXABLE(fi)){ |
60 | bad_segv(*fi, UPT_IP(regs)); | 48 | bad_segv(*fi, UPT_IP(regs)); |
61 | return; | 49 | return; |
62 | } | 50 | } |
63 | max = sizeof(segfault_record)/sizeof(segfault_record[0]); | ||
64 | index = next_trap_index(max); | ||
65 | |||
66 | nsegfaults++; | ||
67 | segfault_record[index].address = FAULT_ADDRESS(*fi); | ||
68 | segfault_record[index].pid = os_getpid(); | ||
69 | segfault_record[index].is_write = FAULT_WRITE(*fi); | ||
70 | segfault_record[index].sp = UPT_SP(regs); | ||
71 | segfault_record[index].is_user = UPT_IS_USER(regs); | ||
72 | segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs); | 51 | segv(*fi, UPT_IP(regs), UPT_IS_USER(regs), regs); |
73 | } | 52 | } |
74 | 53 | ||
diff --git a/arch/um/kernel/tt/syscall_kern.c b/arch/um/kernel/tt/syscall_kern.c index 2650a628719e..3d29c90514cc 100644 --- a/arch/um/kernel/tt/syscall_kern.c +++ b/arch/um/kernel/tt/syscall_kern.c | |||
@@ -12,36 +12,41 @@ | |||
12 | #include "asm/uaccess.h" | 12 | #include "asm/uaccess.h" |
13 | #include "asm/stat.h" | 13 | #include "asm/stat.h" |
14 | #include "sysdep/syscalls.h" | 14 | #include "sysdep/syscalls.h" |
15 | #include "sysdep/sigcontext.h" | ||
15 | #include "kern_util.h" | 16 | #include "kern_util.h" |
17 | #include "syscall.h" | ||
16 | 18 | ||
17 | extern syscall_handler_t *sys_call_table[]; | 19 | void syscall_handler_tt(int sig, struct pt_regs *regs) |
18 | |||
19 | long execute_syscall_tt(void *r) | ||
20 | { | 20 | { |
21 | struct pt_regs *regs = r; | 21 | void *sc; |
22 | long res; | 22 | long result; |
23 | int syscall; | 23 | int syscall; |
24 | |||
25 | #ifdef CONFIG_SYSCALL_DEBUG | 24 | #ifdef CONFIG_SYSCALL_DEBUG |
25 | int index; | ||
26 | index = record_syscall_start(syscall); | ||
27 | #endif | ||
28 | sc = UPT_SC(®s->regs); | ||
29 | SC_START_SYSCALL(sc); | ||
30 | |||
31 | syscall_trace(®s->regs, 0); | ||
32 | |||
26 | current->thread.nsyscalls++; | 33 | current->thread.nsyscalls++; |
27 | nsyscalls++; | 34 | nsyscalls++; |
28 | #endif | ||
29 | syscall = UPT_SYSCALL_NR(®s->regs); | 35 | syscall = UPT_SYSCALL_NR(®s->regs); |
30 | 36 | ||
31 | if((syscall >= NR_syscalls) || (syscall < 0)) | 37 | if((syscall >= NR_syscalls) || (syscall < 0)) |
32 | res = -ENOSYS; | 38 | result = -ENOSYS; |
33 | else res = EXECUTE_SYSCALL(syscall, regs); | 39 | else result = EXECUTE_SYSCALL(syscall, regs); |
34 | 40 | ||
35 | return(res); | 41 | /* regs->sc may have changed while the system call ran (there may |
36 | } | 42 | * have been an interrupt or segfault), so it needs to be refreshed. |
43 | */ | ||
44 | UPT_SC(®s->regs) = sc; | ||
37 | 45 | ||
38 | /* | 46 | SC_SET_SYSCALL_RETURN(sc, result); |
39 | * Overrides for Emacs so that we follow Linus's tabbing style. | 47 | |
40 | * Emacs will notice this stuff at the end of the file and automatically | 48 | syscall_trace(®s->regs, 1); |
41 | * adjust the settings for this buffer only. This must remain at the end | 49 | #ifdef CONFIG_SYSCALL_DEBUG |
42 | * of the file. | 50 | record_syscall_end(index, result); |
43 | * --------------------------------------------------------------------------- | 51 | #endif |
44 | * Local variables: | 52 | } |
45 | * c-file-style: "linux" | ||
46 | * End: | ||
47 | */ | ||
diff --git a/arch/um/kernel/tt/syscall_user.c b/arch/um/kernel/tt/syscall_user.c index b218316cfdb2..902987bf379b 100644 --- a/arch/um/kernel/tt/syscall_user.c +++ b/arch/um/kernel/tt/syscall_user.c | |||
@@ -13,42 +13,9 @@ | |||
13 | #include "task.h" | 13 | #include "task.h" |
14 | #include "user_util.h" | 14 | #include "user_util.h" |
15 | #include "kern_util.h" | 15 | #include "kern_util.h" |
16 | #include "syscall_user.h" | 16 | #include "syscall.h" |
17 | #include "tt.h" | 17 | #include "tt.h" |
18 | 18 | ||
19 | |||
20 | void syscall_handler_tt(int sig, union uml_pt_regs *regs) | ||
21 | { | ||
22 | void *sc; | ||
23 | long result; | ||
24 | int syscall; | ||
25 | #ifdef UML_CONFIG_DEBUG_SYSCALL | ||
26 | int index; | ||
27 | #endif | ||
28 | |||
29 | syscall = UPT_SYSCALL_NR(regs); | ||
30 | sc = UPT_SC(regs); | ||
31 | SC_START_SYSCALL(sc); | ||
32 | |||
33 | #ifdef UML_CONFIG_DEBUG_SYSCALL | ||
34 | index = record_syscall_start(syscall); | ||
35 | #endif | ||
36 | syscall_trace(regs, 0); | ||
37 | result = execute_syscall_tt(regs); | ||
38 | |||
39 | /* regs->sc may have changed while the system call ran (there may | ||
40 | * have been an interrupt or segfault), so it needs to be refreshed. | ||
41 | */ | ||
42 | UPT_SC(regs) = sc; | ||
43 | |||
44 | SC_SET_SYSCALL_RETURN(sc, result); | ||
45 | |||
46 | syscall_trace(regs, 1); | ||
47 | #ifdef UML_CONFIG_DEBUG_SYSCALL | ||
48 | record_syscall_end(index, result); | ||
49 | #endif | ||
50 | } | ||
51 | |||
52 | void do_sigtrap(void *task) | 19 | void do_sigtrap(void *task) |
53 | { | 20 | { |
54 | UPT_SYSCALL_NR(TASK_REGS(task)) = -1; | 21 | UPT_SYSCALL_NR(TASK_REGS(task)) = -1; |
diff --git a/arch/um/kernel/tt/tlb.c b/arch/um/kernel/tt/tlb.c index 2eefb43bc9c2..f1d85dbb45b9 100644 --- a/arch/um/kernel/tt/tlb.c +++ b/arch/um/kernel/tt/tlb.c | |||
@@ -17,25 +17,31 @@ | |||
17 | #include "os.h" | 17 | #include "os.h" |
18 | #include "tlb.h" | 18 | #include "tlb.h" |
19 | 19 | ||
20 | static void do_ops(union mm_context *mmu, struct host_vm_op *ops, int last) | 20 | static int do_ops(union mm_context *mmu, struct host_vm_op *ops, int last, |
21 | int finished, void **flush) | ||
21 | { | 22 | { |
22 | struct host_vm_op *op; | 23 | struct host_vm_op *op; |
23 | int i; | 24 | int i, ret=0; |
24 | 25 | ||
25 | for(i = 0; i <= last; i++){ | 26 | for(i = 0; i <= last && !ret; i++){ |
26 | op = &ops[i]; | 27 | op = &ops[i]; |
27 | switch(op->type){ | 28 | switch(op->type){ |
28 | case MMAP: | 29 | case MMAP: |
29 | os_map_memory((void *) op->u.mmap.addr, op->u.mmap.fd, | 30 | ret = os_map_memory((void *) op->u.mmap.addr, |
30 | op->u.mmap.offset, op->u.mmap.len, | 31 | op->u.mmap.fd, op->u.mmap.offset, |
31 | op->u.mmap.r, op->u.mmap.w, | 32 | op->u.mmap.len, op->u.mmap.r, |
32 | op->u.mmap.x); | 33 | op->u.mmap.w, op->u.mmap.x); |
33 | break; | 34 | break; |
34 | case MUNMAP: | 35 | case MUNMAP: |
35 | os_unmap_memory((void *) op->u.munmap.addr, | 36 | ret = os_unmap_memory((void *) op->u.munmap.addr, |
36 | op->u.munmap.len); | 37 | op->u.munmap.len); |
37 | break; | 38 | break; |
38 | case MPROTECT: | 39 | case MPROTECT: |
40 | ret = protect_memory(op->u.mprotect.addr, | ||
41 | op->u.munmap.len, | ||
42 | op->u.mprotect.r, | ||
43 | op->u.mprotect.w, | ||
44 | op->u.mprotect.x, 1); | ||
39 | protect_memory(op->u.mprotect.addr, op->u.munmap.len, | 45 | protect_memory(op->u.mprotect.addr, op->u.munmap.len, |
40 | op->u.mprotect.r, op->u.mprotect.w, | 46 | op->u.mprotect.r, op->u.mprotect.w, |
41 | op->u.mprotect.x, 1); | 47 | op->u.mprotect.x, 1); |
@@ -45,6 +51,8 @@ static void do_ops(union mm_context *mmu, struct host_vm_op *ops, int last) | |||
45 | break; | 51 | break; |
46 | } | 52 | } |
47 | } | 53 | } |
54 | |||
55 | return ret; | ||
48 | } | 56 | } |
49 | 57 | ||
50 | static void fix_range(struct mm_struct *mm, unsigned long start_addr, | 58 | static void fix_range(struct mm_struct *mm, unsigned long start_addr, |
diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index ca2bb6f09a7d..09f6f7ce4695 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c | |||
@@ -126,7 +126,7 @@ unsigned long start_vm; | |||
126 | unsigned long end_vm; | 126 | unsigned long end_vm; |
127 | int ncpus = 1; | 127 | int ncpus = 1; |
128 | 128 | ||
129 | #ifdef CONFIG_MODE_TT | 129 | #ifdef CONFIG_CMDLINE_ON_HOST |
130 | /* Pointer set in linux_main, the array itself is private to each thread, | 130 | /* Pointer set in linux_main, the array itself is private to each thread, |
131 | * and changed at address space creation time so this poses no concurrency | 131 | * and changed at address space creation time so this poses no concurrency |
132 | * problems. | 132 | * problems. |
@@ -141,7 +141,7 @@ long physmem_size = 32 * 1024 * 1024; | |||
141 | 141 | ||
142 | void set_cmdline(char *cmd) | 142 | void set_cmdline(char *cmd) |
143 | { | 143 | { |
144 | #ifdef CONFIG_MODE_TT | 144 | #ifdef CONFIG_CMDLINE_ON_HOST |
145 | char *umid, *ptr; | 145 | char *umid, *ptr; |
146 | 146 | ||
147 | if(CHOOSE_MODE(honeypot, 0)) return; | 147 | if(CHOOSE_MODE(honeypot, 0)) return; |
@@ -333,6 +333,7 @@ int linux_main(int argc, char **argv) | |||
333 | if(have_root == 0) | 333 | if(have_root == 0) |
334 | add_arg(DEFAULT_COMMAND_LINE); | 334 | add_arg(DEFAULT_COMMAND_LINE); |
335 | 335 | ||
336 | os_early_checks(); | ||
336 | mode_tt = force_tt ? 1 : !can_do_skas(); | 337 | mode_tt = force_tt ? 1 : !can_do_skas(); |
337 | #ifndef CONFIG_MODE_TT | 338 | #ifndef CONFIG_MODE_TT |
338 | if (mode_tt) { | 339 | if (mode_tt) { |
@@ -385,7 +386,7 @@ int linux_main(int argc, char **argv) | |||
385 | 386 | ||
386 | setup_machinename(system_utsname.machine); | 387 | setup_machinename(system_utsname.machine); |
387 | 388 | ||
388 | #ifdef CONFIG_MODE_TT | 389 | #ifdef CONFIG_CMDLINE_ON_HOST |
389 | argv1_begin = argv[1]; | 390 | argv1_begin = argv[1]; |
390 | argv1_end = &argv[1][strlen(argv[1])]; | 391 | argv1_end = &argv[1][strlen(argv[1])]; |
391 | #endif | 392 | #endif |
@@ -470,7 +471,6 @@ void __init setup_arch(char **cmdline_p) | |||
470 | void __init check_bugs(void) | 471 | void __init check_bugs(void) |
471 | { | 472 | { |
472 | arch_check_bugs(); | 473 | arch_check_bugs(); |
473 | check_ptrace(); | ||
474 | check_sigio(); | 474 | check_sigio(); |
475 | check_devanon(); | 475 | check_devanon(); |
476 | } | 476 | } |
diff --git a/arch/um/os-Linux/Makefile b/arch/um/os-Linux/Makefile index 4ddf540284ce..d3c1560e3ed8 100644 --- a/arch/um/os-Linux/Makefile +++ b/arch/um/os-Linux/Makefile | |||
@@ -3,11 +3,16 @@ | |||
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
5 | 5 | ||
6 | obj-y = elf_aux.o file.o process.o signal.o time.o tty.o user_syms.o drivers/ \ | 6 | obj-y = aio.o elf_aux.o file.o process.o signal.o start_up.o time.o tt.o \ |
7 | sys-$(SUBARCH)/ | 7 | tty.o user_syms.o drivers/ sys-$(SUBARCH)/ |
8 | 8 | ||
9 | USER_OBJS := elf_aux.o file.o process.o signal.o time.o tty.o | 9 | USER_OBJS := aio.o elf_aux.o file.o process.o signal.o start_up.o time.o tt.o \ |
10 | tty.o | ||
10 | 11 | ||
11 | CFLAGS_user_syms.o += -DSUBARCH_$(SUBARCH) | 12 | CFLAGS_user_syms.o += -DSUBARCH_$(SUBARCH) |
12 | 13 | ||
14 | HAVE_AIO_ABI := $(shell [ -r /usr/include/linux/aio_abi.h ] && \ | ||
15 | echo -DHAVE_AIO_ABI ) | ||
16 | CFLAGS_aio.o += $(HAVE_AIO_ABI) | ||
17 | |||
13 | include arch/um/scripts/Makefile.rules | 18 | include arch/um/scripts/Makefile.rules |
diff --git a/arch/um/os-Linux/aio.c b/arch/um/os-Linux/aio.c new file mode 100644 index 000000000000..b04897cd995d --- /dev/null +++ b/arch/um/os-Linux/aio.c | |||
@@ -0,0 +1,414 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <stdlib.h> | ||
7 | #include <unistd.h> | ||
8 | #include <signal.h> | ||
9 | #include <string.h> | ||
10 | #include <errno.h> | ||
11 | #include <sched.h> | ||
12 | #include <sys/syscall.h> | ||
13 | #include "os.h" | ||
14 | #include "helper.h" | ||
15 | #include "aio.h" | ||
16 | #include "init.h" | ||
17 | #include "user.h" | ||
18 | #include "mode.h" | ||
19 | |||
20 | static int aio_req_fd_r = -1; | ||
21 | static int aio_req_fd_w = -1; | ||
22 | |||
23 | static int update_aio(struct aio_context *aio, int res) | ||
24 | { | ||
25 | if(res < 0) | ||
26 | aio->len = res; | ||
27 | else if((res == 0) && (aio->type == AIO_READ)){ | ||
28 | /* This is the EOF case - we have hit the end of the file | ||
29 | * and it ends in a partial block, so we fill the end of | ||
30 | * the block with zeros and claim success. | ||
31 | */ | ||
32 | memset(aio->data, 0, aio->len); | ||
33 | aio->len = 0; | ||
34 | } | ||
35 | else if(res > 0){ | ||
36 | aio->len -= res; | ||
37 | aio->data += res; | ||
38 | aio->offset += res; | ||
39 | return aio->len; | ||
40 | } | ||
41 | |||
42 | return 0; | ||
43 | } | ||
44 | |||
45 | #if defined(HAVE_AIO_ABI) | ||
46 | #include <linux/aio_abi.h> | ||
47 | |||
48 | /* If we have the headers, we are going to build with AIO enabled. | ||
49 | * If we don't have aio in libc, we define the necessary stubs here. | ||
50 | */ | ||
51 | |||
52 | #if !defined(HAVE_AIO_LIBC) | ||
53 | |||
54 | static long io_setup(int n, aio_context_t *ctxp) | ||
55 | { | ||
56 | return syscall(__NR_io_setup, n, ctxp); | ||
57 | } | ||
58 | |||
59 | static long io_submit(aio_context_t ctx, long nr, struct iocb **iocbpp) | ||
60 | { | ||
61 | return syscall(__NR_io_submit, ctx, nr, iocbpp); | ||
62 | } | ||
63 | |||
64 | static long io_getevents(aio_context_t ctx_id, long min_nr, long nr, | ||
65 | struct io_event *events, struct timespec *timeout) | ||
66 | { | ||
67 | return syscall(__NR_io_getevents, ctx_id, min_nr, nr, events, timeout); | ||
68 | } | ||
69 | |||
70 | #endif | ||
71 | |||
72 | /* The AIO_MMAP cases force the mmapped page into memory here | ||
73 | * rather than in whatever place first touches the data. I used | ||
74 | * to do this by touching the page, but that's delicate because | ||
75 | * gcc is prone to optimizing that away. So, what's done here | ||
76 | * is we read from the descriptor from which the page was | ||
77 | * mapped. The caller is required to pass an offset which is | ||
78 | * inside the page that was mapped. Thus, when the read | ||
79 | * returns, we know that the page is in the page cache, and | ||
80 | * that it now backs the mmapped area. | ||
81 | */ | ||
82 | |||
83 | static int do_aio(aio_context_t ctx, struct aio_context *aio) | ||
84 | { | ||
85 | struct iocb iocb, *iocbp = &iocb; | ||
86 | char c; | ||
87 | int err; | ||
88 | |||
89 | iocb = ((struct iocb) { .aio_data = (unsigned long) aio, | ||
90 | .aio_reqprio = 0, | ||
91 | .aio_fildes = aio->fd, | ||
92 | .aio_buf = (unsigned long) aio->data, | ||
93 | .aio_nbytes = aio->len, | ||
94 | .aio_offset = aio->offset, | ||
95 | .aio_reserved1 = 0, | ||
96 | .aio_reserved2 = 0, | ||
97 | .aio_reserved3 = 0 }); | ||
98 | |||
99 | switch(aio->type){ | ||
100 | case AIO_READ: | ||
101 | iocb.aio_lio_opcode = IOCB_CMD_PREAD; | ||
102 | break; | ||
103 | case AIO_WRITE: | ||
104 | iocb.aio_lio_opcode = IOCB_CMD_PWRITE; | ||
105 | break; | ||
106 | case AIO_MMAP: | ||
107 | iocb.aio_lio_opcode = IOCB_CMD_PREAD; | ||
108 | iocb.aio_buf = (unsigned long) &c; | ||
109 | iocb.aio_nbytes = sizeof(c); | ||
110 | break; | ||
111 | default: | ||
112 | printk("Bogus op in do_aio - %d\n", aio->type); | ||
113 | err = -EINVAL; | ||
114 | goto out; | ||
115 | } | ||
116 | |||
117 | err = io_submit(ctx, 1, &iocbp); | ||
118 | if(err > 0) | ||
119 | err = 0; | ||
120 | |||
121 | out: | ||
122 | return err; | ||
123 | } | ||
124 | |||
125 | static aio_context_t ctx = 0; | ||
126 | |||
127 | static int aio_thread(void *arg) | ||
128 | { | ||
129 | struct aio_thread_reply reply; | ||
130 | struct aio_context *aio; | ||
131 | struct io_event event; | ||
132 | int err, n; | ||
133 | |||
134 | signal(SIGWINCH, SIG_IGN); | ||
135 | |||
136 | while(1){ | ||
137 | n = io_getevents(ctx, 1, 1, &event, NULL); | ||
138 | if(n < 0){ | ||
139 | if(errno == EINTR) | ||
140 | continue; | ||
141 | printk("aio_thread - io_getevents failed, " | ||
142 | "errno = %d\n", errno); | ||
143 | } | ||
144 | else { | ||
145 | aio = (struct aio_context *) event.data; | ||
146 | if(update_aio(aio, event.res)){ | ||
147 | do_aio(ctx, aio); | ||
148 | continue; | ||
149 | } | ||
150 | |||
151 | reply = ((struct aio_thread_reply) | ||
152 | { .data = aio, | ||
153 | .err = aio->len }); | ||
154 | err = os_write_file(aio->reply_fd, &reply, | ||
155 | sizeof(reply)); | ||
156 | if(err != sizeof(reply)) | ||
157 | printk("aio_thread - write failed, " | ||
158 | "fd = %d, err = %d\n", aio->reply_fd, | ||
159 | -err); | ||
160 | } | ||
161 | } | ||
162 | return 0; | ||
163 | } | ||
164 | |||
165 | #endif | ||
166 | |||
167 | static int do_not_aio(struct aio_context *aio) | ||
168 | { | ||
169 | char c; | ||
170 | int err; | ||
171 | |||
172 | switch(aio->type){ | ||
173 | case AIO_READ: | ||
174 | err = os_seek_file(aio->fd, aio->offset); | ||
175 | if(err) | ||
176 | goto out; | ||
177 | |||
178 | err = os_read_file(aio->fd, aio->data, aio->len); | ||
179 | break; | ||
180 | case AIO_WRITE: | ||
181 | err = os_seek_file(aio->fd, aio->offset); | ||
182 | if(err) | ||
183 | goto out; | ||
184 | |||
185 | err = os_write_file(aio->fd, aio->data, aio->len); | ||
186 | break; | ||
187 | case AIO_MMAP: | ||
188 | err = os_seek_file(aio->fd, aio->offset); | ||
189 | if(err) | ||
190 | goto out; | ||
191 | |||
192 | err = os_read_file(aio->fd, &c, sizeof(c)); | ||
193 | break; | ||
194 | default: | ||
195 | printk("do_not_aio - bad request type : %d\n", aio->type); | ||
196 | err = -EINVAL; | ||
197 | break; | ||
198 | } | ||
199 | |||
200 | out: | ||
201 | return err; | ||
202 | } | ||
203 | |||
204 | static int not_aio_thread(void *arg) | ||
205 | { | ||
206 | struct aio_context *aio; | ||
207 | struct aio_thread_reply reply; | ||
208 | int err; | ||
209 | |||
210 | signal(SIGWINCH, SIG_IGN); | ||
211 | while(1){ | ||
212 | err = os_read_file(aio_req_fd_r, &aio, sizeof(aio)); | ||
213 | if(err != sizeof(aio)){ | ||
214 | if(err < 0) | ||
215 | printk("not_aio_thread - read failed, " | ||
216 | "fd = %d, err = %d\n", aio_req_fd_r, | ||
217 | -err); | ||
218 | else { | ||
219 | printk("not_aio_thread - short read, fd = %d, " | ||
220 | "length = %d\n", aio_req_fd_r, err); | ||
221 | } | ||
222 | continue; | ||
223 | } | ||
224 | again: | ||
225 | err = do_not_aio(aio); | ||
226 | |||
227 | if(update_aio(aio, err)) | ||
228 | goto again; | ||
229 | |||
230 | reply = ((struct aio_thread_reply) { .data = aio, | ||
231 | .err = aio->len }); | ||
232 | err = os_write_file(aio->reply_fd, &reply, sizeof(reply)); | ||
233 | if(err != sizeof(reply)) | ||
234 | printk("not_aio_thread - write failed, fd = %d, " | ||
235 | "err = %d\n", aio_req_fd_r, -err); | ||
236 | } | ||
237 | } | ||
238 | |||
239 | static int submit_aio_24(struct aio_context *aio) | ||
240 | { | ||
241 | int err; | ||
242 | |||
243 | err = os_write_file(aio_req_fd_w, &aio, sizeof(aio)); | ||
244 | if(err == sizeof(aio)) | ||
245 | err = 0; | ||
246 | |||
247 | return err; | ||
248 | } | ||
249 | |||
250 | static int aio_pid = -1; | ||
251 | static int (*submit_proc)(struct aio_context *aio); | ||
252 | |||
253 | static int init_aio_24(void) | ||
254 | { | ||
255 | unsigned long stack; | ||
256 | int fds[2], err; | ||
257 | |||
258 | err = os_pipe(fds, 1, 1); | ||
259 | if(err) | ||
260 | goto out; | ||
261 | |||
262 | aio_req_fd_w = fds[0]; | ||
263 | aio_req_fd_r = fds[1]; | ||
264 | err = run_helper_thread(not_aio_thread, NULL, | ||
265 | CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); | ||
266 | if(err < 0) | ||
267 | goto out_close_pipe; | ||
268 | |||
269 | aio_pid = err; | ||
270 | goto out; | ||
271 | |||
272 | out_close_pipe: | ||
273 | os_close_file(fds[0]); | ||
274 | os_close_file(fds[1]); | ||
275 | aio_req_fd_w = -1; | ||
276 | aio_req_fd_r = -1; | ||
277 | out: | ||
278 | #ifndef HAVE_AIO_ABI | ||
279 | printk("/usr/include/linux/aio_abi.h not present during build\n"); | ||
280 | #endif | ||
281 | printk("2.6 host AIO support not used - falling back to I/O " | ||
282 | "thread\n"); | ||
283 | |||
284 | submit_proc = submit_aio_24; | ||
285 | |||
286 | return 0; | ||
287 | } | ||
288 | |||
289 | #ifdef HAVE_AIO_ABI | ||
290 | #define DEFAULT_24_AIO 0 | ||
291 | static int submit_aio_26(struct aio_context *aio) | ||
292 | { | ||
293 | struct aio_thread_reply reply; | ||
294 | int err; | ||
295 | |||
296 | err = do_aio(ctx, aio); | ||
297 | if(err){ | ||
298 | reply = ((struct aio_thread_reply) { .data = aio, | ||
299 | .err = err }); | ||
300 | err = os_write_file(aio->reply_fd, &reply, sizeof(reply)); | ||
301 | if(err != sizeof(reply)) | ||
302 | printk("submit_aio_26 - write failed, " | ||
303 | "fd = %d, err = %d\n", aio->reply_fd, -err); | ||
304 | else err = 0; | ||
305 | } | ||
306 | |||
307 | return err; | ||
308 | } | ||
309 | |||
310 | static int init_aio_26(void) | ||
311 | { | ||
312 | unsigned long stack; | ||
313 | int err; | ||
314 | |||
315 | if(io_setup(256, &ctx)){ | ||
316 | printk("aio_thread failed to initialize context, err = %d\n", | ||
317 | errno); | ||
318 | return -errno; | ||
319 | } | ||
320 | |||
321 | err = run_helper_thread(aio_thread, NULL, | ||
322 | CLONE_FILES | CLONE_VM | SIGCHLD, &stack, 0); | ||
323 | if(err < 0) | ||
324 | return -errno; | ||
325 | |||
326 | aio_pid = err; | ||
327 | |||
328 | printk("Using 2.6 host AIO\n"); | ||
329 | |||
330 | submit_proc = submit_aio_26; | ||
331 | |||
332 | return 0; | ||
333 | } | ||
334 | |||
335 | #else | ||
336 | #define DEFAULT_24_AIO 1 | ||
337 | static int submit_aio_26(struct aio_context *aio) | ||
338 | { | ||
339 | return -ENOSYS; | ||
340 | } | ||
341 | |||
342 | static int init_aio_26(void) | ||
343 | { | ||
344 | submit_proc = submit_aio_26; | ||
345 | return -ENOSYS; | ||
346 | } | ||
347 | #endif | ||
348 | |||
349 | static int aio_24 = DEFAULT_24_AIO; | ||
350 | |||
351 | static int __init set_aio_24(char *name, int *add) | ||
352 | { | ||
353 | aio_24 = 1; | ||
354 | return 0; | ||
355 | } | ||
356 | |||
357 | __uml_setup("aio=2.4", set_aio_24, | ||
358 | "aio=2.4\n" | ||
359 | " This is used to force UML to use 2.4-style AIO even when 2.6 AIO is\n" | ||
360 | " available. 2.4 AIO is a single thread that handles one request at a\n" | ||
361 | " time, synchronously. 2.6 AIO is a thread which uses the 2.6 AIO \n" | ||
362 | " interface to handle an arbitrary number of pending requests. 2.6 AIO \n" | ||
363 | " is not available in tt mode, on 2.4 hosts, or when UML is built with\n" | ||
364 | " /usr/include/linux/aio_abi.h not available. Many distributions don't\n" | ||
365 | " include aio_abi.h, so you will need to copy it from a kernel tree to\n" | ||
366 | " your /usr/include/linux in order to build an AIO-capable UML\n\n" | ||
367 | ); | ||
368 | |||
369 | static int init_aio(void) | ||
370 | { | ||
371 | int err; | ||
372 | |||
373 | CHOOSE_MODE(({ | ||
374 | if(!aio_24){ | ||
375 | printk("Disabling 2.6 AIO in tt mode\n"); | ||
376 | aio_24 = 1; | ||
377 | } }), (void) 0); | ||
378 | |||
379 | if(!aio_24){ | ||
380 | err = init_aio_26(); | ||
381 | if(err && (errno == ENOSYS)){ | ||
382 | printk("2.6 AIO not supported on the host - " | ||
383 | "reverting to 2.4 AIO\n"); | ||
384 | aio_24 = 1; | ||
385 | } | ||
386 | else return err; | ||
387 | } | ||
388 | |||
389 | if(aio_24) | ||
390 | return init_aio_24(); | ||
391 | |||
392 | return 0; | ||
393 | } | ||
394 | |||
395 | /* The reason for the __initcall/__uml_exitcall asymmetry is that init_aio | ||
396 | * needs to be called when the kernel is running because it calls run_helper, | ||
397 | * which needs get_free_page. exit_aio is a __uml_exitcall because the generic | ||
398 | * kernel does not run __exitcalls on shutdown, and can't because many of them | ||
399 | * break when called outside of module unloading. | ||
400 | */ | ||
401 | __initcall(init_aio); | ||
402 | |||
403 | static void exit_aio(void) | ||
404 | { | ||
405 | if(aio_pid != -1) | ||
406 | os_kill_process(aio_pid, 1); | ||
407 | } | ||
408 | |||
409 | __uml_exitcall(exit_aio); | ||
410 | |||
411 | int submit_aio(struct aio_context *aio) | ||
412 | { | ||
413 | return (*submit_proc)(aio); | ||
414 | } | ||
diff --git a/arch/um/os-Linux/process.c b/arch/um/os-Linux/process.c index 1e126bfd31a7..d32413e4b4ce 100644 --- a/arch/um/os-Linux/process.c +++ b/arch/um/os-Linux/process.c | |||
@@ -3,10 +3,10 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <unistd.h> | ||
7 | #include <stdio.h> | 6 | #include <stdio.h> |
8 | #include <errno.h> | 7 | #include <errno.h> |
9 | #include <signal.h> | 8 | #include <signal.h> |
9 | #include <setjmp.h> | ||
10 | #include <linux/unistd.h> | 10 | #include <linux/unistd.h> |
11 | #include <sys/mman.h> | 11 | #include <sys/mman.h> |
12 | #include <sys/wait.h> | 12 | #include <sys/wait.h> |
@@ -14,6 +14,10 @@ | |||
14 | #include "os.h" | 14 | #include "os.h" |
15 | #include "user.h" | 15 | #include "user.h" |
16 | #include "user_util.h" | 16 | #include "user_util.h" |
17 | #include "signal_user.h" | ||
18 | #include "process.h" | ||
19 | #include "irq_user.h" | ||
20 | #include "kern_util.h" | ||
17 | 21 | ||
18 | #define ARBITRARY_ADDR -1 | 22 | #define ARBITRARY_ADDR -1 |
19 | #define FAILURE_PID -1 | 23 | #define FAILURE_PID -1 |
@@ -114,8 +118,10 @@ void os_usr1_process(int pid) | |||
114 | kill(pid, SIGUSR1); | 118 | kill(pid, SIGUSR1); |
115 | } | 119 | } |
116 | 120 | ||
117 | /*Don't use the glibc version, which caches the result in TLS. It misses some | 121 | /* Don't use the glibc version, which caches the result in TLS. It misses some |
118 | * syscalls, and also breaks with clone(), which does not unshare the TLS.*/ | 122 | * syscalls, and also breaks with clone(), which does not unshare the TLS. |
123 | */ | ||
124 | |||
119 | inline _syscall0(pid_t, getpid) | 125 | inline _syscall0(pid_t, getpid) |
120 | 126 | ||
121 | int os_getpid(void) | 127 | int os_getpid(void) |
@@ -164,6 +170,52 @@ int os_unmap_memory(void *addr, int len) | |||
164 | return(0); | 170 | return(0); |
165 | } | 171 | } |
166 | 172 | ||
173 | void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) | ||
174 | { | ||
175 | int flags = 0, pages; | ||
176 | |||
177 | if(sig_stack != NULL){ | ||
178 | pages = (1 << UML_CONFIG_KERNEL_STACK_ORDER); | ||
179 | set_sigstack(sig_stack, pages * page_size()); | ||
180 | flags = SA_ONSTACK; | ||
181 | } | ||
182 | if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1); | ||
183 | } | ||
184 | |||
185 | void init_new_thread_signals(int altstack) | ||
186 | { | ||
187 | int flags = altstack ? SA_ONSTACK : 0; | ||
188 | |||
189 | set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags, | ||
190 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
191 | set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, | ||
192 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
193 | set_handler(SIGFPE, (__sighandler_t) sig_handler, flags, | ||
194 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
195 | set_handler(SIGILL, (__sighandler_t) sig_handler, flags, | ||
196 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
197 | set_handler(SIGBUS, (__sighandler_t) sig_handler, flags, | ||
198 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
199 | set_handler(SIGUSR2, (__sighandler_t) sig_handler, | ||
200 | flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
201 | signal(SIGHUP, SIG_IGN); | ||
202 | |||
203 | init_irq_signals(altstack); | ||
204 | } | ||
205 | |||
206 | int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) | ||
207 | { | ||
208 | sigjmp_buf buf; | ||
209 | int n; | ||
210 | |||
211 | *jmp_ptr = &buf; | ||
212 | n = sigsetjmp(buf, 1); | ||
213 | if(n != 0) | ||
214 | return(n); | ||
215 | (*fn)(arg); | ||
216 | return(0); | ||
217 | } | ||
218 | |||
167 | /* | 219 | /* |
168 | * Overrides for Emacs so that we follow Linus's tabbing style. | 220 | * Overrides for Emacs so that we follow Linus's tabbing style. |
169 | * Emacs will notice this stuff at the end of the file and automatically | 221 | * Emacs will notice this stuff at the end of the file and automatically |
diff --git a/arch/um/kernel/process.c b/arch/um/os-Linux/start_up.c index 67acd92c5322..040cc1472bc7 100644 --- a/arch/um/kernel/process.c +++ b/arch/um/os-Linux/start_up.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -19,7 +19,6 @@ | |||
19 | #include "user_util.h" | 19 | #include "user_util.h" |
20 | #include "kern_util.h" | 20 | #include "kern_util.h" |
21 | #include "user.h" | 21 | #include "user.h" |
22 | #include "process.h" | ||
23 | #include "signal_kern.h" | 22 | #include "signal_kern.h" |
24 | #include "signal_user.h" | 23 | #include "signal_user.h" |
25 | #include "sysdep/ptrace.h" | 24 | #include "sysdep/ptrace.h" |
@@ -39,98 +38,6 @@ | |||
39 | #include "registers.h" | 38 | #include "registers.h" |
40 | #endif | 39 | #endif |
41 | 40 | ||
42 | void init_new_thread_stack(void *sig_stack, void (*usr1_handler)(int)) | ||
43 | { | ||
44 | int flags = 0, pages; | ||
45 | |||
46 | if(sig_stack != NULL){ | ||
47 | pages = (1 << UML_CONFIG_KERNEL_STACK_ORDER); | ||
48 | set_sigstack(sig_stack, pages * page_size()); | ||
49 | flags = SA_ONSTACK; | ||
50 | } | ||
51 | if(usr1_handler) set_handler(SIGUSR1, usr1_handler, flags, -1); | ||
52 | } | ||
53 | |||
54 | void init_new_thread_signals(int altstack) | ||
55 | { | ||
56 | int flags = altstack ? SA_ONSTACK : 0; | ||
57 | |||
58 | set_handler(SIGSEGV, (__sighandler_t) sig_handler, flags, | ||
59 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
60 | set_handler(SIGTRAP, (__sighandler_t) sig_handler, flags, | ||
61 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
62 | set_handler(SIGFPE, (__sighandler_t) sig_handler, flags, | ||
63 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
64 | set_handler(SIGILL, (__sighandler_t) sig_handler, flags, | ||
65 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
66 | set_handler(SIGBUS, (__sighandler_t) sig_handler, flags, | ||
67 | SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
68 | set_handler(SIGUSR2, (__sighandler_t) sig_handler, | ||
69 | flags, SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1); | ||
70 | signal(SIGHUP, SIG_IGN); | ||
71 | |||
72 | init_irq_signals(altstack); | ||
73 | } | ||
74 | |||
75 | struct tramp { | ||
76 | int (*tramp)(void *); | ||
77 | void *tramp_data; | ||
78 | unsigned long temp_stack; | ||
79 | int flags; | ||
80 | int pid; | ||
81 | }; | ||
82 | |||
83 | /* See above for why sigkill is here */ | ||
84 | |||
85 | int sigkill = SIGKILL; | ||
86 | |||
87 | int outer_tramp(void *arg) | ||
88 | { | ||
89 | struct tramp *t; | ||
90 | int sig = sigkill; | ||
91 | |||
92 | t = arg; | ||
93 | t->pid = clone(t->tramp, (void *) t->temp_stack + page_size()/2, | ||
94 | t->flags, t->tramp_data); | ||
95 | if(t->pid > 0) wait_for_stop(t->pid, SIGSTOP, PTRACE_CONT, NULL); | ||
96 | kill(os_getpid(), sig); | ||
97 | _exit(0); | ||
98 | } | ||
99 | |||
100 | int start_fork_tramp(void *thread_arg, unsigned long temp_stack, | ||
101 | int clone_flags, int (*tramp)(void *)) | ||
102 | { | ||
103 | struct tramp arg; | ||
104 | unsigned long sp; | ||
105 | int new_pid, status, err; | ||
106 | |||
107 | /* The trampoline will run on the temporary stack */ | ||
108 | sp = stack_sp(temp_stack); | ||
109 | |||
110 | clone_flags |= CLONE_FILES | SIGCHLD; | ||
111 | |||
112 | arg.tramp = tramp; | ||
113 | arg.tramp_data = thread_arg; | ||
114 | arg.temp_stack = temp_stack; | ||
115 | arg.flags = clone_flags; | ||
116 | |||
117 | /* Start the process and wait for it to kill itself */ | ||
118 | new_pid = clone(outer_tramp, (void *) sp, clone_flags, &arg); | ||
119 | if(new_pid < 0) | ||
120 | return(new_pid); | ||
121 | |||
122 | CATCH_EINTR(err = waitpid(new_pid, &status, 0)); | ||
123 | if(err < 0) | ||
124 | panic("Waiting for outer trampoline failed - errno = %d", | ||
125 | errno); | ||
126 | |||
127 | if(!WIFSIGNALED(status) || (WTERMSIG(status) != SIGKILL)) | ||
128 | panic("outer trampoline didn't exit with SIGKILL, " | ||
129 | "status = %d", status); | ||
130 | |||
131 | return(arg.pid); | ||
132 | } | ||
133 | |||
134 | static int ptrace_child(void *arg) | 41 | static int ptrace_child(void *arg) |
135 | { | 42 | { |
136 | int ret; | 43 | int ret; |
@@ -165,7 +72,7 @@ static int start_ptraced_child(void **stack_out) | |||
165 | void *stack; | 72 | void *stack; |
166 | unsigned long sp; | 73 | unsigned long sp; |
167 | int pid, n, status; | 74 | int pid, n, status; |
168 | 75 | ||
169 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, | 76 | stack = mmap(NULL, PAGE_SIZE, PROT_READ | PROT_WRITE | PROT_EXEC, |
170 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); | 77 | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); |
171 | if(stack == MAP_FAILED) | 78 | if(stack == MAP_FAILED) |
@@ -173,10 +80,10 @@ static int start_ptraced_child(void **stack_out) | |||
173 | sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); | 80 | sp = (unsigned long) stack + PAGE_SIZE - sizeof(void *); |
174 | pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); | 81 | pid = clone(ptrace_child, (void *) sp, SIGCHLD, NULL); |
175 | if(pid < 0) | 82 | if(pid < 0) |
176 | panic("check_ptrace : clone failed, errno = %d", errno); | 83 | panic("start_ptraced_child : clone failed, errno = %d", errno); |
177 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 84 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
178 | if(n < 0) | 85 | if(n < 0) |
179 | panic("check_ptrace : wait failed, errno = %d", errno); | 86 | panic("check_ptrace : clone failed, errno = %d", errno); |
180 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)) | 87 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGSTOP)) |
181 | panic("check_ptrace : expected SIGSTOP, got status = %d", | 88 | panic("check_ptrace : expected SIGSTOP, got status = %d", |
182 | status); | 89 | status); |
@@ -185,11 +92,14 @@ static int start_ptraced_child(void **stack_out) | |||
185 | return(pid); | 92 | return(pid); |
186 | } | 93 | } |
187 | 94 | ||
188 | /* When testing for SYSEMU support, if it is one of the broken versions, we must | 95 | /* When testing for SYSEMU support, if it is one of the broken versions, we |
189 | * just avoid using sysemu, not panic, but only if SYSEMU features are broken. | 96 | * must just avoid using sysemu, not panic, but only if SYSEMU features are |
97 | * broken. | ||
190 | * So only for SYSEMU features we test mustpanic, while normal host features | 98 | * So only for SYSEMU features we test mustpanic, while normal host features |
191 | * must work anyway!*/ | 99 | * must work anyway! |
192 | static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) | 100 | */ |
101 | static int stop_ptraced_child(int pid, void *stack, int exitcode, | ||
102 | int mustpanic) | ||
193 | { | 103 | { |
194 | int status, n, ret = 0; | 104 | int status, n, ret = 0; |
195 | 105 | ||
@@ -217,8 +127,6 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode, int mustpanic) | |||
217 | return ret; | 127 | return ret; |
218 | } | 128 | } |
219 | 129 | ||
220 | static int force_sysemu_disabled = 0; | ||
221 | |||
222 | int ptrace_faultinfo = 1; | 130 | int ptrace_faultinfo = 1; |
223 | int proc_mm = 1; | 131 | int proc_mm = 1; |
224 | 132 | ||
@@ -228,29 +136,32 @@ static int __init skas0_cmd_param(char *str, int* add) | |||
228 | return 0; | 136 | return 0; |
229 | } | 137 | } |
230 | 138 | ||
139 | __uml_setup("skas0", skas0_cmd_param, | ||
140 | "skas0\n" | ||
141 | " Disables SKAS3 usage, so that SKAS0 is used, unless \n" | ||
142 | " you specify mode=tt.\n\n"); | ||
143 | |||
144 | static int force_sysemu_disabled = 0; | ||
145 | |||
231 | static int __init nosysemu_cmd_param(char *str, int* add) | 146 | static int __init nosysemu_cmd_param(char *str, int* add) |
232 | { | 147 | { |
233 | force_sysemu_disabled = 1; | 148 | force_sysemu_disabled = 1; |
234 | return 0; | 149 | return 0; |
235 | } | 150 | } |
236 | 151 | ||
237 | __uml_setup("skas0", skas0_cmd_param, | ||
238 | "skas0\n" | ||
239 | " Disables SKAS3 usage, so that SKAS0 is used, unless you \n" | ||
240 | " specify mode=tt.\n\n"); | ||
241 | |||
242 | __uml_setup("nosysemu", nosysemu_cmd_param, | 152 | __uml_setup("nosysemu", nosysemu_cmd_param, |
243 | "nosysemu\n" | 153 | "nosysemu\n" |
244 | " Turns off syscall emulation patch for ptrace (SYSEMU) on.\n" | 154 | " Turns off syscall emulation patch for ptrace (SYSEMU) on.\n" |
245 | " SYSEMU is a performance-patch introduced by Laurent Vivier. It changes\n" | 155 | " SYSEMU is a performance-patch introduced by Laurent Vivier. It changes\n" |
246 | " behaviour of ptrace() and helps reducing host context switch rate.\n" | 156 | " behaviour of ptrace() and helps reducing host context switch rate.\n" |
247 | " To make it working, you need a kernel patch for your host, too.\n" | 157 | " To make it working, you need a kernel patch for your host, too.\n" |
248 | " See http://perso.wanadoo.fr/laurent.vivier/UML/ for further information.\n\n"); | 158 | " See http://perso.wanadoo.fr/laurent.vivier/UML/ for further \n" |
159 | " information.\n\n"); | ||
249 | 160 | ||
250 | static void __init check_sysemu(void) | 161 | static void __init check_sysemu(void) |
251 | { | 162 | { |
252 | void *stack; | 163 | void *stack; |
253 | int pid, syscall, n, status, count=0; | 164 | int pid, n, status, count=0; |
254 | 165 | ||
255 | printk("Checking syscall emulation patch for ptrace..."); | 166 | printk("Checking syscall emulation patch for ptrace..."); |
256 | sysemu_supported = 0; | 167 | sysemu_supported = 0; |
@@ -281,6 +192,12 @@ static void __init check_sysemu(void) | |||
281 | 192 | ||
282 | printk("Checking advanced syscall emulation patch for ptrace..."); | 193 | printk("Checking advanced syscall emulation patch for ptrace..."); |
283 | pid = start_ptraced_child(&stack); | 194 | pid = start_ptraced_child(&stack); |
195 | |||
196 | if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, | ||
197 | (void *) PTRACE_O_TRACESYSGOOD) < 0) | ||
198 | panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d", | ||
199 | errno); | ||
200 | |||
284 | while(1){ | 201 | while(1){ |
285 | count++; | 202 | count++; |
286 | if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) | 203 | if(ptrace(PTRACE_SYSEMU_SINGLESTEP, pid, 0, 0) < 0) |
@@ -288,15 +205,10 @@ static void __init check_sysemu(void) | |||
288 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 205 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
289 | if(n < 0) | 206 | if(n < 0) |
290 | panic("check_ptrace : wait failed, errno = %d", errno); | 207 | panic("check_ptrace : wait failed, errno = %d", errno); |
291 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP)) | 208 | if(WIFSTOPPED(status) && (WSTOPSIG(status) == (SIGTRAP|0x80))){ |
292 | panic("check_ptrace : expected (SIGTRAP|SYSCALL_TRAP), " | ||
293 | "got status = %d", status); | ||
294 | |||
295 | syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET, | ||
296 | 0); | ||
297 | if(syscall == __NR_getpid){ | ||
298 | if (!count) | 209 | if (!count) |
299 | panic("check_ptrace : SYSEMU_SINGLESTEP doesn't singlestep"); | 210 | panic("check_ptrace : SYSEMU_SINGLESTEP " |
211 | "doesn't singlestep"); | ||
300 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, | 212 | n = ptrace(PTRACE_POKEUSR, pid, PT_SYSCALL_RET_OFFSET, |
301 | os_getpid()); | 213 | os_getpid()); |
302 | if(n < 0) | 214 | if(n < 0) |
@@ -304,6 +216,11 @@ static void __init check_sysemu(void) | |||
304 | "call return, errno = %d", errno); | 216 | "call return, errno = %d", errno); |
305 | break; | 217 | break; |
306 | } | 218 | } |
219 | else if(WIFSTOPPED(status) && (WSTOPSIG(status) == SIGTRAP)) | ||
220 | count++; | ||
221 | else | ||
222 | panic("check_ptrace : expected SIGTRAP or " | ||
223 | "(SIGTRAP|0x80), got status = %d", status); | ||
307 | } | 224 | } |
308 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) | 225 | if (stop_ptraced_child(pid, stack, 0, 0) < 0) |
309 | goto fail_stopped; | 226 | goto fail_stopped; |
@@ -321,7 +238,7 @@ fail_stopped: | |||
321 | printk("missing\n"); | 238 | printk("missing\n"); |
322 | } | 239 | } |
323 | 240 | ||
324 | void __init check_ptrace(void) | 241 | static void __init check_ptrace(void) |
325 | { | 242 | { |
326 | void *stack; | 243 | void *stack; |
327 | int pid, syscall, n, status; | 244 | int pid, syscall, n, status; |
@@ -329,20 +246,20 @@ void __init check_ptrace(void) | |||
329 | printk("Checking that ptrace can change system call numbers..."); | 246 | printk("Checking that ptrace can change system call numbers..."); |
330 | pid = start_ptraced_child(&stack); | 247 | pid = start_ptraced_child(&stack); |
331 | 248 | ||
332 | if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) | 249 | if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) |
333 | panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno); | 250 | panic("check_ptrace: PTRACE_OLDSETOPTIONS failed, errno = %d", errno); |
334 | 251 | ||
335 | while(1){ | 252 | while(1){ |
336 | if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) | 253 | if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0) |
337 | panic("check_ptrace : ptrace failed, errno = %d", | 254 | panic("check_ptrace : ptrace failed, errno = %d", |
338 | errno); | 255 | errno); |
339 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); | 256 | CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED)); |
340 | if(n < 0) | 257 | if(n < 0) |
341 | panic("check_ptrace : wait failed, errno = %d", errno); | 258 | panic("check_ptrace : wait failed, errno = %d", errno); |
342 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP + 0x80)) | 259 | if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP|0x80))) |
343 | panic("check_ptrace : expected SIGTRAP + 0x80, " | 260 | panic("check_ptrace : expected (SIGTRAP|0x80), " |
344 | "got status = %d", status); | 261 | "got status = %d", status); |
345 | 262 | ||
346 | syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET, | 263 | syscall = ptrace(PTRACE_PEEKUSR, pid, PT_SYSCALL_NR_OFFSET, |
347 | 0); | 264 | 0); |
348 | if(syscall == __NR_getpid){ | 265 | if(syscall == __NR_getpid){ |
@@ -359,33 +276,36 @@ void __init check_ptrace(void) | |||
359 | check_sysemu(); | 276 | check_sysemu(); |
360 | } | 277 | } |
361 | 278 | ||
362 | int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr) | 279 | void os_early_checks(void) |
363 | { | 280 | { |
364 | sigjmp_buf buf; | 281 | check_ptrace(); |
365 | int n; | ||
366 | |||
367 | *jmp_ptr = &buf; | ||
368 | n = sigsetjmp(buf, 1); | ||
369 | if(n != 0) | ||
370 | return(n); | ||
371 | (*fn)(arg); | ||
372 | return(0); | ||
373 | } | 282 | } |
374 | 283 | ||
375 | void forward_pending_sigio(int target) | 284 | static int __init noprocmm_cmd_param(char *str, int* add) |
376 | { | 285 | { |
377 | sigset_t sigs; | 286 | proc_mm = 0; |
287 | return 0; | ||
288 | } | ||
289 | |||
290 | __uml_setup("noprocmm", noprocmm_cmd_param, | ||
291 | "noprocmm\n" | ||
292 | " Turns off usage of /proc/mm, even if host supports it.\n" | ||
293 | " To support /proc/mm, the host needs to be patched using\n" | ||
294 | " the current skas3 patch.\n\n"); | ||
378 | 295 | ||
379 | if(sigpending(&sigs)) | 296 | static int __init noptracefaultinfo_cmd_param(char *str, int* add) |
380 | panic("forward_pending_sigio : sigpending failed"); | 297 | { |
381 | if(sigismember(&sigs, SIGIO)) | 298 | ptrace_faultinfo = 0; |
382 | kill(target, SIGIO); | 299 | return 0; |
383 | } | 300 | } |
384 | 301 | ||
385 | extern void *__syscall_stub_start, __syscall_stub_end; | 302 | __uml_setup("noptracefaultinfo", noptracefaultinfo_cmd_param, |
303 | "noptracefaultinfo\n" | ||
304 | " Turns off usage of PTRACE_FAULTINFO, even if host supports\n" | ||
305 | " it. To support PTRACE_FAULTINFO, the host needs to be patched\n" | ||
306 | " using the current skas3 patch.\n\n"); | ||
386 | 307 | ||
387 | #ifdef UML_CONFIG_MODE_SKAS | 308 | #ifdef UML_CONFIG_MODE_SKAS |
388 | |||
389 | static inline void check_skas3_ptrace_support(void) | 309 | static inline void check_skas3_ptrace_support(void) |
390 | { | 310 | { |
391 | struct ptrace_faultinfo fi; | 311 | struct ptrace_faultinfo fi; |
@@ -400,9 +320,8 @@ static inline void check_skas3_ptrace_support(void) | |||
400 | ptrace_faultinfo = 0; | 320 | ptrace_faultinfo = 0; |
401 | if(errno == EIO) | 321 | if(errno == EIO) |
402 | printf("not found\n"); | 322 | printf("not found\n"); |
403 | else { | 323 | else |
404 | perror("not found"); | 324 | perror("not found"); |
405 | } | ||
406 | } | 325 | } |
407 | else { | 326 | else { |
408 | if (!ptrace_faultinfo) | 327 | if (!ptrace_faultinfo) |
@@ -419,9 +338,10 @@ int can_do_skas(void) | |||
419 | { | 338 | { |
420 | printf("Checking for /proc/mm..."); | 339 | printf("Checking for /proc/mm..."); |
421 | if (os_access("/proc/mm", OS_ACC_W_OK) < 0) { | 340 | if (os_access("/proc/mm", OS_ACC_W_OK) < 0) { |
422 | proc_mm = 0; | 341 | proc_mm = 0; |
423 | printf("not found\n"); | 342 | printf("not found\n"); |
424 | } else { | 343 | } |
344 | else { | ||
425 | if (!proc_mm) | 345 | if (!proc_mm) |
426 | printf("found but disabled on command line\n"); | 346 | printf("found but disabled on command line\n"); |
427 | else | 347 | else |
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c new file mode 100644 index 000000000000..5b047ab8416a --- /dev/null +++ b/arch/um/os-Linux/tt.c | |||
@@ -0,0 +1,113 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <stdio.h> | ||
7 | #include <unistd.h> | ||
8 | #include <signal.h> | ||
9 | #include <sched.h> | ||
10 | #include <errno.h> | ||
11 | #include <stdarg.h> | ||
12 | #include <stdlib.h> | ||
13 | #include <setjmp.h> | ||
14 | #include <sys/time.h> | ||
15 | #include <sys/ptrace.h> | ||
16 | #include <linux/ptrace.h> | ||
17 | #include <sys/wait.h> | ||
18 | #include <sys/mman.h> | ||
19 | #include <asm/ptrace.h> | ||
20 | #include <asm/unistd.h> | ||
21 | #include <asm/page.h> | ||
22 | #include "user_util.h" | ||
23 | #include "kern_util.h" | ||
24 | #include "user.h" | ||
25 | #include "signal_kern.h" | ||
26 | #include "signal_user.h" | ||
27 | #include "sysdep/ptrace.h" | ||
28 | #include "sysdep/sigcontext.h" | ||
29 | #include "irq_user.h" | ||
30 | #include "ptrace_user.h" | ||
31 | #include "time_user.h" | ||
32 | #include "init.h" | ||
33 | #include "os.h" | ||
34 | #include "uml-config.h" | ||
35 | #include "choose-mode.h" | ||
36 | #include "mode.h" | ||
37 | #include "tempfile.h" | ||
38 | |||
39 | /* | ||
40 | *------------------------- | ||
41 | * only for tt mode (will be deleted in future...) | ||
42 | *------------------------- | ||
43 | */ | ||
44 | |||
45 | struct tramp { | ||
46 | int (*tramp)(void *); | ||
47 | void *tramp_data; | ||
48 | unsigned long temp_stack; | ||
49 | int flags; | ||
50 | int pid; | ||
51 | }; | ||
52 | |||
53 | /* See above for why sigkill is here */ | ||
54 | |||
55 | int sigkill = SIGKILL; | ||
56 | |||
57 | int outer_tramp(void *arg) | ||
58 | { | ||
59 | struct tramp *t; | ||
60 | int sig = sigkill; | ||
61 | |||
62 | t = arg; | ||
63 | t->pid = clone(t->tramp, (void *) t->temp_stack + page_size()/2, | ||
64 | t->flags, t->tramp_data); | ||
65 | if(t->pid > 0) wait_for_stop(t->pid, SIGSTOP, PTRACE_CONT, NULL); | ||
66 | kill(os_getpid(), sig); | ||
67 | _exit(0); | ||
68 | } | ||
69 | |||
70 | int start_fork_tramp(void *thread_arg, unsigned long temp_stack, | ||
71 | int clone_flags, int (*tramp)(void *)) | ||
72 | { | ||
73 | struct tramp arg; | ||
74 | unsigned long sp; | ||
75 | int new_pid, status, err; | ||
76 | |||
77 | /* The trampoline will run on the temporary stack */ | ||
78 | sp = stack_sp(temp_stack); | ||
79 | |||
80 | clone_flags |= CLONE_FILES | SIGCHLD; | ||
81 | |||
82 | arg.tramp = tramp; | ||
83 | arg.tramp_data = thread_arg; | ||
84 | arg.temp_stack = temp_stack; | ||
85 | arg.flags = clone_flags; | ||
86 | |||
87 | /* Start the process and wait for it to kill itself */ | ||
88 | new_pid = clone(outer_tramp, (void *) sp, clone_flags, &arg); | ||
89 | if(new_pid < 0) | ||
90 | return(new_pid); | ||
91 | |||
92 | CATCH_EINTR(err = waitpid(new_pid, &status, 0)); | ||
93 | if(err < 0) | ||
94 | panic("Waiting for outer trampoline failed - errno = %d", | ||
95 | errno); | ||
96 | |||
97 | if(!WIFSIGNALED(status) || (WTERMSIG(status) != SIGKILL)) | ||
98 | panic("outer trampoline didn't exit with SIGKILL, " | ||
99 | "status = %d", status); | ||
100 | |||
101 | return(arg.pid); | ||
102 | } | ||
103 | |||
104 | void forward_pending_sigio(int target) | ||
105 | { | ||
106 | sigset_t sigs; | ||
107 | |||
108 | if(sigpending(&sigs)) | ||
109 | panic("forward_pending_sigio : sigpending failed"); | ||
110 | if(sigismember(&sigs, SIGIO)) | ||
111 | kill(target, SIGIO); | ||
112 | } | ||
113 | |||
diff --git a/arch/um/scripts/Makefile.unmap b/arch/um/scripts/Makefile.unmap index 802d027a1e13..b2165188d942 100644 --- a/arch/um/scripts/Makefile.unmap +++ b/arch/um/scripts/Makefile.unmap | |||
@@ -12,7 +12,7 @@ $(obj)/unmap.o: _c_flags = $(call unprofile,$(CFLAGS)) | |||
12 | 12 | ||
13 | quiet_cmd_wrapld = LD $@ | 13 | quiet_cmd_wrapld = LD $@ |
14 | define cmd_wrapld | 14 | define cmd_wrapld |
15 | $(LD) $(LDFLAGS) -r -o $(obj)/unmap_tmp.o $< $(shell $(CC) $(CFLAGS) -print-file-name=libc.a); \ | 15 | $(LD) $(LDFLAGS) -r -o $(obj)/unmap_tmp.o $< ; \ |
16 | $(OBJCOPY) $(UML_OBJCOPYFLAGS) $(obj)/unmap_tmp.o $@ -G switcheroo | 16 | $(OBJCOPY) $(UML_OBJCOPYFLAGS) $(obj)/unmap_tmp.o $@ -G switcheroo |
17 | endef | 17 | endef |
18 | 18 | ||
diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 77c3c4d29f55..4ca2a229da49 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile | |||
@@ -16,13 +16,7 @@ semaphore.c-dir = kernel | |||
16 | highmem.c-dir = mm | 16 | highmem.c-dir = mm |
17 | module.c-dir = kernel | 17 | module.c-dir = kernel |
18 | 18 | ||
19 | STUB_CFLAGS = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) | 19 | $(obj)/stub_segv.o : _c_flags = $(call unprofile,$(CFLAGS)) |
20 | |||
21 | # _cflags works with kernel files, not with userspace ones, but c_flags does, | ||
22 | # why ask why? | ||
23 | $(obj)/stub_segv.o : c_flags = $(STUB_CFLAGS) | ||
24 | |||
25 | $(obj)/stub.o : a_flags = $(STUB_CFLAGS) | ||
26 | 20 | ||
27 | subdir- := util | 21 | subdir- := util |
28 | 22 | ||
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c index 4efc69a039d7..16bc19928b3c 100644 --- a/arch/um/sys-i386/signal.c +++ b/arch/um/sys-i386/signal.c | |||
@@ -122,9 +122,9 @@ int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, | |||
122 | int err; | 122 | int err; |
123 | 123 | ||
124 | to_fp = to->fpstate; | 124 | to_fp = to->fpstate; |
125 | from_fp = from->fpstate; | ||
126 | sigs = to->oldmask; | 125 | sigs = to->oldmask; |
127 | err = copy_from_user(to, from, sizeof(*to)); | 126 | err = copy_from_user(to, from, sizeof(*to)); |
127 | from_fp = to->fpstate; | ||
128 | to->oldmask = sigs; | 128 | to->oldmask = sigs; |
129 | to->fpstate = to_fp; | 129 | to->fpstate = to_fp; |
130 | if(to_fp != NULL) | 130 | if(to_fp != NULL) |
diff --git a/arch/um/sys-i386/stub.S b/arch/um/sys-i386/stub.S index 2f2c70a8f043..6a70d9ab5c29 100644 --- a/arch/um/sys-i386/stub.S +++ b/arch/um/sys-i386/stub.S | |||
@@ -2,7 +2,50 @@ | |||
2 | 2 | ||
3 | .globl syscall_stub | 3 | .globl syscall_stub |
4 | .section .__syscall_stub, "x" | 4 | .section .__syscall_stub, "x" |
5 | syscall_stub: | 5 | |
6 | int $0x80 | 6 | .globl batch_syscall_stub |
7 | batch_syscall_stub: | ||
8 | /* load pointer to first operation */ | ||
9 | mov $(UML_CONFIG_STUB_DATA+8), %esp | ||
10 | |||
11 | again: | ||
12 | /* load length of additional data */ | ||
13 | mov 0x0(%esp), %eax | ||
14 | |||
15 | /* if(length == 0) : end of list */ | ||
16 | /* write possible 0 to header */ | ||
17 | mov %eax, UML_CONFIG_STUB_DATA+4 | ||
18 | cmpl $0, %eax | ||
19 | jz done | ||
20 | |||
21 | /* save current pointer */ | ||
22 | mov %esp, UML_CONFIG_STUB_DATA+4 | ||
23 | |||
24 | /* skip additional data */ | ||
25 | add %eax, %esp | ||
26 | |||
27 | /* load syscall-# */ | ||
28 | pop %eax | ||
29 | |||
30 | /* load syscall params */ | ||
31 | pop %ebx | ||
32 | pop %ecx | ||
33 | pop %edx | ||
34 | pop %esi | ||
35 | pop %edi | ||
36 | pop %ebp | ||
37 | |||
38 | /* execute syscall */ | ||
39 | int $0x80 | ||
40 | |||
41 | /* check return value */ | ||
42 | pop %ebx | ||
43 | cmp %ebx, %eax | ||
44 | je again | ||
45 | |||
46 | done: | ||
47 | /* save return value */ | ||
7 | mov %eax, UML_CONFIG_STUB_DATA | 48 | mov %eax, UML_CONFIG_STUB_DATA |
49 | |||
50 | /* stop */ | ||
8 | int3 | 51 | int3 |
diff --git a/arch/um/sys-i386/stub_segv.c b/arch/um/sys-i386/stub_segv.c index 68aeabe3a654..1e88b275edac 100644 --- a/arch/um/sys-i386/stub_segv.c +++ b/arch/um/sys-i386/stub_segv.c | |||
@@ -3,8 +3,7 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <signal.h> | 6 | #include <asm/signal.h> |
7 | #include <asm/sigcontext.h> | ||
8 | #include <asm/unistd.h> | 7 | #include <asm/unistd.h> |
9 | #include "uml-config.h" | 8 | #include "uml-config.h" |
10 | #include "sysdep/sigcontext.h" | 9 | #include "sysdep/sigcontext.h" |
diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index 7488206ce6f4..f0ab574d1e95 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | #XXX: why into lib-y? | 7 | #XXX: why into lib-y? |
8 | lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o mem.o memcpy.o \ | 8 | lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o mem.o memcpy.o \ |
9 | ptrace.o ptrace_user.o semaphore.o sigcontext.o signal.o stub.o \ | 9 | ptrace.o ptrace_user.o sigcontext.o signal.o stub.o \ |
10 | stub_segv.o syscalls.o syscall_table.o sysrq.o thunk.o | 10 | stub_segv.o syscalls.o syscall_table.o sysrq.o thunk.o |
11 | 11 | ||
12 | obj-y := ksyms.o | 12 | obj-y := ksyms.o |
@@ -15,7 +15,7 @@ obj-$(CONFIG_MODULES) += module.o um_module.o | |||
15 | USER_OBJS := ptrace_user.o sigcontext.o | 15 | USER_OBJS := ptrace_user.o sigcontext.o |
16 | 16 | ||
17 | SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c memcpy.S \ | 17 | SYMLINKS = bitops.c csum-copy.S csum-partial.c csum-wrappers.c memcpy.S \ |
18 | semaphore.c thunk.S module.c | 18 | thunk.S module.c |
19 | 19 | ||
20 | include arch/um/scripts/Makefile.rules | 20 | include arch/um/scripts/Makefile.rules |
21 | 21 | ||
@@ -24,17 +24,10 @@ csum-copy.S-dir = lib | |||
24 | csum-partial.c-dir = lib | 24 | csum-partial.c-dir = lib |
25 | csum-wrappers.c-dir = lib | 25 | csum-wrappers.c-dir = lib |
26 | memcpy.S-dir = lib | 26 | memcpy.S-dir = lib |
27 | semaphore.c-dir = kernel | ||
28 | thunk.S-dir = lib | 27 | thunk.S-dir = lib |
29 | module.c-dir = kernel | 28 | module.c-dir = kernel |
30 | 29 | ||
31 | STUB_CFLAGS = -Wp,-MD,$(depfile) $(call unprofile,$(USER_CFLAGS)) | 30 | $(obj)/stub_segv.o: _c_flags = $(call unprofile,$(CFLAGS)) |
32 | |||
33 | # _cflags works with kernel files, not with userspace ones, but c_flags does, | ||
34 | # why ask why? | ||
35 | $(obj)/stub_segv.o : c_flags = $(STUB_CFLAGS) | ||
36 | |||
37 | $(obj)/stub.o : a_flags = $(STUB_CFLAGS) | ||
38 | 31 | ||
39 | subdir- := util | 32 | subdir- := util |
40 | 33 | ||
diff --git a/arch/um/sys-x86_64/signal.c b/arch/um/sys-x86_64/signal.c index 8fdaed06c10d..fe1d065332b1 100644 --- a/arch/um/sys-x86_64/signal.c +++ b/arch/um/sys-x86_64/signal.c | |||
@@ -104,28 +104,35 @@ int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp, | |||
104 | int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, | 104 | int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from, |
105 | int fpsize) | 105 | int fpsize) |
106 | { | 106 | { |
107 | struct _fpstate *to_fp, *from_fp; | 107 | struct _fpstate *to_fp, *from_fp; |
108 | unsigned long sigs; | 108 | unsigned long sigs; |
109 | int err; | 109 | int err; |
110 | 110 | ||
111 | to_fp = to->fpstate; | 111 | to_fp = to->fpstate; |
112 | from_fp = from->fpstate; | 112 | sigs = to->oldmask; |
113 | sigs = to->oldmask; | 113 | err = copy_from_user(to, from, sizeof(*to)); |
114 | err = copy_from_user(to, from, sizeof(*to)); | 114 | from_fp = to->fpstate; |
115 | to->oldmask = sigs; | 115 | to->fpstate = to_fp; |
116 | return(err); | 116 | to->oldmask = sigs; |
117 | if(to_fp != NULL) | ||
118 | err |= copy_from_user(to_fp, from_fp, fpsize); | ||
119 | return(err); | ||
117 | } | 120 | } |
118 | 121 | ||
119 | int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, | 122 | int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp, |
120 | struct sigcontext *from, int fpsize) | 123 | struct sigcontext *from, int fpsize) |
121 | { | 124 | { |
122 | struct _fpstate *to_fp, *from_fp; | 125 | struct _fpstate *to_fp, *from_fp; |
123 | int err; | 126 | int err; |
124 | 127 | ||
125 | to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); | 128 | to_fp = (fp ? fp : (struct _fpstate *) (to + 1)); |
126 | from_fp = from->fpstate; | 129 | from_fp = from->fpstate; |
127 | err = copy_to_user(to, from, sizeof(*to)); | 130 | err = copy_to_user(to, from, sizeof(*to)); |
128 | return(err); | 131 | if(from_fp != NULL){ |
132 | err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); | ||
133 | err |= copy_to_user(to_fp, from_fp, fpsize); | ||
134 | } | ||
135 | return(err); | ||
129 | } | 136 | } |
130 | 137 | ||
131 | #endif | 138 | #endif |
diff --git a/arch/um/sys-x86_64/stub.S b/arch/um/sys-x86_64/stub.S index 31c14925716b..03c279735784 100644 --- a/arch/um/sys-x86_64/stub.S +++ b/arch/um/sys-x86_64/stub.S | |||
@@ -13,3 +13,54 @@ syscall_stub: | |||
13 | or %rcx, %rbx | 13 | or %rcx, %rbx |
14 | movq %rax, (%rbx) | 14 | movq %rax, (%rbx) |
15 | int3 | 15 | int3 |
16 | |||
17 | .globl batch_syscall_stub | ||
18 | batch_syscall_stub: | ||
19 | mov $(UML_CONFIG_STUB_DATA >> 32), %rbx | ||
20 | sal $32, %rbx | ||
21 | mov $(UML_CONFIG_STUB_DATA & 0xffffffff), %rax | ||
22 | or %rax, %rbx | ||
23 | /* load pointer to first operation */ | ||
24 | mov %rbx, %rsp | ||
25 | add $0x10, %rsp | ||
26 | again: | ||
27 | /* load length of additional data */ | ||
28 | mov 0x0(%rsp), %rax | ||
29 | |||
30 | /* if(length == 0) : end of list */ | ||
31 | /* write possible 0 to header */ | ||
32 | mov %rax, 8(%rbx) | ||
33 | cmp $0, %rax | ||
34 | jz done | ||
35 | |||
36 | /* save current pointer */ | ||
37 | mov %rsp, 8(%rbx) | ||
38 | |||
39 | /* skip additional data */ | ||
40 | add %rax, %rsp | ||
41 | |||
42 | /* load syscall-# */ | ||
43 | pop %rax | ||
44 | |||
45 | /* load syscall params */ | ||
46 | pop %rdi | ||
47 | pop %rsi | ||
48 | pop %rdx | ||
49 | pop %r10 | ||
50 | pop %r8 | ||
51 | pop %r9 | ||
52 | |||
53 | /* execute syscall */ | ||
54 | syscall | ||
55 | |||
56 | /* check return value */ | ||
57 | pop %rcx | ||
58 | cmp %rcx, %rax | ||
59 | je again | ||
60 | |||
61 | done: | ||
62 | /* save return value */ | ||
63 | mov %rax, (%rbx) | ||
64 | |||
65 | /* stop */ | ||
66 | int3 | ||
diff --git a/arch/um/sys-x86_64/stub_segv.c b/arch/um/sys-x86_64/stub_segv.c index 161d1fe9c034..65a131b362b6 100644 --- a/arch/um/sys-x86_64/stub_segv.c +++ b/arch/um/sys-x86_64/stub_segv.c | |||
@@ -3,9 +3,10 @@ | |||
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <signal.h> | 6 | #include <asm/signal.h> |
7 | #include <linux/compiler.h> | 7 | #include <linux/compiler.h> |
8 | #include <asm/unistd.h> | 8 | #include <asm/unistd.h> |
9 | #include <asm/ucontext.h> | ||
9 | #include "uml-config.h" | 10 | #include "uml-config.h" |
10 | #include "sysdep/sigcontext.h" | 11 | #include "sysdep/sigcontext.h" |
11 | #include "sysdep/faultinfo.h" | 12 | #include "sysdep/faultinfo.h" |
diff --git a/arch/x86_64/Kconfig b/arch/x86_64/Kconfig index 660a03a89e66..75e52c57f19c 100644 --- a/arch/x86_64/Kconfig +++ b/arch/x86_64/Kconfig | |||
@@ -24,6 +24,10 @@ config X86 | |||
24 | bool | 24 | bool |
25 | default y | 25 | default y |
26 | 26 | ||
27 | config SEMAPHORE_SLEEPERS | ||
28 | bool | ||
29 | default y | ||
30 | |||
27 | config MMU | 31 | config MMU |
28 | bool | 32 | bool |
29 | default y | 33 | default y |
diff --git a/arch/x86_64/kernel/Makefile b/arch/x86_64/kernel/Makefile index 48f9e2c19cd6..c32e198d7b2b 100644 --- a/arch/x86_64/kernel/Makefile +++ b/arch/x86_64/kernel/Makefile | |||
@@ -4,10 +4,10 @@ | |||
4 | 4 | ||
5 | extra-y := head.o head64.o init_task.o vmlinux.lds | 5 | extra-y := head.o head64.o init_task.o vmlinux.lds |
6 | EXTRA_AFLAGS := -traditional | 6 | EXTRA_AFLAGS := -traditional |
7 | obj-y := process.o semaphore.o signal.o entry.o traps.o irq.o \ | 7 | obj-y := process.o signal.o entry.o traps.o irq.o \ |
8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \ | 8 | ptrace.o time.o ioport.o ldt.o setup.o i8259.o sys_x86_64.o \ |
9 | x8664_ksyms.o i387.o syscall.o vsyscall.o \ | 9 | x8664_ksyms.o i387.o syscall.o vsyscall.o \ |
10 | setup64.o bootflag.o e820.o reboot.o quirks.o | 10 | setup64.o bootflag.o e820.o reboot.o quirks.o i8237.o |
11 | 11 | ||
12 | obj-$(CONFIG_X86_MCE) += mce.o | 12 | obj-$(CONFIG_X86_MCE) += mce.o |
13 | obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o | 13 | obj-$(CONFIG_X86_MCE_INTEL) += mce_intel.o |
@@ -45,3 +45,4 @@ swiotlb-$(CONFIG_SWIOTLB) += ../../ia64/lib/swiotlb.o | |||
45 | microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o | 45 | microcode-$(subst m,y,$(CONFIG_MICROCODE)) += ../../i386/kernel/microcode.o |
46 | intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o | 46 | intel_cacheinfo-y += ../../i386/kernel/cpu/intel_cacheinfo.o |
47 | quirks-y += ../../i386/kernel/quirks.o | 47 | quirks-y += ../../i386/kernel/quirks.o |
48 | i8237-y += ../../i386/kernel/i8237.o | ||
diff --git a/arch/x86_64/kernel/nmi.c b/arch/x86_64/kernel/nmi.c index 4e44d6e6b7e5..64a8e05d5811 100644 --- a/arch/x86_64/kernel/nmi.c +++ b/arch/x86_64/kernel/nmi.c | |||
@@ -290,7 +290,7 @@ void enable_timer_nmi_watchdog(void) | |||
290 | 290 | ||
291 | static int nmi_pm_active; /* nmi_active before suspend */ | 291 | static int nmi_pm_active; /* nmi_active before suspend */ |
292 | 292 | ||
293 | static int lapic_nmi_suspend(struct sys_device *dev, u32 state) | 293 | static int lapic_nmi_suspend(struct sys_device *dev, pm_message_t state) |
294 | { | 294 | { |
295 | nmi_pm_active = nmi_active; | 295 | nmi_pm_active = nmi_active; |
296 | disable_lapic_nmi_watchdog(); | 296 | disable_lapic_nmi_watchdog(); |
diff --git a/crypto/Kconfig b/crypto/Kconfig index 256c0b1fed10..89299f4ffe12 100644 --- a/crypto/Kconfig +++ b/crypto/Kconfig | |||
@@ -219,7 +219,7 @@ config CRYPTO_CAST6 | |||
219 | described in RFC2612. | 219 | described in RFC2612. |
220 | 220 | ||
221 | config CRYPTO_TEA | 221 | config CRYPTO_TEA |
222 | tristate "TEA and XTEA cipher algorithms" | 222 | tristate "TEA, XTEA and XETA cipher algorithms" |
223 | depends on CRYPTO | 223 | depends on CRYPTO |
224 | help | 224 | help |
225 | TEA cipher algorithm. | 225 | TEA cipher algorithm. |
@@ -232,6 +232,9 @@ config CRYPTO_TEA | |||
232 | the TEA algorithm to address a potential key weakness | 232 | the TEA algorithm to address a potential key weakness |
233 | in the TEA algorithm. | 233 | in the TEA algorithm. |
234 | 234 | ||
235 | Xtendend Encryption Tiny Algorithm is a mis-implementation | ||
236 | of the XTEA algorithm for compatibility purposes. | ||
237 | |||
235 | config CRYPTO_ARC4 | 238 | config CRYPTO_ARC4 |
236 | tristate "ARC4 cipher algorithm" | 239 | tristate "ARC4 cipher algorithm" |
237 | depends on CRYPTO | 240 | depends on CRYPTO |
diff --git a/crypto/api.c b/crypto/api.c index b4728811ce3b..959c4e5f264f 100644 --- a/crypto/api.c +++ b/crypto/api.c | |||
@@ -66,7 +66,8 @@ static inline struct crypto_alg *crypto_alg_mod_lookup(const char *name) | |||
66 | 66 | ||
67 | static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags) | 67 | static int crypto_init_flags(struct crypto_tfm *tfm, u32 flags) |
68 | { | 68 | { |
69 | tfm->crt_flags = 0; | 69 | tfm->crt_flags = flags & CRYPTO_TFM_REQ_MASK; |
70 | flags &= ~CRYPTO_TFM_REQ_MASK; | ||
70 | 71 | ||
71 | switch (crypto_tfm_alg_type(tfm)) { | 72 | switch (crypto_tfm_alg_type(tfm)) { |
72 | case CRYPTO_ALG_TYPE_CIPHER: | 73 | case CRYPTO_ALG_TYPE_CIPHER: |
diff --git a/crypto/cipher.c b/crypto/cipher.c index 8da644364cb4..3df47f93c9db 100644 --- a/crypto/cipher.c +++ b/crypto/cipher.c | |||
@@ -377,11 +377,7 @@ static int nocrypt_iv(struct crypto_tfm *tfm, | |||
377 | int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags) | 377 | int crypto_init_cipher_flags(struct crypto_tfm *tfm, u32 flags) |
378 | { | 378 | { |
379 | u32 mode = flags & CRYPTO_TFM_MODE_MASK; | 379 | u32 mode = flags & CRYPTO_TFM_MODE_MASK; |
380 | |||
381 | tfm->crt_cipher.cit_mode = mode ? mode : CRYPTO_TFM_MODE_ECB; | 380 | tfm->crt_cipher.cit_mode = mode ? mode : CRYPTO_TFM_MODE_ECB; |
382 | if (flags & CRYPTO_TFM_REQ_WEAK_KEY) | ||
383 | tfm->crt_flags = CRYPTO_TFM_REQ_WEAK_KEY; | ||
384 | |||
385 | return 0; | 381 | return 0; |
386 | } | 382 | } |
387 | 383 | ||
diff --git a/crypto/internal.h b/crypto/internal.h index 37515beafc8c..37aa652ce5ce 100644 --- a/crypto/internal.h +++ b/crypto/internal.h | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
20 | #include <linux/slab.h> | ||
20 | #include <asm/kmap_types.h> | 21 | #include <asm/kmap_types.h> |
21 | 22 | ||
22 | extern enum km_type crypto_km_types[]; | 23 | extern enum km_type crypto_km_types[]; |
@@ -38,7 +39,7 @@ static inline void crypto_kunmap(void *vaddr, int out) | |||
38 | 39 | ||
39 | static inline void crypto_yield(struct crypto_tfm *tfm) | 40 | static inline void crypto_yield(struct crypto_tfm *tfm) |
40 | { | 41 | { |
41 | if (!in_atomic()) | 42 | if (tfm->crt_flags & CRYPTO_TFM_REQ_MAY_SLEEP) |
42 | cond_resched(); | 43 | cond_resched(); |
43 | } | 44 | } |
44 | 45 | ||
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c index bd7524cfff33..68639419c5bd 100644 --- a/crypto/tcrypt.c +++ b/crypto/tcrypt.c | |||
@@ -72,7 +72,7 @@ static char *check[] = { | |||
72 | "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", | 72 | "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", |
73 | "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", | 73 | "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", |
74 | "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea", | 74 | "arc4", "michael_mic", "deflate", "crc32c", "tea", "xtea", |
75 | "khazad", "wp512", "wp384", "wp256", "tnepres", NULL | 75 | "khazad", "wp512", "wp384", "wp256", "tnepres", "xeta", NULL |
76 | }; | 76 | }; |
77 | 77 | ||
78 | static void hexdump(unsigned char *buf, unsigned int len) | 78 | static void hexdump(unsigned char *buf, unsigned int len) |
@@ -859,6 +859,10 @@ static void do_test(void) | |||
859 | test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); | 859 | test_cipher ("anubis", MODE_CBC, ENCRYPT, anubis_cbc_enc_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); |
860 | test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); | 860 | test_cipher ("anubis", MODE_CBC, DECRYPT, anubis_cbc_dec_tv_template, ANUBIS_CBC_ENC_TEST_VECTORS); |
861 | 861 | ||
862 | //XETA | ||
863 | test_cipher ("xeta", MODE_ECB, ENCRYPT, xeta_enc_tv_template, XETA_ENC_TEST_VECTORS); | ||
864 | test_cipher ("xeta", MODE_ECB, DECRYPT, xeta_dec_tv_template, XETA_DEC_TEST_VECTORS); | ||
865 | |||
862 | test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS); | 866 | test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS); |
863 | test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS); | 867 | test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS); |
864 | test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS); | 868 | test_hash("wp512", wp512_tv_template, WP512_TEST_VECTORS); |
@@ -1016,6 +1020,11 @@ static void do_test(void) | |||
1016 | case 29: | 1020 | case 29: |
1017 | test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS); | 1021 | test_hash("tgr128", tgr128_tv_template, TGR128_TEST_VECTORS); |
1018 | break; | 1022 | break; |
1023 | |||
1024 | case 30: | ||
1025 | test_cipher ("xeta", MODE_ECB, ENCRYPT, xeta_enc_tv_template, XETA_ENC_TEST_VECTORS); | ||
1026 | test_cipher ("xeta", MODE_ECB, DECRYPT, xeta_dec_tv_template, XETA_DEC_TEST_VECTORS); | ||
1027 | break; | ||
1019 | 1028 | ||
1020 | #ifdef CONFIG_CRYPTO_HMAC | 1029 | #ifdef CONFIG_CRYPTO_HMAC |
1021 | case 100: | 1030 | case 100: |
diff --git a/crypto/tcrypt.h b/crypto/tcrypt.h index c01a0ce9b40a..522ffd4b6f43 100644 --- a/crypto/tcrypt.h +++ b/crypto/tcrypt.h | |||
@@ -2211,7 +2211,7 @@ static struct cipher_testvec xtea_enc_tv_template[] = { | |||
2211 | .klen = 16, | 2211 | .klen = 16, |
2212 | .input = { [0 ... 8] = 0x00 }, | 2212 | .input = { [0 ... 8] = 0x00 }, |
2213 | .ilen = 8, | 2213 | .ilen = 8, |
2214 | .result = { 0xaa, 0x22, 0x96, 0xe5, 0x6c, 0x61, 0xf3, 0x45 }, | 2214 | .result = { 0xd8, 0xd4, 0xe9, 0xde, 0xd9, 0x1e, 0x13, 0xf7 }, |
2215 | .rlen = 8, | 2215 | .rlen = 8, |
2216 | }, { | 2216 | }, { |
2217 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, | 2217 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
@@ -2219,31 +2219,31 @@ static struct cipher_testvec xtea_enc_tv_template[] = { | |||
2219 | .klen = 16, | 2219 | .klen = 16, |
2220 | .input = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, | 2220 | .input = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
2221 | .ilen = 8, | 2221 | .ilen = 8, |
2222 | .result = { 0x82, 0x3e, 0xeb, 0x35, 0xdc, 0xdd, 0xd9, 0xc3 }, | 2222 | .result = { 0x94, 0xeb, 0xc8, 0x96, 0x84, 0x6a, 0x49, 0xa8 }, |
2223 | .rlen = 8, | 2223 | .rlen = 8, |
2224 | }, { | 2224 | }, { |
2225 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, | 2225 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
2226 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, | 2226 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
2227 | .klen = 16, | 2227 | .klen = 16, |
2228 | .input = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, | 2228 | .input = { 0x3e, 0xce, 0xae, 0x22, 0x60, 0x56, 0xa8, 0x9d, |
2229 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, | 2229 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
2230 | .ilen = 16, | 2230 | .ilen = 16, |
2231 | .result = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, | 2231 | .result = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, |
2232 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, | 2232 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, |
2233 | .rlen = 16, | 2233 | .rlen = 16, |
2234 | }, { | 2234 | }, { |
2235 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, | 2235 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
2236 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, | 2236 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
2237 | .klen = 16, | 2237 | .klen = 16, |
2238 | .input = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, | 2238 | .input = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
2239 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, | 2239 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
2240 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, | 2240 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
2241 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, | 2241 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
2242 | .ilen = 32, | 2242 | .ilen = 32, |
2243 | .result = { 0x0b, 0x03, 0xcd, 0x8a, 0xbe, 0x95, 0xfd, 0xb1, | 2243 | .result = { 0x99, 0x81, 0x9f, 0x5d, 0x6f, 0x4b, 0x31, 0x3a, |
2244 | 0xc1, 0x44, 0x91, 0x0b, 0xa5, 0xc9, 0x1b, 0xb4, | 2244 | 0x86, 0xff, 0x6f, 0xd0, 0xe3, 0x87, 0x70, 0x07, |
2245 | 0xa9, 0xda, 0x1e, 0x9e, 0xb1, 0x3e, 0x2a, 0x8f, | 2245 | 0x4d, 0xb8, 0xcf, 0xf3, 0x99, 0x50, 0xb3, 0xd4, |
2246 | 0xea, 0xa5, 0x6a, 0x85, 0xd1, 0xf4, 0xa8, 0xa5 }, | 2246 | 0x73, 0xa2, 0xfa, 0xc9, 0x16, 0x59, 0x5d, 0x81 }, |
2247 | .rlen = 32, | 2247 | .rlen = 32, |
2248 | } | 2248 | } |
2249 | }; | 2249 | }; |
@@ -2252,7 +2252,7 @@ static struct cipher_testvec xtea_dec_tv_template[] = { | |||
2252 | { | 2252 | { |
2253 | .key = { [0 ... 15] = 0x00 }, | 2253 | .key = { [0 ... 15] = 0x00 }, |
2254 | .klen = 16, | 2254 | .klen = 16, |
2255 | .input = { 0xaa, 0x22, 0x96, 0xe5, 0x6c, 0x61, 0xf3, 0x45 }, | 2255 | .input = { 0xd8, 0xd4, 0xe9, 0xde, 0xd9, 0x1e, 0x13, 0xf7 }, |
2256 | .ilen = 8, | 2256 | .ilen = 8, |
2257 | .result = { [0 ... 8] = 0x00 }, | 2257 | .result = { [0 ... 8] = 0x00 }, |
2258 | .rlen = 8, | 2258 | .rlen = 8, |
@@ -2260,7 +2260,7 @@ static struct cipher_testvec xtea_dec_tv_template[] = { | |||
2260 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, | 2260 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, |
2261 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, | 2261 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, |
2262 | .klen = 16, | 2262 | .klen = 16, |
2263 | .input = { 0x82, 0x3e, 0xeb, 0x35, 0xdc, 0xdd, 0xd9, 0xc3 }, | 2263 | .input = { 0x94, 0xeb, 0xc8, 0x96, 0x84, 0x6a, 0x49, 0xa8 }, |
2264 | .ilen = 8, | 2264 | .ilen = 8, |
2265 | .result = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, | 2265 | .result = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, |
2266 | .rlen = 8, | 2266 | .rlen = 8, |
@@ -2268,24 +2268,24 @@ static struct cipher_testvec xtea_dec_tv_template[] = { | |||
2268 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, | 2268 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, |
2269 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, | 2269 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, |
2270 | .klen = 16, | 2270 | .klen = 16, |
2271 | .input = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, | 2271 | .input = { 0x3e, 0xce, 0xae, 0x22, 0x60, 0x56, 0xa8, 0x9d, |
2272 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, | 2272 | 0x77, 0x4d, 0xd4, 0xb4, 0x87, 0x24, 0xe3, 0x9a }, |
2273 | .ilen = 16, | 2273 | .ilen = 16, |
2274 | .result = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, | 2274 | .result = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, |
2275 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, | 2275 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, |
2276 | .rlen = 16, | 2276 | .rlen = 16, |
2277 | }, { | 2277 | }, { |
2278 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, | 2278 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, |
2279 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, | 2279 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, |
2280 | .klen = 16, | 2280 | .klen = 16, |
2281 | .input = { 0x0b, 0x03, 0xcd, 0x8a, 0xbe, 0x95, 0xfd, 0xb1, | 2281 | .input = { 0x99, 0x81, 0x9f, 0x5d, 0x6f, 0x4b, 0x31, 0x3a, |
2282 | 0xc1, 0x44, 0x91, 0x0b, 0xa5, 0xc9, 0x1b, 0xb4, | 2282 | 0x86, 0xff, 0x6f, 0xd0, 0xe3, 0x87, 0x70, 0x07, |
2283 | 0xa9, 0xda, 0x1e, 0x9e, 0xb1, 0x3e, 0x2a, 0x8f, | 2283 | 0x4d, 0xb8, 0xcf, 0xf3, 0x99, 0x50, 0xb3, 0xd4, |
2284 | 0xea, 0xa5, 0x6a, 0x85, 0xd1, 0xf4, 0xa8, 0xa5 }, | 2284 | 0x73, 0xa2, 0xfa, 0xc9, 0x16, 0x59, 0x5d, 0x81 }, |
2285 | .ilen = 32, | 2285 | .ilen = 32, |
2286 | .result = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, | 2286 | .result = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, |
2287 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, | 2287 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, |
2288 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, | 2288 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, |
2289 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, | 2289 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, |
2290 | .rlen = 32, | 2290 | .rlen = 32, |
2291 | } | 2291 | } |
@@ -2594,6 +2594,98 @@ static struct cipher_testvec anubis_cbc_dec_tv_template[] = { | |||
2594 | }, | 2594 | }, |
2595 | }; | 2595 | }; |
2596 | 2596 | ||
2597 | /* | ||
2598 | * XETA test vectors | ||
2599 | */ | ||
2600 | #define XETA_ENC_TEST_VECTORS 4 | ||
2601 | #define XETA_DEC_TEST_VECTORS 4 | ||
2602 | |||
2603 | static struct cipher_testvec xeta_enc_tv_template[] = { | ||
2604 | { | ||
2605 | .key = { [0 ... 15] = 0x00 }, | ||
2606 | .klen = 16, | ||
2607 | .input = { [0 ... 8] = 0x00 }, | ||
2608 | .ilen = 8, | ||
2609 | .result = { 0xaa, 0x22, 0x96, 0xe5, 0x6c, 0x61, 0xf3, 0x45 }, | ||
2610 | .rlen = 8, | ||
2611 | }, { | ||
2612 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, | ||
2613 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, | ||
2614 | .klen = 16, | ||
2615 | .input = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, | ||
2616 | .ilen = 8, | ||
2617 | .result = { 0x82, 0x3e, 0xeb, 0x35, 0xdc, 0xdd, 0xd9, 0xc3 }, | ||
2618 | .rlen = 8, | ||
2619 | }, { | ||
2620 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, | ||
2621 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, | ||
2622 | .klen = 16, | ||
2623 | .input = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, | ||
2624 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, | ||
2625 | .ilen = 16, | ||
2626 | .result = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, | ||
2627 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, | ||
2628 | .rlen = 16, | ||
2629 | }, { | ||
2630 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, | ||
2631 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, | ||
2632 | .klen = 16, | ||
2633 | .input = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, | ||
2634 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, | ||
2635 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, | ||
2636 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, | ||
2637 | .ilen = 32, | ||
2638 | .result = { 0x0b, 0x03, 0xcd, 0x8a, 0xbe, 0x95, 0xfd, 0xb1, | ||
2639 | 0xc1, 0x44, 0x91, 0x0b, 0xa5, 0xc9, 0x1b, 0xb4, | ||
2640 | 0xa9, 0xda, 0x1e, 0x9e, 0xb1, 0x3e, 0x2a, 0x8f, | ||
2641 | 0xea, 0xa5, 0x6a, 0x85, 0xd1, 0xf4, 0xa8, 0xa5 }, | ||
2642 | .rlen = 32, | ||
2643 | } | ||
2644 | }; | ||
2645 | |||
2646 | static struct cipher_testvec xeta_dec_tv_template[] = { | ||
2647 | { | ||
2648 | .key = { [0 ... 15] = 0x00 }, | ||
2649 | .klen = 16, | ||
2650 | .input = { 0xaa, 0x22, 0x96, 0xe5, 0x6c, 0x61, 0xf3, 0x45 }, | ||
2651 | .ilen = 8, | ||
2652 | .result = { [0 ... 8] = 0x00 }, | ||
2653 | .rlen = 8, | ||
2654 | }, { | ||
2655 | .key = { 0x2b, 0x02, 0x05, 0x68, 0x06, 0x14, 0x49, 0x76, | ||
2656 | 0x77, 0x5d, 0x0e, 0x26, 0x6c, 0x28, 0x78, 0x43 }, | ||
2657 | .klen = 16, | ||
2658 | .input = { 0x82, 0x3e, 0xeb, 0x35, 0xdc, 0xdd, 0xd9, 0xc3 }, | ||
2659 | .ilen = 8, | ||
2660 | .result = { 0x74, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x2e }, | ||
2661 | .rlen = 8, | ||
2662 | }, { | ||
2663 | .key = { 0x09, 0x65, 0x43, 0x11, 0x66, 0x44, 0x39, 0x25, | ||
2664 | 0x51, 0x3a, 0x16, 0x10, 0x0a, 0x08, 0x12, 0x6e }, | ||
2665 | .klen = 16, | ||
2666 | .input = { 0xe2, 0x04, 0xdb, 0xf2, 0x89, 0x85, 0x9e, 0xea, | ||
2667 | 0x61, 0x35, 0xaa, 0xed, 0xb5, 0xcb, 0x71, 0x2c }, | ||
2668 | .ilen = 16, | ||
2669 | .result = { 0x6c, 0x6f, 0x6e, 0x67, 0x65, 0x72, 0x5f, 0x74, | ||
2670 | 0x65, 0x73, 0x74, 0x5f, 0x76, 0x65, 0x63, 0x74 }, | ||
2671 | .rlen = 16, | ||
2672 | }, { | ||
2673 | .key = { 0x4d, 0x76, 0x32, 0x17, 0x05, 0x3f, 0x75, 0x2c, | ||
2674 | 0x5d, 0x04, 0x16, 0x36, 0x15, 0x72, 0x63, 0x2f }, | ||
2675 | .klen = 16, | ||
2676 | .input = { 0x0b, 0x03, 0xcd, 0x8a, 0xbe, 0x95, 0xfd, 0xb1, | ||
2677 | 0xc1, 0x44, 0x91, 0x0b, 0xa5, 0xc9, 0x1b, 0xb4, | ||
2678 | 0xa9, 0xda, 0x1e, 0x9e, 0xb1, 0x3e, 0x2a, 0x8f, | ||
2679 | 0xea, 0xa5, 0x6a, 0x85, 0xd1, 0xf4, 0xa8, 0xa5 }, | ||
2680 | .ilen = 32, | ||
2681 | .result = { 0x54, 0x65, 0x61, 0x20, 0x69, 0x73, 0x20, 0x67, | ||
2682 | 0x6f, 0x6f, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, | ||
2683 | 0x79, 0x6f, 0x75, 0x21, 0x21, 0x21, 0x20, 0x72, | ||
2684 | 0x65, 0x61, 0x6c, 0x6c, 0x79, 0x21, 0x21, 0x21 }, | ||
2685 | .rlen = 32, | ||
2686 | } | ||
2687 | }; | ||
2688 | |||
2597 | /* | 2689 | /* |
2598 | * Compression stuff. | 2690 | * Compression stuff. |
2599 | */ | 2691 | */ |
diff --git a/crypto/tea.c b/crypto/tea.c index 03c23cbd3afa..5924efdd3a16 100644 --- a/crypto/tea.c +++ b/crypto/tea.c | |||
@@ -1,11 +1,15 @@ | |||
1 | /* | 1 | /* |
2 | * Cryptographic API. | 2 | * Cryptographic API. |
3 | * | 3 | * |
4 | * TEA and Xtended TEA Algorithms | 4 | * TEA, XTEA, and XETA crypto alogrithms |
5 | * | 5 | * |
6 | * The TEA and Xtended TEA algorithms were developed by David Wheeler | 6 | * The TEA and Xtended TEA algorithms were developed by David Wheeler |
7 | * and Roger Needham at the Computer Laboratory of Cambridge University. | 7 | * and Roger Needham at the Computer Laboratory of Cambridge University. |
8 | * | 8 | * |
9 | * Due to the order of evaluation in XTEA many people have incorrectly | ||
10 | * implemented it. XETA (XTEA in the wrong order), exists for | ||
11 | * compatibility with these implementations. | ||
12 | * | ||
9 | * Copyright (c) 2004 Aaron Grothe ajgrothe@yahoo.com | 13 | * Copyright (c) 2004 Aaron Grothe ajgrothe@yahoo.com |
10 | * | 14 | * |
11 | * This program is free software; you can redistribute it and/or modify | 15 | * This program is free software; you can redistribute it and/or modify |
@@ -153,9 +157,9 @@ static void xtea_encrypt(void *ctx_arg, u8 *dst, const u8 *src) | |||
153 | z = u32_in (src + 4); | 157 | z = u32_in (src + 4); |
154 | 158 | ||
155 | while (sum != limit) { | 159 | while (sum != limit) { |
156 | y += (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum&3]; | 160 | y += ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum&3]); |
157 | sum += XTEA_DELTA; | 161 | sum += XTEA_DELTA; |
158 | z += (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 &3]; | 162 | z += ((y << 4 ^ y >> 5) + y) ^ (sum + ctx->KEY[sum>>11 &3]); |
159 | } | 163 | } |
160 | 164 | ||
161 | u32_out (dst, y); | 165 | u32_out (dst, y); |
@@ -175,6 +179,51 @@ static void xtea_decrypt(void *ctx_arg, u8 *dst, const u8 *src) | |||
175 | sum = XTEA_DELTA * XTEA_ROUNDS; | 179 | sum = XTEA_DELTA * XTEA_ROUNDS; |
176 | 180 | ||
177 | while (sum) { | 181 | while (sum) { |
182 | z -= ((y << 4 ^ y >> 5) + y) ^ (sum + ctx->KEY[sum>>11 & 3]); | ||
183 | sum -= XTEA_DELTA; | ||
184 | y -= ((z << 4 ^ z >> 5) + z) ^ (sum + ctx->KEY[sum & 3]); | ||
185 | } | ||
186 | |||
187 | u32_out (dst, y); | ||
188 | u32_out (dst + 4, z); | ||
189 | |||
190 | } | ||
191 | |||
192 | |||
193 | static void xeta_encrypt(void *ctx_arg, u8 *dst, const u8 *src) | ||
194 | { | ||
195 | |||
196 | u32 y, z, sum = 0; | ||
197 | u32 limit = XTEA_DELTA * XTEA_ROUNDS; | ||
198 | |||
199 | struct xtea_ctx *ctx = ctx_arg; | ||
200 | |||
201 | y = u32_in (src); | ||
202 | z = u32_in (src + 4); | ||
203 | |||
204 | while (sum != limit) { | ||
205 | y += (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum&3]; | ||
206 | sum += XTEA_DELTA; | ||
207 | z += (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 &3]; | ||
208 | } | ||
209 | |||
210 | u32_out (dst, y); | ||
211 | u32_out (dst + 4, z); | ||
212 | |||
213 | } | ||
214 | |||
215 | static void xeta_decrypt(void *ctx_arg, u8 *dst, const u8 *src) | ||
216 | { | ||
217 | |||
218 | u32 y, z, sum; | ||
219 | struct tea_ctx *ctx = ctx_arg; | ||
220 | |||
221 | y = u32_in (src); | ||
222 | z = u32_in (src + 4); | ||
223 | |||
224 | sum = XTEA_DELTA * XTEA_ROUNDS; | ||
225 | |||
226 | while (sum) { | ||
178 | z -= (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 & 3]; | 227 | z -= (y << 4 ^ y >> 5) + (y ^ sum) + ctx->KEY[sum>>11 & 3]; |
179 | sum -= XTEA_DELTA; | 228 | sum -= XTEA_DELTA; |
180 | y -= (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum & 3]; | 229 | y -= (z << 4 ^ z >> 5) + (z ^ sum) + ctx->KEY[sum & 3]; |
@@ -215,6 +264,21 @@ static struct crypto_alg xtea_alg = { | |||
215 | .cia_decrypt = xtea_decrypt } } | 264 | .cia_decrypt = xtea_decrypt } } |
216 | }; | 265 | }; |
217 | 266 | ||
267 | static struct crypto_alg xeta_alg = { | ||
268 | .cra_name = "xeta", | ||
269 | .cra_flags = CRYPTO_ALG_TYPE_CIPHER, | ||
270 | .cra_blocksize = XTEA_BLOCK_SIZE, | ||
271 | .cra_ctxsize = sizeof (struct xtea_ctx), | ||
272 | .cra_module = THIS_MODULE, | ||
273 | .cra_list = LIST_HEAD_INIT(xtea_alg.cra_list), | ||
274 | .cra_u = { .cipher = { | ||
275 | .cia_min_keysize = XTEA_KEY_SIZE, | ||
276 | .cia_max_keysize = XTEA_KEY_SIZE, | ||
277 | .cia_setkey = xtea_setkey, | ||
278 | .cia_encrypt = xeta_encrypt, | ||
279 | .cia_decrypt = xeta_decrypt } } | ||
280 | }; | ||
281 | |||
218 | static int __init init(void) | 282 | static int __init init(void) |
219 | { | 283 | { |
220 | int ret = 0; | 284 | int ret = 0; |
@@ -229,6 +293,13 @@ static int __init init(void) | |||
229 | goto out; | 293 | goto out; |
230 | } | 294 | } |
231 | 295 | ||
296 | ret = crypto_register_alg(&xeta_alg); | ||
297 | if (ret < 0) { | ||
298 | crypto_unregister_alg(&tea_alg); | ||
299 | crypto_unregister_alg(&xtea_alg); | ||
300 | goto out; | ||
301 | } | ||
302 | |||
232 | out: | 303 | out: |
233 | return ret; | 304 | return ret; |
234 | } | 305 | } |
@@ -237,12 +308,14 @@ static void __exit fini(void) | |||
237 | { | 308 | { |
238 | crypto_unregister_alg(&tea_alg); | 309 | crypto_unregister_alg(&tea_alg); |
239 | crypto_unregister_alg(&xtea_alg); | 310 | crypto_unregister_alg(&xtea_alg); |
311 | crypto_unregister_alg(&xeta_alg); | ||
240 | } | 312 | } |
241 | 313 | ||
242 | MODULE_ALIAS("xtea"); | 314 | MODULE_ALIAS("xtea"); |
315 | MODULE_ALIAS("xeta"); | ||
243 | 316 | ||
244 | module_init(init); | 317 | module_init(init); |
245 | module_exit(fini); | 318 | module_exit(fini); |
246 | 319 | ||
247 | MODULE_LICENSE("GPL"); | 320 | MODULE_LICENSE("GPL"); |
248 | MODULE_DESCRIPTION("TEA & XTEA Cryptographic Algorithms"); | 321 | MODULE_DESCRIPTION("TEA, XTEA & XETA Cryptographic Algorithms"); |
diff --git a/drivers/atm/zatm.c b/drivers/atm/zatm.c index c4b75ecf9460..55959e4d1cb7 100644 --- a/drivers/atm/zatm.c +++ b/drivers/atm/zatm.c | |||
@@ -417,9 +417,9 @@ printk("dummy: 0x%08lx, 0x%08lx\n",dummy[0],dummy[1]); | |||
417 | chan = (here[3] & uPD98401_AAL5_CHAN) >> | 417 | chan = (here[3] & uPD98401_AAL5_CHAN) >> |
418 | uPD98401_AAL5_CHAN_SHIFT; | 418 | uPD98401_AAL5_CHAN_SHIFT; |
419 | if (chan < zatm_dev->chans && zatm_dev->rx_map[chan]) { | 419 | if (chan < zatm_dev->chans && zatm_dev->rx_map[chan]) { |
420 | int pos = ZATM_VCC(vcc)->pool; | 420 | int pos; |
421 | |||
422 | vcc = zatm_dev->rx_map[chan]; | 421 | vcc = zatm_dev->rx_map[chan]; |
422 | pos = ZATM_VCC(vcc)->pool; | ||
423 | if (skb == zatm_dev->last_free[pos]) | 423 | if (skb == zatm_dev->last_free[pos]) |
424 | zatm_dev->last_free[pos] = NULL; | 424 | zatm_dev->last_free[pos] = NULL; |
425 | skb_unlink(skb, zatm_dev->pool + pos); | 425 | skb_unlink(skb, zatm_dev->pool + pos); |
diff --git a/drivers/base/node.c b/drivers/base/node.c index 904b27caf697..16c513aa4d48 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c | |||
@@ -39,13 +39,25 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
39 | int n; | 39 | int n; |
40 | int nid = dev->id; | 40 | int nid = dev->id; |
41 | struct sysinfo i; | 41 | struct sysinfo i; |
42 | struct page_state ps; | ||
42 | unsigned long inactive; | 43 | unsigned long inactive; |
43 | unsigned long active; | 44 | unsigned long active; |
44 | unsigned long free; | 45 | unsigned long free; |
45 | 46 | ||
46 | si_meminfo_node(&i, nid); | 47 | si_meminfo_node(&i, nid); |
48 | get_page_state_node(&ps, nid); | ||
47 | __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); | 49 | __get_zone_counts(&active, &inactive, &free, NODE_DATA(nid)); |
48 | 50 | ||
51 | /* Check for negative values in these approximate counters */ | ||
52 | if ((long)ps.nr_dirty < 0) | ||
53 | ps.nr_dirty = 0; | ||
54 | if ((long)ps.nr_writeback < 0) | ||
55 | ps.nr_writeback = 0; | ||
56 | if ((long)ps.nr_mapped < 0) | ||
57 | ps.nr_mapped = 0; | ||
58 | if ((long)ps.nr_slab < 0) | ||
59 | ps.nr_slab = 0; | ||
60 | |||
49 | n = sprintf(buf, "\n" | 61 | n = sprintf(buf, "\n" |
50 | "Node %d MemTotal: %8lu kB\n" | 62 | "Node %d MemTotal: %8lu kB\n" |
51 | "Node %d MemFree: %8lu kB\n" | 63 | "Node %d MemFree: %8lu kB\n" |
@@ -55,7 +67,11 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
55 | "Node %d HighTotal: %8lu kB\n" | 67 | "Node %d HighTotal: %8lu kB\n" |
56 | "Node %d HighFree: %8lu kB\n" | 68 | "Node %d HighFree: %8lu kB\n" |
57 | "Node %d LowTotal: %8lu kB\n" | 69 | "Node %d LowTotal: %8lu kB\n" |
58 | "Node %d LowFree: %8lu kB\n", | 70 | "Node %d LowFree: %8lu kB\n" |
71 | "Node %d Dirty: %8lu kB\n" | ||
72 | "Node %d Writeback: %8lu kB\n" | ||
73 | "Node %d Mapped: %8lu kB\n" | ||
74 | "Node %d Slab: %8lu kB\n", | ||
59 | nid, K(i.totalram), | 75 | nid, K(i.totalram), |
60 | nid, K(i.freeram), | 76 | nid, K(i.freeram), |
61 | nid, K(i.totalram - i.freeram), | 77 | nid, K(i.totalram - i.freeram), |
@@ -64,7 +80,11 @@ static ssize_t node_read_meminfo(struct sys_device * dev, char * buf) | |||
64 | nid, K(i.totalhigh), | 80 | nid, K(i.totalhigh), |
65 | nid, K(i.freehigh), | 81 | nid, K(i.freehigh), |
66 | nid, K(i.totalram - i.totalhigh), | 82 | nid, K(i.totalram - i.totalhigh), |
67 | nid, K(i.freeram - i.freehigh)); | 83 | nid, K(i.freeram - i.freehigh), |
84 | nid, K(ps.nr_dirty), | ||
85 | nid, K(ps.nr_writeback), | ||
86 | nid, K(ps.nr_mapped), | ||
87 | nid, K(ps.nr_slab)); | ||
68 | n += hugetlb_report_node_meminfo(nid, buf + n); | 88 | n += hugetlb_report_node_meminfo(nid, buf + n); |
69 | return n; | 89 | return n; |
70 | } | 90 | } |
diff --git a/drivers/base/power/resume.c b/drivers/base/power/resume.c index bdd96b03b885..0a7aa07b9a2a 100644 --- a/drivers/base/power/resume.c +++ b/drivers/base/power/resume.c | |||
@@ -26,11 +26,11 @@ int resume_device(struct device * dev) | |||
26 | 26 | ||
27 | down(&dev->sem); | 27 | down(&dev->sem); |
28 | if (dev->power.pm_parent | 28 | if (dev->power.pm_parent |
29 | && dev->power.pm_parent->power.power_state) { | 29 | && dev->power.pm_parent->power.power_state.event) { |
30 | dev_err(dev, "PM: resume from %d, parent %s still %d\n", | 30 | dev_err(dev, "PM: resume from %d, parent %s still %d\n", |
31 | dev->power.power_state, | 31 | dev->power.power_state.event, |
32 | dev->power.pm_parent->bus_id, | 32 | dev->power.pm_parent->bus_id, |
33 | dev->power.pm_parent->power.power_state); | 33 | dev->power.pm_parent->power.power_state.event); |
34 | } | 34 | } |
35 | if (dev->bus && dev->bus->resume) { | 35 | if (dev->bus && dev->bus->resume) { |
36 | dev_dbg(dev,"resuming\n"); | 36 | dev_dbg(dev,"resuming\n"); |
@@ -54,7 +54,7 @@ void dpm_resume(void) | |||
54 | list_add_tail(entry, &dpm_active); | 54 | list_add_tail(entry, &dpm_active); |
55 | 55 | ||
56 | up(&dpm_list_sem); | 56 | up(&dpm_list_sem); |
57 | if (!dev->power.prev_state) | 57 | if (!dev->power.prev_state.event) |
58 | resume_device(dev); | 58 | resume_device(dev); |
59 | down(&dpm_list_sem); | 59 | down(&dpm_list_sem); |
60 | put_device(dev); | 60 | put_device(dev); |
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 325962d80191..e8f0519f5dfa 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -13,10 +13,10 @@ | |||
13 | static void runtime_resume(struct device * dev) | 13 | static void runtime_resume(struct device * dev) |
14 | { | 14 | { |
15 | dev_dbg(dev, "resuming\n"); | 15 | dev_dbg(dev, "resuming\n"); |
16 | if (!dev->power.power_state) | 16 | if (!dev->power.power_state.event) |
17 | return; | 17 | return; |
18 | if (!resume_device(dev)) | 18 | if (!resume_device(dev)) |
19 | dev->power.power_state = 0; | 19 | dev->power.power_state = PMSG_ON; |
20 | } | 20 | } |
21 | 21 | ||
22 | 22 | ||
@@ -49,10 +49,10 @@ int dpm_runtime_suspend(struct device * dev, pm_message_t state) | |||
49 | int error = 0; | 49 | int error = 0; |
50 | 50 | ||
51 | down(&dpm_sem); | 51 | down(&dpm_sem); |
52 | if (dev->power.power_state == state) | 52 | if (dev->power.power_state.event == state.event) |
53 | goto Done; | 53 | goto Done; |
54 | 54 | ||
55 | if (dev->power.power_state) | 55 | if (dev->power.power_state.event) |
56 | runtime_resume(dev); | 56 | runtime_resume(dev); |
57 | 57 | ||
58 | if (!(error = suspend_device(dev, state))) | 58 | if (!(error = suspend_device(dev, state))) |
diff --git a/drivers/base/power/suspend.c b/drivers/base/power/suspend.c index 2ccee3763acf..50501764d050 100644 --- a/drivers/base/power/suspend.c +++ b/drivers/base/power/suspend.c | |||
@@ -40,22 +40,22 @@ int suspend_device(struct device * dev, pm_message_t state) | |||
40 | int error = 0; | 40 | int error = 0; |
41 | 41 | ||
42 | down(&dev->sem); | 42 | down(&dev->sem); |
43 | if (dev->power.power_state) { | 43 | if (dev->power.power_state.event) { |
44 | dev_dbg(dev, "PM: suspend %d-->%d\n", | 44 | dev_dbg(dev, "PM: suspend %d-->%d\n", |
45 | dev->power.power_state, state); | 45 | dev->power.power_state.event, state.event); |
46 | } | 46 | } |
47 | if (dev->power.pm_parent | 47 | if (dev->power.pm_parent |
48 | && dev->power.pm_parent->power.power_state) { | 48 | && dev->power.pm_parent->power.power_state.event) { |
49 | dev_err(dev, | 49 | dev_err(dev, |
50 | "PM: suspend %d->%d, parent %s already %d\n", | 50 | "PM: suspend %d->%d, parent %s already %d\n", |
51 | dev->power.power_state, state, | 51 | dev->power.power_state.event, state.event, |
52 | dev->power.pm_parent->bus_id, | 52 | dev->power.pm_parent->bus_id, |
53 | dev->power.pm_parent->power.power_state); | 53 | dev->power.pm_parent->power.power_state.event); |
54 | } | 54 | } |
55 | 55 | ||
56 | dev->power.prev_state = dev->power.power_state; | 56 | dev->power.prev_state = dev->power.power_state; |
57 | 57 | ||
58 | if (dev->bus && dev->bus->suspend && !dev->power.power_state) { | 58 | if (dev->bus && dev->bus->suspend && !dev->power.power_state.event) { |
59 | dev_dbg(dev, "suspending\n"); | 59 | dev_dbg(dev, "suspending\n"); |
60 | error = dev->bus->suspend(dev, state); | 60 | error = dev->bus->suspend(dev, state); |
61 | } | 61 | } |
diff --git a/drivers/base/power/sysfs.c b/drivers/base/power/sysfs.c index f82b3df9545f..8d04fb435c17 100644 --- a/drivers/base/power/sysfs.c +++ b/drivers/base/power/sysfs.c | |||
@@ -26,19 +26,19 @@ | |||
26 | 26 | ||
27 | static ssize_t state_show(struct device * dev, struct device_attribute *attr, char * buf) | 27 | static ssize_t state_show(struct device * dev, struct device_attribute *attr, char * buf) |
28 | { | 28 | { |
29 | return sprintf(buf, "%u\n", dev->power.power_state); | 29 | return sprintf(buf, "%u\n", dev->power.power_state.event); |
30 | } | 30 | } |
31 | 31 | ||
32 | static ssize_t state_store(struct device * dev, struct device_attribute *attr, const char * buf, size_t n) | 32 | static ssize_t state_store(struct device * dev, struct device_attribute *attr, const char * buf, size_t n) |
33 | { | 33 | { |
34 | u32 state; | 34 | pm_message_t state; |
35 | char * rest; | 35 | char * rest; |
36 | int error = 0; | 36 | int error = 0; |
37 | 37 | ||
38 | state = simple_strtoul(buf, &rest, 10); | 38 | state.event = simple_strtoul(buf, &rest, 10); |
39 | if (*rest) | 39 | if (*rest) |
40 | return -EINVAL; | 40 | return -EINVAL; |
41 | if (state) | 41 | if (state.event) |
42 | error = dpm_runtime_suspend(dev, state); | 42 | error = dpm_runtime_suspend(dev, state); |
43 | else | 43 | else |
44 | dpm_runtime_resume(dev); | 44 | dpm_runtime_resume(dev); |
diff --git a/drivers/block/Kconfig b/drivers/block/Kconfig index b594768b0241..879036d4b30b 100644 --- a/drivers/block/Kconfig +++ b/drivers/block/Kconfig | |||
@@ -455,7 +455,7 @@ config INITRAMFS_ROOT_GID | |||
455 | #for instance. | 455 | #for instance. |
456 | config LBD | 456 | config LBD |
457 | bool "Support for Large Block Devices" | 457 | bool "Support for Large Block Devices" |
458 | depends on X86 || MIPS32 || PPC32 || ARCH_S390_31 || SUPERH || UML | 458 | depends on X86 || (MIPS && 32BIT) || PPC32 || ARCH_S390_31 || SUPERH || UML |
459 | help | 459 | help |
460 | Say Y here if you want to attach large (bigger than 2TB) discs to | 460 | Say Y here if you want to attach large (bigger than 2TB) discs to |
461 | your machine, or if you want to have a raid or loopback device | 461 | your machine, or if you want to have a raid or loopback device |
diff --git a/drivers/block/cryptoloop.c b/drivers/block/cryptoloop.c index 5be6f998d8c5..3d4261c39f16 100644 --- a/drivers/block/cryptoloop.c +++ b/drivers/block/cryptoloop.c | |||
@@ -57,9 +57,11 @@ cryptoloop_init(struct loop_device *lo, const struct loop_info64 *info) | |||
57 | mode = strsep(&cmsp, "-"); | 57 | mode = strsep(&cmsp, "-"); |
58 | 58 | ||
59 | if (mode == NULL || strcmp(mode, "cbc") == 0) | 59 | if (mode == NULL || strcmp(mode, "cbc") == 0) |
60 | tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_CBC); | 60 | tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_CBC | |
61 | CRYPTO_TFM_REQ_MAY_SLEEP); | ||
61 | else if (strcmp(mode, "ecb") == 0) | 62 | else if (strcmp(mode, "ecb") == 0) |
62 | tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_ECB); | 63 | tfm = crypto_alloc_tfm(cipher, CRYPTO_TFM_MODE_ECB | |
64 | CRYPTO_TFM_REQ_MAY_SLEEP); | ||
63 | if (tfm == NULL) | 65 | if (tfm == NULL) |
64 | return -EINVAL; | 66 | return -EINVAL; |
65 | 67 | ||
diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 7333b41d4224..df5f2b0e0750 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig | |||
@@ -175,7 +175,7 @@ config MOXA_INTELLIO | |||
175 | 175 | ||
176 | config MOXA_SMARTIO | 176 | config MOXA_SMARTIO |
177 | tristate "Moxa SmartIO support" | 177 | tristate "Moxa SmartIO support" |
178 | depends on SERIAL_NONSTANDARD | 178 | depends on SERIAL_NONSTANDARD && (BROKEN || !SPARC32) |
179 | help | 179 | help |
180 | Say Y here if you have a Moxa SmartIO multiport serial card. | 180 | Say Y here if you have a Moxa SmartIO multiport serial card. |
181 | 181 | ||
@@ -842,8 +842,7 @@ config SONYPI | |||
842 | 842 | ||
843 | config TANBAC_TB0219 | 843 | config TANBAC_TB0219 |
844 | tristate "TANBAC TB0219 base board support" | 844 | tristate "TANBAC TB0219 base board support" |
845 | depends TANBAC_TB0229 | 845 | depends TANBAC_TB022X |
846 | |||
847 | 846 | ||
848 | menu "Ftape, the floppy tape device driver" | 847 | menu "Ftape, the floppy tape device driver" |
849 | 848 | ||
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 95f7046ff059..79e490ef2cf2 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -339,7 +339,7 @@ static int __init moxa_init(void) | |||
339 | 339 | ||
340 | init_MUTEX(&moxaBuffSem); | 340 | init_MUTEX(&moxaBuffSem); |
341 | moxaDriver->owner = THIS_MODULE; | 341 | moxaDriver->owner = THIS_MODULE; |
342 | moxaDriver->name = "ttya"; | 342 | moxaDriver->name = "ttyMX"; |
343 | moxaDriver->devfs_name = "tts/a"; | 343 | moxaDriver->devfs_name = "tts/a"; |
344 | moxaDriver->major = ttymajor; | 344 | moxaDriver->major = ttymajor; |
345 | moxaDriver->minor_start = 0; | 345 | moxaDriver->minor_start = 0; |
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c index dc8c540391fd..939e51e119e6 100644 --- a/drivers/char/tpm/tpm_infineon.c +++ b/drivers/char/tpm/tpm_infineon.c | |||
@@ -14,7 +14,6 @@ | |||
14 | * License. | 14 | * License. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <acpi/acpi_bus.h> | ||
18 | #include <linux/pnp.h> | 17 | #include <linux/pnp.h> |
19 | #include "tpm.h" | 18 | #include "tpm.h" |
20 | 19 | ||
@@ -29,9 +28,10 @@ | |||
29 | #define TPM_MAX_TRIES 5000 | 28 | #define TPM_MAX_TRIES 5000 |
30 | #define TPM_INFINEON_DEV_VEN_VALUE 0x15D1 | 29 | #define TPM_INFINEON_DEV_VEN_VALUE 0x15D1 |
31 | 30 | ||
32 | /* These values will be filled after ACPI-call */ | 31 | /* These values will be filled after PnP-call */ |
33 | static int TPM_INF_DATA = 0; | 32 | static int TPM_INF_DATA = 0; |
34 | static int TPM_INF_ADDR = 0; | 33 | static int TPM_INF_ADDR = 0; |
34 | static int pnp_registered = 0; | ||
35 | 35 | ||
36 | /* TPM header definitions */ | 36 | /* TPM header definitions */ |
37 | enum infineon_tpm_header { | 37 | enum infineon_tpm_header { |
@@ -356,24 +356,26 @@ static const struct pnp_device_id tpm_pnp_tbl[] = { | |||
356 | {"IFX0102", 0}, | 356 | {"IFX0102", 0}, |
357 | {"", 0} | 357 | {"", 0} |
358 | }; | 358 | }; |
359 | MODULE_DEVICE_TABLE(pnp, tpm_pnp_tbl); | ||
359 | 360 | ||
360 | static int __devinit tpm_inf_acpi_probe(struct pnp_dev *dev, | 361 | static int __devinit tpm_inf_pnp_probe(struct pnp_dev *dev, |
361 | const struct pnp_device_id *dev_id) | 362 | const struct pnp_device_id *dev_id) |
362 | { | 363 | { |
363 | TPM_INF_ADDR = (pnp_port_start(dev, 0) & 0xff); | 364 | if (pnp_port_valid(dev, 0)) { |
364 | TPM_INF_DATA = ((TPM_INF_ADDR + 1) & 0xff); | 365 | TPM_INF_ADDR = (pnp_port_start(dev, 0) & 0xff); |
365 | tpm_inf.base = pnp_port_start(dev, 1); | 366 | TPM_INF_DATA = ((TPM_INF_ADDR + 1) & 0xff); |
366 | dev_info(&dev->dev, "Found %s with ID %s\n", | 367 | tpm_inf.base = pnp_port_start(dev, 1); |
367 | dev->name, dev_id->id); | 368 | dev_info(&dev->dev, "Found %s with ID %s\n", |
368 | if (!((tpm_inf.base >> 8) & 0xff)) | 369 | dev->name, dev_id->id); |
369 | tpm_inf.base = 0; | 370 | return 0; |
370 | return 0; | 371 | } |
372 | return -ENODEV; | ||
371 | } | 373 | } |
372 | 374 | ||
373 | static struct pnp_driver tpm_inf_pnp = { | 375 | static struct pnp_driver tpm_inf_pnp = { |
374 | .name = "tpm_inf_pnp", | 376 | .name = "tpm_inf_pnp", |
375 | .id_table = tpm_pnp_tbl, | 377 | .id_table = tpm_pnp_tbl, |
376 | .probe = tpm_inf_acpi_probe, | 378 | .probe = tpm_inf_pnp_probe, |
377 | }; | 379 | }; |
378 | 380 | ||
379 | static int __devinit tpm_inf_probe(struct pci_dev *pci_dev, | 381 | static int __devinit tpm_inf_probe(struct pci_dev *pci_dev, |
@@ -386,19 +388,30 @@ static int __devinit tpm_inf_probe(struct pci_dev *pci_dev, | |||
386 | int productid[2]; | 388 | int productid[2]; |
387 | char chipname[20]; | 389 | char chipname[20]; |
388 | 390 | ||
389 | if (pci_enable_device(pci_dev)) | 391 | rc = pci_enable_device(pci_dev); |
390 | return -EIO; | 392 | if (rc) |
393 | return rc; | ||
391 | 394 | ||
392 | dev_info(&pci_dev->dev, "LPC-bus found at 0x%x\n", pci_id->device); | 395 | dev_info(&pci_dev->dev, "LPC-bus found at 0x%x\n", pci_id->device); |
393 | 396 | ||
394 | /* read IO-ports from ACPI */ | 397 | /* read IO-ports from PnP */ |
395 | pnp_register_driver(&tpm_inf_pnp); | 398 | rc = pnp_register_driver(&tpm_inf_pnp); |
396 | pnp_unregister_driver(&tpm_inf_pnp); | 399 | if (rc < 0) { |
400 | dev_err(&pci_dev->dev, | ||
401 | "Error %x from pnp_register_driver!\n",rc); | ||
402 | goto error2; | ||
403 | } | ||
404 | if (!rc) { | ||
405 | dev_info(&pci_dev->dev, "No Infineon TPM found!\n"); | ||
406 | goto error; | ||
407 | } else { | ||
408 | pnp_registered = 1; | ||
409 | } | ||
397 | 410 | ||
398 | /* Make sure, we have received valid config ports */ | 411 | /* Make sure, we have received valid config ports */ |
399 | if (!TPM_INF_ADDR) { | 412 | if (!TPM_INF_ADDR) { |
400 | pci_disable_device(pci_dev); | 413 | dev_err(&pci_dev->dev, "No valid IO-ports received!\n"); |
401 | return -EIO; | 414 | goto error; |
402 | } | 415 | } |
403 | 416 | ||
404 | /* query chip for its vendor, its version number a.s.o. */ | 417 | /* query chip for its vendor, its version number a.s.o. */ |
@@ -418,23 +431,21 @@ static int __devinit tpm_inf_probe(struct pci_dev *pci_dev, | |||
418 | 431 | ||
419 | switch ((productid[0] << 8) | productid[1]) { | 432 | switch ((productid[0] << 8) | productid[1]) { |
420 | case 6: | 433 | case 6: |
421 | sprintf(chipname, " (SLD 9630 TT 1.1)"); | 434 | snprintf(chipname, sizeof(chipname), " (SLD 9630 TT 1.1)"); |
422 | break; | 435 | break; |
423 | case 11: | 436 | case 11: |
424 | sprintf(chipname, " (SLB 9635 TT 1.2)"); | 437 | snprintf(chipname, sizeof(chipname), " (SLB 9635 TT 1.2)"); |
425 | break; | 438 | break; |
426 | default: | 439 | default: |
427 | sprintf(chipname, " (unknown chip)"); | 440 | snprintf(chipname, sizeof(chipname), " (unknown chip)"); |
428 | break; | 441 | break; |
429 | } | 442 | } |
430 | chipname[19] = 0; | ||
431 | 443 | ||
432 | if ((vendorid[0] << 8 | vendorid[1]) == (TPM_INFINEON_DEV_VEN_VALUE)) { | 444 | if ((vendorid[0] << 8 | vendorid[1]) == (TPM_INFINEON_DEV_VEN_VALUE)) { |
433 | 445 | ||
434 | if (tpm_inf.base == 0) { | 446 | if (tpm_inf.base == 0) { |
435 | dev_err(&pci_dev->dev, "No IO-ports found!\n"); | 447 | dev_err(&pci_dev->dev, "No IO-ports found!\n"); |
436 | pci_disable_device(pci_dev); | 448 | goto error; |
437 | return -EIO; | ||
438 | } | 449 | } |
439 | /* configure TPM with IO-ports */ | 450 | /* configure TPM with IO-ports */ |
440 | outb(IOLIMH, TPM_INF_ADDR); | 451 | outb(IOLIMH, TPM_INF_ADDR); |
@@ -452,8 +463,7 @@ static int __devinit tpm_inf_probe(struct pci_dev *pci_dev, | |||
452 | dev_err(&pci_dev->dev, | 463 | dev_err(&pci_dev->dev, |
453 | "Could not set IO-ports to %04x\n", | 464 | "Could not set IO-ports to %04x\n", |
454 | tpm_inf.base); | 465 | tpm_inf.base); |
455 | pci_disable_device(pci_dev); | 466 | goto error; |
456 | return -EIO; | ||
457 | } | 467 | } |
458 | 468 | ||
459 | /* activate register */ | 469 | /* activate register */ |
@@ -479,14 +489,16 @@ static int __devinit tpm_inf_probe(struct pci_dev *pci_dev, | |||
479 | productid[0], productid[1], chipname); | 489 | productid[0], productid[1], chipname); |
480 | 490 | ||
481 | rc = tpm_register_hardware(pci_dev, &tpm_inf); | 491 | rc = tpm_register_hardware(pci_dev, &tpm_inf); |
482 | if (rc < 0) { | 492 | if (rc < 0) |
483 | pci_disable_device(pci_dev); | 493 | goto error; |
484 | return -ENODEV; | ||
485 | } | ||
486 | return 0; | 494 | return 0; |
487 | } else { | 495 | } else { |
488 | dev_info(&pci_dev->dev, "No Infineon TPM found!\n"); | 496 | dev_info(&pci_dev->dev, "No Infineon TPM found!\n"); |
497 | error: | ||
498 | pnp_unregister_driver(&tpm_inf_pnp); | ||
499 | error2: | ||
489 | pci_disable_device(pci_dev); | 500 | pci_disable_device(pci_dev); |
501 | pnp_registered = 0; | ||
490 | return -ENODEV; | 502 | return -ENODEV; |
491 | } | 503 | } |
492 | } | 504 | } |
@@ -521,6 +533,8 @@ static int __init init_inf(void) | |||
521 | 533 | ||
522 | static void __exit cleanup_inf(void) | 534 | static void __exit cleanup_inf(void) |
523 | { | 535 | { |
536 | if (pnp_registered) | ||
537 | pnp_unregister_driver(&tpm_inf_pnp); | ||
524 | pci_unregister_driver(&inf_pci_driver); | 538 | pci_unregister_driver(&inf_pci_driver); |
525 | } | 539 | } |
526 | 540 | ||
diff --git a/drivers/char/watchdog/Kconfig b/drivers/char/watchdog/Kconfig index f4bf6c399010..c3898afce3ae 100644 --- a/drivers/char/watchdog/Kconfig +++ b/drivers/char/watchdog/Kconfig | |||
@@ -84,17 +84,6 @@ config 977_WATCHDOG | |||
84 | 84 | ||
85 | Not sure? It's safe to say N. | 85 | Not sure? It's safe to say N. |
86 | 86 | ||
87 | config IXP2000_WATCHDOG | ||
88 | tristate "IXP2000 Watchdog" | ||
89 | depends on WATCHDOG && ARCH_IXP2000 | ||
90 | help | ||
91 | Say Y here if to include support for the watchdog timer | ||
92 | in the Intel IXP2000(2400, 2800, 2850) network processors. | ||
93 | This driver can be built as a module by choosing M. The module | ||
94 | will be called ixp2000_wdt. | ||
95 | |||
96 | Say N if you are unsure. | ||
97 | |||
98 | config IXP4XX_WATCHDOG | 87 | config IXP4XX_WATCHDOG |
99 | tristate "IXP4xx Watchdog" | 88 | tristate "IXP4xx Watchdog" |
100 | depends on WATCHDOG && ARCH_IXP4XX | 89 | depends on WATCHDOG && ARCH_IXP4XX |
@@ -111,6 +100,17 @@ config IXP4XX_WATCHDOG | |||
111 | 100 | ||
112 | Say N if you are unsure. | 101 | Say N if you are unsure. |
113 | 102 | ||
103 | config IXP2000_WATCHDOG | ||
104 | tristate "IXP2000 Watchdog" | ||
105 | depends on WATCHDOG && ARCH_IXP2000 | ||
106 | help | ||
107 | Say Y here if to include support for the watchdog timer | ||
108 | in the Intel IXP2000(2400, 2800, 2850) network processors. | ||
109 | This driver can be built as a module by choosing M. The module | ||
110 | will be called ixp2000_wdt. | ||
111 | |||
112 | Say N if you are unsure. | ||
113 | |||
114 | config S3C2410_WATCHDOG | 114 | config S3C2410_WATCHDOG |
115 | tristate "S3C2410 Watchdog" | 115 | tristate "S3C2410 Watchdog" |
116 | depends on WATCHDOG && ARCH_S3C2410 | 116 | depends on WATCHDOG && ARCH_S3C2410 |
@@ -346,16 +346,12 @@ config 8xx_WDT | |||
346 | tristate "MPC8xx Watchdog Timer" | 346 | tristate "MPC8xx Watchdog Timer" |
347 | depends on WATCHDOG && 8xx | 347 | depends on WATCHDOG && 8xx |
348 | 348 | ||
349 | # PPC64 Architecture | 349 | config BOOKE_WDT |
350 | 350 | tristate "PowerPC Book-E Watchdog Timer" | |
351 | config WATCHDOG_RTAS | 351 | depends on WATCHDOG && (BOOKE || 4xx) |
352 | tristate "RTAS watchdog" | 352 | ---help--- |
353 | depends on WATCHDOG && PPC_RTAS | 353 | Please see Documentation/watchdog/watchdog-api.txt for |
354 | help | 354 | more information. |
355 | This driver adds watchdog support for the RTAS watchdog. | ||
356 | |||
357 | To compile this driver as a module, choose M here. The module | ||
358 | will be called wdrtas. | ||
359 | 355 | ||
360 | # MIPS Architecture | 356 | # MIPS Architecture |
361 | 357 | ||
@@ -425,6 +421,16 @@ config WATCHDOG_RIO | |||
425 | machines. The watchdog timeout period is normally one minute but | 421 | machines. The watchdog timeout period is normally one minute but |
426 | can be changed with a boot-time parameter. | 422 | can be changed with a boot-time parameter. |
427 | 423 | ||
424 | # ppc64 RTAS watchdog | ||
425 | config WATCHDOG_RTAS | ||
426 | tristate "RTAS watchdog" | ||
427 | depends on WATCHDOG && PPC_RTAS | ||
428 | help | ||
429 | This driver adds watchdog support for the RTAS watchdog. | ||
430 | |||
431 | To compile this driver as a module, choose M here. The module | ||
432 | will be called wdrtas. | ||
433 | |||
428 | # | 434 | # |
429 | # ISA-based Watchdog Cards | 435 | # ISA-based Watchdog Cards |
430 | # | 436 | # |
diff --git a/drivers/char/watchdog/Makefile b/drivers/char/watchdog/Makefile index 6f02f4ce4536..cfeac6f10137 100644 --- a/drivers/char/watchdog/Makefile +++ b/drivers/char/watchdog/Makefile | |||
@@ -53,6 +53,7 @@ obj-$(CONFIG_8xx_WDT) += mpc8xx_wdt.o | |||
53 | 53 | ||
54 | # PPC64 Architecture | 54 | # PPC64 Architecture |
55 | obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o | 55 | obj-$(CONFIG_WATCHDOG_RTAS) += wdrtas.o |
56 | obj-$(CONFIG_BOOKE_WDT) += booke_wdt.o | ||
56 | 57 | ||
57 | # MIPS Architecture | 58 | # MIPS Architecture |
58 | obj-$(CONFIG_INDYDOG) += indydog.o | 59 | obj-$(CONFIG_INDYDOG) += indydog.o |
diff --git a/drivers/char/watchdog/booke_wdt.c b/drivers/char/watchdog/booke_wdt.c new file mode 100644 index 000000000000..abc30cca6645 --- /dev/null +++ b/drivers/char/watchdog/booke_wdt.c | |||
@@ -0,0 +1,192 @@ | |||
1 | /* | ||
2 | * drivers/char/watchdog/booke_wdt.c | ||
3 | * | ||
4 | * Watchdog timer for PowerPC Book-E systems | ||
5 | * | ||
6 | * Author: Matthew McClintock | ||
7 | * Maintainer: Kumar Gala <kumar.gala@freescale.com> | ||
8 | * | ||
9 | * Copyright 2005 Freescale Semiconductor Inc. | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | */ | ||
16 | |||
17 | #include <linux/config.h> | ||
18 | #include <linux/module.h> | ||
19 | #include <linux/fs.h> | ||
20 | #include <linux/miscdevice.h> | ||
21 | #include <linux/notifier.h> | ||
22 | #include <linux/watchdog.h> | ||
23 | |||
24 | #include <asm/reg_booke.h> | ||
25 | #include <asm/uaccess.h> | ||
26 | #include <asm/system.h> | ||
27 | |||
28 | /* If the kernel parameter wdt_enable=1, the watchdog will be enabled at boot. | ||
29 | * Also, the wdt_period sets the watchdog timer period timeout. | ||
30 | * For E500 cpus the wdt_period sets which bit changing from 0->1 will | ||
31 | * trigger a watchog timeout. This watchdog timeout will occur 3 times, the | ||
32 | * first time nothing will happen, the second time a watchdog exception will | ||
33 | * occur, and the final time the board will reset. | ||
34 | */ | ||
35 | |||
36 | #ifdef CONFIG_FSL_BOOKE | ||
37 | #define WDT_PERIOD_DEFAULT 63 /* Ex. wdt_period=28 bus=333Mhz , reset=~40sec */ | ||
38 | #else | ||
39 | #define WDT_PERIOD_DEFAULT 4 /* Refer to the PPC40x and PPC4xx manuals */ | ||
40 | #endif /* for timing information */ | ||
41 | |||
42 | u32 booke_wdt_enabled = 0; | ||
43 | u32 booke_wdt_period = WDT_PERIOD_DEFAULT; | ||
44 | |||
45 | #ifdef CONFIG_FSL_BOOKE | ||
46 | #define WDTP(x) ((((63-x)&0x3)<<30)|(((63-x)&0x3c)<<15)) | ||
47 | #else | ||
48 | #define WDTP(x) (TCR_WP(x)) | ||
49 | #endif | ||
50 | |||
51 | /* | ||
52 | * booke_wdt_enable: | ||
53 | */ | ||
54 | static __inline__ void booke_wdt_enable(void) | ||
55 | { | ||
56 | u32 val; | ||
57 | |||
58 | val = mfspr(SPRN_TCR); | ||
59 | val |= (TCR_WIE|TCR_WRC(WRC_CHIP)|WDTP(booke_wdt_period)); | ||
60 | |||
61 | mtspr(SPRN_TCR, val); | ||
62 | } | ||
63 | |||
64 | /* | ||
65 | * booke_wdt_ping: | ||
66 | */ | ||
67 | static __inline__ void booke_wdt_ping(void) | ||
68 | { | ||
69 | mtspr(SPRN_TSR, TSR_ENW|TSR_WIS); | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * booke_wdt_write: | ||
74 | */ | ||
75 | static ssize_t booke_wdt_write (struct file *file, const char *buf, | ||
76 | size_t count, loff_t *ppos) | ||
77 | { | ||
78 | booke_wdt_ping(); | ||
79 | return count; | ||
80 | } | ||
81 | |||
82 | static struct watchdog_info ident = { | ||
83 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, | ||
84 | .firmware_version = 0, | ||
85 | .identity = "PowerPC Book-E Watchdog", | ||
86 | }; | ||
87 | |||
88 | /* | ||
89 | * booke_wdt_ioctl: | ||
90 | */ | ||
91 | static int booke_wdt_ioctl (struct inode *inode, struct file *file, | ||
92 | unsigned int cmd, unsigned long arg) | ||
93 | { | ||
94 | u32 tmp = 0; | ||
95 | |||
96 | switch (cmd) { | ||
97 | case WDIOC_GETSUPPORT: | ||
98 | if (copy_to_user ((struct watchdog_info *) arg, &ident, | ||
99 | sizeof(struct watchdog_info))) | ||
100 | return -EFAULT; | ||
101 | case WDIOC_GETSTATUS: | ||
102 | return put_user(ident.options, (u32 *) arg); | ||
103 | case WDIOC_GETBOOTSTATUS: | ||
104 | /* XXX: something is clearing TSR */ | ||
105 | tmp = mfspr(SPRN_TSR) & TSR_WRS(3); | ||
106 | /* returns 1 if last reset was caused by the WDT */ | ||
107 | return (tmp ? 1 : 0); | ||
108 | case WDIOC_KEEPALIVE: | ||
109 | booke_wdt_ping(); | ||
110 | return 0; | ||
111 | case WDIOC_SETTIMEOUT: | ||
112 | if (get_user(booke_wdt_period, (u32 *) arg)) | ||
113 | return -EFAULT; | ||
114 | mtspr(SPRN_TCR, (mfspr(SPRN_TCR)&~WDTP(0))|WDTP(booke_wdt_period)); | ||
115 | return 0; | ||
116 | case WDIOC_GETTIMEOUT: | ||
117 | return put_user(booke_wdt_period, (u32 *) arg); | ||
118 | case WDIOC_SETOPTIONS: | ||
119 | if (get_user(tmp, (u32 *) arg)) | ||
120 | return -EINVAL; | ||
121 | if (tmp == WDIOS_ENABLECARD) { | ||
122 | booke_wdt_ping(); | ||
123 | break; | ||
124 | } else | ||
125 | return -EINVAL; | ||
126 | return 0; | ||
127 | default: | ||
128 | return -ENOIOCTLCMD; | ||
129 | } | ||
130 | |||
131 | return 0; | ||
132 | } | ||
133 | /* | ||
134 | * booke_wdt_open: | ||
135 | */ | ||
136 | static int booke_wdt_open (struct inode *inode, struct file *file) | ||
137 | { | ||
138 | if (booke_wdt_enabled == 0) { | ||
139 | booke_wdt_enabled = 1; | ||
140 | booke_wdt_enable(); | ||
141 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", | ||
142 | booke_wdt_period); | ||
143 | } | ||
144 | |||
145 | return 0; | ||
146 | } | ||
147 | |||
148 | static struct file_operations booke_wdt_fops = { | ||
149 | .owner = THIS_MODULE, | ||
150 | .llseek = no_llseek, | ||
151 | .write = booke_wdt_write, | ||
152 | .ioctl = booke_wdt_ioctl, | ||
153 | .open = booke_wdt_open, | ||
154 | }; | ||
155 | |||
156 | static struct miscdevice booke_wdt_miscdev = { | ||
157 | .minor = WATCHDOG_MINOR, | ||
158 | .name = "watchdog", | ||
159 | .fops = &booke_wdt_fops, | ||
160 | }; | ||
161 | |||
162 | static void __exit booke_wdt_exit(void) | ||
163 | { | ||
164 | misc_deregister(&booke_wdt_miscdev); | ||
165 | } | ||
166 | |||
167 | /* | ||
168 | * booke_wdt_init: | ||
169 | */ | ||
170 | static int __init booke_wdt_init(void) | ||
171 | { | ||
172 | int ret = 0; | ||
173 | |||
174 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Loaded\n"); | ||
175 | ident.firmware_version = cpu_specs[0].pvr_value; | ||
176 | |||
177 | ret = misc_register(&booke_wdt_miscdev); | ||
178 | if (ret) { | ||
179 | printk (KERN_CRIT "Cannot register miscdev on minor=%d (err=%d)\n", | ||
180 | WATCHDOG_MINOR, ret); | ||
181 | return ret; | ||
182 | } | ||
183 | |||
184 | if (booke_wdt_enabled == 1) { | ||
185 | printk (KERN_INFO "PowerPC Book-E Watchdog Timer Enabled (wdt_period=%d)\n", | ||
186 | booke_wdt_period); | ||
187 | booke_wdt_enable(); | ||
188 | } | ||
189 | |||
190 | return ret; | ||
191 | } | ||
192 | device_initcall(booke_wdt_init); | ||
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index 248e3cc8b352..f174aee659e5 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -150,7 +150,7 @@ static void ide_complete_power_step(ide_drive_t *drive, struct request *rq, u8 s | |||
150 | 150 | ||
151 | switch (rq->pm->pm_step) { | 151 | switch (rq->pm->pm_step) { |
152 | case ide_pm_flush_cache: /* Suspend step 1 (flush cache) complete */ | 152 | case ide_pm_flush_cache: /* Suspend step 1 (flush cache) complete */ |
153 | if (rq->pm->pm_state == 4) | 153 | if (rq->pm->pm_state == PM_EVENT_FREEZE) |
154 | rq->pm->pm_step = ide_pm_state_completed; | 154 | rq->pm->pm_step = ide_pm_state_completed; |
155 | else | 155 | else |
156 | rq->pm->pm_step = idedisk_pm_standby; | 156 | rq->pm->pm_step = idedisk_pm_standby; |
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index dae1bd5b8c3e..73ca8f73917d 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -1229,7 +1229,7 @@ static int generic_ide_suspend(struct device *dev, pm_message_t state) | |||
1229 | rq.special = &args; | 1229 | rq.special = &args; |
1230 | rq.pm = &rqpm; | 1230 | rq.pm = &rqpm; |
1231 | rqpm.pm_step = ide_pm_state_start_suspend; | 1231 | rqpm.pm_step = ide_pm_state_start_suspend; |
1232 | rqpm.pm_state = state; | 1232 | rqpm.pm_state = state.event; |
1233 | 1233 | ||
1234 | return ide_do_drive_cmd(drive, &rq, ide_wait); | 1234 | return ide_do_drive_cmd(drive, &rq, ide_wait); |
1235 | } | 1235 | } |
@@ -1248,7 +1248,7 @@ static int generic_ide_resume(struct device *dev) | |||
1248 | rq.special = &args; | 1248 | rq.special = &args; |
1249 | rq.pm = &rqpm; | 1249 | rq.pm = &rqpm; |
1250 | rqpm.pm_step = ide_pm_state_start_resume; | 1250 | rqpm.pm_step = ide_pm_state_start_resume; |
1251 | rqpm.pm_state = 0; | 1251 | rqpm.pm_state = PM_EVENT_ON; |
1252 | 1252 | ||
1253 | return ide_do_drive_cmd(drive, &rq, ide_head_wait); | 1253 | return ide_do_drive_cmd(drive, &rq, ide_head_wait); |
1254 | } | 1254 | } |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 10592cec6c43..24e21b2838c1 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -350,9 +350,9 @@ static int sc1200_suspend (struct pci_dev *dev, pm_message_t state) | |||
350 | { | 350 | { |
351 | ide_hwif_t *hwif = NULL; | 351 | ide_hwif_t *hwif = NULL; |
352 | 352 | ||
353 | printk("SC1200: suspend(%u)\n", state); | 353 | printk("SC1200: suspend(%u)\n", state.event); |
354 | 354 | ||
355 | if (state == 0) { | 355 | if (state.event == PM_EVENT_ON) { |
356 | // we only save state when going from full power to less | 356 | // we only save state when going from full power to less |
357 | 357 | ||
358 | // | 358 | // |
@@ -386,8 +386,8 @@ static int sc1200_suspend (struct pci_dev *dev, pm_message_t state) | |||
386 | /* You don't need to iterate over disks -- sysfs should have done that for you already */ | 386 | /* You don't need to iterate over disks -- sysfs should have done that for you already */ |
387 | 387 | ||
388 | pci_disable_device(dev); | 388 | pci_disable_device(dev); |
389 | pci_set_power_state(dev,state); | 389 | pci_set_power_state(dev, pci_choose_state(dev, state)); |
390 | dev->current_state = state; | 390 | dev->current_state = state.event; |
391 | return 0; | 391 | return 0; |
392 | } | 392 | } |
393 | 393 | ||
@@ -396,8 +396,8 @@ static int sc1200_resume (struct pci_dev *dev) | |||
396 | ide_hwif_t *hwif = NULL; | 396 | ide_hwif_t *hwif = NULL; |
397 | 397 | ||
398 | printk("SC1200: resume\n"); | 398 | printk("SC1200: resume\n"); |
399 | pci_set_power_state(dev,0); // bring chip back from sleep state | 399 | pci_set_power_state(dev, PCI_D0); // bring chip back from sleep state |
400 | dev->current_state = 0; | 400 | dev->current_state = PM_EVENT_ON; |
401 | pci_enable_device(dev); | 401 | pci_enable_device(dev); |
402 | // | 402 | // |
403 | // loop over all interfaces that are part of this pci device: | 403 | // loop over all interfaces that are part of this pci device: |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index ea65b070a367..87d1f8a1f41e 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1504,12 +1504,12 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
1504 | } | 1504 | } |
1505 | 1505 | ||
1506 | static int | 1506 | static int |
1507 | pmac_ide_macio_suspend(struct macio_dev *mdev, u32 state) | 1507 | pmac_ide_macio_suspend(struct macio_dev *mdev, pm_message_t state) |
1508 | { | 1508 | { |
1509 | ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev); | 1509 | ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev); |
1510 | int rc = 0; | 1510 | int rc = 0; |
1511 | 1511 | ||
1512 | if (state != mdev->ofdev.dev.power.power_state && state >= 2) { | 1512 | if (state.event != mdev->ofdev.dev.power.power_state.event && state.event >= PM_EVENT_SUSPEND) { |
1513 | rc = pmac_ide_do_suspend(hwif); | 1513 | rc = pmac_ide_do_suspend(hwif); |
1514 | if (rc == 0) | 1514 | if (rc == 0) |
1515 | mdev->ofdev.dev.power.power_state = state; | 1515 | mdev->ofdev.dev.power.power_state = state; |
@@ -1524,10 +1524,10 @@ pmac_ide_macio_resume(struct macio_dev *mdev) | |||
1524 | ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev); | 1524 | ide_hwif_t *hwif = (ide_hwif_t *)dev_get_drvdata(&mdev->ofdev.dev); |
1525 | int rc = 0; | 1525 | int rc = 0; |
1526 | 1526 | ||
1527 | if (mdev->ofdev.dev.power.power_state != 0) { | 1527 | if (mdev->ofdev.dev.power.power_state.event != PM_EVENT_ON) { |
1528 | rc = pmac_ide_do_resume(hwif); | 1528 | rc = pmac_ide_do_resume(hwif); |
1529 | if (rc == 0) | 1529 | if (rc == 0) |
1530 | mdev->ofdev.dev.power.power_state = 0; | 1530 | mdev->ofdev.dev.power.power_state = PMSG_ON; |
1531 | } | 1531 | } |
1532 | 1532 | ||
1533 | return rc; | 1533 | return rc; |
@@ -1608,12 +1608,12 @@ pmac_ide_pci_attach(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1608 | } | 1608 | } |
1609 | 1609 | ||
1610 | static int | 1610 | static int |
1611 | pmac_ide_pci_suspend(struct pci_dev *pdev, u32 state) | 1611 | pmac_ide_pci_suspend(struct pci_dev *pdev, pm_message_t state) |
1612 | { | 1612 | { |
1613 | ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev); | 1613 | ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev); |
1614 | int rc = 0; | 1614 | int rc = 0; |
1615 | 1615 | ||
1616 | if (state != pdev->dev.power.power_state && state >= 2) { | 1616 | if (state.event != pdev->dev.power.power_state.event && state.event >= 2) { |
1617 | rc = pmac_ide_do_suspend(hwif); | 1617 | rc = pmac_ide_do_suspend(hwif); |
1618 | if (rc == 0) | 1618 | if (rc == 0) |
1619 | pdev->dev.power.power_state = state; | 1619 | pdev->dev.power.power_state = state; |
@@ -1628,10 +1628,10 @@ pmac_ide_pci_resume(struct pci_dev *pdev) | |||
1628 | ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev); | 1628 | ide_hwif_t *hwif = (ide_hwif_t *)pci_get_drvdata(pdev); |
1629 | int rc = 0; | 1629 | int rc = 0; |
1630 | 1630 | ||
1631 | if (pdev->dev.power.power_state != 0) { | 1631 | if (pdev->dev.power.power_state.event != PM_EVENT_ON) { |
1632 | rc = pmac_ide_do_resume(hwif); | 1632 | rc = pmac_ide_do_resume(hwif); |
1633 | if (rc == 0) | 1633 | if (rc == 0) |
1634 | pdev->dev.power.power_state = 0; | 1634 | pdev->dev.power.power_state = PMSG_ON; |
1635 | } | 1635 | } |
1636 | 1636 | ||
1637 | return rc; | 1637 | return rc; |
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 20e3a165989f..f8b278d3559b 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -160,6 +160,8 @@ struct input_event_compat { | |||
160 | # define COMPAT_TEST IS_IA32_PROCESS(ia64_task_regs(current)) | 160 | # define COMPAT_TEST IS_IA32_PROCESS(ia64_task_regs(current)) |
161 | #elif defined(CONFIG_ARCH_S390) | 161 | #elif defined(CONFIG_ARCH_S390) |
162 | # define COMPAT_TEST test_thread_flag(TIF_31BIT) | 162 | # define COMPAT_TEST test_thread_flag(TIF_31BIT) |
163 | #elif defined(CONFIG_MIPS) | ||
164 | # define COMPAT_TEST (current->thread.mflags & MF_32BIT_ADDR) | ||
163 | #else | 165 | #else |
164 | # define COMPAT_TEST test_thread_flag(TIF_32BIT) | 166 | # define COMPAT_TEST test_thread_flag(TIF_32BIT) |
165 | #endif | 167 | #endif |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 7c16c25fc5d4..c0712a1ea5af 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
@@ -708,7 +708,7 @@ static int __pmac media_bay_suspend(struct macio_dev *mdev, pm_message_t state) | |||
708 | { | 708 | { |
709 | struct media_bay_info *bay = macio_get_drvdata(mdev); | 709 | struct media_bay_info *bay = macio_get_drvdata(mdev); |
710 | 710 | ||
711 | if (state != mdev->ofdev.dev.power.power_state && state == PM_SUSPEND_MEM) { | 711 | if (state.event != mdev->ofdev.dev.power.power_state.event && state.event == PM_EVENT_SUSPEND) { |
712 | down(&bay->lock); | 712 | down(&bay->lock); |
713 | bay->sleeping = 1; | 713 | bay->sleeping = 1; |
714 | set_mb_power(bay, 0); | 714 | set_mb_power(bay, 0); |
@@ -723,8 +723,8 @@ static int __pmac media_bay_resume(struct macio_dev *mdev) | |||
723 | { | 723 | { |
724 | struct media_bay_info *bay = macio_get_drvdata(mdev); | 724 | struct media_bay_info *bay = macio_get_drvdata(mdev); |
725 | 725 | ||
726 | if (mdev->ofdev.dev.power.power_state != 0) { | 726 | if (mdev->ofdev.dev.power.power_state.event != PM_EVENT_ON) { |
727 | mdev->ofdev.dev.power.power_state = 0; | 727 | mdev->ofdev.dev.power.power_state = PMSG_ON; |
728 | 728 | ||
729 | /* We re-enable the bay using it's previous content | 729 | /* We re-enable the bay using it's previous content |
730 | only if it did not change. Note those bozo timings, | 730 | only if it did not change. Note those bozo timings, |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 4a0a0ad2d03c..645a2e5c70ab 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -3065,7 +3065,7 @@ static int pmu_sys_suspended = 0; | |||
3065 | 3065 | ||
3066 | static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state) | 3066 | static int pmu_sys_suspend(struct sys_device *sysdev, pm_message_t state) |
3067 | { | 3067 | { |
3068 | if (state != PM_SUSPEND_DISK || pmu_sys_suspended) | 3068 | if (state.event != PM_EVENT_SUSPEND || pmu_sys_suspended) |
3069 | return 0; | 3069 | return 0; |
3070 | 3070 | ||
3071 | /* Suspend PMU event interrupts */ | 3071 | /* Suspend PMU event interrupts */ |
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index d0a4bab220e5..b82bc3150476 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c | |||
@@ -144,7 +144,7 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, | |||
144 | } | 144 | } |
145 | 145 | ||
146 | /* Hash the cipher key with the given hash algorithm */ | 146 | /* Hash the cipher key with the given hash algorithm */ |
147 | hash_tfm = crypto_alloc_tfm(opts, 0); | 147 | hash_tfm = crypto_alloc_tfm(opts, CRYPTO_TFM_REQ_MAY_SLEEP); |
148 | if (hash_tfm == NULL) { | 148 | if (hash_tfm == NULL) { |
149 | ti->error = PFX "Error initializing ESSIV hash"; | 149 | ti->error = PFX "Error initializing ESSIV hash"; |
150 | return -EINVAL; | 150 | return -EINVAL; |
@@ -172,7 +172,8 @@ static int crypt_iv_essiv_ctr(struct crypt_config *cc, struct dm_target *ti, | |||
172 | 172 | ||
173 | /* Setup the essiv_tfm with the given salt */ | 173 | /* Setup the essiv_tfm with the given salt */ |
174 | essiv_tfm = crypto_alloc_tfm(crypto_tfm_alg_name(cc->tfm), | 174 | essiv_tfm = crypto_alloc_tfm(crypto_tfm_alg_name(cc->tfm), |
175 | CRYPTO_TFM_MODE_ECB); | 175 | CRYPTO_TFM_MODE_ECB | |
176 | CRYPTO_TFM_REQ_MAY_SLEEP); | ||
176 | if (essiv_tfm == NULL) { | 177 | if (essiv_tfm == NULL) { |
177 | ti->error = PFX "Error allocating crypto tfm for ESSIV"; | 178 | ti->error = PFX "Error allocating crypto tfm for ESSIV"; |
178 | kfree(salt); | 179 | kfree(salt); |
@@ -587,7 +588,7 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) | |||
587 | goto bad1; | 588 | goto bad1; |
588 | } | 589 | } |
589 | 590 | ||
590 | tfm = crypto_alloc_tfm(cipher, crypto_flags); | 591 | tfm = crypto_alloc_tfm(cipher, crypto_flags | CRYPTO_TFM_REQ_MAY_SLEEP); |
591 | if (!tfm) { | 592 | if (!tfm) { |
592 | ti->error = PFX "Error allocating crypto tfm"; | 593 | ti->error = PFX "Error allocating crypto tfm"; |
593 | goto bad1; | 594 | goto bad1; |
diff --git a/drivers/media/dvb/cinergyT2/cinergyT2.c b/drivers/media/dvb/cinergyT2/cinergyT2.c index 7d8b3cad350b..9ea5747b1211 100644 --- a/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/drivers/media/dvb/cinergyT2/cinergyT2.c | |||
@@ -888,7 +888,7 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state) | |||
888 | if (down_interruptible(&cinergyt2->sem)) | 888 | if (down_interruptible(&cinergyt2->sem)) |
889 | return -ERESTARTSYS; | 889 | return -ERESTARTSYS; |
890 | 890 | ||
891 | if (state > 0) { /* state 0 seems to mean DEVICE_PM_ON */ | 891 | if (state.event > PM_EVENT_ON) { |
892 | struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf); | 892 | struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf); |
893 | #ifdef ENABLE_RC | 893 | #ifdef ENABLE_RC |
894 | cancel_delayed_work(&cinergyt2->rc_query_work); | 894 | cancel_delayed_work(&cinergyt2->rc_query_work); |
diff --git a/drivers/media/video/Kconfig b/drivers/media/video/Kconfig index 3f5742396096..16c85c081e6e 100644 --- a/drivers/media/video/Kconfig +++ b/drivers/media/video/Kconfig | |||
@@ -254,6 +254,7 @@ config VIDEO_SAA7134_DVB | |||
254 | select VIDEO_BUF_DVB | 254 | select VIDEO_BUF_DVB |
255 | select DVB_MT352 | 255 | select DVB_MT352 |
256 | select DVB_CX22702 | 256 | select DVB_CX22702 |
257 | select DVB_TDA1004X | ||
257 | ---help--- | 258 | ---help--- |
258 | This adds support for DVB cards based on the | 259 | This adds support for DVB cards based on the |
259 | Philips saa7134 chip. | 260 | Philips saa7134 chip. |
diff --git a/drivers/media/video/bttv-driver.c b/drivers/media/video/bttv-driver.c index eee9322ce21b..087efb4dea09 100644 --- a/drivers/media/video/bttv-driver.c +++ b/drivers/media/video/bttv-driver.c | |||
@@ -4047,7 +4047,6 @@ static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state) | |||
4047 | struct bttv_buffer_set idle; | 4047 | struct bttv_buffer_set idle; |
4048 | unsigned long flags; | 4048 | unsigned long flags; |
4049 | 4049 | ||
4050 | dprintk("bttv%d: suspend %d\n", btv->c.nr, state); | ||
4051 | 4050 | ||
4052 | /* stop dma + irqs */ | 4051 | /* stop dma + irqs */ |
4053 | spin_lock_irqsave(&btv->s_lock,flags); | 4052 | spin_lock_irqsave(&btv->s_lock,flags); |
diff --git a/drivers/media/video/msp3400.c b/drivers/media/video/msp3400.c index 62f1b8ddb98b..e956234abf24 100644 --- a/drivers/media/video/msp3400.c +++ b/drivers/media/video/msp3400.c | |||
@@ -1416,7 +1416,7 @@ static int msp_detach(struct i2c_client *client); | |||
1416 | static int msp_probe(struct i2c_adapter *adap); | 1416 | static int msp_probe(struct i2c_adapter *adap); |
1417 | static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg); | 1417 | static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg); |
1418 | 1418 | ||
1419 | static int msp_suspend(struct device * dev, u32 state, u32 level); | 1419 | static int msp_suspend(struct device * dev, pm_message_t state, u32 level); |
1420 | static int msp_resume(struct device * dev, u32 level); | 1420 | static int msp_resume(struct device * dev, u32 level); |
1421 | 1421 | ||
1422 | static void msp_wake_thread(struct i2c_client *client); | 1422 | static void msp_wake_thread(struct i2c_client *client); |
@@ -1817,7 +1817,7 @@ static int msp_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
1817 | return 0; | 1817 | return 0; |
1818 | } | 1818 | } |
1819 | 1819 | ||
1820 | static int msp_suspend(struct device * dev, u32 state, u32 level) | 1820 | static int msp_suspend(struct device * dev, pm_message_t state, u32 level) |
1821 | { | 1821 | { |
1822 | struct i2c_client *c = container_of(dev, struct i2c_client, dev); | 1822 | struct i2c_client *c = container_of(dev, struct i2c_client, dev); |
1823 | 1823 | ||
diff --git a/drivers/media/video/tda9887.c b/drivers/media/video/tda9887.c index 108c3ad7d622..a28a395d6dfe 100644 --- a/drivers/media/video/tda9887.c +++ b/drivers/media/video/tda9887.c | |||
@@ -760,7 +760,7 @@ tda9887_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
760 | return 0; | 760 | return 0; |
761 | } | 761 | } |
762 | 762 | ||
763 | static int tda9887_suspend(struct device * dev, u32 state, u32 level) | 763 | static int tda9887_suspend(struct device * dev, pm_message_t state, u32 level) |
764 | { | 764 | { |
765 | dprintk("tda9887: suspend\n"); | 765 | dprintk("tda9887: suspend\n"); |
766 | return 0; | 766 | return 0; |
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index f0a579827a24..a155e99a263b 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -672,7 +672,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg) | |||
672 | return 0; | 672 | return 0; |
673 | } | 673 | } |
674 | 674 | ||
675 | static int tuner_suspend(struct device *dev, u32 state, u32 level) | 675 | static int tuner_suspend(struct device *dev, pm_message_t state, u32 level) |
676 | { | 676 | { |
677 | struct i2c_client *c = container_of (dev, struct i2c_client, dev); | 677 | struct i2c_client *c = container_of (dev, struct i2c_client, dev); |
678 | struct tuner *t = i2c_get_clientdata (c); | 678 | struct tuner *t = i2c_get_clientdata (c); |
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 3c5904834fe8..0a8165974ba7 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c | |||
@@ -457,6 +457,11 @@ static void mmc_idle_cards(struct mmc_host *host) | |||
457 | { | 457 | { |
458 | struct mmc_command cmd; | 458 | struct mmc_command cmd; |
459 | 459 | ||
460 | host->ios.chip_select = MMC_CS_HIGH; | ||
461 | host->ops->set_ios(host, &host->ios); | ||
462 | |||
463 | mmc_delay(1); | ||
464 | |||
460 | cmd.opcode = MMC_GO_IDLE_STATE; | 465 | cmd.opcode = MMC_GO_IDLE_STATE; |
461 | cmd.arg = 0; | 466 | cmd.arg = 0; |
462 | cmd.flags = MMC_RSP_NONE; | 467 | cmd.flags = MMC_RSP_NONE; |
@@ -464,6 +469,11 @@ static void mmc_idle_cards(struct mmc_host *host) | |||
464 | mmc_wait_for_cmd(host, &cmd, 0); | 469 | mmc_wait_for_cmd(host, &cmd, 0); |
465 | 470 | ||
466 | mmc_delay(1); | 471 | mmc_delay(1); |
472 | |||
473 | host->ios.chip_select = MMC_CS_DONTCARE; | ||
474 | host->ops->set_ios(host, &host->ios); | ||
475 | |||
476 | mmc_delay(1); | ||
467 | } | 477 | } |
468 | 478 | ||
469 | /* | 479 | /* |
@@ -475,6 +485,7 @@ static void mmc_power_up(struct mmc_host *host) | |||
475 | 485 | ||
476 | host->ios.vdd = bit; | 486 | host->ios.vdd = bit; |
477 | host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; | 487 | host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; |
488 | host->ios.chip_select = MMC_CS_DONTCARE; | ||
478 | host->ios.power_mode = MMC_POWER_UP; | 489 | host->ios.power_mode = MMC_POWER_UP; |
479 | host->ops->set_ios(host, &host->ios); | 490 | host->ops->set_ios(host, &host->ios); |
480 | 491 | ||
@@ -492,6 +503,7 @@ static void mmc_power_off(struct mmc_host *host) | |||
492 | host->ios.clock = 0; | 503 | host->ios.clock = 0; |
493 | host->ios.vdd = 0; | 504 | host->ios.vdd = 0; |
494 | host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; | 505 | host->ios.bus_mode = MMC_BUSMODE_OPENDRAIN; |
506 | host->ios.chip_select = MMC_CS_DONTCARE; | ||
495 | host->ios.power_mode = MMC_POWER_OFF; | 507 | host->ios.power_mode = MMC_POWER_OFF; |
496 | host->ops->set_ios(host, &host->ios); | 508 | host->ops->set_ios(host, &host->ios); |
497 | } | 509 | } |
diff --git a/drivers/mmc/wbsd.c b/drivers/mmc/wbsd.c index 402c2d661fb2..08ae22aed9e8 100644 --- a/drivers/mmc/wbsd.c +++ b/drivers/mmc/wbsd.c | |||
@@ -42,7 +42,7 @@ | |||
42 | #include "wbsd.h" | 42 | #include "wbsd.h" |
43 | 43 | ||
44 | #define DRIVER_NAME "wbsd" | 44 | #define DRIVER_NAME "wbsd" |
45 | #define DRIVER_VERSION "1.3" | 45 | #define DRIVER_VERSION "1.4" |
46 | 46 | ||
47 | #ifdef CONFIG_MMC_DEBUG | 47 | #ifdef CONFIG_MMC_DEBUG |
48 | #define DBG(x...) \ | 48 | #define DBG(x...) \ |
@@ -960,8 +960,9 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios) | |||
960 | struct wbsd_host* host = mmc_priv(mmc); | 960 | struct wbsd_host* host = mmc_priv(mmc); |
961 | u8 clk, setup, pwr; | 961 | u8 clk, setup, pwr; |
962 | 962 | ||
963 | DBGF("clock %uHz busmode %u powermode %u Vdd %u\n", | 963 | DBGF("clock %uHz busmode %u powermode %u cs %u Vdd %u\n", |
964 | ios->clock, ios->bus_mode, ios->power_mode, ios->vdd); | 964 | ios->clock, ios->bus_mode, ios->power_mode, ios->chip_select, |
965 | ios->vdd); | ||
965 | 966 | ||
966 | spin_lock_bh(&host->lock); | 967 | spin_lock_bh(&host->lock); |
967 | 968 | ||
@@ -1003,13 +1004,11 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios) | |||
1003 | 1004 | ||
1004 | /* | 1005 | /* |
1005 | * MMC cards need to have pin 1 high during init. | 1006 | * MMC cards need to have pin 1 high during init. |
1006 | * Init time corresponds rather nicely with the bus mode. | ||
1007 | * It wreaks havoc with the card detection though so | 1007 | * It wreaks havoc with the card detection though so |
1008 | * that needs to be disabed. | 1008 | * that needs to be disabled. |
1009 | */ | 1009 | */ |
1010 | setup = wbsd_read_index(host, WBSD_IDX_SETUP); | 1010 | setup = wbsd_read_index(host, WBSD_IDX_SETUP); |
1011 | if ((ios->power_mode == MMC_POWER_ON) && | 1011 | if (ios->chip_select == MMC_CS_HIGH) |
1012 | (ios->bus_mode == MMC_BUSMODE_OPENDRAIN)) | ||
1013 | { | 1012 | { |
1014 | setup |= WBSD_DAT3_H; | 1013 | setup |= WBSD_DAT3_H; |
1015 | host->flags |= WBSD_FIGNORE_DETECT; | 1014 | host->flags |= WBSD_FIGNORE_DETECT; |
@@ -1017,7 +1016,12 @@ static void wbsd_set_ios(struct mmc_host* mmc, struct mmc_ios* ios) | |||
1017 | else | 1016 | else |
1018 | { | 1017 | { |
1019 | setup &= ~WBSD_DAT3_H; | 1018 | setup &= ~WBSD_DAT3_H; |
1020 | host->flags &= ~WBSD_FIGNORE_DETECT; | 1019 | |
1020 | /* | ||
1021 | * We cannot resume card detection immediatly | ||
1022 | * because of capacitance and delays in the chip. | ||
1023 | */ | ||
1024 | mod_timer(&host->ignore_timer, jiffies + HZ/100); | ||
1021 | } | 1025 | } |
1022 | wbsd_write_index(host, WBSD_IDX_SETUP, setup); | 1026 | wbsd_write_index(host, WBSD_IDX_SETUP, setup); |
1023 | 1027 | ||
@@ -1036,6 +1040,31 @@ static struct mmc_host_ops wbsd_ops = { | |||
1036 | \*****************************************************************************/ | 1040 | \*****************************************************************************/ |
1037 | 1041 | ||
1038 | /* | 1042 | /* |
1043 | * Helper function to reset detection ignore | ||
1044 | */ | ||
1045 | |||
1046 | static void wbsd_reset_ignore(unsigned long data) | ||
1047 | { | ||
1048 | struct wbsd_host *host = (struct wbsd_host*)data; | ||
1049 | |||
1050 | BUG_ON(host == NULL); | ||
1051 | |||
1052 | DBG("Resetting card detection ignore\n"); | ||
1053 | |||
1054 | spin_lock_bh(&host->lock); | ||
1055 | |||
1056 | host->flags &= ~WBSD_FIGNORE_DETECT; | ||
1057 | |||
1058 | /* | ||
1059 | * Card status might have changed during the | ||
1060 | * blackout. | ||
1061 | */ | ||
1062 | tasklet_schedule(&host->card_tasklet); | ||
1063 | |||
1064 | spin_unlock_bh(&host->lock); | ||
1065 | } | ||
1066 | |||
1067 | /* | ||
1039 | * Helper function for card detection | 1068 | * Helper function for card detection |
1040 | */ | 1069 | */ |
1041 | static void wbsd_detect_card(unsigned long data) | 1070 | static void wbsd_detect_card(unsigned long data) |
@@ -1097,7 +1126,7 @@ static void wbsd_tasklet_card(unsigned long param) | |||
1097 | * Delay card detection to allow electrical connections | 1126 | * Delay card detection to allow electrical connections |
1098 | * to stabilise. | 1127 | * to stabilise. |
1099 | */ | 1128 | */ |
1100 | mod_timer(&host->timer, jiffies + HZ/2); | 1129 | mod_timer(&host->detect_timer, jiffies + HZ/2); |
1101 | } | 1130 | } |
1102 | 1131 | ||
1103 | spin_unlock(&host->lock); | 1132 | spin_unlock(&host->lock); |
@@ -1124,6 +1153,8 @@ static void wbsd_tasklet_card(unsigned long param) | |||
1124 | 1153 | ||
1125 | mmc_detect_change(host->mmc); | 1154 | mmc_detect_change(host->mmc); |
1126 | } | 1155 | } |
1156 | else | ||
1157 | spin_unlock(&host->lock); | ||
1127 | } | 1158 | } |
1128 | 1159 | ||
1129 | static void wbsd_tasklet_fifo(unsigned long param) | 1160 | static void wbsd_tasklet_fifo(unsigned long param) |
@@ -1328,11 +1359,15 @@ static int __devinit wbsd_alloc_mmc(struct device* dev) | |||
1328 | spin_lock_init(&host->lock); | 1359 | spin_lock_init(&host->lock); |
1329 | 1360 | ||
1330 | /* | 1361 | /* |
1331 | * Set up detection timer | 1362 | * Set up timers |
1332 | */ | 1363 | */ |
1333 | init_timer(&host->timer); | 1364 | init_timer(&host->detect_timer); |
1334 | host->timer.data = (unsigned long)host; | 1365 | host->detect_timer.data = (unsigned long)host; |
1335 | host->timer.function = wbsd_detect_card; | 1366 | host->detect_timer.function = wbsd_detect_card; |
1367 | |||
1368 | init_timer(&host->ignore_timer); | ||
1369 | host->ignore_timer.data = (unsigned long)host; | ||
1370 | host->ignore_timer.function = wbsd_reset_ignore; | ||
1336 | 1371 | ||
1337 | /* | 1372 | /* |
1338 | * Maximum number of segments. Worst case is one sector per segment | 1373 | * Maximum number of segments. Worst case is one sector per segment |
@@ -1370,7 +1405,8 @@ static void __devexit wbsd_free_mmc(struct device* dev) | |||
1370 | host = mmc_priv(mmc); | 1405 | host = mmc_priv(mmc); |
1371 | BUG_ON(host == NULL); | 1406 | BUG_ON(host == NULL); |
1372 | 1407 | ||
1373 | del_timer_sync(&host->timer); | 1408 | del_timer_sync(&host->ignore_timer); |
1409 | del_timer_sync(&host->detect_timer); | ||
1374 | 1410 | ||
1375 | mmc_free_host(mmc); | 1411 | mmc_free_host(mmc); |
1376 | 1412 | ||
diff --git a/drivers/mmc/wbsd.h b/drivers/mmc/wbsd.h index 661a9f6a6e6f..8af43549f5d5 100644 --- a/drivers/mmc/wbsd.h +++ b/drivers/mmc/wbsd.h | |||
@@ -181,5 +181,6 @@ struct wbsd_host | |||
181 | struct tasklet_struct finish_tasklet; | 181 | struct tasklet_struct finish_tasklet; |
182 | struct tasklet_struct block_tasklet; | 182 | struct tasklet_struct block_tasklet; |
183 | 183 | ||
184 | struct timer_list timer; /* Card detection timer */ | 184 | struct timer_list detect_timer; /* Card detection timer */ |
185 | struct timer_list ignore_timer; /* Ignore detection timer */ | ||
185 | }; | 186 | }; |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 7babf6af4e28..55a72c7ad001 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -2004,14 +2004,14 @@ bnx2_init_cpus(struct bnx2 *bp) | |||
2004 | } | 2004 | } |
2005 | 2005 | ||
2006 | static int | 2006 | static int |
2007 | bnx2_set_power_state(struct bnx2 *bp, int state) | 2007 | bnx2_set_power_state(struct bnx2 *bp, pci_power_t state) |
2008 | { | 2008 | { |
2009 | u16 pmcsr; | 2009 | u16 pmcsr; |
2010 | 2010 | ||
2011 | pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr); | 2011 | pci_read_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, &pmcsr); |
2012 | 2012 | ||
2013 | switch (state) { | 2013 | switch (state) { |
2014 | case 0: { | 2014 | case PCI_D0: { |
2015 | u32 val; | 2015 | u32 val; |
2016 | 2016 | ||
2017 | pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, | 2017 | pci_write_config_word(bp->pdev, bp->pm_cap + PCI_PM_CTRL, |
@@ -2032,7 +2032,7 @@ bnx2_set_power_state(struct bnx2 *bp, int state) | |||
2032 | REG_WR(bp, BNX2_RPM_CONFIG, val); | 2032 | REG_WR(bp, BNX2_RPM_CONFIG, val); |
2033 | break; | 2033 | break; |
2034 | } | 2034 | } |
2035 | case 3: { | 2035 | case PCI_D3hot: { |
2036 | int i; | 2036 | int i; |
2037 | u32 val, wol_msg; | 2037 | u32 val, wol_msg; |
2038 | 2038 | ||
@@ -3886,7 +3886,7 @@ bnx2_open(struct net_device *dev) | |||
3886 | struct bnx2 *bp = dev->priv; | 3886 | struct bnx2 *bp = dev->priv; |
3887 | int rc; | 3887 | int rc; |
3888 | 3888 | ||
3889 | bnx2_set_power_state(bp, 0); | 3889 | bnx2_set_power_state(bp, PCI_D0); |
3890 | bnx2_disable_int(bp); | 3890 | bnx2_disable_int(bp); |
3891 | 3891 | ||
3892 | rc = bnx2_alloc_mem(bp); | 3892 | rc = bnx2_alloc_mem(bp); |
@@ -4197,7 +4197,7 @@ bnx2_close(struct net_device *dev) | |||
4197 | bnx2_free_mem(bp); | 4197 | bnx2_free_mem(bp); |
4198 | bp->link_up = 0; | 4198 | bp->link_up = 0; |
4199 | netif_carrier_off(bp->dev); | 4199 | netif_carrier_off(bp->dev); |
4200 | bnx2_set_power_state(bp, 3); | 4200 | bnx2_set_power_state(bp, PCI_D3hot); |
4201 | return 0; | 4201 | return 0; |
4202 | } | 4202 | } |
4203 | 4203 | ||
@@ -5203,7 +5203,7 @@ bnx2_init_board(struct pci_dev *pdev, struct net_device *dev) | |||
5203 | BNX2_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | | 5203 | BNX2_PCICFG_MISC_CONFIG_REG_WINDOW_ENA | |
5204 | BNX2_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP); | 5204 | BNX2_PCICFG_MISC_CONFIG_TARGET_MB_WORD_SWAP); |
5205 | 5205 | ||
5206 | bnx2_set_power_state(bp, 0); | 5206 | bnx2_set_power_state(bp, PCI_D0); |
5207 | 5207 | ||
5208 | bp->chip_id = REG_RD(bp, BNX2_MISC_ID); | 5208 | bp->chip_id = REG_RD(bp, BNX2_MISC_ID); |
5209 | 5209 | ||
@@ -5495,7 +5495,7 @@ bnx2_remove_one(struct pci_dev *pdev) | |||
5495 | } | 5495 | } |
5496 | 5496 | ||
5497 | static int | 5497 | static int |
5498 | bnx2_suspend(struct pci_dev *pdev, u32 state) | 5498 | bnx2_suspend(struct pci_dev *pdev, pm_message_t state) |
5499 | { | 5499 | { |
5500 | struct net_device *dev = pci_get_drvdata(pdev); | 5500 | struct net_device *dev = pci_get_drvdata(pdev); |
5501 | struct bnx2 *bp = dev->priv; | 5501 | struct bnx2 *bp = dev->priv; |
@@ -5513,7 +5513,7 @@ bnx2_suspend(struct pci_dev *pdev, u32 state) | |||
5513 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; | 5513 | reset_code = BNX2_DRV_MSG_CODE_SUSPEND_NO_WOL; |
5514 | bnx2_reset_chip(bp, reset_code); | 5514 | bnx2_reset_chip(bp, reset_code); |
5515 | bnx2_free_skbs(bp); | 5515 | bnx2_free_skbs(bp); |
5516 | bnx2_set_power_state(bp, state); | 5516 | bnx2_set_power_state(bp, pci_choose_state(pdev, state)); |
5517 | return 0; | 5517 | return 0; |
5518 | } | 5518 | } |
5519 | 5519 | ||
@@ -5526,7 +5526,7 @@ bnx2_resume(struct pci_dev *pdev) | |||
5526 | if (!netif_running(dev)) | 5526 | if (!netif_running(dev)) |
5527 | return 0; | 5527 | return 0; |
5528 | 5528 | ||
5529 | bnx2_set_power_state(bp, 0); | 5529 | bnx2_set_power_state(bp, PCI_D0); |
5530 | netif_device_attach(dev); | 5530 | netif_device_attach(dev); |
5531 | bnx2_init_nic(bp); | 5531 | bnx2_init_nic(bp); |
5532 | bnx2_netif_start(bp); | 5532 | bnx2_netif_start(bp); |
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 9b596e0bbf95..7c8a0a22dcd5 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -162,7 +162,7 @@ static void e1000_vlan_rx_add_vid(struct net_device *netdev, uint16_t vid); | |||
162 | static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); | 162 | static void e1000_vlan_rx_kill_vid(struct net_device *netdev, uint16_t vid); |
163 | static void e1000_restore_vlan(struct e1000_adapter *adapter); | 163 | static void e1000_restore_vlan(struct e1000_adapter *adapter); |
164 | 164 | ||
165 | static int e1000_suspend(struct pci_dev *pdev, uint32_t state); | 165 | static int e1000_suspend(struct pci_dev *pdev, pm_message_t state); |
166 | #ifdef CONFIG_PM | 166 | #ifdef CONFIG_PM |
167 | static int e1000_resume(struct pci_dev *pdev); | 167 | static int e1000_resume(struct pci_dev *pdev); |
168 | #endif | 168 | #endif |
@@ -3642,7 +3642,7 @@ e1000_set_spd_dplx(struct e1000_adapter *adapter, uint16_t spddplx) | |||
3642 | } | 3642 | } |
3643 | 3643 | ||
3644 | static int | 3644 | static int |
3645 | e1000_suspend(struct pci_dev *pdev, uint32_t state) | 3645 | e1000_suspend(struct pci_dev *pdev, pm_message_t state) |
3646 | { | 3646 | { |
3647 | struct net_device *netdev = pci_get_drvdata(pdev); | 3647 | struct net_device *netdev = pci_get_drvdata(pdev); |
3648 | struct e1000_adapter *adapter = netdev_priv(netdev); | 3648 | struct e1000_adapter *adapter = netdev_priv(netdev); |
@@ -3726,9 +3726,7 @@ e1000_suspend(struct pci_dev *pdev, uint32_t state) | |||
3726 | } | 3726 | } |
3727 | 3727 | ||
3728 | pci_disable_device(pdev); | 3728 | pci_disable_device(pdev); |
3729 | 3729 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); | |
3730 | state = (state > 0) ? 3 : 0; | ||
3731 | pci_set_power_state(pdev, state); | ||
3732 | 3730 | ||
3733 | return 0; | 3731 | return 0; |
3734 | } | 3732 | } |
@@ -3741,13 +3739,13 @@ e1000_resume(struct pci_dev *pdev) | |||
3741 | struct e1000_adapter *adapter = netdev_priv(netdev); | 3739 | struct e1000_adapter *adapter = netdev_priv(netdev); |
3742 | uint32_t manc, ret_val, swsm; | 3740 | uint32_t manc, ret_val, swsm; |
3743 | 3741 | ||
3744 | pci_set_power_state(pdev, 0); | 3742 | pci_set_power_state(pdev, PCI_D0); |
3745 | pci_restore_state(pdev); | 3743 | pci_restore_state(pdev); |
3746 | ret_val = pci_enable_device(pdev); | 3744 | ret_val = pci_enable_device(pdev); |
3747 | pci_set_master(pdev); | 3745 | pci_set_master(pdev); |
3748 | 3746 | ||
3749 | pci_enable_wake(pdev, 3, 0); | 3747 | pci_enable_wake(pdev, PCI_D3hot, 0); |
3750 | pci_enable_wake(pdev, 4, 0); /* 4 == D3 cold */ | 3748 | pci_enable_wake(pdev, PCI_D3cold, 0); |
3751 | 3749 | ||
3752 | e1000_reset(adapter); | 3750 | e1000_reset(adapter); |
3753 | E1000_WRITE_REG(&adapter->hw, WUS, ~0); | 3751 | E1000_WRITE_REG(&adapter->hw, WUS, ~0); |
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 006e4f575606..6d9de626c967 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -1749,11 +1749,6 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1749 | struct net_device *ndev = pci_get_drvdata(pdev); | 1749 | struct net_device *ndev = pci_get_drvdata(pdev); |
1750 | vlsi_irda_dev_t *idev; | 1750 | vlsi_irda_dev_t *idev; |
1751 | 1751 | ||
1752 | if (state < 1 || state > 3 ) { | ||
1753 | IRDA_ERROR("%s - %s: invalid pm state request: %u\n", | ||
1754 | __FUNCTION__, PCIDEV_NAME(pdev), state); | ||
1755 | return 0; | ||
1756 | } | ||
1757 | if (!ndev) { | 1752 | if (!ndev) { |
1758 | IRDA_ERROR("%s - %s: no netdevice \n", | 1753 | IRDA_ERROR("%s - %s: no netdevice \n", |
1759 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1754 | __FUNCTION__, PCIDEV_NAME(pdev)); |
@@ -1762,12 +1757,12 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1762 | idev = ndev->priv; | 1757 | idev = ndev->priv; |
1763 | down(&idev->sem); | 1758 | down(&idev->sem); |
1764 | if (pdev->current_state != 0) { /* already suspended */ | 1759 | if (pdev->current_state != 0) { /* already suspended */ |
1765 | if (state > pdev->current_state) { /* simply go deeper */ | 1760 | if (state.event > pdev->current_state) { /* simply go deeper */ |
1766 | pci_set_power_state(pdev,state); | 1761 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
1767 | pdev->current_state = state; | 1762 | pdev->current_state = state.event; |
1768 | } | 1763 | } |
1769 | else | 1764 | else |
1770 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state); | 1765 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event); |
1771 | up(&idev->sem); | 1766 | up(&idev->sem); |
1772 | return 0; | 1767 | return 0; |
1773 | } | 1768 | } |
@@ -1781,8 +1776,8 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1781 | idev->new_baud = idev->baud; | 1776 | idev->new_baud = idev->baud; |
1782 | } | 1777 | } |
1783 | 1778 | ||
1784 | pci_set_power_state(pdev,state); | 1779 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
1785 | pdev->current_state = state; | 1780 | pdev->current_state = state.event; |
1786 | idev->resume_ok = 1; | 1781 | idev->resume_ok = 1; |
1787 | up(&idev->sem); | 1782 | up(&idev->sem); |
1788 | return 0; | 1783 | return 0; |
@@ -1807,8 +1802,8 @@ static int vlsi_irda_resume(struct pci_dev *pdev) | |||
1807 | return 0; | 1802 | return 0; |
1808 | } | 1803 | } |
1809 | 1804 | ||
1810 | pci_set_power_state(pdev, 0); | 1805 | pci_set_power_state(pdev, PCI_D0); |
1811 | pdev->current_state = 0; | 1806 | pdev->current_state = PM_EVENT_ON; |
1812 | 1807 | ||
1813 | if (!idev->resume_ok) { | 1808 | if (!idev->resume_ok) { |
1814 | /* should be obsolete now - but used to happen due to: | 1809 | /* should be obsolete now - but used to happen due to: |
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 41f62c0c5fcb..5e81494e9a9a 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -128,7 +128,7 @@ static int mdio_bus_match(struct device *dev, struct device_driver *drv) | |||
128 | /* Suspend and resume. Copied from platform_suspend and | 128 | /* Suspend and resume. Copied from platform_suspend and |
129 | * platform_resume | 129 | * platform_resume |
130 | */ | 130 | */ |
131 | static int mdio_bus_suspend(struct device * dev, u32 state) | 131 | static int mdio_bus_suspend(struct device * dev, pm_message_t state) |
132 | { | 132 | { |
133 | int ret = 0; | 133 | int ret = 0; |
134 | struct device_driver *drv = dev->driver; | 134 | struct device_driver *drv = dev->driver; |
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c index 2608e7a3d214..3f67a42e8503 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -948,6 +948,7 @@ static irqreturn_t gem_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
948 | u32 gem_status = readl(gp->regs + GREG_STAT); | 948 | u32 gem_status = readl(gp->regs + GREG_STAT); |
949 | 949 | ||
950 | if (gem_status == 0) { | 950 | if (gem_status == 0) { |
951 | netif_poll_enable(dev); | ||
951 | spin_unlock_irqrestore(&gp->lock, flags); | 952 | spin_unlock_irqrestore(&gp->lock, flags); |
952 | return IRQ_NONE; | 953 | return IRQ_NONE; |
953 | } | 954 | } |
diff --git a/drivers/net/sungem.h b/drivers/net/sungem.h index 7143fd7cf3f8..ff8ae5f79970 100644 --- a/drivers/net/sungem.h +++ b/drivers/net/sungem.h | |||
@@ -1020,7 +1020,7 @@ struct gem { | |||
1020 | 1020 | ||
1021 | struct gem_init_block *init_block; | 1021 | struct gem_init_block *init_block; |
1022 | struct sk_buff *rx_skbs[RX_RING_SIZE]; | 1022 | struct sk_buff *rx_skbs[RX_RING_SIZE]; |
1023 | struct sk_buff *tx_skbs[RX_RING_SIZE]; | 1023 | struct sk_buff *tx_skbs[TX_RING_SIZE]; |
1024 | dma_addr_t gblock_dvma; | 1024 | dma_addr_t gblock_dvma; |
1025 | 1025 | ||
1026 | struct pci_dev *pdev; | 1026 | struct pci_dev *pdev; |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index af8263a1580e..3faf62310f84 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -66,8 +66,8 @@ | |||
66 | 66 | ||
67 | #define DRV_MODULE_NAME "tg3" | 67 | #define DRV_MODULE_NAME "tg3" |
68 | #define PFX DRV_MODULE_NAME ": " | 68 | #define PFX DRV_MODULE_NAME ": " |
69 | #define DRV_MODULE_VERSION "3.37" | 69 | #define DRV_MODULE_VERSION "3.38" |
70 | #define DRV_MODULE_RELDATE "August 25, 2005" | 70 | #define DRV_MODULE_RELDATE "September 1, 2005" |
71 | 71 | ||
72 | #define TG3_DEF_MAC_MODE 0 | 72 | #define TG3_DEF_MAC_MODE 0 |
73 | #define TG3_DEF_RX_MODE 0 | 73 | #define TG3_DEF_RX_MODE 0 |
@@ -121,12 +121,9 @@ | |||
121 | TG3_RX_RCB_RING_SIZE(tp)) | 121 | TG3_RX_RCB_RING_SIZE(tp)) |
122 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ | 122 | #define TG3_TX_RING_BYTES (sizeof(struct tg3_tx_buffer_desc) * \ |
123 | TG3_TX_RING_SIZE) | 123 | TG3_TX_RING_SIZE) |
124 | #define TX_RING_GAP(TP) \ | ||
125 | (TG3_TX_RING_SIZE - (TP)->tx_pending) | ||
126 | #define TX_BUFFS_AVAIL(TP) \ | 124 | #define TX_BUFFS_AVAIL(TP) \ |
127 | (((TP)->tx_cons <= (TP)->tx_prod) ? \ | 125 | ((TP)->tx_pending - \ |
128 | (TP)->tx_cons + (TP)->tx_pending - (TP)->tx_prod : \ | 126 | (((TP)->tx_prod - (TP)->tx_cons) & (TG3_TX_RING_SIZE - 1))) |
129 | (TP)->tx_cons - (TP)->tx_prod - TX_RING_GAP(TP)) | ||
130 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) | 127 | #define NEXT_TX(N) (((N) + 1) & (TG3_TX_RING_SIZE - 1)) |
131 | 128 | ||
132 | #define RX_PKT_BUF_SZ (1536 + tp->rx_offset + 64) | 129 | #define RX_PKT_BUF_SZ (1536 + tp->rx_offset + 64) |
@@ -2880,9 +2877,13 @@ static void tg3_tx(struct tg3 *tp) | |||
2880 | 2877 | ||
2881 | tp->tx_cons = sw_idx; | 2878 | tp->tx_cons = sw_idx; |
2882 | 2879 | ||
2883 | if (netif_queue_stopped(tp->dev) && | 2880 | if (unlikely(netif_queue_stopped(tp->dev))) { |
2884 | (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH)) | 2881 | spin_lock(&tp->tx_lock); |
2885 | netif_wake_queue(tp->dev); | 2882 | if (netif_queue_stopped(tp->dev) && |
2883 | (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH)) | ||
2884 | netif_wake_queue(tp->dev); | ||
2885 | spin_unlock(&tp->tx_lock); | ||
2886 | } | ||
2886 | } | 2887 | } |
2887 | 2888 | ||
2888 | /* Returns size of skb allocated or < 0 on error. | 2889 | /* Returns size of skb allocated or < 0 on error. |
@@ -3198,9 +3199,7 @@ static int tg3_poll(struct net_device *netdev, int *budget) | |||
3198 | 3199 | ||
3199 | /* run TX completion thread */ | 3200 | /* run TX completion thread */ |
3200 | if (sblk->idx[0].tx_consumer != tp->tx_cons) { | 3201 | if (sblk->idx[0].tx_consumer != tp->tx_cons) { |
3201 | spin_lock(&tp->tx_lock); | ||
3202 | tg3_tx(tp); | 3202 | tg3_tx(tp); |
3203 | spin_unlock(&tp->tx_lock); | ||
3204 | } | 3203 | } |
3205 | 3204 | ||
3206 | /* run RX thread, within the bounds set by NAPI. | 3205 | /* run RX thread, within the bounds set by NAPI. |
@@ -3716,8 +3715,11 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3716 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); | 3715 | tw32_tx_mbox((MAILBOX_SNDHOST_PROD_IDX_0 + TG3_64BIT_REG_LOW), entry); |
3717 | 3716 | ||
3718 | tp->tx_prod = entry; | 3717 | tp->tx_prod = entry; |
3719 | if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) | 3718 | if (TX_BUFFS_AVAIL(tp) <= (MAX_SKB_FRAGS + 1)) { |
3720 | netif_stop_queue(dev); | 3719 | netif_stop_queue(dev); |
3720 | if (TX_BUFFS_AVAIL(tp) > TG3_TX_WAKEUP_THRESH) | ||
3721 | netif_wake_queue(tp->dev); | ||
3722 | } | ||
3721 | 3723 | ||
3722 | out_unlock: | 3724 | out_unlock: |
3723 | mmiowb(); | 3725 | mmiowb(); |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index effab0b9adca..50b8c6754b1e 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -18,6 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * Changes: | 19 | * Changes: |
20 | * | 20 | * |
21 | * Mike Kershaw <dragorn@kismetwireless.net> 2005/08/14 | ||
22 | * Add TUNSETLINK ioctl to set the link encapsulation | ||
23 | * | ||
21 | * Mark Smith <markzzzsmith@yahoo.com.au> | 24 | * Mark Smith <markzzzsmith@yahoo.com.au> |
22 | * Use random_ether_addr() for tap MAC address. | 25 | * Use random_ether_addr() for tap MAC address. |
23 | * | 26 | * |
@@ -612,6 +615,18 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, | |||
612 | DBG(KERN_INFO "%s: owner set to %d\n", tun->dev->name, tun->owner); | 615 | DBG(KERN_INFO "%s: owner set to %d\n", tun->dev->name, tun->owner); |
613 | break; | 616 | break; |
614 | 617 | ||
618 | case TUNSETLINK: | ||
619 | /* Only allow setting the type when the interface is down */ | ||
620 | if (tun->dev->flags & IFF_UP) { | ||
621 | DBG(KERN_INFO "%s: Linktype set failed because interface is up\n", | ||
622 | tun->dev->name); | ||
623 | return -EBUSY; | ||
624 | } else { | ||
625 | tun->dev->type = (int) arg; | ||
626 | DBG(KERN_INFO "%s: linktype set to %d\n", tun->dev->name, tun->dev->type); | ||
627 | } | ||
628 | break; | ||
629 | |||
615 | #ifdef TUN_DEBUG | 630 | #ifdef TUN_DEBUG |
616 | case TUNSETDEBUG: | 631 | case TUNSETDEBUG: |
617 | tun->debug = arg; | 632 | tun->debug = arg; |
diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index 6db1fb6461de..dbcb5a8a2194 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c | |||
@@ -1308,7 +1308,7 @@ static int micsetup(struct airo_info *ai) { | |||
1308 | int i; | 1308 | int i; |
1309 | 1309 | ||
1310 | if (ai->tfm == NULL) | 1310 | if (ai->tfm == NULL) |
1311 | ai->tfm = crypto_alloc_tfm("aes", 0); | 1311 | ai->tfm = crypto_alloc_tfm("aes", CRYPTO_TFM_REQ_MAY_SLEEP); |
1312 | 1312 | ||
1313 | if (ai->tfm == NULL) { | 1313 | if (ai->tfm == NULL) { |
1314 | printk(KERN_ERR "airo: failed to load transform for AES\n"); | 1314 | printk(KERN_ERR "airo: failed to load transform for AES\n"); |
@@ -2239,7 +2239,7 @@ static void airo_read_stats(struct airo_info *ai) { | |||
2239 | u32 *vals = stats_rid.vals; | 2239 | u32 *vals = stats_rid.vals; |
2240 | 2240 | ||
2241 | clear_bit(JOB_STATS, &ai->flags); | 2241 | clear_bit(JOB_STATS, &ai->flags); |
2242 | if (ai->power) { | 2242 | if (ai->power.event) { |
2243 | up(&ai->sem); | 2243 | up(&ai->sem); |
2244 | return; | 2244 | return; |
2245 | } | 2245 | } |
@@ -2410,8 +2410,7 @@ void stop_airo_card( struct net_device *dev, int freeres ) | |||
2410 | } | 2410 | } |
2411 | } | 2411 | } |
2412 | #ifdef MICSUPPORT | 2412 | #ifdef MICSUPPORT |
2413 | if (ai->tfm) | 2413 | crypto_free_tfm(ai->tfm); |
2414 | crypto_free_tfm(ai->tfm); | ||
2415 | #endif | 2414 | #endif |
2416 | del_airo_dev( dev ); | 2415 | del_airo_dev( dev ); |
2417 | free_netdev( dev ); | 2416 | free_netdev( dev ); |
@@ -2969,7 +2968,7 @@ static int airo_thread(void *data) { | |||
2969 | break; | 2968 | break; |
2970 | } | 2969 | } |
2971 | 2970 | ||
2972 | if (ai->power || test_bit(FLAG_FLASHING, &ai->flags)) { | 2971 | if (ai->power.event || test_bit(FLAG_FLASHING, &ai->flags)) { |
2973 | up(&ai->sem); | 2972 | up(&ai->sem); |
2974 | continue; | 2973 | continue; |
2975 | } | 2974 | } |
@@ -5521,7 +5520,7 @@ static int airo_pci_resume(struct pci_dev *pdev) | |||
5521 | pci_restore_state(pdev); | 5520 | pci_restore_state(pdev); |
5522 | pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0); | 5521 | pci_enable_wake(pdev, pci_choose_state(pdev, ai->power), 0); |
5523 | 5522 | ||
5524 | if (ai->power > 1) { | 5523 | if (ai->power.event > 1) { |
5525 | reset_card(dev, 0); | 5524 | reset_card(dev, 0); |
5526 | mpi_init_descriptors(ai); | 5525 | mpi_init_descriptors(ai); |
5527 | setup_card(ai, dev->dev_addr, 0); | 5526 | setup_card(ai, dev->dev_addr, 0); |
@@ -7123,7 +7122,7 @@ static int airo_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) | |||
7123 | int rc = 0; | 7122 | int rc = 0; |
7124 | struct airo_info *ai = (struct airo_info *)dev->priv; | 7123 | struct airo_info *ai = (struct airo_info *)dev->priv; |
7125 | 7124 | ||
7126 | if (ai->power) | 7125 | if (ai->power.event) |
7127 | return 0; | 7126 | return 0; |
7128 | 7127 | ||
7129 | switch (cmd) { | 7128 | switch (cmd) { |
@@ -7202,7 +7201,7 @@ static void airo_read_wireless_stats(struct airo_info *local) | |||
7202 | 7201 | ||
7203 | /* Get stats out of the card */ | 7202 | /* Get stats out of the card */ |
7204 | clear_bit(JOB_WSTATS, &local->flags); | 7203 | clear_bit(JOB_WSTATS, &local->flags); |
7205 | if (local->power) { | 7204 | if (local->power.event) { |
7206 | up(&local->sem); | 7205 | up(&local->sem); |
7207 | return; | 7206 | return; |
7208 | } | 7207 | } |
diff --git a/drivers/net/wireless/hostap/hostap_pci.c b/drivers/net/wireless/hostap/hostap_pci.c index 4f567ef6178d..025f8cdb5566 100644 --- a/drivers/net/wireless/hostap/hostap_pci.c +++ b/drivers/net/wireless/hostap/hostap_pci.c | |||
@@ -416,7 +416,7 @@ static int prism2_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
416 | prism2_suspend(dev); | 416 | prism2_suspend(dev); |
417 | pci_save_state(pdev); | 417 | pci_save_state(pdev); |
418 | pci_disable_device(pdev); | 418 | pci_disable_device(pdev); |
419 | pci_set_power_state(pdev, 3); | 419 | pci_set_power_state(pdev, PCI_D3hot); |
420 | 420 | ||
421 | return 0; | 421 | return 0; |
422 | } | 422 | } |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 6d0b6b1df4ca..2a3bd607a5cd 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -7225,7 +7225,7 @@ static void ipw_pci_remove(struct pci_dev *pdev) | |||
7225 | 7225 | ||
7226 | 7226 | ||
7227 | #ifdef CONFIG_PM | 7227 | #ifdef CONFIG_PM |
7228 | static int ipw_pci_suspend(struct pci_dev *pdev, u32 state) | 7228 | static int ipw_pci_suspend(struct pci_dev *pdev, pm_message_t state) |
7229 | { | 7229 | { |
7230 | struct ipw_priv *priv = pci_get_drvdata(pdev); | 7230 | struct ipw_priv *priv = pci_get_drvdata(pdev); |
7231 | struct net_device *dev = priv->net_dev; | 7231 | struct net_device *dev = priv->net_dev; |
@@ -7240,7 +7240,7 @@ static int ipw_pci_suspend(struct pci_dev *pdev, u32 state) | |||
7240 | 7240 | ||
7241 | pci_save_state(pdev); | 7241 | pci_save_state(pdev); |
7242 | pci_disable_device(pdev); | 7242 | pci_disable_device(pdev); |
7243 | pci_set_power_state(pdev, state); | 7243 | pci_set_power_state(pdev, pci_choose_state(pdev, state)); |
7244 | 7244 | ||
7245 | return 0; | 7245 | return 0; |
7246 | } | 7246 | } |
diff --git a/drivers/net/wireless/orinoco_pci.c b/drivers/net/wireless/orinoco_pci.c index 7a6f52ea7faa..42e03438291b 100644 --- a/drivers/net/wireless/orinoco_pci.c +++ b/drivers/net/wireless/orinoco_pci.c | |||
@@ -301,8 +301,6 @@ static int orinoco_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
301 | unsigned long flags; | 301 | unsigned long flags; |
302 | int err; | 302 | int err; |
303 | 303 | ||
304 | printk(KERN_DEBUG "%s: Orinoco-PCI entering sleep mode (state=%d)\n", | ||
305 | dev->name, state); | ||
306 | 304 | ||
307 | err = orinoco_lock(priv, &flags); | 305 | err = orinoco_lock(priv, &flags); |
308 | if (err) { | 306 | if (err) { |
diff --git a/drivers/net/wireless/prism54/islpci_hotplug.c b/drivers/net/wireless/prism54/islpci_hotplug.c index c17391d947f3..dc040caab7d7 100644 --- a/drivers/net/wireless/prism54/islpci_hotplug.c +++ b/drivers/net/wireless/prism54/islpci_hotplug.c | |||
@@ -267,8 +267,6 @@ prism54_suspend(struct pci_dev *pdev, pm_message_t state) | |||
267 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; | 267 | islpci_private *priv = ndev ? netdev_priv(ndev) : NULL; |
268 | BUG_ON(!priv); | 268 | BUG_ON(!priv); |
269 | 269 | ||
270 | printk(KERN_NOTICE "%s: got suspend request (state %d)\n", | ||
271 | ndev->name, state); | ||
272 | 270 | ||
273 | pci_save_state(pdev); | 271 | pci_save_state(pdev); |
274 | 272 | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 1b34fc56067e..c62d2f043397 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -333,13 +333,17 @@ pci_power_t pci_choose_state(struct pci_dev *dev, pm_message_t state) | |||
333 | if (platform_pci_choose_state) { | 333 | if (platform_pci_choose_state) { |
334 | ret = platform_pci_choose_state(dev, state); | 334 | ret = platform_pci_choose_state(dev, state); |
335 | if (ret >= 0) | 335 | if (ret >= 0) |
336 | state = ret; | 336 | state.event = ret; |
337 | } | 337 | } |
338 | switch (state) { | 338 | |
339 | case 0: return PCI_D0; | 339 | switch (state.event) { |
340 | case 3: return PCI_D3hot; | 340 | case PM_EVENT_ON: |
341 | return PCI_D0; | ||
342 | case PM_EVENT_FREEZE: | ||
343 | case PM_EVENT_SUSPEND: | ||
344 | return PCI_D3hot; | ||
341 | default: | 345 | default: |
342 | printk("They asked me for state %d\n", state); | 346 | printk("They asked me for state %d\n", state.event); |
343 | BUG(); | 347 | BUG(); |
344 | } | 348 | } |
345 | return PCI_D0; | 349 | return PCI_D0; |
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index bb36bb69803f..140354a2aa72 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c | |||
@@ -422,6 +422,25 @@ static void __devinit quirk_via_ioapic(struct pci_dev *dev) | |||
422 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_ioapic ); | 422 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C686, quirk_via_ioapic ); |
423 | 423 | ||
424 | /* | 424 | /* |
425 | * VIA 8237: Some BIOSs don't set the 'Bypass APIC De-Assert Message' Bit. | ||
426 | * This leads to doubled level interrupt rates. | ||
427 | * Set this bit to get rid of cycle wastage. | ||
428 | * Otherwise uncritical. | ||
429 | */ | ||
430 | static void __devinit quirk_via_vt8237_bypass_apic_deassert(struct pci_dev *dev) | ||
431 | { | ||
432 | u8 misc_control2; | ||
433 | #define BYPASS_APIC_DEASSERT 8 | ||
434 | |||
435 | pci_read_config_byte(dev, 0x5B, &misc_control2); | ||
436 | if (!(misc_control2 & BYPASS_APIC_DEASSERT)) { | ||
437 | printk(KERN_INFO "PCI: Bypassing VIA 8237 APIC De-Assert Message\n"); | ||
438 | pci_write_config_byte(dev, 0x5B, misc_control2|BYPASS_APIC_DEASSERT); | ||
439 | } | ||
440 | } | ||
441 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, quirk_via_vt8237_bypass_apic_deassert); | ||
442 | |||
443 | /* | ||
425 | * The AMD io apic can hang the box when an apic irq is masked. | 444 | * The AMD io apic can hang the box when an apic irq is masked. |
426 | * We check all revs >= B0 (yet not in the pre production!) as the bug | 445 | * We check all revs >= B0 (yet not in the pre production!) as the bug |
427 | * is currently marked NoFix | 446 | * is currently marked NoFix |
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 3e23cd461fb1..325c992f7d8f 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -246,7 +246,7 @@ static void __exit pxa2xx_pcmcia_exit(void) | |||
246 | driver_unregister(&pxa2xx_pcmcia_driver); | 246 | driver_unregister(&pxa2xx_pcmcia_driver); |
247 | } | 247 | } |
248 | 248 | ||
249 | module_init(pxa2xx_pcmcia_init); | 249 | fs_initcall(pxa2xx_pcmcia_init); |
250 | module_exit(pxa2xx_pcmcia_exit); | 250 | module_exit(pxa2xx_pcmcia_exit); |
251 | 251 | ||
252 | MODULE_AUTHOR("Stefan Eletzhofer <stefan.eletzhofer@inquant.de> and Ian Molton <spyro@f2s.com>"); | 252 | MODULE_AUTHOR("Stefan Eletzhofer <stefan.eletzhofer@inquant.de> and Ian Molton <spyro@f2s.com>"); |
diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c index 5309734e1687..bbe69b07ce50 100644 --- a/drivers/pcmcia/pxa2xx_mainstone.c +++ b/drivers/pcmcia/pxa2xx_mainstone.c | |||
@@ -196,7 +196,7 @@ static void __exit mst_pcmcia_exit(void) | |||
196 | platform_device_unregister(mst_pcmcia_device); | 196 | platform_device_unregister(mst_pcmcia_device); |
197 | } | 197 | } |
198 | 198 | ||
199 | module_init(mst_pcmcia_init); | 199 | fs_initcall(mst_pcmcia_init); |
200 | module_exit(mst_pcmcia_exit); | 200 | module_exit(mst_pcmcia_exit); |
201 | 201 | ||
202 | MODULE_LICENSE("GPL"); | 202 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/pcmcia/pxa2xx_sharpsl.c b/drivers/pcmcia/pxa2xx_sharpsl.c index 42efe218867a..7bac2f7d8b3f 100644 --- a/drivers/pcmcia/pxa2xx_sharpsl.c +++ b/drivers/pcmcia/pxa2xx_sharpsl.c | |||
@@ -257,7 +257,7 @@ static void __exit sharpsl_pcmcia_exit(void) | |||
257 | platform_device_unregister(sharpsl_pcmcia_device); | 257 | platform_device_unregister(sharpsl_pcmcia_device); |
258 | } | 258 | } |
259 | 259 | ||
260 | module_init(sharpsl_pcmcia_init); | 260 | fs_initcall(sharpsl_pcmcia_init); |
261 | module_exit(sharpsl_pcmcia_exit); | 261 | module_exit(sharpsl_pcmcia_exit); |
262 | 262 | ||
263 | MODULE_DESCRIPTION("Sharp SL Series PCMCIA Support"); | 263 | MODULE_DESCRIPTION("Sharp SL Series PCMCIA Support"); |
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c index e98bb3d80e7c..d4ed508b38be 100644 --- a/drivers/pcmcia/sa1100_generic.c +++ b/drivers/pcmcia/sa1100_generic.c | |||
@@ -126,5 +126,5 @@ MODULE_AUTHOR("John Dorsey <john+@cs.cmu.edu>"); | |||
126 | MODULE_DESCRIPTION("Linux PCMCIA Card Services: SA-11x0 Socket Controller"); | 126 | MODULE_DESCRIPTION("Linux PCMCIA Card Services: SA-11x0 Socket Controller"); |
127 | MODULE_LICENSE("Dual MPL/GPL"); | 127 | MODULE_LICENSE("Dual MPL/GPL"); |
128 | 128 | ||
129 | module_init(sa11x0_pcmcia_init); | 129 | fs_initcall(sa11x0_pcmcia_init); |
130 | module_exit(sa11x0_pcmcia_exit); | 130 | module_exit(sa11x0_pcmcia_exit); |
diff --git a/drivers/pcmcia/sa1111_generic.c b/drivers/pcmcia/sa1111_generic.c index b441f43a6a55..bb90a1448a53 100644 --- a/drivers/pcmcia/sa1111_generic.c +++ b/drivers/pcmcia/sa1111_generic.c | |||
@@ -189,7 +189,7 @@ static void __exit sa1111_drv_pcmcia_exit(void) | |||
189 | sa1111_driver_unregister(&pcmcia_driver); | 189 | sa1111_driver_unregister(&pcmcia_driver); |
190 | } | 190 | } |
191 | 191 | ||
192 | module_init(sa1111_drv_pcmcia_init); | 192 | fs_initcall(sa1111_drv_pcmcia_init); |
193 | module_exit(sa1111_drv_pcmcia_exit); | 193 | module_exit(sa1111_drv_pcmcia_exit); |
194 | 194 | ||
195 | MODULE_DESCRIPTION("SA1111 PCMCIA card socket driver"); | 195 | MODULE_DESCRIPTION("SA1111 PCMCIA card socket driver"); |
diff --git a/drivers/pcmcia/sa11xx_base.c b/drivers/pcmcia/sa11xx_base.c index db04ffb6f68c..59c5d968e9f6 100644 --- a/drivers/pcmcia/sa11xx_base.c +++ b/drivers/pcmcia/sa11xx_base.c | |||
@@ -189,7 +189,7 @@ static int __init sa11xx_pcmcia_init(void) | |||
189 | { | 189 | { |
190 | return 0; | 190 | return 0; |
191 | } | 191 | } |
192 | module_init(sa11xx_pcmcia_init); | 192 | fs_initcall(sa11xx_pcmcia_init); |
193 | 193 | ||
194 | static void __exit sa11xx_pcmcia_exit(void) {} | 194 | static void __exit sa11xx_pcmcia_exit(void) {} |
195 | 195 | ||
diff --git a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig index dc1c89dbdb8f..6e7d7b06421d 100644 --- a/drivers/s390/block/Kconfig +++ b/drivers/s390/block/Kconfig | |||
@@ -49,7 +49,7 @@ config DASD_FBA | |||
49 | 49 | ||
50 | config DASD_DIAG | 50 | config DASD_DIAG |
51 | tristate "Support for DIAG access to Disks" | 51 | tristate "Support for DIAG access to Disks" |
52 | depends on DASD && ARCH_S390X = 'n' | 52 | depends on DASD && ( ARCH_S390X = 'n' || EXPERIMENTAL) |
53 | help | 53 | help |
54 | Select this option if you want to use Diagnose250 command to access | 54 | Select this option if you want to use Diagnose250 command to access |
55 | Disks under VM. If you are not running under VM or unsure what it is, | 55 | Disks under VM. If you are not running under VM or unsure what it is, |
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index d5f53980749b..8fc891a9d47f 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Bugreports.to..: <Linux390@de.ibm.com> | 7 | * Bugreports.to..: <Linux390@de.ibm.com> |
8 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 | 8 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 |
9 | * | 9 | * |
10 | * $Revision: 1.165 $ | 10 | * $Revision: 1.167 $ |
11 | */ | 11 | */ |
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
@@ -1131,17 +1131,13 @@ __dasd_process_blk_queue(struct dasd_device * device) | |||
1131 | request_queue_t *queue; | 1131 | request_queue_t *queue; |
1132 | struct request *req; | 1132 | struct request *req; |
1133 | struct dasd_ccw_req *cqr; | 1133 | struct dasd_ccw_req *cqr; |
1134 | int nr_queued, feature_ro; | 1134 | int nr_queued; |
1135 | 1135 | ||
1136 | queue = device->request_queue; | 1136 | queue = device->request_queue; |
1137 | /* No queue ? Then there is nothing to do. */ | 1137 | /* No queue ? Then there is nothing to do. */ |
1138 | if (queue == NULL) | 1138 | if (queue == NULL) |
1139 | return; | 1139 | return; |
1140 | 1140 | ||
1141 | feature_ro = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY); | ||
1142 | if (feature_ro < 0) /* no devmap */ | ||
1143 | return; | ||
1144 | |||
1145 | /* | 1141 | /* |
1146 | * We requeue request from the block device queue to the ccw | 1142 | * We requeue request from the block device queue to the ccw |
1147 | * queue only in two states. In state DASD_STATE_READY the | 1143 | * queue only in two states. In state DASD_STATE_READY the |
@@ -1162,7 +1158,8 @@ __dasd_process_blk_queue(struct dasd_device * device) | |||
1162 | nr_queued < DASD_CHANQ_MAX_SIZE) { | 1158 | nr_queued < DASD_CHANQ_MAX_SIZE) { |
1163 | req = elv_next_request(queue); | 1159 | req = elv_next_request(queue); |
1164 | 1160 | ||
1165 | if (feature_ro && rq_data_dir(req) == WRITE) { | 1161 | if (device->features & DASD_FEATURE_READONLY && |
1162 | rq_data_dir(req) == WRITE) { | ||
1166 | DBF_DEV_EVENT(DBF_ERR, device, | 1163 | DBF_DEV_EVENT(DBF_ERR, device, |
1167 | "Rejecting write request %p", | 1164 | "Rejecting write request %p", |
1168 | req); | 1165 | req); |
@@ -1814,17 +1811,13 @@ dasd_generic_set_online (struct ccw_device *cdev, | |||
1814 | 1811 | ||
1815 | { | 1812 | { |
1816 | struct dasd_device *device; | 1813 | struct dasd_device *device; |
1817 | int feature_diag, rc; | 1814 | int rc; |
1818 | 1815 | ||
1819 | device = dasd_create_device(cdev); | 1816 | device = dasd_create_device(cdev); |
1820 | if (IS_ERR(device)) | 1817 | if (IS_ERR(device)) |
1821 | return PTR_ERR(device); | 1818 | return PTR_ERR(device); |
1822 | 1819 | ||
1823 | feature_diag = dasd_get_feature(cdev, DASD_FEATURE_USEDIAG); | 1820 | if (device->features & DASD_FEATURE_USEDIAG) { |
1824 | if (feature_diag < 0) | ||
1825 | return feature_diag; | ||
1826 | |||
1827 | if (feature_diag) { | ||
1828 | if (!dasd_diag_discipline_pointer) { | 1821 | if (!dasd_diag_discipline_pointer) { |
1829 | printk (KERN_WARNING | 1822 | printk (KERN_WARNING |
1830 | "dasd_generic couldn't online device %s " | 1823 | "dasd_generic couldn't online device %s " |
diff --git a/drivers/s390/block/dasd_devmap.c b/drivers/s390/block/dasd_devmap.c index d948566bb24a..bda896d9d788 100644 --- a/drivers/s390/block/dasd_devmap.c +++ b/drivers/s390/block/dasd_devmap.c | |||
@@ -11,7 +11,7 @@ | |||
11 | * functions may not be called from interrupt context. In particular | 11 | * functions may not be called from interrupt context. In particular |
12 | * dasd_get_device is a no-no from interrupt context. | 12 | * dasd_get_device is a no-no from interrupt context. |
13 | * | 13 | * |
14 | * $Revision: 1.40 $ | 14 | * $Revision: 1.43 $ |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/config.h> | 17 | #include <linux/config.h> |
@@ -513,6 +513,7 @@ dasd_create_device(struct ccw_device *cdev) | |||
513 | if (!devmap->device) { | 513 | if (!devmap->device) { |
514 | devmap->device = device; | 514 | devmap->device = device; |
515 | device->devindex = devmap->devindex; | 515 | device->devindex = devmap->devindex; |
516 | device->features = devmap->features; | ||
516 | get_device(&cdev->dev); | 517 | get_device(&cdev->dev); |
517 | device->cdev = cdev; | 518 | device->cdev = cdev; |
518 | rc = 0; | 519 | rc = 0; |
@@ -643,6 +644,8 @@ dasd_ro_store(struct device *dev, struct device_attribute *attr, const char *buf | |||
643 | devmap->features |= DASD_FEATURE_READONLY; | 644 | devmap->features |= DASD_FEATURE_READONLY; |
644 | else | 645 | else |
645 | devmap->features &= ~DASD_FEATURE_READONLY; | 646 | devmap->features &= ~DASD_FEATURE_READONLY; |
647 | if (devmap->device) | ||
648 | devmap->device->features = devmap->features; | ||
646 | if (devmap->device && devmap->device->gdp) | 649 | if (devmap->device && devmap->device->gdp) |
647 | set_disk_ro(devmap->device->gdp, ro_flag); | 650 | set_disk_ro(devmap->device->gdp, ro_flag); |
648 | spin_unlock(&dasd_devmap_lock); | 651 | spin_unlock(&dasd_devmap_lock); |
@@ -758,7 +761,8 @@ dasd_set_feature(struct ccw_device *cdev, int feature, int flag) | |||
758 | devmap->features |= feature; | 761 | devmap->features |= feature; |
759 | else | 762 | else |
760 | devmap->features &= ~feature; | 763 | devmap->features &= ~feature; |
761 | 764 | if (devmap->device) | |
765 | devmap->device->features = devmap->features; | ||
762 | spin_unlock(&dasd_devmap_lock); | 766 | spin_unlock(&dasd_devmap_lock); |
763 | return 0; | 767 | return 0; |
764 | } | 768 | } |
diff --git a/drivers/s390/block/dasd_diag.c b/drivers/s390/block/dasd_diag.c index 127699830fa1..7478423b53bb 100644 --- a/drivers/s390/block/dasd_diag.c +++ b/drivers/s390/block/dasd_diag.c | |||
@@ -6,17 +6,18 @@ | |||
6 | * Bugreports.to..: <Linux390@de.ibm.com> | 6 | * Bugreports.to..: <Linux390@de.ibm.com> |
7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 | 7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 |
8 | * | 8 | * |
9 | * $Revision: 1.42 $ | 9 | * $Revision: 1.49 $ |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #include <linux/config.h> | 12 | #include <linux/config.h> |
13 | #include <linux/stddef.h> | 13 | #include <linux/stddef.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/slab.h> | 15 | #include <linux/slab.h> |
16 | #include <linux/hdreg.h> /* HDIO_GETGEO */ | 16 | #include <linux/hdreg.h> |
17 | #include <linux/bio.h> | 17 | #include <linux/bio.h> |
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/jiffies.h> | ||
20 | 21 | ||
21 | #include <asm/dasd.h> | 22 | #include <asm/dasd.h> |
22 | #include <asm/debug.h> | 23 | #include <asm/debug.h> |
@@ -28,58 +29,89 @@ | |||
28 | #include "dasd_int.h" | 29 | #include "dasd_int.h" |
29 | #include "dasd_diag.h" | 30 | #include "dasd_diag.h" |
30 | 31 | ||
31 | #ifdef PRINTK_HEADER | ||
32 | #undef PRINTK_HEADER | ||
33 | #endif /* PRINTK_HEADER */ | ||
34 | #define PRINTK_HEADER "dasd(diag):" | 32 | #define PRINTK_HEADER "dasd(diag):" |
35 | 33 | ||
36 | MODULE_LICENSE("GPL"); | 34 | MODULE_LICENSE("GPL"); |
37 | 35 | ||
36 | /* The maximum number of blocks per request (max_blocks) is dependent on the | ||
37 | * amount of storage that is available in the static I/O buffer for each | ||
38 | * device. Currently each device gets 2 pages. We want to fit two requests | ||
39 | * into the available memory so that we can immediately start the next if one | ||
40 | * finishes. */ | ||
41 | #define DIAG_MAX_BLOCKS (((2 * PAGE_SIZE - sizeof(struct dasd_ccw_req) - \ | ||
42 | sizeof(struct dasd_diag_req)) / \ | ||
43 | sizeof(struct dasd_diag_bio)) / 2) | ||
44 | #define DIAG_MAX_RETRIES 32 | ||
45 | #define DIAG_TIMEOUT 50 * HZ | ||
46 | |||
38 | struct dasd_discipline dasd_diag_discipline; | 47 | struct dasd_discipline dasd_diag_discipline; |
39 | 48 | ||
40 | struct dasd_diag_private { | 49 | struct dasd_diag_private { |
41 | struct dasd_diag_characteristics rdc_data; | 50 | struct dasd_diag_characteristics rdc_data; |
42 | struct dasd_diag_rw_io iob; | 51 | struct dasd_diag_rw_io iob; |
43 | struct dasd_diag_init_io iib; | 52 | struct dasd_diag_init_io iib; |
44 | unsigned int pt_block; | 53 | blocknum_t pt_block; |
45 | }; | 54 | }; |
46 | 55 | ||
47 | struct dasd_diag_req { | 56 | struct dasd_diag_req { |
48 | int block_count; | 57 | unsigned int block_count; |
49 | struct dasd_diag_bio bio[0]; | 58 | struct dasd_diag_bio bio[0]; |
50 | }; | 59 | }; |
51 | 60 | ||
61 | static const u8 DASD_DIAG_CMS1[] = { 0xc3, 0xd4, 0xe2, 0xf1 };/* EBCDIC CMS1 */ | ||
62 | |||
63 | /* Perform DIAG250 call with block I/O parameter list iob (input and output) | ||
64 | * and function code cmd. | ||
65 | * In case of an exception return 3. Otherwise return result of bitwise OR of | ||
66 | * resulting condition code and DIAG return code. */ | ||
52 | static __inline__ int | 67 | static __inline__ int |
53 | dia250(void *iob, int cmd) | 68 | dia250(void *iob, int cmd) |
54 | { | 69 | { |
70 | typedef struct { | ||
71 | char _[max(sizeof (struct dasd_diag_init_io), | ||
72 | sizeof (struct dasd_diag_rw_io))]; | ||
73 | } addr_type; | ||
55 | int rc; | 74 | int rc; |
56 | 75 | ||
57 | __asm__ __volatile__(" lhi %0,3\n" | 76 | __asm__ __volatile__( |
58 | " lr 0,%2\n" | 77 | #ifdef CONFIG_ARCH_S390X |
59 | " diag 0,%1,0x250\n" | 78 | " lghi %0,3\n" |
60 | "0: ipm %0\n" | 79 | " lgr 0,%3\n" |
61 | " srl %0,28\n" | 80 | " diag 0,%2,0x250\n" |
62 | " or %0,1\n" | 81 | "0: ipm %0\n" |
63 | "1:\n" | 82 | " srl %0,28\n" |
64 | #ifndef CONFIG_ARCH_S390X | 83 | " or %0,1\n" |
65 | ".section __ex_table,\"a\"\n" | 84 | "1:\n" |
66 | " .align 4\n" | 85 | ".section __ex_table,\"a\"\n" |
67 | " .long 0b,1b\n" | 86 | " .align 8\n" |
68 | ".previous\n" | 87 | " .quad 0b,1b\n" |
88 | ".previous\n" | ||
69 | #else | 89 | #else |
70 | ".section __ex_table,\"a\"\n" | 90 | " lhi %0,3\n" |
71 | " .align 8\n" | 91 | " lr 0,%3\n" |
72 | " .quad 0b,1b\n" | 92 | " diag 0,%2,0x250\n" |
73 | ".previous\n" | 93 | "0: ipm %0\n" |
94 | " srl %0,28\n" | ||
95 | " or %0,1\n" | ||
96 | "1:\n" | ||
97 | ".section __ex_table,\"a\"\n" | ||
98 | " .align 4\n" | ||
99 | " .long 0b,1b\n" | ||
100 | ".previous\n" | ||
74 | #endif | 101 | #endif |
75 | : "=&d" (rc) | 102 | : "=&d" (rc), "=m" (*(addr_type *) iob) |
76 | : "d" (cmd), "d" ((void *) __pa(iob)) | 103 | : "d" (cmd), "d" (iob), "m" (*(addr_type *) iob) |
77 | : "0", "1", "cc"); | 104 | : "0", "1", "cc"); |
78 | return rc; | 105 | return rc; |
79 | } | 106 | } |
80 | 107 | ||
108 | /* Initialize block I/O to DIAG device using the specified blocksize and | ||
109 | * block offset. On success, return zero and set end_block to contain the | ||
110 | * number of blocks on the device minus the specified offset. Return non-zero | ||
111 | * otherwise. */ | ||
81 | static __inline__ int | 112 | static __inline__ int |
82 | mdsk_init_io(struct dasd_device * device, int blocksize, int offset, int size) | 113 | mdsk_init_io(struct dasd_device *device, unsigned int blocksize, |
114 | blocknum_t offset, blocknum_t *end_block) | ||
83 | { | 115 | { |
84 | struct dasd_diag_private *private; | 116 | struct dasd_diag_private *private; |
85 | struct dasd_diag_init_io *iib; | 117 | struct dasd_diag_init_io *iib; |
@@ -92,14 +124,18 @@ mdsk_init_io(struct dasd_device * device, int blocksize, int offset, int size) | |||
92 | iib->dev_nr = _ccw_device_get_device_number(device->cdev); | 124 | iib->dev_nr = _ccw_device_get_device_number(device->cdev); |
93 | iib->block_size = blocksize; | 125 | iib->block_size = blocksize; |
94 | iib->offset = offset; | 126 | iib->offset = offset; |
95 | iib->start_block = 0; | 127 | iib->flaga = DASD_DIAG_FLAGA_DEFAULT; |
96 | iib->end_block = size; | ||
97 | 128 | ||
98 | rc = dia250(iib, INIT_BIO); | 129 | rc = dia250(iib, INIT_BIO); |
99 | 130 | ||
100 | return rc & 3; | 131 | if ((rc & 3) == 0 && end_block) |
132 | *end_block = iib->end_block; | ||
133 | |||
134 | return rc; | ||
101 | } | 135 | } |
102 | 136 | ||
137 | /* Remove block I/O environment for device. Return zero on success, non-zero | ||
138 | * otherwise. */ | ||
103 | static __inline__ int | 139 | static __inline__ int |
104 | mdsk_term_io(struct dasd_device * device) | 140 | mdsk_term_io(struct dasd_device * device) |
105 | { | 141 | { |
@@ -112,9 +148,25 @@ mdsk_term_io(struct dasd_device * device) | |||
112 | memset(iib, 0, sizeof (struct dasd_diag_init_io)); | 148 | memset(iib, 0, sizeof (struct dasd_diag_init_io)); |
113 | iib->dev_nr = _ccw_device_get_device_number(device->cdev); | 149 | iib->dev_nr = _ccw_device_get_device_number(device->cdev); |
114 | rc = dia250(iib, TERM_BIO); | 150 | rc = dia250(iib, TERM_BIO); |
115 | return rc & 3; | 151 | return rc; |
152 | } | ||
153 | |||
154 | /* Error recovery for failed DIAG requests - try to reestablish the DIAG | ||
155 | * environment. */ | ||
156 | static void | ||
157 | dasd_diag_erp(struct dasd_device *device) | ||
158 | { | ||
159 | int rc; | ||
160 | |||
161 | mdsk_term_io(device); | ||
162 | rc = mdsk_init_io(device, device->bp_block, 0, NULL); | ||
163 | if (rc) | ||
164 | DEV_MESSAGE(KERN_WARNING, device, "DIAG ERP unsuccessful, " | ||
165 | "rc=%d", rc); | ||
116 | } | 166 | } |
117 | 167 | ||
168 | /* Start a given request at the device. Return zero on success, non-zero | ||
169 | * otherwise. */ | ||
118 | static int | 170 | static int |
119 | dasd_start_diag(struct dasd_ccw_req * cqr) | 171 | dasd_start_diag(struct dasd_ccw_req * cqr) |
120 | { | 172 | { |
@@ -124,32 +176,66 @@ dasd_start_diag(struct dasd_ccw_req * cqr) | |||
124 | int rc; | 176 | int rc; |
125 | 177 | ||
126 | device = cqr->device; | 178 | device = cqr->device; |
179 | if (cqr->retries < 0) { | ||
180 | DEV_MESSAGE(KERN_WARNING, device, "DIAG start_IO: request %p " | ||
181 | "- no retry left)", cqr); | ||
182 | cqr->status = DASD_CQR_FAILED; | ||
183 | return -EIO; | ||
184 | } | ||
127 | private = (struct dasd_diag_private *) device->private; | 185 | private = (struct dasd_diag_private *) device->private; |
128 | dreq = (struct dasd_diag_req *) cqr->data; | 186 | dreq = (struct dasd_diag_req *) cqr->data; |
129 | 187 | ||
130 | private->iob.dev_nr = _ccw_device_get_device_number(device->cdev); | 188 | private->iob.dev_nr = _ccw_device_get_device_number(device->cdev); |
131 | private->iob.key = 0; | 189 | private->iob.key = 0; |
132 | private->iob.flags = 2; /* do asynchronous io */ | 190 | private->iob.flags = DASD_DIAG_RWFLAG_ASYNC; |
133 | private->iob.block_count = dreq->block_count; | 191 | private->iob.block_count = dreq->block_count; |
134 | private->iob.interrupt_params = (u32)(addr_t) cqr; | 192 | private->iob.interrupt_params = (addr_t) cqr; |
135 | private->iob.bio_list = __pa(dreq->bio); | 193 | private->iob.bio_list = __pa(dreq->bio); |
194 | private->iob.flaga = DASD_DIAG_FLAGA_DEFAULT; | ||
136 | 195 | ||
137 | cqr->startclk = get_clock(); | 196 | cqr->startclk = get_clock(); |
197 | cqr->starttime = jiffies; | ||
198 | cqr->retries--; | ||
138 | 199 | ||
139 | rc = dia250(&private->iob, RW_BIO); | 200 | rc = dia250(&private->iob, RW_BIO); |
140 | if (rc > 8) { | 201 | switch (rc) { |
141 | DEV_MESSAGE(KERN_WARNING, device, "dia250 returned CC %d", rc); | 202 | case 0: /* Synchronous I/O finished successfully */ |
142 | cqr->status = DASD_CQR_ERROR; | 203 | cqr->stopclk = get_clock(); |
143 | } else if (rc == 0) { | ||
144 | cqr->status = DASD_CQR_DONE; | 204 | cqr->status = DASD_CQR_DONE; |
145 | dasd_schedule_bh(device); | 205 | /* Indicate to calling function that only a dasd_schedule_bh() |
146 | } else { | 206 | and no timer is needed */ |
207 | rc = -EACCES; | ||
208 | break; | ||
209 | case 8: /* Asynchronous I/O was started */ | ||
147 | cqr->status = DASD_CQR_IN_IO; | 210 | cqr->status = DASD_CQR_IN_IO; |
148 | rc = 0; | 211 | rc = 0; |
212 | break; | ||
213 | default: /* Error condition */ | ||
214 | cqr->status = DASD_CQR_QUEUED; | ||
215 | DEV_MESSAGE(KERN_WARNING, device, "dia250 returned rc=%d", rc); | ||
216 | dasd_diag_erp(device); | ||
217 | rc = -EIO; | ||
218 | break; | ||
149 | } | 219 | } |
150 | return rc; | 220 | return rc; |
151 | } | 221 | } |
152 | 222 | ||
223 | /* Terminate given request at the device. */ | ||
224 | static int | ||
225 | dasd_diag_term_IO(struct dasd_ccw_req * cqr) | ||
226 | { | ||
227 | struct dasd_device *device; | ||
228 | |||
229 | device = cqr->device; | ||
230 | mdsk_term_io(device); | ||
231 | mdsk_init_io(device, device->bp_block, 0, NULL); | ||
232 | cqr->status = DASD_CQR_CLEAR; | ||
233 | cqr->stopclk = get_clock(); | ||
234 | dasd_schedule_bh(device); | ||
235 | return 0; | ||
236 | } | ||
237 | |||
238 | /* Handle external interruption. */ | ||
153 | static void | 239 | static void |
154 | dasd_ext_handler(struct pt_regs *regs, __u16 code) | 240 | dasd_ext_handler(struct pt_regs *regs, __u16 code) |
155 | { | 241 | { |
@@ -157,25 +243,27 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code) | |||
157 | struct dasd_device *device; | 243 | struct dasd_device *device; |
158 | unsigned long long expires; | 244 | unsigned long long expires; |
159 | unsigned long flags; | 245 | unsigned long flags; |
160 | char status; | 246 | u8 int_code, status; |
161 | int ip; | 247 | addr_t ip; |
162 | 248 | int rc; | |
163 | /* | ||
164 | * Get the external interruption subcode. VM stores | ||
165 | * this in the 'cpu address' field associated with | ||
166 | * the external interrupt. For diag 250 the subcode | ||
167 | * needs to be 3. | ||
168 | */ | ||
169 | if ((S390_lowcore.cpu_addr & 0xff00) != 0x0300) | ||
170 | return; | ||
171 | status = *((char *) &S390_lowcore.ext_params + 5); | ||
172 | ip = S390_lowcore.ext_params; | ||
173 | 249 | ||
250 | int_code = *((u8 *) DASD_DIAG_LC_INT_CODE); | ||
251 | status = *((u8 *) DASD_DIAG_LC_INT_STATUS); | ||
252 | switch (int_code) { | ||
253 | case DASD_DIAG_CODE_31BIT: | ||
254 | ip = (addr_t) *((u32 *) DASD_DIAG_LC_INT_PARM_31BIT); | ||
255 | break; | ||
256 | case DASD_DIAG_CODE_64BIT: | ||
257 | ip = (addr_t) *((u64 *) DASD_DIAG_LC_INT_PARM_64BIT); | ||
258 | break; | ||
259 | default: | ||
260 | return; | ||
261 | } | ||
174 | if (!ip) { /* no intparm: unsolicited interrupt */ | 262 | if (!ip) { /* no intparm: unsolicited interrupt */ |
175 | MESSAGE(KERN_DEBUG, "%s", "caught unsolicited interrupt"); | 263 | MESSAGE(KERN_DEBUG, "%s", "caught unsolicited interrupt"); |
176 | return; | 264 | return; |
177 | } | 265 | } |
178 | cqr = (struct dasd_ccw_req *)(addr_t) ip; | 266 | cqr = (struct dasd_ccw_req *) ip; |
179 | device = (struct dasd_device *) cqr->device; | 267 | device = (struct dasd_device *) cqr->device; |
180 | if (strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { | 268 | if (strncmp(device->discipline->ebcname, (char *) &cqr->magic, 4)) { |
181 | DEV_MESSAGE(KERN_WARNING, device, | 269 | DEV_MESSAGE(KERN_WARNING, device, |
@@ -188,6 +276,15 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code) | |||
188 | /* get irq lock to modify request queue */ | 276 | /* get irq lock to modify request queue */ |
189 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); | 277 | spin_lock_irqsave(get_ccwdev_lock(device->cdev), flags); |
190 | 278 | ||
279 | /* Check for a pending clear operation */ | ||
280 | if (cqr->status == DASD_CQR_CLEAR) { | ||
281 | cqr->status = DASD_CQR_QUEUED; | ||
282 | dasd_clear_timer(device); | ||
283 | dasd_schedule_bh(device); | ||
284 | spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); | ||
285 | return; | ||
286 | } | ||
287 | |||
191 | cqr->stopclk = get_clock(); | 288 | cqr->stopclk = get_clock(); |
192 | 289 | ||
193 | expires = 0; | 290 | expires = 0; |
@@ -198,16 +295,22 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code) | |||
198 | next = list_entry(device->ccw_queue.next, | 295 | next = list_entry(device->ccw_queue.next, |
199 | struct dasd_ccw_req, list); | 296 | struct dasd_ccw_req, list); |
200 | if (next->status == DASD_CQR_QUEUED) { | 297 | if (next->status == DASD_CQR_QUEUED) { |
201 | if (dasd_start_diag(next) == 0) | 298 | rc = dasd_start_diag(next); |
299 | if (rc == 0) | ||
202 | expires = next->expires; | 300 | expires = next->expires; |
203 | else | 301 | else if (rc != -EACCES) |
204 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 302 | DEV_MESSAGE(KERN_WARNING, device, "%s", |
205 | "Interrupt fastpath " | 303 | "Interrupt fastpath " |
206 | "failed!"); | 304 | "failed!"); |
207 | } | 305 | } |
208 | } | 306 | } |
209 | } else | 307 | } else { |
210 | cqr->status = DASD_CQR_FAILED; | 308 | cqr->status = DASD_CQR_QUEUED; |
309 | DEV_MESSAGE(KERN_WARNING, device, "interrupt status for " | ||
310 | "request %p was %d (%d retries left)", cqr, status, | ||
311 | cqr->retries); | ||
312 | dasd_diag_erp(device); | ||
313 | } | ||
211 | 314 | ||
212 | if (expires != 0) | 315 | if (expires != 0) |
213 | dasd_set_timer(device, expires); | 316 | dasd_set_timer(device, expires); |
@@ -218,14 +321,17 @@ dasd_ext_handler(struct pt_regs *regs, __u16 code) | |||
218 | spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); | 321 | spin_unlock_irqrestore(get_ccwdev_lock(device->cdev), flags); |
219 | } | 322 | } |
220 | 323 | ||
324 | /* Check whether device can be controlled by DIAG discipline. Return zero on | ||
325 | * success, non-zero otherwise. */ | ||
221 | static int | 326 | static int |
222 | dasd_diag_check_device(struct dasd_device *device) | 327 | dasd_diag_check_device(struct dasd_device *device) |
223 | { | 328 | { |
224 | struct dasd_diag_private *private; | 329 | struct dasd_diag_private *private; |
225 | struct dasd_diag_characteristics *rdc_data; | 330 | struct dasd_diag_characteristics *rdc_data; |
226 | struct dasd_diag_bio bio; | 331 | struct dasd_diag_bio bio; |
227 | long *label; | 332 | struct dasd_diag_cms_label *label; |
228 | int sb, bsize; | 333 | blocknum_t end_block; |
334 | unsigned int sb, bsize; | ||
229 | int rc; | 335 | int rc; |
230 | 336 | ||
231 | private = (struct dasd_diag_private *) device->private; | 337 | private = (struct dasd_diag_private *) device->private; |
@@ -244,8 +350,11 @@ dasd_diag_check_device(struct dasd_device *device) | |||
244 | rdc_data->rdc_len = sizeof (struct dasd_diag_characteristics); | 350 | rdc_data->rdc_len = sizeof (struct dasd_diag_characteristics); |
245 | 351 | ||
246 | rc = diag210((struct diag210 *) rdc_data); | 352 | rc = diag210((struct diag210 *) rdc_data); |
247 | if (rc) | 353 | if (rc) { |
354 | DEV_MESSAGE(KERN_WARNING, device, "failed to retrieve device " | ||
355 | "information (rc=%d)", rc); | ||
248 | return -ENOTSUPP; | 356 | return -ENOTSUPP; |
357 | } | ||
249 | 358 | ||
250 | /* Figure out position of label block */ | 359 | /* Figure out position of label block */ |
251 | switch (private->rdc_data.vdev_class) { | 360 | switch (private->rdc_data.vdev_class) { |
@@ -256,6 +365,8 @@ dasd_diag_check_device(struct dasd_device *device) | |||
256 | private->pt_block = 2; | 365 | private->pt_block = 2; |
257 | break; | 366 | break; |
258 | default: | 367 | default: |
368 | DEV_MESSAGE(KERN_WARNING, device, "unsupported device class " | ||
369 | "(class=%d)", private->rdc_data.vdev_class); | ||
259 | return -ENOTSUPP; | 370 | return -ENOTSUPP; |
260 | } | 371 | } |
261 | 372 | ||
@@ -269,15 +380,17 @@ dasd_diag_check_device(struct dasd_device *device) | |||
269 | mdsk_term_io(device); | 380 | mdsk_term_io(device); |
270 | 381 | ||
271 | /* figure out blocksize of device */ | 382 | /* figure out blocksize of device */ |
272 | label = (long *) get_zeroed_page(GFP_KERNEL); | 383 | label = (struct dasd_diag_cms_label *) get_zeroed_page(GFP_KERNEL); |
273 | if (label == NULL) { | 384 | if (label == NULL) { |
274 | DEV_MESSAGE(KERN_WARNING, device, "%s", | 385 | DEV_MESSAGE(KERN_WARNING, device, "%s", |
275 | "No memory to allocate initialization request"); | 386 | "No memory to allocate initialization request"); |
276 | return -ENOMEM; | 387 | return -ENOMEM; |
277 | } | 388 | } |
389 | rc = 0; | ||
390 | end_block = 0; | ||
278 | /* try all sizes - needed for ECKD devices */ | 391 | /* try all sizes - needed for ECKD devices */ |
279 | for (bsize = 512; bsize <= PAGE_SIZE; bsize <<= 1) { | 392 | for (bsize = 512; bsize <= PAGE_SIZE; bsize <<= 1) { |
280 | mdsk_init_io(device, bsize, 0, 64); | 393 | mdsk_init_io(device, bsize, 0, &end_block); |
281 | memset(&bio, 0, sizeof (struct dasd_diag_bio)); | 394 | memset(&bio, 0, sizeof (struct dasd_diag_bio)); |
282 | bio.type = MDSK_READ_REQ; | 395 | bio.type = MDSK_READ_REQ; |
283 | bio.block_number = private->pt_block + 1; | 396 | bio.block_number = private->pt_block + 1; |
@@ -289,37 +402,45 @@ dasd_diag_check_device(struct dasd_device *device) | |||
289 | private->iob.block_count = 1; | 402 | private->iob.block_count = 1; |
290 | private->iob.interrupt_params = 0; | 403 | private->iob.interrupt_params = 0; |
291 | private->iob.bio_list = __pa(&bio); | 404 | private->iob.bio_list = __pa(&bio); |
292 | if (dia250(&private->iob, RW_BIO) == 0) | 405 | private->iob.flaga = DASD_DIAG_FLAGA_DEFAULT; |
406 | rc = dia250(&private->iob, RW_BIO); | ||
407 | if (rc == 0 || rc == 3) | ||
293 | break; | 408 | break; |
294 | mdsk_term_io(device); | 409 | mdsk_term_io(device); |
295 | } | 410 | } |
296 | if (bsize <= PAGE_SIZE && label[0] == 0xc3d4e2f1) { | 411 | if (rc == 3) { |
297 | /* get formatted blocksize from label block */ | 412 | DEV_MESSAGE(KERN_WARNING, device, "%s", "DIAG call failed"); |
298 | bsize = (int) label[3]; | 413 | rc = -EOPNOTSUPP; |
299 | device->blocks = label[7]; | 414 | } else if (rc != 0) { |
415 | DEV_MESSAGE(KERN_WARNING, device, "device access failed " | ||
416 | "(rc=%d)", rc); | ||
417 | rc = -EIO; | ||
418 | } else { | ||
419 | if (memcmp(label->label_id, DASD_DIAG_CMS1, | ||
420 | sizeof(DASD_DIAG_CMS1)) == 0) { | ||
421 | /* get formatted blocksize from label block */ | ||
422 | bsize = (unsigned int) label->block_size; | ||
423 | device->blocks = (unsigned long) label->block_count; | ||
424 | } else | ||
425 | device->blocks = end_block; | ||
300 | device->bp_block = bsize; | 426 | device->bp_block = bsize; |
301 | device->s2b_shift = 0; /* bits to shift 512 to get a block */ | 427 | device->s2b_shift = 0; /* bits to shift 512 to get a block */ |
302 | for (sb = 512; sb < bsize; sb = sb << 1) | 428 | for (sb = 512; sb < bsize; sb = sb << 1) |
303 | device->s2b_shift++; | 429 | device->s2b_shift++; |
304 | 430 | ||
305 | DEV_MESSAGE(KERN_INFO, device, | 431 | DEV_MESSAGE(KERN_INFO, device, |
306 | "capacity (%dkB blks): %ldkB", | 432 | "(%ld B/blk): %ldkB", |
307 | (device->bp_block >> 10), | 433 | (unsigned long) device->bp_block, |
308 | (device->blocks << device->s2b_shift) >> 1); | 434 | (unsigned long) (device->blocks << |
435 | device->s2b_shift) >> 1); | ||
309 | rc = 0; | 436 | rc = 0; |
310 | } else { | ||
311 | if (bsize > PAGE_SIZE) | ||
312 | DEV_MESSAGE(KERN_WARNING, device, "%s", | ||
313 | "DIAG access failed"); | ||
314 | else | ||
315 | DEV_MESSAGE(KERN_WARNING, device, "%s", | ||
316 | "volume is not CMS formatted"); | ||
317 | rc = -EMEDIUMTYPE; | ||
318 | } | 437 | } |
319 | free_page((long) label); | 438 | free_page((long) label); |
320 | return rc; | 439 | return rc; |
321 | } | 440 | } |
322 | 441 | ||
442 | /* Fill in virtual disk geometry for device. Return zero on success, non-zero | ||
443 | * otherwise. */ | ||
323 | static int | 444 | static int |
324 | dasd_diag_fill_geometry(struct dasd_device *device, struct hd_geometry *geo) | 445 | dasd_diag_fill_geometry(struct dasd_device *device, struct hd_geometry *geo) |
325 | { | 446 | { |
@@ -349,6 +470,8 @@ dasd_diag_erp_postaction(struct dasd_ccw_req * cqr) | |||
349 | return dasd_default_erp_postaction; | 470 | return dasd_default_erp_postaction; |
350 | } | 471 | } |
351 | 472 | ||
473 | /* Create DASD request from block device request. Return pointer to new | ||
474 | * request on success, ERR_PTR otherwise. */ | ||
352 | static struct dasd_ccw_req * | 475 | static struct dasd_ccw_req * |
353 | dasd_diag_build_cp(struct dasd_device * device, struct request *req) | 476 | dasd_diag_build_cp(struct dasd_device * device, struct request *req) |
354 | { | 477 | { |
@@ -358,9 +481,9 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req) | |||
358 | struct bio *bio; | 481 | struct bio *bio; |
359 | struct bio_vec *bv; | 482 | struct bio_vec *bv; |
360 | char *dst; | 483 | char *dst; |
361 | int count, datasize; | 484 | unsigned int count, datasize; |
362 | sector_t recid, first_rec, last_rec; | 485 | sector_t recid, first_rec, last_rec; |
363 | unsigned blksize, off; | 486 | unsigned int blksize, off; |
364 | unsigned char rw_cmd; | 487 | unsigned char rw_cmd; |
365 | int i; | 488 | int i; |
366 | 489 | ||
@@ -413,13 +536,16 @@ dasd_diag_build_cp(struct dasd_device * device, struct request *req) | |||
413 | } | 536 | } |
414 | } | 537 | } |
415 | } | 538 | } |
539 | cqr->retries = DIAG_MAX_RETRIES; | ||
416 | cqr->buildclk = get_clock(); | 540 | cqr->buildclk = get_clock(); |
417 | cqr->device = device; | 541 | cqr->device = device; |
418 | cqr->expires = 50 * HZ; /* 50 seconds */ | 542 | cqr->expires = DIAG_TIMEOUT; |
419 | cqr->status = DASD_CQR_FILLED; | 543 | cqr->status = DASD_CQR_FILLED; |
420 | return cqr; | 544 | return cqr; |
421 | } | 545 | } |
422 | 546 | ||
547 | /* Release DASD request. Return non-zero if request was successful, zero | ||
548 | * otherwise. */ | ||
423 | static int | 549 | static int |
424 | dasd_diag_free_cp(struct dasd_ccw_req *cqr, struct request *req) | 550 | dasd_diag_free_cp(struct dasd_ccw_req *cqr, struct request *req) |
425 | { | 551 | { |
@@ -430,6 +556,7 @@ dasd_diag_free_cp(struct dasd_ccw_req *cqr, struct request *req) | |||
430 | return status; | 556 | return status; |
431 | } | 557 | } |
432 | 558 | ||
559 | /* Fill in IOCTL data for device. */ | ||
433 | static int | 560 | static int |
434 | dasd_diag_fill_info(struct dasd_device * device, | 561 | dasd_diag_fill_info(struct dasd_device * device, |
435 | struct dasd_information2_t * info) | 562 | struct dasd_information2_t * info) |
@@ -437,7 +564,7 @@ dasd_diag_fill_info(struct dasd_device * device, | |||
437 | struct dasd_diag_private *private; | 564 | struct dasd_diag_private *private; |
438 | 565 | ||
439 | private = (struct dasd_diag_private *) device->private; | 566 | private = (struct dasd_diag_private *) device->private; |
440 | info->label_block = private->pt_block; | 567 | info->label_block = (unsigned int) private->pt_block; |
441 | info->FBA_layout = 1; | 568 | info->FBA_layout = 1; |
442 | info->format = DASD_FORMAT_LDL; | 569 | info->format = DASD_FORMAT_LDL; |
443 | info->characteristics_size = sizeof (struct dasd_diag_characteristics); | 570 | info->characteristics_size = sizeof (struct dasd_diag_characteristics); |
@@ -456,26 +583,15 @@ dasd_diag_dump_sense(struct dasd_device *device, struct dasd_ccw_req * req, | |||
456 | "dump sense not available for DIAG data"); | 583 | "dump sense not available for DIAG data"); |
457 | } | 584 | } |
458 | 585 | ||
459 | /* | ||
460 | * max_blocks is dependent on the amount of storage that is available | ||
461 | * in the static io buffer for each device. Currently each device has | ||
462 | * 8192 bytes (=2 pages). dasd diag is only relevant for 31 bit. | ||
463 | * The struct dasd_ccw_req has 96 bytes, the struct dasd_diag_req has | ||
464 | * 8 bytes and the struct dasd_diag_bio for each block has 16 bytes. | ||
465 | * That makes: | ||
466 | * (8192 - 96 - 8) / 16 = 505.5 blocks at maximum. | ||
467 | * We want to fit two into the available memory so that we can immediately | ||
468 | * start the next request if one finishes off. That makes 252.75 blocks | ||
469 | * for one request. Give a little safety and the result is 240. | ||
470 | */ | ||
471 | struct dasd_discipline dasd_diag_discipline = { | 586 | struct dasd_discipline dasd_diag_discipline = { |
472 | .owner = THIS_MODULE, | 587 | .owner = THIS_MODULE, |
473 | .name = "DIAG", | 588 | .name = "DIAG", |
474 | .ebcname = "DIAG", | 589 | .ebcname = "DIAG", |
475 | .max_blocks = 240, | 590 | .max_blocks = DIAG_MAX_BLOCKS, |
476 | .check_device = dasd_diag_check_device, | 591 | .check_device = dasd_diag_check_device, |
477 | .fill_geometry = dasd_diag_fill_geometry, | 592 | .fill_geometry = dasd_diag_fill_geometry, |
478 | .start_IO = dasd_start_diag, | 593 | .start_IO = dasd_start_diag, |
594 | .term_IO = dasd_diag_term_IO, | ||
479 | .examine_error = dasd_diag_examine_error, | 595 | .examine_error = dasd_diag_examine_error, |
480 | .erp_action = dasd_diag_erp_action, | 596 | .erp_action = dasd_diag_erp_action, |
481 | .erp_postaction = dasd_diag_erp_postaction, | 597 | .erp_postaction = dasd_diag_erp_postaction, |
@@ -493,7 +609,7 @@ dasd_diag_init(void) | |||
493 | "Machine is not VM: %s " | 609 | "Machine is not VM: %s " |
494 | "discipline not initializing", | 610 | "discipline not initializing", |
495 | dasd_diag_discipline.name); | 611 | dasd_diag_discipline.name); |
496 | return -EINVAL; | 612 | return -ENODEV; |
497 | } | 613 | } |
498 | ASCEBC(dasd_diag_discipline.ebcname, 4); | 614 | ASCEBC(dasd_diag_discipline.ebcname, 4); |
499 | 615 | ||
@@ -506,13 +622,6 @@ dasd_diag_init(void) | |||
506 | static void __exit | 622 | static void __exit |
507 | dasd_diag_cleanup(void) | 623 | dasd_diag_cleanup(void) |
508 | { | 624 | { |
509 | if (!MACHINE_IS_VM) { | ||
510 | MESSAGE_LOG(KERN_INFO, | ||
511 | "Machine is not VM: %s " | ||
512 | "discipline not cleaned", | ||
513 | dasd_diag_discipline.name); | ||
514 | return; | ||
515 | } | ||
516 | unregister_external_interrupt(0x2603, dasd_ext_handler); | 625 | unregister_external_interrupt(0x2603, dasd_ext_handler); |
517 | ctl_clear_bit(0, 9); | 626 | ctl_clear_bit(0, 9); |
518 | dasd_diag_discipline_pointer = NULL; | 627 | dasd_diag_discipline_pointer = NULL; |
@@ -520,22 +629,3 @@ dasd_diag_cleanup(void) | |||
520 | 629 | ||
521 | module_init(dasd_diag_init); | 630 | module_init(dasd_diag_init); |
522 | module_exit(dasd_diag_cleanup); | 631 | module_exit(dasd_diag_cleanup); |
523 | |||
524 | /* | ||
525 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
526 | * Emacs will notice this stuff at the end of the file and automatically | ||
527 | * adjust the settings for this buffer only. This must remain at the end | ||
528 | * of the file. | ||
529 | * --------------------------------------------------------------------------- | ||
530 | * Local variables: | ||
531 | * c-indent-level: 4 | ||
532 | * c-brace-imaginary-offset: 0 | ||
533 | * c-brace-offset: -4 | ||
534 | * c-argdecl-indent: 4 | ||
535 | * c-label-offset: -4 | ||
536 | * c-continued-statement-offset: 4 | ||
537 | * c-continued-brace-offset: 0 | ||
538 | * indent-tabs-mode: 1 | ||
539 | * tab-width: 8 | ||
540 | * End: | ||
541 | */ | ||
diff --git a/drivers/s390/block/dasd_diag.h b/drivers/s390/block/dasd_diag.h index a0c38e303979..b26eb28df4bf 100644 --- a/drivers/s390/block/dasd_diag.h +++ b/drivers/s390/block/dasd_diag.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Bugreports.to..: <Linux390@de.ibm.com> | 6 | * Bugreports.to..: <Linux390@de.ibm.com> |
7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 | 7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 |
8 | * | 8 | * |
9 | * $Revision: 1.6 $ | 9 | * $Revision: 1.7 $ |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #define MDSK_WRITE_REQ 0x01 | 12 | #define MDSK_WRITE_REQ 0x01 |
@@ -19,6 +19,18 @@ | |||
19 | #define DEV_CLASS_FBA 0x01 | 19 | #define DEV_CLASS_FBA 0x01 |
20 | #define DEV_CLASS_ECKD 0x04 | 20 | #define DEV_CLASS_ECKD 0x04 |
21 | 21 | ||
22 | #define DASD_DIAG_LC_INT_CODE 132 | ||
23 | #define DASD_DIAG_LC_INT_STATUS 133 | ||
24 | #define DASD_DIAG_LC_INT_PARM_31BIT 128 | ||
25 | #define DASD_DIAG_LC_INT_PARM_64BIT 4536 | ||
26 | #define DASD_DIAG_CODE_31BIT 0x03 | ||
27 | #define DASD_DIAG_CODE_64BIT 0x07 | ||
28 | |||
29 | #define DASD_DIAG_RWFLAG_ASYNC 0x02 | ||
30 | #define DASD_DIAG_RWFLAG_NOCACHE 0x01 | ||
31 | |||
32 | #define DASD_DIAG_FLAGA_FORMAT_64BIT 0x80 | ||
33 | |||
22 | struct dasd_diag_characteristics { | 34 | struct dasd_diag_characteristics { |
23 | u16 dev_nr; | 35 | u16 dev_nr; |
24 | u16 rdc_len; | 36 | u16 rdc_len; |
@@ -32,35 +44,106 @@ struct dasd_diag_characteristics { | |||
32 | u8 rdev_features; | 44 | u8 rdev_features; |
33 | } __attribute__ ((packed, aligned(4))); | 45 | } __attribute__ ((packed, aligned(4))); |
34 | 46 | ||
47 | struct dasd_diag_cms_label { | ||
48 | u8 label_id[4]; | ||
49 | u8 vol_id[6]; | ||
50 | u16 version_id; | ||
51 | u32 block_size; | ||
52 | u32 origin_ptr; | ||
53 | u32 usable_count; | ||
54 | u32 formatted_count; | ||
55 | u32 block_count; | ||
56 | u32 used_count; | ||
57 | u32 fst_size; | ||
58 | u32 fst_count; | ||
59 | u8 format_date[6]; | ||
60 | u8 reserved1[2]; | ||
61 | u32 disk_offset; | ||
62 | u32 map_block; | ||
63 | u32 hblk_disp; | ||
64 | u32 user_disp; | ||
65 | u8 reserved2[4]; | ||
66 | u8 segment_name[8]; | ||
67 | } __attribute__ ((packed)); | ||
68 | |||
69 | #ifdef CONFIG_ARCH_S390X | ||
70 | #define DASD_DIAG_FLAGA_DEFAULT DASD_DIAG_FLAGA_FORMAT_64BIT | ||
71 | |||
72 | typedef u64 blocknum_t; | ||
73 | typedef s64 sblocknum_t; | ||
74 | |||
75 | struct dasd_diag_bio { | ||
76 | u8 type; | ||
77 | u8 status; | ||
78 | u8 spare1[2]; | ||
79 | u32 alet; | ||
80 | blocknum_t block_number; | ||
81 | u64 buffer; | ||
82 | } __attribute__ ((packed, aligned(8))); | ||
83 | |||
84 | struct dasd_diag_init_io { | ||
85 | u16 dev_nr; | ||
86 | u8 flaga; | ||
87 | u8 spare1[21]; | ||
88 | u32 block_size; | ||
89 | u8 spare2[4]; | ||
90 | blocknum_t offset; | ||
91 | sblocknum_t start_block; | ||
92 | blocknum_t end_block; | ||
93 | u8 spare3[8]; | ||
94 | } __attribute__ ((packed, aligned(8))); | ||
95 | |||
96 | struct dasd_diag_rw_io { | ||
97 | u16 dev_nr; | ||
98 | u8 flaga; | ||
99 | u8 spare1[21]; | ||
100 | u8 key; | ||
101 | u8 flags; | ||
102 | u8 spare2[2]; | ||
103 | u32 block_count; | ||
104 | u32 alet; | ||
105 | u8 spare3[4]; | ||
106 | u64 interrupt_params; | ||
107 | u64 bio_list; | ||
108 | u8 spare4[8]; | ||
109 | } __attribute__ ((packed, aligned(8))); | ||
110 | #else /* CONFIG_ARCH_S390X */ | ||
111 | #define DASD_DIAG_FLAGA_DEFAULT 0x0 | ||
112 | |||
113 | typedef u32 blocknum_t; | ||
114 | typedef s32 sblocknum_t; | ||
115 | |||
35 | struct dasd_diag_bio { | 116 | struct dasd_diag_bio { |
36 | u8 type; | 117 | u8 type; |
37 | u8 status; | 118 | u8 status; |
38 | u16 spare1; | 119 | u16 spare1; |
39 | u32 block_number; | 120 | blocknum_t block_number; |
40 | u32 alet; | 121 | u32 alet; |
41 | u32 buffer; | 122 | u32 buffer; |
42 | } __attribute__ ((packed, aligned(8))); | 123 | } __attribute__ ((packed, aligned(8))); |
43 | 124 | ||
44 | struct dasd_diag_init_io { | 125 | struct dasd_diag_init_io { |
45 | u16 dev_nr; | 126 | u16 dev_nr; |
46 | u16 spare1[11]; | 127 | u8 flaga; |
128 | u8 spare1[21]; | ||
47 | u32 block_size; | 129 | u32 block_size; |
48 | u32 offset; | 130 | blocknum_t offset; |
49 | u32 start_block; | 131 | sblocknum_t start_block; |
50 | u32 end_block; | 132 | blocknum_t end_block; |
51 | u32 spare2[6]; | 133 | u8 spare2[24]; |
52 | } __attribute__ ((packed, aligned(8))); | 134 | } __attribute__ ((packed, aligned(8))); |
53 | 135 | ||
54 | struct dasd_diag_rw_io { | 136 | struct dasd_diag_rw_io { |
55 | u16 dev_nr; | 137 | u16 dev_nr; |
56 | u16 spare1[11]; | 138 | u8 flaga; |
139 | u8 spare1[21]; | ||
57 | u8 key; | 140 | u8 key; |
58 | u8 flags; | 141 | u8 flags; |
59 | u16 spare2; | 142 | u8 spare2[2]; |
60 | u32 block_count; | 143 | u32 block_count; |
61 | u32 alet; | 144 | u32 alet; |
62 | u32 bio_list; | 145 | u32 bio_list; |
63 | u32 interrupt_params; | 146 | u32 interrupt_params; |
64 | u32 spare3[5]; | 147 | u8 spare3[20]; |
65 | } __attribute__ ((packed, aligned(8))); | 148 | } __attribute__ ((packed, aligned(8))); |
66 | 149 | #endif /* CONFIG_ARCH_S390X */ | |
diff --git a/drivers/s390/block/dasd_genhd.c b/drivers/s390/block/dasd_genhd.c index 96c49349701f..a601c9a33541 100644 --- a/drivers/s390/block/dasd_genhd.c +++ b/drivers/s390/block/dasd_genhd.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * gendisk related functions for the dasd driver. | 10 | * gendisk related functions for the dasd driver. |
11 | * | 11 | * |
12 | * $Revision: 1.50 $ | 12 | * $Revision: 1.51 $ |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
@@ -31,16 +31,12 @@ int | |||
31 | dasd_gendisk_alloc(struct dasd_device *device) | 31 | dasd_gendisk_alloc(struct dasd_device *device) |
32 | { | 32 | { |
33 | struct gendisk *gdp; | 33 | struct gendisk *gdp; |
34 | int len, feature_ro; | 34 | int len; |
35 | 35 | ||
36 | /* Make sure the minor for this device exists. */ | 36 | /* Make sure the minor for this device exists. */ |
37 | if (device->devindex >= DASD_PER_MAJOR) | 37 | if (device->devindex >= DASD_PER_MAJOR) |
38 | return -EBUSY; | 38 | return -EBUSY; |
39 | 39 | ||
40 | feature_ro = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY); | ||
41 | if (feature_ro < 0) | ||
42 | return feature_ro; | ||
43 | |||
44 | gdp = alloc_disk(1 << DASD_PARTN_BITS); | 40 | gdp = alloc_disk(1 << DASD_PARTN_BITS); |
45 | if (!gdp) | 41 | if (!gdp) |
46 | return -ENOMEM; | 42 | return -ENOMEM; |
@@ -75,7 +71,7 @@ dasd_gendisk_alloc(struct dasd_device *device) | |||
75 | 71 | ||
76 | sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id); | 72 | sprintf(gdp->devfs_name, "dasd/%s", device->cdev->dev.bus_id); |
77 | 73 | ||
78 | if (feature_ro) | 74 | if (device->features & DASD_FEATURE_READONLY) |
79 | set_disk_ro(gdp, 1); | 75 | set_disk_ro(gdp, 1); |
80 | gdp->private_data = device; | 76 | gdp->private_data = device; |
81 | gdp->queue = device->request_queue; | 77 | gdp->queue = device->request_queue; |
diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index a9f38b235981..9fab04f3056d 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h | |||
@@ -6,7 +6,7 @@ | |||
6 | * Bugreports.to..: <Linux390@de.ibm.com> | 6 | * Bugreports.to..: <Linux390@de.ibm.com> |
7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 | 7 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999,2000 |
8 | * | 8 | * |
9 | * $Revision: 1.64 $ | 9 | * $Revision: 1.65 $ |
10 | */ | 10 | */ |
11 | 11 | ||
12 | #ifndef DASD_INT_H | 12 | #ifndef DASD_INT_H |
@@ -286,6 +286,7 @@ struct dasd_device { | |||
286 | unsigned int bp_block; /* bytes per block */ | 286 | unsigned int bp_block; /* bytes per block */ |
287 | unsigned int s2b_shift; /* log2 (bp_block/512) */ | 287 | unsigned int s2b_shift; /* log2 (bp_block/512) */ |
288 | unsigned long flags; /* per device flags */ | 288 | unsigned long flags; /* per device flags */ |
289 | unsigned short features; /* copy of devmap-features (read-only!) */ | ||
289 | 290 | ||
290 | /* Device discipline stuff. */ | 291 | /* Device discipline stuff. */ |
291 | struct dasd_discipline *discipline; | 292 | struct dasd_discipline *discipline; |
diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_ioctl.c index 980c555aa538..789595b3fa09 100644 --- a/drivers/s390/block/dasd_ioctl.c +++ b/drivers/s390/block/dasd_ioctl.c | |||
@@ -7,7 +7,7 @@ | |||
7 | * Bugreports.to..: <Linux390@de.ibm.com> | 7 | * Bugreports.to..: <Linux390@de.ibm.com> |
8 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 | 8 | * (C) IBM Corporation, IBM Deutschland Entwicklung GmbH, 1999-2001 |
9 | * | 9 | * |
10 | * $Revision: 1.45 $ | 10 | * $Revision: 1.47 $ |
11 | * | 11 | * |
12 | * i/o controls for the dasd driver. | 12 | * i/o controls for the dasd driver. |
13 | */ | 13 | */ |
@@ -296,7 +296,6 @@ dasd_ioctl_format(struct block_device *bdev, int no, long args) | |||
296 | { | 296 | { |
297 | struct dasd_device *device; | 297 | struct dasd_device *device; |
298 | struct format_data_t fdata; | 298 | struct format_data_t fdata; |
299 | int feature_ro; | ||
300 | 299 | ||
301 | if (!capable(CAP_SYS_ADMIN)) | 300 | if (!capable(CAP_SYS_ADMIN)) |
302 | return -EACCES; | 301 | return -EACCES; |
@@ -308,10 +307,7 @@ dasd_ioctl_format(struct block_device *bdev, int no, long args) | |||
308 | if (device == NULL) | 307 | if (device == NULL) |
309 | return -ENODEV; | 308 | return -ENODEV; |
310 | 309 | ||
311 | feature_ro = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY); | 310 | if (device->features & DASD_FEATURE_READONLY) |
312 | if (feature_ro < 0) | ||
313 | return feature_ro; | ||
314 | if (feature_ro) | ||
315 | return -EROFS; | 311 | return -EROFS; |
316 | if (copy_from_user(&fdata, (void __user *) args, | 312 | if (copy_from_user(&fdata, (void __user *) args, |
317 | sizeof (struct format_data_t))) | 313 | sizeof (struct format_data_t))) |
@@ -384,7 +380,7 @@ dasd_ioctl_information(struct block_device *bdev, int no, long args) | |||
384 | struct dasd_device *device; | 380 | struct dasd_device *device; |
385 | struct dasd_information2_t *dasd_info; | 381 | struct dasd_information2_t *dasd_info; |
386 | unsigned long flags; | 382 | unsigned long flags; |
387 | int rc, feature_ro; | 383 | int rc; |
388 | struct ccw_device *cdev; | 384 | struct ccw_device *cdev; |
389 | 385 | ||
390 | device = bdev->bd_disk->private_data; | 386 | device = bdev->bd_disk->private_data; |
@@ -394,10 +390,6 @@ dasd_ioctl_information(struct block_device *bdev, int no, long args) | |||
394 | if (!device->discipline->fill_info) | 390 | if (!device->discipline->fill_info) |
395 | return -EINVAL; | 391 | return -EINVAL; |
396 | 392 | ||
397 | feature_ro = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY); | ||
398 | if (feature_ro < 0) | ||
399 | return feature_ro; | ||
400 | |||
401 | dasd_info = kmalloc(sizeof(struct dasd_information2_t), GFP_KERNEL); | 393 | dasd_info = kmalloc(sizeof(struct dasd_information2_t), GFP_KERNEL); |
402 | if (dasd_info == NULL) | 394 | if (dasd_info == NULL) |
403 | return -ENOMEM; | 395 | return -ENOMEM; |
@@ -427,7 +419,8 @@ dasd_ioctl_information(struct block_device *bdev, int no, long args) | |||
427 | (dasd_check_blocksize(device->bp_block))) | 419 | (dasd_check_blocksize(device->bp_block))) |
428 | dasd_info->format = DASD_FORMAT_NONE; | 420 | dasd_info->format = DASD_FORMAT_NONE; |
429 | 421 | ||
430 | dasd_info->features |= feature_ro; | 422 | dasd_info->features |= |
423 | ((device->features & DASD_FEATURE_READONLY) != 0); | ||
431 | 424 | ||
432 | if (device->discipline) | 425 | if (device->discipline) |
433 | memcpy(dasd_info->type, device->discipline->name, 4); | 426 | memcpy(dasd_info->type, device->discipline->name, 4); |
diff --git a/drivers/s390/block/dasd_proc.c b/drivers/s390/block/dasd_proc.c index 43c34f8c5e68..fff9020d4886 100644 --- a/drivers/s390/block/dasd_proc.c +++ b/drivers/s390/block/dasd_proc.c | |||
@@ -9,7 +9,7 @@ | |||
9 | * | 9 | * |
10 | * /proc interface for the dasd driver. | 10 | * /proc interface for the dasd driver. |
11 | * | 11 | * |
12 | * $Revision: 1.32 $ | 12 | * $Revision: 1.33 $ |
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
@@ -55,7 +55,6 @@ dasd_devices_show(struct seq_file *m, void *v) | |||
55 | { | 55 | { |
56 | struct dasd_device *device; | 56 | struct dasd_device *device; |
57 | char *substr; | 57 | char *substr; |
58 | int feature; | ||
59 | 58 | ||
60 | device = dasd_device_from_devindex((unsigned long) v - 1); | 59 | device = dasd_device_from_devindex((unsigned long) v - 1); |
61 | if (IS_ERR(device)) | 60 | if (IS_ERR(device)) |
@@ -79,10 +78,7 @@ dasd_devices_show(struct seq_file *m, void *v) | |||
79 | else | 78 | else |
80 | seq_printf(m, " is ????????"); | 79 | seq_printf(m, " is ????????"); |
81 | /* Print devices features. */ | 80 | /* Print devices features. */ |
82 | feature = dasd_get_feature(device->cdev, DASD_FEATURE_READONLY); | 81 | substr = (device->features & DASD_FEATURE_READONLY) ? "(ro)" : " "; |
83 | if (feature < 0) | ||
84 | return 0; | ||
85 | substr = feature ? "(ro)" : " "; | ||
86 | seq_printf(m, "%4s: ", substr); | 82 | seq_printf(m, "%4s: ", substr); |
87 | /* Print device status information. */ | 83 | /* Print device status information. */ |
88 | switch ((device != NULL) ? device->state : -1) { | 84 | switch ((device != NULL) ? device->state : -1) { |
diff --git a/drivers/s390/char/raw3270.c b/drivers/s390/char/raw3270.c index d5eefeaba50c..328d9cbc56a3 100644 --- a/drivers/s390/char/raw3270.c +++ b/drivers/s390/char/raw3270.c | |||
@@ -632,12 +632,9 @@ __raw3270_size_device(struct raw3270 *rp) | |||
632 | raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data); | 632 | raw3270_init_request.ccw.cda = (__u32) __pa(raw3270_init_data); |
633 | 633 | ||
634 | rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request); | 634 | rc = raw3270_start_init(rp, &raw3270_init_view, &raw3270_init_request); |
635 | if (rc) { | 635 | if (rc) |
636 | /* Check error cases: -ERESTARTSYS, -EIO and -EOPNOTSUPP */ | 636 | /* Check error cases: -ERESTARTSYS, -EIO and -EOPNOTSUPP */ |
637 | if (rc == -EOPNOTSUPP && MACHINE_IS_VM) | ||
638 | return __raw3270_size_device_vm(rp); | ||
639 | return rc; | 637 | return rc; |
640 | } | ||
641 | 638 | ||
642 | /* Wait for attention interrupt. */ | 639 | /* Wait for attention interrupt. */ |
643 | #ifdef CONFIG_TN3270_CONSOLE | 640 | #ifdef CONFIG_TN3270_CONSOLE |
@@ -695,7 +692,10 @@ raw3270_size_device(struct raw3270 *rp) | |||
695 | down(&raw3270_init_sem); | 692 | down(&raw3270_init_sem); |
696 | rp->view = &raw3270_init_view; | 693 | rp->view = &raw3270_init_view; |
697 | raw3270_init_view.dev = rp; | 694 | raw3270_init_view.dev = rp; |
698 | rc = __raw3270_size_device(rp); | 695 | if (MACHINE_IS_VM) |
696 | rc = __raw3270_size_device_vm(rp); | ||
697 | else | ||
698 | rc = __raw3270_size_device(rp); | ||
699 | raw3270_init_view.dev = 0; | 699 | raw3270_init_view.dev = 0; |
700 | rp->view = 0; | 700 | rp->view = 0; |
701 | up(&raw3270_init_sem); | 701 | up(&raw3270_init_sem); |
@@ -710,6 +710,12 @@ raw3270_size_device(struct raw3270 *rp) | |||
710 | rp->model = 4; | 710 | rp->model = 4; |
711 | if (rp->rows == 27 && rp->cols == 132) | 711 | if (rp->rows == 27 && rp->cols == 132) |
712 | rp->model = 5; | 712 | rp->model = 5; |
713 | } else { | ||
714 | /* Couldn't detect size. Use default model 2. */ | ||
715 | rp->model = 2; | ||
716 | rp->rows = 24; | ||
717 | rp->cols = 80; | ||
718 | return 0; | ||
713 | } | 719 | } |
714 | return rc; | 720 | return rc; |
715 | } | 721 | } |
diff --git a/drivers/s390/cio/cio.c b/drivers/s390/cio/cio.c index ea813bdce1d6..185bc73c3ecd 100644 --- a/drivers/s390/cio/cio.c +++ b/drivers/s390/cio/cio.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/s390/cio/cio.c | 2 | * drivers/s390/cio/cio.c |
3 | * S/390 common I/O routines -- low level i/o calls | 3 | * S/390 common I/O routines -- low level i/o calls |
4 | * $Revision: 1.134 $ | 4 | * $Revision: 1.135 $ |
5 | * | 5 | * |
6 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH, |
7 | * IBM Corporation | 7 | * IBM Corporation |
@@ -815,8 +815,9 @@ __clear_subchannel_easy(unsigned int schid) | |||
815 | struct tpi_info ti; | 815 | struct tpi_info ti; |
816 | 816 | ||
817 | if (tpi(&ti)) { | 817 | if (tpi(&ti)) { |
818 | tsch(schid, (struct irb *)__LC_IRB); | 818 | tsch(ti.irq, (struct irb *)__LC_IRB); |
819 | return 0; | 819 | if (ti.irq == schid) |
820 | return 0; | ||
820 | } | 821 | } |
821 | udelay(100); | 822 | udelay(100); |
822 | } | 823 | } |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index ee7a05e0c3ba..fbe4202a3f6f 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
14 | 14 | ||
15 | #include <asm/ccwdev.h> | 15 | #include <asm/ccwdev.h> |
16 | #include <asm/qdio.h> | 16 | #include <asm/cio.h> |
17 | 17 | ||
18 | #include "cio.h" | 18 | #include "cio.h" |
19 | #include "cio_debug.h" | 19 | #include "cio_debug.h" |
@@ -21,7 +21,6 @@ | |||
21 | #include "device.h" | 21 | #include "device.h" |
22 | #include "chsc.h" | 22 | #include "chsc.h" |
23 | #include "ioasm.h" | 23 | #include "ioasm.h" |
24 | #include "qdio.h" | ||
25 | 24 | ||
26 | int | 25 | int |
27 | device_is_online(struct subchannel *sch) | 26 | device_is_online(struct subchannel *sch) |
diff --git a/drivers/s390/cio/device_ops.c b/drivers/s390/cio/device_ops.c index 02d01a0de16c..ad3fe5aeb663 100644 --- a/drivers/s390/cio/device_ops.c +++ b/drivers/s390/cio/device_ops.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * drivers/s390/cio/device_ops.c | 2 | * drivers/s390/cio/device_ops.c |
3 | * | 3 | * |
4 | * $Revision: 1.56 $ | 4 | * $Revision: 1.57 $ |
5 | * | 5 | * |
6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, | 6 | * Copyright (C) 2002 IBM Deutschland Entwicklung GmbH, |
7 | * IBM Corporation | 7 | * IBM Corporation |
@@ -19,14 +19,12 @@ | |||
19 | 19 | ||
20 | #include <asm/ccwdev.h> | 20 | #include <asm/ccwdev.h> |
21 | #include <asm/idals.h> | 21 | #include <asm/idals.h> |
22 | #include <asm/qdio.h> | ||
23 | 22 | ||
24 | #include "cio.h" | 23 | #include "cio.h" |
25 | #include "cio_debug.h" | 24 | #include "cio_debug.h" |
26 | #include "css.h" | 25 | #include "css.h" |
27 | #include "chsc.h" | 26 | #include "chsc.h" |
28 | #include "device.h" | 27 | #include "device.h" |
29 | #include "qdio.h" | ||
30 | 28 | ||
31 | int | 29 | int |
32 | ccw_device_set_options(struct ccw_device *cdev, unsigned long flags) | 30 | ccw_device_set_options(struct ccw_device *cdev, unsigned long flags) |
diff --git a/drivers/s390/cio/ioasm.h b/drivers/s390/cio/ioasm.h index c874607d9a80..45480a2bc4c0 100644 --- a/drivers/s390/cio/ioasm.h +++ b/drivers/s390/cio/ioasm.h | |||
@@ -21,7 +21,7 @@ struct tpi_info { | |||
21 | * Some S390 specific IO instructions as inline | 21 | * Some S390 specific IO instructions as inline |
22 | */ | 22 | */ |
23 | 23 | ||
24 | extern __inline__ int stsch(int irq, volatile struct schib *addr) | 24 | static inline int stsch(int irq, volatile struct schib *addr) |
25 | { | 25 | { |
26 | int ccode; | 26 | int ccode; |
27 | 27 | ||
@@ -36,7 +36,7 @@ extern __inline__ int stsch(int irq, volatile struct schib *addr) | |||
36 | return ccode; | 36 | return ccode; |
37 | } | 37 | } |
38 | 38 | ||
39 | extern __inline__ int msch(int irq, volatile struct schib *addr) | 39 | static inline int msch(int irq, volatile struct schib *addr) |
40 | { | 40 | { |
41 | int ccode; | 41 | int ccode; |
42 | 42 | ||
@@ -51,7 +51,7 @@ extern __inline__ int msch(int irq, volatile struct schib *addr) | |||
51 | return ccode; | 51 | return ccode; |
52 | } | 52 | } |
53 | 53 | ||
54 | extern __inline__ int msch_err(int irq, volatile struct schib *addr) | 54 | static inline int msch_err(int irq, volatile struct schib *addr) |
55 | { | 55 | { |
56 | int ccode; | 56 | int ccode; |
57 | 57 | ||
@@ -79,7 +79,7 @@ extern __inline__ int msch_err(int irq, volatile struct schib *addr) | |||
79 | return ccode; | 79 | return ccode; |
80 | } | 80 | } |
81 | 81 | ||
82 | extern __inline__ int tsch(int irq, volatile struct irb *addr) | 82 | static inline int tsch(int irq, volatile struct irb *addr) |
83 | { | 83 | { |
84 | int ccode; | 84 | int ccode; |
85 | 85 | ||
@@ -94,7 +94,7 @@ extern __inline__ int tsch(int irq, volatile struct irb *addr) | |||
94 | return ccode; | 94 | return ccode; |
95 | } | 95 | } |
96 | 96 | ||
97 | extern __inline__ int tpi( volatile struct tpi_info *addr) | 97 | static inline int tpi( volatile struct tpi_info *addr) |
98 | { | 98 | { |
99 | int ccode; | 99 | int ccode; |
100 | 100 | ||
@@ -108,7 +108,7 @@ extern __inline__ int tpi( volatile struct tpi_info *addr) | |||
108 | return ccode; | 108 | return ccode; |
109 | } | 109 | } |
110 | 110 | ||
111 | extern __inline__ int ssch(int irq, volatile struct orb *addr) | 111 | static inline int ssch(int irq, volatile struct orb *addr) |
112 | { | 112 | { |
113 | int ccode; | 113 | int ccode; |
114 | 114 | ||
@@ -123,7 +123,7 @@ extern __inline__ int ssch(int irq, volatile struct orb *addr) | |||
123 | return ccode; | 123 | return ccode; |
124 | } | 124 | } |
125 | 125 | ||
126 | extern __inline__ int rsch(int irq) | 126 | static inline int rsch(int irq) |
127 | { | 127 | { |
128 | int ccode; | 128 | int ccode; |
129 | 129 | ||
@@ -138,7 +138,7 @@ extern __inline__ int rsch(int irq) | |||
138 | return ccode; | 138 | return ccode; |
139 | } | 139 | } |
140 | 140 | ||
141 | extern __inline__ int csch(int irq) | 141 | static inline int csch(int irq) |
142 | { | 142 | { |
143 | int ccode; | 143 | int ccode; |
144 | 144 | ||
@@ -153,7 +153,7 @@ extern __inline__ int csch(int irq) | |||
153 | return ccode; | 153 | return ccode; |
154 | } | 154 | } |
155 | 155 | ||
156 | extern __inline__ int hsch(int irq) | 156 | static inline int hsch(int irq) |
157 | { | 157 | { |
158 | int ccode; | 158 | int ccode; |
159 | 159 | ||
@@ -168,7 +168,7 @@ extern __inline__ int hsch(int irq) | |||
168 | return ccode; | 168 | return ccode; |
169 | } | 169 | } |
170 | 170 | ||
171 | extern __inline__ int xsch(int irq) | 171 | static inline int xsch(int irq) |
172 | { | 172 | { |
173 | int ccode; | 173 | int ccode; |
174 | 174 | ||
@@ -183,7 +183,7 @@ extern __inline__ int xsch(int irq) | |||
183 | return ccode; | 183 | return ccode; |
184 | } | 184 | } |
185 | 185 | ||
186 | extern __inline__ int chsc(void *chsc_area) | 186 | static inline int chsc(void *chsc_area) |
187 | { | 187 | { |
188 | int cc; | 188 | int cc; |
189 | 189 | ||
@@ -198,7 +198,7 @@ extern __inline__ int chsc(void *chsc_area) | |||
198 | return cc; | 198 | return cc; |
199 | } | 199 | } |
200 | 200 | ||
201 | extern __inline__ int iac( void) | 201 | static inline int iac( void) |
202 | { | 202 | { |
203 | int ccode; | 203 | int ccode; |
204 | 204 | ||
@@ -210,7 +210,7 @@ extern __inline__ int iac( void) | |||
210 | return ccode; | 210 | return ccode; |
211 | } | 211 | } |
212 | 212 | ||
213 | extern __inline__ int rchp(int chpid) | 213 | static inline int rchp(int chpid) |
214 | { | 214 | { |
215 | int ccode; | 215 | int ccode; |
216 | 216 | ||
diff --git a/drivers/s390/crypto/z90common.h b/drivers/s390/crypto/z90common.h index bcabac7a7c46..e319e78b5ea2 100644 --- a/drivers/s390/crypto/z90common.h +++ b/drivers/s390/crypto/z90common.h | |||
@@ -27,7 +27,7 @@ | |||
27 | #ifndef _Z90COMMON_H_ | 27 | #ifndef _Z90COMMON_H_ |
28 | #define _Z90COMMON_H_ | 28 | #define _Z90COMMON_H_ |
29 | 29 | ||
30 | #define VERSION_Z90COMMON_H "$Revision: 1.16 $" | 30 | #define VERSION_Z90COMMON_H "$Revision: 1.17 $" |
31 | 31 | ||
32 | 32 | ||
33 | #define RESPBUFFSIZE 256 | 33 | #define RESPBUFFSIZE 256 |
@@ -164,5 +164,4 @@ struct CPRBX { | |||
164 | #define UMIN(a,b) ((a) < (b) ? (a) : (b)) | 164 | #define UMIN(a,b) ((a) < (b) ? (a) : (b)) |
165 | #define IS_EVEN(x) ((x) == (2 * ((x) / 2))) | 165 | #define IS_EVEN(x) ((x) == (2 * ((x) / 2))) |
166 | 166 | ||
167 | |||
168 | #endif | 167 | #endif |
diff --git a/drivers/s390/crypto/z90hardware.c b/drivers/s390/crypto/z90hardware.c index beb6a5e0da22..c215e0889736 100644 --- a/drivers/s390/crypto/z90hardware.c +++ b/drivers/s390/crypto/z90hardware.c | |||
@@ -32,7 +32,7 @@ | |||
32 | #include "z90crypt.h" | 32 | #include "z90crypt.h" |
33 | #include "z90common.h" | 33 | #include "z90common.h" |
34 | 34 | ||
35 | #define VERSION_Z90HARDWARE_C "$Revision: 1.33 $" | 35 | #define VERSION_Z90HARDWARE_C "$Revision: 1.34 $" |
36 | 36 | ||
37 | char z90hardware_version[] __initdata = | 37 | char z90hardware_version[] __initdata = |
38 | "z90hardware.o (" VERSION_Z90HARDWARE_C "/" | 38 | "z90hardware.o (" VERSION_Z90HARDWARE_C "/" |
@@ -283,48 +283,6 @@ struct type6_msg { | |||
283 | struct CPRB CPRB; | 283 | struct CPRB CPRB; |
284 | }; | 284 | }; |
285 | 285 | ||
286 | union request_msg { | ||
287 | union type4_msg t4msg; | ||
288 | struct type6_msg t6msg; | ||
289 | }; | ||
290 | |||
291 | struct request_msg_ext { | ||
292 | int q_nr; | ||
293 | unsigned char *psmid; | ||
294 | union request_msg reqMsg; | ||
295 | }; | ||
296 | |||
297 | struct type82_hdr { | ||
298 | unsigned char reserved1; | ||
299 | unsigned char type; | ||
300 | unsigned char reserved2[2]; | ||
301 | unsigned char reply_code; | ||
302 | unsigned char reserved3[3]; | ||
303 | }; | ||
304 | |||
305 | #define TYPE82_RSP_CODE 0x82 | ||
306 | |||
307 | #define REPLY_ERROR_MACHINE_FAILURE 0x10 | ||
308 | #define REPLY_ERROR_PREEMPT_FAILURE 0x12 | ||
309 | #define REPLY_ERROR_CHECKPT_FAILURE 0x14 | ||
310 | #define REPLY_ERROR_MESSAGE_TYPE 0x20 | ||
311 | #define REPLY_ERROR_INVALID_COMM_CD 0x21 | ||
312 | #define REPLY_ERROR_INVALID_MSG_LEN 0x23 | ||
313 | #define REPLY_ERROR_RESERVD_FIELD 0x24 | ||
314 | #define REPLY_ERROR_FORMAT_FIELD 0x29 | ||
315 | #define REPLY_ERROR_INVALID_COMMAND 0x30 | ||
316 | #define REPLY_ERROR_MALFORMED_MSG 0x40 | ||
317 | #define REPLY_ERROR_RESERVED_FIELDO 0x50 | ||
318 | #define REPLY_ERROR_WORD_ALIGNMENT 0x60 | ||
319 | #define REPLY_ERROR_MESSAGE_LENGTH 0x80 | ||
320 | #define REPLY_ERROR_OPERAND_INVALID 0x82 | ||
321 | #define REPLY_ERROR_OPERAND_SIZE 0x84 | ||
322 | #define REPLY_ERROR_EVEN_MOD_IN_OPND 0x85 | ||
323 | #define REPLY_ERROR_RESERVED_FIELD 0x88 | ||
324 | #define REPLY_ERROR_TRANSPORT_FAIL 0x90 | ||
325 | #define REPLY_ERROR_PACKET_TRUNCATED 0xA0 | ||
326 | #define REPLY_ERROR_ZERO_BUFFER_LEN 0xB0 | ||
327 | |||
328 | struct type86_hdr { | 286 | struct type86_hdr { |
329 | unsigned char reserved1; | 287 | unsigned char reserved1; |
330 | unsigned char type; | 288 | unsigned char type; |
@@ -338,7 +296,7 @@ struct type86_hdr { | |||
338 | #define TYPE86_FMT2 0x02 | 296 | #define TYPE86_FMT2 0x02 |
339 | 297 | ||
340 | struct type86_fmt2_msg { | 298 | struct type86_fmt2_msg { |
341 | struct type86_hdr hdr; | 299 | struct type86_hdr header; |
342 | unsigned char reserved[4]; | 300 | unsigned char reserved[4]; |
343 | unsigned char apfs[4]; | 301 | unsigned char apfs[4]; |
344 | unsigned int count1; | 302 | unsigned int count1; |
@@ -538,6 +496,8 @@ static struct function_and_rules_block static_pke_function_and_rulesX = { | |||
538 | {'M','R','P',' ',' ',' ',' ',' '} | 496 | {'M','R','P',' ',' ',' ',' ',' '} |
539 | }; | 497 | }; |
540 | 498 | ||
499 | static unsigned char static_PKE_function_code[2] = {0x50, 0x4B}; | ||
500 | |||
541 | struct T6_keyBlock_hdrX { | 501 | struct T6_keyBlock_hdrX { |
542 | unsigned short blen; | 502 | unsigned short blen; |
543 | unsigned short ulen; | 503 | unsigned short ulen; |
@@ -688,9 +648,38 @@ static struct cca_public_sec static_cca_pub_sec = { | |||
688 | #define RESPONSE_CPRB_SIZE 0x000006B8 | 648 | #define RESPONSE_CPRB_SIZE 0x000006B8 |
689 | #define RESPONSE_CPRBX_SIZE 0x00000724 | 649 | #define RESPONSE_CPRBX_SIZE 0x00000724 |
690 | 650 | ||
691 | #define CALLER_HEADER 12 | 651 | struct error_hdr { |
652 | unsigned char reserved1; | ||
653 | unsigned char type; | ||
654 | unsigned char reserved2[2]; | ||
655 | unsigned char reply_code; | ||
656 | unsigned char reserved3[3]; | ||
657 | }; | ||
692 | 658 | ||
693 | static unsigned char static_PKE_function_code[2] = {0x50, 0x4B}; | 659 | #define TYPE82_RSP_CODE 0x82 |
660 | |||
661 | #define REP82_ERROR_MACHINE_FAILURE 0x10 | ||
662 | #define REP82_ERROR_PREEMPT_FAILURE 0x12 | ||
663 | #define REP82_ERROR_CHECKPT_FAILURE 0x14 | ||
664 | #define REP82_ERROR_MESSAGE_TYPE 0x20 | ||
665 | #define REP82_ERROR_INVALID_COMM_CD 0x21 | ||
666 | #define REP82_ERROR_INVALID_MSG_LEN 0x23 | ||
667 | #define REP82_ERROR_RESERVD_FIELD 0x24 | ||
668 | #define REP82_ERROR_FORMAT_FIELD 0x29 | ||
669 | #define REP82_ERROR_INVALID_COMMAND 0x30 | ||
670 | #define REP82_ERROR_MALFORMED_MSG 0x40 | ||
671 | #define REP82_ERROR_RESERVED_FIELDO 0x50 | ||
672 | #define REP82_ERROR_WORD_ALIGNMENT 0x60 | ||
673 | #define REP82_ERROR_MESSAGE_LENGTH 0x80 | ||
674 | #define REP82_ERROR_OPERAND_INVALID 0x82 | ||
675 | #define REP82_ERROR_OPERAND_SIZE 0x84 | ||
676 | #define REP82_ERROR_EVEN_MOD_IN_OPND 0x85 | ||
677 | #define REP82_ERROR_RESERVED_FIELD 0x88 | ||
678 | #define REP82_ERROR_TRANSPORT_FAIL 0x90 | ||
679 | #define REP82_ERROR_PACKET_TRUNCATED 0xA0 | ||
680 | #define REP82_ERROR_ZERO_BUFFER_LEN 0xB0 | ||
681 | |||
682 | #define CALLER_HEADER 12 | ||
694 | 683 | ||
695 | static inline int | 684 | static inline int |
696 | testq(int q_nr, int *q_depth, int *dev_type, struct ap_status_word *stat) | 685 | testq(int q_nr, int *q_depth, int *dev_type, struct ap_status_word *stat) |
@@ -1212,9 +1201,9 @@ send_to_AP(int dev_nr, int cdx, int msg_len, unsigned char *msg_ext) | |||
1212 | struct ap_status_word stat_word; | 1201 | struct ap_status_word stat_word; |
1213 | enum devstat stat; | 1202 | enum devstat stat; |
1214 | int ccode; | 1203 | int ccode; |
1204 | u32 *q_nr_p = (u32 *)msg_ext; | ||
1215 | 1205 | ||
1216 | ((struct request_msg_ext *) msg_ext)->q_nr = | 1206 | *q_nr_p = (dev_nr << SKIP_BITL) + cdx; |
1217 | (dev_nr << SKIP_BITL) + cdx; | ||
1218 | PDEBUG("msg_len passed to sen: %d\n", msg_len); | 1207 | PDEBUG("msg_len passed to sen: %d\n", msg_len); |
1219 | PDEBUG("q number passed to sen: %02x%02x%02x%02x\n", | 1208 | PDEBUG("q number passed to sen: %02x%02x%02x%02x\n", |
1220 | msg_ext[0], msg_ext[1], msg_ext[2], msg_ext[3]); | 1209 | msg_ext[0], msg_ext[1], msg_ext[2], msg_ext[3]); |
@@ -2104,7 +2093,7 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2104 | int *respbufflen_p, unsigned char *resp_buff) | 2093 | int *respbufflen_p, unsigned char *resp_buff) |
2105 | { | 2094 | { |
2106 | struct ica_rsa_modexpo *icaMsg_p = (struct ica_rsa_modexpo *) buffer; | 2095 | struct ica_rsa_modexpo *icaMsg_p = (struct ica_rsa_modexpo *) buffer; |
2107 | struct type82_hdr *t82h_p = (struct type82_hdr *) response; | 2096 | struct error_hdr *errh_p = (struct error_hdr *) response; |
2108 | struct type84_hdr *t84h_p = (struct type84_hdr *) response; | 2097 | struct type84_hdr *t84h_p = (struct type84_hdr *) response; |
2109 | struct type86_fmt2_msg *t86m_p = (struct type86_fmt2_msg *) response; | 2098 | struct type86_fmt2_msg *t86m_p = (struct type86_fmt2_msg *) response; |
2110 | int reply_code, service_rc, service_rs, src_l; | 2099 | int reply_code, service_rc, service_rs, src_l; |
@@ -2117,12 +2106,13 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2117 | service_rc = 0; | 2106 | service_rc = 0; |
2118 | service_rs = 0; | 2107 | service_rs = 0; |
2119 | src_l = 0; | 2108 | src_l = 0; |
2120 | switch (t82h_p->type) { | 2109 | switch (errh_p->type) { |
2121 | case TYPE82_RSP_CODE: | 2110 | case TYPE82_RSP_CODE: |
2122 | reply_code = t82h_p->reply_code; | 2111 | reply_code = errh_p->reply_code; |
2123 | src_p = (unsigned char *)t82h_p; | 2112 | src_p = (unsigned char *)errh_p; |
2124 | PRINTK("Hardware error: Type 82 Message Header: " | 2113 | PRINTK("Hardware error: Type %02X Message Header: " |
2125 | "%02x%02x%02x%02x%02x%02x%02x%02x\n", | 2114 | "%02x%02x%02x%02x%02x%02x%02x%02x\n", |
2115 | errh_p->type, | ||
2126 | src_p[0], src_p[1], src_p[2], src_p[3], | 2116 | src_p[0], src_p[1], src_p[2], src_p[3], |
2127 | src_p[4], src_p[5], src_p[6], src_p[7]); | 2117 | src_p[4], src_p[5], src_p[6], src_p[7]); |
2128 | break; | 2118 | break; |
@@ -2131,7 +2121,7 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2131 | src_p = response + (int)t84h_p->len - src_l; | 2121 | src_p = response + (int)t84h_p->len - src_l; |
2132 | break; | 2122 | break; |
2133 | case TYPE86_RSP_CODE: | 2123 | case TYPE86_RSP_CODE: |
2134 | reply_code = t86m_p->hdr.reply_code; | 2124 | reply_code = t86m_p->header.reply_code; |
2135 | if (reply_code != 0) | 2125 | if (reply_code != 0) |
2136 | break; | 2126 | break; |
2137 | cprb_p = (struct CPRB *) | 2127 | cprb_p = (struct CPRB *) |
@@ -2143,6 +2133,9 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2143 | le2toI(cprb_p->ccp_rscode, &service_rs); | 2133 | le2toI(cprb_p->ccp_rscode, &service_rs); |
2144 | if ((service_rc == 8) && (service_rs == 66)) | 2134 | if ((service_rc == 8) && (service_rs == 66)) |
2145 | PDEBUG("Bad block format on PCICC\n"); | 2135 | PDEBUG("Bad block format on PCICC\n"); |
2136 | else if ((service_rc == 8) && (service_rs == 65)) | ||
2137 | PDEBUG("Probably an even modulus on " | ||
2138 | "PCICC\n"); | ||
2146 | else if ((service_rc == 8) && (service_rs == 770)) { | 2139 | else if ((service_rc == 8) && (service_rs == 770)) { |
2147 | PDEBUG("Invalid key length on PCICC\n"); | 2140 | PDEBUG("Invalid key length on PCICC\n"); |
2148 | unset_ext_bitlens(); | 2141 | unset_ext_bitlens(); |
@@ -2155,7 +2148,7 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2155 | return REC_USE_PCICA; | 2148 | return REC_USE_PCICA; |
2156 | } | 2149 | } |
2157 | else | 2150 | else |
2158 | PRINTK("service rc/rs: %d/%d\n", | 2151 | PRINTK("service rc/rs (PCICC): %d/%d\n", |
2159 | service_rc, service_rs); | 2152 | service_rc, service_rs); |
2160 | return REC_OPERAND_INV; | 2153 | return REC_OPERAND_INV; |
2161 | } | 2154 | } |
@@ -2169,7 +2162,10 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2169 | if (service_rc != 0) { | 2162 | if (service_rc != 0) { |
2170 | service_rs = (int) cprbx_p->ccp_rscode; | 2163 | service_rs = (int) cprbx_p->ccp_rscode; |
2171 | if ((service_rc == 8) && (service_rs == 66)) | 2164 | if ((service_rc == 8) && (service_rs == 66)) |
2172 | PDEBUG("Bad block format on PCXICC\n"); | 2165 | PDEBUG("Bad block format on PCIXCC\n"); |
2166 | else if ((service_rc == 8) && (service_rs == 65)) | ||
2167 | PDEBUG("Probably an even modulus on " | ||
2168 | "PCIXCC\n"); | ||
2173 | else if ((service_rc == 8) && (service_rs == 770)) { | 2169 | else if ((service_rc == 8) && (service_rs == 770)) { |
2174 | PDEBUG("Invalid key length on PCIXCC\n"); | 2170 | PDEBUG("Invalid key length on PCIXCC\n"); |
2175 | unset_ext_bitlens(); | 2171 | unset_ext_bitlens(); |
@@ -2182,7 +2178,7 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2182 | return REC_USE_PCICA; | 2178 | return REC_USE_PCICA; |
2183 | } | 2179 | } |
2184 | else | 2180 | else |
2185 | PRINTK("service rc/rs: %d/%d\n", | 2181 | PRINTK("service rc/rs (PCIXCC): %d/%d\n", |
2186 | service_rc, service_rs); | 2182 | service_rc, service_rs); |
2187 | return REC_OPERAND_INV; | 2183 | return REC_OPERAND_INV; |
2188 | } | 2184 | } |
@@ -2195,20 +2191,25 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2195 | } | 2191 | } |
2196 | break; | 2192 | break; |
2197 | default: | 2193 | default: |
2194 | src_p = (unsigned char *)errh_p; | ||
2195 | PRINTK("Unrecognized Message Header: " | ||
2196 | "%02x%02x%02x%02x%02x%02x%02x%02x\n", | ||
2197 | src_p[0], src_p[1], src_p[2], src_p[3], | ||
2198 | src_p[4], src_p[5], src_p[6], src_p[7]); | ||
2198 | return REC_BAD_MESSAGE; | 2199 | return REC_BAD_MESSAGE; |
2199 | } | 2200 | } |
2200 | 2201 | ||
2201 | if (reply_code) | 2202 | if (reply_code) |
2202 | switch (reply_code) { | 2203 | switch (reply_code) { |
2203 | case REPLY_ERROR_OPERAND_INVALID: | 2204 | case REP82_ERROR_OPERAND_INVALID: |
2204 | return REC_OPERAND_INV; | 2205 | return REC_OPERAND_INV; |
2205 | case REPLY_ERROR_OPERAND_SIZE: | 2206 | case REP82_ERROR_OPERAND_SIZE: |
2206 | return REC_OPERAND_SIZE; | 2207 | return REC_OPERAND_SIZE; |
2207 | case REPLY_ERROR_EVEN_MOD_IN_OPND: | 2208 | case REP82_ERROR_EVEN_MOD_IN_OPND: |
2208 | return REC_EVEN_MOD; | 2209 | return REC_EVEN_MOD; |
2209 | case REPLY_ERROR_MESSAGE_TYPE: | 2210 | case REP82_ERROR_MESSAGE_TYPE: |
2210 | return WRONG_DEVICE_TYPE; | 2211 | return WRONG_DEVICE_TYPE; |
2211 | case REPLY_ERROR_TRANSPORT_FAIL: | 2212 | case REP82_ERROR_TRANSPORT_FAIL: |
2212 | PRINTKW("Transport failed (APFS = %02X%02X%02X%02X)\n", | 2213 | PRINTKW("Transport failed (APFS = %02X%02X%02X%02X)\n", |
2213 | t86m_p->apfs[0], t86m_p->apfs[1], | 2214 | t86m_p->apfs[0], t86m_p->apfs[1], |
2214 | t86m_p->apfs[2], t86m_p->apfs[3]); | 2215 | t86m_p->apfs[2], t86m_p->apfs[3]); |
@@ -2229,7 +2230,7 @@ convert_response(unsigned char *response, unsigned char *buffer, | |||
2229 | PDEBUG("Length returned = %d\n", src_l); | 2230 | PDEBUG("Length returned = %d\n", src_l); |
2230 | tgt_p = resp_buff + icaMsg_p->outputdatalength - src_l; | 2231 | tgt_p = resp_buff + icaMsg_p->outputdatalength - src_l; |
2231 | memcpy(tgt_p, src_p, src_l); | 2232 | memcpy(tgt_p, src_p, src_l); |
2232 | if ((t82h_p->type == TYPE86_RSP_CODE) && (resp_buff < tgt_p)) { | 2233 | if ((errh_p->type == TYPE86_RSP_CODE) && (resp_buff < tgt_p)) { |
2233 | memset(resp_buff, 0, icaMsg_p->outputdatalength - src_l); | 2234 | memset(resp_buff, 0, icaMsg_p->outputdatalength - src_l); |
2234 | if (pad_msg(resp_buff, icaMsg_p->outputdatalength, src_l)) | 2235 | if (pad_msg(resp_buff, icaMsg_p->outputdatalength, src_l)) |
2235 | return REC_INVALID_PAD; | 2236 | return REC_INVALID_PAD; |
diff --git a/drivers/s390/crypto/z90main.c b/drivers/s390/crypto/z90main.c index 9ec29bb41b28..6aeef3bacc33 100644 --- a/drivers/s390/crypto/z90main.c +++ b/drivers/s390/crypto/z90main.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/init.h> | 31 | #include <linux/init.h> |
32 | #include <linux/interrupt.h> // for tasklets | 32 | #include <linux/interrupt.h> // for tasklets |
33 | #include <linux/ioctl32.h> | 33 | #include <linux/ioctl32.h> |
34 | #include <linux/miscdevice.h> | ||
34 | #include <linux/module.h> | 35 | #include <linux/module.h> |
35 | #include <linux/moduleparam.h> | 36 | #include <linux/moduleparam.h> |
36 | #include <linux/kobject_uevent.h> | 37 | #include <linux/kobject_uevent.h> |
@@ -39,19 +40,8 @@ | |||
39 | #include <linux/version.h> | 40 | #include <linux/version.h> |
40 | #include "z90crypt.h" | 41 | #include "z90crypt.h" |
41 | #include "z90common.h" | 42 | #include "z90common.h" |
42 | #ifndef Z90CRYPT_USE_HOTPLUG | ||
43 | #include <linux/miscdevice.h> | ||
44 | #endif | ||
45 | |||
46 | #define VERSION_CODE(vers, rel, seq) (((vers)<<16) | ((rel)<<8) | (seq)) | ||
47 | #if LINUX_VERSION_CODE < VERSION_CODE(2,4,0) /* version < 2.4 */ | ||
48 | # error "This kernel is too old: not supported" | ||
49 | #endif | ||
50 | #if LINUX_VERSION_CODE > VERSION_CODE(2,7,0) /* version > 2.6 */ | ||
51 | # error "This kernel is too recent: not supported by this file" | ||
52 | #endif | ||
53 | 43 | ||
54 | #define VERSION_Z90MAIN_C "$Revision: 1.57 $" | 44 | #define VERSION_Z90MAIN_C "$Revision: 1.62 $" |
55 | 45 | ||
56 | static char z90main_version[] __initdata = | 46 | static char z90main_version[] __initdata = |
57 | "z90main.o (" VERSION_Z90MAIN_C "/" | 47 | "z90main.o (" VERSION_Z90MAIN_C "/" |
@@ -63,21 +53,12 @@ extern char z90hardware_version[]; | |||
63 | * Defaults that may be modified. | 53 | * Defaults that may be modified. |
64 | */ | 54 | */ |
65 | 55 | ||
66 | #ifndef Z90CRYPT_USE_HOTPLUG | ||
67 | /** | 56 | /** |
68 | * You can specify a different minor at compile time. | 57 | * You can specify a different minor at compile time. |
69 | */ | 58 | */ |
70 | #ifndef Z90CRYPT_MINOR | 59 | #ifndef Z90CRYPT_MINOR |
71 | #define Z90CRYPT_MINOR MISC_DYNAMIC_MINOR | 60 | #define Z90CRYPT_MINOR MISC_DYNAMIC_MINOR |
72 | #endif | 61 | #endif |
73 | #else | ||
74 | /** | ||
75 | * You can specify a different major at compile time. | ||
76 | */ | ||
77 | #ifndef Z90CRYPT_MAJOR | ||
78 | #define Z90CRYPT_MAJOR 0 | ||
79 | #endif | ||
80 | #endif | ||
81 | 62 | ||
82 | /** | 63 | /** |
83 | * You can specify a different domain at compile time or on the insmod | 64 | * You can specify a different domain at compile time or on the insmod |
@@ -97,7 +78,7 @@ extern char z90hardware_version[]; | |||
97 | * older than CLEANUPTIME seconds in the past. | 78 | * older than CLEANUPTIME seconds in the past. |
98 | */ | 79 | */ |
99 | #ifndef CLEANUPTIME | 80 | #ifndef CLEANUPTIME |
100 | #define CLEANUPTIME 20 | 81 | #define CLEANUPTIME 15 |
101 | #endif | 82 | #endif |
102 | 83 | ||
103 | /** | 84 | /** |
@@ -298,6 +279,10 @@ struct z90crypt { | |||
298 | * it contains the request; at READ, the response. The function | 279 | * it contains the request; at READ, the response. The function |
299 | * send_to_crypto_device converts the request to device-dependent | 280 | * send_to_crypto_device converts the request to device-dependent |
300 | * form and use the caller's OPEN-allocated buffer for the response. | 281 | * form and use the caller's OPEN-allocated buffer for the response. |
282 | * | ||
283 | * For the contents of caller_dev_dep_req and caller_dev_dep_req_p | ||
284 | * because that points to it, see the discussion in z90hardware.c. | ||
285 | * Search for "extended request message block". | ||
301 | */ | 286 | */ |
302 | struct caller { | 287 | struct caller { |
303 | int caller_buf_l; // length of original request | 288 | int caller_buf_l; // length of original request |
@@ -398,24 +383,9 @@ static int z90crypt_status_write(struct file *, const char __user *, | |||
398 | unsigned long, void *); | 383 | unsigned long, void *); |
399 | 384 | ||
400 | /** | 385 | /** |
401 | * Hotplug support | ||
402 | */ | ||
403 | |||
404 | #ifdef Z90CRYPT_USE_HOTPLUG | ||
405 | #define Z90CRYPT_HOTPLUG_ADD 1 | ||
406 | #define Z90CRYPT_HOTPLUG_REMOVE 2 | ||
407 | |||
408 | static void z90crypt_hotplug_event(int, int, int); | ||
409 | #endif | ||
410 | |||
411 | /** | ||
412 | * Storage allocated at initialization and used throughout the life of | 386 | * Storage allocated at initialization and used throughout the life of |
413 | * this insmod | 387 | * this insmod |
414 | */ | 388 | */ |
415 | #ifdef Z90CRYPT_USE_HOTPLUG | ||
416 | static int z90crypt_major = Z90CRYPT_MAJOR; | ||
417 | #endif | ||
418 | |||
419 | static int domain = DOMAIN_INDEX; | 389 | static int domain = DOMAIN_INDEX; |
420 | static struct z90crypt z90crypt; | 390 | static struct z90crypt z90crypt; |
421 | static int quiesce_z90crypt; | 391 | static int quiesce_z90crypt; |
@@ -444,14 +414,12 @@ static struct file_operations z90crypt_fops = { | |||
444 | .release = z90crypt_release | 414 | .release = z90crypt_release |
445 | }; | 415 | }; |
446 | 416 | ||
447 | #ifndef Z90CRYPT_USE_HOTPLUG | ||
448 | static struct miscdevice z90crypt_misc_device = { | 417 | static struct miscdevice z90crypt_misc_device = { |
449 | .minor = Z90CRYPT_MINOR, | 418 | .minor = Z90CRYPT_MINOR, |
450 | .name = DEV_NAME, | 419 | .name = DEV_NAME, |
451 | .fops = &z90crypt_fops, | 420 | .fops = &z90crypt_fops, |
452 | .devfs_name = DEV_NAME | 421 | .devfs_name = DEV_NAME |
453 | }; | 422 | }; |
454 | #endif | ||
455 | 423 | ||
456 | /** | 424 | /** |
457 | * Documentation values. | 425 | * Documentation values. |
@@ -603,7 +571,6 @@ z90crypt_init_module(void) | |||
603 | return -EINVAL; | 571 | return -EINVAL; |
604 | } | 572 | } |
605 | 573 | ||
606 | #ifndef Z90CRYPT_USE_HOTPLUG | ||
607 | /* Register as misc device with given minor (or get a dynamic one). */ | 574 | /* Register as misc device with given minor (or get a dynamic one). */ |
608 | result = misc_register(&z90crypt_misc_device); | 575 | result = misc_register(&z90crypt_misc_device); |
609 | if (result < 0) { | 576 | if (result < 0) { |
@@ -611,18 +578,6 @@ z90crypt_init_module(void) | |||
611 | z90crypt_misc_device.minor, result); | 578 | z90crypt_misc_device.minor, result); |
612 | return result; | 579 | return result; |
613 | } | 580 | } |
614 | #else | ||
615 | /* Register the major (or get a dynamic one). */ | ||
616 | result = register_chrdev(z90crypt_major, REG_NAME, &z90crypt_fops); | ||
617 | if (result < 0) { | ||
618 | PRINTKW("register_chrdev (major %d) failed with %d.\n", | ||
619 | z90crypt_major, result); | ||
620 | return result; | ||
621 | } | ||
622 | |||
623 | if (z90crypt_major == 0) | ||
624 | z90crypt_major = result; | ||
625 | #endif | ||
626 | 581 | ||
627 | PDEBUG("Registered " DEV_NAME " with result %d\n", result); | 582 | PDEBUG("Registered " DEV_NAME " with result %d\n", result); |
628 | 583 | ||
@@ -645,11 +600,6 @@ z90crypt_init_module(void) | |||
645 | } else | 600 | } else |
646 | PRINTK("No devices at startup\n"); | 601 | PRINTK("No devices at startup\n"); |
647 | 602 | ||
648 | #ifdef Z90CRYPT_USE_HOTPLUG | ||
649 | /* generate hotplug event for device node generation */ | ||
650 | z90crypt_hotplug_event(z90crypt_major, 0, Z90CRYPT_HOTPLUG_ADD); | ||
651 | #endif | ||
652 | |||
653 | /* Initialize globals. */ | 603 | /* Initialize globals. */ |
654 | spin_lock_init(&queuespinlock); | 604 | spin_lock_init(&queuespinlock); |
655 | 605 | ||
@@ -701,17 +651,10 @@ z90crypt_init_module(void) | |||
701 | return 0; // success | 651 | return 0; // success |
702 | 652 | ||
703 | init_module_cleanup: | 653 | init_module_cleanup: |
704 | #ifndef Z90CRYPT_USE_HOTPLUG | ||
705 | if ((nresult = misc_deregister(&z90crypt_misc_device))) | 654 | if ((nresult = misc_deregister(&z90crypt_misc_device))) |
706 | PRINTK("misc_deregister failed with %d.\n", nresult); | 655 | PRINTK("misc_deregister failed with %d.\n", nresult); |
707 | else | 656 | else |
708 | PDEBUG("misc_deregister successful.\n"); | 657 | PDEBUG("misc_deregister successful.\n"); |
709 | #else | ||
710 | if ((nresult = unregister_chrdev(z90crypt_major, REG_NAME))) | ||
711 | PRINTK("unregister_chrdev failed with %d.\n", nresult); | ||
712 | else | ||
713 | PDEBUG("unregister_chrdev successful.\n"); | ||
714 | #endif | ||
715 | 658 | ||
716 | return result; // failure | 659 | return result; // failure |
717 | } | 660 | } |
@@ -728,19 +671,10 @@ z90crypt_cleanup_module(void) | |||
728 | 671 | ||
729 | remove_proc_entry("driver/z90crypt", 0); | 672 | remove_proc_entry("driver/z90crypt", 0); |
730 | 673 | ||
731 | #ifndef Z90CRYPT_USE_HOTPLUG | ||
732 | if ((nresult = misc_deregister(&z90crypt_misc_device))) | 674 | if ((nresult = misc_deregister(&z90crypt_misc_device))) |
733 | PRINTK("misc_deregister failed with %d.\n", nresult); | 675 | PRINTK("misc_deregister failed with %d.\n", nresult); |
734 | else | 676 | else |
735 | PDEBUG("misc_deregister successful.\n"); | 677 | PDEBUG("misc_deregister successful.\n"); |
736 | #else | ||
737 | z90crypt_hotplug_event(z90crypt_major, 0, Z90CRYPT_HOTPLUG_REMOVE); | ||
738 | |||
739 | if ((nresult = unregister_chrdev(z90crypt_major, REG_NAME))) | ||
740 | PRINTK("unregister_chrdev failed with %d.\n", nresult); | ||
741 | else | ||
742 | PDEBUG("unregister_chrdev successful.\n"); | ||
743 | #endif | ||
744 | 678 | ||
745 | /* Remove the tasks */ | 679 | /* Remove the tasks */ |
746 | tasklet_kill(&reader_tasklet); | 680 | tasklet_kill(&reader_tasklet); |
@@ -748,6 +682,9 @@ z90crypt_cleanup_module(void) | |||
748 | del_timer(&config_timer); | 682 | del_timer(&config_timer); |
749 | del_timer(&cleanup_timer); | 683 | del_timer(&cleanup_timer); |
750 | 684 | ||
685 | if (z90_device_work) | ||
686 | destroy_workqueue(z90_device_work); | ||
687 | |||
751 | destroy_z90crypt(); | 688 | destroy_z90crypt(); |
752 | 689 | ||
753 | PRINTKN("Unloaded.\n"); | 690 | PRINTKN("Unloaded.\n"); |
@@ -766,8 +703,6 @@ z90crypt_cleanup_module(void) | |||
766 | * z90crypt_status_write | 703 | * z90crypt_status_write |
767 | * disable_card | 704 | * disable_card |
768 | * enable_card | 705 | * enable_card |
769 | * scan_char | ||
770 | * scan_string | ||
771 | * | 706 | * |
772 | * Helper functions: | 707 | * Helper functions: |
773 | * z90crypt_rsa | 708 | * z90crypt_rsa |
@@ -1057,9 +992,10 @@ remove_device(struct device *device_p) | |||
1057 | * The MCL must be applied and the newer bitlengths enabled for these to work. | 992 | * The MCL must be applied and the newer bitlengths enabled for these to work. |
1058 | * | 993 | * |
1059 | * Card Type Old limit New limit | 994 | * Card Type Old limit New limit |
995 | * PCICA ??-2048 same (the lower limit is less than 128 bit...) | ||
1060 | * PCICC 512-1024 512-2048 | 996 | * PCICC 512-1024 512-2048 |
1061 | * PCIXCC_MCL2 512-2048 no change (applying this MCL == card is MCL3+) | 997 | * PCIXCC_MCL2 512-2048 ----- (applying any GA LIC will make an MCL3 card) |
1062 | * PCIXCC_MCL3 512-2048 128-2048 | 998 | * PCIXCC_MCL3 ----- 128-2048 |
1063 | * CEX2C 512-2048 128-2048 | 999 | * CEX2C 512-2048 128-2048 |
1064 | * | 1000 | * |
1065 | * ext_bitlens (extended bitlengths) is a global, since you should not apply an | 1001 | * ext_bitlens (extended bitlengths) is a global, since you should not apply an |
@@ -1104,7 +1040,7 @@ select_device_type(int *dev_type_p, int bytelength) | |||
1104 | if (PCICA_avail || PCIXCC_MCL3_avail || CEX2C_avail) { | 1040 | if (PCICA_avail || PCIXCC_MCL3_avail || CEX2C_avail) { |
1105 | /** | 1041 | /** |
1106 | * bitlength is a factor, PCICA is the most capable, even with | 1042 | * bitlength is a factor, PCICA is the most capable, even with |
1107 | * the new MCL. | 1043 | * the new MCL for PCIXCC. |
1108 | */ | 1044 | */ |
1109 | if ((bytelength < PCIXCC_MIN_MOD_SIZE) || | 1045 | if ((bytelength < PCIXCC_MIN_MOD_SIZE) || |
1110 | (!ext_bitlens && (bytelength < OLD_PCIXCC_MIN_MOD_SIZE))) { | 1046 | (!ext_bitlens && (bytelength < OLD_PCIXCC_MIN_MOD_SIZE))) { |
@@ -2144,73 +2080,15 @@ enable_card(int card_index) | |||
2144 | z90crypt.hdware_info->type_mask[devp->dev_type].user_disabled_count--; | 2080 | z90crypt.hdware_info->type_mask[devp->dev_type].user_disabled_count--; |
2145 | } | 2081 | } |
2146 | 2082 | ||
2147 | static inline int | ||
2148 | scan_char(unsigned char *bf, unsigned int len, | ||
2149 | unsigned int *offs, unsigned int *p_eof, unsigned char c) | ||
2150 | { | ||
2151 | unsigned int i, found; | ||
2152 | |||
2153 | found = 0; | ||
2154 | for (i = 0; i < len; i++) { | ||
2155 | if (bf[i] == c) { | ||
2156 | found = 1; | ||
2157 | break; | ||
2158 | } | ||
2159 | if (bf[i] == '\0') { | ||
2160 | *p_eof = 1; | ||
2161 | break; | ||
2162 | } | ||
2163 | if (bf[i] == '\n') { | ||
2164 | break; | ||
2165 | } | ||
2166 | } | ||
2167 | *offs = i+1; | ||
2168 | return found; | ||
2169 | } | ||
2170 | |||
2171 | static inline int | ||
2172 | scan_string(unsigned char *bf, unsigned int len, | ||
2173 | unsigned int *offs, unsigned int *p_eof, unsigned char *s) | ||
2174 | { | ||
2175 | unsigned int temp_len, temp_offs, found, eof; | ||
2176 | |||
2177 | temp_len = temp_offs = found = eof = 0; | ||
2178 | while (!eof && !found) { | ||
2179 | found = scan_char(bf+temp_len, len-temp_len, | ||
2180 | &temp_offs, &eof, *s); | ||
2181 | |||
2182 | temp_len += temp_offs; | ||
2183 | if (eof) { | ||
2184 | found = 0; | ||
2185 | break; | ||
2186 | } | ||
2187 | |||
2188 | if (found) { | ||
2189 | if (len >= temp_offs+strlen(s)) { | ||
2190 | found = !strncmp(bf+temp_len-1, s, strlen(s)); | ||
2191 | if (found) { | ||
2192 | *offs = temp_len+strlen(s)-1; | ||
2193 | break; | ||
2194 | } | ||
2195 | } else { | ||
2196 | found = 0; | ||
2197 | *p_eof = 1; | ||
2198 | break; | ||
2199 | } | ||
2200 | } | ||
2201 | } | ||
2202 | return found; | ||
2203 | } | ||
2204 | |||
2205 | static int | 2083 | static int |
2206 | z90crypt_status_write(struct file *file, const char __user *buffer, | 2084 | z90crypt_status_write(struct file *file, const char __user *buffer, |
2207 | unsigned long count, void *data) | 2085 | unsigned long count, void *data) |
2208 | { | 2086 | { |
2209 | int i, j, len, offs, found, eof; | 2087 | int j, eol; |
2210 | unsigned char *lbuf; | 2088 | unsigned char *lbuf, *ptr; |
2211 | unsigned int local_count; | 2089 | unsigned int local_count; |
2212 | 2090 | ||
2213 | #define LBUFSIZE 600 | 2091 | #define LBUFSIZE 1200 |
2214 | lbuf = kmalloc(LBUFSIZE, GFP_KERNEL); | 2092 | lbuf = kmalloc(LBUFSIZE, GFP_KERNEL); |
2215 | if (!lbuf) { | 2093 | if (!lbuf) { |
2216 | PRINTK("kmalloc failed!\n"); | 2094 | PRINTK("kmalloc failed!\n"); |
@@ -2227,49 +2105,46 @@ z90crypt_status_write(struct file *file, const char __user *buffer, | |||
2227 | return -EFAULT; | 2105 | return -EFAULT; |
2228 | } | 2106 | } |
2229 | 2107 | ||
2230 | lbuf[local_count-1] = '\0'; | 2108 | lbuf[local_count] = '\0'; |
2231 | 2109 | ||
2232 | len = 0; | 2110 | ptr = strstr(lbuf, "Online devices"); |
2233 | eof = 0; | 2111 | if (ptr == 0) { |
2234 | found = 0; | 2112 | PRINTK("Unable to parse data (missing \"Online devices\")\n"); |
2235 | while (!eof) { | 2113 | kfree(lbuf); |
2236 | found = scan_string(lbuf+len, local_count-len, &offs, &eof, | 2114 | return count; |
2237 | "Online devices"); | ||
2238 | len += offs; | ||
2239 | if (found == 1) | ||
2240 | break; | ||
2241 | } | 2115 | } |
2242 | 2116 | ||
2243 | if (eof) { | 2117 | ptr = strstr(ptr, "\n"); |
2118 | if (ptr == 0) { | ||
2119 | PRINTK("Unable to parse data (missing newline after \"Online devices\")\n"); | ||
2244 | kfree(lbuf); | 2120 | kfree(lbuf); |
2245 | return count; | 2121 | return count; |
2246 | } | 2122 | } |
2123 | ptr++; | ||
2247 | 2124 | ||
2248 | if (found) | 2125 | if (strstr(ptr, "Waiting work element counts") == NULL) { |
2249 | found = scan_char(lbuf+len, local_count-len, &offs, &eof, '\n'); | 2126 | PRINTK("Unable to parse data (missing \"Waiting work element counts\")\n"); |
2250 | |||
2251 | if (!found || eof) { | ||
2252 | kfree(lbuf); | 2127 | kfree(lbuf); |
2253 | return count; | 2128 | return count; |
2254 | } | 2129 | } |
2255 | 2130 | ||
2256 | len += offs; | ||
2257 | j = 0; | 2131 | j = 0; |
2258 | for (i = 0; i < 80; i++) { | 2132 | eol = 0; |
2259 | switch (*(lbuf+len+i)) { | 2133 | while ((j < 64) && (*ptr != '\0')) { |
2134 | switch (*ptr) { | ||
2260 | case '\t': | 2135 | case '\t': |
2261 | case ' ': | 2136 | case ' ': |
2262 | break; | 2137 | break; |
2263 | case '\n': | 2138 | case '\n': |
2264 | default: | 2139 | default: |
2265 | eof = 1; | 2140 | eol = 1; |
2266 | break; | 2141 | break; |
2267 | case '0': | 2142 | case '0': // no device |
2268 | case '1': | 2143 | case '1': // PCICA |
2269 | case '2': | 2144 | case '2': // PCICC |
2270 | case '3': | 2145 | case '3': // PCIXCC_MCL2 |
2271 | case '4': | 2146 | case '4': // PCIXCC_MCL3 |
2272 | case '5': | 2147 | case '5': // CEX2C |
2273 | j++; | 2148 | j++; |
2274 | break; | 2149 | break; |
2275 | case 'd': | 2150 | case 'd': |
@@ -2283,8 +2158,9 @@ z90crypt_status_write(struct file *file, const char __user *buffer, | |||
2283 | j++; | 2158 | j++; |
2284 | break; | 2159 | break; |
2285 | } | 2160 | } |
2286 | if (eof) | 2161 | if (eol) |
2287 | break; | 2162 | break; |
2163 | ptr++; | ||
2288 | } | 2164 | } |
2289 | 2165 | ||
2290 | kfree(lbuf); | 2166 | kfree(lbuf); |
@@ -3479,45 +3355,5 @@ probe_PCIXCC_type(struct device *devPtr) | |||
3479 | return rv; | 3355 | return rv; |
3480 | } | 3356 | } |
3481 | 3357 | ||
3482 | #ifdef Z90CRYPT_USE_HOTPLUG | ||
3483 | static void | ||
3484 | z90crypt_hotplug_event(int dev_major, int dev_minor, int action) | ||
3485 | { | ||
3486 | #ifdef CONFIG_HOTPLUG | ||
3487 | char *argv[3]; | ||
3488 | char *envp[6]; | ||
3489 | char major[20]; | ||
3490 | char minor[20]; | ||
3491 | |||
3492 | sprintf(major, "MAJOR=%d", dev_major); | ||
3493 | sprintf(minor, "MINOR=%d", dev_minor); | ||
3494 | |||
3495 | argv[0] = hotplug_path; | ||
3496 | argv[1] = "z90crypt"; | ||
3497 | argv[2] = 0; | ||
3498 | |||
3499 | envp[0] = "HOME=/"; | ||
3500 | envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin"; | ||
3501 | |||
3502 | switch (action) { | ||
3503 | case Z90CRYPT_HOTPLUG_ADD: | ||
3504 | envp[2] = "ACTION=add"; | ||
3505 | break; | ||
3506 | case Z90CRYPT_HOTPLUG_REMOVE: | ||
3507 | envp[2] = "ACTION=remove"; | ||
3508 | break; | ||
3509 | default: | ||
3510 | BUG(); | ||
3511 | break; | ||
3512 | } | ||
3513 | envp[3] = major; | ||
3514 | envp[4] = minor; | ||
3515 | envp[5] = 0; | ||
3516 | |||
3517 | call_usermodehelper(argv[0], argv, envp, 0); | ||
3518 | #endif | ||
3519 | } | ||
3520 | #endif | ||
3521 | |||
3522 | module_init(z90crypt_init_module); | 3358 | module_init(z90crypt_init_module); |
3523 | module_exit(z90crypt_cleanup_module); | 3359 | module_exit(z90crypt_cleanup_module); |
diff --git a/drivers/s390/s390mach.c b/drivers/s390/s390mach.c index 5bb255e02acc..4191fd9d4d11 100644 --- a/drivers/s390/s390mach.c +++ b/drivers/s390/s390mach.c | |||
@@ -240,7 +240,7 @@ s390_revalidate_registers(struct mci *mci) | |||
240 | * Floating point control register can't be restored. | 240 | * Floating point control register can't be restored. |
241 | * Task will be terminated. | 241 | * Task will be terminated. |
242 | */ | 242 | */ |
243 | asm volatile ("lfpc 0(%0)" : : "a" (&zero)); | 243 | asm volatile ("lfpc 0(%0)" : : "a" (&zero), "m" (zero)); |
244 | kill_task = 1; | 244 | kill_task = 1; |
245 | 245 | ||
246 | } | 246 | } |
diff --git a/drivers/sbus/char/Kconfig b/drivers/sbus/char/Kconfig index a41778a490d6..3a8152906bf6 100644 --- a/drivers/sbus/char/Kconfig +++ b/drivers/sbus/char/Kconfig | |||
@@ -69,11 +69,40 @@ config SUN_JSFLASH | |||
69 | If you say Y here, you will be able to boot from your JavaStation's | 69 | If you say Y here, you will be able to boot from your JavaStation's |
70 | Flash memory. | 70 | Flash memory. |
71 | 71 | ||
72 | # XXX Why don't we do "source drivers/char/Config.in" somewhere? | 72 | config BBC_I2C |
73 | # no shit | 73 | tristate "UltraSPARC-III bootbus i2c controller driver" |
74 | config RTC | 74 | depends on PCI && SPARC64 |
75 | tristate "PC-style Real Time Clock Support" | 75 | help |
76 | depends on PCI && EXPERIMENTAL && SPARC32 | 76 | The BBC devices on the UltraSPARC III have two I2C controllers. The |
77 | first I2C controller connects mainly to configuration PROMs (NVRAM, | ||
78 | CPU configuration, DIMM types, etc.). The second I2C controller | ||
79 | connects to environmental control devices such as fans and | ||
80 | temperature sensors. The second controller also connects to the | ||
81 | smartcard reader, if present. Say Y to enable support for these. | ||
82 | |||
83 | config ENVCTRL | ||
84 | tristate "SUNW, envctrl support" | ||
85 | depends on PCI && SPARC64 | ||
86 | help | ||
87 | Kernel support for temperature and fan monitoring on Sun SME | ||
88 | machines. | ||
89 | |||
90 | To compile this driver as a module, choose M here: the | ||
91 | module will be called envctrl. | ||
92 | |||
93 | config DISPLAY7SEG | ||
94 | tristate "7-Segment Display support" | ||
95 | depends on PCI && SPARC64 | ||
96 | ---help--- | ||
97 | This is the driver for the 7-segment display and LED present on | ||
98 | Sun Microsystems CompactPCI models CP1400 and CP1500. | ||
99 | |||
100 | To compile this driver as a module, choose M here: the | ||
101 | module will be called display7seg. | ||
102 | |||
103 | If you do not have a CompactPCI model CP1400 or CP1500, or | ||
104 | another UltraSPARC-IIi-cEngine boardset with a 7-segment display, | ||
105 | you should say N to this option. | ||
77 | 106 | ||
78 | endmenu | 107 | endmenu |
79 | 108 | ||
diff --git a/drivers/scsi/Kconfig b/drivers/scsi/Kconfig index 12c208fb18c5..787ad00a2b73 100644 --- a/drivers/scsi/Kconfig +++ b/drivers/scsi/Kconfig | |||
@@ -250,7 +250,7 @@ config SCSI_DECNCR | |||
250 | 250 | ||
251 | config SCSI_DECSII | 251 | config SCSI_DECSII |
252 | tristate "DEC SII Scsi Driver" | 252 | tristate "DEC SII Scsi Driver" |
253 | depends on MACH_DECSTATION && SCSI && MIPS32 | 253 | depends on MACH_DECSTATION && SCSI && 32BIT |
254 | 254 | ||
255 | config BLK_DEV_3W_XXXX_RAID | 255 | config BLK_DEV_3W_XXXX_RAID |
256 | tristate "3ware 5/6/7/8xxx ATA-RAID support" | 256 | tristate "3ware 5/6/7/8xxx ATA-RAID support" |
diff --git a/drivers/scsi/ahci.c b/drivers/scsi/ahci.c index 179c95c878ac..31065261de8e 100644 --- a/drivers/scsi/ahci.c +++ b/drivers/scsi/ahci.c | |||
@@ -189,7 +189,6 @@ static void ahci_irq_clear(struct ata_port *ap); | |||
189 | static void ahci_eng_timeout(struct ata_port *ap); | 189 | static void ahci_eng_timeout(struct ata_port *ap); |
190 | static int ahci_port_start(struct ata_port *ap); | 190 | static int ahci_port_start(struct ata_port *ap); |
191 | static void ahci_port_stop(struct ata_port *ap); | 191 | static void ahci_port_stop(struct ata_port *ap); |
192 | static void ahci_host_stop(struct ata_host_set *host_set); | ||
193 | static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf); | 192 | static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf); |
194 | static void ahci_qc_prep(struct ata_queued_cmd *qc); | 193 | static void ahci_qc_prep(struct ata_queued_cmd *qc); |
195 | static u8 ahci_check_status(struct ata_port *ap); | 194 | static u8 ahci_check_status(struct ata_port *ap); |
@@ -242,7 +241,6 @@ static struct ata_port_operations ahci_ops = { | |||
242 | 241 | ||
243 | .port_start = ahci_port_start, | 242 | .port_start = ahci_port_start, |
244 | .port_stop = ahci_port_stop, | 243 | .port_stop = ahci_port_stop, |
245 | .host_stop = ahci_host_stop, | ||
246 | }; | 244 | }; |
247 | 245 | ||
248 | static struct ata_port_info ahci_port_info[] = { | 246 | static struct ata_port_info ahci_port_info[] = { |
@@ -296,17 +294,9 @@ static inline unsigned long ahci_port_base_ul (unsigned long base, unsigned int | |||
296 | return base + 0x100 + (port * 0x80); | 294 | return base + 0x100 + (port * 0x80); |
297 | } | 295 | } |
298 | 296 | ||
299 | static inline void *ahci_port_base (void *base, unsigned int port) | 297 | static inline void __iomem *ahci_port_base (void __iomem *base, unsigned int port) |
300 | { | 298 | { |
301 | return (void *) ahci_port_base_ul((unsigned long)base, port); | 299 | return (void __iomem *) ahci_port_base_ul((unsigned long)base, port); |
302 | } | ||
303 | |||
304 | static void ahci_host_stop(struct ata_host_set *host_set) | ||
305 | { | ||
306 | struct ahci_host_priv *hpriv = host_set->private_data; | ||
307 | kfree(hpriv); | ||
308 | |||
309 | ata_host_stop(host_set); | ||
310 | } | 300 | } |
311 | 301 | ||
312 | static int ahci_port_start(struct ata_port *ap) | 302 | static int ahci_port_start(struct ata_port *ap) |
@@ -314,8 +304,9 @@ static int ahci_port_start(struct ata_port *ap) | |||
314 | struct device *dev = ap->host_set->dev; | 304 | struct device *dev = ap->host_set->dev; |
315 | struct ahci_host_priv *hpriv = ap->host_set->private_data; | 305 | struct ahci_host_priv *hpriv = ap->host_set->private_data; |
316 | struct ahci_port_priv *pp; | 306 | struct ahci_port_priv *pp; |
317 | void *mem, *mmio = ap->host_set->mmio_base; | 307 | void __iomem *mmio = ap->host_set->mmio_base; |
318 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 308 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
309 | void *mem; | ||
319 | dma_addr_t mem_dma; | 310 | dma_addr_t mem_dma; |
320 | 311 | ||
321 | pp = kmalloc(sizeof(*pp), GFP_KERNEL); | 312 | pp = kmalloc(sizeof(*pp), GFP_KERNEL); |
@@ -383,8 +374,8 @@ static void ahci_port_stop(struct ata_port *ap) | |||
383 | { | 374 | { |
384 | struct device *dev = ap->host_set->dev; | 375 | struct device *dev = ap->host_set->dev; |
385 | struct ahci_port_priv *pp = ap->private_data; | 376 | struct ahci_port_priv *pp = ap->private_data; |
386 | void *mmio = ap->host_set->mmio_base; | 377 | void __iomem *mmio = ap->host_set->mmio_base; |
387 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 378 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
388 | u32 tmp; | 379 | u32 tmp; |
389 | 380 | ||
390 | tmp = readl(port_mmio + PORT_CMD); | 381 | tmp = readl(port_mmio + PORT_CMD); |
@@ -546,8 +537,8 @@ static void ahci_qc_prep(struct ata_queued_cmd *qc) | |||
546 | 537 | ||
547 | static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) | 538 | static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) |
548 | { | 539 | { |
549 | void *mmio = ap->host_set->mmio_base; | 540 | void __iomem *mmio = ap->host_set->mmio_base; |
550 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 541 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
551 | u32 tmp; | 542 | u32 tmp; |
552 | int work; | 543 | int work; |
553 | 544 | ||
@@ -595,8 +586,8 @@ static void ahci_intr_error(struct ata_port *ap, u32 irq_stat) | |||
595 | static void ahci_eng_timeout(struct ata_port *ap) | 586 | static void ahci_eng_timeout(struct ata_port *ap) |
596 | { | 587 | { |
597 | struct ata_host_set *host_set = ap->host_set; | 588 | struct ata_host_set *host_set = ap->host_set; |
598 | void *mmio = host_set->mmio_base; | 589 | void __iomem *mmio = host_set->mmio_base; |
599 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 590 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
600 | struct ata_queued_cmd *qc; | 591 | struct ata_queued_cmd *qc; |
601 | unsigned long flags; | 592 | unsigned long flags; |
602 | 593 | ||
@@ -626,8 +617,8 @@ static void ahci_eng_timeout(struct ata_port *ap) | |||
626 | 617 | ||
627 | static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) | 618 | static inline int ahci_host_intr(struct ata_port *ap, struct ata_queued_cmd *qc) |
628 | { | 619 | { |
629 | void *mmio = ap->host_set->mmio_base; | 620 | void __iomem *mmio = ap->host_set->mmio_base; |
630 | void *port_mmio = ahci_port_base(mmio, ap->port_no); | 621 | void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); |
631 | u32 status, serr, ci; | 622 | u32 status, serr, ci; |
632 | 623 | ||
633 | serr = readl(port_mmio + PORT_SCR_ERR); | 624 | serr = readl(port_mmio + PORT_SCR_ERR); |
@@ -663,7 +654,7 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
663 | struct ata_host_set *host_set = dev_instance; | 654 | struct ata_host_set *host_set = dev_instance; |
664 | struct ahci_host_priv *hpriv; | 655 | struct ahci_host_priv *hpriv; |
665 | unsigned int i, handled = 0; | 656 | unsigned int i, handled = 0; |
666 | void *mmio; | 657 | void __iomem *mmio; |
667 | u32 irq_stat, irq_ack = 0; | 658 | u32 irq_stat, irq_ack = 0; |
668 | 659 | ||
669 | VPRINTK("ENTER\n"); | 660 | VPRINTK("ENTER\n"); |
@@ -709,7 +700,7 @@ static irqreturn_t ahci_interrupt (int irq, void *dev_instance, struct pt_regs * | |||
709 | static int ahci_qc_issue(struct ata_queued_cmd *qc) | 700 | static int ahci_qc_issue(struct ata_queued_cmd *qc) |
710 | { | 701 | { |
711 | struct ata_port *ap = qc->ap; | 702 | struct ata_port *ap = qc->ap; |
712 | void *port_mmio = (void *) ap->ioaddr.cmd_addr; | 703 | void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; |
713 | 704 | ||
714 | writel(1, port_mmio + PORT_CMD_ISSUE); | 705 | writel(1, port_mmio + PORT_CMD_ISSUE); |
715 | readl(port_mmio + PORT_CMD_ISSUE); /* flush */ | 706 | readl(port_mmio + PORT_CMD_ISSUE); /* flush */ |
@@ -894,7 +885,7 @@ static void ahci_print_info(struct ata_probe_ent *probe_ent) | |||
894 | { | 885 | { |
895 | struct ahci_host_priv *hpriv = probe_ent->private_data; | 886 | struct ahci_host_priv *hpriv = probe_ent->private_data; |
896 | struct pci_dev *pdev = to_pci_dev(probe_ent->dev); | 887 | struct pci_dev *pdev = to_pci_dev(probe_ent->dev); |
897 | void *mmio = probe_ent->mmio_base; | 888 | void __iomem *mmio = probe_ent->mmio_base; |
898 | u32 vers, cap, impl, speed; | 889 | u32 vers, cap, impl, speed; |
899 | const char *speed_s; | 890 | const char *speed_s; |
900 | u16 cc; | 891 | u16 cc; |
@@ -967,7 +958,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
967 | struct ata_probe_ent *probe_ent = NULL; | 958 | struct ata_probe_ent *probe_ent = NULL; |
968 | struct ahci_host_priv *hpriv; | 959 | struct ahci_host_priv *hpriv; |
969 | unsigned long base; | 960 | unsigned long base; |
970 | void *mmio_base; | 961 | void __iomem *mmio_base; |
971 | unsigned int board_idx = (unsigned int) ent->driver_data; | 962 | unsigned int board_idx = (unsigned int) ent->driver_data; |
972 | int have_msi, pci_dev_busy = 0; | 963 | int have_msi, pci_dev_busy = 0; |
973 | int rc; | 964 | int rc; |
@@ -1004,8 +995,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1004 | probe_ent->dev = pci_dev_to_dev(pdev); | 995 | probe_ent->dev = pci_dev_to_dev(pdev); |
1005 | INIT_LIST_HEAD(&probe_ent->node); | 996 | INIT_LIST_HEAD(&probe_ent->node); |
1006 | 997 | ||
1007 | mmio_base = ioremap(pci_resource_start(pdev, AHCI_PCI_BAR), | 998 | mmio_base = pci_iomap(pdev, AHCI_PCI_BAR, 0); |
1008 | pci_resource_len(pdev, AHCI_PCI_BAR)); | ||
1009 | if (mmio_base == NULL) { | 999 | if (mmio_base == NULL) { |
1010 | rc = -ENOMEM; | 1000 | rc = -ENOMEM; |
1011 | goto err_out_free_ent; | 1001 | goto err_out_free_ent; |
@@ -1049,7 +1039,7 @@ static int ahci_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1049 | err_out_hpriv: | 1039 | err_out_hpriv: |
1050 | kfree(hpriv); | 1040 | kfree(hpriv); |
1051 | err_out_iounmap: | 1041 | err_out_iounmap: |
1052 | iounmap(mmio_base); | 1042 | pci_iounmap(pdev, mmio_base); |
1053 | err_out_free_ent: | 1043 | err_out_free_ent: |
1054 | kfree(probe_ent); | 1044 | kfree(probe_ent); |
1055 | err_out_msi: | 1045 | err_out_msi: |
@@ -1089,7 +1079,8 @@ static void ahci_remove_one (struct pci_dev *pdev) | |||
1089 | scsi_host_put(ap->host); | 1079 | scsi_host_put(ap->host); |
1090 | } | 1080 | } |
1091 | 1081 | ||
1092 | host_set->ops->host_stop(host_set); | 1082 | kfree(hpriv); |
1083 | pci_iounmap(pdev, host_set->mmio_base); | ||
1093 | kfree(host_set); | 1084 | kfree(host_set); |
1094 | 1085 | ||
1095 | if (have_msi) | 1086 | if (have_msi) |
@@ -1106,7 +1097,6 @@ static int __init ahci_init(void) | |||
1106 | return pci_module_init(&ahci_pci_driver); | 1097 | return pci_module_init(&ahci_pci_driver); |
1107 | } | 1098 | } |
1108 | 1099 | ||
1109 | |||
1110 | static void __exit ahci_exit(void) | 1100 | static void __exit ahci_exit(void) |
1111 | { | 1101 | { |
1112 | pci_unregister_driver(&ahci_pci_driver); | 1102 | pci_unregister_driver(&ahci_pci_driver); |
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index fb28c1261848..deec0cef88d9 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -583,8 +583,7 @@ static void pci_enable_intx(struct pci_dev *pdev) | |||
583 | #define AHCI_ENABLE (1 << 31) | 583 | #define AHCI_ENABLE (1 << 31) |
584 | static int piix_disable_ahci(struct pci_dev *pdev) | 584 | static int piix_disable_ahci(struct pci_dev *pdev) |
585 | { | 585 | { |
586 | void *mmio; | 586 | void __iomem *mmio; |
587 | unsigned long addr; | ||
588 | u32 tmp; | 587 | u32 tmp; |
589 | int rc = 0; | 588 | int rc = 0; |
590 | 589 | ||
@@ -592,11 +591,11 @@ static int piix_disable_ahci(struct pci_dev *pdev) | |||
592 | * works because this device is usually set up by BIOS. | 591 | * works because this device is usually set up by BIOS. |
593 | */ | 592 | */ |
594 | 593 | ||
595 | addr = pci_resource_start(pdev, AHCI_PCI_BAR); | 594 | if (!pci_resource_start(pdev, AHCI_PCI_BAR) || |
596 | if (!addr || !pci_resource_len(pdev, AHCI_PCI_BAR)) | 595 | !pci_resource_len(pdev, AHCI_PCI_BAR)) |
597 | return 0; | 596 | return 0; |
598 | 597 | ||
599 | mmio = ioremap(addr, 64); | 598 | mmio = pci_iomap(pdev, AHCI_PCI_BAR, 64); |
600 | if (!mmio) | 599 | if (!mmio) |
601 | return -ENOMEM; | 600 | return -ENOMEM; |
602 | 601 | ||
@@ -610,7 +609,7 @@ static int piix_disable_ahci(struct pci_dev *pdev) | |||
610 | rc = -EIO; | 609 | rc = -EIO; |
611 | } | 610 | } |
612 | 611 | ||
613 | iounmap(mmio); | 612 | pci_iounmap(pdev, mmio); |
614 | return rc; | 613 | return rc; |
615 | } | 614 | } |
616 | 615 | ||
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index dee4b12b0342..9fb9814525a3 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -75,6 +75,10 @@ static void __ata_qc_complete(struct ata_queued_cmd *qc); | |||
75 | static unsigned int ata_unique_id = 1; | 75 | static unsigned int ata_unique_id = 1; |
76 | static struct workqueue_struct *ata_wq; | 76 | static struct workqueue_struct *ata_wq; |
77 | 77 | ||
78 | int atapi_enabled = 0; | ||
79 | module_param(atapi_enabled, int, 0444); | ||
80 | MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); | ||
81 | |||
78 | MODULE_AUTHOR("Jeff Garzik"); | 82 | MODULE_AUTHOR("Jeff Garzik"); |
79 | MODULE_DESCRIPTION("Library module for ATA devices"); | 83 | MODULE_DESCRIPTION("Library module for ATA devices"); |
80 | MODULE_LICENSE("GPL"); | 84 | MODULE_LICENSE("GPL"); |
@@ -4200,6 +4204,15 @@ ata_probe_ent_alloc(struct device *dev, struct ata_port_info *port) | |||
4200 | 4204 | ||
4201 | 4205 | ||
4202 | 4206 | ||
4207 | #ifdef CONFIG_PCI | ||
4208 | |||
4209 | void ata_pci_host_stop (struct ata_host_set *host_set) | ||
4210 | { | ||
4211 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
4212 | |||
4213 | pci_iounmap(pdev, host_set->mmio_base); | ||
4214 | } | ||
4215 | |||
4203 | /** | 4216 | /** |
4204 | * ata_pci_init_native_mode - Initialize native-mode driver | 4217 | * ata_pci_init_native_mode - Initialize native-mode driver |
4205 | * @pdev: pci device to be initialized | 4218 | * @pdev: pci device to be initialized |
@@ -4212,7 +4225,6 @@ ata_probe_ent_alloc(struct device *dev, struct ata_port_info *port) | |||
4212 | * ata_probe_ent structure should then be freed with kfree(). | 4225 | * ata_probe_ent structure should then be freed with kfree(). |
4213 | */ | 4226 | */ |
4214 | 4227 | ||
4215 | #ifdef CONFIG_PCI | ||
4216 | struct ata_probe_ent * | 4228 | struct ata_probe_ent * |
4217 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port) | 4229 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port) |
4218 | { | 4230 | { |
@@ -4595,6 +4607,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_simulate); | |||
4595 | 4607 | ||
4596 | #ifdef CONFIG_PCI | 4608 | #ifdef CONFIG_PCI |
4597 | EXPORT_SYMBOL_GPL(pci_test_config_bits); | 4609 | EXPORT_SYMBOL_GPL(pci_test_config_bits); |
4610 | EXPORT_SYMBOL_GPL(ata_pci_host_stop); | ||
4598 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); | 4611 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); |
4599 | EXPORT_SYMBOL_GPL(ata_pci_init_one); | 4612 | EXPORT_SYMBOL_GPL(ata_pci_init_one); |
4600 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); | 4613 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); |
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 346eb36b1e31..104fd9a63e73 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c | |||
@@ -1470,10 +1470,10 @@ ata_scsi_find_dev(struct ata_port *ap, struct scsi_device *scsidev) | |||
1470 | if (unlikely(!ata_dev_present(dev))) | 1470 | if (unlikely(!ata_dev_present(dev))) |
1471 | return NULL; | 1471 | return NULL; |
1472 | 1472 | ||
1473 | #ifndef ATA_ENABLE_ATAPI | 1473 | if (!atapi_enabled) { |
1474 | if (unlikely(dev->class == ATA_DEV_ATAPI)) | 1474 | if (unlikely(dev->class == ATA_DEV_ATAPI)) |
1475 | return NULL; | 1475 | return NULL; |
1476 | #endif | 1476 | } |
1477 | 1477 | ||
1478 | return dev; | 1478 | return dev; |
1479 | } | 1479 | } |
diff --git a/drivers/scsi/libata.h b/drivers/scsi/libata.h index 809c634afbcd..d608b3a0f6fe 100644 --- a/drivers/scsi/libata.h +++ b/drivers/scsi/libata.h | |||
@@ -38,6 +38,7 @@ struct ata_scsi_args { | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | /* libata-core.c */ | 40 | /* libata-core.c */ |
41 | extern int atapi_enabled; | ||
41 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, | 42 | extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap, |
42 | struct ata_device *dev); | 43 | struct ata_device *dev); |
43 | extern void ata_qc_free(struct ata_queued_cmd *qc); | 44 | extern void ata_qc_free(struct ata_queued_cmd *qc); |
diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index ff1933298da6..a4857db4f9b8 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c | |||
@@ -1766,7 +1766,7 @@ static int mesh_suspend(struct macio_dev *mdev, pm_message_t state) | |||
1766 | struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); | 1766 | struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); |
1767 | unsigned long flags; | 1767 | unsigned long flags; |
1768 | 1768 | ||
1769 | if (state == mdev->ofdev.dev.power.power_state || state < 2) | 1769 | if (state.event == mdev->ofdev.dev.power.power_state.event || state.event < 2) |
1770 | return 0; | 1770 | return 0; |
1771 | 1771 | ||
1772 | scsi_block_requests(ms->host); | 1772 | scsi_block_requests(ms->host); |
@@ -1791,7 +1791,7 @@ static int mesh_resume(struct macio_dev *mdev) | |||
1791 | struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); | 1791 | struct mesh_state *ms = (struct mesh_state *)macio_get_drvdata(mdev); |
1792 | unsigned long flags; | 1792 | unsigned long flags; |
1793 | 1793 | ||
1794 | if (mdev->ofdev.dev.power.power_state == 0) | 1794 | if (mdev->ofdev.dev.power.power_state.event == PM_EVENT_ON) |
1795 | return 0; | 1795 | return 0; |
1796 | 1796 | ||
1797 | set_mesh_power(ms, 1); | 1797 | set_mesh_power(ms, 1); |
@@ -1802,7 +1802,7 @@ static int mesh_resume(struct macio_dev *mdev) | |||
1802 | enable_irq(ms->meshintr); | 1802 | enable_irq(ms->meshintr); |
1803 | scsi_unblock_requests(ms->host); | 1803 | scsi_unblock_requests(ms->host); |
1804 | 1804 | ||
1805 | mdev->ofdev.dev.power.power_state = 0; | 1805 | mdev->ofdev.dev.power.power_state.event = PM_EVENT_ON; |
1806 | 1806 | ||
1807 | return 0; | 1807 | return 0; |
1808 | } | 1808 | } |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index 03d9bc6e69df..a1d62dee3be6 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -351,6 +351,7 @@ static void nv_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val) | |||
351 | static void nv_host_stop (struct ata_host_set *host_set) | 351 | static void nv_host_stop (struct ata_host_set *host_set) |
352 | { | 352 | { |
353 | struct nv_host *host = host_set->private_data; | 353 | struct nv_host *host = host_set->private_data; |
354 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
354 | 355 | ||
355 | // Disable hotplug event interrupts. | 356 | // Disable hotplug event interrupts. |
356 | if (host->host_desc->disable_hotplug) | 357 | if (host->host_desc->disable_hotplug) |
@@ -358,7 +359,8 @@ static void nv_host_stop (struct ata_host_set *host_set) | |||
358 | 359 | ||
359 | kfree(host); | 360 | kfree(host); |
360 | 361 | ||
361 | ata_host_stop(host_set); | 362 | if (host_set->mmio_base) |
363 | pci_iounmap(pdev, host_set->mmio_base); | ||
362 | } | 364 | } |
363 | 365 | ||
364 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | 366 | static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) |
@@ -420,8 +422,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
420 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) { | 422 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) { |
421 | unsigned long base; | 423 | unsigned long base; |
422 | 424 | ||
423 | probe_ent->mmio_base = ioremap(pci_resource_start(pdev, 5), | 425 | probe_ent->mmio_base = pci_iomap(pdev, 5, 0); |
424 | pci_resource_len(pdev, 5)); | ||
425 | if (probe_ent->mmio_base == NULL) { | 426 | if (probe_ent->mmio_base == NULL) { |
426 | rc = -EIO; | 427 | rc = -EIO; |
427 | goto err_out_free_host; | 428 | goto err_out_free_host; |
@@ -457,7 +458,7 @@ static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
457 | 458 | ||
458 | err_out_iounmap: | 459 | err_out_iounmap: |
459 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) | 460 | if (host->host_flags & NV_HOST_FLAGS_SCR_MMIO) |
460 | iounmap(probe_ent->mmio_base); | 461 | pci_iounmap(pdev, probe_ent->mmio_base); |
461 | err_out_free_host: | 462 | err_out_free_host: |
462 | kfree(host); | 463 | kfree(host); |
463 | err_out_free_ent: | 464 | err_out_free_ent: |
diff --git a/drivers/scsi/sata_promise.c b/drivers/scsi/sata_promise.c index 7c4f6ecc1cc9..538ad727bd2e 100644 --- a/drivers/scsi/sata_promise.c +++ b/drivers/scsi/sata_promise.c | |||
@@ -92,6 +92,7 @@ static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf); | |||
92 | static void pdc_irq_clear(struct ata_port *ap); | 92 | static void pdc_irq_clear(struct ata_port *ap); |
93 | static int pdc_qc_issue_prot(struct ata_queued_cmd *qc); | 93 | static int pdc_qc_issue_prot(struct ata_queued_cmd *qc); |
94 | 94 | ||
95 | |||
95 | static Scsi_Host_Template pdc_ata_sht = { | 96 | static Scsi_Host_Template pdc_ata_sht = { |
96 | .module = THIS_MODULE, | 97 | .module = THIS_MODULE, |
97 | .name = DRV_NAME, | 98 | .name = DRV_NAME, |
@@ -132,7 +133,7 @@ static struct ata_port_operations pdc_sata_ops = { | |||
132 | .scr_write = pdc_sata_scr_write, | 133 | .scr_write = pdc_sata_scr_write, |
133 | .port_start = pdc_port_start, | 134 | .port_start = pdc_port_start, |
134 | .port_stop = pdc_port_stop, | 135 | .port_stop = pdc_port_stop, |
135 | .host_stop = ata_host_stop, | 136 | .host_stop = ata_pci_host_stop, |
136 | }; | 137 | }; |
137 | 138 | ||
138 | static struct ata_port_operations pdc_pata_ops = { | 139 | static struct ata_port_operations pdc_pata_ops = { |
@@ -153,7 +154,7 @@ static struct ata_port_operations pdc_pata_ops = { | |||
153 | 154 | ||
154 | .port_start = pdc_port_start, | 155 | .port_start = pdc_port_start, |
155 | .port_stop = pdc_port_stop, | 156 | .port_stop = pdc_port_stop, |
156 | .host_stop = ata_host_stop, | 157 | .host_stop = ata_pci_host_stop, |
157 | }; | 158 | }; |
158 | 159 | ||
159 | static struct ata_port_info pdc_port_info[] = { | 160 | static struct ata_port_info pdc_port_info[] = { |
@@ -282,7 +283,7 @@ static void pdc_port_stop(struct ata_port *ap) | |||
282 | 283 | ||
283 | static void pdc_reset_port(struct ata_port *ap) | 284 | static void pdc_reset_port(struct ata_port *ap) |
284 | { | 285 | { |
285 | void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT; | 286 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_CTLSTAT; |
286 | unsigned int i; | 287 | unsigned int i; |
287 | u32 tmp; | 288 | u32 tmp; |
288 | 289 | ||
@@ -418,7 +419,7 @@ static inline unsigned int pdc_host_intr( struct ata_port *ap, | |||
418 | u8 status; | 419 | u8 status; |
419 | unsigned int handled = 0, have_err = 0; | 420 | unsigned int handled = 0, have_err = 0; |
420 | u32 tmp; | 421 | u32 tmp; |
421 | void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; | 422 | void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; |
422 | 423 | ||
423 | tmp = readl(mmio); | 424 | tmp = readl(mmio); |
424 | if (tmp & PDC_ERR_MASK) { | 425 | if (tmp & PDC_ERR_MASK) { |
@@ -447,7 +448,7 @@ static inline unsigned int pdc_host_intr( struct ata_port *ap, | |||
447 | static void pdc_irq_clear(struct ata_port *ap) | 448 | static void pdc_irq_clear(struct ata_port *ap) |
448 | { | 449 | { |
449 | struct ata_host_set *host_set = ap->host_set; | 450 | struct ata_host_set *host_set = ap->host_set; |
450 | void *mmio = host_set->mmio_base; | 451 | void __iomem *mmio = host_set->mmio_base; |
451 | 452 | ||
452 | readl(mmio + PDC_INT_SEQMASK); | 453 | readl(mmio + PDC_INT_SEQMASK); |
453 | } | 454 | } |
@@ -459,7 +460,7 @@ static irqreturn_t pdc_interrupt (int irq, void *dev_instance, struct pt_regs *r | |||
459 | u32 mask = 0; | 460 | u32 mask = 0; |
460 | unsigned int i, tmp; | 461 | unsigned int i, tmp; |
461 | unsigned int handled = 0; | 462 | unsigned int handled = 0; |
462 | void *mmio_base; | 463 | void __iomem *mmio_base; |
463 | 464 | ||
464 | VPRINTK("ENTER\n"); | 465 | VPRINTK("ENTER\n"); |
465 | 466 | ||
@@ -581,7 +582,7 @@ static void pdc_ata_setup_port(struct ata_ioports *port, unsigned long base) | |||
581 | 582 | ||
582 | static void pdc_host_init(unsigned int chip_id, struct ata_probe_ent *pe) | 583 | static void pdc_host_init(unsigned int chip_id, struct ata_probe_ent *pe) |
583 | { | 584 | { |
584 | void *mmio = pe->mmio_base; | 585 | void __iomem *mmio = pe->mmio_base; |
585 | u32 tmp; | 586 | u32 tmp; |
586 | 587 | ||
587 | /* | 588 | /* |
@@ -624,7 +625,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
624 | static int printed_version; | 625 | static int printed_version; |
625 | struct ata_probe_ent *probe_ent = NULL; | 626 | struct ata_probe_ent *probe_ent = NULL; |
626 | unsigned long base; | 627 | unsigned long base; |
627 | void *mmio_base; | 628 | void __iomem *mmio_base; |
628 | unsigned int board_idx = (unsigned int) ent->driver_data; | 629 | unsigned int board_idx = (unsigned int) ent->driver_data; |
629 | int pci_dev_busy = 0; | 630 | int pci_dev_busy = 0; |
630 | int rc; | 631 | int rc; |
@@ -663,8 +664,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
663 | probe_ent->dev = pci_dev_to_dev(pdev); | 664 | probe_ent->dev = pci_dev_to_dev(pdev); |
664 | INIT_LIST_HEAD(&probe_ent->node); | 665 | INIT_LIST_HEAD(&probe_ent->node); |
665 | 666 | ||
666 | mmio_base = ioremap(pci_resource_start(pdev, 3), | 667 | mmio_base = pci_iomap(pdev, 3, 0); |
667 | pci_resource_len(pdev, 3)); | ||
668 | if (mmio_base == NULL) { | 668 | if (mmio_base == NULL) { |
669 | rc = -ENOMEM; | 669 | rc = -ENOMEM; |
670 | goto err_out_free_ent; | 670 | goto err_out_free_ent; |
diff --git a/drivers/scsi/sata_qstor.c b/drivers/scsi/sata_qstor.c index 9c99ab433bd3..029c2482e127 100644 --- a/drivers/scsi/sata_qstor.c +++ b/drivers/scsi/sata_qstor.c | |||
@@ -538,11 +538,12 @@ static void qs_port_stop(struct ata_port *ap) | |||
538 | static void qs_host_stop(struct ata_host_set *host_set) | 538 | static void qs_host_stop(struct ata_host_set *host_set) |
539 | { | 539 | { |
540 | void __iomem *mmio_base = host_set->mmio_base; | 540 | void __iomem *mmio_base = host_set->mmio_base; |
541 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
541 | 542 | ||
542 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ | 543 | writeb(0, mmio_base + QS_HCT_CTRL); /* disable host interrupts */ |
543 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ | 544 | writeb(QS_CNFG3_GSRST, mmio_base + QS_HCF_CNFG3); /* global reset */ |
544 | 545 | ||
545 | ata_host_stop(host_set); | 546 | pci_iounmap(pdev, mmio_base); |
546 | } | 547 | } |
547 | 548 | ||
548 | static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe) | 549 | static void qs_host_init(unsigned int chip_id, struct ata_probe_ent *pe) |
@@ -646,8 +647,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
646 | goto err_out_regions; | 647 | goto err_out_regions; |
647 | } | 648 | } |
648 | 649 | ||
649 | mmio_base = ioremap(pci_resource_start(pdev, 4), | 650 | mmio_base = pci_iomap(pdev, 4, 0); |
650 | pci_resource_len(pdev, 4)); | ||
651 | if (mmio_base == NULL) { | 651 | if (mmio_base == NULL) { |
652 | rc = -ENOMEM; | 652 | rc = -ENOMEM; |
653 | goto err_out_regions; | 653 | goto err_out_regions; |
@@ -697,7 +697,7 @@ static int qs_ata_init_one(struct pci_dev *pdev, | |||
697 | return 0; | 697 | return 0; |
698 | 698 | ||
699 | err_out_iounmap: | 699 | err_out_iounmap: |
700 | iounmap(mmio_base); | 700 | pci_iounmap(pdev, mmio_base); |
701 | err_out_regions: | 701 | err_out_regions: |
702 | pci_release_regions(pdev); | 702 | pci_release_regions(pdev); |
703 | err_out: | 703 | err_out: |
diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 71d49548f0a3..ba98a175ee3a 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c | |||
@@ -86,6 +86,7 @@ static u32 sil_scr_read (struct ata_port *ap, unsigned int sc_reg); | |||
86 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | 86 | static void sil_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); |
87 | static void sil_post_set_mode (struct ata_port *ap); | 87 | static void sil_post_set_mode (struct ata_port *ap); |
88 | 88 | ||
89 | |||
89 | static struct pci_device_id sil_pci_tbl[] = { | 90 | static struct pci_device_id sil_pci_tbl[] = { |
90 | { 0x1095, 0x3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, | 91 | { 0x1095, 0x3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, |
91 | { 0x1095, 0x0240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, | 92 | { 0x1095, 0x0240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_m15w }, |
@@ -172,7 +173,7 @@ static struct ata_port_operations sil_ops = { | |||
172 | .scr_write = sil_scr_write, | 173 | .scr_write = sil_scr_write, |
173 | .port_start = ata_port_start, | 174 | .port_start = ata_port_start, |
174 | .port_stop = ata_port_stop, | 175 | .port_stop = ata_port_stop, |
175 | .host_stop = ata_host_stop, | 176 | .host_stop = ata_pci_host_stop, |
176 | }; | 177 | }; |
177 | 178 | ||
178 | static struct ata_port_info sil_port_info[] = { | 179 | static struct ata_port_info sil_port_info[] = { |
@@ -231,6 +232,7 @@ MODULE_LICENSE("GPL"); | |||
231 | MODULE_DEVICE_TABLE(pci, sil_pci_tbl); | 232 | MODULE_DEVICE_TABLE(pci, sil_pci_tbl); |
232 | MODULE_VERSION(DRV_VERSION); | 233 | MODULE_VERSION(DRV_VERSION); |
233 | 234 | ||
235 | |||
234 | static unsigned char sil_get_device_cache_line(struct pci_dev *pdev) | 236 | static unsigned char sil_get_device_cache_line(struct pci_dev *pdev) |
235 | { | 237 | { |
236 | u8 cache_line = 0; | 238 | u8 cache_line = 0; |
@@ -242,7 +244,8 @@ static void sil_post_set_mode (struct ata_port *ap) | |||
242 | { | 244 | { |
243 | struct ata_host_set *host_set = ap->host_set; | 245 | struct ata_host_set *host_set = ap->host_set; |
244 | struct ata_device *dev; | 246 | struct ata_device *dev; |
245 | void *addr = host_set->mmio_base + sil_port[ap->port_no].xfer_mode; | 247 | void __iomem *addr = |
248 | host_set->mmio_base + sil_port[ap->port_no].xfer_mode; | ||
246 | u32 tmp, dev_mode[2]; | 249 | u32 tmp, dev_mode[2]; |
247 | unsigned int i; | 250 | unsigned int i; |
248 | 251 | ||
@@ -375,7 +378,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
375 | static int printed_version; | 378 | static int printed_version; |
376 | struct ata_probe_ent *probe_ent = NULL; | 379 | struct ata_probe_ent *probe_ent = NULL; |
377 | unsigned long base; | 380 | unsigned long base; |
378 | void *mmio_base; | 381 | void __iomem *mmio_base; |
379 | int rc; | 382 | int rc; |
380 | unsigned int i; | 383 | unsigned int i; |
381 | int pci_dev_busy = 0; | 384 | int pci_dev_busy = 0; |
@@ -425,8 +428,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
425 | probe_ent->irq_flags = SA_SHIRQ; | 428 | probe_ent->irq_flags = SA_SHIRQ; |
426 | probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; | 429 | probe_ent->host_flags = sil_port_info[ent->driver_data].host_flags; |
427 | 430 | ||
428 | mmio_base = ioremap(pci_resource_start(pdev, 5), | 431 | mmio_base = pci_iomap(pdev, 5, 0); |
429 | pci_resource_len(pdev, 5)); | ||
430 | if (mmio_base == NULL) { | 432 | if (mmio_base == NULL) { |
431 | rc = -ENOMEM; | 433 | rc = -ENOMEM; |
432 | goto err_out_free_ent; | 434 | goto err_out_free_ent; |
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c index 19d3bb3b0fb6..d89d968bedac 100644 --- a/drivers/scsi/sata_svw.c +++ b/drivers/scsi/sata_svw.c | |||
@@ -318,7 +318,7 @@ static struct ata_port_operations k2_sata_ops = { | |||
318 | .scr_write = k2_sata_scr_write, | 318 | .scr_write = k2_sata_scr_write, |
319 | .port_start = ata_port_start, | 319 | .port_start = ata_port_start, |
320 | .port_stop = ata_port_stop, | 320 | .port_stop = ata_port_stop, |
321 | .host_stop = ata_host_stop, | 321 | .host_stop = ata_pci_host_stop, |
322 | }; | 322 | }; |
323 | 323 | ||
324 | static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) | 324 | static void k2_sata_setup_port(struct ata_ioports *port, unsigned long base) |
@@ -346,7 +346,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
346 | static int printed_version; | 346 | static int printed_version; |
347 | struct ata_probe_ent *probe_ent = NULL; | 347 | struct ata_probe_ent *probe_ent = NULL; |
348 | unsigned long base; | 348 | unsigned long base; |
349 | void *mmio_base; | 349 | void __iomem *mmio_base; |
350 | int pci_dev_busy = 0; | 350 | int pci_dev_busy = 0; |
351 | int rc; | 351 | int rc; |
352 | int i; | 352 | int i; |
@@ -392,8 +392,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
392 | probe_ent->dev = pci_dev_to_dev(pdev); | 392 | probe_ent->dev = pci_dev_to_dev(pdev); |
393 | INIT_LIST_HEAD(&probe_ent->node); | 393 | INIT_LIST_HEAD(&probe_ent->node); |
394 | 394 | ||
395 | mmio_base = ioremap(pci_resource_start(pdev, 5), | 395 | mmio_base = pci_iomap(pdev, 5, 0); |
396 | pci_resource_len(pdev, 5)); | ||
397 | if (mmio_base == NULL) { | 396 | if (mmio_base == NULL) { |
398 | rc = -ENOMEM; | 397 | rc = -ENOMEM; |
399 | goto err_out_free_ent; | 398 | goto err_out_free_ent; |
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c index c72fcc46f0fa..540a85191172 100644 --- a/drivers/scsi/sata_sx4.c +++ b/drivers/scsi/sata_sx4.c | |||
@@ -245,13 +245,14 @@ static struct pci_driver pdc_sata_pci_driver = { | |||
245 | 245 | ||
246 | static void pdc20621_host_stop(struct ata_host_set *host_set) | 246 | static void pdc20621_host_stop(struct ata_host_set *host_set) |
247 | { | 247 | { |
248 | struct pci_dev *pdev = to_pci_dev(host_set->dev); | ||
248 | struct pdc_host_priv *hpriv = host_set->private_data; | 249 | struct pdc_host_priv *hpriv = host_set->private_data; |
249 | void *dimm_mmio = hpriv->dimm_mmio; | 250 | void *dimm_mmio = hpriv->dimm_mmio; |
250 | 251 | ||
251 | iounmap(dimm_mmio); | 252 | pci_iounmap(pdev, dimm_mmio); |
252 | kfree(hpriv); | 253 | kfree(hpriv); |
253 | 254 | ||
254 | ata_host_stop(host_set); | 255 | pci_iounmap(pdev, host_set->mmio_base); |
255 | } | 256 | } |
256 | 257 | ||
257 | static int pdc_port_start(struct ata_port *ap) | 258 | static int pdc_port_start(struct ata_port *ap) |
@@ -451,9 +452,9 @@ static void pdc20621_dma_prep(struct ata_queued_cmd *qc) | |||
451 | struct scatterlist *sg = qc->sg; | 452 | struct scatterlist *sg = qc->sg; |
452 | struct ata_port *ap = qc->ap; | 453 | struct ata_port *ap = qc->ap; |
453 | struct pdc_port_priv *pp = ap->private_data; | 454 | struct pdc_port_priv *pp = ap->private_data; |
454 | void *mmio = ap->host_set->mmio_base; | 455 | void __iomem *mmio = ap->host_set->mmio_base; |
455 | struct pdc_host_priv *hpriv = ap->host_set->private_data; | 456 | struct pdc_host_priv *hpriv = ap->host_set->private_data; |
456 | void *dimm_mmio = hpriv->dimm_mmio; | 457 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
457 | unsigned int portno = ap->port_no; | 458 | unsigned int portno = ap->port_no; |
458 | unsigned int i, last, idx, total_len = 0, sgt_len; | 459 | unsigned int i, last, idx, total_len = 0, sgt_len; |
459 | u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; | 460 | u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ]; |
@@ -513,9 +514,9 @@ static void pdc20621_nodata_prep(struct ata_queued_cmd *qc) | |||
513 | { | 514 | { |
514 | struct ata_port *ap = qc->ap; | 515 | struct ata_port *ap = qc->ap; |
515 | struct pdc_port_priv *pp = ap->private_data; | 516 | struct pdc_port_priv *pp = ap->private_data; |
516 | void *mmio = ap->host_set->mmio_base; | 517 | void __iomem *mmio = ap->host_set->mmio_base; |
517 | struct pdc_host_priv *hpriv = ap->host_set->private_data; | 518 | struct pdc_host_priv *hpriv = ap->host_set->private_data; |
518 | void *dimm_mmio = hpriv->dimm_mmio; | 519 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
519 | unsigned int portno = ap->port_no; | 520 | unsigned int portno = ap->port_no; |
520 | unsigned int i; | 521 | unsigned int i; |
521 | 522 | ||
@@ -565,7 +566,7 @@ static void __pdc20621_push_hdma(struct ata_queued_cmd *qc, | |||
565 | { | 566 | { |
566 | struct ata_port *ap = qc->ap; | 567 | struct ata_port *ap = qc->ap; |
567 | struct ata_host_set *host_set = ap->host_set; | 568 | struct ata_host_set *host_set = ap->host_set; |
568 | void *mmio = host_set->mmio_base; | 569 | void __iomem *mmio = host_set->mmio_base; |
569 | 570 | ||
570 | /* hard-code chip #0 */ | 571 | /* hard-code chip #0 */ |
571 | mmio += PDC_CHIP0_OFS; | 572 | mmio += PDC_CHIP0_OFS; |
@@ -639,7 +640,7 @@ static void pdc20621_packet_start(struct ata_queued_cmd *qc) | |||
639 | struct ata_port *ap = qc->ap; | 640 | struct ata_port *ap = qc->ap; |
640 | struct ata_host_set *host_set = ap->host_set; | 641 | struct ata_host_set *host_set = ap->host_set; |
641 | unsigned int port_no = ap->port_no; | 642 | unsigned int port_no = ap->port_no; |
642 | void *mmio = host_set->mmio_base; | 643 | void __iomem *mmio = host_set->mmio_base; |
643 | unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE); | 644 | unsigned int rw = (qc->tf.flags & ATA_TFLAG_WRITE); |
644 | u8 seq = (u8) (port_no + 1); | 645 | u8 seq = (u8) (port_no + 1); |
645 | unsigned int port_ofs; | 646 | unsigned int port_ofs; |
@@ -699,7 +700,7 @@ static int pdc20621_qc_issue_prot(struct ata_queued_cmd *qc) | |||
699 | static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | 700 | static inline unsigned int pdc20621_host_intr( struct ata_port *ap, |
700 | struct ata_queued_cmd *qc, | 701 | struct ata_queued_cmd *qc, |
701 | unsigned int doing_hdma, | 702 | unsigned int doing_hdma, |
702 | void *mmio) | 703 | void __iomem *mmio) |
703 | { | 704 | { |
704 | unsigned int port_no = ap->port_no; | 705 | unsigned int port_no = ap->port_no; |
705 | unsigned int port_ofs = | 706 | unsigned int port_ofs = |
@@ -778,7 +779,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap, | |||
778 | static void pdc20621_irq_clear(struct ata_port *ap) | 779 | static void pdc20621_irq_clear(struct ata_port *ap) |
779 | { | 780 | { |
780 | struct ata_host_set *host_set = ap->host_set; | 781 | struct ata_host_set *host_set = ap->host_set; |
781 | void *mmio = host_set->mmio_base; | 782 | void __iomem *mmio = host_set->mmio_base; |
782 | 783 | ||
783 | mmio += PDC_CHIP0_OFS; | 784 | mmio += PDC_CHIP0_OFS; |
784 | 785 | ||
@@ -792,7 +793,7 @@ static irqreturn_t pdc20621_interrupt (int irq, void *dev_instance, struct pt_re | |||
792 | u32 mask = 0; | 793 | u32 mask = 0; |
793 | unsigned int i, tmp, port_no; | 794 | unsigned int i, tmp, port_no; |
794 | unsigned int handled = 0; | 795 | unsigned int handled = 0; |
795 | void *mmio_base; | 796 | void __iomem *mmio_base; |
796 | 797 | ||
797 | VPRINTK("ENTER\n"); | 798 | VPRINTK("ENTER\n"); |
798 | 799 | ||
@@ -940,9 +941,9 @@ static void pdc20621_get_from_dimm(struct ata_probe_ent *pe, void *psource, | |||
940 | u16 idx; | 941 | u16 idx; |
941 | u8 page_mask; | 942 | u8 page_mask; |
942 | long dist; | 943 | long dist; |
943 | void *mmio = pe->mmio_base; | 944 | void __iomem *mmio = pe->mmio_base; |
944 | struct pdc_host_priv *hpriv = pe->private_data; | 945 | struct pdc_host_priv *hpriv = pe->private_data; |
945 | void *dimm_mmio = hpriv->dimm_mmio; | 946 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
946 | 947 | ||
947 | /* hard-code chip #0 */ | 948 | /* hard-code chip #0 */ |
948 | mmio += PDC_CHIP0_OFS; | 949 | mmio += PDC_CHIP0_OFS; |
@@ -996,9 +997,9 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
996 | u16 idx; | 997 | u16 idx; |
997 | u8 page_mask; | 998 | u8 page_mask; |
998 | long dist; | 999 | long dist; |
999 | void *mmio = pe->mmio_base; | 1000 | void __iomem *mmio = pe->mmio_base; |
1000 | struct pdc_host_priv *hpriv = pe->private_data; | 1001 | struct pdc_host_priv *hpriv = pe->private_data; |
1001 | void *dimm_mmio = hpriv->dimm_mmio; | 1002 | void __iomem *dimm_mmio = hpriv->dimm_mmio; |
1002 | 1003 | ||
1003 | /* hard-code chip #0 */ | 1004 | /* hard-code chip #0 */ |
1004 | mmio += PDC_CHIP0_OFS; | 1005 | mmio += PDC_CHIP0_OFS; |
@@ -1044,7 +1045,7 @@ static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, | |||
1044 | static unsigned int pdc20621_i2c_read(struct ata_probe_ent *pe, u32 device, | 1045 | static unsigned int pdc20621_i2c_read(struct ata_probe_ent *pe, u32 device, |
1045 | u32 subaddr, u32 *pdata) | 1046 | u32 subaddr, u32 *pdata) |
1046 | { | 1047 | { |
1047 | void *mmio = pe->mmio_base; | 1048 | void __iomem *mmio = pe->mmio_base; |
1048 | u32 i2creg = 0; | 1049 | u32 i2creg = 0; |
1049 | u32 status; | 1050 | u32 status; |
1050 | u32 count =0; | 1051 | u32 count =0; |
@@ -1103,7 +1104,7 @@ static int pdc20621_prog_dimm0(struct ata_probe_ent *pe) | |||
1103 | u32 data = 0; | 1104 | u32 data = 0; |
1104 | int size, i; | 1105 | int size, i; |
1105 | u8 bdimmsize; | 1106 | u8 bdimmsize; |
1106 | void *mmio = pe->mmio_base; | 1107 | void __iomem *mmio = pe->mmio_base; |
1107 | static const struct { | 1108 | static const struct { |
1108 | unsigned int reg; | 1109 | unsigned int reg; |
1109 | unsigned int ofs; | 1110 | unsigned int ofs; |
@@ -1166,7 +1167,7 @@ static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe) | |||
1166 | { | 1167 | { |
1167 | u32 data, spd0; | 1168 | u32 data, spd0; |
1168 | int error, i; | 1169 | int error, i; |
1169 | void *mmio = pe->mmio_base; | 1170 | void __iomem *mmio = pe->mmio_base; |
1170 | 1171 | ||
1171 | /* hard-code chip #0 */ | 1172 | /* hard-code chip #0 */ |
1172 | mmio += PDC_CHIP0_OFS; | 1173 | mmio += PDC_CHIP0_OFS; |
@@ -1220,7 +1221,7 @@ static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe) | |||
1220 | u32 ticks=0; | 1221 | u32 ticks=0; |
1221 | u32 clock=0; | 1222 | u32 clock=0; |
1222 | u32 fparam=0; | 1223 | u32 fparam=0; |
1223 | void *mmio = pe->mmio_base; | 1224 | void __iomem *mmio = pe->mmio_base; |
1224 | 1225 | ||
1225 | /* hard-code chip #0 */ | 1226 | /* hard-code chip #0 */ |
1226 | mmio += PDC_CHIP0_OFS; | 1227 | mmio += PDC_CHIP0_OFS; |
@@ -1344,7 +1345,7 @@ static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe) | |||
1344 | static void pdc_20621_init(struct ata_probe_ent *pe) | 1345 | static void pdc_20621_init(struct ata_probe_ent *pe) |
1345 | { | 1346 | { |
1346 | u32 tmp; | 1347 | u32 tmp; |
1347 | void *mmio = pe->mmio_base; | 1348 | void __iomem *mmio = pe->mmio_base; |
1348 | 1349 | ||
1349 | /* hard-code chip #0 */ | 1350 | /* hard-code chip #0 */ |
1350 | mmio += PDC_CHIP0_OFS; | 1351 | mmio += PDC_CHIP0_OFS; |
@@ -1377,7 +1378,8 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1377 | static int printed_version; | 1378 | static int printed_version; |
1378 | struct ata_probe_ent *probe_ent = NULL; | 1379 | struct ata_probe_ent *probe_ent = NULL; |
1379 | unsigned long base; | 1380 | unsigned long base; |
1380 | void *mmio_base, *dimm_mmio = NULL; | 1381 | void __iomem *mmio_base; |
1382 | void __iomem *dimm_mmio = NULL; | ||
1381 | struct pdc_host_priv *hpriv = NULL; | 1383 | struct pdc_host_priv *hpriv = NULL; |
1382 | unsigned int board_idx = (unsigned int) ent->driver_data; | 1384 | unsigned int board_idx = (unsigned int) ent->driver_data; |
1383 | int pci_dev_busy = 0; | 1385 | int pci_dev_busy = 0; |
@@ -1417,8 +1419,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1417 | probe_ent->dev = pci_dev_to_dev(pdev); | 1419 | probe_ent->dev = pci_dev_to_dev(pdev); |
1418 | INIT_LIST_HEAD(&probe_ent->node); | 1420 | INIT_LIST_HEAD(&probe_ent->node); |
1419 | 1421 | ||
1420 | mmio_base = ioremap(pci_resource_start(pdev, 3), | 1422 | mmio_base = pci_iomap(pdev, 3, 0); |
1421 | pci_resource_len(pdev, 3)); | ||
1422 | if (mmio_base == NULL) { | 1423 | if (mmio_base == NULL) { |
1423 | rc = -ENOMEM; | 1424 | rc = -ENOMEM; |
1424 | goto err_out_free_ent; | 1425 | goto err_out_free_ent; |
@@ -1432,8 +1433,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1432 | } | 1433 | } |
1433 | memset(hpriv, 0, sizeof(*hpriv)); | 1434 | memset(hpriv, 0, sizeof(*hpriv)); |
1434 | 1435 | ||
1435 | dimm_mmio = ioremap(pci_resource_start(pdev, 4), | 1436 | dimm_mmio = pci_iomap(pdev, 4, 0); |
1436 | pci_resource_len(pdev, 4)); | ||
1437 | if (!dimm_mmio) { | 1437 | if (!dimm_mmio) { |
1438 | kfree(hpriv); | 1438 | kfree(hpriv); |
1439 | rc = -ENOMEM; | 1439 | rc = -ENOMEM; |
@@ -1480,9 +1480,9 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id * | |||
1480 | 1480 | ||
1481 | err_out_iounmap_dimm: /* only get to this label if 20621 */ | 1481 | err_out_iounmap_dimm: /* only get to this label if 20621 */ |
1482 | kfree(hpriv); | 1482 | kfree(hpriv); |
1483 | iounmap(dimm_mmio); | 1483 | pci_iounmap(pdev, dimm_mmio); |
1484 | err_out_iounmap: | 1484 | err_out_iounmap: |
1485 | iounmap(mmio_base); | 1485 | pci_iounmap(pdev, mmio_base); |
1486 | err_out_free_ent: | 1486 | err_out_free_ent: |
1487 | kfree(probe_ent); | 1487 | kfree(probe_ent); |
1488 | err_out_regions: | 1488 | err_out_regions: |
diff --git a/drivers/scsi/sata_vsc.c b/drivers/scsi/sata_vsc.c index 3985f344da4d..cf94e0158a8d 100644 --- a/drivers/scsi/sata_vsc.c +++ b/drivers/scsi/sata_vsc.c | |||
@@ -252,7 +252,7 @@ static struct ata_port_operations vsc_sata_ops = { | |||
252 | .scr_write = vsc_sata_scr_write, | 252 | .scr_write = vsc_sata_scr_write, |
253 | .port_start = ata_port_start, | 253 | .port_start = ata_port_start, |
254 | .port_stop = ata_port_stop, | 254 | .port_stop = ata_port_stop, |
255 | .host_stop = ata_host_stop, | 255 | .host_stop = ata_pci_host_stop, |
256 | }; | 256 | }; |
257 | 257 | ||
258 | static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) | 258 | static void __devinit vsc_sata_setup_port(struct ata_ioports *port, unsigned long base) |
@@ -326,8 +326,7 @@ static int __devinit vsc_sata_init_one (struct pci_dev *pdev, const struct pci_d | |||
326 | probe_ent->dev = pci_dev_to_dev(pdev); | 326 | probe_ent->dev = pci_dev_to_dev(pdev); |
327 | INIT_LIST_HEAD(&probe_ent->node); | 327 | INIT_LIST_HEAD(&probe_ent->node); |
328 | 328 | ||
329 | mmio_base = ioremap(pci_resource_start(pdev, 0), | 329 | mmio_base = pci_iomap(pdev, 0, 0); |
330 | pci_resource_len(pdev, 0)); | ||
331 | if (mmio_base == NULL) { | 330 | if (mmio_base == NULL) { |
332 | rc = -ENOMEM; | 331 | rc = -ENOMEM; |
333 | goto err_out_free_ent; | 332 | goto err_out_free_ent; |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index 74b80f7c062d..e39818a34a07 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -308,7 +308,7 @@ config SERIAL_S3C2410_CONSOLE | |||
308 | 308 | ||
309 | config SERIAL_DZ | 309 | config SERIAL_DZ |
310 | bool "DECstation DZ serial driver" | 310 | bool "DECstation DZ serial driver" |
311 | depends on MACH_DECSTATION && MIPS32 | 311 | depends on MACH_DECSTATION && 32BIT |
312 | select SERIAL_CORE | 312 | select SERIAL_CORE |
313 | help | 313 | help |
314 | DZ11-family serial controllers for VAXstations, including the | 314 | DZ11-family serial controllers for VAXstations, including the |
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 282b32351d8e..25825f2aba22 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
@@ -403,10 +403,8 @@ static int cpm_uart_startup(struct uart_port *port) | |||
403 | 403 | ||
404 | inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo) | 404 | inline void cpm_uart_wait_until_send(struct uart_cpm_port *pinfo) |
405 | { | 405 | { |
406 | unsigned long target_jiffies = jiffies + pinfo->wait_closing; | 406 | set_current_state(TASK_UNINTERRUPTIBLE); |
407 | 407 | schedule_timeout(pinfo->wait_closing); | |
408 | while (!time_after(jiffies, target_jiffies)) | ||
409 | schedule(); | ||
410 | } | 408 | } |
411 | 409 | ||
412 | /* | 410 | /* |
@@ -425,9 +423,12 @@ static void cpm_uart_shutdown(struct uart_port *port) | |||
425 | /* If the port is not the console, disable Rx and Tx. */ | 423 | /* If the port is not the console, disable Rx and Tx. */ |
426 | if (!(pinfo->flags & FLAG_CONSOLE)) { | 424 | if (!(pinfo->flags & FLAG_CONSOLE)) { |
427 | /* Wait for all the BDs marked sent */ | 425 | /* Wait for all the BDs marked sent */ |
428 | while(!cpm_uart_tx_empty(port)) | 426 | while(!cpm_uart_tx_empty(port)) { |
427 | set_current_state(TASK_UNINTERRUPTIBLE); | ||
429 | schedule_timeout(2); | 428 | schedule_timeout(2); |
430 | if(pinfo->wait_closing) | 429 | } |
430 | |||
431 | if (pinfo->wait_closing) | ||
431 | cpm_uart_wait_until_send(pinfo); | 432 | cpm_uart_wait_until_send(pinfo); |
432 | 433 | ||
433 | /* Stop uarts */ | 434 | /* Stop uarts */ |
diff --git a/drivers/serial/cpm_uart/cpm_uart_cpm2.c b/drivers/serial/cpm_uart/cpm_uart_cpm2.c index c4c8f4b44f53..15ad58d94889 100644 --- a/drivers/serial/cpm_uart/cpm_uart_cpm2.c +++ b/drivers/serial/cpm_uart/cpm_uart_cpm2.c | |||
@@ -142,6 +142,14 @@ void scc2_lineif(struct uart_cpm_port *pinfo) | |||
142 | * be supported in a sane fashion. | 142 | * be supported in a sane fashion. |
143 | */ | 143 | */ |
144 | #ifndef CONFIG_STX_GP3 | 144 | #ifndef CONFIG_STX_GP3 |
145 | #ifdef CONFIG_MPC8560_ADS | ||
146 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | ||
147 | io->iop_ppard |= 0x00000018; | ||
148 | io->iop_psord &= ~0x00000008; /* Rx */ | ||
149 | io->iop_psord &= ~0x00000010; /* Tx */ | ||
150 | io->iop_pdird &= ~0x00000008; /* Rx */ | ||
151 | io->iop_pdird |= 0x00000010; /* Tx */ | ||
152 | #else | ||
145 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; | 153 | volatile iop_cpm2_t *io = &cpm2_immr->im_ioport; |
146 | io->iop_pparb |= 0x008b0000; | 154 | io->iop_pparb |= 0x008b0000; |
147 | io->iop_pdirb |= 0x00880000; | 155 | io->iop_pdirb |= 0x00880000; |
@@ -149,6 +157,7 @@ void scc2_lineif(struct uart_cpm_port *pinfo) | |||
149 | io->iop_pdirb &= ~0x00030000; | 157 | io->iop_pdirb &= ~0x00030000; |
150 | io->iop_psorb &= ~0x00030000; | 158 | io->iop_psorb &= ~0x00030000; |
151 | #endif | 159 | #endif |
160 | #endif | ||
152 | cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff; | 161 | cpm2_immr->im_cpmux.cmx_scr &= 0xff00ffff; |
153 | cpm2_immr->im_cpmux.cmx_scr |= 0x00090000; | 162 | cpm2_immr->im_cpmux.cmx_scr |= 0x00090000; |
154 | pinfo->brg = 2; | 163 | pinfo->brg = 2; |
@@ -257,6 +266,7 @@ int cpm_uart_init_portdesc(void) | |||
257 | cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0]; | 266 | cpm_uart_ports[UART_SMC1].smcp = (smc_t *) & cpm2_immr->im_smc[0]; |
258 | cpm_uart_ports[UART_SMC1].smcup = | 267 | cpm_uart_ports[UART_SMC1].smcup = |
259 | (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1]; | 268 | (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC1]; |
269 | *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC1_BASE]) = PROFF_SMC1; | ||
260 | cpm_uart_ports[UART_SMC1].port.mapbase = | 270 | cpm_uart_ports[UART_SMC1].port.mapbase = |
261 | (unsigned long)&cpm2_immr->im_smc[0]; | 271 | (unsigned long)&cpm2_immr->im_smc[0]; |
262 | cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); | 272 | cpm_uart_ports[UART_SMC1].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); |
@@ -269,6 +279,7 @@ int cpm_uart_init_portdesc(void) | |||
269 | cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1]; | 279 | cpm_uart_ports[UART_SMC2].smcp = (smc_t *) & cpm2_immr->im_smc[1]; |
270 | cpm_uart_ports[UART_SMC2].smcup = | 280 | cpm_uart_ports[UART_SMC2].smcup = |
271 | (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2]; | 281 | (smc_uart_t *) & cpm2_immr->im_dprambase[PROFF_SMC2]; |
282 | *(u16 *)(&cpm2_immr->im_dprambase[PROFF_SMC2_BASE]) = PROFF_SMC2; | ||
272 | cpm_uart_ports[UART_SMC2].port.mapbase = | 283 | cpm_uart_ports[UART_SMC2].port.mapbase = |
273 | (unsigned long)&cpm2_immr->im_smc[1]; | 284 | (unsigned long)&cpm2_immr->im_smc[1]; |
274 | cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); | 285 | cpm_uart_ports[UART_SMC2].smcp->smc_smcm |= (SMCM_RX | SMCM_TX); |
diff --git a/drivers/serial/crisv10.c b/drivers/serial/crisv10.c index 23b8871e74cc..5690594b257b 100644 --- a/drivers/serial/crisv10.c +++ b/drivers/serial/crisv10.c | |||
@@ -5041,17 +5041,3 @@ rs_init(void) | |||
5041 | /* this makes sure that rs_init is called during kernel boot */ | 5041 | /* this makes sure that rs_init is called during kernel boot */ |
5042 | 5042 | ||
5043 | module_init(rs_init); | 5043 | module_init(rs_init); |
5044 | |||
5045 | /* | ||
5046 | * register_serial and unregister_serial allows for serial ports to be | ||
5047 | * configured at run-time, to support PCMCIA modems. | ||
5048 | */ | ||
5049 | int | ||
5050 | register_serial(struct serial_struct *req) | ||
5051 | { | ||
5052 | return -1; | ||
5053 | } | ||
5054 | |||
5055 | void unregister_serial(int line) | ||
5056 | { | ||
5057 | } | ||
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 5bfde99e245e..5ddd8ab1f108 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
@@ -1600,7 +1600,7 @@ static int pmz_suspend(struct macio_dev *mdev, pm_message_t pm_state) | |||
1600 | return 0; | 1600 | return 0; |
1601 | } | 1601 | } |
1602 | 1602 | ||
1603 | if (pm_state == mdev->ofdev.dev.power.power_state || pm_state < 2) | 1603 | if (pm_state.event == mdev->ofdev.dev.power.power_state.event) |
1604 | return 0; | 1604 | return 0; |
1605 | 1605 | ||
1606 | pmz_debug("suspend, switching to state %d\n", pm_state); | 1606 | pmz_debug("suspend, switching to state %d\n", pm_state); |
@@ -1660,7 +1660,7 @@ static int pmz_resume(struct macio_dev *mdev) | |||
1660 | if (uap == NULL) | 1660 | if (uap == NULL) |
1661 | return 0; | 1661 | return 0; |
1662 | 1662 | ||
1663 | if (mdev->ofdev.dev.power.power_state == 0) | 1663 | if (mdev->ofdev.dev.power.power_state.event == PM_EVENT_ON) |
1664 | return 0; | 1664 | return 0; |
1665 | 1665 | ||
1666 | pmz_debug("resume, switching to state 0\n"); | 1666 | pmz_debug("resume, switching to state 0\n"); |
@@ -1713,7 +1713,7 @@ static int pmz_resume(struct macio_dev *mdev) | |||
1713 | 1713 | ||
1714 | pmz_debug("resume, switching complete\n"); | 1714 | pmz_debug("resume, switching complete\n"); |
1715 | 1715 | ||
1716 | mdev->ofdev.dev.power.power_state = 0; | 1716 | mdev->ofdev.dev.power.power_state.event = PM_EVENT_ON; |
1717 | 1717 | ||
1718 | return 0; | 1718 | return 0; |
1719 | } | 1719 | } |
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index dea156a62d0a..2d8622eef701 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -1947,21 +1947,29 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | |||
1947 | static inline void | 1947 | static inline void |
1948 | uart_report_port(struct uart_driver *drv, struct uart_port *port) | 1948 | uart_report_port(struct uart_driver *drv, struct uart_port *port) |
1949 | { | 1949 | { |
1950 | printk("%s%d", drv->dev_name, port->line); | 1950 | char address[64]; |
1951 | printk(" at "); | 1951 | |
1952 | switch (port->iotype) { | 1952 | switch (port->iotype) { |
1953 | case UPIO_PORT: | 1953 | case UPIO_PORT: |
1954 | printk("I/O 0x%x", port->iobase); | 1954 | snprintf(address, sizeof(address), |
1955 | "I/O 0x%x", port->iobase); | ||
1955 | break; | 1956 | break; |
1956 | case UPIO_HUB6: | 1957 | case UPIO_HUB6: |
1957 | printk("I/O 0x%x offset 0x%x", port->iobase, port->hub6); | 1958 | snprintf(address, sizeof(address), |
1959 | "I/O 0x%x offset 0x%x", port->iobase, port->hub6); | ||
1958 | break; | 1960 | break; |
1959 | case UPIO_MEM: | 1961 | case UPIO_MEM: |
1960 | case UPIO_MEM32: | 1962 | case UPIO_MEM32: |
1961 | printk("MMIO 0x%lx", port->mapbase); | 1963 | snprintf(address, sizeof(address), |
1964 | "MMIO 0x%lx", port->mapbase); | ||
1965 | break; | ||
1966 | default: | ||
1967 | strlcpy(address, "*unknown*", sizeof(address)); | ||
1962 | break; | 1968 | break; |
1963 | } | 1969 | } |
1964 | printk(" (irq = %d) is a %s\n", port->irq, uart_type(port)); | 1970 | |
1971 | printk(KERN_INFO "%s%d at %s (irq = %d) is a %s\n", | ||
1972 | drv->dev_name, port->line, address, port->irq, uart_type(port)); | ||
1965 | } | 1973 | } |
1966 | 1974 | ||
1967 | static void | 1975 | static void |
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index c3e46d24a37e..c9412daff682 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1570,7 +1570,7 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1570 | struct usb_driver *driver; | 1570 | struct usb_driver *driver; |
1571 | 1571 | ||
1572 | intf = udev->actconfig->interface[i]; | 1572 | intf = udev->actconfig->interface[i]; |
1573 | if (state <= intf->dev.power.power_state) | 1573 | if (state.event <= intf->dev.power.power_state.event) |
1574 | continue; | 1574 | continue; |
1575 | if (!intf->dev.driver) | 1575 | if (!intf->dev.driver) |
1576 | continue; | 1576 | continue; |
@@ -1578,11 +1578,11 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1578 | 1578 | ||
1579 | if (driver->suspend) { | 1579 | if (driver->suspend) { |
1580 | status = driver->suspend(intf, state); | 1580 | status = driver->suspend(intf, state); |
1581 | if (intf->dev.power.power_state != state | 1581 | if (intf->dev.power.power_state.event != state.event |
1582 | || status) | 1582 | || status) |
1583 | dev_err(&intf->dev, | 1583 | dev_err(&intf->dev, |
1584 | "suspend %d fail, code %d\n", | 1584 | "suspend %d fail, code %d\n", |
1585 | state, status); | 1585 | state.event, status); |
1586 | } | 1586 | } |
1587 | 1587 | ||
1588 | /* only drivers with suspend() can ever resume(); | 1588 | /* only drivers with suspend() can ever resume(); |
@@ -1595,7 +1595,7 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1595 | * since we know every driver's probe/disconnect works | 1595 | * since we know every driver's probe/disconnect works |
1596 | * even for drivers that can't suspend. | 1596 | * even for drivers that can't suspend. |
1597 | */ | 1597 | */ |
1598 | if (!driver->suspend || state > PM_SUSPEND_MEM) { | 1598 | if (!driver->suspend || state.event > PM_EVENT_FREEZE) { |
1599 | #if 1 | 1599 | #if 1 |
1600 | dev_warn(&intf->dev, "resume is unsafe!\n"); | 1600 | dev_warn(&intf->dev, "resume is unsafe!\n"); |
1601 | #else | 1601 | #else |
@@ -1616,7 +1616,7 @@ static int __usb_suspend_device (struct usb_device *udev, int port1, | |||
1616 | * policies (when HNP doesn't apply) once we have mechanisms to | 1616 | * policies (when HNP doesn't apply) once we have mechanisms to |
1617 | * turn power back on! (Likely not before 2.7...) | 1617 | * turn power back on! (Likely not before 2.7...) |
1618 | */ | 1618 | */ |
1619 | if (state > PM_SUSPEND_MEM) { | 1619 | if (state.event > PM_EVENT_FREEZE) { |
1620 | dev_warn(&udev->dev, "no poweroff yet, suspending instead\n"); | 1620 | dev_warn(&udev->dev, "no poweroff yet, suspending instead\n"); |
1621 | } | 1621 | } |
1622 | 1622 | ||
@@ -1733,7 +1733,7 @@ static int finish_port_resume(struct usb_device *udev) | |||
1733 | struct usb_driver *driver; | 1733 | struct usb_driver *driver; |
1734 | 1734 | ||
1735 | intf = udev->actconfig->interface[i]; | 1735 | intf = udev->actconfig->interface[i]; |
1736 | if (intf->dev.power.power_state == PMSG_ON) | 1736 | if (intf->dev.power.power_state.event == PM_EVENT_ON) |
1737 | continue; | 1737 | continue; |
1738 | if (!intf->dev.driver) { | 1738 | if (!intf->dev.driver) { |
1739 | /* FIXME maybe force to alt 0 */ | 1739 | /* FIXME maybe force to alt 0 */ |
@@ -1747,11 +1747,11 @@ static int finish_port_resume(struct usb_device *udev) | |||
1747 | 1747 | ||
1748 | /* can we do better than just logging errors? */ | 1748 | /* can we do better than just logging errors? */ |
1749 | status = driver->resume(intf); | 1749 | status = driver->resume(intf); |
1750 | if (intf->dev.power.power_state != PMSG_ON | 1750 | if (intf->dev.power.power_state.event != PM_EVENT_ON |
1751 | || status) | 1751 | || status) |
1752 | dev_dbg(&intf->dev, | 1752 | dev_dbg(&intf->dev, |
1753 | "resume fail, state %d code %d\n", | 1753 | "resume fail, state %d code %d\n", |
1754 | intf->dev.power.power_state, status); | 1754 | intf->dev.power.power_state.event, status); |
1755 | } | 1755 | } |
1756 | status = 0; | 1756 | status = 0; |
1757 | 1757 | ||
@@ -1934,7 +1934,7 @@ static int hub_resume(struct usb_interface *intf) | |||
1934 | unsigned port1; | 1934 | unsigned port1; |
1935 | int status; | 1935 | int status; |
1936 | 1936 | ||
1937 | if (intf->dev.power.power_state == PM_SUSPEND_ON) | 1937 | if (intf->dev.power.power_state.event == PM_EVENT_ON) |
1938 | return 0; | 1938 | return 0; |
1939 | 1939 | ||
1940 | for (port1 = 1; port1 <= hdev->maxchild; port1++) { | 1940 | for (port1 = 1; port1 <= hdev->maxchild; port1++) { |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 99c85d2f92da..2cddd8a00437 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -1400,7 +1400,7 @@ static int usb_generic_suspend(struct device *dev, pm_message_t message) | |||
1400 | driver = to_usb_driver(dev->driver); | 1400 | driver = to_usb_driver(dev->driver); |
1401 | 1401 | ||
1402 | /* there's only one USB suspend state */ | 1402 | /* there's only one USB suspend state */ |
1403 | if (intf->dev.power.power_state) | 1403 | if (intf->dev.power.power_state.event) |
1404 | return 0; | 1404 | return 0; |
1405 | 1405 | ||
1406 | if (driver->suspend) | 1406 | if (driver->suspend) |
diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index b01efb6b36f6..65ac9fef3a7c 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c | |||
@@ -641,7 +641,7 @@ show_registers (struct class_device *class_dev, char *buf) | |||
641 | 641 | ||
642 | spin_lock_irqsave (&ehci->lock, flags); | 642 | spin_lock_irqsave (&ehci->lock, flags); |
643 | 643 | ||
644 | if (bus->controller->power.power_state) { | 644 | if (bus->controller->power.power_state.event) { |
645 | size = scnprintf (next, size, | 645 | size = scnprintf (next, size, |
646 | "bus %s, device %s (driver " DRIVER_VERSION ")\n" | 646 | "bus %s, device %s (driver " DRIVER_VERSION ")\n" |
647 | "%s\n" | 647 | "%s\n" |
diff --git a/drivers/usb/host/ohci-dbg.c b/drivers/usb/host/ohci-dbg.c index c58408c95c3d..447f488f5d93 100644 --- a/drivers/usb/host/ohci-dbg.c +++ b/drivers/usb/host/ohci-dbg.c | |||
@@ -631,7 +631,7 @@ show_registers (struct class_device *class_dev, char *buf) | |||
631 | hcd->product_desc, | 631 | hcd->product_desc, |
632 | hcd_name); | 632 | hcd_name); |
633 | 633 | ||
634 | if (bus->controller->power.power_state) { | 634 | if (bus->controller->power.power_state.event) { |
635 | size -= scnprintf (next, size, | 635 | size -= scnprintf (next, size, |
636 | "SUSPENDED (no register access)\n"); | 636 | "SUSPENDED (no register access)\n"); |
637 | goto done; | 637 | goto done; |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 7a890a65f55d..80eaf659c198 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1781,9 +1781,9 @@ sl811h_suspend(struct device *dev, pm_message_t state, u32 phase) | |||
1781 | if (phase != SUSPEND_POWER_DOWN) | 1781 | if (phase != SUSPEND_POWER_DOWN) |
1782 | return retval; | 1782 | return retval; |
1783 | 1783 | ||
1784 | if (state <= PM_SUSPEND_MEM) | 1784 | if (state.event == PM_EVENT_FREEZE) |
1785 | retval = sl811h_hub_suspend(hcd); | 1785 | retval = sl811h_hub_suspend(hcd); |
1786 | else | 1786 | else if (state.event == PM_EVENT_SUSPEND) |
1787 | port_power(sl811, 0); | 1787 | port_power(sl811, 0); |
1788 | if (retval == 0) | 1788 | if (retval == 0) |
1789 | dev->power.power_state = state; | 1789 | dev->power.power_state = state; |
@@ -1802,7 +1802,7 @@ sl811h_resume(struct device *dev, u32 phase) | |||
1802 | /* with no "check to see if VBUS is still powered" board hook, | 1802 | /* with no "check to see if VBUS is still powered" board hook, |
1803 | * let's assume it'd only be powered to enable remote wakeup. | 1803 | * let's assume it'd only be powered to enable remote wakeup. |
1804 | */ | 1804 | */ |
1805 | if (dev->power.power_state > PM_SUSPEND_MEM | 1805 | if (dev->power.power_state.event == PM_EVENT_SUSPEND |
1806 | || !hcd->can_wakeup) { | 1806 | || !hcd->can_wakeup) { |
1807 | sl811->port1 = 0; | 1807 | sl811->port1 = 0; |
1808 | port_power(sl811, 1); | 1808 | port_power(sl811, 1); |
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index cda7249a90b2..fd7fb98e4b20 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -1533,7 +1533,7 @@ usbtest_ioctl (struct usb_interface *intf, unsigned int code, void *buf) | |||
1533 | if (down_interruptible (&dev->sem)) | 1533 | if (down_interruptible (&dev->sem)) |
1534 | return -ERESTARTSYS; | 1534 | return -ERESTARTSYS; |
1535 | 1535 | ||
1536 | if (intf->dev.power.power_state != PMSG_ON) { | 1536 | if (intf->dev.power.power_state.event != PM_EVENT_ON) { |
1537 | up (&dev->sem); | 1537 | up (&dev->sem); |
1538 | return -EHOSTUNREACH; | 1538 | return -EHOSTUNREACH; |
1539 | } | 1539 | } |
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c index 7bc1d44d8814..b0eba3ac6420 100644 --- a/drivers/video/aty/aty128fb.c +++ b/drivers/video/aty/aty128fb.c | |||
@@ -2323,17 +2323,16 @@ static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2323 | * can properly take care of D3 ? Also, with swsusp, we | 2323 | * can properly take care of D3 ? Also, with swsusp, we |
2324 | * know we'll be rebooted, ... | 2324 | * know we'll be rebooted, ... |
2325 | */ | 2325 | */ |
2326 | #ifdef CONFIG_PPC_PMAC | 2326 | #ifndef CONFIG_PPC_PMAC |
2327 | /* HACK ALERT ! Once I find a proper way to say to each driver | 2327 | /* HACK ALERT ! Once I find a proper way to say to each driver |
2328 | * individually what will happen with it's PCI slot, I'll change | 2328 | * individually what will happen with it's PCI slot, I'll change |
2329 | * that. On laptops, the AGP slot is just unclocked, so D2 is | 2329 | * that. On laptops, the AGP slot is just unclocked, so D2 is |
2330 | * expected, while on desktops, the card is powered off | 2330 | * expected, while on desktops, the card is powered off |
2331 | */ | 2331 | */ |
2332 | if (state >= 3) | 2332 | return 0; |
2333 | state = 2; | ||
2334 | #endif /* CONFIG_PPC_PMAC */ | 2333 | #endif /* CONFIG_PPC_PMAC */ |
2335 | 2334 | ||
2336 | if (state != 2 || state == pdev->dev.power.power_state) | 2335 | if (state.event == pdev->dev.power.power_state.event) |
2337 | return 0; | 2336 | return 0; |
2338 | 2337 | ||
2339 | printk(KERN_DEBUG "aty128fb: suspending...\n"); | 2338 | printk(KERN_DEBUG "aty128fb: suspending...\n"); |
@@ -2367,7 +2366,7 @@ static int aty128_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2367 | * used dummy fb ops, 2.5 need proper support for this at the | 2366 | * used dummy fb ops, 2.5 need proper support for this at the |
2368 | * fbdev level | 2367 | * fbdev level |
2369 | */ | 2368 | */ |
2370 | if (state == 2) | 2369 | if (state.event != PM_EVENT_ON) |
2371 | aty128_set_suspend(par, 1); | 2370 | aty128_set_suspend(par, 1); |
2372 | 2371 | ||
2373 | release_console_sem(); | 2372 | release_console_sem(); |
@@ -2382,12 +2381,11 @@ static int aty128_do_resume(struct pci_dev *pdev) | |||
2382 | struct fb_info *info = pci_get_drvdata(pdev); | 2381 | struct fb_info *info = pci_get_drvdata(pdev); |
2383 | struct aty128fb_par *par = info->par; | 2382 | struct aty128fb_par *par = info->par; |
2384 | 2383 | ||
2385 | if (pdev->dev.power.power_state == 0) | 2384 | if (pdev->dev.power.power_state.event == PM_EVENT_ON) |
2386 | return 0; | 2385 | return 0; |
2387 | 2386 | ||
2388 | /* Wakeup chip */ | 2387 | /* Wakeup chip */ |
2389 | if (pdev->dev.power.power_state == 2) | 2388 | aty128_set_suspend(par, 0); |
2390 | aty128_set_suspend(par, 0); | ||
2391 | par->asleep = 0; | 2389 | par->asleep = 0; |
2392 | 2390 | ||
2393 | /* Restore display & engine */ | 2391 | /* Restore display & engine */ |
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index 8c42538dc8c1..3e10bd837d9e 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c | |||
@@ -2022,17 +2022,16 @@ static int atyfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2022 | struct fb_info *info = pci_get_drvdata(pdev); | 2022 | struct fb_info *info = pci_get_drvdata(pdev); |
2023 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 2023 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
2024 | 2024 | ||
2025 | #ifdef CONFIG_PPC_PMAC | 2025 | #ifndef CONFIG_PPC_PMAC |
2026 | /* HACK ALERT ! Once I find a proper way to say to each driver | 2026 | /* HACK ALERT ! Once I find a proper way to say to each driver |
2027 | * individually what will happen with it's PCI slot, I'll change | 2027 | * individually what will happen with it's PCI slot, I'll change |
2028 | * that. On laptops, the AGP slot is just unclocked, so D2 is | 2028 | * that. On laptops, the AGP slot is just unclocked, so D2 is |
2029 | * expected, while on desktops, the card is powered off | 2029 | * expected, while on desktops, the card is powered off |
2030 | */ | 2030 | */ |
2031 | if (state >= 3) | 2031 | return 0; |
2032 | state = 2; | ||
2033 | #endif /* CONFIG_PPC_PMAC */ | 2032 | #endif /* CONFIG_PPC_PMAC */ |
2034 | 2033 | ||
2035 | if (state != 2 || state == pdev->dev.power.power_state) | 2034 | if (state.event == pdev->dev.power.power_state.event) |
2036 | return 0; | 2035 | return 0; |
2037 | 2036 | ||
2038 | acquire_console_sem(); | 2037 | acquire_console_sem(); |
@@ -2071,12 +2070,12 @@ static int atyfb_pci_resume(struct pci_dev *pdev) | |||
2071 | struct fb_info *info = pci_get_drvdata(pdev); | 2070 | struct fb_info *info = pci_get_drvdata(pdev); |
2072 | struct atyfb_par *par = (struct atyfb_par *) info->par; | 2071 | struct atyfb_par *par = (struct atyfb_par *) info->par; |
2073 | 2072 | ||
2074 | if (pdev->dev.power.power_state == 0) | 2073 | if (pdev->dev.power.power_state.event == PM_EVENT_ON) |
2075 | return 0; | 2074 | return 0; |
2076 | 2075 | ||
2077 | acquire_console_sem(); | 2076 | acquire_console_sem(); |
2078 | 2077 | ||
2079 | if (pdev->dev.power.power_state == 2) | 2078 | if (pdev->dev.power.power_state.event == 2) |
2080 | aty_power_mgmt(0, par); | 2079 | aty_power_mgmt(0, par); |
2081 | par->asleep = 0; | 2080 | par->asleep = 0; |
2082 | 2081 | ||
diff --git a/drivers/video/aty/radeon_pm.c b/drivers/video/aty/radeon_pm.c index 98352af39325..59a1b6f85067 100644 --- a/drivers/video/aty/radeon_pm.c +++ b/drivers/video/aty/radeon_pm.c | |||
@@ -2526,18 +2526,18 @@ int radeonfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2526 | struct radeonfb_info *rinfo = info->par; | 2526 | struct radeonfb_info *rinfo = info->par; |
2527 | int i; | 2527 | int i; |
2528 | 2528 | ||
2529 | if (state == pdev->dev.power.power_state) | 2529 | if (state.event == pdev->dev.power.power_state.event) |
2530 | return 0; | 2530 | return 0; |
2531 | 2531 | ||
2532 | printk(KERN_DEBUG "radeonfb (%s): suspending to state: %d...\n", | 2532 | printk(KERN_DEBUG "radeonfb (%s): suspending to state: %d...\n", |
2533 | pci_name(pdev), state); | 2533 | pci_name(pdev), state.event); |
2534 | 2534 | ||
2535 | /* For suspend-to-disk, we cheat here. We don't suspend anything and | 2535 | /* For suspend-to-disk, we cheat here. We don't suspend anything and |
2536 | * let fbcon continue drawing until we are all set. That shouldn't | 2536 | * let fbcon continue drawing until we are all set. That shouldn't |
2537 | * really cause any problem at this point, provided that the wakeup | 2537 | * really cause any problem at this point, provided that the wakeup |
2538 | * code knows that any state in memory may not match the HW | 2538 | * code knows that any state in memory may not match the HW |
2539 | */ | 2539 | */ |
2540 | if (state != PM_SUSPEND_MEM) | 2540 | if (state.event == PM_EVENT_FREEZE) |
2541 | goto done; | 2541 | goto done; |
2542 | 2542 | ||
2543 | acquire_console_sem(); | 2543 | acquire_console_sem(); |
@@ -2616,7 +2616,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2616 | struct radeonfb_info *rinfo = info->par; | 2616 | struct radeonfb_info *rinfo = info->par; |
2617 | int rc = 0; | 2617 | int rc = 0; |
2618 | 2618 | ||
2619 | if (pdev->dev.power.power_state == 0) | 2619 | if (pdev->dev.power.power_state.event == PM_EVENT_ON) |
2620 | return 0; | 2620 | return 0; |
2621 | 2621 | ||
2622 | if (rinfo->no_schedule) { | 2622 | if (rinfo->no_schedule) { |
@@ -2626,7 +2626,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2626 | acquire_console_sem(); | 2626 | acquire_console_sem(); |
2627 | 2627 | ||
2628 | printk(KERN_DEBUG "radeonfb (%s): resuming from state: %d...\n", | 2628 | printk(KERN_DEBUG "radeonfb (%s): resuming from state: %d...\n", |
2629 | pci_name(pdev), pdev->dev.power.power_state); | 2629 | pci_name(pdev), pdev->dev.power.power_state.event); |
2630 | 2630 | ||
2631 | 2631 | ||
2632 | if (pci_enable_device(pdev)) { | 2632 | if (pci_enable_device(pdev)) { |
@@ -2637,7 +2637,7 @@ int radeonfb_pci_resume(struct pci_dev *pdev) | |||
2637 | } | 2637 | } |
2638 | pci_set_master(pdev); | 2638 | pci_set_master(pdev); |
2639 | 2639 | ||
2640 | if (pdev->dev.power.power_state == PM_SUSPEND_MEM) { | 2640 | if (pdev->dev.power.power_state.event == PM_EVENT_SUSPEND) { |
2641 | /* Wakeup chip. Check from config space if we were powered off | 2641 | /* Wakeup chip. Check from config space if we were powered off |
2642 | * (todo: additionally, check CLK_PIN_CNTL too) | 2642 | * (todo: additionally, check CLK_PIN_CNTL too) |
2643 | */ | 2643 | */ |
diff --git a/drivers/video/chipsfb.c b/drivers/video/chipsfb.c index e75a965ec760..4131243cfdf8 100644 --- a/drivers/video/chipsfb.c +++ b/drivers/video/chipsfb.c | |||
@@ -462,9 +462,9 @@ static int chipsfb_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
462 | { | 462 | { |
463 | struct fb_info *p = pci_get_drvdata(pdev); | 463 | struct fb_info *p = pci_get_drvdata(pdev); |
464 | 464 | ||
465 | if (state == pdev->dev.power.power_state) | 465 | if (state.event == pdev->dev.power.power_state.event) |
466 | return 0; | 466 | return 0; |
467 | if (state != PM_SUSPEND_MEM) | 467 | if (state.event != PM_SUSPEND_MEM) |
468 | goto done; | 468 | goto done; |
469 | 469 | ||
470 | acquire_console_sem(); | 470 | acquire_console_sem(); |
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index 7513fb9b19cf..6db183462b92 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c | |||
@@ -1506,12 +1506,12 @@ static int i810fb_suspend(struct pci_dev *dev, pm_message_t state) | |||
1506 | struct i810fb_par *par = (struct i810fb_par *) info->par; | 1506 | struct i810fb_par *par = (struct i810fb_par *) info->par; |
1507 | int blank = 0, prev_state = par->cur_state; | 1507 | int blank = 0, prev_state = par->cur_state; |
1508 | 1508 | ||
1509 | if (state == prev_state) | 1509 | if (state.event == prev_state) |
1510 | return 0; | 1510 | return 0; |
1511 | 1511 | ||
1512 | par->cur_state = state; | 1512 | par->cur_state = state.event; |
1513 | 1513 | ||
1514 | switch (state) { | 1514 | switch (state.event) { |
1515 | case 1: | 1515 | case 1: |
1516 | blank = VESA_VSYNC_SUSPEND; | 1516 | blank = VESA_VSYNC_SUSPEND; |
1517 | break; | 1517 | break; |
diff --git a/drivers/video/pmag-aa-fb.c b/drivers/video/pmag-aa-fb.c index 3e00ad7f2e31..28d1fe5fe340 100644 --- a/drivers/video/pmag-aa-fb.c +++ b/drivers/video/pmag-aa-fb.c | |||
@@ -413,7 +413,7 @@ static struct fb_ops aafb_ops = { | |||
413 | 413 | ||
414 | static int __init init_one(int slot) | 414 | static int __init init_one(int slot) |
415 | { | 415 | { |
416 | unsigned long base_addr = get_tc_base_addr(slot); | 416 | unsigned long base_addr = CKSEG1ADDR(get_tc_base_addr(slot)); |
417 | struct aafb_info *ip = &my_fb_info[slot]; | 417 | struct aafb_info *ip = &my_fb_info[slot]; |
418 | 418 | ||
419 | memset(ip, 0, sizeof(struct aafb_info)); | 419 | memset(ip, 0, sizeof(struct aafb_info)); |
diff --git a/drivers/video/pmag-ba-fb.c b/drivers/video/pmag-ba-fb.c index f8095588e99d..c98f1c8d7dc2 100644 --- a/drivers/video/pmag-ba-fb.c +++ b/drivers/video/pmag-ba-fb.c | |||
@@ -1,57 +1,55 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/pmag-ba-fb.c | 2 | * linux/drivers/video/pmag-ba-fb.c |
3 | * | 3 | * |
4 | * PMAG-BA TurboChannel framebuffer card support ... derived from: | 4 | * PMAG-BA TURBOchannel Color Frame Buffer (CFB) card support, |
5 | * derived from: | ||
5 | * "HP300 Topcat framebuffer support (derived from macfb of all things) | 6 | * "HP300 Topcat framebuffer support (derived from macfb of all things) |
6 | * Phil Blundell <philb@gnu.org> 1998", the original code can be | 7 | * Phil Blundell <philb@gnu.org> 1998", the original code can be |
7 | * found in the file hpfb.c in the same directory. | 8 | * found in the file hpfb.c in the same directory. |
8 | * | 9 | * |
9 | * Based on digital document: | 10 | * Based on digital document: |
10 | * "PMAG-BA TURBOchannel Color Frame Buffer | 11 | * "PMAG-BA TURBOchannel Color Frame Buffer |
11 | * Functional Specification", Revision 1.2, August 27, 1990 | 12 | * Functional Specification", Revision 1.2, August 27, 1990 |
12 | * | 13 | * |
13 | * DECstation related code Copyright (C) 1999, 2000, 2001 by | 14 | * DECstation related code Copyright (C) 1999, 2000, 2001 by |
14 | * Michael Engel <engel@unix-ag.org>, | 15 | * Michael Engel <engel@unix-ag.org>, |
15 | * Karsten Merker <merker@linuxtag.org> and | 16 | * Karsten Merker <merker@linuxtag.org> and |
16 | * Harald Koerfgen. | 17 | * Harald Koerfgen. |
17 | * This file is subject to the terms and conditions of the GNU General | 18 | * Copyright (c) 2005 Maciej W. Rozycki |
18 | * Public License. See the file COPYING in the main directory of this | ||
19 | * archive for more details. | ||
20 | * | 19 | * |
20 | * This file is subject to the terms and conditions of the GNU General | ||
21 | * Public License. See the file COPYING in the main directory of this | ||
22 | * archive for more details. | ||
21 | */ | 23 | */ |
22 | #include <linux/module.h> | 24 | |
23 | #include <linux/kernel.h> | 25 | #include <linux/compiler.h> |
24 | #include <linux/sched.h> | ||
25 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
26 | #include <linux/string.h> | ||
27 | #include <linux/timer.h> | ||
28 | #include <linux/mm.h> | ||
29 | #include <linux/tty.h> | ||
30 | #include <linux/slab.h> | ||
31 | #include <linux/delay.h> | ||
32 | #include <linux/init.h> | ||
33 | #include <linux/fb.h> | 27 | #include <linux/fb.h> |
34 | #include <asm/bootinfo.h> | 28 | #include <linux/init.h> |
35 | #include <asm/dec/machtype.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | ||
31 | #include <linux/types.h> | ||
32 | |||
33 | #include <asm/bug.h> | ||
34 | #include <asm/io.h> | ||
35 | #include <asm/system.h> | ||
36 | |||
36 | #include <asm/dec/tc.h> | 37 | #include <asm/dec/tc.h> |
38 | |||
37 | #include <video/pmag-ba-fb.h> | 39 | #include <video/pmag-ba-fb.h> |
38 | 40 | ||
39 | struct pmag_ba_ramdac_regs { | 41 | |
40 | unsigned char addr_low; | 42 | struct pmagbafb_par { |
41 | unsigned char pad0[3]; | 43 | struct fb_info *next; |
42 | unsigned char addr_hi; | 44 | volatile void __iomem *mmio; |
43 | unsigned char pad1[3]; | 45 | volatile u32 __iomem *dac; |
44 | unsigned char data; | 46 | int slot; |
45 | unsigned char pad2[3]; | ||
46 | unsigned char cmap; | ||
47 | }; | 47 | }; |
48 | 48 | ||
49 | /* | ||
50 | * Max 3 TURBOchannel slots -> max 3 PMAG-BA :) | ||
51 | */ | ||
52 | static struct fb_info pmagba_fb_info[3]; | ||
53 | 49 | ||
54 | static struct fb_var_screeninfo pmagbafb_defined = { | 50 | static struct fb_info *root_pmagbafb_dev; |
51 | |||
52 | static struct fb_var_screeninfo pmagbafb_defined __initdata = { | ||
55 | .xres = 1024, | 53 | .xres = 1024, |
56 | .yres = 864, | 54 | .yres = 864, |
57 | .xres_virtual = 1024, | 55 | .xres_virtual = 1024, |
@@ -61,58 +59,71 @@ static struct fb_var_screeninfo pmagbafb_defined = { | |||
61 | .green.length = 8, | 59 | .green.length = 8, |
62 | .blue.length = 8, | 60 | .blue.length = 8, |
63 | .activate = FB_ACTIVATE_NOW, | 61 | .activate = FB_ACTIVATE_NOW, |
64 | .height = 274, | 62 | .height = -1, |
65 | .width = 195, | 63 | .width = -1, |
66 | .accel = FB_ACCEL_NONE, | 64 | .accel_flags = FB_ACCEL_NONE, |
65 | .pixclock = 14452, | ||
66 | .left_margin = 116, | ||
67 | .right_margin = 12, | ||
68 | .upper_margin = 34, | ||
69 | .lower_margin = 12, | ||
70 | .hsync_len = 128, | ||
71 | .vsync_len = 3, | ||
72 | .sync = FB_SYNC_ON_GREEN, | ||
67 | .vmode = FB_VMODE_NONINTERLACED, | 73 | .vmode = FB_VMODE_NONINTERLACED, |
68 | }; | 74 | }; |
69 | 75 | ||
70 | static struct fb_fix_screeninfo pmagbafb_fix = { | 76 | static struct fb_fix_screeninfo pmagbafb_fix __initdata = { |
71 | .id = "PMAG-BA", | 77 | .id = "PMAG-BA", |
72 | .smem_len = (1024 * 864), | 78 | .smem_len = (1024 * 1024), |
73 | .type = FB_TYPE_PACKED_PIXELS, | 79 | .type = FB_TYPE_PACKED_PIXELS, |
74 | .visual = FB_VISUAL_PSEUDOCOLOR, | 80 | .visual = FB_VISUAL_PSEUDOCOLOR, |
75 | .line_length = 1024, | 81 | .line_length = 1024, |
82 | .mmio_len = PMAG_BA_SIZE - PMAG_BA_BT459, | ||
76 | }; | 83 | }; |
77 | 84 | ||
78 | /* | 85 | |
79 | * Turn hardware cursor off | 86 | static inline void dac_write(struct pmagbafb_par *par, unsigned int reg, u8 v) |
80 | */ | ||
81 | void pmagbafb_erase_cursor(struct pmag_ba_ramdac_regs *bt459_regs) | ||
82 | { | 87 | { |
83 | bt459_regs->addr_low = 0; | 88 | writeb(v, par->dac + reg / 4); |
84 | bt459_regs->addr_hi = 3; | ||
85 | bt459_regs->data = 0; | ||
86 | } | 89 | } |
87 | 90 | ||
91 | static inline u8 dac_read(struct pmagbafb_par *par, unsigned int reg) | ||
92 | { | ||
93 | return readb(par->dac + reg / 4); | ||
94 | } | ||
95 | |||
96 | |||
88 | /* | 97 | /* |
89 | * Set the palette. | 98 | * Set the palette. |
90 | */ | 99 | */ |
91 | static int pmagbafb_setcolreg(unsigned regno, unsigned red, unsigned green, | 100 | static int pmagbafb_setcolreg(unsigned int regno, unsigned int red, |
92 | unsigned blue, unsigned transp, | 101 | unsigned int green, unsigned int blue, |
93 | struct fb_info *info) | 102 | unsigned int transp, struct fb_info *info) |
94 | { | 103 | { |
95 | struct pmag_ba_ramdac_regs *bt459_regs = (struct pmag_ba_ramdac_regs *) info->par; | 104 | struct pmagbafb_par *par = info->par; |
96 | 105 | ||
97 | if (regno >= info->cmap.len) | 106 | BUG_ON(regno >= info->cmap.len); |
98 | return 1; | ||
99 | 107 | ||
100 | red >>= 8; /* The cmap fields are 16 bits */ | 108 | red >>= 8; /* The cmap fields are 16 bits */ |
101 | green >>= 8; /* wide, but the harware colormap */ | 109 | green >>= 8; /* wide, but the hardware colormap */ |
102 | blue >>= 8; /* registers are only 8 bits wide */ | 110 | blue >>= 8; /* registers are only 8 bits wide */ |
103 | 111 | ||
104 | bt459_regs->addr_low = (__u8) regno; | 112 | mb(); |
105 | bt459_regs->addr_hi = 0; | 113 | dac_write(par, BT459_ADDR_LO, regno); |
106 | bt459_regs->cmap = red; | 114 | dac_write(par, BT459_ADDR_HI, 0x00); |
107 | bt459_regs->cmap = green; | 115 | wmb(); |
108 | bt459_regs->cmap = blue; | 116 | dac_write(par, BT459_CMAP, red); |
117 | wmb(); | ||
118 | dac_write(par, BT459_CMAP, green); | ||
119 | wmb(); | ||
120 | dac_write(par, BT459_CMAP, blue); | ||
121 | |||
109 | return 0; | 122 | return 0; |
110 | } | 123 | } |
111 | 124 | ||
112 | static struct fb_ops pmagbafb_ops = { | 125 | static struct fb_ops pmagbafb_ops = { |
113 | .owner = THIS_MODULE, | 126 | .owner = THIS_MODULE, |
114 | .fb_get_fix = gen_get_fix, | ||
115 | .fb_get_var = gen_get_var, | ||
116 | .fb_setcolreg = pmagbafb_setcolreg, | 127 | .fb_setcolreg = pmagbafb_setcolreg, |
117 | .fb_fillrect = cfb_fillrect, | 128 | .fb_fillrect = cfb_fillrect, |
118 | .fb_copyarea = cfb_copyarea, | 129 | .fb_copyarea = cfb_copyarea, |
@@ -120,63 +131,133 @@ static struct fb_ops pmagbafb_ops = { | |||
120 | .fb_cursor = soft_cursor, | 131 | .fb_cursor = soft_cursor, |
121 | }; | 132 | }; |
122 | 133 | ||
123 | int __init pmagbafb_init_one(int slot) | 134 | |
135 | /* | ||
136 | * Turn the hardware cursor off. | ||
137 | */ | ||
138 | static void __init pmagbafb_erase_cursor(struct fb_info *info) | ||
139 | { | ||
140 | struct pmagbafb_par *par = info->par; | ||
141 | |||
142 | mb(); | ||
143 | dac_write(par, BT459_ADDR_LO, 0x00); | ||
144 | dac_write(par, BT459_ADDR_HI, 0x03); | ||
145 | wmb(); | ||
146 | dac_write(par, BT459_DATA, 0x00); | ||
147 | } | ||
148 | |||
149 | |||
150 | static int __init pmagbafb_init_one(int slot) | ||
124 | { | 151 | { |
125 | unsigned long base_addr = get_tc_base_addr(slot); | 152 | struct fb_info *info; |
126 | struct fb_info *info = &pmagba_fb_info[slot]; | 153 | struct pmagbafb_par *par; |
127 | struct display *disp = &pmagba_disp[slot]; | 154 | unsigned long base_addr; |
128 | 155 | ||
129 | printk("PMAG-BA framebuffer in slot %d\n", slot); | 156 | info = framebuffer_alloc(sizeof(struct pmagbafb_par), NULL); |
130 | /* | 157 | if (!info) |
131 | * Framebuffer display memory base address and friends | 158 | return -ENOMEM; |
132 | */ | 159 | |
133 | pmagbafb_fix.smem_start = base_addr + PMAG_BA_ONBOARD_FBMEM_OFFSET; | 160 | par = info->par; |
134 | info->par = (base_addr + PMAG_BA_BT459_OFFSET); | 161 | par->slot = slot; |
135 | 162 | claim_tc_card(par->slot); | |
136 | /* | 163 | |
137 | * Configure the Bt459 RAM DAC | 164 | base_addr = get_tc_base_addr(par->slot); |
138 | */ | 165 | |
139 | pmagbafb_erase_cursor((struct pmag_ba_ramdac_regs *) info->par); | 166 | par->next = root_pmagbafb_dev; |
140 | 167 | root_pmagbafb_dev = info; | |
141 | /* | 168 | |
142 | * Let there be consoles.. | 169 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) |
143 | */ | 170 | goto err_alloc; |
171 | |||
144 | info->fbops = &pmagbafb_ops; | 172 | info->fbops = &pmagbafb_ops; |
173 | info->fix = pmagbafb_fix; | ||
145 | info->var = pmagbafb_defined; | 174 | info->var = pmagbafb_defined; |
146 | info->fix = pmagbafb_fix; | ||
147 | info->screen_base = pmagbafb_fix.smem_start; | ||
148 | info->flags = FBINFO_DEFAULT; | 175 | info->flags = FBINFO_DEFAULT; |
149 | 176 | ||
150 | fb_alloc_cmap(&fb_info.cmap, 256, 0); | 177 | /* MMIO mapping setup. */ |
178 | info->fix.mmio_start = base_addr; | ||
179 | par->mmio = ioremap_nocache(info->fix.mmio_start, info->fix.mmio_len); | ||
180 | if (!par->mmio) | ||
181 | goto err_cmap; | ||
182 | par->dac = par->mmio + PMAG_BA_BT459; | ||
183 | |||
184 | /* Frame buffer mapping setup. */ | ||
185 | info->fix.smem_start = base_addr + PMAG_BA_FBMEM; | ||
186 | info->screen_base = ioremap_nocache(info->fix.smem_start, | ||
187 | info->fix.smem_len); | ||
188 | if (!info->screen_base) | ||
189 | goto err_mmio_map; | ||
190 | info->screen_size = info->fix.smem_len; | ||
191 | |||
192 | pmagbafb_erase_cursor(info); | ||
151 | 193 | ||
152 | if (register_framebuffer(info) < 0) | 194 | if (register_framebuffer(info) < 0) |
153 | return 1; | 195 | goto err_smem_map; |
196 | |||
197 | pr_info("fb%d: %s frame buffer device in slot %d\n", | ||
198 | info->node, info->fix.id, par->slot); | ||
199 | |||
154 | return 0; | 200 | return 0; |
201 | |||
202 | |||
203 | err_smem_map: | ||
204 | iounmap(info->screen_base); | ||
205 | |||
206 | err_mmio_map: | ||
207 | iounmap(par->mmio); | ||
208 | |||
209 | err_cmap: | ||
210 | fb_dealloc_cmap(&info->cmap); | ||
211 | |||
212 | err_alloc: | ||
213 | root_pmagbafb_dev = par->next; | ||
214 | release_tc_card(par->slot); | ||
215 | framebuffer_release(info); | ||
216 | return -ENXIO; | ||
155 | } | 217 | } |
156 | 218 | ||
157 | /* | 219 | static void __exit pmagbafb_exit_one(void) |
158 | * Initialise the framebuffer | 220 | { |
159 | */ | 221 | struct fb_info *info = root_pmagbafb_dev; |
222 | struct pmagbafb_par *par = info->par; | ||
160 | 223 | ||
161 | int __init pmagbafb_init(void) | 224 | unregister_framebuffer(info); |
225 | iounmap(info->screen_base); | ||
226 | iounmap(par->mmio); | ||
227 | fb_dealloc_cmap(&info->cmap); | ||
228 | root_pmagbafb_dev = par->next; | ||
229 | release_tc_card(par->slot); | ||
230 | framebuffer_release(info); | ||
231 | } | ||
232 | |||
233 | |||
234 | /* | ||
235 | * Initialise the framebuffer. | ||
236 | */ | ||
237 | static int __init pmagbafb_init(void) | ||
162 | { | 238 | { |
163 | int sid; | 239 | int count = 0; |
164 | int found = 0; | 240 | int slot; |
165 | 241 | ||
166 | if (fb_get_options("pmagbafb", NULL)) | 242 | if (fb_get_options("pmagbafb", NULL)) |
167 | return -ENODEV; | 243 | return -ENXIO; |
168 | 244 | ||
169 | if (TURBOCHANNEL) { | 245 | while ((slot = search_tc_card("PMAG-BA")) >= 0) { |
170 | while ((sid = search_tc_card("PMAG-BA")) >= 0) { | 246 | if (pmagbafb_init_one(slot) < 0) |
171 | found = 1; | 247 | break; |
172 | claim_tc_card(sid); | 248 | count++; |
173 | pmagbafb_init_one(sid); | ||
174 | } | ||
175 | return found ? 0 : -ENODEV; | ||
176 | } else { | ||
177 | return -ENODEV; | ||
178 | } | 249 | } |
250 | return (count > 0) ? 0 : -ENXIO; | ||
179 | } | 251 | } |
180 | 252 | ||
253 | static void __exit pmagbafb_exit(void) | ||
254 | { | ||
255 | while (root_pmagbafb_dev) | ||
256 | pmagbafb_exit_one(); | ||
257 | } | ||
258 | |||
259 | |||
181 | module_init(pmagbafb_init); | 260 | module_init(pmagbafb_init); |
261 | module_exit(pmagbafb_exit); | ||
262 | |||
182 | MODULE_LICENSE("GPL"); | 263 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/pmagb-b-fb.c b/drivers/video/pmagb-b-fb.c index d14eaee91cff..a483b13e117b 100644 --- a/drivers/video/pmagb-b-fb.c +++ b/drivers/video/pmagb-b-fb.c | |||
@@ -1,114 +1,128 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/pmagb-b-fb.c | 2 | * linux/drivers/video/pmagb-b-fb.c |
3 | * | 3 | * |
4 | * PMAGB-B TurboChannel framebuffer card support ... derived from: | 4 | * PMAGB-B TURBOchannel Smart Frame Buffer (SFB) card support, |
5 | * derived from: | ||
5 | * "HP300 Topcat framebuffer support (derived from macfb of all things) | 6 | * "HP300 Topcat framebuffer support (derived from macfb of all things) |
6 | * Phil Blundell <philb@gnu.org> 1998", the original code can be | 7 | * Phil Blundell <philb@gnu.org> 1998", the original code can be |
7 | * found in the file hpfb.c in the same directory. | 8 | * found in the file hpfb.c in the same directory. |
8 | * | 9 | * |
9 | * DECstation related code Copyright (C) 1999, 2000, 2001 by | 10 | * DECstation related code Copyright (C) 1999, 2000, 2001 by |
10 | * Michael Engel <engel@unix-ag.org>, | 11 | * Michael Engel <engel@unix-ag.org>, |
11 | * Karsten Merker <merker@linuxtag.org> and | 12 | * Karsten Merker <merker@linuxtag.org> and |
12 | * Harald Koerfgen. | 13 | * Harald Koerfgen. |
13 | * This file is subject to the terms and conditions of the GNU General | 14 | * Copyright (c) 2005 Maciej W. Rozycki |
14 | * Public License. See the file COPYING in the main directory of this | ||
15 | * archive for more details. | ||
16 | * | 15 | * |
16 | * This file is subject to the terms and conditions of the GNU General | ||
17 | * Public License. See the file COPYING in the main directory of this | ||
18 | * archive for more details. | ||
17 | */ | 19 | */ |
18 | 20 | ||
19 | /* | 21 | #include <linux/compiler.h> |
20 | * We currently only support the PMAGB-B in high resolution mode | ||
21 | * as I know of no way to detect low resolution mode set via jumper. | ||
22 | * KM, 2001/01/07 | ||
23 | */ | ||
24 | |||
25 | #include <linux/module.h> | ||
26 | #include <linux/kernel.h> | ||
27 | #include <linux/sched.h> | ||
28 | #include <linux/errno.h> | ||
29 | #include <linux/string.h> | ||
30 | #include <linux/timer.h> | ||
31 | #include <linux/mm.h> | ||
32 | #include <linux/tty.h> | ||
33 | #include <linux/slab.h> | ||
34 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
35 | #include <linux/init.h> | 23 | #include <linux/errno.h> |
36 | #include <linux/fb.h> | 24 | #include <linux/fb.h> |
37 | #include <asm/bootinfo.h> | 25 | #include <linux/init.h> |
38 | #include <asm/dec/machtype.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | ||
28 | #include <linux/types.h> | ||
29 | |||
30 | #include <asm/bug.h> | ||
31 | #include <asm/io.h> | ||
32 | #include <asm/system.h> | ||
33 | |||
39 | #include <asm/dec/tc.h> | 34 | #include <asm/dec/tc.h> |
35 | |||
40 | #include <video/pmagb-b-fb.h> | 36 | #include <video/pmagb-b-fb.h> |
41 | 37 | ||
42 | struct pmagb_b_ramdac_regs { | 38 | |
43 | unsigned char addr_low; | 39 | struct pmagbbfb_par { |
44 | unsigned char pad0[3]; | 40 | struct fb_info *next; |
45 | unsigned char addr_hi; | 41 | volatile void __iomem *mmio; |
46 | unsigned char pad1[3]; | 42 | volatile void __iomem *smem; |
47 | unsigned char data; | 43 | volatile u32 __iomem *sfb; |
48 | unsigned char pad2[3]; | 44 | volatile u32 __iomem *dac; |
49 | unsigned char cmap; | 45 | unsigned int osc0; |
46 | unsigned int osc1; | ||
47 | int slot; | ||
50 | }; | 48 | }; |
51 | 49 | ||
52 | /* | ||
53 | * Max 3 TURBOchannel slots -> max 3 PMAGB-B :) | ||
54 | */ | ||
55 | static struct fb_info pmagbb_fb_info[3]; | ||
56 | 50 | ||
57 | static struct fb_var_screeninfo pmagbbfb_defined = { | 51 | static struct fb_info *root_pmagbbfb_dev; |
58 | .xres = 1280, | 52 | |
59 | .yres = 1024, | 53 | static struct fb_var_screeninfo pmagbbfb_defined __initdata = { |
60 | .xres_virtual = 1280, | ||
61 | .yres_virtual = 1024, | ||
62 | .bits_per_pixel = 8, | 54 | .bits_per_pixel = 8, |
63 | .red.length = 8, | 55 | .red.length = 8, |
64 | .green.length = 8, | 56 | .green.length = 8, |
65 | .blue.length = 8, | 57 | .blue.length = 8, |
66 | .activate = FB_ACTIVATE_NOW, | 58 | .activate = FB_ACTIVATE_NOW, |
67 | .height = 274, | 59 | .height = -1, |
68 | .width = 195, | 60 | .width = -1, |
69 | .accel_flags = FB_ACCEL_NONE, | 61 | .accel_flags = FB_ACCEL_NONE, |
62 | .sync = FB_SYNC_ON_GREEN, | ||
70 | .vmode = FB_VMODE_NONINTERLACED, | 63 | .vmode = FB_VMODE_NONINTERLACED, |
71 | }; | 64 | }; |
72 | 65 | ||
73 | static struct fb_fix_screeninfo pmagbafb_fix = { | 66 | static struct fb_fix_screeninfo pmagbbfb_fix __initdata = { |
74 | .id = "PMAGB-BA", | 67 | .id = "PMAGB-BA", |
75 | .smem_len = (1280 * 1024), | 68 | .smem_len = (2048 * 1024), |
76 | .type = FB_TYPE_PACKED_PIXELS, | 69 | .type = FB_TYPE_PACKED_PIXELS, |
77 | .visual = FB_VISUAL_PSEUDOCOLOR, | 70 | .visual = FB_VISUAL_PSEUDOCOLOR, |
78 | .line_length = 1280, | 71 | .mmio_len = PMAGB_B_FBMEM, |
72 | }; | ||
73 | |||
74 | |||
75 | static inline void sfb_write(struct pmagbbfb_par *par, unsigned int reg, u32 v) | ||
76 | { | ||
77 | writel(v, par->sfb + reg / 4); | ||
79 | } | 78 | } |
80 | 79 | ||
81 | /* | 80 | static inline u32 sfb_read(struct pmagbbfb_par *par, unsigned int reg) |
82 | * Turn hardware cursor off | 81 | { |
83 | */ | 82 | return readl(par->sfb + reg / 4); |
84 | void pmagbbfb_erase_cursor(struct pmagb_b_ramdac_regs *bt459_regs) | 83 | } |
84 | |||
85 | static inline void dac_write(struct pmagbbfb_par *par, unsigned int reg, u8 v) | ||
85 | { | 86 | { |
86 | bt459_regs->addr_low = 0; | 87 | writeb(v, par->dac + reg / 4); |
87 | bt459_regs->addr_hi = 3; | ||
88 | bt459_regs->data = 0; | ||
89 | } | 88 | } |
90 | 89 | ||
90 | static inline u8 dac_read(struct pmagbbfb_par *par, unsigned int reg) | ||
91 | { | ||
92 | return readb(par->dac + reg / 4); | ||
93 | } | ||
94 | |||
95 | static inline void gp0_write(struct pmagbbfb_par *par, u32 v) | ||
96 | { | ||
97 | writel(v, par->mmio + PMAGB_B_GP0); | ||
98 | } | ||
99 | |||
100 | |||
91 | /* | 101 | /* |
92 | * Set the palette. | 102 | * Set the palette. |
93 | */ | 103 | */ |
94 | static int pmagbbfb_setcolreg(unsigned regno, unsigned red, unsigned green, | 104 | static int pmagbbfb_setcolreg(unsigned int regno, unsigned int red, |
95 | unsigned blue, unsigned transp, | 105 | unsigned int green, unsigned int blue, |
96 | struct fb_info *info) | 106 | unsigned int transp, struct fb_info *info) |
97 | { | 107 | { |
98 | struct pmagb_b_ramdac_regs *bt459_regs = (struct pmagb_b_ramdac_regs *) info->par; | 108 | struct pmagbbfb_par *par = info->par; |
99 | 109 | ||
100 | if (regno >= info->cmap.len) | 110 | BUG_ON(regno >= info->cmap.len); |
101 | return 1; | ||
102 | 111 | ||
103 | red >>= 8; /* The cmap fields are 16 bits */ | 112 | red >>= 8; /* The cmap fields are 16 bits */ |
104 | green >>= 8; /* wide, but the harware colormap */ | 113 | green >>= 8; /* wide, but the hardware colormap */ |
105 | blue >>= 8; /* registers are only 8 bits wide */ | 114 | blue >>= 8; /* registers are only 8 bits wide */ |
106 | 115 | ||
107 | bt459_regs->addr_low = (__u8) regno; | 116 | mb(); |
108 | bt459_regs->addr_hi = 0; | 117 | dac_write(par, BT459_ADDR_LO, regno); |
109 | bt459_regs->cmap = red; | 118 | dac_write(par, BT459_ADDR_HI, 0x00); |
110 | bt459_regs->cmap = green; | 119 | wmb(); |
111 | bt459_regs->cmap = blue; | 120 | dac_write(par, BT459_CMAP, red); |
121 | wmb(); | ||
122 | dac_write(par, BT459_CMAP, green); | ||
123 | wmb(); | ||
124 | dac_write(par, BT459_CMAP, blue); | ||
125 | |||
112 | return 0; | 126 | return 0; |
113 | } | 127 | } |
114 | 128 | ||
@@ -121,62 +135,247 @@ static struct fb_ops pmagbbfb_ops = { | |||
121 | .fb_cursor = soft_cursor, | 135 | .fb_cursor = soft_cursor, |
122 | }; | 136 | }; |
123 | 137 | ||
124 | int __init pmagbbfb_init_one(int slot) | 138 | |
139 | /* | ||
140 | * Turn the hardware cursor off. | ||
141 | */ | ||
142 | static void __init pmagbbfb_erase_cursor(struct fb_info *info) | ||
143 | { | ||
144 | struct pmagbbfb_par *par = info->par; | ||
145 | |||
146 | mb(); | ||
147 | dac_write(par, BT459_ADDR_LO, 0x00); | ||
148 | dac_write(par, BT459_ADDR_HI, 0x03); | ||
149 | wmb(); | ||
150 | dac_write(par, BT459_DATA, 0x00); | ||
151 | } | ||
152 | |||
153 | /* | ||
154 | * Set up screen parameters. | ||
155 | */ | ||
156 | static void __init pmagbbfb_screen_setup(struct fb_info *info) | ||
157 | { | ||
158 | struct pmagbbfb_par *par = info->par; | ||
159 | |||
160 | info->var.xres = ((sfb_read(par, SFB_REG_VID_HOR) >> | ||
161 | SFB_VID_HOR_PIX_SHIFT) & SFB_VID_HOR_PIX_MASK) * 4; | ||
162 | info->var.xres_virtual = info->var.xres; | ||
163 | info->var.yres = (sfb_read(par, SFB_REG_VID_VER) >> | ||
164 | SFB_VID_VER_SL_SHIFT) & SFB_VID_VER_SL_MASK; | ||
165 | info->var.yres_virtual = info->var.yres; | ||
166 | info->var.left_margin = ((sfb_read(par, SFB_REG_VID_HOR) >> | ||
167 | SFB_VID_HOR_BP_SHIFT) & | ||
168 | SFB_VID_HOR_BP_MASK) * 4; | ||
169 | info->var.right_margin = ((sfb_read(par, SFB_REG_VID_HOR) >> | ||
170 | SFB_VID_HOR_FP_SHIFT) & | ||
171 | SFB_VID_HOR_FP_MASK) * 4; | ||
172 | info->var.upper_margin = (sfb_read(par, SFB_REG_VID_VER) >> | ||
173 | SFB_VID_VER_BP_SHIFT) & SFB_VID_VER_BP_MASK; | ||
174 | info->var.lower_margin = (sfb_read(par, SFB_REG_VID_VER) >> | ||
175 | SFB_VID_VER_FP_SHIFT) & SFB_VID_VER_FP_MASK; | ||
176 | info->var.hsync_len = ((sfb_read(par, SFB_REG_VID_HOR) >> | ||
177 | SFB_VID_HOR_SYN_SHIFT) & | ||
178 | SFB_VID_HOR_SYN_MASK) * 4; | ||
179 | info->var.vsync_len = (sfb_read(par, SFB_REG_VID_VER) >> | ||
180 | SFB_VID_VER_SYN_SHIFT) & SFB_VID_VER_SYN_MASK; | ||
181 | |||
182 | info->fix.line_length = info->var.xres; | ||
183 | }; | ||
184 | |||
185 | /* | ||
186 | * Determine oscillator configuration. | ||
187 | */ | ||
188 | static void __init pmagbbfb_osc_setup(struct fb_info *info) | ||
125 | { | 189 | { |
126 | unsigned long base_addr = get_tc_base_addr(slot); | 190 | static unsigned int pmagbbfb_freqs[] __initdata = { |
127 | struct fb_info *info = &pmagbb_fb_info[slot]; | 191 | 130808, 119843, 104000, 92980, 74367, 72800, |
128 | 192 | 69197, 66000, 65000, 50350, 36000, 32000, 25175 | |
129 | printk("PMAGB-BA framebuffer in slot %d\n", slot); | 193 | }; |
130 | /* | 194 | struct pmagbbfb_par *par = info->par; |
131 | * Framebuffer display memory base address and friends | 195 | u32 count0 = 8, count1 = 8, counttc = 16 * 256 + 8; |
132 | */ | 196 | u32 freq0, freq1, freqtc = get_tc_speed() / 250; |
133 | pmagbbfb_fix.smem_start = base_addr + PMAGB_B_ONBOARD_FBMEM_OFFSET; | 197 | int i, j; |
134 | info->par = (base_addr + PMAGB_B_BT459_OFFSET); | 198 | |
135 | 199 | gp0_write(par, 0); /* select Osc0 */ | |
136 | /* | 200 | for (j = 0; j < 16; j++) { |
137 | * Configure the Bt459 RAM DAC | 201 | mb(); |
138 | */ | 202 | sfb_write(par, SFB_REG_TCCLK_COUNT, 0); |
139 | pmagbbfb_erase_cursor((struct pmagb_b_ramdac_regs *) info->par); | 203 | mb(); |
140 | 204 | for (i = 0; i < 100; i++) { /* nominally max. 20.5us */ | |
141 | /* | 205 | if (sfb_read(par, SFB_REG_TCCLK_COUNT) == 0) |
142 | * Let there be consoles.. | 206 | break; |
143 | */ | 207 | udelay(1); |
208 | } | ||
209 | count0 += sfb_read(par, SFB_REG_VIDCLK_COUNT); | ||
210 | } | ||
211 | |||
212 | gp0_write(par, 1); /* select Osc1 */ | ||
213 | for (j = 0; j < 16; j++) { | ||
214 | mb(); | ||
215 | sfb_write(par, SFB_REG_TCCLK_COUNT, 0); | ||
216 | |||
217 | for (i = 0; i < 100; i++) { /* nominally max. 20.5us */ | ||
218 | if (sfb_read(par, SFB_REG_TCCLK_COUNT) == 0) | ||
219 | break; | ||
220 | udelay(1); | ||
221 | } | ||
222 | count1 += sfb_read(par, SFB_REG_VIDCLK_COUNT); | ||
223 | } | ||
224 | |||
225 | freq0 = (freqtc * count0 + counttc / 2) / counttc; | ||
226 | par->osc0 = freq0; | ||
227 | if (freq0 >= pmagbbfb_freqs[0] - (pmagbbfb_freqs[0] + 32) / 64 && | ||
228 | freq0 <= pmagbbfb_freqs[0] + (pmagbbfb_freqs[0] + 32) / 64) | ||
229 | par->osc0 = pmagbbfb_freqs[0]; | ||
230 | |||
231 | freq1 = (par->osc0 * count1 + count0 / 2) / count0; | ||
232 | par->osc1 = freq1; | ||
233 | for (i = 0; i < sizeof(pmagbbfb_freqs) / sizeof(*pmagbbfb_freqs); i++) | ||
234 | if (freq1 >= pmagbbfb_freqs[i] - | ||
235 | (pmagbbfb_freqs[i] + 128) / 256 && | ||
236 | freq1 <= pmagbbfb_freqs[i] + | ||
237 | (pmagbbfb_freqs[i] + 128) / 256) { | ||
238 | par->osc1 = pmagbbfb_freqs[i]; | ||
239 | break; | ||
240 | } | ||
241 | |||
242 | if (par->osc0 - par->osc1 <= (par->osc0 + par->osc1 + 256) / 512 || | ||
243 | par->osc1 - par->osc0 <= (par->osc0 + par->osc1 + 256) / 512) | ||
244 | par->osc1 = 0; | ||
245 | |||
246 | gp0_write(par, par->osc1 != 0); /* reselect OscX */ | ||
247 | |||
248 | info->var.pixclock = par->osc1 ? | ||
249 | (1000000000 + par->osc1 / 2) / par->osc1 : | ||
250 | (1000000000 + par->osc0 / 2) / par->osc0; | ||
251 | }; | ||
252 | |||
253 | |||
254 | static int __init pmagbbfb_init_one(int slot) | ||
255 | { | ||
256 | char freq0[12], freq1[12]; | ||
257 | struct fb_info *info; | ||
258 | struct pmagbbfb_par *par; | ||
259 | unsigned long base_addr; | ||
260 | u32 vid_base; | ||
261 | |||
262 | info = framebuffer_alloc(sizeof(struct pmagbbfb_par), NULL); | ||
263 | if (!info) | ||
264 | return -ENOMEM; | ||
265 | |||
266 | par = info->par; | ||
267 | par->slot = slot; | ||
268 | claim_tc_card(par->slot); | ||
269 | |||
270 | base_addr = get_tc_base_addr(par->slot); | ||
271 | |||
272 | par->next = root_pmagbbfb_dev; | ||
273 | root_pmagbbfb_dev = info; | ||
274 | |||
275 | if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) | ||
276 | goto err_alloc; | ||
277 | |||
144 | info->fbops = &pmagbbfb_ops; | 278 | info->fbops = &pmagbbfb_ops; |
145 | info->var = pmagbbfb_defined; | ||
146 | info->fix = pmagbbfb_fix; | 279 | info->fix = pmagbbfb_fix; |
147 | info->screen_base = pmagbbfb_fix.smem_start; | 280 | info->var = pmagbbfb_defined; |
148 | info->flags = FBINFO_DEFAULT; | 281 | info->flags = FBINFO_DEFAULT; |
149 | 282 | ||
150 | fb_alloc_cmap(&fb_info.cmap, 256, 0); | 283 | /* MMIO mapping setup. */ |
284 | info->fix.mmio_start = base_addr; | ||
285 | par->mmio = ioremap_nocache(info->fix.mmio_start, info->fix.mmio_len); | ||
286 | if (!par->mmio) | ||
287 | goto err_cmap; | ||
288 | par->sfb = par->mmio + PMAGB_B_SFB; | ||
289 | par->dac = par->mmio + PMAGB_B_BT459; | ||
290 | |||
291 | /* Frame buffer mapping setup. */ | ||
292 | info->fix.smem_start = base_addr + PMAGB_B_FBMEM; | ||
293 | par->smem = ioremap_nocache(info->fix.smem_start, info->fix.smem_len); | ||
294 | if (!par->smem) | ||
295 | goto err_mmio_map; | ||
296 | vid_base = sfb_read(par, SFB_REG_VID_BASE); | ||
297 | info->screen_base = (void __iomem *)par->smem + vid_base * 0x1000; | ||
298 | info->screen_size = info->fix.smem_len - 2 * vid_base * 0x1000; | ||
299 | |||
300 | pmagbbfb_erase_cursor(info); | ||
301 | pmagbbfb_screen_setup(info); | ||
302 | pmagbbfb_osc_setup(info); | ||
151 | 303 | ||
152 | if (register_framebuffer(info) < 0) | 304 | if (register_framebuffer(info) < 0) |
153 | return 1; | 305 | goto err_smem_map; |
306 | |||
307 | snprintf(freq0, sizeof(freq0), "%u.%03uMHz", | ||
308 | par->osc0 / 1000, par->osc0 % 1000); | ||
309 | snprintf(freq1, sizeof(freq1), "%u.%03uMHz", | ||
310 | par->osc1 / 1000, par->osc1 % 1000); | ||
311 | |||
312 | pr_info("fb%d: %s frame buffer device in slot %d\n", | ||
313 | info->node, info->fix.id, par->slot); | ||
314 | pr_info("fb%d: Osc0: %s, Osc1: %s, Osc%u selected\n", | ||
315 | info->node, freq0, par->osc1 ? freq1 : "disabled", | ||
316 | par->osc1 != 0); | ||
317 | |||
154 | return 0; | 318 | return 0; |
319 | |||
320 | |||
321 | err_smem_map: | ||
322 | iounmap(par->smem); | ||
323 | |||
324 | err_mmio_map: | ||
325 | iounmap(par->mmio); | ||
326 | |||
327 | err_cmap: | ||
328 | fb_dealloc_cmap(&info->cmap); | ||
329 | |||
330 | err_alloc: | ||
331 | root_pmagbbfb_dev = par->next; | ||
332 | release_tc_card(par->slot); | ||
333 | framebuffer_release(info); | ||
334 | return -ENXIO; | ||
155 | } | 335 | } |
156 | 336 | ||
157 | /* | 337 | static void __exit pmagbbfb_exit_one(void) |
158 | * Initialise the framebuffer | 338 | { |
159 | */ | 339 | struct fb_info *info = root_pmagbbfb_dev; |
340 | struct pmagbbfb_par *par = info->par; | ||
341 | |||
342 | unregister_framebuffer(info); | ||
343 | iounmap(par->smem); | ||
344 | iounmap(par->mmio); | ||
345 | fb_dealloc_cmap(&info->cmap); | ||
346 | root_pmagbbfb_dev = par->next; | ||
347 | release_tc_card(par->slot); | ||
348 | framebuffer_release(info); | ||
349 | } | ||
160 | 350 | ||
161 | int __init pmagbbfb_init(void) | 351 | |
352 | /* | ||
353 | * Initialise the framebuffer. | ||
354 | */ | ||
355 | static int __init pmagbbfb_init(void) | ||
162 | { | 356 | { |
163 | int sid; | 357 | int count = 0; |
164 | int found = 0; | 358 | int slot; |
165 | 359 | ||
166 | if (fb_get_options("pmagbbfb", NULL)) | 360 | if (fb_get_options("pmagbbfb", NULL)) |
167 | return -ENODEV; | 361 | return -ENXIO; |
168 | 362 | ||
169 | if (TURBOCHANNEL) { | 363 | while ((slot = search_tc_card("PMAGB-BA")) >= 0) { |
170 | while ((sid = search_tc_card("PMAGB-BA")) >= 0) { | 364 | if (pmagbbfb_init_one(slot) < 0) |
171 | found = 1; | 365 | break; |
172 | claim_tc_card(sid); | 366 | count++; |
173 | pmagbbfb_init_one(sid); | ||
174 | } | ||
175 | return found ? 0 : -ENODEV; | ||
176 | } else { | ||
177 | return -ENODEV; | ||
178 | } | 367 | } |
368 | return (count > 0) ? 0 : -ENXIO; | ||
369 | } | ||
370 | |||
371 | static void __exit pmagbbfb_exit(void) | ||
372 | { | ||
373 | while (root_pmagbbfb_dev) | ||
374 | pmagbbfb_exit_one(); | ||
179 | } | 375 | } |
180 | 376 | ||
377 | |||
181 | module_init(pmagbbfb_init); | 378 | module_init(pmagbbfb_init); |
379 | module_exit(pmagbbfb_exit); | ||
380 | |||
182 | MODULE_LICENSE("GPL"); | 381 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/video/s1d13xxxfb.c b/drivers/video/s1d13xxxfb.c index 3848be2b9d2d..fa98d91c42eb 100644 --- a/drivers/video/s1d13xxxfb.c +++ b/drivers/video/s1d13xxxfb.c | |||
@@ -655,7 +655,7 @@ bail: | |||
655 | } | 655 | } |
656 | 656 | ||
657 | #ifdef CONFIG_PM | 657 | #ifdef CONFIG_PM |
658 | static int s1d13xxxfb_suspend(struct device *dev, u32 state, u32 level) | 658 | static int s1d13xxxfb_suspend(struct device *dev, pm_message_t state, u32 level) |
659 | { | 659 | { |
660 | struct fb_info *info = dev_get_drvdata(dev); | 660 | struct fb_info *info = dev_get_drvdata(dev); |
661 | struct s1d13xxxfb_par *s1dfb = info->par; | 661 | struct s1d13xxxfb_par *s1dfb = info->par; |
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index f4633d1891f1..117ad42f120d 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c | |||
@@ -2110,7 +2110,6 @@ static int savagefb_suspend (struct pci_dev* dev, pm_message_t state) | |||
2110 | struct savagefb_par *par = (struct savagefb_par *)info->par; | 2110 | struct savagefb_par *par = (struct savagefb_par *)info->par; |
2111 | 2111 | ||
2112 | DBG("savagefb_suspend"); | 2112 | DBG("savagefb_suspend"); |
2113 | printk(KERN_DEBUG "state: %u\n", state); | ||
2114 | 2113 | ||
2115 | acquire_console_sem(); | 2114 | acquire_console_sem(); |
2116 | fb_set_suspend(info, pci_choose_state(dev, state)); | 2115 | fb_set_suspend(info, pci_choose_state(dev, state)); |
diff --git a/fs/Kconfig b/fs/Kconfig index e54be7058359..ed78d24ee426 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -783,28 +783,6 @@ config SYSFS | |||
783 | 783 | ||
784 | Designers of embedded systems may wish to say N here to conserve space. | 784 | Designers of embedded systems may wish to say N here to conserve space. |
785 | 785 | ||
786 | config DEVPTS_FS_XATTR | ||
787 | bool "/dev/pts Extended Attributes" | ||
788 | depends on UNIX98_PTYS | ||
789 | help | ||
790 | Extended attributes are name:value pairs associated with inodes by | ||
791 | the kernel or by users (see the attr(5) manual page, or visit | ||
792 | <http://acl.bestbits.at/> for details). | ||
793 | |||
794 | If unsure, say N. | ||
795 | |||
796 | config DEVPTS_FS_SECURITY | ||
797 | bool "/dev/pts Security Labels" | ||
798 | depends on DEVPTS_FS_XATTR | ||
799 | help | ||
800 | Security labels support alternative access control models | ||
801 | implemented by security modules like SELinux. This option | ||
802 | enables an extended attribute handler for file security | ||
803 | labels in the /dev/pts filesystem. | ||
804 | |||
805 | If you are not using a security module that requires using | ||
806 | extended attributes for file security labels, say N. | ||
807 | |||
808 | config TMPFS | 786 | config TMPFS |
809 | bool "Virtual memory file system support (former shm fs)" | 787 | bool "Virtual memory file system support (former shm fs)" |
810 | help | 788 | help |
@@ -817,27 +795,6 @@ config TMPFS | |||
817 | 795 | ||
818 | See <file:Documentation/filesystems/tmpfs.txt> for details. | 796 | See <file:Documentation/filesystems/tmpfs.txt> for details. |
819 | 797 | ||
820 | config TMPFS_XATTR | ||
821 | bool "tmpfs Extended Attributes" | ||
822 | depends on TMPFS | ||
823 | help | ||
824 | Extended attributes are name:value pairs associated with inodes by | ||
825 | the kernel or by users (see the attr(5) manual page, or visit | ||
826 | <http://acl.bestbits.at/> for details). | ||
827 | |||
828 | If unsure, say N. | ||
829 | |||
830 | config TMPFS_SECURITY | ||
831 | bool "tmpfs Security Labels" | ||
832 | depends on TMPFS_XATTR | ||
833 | help | ||
834 | Security labels support alternative access control models | ||
835 | implemented by security modules like SELinux. This option | ||
836 | enables an extended attribute handler for file security | ||
837 | labels in the tmpfs filesystem. | ||
838 | If you are not using a security module that requires using | ||
839 | extended attributes for file security labels, say N. | ||
840 | |||
841 | config HUGETLBFS | 798 | config HUGETLBFS |
842 | bool "HugeTLB file system support" | 799 | bool "HugeTLB file system support" |
843 | depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || X86_64 || BROKEN | 800 | depends X86 || IA64 || PPC64 || SPARC64 || SUPERH || X86_64 || BROKEN |
@@ -567,6 +567,10 @@ static void use_mm(struct mm_struct *mm) | |||
567 | atomic_inc(&mm->mm_count); | 567 | atomic_inc(&mm->mm_count); |
568 | tsk->mm = mm; | 568 | tsk->mm = mm; |
569 | tsk->active_mm = mm; | 569 | tsk->active_mm = mm; |
570 | /* | ||
571 | * Note that on UML this *requires* PF_BORROWED_MM to be set, otherwise | ||
572 | * it won't work. Update it accordingly if you change it here | ||
573 | */ | ||
570 | activate_mm(active_mm, mm); | 574 | activate_mm(active_mm, mm); |
571 | task_unlock(tsk); | 575 | task_unlock(tsk); |
572 | 576 | ||
diff --git a/fs/devpts/Makefile b/fs/devpts/Makefile index 5800df2e50c8..236696efcbac 100644 --- a/fs/devpts/Makefile +++ b/fs/devpts/Makefile | |||
@@ -5,4 +5,3 @@ | |||
5 | obj-$(CONFIG_UNIX98_PTYS) += devpts.o | 5 | obj-$(CONFIG_UNIX98_PTYS) += devpts.o |
6 | 6 | ||
7 | devpts-$(CONFIG_UNIX98_PTYS) := inode.o | 7 | devpts-$(CONFIG_UNIX98_PTYS) := inode.o |
8 | devpts-$(CONFIG_DEVPTS_FS_SECURITY) += xattr_security.o | ||
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index 1571c8d6c232..f2be44d4491f 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c | |||
@@ -18,28 +18,9 @@ | |||
18 | #include <linux/mount.h> | 18 | #include <linux/mount.h> |
19 | #include <linux/tty.h> | 19 | #include <linux/tty.h> |
20 | #include <linux/devpts_fs.h> | 20 | #include <linux/devpts_fs.h> |
21 | #include <linux/xattr.h> | ||
22 | 21 | ||
23 | #define DEVPTS_SUPER_MAGIC 0x1cd1 | 22 | #define DEVPTS_SUPER_MAGIC 0x1cd1 |
24 | 23 | ||
25 | extern struct xattr_handler devpts_xattr_security_handler; | ||
26 | |||
27 | static struct xattr_handler *devpts_xattr_handlers[] = { | ||
28 | #ifdef CONFIG_DEVPTS_FS_SECURITY | ||
29 | &devpts_xattr_security_handler, | ||
30 | #endif | ||
31 | NULL | ||
32 | }; | ||
33 | |||
34 | static struct inode_operations devpts_file_inode_operations = { | ||
35 | #ifdef CONFIG_DEVPTS_FS_XATTR | ||
36 | .setxattr = generic_setxattr, | ||
37 | .getxattr = generic_getxattr, | ||
38 | .listxattr = generic_listxattr, | ||
39 | .removexattr = generic_removexattr, | ||
40 | #endif | ||
41 | }; | ||
42 | |||
43 | static struct vfsmount *devpts_mnt; | 24 | static struct vfsmount *devpts_mnt; |
44 | static struct dentry *devpts_root; | 25 | static struct dentry *devpts_root; |
45 | 26 | ||
@@ -102,7 +83,6 @@ devpts_fill_super(struct super_block *s, void *data, int silent) | |||
102 | s->s_blocksize_bits = 10; | 83 | s->s_blocksize_bits = 10; |
103 | s->s_magic = DEVPTS_SUPER_MAGIC; | 84 | s->s_magic = DEVPTS_SUPER_MAGIC; |
104 | s->s_op = &devpts_sops; | 85 | s->s_op = &devpts_sops; |
105 | s->s_xattr = devpts_xattr_handlers; | ||
106 | s->s_time_gran = 1; | 86 | s->s_time_gran = 1; |
107 | 87 | ||
108 | inode = new_inode(s); | 88 | inode = new_inode(s); |
@@ -175,7 +155,6 @@ int devpts_pty_new(struct tty_struct *tty) | |||
175 | inode->i_gid = config.setgid ? config.gid : current->fsgid; | 155 | inode->i_gid = config.setgid ? config.gid : current->fsgid; |
176 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; | 156 | inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME; |
177 | init_special_inode(inode, S_IFCHR|config.mode, device); | 157 | init_special_inode(inode, S_IFCHR|config.mode, device); |
178 | inode->i_op = &devpts_file_inode_operations; | ||
179 | inode->u.generic_ip = tty; | 158 | inode->u.generic_ip = tty; |
180 | 159 | ||
181 | dentry = get_node(number); | 160 | dentry = get_node(number); |
diff --git a/fs/devpts/xattr_security.c b/fs/devpts/xattr_security.c deleted file mode 100644 index 864cb5c79baa..000000000000 --- a/fs/devpts/xattr_security.c +++ /dev/null | |||
@@ -1,47 +0,0 @@ | |||
1 | /* | ||
2 | * Security xattr support for devpts. | ||
3 | * | ||
4 | * Author: Stephen Smalley <sds@epoch.ncsc.mil> | ||
5 | * Copyright (c) 2004 Red Hat, Inc., James Morris <jmorris@redhat.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the Free | ||
9 | * Software Foundation; either version 2 of the License, or (at your option) | ||
10 | * any later version. | ||
11 | */ | ||
12 | #include <linux/string.h> | ||
13 | #include <linux/fs.h> | ||
14 | #include <linux/security.h> | ||
15 | #include <linux/xattr.h> | ||
16 | |||
17 | static size_t | ||
18 | devpts_xattr_security_list(struct inode *inode, char *list, size_t list_len, | ||
19 | const char *name, size_t name_len) | ||
20 | { | ||
21 | return security_inode_listsecurity(inode, list, list_len); | ||
22 | } | ||
23 | |||
24 | static int | ||
25 | devpts_xattr_security_get(struct inode *inode, const char *name, | ||
26 | void *buffer, size_t size) | ||
27 | { | ||
28 | if (strcmp(name, "") == 0) | ||
29 | return -EINVAL; | ||
30 | return security_inode_getsecurity(inode, name, buffer, size); | ||
31 | } | ||
32 | |||
33 | static int | ||
34 | devpts_xattr_security_set(struct inode *inode, const char *name, | ||
35 | const void *value, size_t size, int flags) | ||
36 | { | ||
37 | if (strcmp(name, "") == 0) | ||
38 | return -EINVAL; | ||
39 | return security_inode_setsecurity(inode, name, value, size, flags); | ||
40 | } | ||
41 | |||
42 | struct xattr_handler devpts_xattr_security_handler = { | ||
43 | .prefix = XATTR_SECURITY_PREFIX, | ||
44 | .list = devpts_xattr_security_list, | ||
45 | .get = devpts_xattr_security_get, | ||
46 | .set = devpts_xattr_security_set, | ||
47 | }; | ||
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 57ed50fe7f85..954cf893d50c 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -93,7 +93,7 @@ nfs4_make_rec_clidname(char *dname, struct xdr_netobj *clname) | |||
93 | 93 | ||
94 | dprintk("NFSD: nfs4_make_rec_clidname for %.*s\n", | 94 | dprintk("NFSD: nfs4_make_rec_clidname for %.*s\n", |
95 | clname->len, clname->data); | 95 | clname->len, clname->data); |
96 | tfm = crypto_alloc_tfm("md5", 0); | 96 | tfm = crypto_alloc_tfm("md5", CRYPTO_TFM_REQ_MAY_SLEEP); |
97 | if (tfm == NULL) | 97 | if (tfm == NULL) |
98 | goto out; | 98 | goto out; |
99 | cksum.len = crypto_tfm_alg_digestsize(tfm); | 99 | cksum.len = crypto_tfm_alg_digestsize(tfm); |
@@ -114,8 +114,7 @@ nfs4_make_rec_clidname(char *dname, struct xdr_netobj *clname) | |||
114 | kfree(cksum.data); | 114 | kfree(cksum.data); |
115 | status = nfs_ok; | 115 | status = nfs_ok; |
116 | out: | 116 | out: |
117 | if (tfm) | 117 | crypto_free_tfm(tfm); |
118 | crypto_free_tfm(tfm); | ||
119 | return status; | 118 | return status; |
120 | } | 119 | } |
121 | 120 | ||
diff --git a/fs/proc/base.c b/fs/proc/base.c index 491f2d9f89ac..520978e49e92 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -11,6 +11,40 @@ | |||
11 | * go into icache. We cache the reference to task_struct upon lookup too. | 11 | * go into icache. We cache the reference to task_struct upon lookup too. |
12 | * Eventually it should become a filesystem in its own. We don't use the | 12 | * Eventually it should become a filesystem in its own. We don't use the |
13 | * rest of procfs anymore. | 13 | * rest of procfs anymore. |
14 | * | ||
15 | * | ||
16 | * Changelog: | ||
17 | * 17-Jan-2005 | ||
18 | * Allan Bezerra | ||
19 | * Bruna Moreira <bruna.moreira@indt.org.br> | ||
20 | * Edjard Mota <edjard.mota@indt.org.br> | ||
21 | * Ilias Biris <ilias.biris@indt.org.br> | ||
22 | * Mauricio Lin <mauricio.lin@indt.org.br> | ||
23 | * | ||
24 | * Embedded Linux Lab - 10LE Instituto Nokia de Tecnologia - INdT | ||
25 | * | ||
26 | * A new process specific entry (smaps) included in /proc. It shows the | ||
27 | * size of rss for each memory area. The maps entry lacks information | ||
28 | * about physical memory size (rss) for each mapped file, i.e., | ||
29 | * rss information for executables and library files. | ||
30 | * This additional information is useful for any tools that need to know | ||
31 | * about physical memory consumption for a process specific library. | ||
32 | * | ||
33 | * Changelog: | ||
34 | * 21-Feb-2005 | ||
35 | * Embedded Linux Lab - 10LE Instituto Nokia de Tecnologia - INdT | ||
36 | * Pud inclusion in the page table walking. | ||
37 | * | ||
38 | * ChangeLog: | ||
39 | * 10-Mar-2005 | ||
40 | * 10LE Instituto Nokia de Tecnologia - INdT: | ||
41 | * A better way to walks through the page table as suggested by Hugh Dickins. | ||
42 | * | ||
43 | * Simo Piiroinen <simo.piiroinen@nokia.com>: | ||
44 | * Smaps information related to shared, private, clean and dirty pages. | ||
45 | * | ||
46 | * Paul Mundt <paul.mundt@nokia.com>: | ||
47 | * Overall revision about smaps. | ||
14 | */ | 48 | */ |
15 | 49 | ||
16 | #include <asm/uaccess.h> | 50 | #include <asm/uaccess.h> |
@@ -65,8 +99,10 @@ enum pid_directory_inos { | |||
65 | PROC_TGID_STAT, | 99 | PROC_TGID_STAT, |
66 | PROC_TGID_STATM, | 100 | PROC_TGID_STATM, |
67 | PROC_TGID_MAPS, | 101 | PROC_TGID_MAPS, |
102 | PROC_TGID_NUMA_MAPS, | ||
68 | PROC_TGID_MOUNTS, | 103 | PROC_TGID_MOUNTS, |
69 | PROC_TGID_WCHAN, | 104 | PROC_TGID_WCHAN, |
105 | PROC_TGID_SMAPS, | ||
70 | #ifdef CONFIG_SCHEDSTATS | 106 | #ifdef CONFIG_SCHEDSTATS |
71 | PROC_TGID_SCHEDSTAT, | 107 | PROC_TGID_SCHEDSTAT, |
72 | #endif | 108 | #endif |
@@ -102,8 +138,10 @@ enum pid_directory_inos { | |||
102 | PROC_TID_STAT, | 138 | PROC_TID_STAT, |
103 | PROC_TID_STATM, | 139 | PROC_TID_STATM, |
104 | PROC_TID_MAPS, | 140 | PROC_TID_MAPS, |
141 | PROC_TID_NUMA_MAPS, | ||
105 | PROC_TID_MOUNTS, | 142 | PROC_TID_MOUNTS, |
106 | PROC_TID_WCHAN, | 143 | PROC_TID_WCHAN, |
144 | PROC_TID_SMAPS, | ||
107 | #ifdef CONFIG_SCHEDSTATS | 145 | #ifdef CONFIG_SCHEDSTATS |
108 | PROC_TID_SCHEDSTAT, | 146 | PROC_TID_SCHEDSTAT, |
109 | #endif | 147 | #endif |
@@ -144,6 +182,9 @@ static struct pid_entry tgid_base_stuff[] = { | |||
144 | E(PROC_TGID_STAT, "stat", S_IFREG|S_IRUGO), | 182 | E(PROC_TGID_STAT, "stat", S_IFREG|S_IRUGO), |
145 | E(PROC_TGID_STATM, "statm", S_IFREG|S_IRUGO), | 183 | E(PROC_TGID_STATM, "statm", S_IFREG|S_IRUGO), |
146 | E(PROC_TGID_MAPS, "maps", S_IFREG|S_IRUGO), | 184 | E(PROC_TGID_MAPS, "maps", S_IFREG|S_IRUGO), |
185 | #ifdef CONFIG_NUMA | ||
186 | E(PROC_TGID_NUMA_MAPS, "numa_maps", S_IFREG|S_IRUGO), | ||
187 | #endif | ||
147 | E(PROC_TGID_MEM, "mem", S_IFREG|S_IRUSR|S_IWUSR), | 188 | E(PROC_TGID_MEM, "mem", S_IFREG|S_IRUSR|S_IWUSR), |
148 | #ifdef CONFIG_SECCOMP | 189 | #ifdef CONFIG_SECCOMP |
149 | E(PROC_TGID_SECCOMP, "seccomp", S_IFREG|S_IRUSR|S_IWUSR), | 190 | E(PROC_TGID_SECCOMP, "seccomp", S_IFREG|S_IRUSR|S_IWUSR), |
@@ -152,6 +193,7 @@ static struct pid_entry tgid_base_stuff[] = { | |||
152 | E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO), | 193 | E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO), |
153 | E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO), | 194 | E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO), |
154 | E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO), | 195 | E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO), |
196 | E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO), | ||
155 | #ifdef CONFIG_SECURITY | 197 | #ifdef CONFIG_SECURITY |
156 | E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), | 198 | E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), |
157 | #endif | 199 | #endif |
@@ -180,6 +222,9 @@ static struct pid_entry tid_base_stuff[] = { | |||
180 | E(PROC_TID_STAT, "stat", S_IFREG|S_IRUGO), | 222 | E(PROC_TID_STAT, "stat", S_IFREG|S_IRUGO), |
181 | E(PROC_TID_STATM, "statm", S_IFREG|S_IRUGO), | 223 | E(PROC_TID_STATM, "statm", S_IFREG|S_IRUGO), |
182 | E(PROC_TID_MAPS, "maps", S_IFREG|S_IRUGO), | 224 | E(PROC_TID_MAPS, "maps", S_IFREG|S_IRUGO), |
225 | #ifdef CONFIG_NUMA | ||
226 | E(PROC_TID_NUMA_MAPS, "numa_maps", S_IFREG|S_IRUGO), | ||
227 | #endif | ||
183 | E(PROC_TID_MEM, "mem", S_IFREG|S_IRUSR|S_IWUSR), | 228 | E(PROC_TID_MEM, "mem", S_IFREG|S_IRUSR|S_IWUSR), |
184 | #ifdef CONFIG_SECCOMP | 229 | #ifdef CONFIG_SECCOMP |
185 | E(PROC_TID_SECCOMP, "seccomp", S_IFREG|S_IRUSR|S_IWUSR), | 230 | E(PROC_TID_SECCOMP, "seccomp", S_IFREG|S_IRUSR|S_IWUSR), |
@@ -188,6 +233,7 @@ static struct pid_entry tid_base_stuff[] = { | |||
188 | E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO), | 233 | E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO), |
189 | E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO), | 234 | E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO), |
190 | E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO), | 235 | E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO), |
236 | E(PROC_TID_SMAPS, "smaps", S_IFREG|S_IRUGO), | ||
191 | #ifdef CONFIG_SECURITY | 237 | #ifdef CONFIG_SECURITY |
192 | E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), | 238 | E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), |
193 | #endif | 239 | #endif |
@@ -515,6 +561,46 @@ static struct file_operations proc_maps_operations = { | |||
515 | .release = seq_release, | 561 | .release = seq_release, |
516 | }; | 562 | }; |
517 | 563 | ||
564 | #ifdef CONFIG_NUMA | ||
565 | extern struct seq_operations proc_pid_numa_maps_op; | ||
566 | static int numa_maps_open(struct inode *inode, struct file *file) | ||
567 | { | ||
568 | struct task_struct *task = proc_task(inode); | ||
569 | int ret = seq_open(file, &proc_pid_numa_maps_op); | ||
570 | if (!ret) { | ||
571 | struct seq_file *m = file->private_data; | ||
572 | m->private = task; | ||
573 | } | ||
574 | return ret; | ||
575 | } | ||
576 | |||
577 | static struct file_operations proc_numa_maps_operations = { | ||
578 | .open = numa_maps_open, | ||
579 | .read = seq_read, | ||
580 | .llseek = seq_lseek, | ||
581 | .release = seq_release, | ||
582 | }; | ||
583 | #endif | ||
584 | |||
585 | extern struct seq_operations proc_pid_smaps_op; | ||
586 | static int smaps_open(struct inode *inode, struct file *file) | ||
587 | { | ||
588 | struct task_struct *task = proc_task(inode); | ||
589 | int ret = seq_open(file, &proc_pid_smaps_op); | ||
590 | if (!ret) { | ||
591 | struct seq_file *m = file->private_data; | ||
592 | m->private = task; | ||
593 | } | ||
594 | return ret; | ||
595 | } | ||
596 | |||
597 | static struct file_operations proc_smaps_operations = { | ||
598 | .open = smaps_open, | ||
599 | .read = seq_read, | ||
600 | .llseek = seq_lseek, | ||
601 | .release = seq_release, | ||
602 | }; | ||
603 | |||
518 | extern struct seq_operations mounts_op; | 604 | extern struct seq_operations mounts_op; |
519 | static int mounts_open(struct inode *inode, struct file *file) | 605 | static int mounts_open(struct inode *inode, struct file *file) |
520 | { | 606 | { |
@@ -1524,6 +1610,12 @@ static struct dentry *proc_pident_lookup(struct inode *dir, | |||
1524 | case PROC_TGID_MAPS: | 1610 | case PROC_TGID_MAPS: |
1525 | inode->i_fop = &proc_maps_operations; | 1611 | inode->i_fop = &proc_maps_operations; |
1526 | break; | 1612 | break; |
1613 | #ifdef CONFIG_NUMA | ||
1614 | case PROC_TID_NUMA_MAPS: | ||
1615 | case PROC_TGID_NUMA_MAPS: | ||
1616 | inode->i_fop = &proc_numa_maps_operations; | ||
1617 | break; | ||
1618 | #endif | ||
1527 | case PROC_TID_MEM: | 1619 | case PROC_TID_MEM: |
1528 | case PROC_TGID_MEM: | 1620 | case PROC_TGID_MEM: |
1529 | inode->i_op = &proc_mem_inode_operations; | 1621 | inode->i_op = &proc_mem_inode_operations; |
@@ -1539,6 +1631,10 @@ static struct dentry *proc_pident_lookup(struct inode *dir, | |||
1539 | case PROC_TGID_MOUNTS: | 1631 | case PROC_TGID_MOUNTS: |
1540 | inode->i_fop = &proc_mounts_operations; | 1632 | inode->i_fop = &proc_mounts_operations; |
1541 | break; | 1633 | break; |
1634 | case PROC_TID_SMAPS: | ||
1635 | case PROC_TGID_SMAPS: | ||
1636 | inode->i_fop = &proc_smaps_operations; | ||
1637 | break; | ||
1542 | #ifdef CONFIG_SECURITY | 1638 | #ifdef CONFIG_SECURITY |
1543 | case PROC_TID_ATTR: | 1639 | case PROC_TID_ATTR: |
1544 | inode->i_nlink = 2; | 1640 | inode->i_nlink = 2; |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 28b4a0253a92..c7ef3e48e35b 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -2,8 +2,13 @@ | |||
2 | #include <linux/hugetlb.h> | 2 | #include <linux/hugetlb.h> |
3 | #include <linux/mount.h> | 3 | #include <linux/mount.h> |
4 | #include <linux/seq_file.h> | 4 | #include <linux/seq_file.h> |
5 | #include <linux/highmem.h> | ||
6 | #include <linux/pagemap.h> | ||
7 | #include <linux/mempolicy.h> | ||
8 | |||
5 | #include <asm/elf.h> | 9 | #include <asm/elf.h> |
6 | #include <asm/uaccess.h> | 10 | #include <asm/uaccess.h> |
11 | #include <asm/tlbflush.h> | ||
7 | #include "internal.h" | 12 | #include "internal.h" |
8 | 13 | ||
9 | char *task_mem(struct mm_struct *mm, char *buffer) | 14 | char *task_mem(struct mm_struct *mm, char *buffer) |
@@ -87,49 +92,58 @@ static void pad_len_spaces(struct seq_file *m, int len) | |||
87 | seq_printf(m, "%*c", len, ' '); | 92 | seq_printf(m, "%*c", len, ' '); |
88 | } | 93 | } |
89 | 94 | ||
90 | static int show_map(struct seq_file *m, void *v) | 95 | struct mem_size_stats |
96 | { | ||
97 | unsigned long resident; | ||
98 | unsigned long shared_clean; | ||
99 | unsigned long shared_dirty; | ||
100 | unsigned long private_clean; | ||
101 | unsigned long private_dirty; | ||
102 | }; | ||
103 | |||
104 | static int show_map_internal(struct seq_file *m, void *v, struct mem_size_stats *mss) | ||
91 | { | 105 | { |
92 | struct task_struct *task = m->private; | 106 | struct task_struct *task = m->private; |
93 | struct vm_area_struct *map = v; | 107 | struct vm_area_struct *vma = v; |
94 | struct mm_struct *mm = map->vm_mm; | 108 | struct mm_struct *mm = vma->vm_mm; |
95 | struct file *file = map->vm_file; | 109 | struct file *file = vma->vm_file; |
96 | int flags = map->vm_flags; | 110 | int flags = vma->vm_flags; |
97 | unsigned long ino = 0; | 111 | unsigned long ino = 0; |
98 | dev_t dev = 0; | 112 | dev_t dev = 0; |
99 | int len; | 113 | int len; |
100 | 114 | ||
101 | if (file) { | 115 | if (file) { |
102 | struct inode *inode = map->vm_file->f_dentry->d_inode; | 116 | struct inode *inode = vma->vm_file->f_dentry->d_inode; |
103 | dev = inode->i_sb->s_dev; | 117 | dev = inode->i_sb->s_dev; |
104 | ino = inode->i_ino; | 118 | ino = inode->i_ino; |
105 | } | 119 | } |
106 | 120 | ||
107 | seq_printf(m, "%08lx-%08lx %c%c%c%c %08lx %02x:%02x %lu %n", | 121 | seq_printf(m, "%08lx-%08lx %c%c%c%c %08lx %02x:%02x %lu %n", |
108 | map->vm_start, | 122 | vma->vm_start, |
109 | map->vm_end, | 123 | vma->vm_end, |
110 | flags & VM_READ ? 'r' : '-', | 124 | flags & VM_READ ? 'r' : '-', |
111 | flags & VM_WRITE ? 'w' : '-', | 125 | flags & VM_WRITE ? 'w' : '-', |
112 | flags & VM_EXEC ? 'x' : '-', | 126 | flags & VM_EXEC ? 'x' : '-', |
113 | flags & VM_MAYSHARE ? 's' : 'p', | 127 | flags & VM_MAYSHARE ? 's' : 'p', |
114 | map->vm_pgoff << PAGE_SHIFT, | 128 | vma->vm_pgoff << PAGE_SHIFT, |
115 | MAJOR(dev), MINOR(dev), ino, &len); | 129 | MAJOR(dev), MINOR(dev), ino, &len); |
116 | 130 | ||
117 | /* | 131 | /* |
118 | * Print the dentry name for named mappings, and a | 132 | * Print the dentry name for named mappings, and a |
119 | * special [heap] marker for the heap: | 133 | * special [heap] marker for the heap: |
120 | */ | 134 | */ |
121 | if (map->vm_file) { | 135 | if (file) { |
122 | pad_len_spaces(m, len); | 136 | pad_len_spaces(m, len); |
123 | seq_path(m, file->f_vfsmnt, file->f_dentry, ""); | 137 | seq_path(m, file->f_vfsmnt, file->f_dentry, "\n"); |
124 | } else { | 138 | } else { |
125 | if (mm) { | 139 | if (mm) { |
126 | if (map->vm_start <= mm->start_brk && | 140 | if (vma->vm_start <= mm->start_brk && |
127 | map->vm_end >= mm->brk) { | 141 | vma->vm_end >= mm->brk) { |
128 | pad_len_spaces(m, len); | 142 | pad_len_spaces(m, len); |
129 | seq_puts(m, "[heap]"); | 143 | seq_puts(m, "[heap]"); |
130 | } else { | 144 | } else { |
131 | if (map->vm_start <= mm->start_stack && | 145 | if (vma->vm_start <= mm->start_stack && |
132 | map->vm_end >= mm->start_stack) { | 146 | vma->vm_end >= mm->start_stack) { |
133 | 147 | ||
134 | pad_len_spaces(m, len); | 148 | pad_len_spaces(m, len); |
135 | seq_puts(m, "[stack]"); | 149 | seq_puts(m, "[stack]"); |
@@ -141,24 +155,146 @@ static int show_map(struct seq_file *m, void *v) | |||
141 | } | 155 | } |
142 | } | 156 | } |
143 | seq_putc(m, '\n'); | 157 | seq_putc(m, '\n'); |
144 | if (m->count < m->size) /* map is copied successfully */ | 158 | |
145 | m->version = (map != get_gate_vma(task))? map->vm_start: 0; | 159 | if (mss) |
160 | seq_printf(m, | ||
161 | "Size: %8lu kB\n" | ||
162 | "Rss: %8lu kB\n" | ||
163 | "Shared_Clean: %8lu kB\n" | ||
164 | "Shared_Dirty: %8lu kB\n" | ||
165 | "Private_Clean: %8lu kB\n" | ||
166 | "Private_Dirty: %8lu kB\n", | ||
167 | (vma->vm_end - vma->vm_start) >> 10, | ||
168 | mss->resident >> 10, | ||
169 | mss->shared_clean >> 10, | ||
170 | mss->shared_dirty >> 10, | ||
171 | mss->private_clean >> 10, | ||
172 | mss->private_dirty >> 10); | ||
173 | |||
174 | if (m->count < m->size) /* vma is copied successfully */ | ||
175 | m->version = (vma != get_gate_vma(task))? vma->vm_start: 0; | ||
146 | return 0; | 176 | return 0; |
147 | } | 177 | } |
148 | 178 | ||
179 | static int show_map(struct seq_file *m, void *v) | ||
180 | { | ||
181 | return show_map_internal(m, v, 0); | ||
182 | } | ||
183 | |||
184 | static void smaps_pte_range(struct vm_area_struct *vma, pmd_t *pmd, | ||
185 | unsigned long addr, unsigned long end, | ||
186 | struct mem_size_stats *mss) | ||
187 | { | ||
188 | pte_t *pte, ptent; | ||
189 | unsigned long pfn; | ||
190 | struct page *page; | ||
191 | |||
192 | pte = pte_offset_map(pmd, addr); | ||
193 | do { | ||
194 | ptent = *pte; | ||
195 | if (pte_none(ptent) || !pte_present(ptent)) | ||
196 | continue; | ||
197 | |||
198 | mss->resident += PAGE_SIZE; | ||
199 | pfn = pte_pfn(ptent); | ||
200 | if (!pfn_valid(pfn)) | ||
201 | continue; | ||
202 | |||
203 | page = pfn_to_page(pfn); | ||
204 | if (page_count(page) >= 2) { | ||
205 | if (pte_dirty(ptent)) | ||
206 | mss->shared_dirty += PAGE_SIZE; | ||
207 | else | ||
208 | mss->shared_clean += PAGE_SIZE; | ||
209 | } else { | ||
210 | if (pte_dirty(ptent)) | ||
211 | mss->private_dirty += PAGE_SIZE; | ||
212 | else | ||
213 | mss->private_clean += PAGE_SIZE; | ||
214 | } | ||
215 | } while (pte++, addr += PAGE_SIZE, addr != end); | ||
216 | pte_unmap(pte - 1); | ||
217 | cond_resched_lock(&vma->vm_mm->page_table_lock); | ||
218 | } | ||
219 | |||
220 | static inline void smaps_pmd_range(struct vm_area_struct *vma, pud_t *pud, | ||
221 | unsigned long addr, unsigned long end, | ||
222 | struct mem_size_stats *mss) | ||
223 | { | ||
224 | pmd_t *pmd; | ||
225 | unsigned long next; | ||
226 | |||
227 | pmd = pmd_offset(pud, addr); | ||
228 | do { | ||
229 | next = pmd_addr_end(addr, end); | ||
230 | if (pmd_none_or_clear_bad(pmd)) | ||
231 | continue; | ||
232 | smaps_pte_range(vma, pmd, addr, next, mss); | ||
233 | } while (pmd++, addr = next, addr != end); | ||
234 | } | ||
235 | |||
236 | static inline void smaps_pud_range(struct vm_area_struct *vma, pgd_t *pgd, | ||
237 | unsigned long addr, unsigned long end, | ||
238 | struct mem_size_stats *mss) | ||
239 | { | ||
240 | pud_t *pud; | ||
241 | unsigned long next; | ||
242 | |||
243 | pud = pud_offset(pgd, addr); | ||
244 | do { | ||
245 | next = pud_addr_end(addr, end); | ||
246 | if (pud_none_or_clear_bad(pud)) | ||
247 | continue; | ||
248 | smaps_pmd_range(vma, pud, addr, next, mss); | ||
249 | } while (pud++, addr = next, addr != end); | ||
250 | } | ||
251 | |||
252 | static inline void smaps_pgd_range(struct vm_area_struct *vma, | ||
253 | unsigned long addr, unsigned long end, | ||
254 | struct mem_size_stats *mss) | ||
255 | { | ||
256 | pgd_t *pgd; | ||
257 | unsigned long next; | ||
258 | |||
259 | pgd = pgd_offset(vma->vm_mm, addr); | ||
260 | do { | ||
261 | next = pgd_addr_end(addr, end); | ||
262 | if (pgd_none_or_clear_bad(pgd)) | ||
263 | continue; | ||
264 | smaps_pud_range(vma, pgd, addr, next, mss); | ||
265 | } while (pgd++, addr = next, addr != end); | ||
266 | } | ||
267 | |||
268 | static int show_smap(struct seq_file *m, void *v) | ||
269 | { | ||
270 | struct vm_area_struct *vma = v; | ||
271 | struct mm_struct *mm = vma->vm_mm; | ||
272 | struct mem_size_stats mss; | ||
273 | |||
274 | memset(&mss, 0, sizeof mss); | ||
275 | |||
276 | if (mm) { | ||
277 | spin_lock(&mm->page_table_lock); | ||
278 | smaps_pgd_range(vma, vma->vm_start, vma->vm_end, &mss); | ||
279 | spin_unlock(&mm->page_table_lock); | ||
280 | } | ||
281 | |||
282 | return show_map_internal(m, v, &mss); | ||
283 | } | ||
284 | |||
149 | static void *m_start(struct seq_file *m, loff_t *pos) | 285 | static void *m_start(struct seq_file *m, loff_t *pos) |
150 | { | 286 | { |
151 | struct task_struct *task = m->private; | 287 | struct task_struct *task = m->private; |
152 | unsigned long last_addr = m->version; | 288 | unsigned long last_addr = m->version; |
153 | struct mm_struct *mm; | 289 | struct mm_struct *mm; |
154 | struct vm_area_struct *map, *tail_map; | 290 | struct vm_area_struct *vma, *tail_vma; |
155 | loff_t l = *pos; | 291 | loff_t l = *pos; |
156 | 292 | ||
157 | /* | 293 | /* |
158 | * We remember last_addr rather than next_addr to hit with | 294 | * We remember last_addr rather than next_addr to hit with |
159 | * mmap_cache most of the time. We have zero last_addr at | 295 | * mmap_cache most of the time. We have zero last_addr at |
160 | * the begining and also after lseek. We will have -1 last_addr | 296 | * the beginning and also after lseek. We will have -1 last_addr |
161 | * after the end of the maps. | 297 | * after the end of the vmas. |
162 | */ | 298 | */ |
163 | 299 | ||
164 | if (last_addr == -1UL) | 300 | if (last_addr == -1UL) |
@@ -168,47 +304,47 @@ static void *m_start(struct seq_file *m, loff_t *pos) | |||
168 | if (!mm) | 304 | if (!mm) |
169 | return NULL; | 305 | return NULL; |
170 | 306 | ||
171 | tail_map = get_gate_vma(task); | 307 | tail_vma = get_gate_vma(task); |
172 | down_read(&mm->mmap_sem); | 308 | down_read(&mm->mmap_sem); |
173 | 309 | ||
174 | /* Start with last addr hint */ | 310 | /* Start with last addr hint */ |
175 | if (last_addr && (map = find_vma(mm, last_addr))) { | 311 | if (last_addr && (vma = find_vma(mm, last_addr))) { |
176 | map = map->vm_next; | 312 | vma = vma->vm_next; |
177 | goto out; | 313 | goto out; |
178 | } | 314 | } |
179 | 315 | ||
180 | /* | 316 | /* |
181 | * Check the map index is within the range and do | 317 | * Check the vma index is within the range and do |
182 | * sequential scan until m_index. | 318 | * sequential scan until m_index. |
183 | */ | 319 | */ |
184 | map = NULL; | 320 | vma = NULL; |
185 | if ((unsigned long)l < mm->map_count) { | 321 | if ((unsigned long)l < mm->map_count) { |
186 | map = mm->mmap; | 322 | vma = mm->mmap; |
187 | while (l-- && map) | 323 | while (l-- && vma) |
188 | map = map->vm_next; | 324 | vma = vma->vm_next; |
189 | goto out; | 325 | goto out; |
190 | } | 326 | } |
191 | 327 | ||
192 | if (l != mm->map_count) | 328 | if (l != mm->map_count) |
193 | tail_map = NULL; /* After gate map */ | 329 | tail_vma = NULL; /* After gate vma */ |
194 | 330 | ||
195 | out: | 331 | out: |
196 | if (map) | 332 | if (vma) |
197 | return map; | 333 | return vma; |
198 | 334 | ||
199 | /* End of maps has reached */ | 335 | /* End of vmas has been reached */ |
200 | m->version = (tail_map != NULL)? 0: -1UL; | 336 | m->version = (tail_vma != NULL)? 0: -1UL; |
201 | up_read(&mm->mmap_sem); | 337 | up_read(&mm->mmap_sem); |
202 | mmput(mm); | 338 | mmput(mm); |
203 | return tail_map; | 339 | return tail_vma; |
204 | } | 340 | } |
205 | 341 | ||
206 | static void m_stop(struct seq_file *m, void *v) | 342 | static void m_stop(struct seq_file *m, void *v) |
207 | { | 343 | { |
208 | struct task_struct *task = m->private; | 344 | struct task_struct *task = m->private; |
209 | struct vm_area_struct *map = v; | 345 | struct vm_area_struct *vma = v; |
210 | if (map && map != get_gate_vma(task)) { | 346 | if (vma && vma != get_gate_vma(task)) { |
211 | struct mm_struct *mm = map->vm_mm; | 347 | struct mm_struct *mm = vma->vm_mm; |
212 | up_read(&mm->mmap_sem); | 348 | up_read(&mm->mmap_sem); |
213 | mmput(mm); | 349 | mmput(mm); |
214 | } | 350 | } |
@@ -217,14 +353,14 @@ static void m_stop(struct seq_file *m, void *v) | |||
217 | static void *m_next(struct seq_file *m, void *v, loff_t *pos) | 353 | static void *m_next(struct seq_file *m, void *v, loff_t *pos) |
218 | { | 354 | { |
219 | struct task_struct *task = m->private; | 355 | struct task_struct *task = m->private; |
220 | struct vm_area_struct *map = v; | 356 | struct vm_area_struct *vma = v; |
221 | struct vm_area_struct *tail_map = get_gate_vma(task); | 357 | struct vm_area_struct *tail_vma = get_gate_vma(task); |
222 | 358 | ||
223 | (*pos)++; | 359 | (*pos)++; |
224 | if (map && (map != tail_map) && map->vm_next) | 360 | if (vma && (vma != tail_vma) && vma->vm_next) |
225 | return map->vm_next; | 361 | return vma->vm_next; |
226 | m_stop(m, v); | 362 | m_stop(m, v); |
227 | return (map != tail_map)? tail_map: NULL; | 363 | return (vma != tail_vma)? tail_vma: NULL; |
228 | } | 364 | } |
229 | 365 | ||
230 | struct seq_operations proc_pid_maps_op = { | 366 | struct seq_operations proc_pid_maps_op = { |
@@ -233,3 +369,140 @@ struct seq_operations proc_pid_maps_op = { | |||
233 | .stop = m_stop, | 369 | .stop = m_stop, |
234 | .show = show_map | 370 | .show = show_map |
235 | }; | 371 | }; |
372 | |||
373 | struct seq_operations proc_pid_smaps_op = { | ||
374 | .start = m_start, | ||
375 | .next = m_next, | ||
376 | .stop = m_stop, | ||
377 | .show = show_smap | ||
378 | }; | ||
379 | |||
380 | #ifdef CONFIG_NUMA | ||
381 | |||
382 | struct numa_maps { | ||
383 | unsigned long pages; | ||
384 | unsigned long anon; | ||
385 | unsigned long mapped; | ||
386 | unsigned long mapcount_max; | ||
387 | unsigned long node[MAX_NUMNODES]; | ||
388 | }; | ||
389 | |||
390 | /* | ||
391 | * Calculate numa node maps for a vma | ||
392 | */ | ||
393 | static struct numa_maps *get_numa_maps(const struct vm_area_struct *vma) | ||
394 | { | ||
395 | struct page *page; | ||
396 | unsigned long vaddr; | ||
397 | struct mm_struct *mm = vma->vm_mm; | ||
398 | int i; | ||
399 | struct numa_maps *md = kmalloc(sizeof(struct numa_maps), GFP_KERNEL); | ||
400 | |||
401 | if (!md) | ||
402 | return NULL; | ||
403 | md->pages = 0; | ||
404 | md->anon = 0; | ||
405 | md->mapped = 0; | ||
406 | md->mapcount_max = 0; | ||
407 | for_each_node(i) | ||
408 | md->node[i] =0; | ||
409 | |||
410 | spin_lock(&mm->page_table_lock); | ||
411 | for (vaddr = vma->vm_start; vaddr < vma->vm_end; vaddr += PAGE_SIZE) { | ||
412 | page = follow_page(mm, vaddr, 0); | ||
413 | if (page) { | ||
414 | int count = page_mapcount(page); | ||
415 | |||
416 | if (count) | ||
417 | md->mapped++; | ||
418 | if (count > md->mapcount_max) | ||
419 | md->mapcount_max = count; | ||
420 | md->pages++; | ||
421 | if (PageAnon(page)) | ||
422 | md->anon++; | ||
423 | md->node[page_to_nid(page)]++; | ||
424 | } | ||
425 | } | ||
426 | spin_unlock(&mm->page_table_lock); | ||
427 | return md; | ||
428 | } | ||
429 | |||
430 | static int show_numa_map(struct seq_file *m, void *v) | ||
431 | { | ||
432 | struct task_struct *task = m->private; | ||
433 | struct vm_area_struct *vma = v; | ||
434 | struct mempolicy *pol; | ||
435 | struct numa_maps *md; | ||
436 | struct zone **z; | ||
437 | int n; | ||
438 | int first; | ||
439 | |||
440 | if (!vma->vm_mm) | ||
441 | return 0; | ||
442 | |||
443 | md = get_numa_maps(vma); | ||
444 | if (!md) | ||
445 | return 0; | ||
446 | |||
447 | seq_printf(m, "%08lx", vma->vm_start); | ||
448 | pol = get_vma_policy(task, vma, vma->vm_start); | ||
449 | /* Print policy */ | ||
450 | switch (pol->policy) { | ||
451 | case MPOL_PREFERRED: | ||
452 | seq_printf(m, " prefer=%d", pol->v.preferred_node); | ||
453 | break; | ||
454 | case MPOL_BIND: | ||
455 | seq_printf(m, " bind={"); | ||
456 | first = 1; | ||
457 | for (z = pol->v.zonelist->zones; *z; z++) { | ||
458 | |||
459 | if (!first) | ||
460 | seq_putc(m, ','); | ||
461 | else | ||
462 | first = 0; | ||
463 | seq_printf(m, "%d/%s", (*z)->zone_pgdat->node_id, | ||
464 | (*z)->name); | ||
465 | } | ||
466 | seq_putc(m, '}'); | ||
467 | break; | ||
468 | case MPOL_INTERLEAVE: | ||
469 | seq_printf(m, " interleave={"); | ||
470 | first = 1; | ||
471 | for_each_node(n) { | ||
472 | if (test_bit(n, pol->v.nodes)) { | ||
473 | if (!first) | ||
474 | seq_putc(m,','); | ||
475 | else | ||
476 | first = 0; | ||
477 | seq_printf(m, "%d",n); | ||
478 | } | ||
479 | } | ||
480 | seq_putc(m, '}'); | ||
481 | break; | ||
482 | default: | ||
483 | seq_printf(m," default"); | ||
484 | break; | ||
485 | } | ||
486 | seq_printf(m, " MaxRef=%lu Pages=%lu Mapped=%lu", | ||
487 | md->mapcount_max, md->pages, md->mapped); | ||
488 | if (md->anon) | ||
489 | seq_printf(m," Anon=%lu",md->anon); | ||
490 | |||
491 | for_each_online_node(n) { | ||
492 | if (md->node[n]) | ||
493 | seq_printf(m, " N%d=%lu", n, md->node[n]); | ||
494 | } | ||
495 | seq_putc(m, '\n'); | ||
496 | kfree(md); | ||
497 | if (m->count < m->size) /* vma is copied successfully */ | ||
498 | m->version = (vma != get_gate_vma(task)) ? vma->vm_start : 0; | ||
499 | return 0; | ||
500 | } | ||
501 | |||
502 | struct seq_operations proc_pid_numa_maps_op = { | ||
503 | .start = m_start, | ||
504 | .next = m_next, | ||
505 | .stop = m_stop, | ||
506 | .show = show_numa_map | ||
507 | }; | ||
508 | #endif | ||
diff --git a/fs/xattr.c b/fs/xattr.c index 6acd5c63da91..dc8bc7624f26 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -51,20 +51,29 @@ setxattr(struct dentry *d, char __user *name, void __user *value, | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | down(&d->d_inode->i_sem); | ||
55 | error = security_inode_setxattr(d, kname, kvalue, size, flags); | ||
56 | if (error) | ||
57 | goto out; | ||
54 | error = -EOPNOTSUPP; | 58 | error = -EOPNOTSUPP; |
55 | if (d->d_inode->i_op && d->d_inode->i_op->setxattr) { | 59 | if (d->d_inode->i_op && d->d_inode->i_op->setxattr) { |
56 | down(&d->d_inode->i_sem); | 60 | error = d->d_inode->i_op->setxattr(d, kname, kvalue, |
57 | error = security_inode_setxattr(d, kname, kvalue, size, flags); | 61 | size, flags); |
58 | if (error) | ||
59 | goto out; | ||
60 | error = d->d_inode->i_op->setxattr(d, kname, kvalue, size, flags); | ||
61 | if (!error) { | 62 | if (!error) { |
62 | fsnotify_xattr(d); | 63 | fsnotify_xattr(d); |
63 | security_inode_post_setxattr(d, kname, kvalue, size, flags); | 64 | security_inode_post_setxattr(d, kname, kvalue, |
65 | size, flags); | ||
64 | } | 66 | } |
65 | out: | 67 | } else if (!strncmp(kname, XATTR_SECURITY_PREFIX, |
66 | up(&d->d_inode->i_sem); | 68 | sizeof XATTR_SECURITY_PREFIX - 1)) { |
69 | const char *suffix = kname + sizeof XATTR_SECURITY_PREFIX - 1; | ||
70 | error = security_inode_setsecurity(d->d_inode, suffix, kvalue, | ||
71 | size, flags); | ||
72 | if (!error) | ||
73 | fsnotify_xattr(d); | ||
67 | } | 74 | } |
75 | out: | ||
76 | up(&d->d_inode->i_sem); | ||
68 | if (kvalue) | 77 | if (kvalue) |
69 | kfree(kvalue); | 78 | kfree(kvalue); |
70 | return error; | 79 | return error; |
@@ -139,20 +148,25 @@ getxattr(struct dentry *d, char __user *name, void __user *value, size_t size) | |||
139 | return -ENOMEM; | 148 | return -ENOMEM; |
140 | } | 149 | } |
141 | 150 | ||
151 | error = security_inode_getxattr(d, kname); | ||
152 | if (error) | ||
153 | goto out; | ||
142 | error = -EOPNOTSUPP; | 154 | error = -EOPNOTSUPP; |
143 | if (d->d_inode->i_op && d->d_inode->i_op->getxattr) { | 155 | if (d->d_inode->i_op && d->d_inode->i_op->getxattr) |
144 | error = security_inode_getxattr(d, kname); | ||
145 | if (error) | ||
146 | goto out; | ||
147 | error = d->d_inode->i_op->getxattr(d, kname, kvalue, size); | 156 | error = d->d_inode->i_op->getxattr(d, kname, kvalue, size); |
148 | if (error > 0) { | 157 | else if (!strncmp(kname, XATTR_SECURITY_PREFIX, |
149 | if (size && copy_to_user(value, kvalue, error)) | 158 | sizeof XATTR_SECURITY_PREFIX - 1)) { |
150 | error = -EFAULT; | 159 | const char *suffix = kname + sizeof XATTR_SECURITY_PREFIX - 1; |
151 | } else if (error == -ERANGE && size >= XATTR_SIZE_MAX) { | 160 | error = security_inode_getsecurity(d->d_inode, suffix, kvalue, |
152 | /* The file system tried to returned a value bigger | 161 | size); |
153 | than XATTR_SIZE_MAX bytes. Not possible. */ | 162 | } |
154 | error = -E2BIG; | 163 | if (error > 0) { |
155 | } | 164 | if (size && copy_to_user(value, kvalue, error)) |
165 | error = -EFAULT; | ||
166 | } else if (error == -ERANGE && size >= XATTR_SIZE_MAX) { | ||
167 | /* The file system tried to returned a value bigger | ||
168 | than XATTR_SIZE_MAX bytes. Not possible. */ | ||
169 | error = -E2BIG; | ||
156 | } | 170 | } |
157 | out: | 171 | out: |
158 | if (kvalue) | 172 | if (kvalue) |
@@ -221,20 +235,24 @@ listxattr(struct dentry *d, char __user *list, size_t size) | |||
221 | return -ENOMEM; | 235 | return -ENOMEM; |
222 | } | 236 | } |
223 | 237 | ||
238 | error = security_inode_listxattr(d); | ||
239 | if (error) | ||
240 | goto out; | ||
224 | error = -EOPNOTSUPP; | 241 | error = -EOPNOTSUPP; |
225 | if (d->d_inode->i_op && d->d_inode->i_op->listxattr) { | 242 | if (d->d_inode->i_op && d->d_inode->i_op->listxattr) { |
226 | error = security_inode_listxattr(d); | ||
227 | if (error) | ||
228 | goto out; | ||
229 | error = d->d_inode->i_op->listxattr(d, klist, size); | 243 | error = d->d_inode->i_op->listxattr(d, klist, size); |
230 | if (error > 0) { | 244 | } else { |
231 | if (size && copy_to_user(list, klist, error)) | 245 | error = security_inode_listsecurity(d->d_inode, klist, size); |
232 | error = -EFAULT; | 246 | if (size && error >= size) |
233 | } else if (error == -ERANGE && size >= XATTR_LIST_MAX) { | 247 | error = -ERANGE; |
234 | /* The file system tried to returned a list bigger | 248 | } |
235 | than XATTR_LIST_MAX bytes. Not possible. */ | 249 | if (error > 0) { |
236 | error = -E2BIG; | 250 | if (size && copy_to_user(list, klist, error)) |
237 | } | 251 | error = -EFAULT; |
252 | } else if (error == -ERANGE && size >= XATTR_LIST_MAX) { | ||
253 | /* The file system tried to returned a list bigger | ||
254 | than XATTR_LIST_MAX bytes. Not possible. */ | ||
255 | error = -E2BIG; | ||
238 | } | 256 | } |
239 | out: | 257 | out: |
240 | if (klist) | 258 | if (klist) |
diff --git a/include/asm-alpha/page.h b/include/asm-alpha/page.h index 0577daffc720..fa0b41b164a7 100644 --- a/include/asm-alpha/page.h +++ b/include/asm-alpha/page.h | |||
@@ -63,20 +63,6 @@ typedef unsigned long pgprot_t; | |||
63 | 63 | ||
64 | #endif /* STRICT_MM_TYPECHECKS */ | 64 | #endif /* STRICT_MM_TYPECHECKS */ |
65 | 65 | ||
66 | /* Pure 2^n version of get_order */ | ||
67 | extern __inline__ int get_order(unsigned long size) | ||
68 | { | ||
69 | int order; | ||
70 | |||
71 | size = (size-1) >> (PAGE_SHIFT-1); | ||
72 | order = -1; | ||
73 | do { | ||
74 | size >>= 1; | ||
75 | order++; | ||
76 | } while (size); | ||
77 | return order; | ||
78 | } | ||
79 | |||
80 | #ifdef USE_48_BIT_KSEG | 66 | #ifdef USE_48_BIT_KSEG |
81 | #define PAGE_OFFSET 0xffff800000000000UL | 67 | #define PAGE_OFFSET 0xffff800000000000UL |
82 | #else | 68 | #else |
@@ -112,4 +98,6 @@ extern __inline__ int get_order(unsigned long size) | |||
112 | 98 | ||
113 | #endif /* __KERNEL__ */ | 99 | #endif /* __KERNEL__ */ |
114 | 100 | ||
101 | #include <asm-generic/page.h> | ||
102 | |||
115 | #endif /* _ALPHA_PAGE_H */ | 103 | #endif /* _ALPHA_PAGE_H */ |
diff --git a/include/asm-alpha/types.h b/include/asm-alpha/types.h index 43264d219246..f5716139ec89 100644 --- a/include/asm-alpha/types.h +++ b/include/asm-alpha/types.h | |||
@@ -56,8 +56,6 @@ typedef unsigned long u64; | |||
56 | typedef u64 dma_addr_t; | 56 | typedef u64 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 57 | typedef u64 dma64_addr_t; |
58 | 58 | ||
59 | typedef unsigned short kmem_bufctl_t; | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLY__ */ |
62 | #endif /* __KERNEL__ */ | 60 | #endif /* __KERNEL__ */ |
63 | #endif /* _ALPHA_TYPES_H */ | 61 | #endif /* _ALPHA_TYPES_H */ |
diff --git a/include/asm-arm/mach/irq.h b/include/asm-arm/mach/irq.h index a43a353f6c7b..0ce6ca588d8c 100644 --- a/include/asm-arm/mach/irq.h +++ b/include/asm-arm/mach/irq.h | |||
@@ -42,11 +42,11 @@ struct irqchip { | |||
42 | /* | 42 | /* |
43 | * Set the type of the IRQ. | 43 | * Set the type of the IRQ. |
44 | */ | 44 | */ |
45 | int (*type)(unsigned int, unsigned int); | 45 | int (*set_type)(unsigned int, unsigned int); |
46 | /* | 46 | /* |
47 | * Set wakeup-enable on the selected IRQ | 47 | * Set wakeup-enable on the selected IRQ |
48 | */ | 48 | */ |
49 | int (*wake)(unsigned int, unsigned int); | 49 | int (*set_wake)(unsigned int, unsigned int); |
50 | 50 | ||
51 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
52 | /* | 52 | /* |
@@ -92,6 +92,14 @@ struct irqdesc { | |||
92 | extern struct irqdesc irq_desc[]; | 92 | extern struct irqdesc irq_desc[]; |
93 | 93 | ||
94 | /* | 94 | /* |
95 | * Helpful inline function for calling irq descriptor handlers. | ||
96 | */ | ||
97 | static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) | ||
98 | { | ||
99 | desc->handle(irq, desc, regs); | ||
100 | } | ||
101 | |||
102 | /* | ||
95 | * This is internal. Do not use it. | 103 | * This is internal. Do not use it. |
96 | */ | 104 | */ |
97 | extern void (*init_arch_irq)(void); | 105 | extern void (*init_arch_irq)(void); |
diff --git a/include/asm-arm/page.h b/include/asm-arm/page.h index 019c45d75730..4da1d532cbeb 100644 --- a/include/asm-arm/page.h +++ b/include/asm-arm/page.h | |||
@@ -163,20 +163,6 @@ typedef unsigned long pgprot_t; | |||
163 | /* the upper-most page table pointer */ | 163 | /* the upper-most page table pointer */ |
164 | extern pmd_t *top_pmd; | 164 | extern pmd_t *top_pmd; |
165 | 165 | ||
166 | /* Pure 2^n version of get_order */ | ||
167 | static inline int get_order(unsigned long size) | ||
168 | { | ||
169 | int order; | ||
170 | |||
171 | size = (size-1) >> (PAGE_SHIFT-1); | ||
172 | order = -1; | ||
173 | do { | ||
174 | size >>= 1; | ||
175 | order++; | ||
176 | } while (size); | ||
177 | return order; | ||
178 | } | ||
179 | |||
180 | #include <asm/memory.h> | 166 | #include <asm/memory.h> |
181 | 167 | ||
182 | #endif /* !__ASSEMBLY__ */ | 168 | #endif /* !__ASSEMBLY__ */ |
@@ -186,4 +172,6 @@ static inline int get_order(unsigned long size) | |||
186 | 172 | ||
187 | #endif /* __KERNEL__ */ | 173 | #endif /* __KERNEL__ */ |
188 | 174 | ||
175 | #include <asm-generic/page.h> | ||
176 | |||
189 | #endif | 177 | #endif |
diff --git a/include/asm-arm/types.h b/include/asm-arm/types.h index f4c92e4c8c02..22992ee0627a 100644 --- a/include/asm-arm/types.h +++ b/include/asm-arm/types.h | |||
@@ -52,8 +52,6 @@ typedef unsigned long long u64; | |||
52 | typedef u32 dma_addr_t; | 52 | typedef u32 dma_addr_t; |
53 | typedef u32 dma64_addr_t; | 53 | typedef u32 dma64_addr_t; |
54 | 54 | ||
55 | typedef unsigned int kmem_bufctl_t; | ||
56 | |||
57 | #endif /* __ASSEMBLY__ */ | 55 | #endif /* __ASSEMBLY__ */ |
58 | 56 | ||
59 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-arm26/page.h b/include/asm-arm26/page.h index c334079b082b..d3f23ac4d468 100644 --- a/include/asm-arm26/page.h +++ b/include/asm-arm26/page.h | |||
@@ -89,20 +89,6 @@ typedef unsigned long pgprot_t; | |||
89 | #ifdef __KERNEL__ | 89 | #ifdef __KERNEL__ |
90 | #ifndef __ASSEMBLY__ | 90 | #ifndef __ASSEMBLY__ |
91 | 91 | ||
92 | /* Pure 2^n version of get_order */ | ||
93 | static inline int get_order(unsigned long size) | ||
94 | { | ||
95 | int order; | ||
96 | |||
97 | size = (size-1) >> (PAGE_SHIFT-1); | ||
98 | order = -1; | ||
99 | do { | ||
100 | size >>= 1; | ||
101 | order++; | ||
102 | } while (size); | ||
103 | return order; | ||
104 | } | ||
105 | |||
106 | #include <asm/memory.h> | 92 | #include <asm/memory.h> |
107 | 93 | ||
108 | #endif /* !__ASSEMBLY__ */ | 94 | #endif /* !__ASSEMBLY__ */ |
@@ -112,4 +98,6 @@ static inline int get_order(unsigned long size) | |||
112 | 98 | ||
113 | #endif /* __KERNEL__ */ | 99 | #endif /* __KERNEL__ */ |
114 | 100 | ||
101 | #include <asm-generic/page.h> | ||
102 | |||
115 | #endif | 103 | #endif |
diff --git a/include/asm-arm26/types.h b/include/asm-arm26/types.h index 56cbe573a234..81bd357ada02 100644 --- a/include/asm-arm26/types.h +++ b/include/asm-arm26/types.h | |||
@@ -52,8 +52,6 @@ typedef unsigned long long u64; | |||
52 | typedef u32 dma_addr_t; | 52 | typedef u32 dma_addr_t; |
53 | typedef u32 dma64_addr_t; | 53 | typedef u32 dma64_addr_t; |
54 | 54 | ||
55 | typedef unsigned int kmem_bufctl_t; | ||
56 | |||
57 | #endif /* __ASSEMBLY__ */ | 55 | #endif /* __ASSEMBLY__ */ |
58 | 56 | ||
59 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-cris/page.h b/include/asm-cris/page.h index bbf17bd39385..c99c478c482f 100644 --- a/include/asm-cris/page.h +++ b/include/asm-cris/page.h | |||
@@ -70,19 +70,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
70 | 70 | ||
71 | #ifndef __ASSEMBLY__ | 71 | #ifndef __ASSEMBLY__ |
72 | 72 | ||
73 | /* Pure 2^n version of get_order */ | ||
74 | static inline int get_order(unsigned long size) | ||
75 | { | ||
76 | int order; | ||
77 | |||
78 | size = (size-1) >> (PAGE_SHIFT-1); | ||
79 | order = -1; | ||
80 | do { | ||
81 | size >>= 1; | ||
82 | order++; | ||
83 | } while (size); | ||
84 | return order; | ||
85 | } | ||
86 | #endif /* __ASSEMBLY__ */ | 73 | #endif /* __ASSEMBLY__ */ |
87 | 74 | ||
88 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 75 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
@@ -90,5 +77,7 @@ static inline int get_order(unsigned long size) | |||
90 | 77 | ||
91 | #endif /* __KERNEL__ */ | 78 | #endif /* __KERNEL__ */ |
92 | 79 | ||
80 | #include <asm-generic/page.h> | ||
81 | |||
93 | #endif /* _CRIS_PAGE_H */ | 82 | #endif /* _CRIS_PAGE_H */ |
94 | 83 | ||
diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h index 8fa6d6c7afce..84557c9bac93 100644 --- a/include/asm-cris/types.h +++ b/include/asm-cris/types.h | |||
@@ -52,8 +52,6 @@ typedef unsigned long long u64; | |||
52 | typedef u32 dma_addr_t; | 52 | typedef u32 dma_addr_t; |
53 | typedef u32 dma64_addr_t; | 53 | typedef u32 dma64_addr_t; |
54 | 54 | ||
55 | typedef unsigned short kmem_bufctl_t; | ||
56 | |||
57 | #endif /* __ASSEMBLY__ */ | 55 | #endif /* __ASSEMBLY__ */ |
58 | 56 | ||
59 | #endif /* __KERNEL__ */ | 57 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-frv/page.h b/include/asm-frv/page.h index f7914f1782b0..4feba567e7fd 100644 --- a/include/asm-frv/page.h +++ b/include/asm-frv/page.h | |||
@@ -45,21 +45,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
45 | /* to align the pointer to the (next) page boundary */ | 45 | /* to align the pointer to the (next) page boundary */ |
46 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) | 46 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) |
47 | 47 | ||
48 | /* Pure 2^n version of get_order */ | ||
49 | static inline int get_order(unsigned long size) __attribute_const__; | ||
50 | static inline int get_order(unsigned long size) | ||
51 | { | ||
52 | int order; | ||
53 | |||
54 | size = (size - 1) >> (PAGE_SHIFT - 1); | ||
55 | order = -1; | ||
56 | do { | ||
57 | size >>= 1; | ||
58 | order++; | ||
59 | } while (size); | ||
60 | return order; | ||
61 | } | ||
62 | |||
63 | #define devmem_is_allowed(pfn) 1 | 48 | #define devmem_is_allowed(pfn) 1 |
64 | 49 | ||
65 | #define __pa(vaddr) virt_to_phys((void *) vaddr) | 50 | #define __pa(vaddr) virt_to_phys((void *) vaddr) |
@@ -102,4 +87,6 @@ extern unsigned long max_pfn; | |||
102 | #define WANT_PAGE_VIRTUAL 1 | 87 | #define WANT_PAGE_VIRTUAL 1 |
103 | #endif | 88 | #endif |
104 | 89 | ||
90 | #include <asm-generic/page.h> | ||
91 | |||
105 | #endif /* _ASM_PAGE_H */ | 92 | #endif /* _ASM_PAGE_H */ |
diff --git a/include/asm-frv/types.h b/include/asm-frv/types.h index 1a5b6546bb41..50605df6d8ac 100644 --- a/include/asm-frv/types.h +++ b/include/asm-frv/types.h | |||
@@ -65,8 +65,6 @@ typedef u64 u_quad_t; | |||
65 | 65 | ||
66 | typedef u32 dma_addr_t; | 66 | typedef u32 dma_addr_t; |
67 | 67 | ||
68 | typedef unsigned short kmem_bufctl_t; | ||
69 | |||
70 | #endif /* __ASSEMBLY__ */ | 68 | #endif /* __ASSEMBLY__ */ |
71 | 69 | ||
72 | #endif /* __KERNEL__ */ | 70 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-generic/page.h b/include/asm-generic/page.h new file mode 100644 index 000000000000..a96b5d986b6e --- /dev/null +++ b/include/asm-generic/page.h | |||
@@ -0,0 +1,26 @@ | |||
1 | #ifndef _ASM_GENERIC_PAGE_H | ||
2 | #define _ASM_GENERIC_PAGE_H | ||
3 | |||
4 | #ifdef __KERNEL__ | ||
5 | #ifndef __ASSEMBLY__ | ||
6 | |||
7 | #include <linux/compiler.h> | ||
8 | |||
9 | /* Pure 2^n version of get_order */ | ||
10 | static __inline__ __attribute_const__ int get_order(unsigned long size) | ||
11 | { | ||
12 | int order; | ||
13 | |||
14 | size = (size - 1) >> (PAGE_SHIFT - 1); | ||
15 | order = -1; | ||
16 | do { | ||
17 | size >>= 1; | ||
18 | order++; | ||
19 | } while (size); | ||
20 | return order; | ||
21 | } | ||
22 | |||
23 | #endif /* __ASSEMBLY__ */ | ||
24 | #endif /* __KERNEL__ */ | ||
25 | |||
26 | #endif /* _ASM_GENERIC_PAGE_H */ | ||
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index f40593565173..f86c1e549466 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h | |||
@@ -101,6 +101,22 @@ do { \ | |||
101 | }) | 101 | }) |
102 | #endif | 102 | #endif |
103 | 103 | ||
104 | #ifndef __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | ||
105 | #define ptep_get_and_clear_full(__mm, __address, __ptep, __full) \ | ||
106 | ({ \ | ||
107 | pte_t __pte; \ | ||
108 | __pte = ptep_get_and_clear((__mm), (__address), (__ptep)); \ | ||
109 | __pte; \ | ||
110 | }) | ||
111 | #endif | ||
112 | |||
113 | #ifndef __HAVE_ARCH_PTE_CLEAR_FULL | ||
114 | #define pte_clear_full(__mm, __address, __ptep, __full) \ | ||
115 | do { \ | ||
116 | pte_clear((__mm), (__address), (__ptep)); \ | ||
117 | } while (0) | ||
118 | #endif | ||
119 | |||
104 | #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH | 120 | #ifndef __HAVE_ARCH_PTEP_CLEAR_FLUSH |
105 | #define ptep_clear_flush(__vma, __address, __ptep) \ | 121 | #define ptep_clear_flush(__vma, __address, __ptep) \ |
106 | ({ \ | 122 | ({ \ |
diff --git a/include/asm-h8300/page.h b/include/asm-h8300/page.h index e3b7960d445b..e8c02b8c2d99 100644 --- a/include/asm-h8300/page.h +++ b/include/asm-h8300/page.h | |||
@@ -54,20 +54,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
54 | /* to align the pointer to the (next) page boundary */ | 54 | /* to align the pointer to the (next) page boundary */ |
55 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 55 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
56 | 56 | ||
57 | /* Pure 2^n version of get_order */ | ||
58 | extern __inline__ int get_order(unsigned long size) | ||
59 | { | ||
60 | int order; | ||
61 | |||
62 | size = (size-1) >> (PAGE_SHIFT-1); | ||
63 | order = -1; | ||
64 | do { | ||
65 | size >>= 1; | ||
66 | order++; | ||
67 | } while (size); | ||
68 | return order; | ||
69 | } | ||
70 | |||
71 | extern unsigned long memory_start; | 57 | extern unsigned long memory_start; |
72 | extern unsigned long memory_end; | 58 | extern unsigned long memory_end; |
73 | 59 | ||
@@ -101,4 +87,6 @@ extern unsigned long memory_end; | |||
101 | 87 | ||
102 | #endif /* __KERNEL__ */ | 88 | #endif /* __KERNEL__ */ |
103 | 89 | ||
90 | #include <asm-generic/page.h> | ||
91 | |||
104 | #endif /* _H8300_PAGE_H */ | 92 | #endif /* _H8300_PAGE_H */ |
diff --git a/include/asm-h8300/types.h b/include/asm-h8300/types.h index 21f4fc07ac0e..bf91e0d4dde7 100644 --- a/include/asm-h8300/types.h +++ b/include/asm-h8300/types.h | |||
@@ -58,8 +58,6 @@ typedef u32 dma_addr_t; | |||
58 | #define HAVE_SECTOR_T | 58 | #define HAVE_SECTOR_T |
59 | typedef u64 sector_t; | 59 | typedef u64 sector_t; |
60 | 60 | ||
61 | typedef unsigned int kmem_bufctl_t; | ||
62 | |||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
64 | 62 | ||
65 | #endif /* __ASSEMBLY__ */ | 63 | #endif /* __ASSEMBLY__ */ |
diff --git a/include/asm-i386/agp.h b/include/asm-i386/agp.h index b82f5f3ab887..9075083bab76 100644 --- a/include/asm-i386/agp.h +++ b/include/asm-i386/agp.h | |||
@@ -19,7 +19,7 @@ int unmap_page_from_agp(struct page *page); | |||
19 | /* Could use CLFLUSH here if the cpu supports it. But then it would | 19 | /* Could use CLFLUSH here if the cpu supports it. But then it would |
20 | need to be called for each cacheline of the whole page so it may not be | 20 | need to be called for each cacheline of the whole page so it may not be |
21 | worth it. Would need a page for it. */ | 21 | worth it. Would need a page for it. */ |
22 | #define flush_agp_cache() asm volatile("wbinvd":::"memory") | 22 | #define flush_agp_cache() wbinvd() |
23 | 23 | ||
24 | /* Convert a physical address to an address suitable for the GART. */ | 24 | /* Convert a physical address to an address suitable for the GART. */ |
25 | #define phys_to_gart(x) (x) | 25 | #define phys_to_gart(x) (x) |
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index a96a8f48fbfc..03185cef8e0a 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h | |||
@@ -16,6 +16,7 @@ | |||
16 | #define GET_APIC_VERSION(x) ((x)&0xFF) | 16 | #define GET_APIC_VERSION(x) ((x)&0xFF) |
17 | #define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF) | 17 | #define GET_APIC_MAXLVT(x) (((x)>>16)&0xFF) |
18 | #define APIC_INTEGRATED(x) ((x)&0xF0) | 18 | #define APIC_INTEGRATED(x) ((x)&0xF0) |
19 | #define APIC_XAPIC(x) ((x) >= 0x14) | ||
19 | #define APIC_TASKPRI 0x80 | 20 | #define APIC_TASKPRI 0x80 |
20 | #define APIC_TPRI_MASK 0xFF | 21 | #define APIC_TPRI_MASK 0xFF |
21 | #define APIC_ARBPRI 0x90 | 22 | #define APIC_ARBPRI 0x90 |
diff --git a/include/asm-i386/bugs.h b/include/asm-i386/bugs.h index 6789fc275da3..ea54540638d2 100644 --- a/include/asm-i386/bugs.h +++ b/include/asm-i386/bugs.h | |||
@@ -118,7 +118,10 @@ static void __init check_hlt(void) | |||
118 | printk("disabled\n"); | 118 | printk("disabled\n"); |
119 | return; | 119 | return; |
120 | } | 120 | } |
121 | __asm__ __volatile__("hlt ; hlt ; hlt ; hlt"); | 121 | halt(); |
122 | halt(); | ||
123 | halt(); | ||
124 | halt(); | ||
122 | printk("OK.\n"); | 125 | printk("OK.\n"); |
123 | } | 126 | } |
124 | 127 | ||
diff --git a/include/asm-i386/desc.h b/include/asm-i386/desc.h index 11e67811a990..6df1a53c190e 100644 --- a/include/asm-i386/desc.h +++ b/include/asm-i386/desc.h | |||
@@ -27,8 +27,18 @@ struct Xgt_desc_struct { | |||
27 | 27 | ||
28 | extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; | 28 | extern struct Xgt_desc_struct idt_descr, cpu_gdt_descr[NR_CPUS]; |
29 | 29 | ||
30 | #define load_TR_desc() __asm__ __volatile__("ltr %%ax"::"a" (GDT_ENTRY_TSS*8)) | 30 | #define load_TR_desc() __asm__ __volatile__("ltr %w0"::"q" (GDT_ENTRY_TSS*8)) |
31 | #define load_LDT_desc() __asm__ __volatile__("lldt %%ax"::"a" (GDT_ENTRY_LDT*8)) | 31 | #define load_LDT_desc() __asm__ __volatile__("lldt %w0"::"q" (GDT_ENTRY_LDT*8)) |
32 | |||
33 | #define load_gdt(dtr) __asm__ __volatile("lgdt %0"::"m" (*dtr)) | ||
34 | #define load_idt(dtr) __asm__ __volatile("lidt %0"::"m" (*dtr)) | ||
35 | #define load_tr(tr) __asm__ __volatile("ltr %0"::"mr" (tr)) | ||
36 | #define load_ldt(ldt) __asm__ __volatile("lldt %0"::"mr" (ldt)) | ||
37 | |||
38 | #define store_gdt(dtr) __asm__ ("sgdt %0":"=m" (*dtr)) | ||
39 | #define store_idt(dtr) __asm__ ("sidt %0":"=m" (*dtr)) | ||
40 | #define store_tr(tr) __asm__ ("str %0":"=mr" (tr)) | ||
41 | #define store_ldt(ldt) __asm__ ("sldt %0":"=mr" (ldt)) | ||
32 | 42 | ||
33 | /* | 43 | /* |
34 | * This is the ldt that every process will get unless we need | 44 | * This is the ldt that every process will get unless we need |
@@ -39,14 +49,14 @@ extern void set_intr_gate(unsigned int irq, void * addr); | |||
39 | 49 | ||
40 | #define _set_tssldt_desc(n,addr,limit,type) \ | 50 | #define _set_tssldt_desc(n,addr,limit,type) \ |
41 | __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ | 51 | __asm__ __volatile__ ("movw %w3,0(%2)\n\t" \ |
42 | "movw %%ax,2(%2)\n\t" \ | 52 | "movw %w1,2(%2)\n\t" \ |
43 | "rorl $16,%%eax\n\t" \ | 53 | "rorl $16,%1\n\t" \ |
44 | "movb %%al,4(%2)\n\t" \ | 54 | "movb %b1,4(%2)\n\t" \ |
45 | "movb %4,5(%2)\n\t" \ | 55 | "movb %4,5(%2)\n\t" \ |
46 | "movb $0,6(%2)\n\t" \ | 56 | "movb $0,6(%2)\n\t" \ |
47 | "movb %%ah,7(%2)\n\t" \ | 57 | "movb %h1,7(%2)\n\t" \ |
48 | "rorl $16,%%eax" \ | 58 | "rorl $16,%1" \ |
49 | : "=m"(*(n)) : "a" (addr), "r"(n), "ir"(limit), "i"(type)) | 59 | : "=m"(*(n)) : "q" (addr), "r"(n), "ir"(limit), "i"(type)) |
50 | 60 | ||
51 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) | 61 | static inline void __set_tss_desc(unsigned int cpu, unsigned int entry, void *addr) |
52 | { | 62 | { |
@@ -86,6 +96,13 @@ static inline void set_ldt_desc(unsigned int cpu, void *addr, unsigned int size) | |||
86 | (info)->seg_not_present == 1 && \ | 96 | (info)->seg_not_present == 1 && \ |
87 | (info)->useable == 0 ) | 97 | (info)->useable == 0 ) |
88 | 98 | ||
99 | static inline void write_ldt_entry(void *ldt, int entry, __u32 entry_a, __u32 entry_b) | ||
100 | { | ||
101 | __u32 *lp = (__u32 *)((char *)ldt + entry*8); | ||
102 | *lp = entry_a; | ||
103 | *(lp+1) = entry_b; | ||
104 | } | ||
105 | |||
89 | #if TLS_SIZE != 24 | 106 | #if TLS_SIZE != 24 |
90 | # error update this code. | 107 | # error update this code. |
91 | #endif | 108 | #endif |
diff --git a/include/asm-i386/kdebug.h b/include/asm-i386/kdebug.h index b3f8d5f59d5d..316138e89910 100644 --- a/include/asm-i386/kdebug.h +++ b/include/asm-i386/kdebug.h | |||
@@ -41,9 +41,16 @@ enum die_val { | |||
41 | DIE_PAGE_FAULT, | 41 | DIE_PAGE_FAULT, |
42 | }; | 42 | }; |
43 | 43 | ||
44 | static inline int notify_die(enum die_val val,char *str,struct pt_regs *regs,long err,int trap, int sig) | 44 | static inline int notify_die(enum die_val val, const char *str, |
45 | struct pt_regs *regs, long err, int trap, int sig) | ||
45 | { | 46 | { |
46 | struct die_args args = { .regs=regs, .str=str, .err=err, .trapnr=trap,.signr=sig }; | 47 | struct die_args args = { |
48 | .regs = regs, | ||
49 | .str = str, | ||
50 | .err = err, | ||
51 | .trapnr = trap, | ||
52 | .signr = sig | ||
53 | }; | ||
47 | return notifier_call_chain(&i386die_chain, val, &args); | 54 | return notifier_call_chain(&i386die_chain, val, &args); |
48 | } | 55 | } |
49 | 56 | ||
diff --git a/include/asm-i386/mach-es7000/mach_mpparse.h b/include/asm-i386/mach-es7000/mach_mpparse.h index 85809e0898d7..28a84f6185a7 100644 --- a/include/asm-i386/mach-es7000/mach_mpparse.h +++ b/include/asm-i386/mach-es7000/mach_mpparse.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __ASM_MACH_MPPARSE_H | 1 | #ifndef __ASM_MACH_MPPARSE_H |
2 | #define __ASM_MACH_MPPARSE_H | 2 | #define __ASM_MACH_MPPARSE_H |
3 | 3 | ||
4 | #include <linux/acpi.h> | ||
5 | |||
4 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | 6 | static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, |
5 | struct mpc_config_translation *translation) | 7 | struct mpc_config_translation *translation) |
6 | { | 8 | { |
@@ -12,8 +14,9 @@ static inline void mpc_oem_pci_bus(struct mpc_config_bus *m, | |||
12 | { | 14 | { |
13 | } | 15 | } |
14 | 16 | ||
15 | extern int parse_unisys_oem (char *oemptr, int oem_entries); | 17 | extern int parse_unisys_oem (char *oemptr); |
16 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr, int *length); | 18 | extern int find_unisys_acpi_oem_table(unsigned long *oem_addr); |
19 | extern void setup_unisys(); | ||
17 | 20 | ||
18 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | 21 | static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, |
19 | char *productid) | 22 | char *productid) |
@@ -22,18 +25,33 @@ static inline int mps_oem_check(struct mp_config_table *mpc, char *oem, | |||
22 | struct mp_config_oemtable *oem_table = | 25 | struct mp_config_oemtable *oem_table = |
23 | (struct mp_config_oemtable *)mpc->mpc_oemptr; | 26 | (struct mp_config_oemtable *)mpc->mpc_oemptr; |
24 | if (!strncmp(oem, "UNISYS", 6)) | 27 | if (!strncmp(oem, "UNISYS", 6)) |
25 | return parse_unisys_oem((char *)oem_table, oem_table->oem_length); | 28 | return parse_unisys_oem((char *)oem_table); |
26 | } | 29 | } |
27 | return 0; | 30 | return 0; |
28 | } | 31 | } |
29 | 32 | ||
33 | static inline int es7000_check_dsdt() | ||
34 | { | ||
35 | struct acpi_table_header *header = NULL; | ||
36 | if(!acpi_get_table_header_early(ACPI_DSDT, &header)) | ||
37 | acpi_table_print(header, 0); | ||
38 | if (!strncmp(header->oem_id, "UNISYS", 6)) | ||
39 | return 1; | ||
40 | return 0; | ||
41 | } | ||
42 | |||
30 | /* Hook from generic ACPI tables.c */ | 43 | /* Hook from generic ACPI tables.c */ |
31 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) | 44 | static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id) |
32 | { | 45 | { |
33 | unsigned long oem_addr; | 46 | unsigned long oem_addr; |
34 | int oem_entries; | 47 | if (!find_unisys_acpi_oem_table(&oem_addr)) { |
35 | if (!find_unisys_acpi_oem_table(&oem_addr, &oem_entries)) | 48 | if (es7000_check_dsdt()) |
36 | return parse_unisys_oem((char *)oem_addr, oem_entries); | 49 | return parse_unisys_oem((char *)oem_addr); |
50 | else { | ||
51 | setup_unisys(); | ||
52 | return 1; | ||
53 | } | ||
54 | } | ||
37 | return 0; | 55 | return 0; |
38 | } | 56 | } |
39 | 57 | ||
diff --git a/include/asm-i386/mach-generic/mach_apic.h b/include/asm-i386/mach-generic/mach_apic.h index b13767a4e934..d9dc039da94a 100644 --- a/include/asm-i386/mach-generic/mach_apic.h +++ b/include/asm-i386/mach-generic/mach_apic.h | |||
@@ -28,4 +28,6 @@ | |||
28 | #define enable_apic_mode (genapic->enable_apic_mode) | 28 | #define enable_apic_mode (genapic->enable_apic_mode) |
29 | #define phys_pkg_id (genapic->phys_pkg_id) | 29 | #define phys_pkg_id (genapic->phys_pkg_id) |
30 | 30 | ||
31 | extern void generic_bigsmp_probe(void); | ||
32 | |||
31 | #endif /* __ASM_MACH_APIC_H */ | 33 | #endif /* __ASM_MACH_APIC_H */ |
diff --git a/include/asm-i386/mpspec.h b/include/asm-i386/mpspec.h index d9fafba075bc..d84a9c326c22 100644 --- a/include/asm-i386/mpspec.h +++ b/include/asm-i386/mpspec.h | |||
@@ -11,6 +11,7 @@ extern int mp_bus_id_to_local [MAX_MP_BUSSES]; | |||
11 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | 11 | extern int quad_local_to_mp_bus_id [NR_CPUS/4][4]; |
12 | extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; | 12 | extern int mp_bus_id_to_pci_bus [MAX_MP_BUSSES]; |
13 | 13 | ||
14 | extern unsigned int def_to_bigsmp; | ||
14 | extern unsigned int boot_cpu_physical_apicid; | 15 | extern unsigned int boot_cpu_physical_apicid; |
15 | extern int smp_found_config; | 16 | extern int smp_found_config; |
16 | extern void find_smp_config (void); | 17 | extern void find_smp_config (void); |
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index c76fce8badbb..62b76cd96957 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h | |||
@@ -47,6 +47,21 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val) | |||
47 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ | 47 | : "c" (msr), "0" (a), "d" (b), "i" (-EFAULT));\ |
48 | ret__; }) | 48 | ret__; }) |
49 | 49 | ||
50 | /* rdmsr with exception handling */ | ||
51 | #define rdmsr_safe(msr,a,b) ({ int ret__; \ | ||
52 | asm volatile("2: rdmsr ; xorl %0,%0\n" \ | ||
53 | "1:\n\t" \ | ||
54 | ".section .fixup,\"ax\"\n\t" \ | ||
55 | "3: movl %4,%0 ; jmp 1b\n\t" \ | ||
56 | ".previous\n\t" \ | ||
57 | ".section __ex_table,\"a\"\n" \ | ||
58 | " .align 4\n\t" \ | ||
59 | " .long 2b,3b\n\t" \ | ||
60 | ".previous" \ | ||
61 | : "=r" (ret__), "=a" (*(a)), "=d" (*(b)) \ | ||
62 | : "c" (msr), "i" (-EFAULT));\ | ||
63 | ret__; }) | ||
64 | |||
50 | #define rdtsc(low,high) \ | 65 | #define rdtsc(low,high) \ |
51 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) | 66 | __asm__ __volatile__("rdtsc" : "=a" (low), "=d" (high)) |
52 | 67 | ||
diff --git a/include/asm-i386/page.h b/include/asm-i386/page.h index 8d93f732d72d..73296d9924fb 100644 --- a/include/asm-i386/page.h +++ b/include/asm-i386/page.h | |||
@@ -68,7 +68,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
68 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 68 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
69 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 69 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
70 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA | 70 | #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA |
71 | #define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
72 | #endif | 71 | #endif |
73 | 72 | ||
74 | #define pgd_val(x) ((x).pgd) | 73 | #define pgd_val(x) ((x).pgd) |
@@ -104,20 +103,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
104 | */ | 103 | */ |
105 | extern unsigned int __VMALLOC_RESERVE; | 104 | extern unsigned int __VMALLOC_RESERVE; |
106 | 105 | ||
107 | /* Pure 2^n version of get_order */ | ||
108 | static __inline__ int get_order(unsigned long size) | ||
109 | { | ||
110 | int order; | ||
111 | |||
112 | size = (size-1) >> (PAGE_SHIFT-1); | ||
113 | order = -1; | ||
114 | do { | ||
115 | size >>= 1; | ||
116 | order++; | ||
117 | } while (size); | ||
118 | return order; | ||
119 | } | ||
120 | |||
121 | extern int sysctl_legacy_va_layout; | 106 | extern int sysctl_legacy_va_layout; |
122 | 107 | ||
123 | extern int page_is_ram(unsigned long pagenr); | 108 | extern int page_is_ram(unsigned long pagenr); |
@@ -156,4 +141,6 @@ extern int page_is_ram(unsigned long pagenr); | |||
156 | 141 | ||
157 | #endif /* __KERNEL__ */ | 142 | #endif /* __KERNEL__ */ |
158 | 143 | ||
144 | #include <asm-generic/page.h> | ||
145 | |||
159 | #endif /* _I386_PAGE_H */ | 146 | #endif /* _I386_PAGE_H */ |
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index d609f9c2c1f0..2e3f4a344a2d 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -64,7 +64,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
64 | #define set_pmd(pmdptr,pmdval) \ | 64 | #define set_pmd(pmdptr,pmdval) \ |
65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) | 65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) |
66 | #define set_pud(pudptr,pudval) \ | 66 | #define set_pud(pudptr,pudval) \ |
67 | set_64bit((unsigned long long *)(pudptr),pud_val(pudval)) | 67 | (*(pudptr) = (pudval)) |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush | 70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 77c6497f416e..47bc1ffa3d4c 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -86,9 +86,7 @@ void paging_init(void); | |||
86 | #endif | 86 | #endif |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * The 4MB page is guessing.. Detailed in the infamous "Chapter H" | 89 | * _PAGE_PSE set in the page directory entry just means that |
90 | * of the Pentium details, but assuming intel did the straightforward | ||
91 | * thing, this bit set in the page directory entry just means that | ||
92 | * the page directory entry points directly to a 4MB-aligned block of | 90 | * the page directory entry points directly to a 4MB-aligned block of |
93 | * memory. | 91 | * memory. |
94 | */ | 92 | */ |
@@ -119,8 +117,10 @@ void paging_init(void); | |||
119 | #define _PAGE_UNUSED2 0x400 | 117 | #define _PAGE_UNUSED2 0x400 |
120 | #define _PAGE_UNUSED3 0x800 | 118 | #define _PAGE_UNUSED3 0x800 |
121 | 119 | ||
122 | #define _PAGE_FILE 0x040 /* set:pagecache unset:swap */ | 120 | /* If _PAGE_PRESENT is clear, we use these: */ |
123 | #define _PAGE_PROTNONE 0x080 /* If not present */ | 121 | #define _PAGE_FILE 0x040 /* nonlinear file mapping, saved PTE; unset:swap */ |
122 | #define _PAGE_PROTNONE 0x080 /* if the user mapped it with PROT_NONE; | ||
123 | pte_present gives true */ | ||
124 | #ifdef CONFIG_X86_PAE | 124 | #ifdef CONFIG_X86_PAE |
125 | #define _PAGE_NX (1ULL<<_PAGE_BIT_NX) | 125 | #define _PAGE_NX (1ULL<<_PAGE_BIT_NX) |
126 | #else | 126 | #else |
@@ -215,11 +215,13 @@ extern unsigned long pg0[]; | |||
215 | * The following only work if pte_present() is true. | 215 | * The following only work if pte_present() is true. |
216 | * Undefined behaviour if not.. | 216 | * Undefined behaviour if not.. |
217 | */ | 217 | */ |
218 | #define __LARGE_PTE (_PAGE_PSE | _PAGE_PRESENT) | ||
218 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | 219 | static inline int pte_user(pte_t pte) { return (pte).pte_low & _PAGE_USER; } |
219 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } | 220 | static inline int pte_read(pte_t pte) { return (pte).pte_low & _PAGE_USER; } |
220 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } | 221 | static inline int pte_dirty(pte_t pte) { return (pte).pte_low & _PAGE_DIRTY; } |
221 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } | 222 | static inline int pte_young(pte_t pte) { return (pte).pte_low & _PAGE_ACCESSED; } |
222 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } | 223 | static inline int pte_write(pte_t pte) { return (pte).pte_low & _PAGE_RW; } |
224 | static inline int pte_huge(pte_t pte) { return ((pte).pte_low & __LARGE_PTE) == __LARGE_PTE; } | ||
223 | 225 | ||
224 | /* | 226 | /* |
225 | * The following only works if pte_present() is not true. | 227 | * The following only works if pte_present() is not true. |
@@ -236,7 +238,7 @@ static inline pte_t pte_mkexec(pte_t pte) { (pte).pte_low |= _PAGE_USER; return | |||
236 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } | 238 | static inline pte_t pte_mkdirty(pte_t pte) { (pte).pte_low |= _PAGE_DIRTY; return pte; } |
237 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } | 239 | static inline pte_t pte_mkyoung(pte_t pte) { (pte).pte_low |= _PAGE_ACCESSED; return pte; } |
238 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } | 240 | static inline pte_t pte_mkwrite(pte_t pte) { (pte).pte_low |= _PAGE_RW; return pte; } |
239 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= _PAGE_PRESENT | _PAGE_PSE; return pte; } | 241 | static inline pte_t pte_mkhuge(pte_t pte) { (pte).pte_low |= __LARGE_PTE; return pte; } |
240 | 242 | ||
241 | #ifdef CONFIG_X86_PAE | 243 | #ifdef CONFIG_X86_PAE |
242 | # include <asm/pgtable-3level.h> | 244 | # include <asm/pgtable-3level.h> |
@@ -258,12 +260,39 @@ static inline int ptep_test_and_clear_young(struct vm_area_struct *vma, unsigned | |||
258 | return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low); | 260 | return test_and_clear_bit(_PAGE_BIT_ACCESSED, &ptep->pte_low); |
259 | } | 261 | } |
260 | 262 | ||
263 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) | ||
264 | { | ||
265 | pte_t pte; | ||
266 | if (full) { | ||
267 | pte = *ptep; | ||
268 | *ptep = __pte(0); | ||
269 | } else { | ||
270 | pte = ptep_get_and_clear(mm, addr, ptep); | ||
271 | } | ||
272 | return pte; | ||
273 | } | ||
274 | |||
261 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 275 | static inline void ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
262 | { | 276 | { |
263 | clear_bit(_PAGE_BIT_RW, &ptep->pte_low); | 277 | clear_bit(_PAGE_BIT_RW, &ptep->pte_low); |
264 | } | 278 | } |
265 | 279 | ||
266 | /* | 280 | /* |
281 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); | ||
282 | * | ||
283 | * dst - pointer to pgd range anwhere on a pgd page | ||
284 | * src - "" | ||
285 | * count - the number of pgds to copy. | ||
286 | * | ||
287 | * dst and src can be on the same page, but the range must not overlap, | ||
288 | * and must not cross a page boundary. | ||
289 | */ | ||
290 | static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | ||
291 | { | ||
292 | memcpy(dst, src, count * sizeof(pgd_t)); | ||
293 | } | ||
294 | |||
295 | /* | ||
267 | * Macro to mark a page protection value as "uncacheable". On processors which do not support | 296 | * Macro to mark a page protection value as "uncacheable". On processors which do not support |
268 | * it, this is a no-op. | 297 | * it, this is a no-op. |
269 | */ | 298 | */ |
@@ -415,6 +444,7 @@ extern void noexec_setup(const char *str); | |||
415 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 444 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
416 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | 445 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
417 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 446 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
447 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | ||
418 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT | 448 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT |
419 | #define __HAVE_ARCH_PTE_SAME | 449 | #define __HAVE_ARCH_PTE_SAME |
420 | #include <asm-generic/pgtable.h> | 450 | #include <asm-generic/pgtable.h> |
diff --git a/include/asm-i386/processor.h b/include/asm-i386/processor.h index d0d8b0160090..37bef8ed7bed 100644 --- a/include/asm-i386/processor.h +++ b/include/asm-i386/processor.h | |||
@@ -203,9 +203,7 @@ static inline unsigned int cpuid_edx(unsigned int op) | |||
203 | return edx; | 203 | return edx; |
204 | } | 204 | } |
205 | 205 | ||
206 | #define load_cr3(pgdir) \ | 206 | #define load_cr3(pgdir) write_cr3(__pa(pgdir)) |
207 | asm volatile("movl %0,%%cr3": :"r" (__pa(pgdir))) | ||
208 | |||
209 | 207 | ||
210 | /* | 208 | /* |
211 | * Intel CPU features in CR4 | 209 | * Intel CPU features in CR4 |
@@ -232,22 +230,20 @@ extern unsigned long mmu_cr4_features; | |||
232 | 230 | ||
233 | static inline void set_in_cr4 (unsigned long mask) | 231 | static inline void set_in_cr4 (unsigned long mask) |
234 | { | 232 | { |
233 | unsigned cr4; | ||
235 | mmu_cr4_features |= mask; | 234 | mmu_cr4_features |= mask; |
236 | __asm__("movl %%cr4,%%eax\n\t" | 235 | cr4 = read_cr4(); |
237 | "orl %0,%%eax\n\t" | 236 | cr4 |= mask; |
238 | "movl %%eax,%%cr4\n" | 237 | write_cr4(cr4); |
239 | : : "irg" (mask) | ||
240 | :"ax"); | ||
241 | } | 238 | } |
242 | 239 | ||
243 | static inline void clear_in_cr4 (unsigned long mask) | 240 | static inline void clear_in_cr4 (unsigned long mask) |
244 | { | 241 | { |
242 | unsigned cr4; | ||
245 | mmu_cr4_features &= ~mask; | 243 | mmu_cr4_features &= ~mask; |
246 | __asm__("movl %%cr4,%%eax\n\t" | 244 | cr4 = read_cr4(); |
247 | "andl %0,%%eax\n\t" | 245 | cr4 &= ~mask; |
248 | "movl %%eax,%%cr4\n" | 246 | write_cr4(cr4); |
249 | : : "irg" (~mask) | ||
250 | :"ax"); | ||
251 | } | 247 | } |
252 | 248 | ||
253 | /* | 249 | /* |
@@ -281,6 +277,11 @@ static inline void clear_in_cr4 (unsigned long mask) | |||
281 | outb((data), 0x23); \ | 277 | outb((data), 0x23); \ |
282 | } while (0) | 278 | } while (0) |
283 | 279 | ||
280 | static inline void serialize_cpu(void) | ||
281 | { | ||
282 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); | ||
283 | } | ||
284 | |||
284 | static inline void __monitor(const void *eax, unsigned long ecx, | 285 | static inline void __monitor(const void *eax, unsigned long ecx, |
285 | unsigned long edx) | 286 | unsigned long edx) |
286 | { | 287 | { |
@@ -454,6 +455,7 @@ struct thread_struct { | |||
454 | unsigned int saved_fs, saved_gs; | 455 | unsigned int saved_fs, saved_gs; |
455 | /* IO permissions */ | 456 | /* IO permissions */ |
456 | unsigned long *io_bitmap_ptr; | 457 | unsigned long *io_bitmap_ptr; |
458 | unsigned long iopl; | ||
457 | /* max allowed port in the bitmap, in bytes: */ | 459 | /* max allowed port in the bitmap, in bytes: */ |
458 | unsigned long io_bitmap_max; | 460 | unsigned long io_bitmap_max; |
459 | }; | 461 | }; |
@@ -474,7 +476,6 @@ struct thread_struct { | |||
474 | .esp0 = sizeof(init_stack) + (long)&init_stack, \ | 476 | .esp0 = sizeof(init_stack) + (long)&init_stack, \ |
475 | .ss0 = __KERNEL_DS, \ | 477 | .ss0 = __KERNEL_DS, \ |
476 | .ss1 = __KERNEL_CS, \ | 478 | .ss1 = __KERNEL_CS, \ |
477 | .ldt = GDT_ENTRY_LDT, \ | ||
478 | .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ | 479 | .io_bitmap_base = INVALID_IO_BITMAP_OFFSET, \ |
479 | .io_bitmap = { [ 0 ... IO_BITMAP_LONGS] = ~0 }, \ | 480 | .io_bitmap = { [ 0 ... IO_BITMAP_LONGS] = ~0 }, \ |
480 | } | 481 | } |
@@ -511,6 +512,21 @@ static inline void load_esp0(struct tss_struct *tss, struct thread_struct *threa | |||
511 | : /* no output */ \ | 512 | : /* no output */ \ |
512 | :"r" (value)) | 513 | :"r" (value)) |
513 | 514 | ||
515 | /* | ||
516 | * Set IOPL bits in EFLAGS from given mask | ||
517 | */ | ||
518 | static inline void set_iopl_mask(unsigned mask) | ||
519 | { | ||
520 | unsigned int reg; | ||
521 | __asm__ __volatile__ ("pushfl;" | ||
522 | "popl %0;" | ||
523 | "andl %1, %0;" | ||
524 | "orl %2, %0;" | ||
525 | "pushl %0;" | ||
526 | "popfl" | ||
527 | : "=&r" (reg) | ||
528 | : "i" (~X86_EFLAGS_IOPL), "r" (mask)); | ||
529 | } | ||
514 | 530 | ||
515 | /* Forward declaration, a strange C thing */ | 531 | /* Forward declaration, a strange C thing */ |
516 | struct task_struct; | 532 | struct task_struct; |
diff --git a/include/asm-i386/ptrace.h b/include/asm-i386/ptrace.h index 05532875e39e..7e0f2945d17d 100644 --- a/include/asm-i386/ptrace.h +++ b/include/asm-i386/ptrace.h | |||
@@ -61,6 +61,13 @@ struct pt_regs { | |||
61 | struct task_struct; | 61 | struct task_struct; |
62 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); | 62 | extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code); |
63 | 63 | ||
64 | /* | ||
65 | * user_mode_vm(regs) determines whether a register set came from user mode. | ||
66 | * This is true if V8086 mode was enabled OR if the register set was from | ||
67 | * protected mode with RPL-3 CS value. This tricky test checks that with | ||
68 | * one comparison. Many places in the kernel can bypass this full check | ||
69 | * if they have already ruled out V8086 mode, so user_mode(regs) can be used. | ||
70 | */ | ||
64 | static inline int user_mode(struct pt_regs *regs) | 71 | static inline int user_mode(struct pt_regs *regs) |
65 | { | 72 | { |
66 | return (regs->xcs & 3) != 0; | 73 | return (regs->xcs & 3) != 0; |
diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index 7a32184d54bf..826a8ca50ac8 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h | |||
@@ -44,7 +44,7 @@ extern unsigned char boot_params[PARAM_SIZE]; | |||
44 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) | 44 | #define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4))) |
45 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) | 45 | #define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8))) |
46 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) | 46 | #define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc))) |
47 | #define EFI_MEMMAP ((efi_memory_desc_t *) *((unsigned long *)(PARAM+0x1d0))) | 47 | #define EFI_MEMMAP ((void *) *((unsigned long *)(PARAM+0x1d0))) |
48 | #define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4))) | 48 | #define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4))) |
49 | #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) | 49 | #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) |
50 | #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) | 50 | #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) |
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index a283738b80b3..13250199976d 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -59,7 +59,7 @@ extern void cpu_uninit(void); | |||
59 | 59 | ||
60 | extern cpumask_t cpu_callout_map; | 60 | extern cpumask_t cpu_callout_map; |
61 | extern cpumask_t cpu_callin_map; | 61 | extern cpumask_t cpu_callin_map; |
62 | #define cpu_possible_map cpu_callout_map | 62 | extern cpumask_t cpu_possible_map; |
63 | 63 | ||
64 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ | 64 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ |
65 | static inline int num_booting_cpus(void) | 65 | static inline int num_booting_cpus(void) |
diff --git a/include/asm-i386/system.h b/include/asm-i386/system.h index 3db717a244f0..acd5c26b69ba 100644 --- a/include/asm-i386/system.h +++ b/include/asm-i386/system.h | |||
@@ -14,8 +14,7 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc | |||
14 | 14 | ||
15 | #define switch_to(prev,next,last) do { \ | 15 | #define switch_to(prev,next,last) do { \ |
16 | unsigned long esi,edi; \ | 16 | unsigned long esi,edi; \ |
17 | asm volatile("pushfl\n\t" \ | 17 | asm volatile("pushl %%ebp\n\t" \ |
18 | "pushl %%ebp\n\t" \ | ||
19 | "movl %%esp,%0\n\t" /* save ESP */ \ | 18 | "movl %%esp,%0\n\t" /* save ESP */ \ |
20 | "movl %5,%%esp\n\t" /* restore ESP */ \ | 19 | "movl %5,%%esp\n\t" /* restore ESP */ \ |
21 | "movl $1f,%1\n\t" /* save EIP */ \ | 20 | "movl $1f,%1\n\t" /* save EIP */ \ |
@@ -23,7 +22,6 @@ extern struct task_struct * FASTCALL(__switch_to(struct task_struct *prev, struc | |||
23 | "jmp __switch_to\n" \ | 22 | "jmp __switch_to\n" \ |
24 | "1:\t" \ | 23 | "1:\t" \ |
25 | "popl %%ebp\n\t" \ | 24 | "popl %%ebp\n\t" \ |
26 | "popfl" \ | ||
27 | :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ | 25 | :"=m" (prev->thread.esp),"=m" (prev->thread.eip), \ |
28 | "=a" (last),"=S" (esi),"=D" (edi) \ | 26 | "=a" (last),"=S" (esi),"=D" (edi) \ |
29 | :"m" (next->thread.esp),"m" (next->thread.eip), \ | 27 | :"m" (next->thread.esp),"m" (next->thread.eip), \ |
@@ -93,13 +91,13 @@ static inline unsigned long _get_base(char * addr) | |||
93 | ".align 4\n\t" \ | 91 | ".align 4\n\t" \ |
94 | ".long 1b,3b\n" \ | 92 | ".long 1b,3b\n" \ |
95 | ".previous" \ | 93 | ".previous" \ |
96 | : :"m" (value)) | 94 | : :"rm" (value)) |
97 | 95 | ||
98 | /* | 96 | /* |
99 | * Save a segment register away | 97 | * Save a segment register away |
100 | */ | 98 | */ |
101 | #define savesegment(seg, value) \ | 99 | #define savesegment(seg, value) \ |
102 | asm volatile("mov %%" #seg ",%0":"=m" (value)) | 100 | asm volatile("mov %%" #seg ",%0":"=rm" (value)) |
103 | 101 | ||
104 | /* | 102 | /* |
105 | * Clear and set 'TS' bit respectively | 103 | * Clear and set 'TS' bit respectively |
@@ -107,13 +105,33 @@ static inline unsigned long _get_base(char * addr) | |||
107 | #define clts() __asm__ __volatile__ ("clts") | 105 | #define clts() __asm__ __volatile__ ("clts") |
108 | #define read_cr0() ({ \ | 106 | #define read_cr0() ({ \ |
109 | unsigned int __dummy; \ | 107 | unsigned int __dummy; \ |
110 | __asm__( \ | 108 | __asm__ __volatile__( \ |
111 | "movl %%cr0,%0\n\t" \ | 109 | "movl %%cr0,%0\n\t" \ |
112 | :"=r" (__dummy)); \ | 110 | :"=r" (__dummy)); \ |
113 | __dummy; \ | 111 | __dummy; \ |
114 | }) | 112 | }) |
115 | #define write_cr0(x) \ | 113 | #define write_cr0(x) \ |
116 | __asm__("movl %0,%%cr0": :"r" (x)); | 114 | __asm__ __volatile__("movl %0,%%cr0": :"r" (x)); |
115 | |||
116 | #define read_cr2() ({ \ | ||
117 | unsigned int __dummy; \ | ||
118 | __asm__ __volatile__( \ | ||
119 | "movl %%cr2,%0\n\t" \ | ||
120 | :"=r" (__dummy)); \ | ||
121 | __dummy; \ | ||
122 | }) | ||
123 | #define write_cr2(x) \ | ||
124 | __asm__ __volatile__("movl %0,%%cr2": :"r" (x)); | ||
125 | |||
126 | #define read_cr3() ({ \ | ||
127 | unsigned int __dummy; \ | ||
128 | __asm__ ( \ | ||
129 | "movl %%cr3,%0\n\t" \ | ||
130 | :"=r" (__dummy)); \ | ||
131 | __dummy; \ | ||
132 | }) | ||
133 | #define write_cr3(x) \ | ||
134 | __asm__ __volatile__("movl %0,%%cr3": :"r" (x)); | ||
117 | 135 | ||
118 | #define read_cr4() ({ \ | 136 | #define read_cr4() ({ \ |
119 | unsigned int __dummy; \ | 137 | unsigned int __dummy; \ |
@@ -123,7 +141,7 @@ static inline unsigned long _get_base(char * addr) | |||
123 | __dummy; \ | 141 | __dummy; \ |
124 | }) | 142 | }) |
125 | #define write_cr4(x) \ | 143 | #define write_cr4(x) \ |
126 | __asm__("movl %0,%%cr4": :"r" (x)); | 144 | __asm__ __volatile__("movl %0,%%cr4": :"r" (x)); |
127 | #define stts() write_cr0(8 | read_cr0()) | 145 | #define stts() write_cr0(8 | read_cr0()) |
128 | 146 | ||
129 | #endif /* __KERNEL__ */ | 147 | #endif /* __KERNEL__ */ |
@@ -447,6 +465,8 @@ struct alt_instr { | |||
447 | #define local_irq_enable() __asm__ __volatile__("sti": : :"memory") | 465 | #define local_irq_enable() __asm__ __volatile__("sti": : :"memory") |
448 | /* used in the idle loop; sti takes one instruction cycle to complete */ | 466 | /* used in the idle loop; sti takes one instruction cycle to complete */ |
449 | #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") | 467 | #define safe_halt() __asm__ __volatile__("sti; hlt": : :"memory") |
468 | /* used when interrupts are already enabled or to shutdown the processor */ | ||
469 | #define halt() __asm__ __volatile__("hlt": : :"memory") | ||
450 | 470 | ||
451 | #define irqs_disabled() \ | 471 | #define irqs_disabled() \ |
452 | ({ \ | 472 | ({ \ |
diff --git a/include/asm-i386/thread_info.h b/include/asm-i386/thread_info.h index 95add81237ea..e2cb9fa6f563 100644 --- a/include/asm-i386/thread_info.h +++ b/include/asm-i386/thread_info.h | |||
@@ -139,6 +139,7 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
139 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ | 139 | #define TIF_NEED_RESCHED 3 /* rescheduling necessary */ |
140 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ | 140 | #define TIF_SINGLESTEP 4 /* restore singlestep on return to user mode */ |
141 | #define TIF_IRET 5 /* return with iret */ | 141 | #define TIF_IRET 5 /* return with iret */ |
142 | #define TIF_SYSCALL_EMU 6 /* syscall emulation active */ | ||
142 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ | 143 | #define TIF_SYSCALL_AUDIT 7 /* syscall auditing active */ |
143 | #define TIF_SECCOMP 8 /* secure computing */ | 144 | #define TIF_SECCOMP 8 /* secure computing */ |
144 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ | 145 | #define TIF_POLLING_NRFLAG 16 /* true if poll_idle() is polling TIF_NEED_RESCHED */ |
@@ -150,13 +151,15 @@ register unsigned long current_stack_pointer asm("esp") __attribute_used__; | |||
150 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) | 151 | #define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED) |
151 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) | 152 | #define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP) |
152 | #define _TIF_IRET (1<<TIF_IRET) | 153 | #define _TIF_IRET (1<<TIF_IRET) |
154 | #define _TIF_SYSCALL_EMU (1<<TIF_SYSCALL_EMU) | ||
153 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) | 155 | #define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT) |
154 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) | 156 | #define _TIF_SECCOMP (1<<TIF_SECCOMP) |
155 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) | 157 | #define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG) |
156 | 158 | ||
157 | /* work to do on interrupt/exception return */ | 159 | /* work to do on interrupt/exception return */ |
158 | #define _TIF_WORK_MASK \ | 160 | #define _TIF_WORK_MASK \ |
159 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|_TIF_SECCOMP)) | 161 | (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|\ |
162 | _TIF_SECCOMP|_TIF_SYSCALL_EMU)) | ||
160 | /* work to do on any return to u-space */ | 163 | /* work to do on any return to u-space */ |
161 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) | 164 | #define _TIF_ALLWORK_MASK (0x0000FFFF & ~_TIF_SECCOMP) |
162 | 165 | ||
diff --git a/include/asm-i386/timer.h b/include/asm-i386/timer.h index dcf1e07db08a..aed16437479d 100644 --- a/include/asm-i386/timer.h +++ b/include/asm-i386/timer.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef _ASMi386_TIMER_H | 1 | #ifndef _ASMi386_TIMER_H |
2 | #define _ASMi386_TIMER_H | 2 | #define _ASMi386_TIMER_H |
3 | #include <linux/init.h> | 3 | #include <linux/init.h> |
4 | #include <linux/pm.h> | ||
4 | 5 | ||
5 | /** | 6 | /** |
6 | * struct timer_ops - used to define a timer source | 7 | * struct timer_ops - used to define a timer source |
@@ -23,6 +24,8 @@ struct timer_opts { | |||
23 | unsigned long long (*monotonic_clock)(void); | 24 | unsigned long long (*monotonic_clock)(void); |
24 | void (*delay)(unsigned long); | 25 | void (*delay)(unsigned long); |
25 | unsigned long (*read_timer)(void); | 26 | unsigned long (*read_timer)(void); |
27 | int (*suspend)(pm_message_t state); | ||
28 | int (*resume)(void); | ||
26 | }; | 29 | }; |
27 | 30 | ||
28 | struct init_timer_opts { | 31 | struct init_timer_opts { |
diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h index 901b77c42b8a..ced00fe8fe61 100644 --- a/include/asm-i386/types.h +++ b/include/asm-i386/types.h | |||
@@ -63,8 +63,6 @@ typedef u64 sector_t; | |||
63 | #define HAVE_SECTOR_T | 63 | #define HAVE_SECTOR_T |
64 | #endif | 64 | #endif |
65 | 65 | ||
66 | typedef unsigned short kmem_bufctl_t; | ||
67 | |||
68 | #endif /* __ASSEMBLY__ */ | 66 | #endif /* __ASSEMBLY__ */ |
69 | 67 | ||
70 | #endif /* __KERNEL__ */ | 68 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-i386/xor.h b/include/asm-i386/xor.h index f80e2dbe1b56..23c86cef3b25 100644 --- a/include/asm-i386/xor.h +++ b/include/asm-i386/xor.h | |||
@@ -535,14 +535,14 @@ static struct xor_block_template xor_block_p5_mmx = { | |||
535 | 535 | ||
536 | #define XMMS_SAVE do { \ | 536 | #define XMMS_SAVE do { \ |
537 | preempt_disable(); \ | 537 | preempt_disable(); \ |
538 | cr0 = read_cr0(); \ | ||
539 | clts(); \ | ||
538 | __asm__ __volatile__ ( \ | 540 | __asm__ __volatile__ ( \ |
539 | "movl %%cr0,%0 ;\n\t" \ | 541 | "movups %%xmm0,(%0) ;\n\t" \ |
540 | "clts ;\n\t" \ | 542 | "movups %%xmm1,0x10(%0) ;\n\t" \ |
541 | "movups %%xmm0,(%1) ;\n\t" \ | 543 | "movups %%xmm2,0x20(%0) ;\n\t" \ |
542 | "movups %%xmm1,0x10(%1) ;\n\t" \ | 544 | "movups %%xmm3,0x30(%0) ;\n\t" \ |
543 | "movups %%xmm2,0x20(%1) ;\n\t" \ | 545 | : \ |
544 | "movups %%xmm3,0x30(%1) ;\n\t" \ | ||
545 | : "=&r" (cr0) \ | ||
546 | : "r" (xmm_save) \ | 546 | : "r" (xmm_save) \ |
547 | : "memory"); \ | 547 | : "memory"); \ |
548 | } while(0) | 548 | } while(0) |
@@ -550,14 +550,14 @@ static struct xor_block_template xor_block_p5_mmx = { | |||
550 | #define XMMS_RESTORE do { \ | 550 | #define XMMS_RESTORE do { \ |
551 | __asm__ __volatile__ ( \ | 551 | __asm__ __volatile__ ( \ |
552 | "sfence ;\n\t" \ | 552 | "sfence ;\n\t" \ |
553 | "movups (%1),%%xmm0 ;\n\t" \ | 553 | "movups (%0),%%xmm0 ;\n\t" \ |
554 | "movups 0x10(%1),%%xmm1 ;\n\t" \ | 554 | "movups 0x10(%0),%%xmm1 ;\n\t" \ |
555 | "movups 0x20(%1),%%xmm2 ;\n\t" \ | 555 | "movups 0x20(%0),%%xmm2 ;\n\t" \ |
556 | "movups 0x30(%1),%%xmm3 ;\n\t" \ | 556 | "movups 0x30(%0),%%xmm3 ;\n\t" \ |
557 | "movl %0,%%cr0 ;\n\t" \ | ||
558 | : \ | 557 | : \ |
559 | : "r" (cr0), "r" (xmm_save) \ | 558 | : "r" (xmm_save) \ |
560 | : "memory"); \ | 559 | : "memory"); \ |
560 | write_cr0(cr0); \ | ||
561 | preempt_enable(); \ | 561 | preempt_enable(); \ |
562 | } while(0) | 562 | } while(0) |
563 | 563 | ||
diff --git a/include/asm-ia64/types.h b/include/asm-ia64/types.h index a677565aa954..902850d12424 100644 --- a/include/asm-ia64/types.h +++ b/include/asm-ia64/types.h | |||
@@ -67,8 +67,6 @@ typedef __u64 u64; | |||
67 | 67 | ||
68 | typedef u64 dma_addr_t; | 68 | typedef u64 dma_addr_t; |
69 | 69 | ||
70 | typedef unsigned short kmem_bufctl_t; | ||
71 | |||
72 | # endif /* __KERNEL__ */ | 70 | # endif /* __KERNEL__ */ |
73 | #endif /* !__ASSEMBLY__ */ | 71 | #endif /* !__ASSEMBLY__ */ |
74 | 72 | ||
diff --git a/include/asm-m32r/page.h b/include/asm-m32r/page.h index 1c6abb9f3f1f..4ab578876361 100644 --- a/include/asm-m32r/page.h +++ b/include/asm-m32r/page.h | |||
@@ -61,25 +61,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
61 | 61 | ||
62 | /* This handles the memory map.. */ | 62 | /* This handles the memory map.. */ |
63 | 63 | ||
64 | #ifndef __ASSEMBLY__ | ||
65 | |||
66 | /* Pure 2^n version of get_order */ | ||
67 | static __inline__ int get_order(unsigned long size) | ||
68 | { | ||
69 | int order; | ||
70 | |||
71 | size = (size - 1) >> (PAGE_SHIFT - 1); | ||
72 | order = -1; | ||
73 | do { | ||
74 | size >>= 1; | ||
75 | order++; | ||
76 | } while (size); | ||
77 | |||
78 | return order; | ||
79 | } | ||
80 | |||
81 | #endif /* __ASSEMBLY__ */ | ||
82 | |||
83 | #define __MEMORY_START CONFIG_MEMORY_START | 64 | #define __MEMORY_START CONFIG_MEMORY_START |
84 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE | 65 | #define __MEMORY_SIZE CONFIG_MEMORY_SIZE |
85 | 66 | ||
@@ -111,5 +92,7 @@ static __inline__ int get_order(unsigned long size) | |||
111 | 92 | ||
112 | #endif /* __KERNEL__ */ | 93 | #endif /* __KERNEL__ */ |
113 | 94 | ||
95 | #include <asm-generic/page.h> | ||
96 | |||
114 | #endif /* _ASM_M32R_PAGE_H */ | 97 | #endif /* _ASM_M32R_PAGE_H */ |
115 | 98 | ||
diff --git a/include/asm-m32r/types.h b/include/asm-m32r/types.h index ca0a887d2237..fcf24c64c3ba 100644 --- a/include/asm-m32r/types.h +++ b/include/asm-m32r/types.h | |||
@@ -55,8 +55,6 @@ typedef unsigned long long u64; | |||
55 | typedef u32 dma_addr_t; | 55 | typedef u32 dma_addr_t; |
56 | typedef u64 dma64_addr_t; | 56 | typedef u64 dma64_addr_t; |
57 | 57 | ||
58 | typedef unsigned short kmem_bufctl_t; | ||
59 | |||
60 | #endif /* __ASSEMBLY__ */ | 58 | #endif /* __ASSEMBLY__ */ |
61 | 59 | ||
62 | #endif /* __KERNEL__ */ | 60 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-m68k/cacheflush.h b/include/asm-m68k/cacheflush.h index e4773946f10d..8aba971b1368 100644 --- a/include/asm-m68k/cacheflush.h +++ b/include/asm-m68k/cacheflush.h | |||
@@ -130,20 +130,25 @@ static inline void __flush_page_to_ram(void *vaddr) | |||
130 | #define flush_dcache_mmap_lock(mapping) do { } while (0) | 130 | #define flush_dcache_mmap_lock(mapping) do { } while (0) |
131 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) | 131 | #define flush_dcache_mmap_unlock(mapping) do { } while (0) |
132 | #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) | 132 | #define flush_icache_page(vma, page) __flush_page_to_ram(page_address(page)) |
133 | #define flush_icache_user_range(vma,pg,adr,len) do { } while (0) | ||
134 | |||
135 | #define copy_to_user_page(vma, page, vaddr, dst, src, len) \ | ||
136 | do { \ | ||
137 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
138 | memcpy(dst, src, len); \ | ||
139 | } while (0) | ||
140 | |||
141 | #define copy_from_user_page(vma, page, vaddr, dst, src, len) \ | ||
142 | do { \ | ||
143 | flush_cache_page(vma, vaddr, page_to_pfn(page));\ | ||
144 | memcpy(dst, src, len); \ | ||
145 | } while (0) | ||
146 | 133 | ||
134 | extern void flush_icache_user_range(struct vm_area_struct *vma, struct page *page, | ||
135 | unsigned long addr, int len); | ||
147 | extern void flush_icache_range(unsigned long address, unsigned long endaddr); | 136 | extern void flush_icache_range(unsigned long address, unsigned long endaddr); |
148 | 137 | ||
138 | static inline void copy_to_user_page(struct vm_area_struct *vma, | ||
139 | struct page *page, unsigned long vaddr, | ||
140 | void *dst, void *src, int len) | ||
141 | { | ||
142 | flush_cache_page(vma, vaddr, page_to_pfn(page)); | ||
143 | memcpy(dst, src, len); | ||
144 | flush_icache_user_range(vma, page, vaddr, len); | ||
145 | } | ||
146 | static inline void copy_from_user_page(struct vm_area_struct *vma, | ||
147 | struct page *page, unsigned long vaddr, | ||
148 | void *dst, void *src, int len) | ||
149 | { | ||
150 | flush_cache_page(vma, vaddr, page_to_pfn(page)); | ||
151 | memcpy(dst, src, len); | ||
152 | } | ||
153 | |||
149 | #endif /* _M68K_CACHEFLUSH_H */ | 154 | #endif /* _M68K_CACHEFLUSH_H */ |
diff --git a/include/asm-m68k/page.h b/include/asm-m68k/page.h index 206313e2a817..f206dfbc1d48 100644 --- a/include/asm-m68k/page.h +++ b/include/asm-m68k/page.h | |||
@@ -107,20 +107,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
107 | /* to align the pointer to the (next) page boundary */ | 107 | /* to align the pointer to the (next) page boundary */ |
108 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 108 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
109 | 109 | ||
110 | /* Pure 2^n version of get_order */ | ||
111 | static inline int get_order(unsigned long size) | ||
112 | { | ||
113 | int order; | ||
114 | |||
115 | size = (size-1) >> (PAGE_SHIFT-1); | ||
116 | order = -1; | ||
117 | do { | ||
118 | size >>= 1; | ||
119 | order++; | ||
120 | } while (size); | ||
121 | return order; | ||
122 | } | ||
123 | |||
124 | #endif /* !__ASSEMBLY__ */ | 110 | #endif /* !__ASSEMBLY__ */ |
125 | 111 | ||
126 | #include <asm/page_offset.h> | 112 | #include <asm/page_offset.h> |
@@ -192,4 +178,6 @@ static inline void *__va(unsigned long x) | |||
192 | 178 | ||
193 | #endif /* __KERNEL__ */ | 179 | #endif /* __KERNEL__ */ |
194 | 180 | ||
181 | #include <asm-generic/page.h> | ||
182 | |||
195 | #endif /* _M68K_PAGE_H */ | 183 | #endif /* _M68K_PAGE_H */ |
diff --git a/include/asm-m68k/string.h b/include/asm-m68k/string.h index 44def078132a..6c59215b285e 100644 --- a/include/asm-m68k/string.h +++ b/include/asm-m68k/string.h | |||
@@ -80,43 +80,6 @@ static inline char * strchr(const char * s, int c) | |||
80 | return( (char *) s); | 80 | return( (char *) s); |
81 | } | 81 | } |
82 | 82 | ||
83 | #if 0 | ||
84 | #define __HAVE_ARCH_STRPBRK | ||
85 | static inline char *strpbrk(const char *cs,const char *ct) | ||
86 | { | ||
87 | const char *sc1,*sc2; | ||
88 | |||
89 | for( sc1 = cs; *sc1 != '\0'; ++sc1) | ||
90 | for( sc2 = ct; *sc2 != '\0'; ++sc2) | ||
91 | if (*sc1 == *sc2) | ||
92 | return((char *) sc1); | ||
93 | return( NULL ); | ||
94 | } | ||
95 | #endif | ||
96 | |||
97 | #if 0 | ||
98 | #define __HAVE_ARCH_STRSPN | ||
99 | static inline size_t strspn(const char *s, const char *accept) | ||
100 | { | ||
101 | const char *p; | ||
102 | const char *a; | ||
103 | size_t count = 0; | ||
104 | |||
105 | for (p = s; *p != '\0'; ++p) | ||
106 | { | ||
107 | for (a = accept; *a != '\0'; ++a) | ||
108 | if (*p == *a) | ||
109 | break; | ||
110 | if (*a == '\0') | ||
111 | return count; | ||
112 | else | ||
113 | ++count; | ||
114 | } | ||
115 | |||
116 | return count; | ||
117 | } | ||
118 | #endif | ||
119 | |||
120 | /* strstr !! */ | 83 | /* strstr !! */ |
121 | 84 | ||
122 | #define __HAVE_ARCH_STRLEN | 85 | #define __HAVE_ARCH_STRLEN |
@@ -173,370 +136,18 @@ static inline int strncmp(const char * cs,const char * ct,size_t count) | |||
173 | } | 136 | } |
174 | 137 | ||
175 | #define __HAVE_ARCH_MEMSET | 138 | #define __HAVE_ARCH_MEMSET |
176 | /* | 139 | extern void *memset(void *, int, __kernel_size_t); |
177 | * This is really ugly, but its highly optimizatiable by the | 140 | #define memset(d, c, n) __builtin_memset(d, c, n) |
178 | * compiler and is meant as compensation for gcc's missing | ||
179 | * __builtin_memset(). For the 680[23]0 it might be worth considering | ||
180 | * the optimal number of misaligned writes compared to the number of | ||
181 | * tests'n'branches needed to align the destination address. The | ||
182 | * 680[46]0 doesn't really care due to their copy-back caches. | ||
183 | * 10/09/96 - Jes Sorensen | ||
184 | */ | ||
185 | static inline void * __memset_g(void * s, int c, size_t count) | ||
186 | { | ||
187 | void *xs = s; | ||
188 | size_t temp; | ||
189 | |||
190 | if (!count) | ||
191 | return xs; | ||
192 | |||
193 | c &= 0xff; | ||
194 | c |= c << 8; | ||
195 | c |= c << 16; | ||
196 | |||
197 | if (count < 36){ | ||
198 | long *ls = s; | ||
199 | |||
200 | switch(count){ | ||
201 | case 32: case 33: case 34: case 35: | ||
202 | *ls++ = c; | ||
203 | case 28: case 29: case 30: case 31: | ||
204 | *ls++ = c; | ||
205 | case 24: case 25: case 26: case 27: | ||
206 | *ls++ = c; | ||
207 | case 20: case 21: case 22: case 23: | ||
208 | *ls++ = c; | ||
209 | case 16: case 17: case 18: case 19: | ||
210 | *ls++ = c; | ||
211 | case 12: case 13: case 14: case 15: | ||
212 | *ls++ = c; | ||
213 | case 8: case 9: case 10: case 11: | ||
214 | *ls++ = c; | ||
215 | case 4: case 5: case 6: case 7: | ||
216 | *ls++ = c; | ||
217 | break; | ||
218 | default: | ||
219 | break; | ||
220 | } | ||
221 | s = ls; | ||
222 | if (count & 0x02){ | ||
223 | short *ss = s; | ||
224 | *ss++ = c; | ||
225 | s = ss; | ||
226 | } | ||
227 | if (count & 0x01){ | ||
228 | char *cs = s; | ||
229 | *cs++ = c; | ||
230 | s = cs; | ||
231 | } | ||
232 | return xs; | ||
233 | } | ||
234 | |||
235 | if ((long) s & 1) | ||
236 | { | ||
237 | char *cs = s; | ||
238 | *cs++ = c; | ||
239 | s = cs; | ||
240 | count--; | ||
241 | } | ||
242 | if (count > 2 && (long) s & 2) | ||
243 | { | ||
244 | short *ss = s; | ||
245 | *ss++ = c; | ||
246 | s = ss; | ||
247 | count -= 2; | ||
248 | } | ||
249 | temp = count >> 2; | ||
250 | if (temp) | ||
251 | { | ||
252 | long *ls = s; | ||
253 | temp--; | ||
254 | do | ||
255 | *ls++ = c; | ||
256 | while (temp--); | ||
257 | s = ls; | ||
258 | } | ||
259 | if (count & 2) | ||
260 | { | ||
261 | short *ss = s; | ||
262 | *ss++ = c; | ||
263 | s = ss; | ||
264 | } | ||
265 | if (count & 1) | ||
266 | { | ||
267 | char *cs = s; | ||
268 | *cs = c; | ||
269 | } | ||
270 | return xs; | ||
271 | } | ||
272 | |||
273 | /* | ||
274 | * __memset_page assumes that data is longword aligned. Most, if not | ||
275 | * all, of these page sized memsets are performed on page aligned | ||
276 | * areas, thus we do not need to check if the destination is longword | ||
277 | * aligned. Of course we suffer a serious performance loss if this is | ||
278 | * not the case but I think the risk of this ever happening is | ||
279 | * extremely small. We spend a lot of time clearing pages in | ||
280 | * get_empty_page() so I think it is worth it anyway. Besides, the | ||
281 | * 680[46]0 do not really care about misaligned writes due to their | ||
282 | * copy-back cache. | ||
283 | * | ||
284 | * The optimized case for the 680[46]0 is implemented using the move16 | ||
285 | * instruction. My tests showed that this implementation is 35-45% | ||
286 | * faster than the original implementation using movel, the only | ||
287 | * caveat is that the destination address must be 16-byte aligned. | ||
288 | * 01/09/96 - Jes Sorensen | ||
289 | */ | ||
290 | static inline void * __memset_page(void * s,int c,size_t count) | ||
291 | { | ||
292 | unsigned long data, tmp; | ||
293 | void *xs = s; | ||
294 | |||
295 | c = c & 255; | ||
296 | data = c | (c << 8); | ||
297 | data |= data << 16; | ||
298 | |||
299 | #ifdef CPU_M68040_OR_M68060_ONLY | ||
300 | |||
301 | if (((unsigned long) s) & 0x0f) | ||
302 | __memset_g(s, c, count); | ||
303 | else{ | ||
304 | unsigned long *sp = s; | ||
305 | *sp++ = data; | ||
306 | *sp++ = data; | ||
307 | *sp++ = data; | ||
308 | *sp++ = data; | ||
309 | |||
310 | __asm__ __volatile__("1:\t" | ||
311 | ".chip 68040\n\t" | ||
312 | "move16 %2@+,%0@+\n\t" | ||
313 | ".chip 68k\n\t" | ||
314 | "subqw #8,%2\n\t" | ||
315 | "subqw #8,%2\n\t" | ||
316 | "dbra %1,1b\n\t" | ||
317 | : "=a" (sp), "=d" (tmp) | ||
318 | : "a" (s), "0" (sp), "1" ((count - 16) / 16 - 1) | ||
319 | ); | ||
320 | } | ||
321 | |||
322 | #else | ||
323 | __asm__ __volatile__("1:\t" | ||
324 | "movel %2,%0@+\n\t" | ||
325 | "movel %2,%0@+\n\t" | ||
326 | "movel %2,%0@+\n\t" | ||
327 | "movel %2,%0@+\n\t" | ||
328 | "movel %2,%0@+\n\t" | ||
329 | "movel %2,%0@+\n\t" | ||
330 | "movel %2,%0@+\n\t" | ||
331 | "movel %2,%0@+\n\t" | ||
332 | "dbra %1,1b\n\t" | ||
333 | : "=a" (s), "=d" (tmp) | ||
334 | : "d" (data), "0" (s), "1" (count / 32 - 1) | ||
335 | ); | ||
336 | #endif | ||
337 | |||
338 | return xs; | ||
339 | } | ||
340 | |||
341 | extern void *memset(void *,int,__kernel_size_t); | ||
342 | |||
343 | #define __memset_const(s,c,count) \ | ||
344 | ((count==PAGE_SIZE) ? \ | ||
345 | __memset_page((s),(c),(count)) : \ | ||
346 | __memset_g((s),(c),(count))) | ||
347 | |||
348 | #define memset(s, c, count) \ | ||
349 | (__builtin_constant_p(count) ? \ | ||
350 | __memset_const((s),(c),(count)) : \ | ||
351 | __memset_g((s),(c),(count))) | ||
352 | 141 | ||
353 | #define __HAVE_ARCH_MEMCPY | 142 | #define __HAVE_ARCH_MEMCPY |
354 | extern void * memcpy(void *, const void *, size_t ); | 143 | extern void *memcpy(void *, const void *, __kernel_size_t); |
355 | /* | 144 | #define memcpy(d, s, n) __builtin_memcpy(d, s, n) |
356 | * __builtin_memcpy() does not handle page-sized memcpys very well, | ||
357 | * thus following the same assumptions as for page-sized memsets, this | ||
358 | * function copies page-sized areas using an unrolled loop, without | ||
359 | * considering alignment. | ||
360 | * | ||
361 | * For the 680[46]0 only kernels we use the move16 instruction instead | ||
362 | * as it writes through the data-cache, invalidating the cache-lines | ||
363 | * touched. In this way we do not use up the entire data-cache (well, | ||
364 | * half of it on the 68060) by copying a page. An unrolled loop of two | ||
365 | * move16 instructions seem to the fastest. The only caveat is that | ||
366 | * both source and destination must be 16-byte aligned, if not we fall | ||
367 | * back to the generic memcpy function. - Jes | ||
368 | */ | ||
369 | static inline void * __memcpy_page(void * to, const void * from, size_t count) | ||
370 | { | ||
371 | unsigned long tmp; | ||
372 | void *xto = to; | ||
373 | |||
374 | #ifdef CPU_M68040_OR_M68060_ONLY | ||
375 | |||
376 | if (((unsigned long) to | (unsigned long) from) & 0x0f) | ||
377 | return memcpy(to, from, count); | ||
378 | |||
379 | __asm__ __volatile__("1:\t" | ||
380 | ".chip 68040\n\t" | ||
381 | "move16 %1@+,%0@+\n\t" | ||
382 | "move16 %1@+,%0@+\n\t" | ||
383 | ".chip 68k\n\t" | ||
384 | "dbra %2,1b\n\t" | ||
385 | : "=a" (to), "=a" (from), "=d" (tmp) | ||
386 | : "0" (to), "1" (from) , "2" (count / 32 - 1) | ||
387 | ); | ||
388 | #else | ||
389 | __asm__ __volatile__("1:\t" | ||
390 | "movel %1@+,%0@+\n\t" | ||
391 | "movel %1@+,%0@+\n\t" | ||
392 | "movel %1@+,%0@+\n\t" | ||
393 | "movel %1@+,%0@+\n\t" | ||
394 | "movel %1@+,%0@+\n\t" | ||
395 | "movel %1@+,%0@+\n\t" | ||
396 | "movel %1@+,%0@+\n\t" | ||
397 | "movel %1@+,%0@+\n\t" | ||
398 | "dbra %2,1b\n\t" | ||
399 | : "=a" (to), "=a" (from), "=d" (tmp) | ||
400 | : "0" (to), "1" (from) , "2" (count / 32 - 1) | ||
401 | ); | ||
402 | #endif | ||
403 | return xto; | ||
404 | } | ||
405 | |||
406 | #define __memcpy_const(to, from, n) \ | ||
407 | ((n==PAGE_SIZE) ? \ | ||
408 | __memcpy_page((to),(from),(n)) : \ | ||
409 | __builtin_memcpy((to),(from),(n))) | ||
410 | |||
411 | #define memcpy(to, from, n) \ | ||
412 | (__builtin_constant_p(n) ? \ | ||
413 | __memcpy_const((to),(from),(n)) : \ | ||
414 | memcpy((to),(from),(n))) | ||
415 | 145 | ||
416 | #define __HAVE_ARCH_MEMMOVE | 146 | #define __HAVE_ARCH_MEMMOVE |
417 | static inline void * memmove(void * dest,const void * src, size_t n) | 147 | extern void *memmove(void *, const void *, __kernel_size_t); |
418 | { | ||
419 | void *xdest = dest; | ||
420 | size_t temp; | ||
421 | |||
422 | if (!n) | ||
423 | return xdest; | ||
424 | |||
425 | if (dest < src) | ||
426 | { | ||
427 | if ((long) dest & 1) | ||
428 | { | ||
429 | char *cdest = dest; | ||
430 | const char *csrc = src; | ||
431 | *cdest++ = *csrc++; | ||
432 | dest = cdest; | ||
433 | src = csrc; | ||
434 | n--; | ||
435 | } | ||
436 | if (n > 2 && (long) dest & 2) | ||
437 | { | ||
438 | short *sdest = dest; | ||
439 | const short *ssrc = src; | ||
440 | *sdest++ = *ssrc++; | ||
441 | dest = sdest; | ||
442 | src = ssrc; | ||
443 | n -= 2; | ||
444 | } | ||
445 | temp = n >> 2; | ||
446 | if (temp) | ||
447 | { | ||
448 | long *ldest = dest; | ||
449 | const long *lsrc = src; | ||
450 | temp--; | ||
451 | do | ||
452 | *ldest++ = *lsrc++; | ||
453 | while (temp--); | ||
454 | dest = ldest; | ||
455 | src = lsrc; | ||
456 | } | ||
457 | if (n & 2) | ||
458 | { | ||
459 | short *sdest = dest; | ||
460 | const short *ssrc = src; | ||
461 | *sdest++ = *ssrc++; | ||
462 | dest = sdest; | ||
463 | src = ssrc; | ||
464 | } | ||
465 | if (n & 1) | ||
466 | { | ||
467 | char *cdest = dest; | ||
468 | const char *csrc = src; | ||
469 | *cdest = *csrc; | ||
470 | } | ||
471 | } | ||
472 | else | ||
473 | { | ||
474 | dest = (char *) dest + n; | ||
475 | src = (const char *) src + n; | ||
476 | if ((long) dest & 1) | ||
477 | { | ||
478 | char *cdest = dest; | ||
479 | const char *csrc = src; | ||
480 | *--cdest = *--csrc; | ||
481 | dest = cdest; | ||
482 | src = csrc; | ||
483 | n--; | ||
484 | } | ||
485 | if (n > 2 && (long) dest & 2) | ||
486 | { | ||
487 | short *sdest = dest; | ||
488 | const short *ssrc = src; | ||
489 | *--sdest = *--ssrc; | ||
490 | dest = sdest; | ||
491 | src = ssrc; | ||
492 | n -= 2; | ||
493 | } | ||
494 | temp = n >> 2; | ||
495 | if (temp) | ||
496 | { | ||
497 | long *ldest = dest; | ||
498 | const long *lsrc = src; | ||
499 | temp--; | ||
500 | do | ||
501 | *--ldest = *--lsrc; | ||
502 | while (temp--); | ||
503 | dest = ldest; | ||
504 | src = lsrc; | ||
505 | } | ||
506 | if (n & 2) | ||
507 | { | ||
508 | short *sdest = dest; | ||
509 | const short *ssrc = src; | ||
510 | *--sdest = *--ssrc; | ||
511 | dest = sdest; | ||
512 | src = ssrc; | ||
513 | } | ||
514 | if (n & 1) | ||
515 | { | ||
516 | char *cdest = dest; | ||
517 | const char *csrc = src; | ||
518 | *--cdest = *--csrc; | ||
519 | } | ||
520 | } | ||
521 | return xdest; | ||
522 | } | ||
523 | 148 | ||
524 | #define __HAVE_ARCH_MEMCMP | 149 | #define __HAVE_ARCH_MEMCMP |
525 | extern int memcmp(const void * ,const void * ,size_t ); | 150 | extern int memcmp(const void *, const void *, __kernel_size_t); |
526 | #define memcmp(cs, ct, n) \ | 151 | #define memcmp(d, s, n) __builtin_memcmp(d, s, n) |
527 | (__builtin_constant_p(n) ? \ | ||
528 | __builtin_memcmp((cs),(ct),(n)) : \ | ||
529 | memcmp((cs),(ct),(n))) | ||
530 | |||
531 | #define __HAVE_ARCH_MEMCHR | ||
532 | static inline void *memchr(const void *cs, int c, size_t count) | ||
533 | { | ||
534 | /* Someone else can optimize this, I don't care - tonym@mac.linux-m68k.org */ | ||
535 | unsigned char *ret = (unsigned char *)cs; | ||
536 | for(;count>0;count--,ret++) | ||
537 | if(*ret == c) return ret; | ||
538 | |||
539 | return NULL; | ||
540 | } | ||
541 | 152 | ||
542 | #endif /* _M68K_STRING_H_ */ | 153 | #endif /* _M68K_STRING_H_ */ |
diff --git a/include/asm-m68k/types.h b/include/asm-m68k/types.h index f391cbe39b96..b5a1febc97d4 100644 --- a/include/asm-m68k/types.h +++ b/include/asm-m68k/types.h | |||
@@ -60,8 +60,6 @@ typedef unsigned long long u64; | |||
60 | typedef u32 dma_addr_t; | 60 | typedef u32 dma_addr_t; |
61 | typedef u32 dma64_addr_t; | 61 | typedef u32 dma64_addr_t; |
62 | 62 | ||
63 | typedef unsigned short kmem_bufctl_t; | ||
64 | |||
65 | #endif /* __ASSEMBLY__ */ | 63 | #endif /* __ASSEMBLY__ */ |
66 | 64 | ||
67 | #endif /* __KERNEL__ */ | 65 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-m68knommu/page.h b/include/asm-m68knommu/page.h index ff6a9265ed1c..942dfbead27f 100644 --- a/include/asm-m68knommu/page.h +++ b/include/asm-m68knommu/page.h | |||
@@ -48,20 +48,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
48 | /* to align the pointer to the (next) page boundary */ | 48 | /* to align the pointer to the (next) page boundary */ |
49 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) | 49 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE-1)&PAGE_MASK) |
50 | 50 | ||
51 | /* Pure 2^n version of get_order */ | ||
52 | extern __inline__ int get_order(unsigned long size) | ||
53 | { | ||
54 | int order; | ||
55 | |||
56 | size = (size-1) >> (PAGE_SHIFT-1); | ||
57 | order = -1; | ||
58 | do { | ||
59 | size >>= 1; | ||
60 | order++; | ||
61 | } while (size); | ||
62 | return order; | ||
63 | } | ||
64 | |||
65 | extern unsigned long memory_start; | 51 | extern unsigned long memory_start; |
66 | extern unsigned long memory_end; | 52 | extern unsigned long memory_end; |
67 | 53 | ||
@@ -93,4 +79,6 @@ extern unsigned long memory_end; | |||
93 | 79 | ||
94 | #endif /* __KERNEL__ */ | 80 | #endif /* __KERNEL__ */ |
95 | 81 | ||
82 | #include <asm-generic/page.h> | ||
83 | |||
96 | #endif /* _M68KNOMMU_PAGE_H */ | 84 | #endif /* _M68KNOMMU_PAGE_H */ |
diff --git a/include/asm-mips/a.out.h b/include/asm-mips/a.out.h index e42b3093e903..2b3dc3bed4da 100644 --- a/include/asm-mips/a.out.h +++ b/include/asm-mips/a.out.h | |||
@@ -35,10 +35,10 @@ struct exec | |||
35 | 35 | ||
36 | #ifdef __KERNEL__ | 36 | #ifdef __KERNEL__ |
37 | 37 | ||
38 | #ifdef CONFIG_MIPS32 | 38 | #ifdef CONFIG_32BIT |
39 | #define STACK_TOP TASK_SIZE | 39 | #define STACK_TOP TASK_SIZE |
40 | #endif | 40 | #endif |
41 | #ifdef CONFIG_MIPS64 | 41 | #ifdef CONFIG_64BIT |
42 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) | 42 | #define STACK_TOP (current->thread.mflags & MF_32BIT_ADDR ? TASK_SIZE32 : TASK_SIZE) |
43 | #endif | 43 | #endif |
44 | 44 | ||
diff --git a/include/asm-mips/addrspace.h b/include/asm-mips/addrspace.h index 2caa8c427204..7dc2619f5006 100644 --- a/include/asm-mips/addrspace.h +++ b/include/asm-mips/addrspace.h | |||
@@ -48,7 +48,7 @@ | |||
48 | #define CPHYSADDR(a) ((_ACAST32_ (a)) & 0x1fffffff) | 48 | #define CPHYSADDR(a) ((_ACAST32_ (a)) & 0x1fffffff) |
49 | #define XPHYSADDR(a) ((_ACAST64_ (a)) & 0x000000ffffffffff) | 49 | #define XPHYSADDR(a) ((_ACAST64_ (a)) & 0x000000ffffffffff) |
50 | 50 | ||
51 | #ifdef CONFIG_MIPS64 | 51 | #ifdef CONFIG_64BIT |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * Memory segments (64bit kernel mode addresses) | 54 | * Memory segments (64bit kernel mode addresses) |
diff --git a/include/asm-mips/asmmacro.h b/include/asm-mips/asmmacro.h index 37a460aa0378..30b18ea6cb11 100644 --- a/include/asm-mips/asmmacro.h +++ b/include/asm-mips/asmmacro.h | |||
@@ -7,14 +7,14 @@ | |||
7 | */ | 7 | */ |
8 | #ifndef _ASM_ASMMACRO_H | 8 | #ifndef _ASM_ASMMACRO_H |
9 | #define _ASM_ASMMACRO_H | 9 | #define _ASM_ASMMACRO_H |
10 | 10 | ||
11 | #include <linux/config.h> | 11 | #include <linux/config.h> |
12 | #include <asm/hazards.h> | 12 | #include <asm/hazards.h> |
13 | 13 | ||
14 | #ifdef CONFIG_MIPS32 | 14 | #ifdef CONFIG_32BIT |
15 | #include <asm/asmmacro-32.h> | 15 | #include <asm/asmmacro-32.h> |
16 | #endif | 16 | #endif |
17 | #ifdef CONFIG_MIPS64 | 17 | #ifdef CONFIG_64BIT |
18 | #include <asm/asmmacro-64.h> | 18 | #include <asm/asmmacro-64.h> |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/include/asm-mips/atomic.h b/include/asm-mips/atomic.h index 7d89e87bc8c6..c0bd8d014e14 100644 --- a/include/asm-mips/atomic.h +++ b/include/asm-mips/atomic.h | |||
@@ -334,7 +334,7 @@ static __inline__ int atomic_sub_if_positive(int i, atomic_t * v) | |||
334 | */ | 334 | */ |
335 | #define atomic_add_negative(i,v) (atomic_add_return(i, (v)) < 0) | 335 | #define atomic_add_negative(i,v) (atomic_add_return(i, (v)) < 0) |
336 | 336 | ||
337 | #ifdef CONFIG_MIPS64 | 337 | #ifdef CONFIG_64BIT |
338 | 338 | ||
339 | typedef struct { volatile __s64 counter; } atomic64_t; | 339 | typedef struct { volatile __s64 counter; } atomic64_t; |
340 | 340 | ||
@@ -639,7 +639,7 @@ static __inline__ long atomic64_sub_if_positive(long i, atomic64_t * v) | |||
639 | */ | 639 | */ |
640 | #define atomic64_add_negative(i,v) (atomic64_add_return(i, (v)) < 0) | 640 | #define atomic64_add_negative(i,v) (atomic64_add_return(i, (v)) < 0) |
641 | 641 | ||
642 | #endif /* CONFIG_MIPS64 */ | 642 | #endif /* CONFIG_64BIT */ |
643 | 643 | ||
644 | /* | 644 | /* |
645 | * atomic*_return operations are serializing but not the non-*_return | 645 | * atomic*_return operations are serializing but not the non-*_return |
diff --git a/include/asm-mips/bitops.h b/include/asm-mips/bitops.h index 779d2187a6a4..eb8d79dba11c 100644 --- a/include/asm-mips/bitops.h +++ b/include/asm-mips/bitops.h | |||
@@ -20,13 +20,13 @@ | |||
20 | #define SZLONG_MASK 31UL | 20 | #define SZLONG_MASK 31UL |
21 | #define __LL "ll " | 21 | #define __LL "ll " |
22 | #define __SC "sc " | 22 | #define __SC "sc " |
23 | #define cpu_to_lelongp(x) cpu_to_le32p((__u32 *) (x)) | 23 | #define cpu_to_lelongp(x) cpu_to_le32p((__u32 *) (x)) |
24 | #elif (_MIPS_SZLONG == 64) | 24 | #elif (_MIPS_SZLONG == 64) |
25 | #define SZLONG_LOG 6 | 25 | #define SZLONG_LOG 6 |
26 | #define SZLONG_MASK 63UL | 26 | #define SZLONG_MASK 63UL |
27 | #define __LL "lld " | 27 | #define __LL "lld " |
28 | #define __SC "scd " | 28 | #define __SC "scd " |
29 | #define cpu_to_lelongp(x) cpu_to_le64p((__u64 *) (x)) | 29 | #define cpu_to_lelongp(x) cpu_to_le64p((__u64 *) (x)) |
30 | #endif | 30 | #endif |
31 | 31 | ||
32 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
@@ -533,14 +533,14 @@ static inline unsigned long ffz(unsigned long word) | |||
533 | int b = 0, s; | 533 | int b = 0, s; |
534 | 534 | ||
535 | word = ~word; | 535 | word = ~word; |
536 | #ifdef CONFIG_MIPS32 | 536 | #ifdef CONFIG_32BIT |
537 | s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s; | 537 | s = 16; if (word << 16 != 0) s = 0; b += s; word >>= s; |
538 | s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s; | 538 | s = 8; if (word << 24 != 0) s = 0; b += s; word >>= s; |
539 | s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s; | 539 | s = 4; if (word << 28 != 0) s = 0; b += s; word >>= s; |
540 | s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s; | 540 | s = 2; if (word << 30 != 0) s = 0; b += s; word >>= s; |
541 | s = 1; if (word << 31 != 0) s = 0; b += s; | 541 | s = 1; if (word << 31 != 0) s = 0; b += s; |
542 | #endif | 542 | #endif |
543 | #ifdef CONFIG_MIPS64 | 543 | #ifdef CONFIG_64BIT |
544 | s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s; | 544 | s = 32; if (word << 32 != 0) s = 0; b += s; word >>= s; |
545 | s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s; | 545 | s = 16; if (word << 48 != 0) s = 0; b += s; word >>= s; |
546 | s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s; | 546 | s = 8; if (word << 56 != 0) s = 0; b += s; word >>= s; |
@@ -683,7 +683,7 @@ found_middle: | |||
683 | */ | 683 | */ |
684 | static inline int sched_find_first_bit(const unsigned long *b) | 684 | static inline int sched_find_first_bit(const unsigned long *b) |
685 | { | 685 | { |
686 | #ifdef CONFIG_MIPS32 | 686 | #ifdef CONFIG_32BIT |
687 | if (unlikely(b[0])) | 687 | if (unlikely(b[0])) |
688 | return __ffs(b[0]); | 688 | return __ffs(b[0]); |
689 | if (unlikely(b[1])) | 689 | if (unlikely(b[1])) |
@@ -694,7 +694,7 @@ static inline int sched_find_first_bit(const unsigned long *b) | |||
694 | return __ffs(b[3]) + 96; | 694 | return __ffs(b[3]) + 96; |
695 | return __ffs(b[4]) + 128; | 695 | return __ffs(b[4]) + 128; |
696 | #endif | 696 | #endif |
697 | #ifdef CONFIG_MIPS64 | 697 | #ifdef CONFIG_64BIT |
698 | if (unlikely(b[0])) | 698 | if (unlikely(b[0])) |
699 | return __ffs(b[0]); | 699 | return __ffs(b[0]); |
700 | if (unlikely(b[1])) | 700 | if (unlikely(b[1])) |
diff --git a/include/asm-mips/bugs.h b/include/asm-mips/bugs.h index 18cced19cca4..b14b961c2100 100644 --- a/include/asm-mips/bugs.h +++ b/include/asm-mips/bugs.h | |||
@@ -15,7 +15,7 @@ extern void check_bugs64(void); | |||
15 | static inline void check_bugs(void) | 15 | static inline void check_bugs(void) |
16 | { | 16 | { |
17 | check_bugs32(); | 17 | check_bugs32(); |
18 | #ifdef CONFIG_MIPS64 | 18 | #ifdef CONFIG_64BIT |
19 | check_bugs64(); | 19 | check_bugs64(); |
20 | #endif | 20 | #endif |
21 | } | 21 | } |
diff --git a/include/asm-mips/checksum.h b/include/asm-mips/checksum.h index c25cc92b9950..c1ea5a8714f3 100644 --- a/include/asm-mips/checksum.h +++ b/include/asm-mips/checksum.h | |||
@@ -128,7 +128,7 @@ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr, | |||
128 | { | 128 | { |
129 | __asm__( | 129 | __asm__( |
130 | ".set\tnoat\t\t\t# csum_tcpudp_nofold\n\t" | 130 | ".set\tnoat\t\t\t# csum_tcpudp_nofold\n\t" |
131 | #ifdef CONFIG_MIPS32 | 131 | #ifdef CONFIG_32BIT |
132 | "addu\t%0, %2\n\t" | 132 | "addu\t%0, %2\n\t" |
133 | "sltu\t$1, %0, %2\n\t" | 133 | "sltu\t$1, %0, %2\n\t" |
134 | "addu\t%0, $1\n\t" | 134 | "addu\t%0, $1\n\t" |
@@ -141,7 +141,7 @@ static inline unsigned int csum_tcpudp_nofold(unsigned long saddr, | |||
141 | "sltu\t$1, %0, %4\n\t" | 141 | "sltu\t$1, %0, %4\n\t" |
142 | "addu\t%0, $1\n\t" | 142 | "addu\t%0, $1\n\t" |
143 | #endif | 143 | #endif |
144 | #ifdef CONFIG_MIPS64 | 144 | #ifdef CONFIG_64BIT |
145 | "daddu\t%0, %2\n\t" | 145 | "daddu\t%0, %2\n\t" |
146 | "daddu\t%0, %3\n\t" | 146 | "daddu\t%0, %3\n\t" |
147 | "daddu\t%0, %4\n\t" | 147 | "daddu\t%0, %4\n\t" |
diff --git a/include/asm-mips/cpu-features.h b/include/asm-mips/cpu-features.h index 1df2c299de82..9a2de642eee6 100644 --- a/include/asm-mips/cpu-features.h +++ b/include/asm-mips/cpu-features.h | |||
@@ -106,7 +106,7 @@ | |||
106 | #define PLAT_TRAMPOLINE_STUFF_LINE 0UL | 106 | #define PLAT_TRAMPOLINE_STUFF_LINE 0UL |
107 | #endif | 107 | #endif |
108 | 108 | ||
109 | #ifdef CONFIG_MIPS32 | 109 | #ifdef CONFIG_32BIT |
110 | # ifndef cpu_has_nofpuex | 110 | # ifndef cpu_has_nofpuex |
111 | # define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX) | 111 | # define cpu_has_nofpuex (cpu_data[0].options & MIPS_CPU_NOFPUEX) |
112 | # endif | 112 | # endif |
@@ -124,7 +124,7 @@ | |||
124 | # endif | 124 | # endif |
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | #ifdef CONFIG_MIPS64 | 127 | #ifdef CONFIG_64BIT |
128 | # ifndef cpu_has_nofpuex | 128 | # ifndef cpu_has_nofpuex |
129 | # define cpu_has_nofpuex 0 | 129 | # define cpu_has_nofpuex 0 |
130 | # endif | 130 | # endif |
diff --git a/include/asm-mips/ddb5xxx/ddb5477.h b/include/asm-mips/ddb5xxx/ddb5477.h index ae3e2a38fd5f..a438548e6ef3 100644 --- a/include/asm-mips/ddb5xxx/ddb5477.h +++ b/include/asm-mips/ddb5xxx/ddb5477.h | |||
@@ -247,7 +247,7 @@ extern void ll_vrc5477_irq_disable(int vrc5477_irq); | |||
247 | * All PCI irq but INTC are active low. | 247 | * All PCI irq but INTC are active low. |
248 | */ | 248 | */ |
249 | 249 | ||
250 | /* | 250 | /* |
251 | * irq number block assignment | 251 | * irq number block assignment |
252 | */ | 252 | */ |
253 | 253 | ||
@@ -285,7 +285,7 @@ extern void ll_vrc5477_irq_disable(int vrc5477_irq); | |||
285 | #define VRC5477_IRQ_IOPCI_INTB (17 + VRC5477_IRQ_BASE) /* USB-P */ | 285 | #define VRC5477_IRQ_IOPCI_INTB (17 + VRC5477_IRQ_BASE) /* USB-P */ |
286 | #define VRC5477_IRQ_IOPCI_INTC (18 + VRC5477_IRQ_BASE) /* AC97 */ | 286 | #define VRC5477_IRQ_IOPCI_INTC (18 + VRC5477_IRQ_BASE) /* AC97 */ |
287 | #define VRC5477_IRQ_IOPCI_INTD (19 + VRC5477_IRQ_BASE) /* Reserved */ | 287 | #define VRC5477_IRQ_IOPCI_INTD (19 + VRC5477_IRQ_BASE) /* Reserved */ |
288 | #define VRC5477_IRQ_UART1 (20 + VRC5477_IRQ_BASE) | 288 | #define VRC5477_IRQ_UART1 (20 + VRC5477_IRQ_BASE) |
289 | #define VRC5477_IRQ_SPT0 (21 + VRC5477_IRQ_BASE) /* special purpose timer 0 */ | 289 | #define VRC5477_IRQ_SPT0 (21 + VRC5477_IRQ_BASE) /* special purpose timer 0 */ |
290 | #define VRC5477_IRQ_GPT0 (22 + VRC5477_IRQ_BASE) /* general purpose timer 0 */ | 290 | #define VRC5477_IRQ_GPT0 (22 + VRC5477_IRQ_BASE) /* general purpose timer 0 */ |
291 | #define VRC5477_IRQ_GPT1 (23 + VRC5477_IRQ_BASE) /* general purpose timer 1 */ | 291 | #define VRC5477_IRQ_GPT1 (23 + VRC5477_IRQ_BASE) /* general purpose timer 1 */ |
@@ -301,7 +301,7 @@ extern void ll_vrc5477_irq_disable(int vrc5477_irq); | |||
301 | /* | 301 | /* |
302 | * i2859 irq assignment | 302 | * i2859 irq assignment |
303 | */ | 303 | */ |
304 | #define I8259_IRQ_RESERVED_0 (0 + I8259_IRQ_BASE) | 304 | #define I8259_IRQ_RESERVED_0 (0 + I8259_IRQ_BASE) |
305 | #define I8259_IRQ_KEYBOARD (1 + I8259_IRQ_BASE) /* M1543 default */ | 305 | #define I8259_IRQ_KEYBOARD (1 + I8259_IRQ_BASE) /* M1543 default */ |
306 | #define I8259_IRQ_CASCADE (2 + I8259_IRQ_BASE) | 306 | #define I8259_IRQ_CASCADE (2 + I8259_IRQ_BASE) |
307 | #define I8259_IRQ_UART_B (3 + I8259_IRQ_BASE) /* M1543 default, may conflict with RTC according to schematic diagram */ | 307 | #define I8259_IRQ_UART_B (3 + I8259_IRQ_BASE) /* M1543 default, may conflict with RTC according to schematic diagram */ |
diff --git a/include/asm-mips/dec/prom.h b/include/asm-mips/dec/prom.h index b63e2f2317d1..a05d6d3395fe 100644 --- a/include/asm-mips/dec/prom.h +++ b/include/asm-mips/dec/prom.h | |||
@@ -48,15 +48,15 @@ | |||
48 | */ | 48 | */ |
49 | #define REX_PROM_MAGIC 0x30464354 | 49 | #define REX_PROM_MAGIC 0x30464354 |
50 | 50 | ||
51 | #ifdef CONFIG_MIPS64 | 51 | #ifdef CONFIG_64BIT |
52 | 52 | ||
53 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ | 53 | #define prom_is_rex(magic) 1 /* KN04 and KN05 are REX PROMs. */ |
54 | 54 | ||
55 | #else /* !CONFIG_MIPS64 */ | 55 | #else /* !CONFIG_64BIT */ |
56 | 56 | ||
57 | #define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC) | 57 | #define prom_is_rex(magic) ((magic) == REX_PROM_MAGIC) |
58 | 58 | ||
59 | #endif /* !CONFIG_MIPS64 */ | 59 | #endif /* !CONFIG_64BIT */ |
60 | 60 | ||
61 | 61 | ||
62 | /* | 62 | /* |
@@ -105,7 +105,7 @@ extern int (*__pmax_read)(int, void *, int); | |||
105 | extern int (*__pmax_close)(int); | 105 | extern int (*__pmax_close)(int); |
106 | 106 | ||
107 | 107 | ||
108 | #ifdef CONFIG_MIPS64 | 108 | #ifdef CONFIG_64BIT |
109 | 109 | ||
110 | /* | 110 | /* |
111 | * On MIPS64 we have to call PROM functions via a helper | 111 | * On MIPS64 we have to call PROM functions via a helper |
@@ -138,7 +138,7 @@ int _prom_printf(int (*)(char *, ...), char *, ...) __DEC_PROM_O32; | |||
138 | #define prom_getenv(x) _prom_getenv(__prom_getenv, x) | 138 | #define prom_getenv(x) _prom_getenv(__prom_getenv, x) |
139 | #define prom_printf(x...) _prom_printf(__prom_printf, x) | 139 | #define prom_printf(x...) _prom_printf(__prom_printf, x) |
140 | 140 | ||
141 | #else /* !CONFIG_MIPS64 */ | 141 | #else /* !CONFIG_64BIT */ |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * On plain MIPS we just call PROM functions directly. | 144 | * On plain MIPS we just call PROM functions directly. |
@@ -160,7 +160,7 @@ int _prom_printf(int (*)(char *, ...), char *, ...) __DEC_PROM_O32; | |||
160 | #define pmax_read __pmax_read | 160 | #define pmax_read __pmax_read |
161 | #define pmax_close __pmax_close | 161 | #define pmax_close __pmax_close |
162 | 162 | ||
163 | #endif /* !CONFIG_MIPS64 */ | 163 | #endif /* !CONFIG_64BIT */ |
164 | 164 | ||
165 | 165 | ||
166 | extern void prom_meminit(u32); | 166 | extern void prom_meminit(u32); |
diff --git a/include/asm-mips/delay.h b/include/asm-mips/delay.h index d0f68447e5a7..a606dbee0412 100644 --- a/include/asm-mips/delay.h +++ b/include/asm-mips/delay.h | |||
@@ -57,11 +57,11 @@ static inline void __udelay(unsigned long usecs, unsigned long lpj) | |||
57 | * The common rates of 1000 and 128 are rounded wrongly by the | 57 | * The common rates of 1000 and 128 are rounded wrongly by the |
58 | * catchall case for 64-bit. Excessive precission? Probably ... | 58 | * catchall case for 64-bit. Excessive precission? Probably ... |
59 | */ | 59 | */ |
60 | #if defined(CONFIG_MIPS64) && (HZ == 128) | 60 | #if defined(CONFIG_64BIT) && (HZ == 128) |
61 | usecs *= 0x0008637bd05af6c7UL; /* 2**64 / (1000000 / HZ) */ | 61 | usecs *= 0x0008637bd05af6c7UL; /* 2**64 / (1000000 / HZ) */ |
62 | #elif defined(CONFIG_MIPS64) && (HZ == 1000) | 62 | #elif defined(CONFIG_64BIT) && (HZ == 1000) |
63 | usecs *= 0x004189374BC6A7f0UL; /* 2**64 / (1000000 / HZ) */ | 63 | usecs *= 0x004189374BC6A7f0UL; /* 2**64 / (1000000 / HZ) */ |
64 | #elif defined(CONFIG_MIPS64) | 64 | #elif defined(CONFIG_64BIT) |
65 | usecs *= (0x8000000000000000UL / (500000 / HZ)); | 65 | usecs *= (0x8000000000000000UL / (500000 / HZ)); |
66 | #else /* 32-bit junk follows here */ | 66 | #else /* 32-bit junk follows here */ |
67 | usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) + | 67 | usecs *= (unsigned long) (((0x8000000000000000ULL / (500000 / HZ)) + |
diff --git a/include/asm-mips/elf.h b/include/asm-mips/elf.h index 7b92c8045cc2..e48811440015 100644 --- a/include/asm-mips/elf.h +++ b/include/asm-mips/elf.h | |||
@@ -125,7 +125,7 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG]; | |||
125 | typedef double elf_fpreg_t; | 125 | typedef double elf_fpreg_t; |
126 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | 126 | typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; |
127 | 127 | ||
128 | #ifdef CONFIG_MIPS32 | 128 | #ifdef CONFIG_32BIT |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * This is used to ensure we don't load something for the wrong architecture. | 131 | * This is used to ensure we don't load something for the wrong architecture. |
@@ -153,9 +153,9 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
153 | */ | 153 | */ |
154 | #define ELF_CLASS ELFCLASS32 | 154 | #define ELF_CLASS ELFCLASS32 |
155 | 155 | ||
156 | #endif /* CONFIG_MIPS32 */ | 156 | #endif /* CONFIG_32BIT */ |
157 | 157 | ||
158 | #ifdef CONFIG_MIPS64 | 158 | #ifdef CONFIG_64BIT |
159 | /* | 159 | /* |
160 | * This is used to ensure we don't load something for the wrong architecture. | 160 | * This is used to ensure we don't load something for the wrong architecture. |
161 | */ | 161 | */ |
@@ -177,7 +177,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
177 | */ | 177 | */ |
178 | #define ELF_CLASS ELFCLASS64 | 178 | #define ELF_CLASS ELFCLASS64 |
179 | 179 | ||
180 | #endif /* CONFIG_MIPS64 */ | 180 | #endif /* CONFIG_64BIT */ |
181 | 181 | ||
182 | /* | 182 | /* |
183 | * These are used to set parameters in the core dumps. | 183 | * These are used to set parameters in the core dumps. |
@@ -193,7 +193,7 @@ typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG]; | |||
193 | 193 | ||
194 | #ifdef __KERNEL__ | 194 | #ifdef __KERNEL__ |
195 | 195 | ||
196 | #ifdef CONFIG_MIPS32 | 196 | #ifdef CONFIG_32BIT |
197 | 197 | ||
198 | #define SET_PERSONALITY(ex, ibcs2) \ | 198 | #define SET_PERSONALITY(ex, ibcs2) \ |
199 | do { \ | 199 | do { \ |
@@ -202,9 +202,9 @@ do { \ | |||
202 | set_personality(PER_LINUX); \ | 202 | set_personality(PER_LINUX); \ |
203 | } while (0) | 203 | } while (0) |
204 | 204 | ||
205 | #endif /* CONFIG_MIPS32 */ | 205 | #endif /* CONFIG_32BIT */ |
206 | 206 | ||
207 | #ifdef CONFIG_MIPS64 | 207 | #ifdef CONFIG_64BIT |
208 | 208 | ||
209 | #define SET_PERSONALITY(ex, ibcs2) \ | 209 | #define SET_PERSONALITY(ex, ibcs2) \ |
210 | do { current->thread.mflags &= ~MF_ABI_MASK; \ | 210 | do { current->thread.mflags &= ~MF_ABI_MASK; \ |
@@ -222,7 +222,7 @@ do { current->thread.mflags &= ~MF_ABI_MASK; \ | |||
222 | set_personality(PER_LINUX); \ | 222 | set_personality(PER_LINUX); \ |
223 | } while (0) | 223 | } while (0) |
224 | 224 | ||
225 | #endif /* CONFIG_MIPS64 */ | 225 | #endif /* CONFIG_64BIT */ |
226 | 226 | ||
227 | extern void dump_regs(elf_greg_t *, struct pt_regs *regs); | 227 | extern void dump_regs(elf_greg_t *, struct pt_regs *regs); |
228 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); | 228 | extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); |
diff --git a/include/asm-mips/fpregdef.h b/include/asm-mips/fpregdef.h index 1d9aa0979181..2b5fddc8f487 100644 --- a/include/asm-mips/fpregdef.h +++ b/include/asm-mips/fpregdef.h | |||
@@ -13,7 +13,7 @@ | |||
13 | #define _ASM_FPREGDEF_H | 13 | #define _ASM_FPREGDEF_H |
14 | 14 | ||
15 | #include <asm/sgidefs.h> | 15 | #include <asm/sgidefs.h> |
16 | 16 | ||
17 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | 17 | #if _MIPS_SIM == _MIPS_SIM_ABI32 |
18 | 18 | ||
19 | /* | 19 | /* |
@@ -56,7 +56,7 @@ | |||
56 | #define fcr31 $31 /* FPU status register */ | 56 | #define fcr31 $31 /* FPU status register */ |
57 | 57 | ||
58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 58 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
59 | 59 | ||
60 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 | 60 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 |
61 | 61 | ||
62 | #define fv0 $f0 /* return value */ | 62 | #define fv0 $f0 /* return value */ |
diff --git a/include/asm-mips/fpu.h b/include/asm-mips/fpu.h index 6cb38d5c0407..ea24e733b1bc 100644 --- a/include/asm-mips/fpu.h +++ b/include/asm-mips/fpu.h | |||
@@ -82,7 +82,7 @@ do { \ | |||
82 | 82 | ||
83 | static inline int is_fpu_owner(void) | 83 | static inline int is_fpu_owner(void) |
84 | { | 84 | { |
85 | return cpu_has_fpu && test_thread_flag(TIF_USEDFPU); | 85 | return cpu_has_fpu && test_thread_flag(TIF_USEDFPU); |
86 | } | 86 | } |
87 | 87 | ||
88 | static inline void own_fpu(void) | 88 | static inline void own_fpu(void) |
@@ -90,7 +90,7 @@ static inline void own_fpu(void) | |||
90 | if (cpu_has_fpu) { | 90 | if (cpu_has_fpu) { |
91 | __enable_fpu(); | 91 | __enable_fpu(); |
92 | KSTK_STATUS(current) |= ST0_CU1; | 92 | KSTK_STATUS(current) |= ST0_CU1; |
93 | set_thread_flag(TIF_USEDFPU); | 93 | set_thread_flag(TIF_USEDFPU); |
94 | } | 94 | } |
95 | } | 95 | } |
96 | 96 | ||
@@ -98,7 +98,7 @@ static inline void lose_fpu(void) | |||
98 | { | 98 | { |
99 | if (cpu_has_fpu) { | 99 | if (cpu_has_fpu) { |
100 | KSTK_STATUS(current) &= ~ST0_CU1; | 100 | KSTK_STATUS(current) &= ~ST0_CU1; |
101 | clear_thread_flag(TIF_USEDFPU); | 101 | clear_thread_flag(TIF_USEDFPU); |
102 | __disable_fpu(); | 102 | __disable_fpu(); |
103 | } | 103 | } |
104 | } | 104 | } |
@@ -127,7 +127,7 @@ static inline void restore_fp(struct task_struct *tsk) | |||
127 | static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) | 127 | static inline fpureg_t *get_fpu_regs(struct task_struct *tsk) |
128 | { | 128 | { |
129 | if (cpu_has_fpu) { | 129 | if (cpu_has_fpu) { |
130 | if ((tsk == current) && is_fpu_owner()) | 130 | if ((tsk == current) && is_fpu_owner()) |
131 | _save_fp(current); | 131 | _save_fp(current); |
132 | return tsk->thread.fpu.hard.fpr; | 132 | return tsk->thread.fpu.hard.fpr; |
133 | } | 133 | } |
diff --git a/include/asm-mips/hp-lj/asic.h b/include/asm-mips/hp-lj/asic.h deleted file mode 100644 index fc2ca656da00..000000000000 --- a/include/asm-mips/hp-lj/asic.h +++ /dev/null | |||
@@ -1,7 +0,0 @@ | |||
1 | |||
2 | typedef enum { IllegalAsic, UnknownAsic, AndrosAsic, HarmonyAsic } AsicId; | ||
3 | |||
4 | AsicId GetAsicId(void); | ||
5 | |||
6 | const char* const GetAsicName(void); | ||
7 | |||
diff --git a/include/asm-mips/ip32/mace.h b/include/asm-mips/ip32/mace.h index 2b7b0fdeac19..432011b16c26 100644 --- a/include/asm-mips/ip32/mace.h +++ b/include/asm-mips/ip32/mace.h | |||
@@ -94,7 +94,7 @@ struct mace_video { | |||
94 | unsigned long xxx; /* later... */ | 94 | unsigned long xxx; /* later... */ |
95 | }; | 95 | }; |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * Ethernet interface | 98 | * Ethernet interface |
99 | */ | 99 | */ |
100 | struct mace_ethernet { | 100 | struct mace_ethernet { |
@@ -129,7 +129,7 @@ struct mace_ethernet { | |||
129 | volatile unsigned long rx_fifo; | 129 | volatile unsigned long rx_fifo; |
130 | }; | 130 | }; |
131 | 131 | ||
132 | /* | 132 | /* |
133 | * Peripherals | 133 | * Peripherals |
134 | */ | 134 | */ |
135 | 135 | ||
@@ -251,7 +251,7 @@ struct mace_timers { | |||
251 | timer_reg audio_out2; | 251 | timer_reg audio_out2; |
252 | timer_reg video_in1; | 252 | timer_reg video_in1; |
253 | timer_reg video_in2; | 253 | timer_reg video_in2; |
254 | timer_reg video_out; | 254 | timer_reg video_out; |
255 | }; | 255 | }; |
256 | 256 | ||
257 | struct mace_perif { | 257 | struct mace_perif { |
@@ -272,7 +272,7 @@ struct mace_perif { | |||
272 | }; | 272 | }; |
273 | 273 | ||
274 | 274 | ||
275 | /* | 275 | /* |
276 | * ISA peripherals | 276 | * ISA peripherals |
277 | */ | 277 | */ |
278 | 278 | ||
diff --git a/include/asm-mips/lasat/serial.h b/include/asm-mips/lasat/serial.h index 21d0fb7cee64..9e88c7669c7a 100644 --- a/include/asm-mips/lasat/serial.h +++ b/include/asm-mips/lasat/serial.h | |||
@@ -1,13 +1,13 @@ | |||
1 | #include <asm/lasat/lasat.h> | 1 | #include <asm/lasat/lasat.h> |
2 | 2 | ||
3 | /* Lasat 100 boards serial configuration */ | 3 | /* Lasat 100 boards serial configuration */ |
4 | #define LASAT_BASE_BAUD_100 ( 7372800 / 16 ) | 4 | #define LASAT_BASE_BAUD_100 ( 7372800 / 16 ) |
5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 | 5 | #define LASAT_UART_REGS_BASE_100 0x1c8b0000 |
6 | #define LASAT_UART_REGS_SHIFT_100 2 | 6 | #define LASAT_UART_REGS_SHIFT_100 2 |
7 | #define LASATINT_UART_100 8 | 7 | #define LASATINT_UART_100 8 |
8 | 8 | ||
9 | /* * LASAT 200 boards serial configuration */ | 9 | /* * LASAT 200 boards serial configuration */ |
10 | #define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) | 10 | #define LASAT_BASE_BAUD_200 (100000000 / 16 / 12) |
11 | #define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) | 11 | #define LASAT_UART_REGS_BASE_200 (Vrc5074_PHYS_BASE + 0x0300) |
12 | #define LASAT_UART_REGS_SHIFT_200 3 | 12 | #define LASAT_UART_REGS_SHIFT_200 3 |
13 | #define LASATINT_UART_200 13 | 13 | #define LASATINT_UART_200 13 |
diff --git a/include/asm-mips/local.h b/include/asm-mips/local.h index 7eb6bf661b80..c38844f615fc 100644 --- a/include/asm-mips/local.h +++ b/include/asm-mips/local.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/percpu.h> | 5 | #include <linux/percpu.h> |
6 | #include <asm/atomic.h> | 6 | #include <asm/atomic.h> |
7 | 7 | ||
8 | #ifdef CONFIG_MIPS32 | 8 | #ifdef CONFIG_32BIT |
9 | 9 | ||
10 | typedef atomic_t local_t; | 10 | typedef atomic_t local_t; |
11 | 11 | ||
@@ -20,7 +20,7 @@ typedef atomic_t local_t; | |||
20 | 20 | ||
21 | #endif | 21 | #endif |
22 | 22 | ||
23 | #ifdef CONFIG_MIPS64 | 23 | #ifdef CONFIG_64BIT |
24 | 24 | ||
25 | typedef atomic64_t local_t; | 25 | typedef atomic64_t local_t; |
26 | 26 | ||
diff --git a/include/asm-mips/mach-au1x00/au1000.h b/include/asm-mips/mach-au1x00/au1000.h index 2b36ea346910..148bae2fa7d3 100644 --- a/include/asm-mips/mach-au1x00/au1000.h +++ b/include/asm-mips/mach-au1x00/au1000.h | |||
@@ -1383,7 +1383,7 @@ extern au1xxx_irq_map_t au1xxx_irq_map[]; | |||
1383 | #define PCI_IO_START 0 | 1383 | #define PCI_IO_START 0 |
1384 | #define PCI_IO_END 0 | 1384 | #define PCI_IO_END 0 |
1385 | #define PCI_MEM_START 0 | 1385 | #define PCI_MEM_START 0 |
1386 | #define PCI_MEM_END 0 | 1386 | #define PCI_MEM_END 0 |
1387 | #define PCI_FIRST_DEVFN 0 | 1387 | #define PCI_FIRST_DEVFN 0 |
1388 | #define PCI_LAST_DEVFN 0 | 1388 | #define PCI_LAST_DEVFN 0 |
1389 | #endif | 1389 | #endif |
diff --git a/include/asm-mips/mach-db1x00/db1x00.h b/include/asm-mips/mach-db1x00/db1x00.h index 4691398a414f..efafe65258b6 100644 --- a/include/asm-mips/mach-db1x00/db1x00.h +++ b/include/asm-mips/mach-db1x00/db1x00.h | |||
@@ -23,7 +23,7 @@ | |||
23 | * | 23 | * |
24 | * ######################################################################## | 24 | * ######################################################################## |
25 | * | 25 | * |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | #ifndef __ASM_DB1X00_H | 28 | #ifndef __ASM_DB1X00_H |
29 | #define __ASM_DB1X00_H | 29 | #define __ASM_DB1X00_H |
diff --git a/include/asm-mips/mach-generic/spaces.h b/include/asm-mips/mach-generic/spaces.h index 63c0a81c7832..5a2c1efb4eb7 100644 --- a/include/asm-mips/mach-generic/spaces.h +++ b/include/asm-mips/mach-generic/spaces.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | 14 | ||
15 | #ifdef CONFIG_MIPS32 | 15 | #ifdef CONFIG_32BIT |
16 | 16 | ||
17 | #define CAC_BASE 0x80000000 | 17 | #define CAC_BASE 0x80000000 |
18 | #define IO_BASE 0xa0000000 | 18 | #define IO_BASE 0xa0000000 |
@@ -32,9 +32,9 @@ | |||
32 | #define HIGHMEM_START 0x20000000UL | 32 | #define HIGHMEM_START 0x20000000UL |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #endif /* CONFIG_MIPS32 */ | 35 | #endif /* CONFIG_32BIT */ |
36 | 36 | ||
37 | #ifdef CONFIG_MIPS64 | 37 | #ifdef CONFIG_64BIT |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * This handles the memory map. | 40 | * This handles the memory map. |
@@ -67,6 +67,6 @@ | |||
67 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | 67 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
68 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | 68 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) |
69 | 69 | ||
70 | #endif /* CONFIG_MIPS64 */ | 70 | #endif /* CONFIG_64BIT */ |
71 | 71 | ||
72 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ | 72 | #endif /* __ASM_MACH_GENERIC_SPACES_H */ |
diff --git a/include/asm-mips/mach-ip22/spaces.h b/include/asm-mips/mach-ip22/spaces.h index 30d42fcafe3d..e96166f27c49 100644 --- a/include/asm-mips/mach-ip22/spaces.h +++ b/include/asm-mips/mach-ip22/spaces.h | |||
@@ -12,7 +12,7 @@ | |||
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | 14 | ||
15 | #ifdef CONFIG_MIPS32 | 15 | #ifdef CONFIG_32BIT |
16 | 16 | ||
17 | #define CAC_BASE 0x80000000 | 17 | #define CAC_BASE 0x80000000 |
18 | #define IO_BASE 0xa0000000 | 18 | #define IO_BASE 0xa0000000 |
@@ -32,9 +32,9 @@ | |||
32 | #define HIGHMEM_START 0x20000000UL | 32 | #define HIGHMEM_START 0x20000000UL |
33 | #endif | 33 | #endif |
34 | 34 | ||
35 | #endif /* CONFIG_MIPS32 */ | 35 | #endif /* CONFIG_32BIT */ |
36 | 36 | ||
37 | #ifdef CONFIG_MIPS64 | 37 | #ifdef CONFIG_64BIT |
38 | #define PAGE_OFFSET 0xffffffff80000000UL | 38 | #define PAGE_OFFSET 0xffffffff80000000UL |
39 | 39 | ||
40 | #ifndef HIGHMEM_START | 40 | #ifndef HIGHMEM_START |
@@ -50,6 +50,6 @@ | |||
50 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) | 50 | #define TO_CAC(x) (CAC_BASE | ((x) & TO_PHYS_MASK)) |
51 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) | 51 | #define TO_UNCAC(x) (UNCAC_BASE | ((x) & TO_PHYS_MASK)) |
52 | 52 | ||
53 | #endif /* CONFIG_MIPS64 */ | 53 | #endif /* CONFIG_64BIT */ |
54 | 54 | ||
55 | #endif /* __ASM_MACH_IP22_SPACES_H */ | 55 | #endif /* __ASM_MACH_IP22_SPACES_H */ |
diff --git a/include/asm-mips/mach-ip32/cpu-feature-overrides.h b/include/asm-mips/mach-ip32/cpu-feature-overrides.h index b932237f2193..04713973c6c3 100644 --- a/include/asm-mips/mach-ip32/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip32/cpu-feature-overrides.h | |||
@@ -18,7 +18,7 @@ | |||
18 | * so, for 64bit IP32 kernel we just don't use ll/sc. | 18 | * so, for 64bit IP32 kernel we just don't use ll/sc. |
19 | * This does not affect luserland. | 19 | * This does not affect luserland. |
20 | */ | 20 | */ |
21 | #if defined(CONFIG_CPU_R5000) && defined(CONFIG_MIPS64) | 21 | #if defined(CONFIG_CPU_R5000) && defined(CONFIG_64BIT) |
22 | #define cpu_has_llsc 0 | 22 | #define cpu_has_llsc 0 |
23 | #else | 23 | #else |
24 | #define cpu_has_llsc 1 | 24 | #define cpu_has_llsc 1 |
diff --git a/include/asm-mips/mach-jazz/floppy.h b/include/asm-mips/mach-jazz/floppy.h index 8cf0d042c864..c9dad99b1232 100644 --- a/include/asm-mips/mach-jazz/floppy.h +++ b/include/asm-mips/mach-jazz/floppy.h | |||
@@ -92,7 +92,7 @@ static inline int fd_request_irq(void) | |||
92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, | 92 | return request_irq(FLOPPY_IRQ, floppy_interrupt, |
93 | SA_INTERRUPT | SA_SAMPLE_RANDOM, "floppy", NULL); | 93 | SA_INTERRUPT | SA_SAMPLE_RANDOM, "floppy", NULL); |
94 | } | 94 | } |
95 | 95 | ||
96 | static inline void fd_free_irq(void) | 96 | static inline void fd_free_irq(void) |
97 | { | 97 | { |
98 | free_irq(FLOPPY_IRQ, NULL); | 98 | free_irq(FLOPPY_IRQ, NULL); |
diff --git a/include/asm-mips/mach-pb1x00/pb1500.h b/include/asm-mips/mach-pb1x00/pb1500.h index d6c779747b3c..ff6d40c87a25 100644 --- a/include/asm-mips/mach-pb1x00/pb1500.h +++ b/include/asm-mips/mach-pb1x00/pb1500.h | |||
@@ -33,11 +33,11 @@ | |||
33 | #define PCI_BOARD_REG 0xAE000010 | 33 | #define PCI_BOARD_REG 0xAE000010 |
34 | #define PCMCIA_BOARD_REG 0xAE000010 | 34 | #define PCMCIA_BOARD_REG 0xAE000010 |
35 | #define PC_DEASSERT_RST 0x80 | 35 | #define PC_DEASSERT_RST 0x80 |
36 | #define PC_DRV_EN 0x10 | 36 | #define PC_DRV_EN 0x10 |
37 | #define PB1500_G_CONTROL 0xAE000014 | 37 | #define PB1500_G_CONTROL 0xAE000014 |
38 | #define PB1500_RST_VDDI 0xAE00001C | 38 | #define PB1500_RST_VDDI 0xAE00001C |
39 | #define PB1500_LEDS 0xAE000018 | 39 | #define PB1500_LEDS 0xAE000018 |
40 | 40 | ||
41 | #define PB1500_HEX_LED 0xAF000004 | 41 | #define PB1500_HEX_LED 0xAF000004 |
42 | #define PB1500_HEX_LED_BLANK 0xAF000008 | 42 | #define PB1500_HEX_LED_BLANK 0xAF000008 |
43 | 43 | ||
diff --git a/include/asm-mips/mach-qemu/cpu-feature-overrides.h b/include/asm-mips/mach-qemu/cpu-feature-overrides.h new file mode 100644 index 000000000000..f4e370e27168 --- /dev/null +++ b/include/asm-mips/mach-qemu/cpu-feature-overrides.h | |||
@@ -0,0 +1,31 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003 Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H | ||
9 | #define __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H | ||
10 | |||
11 | /* | ||
12 | * QEMU only comes with a hazard-free MIPS32 processor, so things are easy. | ||
13 | */ | ||
14 | #define cpu_has_mips16 0 | ||
15 | #define cpu_has_divec 0 | ||
16 | #define cpu_has_cache_cdex_p 0 | ||
17 | #define cpu_has_prefetch 0 | ||
18 | #define cpu_has_mcheck 0 | ||
19 | #define cpu_has_ejtag 0 | ||
20 | |||
21 | #define cpu_has_llsc 1 | ||
22 | #define cpu_has_vtag_icache 0 | ||
23 | #define cpu_has_dc_aliases (PAGE_SIZE < 0x4000) | ||
24 | #define cpu_has_ic_fills_f_dc 0 | ||
25 | |||
26 | #define cpu_has_dsp 0 | ||
27 | |||
28 | #define cpu_has_nofpuex 0 | ||
29 | #define cpu_has_64bits 0 | ||
30 | |||
31 | #endif /* __ASM_MACH_QEMU_CPU_FEATURE_OVERRIDES_H */ | ||
diff --git a/include/asm-mips/mach-qemu/param.h b/include/asm-mips/mach-qemu/param.h new file mode 100644 index 000000000000..cb30ee490ae6 --- /dev/null +++ b/include/asm-mips/mach-qemu/param.h | |||
@@ -0,0 +1,13 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2005 by Ralf Baechle | ||
7 | */ | ||
8 | #ifndef __ASM_MACH_QEMU_PARAM_H | ||
9 | #define __ASM_MACH_QEMU_PARAM_H | ||
10 | |||
11 | #define HZ 100 /* Internal kernel timer frequency */ | ||
12 | |||
13 | #endif /* __ASM_MACH_QEMU_PARAM_H */ | ||
diff --git a/include/asm-mips/mach-vr41xx/timex.h b/include/asm-mips/mach-vr41xx/timex.h deleted file mode 100644 index 8d71485d003a..000000000000 --- a/include/asm-mips/mach-vr41xx/timex.h +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2003 by Ralf Baechle | ||
7 | */ | ||
8 | /* | ||
9 | * Changes: | ||
10 | * Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | ||
11 | * - CLOCK_TICK_RATE is changed into 32768 from 6144000. | ||
12 | */ | ||
13 | #ifndef __ASM_MACH_VR41XX_TIMEX_H | ||
14 | #define __ASM_MACH_VR41XX_TIMEX_H | ||
15 | |||
16 | #define CLOCK_TICK_RATE 32768 | ||
17 | |||
18 | #endif /* __ASM_MACH_VR41XX_TIMEX_H */ | ||
diff --git a/include/asm-mips/mmu_context.h b/include/asm-mips/mmu_context.h index 48b77c9fb4f2..45cd72d172e8 100644 --- a/include/asm-mips/mmu_context.h +++ b/include/asm-mips/mmu_context.h | |||
@@ -28,17 +28,17 @@ extern unsigned long pgd_current[]; | |||
28 | #define TLBMISS_HANDLER_SETUP_PGD(pgd) \ | 28 | #define TLBMISS_HANDLER_SETUP_PGD(pgd) \ |
29 | pgd_current[smp_processor_id()] = (unsigned long)(pgd) | 29 | pgd_current[smp_processor_id()] = (unsigned long)(pgd) |
30 | 30 | ||
31 | #ifdef CONFIG_MIPS32 | 31 | #ifdef CONFIG_32BIT |
32 | #define TLBMISS_HANDLER_SETUP() \ | 32 | #define TLBMISS_HANDLER_SETUP() \ |
33 | write_c0_context((unsigned long) smp_processor_id() << 23); \ | 33 | write_c0_context((unsigned long) smp_processor_id() << 23); \ |
34 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 34 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
35 | #endif | 35 | #endif |
36 | #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) | 36 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
37 | #define TLBMISS_HANDLER_SETUP() \ | 37 | #define TLBMISS_HANDLER_SETUP() \ |
38 | write_c0_context((unsigned long) &pgd_current[smp_processor_id()] << 23); \ | 38 | write_c0_context((unsigned long) &pgd_current[smp_processor_id()] << 23); \ |
39 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 39 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
40 | #endif | 40 | #endif |
41 | #if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) | 41 | #if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) |
42 | #define TLBMISS_HANDLER_SETUP() \ | 42 | #define TLBMISS_HANDLER_SETUP() \ |
43 | write_c0_context((unsigned long) smp_processor_id() << 23); \ | 43 | write_c0_context((unsigned long) smp_processor_id() << 23); \ |
44 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) | 44 | TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir) |
diff --git a/include/asm-mips/module.h b/include/asm-mips/module.h index 90ee24aad955..0be58b2aeb9f 100644 --- a/include/asm-mips/module.h +++ b/include/asm-mips/module.h | |||
@@ -25,7 +25,7 @@ typedef struct | |||
25 | Elf64_Sxword r_addend; /* Addend. */ | 25 | Elf64_Sxword r_addend; /* Addend. */ |
26 | } Elf64_Mips_Rela; | 26 | } Elf64_Mips_Rela; |
27 | 27 | ||
28 | #ifdef CONFIG_MIPS32 | 28 | #ifdef CONFIG_32BIT |
29 | 29 | ||
30 | #define Elf_Shdr Elf32_Shdr | 30 | #define Elf_Shdr Elf32_Shdr |
31 | #define Elf_Sym Elf32_Sym | 31 | #define Elf_Sym Elf32_Sym |
@@ -33,7 +33,7 @@ typedef struct | |||
33 | 33 | ||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #ifdef CONFIG_MIPS64 | 36 | #ifdef CONFIG_64BIT |
37 | 37 | ||
38 | #define Elf_Shdr Elf64_Shdr | 38 | #define Elf_Shdr Elf64_Shdr |
39 | #define Elf_Sym Elf64_Sym | 39 | #define Elf_Sym Elf64_Sym |
diff --git a/include/asm-mips/msgbuf.h b/include/asm-mips/msgbuf.h index 513b2824838b..a1533959742e 100644 --- a/include/asm-mips/msgbuf.h +++ b/include/asm-mips/msgbuf.h | |||
@@ -15,25 +15,25 @@ | |||
15 | 15 | ||
16 | struct msqid64_ds { | 16 | struct msqid64_ds { |
17 | struct ipc64_perm msg_perm; | 17 | struct ipc64_perm msg_perm; |
18 | #if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) | 18 | #if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN) |
19 | unsigned long __unused1; | 19 | unsigned long __unused1; |
20 | #endif | 20 | #endif |
21 | __kernel_time_t msg_stime; /* last msgsnd time */ | 21 | __kernel_time_t msg_stime; /* last msgsnd time */ |
22 | #if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) | 22 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN) |
23 | unsigned long __unused1; | 23 | unsigned long __unused1; |
24 | #endif | 24 | #endif |
25 | #if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) | 25 | #if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN) |
26 | unsigned long __unused2; | 26 | unsigned long __unused2; |
27 | #endif | 27 | #endif |
28 | __kernel_time_t msg_rtime; /* last msgrcv time */ | 28 | __kernel_time_t msg_rtime; /* last msgrcv time */ |
29 | #if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) | 29 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN) |
30 | unsigned long __unused2; | 30 | unsigned long __unused2; |
31 | #endif | 31 | #endif |
32 | #if defined(CONFIG_MIPS32) && !defined(CONFIG_CPU_LITTLE_ENDIAN) | 32 | #if defined(CONFIG_32BIT) && !defined(CONFIG_CPU_LITTLE_ENDIAN) |
33 | unsigned long __unused3; | 33 | unsigned long __unused3; |
34 | #endif | 34 | #endif |
35 | __kernel_time_t msg_ctime; /* last change time */ | 35 | __kernel_time_t msg_ctime; /* last change time */ |
36 | #if defined(CONFIG_MIPS32) && defined(CONFIG_CPU_LITTLE_ENDIAN) | 36 | #if defined(CONFIG_32BIT) && defined(CONFIG_CPU_LITTLE_ENDIAN) |
37 | unsigned long __unused3; | 37 | unsigned long __unused3; |
38 | #endif | 38 | #endif |
39 | unsigned long msg_cbytes; /* current number of bytes on queue */ | 39 | unsigned long msg_cbytes; /* current number of bytes on queue */ |
diff --git a/include/asm-mips/paccess.h b/include/asm-mips/paccess.h index 36cec9e31696..309bc3099f68 100644 --- a/include/asm-mips/paccess.h +++ b/include/asm-mips/paccess.h | |||
@@ -16,10 +16,10 @@ | |||
16 | #include <linux/config.h> | 16 | #include <linux/config.h> |
17 | #include <linux/errno.h> | 17 | #include <linux/errno.h> |
18 | 18 | ||
19 | #ifdef CONFIG_MIPS32 | 19 | #ifdef CONFIG_32BIT |
20 | #define __PA_ADDR ".word" | 20 | #define __PA_ADDR ".word" |
21 | #endif | 21 | #endif |
22 | #ifdef CONFIG_MIPS64 | 22 | #ifdef CONFIG_64BIT |
23 | #define __PA_ADDR ".dword" | 23 | #define __PA_ADDR ".dword" |
24 | #endif | 24 | #endif |
25 | 25 | ||
diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 5cae35cd9ba9..652b6d67a571 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h | |||
@@ -103,20 +103,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
103 | #define __pgd(x) ((pgd_t) { (x) } ) | 103 | #define __pgd(x) ((pgd_t) { (x) } ) |
104 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 104 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
105 | 105 | ||
106 | /* Pure 2^n version of get_order */ | ||
107 | static __inline__ int get_order(unsigned long size) | ||
108 | { | ||
109 | int order; | ||
110 | |||
111 | size = (size-1) >> (PAGE_SHIFT-1); | ||
112 | order = -1; | ||
113 | do { | ||
114 | size >>= 1; | ||
115 | order++; | ||
116 | } while (size); | ||
117 | return order; | ||
118 | } | ||
119 | |||
120 | #endif /* !__ASSEMBLY__ */ | 106 | #endif /* !__ASSEMBLY__ */ |
121 | 107 | ||
122 | /* to align the pointer to the (next) page boundary */ | 108 | /* to align the pointer to the (next) page boundary */ |
@@ -148,4 +134,6 @@ static __inline__ int get_order(unsigned long size) | |||
148 | #define WANT_PAGE_VIRTUAL | 134 | #define WANT_PAGE_VIRTUAL |
149 | #endif | 135 | #endif |
150 | 136 | ||
137 | #include <asm-generic/page.h> | ||
138 | |||
151 | #endif /* _ASM_PAGE_H */ | 139 | #endif /* _ASM_PAGE_H */ |
diff --git a/include/asm-mips/pci.h b/include/asm-mips/pci.h index d70dc355c1f3..c9a00ca1c012 100644 --- a/include/asm-mips/pci.h +++ b/include/asm-mips/pci.h | |||
@@ -94,7 +94,7 @@ struct pci_dev; | |||
94 | */ | 94 | */ |
95 | extern unsigned int PCI_DMA_BUS_IS_PHYS; | 95 | extern unsigned int PCI_DMA_BUS_IS_PHYS; |
96 | 96 | ||
97 | #ifdef CONFIG_MAPPED_DMA_IO | 97 | #ifdef CONFIG_DMA_NEED_PCI_MAP_STATE |
98 | 98 | ||
99 | /* pci_unmap_{single,page} is not a nop, thus... */ | 99 | /* pci_unmap_{single,page} is not a nop, thus... */ |
100 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; | 100 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) dma_addr_t ADDR_NAME; |
@@ -104,7 +104,7 @@ extern unsigned int PCI_DMA_BUS_IS_PHYS; | |||
104 | #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) | 104 | #define pci_unmap_len(PTR, LEN_NAME) ((PTR)->LEN_NAME) |
105 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) | 105 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) (((PTR)->LEN_NAME) = (VAL)) |
106 | 106 | ||
107 | #else /* CONFIG_MAPPED_DMA_IO */ | 107 | #else /* CONFIG_DMA_NEED_PCI_MAP_STATE */ |
108 | 108 | ||
109 | /* pci_unmap_{page,single} is a nop so... */ | 109 | /* pci_unmap_{page,single} is a nop so... */ |
110 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) | 110 | #define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) |
@@ -114,7 +114,7 @@ extern unsigned int PCI_DMA_BUS_IS_PHYS; | |||
114 | #define pci_unmap_len(PTR, LEN_NAME) (0) | 114 | #define pci_unmap_len(PTR, LEN_NAME) (0) |
115 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 115 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
116 | 116 | ||
117 | #endif /* CONFIG_MAPPED_DMA_IO */ | 117 | #endif /* CONFIG_DMA_NEED_PCI_MAP_STATE */ |
118 | 118 | ||
119 | /* This is always fine. */ | 119 | /* This is always fine. */ |
120 | #define pci_dac_dma_supported(pci_dev, mask) (1) | 120 | #define pci_dac_dma_supported(pci_dev, mask) (1) |
@@ -142,6 +142,8 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
142 | 142 | ||
143 | extern void pcibios_resource_to_bus(struct pci_dev *dev, | 143 | extern void pcibios_resource_to_bus(struct pci_dev *dev, |
144 | struct pci_bus_region *region, struct resource *res); | 144 | struct pci_bus_region *region, struct resource *res); |
145 | extern void pcibios_bus_to_resource(struct pci_dev *dev, | ||
146 | struct resource *res, struct pci_bus_region *region); | ||
145 | 147 | ||
146 | #ifdef CONFIG_PCI_DOMAINS | 148 | #ifdef CONFIG_PCI_DOMAINS |
147 | 149 | ||
@@ -167,4 +169,17 @@ static inline void pcibios_add_platform_entries(struct pci_dev *dev) | |||
167 | /* Do platform specific device initialization at pci_enable_device() time */ | 169 | /* Do platform specific device initialization at pci_enable_device() time */ |
168 | extern int pcibios_plat_dev_init(struct pci_dev *dev); | 170 | extern int pcibios_plat_dev_init(struct pci_dev *dev); |
169 | 171 | ||
172 | static inline struct resource * | ||
173 | pcibios_select_root(struct pci_dev *pdev, struct resource *res) | ||
174 | { | ||
175 | struct resource *root = NULL; | ||
176 | |||
177 | if (res->flags & IORESOURCE_IO) | ||
178 | root = &ioport_resource; | ||
179 | if (res->flags & IORESOURCE_MEM) | ||
180 | root = &iomem_resource; | ||
181 | |||
182 | return root; | ||
183 | } | ||
184 | |||
170 | #endif /* _ASM_PCI_H */ | 185 | #endif /* _ASM_PCI_H */ |
diff --git a/include/asm-mips/pgalloc.h b/include/asm-mips/pgalloc.h index 2d63f5ba403f..ce57288d43bd 100644 --- a/include/asm-mips/pgalloc.h +++ b/include/asm-mips/pgalloc.h | |||
@@ -85,7 +85,7 @@ static inline void pte_free(struct page *pte) | |||
85 | 85 | ||
86 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 86 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) |
87 | 87 | ||
88 | #ifdef CONFIG_MIPS32 | 88 | #ifdef CONFIG_32BIT |
89 | #define pgd_populate(mm, pmd, pte) BUG() | 89 | #define pgd_populate(mm, pmd, pte) BUG() |
90 | 90 | ||
91 | /* | 91 | /* |
@@ -97,7 +97,7 @@ static inline void pte_free(struct page *pte) | |||
97 | #define __pmd_free_tlb(tlb,x) do { } while (0) | 97 | #define __pmd_free_tlb(tlb,x) do { } while (0) |
98 | #endif | 98 | #endif |
99 | 99 | ||
100 | #ifdef CONFIG_MIPS64 | 100 | #ifdef CONFIG_64BIT |
101 | 101 | ||
102 | #define pgd_populate(mm, pgd, pmd) set_pgd(pgd, __pgd(pmd)) | 102 | #define pgd_populate(mm, pgd, pmd) set_pgd(pgd, __pgd(pmd)) |
103 | 103 | ||
diff --git a/include/asm-mips/pgtable.h b/include/asm-mips/pgtable.h index e76ccd6e3a5d..dbe13da0bdad 100644 --- a/include/asm-mips/pgtable.h +++ b/include/asm-mips/pgtable.h | |||
@@ -11,10 +11,10 @@ | |||
11 | #include <asm-generic/4level-fixup.h> | 11 | #include <asm-generic/4level-fixup.h> |
12 | 12 | ||
13 | #include <linux/config.h> | 13 | #include <linux/config.h> |
14 | #ifdef CONFIG_MIPS32 | 14 | #ifdef CONFIG_32BIT |
15 | #include <asm/pgtable-32.h> | 15 | #include <asm/pgtable-32.h> |
16 | #endif | 16 | #endif |
17 | #ifdef CONFIG_MIPS64 | 17 | #ifdef CONFIG_64BIT |
18 | #include <asm/pgtable-64.h> | 18 | #include <asm/pgtable-64.h> |
19 | #endif | 19 | #endif |
20 | 20 | ||
diff --git a/include/asm-mips/processor.h b/include/asm-mips/processor.h index 13c54d5b3b48..d6466aa09fb7 100644 --- a/include/asm-mips/processor.h +++ b/include/asm-mips/processor.h | |||
@@ -33,7 +33,7 @@ extern void (*cpu_wait)(void); | |||
33 | 33 | ||
34 | extern unsigned int vced_count, vcei_count; | 34 | extern unsigned int vced_count, vcei_count; |
35 | 35 | ||
36 | #ifdef CONFIG_MIPS32 | 36 | #ifdef CONFIG_32BIT |
37 | /* | 37 | /* |
38 | * User space process size: 2GB. This is hardcoded into a few places, | 38 | * User space process size: 2GB. This is hardcoded into a few places, |
39 | * so don't change it unless you know what you are doing. | 39 | * so don't change it unless you know what you are doing. |
@@ -47,7 +47,7 @@ extern unsigned int vced_count, vcei_count; | |||
47 | #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) | 47 | #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) |
48 | #endif | 48 | #endif |
49 | 49 | ||
50 | #ifdef CONFIG_MIPS64 | 50 | #ifdef CONFIG_64BIT |
51 | /* | 51 | /* |
52 | * User space process size: 1TB. This is hardcoded into a few places, | 52 | * User space process size: 1TB. This is hardcoded into a few places, |
53 | * so don't change it unless you know what you are doing. TASK_SIZE | 53 | * so don't change it unless you know what you are doing. TASK_SIZE |
diff --git a/include/asm-mips/ptrace.h b/include/asm-mips/ptrace.h index d3c46d633826..2b5c624c3d4f 100644 --- a/include/asm-mips/ptrace.h +++ b/include/asm-mips/ptrace.h | |||
@@ -28,7 +28,7 @@ | |||
28 | * system call/exception. As usual the registers k0/k1 aren't being saved. | 28 | * system call/exception. As usual the registers k0/k1 aren't being saved. |
29 | */ | 29 | */ |
30 | struct pt_regs { | 30 | struct pt_regs { |
31 | #ifdef CONFIG_MIPS32 | 31 | #ifdef CONFIG_32BIT |
32 | /* Pad bytes for argument save space on the stack. */ | 32 | /* Pad bytes for argument save space on the stack. */ |
33 | unsigned long pad0[6]; | 33 | unsigned long pad0[6]; |
34 | #endif | 34 | #endif |
diff --git a/include/asm-mips/qemu.h b/include/asm-mips/qemu.h new file mode 100644 index 000000000000..905c39585903 --- /dev/null +++ b/include/asm-mips/qemu.h | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2005 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | */ | ||
8 | #ifndef __ASM_QEMU_H | ||
9 | #define __ASM_QEMU_H | ||
10 | |||
11 | /* | ||
12 | * Interrupt numbers | ||
13 | */ | ||
14 | #define Q_PIC_IRQ_BASE 0 | ||
15 | #define Q_COUNT_COMPARE_IRQ 16 | ||
16 | |||
17 | /* | ||
18 | * Qemu clock rate. Unlike on real MIPS this has no relation to the | ||
19 | * instruction issue rate, so the choosen value is pure fiction, just needs | ||
20 | * to match the value in Qemu itself. | ||
21 | */ | ||
22 | #define QEMU_C0_COUNTER_CLOCK 100000000 | ||
23 | |||
24 | #endif /* __ASM_QEMU_H */ | ||
diff --git a/include/asm-mips/r4kcache.h b/include/asm-mips/r4kcache.h index da03a32c1ca7..5bea49feec66 100644 --- a/include/asm-mips/r4kcache.h +++ b/include/asm-mips/r4kcache.h | |||
@@ -171,11 +171,11 @@ static inline void blast_dcache16(void) | |||
171 | unsigned long start = INDEX_BASE; | 171 | unsigned long start = INDEX_BASE; |
172 | unsigned long end = start + current_cpu_data.dcache.waysize; | 172 | unsigned long end = start + current_cpu_data.dcache.waysize; |
173 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; | 173 | unsigned long ws_inc = 1UL << current_cpu_data.dcache.waybit; |
174 | unsigned long ws_end = current_cpu_data.dcache.ways << | 174 | unsigned long ws_end = current_cpu_data.dcache.ways << |
175 | current_cpu_data.dcache.waybit; | 175 | current_cpu_data.dcache.waybit; |
176 | unsigned long ws, addr; | 176 | unsigned long ws, addr; |
177 | 177 | ||
178 | for (ws = 0; ws < ws_end; ws += ws_inc) | 178 | for (ws = 0; ws < ws_end; ws += ws_inc) |
179 | for (addr = start; addr < end; addr += 0x200) | 179 | for (addr = start; addr < end; addr += 0x200) |
180 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | 180 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); |
181 | } | 181 | } |
@@ -200,8 +200,8 @@ static inline void blast_dcache16_page_indexed(unsigned long page) | |||
200 | current_cpu_data.dcache.waybit; | 200 | current_cpu_data.dcache.waybit; |
201 | unsigned long ws, addr; | 201 | unsigned long ws, addr; |
202 | 202 | ||
203 | for (ws = 0; ws < ws_end; ws += ws_inc) | 203 | for (ws = 0; ws < ws_end; ws += ws_inc) |
204 | for (addr = start; addr < end; addr += 0x200) | 204 | for (addr = start; addr < end; addr += 0x200) |
205 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); | 205 | cache16_unroll32(addr|ws,Index_Writeback_Inv_D); |
206 | } | 206 | } |
207 | 207 | ||
@@ -214,8 +214,8 @@ static inline void blast_icache16(void) | |||
214 | current_cpu_data.icache.waybit; | 214 | current_cpu_data.icache.waybit; |
215 | unsigned long ws, addr; | 215 | unsigned long ws, addr; |
216 | 216 | ||
217 | for (ws = 0; ws < ws_end; ws += ws_inc) | 217 | for (ws = 0; ws < ws_end; ws += ws_inc) |
218 | for (addr = start; addr < end; addr += 0x200) | 218 | for (addr = start; addr < end; addr += 0x200) |
219 | cache16_unroll32(addr|ws,Index_Invalidate_I); | 219 | cache16_unroll32(addr|ws,Index_Invalidate_I); |
220 | } | 220 | } |
221 | 221 | ||
@@ -239,8 +239,8 @@ static inline void blast_icache16_page_indexed(unsigned long page) | |||
239 | current_cpu_data.icache.waybit; | 239 | current_cpu_data.icache.waybit; |
240 | unsigned long ws, addr; | 240 | unsigned long ws, addr; |
241 | 241 | ||
242 | for (ws = 0; ws < ws_end; ws += ws_inc) | 242 | for (ws = 0; ws < ws_end; ws += ws_inc) |
243 | for (addr = start; addr < end; addr += 0x200) | 243 | for (addr = start; addr < end; addr += 0x200) |
244 | cache16_unroll32(addr|ws,Index_Invalidate_I); | 244 | cache16_unroll32(addr|ws,Index_Invalidate_I); |
245 | } | 245 | } |
246 | 246 | ||
@@ -249,11 +249,11 @@ static inline void blast_scache16(void) | |||
249 | unsigned long start = INDEX_BASE; | 249 | unsigned long start = INDEX_BASE; |
250 | unsigned long end = start + current_cpu_data.scache.waysize; | 250 | unsigned long end = start + current_cpu_data.scache.waysize; |
251 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 251 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
252 | unsigned long ws_end = current_cpu_data.scache.ways << | 252 | unsigned long ws_end = current_cpu_data.scache.ways << |
253 | current_cpu_data.scache.waybit; | 253 | current_cpu_data.scache.waybit; |
254 | unsigned long ws, addr; | 254 | unsigned long ws, addr; |
255 | 255 | ||
256 | for (ws = 0; ws < ws_end; ws += ws_inc) | 256 | for (ws = 0; ws < ws_end; ws += ws_inc) |
257 | for (addr = start; addr < end; addr += 0x200) | 257 | for (addr = start; addr < end; addr += 0x200) |
258 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | 258 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); |
259 | } | 259 | } |
@@ -278,8 +278,8 @@ static inline void blast_scache16_page_indexed(unsigned long page) | |||
278 | current_cpu_data.scache.waybit; | 278 | current_cpu_data.scache.waybit; |
279 | unsigned long ws, addr; | 279 | unsigned long ws, addr; |
280 | 280 | ||
281 | for (ws = 0; ws < ws_end; ws += ws_inc) | 281 | for (ws = 0; ws < ws_end; ws += ws_inc) |
282 | for (addr = start; addr < end; addr += 0x200) | 282 | for (addr = start; addr < end; addr += 0x200) |
283 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); | 283 | cache16_unroll32(addr|ws,Index_Writeback_Inv_SD); |
284 | } | 284 | } |
285 | 285 | ||
@@ -318,8 +318,8 @@ static inline void blast_dcache32(void) | |||
318 | current_cpu_data.dcache.waybit; | 318 | current_cpu_data.dcache.waybit; |
319 | unsigned long ws, addr; | 319 | unsigned long ws, addr; |
320 | 320 | ||
321 | for (ws = 0; ws < ws_end; ws += ws_inc) | 321 | for (ws = 0; ws < ws_end; ws += ws_inc) |
322 | for (addr = start; addr < end; addr += 0x400) | 322 | for (addr = start; addr < end; addr += 0x400) |
323 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | 323 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); |
324 | } | 324 | } |
325 | 325 | ||
@@ -343,8 +343,8 @@ static inline void blast_dcache32_page_indexed(unsigned long page) | |||
343 | current_cpu_data.dcache.waybit; | 343 | current_cpu_data.dcache.waybit; |
344 | unsigned long ws, addr; | 344 | unsigned long ws, addr; |
345 | 345 | ||
346 | for (ws = 0; ws < ws_end; ws += ws_inc) | 346 | for (ws = 0; ws < ws_end; ws += ws_inc) |
347 | for (addr = start; addr < end; addr += 0x400) | 347 | for (addr = start; addr < end; addr += 0x400) |
348 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); | 348 | cache32_unroll32(addr|ws,Index_Writeback_Inv_D); |
349 | } | 349 | } |
350 | 350 | ||
@@ -357,8 +357,8 @@ static inline void blast_icache32(void) | |||
357 | current_cpu_data.icache.waybit; | 357 | current_cpu_data.icache.waybit; |
358 | unsigned long ws, addr; | 358 | unsigned long ws, addr; |
359 | 359 | ||
360 | for (ws = 0; ws < ws_end; ws += ws_inc) | 360 | for (ws = 0; ws < ws_end; ws += ws_inc) |
361 | for (addr = start; addr < end; addr += 0x400) | 361 | for (addr = start; addr < end; addr += 0x400) |
362 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 362 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
363 | } | 363 | } |
364 | 364 | ||
@@ -383,7 +383,7 @@ static inline void blast_icache32_page_indexed(unsigned long page) | |||
383 | unsigned long ws, addr; | 383 | unsigned long ws, addr; |
384 | 384 | ||
385 | for (ws = 0; ws < ws_end; ws += ws_inc) | 385 | for (ws = 0; ws < ws_end; ws += ws_inc) |
386 | for (addr = start; addr < end; addr += 0x400) | 386 | for (addr = start; addr < end; addr += 0x400) |
387 | cache32_unroll32(addr|ws,Index_Invalidate_I); | 387 | cache32_unroll32(addr|ws,Index_Invalidate_I); |
388 | } | 388 | } |
389 | 389 | ||
@@ -392,11 +392,11 @@ static inline void blast_scache32(void) | |||
392 | unsigned long start = INDEX_BASE; | 392 | unsigned long start = INDEX_BASE; |
393 | unsigned long end = start + current_cpu_data.scache.waysize; | 393 | unsigned long end = start + current_cpu_data.scache.waysize; |
394 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 394 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
395 | unsigned long ws_end = current_cpu_data.scache.ways << | 395 | unsigned long ws_end = current_cpu_data.scache.ways << |
396 | current_cpu_data.scache.waybit; | 396 | current_cpu_data.scache.waybit; |
397 | unsigned long ws, addr; | 397 | unsigned long ws, addr; |
398 | 398 | ||
399 | for (ws = 0; ws < ws_end; ws += ws_inc) | 399 | for (ws = 0; ws < ws_end; ws += ws_inc) |
400 | for (addr = start; addr < end; addr += 0x400) | 400 | for (addr = start; addr < end; addr += 0x400) |
401 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | 401 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); |
402 | } | 402 | } |
@@ -421,8 +421,8 @@ static inline void blast_scache32_page_indexed(unsigned long page) | |||
421 | current_cpu_data.scache.waybit; | 421 | current_cpu_data.scache.waybit; |
422 | unsigned long ws, addr; | 422 | unsigned long ws, addr; |
423 | 423 | ||
424 | for (ws = 0; ws < ws_end; ws += ws_inc) | 424 | for (ws = 0; ws < ws_end; ws += ws_inc) |
425 | for (addr = start; addr < end; addr += 0x400) | 425 | for (addr = start; addr < end; addr += 0x400) |
426 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); | 426 | cache32_unroll32(addr|ws,Index_Writeback_Inv_SD); |
427 | } | 427 | } |
428 | 428 | ||
@@ -461,8 +461,8 @@ static inline void blast_icache64(void) | |||
461 | current_cpu_data.icache.waybit; | 461 | current_cpu_data.icache.waybit; |
462 | unsigned long ws, addr; | 462 | unsigned long ws, addr; |
463 | 463 | ||
464 | for (ws = 0; ws < ws_end; ws += ws_inc) | 464 | for (ws = 0; ws < ws_end; ws += ws_inc) |
465 | for (addr = start; addr < end; addr += 0x800) | 465 | for (addr = start; addr < end; addr += 0x800) |
466 | cache64_unroll32(addr|ws,Index_Invalidate_I); | 466 | cache64_unroll32(addr|ws,Index_Invalidate_I); |
467 | } | 467 | } |
468 | 468 | ||
@@ -487,7 +487,7 @@ static inline void blast_icache64_page_indexed(unsigned long page) | |||
487 | unsigned long ws, addr; | 487 | unsigned long ws, addr; |
488 | 488 | ||
489 | for (ws = 0; ws < ws_end; ws += ws_inc) | 489 | for (ws = 0; ws < ws_end; ws += ws_inc) |
490 | for (addr = start; addr < end; addr += 0x800) | 490 | for (addr = start; addr < end; addr += 0x800) |
491 | cache64_unroll32(addr|ws,Index_Invalidate_I); | 491 | cache64_unroll32(addr|ws,Index_Invalidate_I); |
492 | } | 492 | } |
493 | 493 | ||
@@ -496,11 +496,11 @@ static inline void blast_scache64(void) | |||
496 | unsigned long start = INDEX_BASE; | 496 | unsigned long start = INDEX_BASE; |
497 | unsigned long end = start + current_cpu_data.scache.waysize; | 497 | unsigned long end = start + current_cpu_data.scache.waysize; |
498 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 498 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
499 | unsigned long ws_end = current_cpu_data.scache.ways << | 499 | unsigned long ws_end = current_cpu_data.scache.ways << |
500 | current_cpu_data.scache.waybit; | 500 | current_cpu_data.scache.waybit; |
501 | unsigned long ws, addr; | 501 | unsigned long ws, addr; |
502 | 502 | ||
503 | for (ws = 0; ws < ws_end; ws += ws_inc) | 503 | for (ws = 0; ws < ws_end; ws += ws_inc) |
504 | for (addr = start; addr < end; addr += 0x800) | 504 | for (addr = start; addr < end; addr += 0x800) |
505 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | 505 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); |
506 | } | 506 | } |
@@ -525,8 +525,8 @@ static inline void blast_scache64_page_indexed(unsigned long page) | |||
525 | current_cpu_data.scache.waybit; | 525 | current_cpu_data.scache.waybit; |
526 | unsigned long ws, addr; | 526 | unsigned long ws, addr; |
527 | 527 | ||
528 | for (ws = 0; ws < ws_end; ws += ws_inc) | 528 | for (ws = 0; ws < ws_end; ws += ws_inc) |
529 | for (addr = start; addr < end; addr += 0x800) | 529 | for (addr = start; addr < end; addr += 0x800) |
530 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); | 530 | cache64_unroll32(addr|ws,Index_Writeback_Inv_SD); |
531 | } | 531 | } |
532 | 532 | ||
@@ -561,11 +561,11 @@ static inline void blast_scache128(void) | |||
561 | unsigned long start = INDEX_BASE; | 561 | unsigned long start = INDEX_BASE; |
562 | unsigned long end = start + current_cpu_data.scache.waysize; | 562 | unsigned long end = start + current_cpu_data.scache.waysize; |
563 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; | 563 | unsigned long ws_inc = 1UL << current_cpu_data.scache.waybit; |
564 | unsigned long ws_end = current_cpu_data.scache.ways << | 564 | unsigned long ws_end = current_cpu_data.scache.ways << |
565 | current_cpu_data.scache.waybit; | 565 | current_cpu_data.scache.waybit; |
566 | unsigned long ws, addr; | 566 | unsigned long ws, addr; |
567 | 567 | ||
568 | for (ws = 0; ws < ws_end; ws += ws_inc) | 568 | for (ws = 0; ws < ws_end; ws += ws_inc) |
569 | for (addr = start; addr < end; addr += 0x1000) | 569 | for (addr = start; addr < end; addr += 0x1000) |
570 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 570 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); |
571 | } | 571 | } |
@@ -590,8 +590,8 @@ static inline void blast_scache128_page_indexed(unsigned long page) | |||
590 | current_cpu_data.scache.waybit; | 590 | current_cpu_data.scache.waybit; |
591 | unsigned long ws, addr; | 591 | unsigned long ws, addr; |
592 | 592 | ||
593 | for (ws = 0; ws < ws_end; ws += ws_inc) | 593 | for (ws = 0; ws < ws_end; ws += ws_inc) |
594 | for (addr = start; addr < end; addr += 0x1000) | 594 | for (addr = start; addr < end; addr += 0x1000) |
595 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); | 595 | cache128_unroll32(addr|ws,Index_Writeback_Inv_SD); |
596 | } | 596 | } |
597 | 597 | ||
diff --git a/include/asm-mips/reg.h b/include/asm-mips/reg.h index 7b33bbca9585..6173004cc88e 100644 --- a/include/asm-mips/reg.h +++ b/include/asm-mips/reg.h | |||
@@ -14,7 +14,7 @@ | |||
14 | 14 | ||
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | 16 | ||
17 | #if defined(CONFIG_MIPS32) || defined(WANT_COMPAT_REG_H) | 17 | #if defined(CONFIG_32BIT) || defined(WANT_COMPAT_REG_H) |
18 | 18 | ||
19 | #define EF_R0 6 | 19 | #define EF_R0 6 |
20 | #define EF_R1 7 | 20 | #define EF_R1 7 |
@@ -70,7 +70,7 @@ | |||
70 | 70 | ||
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #if CONFIG_MIPS64 | 73 | #ifdef CONFIG_64BIT |
74 | 74 | ||
75 | #define EF_R0 0 | 75 | #define EF_R0 0 |
76 | #define EF_R1 1 | 76 | #define EF_R1 1 |
@@ -124,6 +124,6 @@ | |||
124 | 124 | ||
125 | #define EF_SIZE 304 /* size in bytes */ | 125 | #define EF_SIZE 304 /* size in bytes */ |
126 | 126 | ||
127 | #endif /* CONFIG_MIPS64 */ | 127 | #endif /* CONFIG_64BIT */ |
128 | 128 | ||
129 | #endif /* __ASM_MIPS_REG_H */ | 129 | #endif /* __ASM_MIPS_REG_H */ |
diff --git a/include/asm-mips/resource.h b/include/asm-mips/resource.h index fd3c6d17a5f6..1fba00c22077 100644 --- a/include/asm-mips/resource.h +++ b/include/asm-mips/resource.h | |||
@@ -27,7 +27,7 @@ | |||
27 | * but we keep the old value on MIPS32, | 27 | * but we keep the old value on MIPS32, |
28 | * for compatibility: | 28 | * for compatibility: |
29 | */ | 29 | */ |
30 | #ifdef CONFIG_MIPS32 | 30 | #ifdef CONFIG_32BIT |
31 | # define RLIM_INFINITY 0x7fffffffUL | 31 | # define RLIM_INFINITY 0x7fffffffUL |
32 | #endif | 32 | #endif |
33 | 33 | ||
diff --git a/include/asm-mips/rtc.h b/include/asm-mips/rtc.h index 31c0c2347f4f..3c4b637fd925 100644 --- a/include/asm-mips/rtc.h +++ b/include/asm-mips/rtc.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * include/asm-mips/rtc.h | 2 | * include/asm-mips/rtc.h |
3 | * | 3 | * |
4 | * (Really an interface for drivers/char/genrtc.c) | 4 | * (Really an interface for drivers/char/genrtc.c) |
5 | * | 5 | * |
diff --git a/include/asm-mips/sgi/gio.h b/include/asm-mips/sgi/gio.h index a38d66f99872..889cf028c95d 100644 --- a/include/asm-mips/sgi/gio.h +++ b/include/asm-mips/sgi/gio.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * | 16 | * |
17 | * The Indigo and Indy have two GIO bus connectors. Indigo2 (all models) have | 17 | * The Indigo and Indy have two GIO bus connectors. Indigo2 (all models) have |
18 | * three physical connectors, but only two slots, GFX and EXP0. | 18 | * three physical connectors, but only two slots, GFX and EXP0. |
19 | * | 19 | * |
20 | * There is 10MB of GIO address space for GIO64 slot devices | 20 | * There is 10MB of GIO address space for GIO64 slot devices |
21 | * slot# slot type address range size | 21 | * slot# slot type address range size |
22 | * ----- --------- ----------------------- ----- | 22 | * ----- --------- ----------------------- ----- |
diff --git a/include/asm-mips/sgi/hpc3.h b/include/asm-mips/sgi/hpc3.h index a5b988d7327a..ac3dfc7af5b0 100644 --- a/include/asm-mips/sgi/hpc3.h +++ b/include/asm-mips/sgi/hpc3.h | |||
@@ -221,7 +221,7 @@ struct hpc3_regs { | |||
221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ | 221 | #define HPC3_BESTAT_PIDMASK 0x3f700 /* DMA channel parity identifier */ |
222 | 222 | ||
223 | u32 _unused1[0x14000/4 - 5]; /* padding */ | 223 | u32 _unused1[0x14000/4 - 5]; /* padding */ |
224 | 224 | ||
225 | /* Now direct PIO per-HPC3 peripheral access to external regs. */ | 225 | /* Now direct PIO per-HPC3 peripheral access to external regs. */ |
226 | volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */ | 226 | volatile u32 scsi0_ext[256]; /* SCSI channel 0 external regs */ |
227 | u32 _unused2[0x7c00/4]; | 227 | u32 _unused2[0x7c00/4]; |
@@ -304,7 +304,7 @@ struct hpc3_regs { | |||
304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ | 304 | volatile u32 bbram[8192-50-14]; /* Battery backed ram */ |
305 | }; | 305 | }; |
306 | 306 | ||
307 | /* | 307 | /* |
308 | * It is possible to have two HPC3's within the address space on | 308 | * It is possible to have two HPC3's within the address space on |
309 | * one machine, though only having one is more likely on an Indy. | 309 | * one machine, though only having one is more likely on an Indy. |
310 | */ | 310 | */ |
diff --git a/include/asm-mips/sgi/ioc.h b/include/asm-mips/sgi/ioc.h index 169187f53fbc..f3e3dc9bb732 100644 --- a/include/asm-mips/sgi/ioc.h +++ b/include/asm-mips/sgi/ioc.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
17 | #include <asm/sgi/pi1.h> | 17 | #include <asm/sgi/pi1.h> |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * All registers are 8-bit wide alligned on 32-bit boundary. Bad things | 20 | * All registers are 8-bit wide alligned on 32-bit boundary. Bad things |
21 | * happen if you try word access them. You have been warned. | 21 | * happen if you try word access them. You have been warned. |
22 | */ | 22 | */ |
@@ -138,7 +138,7 @@ struct sgioc_regs { | |||
138 | u8 _sysid[3]; | 138 | u8 _sysid[3]; |
139 | volatile u8 sysid; | 139 | volatile u8 sysid; |
140 | #define SGIOC_SYSID_FULLHOUSE 0x01 | 140 | #define SGIOC_SYSID_FULLHOUSE 0x01 |
141 | #define SGIOC_SYSID_BOARDREV(x) ((x & 0xe0) > 5) | 141 | #define SGIOC_SYSID_BOARDREV(x) ((x & 0xe0) > 5) |
142 | #define SGIOC_SYSID_CHIPREV(x) ((x & 0x1e) > 1) | 142 | #define SGIOC_SYSID_CHIPREV(x) ((x & 0x1e) > 1) |
143 | u32 _unused2; | 143 | u32 _unused2; |
144 | u8 _read[3]; | 144 | u8 _read[3]; |
diff --git a/include/asm-mips/sgi/ip22.h b/include/asm-mips/sgi/ip22.h index 97d73adb4e40..bbfc05c3cab9 100644 --- a/include/asm-mips/sgi/ip22.h +++ b/include/asm-mips/sgi/ip22.h | |||
@@ -12,7 +12,7 @@ | |||
12 | #ifndef _SGI_IP22_H | 12 | #ifndef _SGI_IP22_H |
13 | #define _SGI_IP22_H | 13 | #define _SGI_IP22_H |
14 | 14 | ||
15 | /* | 15 | /* |
16 | * These are the virtual IRQ numbers, we divide all IRQ's into | 16 | * These are the virtual IRQ numbers, we divide all IRQ's into |
17 | * 'spaces', the 'space' determines where and how to enable/disable | 17 | * 'spaces', the 'space' determines where and how to enable/disable |
18 | * that particular IRQ on an SGI machine. HPC DMA and MC DMA interrups | 18 | * that particular IRQ on an SGI machine. HPC DMA and MC DMA interrups |
diff --git a/include/asm-mips/sgi/mc.h b/include/asm-mips/sgi/mc.h index fd98f930607c..c52f7834c7c8 100644 --- a/include/asm-mips/sgi/mc.h +++ b/include/asm-mips/sgi/mc.h | |||
@@ -182,14 +182,14 @@ struct sgimc_regs { | |||
182 | volatile u32 dtlb_hi3; | 182 | volatile u32 dtlb_hi3; |
183 | u32 _unused33; | 183 | u32 _unused33; |
184 | volatile u32 dtlb_lo3; | 184 | volatile u32 dtlb_lo3; |
185 | 185 | ||
186 | u32 _unused34[0x0392]; | 186 | u32 _unused34[0x0392]; |
187 | 187 | ||
188 | u32 _unused35; | 188 | u32 _unused35; |
189 | volatile u32 rpsscounter; /* Chirps at 100ns */ | 189 | volatile u32 rpsscounter; /* Chirps at 100ns */ |
190 | 190 | ||
191 | u32 _unused36[0x1000/4-2*4]; | 191 | u32 _unused36[0x1000/4-2*4]; |
192 | 192 | ||
193 | u32 _unused37; | 193 | u32 _unused37; |
194 | volatile u32 maddronly; /* Address DMA goes at */ | 194 | volatile u32 maddronly; /* Address DMA goes at */ |
195 | u32 _unused38; | 195 | u32 _unused38; |
diff --git a/include/asm-mips/sgiarcs.h b/include/asm-mips/sgiarcs.h index 59450335f049..722b77a8c5e5 100644 --- a/include/asm-mips/sgiarcs.h +++ b/include/asm-mips/sgiarcs.h | |||
@@ -367,7 +367,7 @@ struct linux_smonblock { | |||
367 | * Macros for calling a 32-bit ARC implementation from 64-bit code | 367 | * Macros for calling a 32-bit ARC implementation from 64-bit code |
368 | */ | 368 | */ |
369 | 369 | ||
370 | #if defined(CONFIG_MIPS64) && defined(CONFIG_ARC32) | 370 | #if defined(CONFIG_64BIT) && defined(CONFIG_ARC32) |
371 | 371 | ||
372 | #define __arc_clobbers \ | 372 | #define __arc_clobbers \ |
373 | "$2","$3" /* ... */, "$8","$9","$10","$11", \ | 373 | "$2","$3" /* ... */, "$8","$9","$10","$11", \ |
@@ -476,10 +476,10 @@ struct linux_smonblock { | |||
476 | __res; \ | 476 | __res; \ |
477 | }) | 477 | }) |
478 | 478 | ||
479 | #endif /* defined(CONFIG_MIPS64) && defined(CONFIG_ARC32) */ | 479 | #endif /* defined(CONFIG_64BIT) && defined(CONFIG_ARC32) */ |
480 | 480 | ||
481 | #if (defined(CONFIG_MIPS32) && defined(CONFIG_ARC32)) || \ | 481 | #if (defined(CONFIG_32BIT) && defined(CONFIG_ARC32)) || \ |
482 | (defined(CONFIG_MIPS64) && defined(CONFIG_ARC64)) | 482 | (defined(CONFIG_64BIT) && defined(CONFIG_ARC64)) |
483 | 483 | ||
484 | #define ARC_CALL0(dest) \ | 484 | #define ARC_CALL0(dest) \ |
485 | ({ long __res; \ | 485 | ({ long __res; \ |
diff --git a/include/asm-mips/sibyte/carmel.h b/include/asm-mips/sibyte/carmel.h index 7ac5da13ce8a..b5e7dae19f0f 100644 --- a/include/asm-mips/sibyte/carmel.h +++ b/include/asm-mips/sibyte/carmel.h | |||
@@ -25,12 +25,12 @@ | |||
25 | 25 | ||
26 | #define SIBYTE_BOARD_NAME "Carmel" | 26 | #define SIBYTE_BOARD_NAME "Carmel" |
27 | 27 | ||
28 | #define GPIO_PHY_INTERRUPT 2 | 28 | #define GPIO_PHY_INTERRUPT 2 |
29 | #define GPIO_NONMASKABLE_INT 3 | 29 | #define GPIO_NONMASKABLE_INT 3 |
30 | #define GPIO_CF_INSERTED 6 | 30 | #define GPIO_CF_INSERTED 6 |
31 | #define GPIO_MONTEREY_RESET 7 | 31 | #define GPIO_MONTEREY_RESET 7 |
32 | #define GPIO_QUADUART_INT 8 | 32 | #define GPIO_QUADUART_INT 8 |
33 | #define GPIO_CF_INT 9 | 33 | #define GPIO_CF_INT 9 |
34 | #define GPIO_FPGA_CCLK 10 | 34 | #define GPIO_FPGA_CCLK 10 |
35 | #define GPIO_FPGA_DOUT 11 | 35 | #define GPIO_FPGA_DOUT 11 |
36 | #define GPIO_FPGA_DIN 12 | 36 | #define GPIO_FPGA_DIN 12 |
diff --git a/include/asm-mips/sibyte/sb1250_defs.h b/include/asm-mips/sibyte/sb1250_defs.h index 96088fb074a4..40ef97c76c8b 100644 --- a/include/asm-mips/sibyte/sb1250_defs.h +++ b/include/asm-mips/sibyte/sb1250_defs.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Global constants and macros File: sb1250_defs.h | 4 | * Global constants and macros File: sb1250_defs.h |
5 | * | 5 | * |
6 | * This file contains macros and definitions used by the other | 6 | * This file contains macros and definitions used by the other |
7 | * include files. | 7 | * include files. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -105,7 +105,7 @@ | |||
105 | #define SIBYTE_HDR_FMASK_112x_ALL 0x0000f00 | 105 | #define SIBYTE_HDR_FMASK_112x_ALL 0x0000f00 |
106 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x0000100 | 106 | #define SIBYTE_HDR_FMASK_112x_PASS1 0x0000100 |
107 | 107 | ||
108 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ | 108 | /* Bit mask for chip/revision. (use _ALL for all revisions of a chip). */ |
109 | #define SIBYTE_HDR_FMASK(chip, pass) \ | 109 | #define SIBYTE_HDR_FMASK(chip, pass) \ |
110 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) | 110 | (SIBYTE_HDR_FMASK_ ## chip ## _ ## pass) |
111 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ | 111 | #define SIBYTE_HDR_FMASK_ALLREVS(chip) \ |
@@ -150,31 +150,31 @@ | |||
150 | 150 | ||
151 | /* ********************************************************************* | 151 | /* ********************************************************************* |
152 | * Naming schemes for constants in these files: | 152 | * Naming schemes for constants in these files: |
153 | * | 153 | * |
154 | * M_xxx MASK constant (identifies bits in a register). | 154 | * M_xxx MASK constant (identifies bits in a register). |
155 | * For multi-bit fields, all bits in the field will | 155 | * For multi-bit fields, all bits in the field will |
156 | * be set. | 156 | * be set. |
157 | * | 157 | * |
158 | * K_xxx "Code" constant (value for data in a multi-bit | 158 | * K_xxx "Code" constant (value for data in a multi-bit |
159 | * field). The value is right justified. | 159 | * field). The value is right justified. |
160 | * | 160 | * |
161 | * V_xxx "Value" constant. This is the same as the | 161 | * V_xxx "Value" constant. This is the same as the |
162 | * corresponding "K_xxx" constant, except it is | 162 | * corresponding "K_xxx" constant, except it is |
163 | * shifted to the correct position in the register. | 163 | * shifted to the correct position in the register. |
164 | * | 164 | * |
165 | * S_xxx SHIFT constant. This is the number of bits that | 165 | * S_xxx SHIFT constant. This is the number of bits that |
166 | * a field value (code) needs to be shifted | 166 | * a field value (code) needs to be shifted |
167 | * (towards the left) to put the value in the right | 167 | * (towards the left) to put the value in the right |
168 | * position for the register. | 168 | * position for the register. |
169 | * | 169 | * |
170 | * A_xxx ADDRESS constant. This will be a physical | 170 | * A_xxx ADDRESS constant. This will be a physical |
171 | * address. Use the PHYS_TO_K1 macro to generate | 171 | * address. Use the PHYS_TO_K1 macro to generate |
172 | * a K1SEG address. | 172 | * a K1SEG address. |
173 | * | 173 | * |
174 | * R_xxx RELATIVE offset constant. This is an offset from | 174 | * R_xxx RELATIVE offset constant. This is an offset from |
175 | * an A_xxx constant (usually the first register in | 175 | * an A_xxx constant (usually the first register in |
176 | * a group). | 176 | * a group). |
177 | * | 177 | * |
178 | * G_xxx(X) GET value. This macro obtains a multi-bit field | 178 | * G_xxx(X) GET value. This macro obtains a multi-bit field |
179 | * from a register, masks it, and shifts it to | 179 | * from a register, masks it, and shifts it to |
180 | * the bottom of the register (retrieving a K_xxx | 180 | * the bottom of the register (retrieving a K_xxx |
@@ -189,7 +189,7 @@ | |||
189 | 189 | ||
190 | 190 | ||
191 | /* | 191 | /* |
192 | * Cast to 64-bit number. Presumably the syntax is different in | 192 | * Cast to 64-bit number. Presumably the syntax is different in |
193 | * assembly language. | 193 | * assembly language. |
194 | * | 194 | * |
195 | * Note: you'll need to define uint32_t and uint64_t in your headers. | 195 | * Note: you'll need to define uint32_t and uint64_t in your headers. |
diff --git a/include/asm-mips/sibyte/sb1250_dma.h b/include/asm-mips/sibyte/sb1250_dma.h index f1b08d32338d..3cdb48f50ed0 100644 --- a/include/asm-mips/sibyte/sb1250_dma.h +++ b/include/asm-mips/sibyte/sb1250_dma.h | |||
@@ -1,24 +1,24 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * DMA definitions File: sb1250_dma.h | 4 | * DMA definitions File: sb1250_dma.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the SB1250's DMA controllers, both the data mover | 7 | * programming the SB1250's DMA controllers, both the data mover |
8 | * and the Ethernet DMA. | 8 | * and the Ethernet DMA. |
9 | * | 9 | * |
10 | * SB1250 specification level: User's manual 1/02/02 | 10 | * SB1250 specification level: User's manual 1/02/02 |
11 | * | 11 | * |
12 | * Author: Mitch Lichtenberg | 12 | * Author: Mitch Lichtenberg |
13 | * | 13 | * |
14 | ********************************************************************* | 14 | ********************************************************************* |
15 | * | 15 | * |
16 | * Copyright 2000,2001,2002,2003 | 16 | * Copyright 2000,2001,2002,2003 |
17 | * Broadcom Corporation. All rights reserved. | 17 | * Broadcom Corporation. All rights reserved. |
18 | * | 18 | * |
19 | * This program is free software; you can redistribute it and/or | 19 | * This program is free software; you can redistribute it and/or |
20 | * modify it under the terms of the GNU General Public License as | 20 | * modify it under the terms of the GNU General Public License as |
21 | * published by the Free Software Foundation; either version 2 of | 21 | * published by the Free Software Foundation; either version 2 of |
22 | * the License, or (at your option) any later version. | 22 | * the License, or (at your option) any later version. |
23 | * | 23 | * |
24 | * This program is distributed in the hope that it will be useful, | 24 | * This program is distributed in the hope that it will be useful, |
@@ -28,7 +28,7 @@ | |||
28 | * | 28 | * |
29 | * You should have received a copy of the GNU General Public License | 29 | * You should have received a copy of the GNU General Public License |
30 | * along with this program; if not, write to the Free Software | 30 | * along with this program; if not, write to the Free Software |
31 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 31 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
32 | * MA 02111-1307 USA | 32 | * MA 02111-1307 USA |
33 | ********************************************************************* */ | 33 | ********************************************************************* */ |
34 | 34 | ||
@@ -43,9 +43,9 @@ | |||
43 | * DMA Registers | 43 | * DMA Registers |
44 | ********************************************************************* */ | 44 | ********************************************************************* */ |
45 | 45 | ||
46 | /* | 46 | /* |
47 | * Ethernet and Serial DMA Configuration Register 0 (Table 7-4) | 47 | * Ethernet and Serial DMA Configuration Register 0 (Table 7-4) |
48 | * Registers: DMA_CONFIG0_MAC_x_RX_CH_0 | 48 | * Registers: DMA_CONFIG0_MAC_x_RX_CH_0 |
49 | * Registers: DMA_CONFIG0_MAC_x_TX_CH_0 | 49 | * Registers: DMA_CONFIG0_MAC_x_TX_CH_0 |
50 | * Registers: DMA_CONFIG0_SER_x_RX | 50 | * Registers: DMA_CONFIG0_SER_x_RX |
51 | * Registers: DMA_CONFIG0_SER_x_TX | 51 | * Registers: DMA_CONFIG0_SER_x_TX |
@@ -98,7 +98,7 @@ | |||
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) | 100 | * Ethernet and Serial DMA Configuration Register 1 (Table 7-5) |
101 | * Registers: DMA_CONFIG1_MAC_x_RX_CH_0 | 101 | * Registers: DMA_CONFIG1_MAC_x_RX_CH_0 |
102 | * Registers: DMA_CONFIG1_DMA_x_TX_CH_0 | 102 | * Registers: DMA_CONFIG1_DMA_x_TX_CH_0 |
103 | * Registers: DMA_CONFIG1_SER_x_RX | 103 | * Registers: DMA_CONFIG1_SER_x_RX |
104 | * Registers: DMA_CONFIG1_SER_x_TX | 104 | * Registers: DMA_CONFIG1_SER_x_TX |
@@ -152,11 +152,11 @@ | |||
152 | /* | 152 | /* |
153 | * DMA Descriptor Count Registers (Table 7-8) | 153 | * DMA Descriptor Count Registers (Table 7-8) |
154 | */ | 154 | */ |
155 | 155 | ||
156 | /* No bitfields */ | 156 | /* No bitfields */ |
157 | 157 | ||
158 | 158 | ||
159 | /* | 159 | /* |
160 | * Current Descriptor Address Register (Table 7-11) | 160 | * Current Descriptor Address Register (Table 7-11) |
161 | */ | 161 | */ |
162 | 162 | ||
@@ -275,14 +275,14 @@ | |||
275 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x,S_DMA_DSCRB_STATUS) | 275 | #define V_DMA_DSCRB_STATUS(x) _SB_MAKEVALUE(x,S_DMA_DSCRB_STATUS) |
276 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x,S_DMA_DSCRB_STATUS,M_DMA_DSCRB_STATUS) | 276 | #define G_DMA_DSCRB_STATUS(x) _SB_GETVALUE(x,S_DMA_DSCRB_STATUS,M_DMA_DSCRB_STATUS) |
277 | 277 | ||
278 | /* | 278 | /* |
279 | * Ethernet Descriptor Status Bits (Table 7-15) | 279 | * Ethernet Descriptor Status Bits (Table 7-15) |
280 | */ | 280 | */ |
281 | 281 | ||
282 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) | 282 | #define M_DMA_ETHRX_BADIP4CS _SB_MAKEMASK1(51) |
283 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) | 283 | #define M_DMA_ETHRX_DSCRERR _SB_MAKEMASK1(52) |
284 | 284 | ||
285 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 285 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
286 | /* Note: BADTCPCS is actually in DSCR_B options field */ | 286 | /* Note: BADTCPCS is actually in DSCR_B options field */ |
287 | #define M_DMA_ETHRX_BADTCPCS _SB_MAKEMASK1(0) | 287 | #define M_DMA_ETHRX_BADTCPCS _SB_MAKEMASK1(0) |
288 | #endif /* 1250 PASS2 || 112x PASS1 */ | 288 | #endif /* 1250 PASS2 || 112x PASS1 */ |
@@ -324,7 +324,7 @@ | |||
324 | 324 | ||
325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) | 325 | #define M_DMA_ETHTX_SOP _SB_MAKEMASK1(63) |
326 | 326 | ||
327 | /* | 327 | /* |
328 | * Ethernet Transmit Options (Table 7-17) | 328 | * Ethernet Transmit Options (Table 7-17) |
329 | */ | 329 | */ |
330 | 330 | ||
@@ -377,7 +377,7 @@ | |||
377 | * Data Mover Registers | 377 | * Data Mover Registers |
378 | ********************************************************************* */ | 378 | ********************************************************************* */ |
379 | 379 | ||
380 | /* | 380 | /* |
381 | * Data Mover Descriptor Base Address Register (Table 7-22) | 381 | * Data Mover Descriptor Base Address Register (Table 7-22) |
382 | * Register: DM_DSCR_BASE_0 | 382 | * Register: DM_DSCR_BASE_0 |
383 | * Register: DM_DSCR_BASE_1 | 383 | * Register: DM_DSCR_BASE_1 |
@@ -414,7 +414,7 @@ | |||
414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) | 414 | #define M_DM_DSCR_BASE_ABORT _SB_MAKEMASK1(62) |
415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) | 415 | #define M_DM_DSCR_BASE_ENABL _SB_MAKEMASK1(63) |
416 | 416 | ||
417 | /* | 417 | /* |
418 | * Data Mover Descriptor Count Register (Table 7-25) | 418 | * Data Mover Descriptor Count Register (Table 7-25) |
419 | */ | 419 | */ |
420 | 420 | ||
diff --git a/include/asm-mips/sibyte/sb1250_genbus.h b/include/asm-mips/sibyte/sb1250_genbus.h index 0d9dfac3d7db..f1f509f295c4 100644 --- a/include/asm-mips/sibyte/sb1250_genbus.h +++ b/include/asm-mips/sibyte/sb1250_genbus.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Generic Bus Constants File: sb1250_genbus.h | 4 | * Generic Bus Constants File: sb1250_genbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's Generic Bus interface | 7 | * manipulating the SB1250's Generic Bus interface |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_int.h b/include/asm-mips/sibyte/sb1250_int.h index c3f74df211f4..e173e2ea4c98 100644 --- a/include/asm-mips/sibyte/sb1250_int.h +++ b/include/asm-mips/sibyte/sb1250_int.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Interrupt Mapper definitions File: sb1250_int.h | 4 | * Interrupt Mapper definitions File: sb1250_int.h |
5 | * | 5 | * |
6 | * This module contains constants for manipulating the SB1250's | 6 | * This module contains constants for manipulating the SB1250's |
7 | * interrupt mapper and definitions for the interrupt sources. | 7 | * interrupt mapper and definitions for the interrupt sources. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -43,7 +43,7 @@ | |||
43 | 43 | ||
44 | /* | 44 | /* |
45 | * Interrupt sources (Table 4-8, UM 0.2) | 45 | * Interrupt sources (Table 4-8, UM 0.2) |
46 | * | 46 | * |
47 | * First, the interrupt numbers. | 47 | * First, the interrupt numbers. |
48 | */ | 48 | */ |
49 | 49 | ||
diff --git a/include/asm-mips/sibyte/sb1250_l2c.h b/include/asm-mips/sibyte/sb1250_l2c.h index 799db828d963..8afe8e01581b 100644 --- a/include/asm-mips/sibyte/sb1250_l2c.h +++ b/include/asm-mips/sibyte/sb1250_l2c.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * L2 Cache constants and macros File: sb1250_l2c.h | 4 | * L2 Cache constants and macros File: sb1250_l2c.h |
5 | * | 5 | * |
6 | * This module contains constants useful for manipulating the | 6 | * This module contains constants useful for manipulating the |
7 | * level 2 cache. | 7 | * level 2 cache. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_ldt.h b/include/asm-mips/sibyte/sb1250_ldt.h index d8753885df17..f2617ded0a8f 100644 --- a/include/asm-mips/sibyte/sb1250_ldt.h +++ b/include/asm-mips/sibyte/sb1250_ldt.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * LDT constants File: sb1250_ldt.h | 4 | * LDT constants File: sb1250_ldt.h |
5 | * | 5 | * |
6 | * This module contains constants and macros to describe | 6 | * This module contains constants and macros to describe |
7 | * the LDT interface on the SB1250. | 7 | * the LDT interface on the SB1250. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -155,7 +155,7 @@ | |||
155 | 155 | ||
156 | /* | 156 | /* |
157 | * LDT Status Register (Table 8-14). Note that these constants | 157 | * LDT Status Register (Table 8-14). Note that these constants |
158 | * assume you've read the command and status register | 158 | * assume you've read the command and status register |
159 | * together (32-bit read at offset 0x04) | 159 | * together (32-bit read at offset 0x04) |
160 | * | 160 | * |
161 | * These bits also apply to the secondary status | 161 | * These bits also apply to the secondary status |
@@ -183,8 +183,8 @@ | |||
183 | #define M_LDT_STATUS_DETPARERR _SB_MAKEMASK1_32(31) | 183 | #define M_LDT_STATUS_DETPARERR _SB_MAKEMASK1_32(31) |
184 | 184 | ||
185 | /* | 185 | /* |
186 | * Bridge Control Register (Table 8-16). Note that these | 186 | * Bridge Control Register (Table 8-16). Note that these |
187 | * constants assume you've read the register as a 32-bit | 187 | * constants assume you've read the register as a 32-bit |
188 | * read (offset 0x3C) | 188 | * read (offset 0x3C) |
189 | */ | 189 | */ |
190 | 190 | ||
diff --git a/include/asm-mips/sibyte/sb1250_mac.h b/include/asm-mips/sibyte/sb1250_mac.h index 81f603f03a98..18e74e43f4a2 100644 --- a/include/asm-mips/sibyte/sb1250_mac.h +++ b/include/asm-mips/sibyte/sb1250_mac.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * MAC constants and macros File: sb1250_mac.h | 4 | * MAC constants and macros File: sb1250_mac.h |
5 | * | 5 | * |
6 | * This module contains constants and macros for the SB1250's | 6 | * This module contains constants and macros for the SB1250's |
7 | * ethernet controllers. | 7 | * ethernet controllers. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -311,7 +311,7 @@ | |||
311 | 311 | ||
312 | /* | 312 | /* |
313 | * These constants are used to configure the fields within the Frame | 313 | * These constants are used to configure the fields within the Frame |
314 | * Configuration Register. | 314 | * Configuration Register. |
315 | */ | 315 | */ |
316 | 316 | ||
317 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ | 317 | #define K_MAC_IFG_RX_10 _SB_MAKE64(0) /* See table 176, not used */ |
@@ -393,7 +393,7 @@ | |||
393 | * Register: MAC_INT_MASK_2 | 393 | * Register: MAC_INT_MASK_2 |
394 | */ | 394 | */ |
395 | 395 | ||
396 | /* | 396 | /* |
397 | * Use these constants to shift the appropriate channel | 397 | * Use these constants to shift the appropriate channel |
398 | * into the CH0 position so the same tests can be used | 398 | * into the CH0 position so the same tests can be used |
399 | * on each channel. | 399 | * on each channel. |
diff --git a/include/asm-mips/sibyte/sb1250_mc.h b/include/asm-mips/sibyte/sb1250_mc.h index 93a48334b874..1dd41c927996 100644 --- a/include/asm-mips/sibyte/sb1250_mc.h +++ b/include/asm-mips/sibyte/sb1250_mc.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Memory Controller constants File: sb1250_mc.h | 4 | * Memory Controller constants File: sb1250_mc.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * programming the memory controller. | 7 | * programming the memory controller. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -166,7 +166,7 @@ | |||
166 | 166 | ||
167 | #define K_MC_REF_RATE_100MHz 0x62 | 167 | #define K_MC_REF_RATE_100MHz 0x62 |
168 | #define K_MC_REF_RATE_133MHz 0x81 | 168 | #define K_MC_REF_RATE_133MHz 0x81 |
169 | #define K_MC_REF_RATE_200MHz 0xC4 | 169 | #define K_MC_REF_RATE_200MHz 0xC4 |
170 | 170 | ||
171 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) | 171 | #define V_MC_REF_RATE_100MHz V_MC_REF_RATE(K_MC_REF_RATE_100MHz) |
172 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) | 172 | #define V_MC_REF_RATE_133MHz V_MC_REF_RATE(K_MC_REF_RATE_133MHz) |
@@ -228,7 +228,7 @@ | |||
228 | V_MC_ADDR_DRIVE_DEFAULT | \ | 228 | V_MC_ADDR_DRIVE_DEFAULT | \ |
229 | V_MC_DATA_DRIVE_DEFAULT | \ | 229 | V_MC_DATA_DRIVE_DEFAULT | \ |
230 | V_MC_CLOCK_DRIVE_DEFAULT | \ | 230 | V_MC_CLOCK_DRIVE_DEFAULT | \ |
231 | V_MC_REF_RATE_DEFAULT | 231 | V_MC_REF_RATE_DEFAULT |
232 | 232 | ||
233 | 233 | ||
234 | 234 | ||
diff --git a/include/asm-mips/sibyte/sb1250_regs.h b/include/asm-mips/sibyte/sb1250_regs.h index 5d496c6faba6..9db80cd13a79 100644 --- a/include/asm-mips/sibyte/sb1250_regs.h +++ b/include/asm-mips/sibyte/sb1250_regs.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * Register Definitions File: sb1250_regs.h | 4 | * Register Definitions File: sb1250_regs.h |
5 | * | 5 | * |
6 | * This module contains the addresses of the on-chip peripherals | 6 | * This module contains the addresses of the on-chip peripherals |
7 | * on the SB1250. | 7 | * on the SB1250. |
8 | * | 8 | * |
9 | * SB1250 specification level: 01/02/2002 | 9 | * SB1250 specification level: 01/02/2002 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -40,20 +40,20 @@ | |||
40 | 40 | ||
41 | /* ********************************************************************* | 41 | /* ********************************************************************* |
42 | * Some general notes: | 42 | * Some general notes: |
43 | * | 43 | * |
44 | * For the most part, when there is more than one peripheral | 44 | * For the most part, when there is more than one peripheral |
45 | * of the same type on the SOC, the constants below will be | 45 | * of the same type on the SOC, the constants below will be |
46 | * offsets from the base of each peripheral. For example, | 46 | * offsets from the base of each peripheral. For example, |
47 | * the MAC registers are described as offsets from the first | 47 | * the MAC registers are described as offsets from the first |
48 | * MAC register, and there will be a MAC_REGISTER() macro | 48 | * MAC register, and there will be a MAC_REGISTER() macro |
49 | * to calculate the base address of a given MAC. | 49 | * to calculate the base address of a given MAC. |
50 | * | 50 | * |
51 | * The information in this file is based on the SB1250 SOC | 51 | * The information in this file is based on the SB1250 SOC |
52 | * manual version 0.2, July 2000. | 52 | * manual version 0.2, July 2000. |
53 | ********************************************************************* */ | 53 | ********************************************************************* */ |
54 | 54 | ||
55 | 55 | ||
56 | /* ********************************************************************* | 56 | /* ********************************************************************* |
57 | * Memory Controller Registers | 57 | * Memory Controller Registers |
58 | ********************************************************************* */ | 58 | ********************************************************************* */ |
59 | 59 | ||
@@ -101,7 +101,7 @@ | |||
101 | #define R_MC_TEST_ECC 0x0000000420 | 101 | #define R_MC_TEST_ECC 0x0000000420 |
102 | #define R_MC_MCLK_CFG 0x0000000500 | 102 | #define R_MC_MCLK_CFG 0x0000000500 |
103 | 103 | ||
104 | /* ********************************************************************* | 104 | /* ********************************************************************* |
105 | * L2 Cache Control Registers | 105 | * L2 Cache Control Registers |
106 | ********************************************************************* */ | 106 | ********************************************************************* */ |
107 | 107 | ||
@@ -126,7 +126,7 @@ | |||
126 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG | 126 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG |
127 | 127 | ||
128 | 128 | ||
129 | /* ********************************************************************* | 129 | /* ********************************************************************* |
130 | * PCI Interface Registers | 130 | * PCI Interface Registers |
131 | ********************************************************************* */ | 131 | ********************************************************************* */ |
132 | 132 | ||
@@ -134,7 +134,7 @@ | |||
134 | #define A_PCI_TYPE01_HEADER 0x00DE000800 | 134 | #define A_PCI_TYPE01_HEADER 0x00DE000800 |
135 | 135 | ||
136 | 136 | ||
137 | /* ********************************************************************* | 137 | /* ********************************************************************* |
138 | * Ethernet DMA and MACs | 138 | * Ethernet DMA and MACs |
139 | ********************************************************************* */ | 139 | ********************************************************************* */ |
140 | 140 | ||
@@ -184,7 +184,7 @@ | |||
184 | (R_MAC_DMA_CHANNEL_BASE(txrx,chan) + \ | 184 | (R_MAC_DMA_CHANNEL_BASE(txrx,chan) + \ |
185 | (reg)) | 185 | (reg)) |
186 | 186 | ||
187 | /* | 187 | /* |
188 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE | 188 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE |
189 | */ | 189 | */ |
190 | 190 | ||
@@ -259,7 +259,7 @@ | |||
259 | #define MAC_CHMAP_COUNT 4 | 259 | #define MAC_CHMAP_COUNT 4 |
260 | 260 | ||
261 | 261 | ||
262 | /* ********************************************************************* | 262 | /* ********************************************************************* |
263 | * DUART Registers | 263 | * DUART Registers |
264 | ********************************************************************* */ | 264 | ********************************************************************* */ |
265 | 265 | ||
@@ -363,7 +363,7 @@ | |||
363 | #endif /* 1250 PASS2 || 112x PASS1 */ | 363 | #endif /* 1250 PASS2 || 112x PASS1 */ |
364 | 364 | ||
365 | 365 | ||
366 | /* ********************************************************************* | 366 | /* ********************************************************************* |
367 | * Synchronous Serial Registers | 367 | * Synchronous Serial Registers |
368 | ********************************************************************* */ | 368 | ********************************************************************* */ |
369 | 369 | ||
@@ -397,7 +397,7 @@ | |||
397 | (reg)) | 397 | (reg)) |
398 | 398 | ||
399 | 399 | ||
400 | /* | 400 | /* |
401 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE | 401 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE |
402 | */ | 402 | */ |
403 | 403 | ||
@@ -457,7 +457,7 @@ | |||
457 | #define R_SER_RMON_RX_ERRORS 0x000001F0 | 457 | #define R_SER_RMON_RX_ERRORS 0x000001F0 |
458 | #define R_SER_RMON_RX_BADADDR 0x000001F8 | 458 | #define R_SER_RMON_RX_BADADDR 0x000001F8 |
459 | 459 | ||
460 | /* ********************************************************************* | 460 | /* ********************************************************************* |
461 | * Generic Bus Registers | 461 | * Generic Bus Registers |
462 | ********************************************************************* */ | 462 | ********************************************************************* */ |
463 | 463 | ||
@@ -513,7 +513,7 @@ | |||
513 | #define R_IO_PCMCIA_CFG 0x0A60 | 513 | #define R_IO_PCMCIA_CFG 0x0A60 |
514 | #define R_IO_PCMCIA_STATUS 0x0A70 | 514 | #define R_IO_PCMCIA_STATUS 0x0A70 |
515 | 515 | ||
516 | /* ********************************************************************* | 516 | /* ********************************************************************* |
517 | * GPIO Registers | 517 | * GPIO Registers |
518 | ********************************************************************* */ | 518 | ********************************************************************* */ |
519 | 519 | ||
@@ -537,7 +537,7 @@ | |||
537 | #define R_GPIO_PIN_CLR 0x30 | 537 | #define R_GPIO_PIN_CLR 0x30 |
538 | #define R_GPIO_PIN_SET 0x38 | 538 | #define R_GPIO_PIN_SET 0x38 |
539 | 539 | ||
540 | /* ********************************************************************* | 540 | /* ********************************************************************* |
541 | * SMBus Registers | 541 | * SMBus Registers |
542 | ********************************************************************* */ | 542 | ********************************************************************* */ |
543 | 543 | ||
@@ -573,7 +573,7 @@ | |||
573 | #define R_SMB_CONTROL 0x0000000060 | 573 | #define R_SMB_CONTROL 0x0000000060 |
574 | #define R_SMB_PEC 0x0000000070 | 574 | #define R_SMB_PEC 0x0000000070 |
575 | 575 | ||
576 | /* ********************************************************************* | 576 | /* ********************************************************************* |
577 | * Timer Registers | 577 | * Timer Registers |
578 | ********************************************************************* */ | 578 | ********************************************************************* */ |
579 | 579 | ||
@@ -641,7 +641,7 @@ | |||
641 | #endif /* 1250 PASS2 || 112x PASS1 */ | 641 | #endif /* 1250 PASS2 || 112x PASS1 */ |
642 | 642 | ||
643 | 643 | ||
644 | /* ********************************************************************* | 644 | /* ********************************************************************* |
645 | * System Control Registers | 645 | * System Control Registers |
646 | ********************************************************************* */ | 646 | ********************************************************************* */ |
647 | 647 | ||
@@ -649,7 +649,7 @@ | |||
649 | #define A_SCD_SYSTEM_CFG 0x0010020008 | 649 | #define A_SCD_SYSTEM_CFG 0x0010020008 |
650 | #define A_SCD_SYSTEM_MANUF 0x0010038000 | 650 | #define A_SCD_SYSTEM_MANUF 0x0010038000 |
651 | 651 | ||
652 | /* ********************************************************************* | 652 | /* ********************************************************************* |
653 | * System Address Trap Registers | 653 | * System Address Trap Registers |
654 | ********************************************************************* */ | 654 | ********************************************************************* */ |
655 | 655 | ||
@@ -672,7 +672,7 @@ | |||
672 | #endif /* 1250 PASS2 || 112x PASS1 */ | 672 | #endif /* 1250 PASS2 || 112x PASS1 */ |
673 | 673 | ||
674 | 674 | ||
675 | /* ********************************************************************* | 675 | /* ********************************************************************* |
676 | * System Interrupt Mapper Registers | 676 | * System Interrupt Mapper Registers |
677 | ********************************************************************* */ | 677 | ********************************************************************* */ |
678 | 678 | ||
@@ -701,7 +701,7 @@ | |||
701 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 | 701 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 |
702 | #define R_IMR_INTERRUPT_MAP_COUNT 64 | 702 | #define R_IMR_INTERRUPT_MAP_COUNT 64 |
703 | 703 | ||
704 | /* ********************************************************************* | 704 | /* ********************************************************************* |
705 | * System Performance Counter Registers | 705 | * System Performance Counter Registers |
706 | ********************************************************************* */ | 706 | ********************************************************************* */ |
707 | 707 | ||
@@ -711,7 +711,7 @@ | |||
711 | #define A_SCD_PERF_CNT_2 0x00100204E0 | 711 | #define A_SCD_PERF_CNT_2 0x00100204E0 |
712 | #define A_SCD_PERF_CNT_3 0x00100204E8 | 712 | #define A_SCD_PERF_CNT_3 0x00100204E8 |
713 | 713 | ||
714 | /* ********************************************************************* | 714 | /* ********************************************************************* |
715 | * System Bus Watcher Registers | 715 | * System Bus Watcher Registers |
716 | ********************************************************************* */ | 716 | ********************************************************************* */ |
717 | 717 | ||
@@ -726,13 +726,13 @@ | |||
726 | #define A_BUS_L2_ERRORS 0x00100208C0 | 726 | #define A_BUS_L2_ERRORS 0x00100208C0 |
727 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 | 727 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 |
728 | 728 | ||
729 | /* ********************************************************************* | 729 | /* ********************************************************************* |
730 | * System Debug Controller Registers | 730 | * System Debug Controller Registers |
731 | ********************************************************************* */ | 731 | ********************************************************************* */ |
732 | 732 | ||
733 | #define A_SCD_JTAG_BASE 0x0010000000 | 733 | #define A_SCD_JTAG_BASE 0x0010000000 |
734 | 734 | ||
735 | /* ********************************************************************* | 735 | /* ********************************************************************* |
736 | * System Trace Buffer Registers | 736 | * System Trace Buffer Registers |
737 | ********************************************************************* */ | 737 | ********************************************************************* */ |
738 | 738 | ||
@@ -755,7 +755,7 @@ | |||
755 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 | 755 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 |
756 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 | 756 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 |
757 | 757 | ||
758 | /* ********************************************************************* | 758 | /* ********************************************************************* |
759 | * System Generic DMA Registers | 759 | * System Generic DMA Registers |
760 | ********************************************************************* */ | 760 | ********************************************************************* */ |
761 | 761 | ||
diff --git a/include/asm-mips/sibyte/sb1250_scd.h b/include/asm-mips/sibyte/sb1250_scd.h index 22e8041959e2..dbbd682fb47e 100644 --- a/include/asm-mips/sibyte/sb1250_scd.h +++ b/include/asm-mips/sibyte/sb1250_scd.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * SCD Constants and Macros File: sb1250_scd.h | 4 | * SCD Constants and Macros File: sb1250_scd.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the System Control and Debug module on the 1250. | 7 | * manipulating the System Control and Debug module on the 1250. |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -130,40 +130,40 @@ | |||
130 | /* System Manufacturing Register | 130 | /* System Manufacturing Register |
131 | * Register: SCD_SYSTEM_MANUF | 131 | * Register: SCD_SYSTEM_MANUF |
132 | */ | 132 | */ |
133 | 133 | ||
134 | /* Wafer ID: bits 31:0 */ | 134 | /* Wafer ID: bits 31:0 */ |
135 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) | 135 | #define S_SYS_WAFERID1_200 _SB_MAKE64(0) |
136 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32,S_SYS_WAFERID1_200) | 136 | #define M_SYS_WAFERID1_200 _SB_MAKEMASK(32,S_SYS_WAFERID1_200) |
137 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID1_200) | 137 | #define V_SYS_WAFERID1_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID1_200) |
138 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x,S_SYS_WAFERID1_200,M_SYS_WAFERID1_200) | 138 | #define G_SYS_WAFERID1_200(x) _SB_GETVALUE(x,S_SYS_WAFERID1_200,M_SYS_WAFERID1_200) |
139 | 139 | ||
140 | #define S_SYS_BIN _SB_MAKE64(32) | 140 | #define S_SYS_BIN _SB_MAKE64(32) |
141 | #define M_SYS_BIN _SB_MAKEMASK(4,S_SYS_BIN) | 141 | #define M_SYS_BIN _SB_MAKEMASK(4,S_SYS_BIN) |
142 | #define V_SYS_BIN _SB_MAKEVALUE(x,S_SYS_BIN) | 142 | #define V_SYS_BIN _SB_MAKEVALUE(x,S_SYS_BIN) |
143 | #define G_SYS_BIN _SB_GETVALUE(x,S_SYS_BIN,M_SYS_BIN) | 143 | #define G_SYS_BIN _SB_GETVALUE(x,S_SYS_BIN,M_SYS_BIN) |
144 | 144 | ||
145 | /* Wafer ID: bits 39:36 */ | 145 | /* Wafer ID: bits 39:36 */ |
146 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) | 146 | #define S_SYS_WAFERID2_200 _SB_MAKE64(36) |
147 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4,S_SYS_WAFERID2_200) | 147 | #define M_SYS_WAFERID2_200 _SB_MAKEMASK(4,S_SYS_WAFERID2_200) |
148 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID2_200) | 148 | #define V_SYS_WAFERID2_200(x) _SB_MAKEVALUE(x,S_SYS_WAFERID2_200) |
149 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x,S_SYS_WAFERID2_200,M_SYS_WAFERID2_200) | 149 | #define G_SYS_WAFERID2_200(x) _SB_GETVALUE(x,S_SYS_WAFERID2_200,M_SYS_WAFERID2_200) |
150 | 150 | ||
151 | /* Wafer ID: bits 39:0 */ | 151 | /* Wafer ID: bits 39:0 */ |
152 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) | 152 | #define S_SYS_WAFERID_300 _SB_MAKE64(0) |
153 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40,S_SYS_WAFERID_300) | 153 | #define M_SYS_WAFERID_300 _SB_MAKEMASK(40,S_SYS_WAFERID_300) |
154 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x,S_SYS_WAFERID_300) | 154 | #define V_SYS_WAFERID_300(x) _SB_MAKEVALUE(x,S_SYS_WAFERID_300) |
155 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x,S_SYS_WAFERID_300,M_SYS_WAFERID_300) | 155 | #define G_SYS_WAFERID_300(x) _SB_GETVALUE(x,S_SYS_WAFERID_300,M_SYS_WAFERID_300) |
156 | 156 | ||
157 | #define S_SYS_XPOS _SB_MAKE64(40) | 157 | #define S_SYS_XPOS _SB_MAKE64(40) |
158 | #define M_SYS_XPOS _SB_MAKEMASK(6,S_SYS_XPOS) | 158 | #define M_SYS_XPOS _SB_MAKEMASK(6,S_SYS_XPOS) |
159 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x,S_SYS_XPOS) | 159 | #define V_SYS_XPOS(x) _SB_MAKEVALUE(x,S_SYS_XPOS) |
160 | #define G_SYS_XPOS(x) _SB_GETVALUE(x,S_SYS_XPOS,M_SYS_XPOS) | 160 | #define G_SYS_XPOS(x) _SB_GETVALUE(x,S_SYS_XPOS,M_SYS_XPOS) |
161 | 161 | ||
162 | #define S_SYS_YPOS _SB_MAKE64(46) | 162 | #define S_SYS_YPOS _SB_MAKE64(46) |
163 | #define M_SYS_YPOS _SB_MAKEMASK(6,S_SYS_YPOS) | 163 | #define M_SYS_YPOS _SB_MAKEMASK(6,S_SYS_YPOS) |
164 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x,S_SYS_YPOS) | 164 | #define V_SYS_YPOS(x) _SB_MAKEVALUE(x,S_SYS_YPOS) |
165 | #define G_SYS_YPOS(x) _SB_GETVALUE(x,S_SYS_YPOS,M_SYS_YPOS) | 165 | #define G_SYS_YPOS(x) _SB_GETVALUE(x,S_SYS_YPOS,M_SYS_YPOS) |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * System Config Register (Table 4-2) | 168 | * System Config Register (Table 4-2) |
169 | * Register: SCD_SYSTEM_CFG | 169 | * Register: SCD_SYSTEM_CFG |
diff --git a/include/asm-mips/sibyte/sb1250_smbus.h b/include/asm-mips/sibyte/sb1250_smbus.h index 287cbfe9efa2..335c53e92936 100644 --- a/include/asm-mips/sibyte/sb1250_smbus.h +++ b/include/asm-mips/sibyte/sb1250_smbus.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * SMBUS Constants File: sb1250_smbus.h | 4 | * SMBUS Constants File: sb1250_smbus.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's SMbus devices. | 7 | * manipulating the SB1250's SMbus devices. |
8 | * | 8 | * |
9 | * SB1250 specification level: 01/02/2002 | 9 | * SB1250 specification level: 01/02/2002 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_syncser.h b/include/asm-mips/sibyte/sb1250_syncser.h index 8d5e8edd3c4b..fa2760d38b8b 100644 --- a/include/asm-mips/sibyte/sb1250_syncser.h +++ b/include/asm-mips/sibyte/sb1250_syncser.h | |||
@@ -7,17 +7,17 @@ | |||
7 | * manipulating the SB1250's Synchronous Serial | 7 | * manipulating the SB1250's Synchronous Serial |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
diff --git a/include/asm-mips/sibyte/sb1250_uart.h b/include/asm-mips/sibyte/sb1250_uart.h index 7655d6945cca..923ea4f44e0f 100644 --- a/include/asm-mips/sibyte/sb1250_uart.h +++ b/include/asm-mips/sibyte/sb1250_uart.h | |||
@@ -1,23 +1,23 @@ | |||
1 | /* ********************************************************************* | 1 | /* ********************************************************************* |
2 | * SB1250 Board Support Package | 2 | * SB1250 Board Support Package |
3 | * | 3 | * |
4 | * UART Constants File: sb1250_uart.h | 4 | * UART Constants File: sb1250_uart.h |
5 | * | 5 | * |
6 | * This module contains constants and macros useful for | 6 | * This module contains constants and macros useful for |
7 | * manipulating the SB1250's UARTs | 7 | * manipulating the SB1250's UARTs |
8 | * | 8 | * |
9 | * SB1250 specification level: User's manual 1/02/02 | 9 | * SB1250 specification level: User's manual 1/02/02 |
10 | * | 10 | * |
11 | * Author: Mitch Lichtenberg | 11 | * Author: Mitch Lichtenberg |
12 | * | 12 | * |
13 | ********************************************************************* | 13 | ********************************************************************* |
14 | * | 14 | * |
15 | * Copyright 2000,2001,2002,2003 | 15 | * Copyright 2000,2001,2002,2003 |
16 | * Broadcom Corporation. All rights reserved. | 16 | * Broadcom Corporation. All rights reserved. |
17 | * | 17 | * |
18 | * This program is free software; you can redistribute it and/or | 18 | * This program is free software; you can redistribute it and/or |
19 | * modify it under the terms of the GNU General Public License as | 19 | * modify it under the terms of the GNU General Public License as |
20 | * published by the Free Software Foundation; either version 2 of | 20 | * published by the Free Software Foundation; either version 2 of |
21 | * the License, or (at your option) any later version. | 21 | * the License, or (at your option) any later version. |
22 | * | 22 | * |
23 | * This program is distributed in the hope that it will be useful, | 23 | * This program is distributed in the hope that it will be useful, |
@@ -27,7 +27,7 @@ | |||
27 | * | 27 | * |
28 | * You should have received a copy of the GNU General Public License | 28 | * You should have received a copy of the GNU General Public License |
29 | * along with this program; if not, write to the Free Software | 29 | * along with this program; if not, write to the Free Software |
30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 30 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
31 | * MA 02111-1307 USA | 31 | * MA 02111-1307 USA |
32 | ********************************************************************* */ | 32 | ********************************************************************* */ |
33 | 33 | ||
@@ -37,7 +37,7 @@ | |||
37 | 37 | ||
38 | #include "sb1250_defs.h" | 38 | #include "sb1250_defs.h" |
39 | 39 | ||
40 | /* ********************************************************************** | 40 | /* ********************************************************************** |
41 | * DUART Registers | 41 | * DUART Registers |
42 | ********************************************************************** */ | 42 | ********************************************************************** */ |
43 | 43 | ||
@@ -145,7 +145,7 @@ | |||
145 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) | 145 | #define V_DUART_MISC_CMD_START_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_START_BREAK) |
146 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) | 146 | #define V_DUART_MISC_CMD_STOP_BREAK V_DUART_MISC_CMD(K_DUART_MISC_CMD_STOP_BREAK) |
147 | 147 | ||
148 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) | 148 | #define M_DUART_CMD_RESERVED _SB_MAKEMASK1(7) |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * DUART Status Register (Table 10-6) | 151 | * DUART Status Register (Table 10-6) |
@@ -165,7 +165,7 @@ | |||
165 | 165 | ||
166 | /* | 166 | /* |
167 | * DUART Baud Rate Register (Table 10-7) | 167 | * DUART Baud Rate Register (Table 10-7) |
168 | * Register: DUART_CLK_SEL_A | 168 | * Register: DUART_CLK_SEL_A |
169 | * Register: DUART_CLK_SEL_B | 169 | * Register: DUART_CLK_SEL_B |
170 | */ | 170 | */ |
171 | 171 | ||
@@ -332,7 +332,7 @@ | |||
332 | (chan == 0 ? M_DUART_OUT_PIN_CLR0 : M_DUART_OUT_PIN_CLR1) | 332 | (chan == 0 ? M_DUART_OUT_PIN_CLR0 : M_DUART_OUT_PIN_CLR1) |
333 | 333 | ||
334 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) | 334 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
335 | /* | 335 | /* |
336 | * Full Interrupt Control Register | 336 | * Full Interrupt Control Register |
337 | */ | 337 | */ |
338 | 338 | ||
diff --git a/include/asm-mips/sigcontext.h b/include/asm-mips/sigcontext.h index 18939e84b6f2..f7fbebaa0744 100644 --- a/include/asm-mips/sigcontext.h +++ b/include/asm-mips/sigcontext.h | |||
@@ -10,7 +10,7 @@ | |||
10 | #define _ASM_SIGCONTEXT_H | 10 | #define _ASM_SIGCONTEXT_H |
11 | 11 | ||
12 | #include <asm/sgidefs.h> | 12 | #include <asm/sgidefs.h> |
13 | 13 | ||
14 | #if _MIPS_SIM == _MIPS_SIM_ABI32 | 14 | #if _MIPS_SIM == _MIPS_SIM_ABI32 |
15 | 15 | ||
16 | /* | 16 | /* |
@@ -38,7 +38,7 @@ struct sigcontext { | |||
38 | }; | 38 | }; |
39 | 39 | ||
40 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 40 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
41 | 41 | ||
42 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 | 42 | #if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 |
43 | 43 | ||
44 | /* | 44 | /* |
diff --git a/include/asm-mips/siginfo.h b/include/asm-mips/siginfo.h index a0e26e6c994d..698becab5a9e 100644 --- a/include/asm-mips/siginfo.h +++ b/include/asm-mips/siginfo.h | |||
@@ -25,10 +25,10 @@ struct siginfo; | |||
25 | /* | 25 | /* |
26 | * Careful to keep union _sifields from shifting ... | 26 | * Careful to keep union _sifields from shifting ... |
27 | */ | 27 | */ |
28 | #ifdef CONFIG_MIPS32 | 28 | #ifdef CONFIG_32BIT |
29 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) | 29 | #define __ARCH_SI_PREAMBLE_SIZE (3 * sizeof(int)) |
30 | #endif | 30 | #endif |
31 | #ifdef CONFIG_MIPS64 | 31 | #ifdef CONFIG_64BIT |
32 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) | 32 | #define __ARCH_SI_PREAMBLE_SIZE (4 * sizeof(int)) |
33 | #endif | 33 | #endif |
34 | 34 | ||
diff --git a/include/asm-mips/sim.h b/include/asm-mips/sim.h index 6333169be329..3ccfe09fa744 100644 --- a/include/asm-mips/sim.h +++ b/include/asm-mips/sim.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define __str2(x) #x | 16 | #define __str2(x) #x |
17 | #define __str(x) __str2(x) | 17 | #define __str(x) __str2(x) |
18 | 18 | ||
19 | #ifdef CONFIG_MIPS32 | 19 | #ifdef CONFIG_32BIT |
20 | 20 | ||
21 | #define save_static_function(symbol) \ | 21 | #define save_static_function(symbol) \ |
22 | __asm__ ( \ | 22 | __asm__ ( \ |
@@ -42,9 +42,9 @@ __asm__ ( \ | |||
42 | 42 | ||
43 | #define nabi_no_regargs | 43 | #define nabi_no_regargs |
44 | 44 | ||
45 | #endif /* CONFIG_MIPS32 */ | 45 | #endif /* CONFIG_32BIT */ |
46 | 46 | ||
47 | #ifdef CONFIG_MIPS64 | 47 | #ifdef CONFIG_64BIT |
48 | 48 | ||
49 | #define save_static_function(symbol) \ | 49 | #define save_static_function(symbol) \ |
50 | __asm__ ( \ | 50 | __asm__ ( \ |
@@ -78,6 +78,6 @@ __asm__ ( \ | |||
78 | unsigned long __dummy6, \ | 78 | unsigned long __dummy6, \ |
79 | unsigned long __dummy7, | 79 | unsigned long __dummy7, |
80 | 80 | ||
81 | #endif /* CONFIG_MIPS64 */ | 81 | #endif /* CONFIG_64BIT */ |
82 | 82 | ||
83 | #endif /* _ASM_SIM_H */ | 83 | #endif /* _ASM_SIM_H */ |
diff --git a/include/asm-mips/socket.h b/include/asm-mips/socket.h index d478a86294ee..753b6620e6fa 100644 --- a/include/asm-mips/socket.h +++ b/include/asm-mips/socket.h | |||
@@ -82,7 +82,7 @@ To add: #define SO_REUSEPORT 0x0200 /* Allow local address and port reuse. */ | |||
82 | * @SOCK_STREAM - stream (connection) socket | 82 | * @SOCK_STREAM - stream (connection) socket |
83 | * @SOCK_RAW - raw socket | 83 | * @SOCK_RAW - raw socket |
84 | * @SOCK_RDM - reliably-delivered message | 84 | * @SOCK_RDM - reliably-delivered message |
85 | * @SOCK_SEQPACKET - sequential packet socket | 85 | * @SOCK_SEQPACKET - sequential packet socket |
86 | * @SOCK_PACKET - linux specific way of getting packets at the dev level. | 86 | * @SOCK_PACKET - linux specific way of getting packets at the dev level. |
87 | * For writing rarp and other similar things on the user level. | 87 | * For writing rarp and other similar things on the user level. |
88 | */ | 88 | */ |
diff --git a/include/asm-mips/stackframe.h b/include/asm-mips/stackframe.h index 86283c25fd5b..fb42f99f8527 100644 --- a/include/asm-mips/stackframe.h +++ b/include/asm-mips/stackframe.h | |||
@@ -26,7 +26,7 @@ | |||
26 | 26 | ||
27 | .macro SAVE_TEMP | 27 | .macro SAVE_TEMP |
28 | mfhi v1 | 28 | mfhi v1 |
29 | #ifdef CONFIG_MIPS32 | 29 | #ifdef CONFIG_32BIT |
30 | LONG_S $8, PT_R8(sp) | 30 | LONG_S $8, PT_R8(sp) |
31 | LONG_S $9, PT_R9(sp) | 31 | LONG_S $9, PT_R9(sp) |
32 | #endif | 32 | #endif |
@@ -56,7 +56,7 @@ | |||
56 | 56 | ||
57 | #ifdef CONFIG_SMP | 57 | #ifdef CONFIG_SMP |
58 | .macro get_saved_sp /* SMP variation */ | 58 | .macro get_saved_sp /* SMP variation */ |
59 | #ifdef CONFIG_MIPS32 | 59 | #ifdef CONFIG_32BIT |
60 | mfc0 k0, CP0_CONTEXT | 60 | mfc0 k0, CP0_CONTEXT |
61 | lui k1, %hi(kernelsp) | 61 | lui k1, %hi(kernelsp) |
62 | srl k0, k0, 23 | 62 | srl k0, k0, 23 |
@@ -64,7 +64,7 @@ | |||
64 | addu k1, k0 | 64 | addu k1, k0 |
65 | LONG_L k1, %lo(kernelsp)(k1) | 65 | LONG_L k1, %lo(kernelsp)(k1) |
66 | #endif | 66 | #endif |
67 | #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) | 67 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
68 | MFC0 k1, CP0_CONTEXT | 68 | MFC0 k1, CP0_CONTEXT |
69 | dsra k1, 23 | 69 | dsra k1, 23 |
70 | lui k0, %hi(pgd_current) | 70 | lui k0, %hi(pgd_current) |
@@ -74,7 +74,7 @@ | |||
74 | daddu k1, k0 | 74 | daddu k1, k0 |
75 | LONG_L k1, %lo(kernelsp)(k1) | 75 | LONG_L k1, %lo(kernelsp)(k1) |
76 | #endif | 76 | #endif |
77 | #if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) | 77 | #if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) |
78 | MFC0 k1, CP0_CONTEXT | 78 | MFC0 k1, CP0_CONTEXT |
79 | dsrl k1, 23 | 79 | dsrl k1, 23 |
80 | dsll k1, k1, 3 | 80 | dsll k1, k1, 3 |
@@ -83,20 +83,20 @@ | |||
83 | .endm | 83 | .endm |
84 | 84 | ||
85 | .macro set_saved_sp stackp temp temp2 | 85 | .macro set_saved_sp stackp temp temp2 |
86 | #ifdef CONFIG_MIPS32 | 86 | #ifdef CONFIG_32BIT |
87 | mfc0 \temp, CP0_CONTEXT | 87 | mfc0 \temp, CP0_CONTEXT |
88 | srl \temp, 23 | 88 | srl \temp, 23 |
89 | sll \temp, 2 | 89 | sll \temp, 2 |
90 | LONG_S \stackp, kernelsp(\temp) | 90 | LONG_S \stackp, kernelsp(\temp) |
91 | #endif | 91 | #endif |
92 | #if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64) | 92 | #if defined(CONFIG_64BIT) && !defined(CONFIG_BUILD_ELF64) |
93 | lw \temp, TI_CPU(gp) | 93 | lw \temp, TI_CPU(gp) |
94 | dsll \temp, 3 | 94 | dsll \temp, 3 |
95 | lui \temp2, %hi(kernelsp) | 95 | lui \temp2, %hi(kernelsp) |
96 | daddu \temp, \temp2 | 96 | daddu \temp, \temp2 |
97 | LONG_S \stackp, %lo(kernelsp)(\temp) | 97 | LONG_S \stackp, %lo(kernelsp)(\temp) |
98 | #endif | 98 | #endif |
99 | #if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64) | 99 | #if defined(CONFIG_64BIT) && defined(CONFIG_BUILD_ELF64) |
100 | lw \temp, TI_CPU(gp) | 100 | lw \temp, TI_CPU(gp) |
101 | dsll \temp, 3 | 101 | dsll \temp, 3 |
102 | LONG_S \stackp, kernelsp(\temp) | 102 | LONG_S \stackp, kernelsp(\temp) |
@@ -140,7 +140,7 @@ | |||
140 | LONG_S $6, PT_R6(sp) | 140 | LONG_S $6, PT_R6(sp) |
141 | MFC0 v1, CP0_EPC | 141 | MFC0 v1, CP0_EPC |
142 | LONG_S $7, PT_R7(sp) | 142 | LONG_S $7, PT_R7(sp) |
143 | #ifdef CONFIG_MIPS64 | 143 | #ifdef CONFIG_64BIT |
144 | LONG_S $8, PT_R8(sp) | 144 | LONG_S $8, PT_R8(sp) |
145 | LONG_S $9, PT_R9(sp) | 145 | LONG_S $9, PT_R9(sp) |
146 | #endif | 146 | #endif |
@@ -169,7 +169,7 @@ | |||
169 | 169 | ||
170 | .macro RESTORE_TEMP | 170 | .macro RESTORE_TEMP |
171 | LONG_L $24, PT_LO(sp) | 171 | LONG_L $24, PT_LO(sp) |
172 | #ifdef CONFIG_MIPS32 | 172 | #ifdef CONFIG_32BIT |
173 | LONG_L $8, PT_R8(sp) | 173 | LONG_L $8, PT_R8(sp) |
174 | LONG_L $9, PT_R9(sp) | 174 | LONG_L $9, PT_R9(sp) |
175 | #endif | 175 | #endif |
@@ -217,7 +217,7 @@ | |||
217 | LONG_L $31, PT_R31(sp) | 217 | LONG_L $31, PT_R31(sp) |
218 | LONG_L $28, PT_R28(sp) | 218 | LONG_L $28, PT_R28(sp) |
219 | LONG_L $25, PT_R25(sp) | 219 | LONG_L $25, PT_R25(sp) |
220 | #ifdef CONFIG_MIPS64 | 220 | #ifdef CONFIG_64BIT |
221 | LONG_L $8, PT_R8(sp) | 221 | LONG_L $8, PT_R8(sp) |
222 | LONG_L $9, PT_R9(sp) | 222 | LONG_L $9, PT_R9(sp) |
223 | #endif | 223 | #endif |
@@ -262,7 +262,7 @@ | |||
262 | LONG_L $31, PT_R31(sp) | 262 | LONG_L $31, PT_R31(sp) |
263 | LONG_L $28, PT_R28(sp) | 263 | LONG_L $28, PT_R28(sp) |
264 | LONG_L $25, PT_R25(sp) | 264 | LONG_L $25, PT_R25(sp) |
265 | #ifdef CONFIG_MIPS64 | 265 | #ifdef CONFIG_64BIT |
266 | LONG_L $8, PT_R8(sp) | 266 | LONG_L $8, PT_R8(sp) |
267 | LONG_L $9, PT_R9(sp) | 267 | LONG_L $9, PT_R9(sp) |
268 | #endif | 268 | #endif |
diff --git a/include/asm-mips/statfs.h b/include/asm-mips/statfs.h index 5076fec65780..c3ddf973c1c0 100644 --- a/include/asm-mips/statfs.h +++ b/include/asm-mips/statfs.h | |||
@@ -57,7 +57,7 @@ struct statfs64 { | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ | 59 | #endif /* _MIPS_SIM == _MIPS_SIM_ABI32 */ |
60 | 60 | ||
61 | #if _MIPS_SIM == _MIPS_SIM_ABI64 | 61 | #if _MIPS_SIM == _MIPS_SIM_ABI64 |
62 | 62 | ||
63 | struct statfs64 { /* Same as struct statfs */ | 63 | struct statfs64 { /* Same as struct statfs */ |
diff --git a/include/asm-mips/string.h b/include/asm-mips/string.h index b18345504f8a..5a06f6d13899 100644 --- a/include/asm-mips/string.h +++ b/include/asm-mips/string.h | |||
@@ -16,7 +16,7 @@ | |||
16 | * Most of the inline functions are rather naive implementations so I just | 16 | * Most of the inline functions are rather naive implementations so I just |
17 | * didn't bother updating them for 64-bit ... | 17 | * didn't bother updating them for 64-bit ... |
18 | */ | 18 | */ |
19 | #ifdef CONFIG_MIPS32 | 19 | #ifdef CONFIG_32BIT |
20 | 20 | ||
21 | #ifndef IN_STRING_C | 21 | #ifndef IN_STRING_C |
22 | 22 | ||
@@ -130,7 +130,7 @@ strncmp(__const__ char *__cs, __const__ char *__ct, size_t __count) | |||
130 | 130 | ||
131 | return __res; | 131 | return __res; |
132 | } | 132 | } |
133 | #endif /* CONFIG_MIPS32 */ | 133 | #endif /* CONFIG_32BIT */ |
134 | 134 | ||
135 | #define __HAVE_ARCH_MEMSET | 135 | #define __HAVE_ARCH_MEMSET |
136 | extern void *memset(void *__s, int __c, size_t __count); | 136 | extern void *memset(void *__s, int __c, size_t __count); |
@@ -141,7 +141,7 @@ extern void *memcpy(void *__to, __const__ void *__from, size_t __n); | |||
141 | #define __HAVE_ARCH_MEMMOVE | 141 | #define __HAVE_ARCH_MEMMOVE |
142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); | 142 | extern void *memmove(void *__dest, __const__ void *__src, size_t __n); |
143 | 143 | ||
144 | #ifdef CONFIG_MIPS32 | 144 | #ifdef CONFIG_32BIT |
145 | #define __HAVE_ARCH_MEMSCAN | 145 | #define __HAVE_ARCH_MEMSCAN |
146 | static __inline__ void *memscan(void *__addr, int __c, size_t __size) | 146 | static __inline__ void *memscan(void *__addr, int __c, size_t __size) |
147 | { | 147 | { |
@@ -161,6 +161,6 @@ static __inline__ void *memscan(void *__addr, int __c, size_t __size) | |||
161 | 161 | ||
162 | return __addr; | 162 | return __addr; |
163 | } | 163 | } |
164 | #endif /* CONFIG_MIPS32 */ | 164 | #endif /* CONFIG_32BIT */ |
165 | 165 | ||
166 | #endif /* _ASM_STRING_H */ | 166 | #endif /* _ASM_STRING_H */ |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 169f3d4265b1..6663efd49b27 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -208,7 +208,7 @@ static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | |||
208 | return retval; | 208 | return retval; |
209 | } | 209 | } |
210 | 210 | ||
211 | #ifdef CONFIG_MIPS64 | 211 | #ifdef CONFIG_64BIT |
212 | static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) | 212 | static inline __u64 __xchg_u64(volatile __u64 * m, __u64 val) |
213 | { | 213 | { |
214 | __u64 retval; | 214 | __u64 retval; |
@@ -330,7 +330,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, | |||
330 | return retval; | 330 | return retval; |
331 | } | 331 | } |
332 | 332 | ||
333 | #ifdef CONFIG_MIPS64 | 333 | #ifdef CONFIG_64BIT |
334 | static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, | 334 | static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, |
335 | unsigned long new) | 335 | unsigned long new) |
336 | { | 336 | { |
diff --git a/include/asm-mips/thread_info.h b/include/asm-mips/thread_info.h index 42fcd6f2c206..a70cb0854c8a 100644 --- a/include/asm-mips/thread_info.h +++ b/include/asm-mips/thread_info.h | |||
@@ -62,10 +62,10 @@ register struct thread_info *__current_thread_info __asm__("$28"); | |||
62 | #define current_thread_info() __current_thread_info | 62 | #define current_thread_info() __current_thread_info |
63 | 63 | ||
64 | /* thread information allocation */ | 64 | /* thread information allocation */ |
65 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_MIPS32) | 65 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_32BIT) |
66 | #define THREAD_SIZE_ORDER (1) | 66 | #define THREAD_SIZE_ORDER (1) |
67 | #endif | 67 | #endif |
68 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_MIPS64) | 68 | #if defined(CONFIG_PAGE_SIZE_4KB) && defined(CONFIG_64BIT) |
69 | #define THREAD_SIZE_ORDER (2) | 69 | #define THREAD_SIZE_ORDER (2) |
70 | #endif | 70 | #endif |
71 | #ifdef CONFIG_PAGE_SIZE_8KB | 71 | #ifdef CONFIG_PAGE_SIZE_8KB |
diff --git a/include/asm-mips/titan_dep.h b/include/asm-mips/titan_dep.h index fd9599e40a0a..fee1908c65d2 100644 --- a/include/asm-mips/titan_dep.h +++ b/include/asm-mips/titan_dep.h | |||
@@ -228,4 +228,4 @@ extern unsigned long ocd_base; | |||
228 | #define RM9K_READ_8(ofs, val) *(val) = *(volatile u8 *)(RM9000x2_BASE_ADDR+ofs) | 228 | #define RM9K_READ_8(ofs, val) *(val) = *(volatile u8 *)(RM9000x2_BASE_ADDR+ofs) |
229 | #define RM9K_READ_16(ofs, val) *(val) = *(volatile u16 *)(RM9000x2_BASE_ADDR+ofs) | 229 | #define RM9K_READ_16(ofs, val) *(val) = *(volatile u16 *)(RM9000x2_BASE_ADDR+ofs) |
230 | 230 | ||
231 | #endif | 231 | #endif |
diff --git a/include/asm-mips/tx4927/tx4927.h b/include/asm-mips/tx4927/tx4927.h index 5d939db6e220..3bb7f0087d68 100644 --- a/include/asm-mips/tx4927/tx4927.h +++ b/include/asm-mips/tx4927/tx4927.h | |||
@@ -45,14 +45,14 @@ | |||
45 | 45 | ||
46 | 46 | ||
47 | /* TX4927 SDRAM controller (64-bit registers) */ | 47 | /* TX4927 SDRAM controller (64-bit registers) */ |
48 | #define TX4927_SDRAMC_BASE 0x8000 | 48 | #define TX4927_SDRAMC_BASE 0x8000 |
49 | #define TX4927_SDRAMC_SDCCR0 0x8000 | 49 | #define TX4927_SDRAMC_SDCCR0 0x8000 |
50 | #define TX4927_SDRAMC_SDCCR1 0x8008 | 50 | #define TX4927_SDRAMC_SDCCR1 0x8008 |
51 | #define TX4927_SDRAMC_SDCCR2 0x8010 | 51 | #define TX4927_SDRAMC_SDCCR2 0x8010 |
52 | #define TX4927_SDRAMC_SDCCR3 0x8018 | 52 | #define TX4927_SDRAMC_SDCCR3 0x8018 |
53 | #define TX4927_SDRAMC_SDCTR 0x8040 | 53 | #define TX4927_SDRAMC_SDCTR 0x8040 |
54 | #define TX4927_SDRAMC_SDCMD 0x8058 | 54 | #define TX4927_SDRAMC_SDCMD 0x8058 |
55 | #define TX4927_SDRAMC_LIMIT 0x8fff | 55 | #define TX4927_SDRAMC_LIMIT 0x8fff |
56 | 56 | ||
57 | 57 | ||
58 | /* TX4927 external bus controller (64-bit registers) */ | 58 | /* TX4927 external bus controller (64-bit registers) */ |
@@ -289,8 +289,8 @@ | |||
289 | 289 | ||
290 | 290 | ||
291 | /* TX4927 serial port 0 (32-bit registers) */ | 291 | /* TX4927 serial port 0 (32-bit registers) */ |
292 | #define TX4927_SIO0_BASE 0xf300 | 292 | #define TX4927_SIO0_BASE 0xf300 |
293 | #define TX4927_SIO0_SILCR0 0xf300 | 293 | #define TX4927_SIO0_SILCR0 0xf300 |
294 | #define TX4927_SIO0_SILCR0_RESERVED_16_31 BM_16_31 | 294 | #define TX4927_SIO0_SILCR0_RESERVED_16_31 BM_16_31 |
295 | #define TX4927_SIO0_SILCR0_RWUB BM_15_15 | 295 | #define TX4927_SIO0_SILCR0_RWUB BM_15_15 |
296 | #define TX4927_SIO0_SILCR0_TWUB BM_14_14 | 296 | #define TX4927_SIO0_SILCR0_TWUB BM_14_14 |
@@ -309,7 +309,7 @@ | |||
309 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT (~BM_00_01) | 309 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT (~BM_00_01) |
310 | #define TX4927_SIO0_SILCR0_UMODE_DATA_8_BIT_MC BM_01_01 | 310 | #define TX4927_SIO0_SILCR0_UMODE_DATA_8_BIT_MC BM_01_01 |
311 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT_MC BM_00_01 | 311 | #define TX4927_SIO0_SILCR0_UMODE_DATA_7_BIT_MC BM_00_01 |
312 | #define TX4927_SIO0_SIDICR0 0xf304 | 312 | #define TX4927_SIO0_SIDICR0 0xf304 |
313 | #define TX4927_SIO0_SIDICR0_RESERVED_16_31 BM_16_31 | 313 | #define TX4927_SIO0_SIDICR0_RESERVED_16_31 BM_16_31 |
314 | #define TX4927_SIO0_SIDICR0_TDE BM_15_15 | 314 | #define TX4927_SIO0_SIDICR0_TDE BM_15_15 |
315 | #define TX4927_SIO0_SIDICR0_RDE BM_14_14 | 315 | #define TX4927_SIO0_SIDICR0_RDE BM_14_14 |
@@ -330,7 +330,7 @@ | |||
330 | #define TX4927_SIO0_SIDICR0_STIE_TRDY BM_02_02 | 330 | #define TX4927_SIO0_SIDICR0_STIE_TRDY BM_02_02 |
331 | #define TX4927_SIO0_SIDICR0_STIE_TXALS BM_01_01 | 331 | #define TX4927_SIO0_SIDICR0_STIE_TXALS BM_01_01 |
332 | #define TX4927_SIO0_SIDICR0_STIE_UBRKD BM_00_00 | 332 | #define TX4927_SIO0_SIDICR0_STIE_UBRKD BM_00_00 |
333 | #define TX4927_SIO0_SIDISR0 0xf308 | 333 | #define TX4927_SIO0_SIDISR0 0xf308 |
334 | #define TX4927_SIO0_SIDISR0_RESERVED_16_31 BM_16_31 | 334 | #define TX4927_SIO0_SIDISR0_RESERVED_16_31 BM_16_31 |
335 | #define TX4927_SIO0_SIDISR0_UBRK BM_15_15 | 335 | #define TX4927_SIO0_SIDISR0_UBRK BM_15_15 |
336 | #define TX4927_SIO0_SIDISR0_UVALID BM_14_14 | 336 | #define TX4927_SIO0_SIDISR0_UVALID BM_14_14 |
@@ -344,7 +344,7 @@ | |||
344 | #define TX4927_SIO0_SIDISR0_STIS BM_06_06 | 344 | #define TX4927_SIO0_SIDISR0_STIS BM_06_06 |
345 | #define TX4927_SIO0_SIDISR0_RESERVED_05_05 BM_05_05 | 345 | #define TX4927_SIO0_SIDISR0_RESERVED_05_05 BM_05_05 |
346 | #define TX4927_SIO0_SIDISR0_RFDN BM_00_04 | 346 | #define TX4927_SIO0_SIDISR0_RFDN BM_00_04 |
347 | #define TX4927_SIO0_SISCISR0 0xf30c | 347 | #define TX4927_SIO0_SISCISR0 0xf30c |
348 | #define TX4927_SIO0_SISCISR0_RESERVED_06_31 BM_06_31 | 348 | #define TX4927_SIO0_SISCISR0_RESERVED_06_31 BM_06_31 |
349 | #define TX4927_SIO0_SISCISR0_OERS BM_05_05 | 349 | #define TX4927_SIO0_SISCISR0_OERS BM_05_05 |
350 | #define TX4927_SIO0_SISCISR0_CTSS BM_04_04 | 350 | #define TX4927_SIO0_SISCISR0_CTSS BM_04_04 |
@@ -352,7 +352,7 @@ | |||
352 | #define TX4927_SIO0_SISCISR0_TRDY BM_02_02 | 352 | #define TX4927_SIO0_SISCISR0_TRDY BM_02_02 |
353 | #define TX4927_SIO0_SISCISR0_TXALS BM_01_01 | 353 | #define TX4927_SIO0_SISCISR0_TXALS BM_01_01 |
354 | #define TX4927_SIO0_SISCISR0_UBRKD BM_00_00 | 354 | #define TX4927_SIO0_SISCISR0_UBRKD BM_00_00 |
355 | #define TX4927_SIO0_SIFCR0 0xf310 | 355 | #define TX4927_SIO0_SIFCR0 0xf310 |
356 | #define TX4927_SIO0_SIFCR0_RESERVED_16_31 BM_16_31 | 356 | #define TX4927_SIO0_SIFCR0_RESERVED_16_31 BM_16_31 |
357 | #define TX4927_SIO0_SIFCR0_SWRST BM_16_31 | 357 | #define TX4927_SIO0_SIFCR0_SWRST BM_16_31 |
358 | #define TX4927_SIO0_SIFCR0_RESERVED_09_14 BM_09_14 | 358 | #define TX4927_SIO0_SIFCR0_RESERVED_09_14 BM_09_14 |
@@ -370,7 +370,7 @@ | |||
370 | #define TX4927_SIO0_SIFCR0_TFRST BM_02_02 | 370 | #define TX4927_SIO0_SIFCR0_TFRST BM_02_02 |
371 | #define TX4927_SIO0_SIFCR0_RFRST BM_01_01 | 371 | #define TX4927_SIO0_SIFCR0_RFRST BM_01_01 |
372 | #define TX4927_SIO0_SIFCR0_FRSTE BM_00_00 | 372 | #define TX4927_SIO0_SIFCR0_FRSTE BM_00_00 |
373 | #define TX4927_SIO0_SIFLCR0 0xf314 | 373 | #define TX4927_SIO0_SIFLCR0 0xf314 |
374 | #define TX4927_SIO0_SIFLCR0_RESERVED_13_31 BM_13_31 | 374 | #define TX4927_SIO0_SIFLCR0_RESERVED_13_31 BM_13_31 |
375 | #define TX4927_SIO0_SIFLCR0_RCS BM_12_12 | 375 | #define TX4927_SIO0_SIFLCR0_RCS BM_12_12 |
376 | #define TX4927_SIO0_SIFLCR0_TES BM_11_11 | 376 | #define TX4927_SIO0_SIFLCR0_TES BM_11_11 |
@@ -381,7 +381,7 @@ | |||
381 | #define TX4927_SIO0_SIFLCR0_RESERVED_05_06 BM_05_06 | 381 | #define TX4927_SIO0_SIFLCR0_RESERVED_05_06 BM_05_06 |
382 | #define TX4927_SIO0_SIFLCR0_RTSTL BM_01_04 | 382 | #define TX4927_SIO0_SIFLCR0_RTSTL BM_01_04 |
383 | #define TX4927_SIO0_SIFLCR0_TBRK BM_00_00 | 383 | #define TX4927_SIO0_SIFLCR0_TBRK BM_00_00 |
384 | #define TX4927_SIO0_SIBGR0 0xf318 | 384 | #define TX4927_SIO0_SIBGR0 0xf318 |
385 | #define TX4927_SIO0_SIBGR0_RESERVED_10_31 BM_10_31 | 385 | #define TX4927_SIO0_SIBGR0_RESERVED_10_31 BM_10_31 |
386 | #define TX4927_SIO0_SIBGR0_BCLK BM_08_09 | 386 | #define TX4927_SIO0_SIBGR0_BCLK BM_08_09 |
387 | #define TX4927_SIO0_SIBGR0_BCLK_T0 (~BM_08_09) | 387 | #define TX4927_SIO0_SIBGR0_BCLK_T0 (~BM_08_09) |
@@ -389,28 +389,28 @@ | |||
389 | #define TX4927_SIO0_SIBGR0_BCLK_T4 BM_09_09 | 389 | #define TX4927_SIO0_SIBGR0_BCLK_T4 BM_09_09 |
390 | #define TX4927_SIO0_SIBGR0_BCLK_T6 BM_08_09 | 390 | #define TX4927_SIO0_SIBGR0_BCLK_T6 BM_08_09 |
391 | #define TX4927_SIO0_SIBGR0_BRD BM_00_07 | 391 | #define TX4927_SIO0_SIBGR0_BRD BM_00_07 |
392 | #define TX4927_SIO0_SITFIF00 0xf31c | 392 | #define TX4927_SIO0_SITFIF00 0xf31c |
393 | #define TX4927_SIO0_SITFIF00_RESERVED_08_31 BM_08_31 | 393 | #define TX4927_SIO0_SITFIF00_RESERVED_08_31 BM_08_31 |
394 | #define TX4927_SIO0_SITFIF00_TXD BM_00_07 | 394 | #define TX4927_SIO0_SITFIF00_TXD BM_00_07 |
395 | #define TX4927_SIO0_SIRFIFO0 0xf320 | 395 | #define TX4927_SIO0_SIRFIFO0 0xf320 |
396 | #define TX4927_SIO0_SIRFIFO0_RESERVED_08_31 BM_08_31 | 396 | #define TX4927_SIO0_SIRFIFO0_RESERVED_08_31 BM_08_31 |
397 | #define TX4927_SIO0_SIRFIFO0_RXD BM_00_07 | 397 | #define TX4927_SIO0_SIRFIFO0_RXD BM_00_07 |
398 | #define TX4927_SIO0_SIRFIFO0 0xf320 | 398 | #define TX4927_SIO0_SIRFIFO0 0xf320 |
399 | #define TX4927_SIO0_LIMIT 0xf3ff | 399 | #define TX4927_SIO0_LIMIT 0xf3ff |
400 | 400 | ||
401 | 401 | ||
402 | /* TX4927 serial port 1 (32-bit registers) */ | 402 | /* TX4927 serial port 1 (32-bit registers) */ |
403 | #define TX4927_SIO1_BASE 0xf400 | 403 | #define TX4927_SIO1_BASE 0xf400 |
404 | #define TX4927_SIO1_SILCR1 0xf400 | 404 | #define TX4927_SIO1_SILCR1 0xf400 |
405 | #define TX4927_SIO1_SIDICR1 0xf404 | 405 | #define TX4927_SIO1_SIDICR1 0xf404 |
406 | #define TX4927_SIO1_SIDISR1 0xf408 | 406 | #define TX4927_SIO1_SIDISR1 0xf408 |
407 | #define TX4927_SIO1_SISCISR1 0xf40c | 407 | #define TX4927_SIO1_SISCISR1 0xf40c |
408 | #define TX4927_SIO1_SIFCR1 0xf410 | 408 | #define TX4927_SIO1_SIFCR1 0xf410 |
409 | #define TX4927_SIO1_SIFLCR1 0xf414 | 409 | #define TX4927_SIO1_SIFLCR1 0xf414 |
410 | #define TX4927_SIO1_SIBGR1 0xf418 | 410 | #define TX4927_SIO1_SIBGR1 0xf418 |
411 | #define TX4927_SIO1_SITFIF01 0xf41c | 411 | #define TX4927_SIO1_SITFIF01 0xf41c |
412 | #define TX4927_SIO1_SIRFIFO1 0xf420 | 412 | #define TX4927_SIO1_SIRFIFO1 0xf420 |
413 | #define TX4927_SIO1_LIMIT 0xf4ff | 413 | #define TX4927_SIO1_LIMIT 0xf4ff |
414 | 414 | ||
415 | 415 | ||
416 | /* TX4927 parallel port (32-bit registers) */ | 416 | /* TX4927 parallel port (32-bit registers) */ |
diff --git a/include/asm-mips/tx4927/tx4927_pci.h b/include/asm-mips/tx4927/tx4927_pci.h index 170433492246..165f6b8b217f 100644 --- a/include/asm-mips/tx4927/tx4927_pci.h +++ b/include/asm-mips/tx4927/tx4927_pci.h | |||
@@ -5,8 +5,8 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 2000-2001 Toshiba Corporation | 6 | * Copyright (C) 2000-2001 Toshiba Corporation |
7 | */ | 7 | */ |
8 | #ifndef __ASM_TX4927_TX4927_PCI_H | 8 | #ifndef __ASM_TX4927_TX4927_PCI_H |
9 | #define __ASM_TX4927_TX4927_PCI_H | 9 | #define __ASM_TX4927_TX4927_PCI_H |
10 | 10 | ||
11 | #define TX4927_CCFG_TOE 0x00004000 | 11 | #define TX4927_CCFG_TOE 0x00004000 |
12 | 12 | ||
diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index d2f0c76b00a9..421b3aea14cc 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h | |||
@@ -78,7 +78,7 @@ typedef unsigned long long u64; | |||
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ | 80 | #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ |
81 | || defined(CONFIG_MIPS64) | 81 | || defined(CONFIG_64BIT) |
82 | typedef u64 dma_addr_t; | 82 | typedef u64 dma_addr_t; |
83 | #else | 83 | #else |
84 | typedef u32 dma_addr_t; | 84 | typedef u32 dma_addr_t; |
@@ -99,8 +99,6 @@ typedef u64 sector_t; | |||
99 | #define HAVE_SECTOR_T | 99 | #define HAVE_SECTOR_T |
100 | #endif | 100 | #endif |
101 | 101 | ||
102 | typedef unsigned short kmem_bufctl_t; | ||
103 | |||
104 | #endif /* __ASSEMBLY__ */ | 102 | #endif /* __ASSEMBLY__ */ |
105 | 103 | ||
106 | #endif /* __KERNEL__ */ | 104 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-mips/uaccess.h b/include/asm-mips/uaccess.h index 07114898e065..a543ead72ecf 100644 --- a/include/asm-mips/uaccess.h +++ b/include/asm-mips/uaccess.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * For historical reasons, these macros are grossly misnamed. | 23 | * For historical reasons, these macros are grossly misnamed. |
24 | */ | 24 | */ |
25 | #ifdef CONFIG_MIPS32 | 25 | #ifdef CONFIG_32BIT |
26 | 26 | ||
27 | #define __UA_LIMIT 0x80000000UL | 27 | #define __UA_LIMIT 0x80000000UL |
28 | 28 | ||
@@ -32,9 +32,9 @@ | |||
32 | #define __UA_t0 "$8" | 32 | #define __UA_t0 "$8" |
33 | #define __UA_t1 "$9" | 33 | #define __UA_t1 "$9" |
34 | 34 | ||
35 | #endif /* CONFIG_MIPS32 */ | 35 | #endif /* CONFIG_32BIT */ |
36 | 36 | ||
37 | #ifdef CONFIG_MIPS64 | 37 | #ifdef CONFIG_64BIT |
38 | 38 | ||
39 | #define __UA_LIMIT (- TASK_SIZE) | 39 | #define __UA_LIMIT (- TASK_SIZE) |
40 | 40 | ||
@@ -44,7 +44,7 @@ | |||
44 | #define __UA_t0 "$12" | 44 | #define __UA_t0 "$12" |
45 | #define __UA_t1 "$13" | 45 | #define __UA_t1 "$13" |
46 | 46 | ||
47 | #endif /* CONFIG_MIPS64 */ | 47 | #endif /* CONFIG_64BIT */ |
48 | 48 | ||
49 | /* | 49 | /* |
50 | * USER_DS is a bitmask that has the bits set that may not be set in a valid | 50 | * USER_DS is a bitmask that has the bits set that may not be set in a valid |
diff --git a/include/asm-mips/unistd.h b/include/asm-mips/unistd.h index 6d21cc964f76..ad4d48056307 100644 --- a/include/asm-mips/unistd.h +++ b/include/asm-mips/unistd.h | |||
@@ -1124,7 +1124,7 @@ type name (atype a,btype b,ctype c,dtype d,etype e,ftype f) \ | |||
1124 | # ifndef __mips64 | 1124 | # ifndef __mips64 |
1125 | # define __ARCH_WANT_STAT64 | 1125 | # define __ARCH_WANT_STAT64 |
1126 | # endif | 1126 | # endif |
1127 | # ifdef CONFIG_MIPS32 | 1127 | # ifdef CONFIG_32BIT |
1128 | # define __ARCH_WANT_SYS_TIME | 1128 | # define __ARCH_WANT_SYS_TIME |
1129 | # endif | 1129 | # endif |
1130 | # ifdef CONFIG_MIPS32_O32 | 1130 | # ifdef CONFIG_MIPS32_O32 |
diff --git a/include/asm-mips/vr4181/irq.h b/include/asm-mips/vr4181/irq.h deleted file mode 100644 index 4bf0ea970ed0..000000000000 --- a/include/asm-mips/vr4181/irq.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * Macros for vr4181 IRQ numbers. | ||
3 | * | ||
4 | * Copyright (C) 2001 MontaVista Software Inc. | ||
5 | * Author: Jun Sun, jsun@mvista.com or jsun@junsun.net | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License as published by the | ||
9 | * Free Software Foundation; either version 2 of the License, or (at your | ||
10 | * option) any later version. | ||
11 | * | ||
12 | */ | ||
13 | |||
14 | /* | ||
15 | * Strategy: | ||
16 | * | ||
17 | * Vr4181 has conceptually three levels of interrupt controllers: | ||
18 | * 1. the CPU itself with 8 intr level. | ||
19 | * 2. system interrupt controller, cascaded from int0 pin in CPU, 32 intrs | ||
20 | * 3. GPIO interrupts : forwarding external interrupts to sys intr controller | ||
21 | */ | ||
22 | |||
23 | /* decide the irq block assignment */ | ||
24 | #define VR4181_NUM_CPU_IRQ 8 | ||
25 | #define VR4181_NUM_SYS_IRQ 32 | ||
26 | #define VR4181_NUM_GPIO_IRQ 16 | ||
27 | |||
28 | #define VR4181_IRQ_BASE 0 | ||
29 | |||
30 | #define VR4181_CPU_IRQ_BASE VR4181_IRQ_BASE | ||
31 | #define VR4181_SYS_IRQ_BASE (VR4181_CPU_IRQ_BASE + VR4181_NUM_CPU_IRQ) | ||
32 | #define VR4181_GPIO_IRQ_BASE (VR4181_SYS_IRQ_BASE + VR4181_NUM_SYS_IRQ) | ||
33 | |||
34 | /* CPU interrupts */ | ||
35 | |||
36 | /* | ||
37 | IP0 - Software interrupt | ||
38 | IP1 - Software interrupt | ||
39 | IP2 - All but battery, high speed modem, and real time clock | ||
40 | IP3 - RTC Long1 (system timer) | ||
41 | IP4 - RTC Long2 | ||
42 | IP5 - High Speed Modem (unused on VR4181) | ||
43 | IP6 - Unused | ||
44 | IP7 - Timer interrupt from CPO_COMPARE | ||
45 | */ | ||
46 | |||
47 | #define VR4181_IRQ_SW1 (VR4181_CPU_IRQ_BASE + 0) | ||
48 | #define VR4181_IRQ_SW2 (VR4181_CPU_IRQ_BASE + 1) | ||
49 | #define VR4181_IRQ_INT0 (VR4181_CPU_IRQ_BASE + 2) | ||
50 | #define VR4181_IRQ_INT1 (VR4181_CPU_IRQ_BASE + 3) | ||
51 | #define VR4181_IRQ_INT2 (VR4181_CPU_IRQ_BASE + 4) | ||
52 | #define VR4181_IRQ_INT3 (VR4181_CPU_IRQ_BASE + 5) | ||
53 | #define VR4181_IRQ_INT4 (VR4181_CPU_IRQ_BASE + 6) | ||
54 | #define VR4181_IRQ_TIMER (VR4181_CPU_IRQ_BASE + 7) | ||
55 | |||
56 | |||
57 | /* Cascaded from VR4181_IRQ_INT0 (ICU mapped interrupts) */ | ||
58 | |||
59 | /* | ||
60 | IP2 - same as VR4181_IRQ_INT1 | ||
61 | IP8 - This is a cascade to GPIO IRQ's. Do not use. | ||
62 | IP16 - same as VR4181_IRQ_INT2 | ||
63 | IP18 - CompactFlash | ||
64 | */ | ||
65 | |||
66 | #define VR4181_IRQ_BATTERY (VR4181_SYS_IRQ_BASE + 0) | ||
67 | #define VR4181_IRQ_POWER (VR4181_SYS_IRQ_BASE + 1) | ||
68 | #define VR4181_IRQ_RTCL1 (VR4181_SYS_IRQ_BASE + 2) | ||
69 | #define VR4181_IRQ_ETIMER (VR4181_SYS_IRQ_BASE + 3) | ||
70 | #define VR4181_IRQ_RFU12 (VR4181_SYS_IRQ_BASE + 4) | ||
71 | #define VR4181_IRQ_PIU (VR4181_SYS_IRQ_BASE + 5) | ||
72 | #define VR4181_IRQ_AIU (VR4181_SYS_IRQ_BASE + 6) | ||
73 | #define VR4181_IRQ_KIU (VR4181_SYS_IRQ_BASE + 7) | ||
74 | #define VR4181_IRQ_GIU (VR4181_SYS_IRQ_BASE + 8) | ||
75 | #define VR4181_IRQ_SIU (VR4181_SYS_IRQ_BASE + 9) | ||
76 | #define VR4181_IRQ_RFU18 (VR4181_SYS_IRQ_BASE + 10) | ||
77 | #define VR4181_IRQ_SOFT (VR4181_SYS_IRQ_BASE + 11) | ||
78 | #define VR4181_IRQ_RFU20 (VR4181_SYS_IRQ_BASE + 12) | ||
79 | #define VR4181_IRQ_DOZEPIU (VR4181_SYS_IRQ_BASE + 13) | ||
80 | #define VR4181_IRQ_RFU22 (VR4181_SYS_IRQ_BASE + 14) | ||
81 | #define VR4181_IRQ_RFU23 (VR4181_SYS_IRQ_BASE + 15) | ||
82 | #define VR4181_IRQ_RTCL2 (VR4181_SYS_IRQ_BASE + 16) | ||
83 | #define VR4181_IRQ_LED (VR4181_SYS_IRQ_BASE + 17) | ||
84 | #define VR4181_IRQ_ECU (VR4181_SYS_IRQ_BASE + 18) | ||
85 | #define VR4181_IRQ_CSU (VR4181_SYS_IRQ_BASE + 19) | ||
86 | #define VR4181_IRQ_USB (VR4181_SYS_IRQ_BASE + 20) | ||
87 | #define VR4181_IRQ_DMA (VR4181_SYS_IRQ_BASE + 21) | ||
88 | #define VR4181_IRQ_LCD (VR4181_SYS_IRQ_BASE + 22) | ||
89 | #define VR4181_IRQ_RFU31 (VR4181_SYS_IRQ_BASE + 23) | ||
90 | #define VR4181_IRQ_RFU32 (VR4181_SYS_IRQ_BASE + 24) | ||
91 | #define VR4181_IRQ_RFU33 (VR4181_SYS_IRQ_BASE + 25) | ||
92 | #define VR4181_IRQ_RFU34 (VR4181_SYS_IRQ_BASE + 26) | ||
93 | #define VR4181_IRQ_RFU35 (VR4181_SYS_IRQ_BASE + 27) | ||
94 | #define VR4181_IRQ_RFU36 (VR4181_SYS_IRQ_BASE + 28) | ||
95 | #define VR4181_IRQ_RFU37 (VR4181_SYS_IRQ_BASE + 29) | ||
96 | #define VR4181_IRQ_RFU38 (VR4181_SYS_IRQ_BASE + 30) | ||
97 | #define VR4181_IRQ_RFU39 (VR4181_SYS_IRQ_BASE + 31) | ||
98 | |||
99 | /* Cascaded from VR4181_IRQ_GIU */ | ||
100 | #define VR4181_IRQ_GPIO0 (VR4181_GPIO_IRQ_BASE + 0) | ||
101 | #define VR4181_IRQ_GPIO1 (VR4181_GPIO_IRQ_BASE + 1) | ||
102 | #define VR4181_IRQ_GPIO2 (VR4181_GPIO_IRQ_BASE + 2) | ||
103 | #define VR4181_IRQ_GPIO3 (VR4181_GPIO_IRQ_BASE + 3) | ||
104 | #define VR4181_IRQ_GPIO4 (VR4181_GPIO_IRQ_BASE + 4) | ||
105 | #define VR4181_IRQ_GPIO5 (VR4181_GPIO_IRQ_BASE + 5) | ||
106 | #define VR4181_IRQ_GPIO6 (VR4181_GPIO_IRQ_BASE + 6) | ||
107 | #define VR4181_IRQ_GPIO7 (VR4181_GPIO_IRQ_BASE + 7) | ||
108 | #define VR4181_IRQ_GPIO8 (VR4181_GPIO_IRQ_BASE + 8) | ||
109 | #define VR4181_IRQ_GPIO9 (VR4181_GPIO_IRQ_BASE + 9) | ||
110 | #define VR4181_IRQ_GPIO10 (VR4181_GPIO_IRQ_BASE + 10) | ||
111 | #define VR4181_IRQ_GPIO11 (VR4181_GPIO_IRQ_BASE + 11) | ||
112 | #define VR4181_IRQ_GPIO12 (VR4181_GPIO_IRQ_BASE + 12) | ||
113 | #define VR4181_IRQ_GPIO13 (VR4181_GPIO_IRQ_BASE + 13) | ||
114 | #define VR4181_IRQ_GPIO14 (VR4181_GPIO_IRQ_BASE + 14) | ||
115 | #define VR4181_IRQ_GPIO15 (VR4181_GPIO_IRQ_BASE + 15) | ||
116 | |||
117 | |||
118 | // Alternative to above GPIO IRQ defines | ||
119 | #define VR4181_IRQ_GPIO(pin) ((VR4181_IRQ_GPIO0) + (pin)) | ||
120 | |||
121 | #define VR4181_IRQ_MAX (VR4181_IRQ_BASE + VR4181_NUM_CPU_IRQ + \ | ||
122 | VR4181_NUM_SYS_IRQ + VR4181_NUM_GPIO_IRQ) | ||
diff --git a/include/asm-mips/vr4181/vr4181.h b/include/asm-mips/vr4181/vr4181.h deleted file mode 100644 index 5c5d60741515..000000000000 --- a/include/asm-mips/vr4181/vr4181.h +++ /dev/null | |||
@@ -1,413 +0,0 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 1999 by Michael Klar | ||
7 | * | ||
8 | * Copyright 2001 MontaVista Software Inc. | ||
9 | * Author: jsun@mvista.com or jsun@junsun.net | ||
10 | * | ||
11 | */ | ||
12 | #ifndef __ASM_VR4181_VR4181_H | ||
13 | #define __ASM_VR4181_VR4181_H | ||
14 | |||
15 | #include <asm/addrspace.h> | ||
16 | |||
17 | #include <asm/vr4181/irq.h> | ||
18 | |||
19 | #ifndef __ASSEMBLY__ | ||
20 | #define __preg8 (volatile unsigned char*) | ||
21 | #define __preg16 (volatile unsigned short*) | ||
22 | #define __preg32 (volatile unsigned int*) | ||
23 | #else | ||
24 | #define __preg8 | ||
25 | #define __preg16 | ||
26 | #define __preg32 | ||
27 | #endif | ||
28 | |||
29 | // Embedded CPU peripheral registers | ||
30 | // Note that many of the registers have different physical address for VR4181 | ||
31 | |||
32 | // Bus Control Unit (BCU) | ||
33 | #define VR4181_BCUCNTREG1 __preg16(KSEG1 + 0x0A000000) /* BCU control register 1 (R/W) */ | ||
34 | #define VR4181_CMUCLKMSK __preg16(KSEG1 + 0x0A000004) /* Clock mask register (R/W) */ | ||
35 | #define VR4181_CMUCLKMSK_MSKCSUPCLK 0x0040 | ||
36 | #define VR4181_CMUCLKMSK_MSKAIUPCLK 0x0020 | ||
37 | #define VR4181_CMUCLKMSK_MSKPIUPCLK 0x0010 | ||
38 | #define VR4181_CMUCLKMSK_MSKADUPCLK 0x0008 | ||
39 | #define VR4181_CMUCLKMSK_MSKSIU18M 0x0004 | ||
40 | #define VR4181_CMUCLKMSK_MSKADU18M 0x0002 | ||
41 | #define VR4181_CMUCLKMSK_MSKUSB 0x0001 | ||
42 | #define VR4181_CMUCLKMSK_MSKSIU VR4181_CMUCLKMSK_MSKSIU18M | ||
43 | #define VR4181_BCUSPEEDREG __preg16(KSEG1 + 0x0A00000C) /* BCU access time parameter (R/W) */ | ||
44 | #define VR4181_BCURFCNTREG __preg16(KSEG1 + 0x0A000010) /* BCU refresh control register (R/W) */ | ||
45 | #define VR4181_REVIDREG __preg16(KSEG1 + 0x0A000014) /* Revision ID register (R) */ | ||
46 | #define VR4181_CLKSPEEDREG __preg16(KSEG1 + 0x0A000018) /* Clock speed register (R) */ | ||
47 | #define VR4181_EDOMCYTREG __preg16(KSEG1 + 0x0A000300) /* Memory cycle timing register (R/W) */ | ||
48 | #define VR4181_MEMCFG_REG __preg16(KSEG1 + 0x0A000304) /* Memory configuration register (R/W) */ | ||
49 | #define VR4181_MODE_REG __preg16(KSEG1 + 0x0A000308) /* SDRAM mode register (R/W) */ | ||
50 | #define VR4181_SDTIMINGREG __preg16(KSEG1 + 0x0A00030C) /* SDRAM timing register (R/W) */ | ||
51 | |||
52 | // DMA Control Unit (DCU) | ||
53 | #define VR4181_MICDEST1REG1 __preg16(KSEG1 + 0x0A000020) /* Microphone destination 1 address register 1 (R/W) */ | ||
54 | #define VR4181_MICDEST1REG2 __preg16(KSEG1 + 0x0A000022) /* Microphone destination 1 address register 2 (R/W) */ | ||
55 | #define VR4181_MICDEST2REG1 __preg16(KSEG1 + 0x0A000024) /* Microphone destination 2 address register 1 (R/W) */ | ||
56 | #define VR4181_MICDEST2REG2 __preg16(KSEG1 + 0x0A000026) /* Microphone destination 2 address register 2 (R/W) */ | ||
57 | #define VR4181_SPKRRC1REG1 __preg16(KSEG1 + 0x0A000028) /* Speaker Source 1 address register 1 (R/W) */ | ||
58 | #define VR4181_SPKRRC1REG2 __preg16(KSEG1 + 0x0A00002A) /* Speaker Source 1 address register 2 (R/W) */ | ||
59 | #define VR4181_SPKRRC2REG1 __preg16(KSEG1 + 0x0A00002C) /* Speaker Source 2 address register 1 (R/W) */ | ||
60 | #define VR4181_SPKRRC2REG2 __preg16(KSEG1 + 0x0A00002E) /* Speaker Source 2 address register 2 (R/W) */ | ||
61 | #define VR4181_DMARSTREG __preg16(KSEG1 + 0x0A000040) /* DMA Reset register (R/W) */ | ||
62 | #define VR4181_AIUDMAMSKREG __preg16(KSEG1 + 0x0A000046) /* Audio DMA mask register (R/W) */ | ||
63 | #define VR4181_USBDMAMSKREG __preg16(KSEG1 + 0x0A000600) /* USB DMA Mask register (R/W) */ | ||
64 | #define VR4181_USBRXS1AREG1 __preg16(KSEG1 + 0x0A000602) /* USB Rx source 1 address register 1 (R/W) */ | ||
65 | #define VR4181_USBRXS1AREG2 __preg16(KSEG1 + 0x0A000604) /* USB Rx source 1 address register 2 (R/W) */ | ||
66 | #define VR4181_USBRXS2AREG1 __preg16(KSEG1 + 0x0A000606) /* USB Rx source 2 address register 1 (R/W) */ | ||
67 | #define VR4181_USBRXS2AREG2 __preg16(KSEG1 + 0x0A000608) /* USB Rx source 2 address register 2 (R/W) */ | ||
68 | #define VR4181_USBTXS1AREG1 __preg16(KSEG1 + 0x0A00060A) /* USB Tx source 1 address register 1 (R/W) */ | ||
69 | #define VR4181_USBTXS1AREG2 __preg16(KSEG1 + 0x0A00060C) /* USB Tx source 1 address register 2 (R/W) */ | ||
70 | #define VR4181_USBTXS2AREG1 __preg16(KSEG1 + 0x0A00060E) /* USB Tx source 2 address register 1 (R/W) */ | ||
71 | #define VR4181_USBTXS2AREG2 __preg16(KSEG1 + 0x0A000610) /* USB Tx source 2 address register 2 (R/W) */ | ||
72 | #define VR4181_USBRXD1AREG1 __preg16(KSEG1 + 0x0A00062A) /* USB Rx destination 1 address register 1 (R/W) */ | ||
73 | #define VR4181_USBRXD1AREG2 __preg16(KSEG1 + 0x0A00062C) /* USB Rx destination 1 address register 2 (R/W) */ | ||
74 | #define VR4181_USBRXD2AREG1 __preg16(KSEG1 + 0x0A00062E) /* USB Rx destination 2 address register 1 (R/W) */ | ||
75 | #define VR4181_USBRXD2AREG2 __preg16(KSEG1 + 0x0A000630) /* USB Rx destination 2 address register 2 (R/W) */ | ||
76 | #define VR4181_USBTXD1AREG1 __preg16(KSEG1 + 0x0A000632) /* USB Tx destination 1 address register 1 (R/W) */ | ||
77 | #define VR4181_USBTXD1AREG2 __preg16(KSEG1 + 0x0A000634) /* USB Tx destination 1 address register 2 (R/W) */ | ||
78 | #define VR4181_USBTXD2AREG1 __preg16(KSEG1 + 0x0A000636) /* USB Tx destination 2 address register 1 (R/W) */ | ||
79 | #define VR4181_USBTXD2AREG2 __preg16(KSEG1 + 0x0A000638) /* USB Tx destination 2 address register 2 (R/W) */ | ||
80 | #define VR4181_RxRCLENREG __preg16(KSEG1 + 0x0A000652) /* USB Rx record length register (R/W) */ | ||
81 | #define VR4181_TxRCLENREG __preg16(KSEG1 + 0x0A000654) /* USB Tx record length register (R/W) */ | ||
82 | #define VR4181_MICRCLENREG __preg16(KSEG1 + 0x0A000658) /* Microphone record length register (R/W) */ | ||
83 | #define VR4181_SPKRCLENREG __preg16(KSEG1 + 0x0A00065A) /* Speaker record length register (R/W) */ | ||
84 | #define VR4181_USBCFGREG __preg16(KSEG1 + 0x0A00065C) /* USB configuration register (R/W) */ | ||
85 | #define VR4181_MICDMACFGREG __preg16(KSEG1 + 0x0A00065E) /* Microphone DMA configuration register (R/W) */ | ||
86 | #define VR4181_SPKDMACFGREG __preg16(KSEG1 + 0x0A000660) /* Speaker DMA configuration register (R/W) */ | ||
87 | #define VR4181_DMAITRQREG __preg16(KSEG1 + 0x0A000662) /* DMA interrupt request register (R/W) */ | ||
88 | #define VR4181_DMACLTREG __preg16(KSEG1 + 0x0A000664) /* DMA control register (R/W) */ | ||
89 | #define VR4181_DMAITMKREG __preg16(KSEG1 + 0x0A000666) /* DMA interrupt mask register (R/W) */ | ||
90 | |||
91 | // ISA Bridge | ||
92 | #define VR4181_ISABRGCTL __preg16(KSEG1 + 0x0B0002C0) /* ISA Bridge Control Register (R/W) */ | ||
93 | #define VR4181_ISABRGSTS __preg16(KSEG1 + 0x0B0002C2) /* ISA Bridge Status Register (R/W) */ | ||
94 | #define VR4181_XISACTL __preg16(KSEG1 + 0x0B0002C4) /* External ISA Control Register (R/W) */ | ||
95 | |||
96 | // Clocked Serial Interface (CSI) | ||
97 | #define VR4181_CSIMODE __preg16(KSEG1 + 0x0B000900) /* CSI Mode Register (R/W) */ | ||
98 | #define VR4181_CSIRXDATA __preg16(KSEG1 + 0x0B000902) /* CSI Receive Data Register (R) */ | ||
99 | #define VR4181_CSITXDATA __preg16(KSEG1 + 0x0B000904) /* CSI Transmit Data Register (R/W) */ | ||
100 | #define VR4181_CSILSTAT __preg16(KSEG1 + 0x0B000906) /* CSI Line Status Register (R/W) */ | ||
101 | #define VR4181_CSIINTMSK __preg16(KSEG1 + 0x0B000908) /* CSI Interrupt Mask Register (R/W) */ | ||
102 | #define VR4181_CSIINTSTAT __preg16(KSEG1 + 0x0B00090a) /* CSI Interrupt Status Register (R/W) */ | ||
103 | #define VR4181_CSITXBLEN __preg16(KSEG1 + 0x0B00090c) /* CSI Transmit Burst Length Register (R/W) */ | ||
104 | #define VR4181_CSIRXBLEN __preg16(KSEG1 + 0x0B00090e) /* CSI Receive Burst Length Register (R/W) */ | ||
105 | |||
106 | // Interrupt Control Unit (ICU) | ||
107 | #define VR4181_SYSINT1REG __preg16(KSEG1 + 0x0A000080) /* Level 1 System interrupt register 1 (R) */ | ||
108 | #define VR4181_MSYSINT1REG __preg16(KSEG1 + 0x0A00008C) /* Level 1 mask system interrupt register 1 (R/W) */ | ||
109 | #define VR4181_NMIREG __preg16(KSEG1 + 0x0A000098) /* NMI register (R/W) */ | ||
110 | #define VR4181_SOFTINTREG __preg16(KSEG1 + 0x0A00009A) /* Software interrupt register (R/W) */ | ||
111 | #define VR4181_SYSINT2REG __preg16(KSEG1 + 0x0A000200) /* Level 1 System interrupt register 2 (R) */ | ||
112 | #define VR4181_MSYSINT2REG __preg16(KSEG1 + 0x0A000206) /* Level 1 mask system interrupt register 2 (R/W) */ | ||
113 | #define VR4181_PIUINTREGro __preg16(KSEG1 + 0x0B000082) /* Level 2 PIU interrupt register (R) */ | ||
114 | #define VR4181_AIUINTREG __preg16(KSEG1 + 0x0B000084) /* Level 2 AIU interrupt register (R) */ | ||
115 | #define VR4181_MPIUINTREG __preg16(KSEG1 + 0x0B00008E) /* Level 2 mask PIU interrupt register (R/W) */ | ||
116 | #define VR4181_MAIUINTREG __preg16(KSEG1 + 0x0B000090) /* Level 2 mask AIU interrupt register (R/W) */ | ||
117 | #define VR4181_MKIUINTREG __preg16(KSEG1 + 0x0B000092) /* Level 2 mask KIU interrupt register (R/W) */ | ||
118 | #define VR4181_KIUINTREG __preg16(KSEG1 + 0x0B000198) /* Level 2 KIU interrupt register (R) */ | ||
119 | |||
120 | // Power Management Unit (PMU) | ||
121 | #define VR4181_PMUINTREG __preg16(KSEG1 + 0x0B0000A0) /* PMU Status Register (R/W) */ | ||
122 | #define VR4181_PMUINT_POWERSW 0x1 /* Power switch */ | ||
123 | #define VR4181_PMUINT_BATT 0x2 /* Low batt during normal operation */ | ||
124 | #define VR4181_PMUINT_DEADMAN 0x4 /* Deadman's switch */ | ||
125 | #define VR4181_PMUINT_RESET 0x8 /* Reset switch */ | ||
126 | #define VR4181_PMUINT_RTCRESET 0x10 /* RTC Reset */ | ||
127 | #define VR4181_PMUINT_TIMEOUT 0x20 /* HAL Timer Reset */ | ||
128 | #define VR4181_PMUINT_BATTLOW 0x100 /* Battery low */ | ||
129 | #define VR4181_PMUINT_RTC 0x200 /* RTC Alarm */ | ||
130 | #define VR4181_PMUINT_DCD 0x400 /* DCD# */ | ||
131 | #define VR4181_PMUINT_GPIO0 0x1000 /* GPIO0 */ | ||
132 | #define VR4181_PMUINT_GPIO1 0x2000 /* GPIO1 */ | ||
133 | #define VR4181_PMUINT_GPIO2 0x4000 /* GPIO2 */ | ||
134 | #define VR4181_PMUINT_GPIO3 0x8000 /* GPIO3 */ | ||
135 | |||
136 | #define VR4181_PMUCNTREG __preg16(KSEG1 + 0x0B0000A2) /* PMU Control Register (R/W) */ | ||
137 | #define VR4181_PMUWAITREG __preg16(KSEG1 + 0x0B0000A8) /* PMU Wait Counter Register (R/W) */ | ||
138 | #define VR4181_PMUDIVREG __preg16(KSEG1 + 0x0B0000AC) /* PMU Divide Mode Register (R/W) */ | ||
139 | #define VR4181_DRAMHIBCTL __preg16(KSEG1 + 0x0B0000B2) /* DRAM Hibernate Control Register (R/W) */ | ||
140 | |||
141 | // Real Time Clock Unit (RTC) | ||
142 | #define VR4181_ETIMELREG __preg16(KSEG1 + 0x0B0000C0) /* Elapsed Time L Register (R/W) */ | ||
143 | #define VR4181_ETIMEMREG __preg16(KSEG1 + 0x0B0000C2) /* Elapsed Time M Register (R/W) */ | ||
144 | #define VR4181_ETIMEHREG __preg16(KSEG1 + 0x0B0000C4) /* Elapsed Time H Register (R/W) */ | ||
145 | #define VR4181_ECMPLREG __preg16(KSEG1 + 0x0B0000C8) /* Elapsed Compare L Register (R/W) */ | ||
146 | #define VR4181_ECMPMREG __preg16(KSEG1 + 0x0B0000CA) /* Elapsed Compare M Register (R/W) */ | ||
147 | #define VR4181_ECMPHREG __preg16(KSEG1 + 0x0B0000CC) /* Elapsed Compare H Register (R/W) */ | ||
148 | #define VR4181_RTCL1LREG __preg16(KSEG1 + 0x0B0000D0) /* RTC Long 1 L Register (R/W) */ | ||
149 | #define VR4181_RTCL1HREG __preg16(KSEG1 + 0x0B0000D2) /* RTC Long 1 H Register (R/W) */ | ||
150 | #define VR4181_RTCL1CNTLREG __preg16(KSEG1 + 0x0B0000D4) /* RTC Long 1 Count L Register (R) */ | ||
151 | #define VR4181_RTCL1CNTHREG __preg16(KSEG1 + 0x0B0000D6) /* RTC Long 1 Count H Register (R) */ | ||
152 | #define VR4181_RTCL2LREG __preg16(KSEG1 + 0x0B0000D8) /* RTC Long 2 L Register (R/W) */ | ||
153 | #define VR4181_RTCL2HREG __preg16(KSEG1 + 0x0B0000DA) /* RTC Long 2 H Register (R/W) */ | ||
154 | #define VR4181_RTCL2CNTLREG __preg16(KSEG1 + 0x0B0000DC) /* RTC Long 2 Count L Register (R) */ | ||
155 | #define VR4181_RTCL2CNTHREG __preg16(KSEG1 + 0x0B0000DE) /* RTC Long 2 Count H Register (R) */ | ||
156 | #define VR4181_RTCINTREG __preg16(KSEG1 + 0x0B0001DE) /* RTC Interrupt Register (R/W) */ | ||
157 | |||
158 | // Deadman's Switch Unit (DSU) | ||
159 | #define VR4181_DSUCNTREG __preg16(KSEG1 + 0x0B0000E0) /* DSU Control Register (R/W) */ | ||
160 | #define VR4181_DSUSETREG __preg16(KSEG1 + 0x0B0000E2) /* DSU Dead Time Set Register (R/W) */ | ||
161 | #define VR4181_DSUCLRREG __preg16(KSEG1 + 0x0B0000E4) /* DSU Clear Register (W) */ | ||
162 | #define VR4181_DSUTIMREG __preg16(KSEG1 + 0x0B0000E6) /* DSU Elapsed Time Register (R/W) */ | ||
163 | |||
164 | // General Purpose I/O Unit (GIU) | ||
165 | #define VR4181_GPMD0REG __preg16(KSEG1 + 0x0B000300) /* GPIO Mode 0 Register (R/W) */ | ||
166 | #define VR4181_GPMD1REG __preg16(KSEG1 + 0x0B000302) /* GPIO Mode 1 Register (R/W) */ | ||
167 | #define VR4181_GPMD2REG __preg16(KSEG1 + 0x0B000304) /* GPIO Mode 2 Register (R/W) */ | ||
168 | #define VR4181_GPMD3REG __preg16(KSEG1 + 0x0B000306) /* GPIO Mode 3 Register (R/W) */ | ||
169 | #define VR4181_GPDATHREG __preg16(KSEG1 + 0x0B000308) /* GPIO Data High Register (R/W) */ | ||
170 | #define VR4181_GPDATHREG_GPIO16 0x0001 | ||
171 | #define VR4181_GPDATHREG_GPIO17 0x0002 | ||
172 | #define VR4181_GPDATHREG_GPIO18 0x0004 | ||
173 | #define VR4181_GPDATHREG_GPIO19 0x0008 | ||
174 | #define VR4181_GPDATHREG_GPIO20 0x0010 | ||
175 | #define VR4181_GPDATHREG_GPIO21 0x0020 | ||
176 | #define VR4181_GPDATHREG_GPIO22 0x0040 | ||
177 | #define VR4181_GPDATHREG_GPIO23 0x0080 | ||
178 | #define VR4181_GPDATHREG_GPIO24 0x0100 | ||
179 | #define VR4181_GPDATHREG_GPIO25 0x0200 | ||
180 | #define VR4181_GPDATHREG_GPIO26 0x0400 | ||
181 | #define VR4181_GPDATHREG_GPIO27 0x0800 | ||
182 | #define VR4181_GPDATHREG_GPIO28 0x1000 | ||
183 | #define VR4181_GPDATHREG_GPIO29 0x2000 | ||
184 | #define VR4181_GPDATHREG_GPIO30 0x4000 | ||
185 | #define VR4181_GPDATHREG_GPIO31 0x8000 | ||
186 | #define VR4181_GPDATLREG __preg16(KSEG1 + 0x0B00030A) /* GPIO Data Low Register (R/W) */ | ||
187 | #define VR4181_GPDATLREG_GPIO0 0x0001 | ||
188 | #define VR4181_GPDATLREG_GPIO1 0x0002 | ||
189 | #define VR4181_GPDATLREG_GPIO2 0x0004 | ||
190 | #define VR4181_GPDATLREG_GPIO3 0x0008 | ||
191 | #define VR4181_GPDATLREG_GPIO4 0x0010 | ||
192 | #define VR4181_GPDATLREG_GPIO5 0x0020 | ||
193 | #define VR4181_GPDATLREG_GPIO6 0x0040 | ||
194 | #define VR4181_GPDATLREG_GPIO7 0x0080 | ||
195 | #define VR4181_GPDATLREG_GPIO8 0x0100 | ||
196 | #define VR4181_GPDATLREG_GPIO9 0x0200 | ||
197 | #define VR4181_GPDATLREG_GPIO10 0x0400 | ||
198 | #define VR4181_GPDATLREG_GPIO11 0x0800 | ||
199 | #define VR4181_GPDATLREG_GPIO12 0x1000 | ||
200 | #define VR4181_GPDATLREG_GPIO13 0x2000 | ||
201 | #define VR4181_GPDATLREG_GPIO14 0x4000 | ||
202 | #define VR4181_GPDATLREG_GPIO15 0x8000 | ||
203 | #define VR4181_GPINTEN __preg16(KSEG1 + 0x0B00030C) /* GPIO Interrupt Enable Register (R/W) */ | ||
204 | #define VR4181_GPINTMSK __preg16(KSEG1 + 0x0B00030E) /* GPIO Interrupt Mask Register (R/W) */ | ||
205 | #define VR4181_GPINTTYPH __preg16(KSEG1 + 0x0B000310) /* GPIO Interrupt Type High Register (R/W) */ | ||
206 | #define VR4181_GPINTTYPL __preg16(KSEG1 + 0x0B000312) /* GPIO Interrupt Type Low Register (R/W) */ | ||
207 | #define VR4181_GPINTSTAT __preg16(KSEG1 + 0x0B000314) /* GPIO Interrupt Status Register (R/W) */ | ||
208 | #define VR4181_GPHIBSTH __preg16(KSEG1 + 0x0B000316) /* GPIO Hibernate Pin State High Register (R/W) */ | ||
209 | #define VR4181_GPHIBSTL __preg16(KSEG1 + 0x0B000318) /* GPIO Hibernate Pin State Low Register (R/W) */ | ||
210 | #define VR4181_GPSICTL __preg16(KSEG1 + 0x0B00031A) /* GPIO Serial Interface Control Register (R/W) */ | ||
211 | #define VR4181_KEYEN __preg16(KSEG1 + 0x0B00031C) /* Keyboard Scan Pin Enable Register (R/W) */ | ||
212 | #define VR4181_PCS0STRA __preg16(KSEG1 + 0x0B000320) /* Programmable Chip Select [0] Start Address Register (R/W) */ | ||
213 | #define VR4181_PCS0STPA __preg16(KSEG1 + 0x0B000322) /* Programmable Chip Select [0] Stop Address Register (R/W) */ | ||
214 | #define VR4181_PCS0HIA __preg16(KSEG1 + 0x0B000324) /* Programmable Chip Select [0] High Address Register (R/W) */ | ||
215 | #define VR4181_PCS1STRA __preg16(KSEG1 + 0x0B000326) /* Programmable Chip Select [1] Start Address Register (R/W) */ | ||
216 | #define VR4181_PCS1STPA __preg16(KSEG1 + 0x0B000328) /* Programmable Chip Select [1] Stop Address Register (R/W) */ | ||
217 | #define VR4181_PCS1HIA __preg16(KSEG1 + 0x0B00032A) /* Programmable Chip Select [1] High Address Register (R/W) */ | ||
218 | #define VR4181_PCSMODE __preg16(KSEG1 + 0x0B00032C) /* Programmable Chip Select Mode Register (R/W) */ | ||
219 | #define VR4181_LCDGPMODE __preg16(KSEG1 + 0x0B00032E) /* LCD General Purpose Mode Register (R/W) */ | ||
220 | #define VR4181_MISCREG0 __preg16(KSEG1 + 0x0B000330) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
221 | #define VR4181_MISCREG1 __preg16(KSEG1 + 0x0B000332) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
222 | #define VR4181_MISCREG2 __preg16(KSEG1 + 0x0B000334) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
223 | #define VR4181_MISCREG3 __preg16(KSEG1 + 0x0B000336) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
224 | #define VR4181_MISCREG4 __preg16(KSEG1 + 0x0B000338) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
225 | #define VR4181_MISCREG5 __preg16(KSEG1 + 0x0B00033A) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
226 | #define VR4181_MISCREG6 __preg16(KSEG1 + 0x0B00033C) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
227 | #define VR4181_MISCREG7 __preg16(KSEG1 + 0x0B00033D) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
228 | #define VR4181_MISCREG8 __preg16(KSEG1 + 0x0B000340) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
229 | #define VR4181_MISCREG9 __preg16(KSEG1 + 0x0B000342) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
230 | #define VR4181_MISCREG10 __preg16(KSEG1 + 0x0B000344) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
231 | #define VR4181_MISCREG11 __preg16(KSEG1 + 0x0B000346) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
232 | #define VR4181_MISCREG12 __preg16(KSEG1 + 0x0B000348) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
233 | #define VR4181_MISCREG13 __preg16(KSEG1 + 0x0B00034A) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
234 | #define VR4181_MISCREG14 __preg16(KSEG1 + 0x0B00034C) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
235 | #define VR4181_MISCREG15 __preg16(KSEG1 + 0x0B00034E) /* Misc. R/W Battery Backed Registers for Non-Volatile Storage (R/W) */ | ||
236 | #define VR4181_SECIRQMASKL VR4181_GPINTEN | ||
237 | // No SECIRQMASKH for VR4181 | ||
238 | |||
239 | // Touch Panel Interface Unit (PIU) | ||
240 | #define VR4181_PIUCNTREG __preg16(KSEG1 + 0x0B000122) /* PIU Control register (R/W) */ | ||
241 | #define VR4181_PIUCNTREG_PIUSEQEN 0x0004 | ||
242 | #define VR4181_PIUCNTREG_PIUPWR 0x0002 | ||
243 | #define VR4181_PIUCNTREG_PADRST 0x0001 | ||
244 | |||
245 | #define VR4181_PIUINTREG __preg16(KSEG1 + 0x0B000124) /* PIU Interrupt cause register (R/W) */ | ||
246 | #define VR4181_PIUINTREG_OVP 0x8000 | ||
247 | #define VR4181_PIUINTREG_PADCMD 0x0040 | ||
248 | #define VR4181_PIUINTREG_PADADP 0x0020 | ||
249 | #define VR4181_PIUINTREG_PADPAGE1 0x0010 | ||
250 | #define VR4181_PIUINTREG_PADPAGE0 0x0008 | ||
251 | #define VR4181_PIUINTREG_PADDLOST 0x0004 | ||
252 | #define VR4181_PIUINTREG_PENCHG 0x0001 | ||
253 | |||
254 | #define VR4181_PIUSIVLREG __preg16(KSEG1 + 0x0B000126) /* PIU Data sampling interval register (R/W) */ | ||
255 | #define VR4181_PIUSTBLREG __preg16(KSEG1 + 0x0B000128) /* PIU A/D converter start delay register (R/W) */ | ||
256 | #define VR4181_PIUCMDREG __preg16(KSEG1 + 0x0B00012A) /* PIU A/D command register (R/W) */ | ||
257 | #define VR4181_PIUASCNREG __preg16(KSEG1 + 0x0B000130) /* PIU A/D port scan register (R/W) */ | ||
258 | #define VR4181_PIUAMSKREG __preg16(KSEG1 + 0x0B000132) /* PIU A/D scan mask register (R/W) */ | ||
259 | #define VR4181_PIUCIVLREG __preg16(KSEG1 + 0x0B00013E) /* PIU Check interval register (R) */ | ||
260 | #define VR4181_PIUPB00REG __preg16(KSEG1 + 0x0B0002A0) /* PIU Page 0 Buffer 0 register (R/W) */ | ||
261 | #define VR4181_PIUPB01REG __preg16(KSEG1 + 0x0B0002A2) /* PIU Page 0 Buffer 1 register (R/W) */ | ||
262 | #define VR4181_PIUPB02REG __preg16(KSEG1 + 0x0B0002A4) /* PIU Page 0 Buffer 2 register (R/W) */ | ||
263 | #define VR4181_PIUPB03REG __preg16(KSEG1 + 0x0B0002A6) /* PIU Page 0 Buffer 3 register (R/W) */ | ||
264 | #define VR4181_PIUPB10REG __preg16(KSEG1 + 0x0B0002A8) /* PIU Page 1 Buffer 0 register (R/W) */ | ||
265 | #define VR4181_PIUPB11REG __preg16(KSEG1 + 0x0B0002AA) /* PIU Page 1 Buffer 1 register (R/W) */ | ||
266 | #define VR4181_PIUPB12REG __preg16(KSEG1 + 0x0B0002AC) /* PIU Page 1 Buffer 2 register (R/W) */ | ||
267 | #define VR4181_PIUPB13REG __preg16(KSEG1 + 0x0B0002AE) /* PIU Page 1 Buffer 3 register (R/W) */ | ||
268 | #define VR4181_PIUAB0REG __preg16(KSEG1 + 0x0B0002B0) /* PIU A/D scan Buffer 0 register (R/W) */ | ||
269 | #define VR4181_PIUAB1REG __preg16(KSEG1 + 0x0B0002B2) /* PIU A/D scan Buffer 1 register (R/W) */ | ||
270 | #define VR4181_PIUAB2REG __preg16(KSEG1 + 0x0B0002B4) /* PIU A/D scan Buffer 2 register (R/W) */ | ||
271 | #define VR4181_PIUAB3REG __preg16(KSEG1 + 0x0B0002B6) /* PIU A/D scan Buffer 3 register (R/W) */ | ||
272 | #define VR4181_PIUPB04REG __preg16(KSEG1 + 0x0B0002BC) /* PIU Page 0 Buffer 4 register (R/W) */ | ||
273 | #define VR4181_PIUPB14REG __preg16(KSEG1 + 0x0B0002BE) /* PIU Page 1 Buffer 4 register (R/W) */ | ||
274 | |||
275 | // Audio Interface Unit (AIU) | ||
276 | #define VR4181_SODATREG __preg16(KSEG1 + 0x0B000166) /* Speaker Output Data Register (R/W) */ | ||
277 | #define VR4181_SCNTREG __preg16(KSEG1 + 0x0B000168) /* Speaker Output Control Register (R/W) */ | ||
278 | #define VR4181_MIDATREG __preg16(KSEG1 + 0x0B000170) /* Mike Input Data Register (R/W) */ | ||
279 | #define VR4181_MCNTREG __preg16(KSEG1 + 0x0B000172) /* Mike Input Control Register (R/W) */ | ||
280 | #define VR4181_DVALIDREG __preg16(KSEG1 + 0x0B000178) /* Data Valid Register (R/W) */ | ||
281 | #define VR4181_SEQREG __preg16(KSEG1 + 0x0B00017A) /* Sequential Register (R/W) */ | ||
282 | #define VR4181_INTREG __preg16(KSEG1 + 0x0B00017C) /* Interrupt Register (R/W) */ | ||
283 | #define VR4181_SDMADATREG __preg16(KSEG1 + 0x0B000160) /* Speaker DMA Data Register (R/W) */ | ||
284 | #define VR4181_MDMADATREG __preg16(KSEG1 + 0x0B000162) /* Microphone DMA Data Register (R/W) */ | ||
285 | #define VR4181_DAVREF_SETUP __preg16(KSEG1 + 0x0B000164) /* DAC Vref setup register (R/W) */ | ||
286 | #define VR4181_SCNVC_END __preg16(KSEG1 + 0x0B00016E) /* Speaker sample rate control (R/W) */ | ||
287 | #define VR4181_MIDATREG __preg16(KSEG1 + 0x0B000170) /* Microphone Input Data Register (R/W) */ | ||
288 | #define VR4181_MCNTREG __preg16(KSEG1 + 0x0B000172) /* Microphone Input Control Register (R/W) */ | ||
289 | #define VR4181_MCNVC_END __preg16(KSEG1 + 0x0B00017E) /* Microphone sample rate control (R/W) */ | ||
290 | |||
291 | // Keyboard Interface Unit (KIU) | ||
292 | #define VR4181_KIUDAT0 __preg16(KSEG1 + 0x0B000180) /* KIU Data0 Register (R/W) */ | ||
293 | #define VR4181_KIUDAT1 __preg16(KSEG1 + 0x0B000182) /* KIU Data1 Register (R/W) */ | ||
294 | #define VR4181_KIUDAT2 __preg16(KSEG1 + 0x0B000184) /* KIU Data2 Register (R/W) */ | ||
295 | #define VR4181_KIUDAT3 __preg16(KSEG1 + 0x0B000186) /* KIU Data3 Register (R/W) */ | ||
296 | #define VR4181_KIUDAT4 __preg16(KSEG1 + 0x0B000188) /* KIU Data4 Register (R/W) */ | ||
297 | #define VR4181_KIUDAT5 __preg16(KSEG1 + 0x0B00018A) /* KIU Data5 Register (R/W) */ | ||
298 | #define VR4181_KIUSCANREP __preg16(KSEG1 + 0x0B000190) /* KIU Scan/Repeat Register (R/W) */ | ||
299 | #define VR4181_KIUSCANREP_KEYEN 0x8000 | ||
300 | #define VR4181_KIUSCANREP_SCANSTP 0x0008 | ||
301 | #define VR4181_KIUSCANREP_SCANSTART 0x0004 | ||
302 | #define VR4181_KIUSCANREP_ATSTP 0x0002 | ||
303 | #define VR4181_KIUSCANREP_ATSCAN 0x0001 | ||
304 | #define VR4181_KIUSCANS __preg16(KSEG1 + 0x0B000192) /* KIU Scan Status Register (R) */ | ||
305 | #define VR4181_KIUWKS __preg16(KSEG1 + 0x0B000194) /* KIU Wait Keyscan Stable Register (R/W) */ | ||
306 | #define VR4181_KIUWKI __preg16(KSEG1 + 0x0B000196) /* KIU Wait Keyscan Interval Register (R/W) */ | ||
307 | #define VR4181_KIUINT __preg16(KSEG1 + 0x0B000198) /* KIU Interrupt Register (R/W) */ | ||
308 | #define VR4181_KIUINT_KDATLOST 0x0004 | ||
309 | #define VR4181_KIUINT_KDATRDY 0x0002 | ||
310 | #define VR4181_KIUINT_SCANINT 0x0001 | ||
311 | #define VR4181_KIUDAT6 __preg16(KSEG1 + 0x0B00018C) /* Scan Line 6 Key Data Register (R) */ | ||
312 | #define VR4181_KIUDAT7 __preg16(KSEG1 + 0x0B00018E) /* Scan Line 7 Key Data Register (R) */ | ||
313 | |||
314 | // CompactFlash Controller | ||
315 | #define VR4181_PCCARDINDEX __preg8(KSEG1 + 0x0B0008E0) /* PC Card Controller Index Register */ | ||
316 | #define VR4181_PCCARDDATA __preg8(KSEG1 + 0x0B0008E1) /* PC Card Controller Data Register */ | ||
317 | #define VR4181_INTSTATREG __preg16(KSEG1 + 0x0B0008F8) /* Interrupt Status Register (R/W) */ | ||
318 | #define VR4181_INTMSKREG __preg16(KSEG1 + 0x0B0008FA) /* Interrupt Mask Register (R/W) */ | ||
319 | #define VR4181_CFG_REG_1 __preg16(KSEG1 + 0x0B0008FE) /* Configuration Register 1 */ | ||
320 | |||
321 | // LED Control Unit (LED) | ||
322 | #define VR4181_LEDHTSREG __preg16(KSEG1 + 0x0B000240) /* LED H Time Set register (R/W) */ | ||
323 | #define VR4181_LEDLTSREG __preg16(KSEG1 + 0x0B000242) /* LED L Time Set register (R/W) */ | ||
324 | #define VR4181_LEDCNTREG __preg16(KSEG1 + 0x0B000248) /* LED Control register (R/W) */ | ||
325 | #define VR4181_LEDASTCREG __preg16(KSEG1 + 0x0B00024A) /* LED Auto Stop Time Count register (R/W) */ | ||
326 | #define VR4181_LEDINTREG __preg16(KSEG1 + 0x0B00024C) /* LED Interrupt register (R/W) */ | ||
327 | |||
328 | // Serial Interface Unit (SIU / SIU1 and SIU2) | ||
329 | #define VR4181_SIURB __preg8(KSEG1 + 0x0C000010) /* Receiver Buffer Register (Read) DLAB = 0 (R) */ | ||
330 | #define VR4181_SIUTH __preg8(KSEG1 + 0x0C000010) /* Transmitter Holding Register (Write) DLAB = 0 (W) */ | ||
331 | #define VR4181_SIUDLL __preg8(KSEG1 + 0x0C000010) /* Divisor Latch (Least Significant Byte) DLAB = 1 (R/W) */ | ||
332 | #define VR4181_SIUIE __preg8(KSEG1 + 0x0C000011) /* Interrupt Enable DLAB = 0 (R/W) */ | ||
333 | #define VR4181_SIUDLM __preg8(KSEG1 + 0x0C000011) /* Divisor Latch (Most Significant Byte) DLAB = 1 (R/W) */ | ||
334 | #define VR4181_SIUIID __preg8(KSEG1 + 0x0C000012) /* Interrupt Identification Register (Read) (R) */ | ||
335 | #define VR4181_SIUFC __preg8(KSEG1 + 0x0C000012) /* FIFO Control Register (Write) (W) */ | ||
336 | #define VR4181_SIULC __preg8(KSEG1 + 0x0C000013) /* Line Control Register (R/W) */ | ||
337 | #define VR4181_SIUMC __preg8(KSEG1 + 0x0C000014) /* MODEM Control Register (R/W) */ | ||
338 | #define VR4181_SIULS __preg8(KSEG1 + 0x0C000015) /* Line Status Register (R/W) */ | ||
339 | #define VR4181_SIUMS __preg8(KSEG1 + 0x0C000016) /* MODEM Status Register (R/W) */ | ||
340 | #define VR4181_SIUSC __preg8(KSEG1 + 0x0C000017) /* Scratch Register (R/W) */ | ||
341 | #define VR4181_SIURESET __preg8(KSEG1 + 0x0C000019) /* SIU Reset Register (R/W) */ | ||
342 | #define VR4181_SIUACTMSK __preg8(KSEG1 + 0x0C00001C) /* SIU Activity Mask (R/W) */ | ||
343 | #define VR4181_SIUACTTMR __preg8(KSEG1 + 0x0C00001E) /* SIU Activity Timer (R/W) */ | ||
344 | #define VR4181_SIURB_2 __preg8(KSEG1 + 0x0C000000) /* Receive Buffer Register (Read) (R) */ | ||
345 | #define VR4181_SIUTH_2 __preg8(KSEG1 + 0x0C000000) /* Transmitter Holding Register (Write) (W) */ | ||
346 | #define VR4181_SIUDLL_2 __preg8(KSEG1 + 0x0C000000) /* Divisor Latch (Least Significant Byte) (R/W) */ | ||
347 | #define VR4181_SIUIE_2 __preg8(KSEG1 + 0x0C000001) /* Interrupt Enable (DLAB = 0) (R/W) */ | ||
348 | #define VR4181_SIUDLM_2 __preg8(KSEG1 + 0x0C000001) /* Divisor Latch (Most Significant Byte) (DLAB = 1) (R/W) */ | ||
349 | #define VR4181_SIUIID_2 __preg8(KSEG1 + 0x0C000002) /* Interrupt Identification Register (Read) (R) */ | ||
350 | #define VR4181_SIUFC_2 __preg8(KSEG1 + 0x0C000002) /* FIFO Control Register (Write) (W) */ | ||
351 | #define VR4181_SIULC_2 __preg8(KSEG1 + 0x0C000003) /* Line Control Register (R/W) */ | ||
352 | #define VR4181_SIUMC_2 __preg8(KSEG1 + 0x0C000004) /* Modem Control Register (R/W) */ | ||
353 | #define VR4181_SIULS_2 __preg8(KSEG1 + 0x0C000005) /* Line Status Register (R/W) */ | ||
354 | #define VR4181_SIUMS_2 __preg8(KSEG1 + 0x0C000006) /* Modem Status Register (R/W) */ | ||
355 | #define VR4181_SIUSC_2 __preg8(KSEG1 + 0x0C000007) /* Scratch Register (R/W) */ | ||
356 | #define VR4181_SIUIRSEL_2 __preg8(KSEG1 + 0x0C000008) /* SIU IrDA Selectot (R/W) */ | ||
357 | #define VR4181_SIURESET_2 __preg8(KSEG1 + 0x0C000009) /* SIU Reset Register (R/W) */ | ||
358 | #define VR4181_SIUCSEL_2 __preg8(KSEG1 + 0x0C00000A) /* IrDA Echo-back Control (R/W) */ | ||
359 | #define VR4181_SIUACTMSK_2 __preg8(KSEG1 + 0x0C00000C) /* SIU Activity Mask Register (R/W) */ | ||
360 | #define VR4181_SIUACTTMR_2 __preg8(KSEG1 + 0x0C00000E) /* SIU Activity Timer Register (R/W) */ | ||
361 | |||
362 | |||
363 | // USB Module | ||
364 | #define VR4181_USBINFIFO __preg16(KSEG1 + 0x0B000780) /* USB Bulk Input FIFO (Bulk In End Point) (W) */ | ||
365 | #define VR4181_USBOUTFIFO __preg16(KSEG1 + 0x0B000782) /* USB Bulk Output FIFO (Bulk Out End Point) (R) */ | ||
366 | #define VR4181_USBCTLFIFO __preg16(KSEG1 + 0x0B000784) /* USB Control FIFO (Control End Point) (W) */ | ||
367 | #define VR4181_USBSTAT __preg16(KSEG1 + 0x0B000786) /* Interrupt Status Register (R/W) */ | ||
368 | #define VR4181_USBINTMSK __preg16(KSEG1 + 0x0B000788) /* Interrupt Mask Register (R/W) */ | ||
369 | #define VR4181_USBCTLREG __preg16(KSEG1 + 0x0B00078A) /* Control Register (R/W) */ | ||
370 | #define VR4181_USBSTPREG __preg16(KSEG1 + 0x0B00078C) /* USB Transfer Stop Register (R/W) */ | ||
371 | |||
372 | // LCD Controller | ||
373 | #define VR4181_HRTOTALREG __preg16(KSEG1 + 0x0A000400) /* Horizontal total Register (R/W) */ | ||
374 | #define VR4181_HRVISIBREG __preg16(KSEG1 + 0x0A000402) /* Horizontal Visible Register (R/W) */ | ||
375 | #define VR4181_LDCLKSTREG __preg16(KSEG1 + 0x0A000404) /* Load clock start Register (R/W) */ | ||
376 | #define VR4181_LDCLKNDREG __preg16(KSEG1 + 0x0A000406) /* Load clock end Register (R/W) */ | ||
377 | #define VR4181_VRTOTALREG __preg16(KSEG1 + 0x0A000408) /* Vertical Total Register (R/W) */ | ||
378 | #define VR4181_VRVISIBREG __preg16(KSEG1 + 0x0A00040A) /* Vertical Visible Register (R/W) */ | ||
379 | #define VR4181_FVSTARTREG __preg16(KSEG1 + 0x0A00040C) /* FLM vertical start Register (R/W) */ | ||
380 | #define VR4181_FVENDREG __preg16(KSEG1 + 0x0A00040E) /* FLM vertical end Register (R/W) */ | ||
381 | #define VR4181_LCDCTRLREG __preg16(KSEG1 + 0x0A000410) /* LCD control Register (R/W) */ | ||
382 | #define VR4181_LCDINRQREG __preg16(KSEG1 + 0x0A000412) /* LCD Interrupt request Register (R/W) */ | ||
383 | #define VR4181_LCDCFGREG0 __preg16(KSEG1 + 0x0A000414) /* LCD Configuration Register 0 (R/W) */ | ||
384 | #define VR4181_LCDCFGREG1 __preg16(KSEG1 + 0x0A000416) /* LCD Configuration Register 1 (R/W) */ | ||
385 | #define VR4181_FBSTAD1REG __preg16(KSEG1 + 0x0A000418) /* Frame Buffer Start Address 1 Register (R/W) */ | ||
386 | #define VR4181_FBSTAD2REG __preg16(KSEG1 + 0x0A00041A) /* Frame Buffer Start Address 2 Register (R/W) */ | ||
387 | #define VR4181_FBNDAD1REG __preg16(KSEG1 + 0x0A000420) /* Frame Buffer End Address 1 Register (R/W) */ | ||
388 | #define VR4181_FBNDAD2REG __preg16(KSEG1 + 0x0A000422) /* Frame Buffer End Address 2 register (R/W) */ | ||
389 | #define VR4181_FHSTARTREG __preg16(KSEG1 + 0x0A000424) /* FLM horizontal Start Register (R/W) */ | ||
390 | #define VR4181_FHENDREG __preg16(KSEG1 + 0x0A000426) /* FLM horizontal End Register (R/W) */ | ||
391 | #define VR4181_PWRCONREG1 __preg16(KSEG1 + 0x0A000430) /* Power Control register 1 (R/W) */ | ||
392 | #define VR4181_PWRCONREG2 __preg16(KSEG1 + 0x0A000432) /* Power Control register 2 (R/W) */ | ||
393 | #define VR4181_LCDIMSKREG __preg16(KSEG1 + 0x0A000434) /* LCD Interrupt Mask register (R/W) */ | ||
394 | #define VR4181_CPINDCTREG __preg16(KSEG1 + 0x0A00047E) /* Color palette Index and control Register (R/W) */ | ||
395 | #define VR4181_CPALDATREG __preg32(KSEG1 + 0x0A000480) /* Color palette data register (32bits Register) (R/W) */ | ||
396 | |||
397 | // physical address spaces | ||
398 | #define VR4181_LCD 0x0a000000 | ||
399 | #define VR4181_INTERNAL_IO_2 0x0b000000 | ||
400 | #define VR4181_INTERNAL_IO_1 0x0c000000 | ||
401 | #define VR4181_ISA_MEM 0x10000000 | ||
402 | #define VR4181_ISA_IO 0x14000000 | ||
403 | #define VR4181_ROM 0x18000000 | ||
404 | |||
405 | // This is the base address for IO port decoding to which the 16 bit IO port address | ||
406 | // is added. Defining it to 0 will usually cause a kernel oops any time port IO is | ||
407 | // attempted, which can be handy for turning up parts of the kernel that make | ||
408 | // incorrect architecture assumptions (by assuming that everything acts like a PC), | ||
409 | // but we need it correctly defined to use the PCMCIA/CF controller: | ||
410 | #define VR4181_PORT_BASE (KSEG1 + VR4181_ISA_IO) | ||
411 | #define VR4181_ISAMEM_BASE (KSEG1 + VR4181_ISA_MEM) | ||
412 | |||
413 | #endif /* __ASM_VR4181_VR4181_H */ | ||
diff --git a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h index 7d41e44463f9..bd2723c30901 100644 --- a/include/asm-mips/vr41xx/vr41xx.h +++ b/include/asm-mips/vr41xx/vr41xx.h | |||
@@ -7,7 +7,7 @@ | |||
7 | * Copyright (C) 2001, 2002 Paul Mundt | 7 | * Copyright (C) 2001, 2002 Paul Mundt |
8 | * Copyright (C) 2002 MontaVista Software, Inc. | 8 | * Copyright (C) 2002 MontaVista Software, Inc. |
9 | * Copyright (C) 2002 TimeSys Corp. | 9 | * Copyright (C) 2002 TimeSys Corp. |
10 | * Copyright (C) 2003-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> | 10 | * Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp> |
11 | * | 11 | * |
12 | * This program is free software; you can redistribute it and/or modify it | 12 | * This program is free software; you can redistribute it and/or modify it |
13 | * under the terms of the GNU General Public License as published by the | 13 | * under the terms of the GNU General Public License as published by the |
@@ -79,11 +79,11 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); | |||
79 | #define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) | 79 | #define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) |
80 | #define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) | 80 | #define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) |
81 | #define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) | 81 | #define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) |
82 | #define INT0_CASCADE_IRQ MIPS_CPU_IRQ(2) | 82 | #define INT0_IRQ MIPS_CPU_IRQ(2) |
83 | #define INT1_CASCADE_IRQ MIPS_CPU_IRQ(3) | 83 | #define INT1_IRQ MIPS_CPU_IRQ(3) |
84 | #define INT2_CASCADE_IRQ MIPS_CPU_IRQ(4) | 84 | #define INT2_IRQ MIPS_CPU_IRQ(4) |
85 | #define INT3_CASCADE_IRQ MIPS_CPU_IRQ(5) | 85 | #define INT3_IRQ MIPS_CPU_IRQ(5) |
86 | #define INT4_CASCADE_IRQ MIPS_CPU_IRQ(6) | 86 | #define INT4_IRQ MIPS_CPU_IRQ(6) |
87 | #define TIMER_IRQ MIPS_CPU_IRQ(7) | 87 | #define TIMER_IRQ MIPS_CPU_IRQ(7) |
88 | 88 | ||
89 | /* SYINT1 Interrupt Numbers */ | 89 | /* SYINT1 Interrupt Numbers */ |
@@ -97,7 +97,7 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); | |||
97 | #define PIU_IRQ SYSINT1_IRQ(5) | 97 | #define PIU_IRQ SYSINT1_IRQ(5) |
98 | #define AIU_IRQ SYSINT1_IRQ(6) | 98 | #define AIU_IRQ SYSINT1_IRQ(6) |
99 | #define KIU_IRQ SYSINT1_IRQ(7) | 99 | #define KIU_IRQ SYSINT1_IRQ(7) |
100 | #define GIUINT_CASCADE_IRQ SYSINT1_IRQ(8) | 100 | #define GIUINT_IRQ SYSINT1_IRQ(8) |
101 | #define SIU_IRQ SYSINT1_IRQ(9) | 101 | #define SIU_IRQ SYSINT1_IRQ(9) |
102 | #define BUSERR_IRQ SYSINT1_IRQ(10) | 102 | #define BUSERR_IRQ SYSINT1_IRQ(10) |
103 | #define SOFTINT_IRQ SYSINT1_IRQ(11) | 103 | #define SOFTINT_IRQ SYSINT1_IRQ(11) |
@@ -128,7 +128,7 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); | |||
128 | #define GIU_IRQ_LAST GIU_IRQ(31) | 128 | #define GIU_IRQ_LAST GIU_IRQ(31) |
129 | 129 | ||
130 | extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign); | 130 | extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign); |
131 | extern int vr41xx_cascade_irq(unsigned int irq, int (*get_irq_number)(int irq)); | 131 | extern int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *)); |
132 | 132 | ||
133 | #define PIUINT_COMMAND 0x0040 | 133 | #define PIUINT_COMMAND 0x0040 |
134 | #define PIUINT_DATA 0x0020 | 134 | #define PIUINT_DATA 0x0020 |
diff --git a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h index 58e193c51b45..bb7a85c186e4 100644 --- a/include/asm-mips/vr41xx/vrc4173.h +++ b/include/asm-mips/vr41xx/vrc4173.h | |||
@@ -21,8 +21,8 @@ | |||
21 | * along with this program; if not, write to the Free Software | 21 | * along with this program; if not, write to the Free Software |
22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 22 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | */ | 23 | */ |
24 | #ifndef __NEC_VRC4173_H | 24 | #ifndef __NEC_VRC4173_H |
25 | #define __NEC_VRC4173_H | 25 | #define __NEC_VRC4173_H |
26 | 26 | ||
27 | #include <linux/config.h> | 27 | #include <linux/config.h> |
28 | #include <asm/io.h> | 28 | #include <asm/io.h> |
diff --git a/include/asm-mips/war.h b/include/asm-mips/war.h index c4a704121343..04ee53b34c2e 100644 --- a/include/asm-mips/war.h +++ b/include/asm-mips/war.h | |||
@@ -113,7 +113,7 @@ | |||
113 | */ | 113 | */ |
114 | #define BCM1250_M3_WAR 1 | 114 | #define BCM1250_M3_WAR 1 |
115 | 115 | ||
116 | /* | 116 | /* |
117 | * This is a DUART workaround related to glitches around register accesses | 117 | * This is a DUART workaround related to glitches around register accesses |
118 | */ | 118 | */ |
119 | #define SIBYTE_1956_WAR 1 | 119 | #define SIBYTE_1956_WAR 1 |
@@ -122,7 +122,7 @@ | |||
122 | 122 | ||
123 | /* | 123 | /* |
124 | * Fill buffers not flushed on CACHE instructions | 124 | * Fill buffers not flushed on CACHE instructions |
125 | * | 125 | * |
126 | * Hit_Invalidate_I cacheops invalidate an icache line but the refill | 126 | * Hit_Invalidate_I cacheops invalidate an icache line but the refill |
127 | * for that line can get stale data from the fill buffer instead of | 127 | * for that line can get stale data from the fill buffer instead of |
128 | * accessing memory if the previous icache miss was also to that line. | 128 | * accessing memory if the previous icache miss was also to that line. |
diff --git a/include/asm-mips/xxs1500.h b/include/asm-mips/xxs1500.h index 75c0ddfeca13..4d84a90b0f20 100644 --- a/include/asm-mips/xxs1500.h +++ b/include/asm-mips/xxs1500.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * | 22 | * |
23 | * ######################################################################## | 23 | * ######################################################################## |
24 | * | 24 | * |
25 | * | 25 | * |
26 | */ | 26 | */ |
27 | #ifndef __ASM_XXS1500_H | 27 | #ifndef __ASM_XXS1500_H |
28 | #define __ASM_XXS1500_H | 28 | #define __ASM_XXS1500_H |
diff --git a/include/asm-parisc/page.h b/include/asm-parisc/page.h index 4a12692f94b4..44eae9f8274d 100644 --- a/include/asm-parisc/page.h +++ b/include/asm-parisc/page.h | |||
@@ -74,20 +74,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
74 | #define __pgd(x) ((pgd_t) { (x) } ) | 74 | #define __pgd(x) ((pgd_t) { (x) } ) |
75 | #define __pgprot(x) ((pgprot_t) { (x) } ) | 75 | #define __pgprot(x) ((pgprot_t) { (x) } ) |
76 | 76 | ||
77 | /* Pure 2^n version of get_order */ | ||
78 | extern __inline__ int get_order(unsigned long size) | ||
79 | { | ||
80 | int order; | ||
81 | |||
82 | size = (size-1) >> (PAGE_SHIFT-1); | ||
83 | order = -1; | ||
84 | do { | ||
85 | size >>= 1; | ||
86 | order++; | ||
87 | } while (size); | ||
88 | return order; | ||
89 | } | ||
90 | |||
91 | typedef struct __physmem_range { | 77 | typedef struct __physmem_range { |
92 | unsigned long start_pfn; | 78 | unsigned long start_pfn; |
93 | unsigned long pages; /* PAGE_SIZE pages */ | 79 | unsigned long pages; /* PAGE_SIZE pages */ |
@@ -159,4 +145,6 @@ extern int npmem_ranges; | |||
159 | 145 | ||
160 | #endif /* __KERNEL__ */ | 146 | #endif /* __KERNEL__ */ |
161 | 147 | ||
148 | #include <asm-generic/page.h> | ||
149 | |||
162 | #endif /* _PARISC_PAGE_H */ | 150 | #endif /* _PARISC_PAGE_H */ |
diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 8fe7a44ea205..d21b9d0d63ea 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h | |||
@@ -56,8 +56,6 @@ typedef unsigned long long u64; | |||
56 | typedef u32 dma_addr_t; | 56 | typedef u32 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 57 | typedef u64 dma64_addr_t; |
58 | 58 | ||
59 | typedef unsigned int kmem_bufctl_t; | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLY__ */ |
62 | 60 | ||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h index 6f74f59938d4..92b8ee78dcc2 100644 --- a/include/asm-ppc/dma-mapping.h +++ b/include/asm-ppc/dma-mapping.h | |||
@@ -60,7 +60,8 @@ static inline int dma_set_mask(struct device *dev, u64 dma_mask) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, | 62 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
63 | dma_addr_t * dma_handle, int gfp) | 63 | dma_addr_t * dma_handle, |
64 | unsigned int __nocast gfp) | ||
64 | { | 65 | { |
65 | #ifdef CONFIG_NOT_COHERENT_CACHE | 66 | #ifdef CONFIG_NOT_COHERENT_CACHE |
66 | return __dma_alloc_coherent(size, dma_handle, gfp); | 67 | return __dma_alloc_coherent(size, dma_handle, gfp); |
diff --git a/include/asm-ppc/ibm4xx.h b/include/asm-ppc/ibm4xx.h index e807be96e981..e992369cb8e9 100644 --- a/include/asm-ppc/ibm4xx.h +++ b/include/asm-ppc/ibm4xx.h | |||
@@ -19,10 +19,6 @@ | |||
19 | 19 | ||
20 | #ifdef CONFIG_40x | 20 | #ifdef CONFIG_40x |
21 | 21 | ||
22 | #if defined(CONFIG_ASH) | ||
23 | #include <platforms/4xx/ash.h> | ||
24 | #endif | ||
25 | |||
26 | #if defined(CONFIG_BUBINGA) | 22 | #if defined(CONFIG_BUBINGA) |
27 | #include <platforms/4xx/bubinga.h> | 23 | #include <platforms/4xx/bubinga.h> |
28 | #endif | 24 | #endif |
@@ -35,14 +31,6 @@ | |||
35 | #include <platforms/4xx/ep405.h> | 31 | #include <platforms/4xx/ep405.h> |
36 | #endif | 32 | #endif |
37 | 33 | ||
38 | #if defined(CONFIG_OAK) | ||
39 | #include <platforms/4xx/oak.h> | ||
40 | #endif | ||
41 | |||
42 | #if defined(CONFIG_REDWOOD_4) | ||
43 | #include <platforms/4xx/redwood.h> | ||
44 | #endif | ||
45 | |||
46 | #if defined(CONFIG_REDWOOD_5) | 34 | #if defined(CONFIG_REDWOOD_5) |
47 | #include <platforms/4xx/redwood5.h> | 35 | #include <platforms/4xx/redwood5.h> |
48 | #endif | 36 | #endif |
diff --git a/include/asm-ppc/ibm_ocp.h b/include/asm-ppc/ibm_ocp.h index 3f7b5669e6d5..bd7656fa2026 100644 --- a/include/asm-ppc/ibm_ocp.h +++ b/include/asm-ppc/ibm_ocp.h | |||
@@ -67,6 +67,7 @@ struct ocp_func_emac_data { | |||
67 | int phy_mode; /* PHY type or configurable mode */ | 67 | int phy_mode; /* PHY type or configurable mode */ |
68 | u8 mac_addr[6]; /* EMAC mac address */ | 68 | u8 mac_addr[6]; /* EMAC mac address */ |
69 | u32 phy_map; /* EMAC phy map */ | 69 | u32 phy_map; /* EMAC phy map */ |
70 | u32 phy_feat_exc; /* Excluded PHY features */ | ||
70 | }; | 71 | }; |
71 | 72 | ||
72 | /* Sysfs support */ | 73 | /* Sysfs support */ |
@@ -100,6 +101,19 @@ void ocp_show_emac_data(struct device *dev) \ | |||
100 | device_create_file(dev, &dev_attr_emac_phy_map); \ | 101 | device_create_file(dev, &dev_attr_emac_phy_map); \ |
101 | } | 102 | } |
102 | 103 | ||
104 | /* | ||
105 | * PHY mode settings (EMAC <-> ZMII/RGMII bridge <-> PHY) | ||
106 | */ | ||
107 | #define PHY_MODE_NA 0 | ||
108 | #define PHY_MODE_MII 1 | ||
109 | #define PHY_MODE_RMII 2 | ||
110 | #define PHY_MODE_SMII 3 | ||
111 | #define PHY_MODE_RGMII 4 | ||
112 | #define PHY_MODE_TBI 5 | ||
113 | #define PHY_MODE_GMII 6 | ||
114 | #define PHY_MODE_RTBI 7 | ||
115 | #define PHY_MODE_SGMII 8 | ||
116 | |||
103 | #ifdef CONFIG_40x | 117 | #ifdef CONFIG_40x |
104 | /* | 118 | /* |
105 | * Helper function to copy MAC addresses from the bd_t to OCP EMAC | 119 | * Helper function to copy MAC addresses from the bd_t to OCP EMAC |
@@ -133,6 +147,7 @@ struct ocp_func_mal_data { | |||
133 | int txde_irq; /* TX Descriptor Error IRQ */ | 147 | int txde_irq; /* TX Descriptor Error IRQ */ |
134 | int rxde_irq; /* RX Descriptor Error IRQ */ | 148 | int rxde_irq; /* RX Descriptor Error IRQ */ |
135 | int serr_irq; /* MAL System Error IRQ */ | 149 | int serr_irq; /* MAL System Error IRQ */ |
150 | int dcr_base; /* MALx_CFG DCR number */ | ||
136 | }; | 151 | }; |
137 | 152 | ||
138 | #define OCP_SYSFS_MAL_DATA() \ | 153 | #define OCP_SYSFS_MAL_DATA() \ |
@@ -143,6 +158,7 @@ OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, rxeob_irq) \ | |||
143 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, txde_irq) \ | 158 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, txde_irq) \ |
144 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, rxde_irq) \ | 159 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, rxde_irq) \ |
145 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, serr_irq) \ | 160 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, serr_irq) \ |
161 | OCP_SYSFS_ADDTL(struct ocp_func_mal_data, "%d\n", mal, dcr_base) \ | ||
146 | \ | 162 | \ |
147 | void ocp_show_mal_data(struct device *dev) \ | 163 | void ocp_show_mal_data(struct device *dev) \ |
148 | { \ | 164 | { \ |
@@ -153,6 +169,7 @@ void ocp_show_mal_data(struct device *dev) \ | |||
153 | device_create_file(dev, &dev_attr_mal_txde_irq); \ | 169 | device_create_file(dev, &dev_attr_mal_txde_irq); \ |
154 | device_create_file(dev, &dev_attr_mal_rxde_irq); \ | 170 | device_create_file(dev, &dev_attr_mal_rxde_irq); \ |
155 | device_create_file(dev, &dev_attr_mal_serr_irq); \ | 171 | device_create_file(dev, &dev_attr_mal_serr_irq); \ |
172 | device_create_file(dev, &dev_attr_mal_dcr_base); \ | ||
156 | } | 173 | } |
157 | 174 | ||
158 | /* | 175 | /* |
diff --git a/include/asm-ppc/irq.h b/include/asm-ppc/irq.h index a9b33324f562..a244d93ca953 100644 --- a/include/asm-ppc/irq.h +++ b/include/asm-ppc/irq.h | |||
@@ -337,6 +337,7 @@ static __inline__ int irq_canonicalize(int irq) | |||
337 | #define SIU_INT_IDMA3 ((uint)0x08 + CPM_IRQ_OFFSET) | 337 | #define SIU_INT_IDMA3 ((uint)0x08 + CPM_IRQ_OFFSET) |
338 | #define SIU_INT_IDMA4 ((uint)0x09 + CPM_IRQ_OFFSET) | 338 | #define SIU_INT_IDMA4 ((uint)0x09 + CPM_IRQ_OFFSET) |
339 | #define SIU_INT_SDMA ((uint)0x0a + CPM_IRQ_OFFSET) | 339 | #define SIU_INT_SDMA ((uint)0x0a + CPM_IRQ_OFFSET) |
340 | #define SIU_INT_USB ((uint)0x0b + CPM_IRQ_OFFSET) | ||
340 | #define SIU_INT_TIMER1 ((uint)0x0c + CPM_IRQ_OFFSET) | 341 | #define SIU_INT_TIMER1 ((uint)0x0c + CPM_IRQ_OFFSET) |
341 | #define SIU_INT_TIMER2 ((uint)0x0d + CPM_IRQ_OFFSET) | 342 | #define SIU_INT_TIMER2 ((uint)0x0d + CPM_IRQ_OFFSET) |
342 | #define SIU_INT_TIMER3 ((uint)0x0e + CPM_IRQ_OFFSET) | 343 | #define SIU_INT_TIMER3 ((uint)0x0e + CPM_IRQ_OFFSET) |
diff --git a/include/asm-ppc/kmap_types.h b/include/asm-ppc/kmap_types.h index 2589f182a6ad..6d6fc78731e5 100644 --- a/include/asm-ppc/kmap_types.h +++ b/include/asm-ppc/kmap_types.h | |||
@@ -17,6 +17,7 @@ enum km_type { | |||
17 | KM_SOFTIRQ0, | 17 | KM_SOFTIRQ0, |
18 | KM_SOFTIRQ1, | 18 | KM_SOFTIRQ1, |
19 | KM_PPC_SYNC_PAGE, | 19 | KM_PPC_SYNC_PAGE, |
20 | KM_PPC_SYNC_ICACHE, | ||
20 | KM_TYPE_NR | 21 | KM_TYPE_NR |
21 | }; | 22 | }; |
22 | 23 | ||
diff --git a/include/asm-ppc/mpc8260.h b/include/asm-ppc/mpc8260.h index 89eb8a2ac693..9694eca16e92 100644 --- a/include/asm-ppc/mpc8260.h +++ b/include/asm-ppc/mpc8260.h | |||
@@ -67,6 +67,24 @@ | |||
67 | #define IO_VIRT_ADDR IO_PHYS_ADDR | 67 | #define IO_VIRT_ADDR IO_PHYS_ADDR |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | enum ppc_sys_devices { | ||
71 | MPC82xx_CPM_FCC1, | ||
72 | MPC82xx_CPM_FCC2, | ||
73 | MPC82xx_CPM_FCC3, | ||
74 | MPC82xx_CPM_I2C, | ||
75 | MPC82xx_CPM_SCC1, | ||
76 | MPC82xx_CPM_SCC2, | ||
77 | MPC82xx_CPM_SCC3, | ||
78 | MPC82xx_CPM_SCC4, | ||
79 | MPC82xx_CPM_SPI, | ||
80 | MPC82xx_CPM_MCC1, | ||
81 | MPC82xx_CPM_MCC2, | ||
82 | MPC82xx_CPM_SMC1, | ||
83 | MPC82xx_CPM_SMC2, | ||
84 | MPC82xx_CPM_USB, | ||
85 | MPC82xx_SEC1, | ||
86 | }; | ||
87 | |||
70 | #ifndef __ASSEMBLY__ | 88 | #ifndef __ASSEMBLY__ |
71 | /* The "residual" data board information structure the boot loader | 89 | /* The "residual" data board information structure the boot loader |
72 | * hands to us. | 90 | * hands to us. |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index 7c31f2d564a1..dc8e59896050 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -36,10 +36,6 @@ | |||
36 | #include <platforms/tqm8xx.h> | 36 | #include <platforms/tqm8xx.h> |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | #if defined(CONFIG_SPD823TS) | ||
40 | #include <platforms/spd8xx.h> | ||
41 | #endif | ||
42 | |||
43 | #if defined(CONFIG_IVMS8) || defined(CONFIG_IVML24) | 39 | #if defined(CONFIG_IVMS8) || defined(CONFIG_IVML24) |
44 | #include <platforms/ivms8.h> | 40 | #include <platforms/ivms8.h> |
45 | #endif | 41 | #endif |
diff --git a/include/asm-ppc/mv64x60.h b/include/asm-ppc/mv64x60.h index cc25b921ad4f..835930d6faa1 100644 --- a/include/asm-ppc/mv64x60.h +++ b/include/asm-ppc/mv64x60.h | |||
@@ -278,6 +278,13 @@ mv64x60_modify(struct mv64x60_handle *bh, u32 offs, u32 data, u32 mask) | |||
278 | #define mv64x60_set_bits(bh, offs, bits) mv64x60_modify(bh, offs, ~0, bits) | 278 | #define mv64x60_set_bits(bh, offs, bits) mv64x60_modify(bh, offs, ~0, bits) |
279 | #define mv64x60_clr_bits(bh, offs, bits) mv64x60_modify(bh, offs, 0, bits) | 279 | #define mv64x60_clr_bits(bh, offs, bits) mv64x60_modify(bh, offs, 0, bits) |
280 | 280 | ||
281 | #if defined(CONFIG_SYSFS) && !defined(CONFIG_GT64260) | ||
282 | #define MV64XXX_DEV_NAME "mv64xxx" | ||
283 | |||
284 | struct mv64xxx_pdata { | ||
285 | u32 hs_reg_valid; | ||
286 | }; | ||
287 | #endif | ||
281 | 288 | ||
282 | /* Externally visible function prototypes */ | 289 | /* Externally visible function prototypes */ |
283 | int mv64x60_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si); | 290 | int mv64x60_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si); |
diff --git a/include/asm-ppc/mv64x60_defs.h b/include/asm-ppc/mv64x60_defs.h index 2f428746c02b..f8f7f16b9b53 100644 --- a/include/asm-ppc/mv64x60_defs.h +++ b/include/asm-ppc/mv64x60_defs.h | |||
@@ -333,7 +333,7 @@ | |||
333 | /* | 333 | /* |
334 | ***************************************************************************** | 334 | ***************************************************************************** |
335 | * | 335 | * |
336 | * SRAM Cotnroller Registers | 336 | * SRAM Controller Registers |
337 | * | 337 | * |
338 | ***************************************************************************** | 338 | ***************************************************************************** |
339 | */ | 339 | */ |
@@ -352,7 +352,7 @@ | |||
352 | /* | 352 | /* |
353 | ***************************************************************************** | 353 | ***************************************************************************** |
354 | * | 354 | * |
355 | * SDRAM/MEM Cotnroller Registers | 355 | * SDRAM/MEM Controller Registers |
356 | * | 356 | * |
357 | ***************************************************************************** | 357 | ***************************************************************************** |
358 | */ | 358 | */ |
@@ -375,6 +375,7 @@ | |||
375 | /* SDRAM Control Registers */ | 375 | /* SDRAM Control Registers */ |
376 | #define MV64360_D_UNIT_CONTROL_LOW 0x1404 | 376 | #define MV64360_D_UNIT_CONTROL_LOW 0x1404 |
377 | #define MV64360_D_UNIT_CONTROL_HIGH 0x1424 | 377 | #define MV64360_D_UNIT_CONTROL_HIGH 0x1424 |
378 | #define MV64460_D_UNIT_MMASK 0x14b0 | ||
378 | 379 | ||
379 | /* SDRAM Error Report Registers (64360) */ | 380 | /* SDRAM Error Report Registers (64360) */ |
380 | #define MV64360_SDRAM_ERR_DATA_LO 0x1444 | 381 | #define MV64360_SDRAM_ERR_DATA_LO 0x1444 |
@@ -388,7 +389,7 @@ | |||
388 | /* | 389 | /* |
389 | ***************************************************************************** | 390 | ***************************************************************************** |
390 | * | 391 | * |
391 | * Device/BOOT Cotnroller Registers | 392 | * Device/BOOT Controller Registers |
392 | * | 393 | * |
393 | ***************************************************************************** | 394 | ***************************************************************************** |
394 | */ | 395 | */ |
@@ -680,6 +681,8 @@ | |||
680 | #define MV64x60_PCI1_SLAVE_P2P_IO_REMAP 0x0dec | 681 | #define MV64x60_PCI1_SLAVE_P2P_IO_REMAP 0x0dec |
681 | #define MV64x60_PCI1_SLAVE_CPU_REMAP 0x0df0 | 682 | #define MV64x60_PCI1_SLAVE_CPU_REMAP 0x0df0 |
682 | 683 | ||
684 | #define MV64360_PCICFG_CPCI_HOTSWAP 0x68 | ||
685 | |||
683 | /* | 686 | /* |
684 | ***************************************************************************** | 687 | ***************************************************************************** |
685 | * | 688 | * |
diff --git a/include/asm-ppc/param.h b/include/asm-ppc/param.h index b24a4e37196a..6198b1657a45 100644 --- a/include/asm-ppc/param.h +++ b/include/asm-ppc/param.h | |||
@@ -1,8 +1,10 @@ | |||
1 | #ifndef _ASM_PPC_PARAM_H | 1 | #ifndef _ASM_PPC_PARAM_H |
2 | #define _ASM_PPC_PARAM_H | 2 | #define _ASM_PPC_PARAM_H |
3 | 3 | ||
4 | #include <linux/config.h> | ||
5 | |||
4 | #ifdef __KERNEL__ | 6 | #ifdef __KERNEL__ |
5 | #define HZ 1000 /* internal timer frequency */ | 7 | #define HZ CONFIG_HZ /* internal timer frequency */ |
6 | #define USER_HZ 100 /* for user interfaces in "ticks" */ | 8 | #define USER_HZ 100 /* for user interfaces in "ticks" */ |
7 | #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ | 9 | #define CLOCKS_PER_SEC (USER_HZ) /* frequency at which times() counts */ |
8 | #endif /* __KERNEL__ */ | 10 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc/ppc_sys.h b/include/asm-ppc/ppc_sys.h index 8ea624566231..048f7c8596ee 100644 --- a/include/asm-ppc/ppc_sys.h +++ b/include/asm-ppc/ppc_sys.h | |||
@@ -21,7 +21,9 @@ | |||
21 | #include <linux/device.h> | 21 | #include <linux/device.h> |
22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
23 | 23 | ||
24 | #if defined(CONFIG_83xx) | 24 | #if defined(CONFIG_8260) |
25 | #include <asm/mpc8260.h> | ||
26 | #elif defined(CONFIG_83xx) | ||
25 | #include <asm/mpc83xx.h> | 27 | #include <asm/mpc83xx.h> |
26 | #elif defined(CONFIG_85xx) | 28 | #elif defined(CONFIG_85xx) |
27 | #include <asm/mpc85xx.h> | 29 | #include <asm/mpc85xx.h> |
@@ -50,6 +52,7 @@ extern struct ppc_sys_spec *cur_ppc_sys_spec; | |||
50 | /* determine which specific SOC we are */ | 52 | /* determine which specific SOC we are */ |
51 | extern void identify_ppc_sys_by_id(u32 id) __init; | 53 | extern void identify_ppc_sys_by_id(u32 id) __init; |
52 | extern void identify_ppc_sys_by_name(char *name) __init; | 54 | extern void identify_ppc_sys_by_name(char *name) __init; |
55 | extern void identify_ppc_sys_by_name_and_id(char *name, u32 id) __init; | ||
53 | 56 | ||
54 | /* describes all devices that may exist in a given family of processors */ | 57 | /* describes all devices that may exist in a given family of processors */ |
55 | extern struct platform_device ppc_sys_platform_devices[]; | 58 | extern struct platform_device ppc_sys_platform_devices[]; |
diff --git a/include/asm-ppc/serial.h b/include/asm-ppc/serial.h index 6d47438be58c..485a924e4d06 100644 --- a/include/asm-ppc/serial.h +++ b/include/asm-ppc/serial.h | |||
@@ -18,8 +18,6 @@ | |||
18 | #include <platforms/powerpmc250.h> | 18 | #include <platforms/powerpmc250.h> |
19 | #elif defined(CONFIG_LOPEC) | 19 | #elif defined(CONFIG_LOPEC) |
20 | #include <platforms/lopec.h> | 20 | #include <platforms/lopec.h> |
21 | #elif defined(CONFIG_MCPN765) | ||
22 | #include <platforms/mcpn765.h> | ||
23 | #elif defined(CONFIG_MVME5100) | 21 | #elif defined(CONFIG_MVME5100) |
24 | #include <platforms/mvme5100.h> | 22 | #include <platforms/mvme5100.h> |
25 | #elif defined(CONFIG_PAL4) | 23 | #elif defined(CONFIG_PAL4) |
diff --git a/include/asm-ppc/system.h b/include/asm-ppc/system.h index 82395f30004b..513a334c5810 100644 --- a/include/asm-ppc/system.h +++ b/include/asm-ppc/system.h | |||
@@ -84,9 +84,14 @@ extern void cvt_fd(float *from, double *to, unsigned long *fpscr); | |||
84 | extern void cvt_df(double *from, float *to, unsigned long *fpscr); | 84 | extern void cvt_df(double *from, float *to, unsigned long *fpscr); |
85 | extern int call_rtas(const char *, int, int, unsigned long *, ...); | 85 | extern int call_rtas(const char *, int, int, unsigned long *, ...); |
86 | extern void cacheable_memzero(void *p, unsigned int nb); | 86 | extern void cacheable_memzero(void *p, unsigned int nb); |
87 | extern void *cacheable_memcpy(void *, const void *, unsigned int); | ||
87 | extern int do_page_fault(struct pt_regs *, unsigned long, unsigned long); | 88 | extern int do_page_fault(struct pt_regs *, unsigned long, unsigned long); |
88 | extern void bad_page_fault(struct pt_regs *, unsigned long, int); | 89 | extern void bad_page_fault(struct pt_regs *, unsigned long, int); |
89 | extern void die(const char *, struct pt_regs *, long); | 90 | extern void die(const char *, struct pt_regs *, long); |
91 | #ifdef CONFIG_BOOKE_WDT | ||
92 | extern u32 booke_wdt_enabled; | ||
93 | extern u32 booke_wdt_period; | ||
94 | #endif /* CONFIG_BOOKE_WDT */ | ||
90 | 95 | ||
91 | struct device_node; | 96 | struct device_node; |
92 | extern void note_scsi_host(struct device_node *, void *); | 97 | extern void note_scsi_host(struct device_node *, void *); |
diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h index a787bc032587..77dc24d7d2ad 100644 --- a/include/asm-ppc/types.h +++ b/include/asm-ppc/types.h | |||
@@ -62,8 +62,6 @@ typedef u64 sector_t; | |||
62 | #define HAVE_SECTOR_T | 62 | #define HAVE_SECTOR_T |
63 | #endif | 63 | #endif |
64 | 64 | ||
65 | typedef unsigned int kmem_bufctl_t; | ||
66 | |||
67 | #endif /* __ASSEMBLY__ */ | 65 | #endif /* __ASSEMBLY__ */ |
68 | 66 | ||
69 | #endif /* __KERNEL__ */ | 67 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-ppc64/lmb.h b/include/asm-ppc64/lmb.h index cb368bf0f264..de91e034bd98 100644 --- a/include/asm-ppc64/lmb.h +++ b/include/asm-ppc64/lmb.h | |||
@@ -56,4 +56,26 @@ extern void lmb_dump_all(void); | |||
56 | 56 | ||
57 | extern unsigned long io_hole_start; | 57 | extern unsigned long io_hole_start; |
58 | 58 | ||
59 | static inline unsigned long | ||
60 | lmb_size_bytes(struct lmb_region *type, unsigned long region_nr) | ||
61 | { | ||
62 | return type->region[region_nr].size; | ||
63 | } | ||
64 | static inline unsigned long | ||
65 | lmb_size_pages(struct lmb_region *type, unsigned long region_nr) | ||
66 | { | ||
67 | return lmb_size_bytes(type, region_nr) >> PAGE_SHIFT; | ||
68 | } | ||
69 | static inline unsigned long | ||
70 | lmb_start_pfn(struct lmb_region *type, unsigned long region_nr) | ||
71 | { | ||
72 | return type->region[region_nr].base >> PAGE_SHIFT; | ||
73 | } | ||
74 | static inline unsigned long | ||
75 | lmb_end_pfn(struct lmb_region *type, unsigned long region_nr) | ||
76 | { | ||
77 | return lmb_start_pfn(type, region_nr) + | ||
78 | lmb_size_pages(type, region_nr); | ||
79 | } | ||
80 | |||
59 | #endif /* _PPC64_LMB_H */ | 81 | #endif /* _PPC64_LMB_H */ |
diff --git a/include/asm-ppc64/lppaca.h b/include/asm-ppc64/lppaca.h index 70766b5f26c1..9e2a6c0649a0 100644 --- a/include/asm-ppc64/lppaca.h +++ b/include/asm-ppc64/lppaca.h | |||
@@ -108,7 +108,7 @@ struct lppaca | |||
108 | volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B | 108 | volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B |
109 | u16 slb_count; // # of SLBs to maintain x7C-x7D | 109 | u16 slb_count; // # of SLBs to maintain x7C-x7D |
110 | u8 idle; // Indicate OS is idle x7E | 110 | u8 idle; // Indicate OS is idle x7E |
111 | u8 reserved5; // Reserved x7F | 111 | u8 vmxregs_in_use; // VMX registers in use x7F |
112 | 112 | ||
113 | 113 | ||
114 | //============================================================================= | 114 | //============================================================================= |
diff --git a/include/asm-ppc64/page.h b/include/asm-ppc64/page.h index a79a08df62bd..a15422bcf30d 100644 --- a/include/asm-ppc64/page.h +++ b/include/asm-ppc64/page.h | |||
@@ -172,20 +172,6 @@ typedef unsigned long pgprot_t; | |||
172 | 172 | ||
173 | #endif | 173 | #endif |
174 | 174 | ||
175 | /* Pure 2^n version of get_order */ | ||
176 | static inline int get_order(unsigned long size) | ||
177 | { | ||
178 | int order; | ||
179 | |||
180 | size = (size-1) >> (PAGE_SHIFT-1); | ||
181 | order = -1; | ||
182 | do { | ||
183 | size >>= 1; | ||
184 | order++; | ||
185 | } while (size); | ||
186 | return order; | ||
187 | } | ||
188 | |||
189 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) | 175 | #define __pa(x) ((unsigned long)(x)-PAGE_OFFSET) |
190 | 176 | ||
191 | extern int page_is_ram(unsigned long pfn); | 177 | extern int page_is_ram(unsigned long pfn); |
@@ -270,4 +256,7 @@ extern u64 ppc64_pft_size; /* Log 2 of page table size */ | |||
270 | VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64) | 256 | VM_STACK_DEFAULT_FLAGS32 : VM_STACK_DEFAULT_FLAGS64) |
271 | 257 | ||
272 | #endif /* __KERNEL__ */ | 258 | #endif /* __KERNEL__ */ |
259 | |||
260 | #include <asm-generic/page.h> | ||
261 | |||
273 | #endif /* _PPC64_PAGE_H */ | 262 | #endif /* _PPC64_PAGE_H */ |
diff --git a/include/asm-ppc64/types.h b/include/asm-ppc64/types.h index 5b8c2cfa1138..bf294c1761b2 100644 --- a/include/asm-ppc64/types.h +++ b/include/asm-ppc64/types.h | |||
@@ -72,7 +72,6 @@ typedef struct { | |||
72 | unsigned long env; | 72 | unsigned long env; |
73 | } func_descr_t; | 73 | } func_descr_t; |
74 | 74 | ||
75 | typedef unsigned int kmem_bufctl_t; | ||
76 | #endif /* __ASSEMBLY__ */ | 75 | #endif /* __ASSEMBLY__ */ |
77 | 76 | ||
78 | #endif /* __KERNEL__ */ | 77 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-s390/debug.h b/include/asm-s390/debug.h index 92360d90144b..7127030ae162 100644 --- a/include/asm-s390/debug.h +++ b/include/asm-s390/debug.h | |||
@@ -52,8 +52,6 @@ struct __debug_entry{ | |||
52 | #define DEBUG_DATA(entry) (char*)(entry + 1) /* data is stored behind */ | 52 | #define DEBUG_DATA(entry) (char*)(entry + 1) /* data is stored behind */ |
53 | /* the entry information */ | 53 | /* the entry information */ |
54 | 54 | ||
55 | #define STCK(x) asm volatile ("STCK 0(%1)" : "=m" (x) : "a" (&(x)) : "cc") | ||
56 | |||
57 | typedef struct __debug_entry debug_entry_t; | 55 | typedef struct __debug_entry debug_entry_t; |
58 | 56 | ||
59 | struct debug_view; | 57 | struct debug_view; |
diff --git a/include/asm-s390/lowcore.h b/include/asm-s390/lowcore.h index afe6a9f9b0ae..c6f51c9ce3ff 100644 --- a/include/asm-s390/lowcore.h +++ b/include/asm-s390/lowcore.h | |||
@@ -68,6 +68,7 @@ | |||
68 | #define __LC_SYSTEM_TIMER 0x270 | 68 | #define __LC_SYSTEM_TIMER 0x270 |
69 | #define __LC_LAST_UPDATE_CLOCK 0x278 | 69 | #define __LC_LAST_UPDATE_CLOCK 0x278 |
70 | #define __LC_STEAL_CLOCK 0x280 | 70 | #define __LC_STEAL_CLOCK 0x280 |
71 | #define __LC_RETURN_MCCK_PSW 0x288 | ||
71 | #define __LC_KERNEL_STACK 0xC40 | 72 | #define __LC_KERNEL_STACK 0xC40 |
72 | #define __LC_THREAD_INFO 0xC44 | 73 | #define __LC_THREAD_INFO 0xC44 |
73 | #define __LC_ASYNC_STACK 0xC48 | 74 | #define __LC_ASYNC_STACK 0xC48 |
@@ -90,6 +91,7 @@ | |||
90 | #define __LC_SYSTEM_TIMER 0x278 | 91 | #define __LC_SYSTEM_TIMER 0x278 |
91 | #define __LC_LAST_UPDATE_CLOCK 0x280 | 92 | #define __LC_LAST_UPDATE_CLOCK 0x280 |
92 | #define __LC_STEAL_CLOCK 0x288 | 93 | #define __LC_STEAL_CLOCK 0x288 |
94 | #define __LC_RETURN_MCCK_PSW 0x290 | ||
93 | #define __LC_KERNEL_STACK 0xD40 | 95 | #define __LC_KERNEL_STACK 0xD40 |
94 | #define __LC_THREAD_INFO 0xD48 | 96 | #define __LC_THREAD_INFO 0xD48 |
95 | #define __LC_ASYNC_STACK 0xD50 | 97 | #define __LC_ASYNC_STACK 0xD50 |
@@ -196,7 +198,8 @@ struct _lowcore | |||
196 | __u64 system_timer; /* 0x270 */ | 198 | __u64 system_timer; /* 0x270 */ |
197 | __u64 last_update_clock; /* 0x278 */ | 199 | __u64 last_update_clock; /* 0x278 */ |
198 | __u64 steal_clock; /* 0x280 */ | 200 | __u64 steal_clock; /* 0x280 */ |
199 | __u8 pad8[0xc00-0x288]; /* 0x288 */ | 201 | psw_t return_mcck_psw; /* 0x288 */ |
202 | __u8 pad8[0xc00-0x290]; /* 0x290 */ | ||
200 | 203 | ||
201 | /* System info area */ | 204 | /* System info area */ |
202 | __u32 save_area[16]; /* 0xc00 */ | 205 | __u32 save_area[16]; /* 0xc00 */ |
@@ -285,7 +288,8 @@ struct _lowcore | |||
285 | __u64 system_timer; /* 0x278 */ | 288 | __u64 system_timer; /* 0x278 */ |
286 | __u64 last_update_clock; /* 0x280 */ | 289 | __u64 last_update_clock; /* 0x280 */ |
287 | __u64 steal_clock; /* 0x288 */ | 290 | __u64 steal_clock; /* 0x288 */ |
288 | __u8 pad8[0xc00-0x290]; /* 0x290 */ | 291 | psw_t return_mcck_psw; /* 0x290 */ |
292 | __u8 pad8[0xc00-0x2a0]; /* 0x2a0 */ | ||
289 | /* System info area */ | 293 | /* System info area */ |
290 | __u64 save_area[16]; /* 0xc00 */ | 294 | __u64 save_area[16]; /* 0xc00 */ |
291 | __u8 pad9[0xd40-0xc80]; /* 0xc80 */ | 295 | __u8 pad9[0xd40-0xc80]; /* 0xc80 */ |
diff --git a/include/asm-s390/page.h b/include/asm-s390/page.h index 2be287b9df88..2430c561e021 100644 --- a/include/asm-s390/page.h +++ b/include/asm-s390/page.h | |||
@@ -111,20 +111,6 @@ static inline void copy_page(void *to, void *from) | |||
111 | #define alloc_zeroed_user_highpage(vma, vaddr) alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO, vma, vaddr) | 111 | #define alloc_zeroed_user_highpage(vma, vaddr) alloc_page_vma(GFP_HIGHUSER | __GFP_ZERO, vma, vaddr) |
112 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE | 112 | #define __HAVE_ARCH_ALLOC_ZEROED_USER_HIGHPAGE |
113 | 113 | ||
114 | /* Pure 2^n version of get_order */ | ||
115 | extern __inline__ int get_order(unsigned long size) | ||
116 | { | ||
117 | int order; | ||
118 | |||
119 | size = (size-1) >> (PAGE_SHIFT-1); | ||
120 | order = -1; | ||
121 | do { | ||
122 | size >>= 1; | ||
123 | order++; | ||
124 | } while (size); | ||
125 | return order; | ||
126 | } | ||
127 | |||
128 | /* | 114 | /* |
129 | * These are used to make use of C type-checking.. | 115 | * These are used to make use of C type-checking.. |
130 | */ | 116 | */ |
@@ -207,4 +193,6 @@ page_get_storage_key(unsigned long addr) | |||
207 | 193 | ||
208 | #endif /* __KERNEL__ */ | 194 | #endif /* __KERNEL__ */ |
209 | 195 | ||
196 | #include <asm-generic/page.h> | ||
197 | |||
210 | #endif /* _S390_PAGE_H */ | 198 | #endif /* _S390_PAGE_H */ |
diff --git a/include/asm-s390/spinlock.h b/include/asm-s390/spinlock.h index 8ff10300f7ee..321b23bba1ec 100644 --- a/include/asm-s390/spinlock.h +++ b/include/asm-s390/spinlock.h | |||
@@ -47,7 +47,7 @@ extern int _raw_spin_trylock_retry(spinlock_t *lp, unsigned int pc); | |||
47 | 47 | ||
48 | static inline void _raw_spin_lock(spinlock_t *lp) | 48 | static inline void _raw_spin_lock(spinlock_t *lp) |
49 | { | 49 | { |
50 | unsigned long pc = (unsigned long) __builtin_return_address(0); | 50 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); |
51 | 51 | ||
52 | if (unlikely(_raw_compare_and_swap(&lp->lock, 0, pc) != 0)) | 52 | if (unlikely(_raw_compare_and_swap(&lp->lock, 0, pc) != 0)) |
53 | _raw_spin_lock_wait(lp, pc); | 53 | _raw_spin_lock_wait(lp, pc); |
@@ -55,7 +55,7 @@ static inline void _raw_spin_lock(spinlock_t *lp) | |||
55 | 55 | ||
56 | static inline int _raw_spin_trylock(spinlock_t *lp) | 56 | static inline int _raw_spin_trylock(spinlock_t *lp) |
57 | { | 57 | { |
58 | unsigned long pc = (unsigned long) __builtin_return_address(0); | 58 | unsigned long pc = 1 | (unsigned long) __builtin_return_address(0); |
59 | 59 | ||
60 | if (likely(_raw_compare_and_swap(&lp->lock, 0, pc) == 0)) | 60 | if (likely(_raw_compare_and_swap(&lp->lock, 0, pc) == 0)) |
61 | return 1; | 61 | return 1; |
diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 3fefd61416a5..d0be3e477013 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h | |||
@@ -79,8 +79,6 @@ typedef unsigned long u64; | |||
79 | 79 | ||
80 | typedef u32 dma_addr_t; | 80 | typedef u32 dma_addr_t; |
81 | 81 | ||
82 | typedef unsigned int kmem_bufctl_t; | ||
83 | |||
84 | #ifndef __s390x__ | 82 | #ifndef __s390x__ |
85 | typedef union { | 83 | typedef union { |
86 | unsigned long long pair; | 84 | unsigned long long pair; |
diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index 180467be8e7b..324e6cc5ecf7 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h | |||
@@ -122,24 +122,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
122 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 122 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
123 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 123 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
124 | 124 | ||
125 | #ifndef __ASSEMBLY__ | ||
126 | |||
127 | /* Pure 2^n version of get_order */ | ||
128 | static __inline__ int get_order(unsigned long size) | ||
129 | { | ||
130 | int order; | ||
131 | |||
132 | size = (size-1) >> (PAGE_SHIFT-1); | ||
133 | order = -1; | ||
134 | do { | ||
135 | size >>= 1; | ||
136 | order++; | ||
137 | } while (size); | ||
138 | return order; | ||
139 | } | ||
140 | |||
141 | #endif | ||
142 | |||
143 | #endif /* __KERNEL__ */ | 125 | #endif /* __KERNEL__ */ |
144 | 126 | ||
127 | #include <asm-generic/page.h> | ||
128 | |||
145 | #endif /* __ASM_SH_PAGE_H */ | 129 | #endif /* __ASM_SH_PAGE_H */ |
diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index c4dc126c5621..cb7e183a0a6b 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h | |||
@@ -58,8 +58,6 @@ typedef u64 sector_t; | |||
58 | #define HAVE_SECTOR_T | 58 | #define HAVE_SECTOR_T |
59 | #endif | 59 | #endif |
60 | 60 | ||
61 | typedef unsigned int kmem_bufctl_t; | ||
62 | |||
63 | #endif /* __ASSEMBLY__ */ | 61 | #endif /* __ASSEMBLY__ */ |
64 | 62 | ||
65 | #endif /* __KERNEL__ */ | 63 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sh64/page.h b/include/asm-sh64/page.h index d6167f1c0e99..c86df90f7cbd 100644 --- a/include/asm-sh64/page.h +++ b/include/asm-sh64/page.h | |||
@@ -115,24 +115,8 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
115 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 115 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
116 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | 116 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) |
117 | 117 | ||
118 | #ifndef __ASSEMBLY__ | ||
119 | |||
120 | /* Pure 2^n version of get_order */ | ||
121 | extern __inline__ int get_order(unsigned long size) | ||
122 | { | ||
123 | int order; | ||
124 | |||
125 | size = (size-1) >> (PAGE_SHIFT-1); | ||
126 | order = -1; | ||
127 | do { | ||
128 | size >>= 1; | ||
129 | order++; | ||
130 | } while (size); | ||
131 | return order; | ||
132 | } | ||
133 | |||
134 | #endif | ||
135 | |||
136 | #endif /* __KERNEL__ */ | 118 | #endif /* __KERNEL__ */ |
137 | 119 | ||
120 | #include <asm-generic/page.h> | ||
121 | |||
138 | #endif /* __ASM_SH64_PAGE_H */ | 122 | #endif /* __ASM_SH64_PAGE_H */ |
diff --git a/include/asm-sh64/types.h b/include/asm-sh64/types.h index 41d4d2f82aa9..8d41db2153b5 100644 --- a/include/asm-sh64/types.h +++ b/include/asm-sh64/types.h | |||
@@ -65,8 +65,6 @@ typedef u32 dma_addr_t; | |||
65 | #endif | 65 | #endif |
66 | typedef u64 dma64_addr_t; | 66 | typedef u64 dma64_addr_t; |
67 | 67 | ||
68 | typedef unsigned int kmem_bufctl_t; | ||
69 | |||
70 | #endif /* __ASSEMBLY__ */ | 68 | #endif /* __ASSEMBLY__ */ |
71 | 69 | ||
72 | #define BITS_PER_LONG 32 | 70 | #define BITS_PER_LONG 32 |
diff --git a/include/asm-sparc/page.h b/include/asm-sparc/page.h index 383060e90d94..9122684f6c1e 100644 --- a/include/asm-sparc/page.h +++ b/include/asm-sparc/page.h | |||
@@ -132,20 +132,6 @@ BTFIXUPDEF_SETHI(sparc_unmapped_base) | |||
132 | 132 | ||
133 | #define TASK_UNMAPPED_BASE BTFIXUP_SETHI(sparc_unmapped_base) | 133 | #define TASK_UNMAPPED_BASE BTFIXUP_SETHI(sparc_unmapped_base) |
134 | 134 | ||
135 | /* Pure 2^n version of get_order */ | ||
136 | extern __inline__ int get_order(unsigned long size) | ||
137 | { | ||
138 | int order; | ||
139 | |||
140 | size = (size-1) >> (PAGE_SHIFT-1); | ||
141 | order = -1; | ||
142 | do { | ||
143 | size >>= 1; | ||
144 | order++; | ||
145 | } while (size); | ||
146 | return order; | ||
147 | } | ||
148 | |||
149 | #else /* !(__ASSEMBLY__) */ | 135 | #else /* !(__ASSEMBLY__) */ |
150 | 136 | ||
151 | #define __pgprot(x) (x) | 137 | #define __pgprot(x) (x) |
@@ -178,4 +164,6 @@ extern unsigned long pfn_base; | |||
178 | 164 | ||
179 | #endif /* __KERNEL__ */ | 165 | #endif /* __KERNEL__ */ |
180 | 166 | ||
167 | #include <asm-generic/page.h> | ||
168 | |||
181 | #endif /* _SPARC_PAGE_H */ | 169 | #endif /* _SPARC_PAGE_H */ |
diff --git a/include/asm-sparc/pgtable.h b/include/asm-sparc/pgtable.h index 40ed30a2b7c6..8f4f6a959651 100644 --- a/include/asm-sparc/pgtable.h +++ b/include/asm-sparc/pgtable.h | |||
@@ -435,9 +435,6 @@ extern unsigned long *sparc_valid_addr_bitmap; | |||
435 | #define kern_addr_valid(addr) \ | 435 | #define kern_addr_valid(addr) \ |
436 | (test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap)) | 436 | (test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap)) |
437 | 437 | ||
438 | extern int io_remap_page_range(struct vm_area_struct *vma, | ||
439 | unsigned long from, unsigned long to, | ||
440 | unsigned long size, pgprot_t prot, int space); | ||
441 | extern int io_remap_pfn_range(struct vm_area_struct *vma, | 438 | extern int io_remap_pfn_range(struct vm_area_struct *vma, |
442 | unsigned long from, unsigned long pfn, | 439 | unsigned long from, unsigned long pfn, |
443 | unsigned long size, pgprot_t prot); | 440 | unsigned long size, pgprot_t prot); |
diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h index 9eabf6e61ccc..42fc6ed98156 100644 --- a/include/asm-sparc/types.h +++ b/include/asm-sparc/types.h | |||
@@ -54,8 +54,6 @@ typedef unsigned long long u64; | |||
54 | typedef u32 dma_addr_t; | 54 | typedef u32 dma_addr_t; |
55 | typedef u32 dma64_addr_t; | 55 | typedef u32 dma64_addr_t; |
56 | 56 | ||
57 | typedef unsigned short kmem_bufctl_t; | ||
58 | |||
59 | #endif /* __ASSEMBLY__ */ | 57 | #endif /* __ASSEMBLY__ */ |
60 | 58 | ||
61 | #endif /* __KERNEL__ */ | 59 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-sparc64/cpudata.h b/include/asm-sparc64/cpudata.h index cc7198aaac50..9a3a81f1cc58 100644 --- a/include/asm-sparc64/cpudata.h +++ b/include/asm-sparc64/cpudata.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* cpudata.h: Per-cpu parameters. | 1 | /* cpudata.h: Per-cpu parameters. |
2 | * | 2 | * |
3 | * Copyright (C) 2003 David S. Miller (davem@redhat.com) | 3 | * Copyright (C) 2003, 2005 David S. Miller (davem@redhat.com) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef _SPARC64_CPUDATA_H | 6 | #ifndef _SPARC64_CPUDATA_H |
@@ -10,7 +10,7 @@ | |||
10 | 10 | ||
11 | typedef struct { | 11 | typedef struct { |
12 | /* Dcache line 1 */ | 12 | /* Dcache line 1 */ |
13 | unsigned int __pad0; /* bh_count moved to irq_stat for consistency. KAO */ | 13 | unsigned int __softirq_pending; /* must be 1st, see rtrap.S */ |
14 | unsigned int multiplier; | 14 | unsigned int multiplier; |
15 | unsigned int counter; | 15 | unsigned int counter; |
16 | unsigned int idle_volume; | 16 | unsigned int idle_volume; |
diff --git a/include/asm-sparc64/hardirq.h b/include/asm-sparc64/hardirq.h index d6db1aed7645..f0cf71376ec5 100644 --- a/include/asm-sparc64/hardirq.h +++ b/include/asm-sparc64/hardirq.h | |||
@@ -1,22 +1,16 @@ | |||
1 | /* hardirq.h: 64-bit Sparc hard IRQ support. | 1 | /* hardirq.h: 64-bit Sparc hard IRQ support. |
2 | * | 2 | * |
3 | * Copyright (C) 1997, 1998 David S. Miller (davem@caip.rutgers.edu) | 3 | * Copyright (C) 1997, 1998, 2005 David S. Miller (davem@davemloft.net) |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef __SPARC64_HARDIRQ_H | 6 | #ifndef __SPARC64_HARDIRQ_H |
7 | #define __SPARC64_HARDIRQ_H | 7 | #define __SPARC64_HARDIRQ_H |
8 | 8 | ||
9 | #include <linux/config.h> | 9 | #include <asm/cpudata.h> |
10 | #include <linux/threads.h> | ||
11 | #include <linux/spinlock.h> | ||
12 | #include <linux/cache.h> | ||
13 | 10 | ||
14 | /* rtrap.S is sensitive to the offsets of these fields */ | 11 | #define __ARCH_IRQ_STAT |
15 | typedef struct { | 12 | #define local_softirq_pending() \ |
16 | unsigned int __softirq_pending; | 13 | (local_cpu_data().__softirq_pending) |
17 | } ____cacheline_aligned irq_cpustat_t; | ||
18 | |||
19 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | ||
20 | 14 | ||
21 | #define HARDIRQ_BITS 8 | 15 | #define HARDIRQ_BITS 8 |
22 | 16 | ||
diff --git a/include/asm-sparc64/io.h b/include/asm-sparc64/io.h index afdcea90707a..0056770e83ad 100644 --- a/include/asm-sparc64/io.h +++ b/include/asm-sparc64/io.h | |||
@@ -100,18 +100,41 @@ static __inline__ void _outl(u32 l, unsigned long addr) | |||
100 | #define inl_p(__addr) inl(__addr) | 100 | #define inl_p(__addr) inl(__addr) |
101 | #define outl_p(__l, __addr) outl(__l, __addr) | 101 | #define outl_p(__l, __addr) outl(__l, __addr) |
102 | 102 | ||
103 | extern void outsb(void __iomem *addr, const void *src, unsigned long count); | 103 | extern void outsb(unsigned long, const void *, unsigned long); |
104 | extern void outsw(void __iomem *addr, const void *src, unsigned long count); | 104 | extern void outsw(unsigned long, const void *, unsigned long); |
105 | extern void outsl(void __iomem *addr, const void *src, unsigned long count); | 105 | extern void outsl(unsigned long, const void *, unsigned long); |
106 | extern void insb(void __iomem *addr, void *dst, unsigned long count); | 106 | extern void insb(unsigned long, void *, unsigned long); |
107 | extern void insw(void __iomem *addr, void *dst, unsigned long count); | 107 | extern void insw(unsigned long, void *, unsigned long); |
108 | extern void insl(void __iomem *addr, void *dst, unsigned long count); | 108 | extern void insl(unsigned long, void *, unsigned long); |
109 | #define ioread8_rep(a,d,c) insb(a,d,c) | 109 | |
110 | #define ioread16_rep(a,d,c) insw(a,d,c) | 110 | static inline void ioread8_rep(void __iomem *port, void *buf, unsigned long count) |
111 | #define ioread32_rep(a,d,c) insl(a,d,c) | 111 | { |
112 | #define iowrite8_rep(a,s,c) outsb(a,s,c) | 112 | insb((unsigned long __force)port, buf, count); |
113 | #define iowrite16_rep(a,s,c) outsw(a,s,c) | 113 | } |
114 | #define iowrite32_rep(a,s,c) outsl(a,s,c) | 114 | static inline void ioread16_rep(void __iomem *port, void *buf, unsigned long count) |
115 | { | ||
116 | insw((unsigned long __force)port, buf, count); | ||
117 | } | ||
118 | |||
119 | static inline void ioread32_rep(void __iomem *port, void *buf, unsigned long count) | ||
120 | { | ||
121 | insl((unsigned long __force)port, buf, count); | ||
122 | } | ||
123 | |||
124 | static inline void iowrite8_rep(void __iomem *port, const void *buf, unsigned long count) | ||
125 | { | ||
126 | outsb((unsigned long __force)port, buf, count); | ||
127 | } | ||
128 | |||
129 | static inline void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count) | ||
130 | { | ||
131 | outsw((unsigned long __force)port, buf, count); | ||
132 | } | ||
133 | |||
134 | static inline void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count) | ||
135 | { | ||
136 | outsl((unsigned long __force)port, buf, count); | ||
137 | } | ||
115 | 138 | ||
116 | /* Memory functions, same as I/O accesses on Ultra. */ | 139 | /* Memory functions, same as I/O accesses on Ultra. */ |
117 | static inline u8 _readb(const volatile void __iomem *addr) | 140 | static inline u8 _readb(const volatile void __iomem *addr) |
diff --git a/include/asm-sparc64/page.h b/include/asm-sparc64/page.h index b87dbbd64bc9..c9f8ef208ea5 100644 --- a/include/asm-sparc64/page.h +++ b/include/asm-sparc64/page.h | |||
@@ -150,20 +150,6 @@ struct sparc_phys_banks { | |||
150 | 150 | ||
151 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; | 151 | extern struct sparc_phys_banks sp_banks[SPARC_PHYS_BANKS]; |
152 | 152 | ||
153 | /* Pure 2^n version of get_order */ | ||
154 | static __inline__ int get_order(unsigned long size) | ||
155 | { | ||
156 | int order; | ||
157 | |||
158 | size = (size-1) >> (PAGE_SHIFT-1); | ||
159 | order = -1; | ||
160 | do { | ||
161 | size >>= 1; | ||
162 | order++; | ||
163 | } while (size); | ||
164 | return order; | ||
165 | } | ||
166 | |||
167 | #endif /* !(__ASSEMBLY__) */ | 153 | #endif /* !(__ASSEMBLY__) */ |
168 | 154 | ||
169 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | 155 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ |
@@ -171,4 +157,6 @@ static __inline__ int get_order(unsigned long size) | |||
171 | 157 | ||
172 | #endif /* !(__KERNEL__) */ | 158 | #endif /* !(__KERNEL__) */ |
173 | 159 | ||
160 | #include <asm-generic/page.h> | ||
161 | |||
174 | #endif /* !(_SPARC64_PAGE_H) */ | 162 | #endif /* !(_SPARC64_PAGE_H) */ |
diff --git a/include/asm-sparc64/pgtable.h b/include/asm-sparc64/pgtable.h index 1ae00c5087f1..a2b4f5ed4625 100644 --- a/include/asm-sparc64/pgtable.h +++ b/include/asm-sparc64/pgtable.h | |||
@@ -410,9 +410,6 @@ extern unsigned long *sparc64_valid_addr_bitmap; | |||
410 | #define kern_addr_valid(addr) \ | 410 | #define kern_addr_valid(addr) \ |
411 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) | 411 | (test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap)) |
412 | 412 | ||
413 | extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, | ||
414 | unsigned long offset, | ||
415 | unsigned long size, pgprot_t prot, int space); | ||
416 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 413 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
417 | unsigned long pfn, | 414 | unsigned long pfn, |
418 | unsigned long size, pgprot_t prot); | 415 | unsigned long size, pgprot_t prot); |
diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h index 6248ed1a9a7a..d0ee7f105838 100644 --- a/include/asm-sparc64/types.h +++ b/include/asm-sparc64/types.h | |||
@@ -56,8 +56,6 @@ typedef unsigned long u64; | |||
56 | typedef u32 dma_addr_t; | 56 | typedef u32 dma_addr_t; |
57 | typedef u64 dma64_addr_t; | 57 | typedef u64 dma64_addr_t; |
58 | 58 | ||
59 | typedef unsigned short kmem_bufctl_t; | ||
60 | |||
61 | #endif /* __ASSEMBLY__ */ | 59 | #endif /* __ASSEMBLY__ */ |
62 | 60 | ||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h index 095bb627b96a..2edb4f1f789c 100644 --- a/include/asm-um/mmu_context.h +++ b/include/asm-um/mmu_context.h | |||
@@ -20,7 +20,15 @@ extern void force_flush_all(void); | |||
20 | 20 | ||
21 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) | 21 | static inline void activate_mm(struct mm_struct *old, struct mm_struct *new) |
22 | { | 22 | { |
23 | if (old != new) | 23 | /* |
24 | * This is called by fs/exec.c and fs/aio.c. In the first case, for an | ||
25 | * exec, we don't need to do anything as we're called from userspace | ||
26 | * and thus going to use a new host PID. In the second, we're called | ||
27 | * from a kernel thread, and thus need to go doing the mmap's on the | ||
28 | * host. Since they're very expensive, we want to avoid that as far as | ||
29 | * possible. | ||
30 | */ | ||
31 | if (old != new && (current->flags & PF_BORROWED_MM)) | ||
24 | force_flush_all(); | 32 | force_flush_all(); |
25 | } | 33 | } |
26 | 34 | ||
diff --git a/include/asm-um/page.h b/include/asm-um/page.h index f58aedadeb4e..bd850a249183 100644 --- a/include/asm-um/page.h +++ b/include/asm-um/page.h | |||
@@ -116,24 +116,12 @@ extern void *to_virt(unsigned long phys); | |||
116 | #define pfn_valid(pfn) ((pfn) < max_mapnr) | 116 | #define pfn_valid(pfn) ((pfn) < max_mapnr) |
117 | #define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v))) | 117 | #define virt_addr_valid(v) pfn_valid(phys_to_pfn(__pa(v))) |
118 | 118 | ||
119 | /* Pure 2^n version of get_order */ | ||
120 | static __inline__ int get_order(unsigned long size) | ||
121 | { | ||
122 | int order; | ||
123 | |||
124 | size = (size-1) >> (PAGE_SHIFT-1); | ||
125 | order = -1; | ||
126 | do { | ||
127 | size >>= 1; | ||
128 | order++; | ||
129 | } while (size); | ||
130 | return order; | ||
131 | } | ||
132 | |||
133 | extern struct page *arch_validate(struct page *page, int mask, int order); | 119 | extern struct page *arch_validate(struct page *page, int mask, int order); |
134 | #define HAVE_ARCH_VALIDATE | 120 | #define HAVE_ARCH_VALIDATE |
135 | 121 | ||
136 | extern void arch_free_page(struct page *page, int order); | 122 | extern void arch_free_page(struct page *page, int order); |
137 | #define HAVE_ARCH_FREE_PAGE | 123 | #define HAVE_ARCH_FREE_PAGE |
138 | 124 | ||
125 | #include <asm-generic/page.h> | ||
126 | |||
139 | #endif | 127 | #endif |
diff --git a/include/asm-um/pgalloc.h b/include/asm-um/pgalloc.h index 8fcb2fc0a892..ea49411236dc 100644 --- a/include/asm-um/pgalloc.h +++ b/include/asm-um/pgalloc.h | |||
@@ -42,11 +42,13 @@ static inline void pte_free(struct page *pte) | |||
42 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) | 42 | #define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte)) |
43 | 43 | ||
44 | #ifdef CONFIG_3_LEVEL_PGTABLES | 44 | #ifdef CONFIG_3_LEVEL_PGTABLES |
45 | /* | 45 | |
46 | * In the 3-level case we free the pmds as part of the pgd. | 46 | extern __inline__ void pmd_free(pmd_t *pmd) |
47 | */ | 47 | { |
48 | #define pmd_free(x) do { } while (0) | 48 | free_page((unsigned long)pmd); |
49 | #define __pmd_free_tlb(tlb,x) do { } while (0) | 49 | } |
50 | |||
51 | #define __pmd_free_tlb(tlb,x) tlb_remove_page((tlb),virt_to_page(x)) | ||
50 | #endif | 52 | #endif |
51 | 53 | ||
52 | #define check_pgt_cache() do { } while (0) | 54 | #define check_pgt_cache() do { } while (0) |
diff --git a/include/asm-um/pgtable-2level.h b/include/asm-um/pgtable-2level.h index 9b3abc01d60e..ffe017f6b64b 100644 --- a/include/asm-um/pgtable-2level.h +++ b/include/asm-um/pgtable-2level.h | |||
@@ -35,35 +35,8 @@ | |||
35 | static inline int pgd_newpage(pgd_t pgd) { return 0; } | 35 | static inline int pgd_newpage(pgd_t pgd) { return 0; } |
36 | static inline void pgd_mkuptodate(pgd_t pgd) { } | 36 | static inline void pgd_mkuptodate(pgd_t pgd) { } |
37 | 37 | ||
38 | #define pte_present(x) (pte_val(x) & (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
39 | |||
40 | static inline pte_t pte_mknewprot(pte_t pte) | ||
41 | { | ||
42 | pte_val(pte) |= _PAGE_NEWPROT; | ||
43 | return(pte); | ||
44 | } | ||
45 | |||
46 | static inline pte_t pte_mknewpage(pte_t pte) | ||
47 | { | ||
48 | pte_val(pte) |= _PAGE_NEWPAGE; | ||
49 | return(pte); | ||
50 | } | ||
51 | |||
52 | static inline void set_pte(pte_t *pteptr, pte_t pteval) | ||
53 | { | ||
54 | /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so | ||
55 | * fix_range knows to unmap it. _PAGE_NEWPROT is specific to | ||
56 | * mapped pages. | ||
57 | */ | ||
58 | *pteptr = pte_mknewpage(pteval); | ||
59 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | ||
60 | } | ||
61 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
62 | |||
63 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) | 38 | #define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval)) |
64 | 39 | ||
65 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
66 | #define pte_none(x) !(pte_val(x) & ~_PAGE_NEWPAGE) | ||
67 | #define pte_pfn(x) phys_to_pfn(pte_val(x)) | 40 | #define pte_pfn(x) phys_to_pfn(pte_val(x)) |
68 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) | 41 | #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot)) |
69 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) | 42 | #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot)) |
diff --git a/include/asm-um/pgtable-3level.h b/include/asm-um/pgtable-3level.h index 65e8bfc55fc4..786c25727289 100644 --- a/include/asm-um/pgtable-3level.h +++ b/include/asm-um/pgtable-3level.h | |||
@@ -57,35 +57,6 @@ static inline int pgd_newpage(pgd_t pgd) | |||
57 | 57 | ||
58 | static inline void pgd_mkuptodate(pgd_t pgd) { pgd_val(pgd) &= ~_PAGE_NEWPAGE; } | 58 | static inline void pgd_mkuptodate(pgd_t pgd) { pgd_val(pgd) &= ~_PAGE_NEWPAGE; } |
59 | 59 | ||
60 | |||
61 | #define pte_present(x) pte_get_bits(x, (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
62 | |||
63 | static inline pte_t pte_mknewprot(pte_t pte) | ||
64 | { | ||
65 | pte_set_bits(pte, _PAGE_NEWPROT); | ||
66 | return(pte); | ||
67 | } | ||
68 | |||
69 | static inline pte_t pte_mknewpage(pte_t pte) | ||
70 | { | ||
71 | pte_set_bits(pte, _PAGE_NEWPAGE); | ||
72 | return(pte); | ||
73 | } | ||
74 | |||
75 | static inline void set_pte(pte_t *pteptr, pte_t pteval) | ||
76 | { | ||
77 | pte_copy(*pteptr, pteval); | ||
78 | |||
79 | /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so | ||
80 | * fix_range knows to unmap it. _PAGE_NEWPROT is specific to | ||
81 | * mapped pages. | ||
82 | */ | ||
83 | |||
84 | *pteptr = pte_mknewpage(*pteptr); | ||
85 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | ||
86 | } | ||
87 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
88 | |||
89 | #define set_pmd(pmdptr, pmdval) set_64bit((phys_t *) (pmdptr), pmd_val(pmdval)) | 60 | #define set_pmd(pmdptr, pmdval) set_64bit((phys_t *) (pmdptr), pmd_val(pmdval)) |
90 | 61 | ||
91 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | 62 | static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) |
@@ -98,14 +69,11 @@ static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long address) | |||
98 | return pmd; | 69 | return pmd; |
99 | } | 70 | } |
100 | 71 | ||
101 | static inline void pmd_free(pmd_t *pmd){ | 72 | extern inline void pud_clear (pud_t *pud) |
102 | free_page((unsigned long) pmd); | 73 | { |
74 | set_pud(pud, __pud(0)); | ||
103 | } | 75 | } |
104 | 76 | ||
105 | #define __pmd_free_tlb(tlb,x) do { } while (0) | ||
106 | |||
107 | static inline void pud_clear (pud_t * pud) { } | ||
108 | |||
109 | #define pud_page(pud) \ | 77 | #define pud_page(pud) \ |
110 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) | 78 | ((struct page *) __va(pud_val(pud) & PAGE_MASK)) |
111 | 79 | ||
@@ -113,13 +81,6 @@ static inline void pud_clear (pud_t * pud) { } | |||
113 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ | 81 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ |
114 | pmd_index(address)) | 82 | pmd_index(address)) |
115 | 83 | ||
116 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
117 | |||
118 | static inline int pte_none(pte_t pte) | ||
119 | { | ||
120 | return pte_is_zero(pte); | ||
121 | } | ||
122 | |||
123 | static inline unsigned long pte_pfn(pte_t pte) | 84 | static inline unsigned long pte_pfn(pte_t pte) |
124 | { | 85 | { |
125 | return phys_to_pfn(pte_val(pte)); | 86 | return phys_to_pfn(pte_val(pte)); |
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index a88040920311..b48e0966ecd7 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
@@ -16,13 +16,15 @@ | |||
16 | 16 | ||
17 | #define _PAGE_PRESENT 0x001 | 17 | #define _PAGE_PRESENT 0x001 |
18 | #define _PAGE_NEWPAGE 0x002 | 18 | #define _PAGE_NEWPAGE 0x002 |
19 | #define _PAGE_NEWPROT 0x004 | 19 | #define _PAGE_NEWPROT 0x004 |
20 | #define _PAGE_FILE 0x008 /* set:pagecache unset:swap */ | ||
21 | #define _PAGE_PROTNONE 0x010 /* If not present */ | ||
22 | #define _PAGE_RW 0x020 | 20 | #define _PAGE_RW 0x020 |
23 | #define _PAGE_USER 0x040 | 21 | #define _PAGE_USER 0x040 |
24 | #define _PAGE_ACCESSED 0x080 | 22 | #define _PAGE_ACCESSED 0x080 |
25 | #define _PAGE_DIRTY 0x100 | 23 | #define _PAGE_DIRTY 0x100 |
24 | /* If _PAGE_PRESENT is clear, we use these: */ | ||
25 | #define _PAGE_FILE 0x008 /* nonlinear file mapping, saved PTE; unset:swap */ | ||
26 | #define _PAGE_PROTNONE 0x010 /* if the user mapped it with PROT_NONE; | ||
27 | pte_present gives true */ | ||
26 | 28 | ||
27 | #ifdef CONFIG_3_LEVEL_PGTABLES | 29 | #ifdef CONFIG_3_LEVEL_PGTABLES |
28 | #include "asm/pgtable-3level.h" | 30 | #include "asm/pgtable-3level.h" |
@@ -151,10 +153,24 @@ extern unsigned long pg0[1024]; | |||
151 | 153 | ||
152 | #define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK) | 154 | #define pmd_page(pmd) phys_to_page(pmd_val(pmd) & PAGE_MASK) |
153 | 155 | ||
156 | #define pte_page(x) pfn_to_page(pte_pfn(x)) | ||
154 | #define pte_address(x) (__va(pte_val(x) & PAGE_MASK)) | 157 | #define pte_address(x) (__va(pte_val(x) & PAGE_MASK)) |
155 | #define mk_phys(a, r) ((a) + (((unsigned long) r) << REGION_SHIFT)) | 158 | #define mk_phys(a, r) ((a) + (((unsigned long) r) << REGION_SHIFT)) |
156 | #define phys_addr(p) ((p) & ~REGION_MASK) | 159 | #define phys_addr(p) ((p) & ~REGION_MASK) |
157 | 160 | ||
161 | #define pte_present(x) pte_get_bits(x, (_PAGE_PRESENT | _PAGE_PROTNONE)) | ||
162 | |||
163 | /* | ||
164 | * ================================= | ||
165 | * Flags checking section. | ||
166 | * ================================= | ||
167 | */ | ||
168 | |||
169 | static inline int pte_none(pte_t pte) | ||
170 | { | ||
171 | return pte_is_zero(pte); | ||
172 | } | ||
173 | |||
158 | /* | 174 | /* |
159 | * The following only work if pte_present() is true. | 175 | * The following only work if pte_present() is true. |
160 | * Undefined behaviour if not.. | 176 | * Undefined behaviour if not.. |
@@ -210,6 +226,18 @@ static inline int pte_newprot(pte_t pte) | |||
210 | return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT))); | 226 | return(pte_present(pte) && (pte_get_bits(pte, _PAGE_NEWPROT))); |
211 | } | 227 | } |
212 | 228 | ||
229 | /* | ||
230 | * ================================= | ||
231 | * Flags setting section. | ||
232 | * ================================= | ||
233 | */ | ||
234 | |||
235 | static inline pte_t pte_mknewprot(pte_t pte) | ||
236 | { | ||
237 | pte_set_bits(pte, _PAGE_NEWPROT); | ||
238 | return(pte); | ||
239 | } | ||
240 | |||
213 | static inline pte_t pte_rdprotect(pte_t pte) | 241 | static inline pte_t pte_rdprotect(pte_t pte) |
214 | { | 242 | { |
215 | pte_clear_bits(pte, _PAGE_USER); | 243 | pte_clear_bits(pte, _PAGE_USER); |
@@ -278,6 +306,26 @@ static inline pte_t pte_mkuptodate(pte_t pte) | |||
278 | return(pte); | 306 | return(pte); |
279 | } | 307 | } |
280 | 308 | ||
309 | static inline pte_t pte_mknewpage(pte_t pte) | ||
310 | { | ||
311 | pte_set_bits(pte, _PAGE_NEWPAGE); | ||
312 | return(pte); | ||
313 | } | ||
314 | |||
315 | static inline void set_pte(pte_t *pteptr, pte_t pteval) | ||
316 | { | ||
317 | pte_copy(*pteptr, pteval); | ||
318 | |||
319 | /* If it's a swap entry, it needs to be marked _PAGE_NEWPAGE so | ||
320 | * fix_range knows to unmap it. _PAGE_NEWPROT is specific to | ||
321 | * mapped pages. | ||
322 | */ | ||
323 | |||
324 | *pteptr = pte_mknewpage(*pteptr); | ||
325 | if(pte_present(*pteptr)) *pteptr = pte_mknewprot(*pteptr); | ||
326 | } | ||
327 | #define set_pte_at(mm,addr,ptep,pteval) set_pte(ptep,pteval) | ||
328 | |||
281 | extern phys_t page_to_phys(struct page *page); | 329 | extern phys_t page_to_phys(struct page *page); |
282 | 330 | ||
283 | /* | 331 | /* |
diff --git a/include/asm-v850/page.h b/include/asm-v850/page.h index d6091622935d..b4bc85e7b91a 100644 --- a/include/asm-v850/page.h +++ b/include/asm-v850/page.h | |||
@@ -98,25 +98,6 @@ typedef unsigned long pgprot_t; | |||
98 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) | 98 | #define PAGE_ALIGN(addr) (((addr) + PAGE_SIZE - 1) & PAGE_MASK) |
99 | 99 | ||
100 | 100 | ||
101 | #ifndef __ASSEMBLY__ | ||
102 | |||
103 | /* Pure 2^n version of get_order */ | ||
104 | extern __inline__ int get_order (unsigned long size) | ||
105 | { | ||
106 | int order; | ||
107 | |||
108 | size = (size-1) >> (PAGE_SHIFT-1); | ||
109 | order = -1; | ||
110 | do { | ||
111 | size >>= 1; | ||
112 | order++; | ||
113 | } while (size); | ||
114 | return order; | ||
115 | } | ||
116 | |||
117 | #endif /* !__ASSEMBLY__ */ | ||
118 | |||
119 | |||
120 | /* No current v850 processor has virtual memory. */ | 101 | /* No current v850 processor has virtual memory. */ |
121 | #define __virt_to_phys(addr) (addr) | 102 | #define __virt_to_phys(addr) (addr) |
122 | #define __phys_to_virt(addr) (addr) | 103 | #define __phys_to_virt(addr) (addr) |
@@ -144,4 +125,6 @@ extern __inline__ int get_order (unsigned long size) | |||
144 | 125 | ||
145 | #endif /* KERNEL */ | 126 | #endif /* KERNEL */ |
146 | 127 | ||
128 | #include <asm-generic/page.h> | ||
129 | |||
147 | #endif /* __V850_PAGE_H__ */ | 130 | #endif /* __V850_PAGE_H__ */ |
diff --git a/include/asm-v850/types.h b/include/asm-v850/types.h index e7cfe5b33a10..dcef57196875 100644 --- a/include/asm-v850/types.h +++ b/include/asm-v850/types.h | |||
@@ -59,8 +59,6 @@ typedef unsigned long long u64; | |||
59 | 59 | ||
60 | typedef u32 dma_addr_t; | 60 | typedef u32 dma_addr_t; |
61 | 61 | ||
62 | typedef unsigned int kmem_bufctl_t; | ||
63 | |||
64 | #endif /* !__ASSEMBLY__ */ | 62 | #endif /* !__ASSEMBLY__ */ |
65 | 63 | ||
66 | #endif /* __KERNEL__ */ | 64 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-x86_64/page.h b/include/asm-x86_64/page.h index 431318764af6..135ffaa0393b 100644 --- a/include/asm-x86_64/page.h +++ b/include/asm-x86_64/page.h | |||
@@ -28,7 +28,6 @@ | |||
28 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) | 28 | #define HPAGE_SIZE ((1UL) << HPAGE_SHIFT) |
29 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) | 29 | #define HPAGE_MASK (~(HPAGE_SIZE - 1)) |
30 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) | 30 | #define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT) |
31 | #define ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
32 | 31 | ||
33 | #ifdef __KERNEL__ | 32 | #ifdef __KERNEL__ |
34 | #ifndef __ASSEMBLY__ | 33 | #ifndef __ASSEMBLY__ |
@@ -92,20 +91,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
92 | 91 | ||
93 | #include <asm/bug.h> | 92 | #include <asm/bug.h> |
94 | 93 | ||
95 | /* Pure 2^n version of get_order */ | ||
96 | extern __inline__ int get_order(unsigned long size) | ||
97 | { | ||
98 | int order; | ||
99 | |||
100 | size = (size-1) >> (PAGE_SHIFT-1); | ||
101 | order = -1; | ||
102 | do { | ||
103 | size >>= 1; | ||
104 | order++; | ||
105 | } while (size); | ||
106 | return order; | ||
107 | } | ||
108 | |||
109 | #endif /* __ASSEMBLY__ */ | 94 | #endif /* __ASSEMBLY__ */ |
110 | 95 | ||
111 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) | 96 | #define PAGE_OFFSET ((unsigned long)__PAGE_OFFSET) |
@@ -141,4 +126,6 @@ extern __inline__ int get_order(unsigned long size) | |||
141 | 126 | ||
142 | #endif /* __KERNEL__ */ | 127 | #endif /* __KERNEL__ */ |
143 | 128 | ||
129 | #include <asm-generic/page.h> | ||
130 | |||
144 | #endif /* _X86_64_PAGE_H */ | 131 | #endif /* _X86_64_PAGE_H */ |
diff --git a/include/asm-x86_64/pgtable.h b/include/asm-x86_64/pgtable.h index 4e167b5ea8f3..5e0f2fdab0d3 100644 --- a/include/asm-x86_64/pgtable.h +++ b/include/asm-x86_64/pgtable.h | |||
@@ -104,6 +104,19 @@ extern inline void pgd_clear (pgd_t * pgd) | |||
104 | ((unsigned long) __va(pud_val(pud) & PHYSICAL_PAGE_MASK)) | 104 | ((unsigned long) __va(pud_val(pud) & PHYSICAL_PAGE_MASK)) |
105 | 105 | ||
106 | #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0)) | 106 | #define ptep_get_and_clear(mm,addr,xp) __pte(xchg(&(xp)->pte, 0)) |
107 | |||
108 | static inline pte_t ptep_get_and_clear_full(struct mm_struct *mm, unsigned long addr, pte_t *ptep, int full) | ||
109 | { | ||
110 | pte_t pte; | ||
111 | if (full) { | ||
112 | pte = *ptep; | ||
113 | *ptep = __pte(0); | ||
114 | } else { | ||
115 | pte = ptep_get_and_clear(mm, addr, ptep); | ||
116 | } | ||
117 | return pte; | ||
118 | } | ||
119 | |||
107 | #define pte_same(a, b) ((a).pte == (b).pte) | 120 | #define pte_same(a, b) ((a).pte == (b).pte) |
108 | 121 | ||
109 | #define PMD_SIZE (1UL << PMD_SHIFT) | 122 | #define PMD_SIZE (1UL << PMD_SHIFT) |
@@ -143,7 +156,7 @@ extern inline void pgd_clear (pgd_t * pgd) | |||
143 | #define _PAGE_ACCESSED 0x020 | 156 | #define _PAGE_ACCESSED 0x020 |
144 | #define _PAGE_DIRTY 0x040 | 157 | #define _PAGE_DIRTY 0x040 |
145 | #define _PAGE_PSE 0x080 /* 2MB page */ | 158 | #define _PAGE_PSE 0x080 /* 2MB page */ |
146 | #define _PAGE_FILE 0x040 /* set:pagecache, unset:swap */ | 159 | #define _PAGE_FILE 0x040 /* nonlinear file mapping, saved PTE; unset:swap */ |
147 | #define _PAGE_GLOBAL 0x100 /* Global TLB entry */ | 160 | #define _PAGE_GLOBAL 0x100 /* Global TLB entry */ |
148 | 161 | ||
149 | #define _PAGE_PROTNONE 0x080 /* If not present */ | 162 | #define _PAGE_PROTNONE 0x080 /* If not present */ |
@@ -247,6 +260,7 @@ static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot) | |||
247 | * The following only work if pte_present() is true. | 260 | * The following only work if pte_present() is true. |
248 | * Undefined behaviour if not.. | 261 | * Undefined behaviour if not.. |
249 | */ | 262 | */ |
263 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | ||
250 | static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 264 | static inline int pte_user(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
251 | extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 265 | extern inline int pte_read(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
252 | extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; } | 266 | extern inline int pte_exec(pte_t pte) { return pte_val(pte) & _PAGE_USER; } |
@@ -254,8 +268,8 @@ extern inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } | |||
254 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } | 268 | extern inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } |
255 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } | 269 | extern inline int pte_write(pte_t pte) { return pte_val(pte) & _PAGE_RW; } |
256 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } | 270 | static inline int pte_file(pte_t pte) { return pte_val(pte) & _PAGE_FILE; } |
271 | static inline int pte_huge(pte_t pte) { return (pte_val(pte) & __LARGE_PTE) == __LARGE_PTE; } | ||
257 | 272 | ||
258 | #define __LARGE_PTE (_PAGE_PSE|_PAGE_PRESENT) | ||
259 | extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 273 | extern inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
260 | extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } | 274 | extern inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } |
261 | extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } | 275 | extern inline pte_t pte_mkclean(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; } |
@@ -433,6 +447,7 @@ extern int kern_addr_valid(unsigned long addr); | |||
433 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG | 447 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG |
434 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY | 448 | #define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY |
435 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR | 449 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR |
450 | #define __HAVE_ARCH_PTEP_GET_AND_CLEAR_FULL | ||
436 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT | 451 | #define __HAVE_ARCH_PTEP_SET_WRPROTECT |
437 | #define __HAVE_ARCH_PTE_SAME | 452 | #define __HAVE_ARCH_PTE_SAME |
438 | #include <asm-generic/pgtable.h> | 453 | #include <asm-generic/pgtable.h> |
diff --git a/include/asm-x86_64/processor.h b/include/asm-x86_64/processor.h index 85549e656eeb..194160f6a43f 100644 --- a/include/asm-x86_64/processor.h +++ b/include/asm-x86_64/processor.h | |||
@@ -437,6 +437,11 @@ static inline void prefetchw(void *x) | |||
437 | outb((data), 0x23); \ | 437 | outb((data), 0x23); \ |
438 | } while (0) | 438 | } while (0) |
439 | 439 | ||
440 | static inline void serialize_cpu(void) | ||
441 | { | ||
442 | __asm__ __volatile__ ("cpuid" : : : "ax", "bx", "cx", "dx"); | ||
443 | } | ||
444 | |||
440 | static inline void __monitor(const void *eax, unsigned long ecx, | 445 | static inline void __monitor(const void *eax, unsigned long ecx, |
441 | unsigned long edx) | 446 | unsigned long edx) |
442 | { | 447 | { |
diff --git a/include/asm-x86_64/types.h b/include/asm-x86_64/types.h index 32bd1426b523..c86c2e6793e2 100644 --- a/include/asm-x86_64/types.h +++ b/include/asm-x86_64/types.h | |||
@@ -51,8 +51,6 @@ typedef u64 dma_addr_t; | |||
51 | typedef u64 sector_t; | 51 | typedef u64 sector_t; |
52 | #define HAVE_SECTOR_T | 52 | #define HAVE_SECTOR_T |
53 | 53 | ||
54 | typedef unsigned short kmem_bufctl_t; | ||
55 | |||
56 | #endif /* __ASSEMBLY__ */ | 54 | #endif /* __ASSEMBLY__ */ |
57 | 55 | ||
58 | #endif /* __KERNEL__ */ | 56 | #endif /* __KERNEL__ */ |
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index d72bcb32ba4f..24f86f0e43cf 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h | |||
@@ -66,7 +66,7 @@ typedef struct { volatile int counter; } atomic_t; | |||
66 | * | 66 | * |
67 | * Atomically adds @i to @v. | 67 | * Atomically adds @i to @v. |
68 | */ | 68 | */ |
69 | extern __inline__ void atomic_add(int i, atomic_t * v) | 69 | static inline void atomic_add(int i, atomic_t * v) |
70 | { | 70 | { |
71 | unsigned int vval; | 71 | unsigned int vval; |
72 | 72 | ||
@@ -90,7 +90,7 @@ extern __inline__ void atomic_add(int i, atomic_t * v) | |||
90 | * | 90 | * |
91 | * Atomically subtracts @i from @v. | 91 | * Atomically subtracts @i from @v. |
92 | */ | 92 | */ |
93 | extern __inline__ void atomic_sub(int i, atomic_t *v) | 93 | static inline void atomic_sub(int i, atomic_t *v) |
94 | { | 94 | { |
95 | unsigned int vval; | 95 | unsigned int vval; |
96 | 96 | ||
@@ -111,7 +111,7 @@ extern __inline__ void atomic_sub(int i, atomic_t *v) | |||
111 | * We use atomic_{add|sub}_return to define other functions. | 111 | * We use atomic_{add|sub}_return to define other functions. |
112 | */ | 112 | */ |
113 | 113 | ||
114 | extern __inline__ int atomic_add_return(int i, atomic_t * v) | 114 | static inline int atomic_add_return(int i, atomic_t * v) |
115 | { | 115 | { |
116 | unsigned int vval; | 116 | unsigned int vval; |
117 | 117 | ||
@@ -130,7 +130,7 @@ extern __inline__ int atomic_add_return(int i, atomic_t * v) | |||
130 | return vval; | 130 | return vval; |
131 | } | 131 | } |
132 | 132 | ||
133 | extern __inline__ int atomic_sub_return(int i, atomic_t * v) | 133 | static inline int atomic_sub_return(int i, atomic_t * v) |
134 | { | 134 | { |
135 | unsigned int vval; | 135 | unsigned int vval; |
136 | 136 | ||
@@ -224,7 +224,7 @@ extern __inline__ int atomic_sub_return(int i, atomic_t * v) | |||
224 | #define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0) | 224 | #define atomic_add_negative(i,v) (atomic_add_return((i),(v)) < 0) |
225 | 225 | ||
226 | 226 | ||
227 | extern __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v) | 227 | static inline void atomic_clear_mask(unsigned int mask, atomic_t *v) |
228 | { | 228 | { |
229 | unsigned int all_f = -1; | 229 | unsigned int all_f = -1; |
230 | unsigned int vval; | 230 | unsigned int vval; |
@@ -243,7 +243,7 @@ extern __inline__ void atomic_clear_mask(unsigned int mask, atomic_t *v) | |||
243 | ); | 243 | ); |
244 | } | 244 | } |
245 | 245 | ||
246 | extern __inline__ void atomic_set_mask(unsigned int mask, atomic_t *v) | 246 | static inline void atomic_set_mask(unsigned int mask, atomic_t *v) |
247 | { | 247 | { |
248 | unsigned int vval; | 248 | unsigned int vval; |
249 | 249 | ||
diff --git a/include/asm-xtensa/checksum.h b/include/asm-xtensa/checksum.h index 1a00fad19929..81a797ae3abe 100644 --- a/include/asm-xtensa/checksum.h +++ b/include/asm-xtensa/checksum.h | |||
@@ -47,14 +47,14 @@ asmlinkage unsigned int csum_partial_copy_generic( const char *src, char *dst, i | |||
47 | * If you use these functions directly please don't forget the | 47 | * If you use these functions directly please don't forget the |
48 | * verify_area(). | 48 | * verify_area(). |
49 | */ | 49 | */ |
50 | extern __inline__ | 50 | static inline |
51 | unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, | 51 | unsigned int csum_partial_copy_nocheck ( const char *src, char *dst, |
52 | int len, int sum) | 52 | int len, int sum) |
53 | { | 53 | { |
54 | return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL); | 54 | return csum_partial_copy_generic ( src, dst, len, sum, NULL, NULL); |
55 | } | 55 | } |
56 | 56 | ||
57 | extern __inline__ | 57 | static inline |
58 | unsigned int csum_partial_copy_from_user ( const char *src, char *dst, | 58 | unsigned int csum_partial_copy_from_user ( const char *src, char *dst, |
59 | int len, int sum, int *err_ptr) | 59 | int len, int sum, int *err_ptr) |
60 | { | 60 | { |
diff --git a/include/asm-xtensa/delay.h b/include/asm-xtensa/delay.h index 0a123d53a636..1bc601ec3621 100644 --- a/include/asm-xtensa/delay.h +++ b/include/asm-xtensa/delay.h | |||
@@ -18,7 +18,7 @@ | |||
18 | 18 | ||
19 | extern unsigned long loops_per_jiffy; | 19 | extern unsigned long loops_per_jiffy; |
20 | 20 | ||
21 | extern __inline__ void __delay(unsigned long loops) | 21 | static inline void __delay(unsigned long loops) |
22 | { | 22 | { |
23 | /* 2 cycles per loop. */ | 23 | /* 2 cycles per loop. */ |
24 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" | 24 | __asm__ __volatile__ ("1: addi %0, %0, -2; bgeui %0, 2, 1b" |
diff --git a/include/asm-xtensa/io.h b/include/asm-xtensa/io.h index 2c471c42ecfc..c5c13985bbe1 100644 --- a/include/asm-xtensa/io.h +++ b/include/asm-xtensa/io.h | |||
@@ -41,12 +41,12 @@ static inline unsigned int _swapl (unsigned int v) | |||
41 | * These are trivial on the 1:1 Linux/Xtensa mapping | 41 | * These are trivial on the 1:1 Linux/Xtensa mapping |
42 | */ | 42 | */ |
43 | 43 | ||
44 | extern inline unsigned long virt_to_phys(volatile void * address) | 44 | static inline unsigned long virt_to_phys(volatile void * address) |
45 | { | 45 | { |
46 | return PHYSADDR((unsigned long)address); | 46 | return PHYSADDR((unsigned long)address); |
47 | } | 47 | } |
48 | 48 | ||
49 | extern inline void * phys_to_virt(unsigned long address) | 49 | static inline void * phys_to_virt(unsigned long address) |
50 | { | 50 | { |
51 | return (void*) CACHED_ADDR(address); | 51 | return (void*) CACHED_ADDR(address); |
52 | } | 52 | } |
@@ -55,12 +55,12 @@ extern inline void * phys_to_virt(unsigned long address) | |||
55 | * IO bus memory addresses are also 1:1 with the physical address | 55 | * IO bus memory addresses are also 1:1 with the physical address |
56 | */ | 56 | */ |
57 | 57 | ||
58 | extern inline unsigned long virt_to_bus(volatile void * address) | 58 | static inline unsigned long virt_to_bus(volatile void * address) |
59 | { | 59 | { |
60 | return PHYSADDR((unsigned long)address); | 60 | return PHYSADDR((unsigned long)address); |
61 | } | 61 | } |
62 | 62 | ||
63 | extern inline void * bus_to_virt (unsigned long address) | 63 | static inline void * bus_to_virt (unsigned long address) |
64 | { | 64 | { |
65 | return (void *) CACHED_ADDR(address); | 65 | return (void *) CACHED_ADDR(address); |
66 | } | 66 | } |
@@ -69,17 +69,17 @@ extern inline void * bus_to_virt (unsigned long address) | |||
69 | * Change "struct page" to physical address. | 69 | * Change "struct page" to physical address. |
70 | */ | 70 | */ |
71 | 71 | ||
72 | extern inline void *ioremap(unsigned long offset, unsigned long size) | 72 | static inline void *ioremap(unsigned long offset, unsigned long size) |
73 | { | 73 | { |
74 | return (void *) CACHED_ADDR_IO(offset); | 74 | return (void *) CACHED_ADDR_IO(offset); |
75 | } | 75 | } |
76 | 76 | ||
77 | extern inline void *ioremap_nocache(unsigned long offset, unsigned long size) | 77 | static inline void *ioremap_nocache(unsigned long offset, unsigned long size) |
78 | { | 78 | { |
79 | return (void *) BYPASS_ADDR_IO(offset); | 79 | return (void *) BYPASS_ADDR_IO(offset); |
80 | } | 80 | } |
81 | 81 | ||
82 | extern inline void iounmap(void *addr) | 82 | static inline void iounmap(void *addr) |
83 | { | 83 | { |
84 | } | 84 | } |
85 | 85 | ||
diff --git a/include/asm-xtensa/mmu_context.h b/include/asm-xtensa/mmu_context.h index 1b0801548cd9..364a7b057bfa 100644 --- a/include/asm-xtensa/mmu_context.h +++ b/include/asm-xtensa/mmu_context.h | |||
@@ -199,13 +199,13 @@ extern pgd_t *current_pgd; | |||
199 | #define ASID_FIRST_VERSION \ | 199 | #define ASID_FIRST_VERSION \ |
200 | ((unsigned long)(~ASID_VERSION_MASK) + 1 + ASID_FIRST_NONRESERVED) | 200 | ((unsigned long)(~ASID_VERSION_MASK) + 1 + ASID_FIRST_NONRESERVED) |
201 | 201 | ||
202 | extern inline void set_rasid_register (unsigned long val) | 202 | static inline void set_rasid_register (unsigned long val) |
203 | { | 203 | { |
204 | __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t" | 204 | __asm__ __volatile__ (" wsr %0, "__stringify(RASID)"\n\t" |
205 | " isync\n" : : "a" (val)); | 205 | " isync\n" : : "a" (val)); |
206 | } | 206 | } |
207 | 207 | ||
208 | extern inline unsigned long get_rasid_register (void) | 208 | static inline unsigned long get_rasid_register (void) |
209 | { | 209 | { |
210 | unsigned long tmp; | 210 | unsigned long tmp; |
211 | __asm__ __volatile__ (" rsr %0, "__stringify(RASID)"\n\t" : "=a" (tmp)); | 211 | __asm__ __volatile__ (" rsr %0, "__stringify(RASID)"\n\t" : "=a" (tmp)); |
@@ -215,7 +215,7 @@ extern inline unsigned long get_rasid_register (void) | |||
215 | 215 | ||
216 | #if ((XCHAL_MMU_ASID_INVALID == 0) && (XCHAL_MMU_ASID_KERNEL == 1)) | 216 | #if ((XCHAL_MMU_ASID_INVALID == 0) && (XCHAL_MMU_ASID_KERNEL == 1)) |
217 | 217 | ||
218 | extern inline void | 218 | static inline void |
219 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | 219 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) |
220 | { | 220 | { |
221 | extern void flush_tlb_all(void); | 221 | extern void flush_tlb_all(void); |
@@ -234,7 +234,7 @@ get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | |||
234 | /* XCHAL_MMU_ASID_INVALID == 0 and XCHAL_MMU_ASID_KERNEL ==1 are | 234 | /* XCHAL_MMU_ASID_INVALID == 0 and XCHAL_MMU_ASID_KERNEL ==1 are |
235 | really the best, but if you insist... */ | 235 | really the best, but if you insist... */ |
236 | 236 | ||
237 | extern inline int validate_asid (unsigned long asid) | 237 | static inline int validate_asid (unsigned long asid) |
238 | { | 238 | { |
239 | switch (asid) { | 239 | switch (asid) { |
240 | case XCHAL_MMU_ASID_INVALID: | 240 | case XCHAL_MMU_ASID_INVALID: |
@@ -247,7 +247,7 @@ extern inline int validate_asid (unsigned long asid) | |||
247 | return 1; /* valid */ | 247 | return 1; /* valid */ |
248 | } | 248 | } |
249 | 249 | ||
250 | extern inline void | 250 | static inline void |
251 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | 251 | get_new_mmu_context(struct mm_struct *mm, unsigned long asid) |
252 | { | 252 | { |
253 | extern void flush_tlb_all(void); | 253 | extern void flush_tlb_all(void); |
@@ -274,14 +274,14 @@ get_new_mmu_context(struct mm_struct *mm, unsigned long asid) | |||
274 | * instance. | 274 | * instance. |
275 | */ | 275 | */ |
276 | 276 | ||
277 | extern inline int | 277 | static inline int |
278 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) | 278 | init_new_context(struct task_struct *tsk, struct mm_struct *mm) |
279 | { | 279 | { |
280 | mm->context = NO_CONTEXT; | 280 | mm->context = NO_CONTEXT; |
281 | return 0; | 281 | return 0; |
282 | } | 282 | } |
283 | 283 | ||
284 | extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | 284 | static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, |
285 | struct task_struct *tsk) | 285 | struct task_struct *tsk) |
286 | { | 286 | { |
287 | unsigned long asid = asid_cache; | 287 | unsigned long asid = asid_cache; |
@@ -301,7 +301,7 @@ extern inline void switch_mm(struct mm_struct *prev, struct mm_struct *next, | |||
301 | * Destroy context related info for an mm_struct that is about | 301 | * Destroy context related info for an mm_struct that is about |
302 | * to be put to rest. | 302 | * to be put to rest. |
303 | */ | 303 | */ |
304 | extern inline void destroy_context(struct mm_struct *mm) | 304 | static inline void destroy_context(struct mm_struct *mm) |
305 | { | 305 | { |
306 | /* Nothing to do. */ | 306 | /* Nothing to do. */ |
307 | } | 307 | } |
@@ -310,7 +310,7 @@ extern inline void destroy_context(struct mm_struct *mm) | |||
310 | * After we have set current->mm to a new value, this activates | 310 | * After we have set current->mm to a new value, this activates |
311 | * the context for the new mm so we see the new mappings. | 311 | * the context for the new mm so we see the new mappings. |
312 | */ | 312 | */ |
313 | extern inline void | 313 | static inline void |
314 | activate_mm(struct mm_struct *prev, struct mm_struct *next) | 314 | activate_mm(struct mm_struct *prev, struct mm_struct *next) |
315 | { | 315 | { |
316 | /* Unconditionally get a new ASID. */ | 316 | /* Unconditionally get a new ASID. */ |
diff --git a/include/asm-xtensa/page.h b/include/asm-xtensa/page.h index b495e5b5a942..8ded36f255a2 100644 --- a/include/asm-xtensa/page.h +++ b/include/asm-xtensa/page.h | |||
@@ -55,7 +55,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; | |||
55 | * Pure 2^n version of get_order | 55 | * Pure 2^n version of get_order |
56 | */ | 56 | */ |
57 | 57 | ||
58 | extern __inline__ int get_order(unsigned long size) | 58 | static inline int get_order(unsigned long size) |
59 | { | 59 | { |
60 | int order; | 60 | int order; |
61 | #ifndef XCHAL_HAVE_NSU | 61 | #ifndef XCHAL_HAVE_NSU |
diff --git a/include/asm-xtensa/page.h.n b/include/asm-xtensa/page.h.n deleted file mode 100644 index 546cc6624f24..000000000000 --- a/include/asm-xtensa/page.h.n +++ /dev/null | |||
@@ -1,135 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-xtensa/page.h | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | ||
5 | * it under the terms of the GNU General Public License version2 as | ||
6 | * published by the Free Software Foundation. | ||
7 | * | ||
8 | * Copyright (C) 2001 - 2005 Tensilica Inc. | ||
9 | */ | ||
10 | |||
11 | #ifndef _XTENSA_PAGE_H | ||
12 | #define _XTENSA_PAGE_H | ||
13 | |||
14 | #ifdef __KERNEL__ | ||
15 | |||
16 | #include <asm/processor.h> | ||
17 | #include <linux/config.h> | ||
18 | |||
19 | /* | ||
20 | * PAGE_SHIFT determines the page size | ||
21 | * PAGE_ALIGN(x) aligns the pointer to the (next) page boundary | ||
22 | */ | ||
23 | #define PAGE_SHIFT XCHAL_MMU_MIN_PTE_PAGE_SIZE | ||
24 | #define PAGE_SIZE (1 << PAGE_SHIFT) | ||
25 | #define PAGE_MASK (~(PAGE_SIZE-1)) | ||
26 | #define PAGE_ALIGN(addr) (((addr)+PAGE_SIZE - 1) & PAGE_MASK) | ||
27 | |||
28 | #define DCACHE_WAY_SIZE (XCHAL_DCACHE_SIZE / XCHAL_DCACHE_WAYS) | ||
29 | #define PAGE_OFFSET XCHAL_KSEG_CACHED_VADDR | ||
30 | |||
31 | #ifdef __ASSEMBLY__ | ||
32 | |||
33 | #define __pgprot(x) (x) | ||
34 | |||
35 | #else | ||
36 | |||
37 | |||
38 | /* | ||
39 | * These are used to make use of C type-checking.. | ||
40 | */ | ||
41 | typedef struct { unsigned long pte; } pte_t; /* page table entry */ | ||
42 | typedef struct { unsigned long pmd; } pmd_t; /* PMD table entry */ | ||
43 | typedef struct { unsigned long pgd; } pgd_t; /* PGD table entry */ | ||
44 | typedef struct { unsigned long pgprot; } pgprot_t; | ||
45 | |||
46 | #define pte_val(x) ((x).pte) | ||
47 | #define pmd_val(x) ((x).pmd) | ||
48 | #define pgd_val(x) ((x).pgd) | ||
49 | #define pgprot_val(x) ((x).pgprot) | ||
50 | |||
51 | #define __pte(x) ((pte_t) { (x) } ) | ||
52 | #define __pmd(x) ((pmd_t) { (x) } ) | ||
53 | #define __pgd(x) ((pgd_t) { (x) } ) | ||
54 | #define __pgprot(x) ((pgprot_t) { (x) } ) | ||
55 | |||
56 | /* | ||
57 | * Pure 2^n version of get_order | ||
58 | */ | ||
59 | extern __inline__ int get_order(unsigned long size) | ||
60 | { | ||
61 | int order; | ||
62 | #ifndef XCHAL_HAVE_NSU | ||
63 | unsigned long x1, x2, x4, x8, x16; | ||
64 | |||
65 | size = (size + PAGE_SIZE - 1) >> PAGE_SHIFT; | ||
66 | x1 = size & 0xAAAAAAAA; | ||
67 | x2 = size & 0xCCCCCCCC; | ||
68 | x4 = size & 0xF0F0F0F0; | ||
69 | x8 = size & 0xFF00FF00; | ||
70 | x16 = size & 0xFFFF0000; | ||
71 | order = x2 ? 2 : 0; | ||
72 | order += (x16 != 0) * 16; | ||
73 | order += (x8 != 0) * 8; | ||
74 | order += (x4 != 0) * 4; | ||
75 | order += (x1 != 0); | ||
76 | |||
77 | return order; | ||
78 | #else | ||
79 | size = (size - 1) >> PAGE_SHIFT; | ||
80 | asm ("nsau %0, %1" : "=r" (order) : "r" (size)); | ||
81 | return 32 - order; | ||
82 | #endif | ||
83 | } | ||
84 | |||
85 | |||
86 | struct page; | ||
87 | extern void clear_page(void *page); | ||
88 | extern void copy_page(void *to, void *from); | ||
89 | |||
90 | /* | ||
91 | * If we have cache aliasing and writeback caches, we might have to do | ||
92 | * some extra work | ||
93 | */ | ||
94 | |||
95 | #if (DCACHE_WAY_SIZE > PAGE_SIZE) && XCHAL_DCACHE_IS_WRITEBACK | ||
96 | void clear_user_page(void *addr, unsigned long vaddr, struct page* page); | ||
97 | void copy_user_page(void *to, void* from, unsigned long vaddr, struct page* page); | ||
98 | #else | ||
99 | # define clear_user_page(page,vaddr,pg) clear_page(page) | ||
100 | # define copy_user_page(to, from, vaddr, pg) copy_page(to, from) | ||
101 | #endif | ||
102 | |||
103 | |||
104 | /* | ||
105 | * This handles the memory map. We handle pages at | ||
106 | * XCHAL_KSEG_CACHED_VADDR for kernels with 32 bit address space. | ||
107 | * These macros are for conversion of kernel address, not user | ||
108 | * addresses. | ||
109 | */ | ||
110 | |||
111 | #define __pa(x) ((unsigned long) (x) - PAGE_OFFSET) | ||
112 | #define __va(x) ((void *)((unsigned long) (x) + PAGE_OFFSET)) | ||
113 | #define pfn_valid(pfn) ((unsigned long)pfn < max_mapnr) | ||
114 | #ifndef CONFIG_DISCONTIGMEM | ||
115 | # define pfn_to_page(pfn) (mem_map + (pfn)) | ||
116 | # define page_to_pfn(page) ((unsigned long)((page) - mem_map)) | ||
117 | #else | ||
118 | # error CONFIG_DISCONTIGMEM not supported | ||
119 | #endif | ||
120 | |||
121 | #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) | ||
122 | #define page_to_virt(page) __va(page_to_pfn(page) << PAGE_SHIFT) | ||
123 | #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) | ||
124 | #define page_to_phys(page) (page_to_pfn(page) << PAGE_SHIFT) | ||
125 | |||
126 | #define WANT_PAGE_VIRTUAL | ||
127 | |||
128 | |||
129 | #endif /* __ASSEMBLY__ */ | ||
130 | |||
131 | #define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \ | ||
132 | VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC) | ||
133 | |||
134 | #endif /* __KERNEL__ */ | ||
135 | #endif /* _XTENSA_PAGE_H */ | ||
diff --git a/include/asm-xtensa/pci.h b/include/asm-xtensa/pci.h index 6817742301c2..24eb7fc25da8 100644 --- a/include/asm-xtensa/pci.h +++ b/include/asm-xtensa/pci.h | |||
@@ -22,12 +22,12 @@ | |||
22 | 22 | ||
23 | extern struct pci_controller* pcibios_alloc_controller(void); | 23 | extern struct pci_controller* pcibios_alloc_controller(void); |
24 | 24 | ||
25 | extern inline void pcibios_set_master(struct pci_dev *dev) | 25 | static inline void pcibios_set_master(struct pci_dev *dev) |
26 | { | 26 | { |
27 | /* No special bus mastering setup handling */ | 27 | /* No special bus mastering setup handling */ |
28 | } | 28 | } |
29 | 29 | ||
30 | extern inline void pcibios_penalize_isa_irq(int irq) | 30 | static inline void pcibios_penalize_isa_irq(int irq) |
31 | { | 31 | { |
32 | /* We don't do dynamic PCI IRQ allocation */ | 32 | /* We don't do dynamic PCI IRQ allocation */ |
33 | } | 33 | } |
diff --git a/include/asm-xtensa/pgtable.h b/include/asm-xtensa/pgtable.h index 0bb6416ae266..883ebc2d75d6 100644 --- a/include/asm-xtensa/pgtable.h +++ b/include/asm-xtensa/pgtable.h | |||
@@ -260,7 +260,7 @@ static inline pte_t pte_mkwrite(pte_t pte) { pte_val(pte) |= _PAGE_RW; return pt | |||
260 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) | 260 | #define pfn_pte(pfn, prot) __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot)) |
261 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) | 261 | #define mk_pte(page, prot) pfn_pte(page_to_pfn(page), prot) |
262 | 262 | ||
263 | extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 263 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
264 | { | 264 | { |
265 | return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); | 265 | return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); |
266 | } | 266 | } |
@@ -278,14 +278,14 @@ static inline void update_pte(pte_t *ptep, pte_t pteval) | |||
278 | #endif | 278 | #endif |
279 | } | 279 | } |
280 | 280 | ||
281 | extern inline void | 281 | static inline void |
282 | set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) | 282 | set_pte_at(struct mm_struct *mm, unsigned long addr, pte_t *ptep, pte_t pteval) |
283 | { | 283 | { |
284 | update_pte(ptep, pteval); | 284 | update_pte(ptep, pteval); |
285 | } | 285 | } |
286 | 286 | ||
287 | 287 | ||
288 | extern inline void | 288 | static inline void |
289 | set_pmd(pmd_t *pmdp, pmd_t pmdval) | 289 | set_pmd(pmd_t *pmdp, pmd_t pmdval) |
290 | { | 290 | { |
291 | *pmdp = pmdval; | 291 | *pmdp = pmdval; |
diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h index c8a7574a9a57..db740b8bc6f0 100644 --- a/include/asm-xtensa/semaphore.h +++ b/include/asm-xtensa/semaphore.h | |||
@@ -47,7 +47,7 @@ struct semaphore { | |||
47 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | 47 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) |
48 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) | 48 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) |
49 | 49 | ||
50 | extern inline void sema_init (struct semaphore *sem, int val) | 50 | static inline void sema_init (struct semaphore *sem, int val) |
51 | { | 51 | { |
52 | /* | 52 | /* |
53 | * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); | 53 | * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); |
@@ -79,7 +79,7 @@ asmlinkage void __up(struct semaphore * sem); | |||
79 | 79 | ||
80 | extern spinlock_t semaphore_wake_lock; | 80 | extern spinlock_t semaphore_wake_lock; |
81 | 81 | ||
82 | extern __inline__ void down(struct semaphore * sem) | 82 | static inline void down(struct semaphore * sem) |
83 | { | 83 | { |
84 | #if WAITQUEUE_DEBUG | 84 | #if WAITQUEUE_DEBUG |
85 | CHECK_MAGIC(sem->__magic); | 85 | CHECK_MAGIC(sem->__magic); |
@@ -89,7 +89,7 @@ extern __inline__ void down(struct semaphore * sem) | |||
89 | __down(sem); | 89 | __down(sem); |
90 | } | 90 | } |
91 | 91 | ||
92 | extern __inline__ int down_interruptible(struct semaphore * sem) | 92 | static inline int down_interruptible(struct semaphore * sem) |
93 | { | 93 | { |
94 | int ret = 0; | 94 | int ret = 0; |
95 | #if WAITQUEUE_DEBUG | 95 | #if WAITQUEUE_DEBUG |
@@ -101,7 +101,7 @@ extern __inline__ int down_interruptible(struct semaphore * sem) | |||
101 | return ret; | 101 | return ret; |
102 | } | 102 | } |
103 | 103 | ||
104 | extern __inline__ int down_trylock(struct semaphore * sem) | 104 | static inline int down_trylock(struct semaphore * sem) |
105 | { | 105 | { |
106 | int ret = 0; | 106 | int ret = 0; |
107 | #if WAITQUEUE_DEBUG | 107 | #if WAITQUEUE_DEBUG |
@@ -117,7 +117,7 @@ extern __inline__ int down_trylock(struct semaphore * sem) | |||
117 | * Note! This is subtle. We jump to wake people up only if | 117 | * Note! This is subtle. We jump to wake people up only if |
118 | * the semaphore was negative (== somebody was waiting on it). | 118 | * the semaphore was negative (== somebody was waiting on it). |
119 | */ | 119 | */ |
120 | extern __inline__ void up(struct semaphore * sem) | 120 | static inline void up(struct semaphore * sem) |
121 | { | 121 | { |
122 | #if WAITQUEUE_DEBUG | 122 | #if WAITQUEUE_DEBUG |
123 | CHECK_MAGIC(sem->__magic); | 123 | CHECK_MAGIC(sem->__magic); |
diff --git a/include/asm-xtensa/string.h b/include/asm-xtensa/string.h index 3f81b27d9809..5fb8c27cbef5 100644 --- a/include/asm-xtensa/string.h +++ b/include/asm-xtensa/string.h | |||
@@ -16,7 +16,7 @@ | |||
16 | #define _XTENSA_STRING_H | 16 | #define _XTENSA_STRING_H |
17 | 17 | ||
18 | #define __HAVE_ARCH_STRCPY | 18 | #define __HAVE_ARCH_STRCPY |
19 | extern __inline__ char *strcpy(char *__dest, const char *__src) | 19 | static inline char *strcpy(char *__dest, const char *__src) |
20 | { | 20 | { |
21 | register char *__xdest = __dest; | 21 | register char *__xdest = __dest; |
22 | unsigned long __dummy; | 22 | unsigned long __dummy; |
@@ -35,7 +35,7 @@ extern __inline__ char *strcpy(char *__dest, const char *__src) | |||
35 | } | 35 | } |
36 | 36 | ||
37 | #define __HAVE_ARCH_STRNCPY | 37 | #define __HAVE_ARCH_STRNCPY |
38 | extern __inline__ char *strncpy(char *__dest, const char *__src, size_t __n) | 38 | static inline char *strncpy(char *__dest, const char *__src, size_t __n) |
39 | { | 39 | { |
40 | register char *__xdest = __dest; | 40 | register char *__xdest = __dest; |
41 | unsigned long __dummy; | 41 | unsigned long __dummy; |
@@ -60,7 +60,7 @@ extern __inline__ char *strncpy(char *__dest, const char *__src, size_t __n) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | #define __HAVE_ARCH_STRCMP | 62 | #define __HAVE_ARCH_STRCMP |
63 | extern __inline__ int strcmp(const char *__cs, const char *__ct) | 63 | static inline int strcmp(const char *__cs, const char *__ct) |
64 | { | 64 | { |
65 | register int __res; | 65 | register int __res; |
66 | unsigned long __dummy; | 66 | unsigned long __dummy; |
@@ -82,7 +82,7 @@ extern __inline__ int strcmp(const char *__cs, const char *__ct) | |||
82 | } | 82 | } |
83 | 83 | ||
84 | #define __HAVE_ARCH_STRNCMP | 84 | #define __HAVE_ARCH_STRNCMP |
85 | extern __inline__ int strncmp(const char *__cs, const char *__ct, size_t __n) | 85 | static inline int strncmp(const char *__cs, const char *__ct, size_t __n) |
86 | { | 86 | { |
87 | register int __res; | 87 | register int __res; |
88 | unsigned long __dummy; | 88 | unsigned long __dummy; |
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index 690fe325e671..f09393232e5e 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h | |||
@@ -56,7 +56,7 @@ static inline int irqs_disabled(void) | |||
56 | 56 | ||
57 | #define clear_cpenable() __clear_cpenable() | 57 | #define clear_cpenable() __clear_cpenable() |
58 | 58 | ||
59 | extern __inline__ void __clear_cpenable(void) | 59 | static inline void __clear_cpenable(void) |
60 | { | 60 | { |
61 | #if XCHAL_HAVE_CP | 61 | #if XCHAL_HAVE_CP |
62 | unsigned long i = 0; | 62 | unsigned long i = 0; |
@@ -64,7 +64,7 @@ extern __inline__ void __clear_cpenable(void) | |||
64 | #endif | 64 | #endif |
65 | } | 65 | } |
66 | 66 | ||
67 | extern __inline__ void enable_coprocessor(int i) | 67 | static inline void enable_coprocessor(int i) |
68 | { | 68 | { |
69 | #if XCHAL_HAVE_CP | 69 | #if XCHAL_HAVE_CP |
70 | int cp; | 70 | int cp; |
@@ -74,7 +74,7 @@ extern __inline__ void enable_coprocessor(int i) | |||
74 | #endif | 74 | #endif |
75 | } | 75 | } |
76 | 76 | ||
77 | extern __inline__ void disable_coprocessor(int i) | 77 | static inline void disable_coprocessor(int i) |
78 | { | 78 | { |
79 | #if XCHAL_HAVE_CP | 79 | #if XCHAL_HAVE_CP |
80 | int cp; | 80 | int cp; |
@@ -123,7 +123,7 @@ do { \ | |||
123 | * cmpxchg | 123 | * cmpxchg |
124 | */ | 124 | */ |
125 | 125 | ||
126 | extern __inline__ unsigned long | 126 | static inline unsigned long |
127 | __cmpxchg_u32(volatile int *p, int old, int new) | 127 | __cmpxchg_u32(volatile int *p, int old, int new) |
128 | { | 128 | { |
129 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" | 129 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" |
@@ -173,7 +173,7 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new, int size) | |||
173 | * where no register reference will cause an overflow. | 173 | * where no register reference will cause an overflow. |
174 | */ | 174 | */ |
175 | 175 | ||
176 | extern __inline__ unsigned long xchg_u32(volatile int * m, unsigned long val) | 176 | static inline unsigned long xchg_u32(volatile int * m, unsigned long val) |
177 | { | 177 | { |
178 | unsigned long tmp; | 178 | unsigned long tmp; |
179 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" | 179 | __asm__ __volatile__("rsil a15, "__stringify(LOCKLEVEL)"\n\t" |
diff --git a/include/asm-xtensa/tlbflush.h b/include/asm-xtensa/tlbflush.h index 23bfe9db45f5..43f6ec859af9 100644 --- a/include/asm-xtensa/tlbflush.h +++ b/include/asm-xtensa/tlbflush.h | |||
@@ -39,7 +39,7 @@ extern void flush_tlb_range(struct vm_area_struct*,unsigned long,unsigned long); | |||
39 | * page-table pages. | 39 | * page-table pages. |
40 | */ | 40 | */ |
41 | 41 | ||
42 | extern inline void flush_tlb_pgtables(struct mm_struct *mm, | 42 | static inline void flush_tlb_pgtables(struct mm_struct *mm, |
43 | unsigned long start, unsigned long end) | 43 | unsigned long start, unsigned long end) |
44 | { | 44 | { |
45 | } | 45 | } |
@@ -51,26 +51,26 @@ extern inline void flush_tlb_pgtables(struct mm_struct *mm, | |||
51 | #define ITLB_PROBE_SUCCESS (1 << ITLB_WAYS_LOG2) | 51 | #define ITLB_PROBE_SUCCESS (1 << ITLB_WAYS_LOG2) |
52 | #define DTLB_PROBE_SUCCESS (1 << DTLB_WAYS_LOG2) | 52 | #define DTLB_PROBE_SUCCESS (1 << DTLB_WAYS_LOG2) |
53 | 53 | ||
54 | extern inline unsigned long itlb_probe(unsigned long addr) | 54 | static inline unsigned long itlb_probe(unsigned long addr) |
55 | { | 55 | { |
56 | unsigned long tmp; | 56 | unsigned long tmp; |
57 | __asm__ __volatile__("pitlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); | 57 | __asm__ __volatile__("pitlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); |
58 | return tmp; | 58 | return tmp; |
59 | } | 59 | } |
60 | 60 | ||
61 | extern inline unsigned long dtlb_probe(unsigned long addr) | 61 | static inline unsigned long dtlb_probe(unsigned long addr) |
62 | { | 62 | { |
63 | unsigned long tmp; | 63 | unsigned long tmp; |
64 | __asm__ __volatile__("pdtlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); | 64 | __asm__ __volatile__("pdtlb %0, %1\n\t" : "=a" (tmp) : "a" (addr)); |
65 | return tmp; | 65 | return tmp; |
66 | } | 66 | } |
67 | 67 | ||
68 | extern inline void invalidate_itlb_entry (unsigned long probe) | 68 | static inline void invalidate_itlb_entry (unsigned long probe) |
69 | { | 69 | { |
70 | __asm__ __volatile__("iitlb %0; isync\n\t" : : "a" (probe)); | 70 | __asm__ __volatile__("iitlb %0; isync\n\t" : : "a" (probe)); |
71 | } | 71 | } |
72 | 72 | ||
73 | extern inline void invalidate_dtlb_entry (unsigned long probe) | 73 | static inline void invalidate_dtlb_entry (unsigned long probe) |
74 | { | 74 | { |
75 | __asm__ __volatile__("idtlb %0; dsync\n\t" : : "a" (probe)); | 75 | __asm__ __volatile__("idtlb %0; dsync\n\t" : : "a" (probe)); |
76 | } | 76 | } |
@@ -80,68 +80,68 @@ extern inline void invalidate_dtlb_entry (unsigned long probe) | |||
80 | * caller must follow up with an 'isync', which can be relatively | 80 | * caller must follow up with an 'isync', which can be relatively |
81 | * expensive on some Xtensa implementations. | 81 | * expensive on some Xtensa implementations. |
82 | */ | 82 | */ |
83 | extern inline void invalidate_itlb_entry_no_isync (unsigned entry) | 83 | static inline void invalidate_itlb_entry_no_isync (unsigned entry) |
84 | { | 84 | { |
85 | /* Caller must follow up with 'isync'. */ | 85 | /* Caller must follow up with 'isync'. */ |
86 | __asm__ __volatile__ ("iitlb %0\n" : : "a" (entry) ); | 86 | __asm__ __volatile__ ("iitlb %0\n" : : "a" (entry) ); |
87 | } | 87 | } |
88 | 88 | ||
89 | extern inline void invalidate_dtlb_entry_no_isync (unsigned entry) | 89 | static inline void invalidate_dtlb_entry_no_isync (unsigned entry) |
90 | { | 90 | { |
91 | /* Caller must follow up with 'isync'. */ | 91 | /* Caller must follow up with 'isync'. */ |
92 | __asm__ __volatile__ ("idtlb %0\n" : : "a" (entry) ); | 92 | __asm__ __volatile__ ("idtlb %0\n" : : "a" (entry) ); |
93 | } | 93 | } |
94 | 94 | ||
95 | extern inline void set_itlbcfg_register (unsigned long val) | 95 | static inline void set_itlbcfg_register (unsigned long val) |
96 | { | 96 | { |
97 | __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" | 97 | __asm__ __volatile__("wsr %0, "__stringify(ITLBCFG)"\n\t" "isync\n\t" |
98 | : : "a" (val)); | 98 | : : "a" (val)); |
99 | } | 99 | } |
100 | 100 | ||
101 | extern inline void set_dtlbcfg_register (unsigned long val) | 101 | static inline void set_dtlbcfg_register (unsigned long val) |
102 | { | 102 | { |
103 | __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" | 103 | __asm__ __volatile__("wsr %0, "__stringify(DTLBCFG)"; dsync\n\t" |
104 | : : "a" (val)); | 104 | : : "a" (val)); |
105 | } | 105 | } |
106 | 106 | ||
107 | extern inline void set_ptevaddr_register (unsigned long val) | 107 | static inline void set_ptevaddr_register (unsigned long val) |
108 | { | 108 | { |
109 | __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" | 109 | __asm__ __volatile__(" wsr %0, "__stringify(PTEVADDR)"; isync\n" |
110 | : : "a" (val)); | 110 | : : "a" (val)); |
111 | } | 111 | } |
112 | 112 | ||
113 | extern inline unsigned long read_ptevaddr_register (void) | 113 | static inline unsigned long read_ptevaddr_register (void) |
114 | { | 114 | { |
115 | unsigned long tmp; | 115 | unsigned long tmp; |
116 | __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); | 116 | __asm__ __volatile__("rsr %0, "__stringify(PTEVADDR)"\n\t" : "=a" (tmp)); |
117 | return tmp; | 117 | return tmp; |
118 | } | 118 | } |
119 | 119 | ||
120 | extern inline void write_dtlb_entry (pte_t entry, int way) | 120 | static inline void write_dtlb_entry (pte_t entry, int way) |
121 | { | 121 | { |
122 | __asm__ __volatile__("wdtlb %1, %0; dsync\n\t" | 122 | __asm__ __volatile__("wdtlb %1, %0; dsync\n\t" |
123 | : : "r" (way), "r" (entry) ); | 123 | : : "r" (way), "r" (entry) ); |
124 | } | 124 | } |
125 | 125 | ||
126 | extern inline void write_itlb_entry (pte_t entry, int way) | 126 | static inline void write_itlb_entry (pte_t entry, int way) |
127 | { | 127 | { |
128 | __asm__ __volatile__("witlb %1, %0; isync\n\t" | 128 | __asm__ __volatile__("witlb %1, %0; isync\n\t" |
129 | : : "r" (way), "r" (entry) ); | 129 | : : "r" (way), "r" (entry) ); |
130 | } | 130 | } |
131 | 131 | ||
132 | extern inline void invalidate_page_directory (void) | 132 | static inline void invalidate_page_directory (void) |
133 | { | 133 | { |
134 | invalidate_dtlb_entry (DTLB_WAY_PGTABLE); | 134 | invalidate_dtlb_entry (DTLB_WAY_PGTABLE); |
135 | } | 135 | } |
136 | 136 | ||
137 | extern inline void invalidate_itlb_mapping (unsigned address) | 137 | static inline void invalidate_itlb_mapping (unsigned address) |
138 | { | 138 | { |
139 | unsigned long tlb_entry; | 139 | unsigned long tlb_entry; |
140 | while ((tlb_entry = itlb_probe (address)) & ITLB_PROBE_SUCCESS) | 140 | while ((tlb_entry = itlb_probe (address)) & ITLB_PROBE_SUCCESS) |
141 | invalidate_itlb_entry (tlb_entry); | 141 | invalidate_itlb_entry (tlb_entry); |
142 | } | 142 | } |
143 | 143 | ||
144 | extern inline void invalidate_dtlb_mapping (unsigned address) | 144 | static inline void invalidate_dtlb_mapping (unsigned address) |
145 | { | 145 | { |
146 | unsigned long tlb_entry; | 146 | unsigned long tlb_entry; |
147 | while ((tlb_entry = dtlb_probe (address)) & DTLB_PROBE_SUCCESS) | 147 | while ((tlb_entry = dtlb_probe (address)) & DTLB_PROBE_SUCCESS) |
@@ -165,28 +165,28 @@ extern inline void invalidate_dtlb_mapping (unsigned address) | |||
165 | * as[07..00] contain the asid | 165 | * as[07..00] contain the asid |
166 | */ | 166 | */ |
167 | 167 | ||
168 | extern inline unsigned long read_dtlb_virtual (int way) | 168 | static inline unsigned long read_dtlb_virtual (int way) |
169 | { | 169 | { |
170 | unsigned long tmp; | 170 | unsigned long tmp; |
171 | __asm__ __volatile__("rdtlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 171 | __asm__ __volatile__("rdtlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
172 | return tmp; | 172 | return tmp; |
173 | } | 173 | } |
174 | 174 | ||
175 | extern inline unsigned long read_dtlb_translation (int way) | 175 | static inline unsigned long read_dtlb_translation (int way) |
176 | { | 176 | { |
177 | unsigned long tmp; | 177 | unsigned long tmp; |
178 | __asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 178 | __asm__ __volatile__("rdtlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
179 | return tmp; | 179 | return tmp; |
180 | } | 180 | } |
181 | 181 | ||
182 | extern inline unsigned long read_itlb_virtual (int way) | 182 | static inline unsigned long read_itlb_virtual (int way) |
183 | { | 183 | { |
184 | unsigned long tmp; | 184 | unsigned long tmp; |
185 | __asm__ __volatile__("ritlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 185 | __asm__ __volatile__("ritlb0 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
186 | return tmp; | 186 | return tmp; |
187 | } | 187 | } |
188 | 188 | ||
189 | extern inline unsigned long read_itlb_translation (int way) | 189 | static inline unsigned long read_itlb_translation (int way) |
190 | { | 190 | { |
191 | unsigned long tmp; | 191 | unsigned long tmp; |
192 | __asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); | 192 | __asm__ __volatile__("ritlb1 %0, %1\n\t" : "=a" (tmp), "+a" (way)); |
diff --git a/include/asm-xtensa/types.h b/include/asm-xtensa/types.h index ebac00469852..9d99a8e9e337 100644 --- a/include/asm-xtensa/types.h +++ b/include/asm-xtensa/types.h | |||
@@ -58,8 +58,6 @@ typedef unsigned long long u64; | |||
58 | 58 | ||
59 | typedef u32 dma_addr_t; | 59 | typedef u32 dma_addr_t; |
60 | 60 | ||
61 | typedef unsigned int kmem_bufctl_t; | ||
62 | |||
63 | #endif /* __KERNEL__ */ | 61 | #endif /* __KERNEL__ */ |
64 | #endif | 62 | #endif |
65 | 63 | ||
diff --git a/include/asm-xtensa/uaccess.h b/include/asm-xtensa/uaccess.h index 35576b25c7b2..fc268ac923c0 100644 --- a/include/asm-xtensa/uaccess.h +++ b/include/asm-xtensa/uaccess.h | |||
@@ -211,7 +211,7 @@ | |||
211 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) | 211 | #define __access_ok(addr,size) (__kernel_ok || __user_ok((addr),(size))) |
212 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) | 212 | #define access_ok(type,addr,size) __access_ok((unsigned long)(addr),(size)) |
213 | 213 | ||
214 | extern inline int verify_area(int type, const void * addr, unsigned long size) | 214 | static inline int verify_area(int type, const void * addr, unsigned long size) |
215 | { | 215 | { |
216 | return access_ok(type,addr,size) ? 0 : -EFAULT; | 216 | return access_ok(type,addr,size) ? 0 : -EFAULT; |
217 | } | 217 | } |
@@ -464,7 +464,7 @@ __generic_copy_from_user(void *to, const void *from, unsigned long n) | |||
464 | * success. | 464 | * success. |
465 | */ | 465 | */ |
466 | 466 | ||
467 | extern inline unsigned long | 467 | static inline unsigned long |
468 | __xtensa_clear_user(void *addr, unsigned long size) | 468 | __xtensa_clear_user(void *addr, unsigned long size) |
469 | { | 469 | { |
470 | if ( ! memset(addr, 0, size) ) | 470 | if ( ! memset(addr, 0, size) ) |
@@ -472,7 +472,7 @@ __xtensa_clear_user(void *addr, unsigned long size) | |||
472 | return 0; | 472 | return 0; |
473 | } | 473 | } |
474 | 474 | ||
475 | extern inline unsigned long | 475 | static inline unsigned long |
476 | clear_user(void *addr, unsigned long size) | 476 | clear_user(void *addr, unsigned long size) |
477 | { | 477 | { |
478 | if (access_ok(VERIFY_WRITE, addr, size)) | 478 | if (access_ok(VERIFY_WRITE, addr, size)) |
@@ -486,7 +486,7 @@ clear_user(void *addr, unsigned long size) | |||
486 | extern long __strncpy_user(char *, const char *, long); | 486 | extern long __strncpy_user(char *, const char *, long); |
487 | #define __strncpy_from_user __strncpy_user | 487 | #define __strncpy_from_user __strncpy_user |
488 | 488 | ||
489 | extern inline long | 489 | static inline long |
490 | strncpy_from_user(char *dst, const char *src, long count) | 490 | strncpy_from_user(char *dst, const char *src, long count) |
491 | { | 491 | { |
492 | if (access_ok(VERIFY_READ, src, 1)) | 492 | if (access_ok(VERIFY_READ, src, 1)) |
@@ -502,7 +502,7 @@ strncpy_from_user(char *dst, const char *src, long count) | |||
502 | */ | 502 | */ |
503 | extern long __strnlen_user(const char *, long); | 503 | extern long __strnlen_user(const char *, long); |
504 | 504 | ||
505 | extern inline long strnlen_user(const char *str, long len) | 505 | static inline long strnlen_user(const char *str, long len) |
506 | { | 506 | { |
507 | unsigned long top = __kernel_ok ? ~0UL : TASK_SIZE - 1; | 507 | unsigned long top = __kernel_ok ? ~0UL : TASK_SIZE - 1; |
508 | 508 | ||
diff --git a/include/linux/capability.h b/include/linux/capability.h index 8d139f4acf23..6b4618902d3d 100644 --- a/include/linux/capability.h +++ b/include/linux/capability.h | |||
@@ -233,6 +233,7 @@ typedef __u32 kernel_cap_t; | |||
233 | /* Allow enabling/disabling tagged queuing on SCSI controllers and sending | 233 | /* Allow enabling/disabling tagged queuing on SCSI controllers and sending |
234 | arbitrary SCSI commands */ | 234 | arbitrary SCSI commands */ |
235 | /* Allow setting encryption key on loopback filesystem */ | 235 | /* Allow setting encryption key on loopback filesystem */ |
236 | /* Allow setting zone reclaim policy */ | ||
236 | 237 | ||
237 | #define CAP_SYS_ADMIN 21 | 238 | #define CAP_SYS_ADMIN 21 |
238 | 239 | ||
diff --git a/include/linux/crypto.h b/include/linux/crypto.h index 5e2bcc636a02..3c89df6e7768 100644 --- a/include/linux/crypto.h +++ b/include/linux/crypto.h | |||
@@ -45,6 +45,7 @@ | |||
45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 | 45 | #define CRYPTO_TFM_MODE_CTR 0x00000008 |
46 | 46 | ||
47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 | 47 | #define CRYPTO_TFM_REQ_WEAK_KEY 0x00000100 |
48 | #define CRYPTO_TFM_REQ_MAY_SLEEP 0x00000200 | ||
48 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 | 49 | #define CRYPTO_TFM_RES_WEAK_KEY 0x00100000 |
49 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 | 50 | #define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000 |
50 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 | 51 | #define CRYPTO_TFM_RES_BAD_KEY_SCHED 0x00400000 |
diff --git a/include/linux/efi.h b/include/linux/efi.h index 73781ec165b4..c7c5dd316182 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -91,11 +91,6 @@ typedef struct { | |||
91 | 91 | ||
92 | #define EFI_PAGE_SHIFT 12 | 92 | #define EFI_PAGE_SHIFT 12 |
93 | 93 | ||
94 | /* | ||
95 | * For current x86 implementations of EFI, there is | ||
96 | * additional padding in the mem descriptors. This is not | ||
97 | * the case in ia64. Need to have this fixed in the f/w. | ||
98 | */ | ||
99 | typedef struct { | 94 | typedef struct { |
100 | u32 type; | 95 | u32 type; |
101 | u32 pad; | 96 | u32 pad; |
@@ -103,9 +98,6 @@ typedef struct { | |||
103 | u64 virt_addr; | 98 | u64 virt_addr; |
104 | u64 num_pages; | 99 | u64 num_pages; |
105 | u64 attribute; | 100 | u64 attribute; |
106 | #if defined (__i386__) | ||
107 | u64 pad1; | ||
108 | #endif | ||
109 | } efi_memory_desc_t; | 101 | } efi_memory_desc_t; |
110 | 102 | ||
111 | typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); | 103 | typedef int (*efi_freemem_callback_t) (unsigned long start, unsigned long end, void *arg); |
@@ -240,10 +232,12 @@ typedef struct { | |||
240 | } efi_system_table_t; | 232 | } efi_system_table_t; |
241 | 233 | ||
242 | struct efi_memory_map { | 234 | struct efi_memory_map { |
243 | efi_memory_desc_t *phys_map; | 235 | void *phys_map; |
244 | efi_memory_desc_t *map; | 236 | void *map; |
237 | void *map_end; | ||
245 | int nr_map; | 238 | int nr_map; |
246 | unsigned long desc_version; | 239 | unsigned long desc_version; |
240 | unsigned long desc_size; | ||
247 | }; | 241 | }; |
248 | 242 | ||
249 | /* | 243 | /* |
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index f529d1442815..e670b0d13fe0 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h | |||
@@ -70,12 +70,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, | |||
70 | void hugetlb_prefault_arch_hook(struct mm_struct *mm); | 70 | void hugetlb_prefault_arch_hook(struct mm_struct *mm); |
71 | #endif | 71 | #endif |
72 | 72 | ||
73 | #ifndef ARCH_HAS_HUGETLB_CLEAN_STALE_PGTABLE | ||
74 | #define hugetlb_clean_stale_pgtable(pte) BUG() | ||
75 | #else | ||
76 | void hugetlb_clean_stale_pgtable(pte_t *pte); | ||
77 | #endif | ||
78 | |||
79 | #else /* !CONFIG_HUGETLB_PAGE */ | 73 | #else /* !CONFIG_HUGETLB_PAGE */ |
80 | 74 | ||
81 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) | 75 | static inline int is_vm_hugetlb_page(struct vm_area_struct *vma) |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 096a85a58ae5..88aef7b86ef4 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -77,6 +77,7 @@ struct tun_struct { | |||
77 | #define TUNSETIFF _IOW('T', 202, int) | 77 | #define TUNSETIFF _IOW('T', 202, int) |
78 | #define TUNSETPERSIST _IOW('T', 203, int) | 78 | #define TUNSETPERSIST _IOW('T', 203, int) |
79 | #define TUNSETOWNER _IOW('T', 204, int) | 79 | #define TUNSETOWNER _IOW('T', 204, int) |
80 | #define TUNSETLINK _IOW('T', 205, int) | ||
80 | 81 | ||
81 | /* TUNSETIFF ifr flags */ | 82 | /* TUNSETIFF ifr flags */ |
82 | #define IFF_TUN 0x0001 | 83 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/libata.h b/include/linux/libata.h index fc05a9899288..022105c745fc 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -40,7 +40,6 @@ | |||
40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ | 40 | #undef ATA_VERBOSE_DEBUG /* yet more debugging output */ |
41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ | 41 | #undef ATA_IRQ_TRAP /* define to ack screaming irqs */ |
42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ | 42 | #undef ATA_NDEBUG /* define to disable quick runtime checks */ |
43 | #undef ATA_ENABLE_ATAPI /* define to enable ATAPI support */ | ||
44 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some | 43 | #undef ATA_ENABLE_PATA /* define to enable PATA support in some |
45 | * low-level drivers */ | 44 | * low-level drivers */ |
46 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ | 45 | #undef ATAPI_ENABLE_DMADIR /* enables ATAPI DMADIR bridge support */ |
@@ -450,6 +449,7 @@ struct pci_bits { | |||
450 | unsigned long val; | 449 | unsigned long val; |
451 | }; | 450 | }; |
452 | 451 | ||
452 | extern void ata_pci_host_stop (struct ata_host_set *host_set); | ||
453 | extern struct ata_probe_ent * | 453 | extern struct ata_probe_ent * |
454 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); | 454 | ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port); |
455 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); | 455 | extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits); |
diff --git a/include/linux/mempolicy.h b/include/linux/mempolicy.h index 8480aef10e62..94a46f38c532 100644 --- a/include/linux/mempolicy.h +++ b/include/linux/mempolicy.h | |||
@@ -150,6 +150,9 @@ void mpol_free_shared_policy(struct shared_policy *p); | |||
150 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, | 150 | struct mempolicy *mpol_shared_policy_lookup(struct shared_policy *sp, |
151 | unsigned long idx); | 151 | unsigned long idx); |
152 | 152 | ||
153 | struct mempolicy *get_vma_policy(struct task_struct *task, | ||
154 | struct vm_area_struct *vma, unsigned long addr); | ||
155 | |||
153 | extern void numa_default_policy(void); | 156 | extern void numa_default_policy(void); |
154 | extern void numa_policy_init(void); | 157 | extern void numa_policy_init(void); |
155 | 158 | ||
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 9a0893f3249e..30f68c0c8c6e 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -46,6 +46,12 @@ struct mmc_ios { | |||
46 | #define MMC_BUSMODE_OPENDRAIN 1 | 46 | #define MMC_BUSMODE_OPENDRAIN 1 |
47 | #define MMC_BUSMODE_PUSHPULL 2 | 47 | #define MMC_BUSMODE_PUSHPULL 2 |
48 | 48 | ||
49 | unsigned char chip_select; /* SPI chip select */ | ||
50 | |||
51 | #define MMC_CS_DONTCARE 0 | ||
52 | #define MMC_CS_HIGH 1 | ||
53 | #define MMC_CS_LOW 2 | ||
54 | |||
49 | unsigned char power_mode; /* power supply mode */ | 55 | unsigned char power_mode; /* power supply mode */ |
50 | 56 | ||
51 | #define MMC_POWER_OFF 0 | 57 | #define MMC_POWER_OFF 0 |
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 6c90461ed99f..5ed471b58f4f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h | |||
@@ -487,11 +487,27 @@ struct mem_section { | |||
487 | unsigned long section_mem_map; | 487 | unsigned long section_mem_map; |
488 | }; | 488 | }; |
489 | 489 | ||
490 | extern struct mem_section mem_section[NR_MEM_SECTIONS]; | 490 | #ifdef CONFIG_SPARSEMEM_EXTREME |
491 | #define SECTIONS_PER_ROOT (PAGE_SIZE / sizeof (struct mem_section)) | ||
492 | #else | ||
493 | #define SECTIONS_PER_ROOT 1 | ||
494 | #endif | ||
495 | |||
496 | #define SECTION_NR_TO_ROOT(sec) ((sec) / SECTIONS_PER_ROOT) | ||
497 | #define NR_SECTION_ROOTS (NR_MEM_SECTIONS / SECTIONS_PER_ROOT) | ||
498 | #define SECTION_ROOT_MASK (SECTIONS_PER_ROOT - 1) | ||
499 | |||
500 | #ifdef CONFIG_SPARSEMEM_EXTREME | ||
501 | extern struct mem_section *mem_section[NR_SECTION_ROOTS]; | ||
502 | #else | ||
503 | extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT]; | ||
504 | #endif | ||
491 | 505 | ||
492 | static inline struct mem_section *__nr_to_section(unsigned long nr) | 506 | static inline struct mem_section *__nr_to_section(unsigned long nr) |
493 | { | 507 | { |
494 | return &mem_section[nr]; | 508 | if (!mem_section[SECTION_NR_TO_ROOT(nr)]) |
509 | return NULL; | ||
510 | return &mem_section[SECTION_NR_TO_ROOT(nr)][nr & SECTION_ROOT_MASK]; | ||
495 | } | 511 | } |
496 | 512 | ||
497 | /* | 513 | /* |
@@ -513,12 +529,12 @@ static inline struct page *__section_mem_map_addr(struct mem_section *section) | |||
513 | 529 | ||
514 | static inline int valid_section(struct mem_section *section) | 530 | static inline int valid_section(struct mem_section *section) |
515 | { | 531 | { |
516 | return (section->section_mem_map & SECTION_MARKED_PRESENT); | 532 | return (section && (section->section_mem_map & SECTION_MARKED_PRESENT)); |
517 | } | 533 | } |
518 | 534 | ||
519 | static inline int section_has_mem_map(struct mem_section *section) | 535 | static inline int section_has_mem_map(struct mem_section *section) |
520 | { | 536 | { |
521 | return (section->section_mem_map & SECTION_HAS_MEM_MAP); | 537 | return (section && (section->section_mem_map & SECTION_HAS_MEM_MAP)); |
522 | } | 538 | } |
523 | 539 | ||
524 | static inline int valid_section_nr(unsigned long nr) | 540 | static inline int valid_section_nr(unsigned long nr) |
@@ -572,6 +588,7 @@ static inline int pfn_valid(unsigned long pfn) | |||
572 | void sparse_init(void); | 588 | void sparse_init(void); |
573 | #else | 589 | #else |
574 | #define sparse_init() do {} while (0) | 590 | #define sparse_init() do {} while (0) |
591 | #define sparse_index_init(_sec, _nid) do {} while (0) | ||
575 | #endif /* CONFIG_SPARSEMEM */ | 592 | #endif /* CONFIG_SPARSEMEM */ |
576 | 593 | ||
577 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES | 594 | #ifdef CONFIG_NODES_SPAN_OTHER_NODES |
diff --git a/include/linux/mv643xx.h b/include/linux/mv643xx.h index 5773ea42f6e4..0b08cd692201 100644 --- a/include/linux/mv643xx.h +++ b/include/linux/mv643xx.h | |||
@@ -980,7 +980,7 @@ | |||
980 | /* I2C Registers */ | 980 | /* I2C Registers */ |
981 | /****************************************/ | 981 | /****************************************/ |
982 | 982 | ||
983 | #define MV64XXX_I2C_CTLR_NAME "mv64xxx i2c" | 983 | #define MV64XXX_I2C_CTLR_NAME "mv64xxx_i2c" |
984 | #define MV64XXX_I2C_OFFSET 0xc000 | 984 | #define MV64XXX_I2C_OFFSET 0xc000 |
985 | #define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020 | 985 | #define MV64XXX_I2C_REG_BLOCK_SIZE 0x0020 |
986 | 986 | ||
diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h index f5a6695d4d21..f34767c5fc79 100644 --- a/include/linux/page-flags.h +++ b/include/linux/page-flags.h | |||
@@ -134,6 +134,7 @@ struct page_state { | |||
134 | }; | 134 | }; |
135 | 135 | ||
136 | extern void get_page_state(struct page_state *ret); | 136 | extern void get_page_state(struct page_state *ret); |
137 | extern void get_page_state_node(struct page_state *ret, int node); | ||
137 | extern void get_full_page_state(struct page_state *ret); | 138 | extern void get_full_page_state(struct page_state *ret); |
138 | extern unsigned long __read_page_state(unsigned long offset); | 139 | extern unsigned long __read_page_state(unsigned long offset); |
139 | extern void __mod_page_state(unsigned long offset, unsigned long delta); | 140 | extern void __mod_page_state(unsigned long offset, unsigned long delta); |
@@ -194,6 +195,7 @@ extern void __mod_page_state(unsigned long offset, unsigned long delta); | |||
194 | #define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) | 195 | #define SetPageDirty(page) set_bit(PG_dirty, &(page)->flags) |
195 | #define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) | 196 | #define TestSetPageDirty(page) test_and_set_bit(PG_dirty, &(page)->flags) |
196 | #define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) | 197 | #define ClearPageDirty(page) clear_bit(PG_dirty, &(page)->flags) |
198 | #define __ClearPageDirty(page) __clear_bit(PG_dirty, &(page)->flags) | ||
197 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) | 199 | #define TestClearPageDirty(page) test_and_clear_bit(PG_dirty, &(page)->flags) |
198 | 200 | ||
199 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) | 201 | #define SetPageLRU(page) set_bit(PG_lru, &(page)->flags) |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index d513c1634006..95c941f8c747 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2147,6 +2147,9 @@ | |||
2147 | #define PCI_DEVICE_ID_ENE_1420 0x1420 | 2147 | #define PCI_DEVICE_ID_ENE_1420 0x1420 |
2148 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 2148 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
2149 | 2149 | ||
2150 | #define PCI_VENDOR_ID_MIPS 0x153f | ||
2151 | #define PCI_DEVICE_ID_SOC_IT 0x0001 | ||
2152 | |||
2150 | #define PCI_VENDOR_ID_SYBA 0x1592 | 2153 | #define PCI_VENDOR_ID_SYBA 0x1592 |
2151 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 | 2154 | #define PCI_DEVICE_ID_SYBA_2P_EPP 0x0782 |
2152 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 | 2155 | #define PCI_DEVICE_ID_SYBA_1P_ECP 0x0783 |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 7aeb208ed713..5cfb07648eca 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
@@ -186,7 +186,9 @@ extern int pm_suspend(suspend_state_t state); | |||
186 | 186 | ||
187 | struct device; | 187 | struct device; |
188 | 188 | ||
189 | typedef u32 __bitwise pm_message_t; | 189 | typedef struct pm_message { |
190 | int event; | ||
191 | } pm_message_t; | ||
190 | 192 | ||
191 | /* | 193 | /* |
192 | * There are 4 important states driver can be in: | 194 | * There are 4 important states driver can be in: |
@@ -207,9 +209,13 @@ typedef u32 __bitwise pm_message_t; | |||
207 | * or something similar soon. | 209 | * or something similar soon. |
208 | */ | 210 | */ |
209 | 211 | ||
210 | #define PMSG_FREEZE ((__force pm_message_t) 3) | 212 | #define PM_EVENT_ON 0 |
211 | #define PMSG_SUSPEND ((__force pm_message_t) 3) | 213 | #define PM_EVENT_FREEZE 1 |
212 | #define PMSG_ON ((__force pm_message_t) 0) | 214 | #define PM_EVENT_SUSPEND 2 |
215 | |||
216 | #define PMSG_FREEZE ((struct pm_message){ .event = PM_EVENT_FREEZE, }) | ||
217 | #define PMSG_SUSPEND ((struct pm_message){ .event = PM_EVENT_SUSPEND, }) | ||
218 | #define PMSG_ON ((struct pm_message){ .event = PM_EVENT_ON, }) | ||
213 | 219 | ||
214 | struct dev_pm_info { | 220 | struct dev_pm_info { |
215 | pm_message_t power_state; | 221 | pm_message_t power_state; |
diff --git a/include/linux/ptrace.h b/include/linux/ptrace.h index a373fc254df2..2afdafb62123 100644 --- a/include/linux/ptrace.h +++ b/include/linux/ptrace.h | |||
@@ -20,6 +20,8 @@ | |||
20 | #define PTRACE_DETACH 0x11 | 20 | #define PTRACE_DETACH 0x11 |
21 | 21 | ||
22 | #define PTRACE_SYSCALL 24 | 22 | #define PTRACE_SYSCALL 24 |
23 | #define PTRACE_SYSEMU 31 | ||
24 | #define PTRACE_SYSEMU_SINGLESTEP 32 | ||
23 | 25 | ||
24 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ | 26 | /* 0x4200-0x4300 are reserved for architecture-independent additions. */ |
25 | #define PTRACE_SETOPTIONS 0x4200 | 27 | #define PTRACE_SETOPTIONS 0x4200 |
diff --git a/include/linux/swap.h b/include/linux/swap.h index bfe3e763ccf2..3c9ff0048153 100644 --- a/include/linux/swap.h +++ b/include/linux/swap.h | |||
@@ -107,6 +107,8 @@ enum { | |||
107 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ | 107 | SWP_USED = (1 << 0), /* is slot in swap_info[] used? */ |
108 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ | 108 | SWP_WRITEOK = (1 << 1), /* ok to write to this swap? */ |
109 | SWP_ACTIVE = (SWP_USED | SWP_WRITEOK), | 109 | SWP_ACTIVE = (SWP_USED | SWP_WRITEOK), |
110 | /* add others here before... */ | ||
111 | SWP_SCANNING = (1 << 8), /* refcount in scan_swap_map */ | ||
110 | }; | 112 | }; |
111 | 113 | ||
112 | #define SWAP_CLUSTER_MAX 32 | 114 | #define SWAP_CLUSTER_MAX 32 |
@@ -116,16 +118,13 @@ enum { | |||
116 | 118 | ||
117 | /* | 119 | /* |
118 | * The in-memory structure used to track swap areas. | 120 | * The in-memory structure used to track swap areas. |
119 | * extent_list.prev points at the lowest-index extent. That list is | ||
120 | * sorted. | ||
121 | */ | 121 | */ |
122 | struct swap_info_struct { | 122 | struct swap_info_struct { |
123 | unsigned int flags; | 123 | unsigned int flags; |
124 | spinlock_t sdev_lock; | 124 | int prio; /* swap priority */ |
125 | struct file *swap_file; | 125 | struct file *swap_file; |
126 | struct block_device *bdev; | 126 | struct block_device *bdev; |
127 | struct list_head extent_list; | 127 | struct list_head extent_list; |
128 | int nr_extents; | ||
129 | struct swap_extent *curr_swap_extent; | 128 | struct swap_extent *curr_swap_extent; |
130 | unsigned old_block_size; | 129 | unsigned old_block_size; |
131 | unsigned short * swap_map; | 130 | unsigned short * swap_map; |
@@ -133,10 +132,9 @@ struct swap_info_struct { | |||
133 | unsigned int highest_bit; | 132 | unsigned int highest_bit; |
134 | unsigned int cluster_next; | 133 | unsigned int cluster_next; |
135 | unsigned int cluster_nr; | 134 | unsigned int cluster_nr; |
136 | int prio; /* swap priority */ | 135 | unsigned int pages; |
137 | int pages; | 136 | unsigned int max; |
138 | unsigned long max; | 137 | unsigned int inuse_pages; |
139 | unsigned long inuse_pages; | ||
140 | int next; /* next entry on swap list */ | 138 | int next; /* next entry on swap list */ |
141 | }; | 139 | }; |
142 | 140 | ||
@@ -222,13 +220,7 @@ extern int can_share_swap_page(struct page *); | |||
222 | extern int remove_exclusive_swap_page(struct page *); | 220 | extern int remove_exclusive_swap_page(struct page *); |
223 | struct backing_dev_info; | 221 | struct backing_dev_info; |
224 | 222 | ||
225 | extern struct swap_list_t swap_list; | 223 | extern spinlock_t swap_lock; |
226 | extern spinlock_t swaplock; | ||
227 | |||
228 | #define swap_list_lock() spin_lock(&swaplock) | ||
229 | #define swap_list_unlock() spin_unlock(&swaplock) | ||
230 | #define swap_device_lock(p) spin_lock(&p->sdev_lock) | ||
231 | #define swap_device_unlock(p) spin_unlock(&p->sdev_lock) | ||
232 | 224 | ||
233 | /* linux/mm/thrash.c */ | 225 | /* linux/mm/thrash.c */ |
234 | extern struct mm_struct * swap_token_mm; | 226 | extern struct mm_struct * swap_token_mm; |
diff --git a/include/linux/swapops.h b/include/linux/swapops.h index d4c7db35e708..87b9d14c710d 100644 --- a/include/linux/swapops.h +++ b/include/linux/swapops.h | |||
@@ -4,7 +4,7 @@ | |||
4 | * the low-order bits. | 4 | * the low-order bits. |
5 | * | 5 | * |
6 | * We arrange the `type' and `offset' fields so that `type' is at the five | 6 | * We arrange the `type' and `offset' fields so that `type' is at the five |
7 | * high-order bits of the smp_entry_t and `offset' is right-aligned in the | 7 | * high-order bits of the swp_entry_t and `offset' is right-aligned in the |
8 | * remaining bits. | 8 | * remaining bits. |
9 | * | 9 | * |
10 | * swp_entry_t's are *never* stored anywhere in their arch-dependent format. | 10 | * swp_entry_t's are *never* stored anywhere in their arch-dependent format. |
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h index 6409d9cf5965..b244f69ef682 100644 --- a/include/linux/vmalloc.h +++ b/include/linux/vmalloc.h | |||
@@ -10,6 +10,14 @@ | |||
10 | #define VM_MAP 0x00000004 /* vmap()ed pages */ | 10 | #define VM_MAP 0x00000004 /* vmap()ed pages */ |
11 | /* bits [20..32] reserved for arch specific ioremap internals */ | 11 | /* bits [20..32] reserved for arch specific ioremap internals */ |
12 | 12 | ||
13 | /* | ||
14 | * Maximum alignment for ioremap() regions. | ||
15 | * Can be overriden by arch-specific value. | ||
16 | */ | ||
17 | #ifndef IOREMAP_MAX_ORDER | ||
18 | #define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */ | ||
19 | #endif | ||
20 | |||
13 | struct vm_struct { | 21 | struct vm_struct { |
14 | void *addr; | 22 | void *addr; |
15 | unsigned long size; | 23 | unsigned long size; |
diff --git a/include/net/ip_vs.h b/include/net/ip_vs.h index 7a3c43711a17..e426641c519f 100644 --- a/include/net/ip_vs.h +++ b/include/net/ip_vs.h | |||
@@ -958,7 +958,7 @@ static __inline__ int ip_vs_todrop(void) | |||
958 | */ | 958 | */ |
959 | #define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) | 959 | #define IP_VS_FWD_METHOD(cp) (cp->flags & IP_VS_CONN_F_FWD_MASK) |
960 | 960 | ||
961 | extern __inline__ char ip_vs_fwd_tag(struct ip_vs_conn *cp) | 961 | static inline char ip_vs_fwd_tag(struct ip_vs_conn *cp) |
962 | { | 962 | { |
963 | char fwd; | 963 | char fwd; |
964 | 964 | ||
diff --git a/include/net/sock.h b/include/net/sock.h index 312cb25cbd18..cf628261da52 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -709,6 +709,12 @@ static inline int sk_stream_rmem_schedule(struct sock *sk, struct sk_buff *skb) | |||
709 | sk_stream_mem_schedule(sk, skb->truesize, 1); | 709 | sk_stream_mem_schedule(sk, skb->truesize, 1); |
710 | } | 710 | } |
711 | 711 | ||
712 | static inline int sk_stream_wmem_schedule(struct sock *sk, int size) | ||
713 | { | ||
714 | return size <= sk->sk_forward_alloc || | ||
715 | sk_stream_mem_schedule(sk, size, 0); | ||
716 | } | ||
717 | |||
712 | /* Used by processes to "lock" a socket state, so that | 718 | /* Used by processes to "lock" a socket state, so that |
713 | * interrupts and bottom half handlers won't change it | 719 | * interrupts and bottom half handlers won't change it |
714 | * from under us. It essentially blocks any incoming | 720 | * from under us. It essentially blocks any incoming |
@@ -1203,8 +1209,7 @@ static inline struct sk_buff *sk_stream_alloc_pskb(struct sock *sk, | |||
1203 | skb = alloc_skb_fclone(size + hdr_len, gfp); | 1209 | skb = alloc_skb_fclone(size + hdr_len, gfp); |
1204 | if (skb) { | 1210 | if (skb) { |
1205 | skb->truesize += mem; | 1211 | skb->truesize += mem; |
1206 | if (sk->sk_forward_alloc >= (int)skb->truesize || | 1212 | if (sk_stream_wmem_schedule(sk, skb->truesize)) { |
1207 | sk_stream_mem_schedule(sk, skb->truesize, 0)) { | ||
1208 | skb_reserve(skb, hdr_len); | 1213 | skb_reserve(skb, hdr_len); |
1209 | return skb; | 1214 | return skb; |
1210 | } | 1215 | } |
@@ -1227,10 +1232,8 @@ static inline struct page *sk_stream_alloc_page(struct sock *sk) | |||
1227 | { | 1232 | { |
1228 | struct page *page = NULL; | 1233 | struct page *page = NULL; |
1229 | 1234 | ||
1230 | if (sk->sk_forward_alloc >= (int)PAGE_SIZE || | 1235 | page = alloc_pages(sk->sk_allocation, 0); |
1231 | sk_stream_mem_schedule(sk, PAGE_SIZE, 0)) | 1236 | if (!page) { |
1232 | page = alloc_pages(sk->sk_allocation, 0); | ||
1233 | else { | ||
1234 | sk->sk_prot->enter_memory_pressure(); | 1237 | sk->sk_prot->enter_memory_pressure(); |
1235 | sk_stream_moderate_sndbuf(sk); | 1238 | sk_stream_moderate_sndbuf(sk); |
1236 | } | 1239 | } |
diff --git a/include/net/tcp.h b/include/net/tcp.h index d6bcf1317a6a..97af77c4d096 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -454,6 +454,7 @@ extern int tcp_retransmit_skb(struct sock *, struct sk_buff *); | |||
454 | extern void tcp_xmit_retransmit_queue(struct sock *); | 454 | extern void tcp_xmit_retransmit_queue(struct sock *); |
455 | extern void tcp_simple_retransmit(struct sock *); | 455 | extern void tcp_simple_retransmit(struct sock *); |
456 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); | 456 | extern int tcp_trim_head(struct sock *, struct sk_buff *, u32); |
457 | extern int tcp_fragment(struct sock *, struct sk_buff *, u32, unsigned int); | ||
457 | 458 | ||
458 | extern void tcp_send_probe0(struct sock *); | 459 | extern void tcp_send_probe0(struct sock *); |
459 | extern void tcp_send_partial(struct sock *); | 460 | extern void tcp_send_partial(struct sock *); |
diff --git a/include/video/pmag-ba-fb.h b/include/video/pmag-ba-fb.h index cebef073b9a3..fceb6c0f6583 100644 --- a/include/video/pmag-ba-fb.h +++ b/include/video/pmag-ba-fb.h | |||
@@ -1,24 +1,27 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/pmag-ba-fb.h | 2 | * linux/include/video/pmag-ba-fb.h |
3 | * | 3 | * |
4 | * TurboChannel PMAG-BA framebuffer card support, | 4 | * TURBOchannel PMAG-BA Color Frame Buffer (CFB) card support, |
5 | * Copyright (C) 1999,2000,2001 by | 5 | * Copyright (C) 1999, 2000, 2001 by |
6 | * Michael Engel <engel@unix-ag.org>, | 6 | * Michael Engel <engel@unix-ag.org>, |
7 | * Karsten Merker <merker@linuxtag.org> | 7 | * Karsten Merker <merker@linuxtag.org> |
8 | * This file is subject to the terms and conditions of the GNU General | 8 | * Copyright (c) 2005 Maciej W. Rozycki |
9 | * Public License. See the file COPYING in the main directory of this | 9 | * |
10 | * archive for more details. | 10 | * This file is subject to the terms and conditions of the GNU General |
11 | */ | 11 | * Public License. See the file COPYING in the main directory of this |
12 | 12 | * archive for more details. | |
13 | /* | ||
14 | * Bt459 RAM DAC register base offset (rel. to TC slot base address) | ||
15 | */ | 13 | */ |
16 | 14 | ||
17 | #define PMAG_BA_BT459_OFFSET 0x00200000 | 15 | /* IOmem resource offsets. */ |
18 | 16 | #define PMAG_BA_FBMEM 0x000000 /* frame buffer */ | |
19 | /* | 17 | #define PMAG_BA_BT459 0x200000 /* Bt459 RAMDAC */ |
20 | * Begin of PMAG-BA framebuffer memory relative to TC slot address, | 18 | #define PMAG_BA_IRQ 0x300000 /* IRQ acknowledge */ |
21 | * resolution is 1024x864x8 | 19 | #define PMAG_BA_ROM 0x380000 /* REX option ROM */ |
22 | */ | 20 | #define PMAG_BA_BT438 0x380000 /* Bt438 clock chip reset */ |
21 | #define PMAG_BA_SIZE 0x400000 /* address space size */ | ||
23 | 22 | ||
24 | #define PMAG_BA_ONBOARD_FBMEM_OFFSET 0x00000000 | 23 | /* Bt459 register offsets, byte-wide registers. */ |
24 | #define BT459_ADDR_LO 0x0 /* address low */ | ||
25 | #define BT459_ADDR_HI 0x4 /* address high */ | ||
26 | #define BT459_DATA 0x8 /* data window register */ | ||
27 | #define BT459_CMAP 0xc /* color map window register */ | ||
diff --git a/include/video/pmagb-b-fb.h b/include/video/pmagb-b-fb.h index 87b81a555139..7539b9087a80 100644 --- a/include/video/pmagb-b-fb.h +++ b/include/video/pmagb-b-fb.h | |||
@@ -1,32 +1,58 @@ | |||
1 | /* | 1 | /* |
2 | * linux/drivers/video/pmagb-b-fb.h | 2 | * linux/include/video/pmagb-b-fb.h |
3 | * | 3 | * |
4 | * TurboChannel PMAGB-B framebuffer card support, | 4 | * TURBOchannel PMAGB-B Smart Frame Buffer (SFB) card support, |
5 | * Copyright (C) 1999, 2000, 2001 by | 5 | * Copyright (C) 1999, 2000, 2001 by |
6 | * Michael Engel <engel@unix-ag.org> and | 6 | * Michael Engel <engel@unix-ag.org> and |
7 | * Karsten Merker <merker@linuxtag.org> | 7 | * Karsten Merker <merker@linuxtag.org> |
8 | * This file is subject to the terms and conditions of the GNU General | 8 | * Copyright (c) 2005 Maciej W. Rozycki |
9 | * Public License. See the file COPYING in the main directory of this | 9 | * |
10 | * archive for more details. | 10 | * This file is subject to the terms and conditions of the GNU General |
11 | * Public License. See the file COPYING in the main directory of this | ||
12 | * archive for more details. | ||
11 | */ | 13 | */ |
12 | 14 | ||
15 | /* IOmem resource offsets. */ | ||
16 | #define PMAGB_B_ROM 0x000000 /* REX option ROM */ | ||
17 | #define PMAGB_B_SFB 0x100000 /* SFB ASIC */ | ||
18 | #define PMAGB_B_GP0 0x140000 /* general purpose output 0 */ | ||
19 | #define PMAGB_B_GP1 0x180000 /* general purpose output 1 */ | ||
20 | #define PMAGB_B_BT459 0x1c0000 /* Bt459 RAMDAC */ | ||
21 | #define PMAGB_B_FBMEM 0x200000 /* frame buffer */ | ||
22 | #define PMAGB_B_SIZE 0x400000 /* address space size */ | ||
13 | 23 | ||
14 | /* | 24 | /* IOmem register offsets. */ |
15 | * Bt459 RAM DAC register base offset (rel. to TC slot base address) | 25 | #define SFB_REG_VID_HOR 0x64 /* video horizontal setup */ |
16 | */ | 26 | #define SFB_REG_VID_VER 0x68 /* video vertical setup */ |
17 | #define PMAGB_B_BT459_OFFSET 0x001C0000 | 27 | #define SFB_REG_VID_BASE 0x6c /* video base address */ |
28 | #define SFB_REG_TCCLK_COUNT 0x78 /* TURBOchannel clock count */ | ||
29 | #define SFB_REG_VIDCLK_COUNT 0x7c /* video clock count */ | ||
18 | 30 | ||
19 | /* | 31 | /* Video horizontal setup register constants. All bits are r/w. */ |
20 | * Begin of PMAGB-B framebuffer memory, resolution is configurable: | 32 | #define SFB_VID_HOR_BP_SHIFT 0x15 /* back porch */ |
21 | * 1024x864x8 or 1280x1024x8, settable by jumper on the card | 33 | #define SFB_VID_HOR_BP_MASK 0x7f |
22 | */ | 34 | #define SFB_VID_HOR_SYN_SHIFT 0x0e /* sync pulse */ |
23 | #define PMAGB_B_ONBOARD_FBMEM_OFFSET 0x00201000 | 35 | #define SFB_VID_HOR_SYN_MASK 0x7f |
36 | #define SFB_VID_HOR_FP_SHIFT 0x09 /* front porch */ | ||
37 | #define SFB_VID_HOR_FP_MASK 0x1f | ||
38 | #define SFB_VID_HOR_PIX_SHIFT 0x00 /* active video */ | ||
39 | #define SFB_VID_HOR_PIX_MASK 0x1ff | ||
24 | 40 | ||
25 | /* | 41 | /* Video vertical setup register constants. All bits are r/w. */ |
26 | * Bt459 register offsets, byte-wide registers | 42 | #define SFB_VID_VER_BP_SHIFT 0x16 /* back porch */ |
27 | */ | 43 | #define SFB_VID_VER_BP_MASK 0x3f |
44 | #define SFB_VID_VER_SYN_SHIFT 0x10 /* sync pulse */ | ||
45 | #define SFB_VID_VER_SYN_MASK 0x3f | ||
46 | #define SFB_VID_VER_FP_SHIFT 0x0b /* front porch */ | ||
47 | #define SFB_VID_VER_FP_MASK 0x1f | ||
48 | #define SFB_VID_VER_SL_SHIFT 0x00 /* active scan lines */ | ||
49 | #define SFB_VID_VER_SL_MASK 0x7ff | ||
50 | |||
51 | /* Video base address register constants. All bits are r/w. */ | ||
52 | #define SFB_VID_BASE_MASK 0x1ff /* video base row address */ | ||
28 | 53 | ||
29 | #define BT459_ADR_LOW BT459_OFFSET + 0x00 /* addr. low */ | 54 | /* Bt459 register offsets, byte-wide registers. */ |
30 | #define BT459_ADR_HIGH BT459_OFFSET + 0x04 /* addr. high */ | 55 | #define BT459_ADDR_LO 0x0 /* address low */ |
31 | #define BT459_DATA BT459_OFFSET + 0x08 /* r/w data */ | 56 | #define BT459_ADDR_HI 0x4 /* address high */ |
32 | #define BT459_CMAP BT459_OFFSET + 0x0C /* color map */ | 57 | #define BT459_DATA 0x8 /* data window register */ |
58 | #define BT459_CMAP 0xc /* color map window register */ | ||
diff --git a/kernel/fork.c b/kernel/fork.c index b65187f0c74e..7e1ead9a6ba4 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -994,6 +994,9 @@ static task_t *copy_process(unsigned long clone_flags, | |||
994 | * of CLONE_PTRACE. | 994 | * of CLONE_PTRACE. |
995 | */ | 995 | */ |
996 | clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE); | 996 | clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE); |
997 | #ifdef TIF_SYSCALL_EMU | ||
998 | clear_tsk_thread_flag(p, TIF_SYSCALL_EMU); | ||
999 | #endif | ||
997 | 1000 | ||
998 | /* Our parent execution domain becomes current domain | 1001 | /* Our parent execution domain becomes current domain |
999 | These must match for thread signalling to apply */ | 1002 | These must match for thread signalling to apply */ |
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 2c7121d9bff1..917066a5767c 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -72,6 +72,18 @@ config PM_STD_PARTITION | |||
72 | suspended image to. It will simply pick the first available swap | 72 | suspended image to. It will simply pick the first available swap |
73 | device. | 73 | device. |
74 | 74 | ||
75 | config SWSUSP_ENCRYPT | ||
76 | bool "Encrypt suspend image" | ||
77 | depends on SOFTWARE_SUSPEND && CRYPTO=y && (CRYPTO_AES=y || CRYPTO_AES_586=y || CRYPTO_AES_X86_64=y) | ||
78 | default "" | ||
79 | ---help--- | ||
80 | To prevent data gathering from swap after resume you can encrypt | ||
81 | the suspend image with a temporary key that is deleted on | ||
82 | resume. | ||
83 | |||
84 | Note that the temporary key is stored unencrypted on disk while the | ||
85 | system is suspended. | ||
86 | |||
75 | config SUSPEND_SMP | 87 | config SUSPEND_SMP |
76 | bool | 88 | bool |
77 | depends on HOTPLUG_CPU && X86 && PM | 89 | depends on HOTPLUG_CPU && X86 && PM |
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 664eb0469b6e..2d8bf054d036 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -112,24 +112,12 @@ static inline void platform_finish(void) | |||
112 | } | 112 | } |
113 | } | 113 | } |
114 | 114 | ||
115 | static void finish(void) | ||
116 | { | ||
117 | device_resume(); | ||
118 | platform_finish(); | ||
119 | thaw_processes(); | ||
120 | enable_nonboot_cpus(); | ||
121 | pm_restore_console(); | ||
122 | } | ||
123 | |||
124 | |||
125 | static int prepare_processes(void) | 115 | static int prepare_processes(void) |
126 | { | 116 | { |
127 | int error; | 117 | int error; |
128 | 118 | ||
129 | pm_prepare_console(); | 119 | pm_prepare_console(); |
130 | |||
131 | sys_sync(); | 120 | sys_sync(); |
132 | |||
133 | disable_nonboot_cpus(); | 121 | disable_nonboot_cpus(); |
134 | 122 | ||
135 | if (freeze_processes()) { | 123 | if (freeze_processes()) { |
@@ -162,15 +150,6 @@ static void unprepare_processes(void) | |||
162 | pm_restore_console(); | 150 | pm_restore_console(); |
163 | } | 151 | } |
164 | 152 | ||
165 | static int prepare_devices(void) | ||
166 | { | ||
167 | int error; | ||
168 | |||
169 | if ((error = device_suspend(PMSG_FREEZE))) | ||
170 | printk("Some devices failed to suspend\n"); | ||
171 | return error; | ||
172 | } | ||
173 | |||
174 | /** | 153 | /** |
175 | * pm_suspend_disk - The granpappy of power management. | 154 | * pm_suspend_disk - The granpappy of power management. |
176 | * | 155 | * |
@@ -187,17 +166,14 @@ int pm_suspend_disk(void) | |||
187 | error = prepare_processes(); | 166 | error = prepare_processes(); |
188 | if (error) | 167 | if (error) |
189 | return error; | 168 | return error; |
190 | error = prepare_devices(); | ||
191 | 169 | ||
170 | error = device_suspend(PMSG_FREEZE); | ||
192 | if (error) { | 171 | if (error) { |
172 | printk("Some devices failed to suspend\n"); | ||
193 | unprepare_processes(); | 173 | unprepare_processes(); |
194 | return error; | 174 | return error; |
195 | } | 175 | } |
196 | 176 | ||
197 | pr_debug("PM: Attempting to suspend to disk.\n"); | ||
198 | if (pm_disk_mode == PM_DISK_FIRMWARE) | ||
199 | return pm_ops->enter(PM_SUSPEND_DISK); | ||
200 | |||
201 | pr_debug("PM: snapshotting memory.\n"); | 177 | pr_debug("PM: snapshotting memory.\n"); |
202 | in_suspend = 1; | 178 | in_suspend = 1; |
203 | if ((error = swsusp_suspend())) | 179 | if ((error = swsusp_suspend())) |
@@ -208,11 +184,20 @@ int pm_suspend_disk(void) | |||
208 | error = swsusp_write(); | 184 | error = swsusp_write(); |
209 | if (!error) | 185 | if (!error) |
210 | power_down(pm_disk_mode); | 186 | power_down(pm_disk_mode); |
187 | else { | ||
188 | /* swsusp_write can not fail in device_resume, | ||
189 | no need to do second device_resume */ | ||
190 | swsusp_free(); | ||
191 | unprepare_processes(); | ||
192 | return error; | ||
193 | } | ||
211 | } else | 194 | } else |
212 | pr_debug("PM: Image restored successfully.\n"); | 195 | pr_debug("PM: Image restored successfully.\n"); |
196 | |||
213 | swsusp_free(); | 197 | swsusp_free(); |
214 | Done: | 198 | Done: |
215 | finish(); | 199 | device_resume(); |
200 | unprepare_processes(); | ||
216 | return error; | 201 | return error; |
217 | } | 202 | } |
218 | 203 | ||
@@ -233,9 +218,12 @@ static int software_resume(void) | |||
233 | { | 218 | { |
234 | int error; | 219 | int error; |
235 | 220 | ||
221 | down(&pm_sem); | ||
236 | if (!swsusp_resume_device) { | 222 | if (!swsusp_resume_device) { |
237 | if (!strlen(resume_file)) | 223 | if (!strlen(resume_file)) { |
224 | up(&pm_sem); | ||
238 | return -ENOENT; | 225 | return -ENOENT; |
226 | } | ||
239 | swsusp_resume_device = name_to_dev_t(resume_file); | 227 | swsusp_resume_device = name_to_dev_t(resume_file); |
240 | pr_debug("swsusp: Resume From Partition %s\n", resume_file); | 228 | pr_debug("swsusp: Resume From Partition %s\n", resume_file); |
241 | } else { | 229 | } else { |
@@ -248,6 +236,7 @@ static int software_resume(void) | |||
248 | * FIXME: If noresume is specified, we need to find the partition | 236 | * FIXME: If noresume is specified, we need to find the partition |
249 | * and reset it back to normal swap space. | 237 | * and reset it back to normal swap space. |
250 | */ | 238 | */ |
239 | up(&pm_sem); | ||
251 | return 0; | 240 | return 0; |
252 | } | 241 | } |
253 | 242 | ||
@@ -270,20 +259,24 @@ static int software_resume(void) | |||
270 | 259 | ||
271 | pr_debug("PM: Preparing devices for restore.\n"); | 260 | pr_debug("PM: Preparing devices for restore.\n"); |
272 | 261 | ||
273 | if ((error = prepare_devices())) | 262 | if ((error = device_suspend(PMSG_FREEZE))) { |
263 | printk("Some devices failed to suspend\n"); | ||
274 | goto Free; | 264 | goto Free; |
265 | } | ||
275 | 266 | ||
276 | mb(); | 267 | mb(); |
277 | 268 | ||
278 | pr_debug("PM: Restoring saved image.\n"); | 269 | pr_debug("PM: Restoring saved image.\n"); |
279 | swsusp_resume(); | 270 | swsusp_resume(); |
280 | pr_debug("PM: Restore failed, recovering.n"); | 271 | pr_debug("PM: Restore failed, recovering.n"); |
281 | finish(); | 272 | device_resume(); |
282 | Free: | 273 | Free: |
283 | swsusp_free(); | 274 | swsusp_free(); |
284 | Cleanup: | 275 | Cleanup: |
285 | unprepare_processes(); | 276 | unprepare_processes(); |
286 | Done: | 277 | Done: |
278 | /* For success case, the suspend path will release the lock */ | ||
279 | up(&pm_sem); | ||
287 | pr_debug("PM: Resume from disk failed.\n"); | 280 | pr_debug("PM: Resume from disk failed.\n"); |
288 | return 0; | 281 | return 0; |
289 | } | 282 | } |
@@ -390,7 +383,9 @@ static ssize_t resume_store(struct subsystem * subsys, const char * buf, size_t | |||
390 | if (sscanf(buf, "%u:%u", &maj, &min) == 2) { | 383 | if (sscanf(buf, "%u:%u", &maj, &min) == 2) { |
391 | res = MKDEV(maj,min); | 384 | res = MKDEV(maj,min); |
392 | if (maj == MAJOR(res) && min == MINOR(res)) { | 385 | if (maj == MAJOR(res) && min == MINOR(res)) { |
386 | down(&pm_sem); | ||
393 | swsusp_resume_device = res; | 387 | swsusp_resume_device = res; |
388 | up(&pm_sem); | ||
394 | printk("Attempting manual resume\n"); | 389 | printk("Attempting manual resume\n"); |
395 | noresume = 0; | 390 | noresume = 0; |
396 | software_resume(); | 391 | software_resume(); |
diff --git a/kernel/power/main.c b/kernel/power/main.c index 71aa0fd22007..22bdc93cc038 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c | |||
@@ -143,11 +143,12 @@ static void suspend_finish(suspend_state_t state) | |||
143 | 143 | ||
144 | 144 | ||
145 | 145 | ||
146 | static char * pm_states[] = { | 146 | static char *pm_states[PM_SUSPEND_MAX] = { |
147 | [PM_SUSPEND_STANDBY] = "standby", | 147 | [PM_SUSPEND_STANDBY] = "standby", |
148 | [PM_SUSPEND_MEM] = "mem", | 148 | [PM_SUSPEND_MEM] = "mem", |
149 | #ifdef CONFIG_SOFTWARE_SUSPEND | ||
149 | [PM_SUSPEND_DISK] = "disk", | 150 | [PM_SUSPEND_DISK] = "disk", |
150 | NULL, | 151 | #endif |
151 | }; | 152 | }; |
152 | 153 | ||
153 | 154 | ||
diff --git a/kernel/power/process.c b/kernel/power/process.c index 3bd0d261818f..28de118f7a0b 100644 --- a/kernel/power/process.c +++ b/kernel/power/process.c | |||
@@ -38,7 +38,6 @@ void refrigerator(void) | |||
38 | processes around? */ | 38 | processes around? */ |
39 | long save; | 39 | long save; |
40 | save = current->state; | 40 | save = current->state; |
41 | current->state = TASK_UNINTERRUPTIBLE; | ||
42 | pr_debug("%s entered refrigerator\n", current->comm); | 41 | pr_debug("%s entered refrigerator\n", current->comm); |
43 | printk("="); | 42 | printk("="); |
44 | 43 | ||
@@ -47,8 +46,10 @@ void refrigerator(void) | |||
47 | recalc_sigpending(); /* We sent fake signal, clean it up */ | 46 | recalc_sigpending(); /* We sent fake signal, clean it up */ |
48 | spin_unlock_irq(¤t->sighand->siglock); | 47 | spin_unlock_irq(¤t->sighand->siglock); |
49 | 48 | ||
50 | while (frozen(current)) | 49 | while (frozen(current)) { |
50 | current->state = TASK_UNINTERRUPTIBLE; | ||
51 | schedule(); | 51 | schedule(); |
52 | } | ||
52 | pr_debug("%s left refrigerator\n", current->comm); | 53 | pr_debug("%s left refrigerator\n", current->comm); |
53 | current->state = save; | 54 | current->state = save; |
54 | } | 55 | } |
@@ -80,13 +81,33 @@ int freeze_processes(void) | |||
80 | } while_each_thread(g, p); | 81 | } while_each_thread(g, p); |
81 | read_unlock(&tasklist_lock); | 82 | read_unlock(&tasklist_lock); |
82 | yield(); /* Yield is okay here */ | 83 | yield(); /* Yield is okay here */ |
83 | if (time_after(jiffies, start_time + TIMEOUT)) { | 84 | if (todo && time_after(jiffies, start_time + TIMEOUT)) { |
84 | printk( "\n" ); | 85 | printk( "\n" ); |
85 | printk(KERN_ERR " stopping tasks failed (%d tasks remaining)\n", todo ); | 86 | printk(KERN_ERR " stopping tasks failed (%d tasks remaining)\n", todo ); |
86 | return todo; | 87 | break; |
87 | } | 88 | } |
88 | } while(todo); | 89 | } while(todo); |
89 | 90 | ||
91 | /* This does not unfreeze processes that are already frozen | ||
92 | * (we have slightly ugly calling convention in that respect, | ||
93 | * and caller must call thaw_processes() if something fails), | ||
94 | * but it cleans up leftover PF_FREEZE requests. | ||
95 | */ | ||
96 | if (todo) { | ||
97 | read_lock(&tasklist_lock); | ||
98 | do_each_thread(g, p) | ||
99 | if (freezing(p)) { | ||
100 | pr_debug(" clean up: %s\n", p->comm); | ||
101 | p->flags &= ~PF_FREEZE; | ||
102 | spin_lock_irqsave(&p->sighand->siglock, flags); | ||
103 | recalc_sigpending_tsk(p); | ||
104 | spin_unlock_irqrestore(&p->sighand->siglock, flags); | ||
105 | } | ||
106 | while_each_thread(g, p); | ||
107 | read_unlock(&tasklist_lock); | ||
108 | return todo; | ||
109 | } | ||
110 | |||
90 | printk( "|\n" ); | 111 | printk( "|\n" ); |
91 | BUG_ON(in_atomic()); | 112 | BUG_ON(in_atomic()); |
92 | return 0; | 113 | return 0; |
diff --git a/kernel/power/swsusp.c b/kernel/power/swsusp.c index f2bc71b9fe8b..eaacd5cb5889 100644 --- a/kernel/power/swsusp.c +++ b/kernel/power/swsusp.c | |||
@@ -31,6 +31,9 @@ | |||
31 | * Alex Badea <vampire@go.ro>: | 31 | * Alex Badea <vampire@go.ro>: |
32 | * Fixed runaway init | 32 | * Fixed runaway init |
33 | * | 33 | * |
34 | * Andreas Steinmetz <ast@domdv.de>: | ||
35 | * Added encrypted suspend option | ||
36 | * | ||
34 | * More state savers are welcome. Especially for the scsi layer... | 37 | * More state savers are welcome. Especially for the scsi layer... |
35 | * | 38 | * |
36 | * For TODOs,FIXMEs also look in Documentation/power/swsusp.txt | 39 | * For TODOs,FIXMEs also look in Documentation/power/swsusp.txt |
@@ -71,8 +74,16 @@ | |||
71 | #include <asm/tlbflush.h> | 74 | #include <asm/tlbflush.h> |
72 | #include <asm/io.h> | 75 | #include <asm/io.h> |
73 | 76 | ||
77 | #include <linux/random.h> | ||
78 | #include <linux/crypto.h> | ||
79 | #include <asm/scatterlist.h> | ||
80 | |||
74 | #include "power.h" | 81 | #include "power.h" |
75 | 82 | ||
83 | #define CIPHER "aes" | ||
84 | #define MAXKEY 32 | ||
85 | #define MAXIV 32 | ||
86 | |||
76 | /* References to section boundaries */ | 87 | /* References to section boundaries */ |
77 | extern const void __nosave_begin, __nosave_end; | 88 | extern const void __nosave_begin, __nosave_end; |
78 | 89 | ||
@@ -103,7 +114,8 @@ static suspend_pagedir_t *pagedir_save; | |||
103 | #define SWSUSP_SIG "S1SUSPEND" | 114 | #define SWSUSP_SIG "S1SUSPEND" |
104 | 115 | ||
105 | static struct swsusp_header { | 116 | static struct swsusp_header { |
106 | char reserved[PAGE_SIZE - 20 - sizeof(swp_entry_t)]; | 117 | char reserved[PAGE_SIZE - 20 - MAXKEY - MAXIV - sizeof(swp_entry_t)]; |
118 | u8 key_iv[MAXKEY+MAXIV]; | ||
107 | swp_entry_t swsusp_info; | 119 | swp_entry_t swsusp_info; |
108 | char orig_sig[10]; | 120 | char orig_sig[10]; |
109 | char sig[10]; | 121 | char sig[10]; |
@@ -129,6 +141,131 @@ static struct swsusp_info swsusp_info; | |||
129 | static unsigned short swapfile_used[MAX_SWAPFILES]; | 141 | static unsigned short swapfile_used[MAX_SWAPFILES]; |
130 | static unsigned short root_swap; | 142 | static unsigned short root_swap; |
131 | 143 | ||
144 | static int write_page(unsigned long addr, swp_entry_t * loc); | ||
145 | static int bio_read_page(pgoff_t page_off, void * page); | ||
146 | |||
147 | static u8 key_iv[MAXKEY+MAXIV]; | ||
148 | |||
149 | #ifdef CONFIG_SWSUSP_ENCRYPT | ||
150 | |||
151 | static int crypto_init(int mode, void **mem) | ||
152 | { | ||
153 | int error = 0; | ||
154 | int len; | ||
155 | char *modemsg; | ||
156 | struct crypto_tfm *tfm; | ||
157 | |||
158 | modemsg = mode ? "suspend not possible" : "resume not possible"; | ||
159 | |||
160 | tfm = crypto_alloc_tfm(CIPHER, CRYPTO_TFM_MODE_CBC); | ||
161 | if(!tfm) { | ||
162 | printk(KERN_ERR "swsusp: no tfm, %s\n", modemsg); | ||
163 | error = -EINVAL; | ||
164 | goto out; | ||
165 | } | ||
166 | |||
167 | if(MAXKEY < crypto_tfm_alg_min_keysize(tfm)) { | ||
168 | printk(KERN_ERR "swsusp: key buffer too small, %s\n", modemsg); | ||
169 | error = -ENOKEY; | ||
170 | goto fail; | ||
171 | } | ||
172 | |||
173 | if (mode) | ||
174 | get_random_bytes(key_iv, MAXKEY+MAXIV); | ||
175 | |||
176 | len = crypto_tfm_alg_max_keysize(tfm); | ||
177 | if (len > MAXKEY) | ||
178 | len = MAXKEY; | ||
179 | |||
180 | if (crypto_cipher_setkey(tfm, key_iv, len)) { | ||
181 | printk(KERN_ERR "swsusp: key setup failure, %s\n", modemsg); | ||
182 | error = -EKEYREJECTED; | ||
183 | goto fail; | ||
184 | } | ||
185 | |||
186 | len = crypto_tfm_alg_ivsize(tfm); | ||
187 | |||
188 | if (MAXIV < len) { | ||
189 | printk(KERN_ERR "swsusp: iv buffer too small, %s\n", modemsg); | ||
190 | error = -EOVERFLOW; | ||
191 | goto fail; | ||
192 | } | ||
193 | |||
194 | crypto_cipher_set_iv(tfm, key_iv+MAXKEY, len); | ||
195 | |||
196 | *mem=(void *)tfm; | ||
197 | |||
198 | goto out; | ||
199 | |||
200 | fail: crypto_free_tfm(tfm); | ||
201 | out: return error; | ||
202 | } | ||
203 | |||
204 | static __inline__ void crypto_exit(void *mem) | ||
205 | { | ||
206 | crypto_free_tfm((struct crypto_tfm *)mem); | ||
207 | } | ||
208 | |||
209 | static __inline__ int crypto_write(struct pbe *p, void *mem) | ||
210 | { | ||
211 | int error = 0; | ||
212 | struct scatterlist src, dst; | ||
213 | |||
214 | src.page = virt_to_page(p->address); | ||
215 | src.offset = 0; | ||
216 | src.length = PAGE_SIZE; | ||
217 | dst.page = virt_to_page((void *)&swsusp_header); | ||
218 | dst.offset = 0; | ||
219 | dst.length = PAGE_SIZE; | ||
220 | |||
221 | error = crypto_cipher_encrypt((struct crypto_tfm *)mem, &dst, &src, | ||
222 | PAGE_SIZE); | ||
223 | |||
224 | if (!error) | ||
225 | error = write_page((unsigned long)&swsusp_header, | ||
226 | &(p->swap_address)); | ||
227 | return error; | ||
228 | } | ||
229 | |||
230 | static __inline__ int crypto_read(struct pbe *p, void *mem) | ||
231 | { | ||
232 | int error = 0; | ||
233 | struct scatterlist src, dst; | ||
234 | |||
235 | error = bio_read_page(swp_offset(p->swap_address), (void *)p->address); | ||
236 | if (!error) { | ||
237 | src.offset = 0; | ||
238 | src.length = PAGE_SIZE; | ||
239 | dst.offset = 0; | ||
240 | dst.length = PAGE_SIZE; | ||
241 | src.page = dst.page = virt_to_page((void *)p->address); | ||
242 | |||
243 | error = crypto_cipher_decrypt((struct crypto_tfm *)mem, &dst, | ||
244 | &src, PAGE_SIZE); | ||
245 | } | ||
246 | return error; | ||
247 | } | ||
248 | #else | ||
249 | static __inline__ int crypto_init(int mode, void *mem) | ||
250 | { | ||
251 | return 0; | ||
252 | } | ||
253 | |||
254 | static __inline__ void crypto_exit(void *mem) | ||
255 | { | ||
256 | } | ||
257 | |||
258 | static __inline__ int crypto_write(struct pbe *p, void *mem) | ||
259 | { | ||
260 | return write_page(p->address, &(p->swap_address)); | ||
261 | } | ||
262 | |||
263 | static __inline__ int crypto_read(struct pbe *p, void *mem) | ||
264 | { | ||
265 | return bio_read_page(swp_offset(p->swap_address), (void *)p->address); | ||
266 | } | ||
267 | #endif | ||
268 | |||
132 | static int mark_swapfiles(swp_entry_t prev) | 269 | static int mark_swapfiles(swp_entry_t prev) |
133 | { | 270 | { |
134 | int error; | 271 | int error; |
@@ -140,6 +277,7 @@ static int mark_swapfiles(swp_entry_t prev) | |||
140 | !memcmp("SWAPSPACE2",swsusp_header.sig, 10)) { | 277 | !memcmp("SWAPSPACE2",swsusp_header.sig, 10)) { |
141 | memcpy(swsusp_header.orig_sig,swsusp_header.sig, 10); | 278 | memcpy(swsusp_header.orig_sig,swsusp_header.sig, 10); |
142 | memcpy(swsusp_header.sig,SWSUSP_SIG, 10); | 279 | memcpy(swsusp_header.sig,SWSUSP_SIG, 10); |
280 | memcpy(swsusp_header.key_iv, key_iv, MAXKEY+MAXIV); | ||
143 | swsusp_header.swsusp_info = prev; | 281 | swsusp_header.swsusp_info = prev; |
144 | error = rw_swap_page_sync(WRITE, | 282 | error = rw_swap_page_sync(WRITE, |
145 | swp_entry(root_swap, 0), | 283 | swp_entry(root_swap, 0), |
@@ -179,9 +317,9 @@ static int swsusp_swap_check(void) /* This is called before saving image */ | |||
179 | len=strlen(resume_file); | 317 | len=strlen(resume_file); |
180 | root_swap = 0xFFFF; | 318 | root_swap = 0xFFFF; |
181 | 319 | ||
182 | swap_list_lock(); | 320 | spin_lock(&swap_lock); |
183 | for (i=0; i<MAX_SWAPFILES; i++) { | 321 | for (i=0; i<MAX_SWAPFILES; i++) { |
184 | if (swap_info[i].flags == 0) { | 322 | if (!(swap_info[i].flags & SWP_WRITEOK)) { |
185 | swapfile_used[i]=SWAPFILE_UNUSED; | 323 | swapfile_used[i]=SWAPFILE_UNUSED; |
186 | } else { | 324 | } else { |
187 | if (!len) { | 325 | if (!len) { |
@@ -202,7 +340,7 @@ static int swsusp_swap_check(void) /* This is called before saving image */ | |||
202 | } | 340 | } |
203 | } | 341 | } |
204 | } | 342 | } |
205 | swap_list_unlock(); | 343 | spin_unlock(&swap_lock); |
206 | return (root_swap != 0xffff) ? 0 : -ENODEV; | 344 | return (root_swap != 0xffff) ? 0 : -ENODEV; |
207 | } | 345 | } |
208 | 346 | ||
@@ -216,12 +354,12 @@ static void lock_swapdevices(void) | |||
216 | { | 354 | { |
217 | int i; | 355 | int i; |
218 | 356 | ||
219 | swap_list_lock(); | 357 | spin_lock(&swap_lock); |
220 | for (i = 0; i< MAX_SWAPFILES; i++) | 358 | for (i = 0; i< MAX_SWAPFILES; i++) |
221 | if (swapfile_used[i] == SWAPFILE_IGNORED) { | 359 | if (swapfile_used[i] == SWAPFILE_IGNORED) { |
222 | swap_info[i].flags ^= 0xFF; | 360 | swap_info[i].flags ^= SWP_WRITEOK; |
223 | } | 361 | } |
224 | swap_list_unlock(); | 362 | spin_unlock(&swap_lock); |
225 | } | 363 | } |
226 | 364 | ||
227 | /** | 365 | /** |
@@ -286,6 +424,10 @@ static int data_write(void) | |||
286 | int error = 0, i = 0; | 424 | int error = 0, i = 0; |
287 | unsigned int mod = nr_copy_pages / 100; | 425 | unsigned int mod = nr_copy_pages / 100; |
288 | struct pbe *p; | 426 | struct pbe *p; |
427 | void *tfm; | ||
428 | |||
429 | if ((error = crypto_init(1, &tfm))) | ||
430 | return error; | ||
289 | 431 | ||
290 | if (!mod) | 432 | if (!mod) |
291 | mod = 1; | 433 | mod = 1; |
@@ -294,11 +436,14 @@ static int data_write(void) | |||
294 | for_each_pbe (p, pagedir_nosave) { | 436 | for_each_pbe (p, pagedir_nosave) { |
295 | if (!(i%mod)) | 437 | if (!(i%mod)) |
296 | printk( "\b\b\b\b%3d%%", i / mod ); | 438 | printk( "\b\b\b\b%3d%%", i / mod ); |
297 | if ((error = write_page(p->address, &(p->swap_address)))) | 439 | if ((error = crypto_write(p, tfm))) { |
440 | crypto_exit(tfm); | ||
298 | return error; | 441 | return error; |
442 | } | ||
299 | i++; | 443 | i++; |
300 | } | 444 | } |
301 | printk("\b\b\b\bdone\n"); | 445 | printk("\b\b\b\bdone\n"); |
446 | crypto_exit(tfm); | ||
302 | return error; | 447 | return error; |
303 | } | 448 | } |
304 | 449 | ||
@@ -385,7 +530,6 @@ static int write_pagedir(void) | |||
385 | * write_suspend_image - Write entire image and metadata. | 530 | * write_suspend_image - Write entire image and metadata. |
386 | * | 531 | * |
387 | */ | 532 | */ |
388 | |||
389 | static int write_suspend_image(void) | 533 | static int write_suspend_image(void) |
390 | { | 534 | { |
391 | int error; | 535 | int error; |
@@ -400,6 +544,7 @@ static int write_suspend_image(void) | |||
400 | if ((error = close_swap())) | 544 | if ((error = close_swap())) |
401 | goto FreePagedir; | 545 | goto FreePagedir; |
402 | Done: | 546 | Done: |
547 | memset(key_iv, 0, MAXKEY+MAXIV); | ||
403 | return error; | 548 | return error; |
404 | FreePagedir: | 549 | FreePagedir: |
405 | free_pagedir_entries(); | 550 | free_pagedir_entries(); |
@@ -591,18 +736,7 @@ static void copy_data_pages(void) | |||
591 | 736 | ||
592 | static int calc_nr(int nr_copy) | 737 | static int calc_nr(int nr_copy) |
593 | { | 738 | { |
594 | int extra = 0; | 739 | return nr_copy + (nr_copy+PBES_PER_PAGE-2)/(PBES_PER_PAGE-1); |
595 | int mod = !!(nr_copy % PBES_PER_PAGE); | ||
596 | int diff = (nr_copy / PBES_PER_PAGE) + mod; | ||
597 | |||
598 | do { | ||
599 | extra += diff; | ||
600 | nr_copy += diff; | ||
601 | mod = !!(nr_copy % PBES_PER_PAGE); | ||
602 | diff = (nr_copy / PBES_PER_PAGE) + mod - extra; | ||
603 | } while (diff > 0); | ||
604 | |||
605 | return nr_copy; | ||
606 | } | 740 | } |
607 | 741 | ||
608 | /** | 742 | /** |
@@ -886,20 +1020,21 @@ int swsusp_suspend(void) | |||
886 | * at resume time, and evil weirdness ensues. | 1020 | * at resume time, and evil weirdness ensues. |
887 | */ | 1021 | */ |
888 | if ((error = device_power_down(PMSG_FREEZE))) { | 1022 | if ((error = device_power_down(PMSG_FREEZE))) { |
1023 | printk(KERN_ERR "Some devices failed to power down, aborting suspend\n"); | ||
889 | local_irq_enable(); | 1024 | local_irq_enable(); |
890 | return error; | 1025 | return error; |
891 | } | 1026 | } |
892 | 1027 | ||
893 | if ((error = swsusp_swap_check())) { | 1028 | if ((error = swsusp_swap_check())) { |
894 | printk(KERN_ERR "swsusp: FATAL: cannot find swap device, try " | 1029 | printk(KERN_ERR "swsusp: cannot find swap device, try swapon -a.\n"); |
895 | "swapon -a!\n"); | 1030 | device_power_up(); |
896 | local_irq_enable(); | 1031 | local_irq_enable(); |
897 | return error; | 1032 | return error; |
898 | } | 1033 | } |
899 | 1034 | ||
900 | save_processor_state(); | 1035 | save_processor_state(); |
901 | if ((error = swsusp_arch_suspend())) | 1036 | if ((error = swsusp_arch_suspend())) |
902 | printk("Error %d suspending\n", error); | 1037 | printk(KERN_ERR "Error %d suspending\n", error); |
903 | /* Restore control flow magically appears here */ | 1038 | /* Restore control flow magically appears here */ |
904 | restore_processor_state(); | 1039 | restore_processor_state(); |
905 | BUG_ON (nr_copy_pages_check != nr_copy_pages); | 1040 | BUG_ON (nr_copy_pages_check != nr_copy_pages); |
@@ -1179,7 +1314,8 @@ static const char * sanity_check(void) | |||
1179 | if (strcmp(swsusp_info.uts.machine,system_utsname.machine)) | 1314 | if (strcmp(swsusp_info.uts.machine,system_utsname.machine)) |
1180 | return "machine"; | 1315 | return "machine"; |
1181 | #if 0 | 1316 | #if 0 |
1182 | if(swsusp_info.cpus != num_online_cpus()) | 1317 | /* We can't use number of online CPUs when we use hotplug to remove them ;-))) */ |
1318 | if (swsusp_info.cpus != num_possible_cpus()) | ||
1183 | return "number of cpus"; | 1319 | return "number of cpus"; |
1184 | #endif | 1320 | #endif |
1185 | return NULL; | 1321 | return NULL; |
@@ -1212,13 +1348,14 @@ static int check_sig(void) | |||
1212 | return error; | 1348 | return error; |
1213 | if (!memcmp(SWSUSP_SIG, swsusp_header.sig, 10)) { | 1349 | if (!memcmp(SWSUSP_SIG, swsusp_header.sig, 10)) { |
1214 | memcpy(swsusp_header.sig, swsusp_header.orig_sig, 10); | 1350 | memcpy(swsusp_header.sig, swsusp_header.orig_sig, 10); |
1351 | memcpy(key_iv, swsusp_header.key_iv, MAXKEY+MAXIV); | ||
1352 | memset(swsusp_header.key_iv, 0, MAXKEY+MAXIV); | ||
1215 | 1353 | ||
1216 | /* | 1354 | /* |
1217 | * Reset swap signature now. | 1355 | * Reset swap signature now. |
1218 | */ | 1356 | */ |
1219 | error = bio_write_page(0, &swsusp_header); | 1357 | error = bio_write_page(0, &swsusp_header); |
1220 | } else { | 1358 | } else { |
1221 | printk(KERN_ERR "swsusp: Suspend partition has wrong signature?\n"); | ||
1222 | return -EINVAL; | 1359 | return -EINVAL; |
1223 | } | 1360 | } |
1224 | if (!error) | 1361 | if (!error) |
@@ -1239,6 +1376,10 @@ static int data_read(struct pbe *pblist) | |||
1239 | int error = 0; | 1376 | int error = 0; |
1240 | int i = 0; | 1377 | int i = 0; |
1241 | int mod = swsusp_info.image_pages / 100; | 1378 | int mod = swsusp_info.image_pages / 100; |
1379 | void *tfm; | ||
1380 | |||
1381 | if ((error = crypto_init(0, &tfm))) | ||
1382 | return error; | ||
1242 | 1383 | ||
1243 | if (!mod) | 1384 | if (!mod) |
1244 | mod = 1; | 1385 | mod = 1; |
@@ -1250,14 +1391,15 @@ static int data_read(struct pbe *pblist) | |||
1250 | if (!(i % mod)) | 1391 | if (!(i % mod)) |
1251 | printk("\b\b\b\b%3d%%", i / mod); | 1392 | printk("\b\b\b\b%3d%%", i / mod); |
1252 | 1393 | ||
1253 | error = bio_read_page(swp_offset(p->swap_address), | 1394 | if ((error = crypto_read(p, tfm))) { |
1254 | (void *)p->address); | 1395 | crypto_exit(tfm); |
1255 | if (error) | ||
1256 | return error; | 1396 | return error; |
1397 | } | ||
1257 | 1398 | ||
1258 | i++; | 1399 | i++; |
1259 | } | 1400 | } |
1260 | printk("\b\b\b\bdone\n"); | 1401 | printk("\b\b\b\bdone\n"); |
1402 | crypto_exit(tfm); | ||
1261 | return error; | 1403 | return error; |
1262 | } | 1404 | } |
1263 | 1405 | ||
@@ -1385,6 +1527,7 @@ int swsusp_read(void) | |||
1385 | 1527 | ||
1386 | error = read_suspend_image(); | 1528 | error = read_suspend_image(); |
1387 | blkdev_put(resume_bdev); | 1529 | blkdev_put(resume_bdev); |
1530 | memset(key_iv, 0, MAXKEY+MAXIV); | ||
1388 | 1531 | ||
1389 | if (!error) | 1532 | if (!error) |
1390 | pr_debug("swsusp: Reading resume file was successful\n"); | 1533 | pr_debug("swsusp: Reading resume file was successful\n"); |
diff --git a/lib/Makefile b/lib/Makefile index 52f83380f704..3e2bd0df23bb 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -18,6 +18,7 @@ endif | |||
18 | 18 | ||
19 | lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o | 19 | lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o |
20 | lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o | 20 | lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o |
21 | lib-$(CONFIG_SEMAPHORE_SLEEPERS) += semaphore-sleepers.o | ||
21 | lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o | 22 | lib-$(CONFIG_GENERIC_FIND_NEXT_BIT) += find_next_bit.o |
22 | obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o | 23 | obj-$(CONFIG_LOCK_KERNEL) += kernel_lock.o |
23 | obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o | 24 | obj-$(CONFIG_DEBUG_PREEMPT) += smp_processor_id.o |
diff --git a/arch/x86_64/kernel/semaphore.c b/lib/semaphore-sleepers.c index 48f7c18172b9..4d5f18889fa5 100644 --- a/arch/x86_64/kernel/semaphore.c +++ b/lib/semaphore-sleepers.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * x86_64 semaphore implementation. | 2 | * i386 and x86-64 semaphore implementation. |
3 | * | 3 | * |
4 | * (C) Copyright 1999 Linus Torvalds | 4 | * (C) Copyright 1999 Linus Torvalds |
5 | * | 5 | * |
@@ -14,9 +14,8 @@ | |||
14 | */ | 14 | */ |
15 | #include <linux/config.h> | 15 | #include <linux/config.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/err.h> | ||
17 | #include <linux/init.h> | 18 | #include <linux/init.h> |
18 | #include <asm/errno.h> | ||
19 | |||
20 | #include <asm/semaphore.h> | 19 | #include <asm/semaphore.h> |
21 | 20 | ||
22 | /* | 21 | /* |
@@ -50,12 +49,12 @@ | |||
50 | * we cannot lose wakeup events. | 49 | * we cannot lose wakeup events. |
51 | */ | 50 | */ |
52 | 51 | ||
53 | void __up(struct semaphore *sem) | 52 | fastcall void __up(struct semaphore *sem) |
54 | { | 53 | { |
55 | wake_up(&sem->wait); | 54 | wake_up(&sem->wait); |
56 | } | 55 | } |
57 | 56 | ||
58 | void __sched __down(struct semaphore * sem) | 57 | fastcall void __sched __down(struct semaphore * sem) |
59 | { | 58 | { |
60 | struct task_struct *tsk = current; | 59 | struct task_struct *tsk = current; |
61 | DECLARE_WAITQUEUE(wait, tsk); | 60 | DECLARE_WAITQUEUE(wait, tsk); |
@@ -92,7 +91,7 @@ void __sched __down(struct semaphore * sem) | |||
92 | tsk->state = TASK_RUNNING; | 91 | tsk->state = TASK_RUNNING; |
93 | } | 92 | } |
94 | 93 | ||
95 | int __sched __down_interruptible(struct semaphore * sem) | 94 | fastcall int __sched __down_interruptible(struct semaphore * sem) |
96 | { | 95 | { |
97 | int retval = 0; | 96 | int retval = 0; |
98 | struct task_struct *tsk = current; | 97 | struct task_struct *tsk = current; |
@@ -155,7 +154,7 @@ int __sched __down_interruptible(struct semaphore * sem) | |||
155 | * single "cmpxchg" without failure cases, | 154 | * single "cmpxchg" without failure cases, |
156 | * but then it wouldn't work on a 386. | 155 | * but then it wouldn't work on a 386. |
157 | */ | 156 | */ |
158 | int __down_trylock(struct semaphore * sem) | 157 | fastcall int __down_trylock(struct semaphore * sem) |
159 | { | 158 | { |
160 | int sleepers; | 159 | int sleepers; |
161 | unsigned long flags; | 160 | unsigned long flags; |
@@ -176,5 +175,3 @@ int __down_trylock(struct semaphore * sem) | |||
176 | spin_unlock_irqrestore(&sem->wait.lock, flags); | 175 | spin_unlock_irqrestore(&sem->wait.lock, flags); |
177 | return 1; | 176 | return 1; |
178 | } | 177 | } |
179 | |||
180 | |||
diff --git a/mm/Kconfig b/mm/Kconfig index cd379936cac6..4e9937ac3529 100644 --- a/mm/Kconfig +++ b/mm/Kconfig | |||
@@ -89,3 +89,25 @@ config NEED_MULTIPLE_NODES | |||
89 | config HAVE_MEMORY_PRESENT | 89 | config HAVE_MEMORY_PRESENT |
90 | def_bool y | 90 | def_bool y |
91 | depends on ARCH_HAVE_MEMORY_PRESENT || SPARSEMEM | 91 | depends on ARCH_HAVE_MEMORY_PRESENT || SPARSEMEM |
92 | |||
93 | # | ||
94 | # SPARSEMEM_EXTREME (which is the default) does some bootmem | ||
95 | # allocations when memory_present() is called. If this can not | ||
96 | # be done on your architecture, select this option. However, | ||
97 | # statically allocating the mem_section[] array can potentially | ||
98 | # consume vast quantities of .bss, so be careful. | ||
99 | # | ||
100 | # This option will also potentially produce smaller runtime code | ||
101 | # with gcc 3.4 and later. | ||
102 | # | ||
103 | config SPARSEMEM_STATIC | ||
104 | def_bool n | ||
105 | |||
106 | # | ||
107 | # Architectecture platforms which require a two level mem_section in SPARSEMEM | ||
108 | # must select this option. This is usually for architecture platforms with | ||
109 | # an extremely sparse physical address space. | ||
110 | # | ||
111 | config SPARSEMEM_EXTREME | ||
112 | def_bool y | ||
113 | depends on SPARSEMEM && !SPARSEMEM_STATIC | ||
diff --git a/mm/filemap.c b/mm/filemap.c index c11418dd94e8..88611928e71f 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -54,9 +54,8 @@ | |||
54 | * | 54 | * |
55 | * ->i_mmap_lock (vmtruncate) | 55 | * ->i_mmap_lock (vmtruncate) |
56 | * ->private_lock (__free_pte->__set_page_dirty_buffers) | 56 | * ->private_lock (__free_pte->__set_page_dirty_buffers) |
57 | * ->swap_list_lock | 57 | * ->swap_lock (exclusive_swap_page, others) |
58 | * ->swap_device_lock (exclusive_swap_page, others) | 58 | * ->mapping->tree_lock |
59 | * ->mapping->tree_lock | ||
60 | * | 59 | * |
61 | * ->i_sem | 60 | * ->i_sem |
62 | * ->i_mmap_lock (truncate->unmap_mapping_range) | 61 | * ->i_mmap_lock (truncate->unmap_mapping_range) |
@@ -86,7 +85,7 @@ | |||
86 | * ->page_table_lock (anon_vma_prepare and various) | 85 | * ->page_table_lock (anon_vma_prepare and various) |
87 | * | 86 | * |
88 | * ->page_table_lock | 87 | * ->page_table_lock |
89 | * ->swap_device_lock (try_to_unmap_one) | 88 | * ->swap_lock (try_to_unmap_one) |
90 | * ->private_lock (try_to_unmap_one) | 89 | * ->private_lock (try_to_unmap_one) |
91 | * ->tree_lock (try_to_unmap_one) | 90 | * ->tree_lock (try_to_unmap_one) |
92 | * ->zone.lru_lock (follow_page->mark_page_accessed) | 91 | * ->zone.lru_lock (follow_page->mark_page_accessed) |
@@ -1505,8 +1504,12 @@ repeat: | |||
1505 | return -EINVAL; | 1504 | return -EINVAL; |
1506 | 1505 | ||
1507 | page = filemap_getpage(file, pgoff, nonblock); | 1506 | page = filemap_getpage(file, pgoff, nonblock); |
1507 | |||
1508 | /* XXX: This is wrong, a filesystem I/O error may have happened. Fix that as | ||
1509 | * done in shmem_populate calling shmem_getpage */ | ||
1508 | if (!page && !nonblock) | 1510 | if (!page && !nonblock) |
1509 | return -ENOMEM; | 1511 | return -ENOMEM; |
1512 | |||
1510 | if (page) { | 1513 | if (page) { |
1511 | err = install_page(mm, vma, addr, page, prot); | 1514 | err = install_page(mm, vma, addr, page, prot); |
1512 | if (err) { | 1515 | if (err) { |
@@ -1514,6 +1517,9 @@ repeat: | |||
1514 | return err; | 1517 | return err; |
1515 | } | 1518 | } |
1516 | } else { | 1519 | } else { |
1520 | /* No page was found just because we can't read it in now (being | ||
1521 | * here implies nonblock != 0), but the page may exist, so set | ||
1522 | * the PTE to fault it in later. */ | ||
1517 | err = install_file_pte(mm, vma, addr, pgoff, prot); | 1523 | err = install_file_pte(mm, vma, addr, pgoff, prot); |
1518 | if (err) | 1524 | if (err) |
1519 | return err; | 1525 | return err; |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 6bf720bc662c..901ac523a1c3 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -360,8 +360,6 @@ int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma) | |||
360 | ret = -ENOMEM; | 360 | ret = -ENOMEM; |
361 | goto out; | 361 | goto out; |
362 | } | 362 | } |
363 | if (! pte_none(*pte)) | ||
364 | hugetlb_clean_stale_pgtable(pte); | ||
365 | 363 | ||
366 | idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) | 364 | idx = ((addr - vma->vm_start) >> HPAGE_SHIFT) |
367 | + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); | 365 | + (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT)); |
diff --git a/mm/madvise.c b/mm/madvise.c index c8c01a12fea4..4454936f87d1 100644 --- a/mm/madvise.c +++ b/mm/madvise.c | |||
@@ -37,7 +37,7 @@ static long madvise_behavior(struct vm_area_struct * vma, | |||
37 | 37 | ||
38 | if (new_flags == vma->vm_flags) { | 38 | if (new_flags == vma->vm_flags) { |
39 | *prev = vma; | 39 | *prev = vma; |
40 | goto success; | 40 | goto out; |
41 | } | 41 | } |
42 | 42 | ||
43 | pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT); | 43 | pgoff = vma->vm_pgoff + ((start - vma->vm_start) >> PAGE_SHIFT); |
@@ -62,6 +62,7 @@ static long madvise_behavior(struct vm_area_struct * vma, | |||
62 | goto out; | 62 | goto out; |
63 | } | 63 | } |
64 | 64 | ||
65 | success: | ||
65 | /* | 66 | /* |
66 | * vm_flags is protected by the mmap_sem held in write mode. | 67 | * vm_flags is protected by the mmap_sem held in write mode. |
67 | */ | 68 | */ |
@@ -70,7 +71,6 @@ static long madvise_behavior(struct vm_area_struct * vma, | |||
70 | out: | 71 | out: |
71 | if (error == -ENOMEM) | 72 | if (error == -ENOMEM) |
72 | error = -EAGAIN; | 73 | error = -EAGAIN; |
73 | success: | ||
74 | return error; | 74 | return error; |
75 | } | 75 | } |
76 | 76 | ||
@@ -237,8 +237,9 @@ asmlinkage long sys_madvise(unsigned long start, size_t len_in, int behavior) | |||
237 | * - different from the way of handling in mlock etc. | 237 | * - different from the way of handling in mlock etc. |
238 | */ | 238 | */ |
239 | vma = find_vma_prev(current->mm, start, &prev); | 239 | vma = find_vma_prev(current->mm, start, &prev); |
240 | if (!vma && prev) | 240 | if (vma && start > vma->vm_start) |
241 | vma = prev->vm_next; | 241 | prev = vma; |
242 | |||
242 | for (;;) { | 243 | for (;;) { |
243 | /* Still start < end. */ | 244 | /* Still start < end. */ |
244 | error = -ENOMEM; | 245 | error = -ENOMEM; |
diff --git a/mm/memory.c b/mm/memory.c index a596c1172248..788a62810340 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -562,7 +562,8 @@ static void zap_pte_range(struct mmu_gather *tlb, pmd_t *pmd, | |||
562 | page->index > details->last_index)) | 562 | page->index > details->last_index)) |
563 | continue; | 563 | continue; |
564 | } | 564 | } |
565 | ptent = ptep_get_and_clear(tlb->mm, addr, pte); | 565 | ptent = ptep_get_and_clear_full(tlb->mm, addr, pte, |
566 | tlb->fullmm); | ||
566 | tlb_remove_tlb_entry(tlb, pte, addr); | 567 | tlb_remove_tlb_entry(tlb, pte, addr); |
567 | if (unlikely(!page)) | 568 | if (unlikely(!page)) |
568 | continue; | 569 | continue; |
@@ -590,7 +591,7 @@ static void zap_pte_range(struct mmu_gather *tlb, pmd_t *pmd, | |||
590 | continue; | 591 | continue; |
591 | if (!pte_file(ptent)) | 592 | if (!pte_file(ptent)) |
592 | free_swap_and_cache(pte_to_swp_entry(ptent)); | 593 | free_swap_and_cache(pte_to_swp_entry(ptent)); |
593 | pte_clear(tlb->mm, addr, pte); | 594 | pte_clear_full(tlb->mm, addr, pte, tlb->fullmm); |
594 | } while (pte++, addr += PAGE_SIZE, addr != end); | 595 | } while (pte++, addr += PAGE_SIZE, addr != end); |
595 | pte_unmap(pte - 1); | 596 | pte_unmap(pte - 1); |
596 | } | 597 | } |
@@ -1955,7 +1956,7 @@ static int do_file_page(struct mm_struct * mm, struct vm_area_struct * vma, | |||
1955 | * Fall back to the linear mapping if the fs does not support | 1956 | * Fall back to the linear mapping if the fs does not support |
1956 | * ->populate: | 1957 | * ->populate: |
1957 | */ | 1958 | */ |
1958 | if (!vma->vm_ops || !vma->vm_ops->populate || | 1959 | if (!vma->vm_ops->populate || |
1959 | (write_access && !(vma->vm_flags & VM_SHARED))) { | 1960 | (write_access && !(vma->vm_flags & VM_SHARED))) { |
1960 | pte_clear(mm, address, pte); | 1961 | pte_clear(mm, address, pte); |
1961 | return do_no_page(mm, vma, address, write_access, pte, pmd); | 1962 | return do_no_page(mm, vma, address, write_access, pte, pmd); |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index b4eababc8198..13492d66b7c8 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -664,10 +664,10 @@ asmlinkage long compat_sys_mbind(compat_ulong_t start, compat_ulong_t len, | |||
664 | #endif | 664 | #endif |
665 | 665 | ||
666 | /* Return effective policy for a VMA */ | 666 | /* Return effective policy for a VMA */ |
667 | static struct mempolicy * | 667 | struct mempolicy * |
668 | get_vma_policy(struct vm_area_struct *vma, unsigned long addr) | 668 | get_vma_policy(struct task_struct *task, struct vm_area_struct *vma, unsigned long addr) |
669 | { | 669 | { |
670 | struct mempolicy *pol = current->mempolicy; | 670 | struct mempolicy *pol = task->mempolicy; |
671 | 671 | ||
672 | if (vma) { | 672 | if (vma) { |
673 | if (vma->vm_ops && vma->vm_ops->get_policy) | 673 | if (vma->vm_ops && vma->vm_ops->get_policy) |
@@ -786,7 +786,7 @@ static struct page *alloc_page_interleave(unsigned int __nocast gfp, unsigned or | |||
786 | struct page * | 786 | struct page * |
787 | alloc_page_vma(unsigned int __nocast gfp, struct vm_area_struct *vma, unsigned long addr) | 787 | alloc_page_vma(unsigned int __nocast gfp, struct vm_area_struct *vma, unsigned long addr) |
788 | { | 788 | { |
789 | struct mempolicy *pol = get_vma_policy(vma, addr); | 789 | struct mempolicy *pol = get_vma_policy(current, vma, addr); |
790 | 790 | ||
791 | cpuset_update_current_mems_allowed(); | 791 | cpuset_update_current_mems_allowed(); |
792 | 792 | ||
@@ -908,7 +908,7 @@ void __mpol_free(struct mempolicy *p) | |||
908 | /* Find first node suitable for an allocation */ | 908 | /* Find first node suitable for an allocation */ |
909 | int mpol_first_node(struct vm_area_struct *vma, unsigned long addr) | 909 | int mpol_first_node(struct vm_area_struct *vma, unsigned long addr) |
910 | { | 910 | { |
911 | struct mempolicy *pol = get_vma_policy(vma, addr); | 911 | struct mempolicy *pol = get_vma_policy(current, vma, addr); |
912 | 912 | ||
913 | switch (pol->policy) { | 913 | switch (pol->policy) { |
914 | case MPOL_DEFAULT: | 914 | case MPOL_DEFAULT: |
@@ -928,7 +928,7 @@ int mpol_first_node(struct vm_area_struct *vma, unsigned long addr) | |||
928 | /* Find secondary valid nodes for an allocation */ | 928 | /* Find secondary valid nodes for an allocation */ |
929 | int mpol_node_valid(int nid, struct vm_area_struct *vma, unsigned long addr) | 929 | int mpol_node_valid(int nid, struct vm_area_struct *vma, unsigned long addr) |
930 | { | 930 | { |
931 | struct mempolicy *pol = get_vma_policy(vma, addr); | 931 | struct mempolicy *pol = get_vma_policy(current, vma, addr); |
932 | 932 | ||
933 | switch (pol->policy) { | 933 | switch (pol->policy) { |
934 | case MPOL_PREFERRED: | 934 | case MPOL_PREFERRED: |
diff --git a/mm/mremap.c b/mm/mremap.c index fc45dc9a617b..a32fed454bd7 100644 --- a/mm/mremap.c +++ b/mm/mremap.c | |||
@@ -141,6 +141,10 @@ move_one_page(struct vm_area_struct *vma, unsigned long old_addr, | |||
141 | if (dst) { | 141 | if (dst) { |
142 | pte_t pte; | 142 | pte_t pte; |
143 | pte = ptep_clear_flush(vma, old_addr, src); | 143 | pte = ptep_clear_flush(vma, old_addr, src); |
144 | /* ZERO_PAGE can be dependant on virtual addr */ | ||
145 | if (pfn_valid(pte_pfn(pte)) && | ||
146 | pte_page(pte) == ZERO_PAGE(old_addr)) | ||
147 | pte = pte_wrprotect(mk_pte(ZERO_PAGE(new_addr), new_vma->vm_page_prot)); | ||
144 | set_pte_at(mm, new_addr, dst, pte); | 148 | set_pte_at(mm, new_addr, dst, pte); |
145 | } else | 149 | } else |
146 | error = -ENOMEM; | 150 | error = -ENOMEM; |
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 8d088371196a..b06a9636d971 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -329,7 +329,7 @@ static inline void free_pages_check(const char *function, struct page *page) | |||
329 | 1 << PG_writeback ))) | 329 | 1 << PG_writeback ))) |
330 | bad_page(function, page); | 330 | bad_page(function, page); |
331 | if (PageDirty(page)) | 331 | if (PageDirty(page)) |
332 | ClearPageDirty(page); | 332 | __ClearPageDirty(page); |
333 | } | 333 | } |
334 | 334 | ||
335 | /* | 335 | /* |
@@ -1130,19 +1130,20 @@ EXPORT_SYMBOL(nr_pagecache); | |||
1130 | DEFINE_PER_CPU(long, nr_pagecache_local) = 0; | 1130 | DEFINE_PER_CPU(long, nr_pagecache_local) = 0; |
1131 | #endif | 1131 | #endif |
1132 | 1132 | ||
1133 | void __get_page_state(struct page_state *ret, int nr) | 1133 | void __get_page_state(struct page_state *ret, int nr, cpumask_t *cpumask) |
1134 | { | 1134 | { |
1135 | int cpu = 0; | 1135 | int cpu = 0; |
1136 | 1136 | ||
1137 | memset(ret, 0, sizeof(*ret)); | 1137 | memset(ret, 0, sizeof(*ret)); |
1138 | cpus_and(*cpumask, *cpumask, cpu_online_map); | ||
1138 | 1139 | ||
1139 | cpu = first_cpu(cpu_online_map); | 1140 | cpu = first_cpu(*cpumask); |
1140 | while (cpu < NR_CPUS) { | 1141 | while (cpu < NR_CPUS) { |
1141 | unsigned long *in, *out, off; | 1142 | unsigned long *in, *out, off; |
1142 | 1143 | ||
1143 | in = (unsigned long *)&per_cpu(page_states, cpu); | 1144 | in = (unsigned long *)&per_cpu(page_states, cpu); |
1144 | 1145 | ||
1145 | cpu = next_cpu(cpu, cpu_online_map); | 1146 | cpu = next_cpu(cpu, *cpumask); |
1146 | 1147 | ||
1147 | if (cpu < NR_CPUS) | 1148 | if (cpu < NR_CPUS) |
1148 | prefetch(&per_cpu(page_states, cpu)); | 1149 | prefetch(&per_cpu(page_states, cpu)); |
@@ -1153,19 +1154,33 @@ void __get_page_state(struct page_state *ret, int nr) | |||
1153 | } | 1154 | } |
1154 | } | 1155 | } |
1155 | 1156 | ||
1157 | void get_page_state_node(struct page_state *ret, int node) | ||
1158 | { | ||
1159 | int nr; | ||
1160 | cpumask_t mask = node_to_cpumask(node); | ||
1161 | |||
1162 | nr = offsetof(struct page_state, GET_PAGE_STATE_LAST); | ||
1163 | nr /= sizeof(unsigned long); | ||
1164 | |||
1165 | __get_page_state(ret, nr+1, &mask); | ||
1166 | } | ||
1167 | |||
1156 | void get_page_state(struct page_state *ret) | 1168 | void get_page_state(struct page_state *ret) |
1157 | { | 1169 | { |
1158 | int nr; | 1170 | int nr; |
1171 | cpumask_t mask = CPU_MASK_ALL; | ||
1159 | 1172 | ||
1160 | nr = offsetof(struct page_state, GET_PAGE_STATE_LAST); | 1173 | nr = offsetof(struct page_state, GET_PAGE_STATE_LAST); |
1161 | nr /= sizeof(unsigned long); | 1174 | nr /= sizeof(unsigned long); |
1162 | 1175 | ||
1163 | __get_page_state(ret, nr + 1); | 1176 | __get_page_state(ret, nr + 1, &mask); |
1164 | } | 1177 | } |
1165 | 1178 | ||
1166 | void get_full_page_state(struct page_state *ret) | 1179 | void get_full_page_state(struct page_state *ret) |
1167 | { | 1180 | { |
1168 | __get_page_state(ret, sizeof(*ret) / sizeof(unsigned long)); | 1181 | cpumask_t mask = CPU_MASK_ALL; |
1182 | |||
1183 | __get_page_state(ret, sizeof(*ret) / sizeof(unsigned long), &mask); | ||
1169 | } | 1184 | } |
1170 | 1185 | ||
1171 | unsigned long __read_page_state(unsigned long offset) | 1186 | unsigned long __read_page_state(unsigned long offset) |
@@ -1909,7 +1924,7 @@ static void __init free_area_init_core(struct pglist_data *pgdat, | |||
1909 | zone->nr_scan_inactive = 0; | 1924 | zone->nr_scan_inactive = 0; |
1910 | zone->nr_active = 0; | 1925 | zone->nr_active = 0; |
1911 | zone->nr_inactive = 0; | 1926 | zone->nr_inactive = 0; |
1912 | atomic_set(&zone->reclaim_in_progress, -1); | 1927 | atomic_set(&zone->reclaim_in_progress, 0); |
1913 | if (!size) | 1928 | if (!size) |
1914 | continue; | 1929 | continue; |
1915 | 1930 | ||
@@ -34,9 +34,8 @@ | |||
34 | * anon_vma->lock | 34 | * anon_vma->lock |
35 | * mm->page_table_lock | 35 | * mm->page_table_lock |
36 | * zone->lru_lock (in mark_page_accessed) | 36 | * zone->lru_lock (in mark_page_accessed) |
37 | * swap_list_lock (in swap_free etc's swap_info_get) | 37 | * swap_lock (in swap_duplicate, swap_info_get) |
38 | * mmlist_lock (in mmput, drain_mmlist and others) | 38 | * mmlist_lock (in mmput, drain_mmlist and others) |
39 | * swap_device_lock (in swap_duplicate, swap_info_get) | ||
40 | * mapping->private_lock (in __set_page_dirty_buffers) | 39 | * mapping->private_lock (in __set_page_dirty_buffers) |
41 | * inode_lock (in set_page_dirty's __mark_inode_dirty) | 40 | * inode_lock (in set_page_dirty's __mark_inode_dirty) |
42 | * sb_lock (within inode_lock in fs/fs-writeback.c) | 41 | * sb_lock (within inode_lock in fs/fs-writeback.c) |
@@ -290,8 +289,6 @@ static int page_referenced_one(struct page *page, | |||
290 | pte_t *pte; | 289 | pte_t *pte; |
291 | int referenced = 0; | 290 | int referenced = 0; |
292 | 291 | ||
293 | if (!get_mm_counter(mm, rss)) | ||
294 | goto out; | ||
295 | address = vma_address(page, vma); | 292 | address = vma_address(page, vma); |
296 | if (address == -EFAULT) | 293 | if (address == -EFAULT) |
297 | goto out; | 294 | goto out; |
@@ -442,22 +439,19 @@ int page_referenced(struct page *page, int is_locked, int ignore_token) | |||
442 | void page_add_anon_rmap(struct page *page, | 439 | void page_add_anon_rmap(struct page *page, |
443 | struct vm_area_struct *vma, unsigned long address) | 440 | struct vm_area_struct *vma, unsigned long address) |
444 | { | 441 | { |
445 | struct anon_vma *anon_vma = vma->anon_vma; | ||
446 | pgoff_t index; | ||
447 | |||
448 | BUG_ON(PageReserved(page)); | 442 | BUG_ON(PageReserved(page)); |
449 | BUG_ON(!anon_vma); | ||
450 | 443 | ||
451 | inc_mm_counter(vma->vm_mm, anon_rss); | 444 | inc_mm_counter(vma->vm_mm, anon_rss); |
452 | 445 | ||
453 | anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON; | ||
454 | index = (address - vma->vm_start) >> PAGE_SHIFT; | ||
455 | index += vma->vm_pgoff; | ||
456 | index >>= PAGE_CACHE_SHIFT - PAGE_SHIFT; | ||
457 | |||
458 | if (atomic_inc_and_test(&page->_mapcount)) { | 446 | if (atomic_inc_and_test(&page->_mapcount)) { |
459 | page->index = index; | 447 | struct anon_vma *anon_vma = vma->anon_vma; |
448 | |||
449 | BUG_ON(!anon_vma); | ||
450 | anon_vma = (void *) anon_vma + PAGE_MAPPING_ANON; | ||
460 | page->mapping = (struct address_space *) anon_vma; | 451 | page->mapping = (struct address_space *) anon_vma; |
452 | |||
453 | page->index = linear_page_index(vma, address); | ||
454 | |||
461 | inc_page_state(nr_mapped); | 455 | inc_page_state(nr_mapped); |
462 | } | 456 | } |
463 | /* else checking page index and mapping is racy */ | 457 | /* else checking page index and mapping is racy */ |
@@ -518,8 +512,6 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma) | |||
518 | pte_t pteval; | 512 | pte_t pteval; |
519 | int ret = SWAP_AGAIN; | 513 | int ret = SWAP_AGAIN; |
520 | 514 | ||
521 | if (!get_mm_counter(mm, rss)) | ||
522 | goto out; | ||
523 | address = vma_address(page, vma); | 515 | address = vma_address(page, vma); |
524 | if (address == -EFAULT) | 516 | if (address == -EFAULT) |
525 | goto out; | 517 | goto out; |
@@ -532,6 +524,8 @@ static int try_to_unmap_one(struct page *page, struct vm_area_struct *vma) | |||
532 | * If the page is mlock()d, we cannot swap it out. | 524 | * If the page is mlock()d, we cannot swap it out. |
533 | * If it's recently referenced (perhaps page_referenced | 525 | * If it's recently referenced (perhaps page_referenced |
534 | * skipped over this mm) then we should reactivate it. | 526 | * skipped over this mm) then we should reactivate it. |
527 | * | ||
528 | * Pages belonging to VM_RESERVED regions should not happen here. | ||
535 | */ | 529 | */ |
536 | if ((vma->vm_flags & (VM_LOCKED|VM_RESERVED)) || | 530 | if ((vma->vm_flags & (VM_LOCKED|VM_RESERVED)) || |
537 | ptep_clear_flush_young(vma, address, pte)) { | 531 | ptep_clear_flush_young(vma, address, pte)) { |
@@ -767,8 +761,7 @@ static int try_to_unmap_file(struct page *page) | |||
767 | if (vma->vm_flags & (VM_LOCKED|VM_RESERVED)) | 761 | if (vma->vm_flags & (VM_LOCKED|VM_RESERVED)) |
768 | continue; | 762 | continue; |
769 | cursor = (unsigned long) vma->vm_private_data; | 763 | cursor = (unsigned long) vma->vm_private_data; |
770 | while (get_mm_counter(vma->vm_mm, rss) && | 764 | while ( cursor < max_nl_cursor && |
771 | cursor < max_nl_cursor && | ||
772 | cursor < vma->vm_end - vma->vm_start) { | 765 | cursor < vma->vm_end - vma->vm_start) { |
773 | try_to_unmap_cluster(cursor, &mapcount, vma); | 766 | try_to_unmap_cluster(cursor, &mapcount, vma); |
774 | cursor += CLUSTER_SIZE; | 767 | cursor += CLUSTER_SIZE; |
diff --git a/mm/shmem.c b/mm/shmem.c index 5a81b1ee4f7a..bdc4bbb6ddbb 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #include <linux/swapops.h> | 45 | #include <linux/swapops.h> |
46 | #include <linux/mempolicy.h> | 46 | #include <linux/mempolicy.h> |
47 | #include <linux/namei.h> | 47 | #include <linux/namei.h> |
48 | #include <linux/xattr.h> | ||
49 | #include <asm/uaccess.h> | 48 | #include <asm/uaccess.h> |
50 | #include <asm/div64.h> | 49 | #include <asm/div64.h> |
51 | #include <asm/pgtable.h> | 50 | #include <asm/pgtable.h> |
@@ -179,7 +178,6 @@ static struct address_space_operations shmem_aops; | |||
179 | static struct file_operations shmem_file_operations; | 178 | static struct file_operations shmem_file_operations; |
180 | static struct inode_operations shmem_inode_operations; | 179 | static struct inode_operations shmem_inode_operations; |
181 | static struct inode_operations shmem_dir_inode_operations; | 180 | static struct inode_operations shmem_dir_inode_operations; |
182 | static struct inode_operations shmem_special_inode_operations; | ||
183 | static struct vm_operations_struct shmem_vm_ops; | 181 | static struct vm_operations_struct shmem_vm_ops; |
184 | 182 | ||
185 | static struct backing_dev_info shmem_backing_dev_info = { | 183 | static struct backing_dev_info shmem_backing_dev_info = { |
@@ -1195,6 +1193,7 @@ static int shmem_populate(struct vm_area_struct *vma, | |||
1195 | err = shmem_getpage(inode, pgoff, &page, sgp, NULL); | 1193 | err = shmem_getpage(inode, pgoff, &page, sgp, NULL); |
1196 | if (err) | 1194 | if (err) |
1197 | return err; | 1195 | return err; |
1196 | /* Page may still be null, but only if nonblock was set. */ | ||
1198 | if (page) { | 1197 | if (page) { |
1199 | mark_page_accessed(page); | 1198 | mark_page_accessed(page); |
1200 | err = install_page(mm, vma, addr, page, prot); | 1199 | err = install_page(mm, vma, addr, page, prot); |
@@ -1202,7 +1201,10 @@ static int shmem_populate(struct vm_area_struct *vma, | |||
1202 | page_cache_release(page); | 1201 | page_cache_release(page); |
1203 | return err; | 1202 | return err; |
1204 | } | 1203 | } |
1205 | } else if (nonblock) { | 1204 | } else { |
1205 | /* No page was found just because we can't read it in | ||
1206 | * now (being here implies nonblock != 0), but the page | ||
1207 | * may exist, so set the PTE to fault it in later. */ | ||
1206 | err = install_file_pte(mm, vma, addr, pgoff, prot); | 1208 | err = install_file_pte(mm, vma, addr, pgoff, prot); |
1207 | if (err) | 1209 | if (err) |
1208 | return err; | 1210 | return err; |
@@ -1296,7 +1298,6 @@ shmem_get_inode(struct super_block *sb, int mode, dev_t dev) | |||
1296 | 1298 | ||
1297 | switch (mode & S_IFMT) { | 1299 | switch (mode & S_IFMT) { |
1298 | default: | 1300 | default: |
1299 | inode->i_op = &shmem_special_inode_operations; | ||
1300 | init_special_inode(inode, mode, dev); | 1301 | init_special_inode(inode, mode, dev); |
1301 | break; | 1302 | break; |
1302 | case S_IFREG: | 1303 | case S_IFREG: |
@@ -1800,12 +1801,6 @@ static void shmem_put_link(struct dentry *dentry, struct nameidata *nd, void *co | |||
1800 | static struct inode_operations shmem_symlink_inline_operations = { | 1801 | static struct inode_operations shmem_symlink_inline_operations = { |
1801 | .readlink = generic_readlink, | 1802 | .readlink = generic_readlink, |
1802 | .follow_link = shmem_follow_link_inline, | 1803 | .follow_link = shmem_follow_link_inline, |
1803 | #ifdef CONFIG_TMPFS_XATTR | ||
1804 | .setxattr = generic_setxattr, | ||
1805 | .getxattr = generic_getxattr, | ||
1806 | .listxattr = generic_listxattr, | ||
1807 | .removexattr = generic_removexattr, | ||
1808 | #endif | ||
1809 | }; | 1804 | }; |
1810 | 1805 | ||
1811 | static struct inode_operations shmem_symlink_inode_operations = { | 1806 | static struct inode_operations shmem_symlink_inode_operations = { |
@@ -1813,12 +1808,6 @@ static struct inode_operations shmem_symlink_inode_operations = { | |||
1813 | .readlink = generic_readlink, | 1808 | .readlink = generic_readlink, |
1814 | .follow_link = shmem_follow_link, | 1809 | .follow_link = shmem_follow_link, |
1815 | .put_link = shmem_put_link, | 1810 | .put_link = shmem_put_link, |
1816 | #ifdef CONFIG_TMPFS_XATTR | ||
1817 | .setxattr = generic_setxattr, | ||
1818 | .getxattr = generic_getxattr, | ||
1819 | .listxattr = generic_listxattr, | ||
1820 | .removexattr = generic_removexattr, | ||
1821 | #endif | ||
1822 | }; | 1811 | }; |
1823 | 1812 | ||
1824 | static int shmem_parse_options(char *options, int *mode, uid_t *uid, gid_t *gid, unsigned long *blocks, unsigned long *inodes) | 1813 | static int shmem_parse_options(char *options, int *mode, uid_t *uid, gid_t *gid, unsigned long *blocks, unsigned long *inodes) |
@@ -1938,12 +1927,6 @@ static void shmem_put_super(struct super_block *sb) | |||
1938 | sb->s_fs_info = NULL; | 1927 | sb->s_fs_info = NULL; |
1939 | } | 1928 | } |
1940 | 1929 | ||
1941 | #ifdef CONFIG_TMPFS_XATTR | ||
1942 | static struct xattr_handler *shmem_xattr_handlers[]; | ||
1943 | #else | ||
1944 | #define shmem_xattr_handlers NULL | ||
1945 | #endif | ||
1946 | |||
1947 | static int shmem_fill_super(struct super_block *sb, | 1930 | static int shmem_fill_super(struct super_block *sb, |
1948 | void *data, int silent) | 1931 | void *data, int silent) |
1949 | { | 1932 | { |
@@ -1994,7 +1977,6 @@ static int shmem_fill_super(struct super_block *sb, | |||
1994 | sb->s_blocksize_bits = PAGE_CACHE_SHIFT; | 1977 | sb->s_blocksize_bits = PAGE_CACHE_SHIFT; |
1995 | sb->s_magic = TMPFS_MAGIC; | 1978 | sb->s_magic = TMPFS_MAGIC; |
1996 | sb->s_op = &shmem_ops; | 1979 | sb->s_op = &shmem_ops; |
1997 | sb->s_xattr = shmem_xattr_handlers; | ||
1998 | 1980 | ||
1999 | inode = shmem_get_inode(sb, S_IFDIR | mode, 0); | 1981 | inode = shmem_get_inode(sb, S_IFDIR | mode, 0); |
2000 | if (!inode) | 1982 | if (!inode) |
@@ -2083,12 +2065,6 @@ static struct file_operations shmem_file_operations = { | |||
2083 | static struct inode_operations shmem_inode_operations = { | 2065 | static struct inode_operations shmem_inode_operations = { |
2084 | .truncate = shmem_truncate, | 2066 | .truncate = shmem_truncate, |
2085 | .setattr = shmem_notify_change, | 2067 | .setattr = shmem_notify_change, |
2086 | #ifdef CONFIG_TMPFS_XATTR | ||
2087 | .setxattr = generic_setxattr, | ||
2088 | .getxattr = generic_getxattr, | ||
2089 | .listxattr = generic_listxattr, | ||
2090 | .removexattr = generic_removexattr, | ||
2091 | #endif | ||
2092 | }; | 2068 | }; |
2093 | 2069 | ||
2094 | static struct inode_operations shmem_dir_inode_operations = { | 2070 | static struct inode_operations shmem_dir_inode_operations = { |
@@ -2102,21 +2078,6 @@ static struct inode_operations shmem_dir_inode_operations = { | |||
2102 | .rmdir = shmem_rmdir, | 2078 | .rmdir = shmem_rmdir, |
2103 | .mknod = shmem_mknod, | 2079 | .mknod = shmem_mknod, |
2104 | .rename = shmem_rename, | 2080 | .rename = shmem_rename, |
2105 | #ifdef CONFIG_TMPFS_XATTR | ||
2106 | .setxattr = generic_setxattr, | ||
2107 | .getxattr = generic_getxattr, | ||
2108 | .listxattr = generic_listxattr, | ||
2109 | .removexattr = generic_removexattr, | ||
2110 | #endif | ||
2111 | #endif | ||
2112 | }; | ||
2113 | |||
2114 | static struct inode_operations shmem_special_inode_operations = { | ||
2115 | #ifdef CONFIG_TMPFS_XATTR | ||
2116 | .setxattr = generic_setxattr, | ||
2117 | .getxattr = generic_getxattr, | ||
2118 | .listxattr = generic_listxattr, | ||
2119 | .removexattr = generic_removexattr, | ||
2120 | #endif | 2081 | #endif |
2121 | }; | 2082 | }; |
2122 | 2083 | ||
@@ -2142,48 +2103,6 @@ static struct vm_operations_struct shmem_vm_ops = { | |||
2142 | }; | 2103 | }; |
2143 | 2104 | ||
2144 | 2105 | ||
2145 | #ifdef CONFIG_TMPFS_SECURITY | ||
2146 | |||
2147 | static size_t shmem_xattr_security_list(struct inode *inode, char *list, size_t list_len, | ||
2148 | const char *name, size_t name_len) | ||
2149 | { | ||
2150 | return security_inode_listsecurity(inode, list, list_len); | ||
2151 | } | ||
2152 | |||
2153 | static int shmem_xattr_security_get(struct inode *inode, const char *name, void *buffer, size_t size) | ||
2154 | { | ||
2155 | if (strcmp(name, "") == 0) | ||
2156 | return -EINVAL; | ||
2157 | return security_inode_getsecurity(inode, name, buffer, size); | ||
2158 | } | ||
2159 | |||
2160 | static int shmem_xattr_security_set(struct inode *inode, const char *name, const void *value, size_t size, int flags) | ||
2161 | { | ||
2162 | if (strcmp(name, "") == 0) | ||
2163 | return -EINVAL; | ||
2164 | return security_inode_setsecurity(inode, name, value, size, flags); | ||
2165 | } | ||
2166 | |||
2167 | static struct xattr_handler shmem_xattr_security_handler = { | ||
2168 | .prefix = XATTR_SECURITY_PREFIX, | ||
2169 | .list = shmem_xattr_security_list, | ||
2170 | .get = shmem_xattr_security_get, | ||
2171 | .set = shmem_xattr_security_set, | ||
2172 | }; | ||
2173 | |||
2174 | #endif /* CONFIG_TMPFS_SECURITY */ | ||
2175 | |||
2176 | #ifdef CONFIG_TMPFS_XATTR | ||
2177 | |||
2178 | static struct xattr_handler *shmem_xattr_handlers[] = { | ||
2179 | #ifdef CONFIG_TMPFS_SECURITY | ||
2180 | &shmem_xattr_security_handler, | ||
2181 | #endif | ||
2182 | NULL | ||
2183 | }; | ||
2184 | |||
2185 | #endif /* CONFIG_TMPFS_XATTR */ | ||
2186 | |||
2187 | static struct super_block *shmem_get_sb(struct file_system_type *fs_type, | 2106 | static struct super_block *shmem_get_sb(struct file_system_type *fs_type, |
2188 | int flags, const char *dev_name, void *data) | 2107 | int flags, const char *dev_name, void *data) |
2189 | { | 2108 | { |
@@ -189,6 +189,7 @@ | |||
189 | * is less than 512 (PAGE_SIZE<<3), but greater than 256. | 189 | * is less than 512 (PAGE_SIZE<<3), but greater than 256. |
190 | */ | 190 | */ |
191 | 191 | ||
192 | typedef unsigned int kmem_bufctl_t; | ||
192 | #define BUFCTL_END (((kmem_bufctl_t)(~0U))-0) | 193 | #define BUFCTL_END (((kmem_bufctl_t)(~0U))-0) |
193 | #define BUFCTL_FREE (((kmem_bufctl_t)(~0U))-1) | 194 | #define BUFCTL_FREE (((kmem_bufctl_t)(~0U))-1) |
194 | #define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-2) | 195 | #define SLAB_LIMIT (((kmem_bufctl_t)(~0U))-2) |
@@ -600,7 +601,7 @@ static inline kmem_cache_t *__find_general_cachep(size_t size, | |||
600 | csizep++; | 601 | csizep++; |
601 | 602 | ||
602 | /* | 603 | /* |
603 | * Really subtile: The last entry with cs->cs_size==ULONG_MAX | 604 | * Really subtle: The last entry with cs->cs_size==ULONG_MAX |
604 | * has cs_{dma,}cachep==NULL. Thus no special case | 605 | * has cs_{dma,}cachep==NULL. Thus no special case |
605 | * for large kmalloc calls required. | 606 | * for large kmalloc calls required. |
606 | */ | 607 | */ |
@@ -2165,7 +2166,9 @@ static inline void *__cache_alloc(kmem_cache_t *cachep, unsigned int __nocast fl | |||
2165 | objp = cache_alloc_refill(cachep, flags); | 2166 | objp = cache_alloc_refill(cachep, flags); |
2166 | } | 2167 | } |
2167 | local_irq_restore(save_flags); | 2168 | local_irq_restore(save_flags); |
2168 | objp = cache_alloc_debugcheck_after(cachep, flags, objp, __builtin_return_address(0)); | 2169 | objp = cache_alloc_debugcheck_after(cachep, flags, objp, |
2170 | __builtin_return_address(0)); | ||
2171 | prefetchw(objp); | ||
2169 | return objp; | 2172 | return objp; |
2170 | } | 2173 | } |
2171 | 2174 | ||
@@ -3073,20 +3076,24 @@ ssize_t slabinfo_write(struct file *file, const char __user *buffer, | |||
3073 | } | 3076 | } |
3074 | #endif | 3077 | #endif |
3075 | 3078 | ||
3079 | /** | ||
3080 | * ksize - get the actual amount of memory allocated for a given object | ||
3081 | * @objp: Pointer to the object | ||
3082 | * | ||
3083 | * kmalloc may internally round up allocations and return more memory | ||
3084 | * than requested. ksize() can be used to determine the actual amount of | ||
3085 | * memory allocated. The caller may use this additional memory, even though | ||
3086 | * a smaller amount of memory was initially specified with the kmalloc call. | ||
3087 | * The caller must guarantee that objp points to a valid object previously | ||
3088 | * allocated with either kmalloc() or kmem_cache_alloc(). The object | ||
3089 | * must not be freed during the duration of the call. | ||
3090 | */ | ||
3076 | unsigned int ksize(const void *objp) | 3091 | unsigned int ksize(const void *objp) |
3077 | { | 3092 | { |
3078 | kmem_cache_t *c; | 3093 | if (unlikely(objp == NULL)) |
3079 | unsigned long flags; | 3094 | return 0; |
3080 | unsigned int size = 0; | ||
3081 | |||
3082 | if (likely(objp != NULL)) { | ||
3083 | local_irq_save(flags); | ||
3084 | c = GET_PAGE_CACHE(virt_to_page(objp)); | ||
3085 | size = kmem_cache_size(c); | ||
3086 | local_irq_restore(flags); | ||
3087 | } | ||
3088 | 3095 | ||
3089 | return size; | 3096 | return obj_reallen(GET_PAGE_CACHE(virt_to_page(objp))); |
3090 | } | 3097 | } |
3091 | 3098 | ||
3092 | 3099 | ||
diff --git a/mm/sparse.c b/mm/sparse.c index b54e304df4a7..347249a4917a 100644 --- a/mm/sparse.c +++ b/mm/sparse.c | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/mmzone.h> | 6 | #include <linux/mmzone.h> |
7 | #include <linux/bootmem.h> | 7 | #include <linux/bootmem.h> |
8 | #include <linux/module.h> | 8 | #include <linux/module.h> |
9 | #include <linux/spinlock.h> | ||
9 | #include <asm/dma.h> | 10 | #include <asm/dma.h> |
10 | 11 | ||
11 | /* | 12 | /* |
@@ -13,9 +14,64 @@ | |||
13 | * | 14 | * |
14 | * 1) mem_section - memory sections, mem_map's for valid memory | 15 | * 1) mem_section - memory sections, mem_map's for valid memory |
15 | */ | 16 | */ |
16 | struct mem_section mem_section[NR_MEM_SECTIONS]; | 17 | #ifdef CONFIG_SPARSEMEM_EXTREME |
18 | struct mem_section *mem_section[NR_SECTION_ROOTS] | ||
19 | ____cacheline_maxaligned_in_smp; | ||
20 | #else | ||
21 | struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT] | ||
22 | ____cacheline_maxaligned_in_smp; | ||
23 | #endif | ||
17 | EXPORT_SYMBOL(mem_section); | 24 | EXPORT_SYMBOL(mem_section); |
18 | 25 | ||
26 | #ifdef CONFIG_SPARSEMEM_EXTREME | ||
27 | static struct mem_section *sparse_index_alloc(int nid) | ||
28 | { | ||
29 | struct mem_section *section = NULL; | ||
30 | unsigned long array_size = SECTIONS_PER_ROOT * | ||
31 | sizeof(struct mem_section); | ||
32 | |||
33 | section = alloc_bootmem_node(NODE_DATA(nid), array_size); | ||
34 | |||
35 | if (section) | ||
36 | memset(section, 0, array_size); | ||
37 | |||
38 | return section; | ||
39 | } | ||
40 | |||
41 | static int sparse_index_init(unsigned long section_nr, int nid) | ||
42 | { | ||
43 | static spinlock_t index_init_lock = SPIN_LOCK_UNLOCKED; | ||
44 | unsigned long root = SECTION_NR_TO_ROOT(section_nr); | ||
45 | struct mem_section *section; | ||
46 | int ret = 0; | ||
47 | |||
48 | if (mem_section[root]) | ||
49 | return -EEXIST; | ||
50 | |||
51 | section = sparse_index_alloc(nid); | ||
52 | /* | ||
53 | * This lock keeps two different sections from | ||
54 | * reallocating for the same index | ||
55 | */ | ||
56 | spin_lock(&index_init_lock); | ||
57 | |||
58 | if (mem_section[root]) { | ||
59 | ret = -EEXIST; | ||
60 | goto out; | ||
61 | } | ||
62 | |||
63 | mem_section[root] = section; | ||
64 | out: | ||
65 | spin_unlock(&index_init_lock); | ||
66 | return ret; | ||
67 | } | ||
68 | #else /* !SPARSEMEM_EXTREME */ | ||
69 | static inline int sparse_index_init(unsigned long section_nr, int nid) | ||
70 | { | ||
71 | return 0; | ||
72 | } | ||
73 | #endif | ||
74 | |||
19 | /* Record a memory area against a node. */ | 75 | /* Record a memory area against a node. */ |
20 | void memory_present(int nid, unsigned long start, unsigned long end) | 76 | void memory_present(int nid, unsigned long start, unsigned long end) |
21 | { | 77 | { |
@@ -24,8 +80,13 @@ void memory_present(int nid, unsigned long start, unsigned long end) | |||
24 | start &= PAGE_SECTION_MASK; | 80 | start &= PAGE_SECTION_MASK; |
25 | for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) { | 81 | for (pfn = start; pfn < end; pfn += PAGES_PER_SECTION) { |
26 | unsigned long section = pfn_to_section_nr(pfn); | 82 | unsigned long section = pfn_to_section_nr(pfn); |
27 | if (!mem_section[section].section_mem_map) | 83 | struct mem_section *ms; |
28 | mem_section[section].section_mem_map = SECTION_MARKED_PRESENT; | 84 | |
85 | sparse_index_init(section, nid); | ||
86 | |||
87 | ms = __nr_to_section(section); | ||
88 | if (!ms->section_mem_map) | ||
89 | ms->section_mem_map = SECTION_MARKED_PRESENT; | ||
29 | } | 90 | } |
30 | } | 91 | } |
31 | 92 | ||
@@ -85,6 +146,7 @@ static struct page *sparse_early_mem_map_alloc(unsigned long pnum) | |||
85 | { | 146 | { |
86 | struct page *map; | 147 | struct page *map; |
87 | int nid = early_pfn_to_nid(section_nr_to_pfn(pnum)); | 148 | int nid = early_pfn_to_nid(section_nr_to_pfn(pnum)); |
149 | struct mem_section *ms = __nr_to_section(pnum); | ||
88 | 150 | ||
89 | map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION); | 151 | map = alloc_remap(nid, sizeof(struct page) * PAGES_PER_SECTION); |
90 | if (map) | 152 | if (map) |
@@ -96,7 +158,7 @@ static struct page *sparse_early_mem_map_alloc(unsigned long pnum) | |||
96 | return map; | 158 | return map; |
97 | 159 | ||
98 | printk(KERN_WARNING "%s: allocation failed\n", __FUNCTION__); | 160 | printk(KERN_WARNING "%s: allocation failed\n", __FUNCTION__); |
99 | mem_section[pnum].section_mem_map = 0; | 161 | ms->section_mem_map = 0; |
100 | return NULL; | 162 | return NULL; |
101 | } | 163 | } |
102 | 164 | ||
@@ -114,8 +176,9 @@ void sparse_init(void) | |||
114 | continue; | 176 | continue; |
115 | 177 | ||
116 | map = sparse_early_mem_map_alloc(pnum); | 178 | map = sparse_early_mem_map_alloc(pnum); |
117 | if (map) | 179 | if (!map) |
118 | sparse_init_one_section(&mem_section[pnum], pnum, map); | 180 | continue; |
181 | sparse_init_one_section(__nr_to_section(pnum), pnum, map); | ||
119 | } | 182 | } |
120 | } | 183 | } |
121 | 184 | ||
diff --git a/mm/swap_state.c b/mm/swap_state.c index 4f251775ef90..029e56eb5e77 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c | |||
@@ -124,6 +124,7 @@ void __delete_from_swap_cache(struct page *page) | |||
124 | BUG_ON(!PageLocked(page)); | 124 | BUG_ON(!PageLocked(page)); |
125 | BUG_ON(!PageSwapCache(page)); | 125 | BUG_ON(!PageSwapCache(page)); |
126 | BUG_ON(PageWriteback(page)); | 126 | BUG_ON(PageWriteback(page)); |
127 | BUG_ON(PagePrivate(page)); | ||
127 | 128 | ||
128 | radix_tree_delete(&swapper_space.page_tree, page->private); | 129 | radix_tree_delete(&swapper_space.page_tree, page->private); |
129 | page->private = 0; | 130 | page->private = 0; |
@@ -196,11 +197,6 @@ void delete_from_swap_cache(struct page *page) | |||
196 | { | 197 | { |
197 | swp_entry_t entry; | 198 | swp_entry_t entry; |
198 | 199 | ||
199 | BUG_ON(!PageSwapCache(page)); | ||
200 | BUG_ON(!PageLocked(page)); | ||
201 | BUG_ON(PageWriteback(page)); | ||
202 | BUG_ON(PagePrivate(page)); | ||
203 | |||
204 | entry.val = page->private; | 200 | entry.val = page->private; |
205 | 201 | ||
206 | write_lock_irq(&swapper_space.tree_lock); | 202 | write_lock_irq(&swapper_space.tree_lock); |
diff --git a/mm/swapfile.c b/mm/swapfile.c index 60cd24a55204..4b6e8bf986bc 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <asm/tlbflush.h> | 31 | #include <asm/tlbflush.h> |
32 | #include <linux/swapops.h> | 32 | #include <linux/swapops.h> |
33 | 33 | ||
34 | DEFINE_SPINLOCK(swaplock); | 34 | DEFINE_SPINLOCK(swap_lock); |
35 | unsigned int nr_swapfiles; | 35 | unsigned int nr_swapfiles; |
36 | long total_swap_pages; | 36 | long total_swap_pages; |
37 | static int swap_overflow; | 37 | static int swap_overflow; |
@@ -51,13 +51,11 @@ static DECLARE_MUTEX(swapon_sem); | |||
51 | 51 | ||
52 | /* | 52 | /* |
53 | * We need this because the bdev->unplug_fn can sleep and we cannot | 53 | * We need this because the bdev->unplug_fn can sleep and we cannot |
54 | * hold swap_list_lock while calling the unplug_fn. And swap_list_lock | 54 | * hold swap_lock while calling the unplug_fn. And swap_lock |
55 | * cannot be turned into a semaphore. | 55 | * cannot be turned into a semaphore. |
56 | */ | 56 | */ |
57 | static DECLARE_RWSEM(swap_unplug_sem); | 57 | static DECLARE_RWSEM(swap_unplug_sem); |
58 | 58 | ||
59 | #define SWAPFILE_CLUSTER 256 | ||
60 | |||
61 | void swap_unplug_io_fn(struct backing_dev_info *unused_bdi, struct page *page) | 59 | void swap_unplug_io_fn(struct backing_dev_info *unused_bdi, struct page *page) |
62 | { | 60 | { |
63 | swp_entry_t entry; | 61 | swp_entry_t entry; |
@@ -84,116 +82,135 @@ void swap_unplug_io_fn(struct backing_dev_info *unused_bdi, struct page *page) | |||
84 | up_read(&swap_unplug_sem); | 82 | up_read(&swap_unplug_sem); |
85 | } | 83 | } |
86 | 84 | ||
87 | static inline int scan_swap_map(struct swap_info_struct *si) | 85 | #define SWAPFILE_CLUSTER 256 |
86 | #define LATENCY_LIMIT 256 | ||
87 | |||
88 | static inline unsigned long scan_swap_map(struct swap_info_struct *si) | ||
88 | { | 89 | { |
89 | unsigned long offset; | 90 | unsigned long offset, last_in_cluster; |
91 | int latency_ration = LATENCY_LIMIT; | ||
92 | |||
90 | /* | 93 | /* |
91 | * We try to cluster swap pages by allocating them | 94 | * We try to cluster swap pages by allocating them sequentially |
92 | * sequentially in swap. Once we've allocated | 95 | * in swap. Once we've allocated SWAPFILE_CLUSTER pages this |
93 | * SWAPFILE_CLUSTER pages this way, however, we resort to | 96 | * way, however, we resort to first-free allocation, starting |
94 | * first-free allocation, starting a new cluster. This | 97 | * a new cluster. This prevents us from scattering swap pages |
95 | * prevents us from scattering swap pages all over the entire | 98 | * all over the entire swap partition, so that we reduce |
96 | * swap partition, so that we reduce overall disk seek times | 99 | * overall disk seek times between swap pages. -- sct |
97 | * between swap pages. -- sct */ | 100 | * But we do now try to find an empty cluster. -Andrea |
98 | if (si->cluster_nr) { | 101 | */ |
99 | while (si->cluster_next <= si->highest_bit) { | 102 | |
100 | offset = si->cluster_next++; | 103 | si->flags += SWP_SCANNING; |
104 | if (unlikely(!si->cluster_nr)) { | ||
105 | si->cluster_nr = SWAPFILE_CLUSTER - 1; | ||
106 | if (si->pages - si->inuse_pages < SWAPFILE_CLUSTER) | ||
107 | goto lowest; | ||
108 | spin_unlock(&swap_lock); | ||
109 | |||
110 | offset = si->lowest_bit; | ||
111 | last_in_cluster = offset + SWAPFILE_CLUSTER - 1; | ||
112 | |||
113 | /* Locate the first empty (unaligned) cluster */ | ||
114 | for (; last_in_cluster <= si->highest_bit; offset++) { | ||
101 | if (si->swap_map[offset]) | 115 | if (si->swap_map[offset]) |
102 | continue; | 116 | last_in_cluster = offset + SWAPFILE_CLUSTER; |
103 | si->cluster_nr--; | 117 | else if (offset == last_in_cluster) { |
104 | goto got_page; | 118 | spin_lock(&swap_lock); |
105 | } | 119 | si->cluster_next = offset-SWAPFILE_CLUSTER-1; |
106 | } | 120 | goto cluster; |
107 | si->cluster_nr = SWAPFILE_CLUSTER; | ||
108 | |||
109 | /* try to find an empty (even not aligned) cluster. */ | ||
110 | offset = si->lowest_bit; | ||
111 | check_next_cluster: | ||
112 | if (offset+SWAPFILE_CLUSTER-1 <= si->highest_bit) | ||
113 | { | ||
114 | unsigned long nr; | ||
115 | for (nr = offset; nr < offset+SWAPFILE_CLUSTER; nr++) | ||
116 | if (si->swap_map[nr]) | ||
117 | { | ||
118 | offset = nr+1; | ||
119 | goto check_next_cluster; | ||
120 | } | 121 | } |
121 | /* We found a completly empty cluster, so start | 122 | if (unlikely(--latency_ration < 0)) { |
122 | * using it. | 123 | cond_resched(); |
123 | */ | 124 | latency_ration = LATENCY_LIMIT; |
124 | goto got_page; | 125 | } |
126 | } | ||
127 | spin_lock(&swap_lock); | ||
128 | goto lowest; | ||
125 | } | 129 | } |
126 | /* No luck, so now go finegrined as usual. -Andrea */ | 130 | |
127 | for (offset = si->lowest_bit; offset <= si->highest_bit ; offset++) { | 131 | si->cluster_nr--; |
128 | if (si->swap_map[offset]) | 132 | cluster: |
129 | continue; | 133 | offset = si->cluster_next; |
130 | si->lowest_bit = offset+1; | 134 | if (offset > si->highest_bit) |
131 | got_page: | 135 | lowest: offset = si->lowest_bit; |
136 | checks: if (!(si->flags & SWP_WRITEOK)) | ||
137 | goto no_page; | ||
138 | if (!si->highest_bit) | ||
139 | goto no_page; | ||
140 | if (!si->swap_map[offset]) { | ||
132 | if (offset == si->lowest_bit) | 141 | if (offset == si->lowest_bit) |
133 | si->lowest_bit++; | 142 | si->lowest_bit++; |
134 | if (offset == si->highest_bit) | 143 | if (offset == si->highest_bit) |
135 | si->highest_bit--; | 144 | si->highest_bit--; |
136 | if (si->lowest_bit > si->highest_bit) { | 145 | si->inuse_pages++; |
146 | if (si->inuse_pages == si->pages) { | ||
137 | si->lowest_bit = si->max; | 147 | si->lowest_bit = si->max; |
138 | si->highest_bit = 0; | 148 | si->highest_bit = 0; |
139 | } | 149 | } |
140 | si->swap_map[offset] = 1; | 150 | si->swap_map[offset] = 1; |
141 | si->inuse_pages++; | 151 | si->cluster_next = offset + 1; |
142 | nr_swap_pages--; | 152 | si->flags -= SWP_SCANNING; |
143 | si->cluster_next = offset+1; | ||
144 | return offset; | 153 | return offset; |
145 | } | 154 | } |
146 | si->lowest_bit = si->max; | 155 | |
147 | si->highest_bit = 0; | 156 | spin_unlock(&swap_lock); |
157 | while (++offset <= si->highest_bit) { | ||
158 | if (!si->swap_map[offset]) { | ||
159 | spin_lock(&swap_lock); | ||
160 | goto checks; | ||
161 | } | ||
162 | if (unlikely(--latency_ration < 0)) { | ||
163 | cond_resched(); | ||
164 | latency_ration = LATENCY_LIMIT; | ||
165 | } | ||
166 | } | ||
167 | spin_lock(&swap_lock); | ||
168 | goto lowest; | ||
169 | |||
170 | no_page: | ||
171 | si->flags -= SWP_SCANNING; | ||
148 | return 0; | 172 | return 0; |
149 | } | 173 | } |
150 | 174 | ||
151 | swp_entry_t get_swap_page(void) | 175 | swp_entry_t get_swap_page(void) |
152 | { | 176 | { |
153 | struct swap_info_struct * p; | 177 | struct swap_info_struct *si; |
154 | unsigned long offset; | 178 | pgoff_t offset; |
155 | swp_entry_t entry; | 179 | int type, next; |
156 | int type, wrapped = 0; | 180 | int wrapped = 0; |
157 | 181 | ||
158 | entry.val = 0; /* Out of memory */ | 182 | spin_lock(&swap_lock); |
159 | swap_list_lock(); | ||
160 | type = swap_list.next; | ||
161 | if (type < 0) | ||
162 | goto out; | ||
163 | if (nr_swap_pages <= 0) | 183 | if (nr_swap_pages <= 0) |
164 | goto out; | 184 | goto noswap; |
185 | nr_swap_pages--; | ||
186 | |||
187 | for (type = swap_list.next; type >= 0 && wrapped < 2; type = next) { | ||
188 | si = swap_info + type; | ||
189 | next = si->next; | ||
190 | if (next < 0 || | ||
191 | (!wrapped && si->prio != swap_info[next].prio)) { | ||
192 | next = swap_list.head; | ||
193 | wrapped++; | ||
194 | } | ||
165 | 195 | ||
166 | while (1) { | 196 | if (!si->highest_bit) |
167 | p = &swap_info[type]; | 197 | continue; |
168 | if ((p->flags & SWP_ACTIVE) == SWP_ACTIVE) { | 198 | if (!(si->flags & SWP_WRITEOK)) |
169 | swap_device_lock(p); | 199 | continue; |
170 | offset = scan_swap_map(p); | 200 | |
171 | swap_device_unlock(p); | 201 | swap_list.next = next; |
172 | if (offset) { | 202 | offset = scan_swap_map(si); |
173 | entry = swp_entry(type,offset); | 203 | if (offset) { |
174 | type = swap_info[type].next; | 204 | spin_unlock(&swap_lock); |
175 | if (type < 0 || | 205 | return swp_entry(type, offset); |
176 | p->prio != swap_info[type].prio) { | ||
177 | swap_list.next = swap_list.head; | ||
178 | } else { | ||
179 | swap_list.next = type; | ||
180 | } | ||
181 | goto out; | ||
182 | } | ||
183 | } | 206 | } |
184 | type = p->next; | 207 | next = swap_list.next; |
185 | if (!wrapped) { | ||
186 | if (type < 0 || p->prio != swap_info[type].prio) { | ||
187 | type = swap_list.head; | ||
188 | wrapped = 1; | ||
189 | } | ||
190 | } else | ||
191 | if (type < 0) | ||
192 | goto out; /* out of swap space */ | ||
193 | } | 208 | } |
194 | out: | 209 | |
195 | swap_list_unlock(); | 210 | nr_swap_pages++; |
196 | return entry; | 211 | noswap: |
212 | spin_unlock(&swap_lock); | ||
213 | return (swp_entry_t) {0}; | ||
197 | } | 214 | } |
198 | 215 | ||
199 | static struct swap_info_struct * swap_info_get(swp_entry_t entry) | 216 | static struct swap_info_struct * swap_info_get(swp_entry_t entry) |
@@ -214,10 +231,7 @@ static struct swap_info_struct * swap_info_get(swp_entry_t entry) | |||
214 | goto bad_offset; | 231 | goto bad_offset; |
215 | if (!p->swap_map[offset]) | 232 | if (!p->swap_map[offset]) |
216 | goto bad_free; | 233 | goto bad_free; |
217 | swap_list_lock(); | 234 | spin_lock(&swap_lock); |
218 | if (p->prio > swap_info[swap_list.next].prio) | ||
219 | swap_list.next = type; | ||
220 | swap_device_lock(p); | ||
221 | return p; | 235 | return p; |
222 | 236 | ||
223 | bad_free: | 237 | bad_free: |
@@ -235,12 +249,6 @@ out: | |||
235 | return NULL; | 249 | return NULL; |
236 | } | 250 | } |
237 | 251 | ||
238 | static void swap_info_put(struct swap_info_struct * p) | ||
239 | { | ||
240 | swap_device_unlock(p); | ||
241 | swap_list_unlock(); | ||
242 | } | ||
243 | |||
244 | static int swap_entry_free(struct swap_info_struct *p, unsigned long offset) | 252 | static int swap_entry_free(struct swap_info_struct *p, unsigned long offset) |
245 | { | 253 | { |
246 | int count = p->swap_map[offset]; | 254 | int count = p->swap_map[offset]; |
@@ -253,6 +261,8 @@ static int swap_entry_free(struct swap_info_struct *p, unsigned long offset) | |||
253 | p->lowest_bit = offset; | 261 | p->lowest_bit = offset; |
254 | if (offset > p->highest_bit) | 262 | if (offset > p->highest_bit) |
255 | p->highest_bit = offset; | 263 | p->highest_bit = offset; |
264 | if (p->prio > swap_info[swap_list.next].prio) | ||
265 | swap_list.next = p - swap_info; | ||
256 | nr_swap_pages++; | 266 | nr_swap_pages++; |
257 | p->inuse_pages--; | 267 | p->inuse_pages--; |
258 | } | 268 | } |
@@ -271,7 +281,7 @@ void swap_free(swp_entry_t entry) | |||
271 | p = swap_info_get(entry); | 281 | p = swap_info_get(entry); |
272 | if (p) { | 282 | if (p) { |
273 | swap_entry_free(p, swp_offset(entry)); | 283 | swap_entry_free(p, swp_offset(entry)); |
274 | swap_info_put(p); | 284 | spin_unlock(&swap_lock); |
275 | } | 285 | } |
276 | } | 286 | } |
277 | 287 | ||
@@ -289,7 +299,7 @@ static inline int page_swapcount(struct page *page) | |||
289 | if (p) { | 299 | if (p) { |
290 | /* Subtract the 1 for the swap cache itself */ | 300 | /* Subtract the 1 for the swap cache itself */ |
291 | count = p->swap_map[swp_offset(entry)] - 1; | 301 | count = p->swap_map[swp_offset(entry)] - 1; |
292 | swap_info_put(p); | 302 | spin_unlock(&swap_lock); |
293 | } | 303 | } |
294 | return count; | 304 | return count; |
295 | } | 305 | } |
@@ -346,7 +356,7 @@ int remove_exclusive_swap_page(struct page *page) | |||
346 | } | 356 | } |
347 | write_unlock_irq(&swapper_space.tree_lock); | 357 | write_unlock_irq(&swapper_space.tree_lock); |
348 | } | 358 | } |
349 | swap_info_put(p); | 359 | spin_unlock(&swap_lock); |
350 | 360 | ||
351 | if (retval) { | 361 | if (retval) { |
352 | swap_free(entry); | 362 | swap_free(entry); |
@@ -369,7 +379,7 @@ void free_swap_and_cache(swp_entry_t entry) | |||
369 | if (p) { | 379 | if (p) { |
370 | if (swap_entry_free(p, swp_offset(entry)) == 1) | 380 | if (swap_entry_free(p, swp_offset(entry)) == 1) |
371 | page = find_trylock_page(&swapper_space, entry.val); | 381 | page = find_trylock_page(&swapper_space, entry.val); |
372 | swap_info_put(p); | 382 | spin_unlock(&swap_lock); |
373 | } | 383 | } |
374 | if (page) { | 384 | if (page) { |
375 | int one_user; | 385 | int one_user; |
@@ -531,17 +541,18 @@ static int unuse_mm(struct mm_struct *mm, | |||
531 | * Scan swap_map from current position to next entry still in use. | 541 | * Scan swap_map from current position to next entry still in use. |
532 | * Recycle to start on reaching the end, returning 0 when empty. | 542 | * Recycle to start on reaching the end, returning 0 when empty. |
533 | */ | 543 | */ |
534 | static int find_next_to_unuse(struct swap_info_struct *si, int prev) | 544 | static unsigned int find_next_to_unuse(struct swap_info_struct *si, |
545 | unsigned int prev) | ||
535 | { | 546 | { |
536 | int max = si->max; | 547 | unsigned int max = si->max; |
537 | int i = prev; | 548 | unsigned int i = prev; |
538 | int count; | 549 | int count; |
539 | 550 | ||
540 | /* | 551 | /* |
541 | * No need for swap_device_lock(si) here: we're just looking | 552 | * No need for swap_lock here: we're just looking |
542 | * for whether an entry is in use, not modifying it; false | 553 | * for whether an entry is in use, not modifying it; false |
543 | * hits are okay, and sys_swapoff() has already prevented new | 554 | * hits are okay, and sys_swapoff() has already prevented new |
544 | * allocations from this area (while holding swap_list_lock()). | 555 | * allocations from this area (while holding swap_lock). |
545 | */ | 556 | */ |
546 | for (;;) { | 557 | for (;;) { |
547 | if (++i >= max) { | 558 | if (++i >= max) { |
@@ -577,7 +588,7 @@ static int try_to_unuse(unsigned int type) | |||
577 | unsigned short swcount; | 588 | unsigned short swcount; |
578 | struct page *page; | 589 | struct page *page; |
579 | swp_entry_t entry; | 590 | swp_entry_t entry; |
580 | int i = 0; | 591 | unsigned int i = 0; |
581 | int retval = 0; | 592 | int retval = 0; |
582 | int reset_overflow = 0; | 593 | int reset_overflow = 0; |
583 | int shmem; | 594 | int shmem; |
@@ -731,9 +742,9 @@ static int try_to_unuse(unsigned int type) | |||
731 | * report them; but do report if we reset SWAP_MAP_MAX. | 742 | * report them; but do report if we reset SWAP_MAP_MAX. |
732 | */ | 743 | */ |
733 | if (*swap_map == SWAP_MAP_MAX) { | 744 | if (*swap_map == SWAP_MAP_MAX) { |
734 | swap_device_lock(si); | 745 | spin_lock(&swap_lock); |
735 | *swap_map = 1; | 746 | *swap_map = 1; |
736 | swap_device_unlock(si); | 747 | spin_unlock(&swap_lock); |
737 | reset_overflow = 1; | 748 | reset_overflow = 1; |
738 | } | 749 | } |
739 | 750 | ||
@@ -797,9 +808,9 @@ static int try_to_unuse(unsigned int type) | |||
797 | } | 808 | } |
798 | 809 | ||
799 | /* | 810 | /* |
800 | * After a successful try_to_unuse, if no swap is now in use, we know we | 811 | * After a successful try_to_unuse, if no swap is now in use, we know |
801 | * can empty the mmlist. swap_list_lock must be held on entry and exit. | 812 | * we can empty the mmlist. swap_lock must be held on entry and exit. |
802 | * Note that mmlist_lock nests inside swap_list_lock, and an mm must be | 813 | * Note that mmlist_lock nests inside swap_lock, and an mm must be |
803 | * added to the mmlist just after page_duplicate - before would be racy. | 814 | * added to the mmlist just after page_duplicate - before would be racy. |
804 | */ | 815 | */ |
805 | static void drain_mmlist(void) | 816 | static void drain_mmlist(void) |
@@ -832,9 +843,9 @@ sector_t map_swap_page(struct swap_info_struct *sis, pgoff_t offset) | |||
832 | offset < (se->start_page + se->nr_pages)) { | 843 | offset < (se->start_page + se->nr_pages)) { |
833 | return se->start_block + (offset - se->start_page); | 844 | return se->start_block + (offset - se->start_page); |
834 | } | 845 | } |
835 | lh = se->list.prev; | 846 | lh = se->list.next; |
836 | if (lh == &sis->extent_list) | 847 | if (lh == &sis->extent_list) |
837 | lh = lh->prev; | 848 | lh = lh->next; |
838 | se = list_entry(lh, struct swap_extent, list); | 849 | se = list_entry(lh, struct swap_extent, list); |
839 | sis->curr_swap_extent = se; | 850 | sis->curr_swap_extent = se; |
840 | BUG_ON(se == start_se); /* It *must* be present */ | 851 | BUG_ON(se == start_se); /* It *must* be present */ |
@@ -854,15 +865,13 @@ static void destroy_swap_extents(struct swap_info_struct *sis) | |||
854 | list_del(&se->list); | 865 | list_del(&se->list); |
855 | kfree(se); | 866 | kfree(se); |
856 | } | 867 | } |
857 | sis->nr_extents = 0; | ||
858 | } | 868 | } |
859 | 869 | ||
860 | /* | 870 | /* |
861 | * Add a block range (and the corresponding page range) into this swapdev's | 871 | * Add a block range (and the corresponding page range) into this swapdev's |
862 | * extent list. The extent list is kept sorted in block order. | 872 | * extent list. The extent list is kept sorted in page order. |
863 | * | 873 | * |
864 | * This function rather assumes that it is called in ascending sector_t order. | 874 | * This function rather assumes that it is called in ascending page order. |
865 | * It doesn't look for extent coalescing opportunities. | ||
866 | */ | 875 | */ |
867 | static int | 876 | static int |
868 | add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | 877 | add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, |
@@ -872,16 +881,15 @@ add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | |||
872 | struct swap_extent *new_se; | 881 | struct swap_extent *new_se; |
873 | struct list_head *lh; | 882 | struct list_head *lh; |
874 | 883 | ||
875 | lh = sis->extent_list.next; /* The highest-addressed block */ | 884 | lh = sis->extent_list.prev; /* The highest page extent */ |
876 | while (lh != &sis->extent_list) { | 885 | if (lh != &sis->extent_list) { |
877 | se = list_entry(lh, struct swap_extent, list); | 886 | se = list_entry(lh, struct swap_extent, list); |
878 | if (se->start_block + se->nr_pages == start_block && | 887 | BUG_ON(se->start_page + se->nr_pages != start_page); |
879 | se->start_page + se->nr_pages == start_page) { | 888 | if (se->start_block + se->nr_pages == start_block) { |
880 | /* Merge it */ | 889 | /* Merge it */ |
881 | se->nr_pages += nr_pages; | 890 | se->nr_pages += nr_pages; |
882 | return 0; | 891 | return 0; |
883 | } | 892 | } |
884 | lh = lh->next; | ||
885 | } | 893 | } |
886 | 894 | ||
887 | /* | 895 | /* |
@@ -894,16 +902,8 @@ add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | |||
894 | new_se->nr_pages = nr_pages; | 902 | new_se->nr_pages = nr_pages; |
895 | new_se->start_block = start_block; | 903 | new_se->start_block = start_block; |
896 | 904 | ||
897 | lh = sis->extent_list.prev; /* The lowest block */ | 905 | list_add_tail(&new_se->list, &sis->extent_list); |
898 | while (lh != &sis->extent_list) { | 906 | return 1; |
899 | se = list_entry(lh, struct swap_extent, list); | ||
900 | if (se->start_block > start_block) | ||
901 | break; | ||
902 | lh = lh->prev; | ||
903 | } | ||
904 | list_add_tail(&new_se->list, lh); | ||
905 | sis->nr_extents++; | ||
906 | return 0; | ||
907 | } | 907 | } |
908 | 908 | ||
909 | /* | 909 | /* |
@@ -926,7 +926,7 @@ add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | |||
926 | * requirements, they are simply tossed out - we will never use those blocks | 926 | * requirements, they are simply tossed out - we will never use those blocks |
927 | * for swapping. | 927 | * for swapping. |
928 | * | 928 | * |
929 | * For S_ISREG swapfiles we hold i_sem across the life of the swapon. This | 929 | * For S_ISREG swapfiles we set S_SWAPFILE across the life of the swapon. This |
930 | * prevents root from shooting her foot off by ftruncating an in-use swapfile, | 930 | * prevents root from shooting her foot off by ftruncating an in-use swapfile, |
931 | * which will scribble on the fs. | 931 | * which will scribble on the fs. |
932 | * | 932 | * |
@@ -937,7 +937,7 @@ add_swap_extent(struct swap_info_struct *sis, unsigned long start_page, | |||
937 | * This is extremely effective. The average number of iterations in | 937 | * This is extremely effective. The average number of iterations in |
938 | * map_swap_page() has been measured at about 0.3 per page. - akpm. | 938 | * map_swap_page() has been measured at about 0.3 per page. - akpm. |
939 | */ | 939 | */ |
940 | static int setup_swap_extents(struct swap_info_struct *sis) | 940 | static int setup_swap_extents(struct swap_info_struct *sis, sector_t *span) |
941 | { | 941 | { |
942 | struct inode *inode; | 942 | struct inode *inode; |
943 | unsigned blocks_per_page; | 943 | unsigned blocks_per_page; |
@@ -945,11 +945,15 @@ static int setup_swap_extents(struct swap_info_struct *sis) | |||
945 | unsigned blkbits; | 945 | unsigned blkbits; |
946 | sector_t probe_block; | 946 | sector_t probe_block; |
947 | sector_t last_block; | 947 | sector_t last_block; |
948 | sector_t lowest_block = -1; | ||
949 | sector_t highest_block = 0; | ||
950 | int nr_extents = 0; | ||
948 | int ret; | 951 | int ret; |
949 | 952 | ||
950 | inode = sis->swap_file->f_mapping->host; | 953 | inode = sis->swap_file->f_mapping->host; |
951 | if (S_ISBLK(inode->i_mode)) { | 954 | if (S_ISBLK(inode->i_mode)) { |
952 | ret = add_swap_extent(sis, 0, sis->max, 0); | 955 | ret = add_swap_extent(sis, 0, sis->max, 0); |
956 | *span = sis->pages; | ||
953 | goto done; | 957 | goto done; |
954 | } | 958 | } |
955 | 959 | ||
@@ -994,22 +998,32 @@ static int setup_swap_extents(struct swap_info_struct *sis) | |||
994 | } | 998 | } |
995 | } | 999 | } |
996 | 1000 | ||
1001 | first_block >>= (PAGE_SHIFT - blkbits); | ||
1002 | if (page_no) { /* exclude the header page */ | ||
1003 | if (first_block < lowest_block) | ||
1004 | lowest_block = first_block; | ||
1005 | if (first_block > highest_block) | ||
1006 | highest_block = first_block; | ||
1007 | } | ||
1008 | |||
997 | /* | 1009 | /* |
998 | * We found a PAGE_SIZE-length, PAGE_SIZE-aligned run of blocks | 1010 | * We found a PAGE_SIZE-length, PAGE_SIZE-aligned run of blocks |
999 | */ | 1011 | */ |
1000 | ret = add_swap_extent(sis, page_no, 1, | 1012 | ret = add_swap_extent(sis, page_no, 1, first_block); |
1001 | first_block >> (PAGE_SHIFT - blkbits)); | 1013 | if (ret < 0) |
1002 | if (ret) | ||
1003 | goto out; | 1014 | goto out; |
1015 | nr_extents += ret; | ||
1004 | page_no++; | 1016 | page_no++; |
1005 | probe_block += blocks_per_page; | 1017 | probe_block += blocks_per_page; |
1006 | reprobe: | 1018 | reprobe: |
1007 | continue; | 1019 | continue; |
1008 | } | 1020 | } |
1009 | ret = 0; | 1021 | ret = nr_extents; |
1022 | *span = 1 + highest_block - lowest_block; | ||
1010 | if (page_no == 0) | 1023 | if (page_no == 0) |
1011 | ret = -EINVAL; | 1024 | page_no = 1; /* force Empty message */ |
1012 | sis->max = page_no; | 1025 | sis->max = page_no; |
1026 | sis->pages = page_no - 1; | ||
1013 | sis->highest_bit = page_no - 1; | 1027 | sis->highest_bit = page_no - 1; |
1014 | done: | 1028 | done: |
1015 | sis->curr_swap_extent = list_entry(sis->extent_list.prev, | 1029 | sis->curr_swap_extent = list_entry(sis->extent_list.prev, |
@@ -1069,7 +1083,7 @@ asmlinkage long sys_swapoff(const char __user * specialfile) | |||
1069 | 1083 | ||
1070 | mapping = victim->f_mapping; | 1084 | mapping = victim->f_mapping; |
1071 | prev = -1; | 1085 | prev = -1; |
1072 | swap_list_lock(); | 1086 | spin_lock(&swap_lock); |
1073 | for (type = swap_list.head; type >= 0; type = swap_info[type].next) { | 1087 | for (type = swap_list.head; type >= 0; type = swap_info[type].next) { |
1074 | p = swap_info + type; | 1088 | p = swap_info + type; |
1075 | if ((p->flags & SWP_ACTIVE) == SWP_ACTIVE) { | 1089 | if ((p->flags & SWP_ACTIVE) == SWP_ACTIVE) { |
@@ -1080,14 +1094,14 @@ asmlinkage long sys_swapoff(const char __user * specialfile) | |||
1080 | } | 1094 | } |
1081 | if (type < 0) { | 1095 | if (type < 0) { |
1082 | err = -EINVAL; | 1096 | err = -EINVAL; |
1083 | swap_list_unlock(); | 1097 | spin_unlock(&swap_lock); |
1084 | goto out_dput; | 1098 | goto out_dput; |
1085 | } | 1099 | } |
1086 | if (!security_vm_enough_memory(p->pages)) | 1100 | if (!security_vm_enough_memory(p->pages)) |
1087 | vm_unacct_memory(p->pages); | 1101 | vm_unacct_memory(p->pages); |
1088 | else { | 1102 | else { |
1089 | err = -ENOMEM; | 1103 | err = -ENOMEM; |
1090 | swap_list_unlock(); | 1104 | spin_unlock(&swap_lock); |
1091 | goto out_dput; | 1105 | goto out_dput; |
1092 | } | 1106 | } |
1093 | if (prev < 0) { | 1107 | if (prev < 0) { |
@@ -1102,18 +1116,15 @@ asmlinkage long sys_swapoff(const char __user * specialfile) | |||
1102 | nr_swap_pages -= p->pages; | 1116 | nr_swap_pages -= p->pages; |
1103 | total_swap_pages -= p->pages; | 1117 | total_swap_pages -= p->pages; |
1104 | p->flags &= ~SWP_WRITEOK; | 1118 | p->flags &= ~SWP_WRITEOK; |
1105 | swap_list_unlock(); | 1119 | spin_unlock(&swap_lock); |
1120 | |||
1106 | current->flags |= PF_SWAPOFF; | 1121 | current->flags |= PF_SWAPOFF; |
1107 | err = try_to_unuse(type); | 1122 | err = try_to_unuse(type); |
1108 | current->flags &= ~PF_SWAPOFF; | 1123 | current->flags &= ~PF_SWAPOFF; |
1109 | 1124 | ||
1110 | /* wait for any unplug function to finish */ | ||
1111 | down_write(&swap_unplug_sem); | ||
1112 | up_write(&swap_unplug_sem); | ||
1113 | |||
1114 | if (err) { | 1125 | if (err) { |
1115 | /* re-insert swap space back into swap_list */ | 1126 | /* re-insert swap space back into swap_list */ |
1116 | swap_list_lock(); | 1127 | spin_lock(&swap_lock); |
1117 | for (prev = -1, i = swap_list.head; i >= 0; prev = i, i = swap_info[i].next) | 1128 | for (prev = -1, i = swap_list.head; i >= 0; prev = i, i = swap_info[i].next) |
1118 | if (p->prio >= swap_info[i].prio) | 1129 | if (p->prio >= swap_info[i].prio) |
1119 | break; | 1130 | break; |
@@ -1125,22 +1136,35 @@ asmlinkage long sys_swapoff(const char __user * specialfile) | |||
1125 | nr_swap_pages += p->pages; | 1136 | nr_swap_pages += p->pages; |
1126 | total_swap_pages += p->pages; | 1137 | total_swap_pages += p->pages; |
1127 | p->flags |= SWP_WRITEOK; | 1138 | p->flags |= SWP_WRITEOK; |
1128 | swap_list_unlock(); | 1139 | spin_unlock(&swap_lock); |
1129 | goto out_dput; | 1140 | goto out_dput; |
1130 | } | 1141 | } |
1142 | |||
1143 | /* wait for any unplug function to finish */ | ||
1144 | down_write(&swap_unplug_sem); | ||
1145 | up_write(&swap_unplug_sem); | ||
1146 | |||
1147 | destroy_swap_extents(p); | ||
1131 | down(&swapon_sem); | 1148 | down(&swapon_sem); |
1132 | swap_list_lock(); | 1149 | spin_lock(&swap_lock); |
1133 | drain_mmlist(); | 1150 | drain_mmlist(); |
1134 | swap_device_lock(p); | 1151 | |
1152 | /* wait for anyone still in scan_swap_map */ | ||
1153 | p->highest_bit = 0; /* cuts scans short */ | ||
1154 | while (p->flags >= SWP_SCANNING) { | ||
1155 | spin_unlock(&swap_lock); | ||
1156 | set_current_state(TASK_UNINTERRUPTIBLE); | ||
1157 | schedule_timeout(1); | ||
1158 | spin_lock(&swap_lock); | ||
1159 | } | ||
1160 | |||
1135 | swap_file = p->swap_file; | 1161 | swap_file = p->swap_file; |
1136 | p->swap_file = NULL; | 1162 | p->swap_file = NULL; |
1137 | p->max = 0; | 1163 | p->max = 0; |
1138 | swap_map = p->swap_map; | 1164 | swap_map = p->swap_map; |
1139 | p->swap_map = NULL; | 1165 | p->swap_map = NULL; |
1140 | p->flags = 0; | 1166 | p->flags = 0; |
1141 | destroy_swap_extents(p); | 1167 | spin_unlock(&swap_lock); |
1142 | swap_device_unlock(p); | ||
1143 | swap_list_unlock(); | ||
1144 | up(&swapon_sem); | 1168 | up(&swapon_sem); |
1145 | vfree(swap_map); | 1169 | vfree(swap_map); |
1146 | inode = mapping->host; | 1170 | inode = mapping->host; |
@@ -1213,7 +1237,7 @@ static int swap_show(struct seq_file *swap, void *v) | |||
1213 | 1237 | ||
1214 | file = ptr->swap_file; | 1238 | file = ptr->swap_file; |
1215 | len = seq_path(swap, file->f_vfsmnt, file->f_dentry, " \t\n\\"); | 1239 | len = seq_path(swap, file->f_vfsmnt, file->f_dentry, " \t\n\\"); |
1216 | seq_printf(swap, "%*s%s\t%d\t%ld\t%d\n", | 1240 | seq_printf(swap, "%*s%s\t%u\t%u\t%d\n", |
1217 | len < 40 ? 40 - len : 1, " ", | 1241 | len < 40 ? 40 - len : 1, " ", |
1218 | S_ISBLK(file->f_dentry->d_inode->i_mode) ? | 1242 | S_ISBLK(file->f_dentry->d_inode->i_mode) ? |
1219 | "partition" : "file\t", | 1243 | "partition" : "file\t", |
@@ -1272,7 +1296,9 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1272 | static int least_priority; | 1296 | static int least_priority; |
1273 | union swap_header *swap_header = NULL; | 1297 | union swap_header *swap_header = NULL; |
1274 | int swap_header_version; | 1298 | int swap_header_version; |
1275 | int nr_good_pages = 0; | 1299 | unsigned int nr_good_pages = 0; |
1300 | int nr_extents = 0; | ||
1301 | sector_t span; | ||
1276 | unsigned long maxpages = 1; | 1302 | unsigned long maxpages = 1; |
1277 | int swapfilesize; | 1303 | int swapfilesize; |
1278 | unsigned short *swap_map; | 1304 | unsigned short *swap_map; |
@@ -1282,7 +1308,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1282 | 1308 | ||
1283 | if (!capable(CAP_SYS_ADMIN)) | 1309 | if (!capable(CAP_SYS_ADMIN)) |
1284 | return -EPERM; | 1310 | return -EPERM; |
1285 | swap_list_lock(); | 1311 | spin_lock(&swap_lock); |
1286 | p = swap_info; | 1312 | p = swap_info; |
1287 | for (type = 0 ; type < nr_swapfiles ; type++,p++) | 1313 | for (type = 0 ; type < nr_swapfiles ; type++,p++) |
1288 | if (!(p->flags & SWP_USED)) | 1314 | if (!(p->flags & SWP_USED)) |
@@ -1301,14 +1327,13 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1301 | * swp_entry_t or the architecture definition of a swap pte. | 1327 | * swp_entry_t or the architecture definition of a swap pte. |
1302 | */ | 1328 | */ |
1303 | if (type > swp_type(pte_to_swp_entry(swp_entry_to_pte(swp_entry(~0UL,0))))) { | 1329 | if (type > swp_type(pte_to_swp_entry(swp_entry_to_pte(swp_entry(~0UL,0))))) { |
1304 | swap_list_unlock(); | 1330 | spin_unlock(&swap_lock); |
1305 | goto out; | 1331 | goto out; |
1306 | } | 1332 | } |
1307 | if (type >= nr_swapfiles) | 1333 | if (type >= nr_swapfiles) |
1308 | nr_swapfiles = type+1; | 1334 | nr_swapfiles = type+1; |
1309 | INIT_LIST_HEAD(&p->extent_list); | 1335 | INIT_LIST_HEAD(&p->extent_list); |
1310 | p->flags = SWP_USED; | 1336 | p->flags = SWP_USED; |
1311 | p->nr_extents = 0; | ||
1312 | p->swap_file = NULL; | 1337 | p->swap_file = NULL; |
1313 | p->old_block_size = 0; | 1338 | p->old_block_size = 0; |
1314 | p->swap_map = NULL; | 1339 | p->swap_map = NULL; |
@@ -1316,7 +1341,6 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1316 | p->highest_bit = 0; | 1341 | p->highest_bit = 0; |
1317 | p->cluster_nr = 0; | 1342 | p->cluster_nr = 0; |
1318 | p->inuse_pages = 0; | 1343 | p->inuse_pages = 0; |
1319 | spin_lock_init(&p->sdev_lock); | ||
1320 | p->next = -1; | 1344 | p->next = -1; |
1321 | if (swap_flags & SWAP_FLAG_PREFER) { | 1345 | if (swap_flags & SWAP_FLAG_PREFER) { |
1322 | p->prio = | 1346 | p->prio = |
@@ -1324,7 +1348,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1324 | } else { | 1348 | } else { |
1325 | p->prio = --least_priority; | 1349 | p->prio = --least_priority; |
1326 | } | 1350 | } |
1327 | swap_list_unlock(); | 1351 | spin_unlock(&swap_lock); |
1328 | name = getname(specialfile); | 1352 | name = getname(specialfile); |
1329 | error = PTR_ERR(name); | 1353 | error = PTR_ERR(name); |
1330 | if (IS_ERR(name)) { | 1354 | if (IS_ERR(name)) { |
@@ -1426,6 +1450,8 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1426 | } | 1450 | } |
1427 | 1451 | ||
1428 | p->lowest_bit = 1; | 1452 | p->lowest_bit = 1; |
1453 | p->cluster_next = 1; | ||
1454 | |||
1429 | /* | 1455 | /* |
1430 | * Find out how many pages are allowed for a single swap | 1456 | * Find out how many pages are allowed for a single swap |
1431 | * device. There are two limiting factors: 1) the number of | 1457 | * device. There are two limiting factors: 1) the number of |
@@ -1446,6 +1472,10 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1446 | p->highest_bit = maxpages - 1; | 1472 | p->highest_bit = maxpages - 1; |
1447 | 1473 | ||
1448 | error = -EINVAL; | 1474 | error = -EINVAL; |
1475 | if (!maxpages) | ||
1476 | goto bad_swap; | ||
1477 | if (swap_header->info.nr_badpages && S_ISREG(inode->i_mode)) | ||
1478 | goto bad_swap; | ||
1449 | if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) | 1479 | if (swap_header->info.nr_badpages > MAX_SWAP_BADPAGES) |
1450 | goto bad_swap; | 1480 | goto bad_swap; |
1451 | 1481 | ||
@@ -1470,35 +1500,40 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1470 | if (error) | 1500 | if (error) |
1471 | goto bad_swap; | 1501 | goto bad_swap; |
1472 | } | 1502 | } |
1473 | 1503 | ||
1474 | if (swapfilesize && maxpages > swapfilesize) { | 1504 | if (swapfilesize && maxpages > swapfilesize) { |
1475 | printk(KERN_WARNING | 1505 | printk(KERN_WARNING |
1476 | "Swap area shorter than signature indicates\n"); | 1506 | "Swap area shorter than signature indicates\n"); |
1477 | error = -EINVAL; | 1507 | error = -EINVAL; |
1478 | goto bad_swap; | 1508 | goto bad_swap; |
1479 | } | 1509 | } |
1510 | if (nr_good_pages) { | ||
1511 | p->swap_map[0] = SWAP_MAP_BAD; | ||
1512 | p->max = maxpages; | ||
1513 | p->pages = nr_good_pages; | ||
1514 | nr_extents = setup_swap_extents(p, &span); | ||
1515 | if (nr_extents < 0) { | ||
1516 | error = nr_extents; | ||
1517 | goto bad_swap; | ||
1518 | } | ||
1519 | nr_good_pages = p->pages; | ||
1520 | } | ||
1480 | if (!nr_good_pages) { | 1521 | if (!nr_good_pages) { |
1481 | printk(KERN_WARNING "Empty swap-file\n"); | 1522 | printk(KERN_WARNING "Empty swap-file\n"); |
1482 | error = -EINVAL; | 1523 | error = -EINVAL; |
1483 | goto bad_swap; | 1524 | goto bad_swap; |
1484 | } | 1525 | } |
1485 | p->swap_map[0] = SWAP_MAP_BAD; | ||
1486 | p->max = maxpages; | ||
1487 | p->pages = nr_good_pages; | ||
1488 | |||
1489 | error = setup_swap_extents(p); | ||
1490 | if (error) | ||
1491 | goto bad_swap; | ||
1492 | 1526 | ||
1493 | down(&swapon_sem); | 1527 | down(&swapon_sem); |
1494 | swap_list_lock(); | 1528 | spin_lock(&swap_lock); |
1495 | swap_device_lock(p); | ||
1496 | p->flags = SWP_ACTIVE; | 1529 | p->flags = SWP_ACTIVE; |
1497 | nr_swap_pages += nr_good_pages; | 1530 | nr_swap_pages += nr_good_pages; |
1498 | total_swap_pages += nr_good_pages; | 1531 | total_swap_pages += nr_good_pages; |
1499 | printk(KERN_INFO "Adding %dk swap on %s. Priority:%d extents:%d\n", | 1532 | |
1500 | nr_good_pages<<(PAGE_SHIFT-10), name, | 1533 | printk(KERN_INFO "Adding %uk swap on %s. " |
1501 | p->prio, p->nr_extents); | 1534 | "Priority:%d extents:%d across:%lluk\n", |
1535 | nr_good_pages<<(PAGE_SHIFT-10), name, p->prio, | ||
1536 | nr_extents, (unsigned long long)span<<(PAGE_SHIFT-10)); | ||
1502 | 1537 | ||
1503 | /* insert swap space into swap_list: */ | 1538 | /* insert swap space into swap_list: */ |
1504 | prev = -1; | 1539 | prev = -1; |
@@ -1514,8 +1549,7 @@ asmlinkage long sys_swapon(const char __user * specialfile, int swap_flags) | |||
1514 | } else { | 1549 | } else { |
1515 | swap_info[prev].next = p - swap_info; | 1550 | swap_info[prev].next = p - swap_info; |
1516 | } | 1551 | } |
1517 | swap_device_unlock(p); | 1552 | spin_unlock(&swap_lock); |
1518 | swap_list_unlock(); | ||
1519 | up(&swapon_sem); | 1553 | up(&swapon_sem); |
1520 | error = 0; | 1554 | error = 0; |
1521 | goto out; | 1555 | goto out; |
@@ -1524,16 +1558,16 @@ bad_swap: | |||
1524 | set_blocksize(bdev, p->old_block_size); | 1558 | set_blocksize(bdev, p->old_block_size); |
1525 | bd_release(bdev); | 1559 | bd_release(bdev); |
1526 | } | 1560 | } |
1561 | destroy_swap_extents(p); | ||
1527 | bad_swap_2: | 1562 | bad_swap_2: |
1528 | swap_list_lock(); | 1563 | spin_lock(&swap_lock); |
1529 | swap_map = p->swap_map; | 1564 | swap_map = p->swap_map; |
1530 | p->swap_file = NULL; | 1565 | p->swap_file = NULL; |
1531 | p->swap_map = NULL; | 1566 | p->swap_map = NULL; |
1532 | p->flags = 0; | 1567 | p->flags = 0; |
1533 | if (!(swap_flags & SWAP_FLAG_PREFER)) | 1568 | if (!(swap_flags & SWAP_FLAG_PREFER)) |
1534 | ++least_priority; | 1569 | ++least_priority; |
1535 | swap_list_unlock(); | 1570 | spin_unlock(&swap_lock); |
1536 | destroy_swap_extents(p); | ||
1537 | vfree(swap_map); | 1571 | vfree(swap_map); |
1538 | if (swap_file) | 1572 | if (swap_file) |
1539 | filp_close(swap_file, NULL); | 1573 | filp_close(swap_file, NULL); |
@@ -1557,7 +1591,7 @@ void si_swapinfo(struct sysinfo *val) | |||
1557 | unsigned int i; | 1591 | unsigned int i; |
1558 | unsigned long nr_to_be_unused = 0; | 1592 | unsigned long nr_to_be_unused = 0; |
1559 | 1593 | ||
1560 | swap_list_lock(); | 1594 | spin_lock(&swap_lock); |
1561 | for (i = 0; i < nr_swapfiles; i++) { | 1595 | for (i = 0; i < nr_swapfiles; i++) { |
1562 | if (!(swap_info[i].flags & SWP_USED) || | 1596 | if (!(swap_info[i].flags & SWP_USED) || |
1563 | (swap_info[i].flags & SWP_WRITEOK)) | 1597 | (swap_info[i].flags & SWP_WRITEOK)) |
@@ -1566,7 +1600,7 @@ void si_swapinfo(struct sysinfo *val) | |||
1566 | } | 1600 | } |
1567 | val->freeswap = nr_swap_pages + nr_to_be_unused; | 1601 | val->freeswap = nr_swap_pages + nr_to_be_unused; |
1568 | val->totalswap = total_swap_pages + nr_to_be_unused; | 1602 | val->totalswap = total_swap_pages + nr_to_be_unused; |
1569 | swap_list_unlock(); | 1603 | spin_unlock(&swap_lock); |
1570 | } | 1604 | } |
1571 | 1605 | ||
1572 | /* | 1606 | /* |
@@ -1587,7 +1621,7 @@ int swap_duplicate(swp_entry_t entry) | |||
1587 | p = type + swap_info; | 1621 | p = type + swap_info; |
1588 | offset = swp_offset(entry); | 1622 | offset = swp_offset(entry); |
1589 | 1623 | ||
1590 | swap_device_lock(p); | 1624 | spin_lock(&swap_lock); |
1591 | if (offset < p->max && p->swap_map[offset]) { | 1625 | if (offset < p->max && p->swap_map[offset]) { |
1592 | if (p->swap_map[offset] < SWAP_MAP_MAX - 1) { | 1626 | if (p->swap_map[offset] < SWAP_MAP_MAX - 1) { |
1593 | p->swap_map[offset]++; | 1627 | p->swap_map[offset]++; |
@@ -1599,7 +1633,7 @@ int swap_duplicate(swp_entry_t entry) | |||
1599 | result = 1; | 1633 | result = 1; |
1600 | } | 1634 | } |
1601 | } | 1635 | } |
1602 | swap_device_unlock(p); | 1636 | spin_unlock(&swap_lock); |
1603 | out: | 1637 | out: |
1604 | return result; | 1638 | return result; |
1605 | 1639 | ||
@@ -1615,7 +1649,7 @@ get_swap_info_struct(unsigned type) | |||
1615 | } | 1649 | } |
1616 | 1650 | ||
1617 | /* | 1651 | /* |
1618 | * swap_device_lock prevents swap_map being freed. Don't grab an extra | 1652 | * swap_lock prevents swap_map being freed. Don't grab an extra |
1619 | * reference on the swaphandle, it doesn't matter if it becomes unused. | 1653 | * reference on the swaphandle, it doesn't matter if it becomes unused. |
1620 | */ | 1654 | */ |
1621 | int valid_swaphandles(swp_entry_t entry, unsigned long *offset) | 1655 | int valid_swaphandles(swp_entry_t entry, unsigned long *offset) |
@@ -1631,7 +1665,7 @@ int valid_swaphandles(swp_entry_t entry, unsigned long *offset) | |||
1631 | toff++, i--; | 1665 | toff++, i--; |
1632 | *offset = toff; | 1666 | *offset = toff; |
1633 | 1667 | ||
1634 | swap_device_lock(swapdev); | 1668 | spin_lock(&swap_lock); |
1635 | do { | 1669 | do { |
1636 | /* Don't read-ahead past the end of the swap area */ | 1670 | /* Don't read-ahead past the end of the swap area */ |
1637 | if (toff >= swapdev->max) | 1671 | if (toff >= swapdev->max) |
@@ -1644,6 +1678,6 @@ int valid_swaphandles(swp_entry_t entry, unsigned long *offset) | |||
1644 | toff++; | 1678 | toff++; |
1645 | ret++; | 1679 | ret++; |
1646 | } while (--i); | 1680 | } while (--i); |
1647 | swap_device_unlock(swapdev); | 1681 | spin_unlock(&swap_lock); |
1648 | return ret; | 1682 | return ret; |
1649 | } | 1683 | } |
diff --git a/mm/vmalloc.c b/mm/vmalloc.c index 8ff16a1eee6a..67b358e57ef6 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c | |||
@@ -158,8 +158,6 @@ int map_vm_area(struct vm_struct *area, pgprot_t prot, struct page ***pages) | |||
158 | return err; | 158 | return err; |
159 | } | 159 | } |
160 | 160 | ||
161 | #define IOREMAP_MAX_ORDER (7 + PAGE_SHIFT) /* 128 pages */ | ||
162 | |||
163 | struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, | 161 | struct vm_struct *__get_vm_area(unsigned long size, unsigned long flags, |
164 | unsigned long start, unsigned long end) | 162 | unsigned long start, unsigned long end) |
165 | { | 163 | { |
diff --git a/mm/vmscan.c b/mm/vmscan.c index cfffe5098d53..0095533cdde9 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -822,6 +822,8 @@ shrink_zone(struct zone *zone, struct scan_control *sc) | |||
822 | unsigned long nr_active; | 822 | unsigned long nr_active; |
823 | unsigned long nr_inactive; | 823 | unsigned long nr_inactive; |
824 | 824 | ||
825 | atomic_inc(&zone->reclaim_in_progress); | ||
826 | |||
825 | /* | 827 | /* |
826 | * Add one to `nr_to_scan' just to make sure that the kernel will | 828 | * Add one to `nr_to_scan' just to make sure that the kernel will |
827 | * slowly sift through the active list. | 829 | * slowly sift through the active list. |
@@ -861,6 +863,8 @@ shrink_zone(struct zone *zone, struct scan_control *sc) | |||
861 | } | 863 | } |
862 | 864 | ||
863 | throttle_vm_writeout(); | 865 | throttle_vm_writeout(); |
866 | |||
867 | atomic_dec(&zone->reclaim_in_progress); | ||
864 | } | 868 | } |
865 | 869 | ||
866 | /* | 870 | /* |
@@ -900,9 +904,7 @@ shrink_caches(struct zone **zones, struct scan_control *sc) | |||
900 | if (zone->all_unreclaimable && sc->priority != DEF_PRIORITY) | 904 | if (zone->all_unreclaimable && sc->priority != DEF_PRIORITY) |
901 | continue; /* Let kswapd poll it */ | 905 | continue; /* Let kswapd poll it */ |
902 | 906 | ||
903 | atomic_inc(&zone->reclaim_in_progress); | ||
904 | shrink_zone(zone, sc); | 907 | shrink_zone(zone, sc); |
905 | atomic_dec(&zone->reclaim_in_progress); | ||
906 | } | 908 | } |
907 | } | 909 | } |
908 | 910 | ||
@@ -1358,14 +1360,13 @@ int zone_reclaim(struct zone *zone, unsigned int gfp_mask, unsigned int order) | |||
1358 | sc.swap_cluster_max = SWAP_CLUSTER_MAX; | 1360 | sc.swap_cluster_max = SWAP_CLUSTER_MAX; |
1359 | 1361 | ||
1360 | /* Don't reclaim the zone if there are other reclaimers active */ | 1362 | /* Don't reclaim the zone if there are other reclaimers active */ |
1361 | if (!atomic_inc_and_test(&zone->reclaim_in_progress)) | 1363 | if (atomic_read(&zone->reclaim_in_progress) > 0) |
1362 | goto out; | 1364 | goto out; |
1363 | 1365 | ||
1364 | shrink_zone(zone, &sc); | 1366 | shrink_zone(zone, &sc); |
1365 | total_reclaimed = sc.nr_reclaimed; | 1367 | total_reclaimed = sc.nr_reclaimed; |
1366 | 1368 | ||
1367 | out: | 1369 | out: |
1368 | atomic_dec(&zone->reclaim_in_progress); | ||
1369 | return total_reclaimed; | 1370 | return total_reclaimed; |
1370 | } | 1371 | } |
1371 | 1372 | ||
@@ -1375,6 +1376,9 @@ asmlinkage long sys_set_zone_reclaim(unsigned int node, unsigned int zone, | |||
1375 | struct zone *z; | 1376 | struct zone *z; |
1376 | int i; | 1377 | int i; |
1377 | 1378 | ||
1379 | if (!capable(CAP_SYS_ADMIN)) | ||
1380 | return -EACCES; | ||
1381 | |||
1378 | if (node >= MAX_NUMNODES || !node_online(node)) | 1382 | if (node >= MAX_NUMNODES || !node_online(node)) |
1379 | return -EINVAL; | 1383 | return -EINVAL; |
1380 | 1384 | ||
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 621680f127af..348f36b529f7 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -1876,8 +1876,27 @@ static inline unsigned int dn_current_mss(struct sock *sk, int flags) | |||
1876 | return mss_now; | 1876 | return mss_now; |
1877 | } | 1877 | } |
1878 | 1878 | ||
1879 | /* | ||
1880 | * N.B. We get the timeout wrong here, but then we always did get it | ||
1881 | * wrong before and this is another step along the road to correcting | ||
1882 | * it. It ought to get updated each time we pass through the routine, | ||
1883 | * but in practise it probably doesn't matter too much for now. | ||
1884 | */ | ||
1885 | static inline struct sk_buff *dn_alloc_send_pskb(struct sock *sk, | ||
1886 | unsigned long datalen, int noblock, | ||
1887 | int *errcode) | ||
1888 | { | ||
1889 | struct sk_buff *skb = sock_alloc_send_skb(sk, datalen, | ||
1890 | noblock, errcode); | ||
1891 | if (skb) { | ||
1892 | skb->protocol = __constant_htons(ETH_P_DNA_RT); | ||
1893 | skb->pkt_type = PACKET_OUTGOING; | ||
1894 | } | ||
1895 | return skb; | ||
1896 | } | ||
1897 | |||
1879 | static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | 1898 | static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, |
1880 | struct msghdr *msg, size_t size) | 1899 | struct msghdr *msg, size_t size) |
1881 | { | 1900 | { |
1882 | struct sock *sk = sock->sk; | 1901 | struct sock *sk = sock->sk; |
1883 | struct dn_scp *scp = DN_SK(sk); | 1902 | struct dn_scp *scp = DN_SK(sk); |
@@ -1892,7 +1911,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1892 | struct dn_skb_cb *cb; | 1911 | struct dn_skb_cb *cb; |
1893 | size_t len; | 1912 | size_t len; |
1894 | unsigned char fctype; | 1913 | unsigned char fctype; |
1895 | long timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); | 1914 | long timeo; |
1896 | 1915 | ||
1897 | if (flags & ~(MSG_TRYHARD|MSG_OOB|MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|MSG_MORE|MSG_CMSG_COMPAT)) | 1916 | if (flags & ~(MSG_TRYHARD|MSG_OOB|MSG_DONTWAIT|MSG_EOR|MSG_NOSIGNAL|MSG_MORE|MSG_CMSG_COMPAT)) |
1898 | return -EOPNOTSUPP; | 1917 | return -EOPNOTSUPP; |
@@ -1900,18 +1919,21 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1900 | if (addr_len && (addr_len != sizeof(struct sockaddr_dn))) | 1919 | if (addr_len && (addr_len != sizeof(struct sockaddr_dn))) |
1901 | return -EINVAL; | 1920 | return -EINVAL; |
1902 | 1921 | ||
1922 | lock_sock(sk); | ||
1923 | timeo = sock_sndtimeo(sk, flags & MSG_DONTWAIT); | ||
1903 | /* | 1924 | /* |
1904 | * The only difference between stream sockets and sequenced packet | 1925 | * The only difference between stream sockets and sequenced packet |
1905 | * sockets is that the stream sockets always behave as if MSG_EOR | 1926 | * sockets is that the stream sockets always behave as if MSG_EOR |
1906 | * has been set. | 1927 | * has been set. |
1907 | */ | 1928 | */ |
1908 | if (sock->type == SOCK_STREAM) { | 1929 | if (sock->type == SOCK_STREAM) { |
1909 | if (flags & MSG_EOR) | 1930 | if (flags & MSG_EOR) { |
1910 | return -EINVAL; | 1931 | err = -EINVAL; |
1932 | goto out; | ||
1933 | } | ||
1911 | flags |= MSG_EOR; | 1934 | flags |= MSG_EOR; |
1912 | } | 1935 | } |
1913 | 1936 | ||
1914 | lock_sock(sk); | ||
1915 | 1937 | ||
1916 | err = dn_check_state(sk, addr, addr_len, &timeo, flags); | 1938 | err = dn_check_state(sk, addr, addr_len, &timeo, flags); |
1917 | if (err) | 1939 | if (err) |
@@ -1980,8 +2002,12 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1980 | 2002 | ||
1981 | /* | 2003 | /* |
1982 | * Get a suitably sized skb. | 2004 | * Get a suitably sized skb. |
2005 | * 64 is a bit of a hack really, but its larger than any | ||
2006 | * link-layer headers and has served us well as a good | ||
2007 | * guess as to their real length. | ||
1983 | */ | 2008 | */ |
1984 | skb = dn_alloc_send_skb(sk, &len, flags & MSG_DONTWAIT, timeo, &err); | 2009 | skb = dn_alloc_send_pskb(sk, len + 64 + DN_MAX_NSP_DATA_HEADER, |
2010 | flags & MSG_DONTWAIT, &err); | ||
1985 | 2011 | ||
1986 | if (err) | 2012 | if (err) |
1987 | break; | 2013 | break; |
@@ -1991,7 +2017,7 @@ static int dn_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
1991 | 2017 | ||
1992 | cb = DN_SKB_CB(skb); | 2018 | cb = DN_SKB_CB(skb); |
1993 | 2019 | ||
1994 | skb_reserve(skb, DN_MAX_NSP_DATA_HEADER); | 2020 | skb_reserve(skb, 64 + DN_MAX_NSP_DATA_HEADER); |
1995 | 2021 | ||
1996 | if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) { | 2022 | if (memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len)) { |
1997 | err = -EFAULT; | 2023 | err = -EFAULT; |
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c index e0bebf4bbcad..53633d352868 100644 --- a/net/decnet/dn_nsp_out.c +++ b/net/decnet/dn_nsp_out.c | |||
@@ -137,69 +137,6 @@ struct sk_buff *dn_alloc_skb(struct sock *sk, int size, int pri) | |||
137 | } | 137 | } |
138 | 138 | ||
139 | /* | 139 | /* |
140 | * Wrapper for the above, for allocs of data skbs. We try and get the | ||
141 | * whole size thats been asked for (plus 11 bytes of header). If this | ||
142 | * fails, then we try for any size over 16 bytes for SOCK_STREAMS. | ||
143 | */ | ||
144 | struct sk_buff *dn_alloc_send_skb(struct sock *sk, size_t *size, int noblock, long timeo, int *err) | ||
145 | { | ||
146 | int space; | ||
147 | int len; | ||
148 | struct sk_buff *skb = NULL; | ||
149 | |||
150 | *err = 0; | ||
151 | |||
152 | while(skb == NULL) { | ||
153 | if (signal_pending(current)) { | ||
154 | *err = sock_intr_errno(timeo); | ||
155 | break; | ||
156 | } | ||
157 | |||
158 | if (sk->sk_shutdown & SEND_SHUTDOWN) { | ||
159 | *err = EINVAL; | ||
160 | break; | ||
161 | } | ||
162 | |||
163 | if (sk->sk_err) | ||
164 | break; | ||
165 | |||
166 | len = *size + 11; | ||
167 | space = sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc); | ||
168 | |||
169 | if (space < len) { | ||
170 | if ((sk->sk_socket->type == SOCK_STREAM) && | ||
171 | (space >= (16 + 11))) | ||
172 | len = space; | ||
173 | } | ||
174 | |||
175 | if (space < len) { | ||
176 | set_bit(SOCK_ASYNC_NOSPACE, &sk->sk_socket->flags); | ||
177 | if (noblock) { | ||
178 | *err = EWOULDBLOCK; | ||
179 | break; | ||
180 | } | ||
181 | |||
182 | clear_bit(SOCK_ASYNC_WAITDATA, &sk->sk_socket->flags); | ||
183 | SOCK_SLEEP_PRE(sk) | ||
184 | |||
185 | if ((sk->sk_sndbuf - atomic_read(&sk->sk_wmem_alloc)) < | ||
186 | len) | ||
187 | schedule(); | ||
188 | |||
189 | SOCK_SLEEP_POST(sk) | ||
190 | continue; | ||
191 | } | ||
192 | |||
193 | if ((skb = dn_alloc_skb(sk, len, sk->sk_allocation)) == NULL) | ||
194 | continue; | ||
195 | |||
196 | *size = len - 11; | ||
197 | } | ||
198 | |||
199 | return skb; | ||
200 | } | ||
201 | |||
202 | /* | ||
203 | * Calculate persist timer based upon the smoothed round | 140 | * Calculate persist timer based upon the smoothed round |
204 | * trip time and the variance. Backoff according to the | 141 | * trip time and the variance. Backoff according to the |
205 | * nsp_backoff[] array. | 142 | * nsp_backoff[] array. |
diff --git a/net/ipv4/ah4.c b/net/ipv4/ah4.c index 514c85b2631a..035ad2c9e1ba 100644 --- a/net/ipv4/ah4.c +++ b/net/ipv4/ah4.c | |||
@@ -263,10 +263,8 @@ static int ah_init_state(struct xfrm_state *x) | |||
263 | 263 | ||
264 | error: | 264 | error: |
265 | if (ahp) { | 265 | if (ahp) { |
266 | if (ahp->work_icv) | 266 | kfree(ahp->work_icv); |
267 | kfree(ahp->work_icv); | 267 | crypto_free_tfm(ahp->tfm); |
268 | if (ahp->tfm) | ||
269 | crypto_free_tfm(ahp->tfm); | ||
270 | kfree(ahp); | 268 | kfree(ahp); |
271 | } | 269 | } |
272 | return -EINVAL; | 270 | return -EINVAL; |
@@ -279,14 +277,10 @@ static void ah_destroy(struct xfrm_state *x) | |||
279 | if (!ahp) | 277 | if (!ahp) |
280 | return; | 278 | return; |
281 | 279 | ||
282 | if (ahp->work_icv) { | 280 | kfree(ahp->work_icv); |
283 | kfree(ahp->work_icv); | 281 | ahp->work_icv = NULL; |
284 | ahp->work_icv = NULL; | 282 | crypto_free_tfm(ahp->tfm); |
285 | } | 283 | ahp->tfm = NULL; |
286 | if (ahp->tfm) { | ||
287 | crypto_free_tfm(ahp->tfm); | ||
288 | ahp->tfm = NULL; | ||
289 | } | ||
290 | kfree(ahp); | 284 | kfree(ahp); |
291 | } | 285 | } |
292 | 286 | ||
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index b31ffc5053d2..1b5a09d1b90b 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c | |||
@@ -343,22 +343,14 @@ static void esp_destroy(struct xfrm_state *x) | |||
343 | if (!esp) | 343 | if (!esp) |
344 | return; | 344 | return; |
345 | 345 | ||
346 | if (esp->conf.tfm) { | 346 | crypto_free_tfm(esp->conf.tfm); |
347 | crypto_free_tfm(esp->conf.tfm); | 347 | esp->conf.tfm = NULL; |
348 | esp->conf.tfm = NULL; | 348 | kfree(esp->conf.ivec); |
349 | } | 349 | esp->conf.ivec = NULL; |
350 | if (esp->conf.ivec) { | 350 | crypto_free_tfm(esp->auth.tfm); |
351 | kfree(esp->conf.ivec); | 351 | esp->auth.tfm = NULL; |
352 | esp->conf.ivec = NULL; | 352 | kfree(esp->auth.work_icv); |
353 | } | 353 | esp->auth.work_icv = NULL; |
354 | if (esp->auth.tfm) { | ||
355 | crypto_free_tfm(esp->auth.tfm); | ||
356 | esp->auth.tfm = NULL; | ||
357 | } | ||
358 | if (esp->auth.work_icv) { | ||
359 | kfree(esp->auth.work_icv); | ||
360 | esp->auth.work_icv = NULL; | ||
361 | } | ||
362 | kfree(esp); | 354 | kfree(esp); |
363 | } | 355 | } |
364 | 356 | ||
diff --git a/net/ipv4/ipcomp.c b/net/ipv4/ipcomp.c index dcb7ee6c4858..fc718df17b40 100644 --- a/net/ipv4/ipcomp.c +++ b/net/ipv4/ipcomp.c | |||
@@ -345,8 +345,7 @@ static void ipcomp_free_tfms(struct crypto_tfm **tfms) | |||
345 | 345 | ||
346 | for_each_cpu(cpu) { | 346 | for_each_cpu(cpu) { |
347 | struct crypto_tfm *tfm = *per_cpu_ptr(tfms, cpu); | 347 | struct crypto_tfm *tfm = *per_cpu_ptr(tfms, cpu); |
348 | if (tfm) | 348 | crypto_free_tfm(tfm); |
349 | crypto_free_tfm(tfm); | ||
350 | } | 349 | } |
351 | free_percpu(tfms); | 350 | free_percpu(tfms); |
352 | } | 351 | } |
diff --git a/net/ipv4/netfilter/ipt_CLUSTERIP.c b/net/ipv4/netfilter/ipt_CLUSTERIP.c index 2d05cafec221..7d38913754b1 100644 --- a/net/ipv4/netfilter/ipt_CLUSTERIP.c +++ b/net/ipv4/netfilter/ipt_CLUSTERIP.c | |||
@@ -144,7 +144,7 @@ clusterip_config_init(struct ipt_clusterip_tgt_info *i, u_int32_t ip, | |||
144 | memcpy(&c->clustermac, &i->clustermac, ETH_ALEN); | 144 | memcpy(&c->clustermac, &i->clustermac, ETH_ALEN); |
145 | c->num_total_nodes = i->num_total_nodes; | 145 | c->num_total_nodes = i->num_total_nodes; |
146 | c->num_local_nodes = i->num_local_nodes; | 146 | c->num_local_nodes = i->num_local_nodes; |
147 | memcpy(&c->local_nodes, &i->local_nodes, sizeof(&c->local_nodes)); | 147 | memcpy(&c->local_nodes, &i->local_nodes, sizeof(c->local_nodes)); |
148 | c->hash_mode = i->hash_mode; | 148 | c->hash_mode = i->hash_mode; |
149 | c->hash_initval = i->hash_initval; | 149 | c->hash_initval = i->hash_initval; |
150 | atomic_set(&c->refcount, 1); | 150 | atomic_set(&c->refcount, 1); |
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 02fdda68718d..cbcc9fc47783 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -552,8 +552,7 @@ new_segment: | |||
552 | tcp_mark_push(tp, skb); | 552 | tcp_mark_push(tp, skb); |
553 | goto new_segment; | 553 | goto new_segment; |
554 | } | 554 | } |
555 | if (sk->sk_forward_alloc < copy && | 555 | if (!sk_stream_wmem_schedule(sk, copy)) |
556 | !sk_stream_mem_schedule(sk, copy, 0)) | ||
557 | goto wait_for_memory; | 556 | goto wait_for_memory; |
558 | 557 | ||
559 | if (can_coalesce) { | 558 | if (can_coalesce) { |
@@ -770,19 +769,23 @@ new_segment: | |||
770 | if (off == PAGE_SIZE) { | 769 | if (off == PAGE_SIZE) { |
771 | put_page(page); | 770 | put_page(page); |
772 | TCP_PAGE(sk) = page = NULL; | 771 | TCP_PAGE(sk) = page = NULL; |
772 | TCP_OFF(sk) = off = 0; | ||
773 | } | 773 | } |
774 | } | 774 | } else |
775 | BUG_ON(off); | ||
776 | |||
777 | if (copy > PAGE_SIZE - off) | ||
778 | copy = PAGE_SIZE - off; | ||
779 | |||
780 | if (!sk_stream_wmem_schedule(sk, copy)) | ||
781 | goto wait_for_memory; | ||
775 | 782 | ||
776 | if (!page) { | 783 | if (!page) { |
777 | /* Allocate new cache page. */ | 784 | /* Allocate new cache page. */ |
778 | if (!(page = sk_stream_alloc_page(sk))) | 785 | if (!(page = sk_stream_alloc_page(sk))) |
779 | goto wait_for_memory; | 786 | goto wait_for_memory; |
780 | off = 0; | ||
781 | } | 787 | } |
782 | 788 | ||
783 | if (copy > PAGE_SIZE - off) | ||
784 | copy = PAGE_SIZE - off; | ||
785 | |||
786 | /* Time to copy data. We are close to | 789 | /* Time to copy data. We are close to |
787 | * the end! */ | 790 | * the end! */ |
788 | err = skb_copy_to_page(sk, from, skb, page, | 791 | err = skb_copy_to_page(sk, from, skb, page, |
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 1afb080bdf0c..29222b964951 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -923,14 +923,6 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
923 | int flag = 0; | 923 | int flag = 0; |
924 | int i; | 924 | int i; |
925 | 925 | ||
926 | /* So, SACKs for already sent large segments will be lost. | ||
927 | * Not good, but alternative is to resegment the queue. */ | ||
928 | if (sk->sk_route_caps & NETIF_F_TSO) { | ||
929 | sk->sk_route_caps &= ~NETIF_F_TSO; | ||
930 | sock_set_flag(sk, SOCK_NO_LARGESEND); | ||
931 | tp->mss_cache = tp->mss_cache; | ||
932 | } | ||
933 | |||
934 | if (!tp->sacked_out) | 926 | if (!tp->sacked_out) |
935 | tp->fackets_out = 0; | 927 | tp->fackets_out = 0; |
936 | prior_fackets = tp->fackets_out; | 928 | prior_fackets = tp->fackets_out; |
@@ -978,20 +970,40 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ | |||
978 | flag |= FLAG_DATA_LOST; | 970 | flag |= FLAG_DATA_LOST; |
979 | 971 | ||
980 | sk_stream_for_retrans_queue(skb, sk) { | 972 | sk_stream_for_retrans_queue(skb, sk) { |
981 | u8 sacked = TCP_SKB_CB(skb)->sacked; | 973 | int in_sack, pcount; |
982 | int in_sack; | 974 | u8 sacked; |
983 | 975 | ||
984 | /* The retransmission queue is always in order, so | 976 | /* The retransmission queue is always in order, so |
985 | * we can short-circuit the walk early. | 977 | * we can short-circuit the walk early. |
986 | */ | 978 | */ |
987 | if(!before(TCP_SKB_CB(skb)->seq, end_seq)) | 979 | if (!before(TCP_SKB_CB(skb)->seq, end_seq)) |
988 | break; | 980 | break; |
989 | 981 | ||
990 | fack_count += tcp_skb_pcount(skb); | 982 | pcount = tcp_skb_pcount(skb); |
983 | |||
984 | if (pcount > 1 && | ||
985 | (after(start_seq, TCP_SKB_CB(skb)->seq) || | ||
986 | before(end_seq, TCP_SKB_CB(skb)->end_seq))) { | ||
987 | unsigned int pkt_len; | ||
988 | |||
989 | if (after(start_seq, TCP_SKB_CB(skb)->seq)) | ||
990 | pkt_len = (start_seq - | ||
991 | TCP_SKB_CB(skb)->seq); | ||
992 | else | ||
993 | pkt_len = (end_seq - | ||
994 | TCP_SKB_CB(skb)->seq); | ||
995 | if (tcp_fragment(sk, skb, pkt_len, skb_shinfo(skb)->tso_size)) | ||
996 | break; | ||
997 | pcount = tcp_skb_pcount(skb); | ||
998 | } | ||
999 | |||
1000 | fack_count += pcount; | ||
991 | 1001 | ||
992 | in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) && | 1002 | in_sack = !after(start_seq, TCP_SKB_CB(skb)->seq) && |
993 | !before(end_seq, TCP_SKB_CB(skb)->end_seq); | 1003 | !before(end_seq, TCP_SKB_CB(skb)->end_seq); |
994 | 1004 | ||
1005 | sacked = TCP_SKB_CB(skb)->sacked; | ||
1006 | |||
995 | /* Account D-SACK for retransmitted packet. */ | 1007 | /* Account D-SACK for retransmitted packet. */ |
996 | if ((dup_sack && in_sack) && | 1008 | if ((dup_sack && in_sack) && |
997 | (sacked & TCPCB_RETRANS) && | 1009 | (sacked & TCPCB_RETRANS) && |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 75b68116682a..6094db5e11be 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -428,11 +428,11 @@ static void tcp_set_skb_tso_segs(struct sock *sk, struct sk_buff *skb, unsigned | |||
428 | * packet to the list. This won't be called frequently, I hope. | 428 | * packet to the list. This won't be called frequently, I hope. |
429 | * Remember, these are still headerless SKBs at this point. | 429 | * Remember, these are still headerless SKBs at this point. |
430 | */ | 430 | */ |
431 | static int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss_now) | 431 | int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned int mss_now) |
432 | { | 432 | { |
433 | struct tcp_sock *tp = tcp_sk(sk); | 433 | struct tcp_sock *tp = tcp_sk(sk); |
434 | struct sk_buff *buff; | 434 | struct sk_buff *buff; |
435 | int nsize; | 435 | int nsize, old_factor; |
436 | u16 flags; | 436 | u16 flags; |
437 | 437 | ||
438 | nsize = skb_headlen(skb) - len; | 438 | nsize = skb_headlen(skb) - len; |
@@ -490,18 +490,29 @@ static int tcp_fragment(struct sock *sk, struct sk_buff *skb, u32 len, unsigned | |||
490 | tp->left_out -= tcp_skb_pcount(skb); | 490 | tp->left_out -= tcp_skb_pcount(skb); |
491 | } | 491 | } |
492 | 492 | ||
493 | old_factor = tcp_skb_pcount(skb); | ||
494 | |||
493 | /* Fix up tso_factor for both original and new SKB. */ | 495 | /* Fix up tso_factor for both original and new SKB. */ |
494 | tcp_set_skb_tso_segs(sk, skb, mss_now); | 496 | tcp_set_skb_tso_segs(sk, skb, mss_now); |
495 | tcp_set_skb_tso_segs(sk, buff, mss_now); | 497 | tcp_set_skb_tso_segs(sk, buff, mss_now); |
496 | 498 | ||
497 | if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) { | 499 | /* If this packet has been sent out already, we must |
498 | tp->lost_out += tcp_skb_pcount(skb); | 500 | * adjust the various packet counters. |
499 | tp->left_out += tcp_skb_pcount(skb); | 501 | */ |
500 | } | 502 | if (after(tp->snd_nxt, TCP_SKB_CB(buff)->end_seq)) { |
503 | int diff = old_factor - tcp_skb_pcount(skb) - | ||
504 | tcp_skb_pcount(buff); | ||
501 | 505 | ||
502 | if (TCP_SKB_CB(buff)->sacked&TCPCB_LOST) { | 506 | tp->packets_out -= diff; |
503 | tp->lost_out += tcp_skb_pcount(buff); | 507 | if (TCP_SKB_CB(skb)->sacked & TCPCB_LOST) { |
504 | tp->left_out += tcp_skb_pcount(buff); | 508 | tp->lost_out -= diff; |
509 | tp->left_out -= diff; | ||
510 | } | ||
511 | if (diff > 0) { | ||
512 | tp->fackets_out -= diff; | ||
513 | if ((int)tp->fackets_out < 0) | ||
514 | tp->fackets_out = 0; | ||
515 | } | ||
505 | } | 516 | } |
506 | 517 | ||
507 | /* Link BUFF into the send queue. */ | 518 | /* Link BUFF into the send queue. */ |
@@ -1350,12 +1361,6 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1350 | if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) { | 1361 | if (before(TCP_SKB_CB(skb)->seq, tp->snd_una)) { |
1351 | if (before(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) | 1362 | if (before(TCP_SKB_CB(skb)->end_seq, tp->snd_una)) |
1352 | BUG(); | 1363 | BUG(); |
1353 | |||
1354 | if (sk->sk_route_caps & NETIF_F_TSO) { | ||
1355 | sk->sk_route_caps &= ~NETIF_F_TSO; | ||
1356 | sock_set_flag(sk, SOCK_NO_LARGESEND); | ||
1357 | } | ||
1358 | |||
1359 | if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) | 1364 | if (tcp_trim_head(sk, skb, tp->snd_una - TCP_SKB_CB(skb)->seq)) |
1360 | return -ENOMEM; | 1365 | return -ENOMEM; |
1361 | } | 1366 | } |
@@ -1370,22 +1375,8 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) | |||
1370 | return -EAGAIN; | 1375 | return -EAGAIN; |
1371 | 1376 | ||
1372 | if (skb->len > cur_mss) { | 1377 | if (skb->len > cur_mss) { |
1373 | int old_factor = tcp_skb_pcount(skb); | ||
1374 | int diff; | ||
1375 | |||
1376 | if (tcp_fragment(sk, skb, cur_mss, cur_mss)) | 1378 | if (tcp_fragment(sk, skb, cur_mss, cur_mss)) |
1377 | return -ENOMEM; /* We'll try again later. */ | 1379 | return -ENOMEM; /* We'll try again later. */ |
1378 | |||
1379 | /* New SKB created, account for it. */ | ||
1380 | diff = old_factor - tcp_skb_pcount(skb) - | ||
1381 | tcp_skb_pcount(skb->next); | ||
1382 | tp->packets_out -= diff; | ||
1383 | |||
1384 | if (diff > 0) { | ||
1385 | tp->fackets_out -= diff; | ||
1386 | if ((int)tp->fackets_out < 0) | ||
1387 | tp->fackets_out = 0; | ||
1388 | } | ||
1389 | } | 1380 | } |
1390 | 1381 | ||
1391 | /* Collapse two adjacent packets if worthwhile and we can. */ | 1382 | /* Collapse two adjacent packets if worthwhile and we can. */ |
@@ -1993,12 +1984,6 @@ int tcp_write_wakeup(struct sock *sk) | |||
1993 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; | 1984 | TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_PSH; |
1994 | if (tcp_fragment(sk, skb, seg_size, mss)) | 1985 | if (tcp_fragment(sk, skb, seg_size, mss)) |
1995 | return -1; | 1986 | return -1; |
1996 | /* SWS override triggered forced fragmentation. | ||
1997 | * Disable TSO, the connection is too sick. */ | ||
1998 | if (sk->sk_route_caps & NETIF_F_TSO) { | ||
1999 | sock_set_flag(sk, SOCK_NO_LARGESEND); | ||
2000 | sk->sk_route_caps &= ~NETIF_F_TSO; | ||
2001 | } | ||
2002 | } else if (!tcp_skb_pcount(skb)) | 1987 | } else if (!tcp_skb_pcount(skb)) |
2003 | tcp_set_skb_tso_segs(sk, skb, mss); | 1988 | tcp_set_skb_tso_segs(sk, skb, mss); |
2004 | 1989 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 937ad32db77c..6d6fb74f3b52 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -3593,10 +3593,8 @@ void __exit addrconf_cleanup(void) | |||
3593 | rtnl_unlock(); | 3593 | rtnl_unlock(); |
3594 | 3594 | ||
3595 | #ifdef CONFIG_IPV6_PRIVACY | 3595 | #ifdef CONFIG_IPV6_PRIVACY |
3596 | if (likely(md5_tfm != NULL)) { | 3596 | crypto_free_tfm(md5_tfm); |
3597 | crypto_free_tfm(md5_tfm); | 3597 | md5_tfm = NULL; |
3598 | md5_tfm = NULL; | ||
3599 | } | ||
3600 | #endif | 3598 | #endif |
3601 | 3599 | ||
3602 | #ifdef CONFIG_PROC_FS | 3600 | #ifdef CONFIG_PROC_FS |
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 0ebfad907a03..f3629730eb15 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
@@ -401,10 +401,8 @@ static int ah6_init_state(struct xfrm_state *x) | |||
401 | 401 | ||
402 | error: | 402 | error: |
403 | if (ahp) { | 403 | if (ahp) { |
404 | if (ahp->work_icv) | 404 | kfree(ahp->work_icv); |
405 | kfree(ahp->work_icv); | 405 | crypto_free_tfm(ahp->tfm); |
406 | if (ahp->tfm) | ||
407 | crypto_free_tfm(ahp->tfm); | ||
408 | kfree(ahp); | 406 | kfree(ahp); |
409 | } | 407 | } |
410 | return -EINVAL; | 408 | return -EINVAL; |
@@ -417,14 +415,10 @@ static void ah6_destroy(struct xfrm_state *x) | |||
417 | if (!ahp) | 415 | if (!ahp) |
418 | return; | 416 | return; |
419 | 417 | ||
420 | if (ahp->work_icv) { | 418 | kfree(ahp->work_icv); |
421 | kfree(ahp->work_icv); | 419 | ahp->work_icv = NULL; |
422 | ahp->work_icv = NULL; | 420 | crypto_free_tfm(ahp->tfm); |
423 | } | 421 | ahp->tfm = NULL; |
424 | if (ahp->tfm) { | ||
425 | crypto_free_tfm(ahp->tfm); | ||
426 | ahp->tfm = NULL; | ||
427 | } | ||
428 | kfree(ahp); | 422 | kfree(ahp); |
429 | } | 423 | } |
430 | 424 | ||
diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index e8bff9d3d96c..9b27460f0cc7 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c | |||
@@ -276,22 +276,14 @@ static void esp6_destroy(struct xfrm_state *x) | |||
276 | if (!esp) | 276 | if (!esp) |
277 | return; | 277 | return; |
278 | 278 | ||
279 | if (esp->conf.tfm) { | 279 | crypto_free_tfm(esp->conf.tfm); |
280 | crypto_free_tfm(esp->conf.tfm); | 280 | esp->conf.tfm = NULL; |
281 | esp->conf.tfm = NULL; | 281 | kfree(esp->conf.ivec); |
282 | } | 282 | esp->conf.ivec = NULL; |
283 | if (esp->conf.ivec) { | 283 | crypto_free_tfm(esp->auth.tfm); |
284 | kfree(esp->conf.ivec); | 284 | esp->auth.tfm = NULL; |
285 | esp->conf.ivec = NULL; | 285 | kfree(esp->auth.work_icv); |
286 | } | 286 | esp->auth.work_icv = NULL; |
287 | if (esp->auth.tfm) { | ||
288 | crypto_free_tfm(esp->auth.tfm); | ||
289 | esp->auth.tfm = NULL; | ||
290 | } | ||
291 | if (esp->auth.work_icv) { | ||
292 | kfree(esp->auth.work_icv); | ||
293 | esp->auth.work_icv = NULL; | ||
294 | } | ||
295 | kfree(esp); | 287 | kfree(esp); |
296 | } | 288 | } |
297 | 289 | ||
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index 5176fc655ea9..fa8f1bb0aa52 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
@@ -549,7 +549,7 @@ static void icmpv6_notify(struct sk_buff *skb, int type, int code, u32 info) | |||
549 | read_lock(&raw_v6_lock); | 549 | read_lock(&raw_v6_lock); |
550 | if ((sk = sk_head(&raw_v6_htable[hash])) != NULL) { | 550 | if ((sk = sk_head(&raw_v6_htable[hash])) != NULL) { |
551 | while((sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, | 551 | while((sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, |
552 | skb->dev->ifindex))) { | 552 | IP6CB(skb)->iif))) { |
553 | rawv6_err(sk, skb, NULL, type, code, inner_offset, info); | 553 | rawv6_err(sk, skb, NULL, type, code, inner_offset, info); |
554 | sk = sk_next(sk); | 554 | sk = sk_next(sk); |
555 | } | 555 | } |
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 135383ef538f..85bfbc69b2c3 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c | |||
@@ -341,8 +341,7 @@ static void ipcomp6_free_tfms(struct crypto_tfm **tfms) | |||
341 | 341 | ||
342 | for_each_cpu(cpu) { | 342 | for_each_cpu(cpu) { |
343 | struct crypto_tfm *tfm = *per_cpu_ptr(tfms, cpu); | 343 | struct crypto_tfm *tfm = *per_cpu_ptr(tfms, cpu); |
344 | if (tfm) | 344 | crypto_free_tfm(tfm); |
345 | crypto_free_tfm(tfm); | ||
346 | } | 345 | } |
347 | free_percpu(tfms); | 346 | free_percpu(tfms); |
348 | } | 347 | } |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 7a5863298f3f..ed3a76b30fd9 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
@@ -166,7 +166,7 @@ int ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) | |||
166 | if (sk == NULL) | 166 | if (sk == NULL) |
167 | goto out; | 167 | goto out; |
168 | 168 | ||
169 | sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, skb->dev->ifindex); | 169 | sk = __raw_v6_lookup(sk, nexthdr, daddr, saddr, IP6CB(skb)->iif); |
170 | 170 | ||
171 | while (sk) { | 171 | while (sk) { |
172 | delivered = 1; | 172 | delivered = 1; |
@@ -178,7 +178,7 @@ int ipv6_raw_deliver(struct sk_buff *skb, int nexthdr) | |||
178 | rawv6_rcv(sk, clone); | 178 | rawv6_rcv(sk, clone); |
179 | } | 179 | } |
180 | sk = __raw_v6_lookup(sk_next(sk), nexthdr, daddr, saddr, | 180 | sk = __raw_v6_lookup(sk_next(sk), nexthdr, daddr, saddr, |
181 | skb->dev->ifindex); | 181 | IP6CB(skb)->iif); |
182 | } | 182 | } |
183 | out: | 183 | out: |
184 | read_unlock(&raw_v6_lock); | 184 | read_unlock(&raw_v6_lock); |
diff --git a/net/sctp/endpointola.c b/net/sctp/endpointola.c index e47ac0d1a6d6..e22ccd655965 100644 --- a/net/sctp/endpointola.c +++ b/net/sctp/endpointola.c | |||
@@ -193,8 +193,7 @@ static void sctp_endpoint_destroy(struct sctp_endpoint *ep) | |||
193 | sctp_unhash_endpoint(ep); | 193 | sctp_unhash_endpoint(ep); |
194 | 194 | ||
195 | /* Free up the HMAC transform. */ | 195 | /* Free up the HMAC transform. */ |
196 | if (sctp_sk(ep->base.sk)->hmac) | 196 | sctp_crypto_free_tfm(sctp_sk(ep->base.sk)->hmac); |
197 | sctp_crypto_free_tfm(sctp_sk(ep->base.sk)->hmac); | ||
198 | 197 | ||
199 | /* Cleanup. */ | 198 | /* Cleanup. */ |
200 | sctp_inq_free(&ep->base.inqueue); | 199 | sctp_inq_free(&ep->base.inqueue); |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 4454afe4727e..91ec8c936913 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -4194,8 +4194,7 @@ out: | |||
4194 | sctp_release_sock(sk); | 4194 | sctp_release_sock(sk); |
4195 | return err; | 4195 | return err; |
4196 | cleanup: | 4196 | cleanup: |
4197 | if (tfm) | 4197 | sctp_crypto_free_tfm(tfm); |
4198 | sctp_crypto_free_tfm(tfm); | ||
4199 | goto out; | 4198 | goto out; |
4200 | } | 4199 | } |
4201 | 4200 | ||
diff --git a/net/sunrpc/auth_gss/gss_krb5_crypto.c b/net/sunrpc/auth_gss/gss_krb5_crypto.c index 5a7265aeaf83..ee6ae74cd1b2 100644 --- a/net/sunrpc/auth_gss/gss_krb5_crypto.c +++ b/net/sunrpc/auth_gss/gss_krb5_crypto.c | |||
@@ -160,7 +160,7 @@ make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, | |||
160 | " unsupported checksum %d", cksumtype); | 160 | " unsupported checksum %d", cksumtype); |
161 | goto out; | 161 | goto out; |
162 | } | 162 | } |
163 | if (!(tfm = crypto_alloc_tfm(cksumname, 0))) | 163 | if (!(tfm = crypto_alloc_tfm(cksumname, CRYPTO_TFM_REQ_MAY_SLEEP))) |
164 | goto out; | 164 | goto out; |
165 | cksum->len = crypto_tfm_alg_digestsize(tfm); | 165 | cksum->len = crypto_tfm_alg_digestsize(tfm); |
166 | if ((cksum->data = kmalloc(cksum->len, GFP_KERNEL)) == NULL) | 166 | if ((cksum->data = kmalloc(cksum->len, GFP_KERNEL)) == NULL) |
@@ -199,8 +199,7 @@ make_checksum(s32 cksumtype, char *header, int hdrlen, struct xdr_buf *body, | |||
199 | crypto_digest_final(tfm, cksum->data); | 199 | crypto_digest_final(tfm, cksum->data); |
200 | code = 0; | 200 | code = 0; |
201 | out: | 201 | out: |
202 | if (tfm) | 202 | crypto_free_tfm(tfm); |
203 | crypto_free_tfm(tfm); | ||
204 | return code; | 203 | return code; |
205 | } | 204 | } |
206 | 205 | ||
diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c index cf726510df8e..606a8a82cafb 100644 --- a/net/sunrpc/auth_gss/gss_krb5_mech.c +++ b/net/sunrpc/auth_gss/gss_krb5_mech.c | |||
@@ -185,12 +185,9 @@ static void | |||
185 | gss_delete_sec_context_kerberos(void *internal_ctx) { | 185 | gss_delete_sec_context_kerberos(void *internal_ctx) { |
186 | struct krb5_ctx *kctx = internal_ctx; | 186 | struct krb5_ctx *kctx = internal_ctx; |
187 | 187 | ||
188 | if (kctx->seq) | 188 | crypto_free_tfm(kctx->seq); |
189 | crypto_free_tfm(kctx->seq); | 189 | crypto_free_tfm(kctx->enc); |
190 | if (kctx->enc) | 190 | kfree(kctx->mech_used.data); |
191 | crypto_free_tfm(kctx->enc); | ||
192 | if (kctx->mech_used.data) | ||
193 | kfree(kctx->mech_used.data); | ||
194 | kfree(kctx); | 191 | kfree(kctx); |
195 | } | 192 | } |
196 | 193 | ||
diff --git a/net/sunrpc/auth_gss/gss_spkm3_mech.c b/net/sunrpc/auth_gss/gss_spkm3_mech.c index dad05994c3eb..6c97d61baa9b 100644 --- a/net/sunrpc/auth_gss/gss_spkm3_mech.c +++ b/net/sunrpc/auth_gss/gss_spkm3_mech.c | |||
@@ -214,14 +214,10 @@ static void | |||
214 | gss_delete_sec_context_spkm3(void *internal_ctx) { | 214 | gss_delete_sec_context_spkm3(void *internal_ctx) { |
215 | struct spkm3_ctx *sctx = internal_ctx; | 215 | struct spkm3_ctx *sctx = internal_ctx; |
216 | 216 | ||
217 | if(sctx->derived_integ_key) | 217 | crypto_free_tfm(sctx->derived_integ_key); |
218 | crypto_free_tfm(sctx->derived_integ_key); | 218 | crypto_free_tfm(sctx->derived_conf_key); |
219 | if(sctx->derived_conf_key) | 219 | kfree(sctx->share_key.data); |
220 | crypto_free_tfm(sctx->derived_conf_key); | 220 | kfree(sctx->mech_used.data); |
221 | if(sctx->share_key.data) | ||
222 | kfree(sctx->share_key.data); | ||
223 | if(sctx->mech_used.data) | ||
224 | kfree(sctx->mech_used.data); | ||
225 | kfree(sctx); | 221 | kfree(sctx); |
226 | } | 222 | } |
227 | 223 | ||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 09abb891d11f..2fcb244a9e18 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -27,8 +27,20 @@ update-po-config: $(obj)/kxgettext | |||
27 | xgettext --default-domain=linux \ | 27 | xgettext --default-domain=linux \ |
28 | --add-comments --keyword=_ --keyword=N_ \ | 28 | --add-comments --keyword=_ --keyword=N_ \ |
29 | --files-from=scripts/kconfig/POTFILES.in \ | 29 | --files-from=scripts/kconfig/POTFILES.in \ |
30 | -o scripts/kconfig/linux.pot | 30 | --output scripts/kconfig/config.pot |
31 | scripts/kconfig/kxgettext arch/$(ARCH)/Kconfig >> scripts/kconfig/linux.pot | 31 | $(Q)ln -fs Kconfig_i386 arch/um/Kconfig_arch |
32 | $(Q)for i in `ls arch/`; \ | ||
33 | do \ | ||
34 | scripts/kconfig/kxgettext arch/$$i/Kconfig \ | ||
35 | | msguniq -o scripts/kconfig/linux_$${i}.pot; \ | ||
36 | done | ||
37 | $(Q)msgcat scripts/kconfig/config.pot \ | ||
38 | `find scripts/kconfig/ -type f -name linux_*.pot` \ | ||
39 | --output scripts/kconfig/linux_raw.pot | ||
40 | $(Q)msguniq --sort-by-file scripts/kconfig/linux_raw.pot \ | ||
41 | --output scripts/kconfig/linux.pot | ||
42 | $(Q)rm -f arch/um/Kconfig_arch | ||
43 | $(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot | ||
32 | 44 | ||
33 | .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig | 45 | .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig |
34 | 46 | ||
diff --git a/scripts/kconfig/kxgettext.c b/scripts/kconfig/kxgettext.c index 1c88d7c6d5a7..abee55ca6174 100644 --- a/scripts/kconfig/kxgettext.c +++ b/scripts/kconfig/kxgettext.c | |||
@@ -14,6 +14,11 @@ static char *escape(const char* text, char *bf, int len) | |||
14 | { | 14 | { |
15 | char *bfp = bf; | 15 | char *bfp = bf; |
16 | int multiline = strchr(text, '\n') != NULL; | 16 | int multiline = strchr(text, '\n') != NULL; |
17 | int eol = 0; | ||
18 | int textlen = strlen(text); | ||
19 | |||
20 | if ((textlen > 0) && (text[textlen-1] == '\n')) | ||
21 | eol = 1; | ||
17 | 22 | ||
18 | *bfp++ = '"'; | 23 | *bfp++ = '"'; |
19 | --len; | 24 | --len; |
@@ -43,7 +48,7 @@ next: | |||
43 | --len; | 48 | --len; |
44 | } | 49 | } |
45 | 50 | ||
46 | if (multiline) | 51 | if (multiline && eol) |
47 | bfp -= 3; | 52 | bfp -= 3; |
48 | 53 | ||
49 | *bfp++ = '"'; | 54 | *bfp++ = '"'; |
@@ -179,7 +184,11 @@ static void message__print_file_lineno(struct message *self) | |||
179 | { | 184 | { |
180 | struct file_line *fl = self->files; | 185 | struct file_line *fl = self->files; |
181 | 186 | ||
182 | printf("\n#: %s:%d", fl->file, fl->lineno); | 187 | putchar('\n'); |
188 | if (self->option != NULL) | ||
189 | printf("# %s:00000\n", self->option); | ||
190 | |||
191 | printf("#: %s:%d", fl->file, fl->lineno); | ||
183 | fl = fl->next; | 192 | fl = fl->next; |
184 | 193 | ||
185 | while (fl != NULL) { | 194 | while (fl != NULL) { |
@@ -187,9 +196,6 @@ static void message__print_file_lineno(struct message *self) | |||
187 | fl = fl->next; | 196 | fl = fl->next; |
188 | } | 197 | } |
189 | 198 | ||
190 | if (self->option != NULL) | ||
191 | printf(", %s:00000", self->option); | ||
192 | |||
193 | putchar('\n'); | 199 | putchar('\n'); |
194 | } | 200 | } |
195 | 201 | ||
diff --git a/security/seclvl.c b/security/seclvl.c index c8e87b22c9bd..96b1f2122f67 100644 --- a/security/seclvl.c +++ b/security/seclvl.c | |||
@@ -321,7 +321,7 @@ plaintext_to_sha1(unsigned char *hash, const char *plaintext, int len) | |||
321 | "bytes.\n", len, PAGE_SIZE); | 321 | "bytes.\n", len, PAGE_SIZE); |
322 | return -ENOMEM; | 322 | return -ENOMEM; |
323 | } | 323 | } |
324 | tfm = crypto_alloc_tfm("sha1", 0); | 324 | tfm = crypto_alloc_tfm("sha1", CRYPTO_TFM_REQ_MAY_SLEEP); |
325 | if (tfm == NULL) { | 325 | if (tfm == NULL) { |
326 | seclvl_printk(0, KERN_ERR, | 326 | seclvl_printk(0, KERN_ERR, |
327 | "Failed to load transform for SHA1\n"); | 327 | "Failed to load transform for SHA1\n"); |
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 451502467a9b..cf6020f85403 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c | |||
@@ -490,7 +490,7 @@ out: | |||
490 | } | 490 | } |
491 | 491 | ||
492 | static inline void avc_print_ipv6_addr(struct audit_buffer *ab, | 492 | static inline void avc_print_ipv6_addr(struct audit_buffer *ab, |
493 | struct in6_addr *addr, u16 port, | 493 | struct in6_addr *addr, __be16 port, |
494 | char *name1, char *name2) | 494 | char *name1, char *name2) |
495 | { | 495 | { |
496 | if (!ipv6_addr_any(addr)) | 496 | if (!ipv6_addr_any(addr)) |
@@ -501,7 +501,7 @@ static inline void avc_print_ipv6_addr(struct audit_buffer *ab, | |||
501 | } | 501 | } |
502 | 502 | ||
503 | static inline void avc_print_ipv4_addr(struct audit_buffer *ab, u32 addr, | 503 | static inline void avc_print_ipv4_addr(struct audit_buffer *ab, u32 addr, |
504 | u16 port, char *name1, char *name2) | 504 | __be16 port, char *name1, char *name2) |
505 | { | 505 | { |
506 | if (addr) | 506 | if (addr) |
507 | audit_log_format(ab, " %s=%d.%d.%d.%d", name1, NIPQUAD(addr)); | 507 | audit_log_format(ab, " %s=%d.%d.%d.%d", name1, NIPQUAD(addr)); |
diff --git a/security/selinux/include/security.h b/security/selinux/include/security.h index 71c0a19c9753..5f016c98056f 100644 --- a/security/selinux/include/security.h +++ b/security/selinux/include/security.h | |||
@@ -23,10 +23,11 @@ | |||
23 | #define POLICYDB_VERSION_NLCLASS 18 | 23 | #define POLICYDB_VERSION_NLCLASS 18 |
24 | #define POLICYDB_VERSION_VALIDATETRANS 19 | 24 | #define POLICYDB_VERSION_VALIDATETRANS 19 |
25 | #define POLICYDB_VERSION_MLS 19 | 25 | #define POLICYDB_VERSION_MLS 19 |
26 | #define POLICYDB_VERSION_AVTAB 20 | ||
26 | 27 | ||
27 | /* Range of policy versions we understand*/ | 28 | /* Range of policy versions we understand*/ |
28 | #define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE | 29 | #define POLICYDB_VERSION_MIN POLICYDB_VERSION_BASE |
29 | #define POLICYDB_VERSION_MAX POLICYDB_VERSION_MLS | 30 | #define POLICYDB_VERSION_MAX POLICYDB_VERSION_AVTAB |
30 | 31 | ||
31 | #ifdef CONFIG_SECURITY_SELINUX_BOOTPARAM | 32 | #ifdef CONFIG_SECURITY_SELINUX_BOOTPARAM |
32 | extern int selinux_enabled; | 33 | extern int selinux_enabled; |
diff --git a/security/selinux/ss/avtab.c b/security/selinux/ss/avtab.c index f238c034c44e..dde094feb20d 100644 --- a/security/selinux/ss/avtab.c +++ b/security/selinux/ss/avtab.c | |||
@@ -58,6 +58,7 @@ static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_dat | |||
58 | { | 58 | { |
59 | int hvalue; | 59 | int hvalue; |
60 | struct avtab_node *prev, *cur, *newnode; | 60 | struct avtab_node *prev, *cur, *newnode; |
61 | u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); | ||
61 | 62 | ||
62 | if (!h) | 63 | if (!h) |
63 | return -EINVAL; | 64 | return -EINVAL; |
@@ -69,7 +70,7 @@ static int avtab_insert(struct avtab *h, struct avtab_key *key, struct avtab_dat | |||
69 | if (key->source_type == cur->key.source_type && | 70 | if (key->source_type == cur->key.source_type && |
70 | key->target_type == cur->key.target_type && | 71 | key->target_type == cur->key.target_type && |
71 | key->target_class == cur->key.target_class && | 72 | key->target_class == cur->key.target_class && |
72 | (datum->specified & cur->datum.specified)) | 73 | (specified & cur->key.specified)) |
73 | return -EEXIST; | 74 | return -EEXIST; |
74 | if (key->source_type < cur->key.source_type) | 75 | if (key->source_type < cur->key.source_type) |
75 | break; | 76 | break; |
@@ -98,6 +99,7 @@ avtab_insert_nonunique(struct avtab * h, struct avtab_key * key, struct avtab_da | |||
98 | { | 99 | { |
99 | int hvalue; | 100 | int hvalue; |
100 | struct avtab_node *prev, *cur, *newnode; | 101 | struct avtab_node *prev, *cur, *newnode; |
102 | u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); | ||
101 | 103 | ||
102 | if (!h) | 104 | if (!h) |
103 | return NULL; | 105 | return NULL; |
@@ -108,7 +110,7 @@ avtab_insert_nonunique(struct avtab * h, struct avtab_key * key, struct avtab_da | |||
108 | if (key->source_type == cur->key.source_type && | 110 | if (key->source_type == cur->key.source_type && |
109 | key->target_type == cur->key.target_type && | 111 | key->target_type == cur->key.target_type && |
110 | key->target_class == cur->key.target_class && | 112 | key->target_class == cur->key.target_class && |
111 | (datum->specified & cur->datum.specified)) | 113 | (specified & cur->key.specified)) |
112 | break; | 114 | break; |
113 | if (key->source_type < cur->key.source_type) | 115 | if (key->source_type < cur->key.source_type) |
114 | break; | 116 | break; |
@@ -125,10 +127,11 @@ avtab_insert_nonunique(struct avtab * h, struct avtab_key * key, struct avtab_da | |||
125 | return newnode; | 127 | return newnode; |
126 | } | 128 | } |
127 | 129 | ||
128 | struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *key, int specified) | 130 | struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *key) |
129 | { | 131 | { |
130 | int hvalue; | 132 | int hvalue; |
131 | struct avtab_node *cur; | 133 | struct avtab_node *cur; |
134 | u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); | ||
132 | 135 | ||
133 | if (!h) | 136 | if (!h) |
134 | return NULL; | 137 | return NULL; |
@@ -138,7 +141,7 @@ struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *key, int spe | |||
138 | if (key->source_type == cur->key.source_type && | 141 | if (key->source_type == cur->key.source_type && |
139 | key->target_type == cur->key.target_type && | 142 | key->target_type == cur->key.target_type && |
140 | key->target_class == cur->key.target_class && | 143 | key->target_class == cur->key.target_class && |
141 | (specified & cur->datum.specified)) | 144 | (specified & cur->key.specified)) |
142 | return &cur->datum; | 145 | return &cur->datum; |
143 | 146 | ||
144 | if (key->source_type < cur->key.source_type) | 147 | if (key->source_type < cur->key.source_type) |
@@ -159,10 +162,11 @@ struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *key, int spe | |||
159 | * conjunction with avtab_search_next_node() | 162 | * conjunction with avtab_search_next_node() |
160 | */ | 163 | */ |
161 | struct avtab_node* | 164 | struct avtab_node* |
162 | avtab_search_node(struct avtab *h, struct avtab_key *key, int specified) | 165 | avtab_search_node(struct avtab *h, struct avtab_key *key) |
163 | { | 166 | { |
164 | int hvalue; | 167 | int hvalue; |
165 | struct avtab_node *cur; | 168 | struct avtab_node *cur; |
169 | u16 specified = key->specified & ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); | ||
166 | 170 | ||
167 | if (!h) | 171 | if (!h) |
168 | return NULL; | 172 | return NULL; |
@@ -172,7 +176,7 @@ avtab_search_node(struct avtab *h, struct avtab_key *key, int specified) | |||
172 | if (key->source_type == cur->key.source_type && | 176 | if (key->source_type == cur->key.source_type && |
173 | key->target_type == cur->key.target_type && | 177 | key->target_type == cur->key.target_type && |
174 | key->target_class == cur->key.target_class && | 178 | key->target_class == cur->key.target_class && |
175 | (specified & cur->datum.specified)) | 179 | (specified & cur->key.specified)) |
176 | return cur; | 180 | return cur; |
177 | 181 | ||
178 | if (key->source_type < cur->key.source_type) | 182 | if (key->source_type < cur->key.source_type) |
@@ -196,11 +200,12 @@ avtab_search_node_next(struct avtab_node *node, int specified) | |||
196 | if (!node) | 200 | if (!node) |
197 | return NULL; | 201 | return NULL; |
198 | 202 | ||
203 | specified &= ~(AVTAB_ENABLED|AVTAB_ENABLED_OLD); | ||
199 | for (cur = node->next; cur; cur = cur->next) { | 204 | for (cur = node->next; cur; cur = cur->next) { |
200 | if (node->key.source_type == cur->key.source_type && | 205 | if (node->key.source_type == cur->key.source_type && |
201 | node->key.target_type == cur->key.target_type && | 206 | node->key.target_type == cur->key.target_type && |
202 | node->key.target_class == cur->key.target_class && | 207 | node->key.target_class == cur->key.target_class && |
203 | (specified & cur->datum.specified)) | 208 | (specified & cur->key.specified)) |
204 | return cur; | 209 | return cur; |
205 | 210 | ||
206 | if (node->key.source_type < cur->key.source_type) | 211 | if (node->key.source_type < cur->key.source_type) |
@@ -278,76 +283,129 @@ void avtab_hash_eval(struct avtab *h, char *tag) | |||
278 | max_chain_len); | 283 | max_chain_len); |
279 | } | 284 | } |
280 | 285 | ||
281 | int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey) | 286 | static uint16_t spec_order[] = { |
287 | AVTAB_ALLOWED, | ||
288 | AVTAB_AUDITDENY, | ||
289 | AVTAB_AUDITALLOW, | ||
290 | AVTAB_TRANSITION, | ||
291 | AVTAB_CHANGE, | ||
292 | AVTAB_MEMBER | ||
293 | }; | ||
294 | |||
295 | int avtab_read_item(void *fp, u32 vers, struct avtab *a, | ||
296 | int (*insertf)(struct avtab *a, struct avtab_key *k, | ||
297 | struct avtab_datum *d, void *p), | ||
298 | void *p) | ||
282 | { | 299 | { |
283 | u32 buf[7]; | 300 | __le16 buf16[4]; |
284 | u32 items, items2; | 301 | u16 enabled; |
285 | int rc; | 302 | __le32 buf32[7]; |
303 | u32 items, items2, val; | ||
304 | struct avtab_key key; | ||
305 | struct avtab_datum datum; | ||
306 | int i, rc; | ||
307 | |||
308 | memset(&key, 0, sizeof(struct avtab_key)); | ||
309 | memset(&datum, 0, sizeof(struct avtab_datum)); | ||
310 | |||
311 | if (vers < POLICYDB_VERSION_AVTAB) { | ||
312 | rc = next_entry(buf32, fp, sizeof(u32)); | ||
313 | if (rc < 0) { | ||
314 | printk(KERN_ERR "security: avtab: truncated entry\n"); | ||
315 | return -1; | ||
316 | } | ||
317 | items2 = le32_to_cpu(buf32[0]); | ||
318 | if (items2 > ARRAY_SIZE(buf32)) { | ||
319 | printk(KERN_ERR "security: avtab: entry overflow\n"); | ||
320 | return -1; | ||
286 | 321 | ||
287 | memset(avkey, 0, sizeof(struct avtab_key)); | 322 | } |
288 | memset(avdatum, 0, sizeof(struct avtab_datum)); | 323 | rc = next_entry(buf32, fp, sizeof(u32)*items2); |
324 | if (rc < 0) { | ||
325 | printk(KERN_ERR "security: avtab: truncated entry\n"); | ||
326 | return -1; | ||
327 | } | ||
328 | items = 0; | ||
289 | 329 | ||
290 | rc = next_entry(buf, fp, sizeof(u32)); | 330 | val = le32_to_cpu(buf32[items++]); |
291 | if (rc < 0) { | 331 | key.source_type = (u16)val; |
292 | printk(KERN_ERR "security: avtab: truncated entry\n"); | 332 | if (key.source_type != val) { |
293 | goto bad; | 333 | printk("security: avtab: truncated source type\n"); |
294 | } | 334 | return -1; |
295 | items2 = le32_to_cpu(buf[0]); | 335 | } |
296 | if (items2 > ARRAY_SIZE(buf)) { | 336 | val = le32_to_cpu(buf32[items++]); |
297 | printk(KERN_ERR "security: avtab: entry overflow\n"); | 337 | key.target_type = (u16)val; |
298 | goto bad; | 338 | if (key.target_type != val) { |
339 | printk("security: avtab: truncated target type\n"); | ||
340 | return -1; | ||
341 | } | ||
342 | val = le32_to_cpu(buf32[items++]); | ||
343 | key.target_class = (u16)val; | ||
344 | if (key.target_class != val) { | ||
345 | printk("security: avtab: truncated target class\n"); | ||
346 | return -1; | ||
347 | } | ||
348 | |||
349 | val = le32_to_cpu(buf32[items++]); | ||
350 | enabled = (val & AVTAB_ENABLED_OLD) ? AVTAB_ENABLED : 0; | ||
351 | |||
352 | if (!(val & (AVTAB_AV | AVTAB_TYPE))) { | ||
353 | printk("security: avtab: null entry\n"); | ||
354 | return -1; | ||
355 | } | ||
356 | if ((val & AVTAB_AV) && | ||
357 | (val & AVTAB_TYPE)) { | ||
358 | printk("security: avtab: entry has both access vectors and types\n"); | ||
359 | return -1; | ||
360 | } | ||
361 | |||
362 | for (i = 0; i < sizeof(spec_order)/sizeof(u16); i++) { | ||
363 | if (val & spec_order[i]) { | ||
364 | key.specified = spec_order[i] | enabled; | ||
365 | datum.data = le32_to_cpu(buf32[items++]); | ||
366 | rc = insertf(a, &key, &datum, p); | ||
367 | if (rc) return rc; | ||
368 | } | ||
369 | } | ||
370 | |||
371 | if (items != items2) { | ||
372 | printk("security: avtab: entry only had %d items, expected %d\n", items2, items); | ||
373 | return -1; | ||
374 | } | ||
375 | return 0; | ||
299 | } | 376 | } |
300 | rc = next_entry(buf, fp, sizeof(u32)*items2); | 377 | |
378 | rc = next_entry(buf16, fp, sizeof(u16)*4); | ||
301 | if (rc < 0) { | 379 | if (rc < 0) { |
302 | printk(KERN_ERR "security: avtab: truncated entry\n"); | 380 | printk("security: avtab: truncated entry\n"); |
303 | goto bad; | 381 | return -1; |
304 | } | 382 | } |
383 | |||
305 | items = 0; | 384 | items = 0; |
306 | avkey->source_type = le32_to_cpu(buf[items++]); | 385 | key.source_type = le16_to_cpu(buf16[items++]); |
307 | avkey->target_type = le32_to_cpu(buf[items++]); | 386 | key.target_type = le16_to_cpu(buf16[items++]); |
308 | avkey->target_class = le32_to_cpu(buf[items++]); | 387 | key.target_class = le16_to_cpu(buf16[items++]); |
309 | avdatum->specified = le32_to_cpu(buf[items++]); | 388 | key.specified = le16_to_cpu(buf16[items++]); |
310 | if (!(avdatum->specified & (AVTAB_AV | AVTAB_TYPE))) { | 389 | |
311 | printk(KERN_ERR "security: avtab: null entry\n"); | 390 | rc = next_entry(buf32, fp, sizeof(u32)); |
312 | goto bad; | 391 | if (rc < 0) { |
313 | } | 392 | printk("security: avtab: truncated entry\n"); |
314 | if ((avdatum->specified & AVTAB_AV) && | 393 | return -1; |
315 | (avdatum->specified & AVTAB_TYPE)) { | ||
316 | printk(KERN_ERR "security: avtab: entry has both access vectors and types\n"); | ||
317 | goto bad; | ||
318 | } | ||
319 | if (avdatum->specified & AVTAB_AV) { | ||
320 | if (avdatum->specified & AVTAB_ALLOWED) | ||
321 | avtab_allowed(avdatum) = le32_to_cpu(buf[items++]); | ||
322 | if (avdatum->specified & AVTAB_AUDITDENY) | ||
323 | avtab_auditdeny(avdatum) = le32_to_cpu(buf[items++]); | ||
324 | if (avdatum->specified & AVTAB_AUDITALLOW) | ||
325 | avtab_auditallow(avdatum) = le32_to_cpu(buf[items++]); | ||
326 | } else { | ||
327 | if (avdatum->specified & AVTAB_TRANSITION) | ||
328 | avtab_transition(avdatum) = le32_to_cpu(buf[items++]); | ||
329 | if (avdatum->specified & AVTAB_CHANGE) | ||
330 | avtab_change(avdatum) = le32_to_cpu(buf[items++]); | ||
331 | if (avdatum->specified & AVTAB_MEMBER) | ||
332 | avtab_member(avdatum) = le32_to_cpu(buf[items++]); | ||
333 | } | ||
334 | if (items != items2) { | ||
335 | printk(KERN_ERR "security: avtab: entry only had %d items, expected %d\n", | ||
336 | items2, items); | ||
337 | goto bad; | ||
338 | } | 394 | } |
395 | datum.data = le32_to_cpu(*buf32); | ||
396 | return insertf(a, &key, &datum, p); | ||
397 | } | ||
339 | 398 | ||
340 | return 0; | 399 | static int avtab_insertf(struct avtab *a, struct avtab_key *k, |
341 | bad: | 400 | struct avtab_datum *d, void *p) |
342 | return -1; | 401 | { |
402 | return avtab_insert(a, k, d); | ||
343 | } | 403 | } |
344 | 404 | ||
345 | int avtab_read(struct avtab *a, void *fp, u32 config) | 405 | int avtab_read(struct avtab *a, void *fp, u32 vers) |
346 | { | 406 | { |
347 | int rc; | 407 | int rc; |
348 | struct avtab_key avkey; | 408 | __le32 buf[1]; |
349 | struct avtab_datum avdatum; | ||
350 | u32 buf[1]; | ||
351 | u32 nel, i; | 409 | u32 nel, i; |
352 | 410 | ||
353 | 411 | ||
@@ -363,16 +421,14 @@ int avtab_read(struct avtab *a, void *fp, u32 config) | |||
363 | goto bad; | 421 | goto bad; |
364 | } | 422 | } |
365 | for (i = 0; i < nel; i++) { | 423 | for (i = 0; i < nel; i++) { |
366 | if (avtab_read_item(fp, &avdatum, &avkey)) { | 424 | rc = avtab_read_item(fp,vers, a, avtab_insertf, NULL); |
367 | rc = -EINVAL; | ||
368 | goto bad; | ||
369 | } | ||
370 | rc = avtab_insert(a, &avkey, &avdatum); | ||
371 | if (rc) { | 425 | if (rc) { |
372 | if (rc == -ENOMEM) | 426 | if (rc == -ENOMEM) |
373 | printk(KERN_ERR "security: avtab: out of memory\n"); | 427 | printk(KERN_ERR "security: avtab: out of memory\n"); |
374 | if (rc == -EEXIST) | 428 | else if (rc == -EEXIST) |
375 | printk(KERN_ERR "security: avtab: duplicate entry\n"); | 429 | printk(KERN_ERR "security: avtab: duplicate entry\n"); |
430 | else | ||
431 | rc = -EINVAL; | ||
376 | goto bad; | 432 | goto bad; |
377 | } | 433 | } |
378 | } | 434 | } |
diff --git a/security/selinux/ss/avtab.h b/security/selinux/ss/avtab.h index 519d4f6dc655..0a90d939af93 100644 --- a/security/selinux/ss/avtab.h +++ b/security/selinux/ss/avtab.h | |||
@@ -21,12 +21,9 @@ | |||
21 | #define _SS_AVTAB_H_ | 21 | #define _SS_AVTAB_H_ |
22 | 22 | ||
23 | struct avtab_key { | 23 | struct avtab_key { |
24 | u32 source_type; /* source type */ | 24 | u16 source_type; /* source type */ |
25 | u32 target_type; /* target type */ | 25 | u16 target_type; /* target type */ |
26 | u32 target_class; /* target object class */ | 26 | u16 target_class; /* target object class */ |
27 | }; | ||
28 | |||
29 | struct avtab_datum { | ||
30 | #define AVTAB_ALLOWED 1 | 27 | #define AVTAB_ALLOWED 1 |
31 | #define AVTAB_AUDITALLOW 2 | 28 | #define AVTAB_AUDITALLOW 2 |
32 | #define AVTAB_AUDITDENY 4 | 29 | #define AVTAB_AUDITDENY 4 |
@@ -35,15 +32,13 @@ struct avtab_datum { | |||
35 | #define AVTAB_MEMBER 32 | 32 | #define AVTAB_MEMBER 32 |
36 | #define AVTAB_CHANGE 64 | 33 | #define AVTAB_CHANGE 64 |
37 | #define AVTAB_TYPE (AVTAB_TRANSITION | AVTAB_MEMBER | AVTAB_CHANGE) | 34 | #define AVTAB_TYPE (AVTAB_TRANSITION | AVTAB_MEMBER | AVTAB_CHANGE) |
38 | #define AVTAB_ENABLED 0x80000000 /* reserved for used in cond_avtab */ | 35 | #define AVTAB_ENABLED_OLD 0x80000000 /* reserved for used in cond_avtab */ |
39 | u32 specified; /* what fields are specified */ | 36 | #define AVTAB_ENABLED 0x8000 /* reserved for used in cond_avtab */ |
40 | u32 data[3]; /* access vectors or types */ | 37 | u16 specified; /* what field is specified */ |
41 | #define avtab_allowed(x) (x)->data[0] | 38 | }; |
42 | #define avtab_auditdeny(x) (x)->data[1] | 39 | |
43 | #define avtab_auditallow(x) (x)->data[2] | 40 | struct avtab_datum { |
44 | #define avtab_transition(x) (x)->data[0] | 41 | u32 data; /* access vector or type value */ |
45 | #define avtab_change(x) (x)->data[1] | ||
46 | #define avtab_member(x) (x)->data[2] | ||
47 | }; | 42 | }; |
48 | 43 | ||
49 | struct avtab_node { | 44 | struct avtab_node { |
@@ -58,17 +53,21 @@ struct avtab { | |||
58 | }; | 53 | }; |
59 | 54 | ||
60 | int avtab_init(struct avtab *); | 55 | int avtab_init(struct avtab *); |
61 | struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k, int specified); | 56 | struct avtab_datum *avtab_search(struct avtab *h, struct avtab_key *k); |
62 | void avtab_destroy(struct avtab *h); | 57 | void avtab_destroy(struct avtab *h); |
63 | void avtab_hash_eval(struct avtab *h, char *tag); | 58 | void avtab_hash_eval(struct avtab *h, char *tag); |
64 | 59 | ||
65 | int avtab_read_item(void *fp, struct avtab_datum *avdatum, struct avtab_key *avkey); | 60 | int avtab_read_item(void *fp, uint32_t vers, struct avtab *a, |
66 | int avtab_read(struct avtab *a, void *fp, u32 config); | 61 | int (*insert)(struct avtab *a, struct avtab_key *k, |
62 | struct avtab_datum *d, void *p), | ||
63 | void *p); | ||
64 | |||
65 | int avtab_read(struct avtab *a, void *fp, u32 vers); | ||
67 | 66 | ||
68 | struct avtab_node *avtab_insert_nonunique(struct avtab *h, struct avtab_key *key, | 67 | struct avtab_node *avtab_insert_nonunique(struct avtab *h, struct avtab_key *key, |
69 | struct avtab_datum *datum); | 68 | struct avtab_datum *datum); |
70 | 69 | ||
71 | struct avtab_node *avtab_search_node(struct avtab *h, struct avtab_key *key, int specified); | 70 | struct avtab_node *avtab_search_node(struct avtab *h, struct avtab_key *key); |
72 | 71 | ||
73 | struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified); | 72 | struct avtab_node *avtab_search_node_next(struct avtab_node *node, int specified); |
74 | 73 | ||
diff --git a/security/selinux/ss/conditional.c b/security/selinux/ss/conditional.c index e2057f5a411a..daf288007460 100644 --- a/security/selinux/ss/conditional.c +++ b/security/selinux/ss/conditional.c | |||
@@ -100,18 +100,18 @@ int evaluate_cond_node(struct policydb *p, struct cond_node *node) | |||
100 | /* turn the rules on or off */ | 100 | /* turn the rules on or off */ |
101 | for (cur = node->true_list; cur != NULL; cur = cur->next) { | 101 | for (cur = node->true_list; cur != NULL; cur = cur->next) { |
102 | if (new_state <= 0) { | 102 | if (new_state <= 0) { |
103 | cur->node->datum.specified &= ~AVTAB_ENABLED; | 103 | cur->node->key.specified &= ~AVTAB_ENABLED; |
104 | } else { | 104 | } else { |
105 | cur->node->datum.specified |= AVTAB_ENABLED; | 105 | cur->node->key.specified |= AVTAB_ENABLED; |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | for (cur = node->false_list; cur != NULL; cur = cur->next) { | 109 | for (cur = node->false_list; cur != NULL; cur = cur->next) { |
110 | /* -1 or 1 */ | 110 | /* -1 or 1 */ |
111 | if (new_state) { | 111 | if (new_state) { |
112 | cur->node->datum.specified &= ~AVTAB_ENABLED; | 112 | cur->node->key.specified &= ~AVTAB_ENABLED; |
113 | } else { | 113 | } else { |
114 | cur->node->datum.specified |= AVTAB_ENABLED; | 114 | cur->node->key.specified |= AVTAB_ENABLED; |
115 | } | 115 | } |
116 | } | 116 | } |
117 | } | 117 | } |
@@ -216,7 +216,8 @@ int cond_read_bool(struct policydb *p, struct hashtab *h, void *fp) | |||
216 | { | 216 | { |
217 | char *key = NULL; | 217 | char *key = NULL; |
218 | struct cond_bool_datum *booldatum; | 218 | struct cond_bool_datum *booldatum; |
219 | u32 buf[3], len; | 219 | __le32 buf[3]; |
220 | u32 len; | ||
220 | int rc; | 221 | int rc; |
221 | 222 | ||
222 | booldatum = kmalloc(sizeof(struct cond_bool_datum), GFP_KERNEL); | 223 | booldatum = kmalloc(sizeof(struct cond_bool_datum), GFP_KERNEL); |
@@ -252,104 +253,127 @@ err: | |||
252 | return -1; | 253 | return -1; |
253 | } | 254 | } |
254 | 255 | ||
255 | static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list **ret_list, | 256 | struct cond_insertf_data |
256 | struct cond_av_list *other) | ||
257 | { | 257 | { |
258 | struct cond_av_list *list, *last = NULL, *cur; | 258 | struct policydb *p; |
259 | struct avtab_key key; | 259 | struct cond_av_list *other; |
260 | struct avtab_datum datum; | 260 | struct cond_av_list *head; |
261 | struct cond_av_list *tail; | ||
262 | }; | ||
263 | |||
264 | static int cond_insertf(struct avtab *a, struct avtab_key *k, struct avtab_datum *d, void *ptr) | ||
265 | { | ||
266 | struct cond_insertf_data *data = ptr; | ||
267 | struct policydb *p = data->p; | ||
268 | struct cond_av_list *other = data->other, *list, *cur; | ||
261 | struct avtab_node *node_ptr; | 269 | struct avtab_node *node_ptr; |
262 | int rc; | ||
263 | u32 buf[1], i, len; | ||
264 | u8 found; | 270 | u8 found; |
265 | 271 | ||
266 | *ret_list = NULL; | ||
267 | |||
268 | len = 0; | ||
269 | rc = next_entry(buf, fp, sizeof buf); | ||
270 | if (rc < 0) | ||
271 | return -1; | ||
272 | |||
273 | len = le32_to_cpu(buf[0]); | ||
274 | if (len == 0) { | ||
275 | return 0; | ||
276 | } | ||
277 | 272 | ||
278 | for (i = 0; i < len; i++) { | 273 | /* |
279 | if (avtab_read_item(fp, &datum, &key)) | 274 | * For type rules we have to make certain there aren't any |
275 | * conflicting rules by searching the te_avtab and the | ||
276 | * cond_te_avtab. | ||
277 | */ | ||
278 | if (k->specified & AVTAB_TYPE) { | ||
279 | if (avtab_search(&p->te_avtab, k)) { | ||
280 | printk("security: type rule already exists outside of a conditional."); | ||
280 | goto err; | 281 | goto err; |
281 | 282 | } | |
282 | /* | 283 | /* |
283 | * For type rules we have to make certain there aren't any | 284 | * If we are reading the false list other will be a pointer to |
284 | * conflicting rules by searching the te_avtab and the | 285 | * the true list. We can have duplicate entries if there is only |
285 | * cond_te_avtab. | 286 | * 1 other entry and it is in our true list. |
287 | * | ||
288 | * If we are reading the true list (other == NULL) there shouldn't | ||
289 | * be any other entries. | ||
286 | */ | 290 | */ |
287 | if (datum.specified & AVTAB_TYPE) { | 291 | if (other) { |
288 | if (avtab_search(&p->te_avtab, &key, AVTAB_TYPE)) { | 292 | node_ptr = avtab_search_node(&p->te_cond_avtab, k); |
289 | printk("security: type rule already exists outside of a conditional."); | 293 | if (node_ptr) { |
290 | goto err; | 294 | if (avtab_search_node_next(node_ptr, k->specified)) { |
291 | } | 295 | printk("security: too many conflicting type rules."); |
292 | /* | 296 | goto err; |
293 | * If we are reading the false list other will be a pointer to | 297 | } |
294 | * the true list. We can have duplicate entries if there is only | 298 | found = 0; |
295 | * 1 other entry and it is in our true list. | 299 | for (cur = other; cur != NULL; cur = cur->next) { |
296 | * | 300 | if (cur->node == node_ptr) { |
297 | * If we are reading the true list (other == NULL) there shouldn't | 301 | found = 1; |
298 | * be any other entries. | 302 | break; |
299 | */ | ||
300 | if (other) { | ||
301 | node_ptr = avtab_search_node(&p->te_cond_avtab, &key, AVTAB_TYPE); | ||
302 | if (node_ptr) { | ||
303 | if (avtab_search_node_next(node_ptr, AVTAB_TYPE)) { | ||
304 | printk("security: too many conflicting type rules."); | ||
305 | goto err; | ||
306 | } | ||
307 | found = 0; | ||
308 | for (cur = other; cur != NULL; cur = cur->next) { | ||
309 | if (cur->node == node_ptr) { | ||
310 | found = 1; | ||
311 | break; | ||
312 | } | ||
313 | } | ||
314 | if (!found) { | ||
315 | printk("security: conflicting type rules."); | ||
316 | goto err; | ||
317 | } | 303 | } |
318 | } | 304 | } |
319 | } else { | 305 | if (!found) { |
320 | if (avtab_search(&p->te_cond_avtab, &key, AVTAB_TYPE)) { | 306 | printk("security: conflicting type rules.\n"); |
321 | printk("security: conflicting type rules when adding type rule for true."); | ||
322 | goto err; | 307 | goto err; |
323 | } | 308 | } |
324 | } | 309 | } |
310 | } else { | ||
311 | if (avtab_search(&p->te_cond_avtab, k)) { | ||
312 | printk("security: conflicting type rules when adding type rule for true.\n"); | ||
313 | goto err; | ||
314 | } | ||
325 | } | 315 | } |
326 | node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, &key, &datum); | 316 | } |
327 | if (!node_ptr) { | ||
328 | printk("security: could not insert rule."); | ||
329 | goto err; | ||
330 | } | ||
331 | |||
332 | list = kmalloc(sizeof(struct cond_av_list), GFP_KERNEL); | ||
333 | if (!list) | ||
334 | goto err; | ||
335 | memset(list, 0, sizeof(struct cond_av_list)); | ||
336 | |||
337 | list->node = node_ptr; | ||
338 | if (i == 0) | ||
339 | *ret_list = list; | ||
340 | else | ||
341 | last->next = list; | ||
342 | last = list; | ||
343 | 317 | ||
318 | node_ptr = avtab_insert_nonunique(&p->te_cond_avtab, k, d); | ||
319 | if (!node_ptr) { | ||
320 | printk("security: could not insert rule."); | ||
321 | goto err; | ||
344 | } | 322 | } |
345 | 323 | ||
324 | list = kmalloc(sizeof(struct cond_av_list), GFP_KERNEL); | ||
325 | if (!list) | ||
326 | goto err; | ||
327 | memset(list, 0, sizeof(*list)); | ||
328 | |||
329 | list->node = node_ptr; | ||
330 | if (!data->head) | ||
331 | data->head = list; | ||
332 | else | ||
333 | data->tail->next = list; | ||
334 | data->tail = list; | ||
346 | return 0; | 335 | return 0; |
336 | |||
347 | err: | 337 | err: |
348 | cond_av_list_destroy(*ret_list); | 338 | cond_av_list_destroy(data->head); |
349 | *ret_list = NULL; | 339 | data->head = NULL; |
350 | return -1; | 340 | return -1; |
351 | } | 341 | } |
352 | 342 | ||
343 | static int cond_read_av_list(struct policydb *p, void *fp, struct cond_av_list **ret_list, struct cond_av_list *other) | ||
344 | { | ||
345 | int i, rc; | ||
346 | __le32 buf[1]; | ||
347 | u32 len; | ||
348 | struct cond_insertf_data data; | ||
349 | |||
350 | *ret_list = NULL; | ||
351 | |||
352 | len = 0; | ||
353 | rc = next_entry(buf, fp, sizeof(u32)); | ||
354 | if (rc < 0) | ||
355 | return -1; | ||
356 | |||
357 | len = le32_to_cpu(buf[0]); | ||
358 | if (len == 0) { | ||
359 | return 0; | ||
360 | } | ||
361 | |||
362 | data.p = p; | ||
363 | data.other = other; | ||
364 | data.head = NULL; | ||
365 | data.tail = NULL; | ||
366 | for (i = 0; i < len; i++) { | ||
367 | rc = avtab_read_item(fp, p->policyvers, &p->te_cond_avtab, cond_insertf, &data); | ||
368 | if (rc) | ||
369 | return rc; | ||
370 | |||
371 | } | ||
372 | |||
373 | *ret_list = data.head; | ||
374 | return 0; | ||
375 | } | ||
376 | |||
353 | static int expr_isvalid(struct policydb *p, struct cond_expr *expr) | 377 | static int expr_isvalid(struct policydb *p, struct cond_expr *expr) |
354 | { | 378 | { |
355 | if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { | 379 | if (expr->expr_type <= 0 || expr->expr_type > COND_LAST) { |
@@ -366,7 +390,8 @@ static int expr_isvalid(struct policydb *p, struct cond_expr *expr) | |||
366 | 390 | ||
367 | static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp) | 391 | static int cond_read_node(struct policydb *p, struct cond_node *node, void *fp) |
368 | { | 392 | { |
369 | u32 buf[2], len, i; | 393 | __le32 buf[2]; |
394 | u32 len, i; | ||
370 | int rc; | 395 | int rc; |
371 | struct cond_expr *expr = NULL, *last = NULL; | 396 | struct cond_expr *expr = NULL, *last = NULL; |
372 | 397 | ||
@@ -424,7 +449,8 @@ err: | |||
424 | int cond_read_list(struct policydb *p, void *fp) | 449 | int cond_read_list(struct policydb *p, void *fp) |
425 | { | 450 | { |
426 | struct cond_node *node, *last = NULL; | 451 | struct cond_node *node, *last = NULL; |
427 | u32 buf[1], i, len; | 452 | __le32 buf[1]; |
453 | u32 i, len; | ||
428 | int rc; | 454 | int rc; |
429 | 455 | ||
430 | rc = next_entry(buf, fp, sizeof buf); | 456 | rc = next_entry(buf, fp, sizeof buf); |
@@ -452,6 +478,7 @@ int cond_read_list(struct policydb *p, void *fp) | |||
452 | return 0; | 478 | return 0; |
453 | err: | 479 | err: |
454 | cond_list_destroy(p->cond_list); | 480 | cond_list_destroy(p->cond_list); |
481 | p->cond_list = NULL; | ||
455 | return -1; | 482 | return -1; |
456 | } | 483 | } |
457 | 484 | ||
@@ -465,22 +492,22 @@ void cond_compute_av(struct avtab *ctab, struct avtab_key *key, struct av_decisi | |||
465 | if(!ctab || !key || !avd) | 492 | if(!ctab || !key || !avd) |
466 | return; | 493 | return; |
467 | 494 | ||
468 | for(node = avtab_search_node(ctab, key, AVTAB_AV); node != NULL; | 495 | for(node = avtab_search_node(ctab, key); node != NULL; |
469 | node = avtab_search_node_next(node, AVTAB_AV)) { | 496 | node = avtab_search_node_next(node, key->specified)) { |
470 | if ( (__u32) (AVTAB_ALLOWED|AVTAB_ENABLED) == | 497 | if ( (u16) (AVTAB_ALLOWED|AVTAB_ENABLED) == |
471 | (node->datum.specified & (AVTAB_ALLOWED|AVTAB_ENABLED))) | 498 | (node->key.specified & (AVTAB_ALLOWED|AVTAB_ENABLED))) |
472 | avd->allowed |= avtab_allowed(&node->datum); | 499 | avd->allowed |= node->datum.data; |
473 | if ( (__u32) (AVTAB_AUDITDENY|AVTAB_ENABLED) == | 500 | if ( (u16) (AVTAB_AUDITDENY|AVTAB_ENABLED) == |
474 | (node->datum.specified & (AVTAB_AUDITDENY|AVTAB_ENABLED))) | 501 | (node->key.specified & (AVTAB_AUDITDENY|AVTAB_ENABLED))) |
475 | /* Since a '0' in an auditdeny mask represents a | 502 | /* Since a '0' in an auditdeny mask represents a |
476 | * permission we do NOT want to audit (dontaudit), we use | 503 | * permission we do NOT want to audit (dontaudit), we use |
477 | * the '&' operand to ensure that all '0's in the mask | 504 | * the '&' operand to ensure that all '0's in the mask |
478 | * are retained (much unlike the allow and auditallow cases). | 505 | * are retained (much unlike the allow and auditallow cases). |
479 | */ | 506 | */ |
480 | avd->auditdeny &= avtab_auditdeny(&node->datum); | 507 | avd->auditdeny &= node->datum.data; |
481 | if ( (__u32) (AVTAB_AUDITALLOW|AVTAB_ENABLED) == | 508 | if ( (u16) (AVTAB_AUDITALLOW|AVTAB_ENABLED) == |
482 | (node->datum.specified & (AVTAB_AUDITALLOW|AVTAB_ENABLED))) | 509 | (node->key.specified & (AVTAB_AUDITALLOW|AVTAB_ENABLED))) |
483 | avd->auditallow |= avtab_auditallow(&node->datum); | 510 | avd->auditallow |= node->datum.data; |
484 | } | 511 | } |
485 | return; | 512 | return; |
486 | } | 513 | } |
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index d8ce9cc0b9f1..d515154128cc 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c | |||
@@ -196,8 +196,9 @@ int ebitmap_read(struct ebitmap *e, void *fp) | |||
196 | { | 196 | { |
197 | int rc; | 197 | int rc; |
198 | struct ebitmap_node *n, *l; | 198 | struct ebitmap_node *n, *l; |
199 | u32 buf[3], mapsize, count, i; | 199 | __le32 buf[3]; |
200 | u64 map; | 200 | u32 mapsize, count, i; |
201 | __le64 map; | ||
201 | 202 | ||
202 | ebitmap_init(e); | 203 | ebitmap_init(e); |
203 | 204 | ||
diff --git a/security/selinux/ss/ebitmap.h b/security/selinux/ss/ebitmap.h index 471370233fd9..8bf41055a6cb 100644 --- a/security/selinux/ss/ebitmap.h +++ b/security/selinux/ss/ebitmap.h | |||
@@ -32,11 +32,41 @@ struct ebitmap { | |||
32 | #define ebitmap_length(e) ((e)->highbit) | 32 | #define ebitmap_length(e) ((e)->highbit) |
33 | #define ebitmap_startbit(e) ((e)->node ? (e)->node->startbit : 0) | 33 | #define ebitmap_startbit(e) ((e)->node ? (e)->node->startbit : 0) |
34 | 34 | ||
35 | static inline unsigned int ebitmap_start(struct ebitmap *e, | ||
36 | struct ebitmap_node **n) | ||
37 | { | ||
38 | *n = e->node; | ||
39 | return ebitmap_startbit(e); | ||
40 | } | ||
41 | |||
35 | static inline void ebitmap_init(struct ebitmap *e) | 42 | static inline void ebitmap_init(struct ebitmap *e) |
36 | { | 43 | { |
37 | memset(e, 0, sizeof(*e)); | 44 | memset(e, 0, sizeof(*e)); |
38 | } | 45 | } |
39 | 46 | ||
47 | static inline unsigned int ebitmap_next(struct ebitmap_node **n, | ||
48 | unsigned int bit) | ||
49 | { | ||
50 | if ((bit == ((*n)->startbit + MAPSIZE - 1)) && | ||
51 | (*n)->next) { | ||
52 | *n = (*n)->next; | ||
53 | return (*n)->startbit; | ||
54 | } | ||
55 | |||
56 | return (bit+1); | ||
57 | } | ||
58 | |||
59 | static inline int ebitmap_node_get_bit(struct ebitmap_node * n, | ||
60 | unsigned int bit) | ||
61 | { | ||
62 | if (n->map & (MAPBIT << (bit - n->startbit))) | ||
63 | return 1; | ||
64 | return 0; | ||
65 | } | ||
66 | |||
67 | #define ebitmap_for_each_bit(e, n, bit) \ | ||
68 | for (bit = ebitmap_start(e, &n); bit < ebitmap_length(e); bit = ebitmap_next(&n, bit)) \ | ||
69 | |||
40 | int ebitmap_cmp(struct ebitmap *e1, struct ebitmap *e2); | 70 | int ebitmap_cmp(struct ebitmap *e1, struct ebitmap *e2); |
41 | int ebitmap_cpy(struct ebitmap *dst, struct ebitmap *src); | 71 | int ebitmap_cpy(struct ebitmap *dst, struct ebitmap *src); |
42 | int ebitmap_contains(struct ebitmap *e1, struct ebitmap *e2); | 72 | int ebitmap_contains(struct ebitmap *e1, struct ebitmap *e2); |
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c index d4c32c39ccc9..aaefac2921f1 100644 --- a/security/selinux/ss/mls.c +++ b/security/selinux/ss/mls.c | |||
@@ -27,6 +27,7 @@ | |||
27 | int mls_compute_context_len(struct context * context) | 27 | int mls_compute_context_len(struct context * context) |
28 | { | 28 | { |
29 | int i, l, len, range; | 29 | int i, l, len, range; |
30 | struct ebitmap_node *node; | ||
30 | 31 | ||
31 | if (!selinux_mls_enabled) | 32 | if (!selinux_mls_enabled) |
32 | return 0; | 33 | return 0; |
@@ -36,24 +37,24 @@ int mls_compute_context_len(struct context * context) | |||
36 | range = 0; | 37 | range = 0; |
37 | len += strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1]); | 38 | len += strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1]); |
38 | 39 | ||
39 | for (i = 1; i <= ebitmap_length(&context->range.level[l].cat); i++) { | 40 | ebitmap_for_each_bit(&context->range.level[l].cat, node, i) { |
40 | if (ebitmap_get_bit(&context->range.level[l].cat, i - 1)) { | 41 | if (ebitmap_node_get_bit(node, i)) { |
41 | if (range) { | 42 | if (range) { |
42 | range++; | 43 | range++; |
43 | continue; | 44 | continue; |
44 | } | 45 | } |
45 | 46 | ||
46 | len += strlen(policydb.p_cat_val_to_name[i - 1]) + 1; | 47 | len += strlen(policydb.p_cat_val_to_name[i]) + 1; |
47 | range++; | 48 | range++; |
48 | } else { | 49 | } else { |
49 | if (range > 1) | 50 | if (range > 1) |
50 | len += strlen(policydb.p_cat_val_to_name[i - 2]) + 1; | 51 | len += strlen(policydb.p_cat_val_to_name[i - 1]) + 1; |
51 | range = 0; | 52 | range = 0; |
52 | } | 53 | } |
53 | } | 54 | } |
54 | /* Handle case where last category is the end of range */ | 55 | /* Handle case where last category is the end of range */ |
55 | if (range > 1) | 56 | if (range > 1) |
56 | len += strlen(policydb.p_cat_val_to_name[i - 2]) + 1; | 57 | len += strlen(policydb.p_cat_val_to_name[i - 1]) + 1; |
57 | 58 | ||
58 | if (l == 0) { | 59 | if (l == 0) { |
59 | if (mls_level_eq(&context->range.level[0], | 60 | if (mls_level_eq(&context->range.level[0], |
@@ -77,6 +78,7 @@ void mls_sid_to_context(struct context *context, | |||
77 | { | 78 | { |
78 | char *scontextp; | 79 | char *scontextp; |
79 | int i, l, range, wrote_sep; | 80 | int i, l, range, wrote_sep; |
81 | struct ebitmap_node *node; | ||
80 | 82 | ||
81 | if (!selinux_mls_enabled) | 83 | if (!selinux_mls_enabled) |
82 | return; | 84 | return; |
@@ -94,8 +96,8 @@ void mls_sid_to_context(struct context *context, | |||
94 | scontextp += strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1]); | 96 | scontextp += strlen(policydb.p_sens_val_to_name[context->range.level[l].sens - 1]); |
95 | 97 | ||
96 | /* categories */ | 98 | /* categories */ |
97 | for (i = 1; i <= ebitmap_length(&context->range.level[l].cat); i++) { | 99 | ebitmap_for_each_bit(&context->range.level[l].cat, node, i) { |
98 | if (ebitmap_get_bit(&context->range.level[l].cat, i - 1)) { | 100 | if (ebitmap_node_get_bit(node, i)) { |
99 | if (range) { | 101 | if (range) { |
100 | range++; | 102 | range++; |
101 | continue; | 103 | continue; |
@@ -106,8 +108,8 @@ void mls_sid_to_context(struct context *context, | |||
106 | wrote_sep = 1; | 108 | wrote_sep = 1; |
107 | } else | 109 | } else |
108 | *scontextp++ = ','; | 110 | *scontextp++ = ','; |
109 | strcpy(scontextp, policydb.p_cat_val_to_name[i - 1]); | 111 | strcpy(scontextp, policydb.p_cat_val_to_name[i]); |
110 | scontextp += strlen(policydb.p_cat_val_to_name[i - 1]); | 112 | scontextp += strlen(policydb.p_cat_val_to_name[i]); |
111 | range++; | 113 | range++; |
112 | } else { | 114 | } else { |
113 | if (range > 1) { | 115 | if (range > 1) { |
@@ -116,8 +118,8 @@ void mls_sid_to_context(struct context *context, | |||
116 | else | 118 | else |
117 | *scontextp++ = ','; | 119 | *scontextp++ = ','; |
118 | 120 | ||
119 | strcpy(scontextp, policydb.p_cat_val_to_name[i - 2]); | 121 | strcpy(scontextp, policydb.p_cat_val_to_name[i - 1]); |
120 | scontextp += strlen(policydb.p_cat_val_to_name[i - 2]); | 122 | scontextp += strlen(policydb.p_cat_val_to_name[i - 1]); |
121 | } | 123 | } |
122 | range = 0; | 124 | range = 0; |
123 | } | 125 | } |
@@ -130,8 +132,8 @@ void mls_sid_to_context(struct context *context, | |||
130 | else | 132 | else |
131 | *scontextp++ = ','; | 133 | *scontextp++ = ','; |
132 | 134 | ||
133 | strcpy(scontextp, policydb.p_cat_val_to_name[i - 2]); | 135 | strcpy(scontextp, policydb.p_cat_val_to_name[i - 1]); |
134 | scontextp += strlen(policydb.p_cat_val_to_name[i - 2]); | 136 | scontextp += strlen(policydb.p_cat_val_to_name[i - 1]); |
135 | } | 137 | } |
136 | 138 | ||
137 | if (l == 0) { | 139 | if (l == 0) { |
@@ -157,6 +159,7 @@ int mls_context_isvalid(struct policydb *p, struct context *c) | |||
157 | { | 159 | { |
158 | struct level_datum *levdatum; | 160 | struct level_datum *levdatum; |
159 | struct user_datum *usrdatum; | 161 | struct user_datum *usrdatum; |
162 | struct ebitmap_node *node; | ||
160 | int i, l; | 163 | int i, l; |
161 | 164 | ||
162 | if (!selinux_mls_enabled) | 165 | if (!selinux_mls_enabled) |
@@ -179,11 +182,11 @@ int mls_context_isvalid(struct policydb *p, struct context *c) | |||
179 | if (!levdatum) | 182 | if (!levdatum) |
180 | return 0; | 183 | return 0; |
181 | 184 | ||
182 | for (i = 1; i <= ebitmap_length(&c->range.level[l].cat); i++) { | 185 | ebitmap_for_each_bit(&c->range.level[l].cat, node, i) { |
183 | if (ebitmap_get_bit(&c->range.level[l].cat, i - 1)) { | 186 | if (ebitmap_node_get_bit(node, i)) { |
184 | if (i > p->p_cats.nprim) | 187 | if (i > p->p_cats.nprim) |
185 | return 0; | 188 | return 0; |
186 | if (!ebitmap_get_bit(&levdatum->level->cat, i - 1)) | 189 | if (!ebitmap_get_bit(&levdatum->level->cat, i)) |
187 | /* | 190 | /* |
188 | * Category may not be associated with | 191 | * Category may not be associated with |
189 | * sensitivity in low level. | 192 | * sensitivity in low level. |
@@ -468,6 +471,7 @@ int mls_convert_context(struct policydb *oldp, | |||
468 | struct level_datum *levdatum; | 471 | struct level_datum *levdatum; |
469 | struct cat_datum *catdatum; | 472 | struct cat_datum *catdatum; |
470 | struct ebitmap bitmap; | 473 | struct ebitmap bitmap; |
474 | struct ebitmap_node *node; | ||
471 | int l, i; | 475 | int l, i; |
472 | 476 | ||
473 | if (!selinux_mls_enabled) | 477 | if (!selinux_mls_enabled) |
@@ -482,12 +486,12 @@ int mls_convert_context(struct policydb *oldp, | |||
482 | c->range.level[l].sens = levdatum->level->sens; | 486 | c->range.level[l].sens = levdatum->level->sens; |
483 | 487 | ||
484 | ebitmap_init(&bitmap); | 488 | ebitmap_init(&bitmap); |
485 | for (i = 1; i <= ebitmap_length(&c->range.level[l].cat); i++) { | 489 | ebitmap_for_each_bit(&c->range.level[l].cat, node, i) { |
486 | if (ebitmap_get_bit(&c->range.level[l].cat, i - 1)) { | 490 | if (ebitmap_node_get_bit(node, i)) { |
487 | int rc; | 491 | int rc; |
488 | 492 | ||
489 | catdatum = hashtab_search(newp->p_cats.table, | 493 | catdatum = hashtab_search(newp->p_cats.table, |
490 | oldp->p_cat_val_to_name[i - 1]); | 494 | oldp->p_cat_val_to_name[i]); |
491 | if (!catdatum) | 495 | if (!catdatum) |
492 | return -EINVAL; | 496 | return -EINVAL; |
493 | rc = ebitmap_set_bit(&bitmap, catdatum->value - 1, 1); | 497 | rc = ebitmap_set_bit(&bitmap, catdatum->value - 1, 1); |
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 785c33cf4864..0a758323a9cf 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c | |||
@@ -91,6 +91,11 @@ static struct policydb_compat_info policydb_compat[] = { | |||
91 | .sym_num = SYM_NUM, | 91 | .sym_num = SYM_NUM, |
92 | .ocon_num = OCON_NUM, | 92 | .ocon_num = OCON_NUM, |
93 | }, | 93 | }, |
94 | { | ||
95 | .version = POLICYDB_VERSION_AVTAB, | ||
96 | .sym_num = SYM_NUM, | ||
97 | .ocon_num = OCON_NUM, | ||
98 | }, | ||
94 | }; | 99 | }; |
95 | 100 | ||
96 | static struct policydb_compat_info *policydb_lookup_compat(int version) | 101 | static struct policydb_compat_info *policydb_lookup_compat(int version) |
@@ -584,6 +589,9 @@ void policydb_destroy(struct policydb *p) | |||
584 | struct ocontext *c, *ctmp; | 589 | struct ocontext *c, *ctmp; |
585 | struct genfs *g, *gtmp; | 590 | struct genfs *g, *gtmp; |
586 | int i; | 591 | int i; |
592 | struct role_allow *ra, *lra = NULL; | ||
593 | struct role_trans *tr, *ltr = NULL; | ||
594 | struct range_trans *rt, *lrt = NULL; | ||
587 | 595 | ||
588 | for (i = 0; i < SYM_NUM; i++) { | 596 | for (i = 0; i < SYM_NUM; i++) { |
589 | hashtab_map(p->symtab[i].table, destroy_f[i], NULL); | 597 | hashtab_map(p->symtab[i].table, destroy_f[i], NULL); |
@@ -624,6 +632,28 @@ void policydb_destroy(struct policydb *p) | |||
624 | 632 | ||
625 | cond_policydb_destroy(p); | 633 | cond_policydb_destroy(p); |
626 | 634 | ||
635 | for (tr = p->role_tr; tr; tr = tr->next) { | ||
636 | if (ltr) kfree(ltr); | ||
637 | ltr = tr; | ||
638 | } | ||
639 | if (ltr) kfree(ltr); | ||
640 | |||
641 | for (ra = p->role_allow; ra; ra = ra -> next) { | ||
642 | if (lra) kfree(lra); | ||
643 | lra = ra; | ||
644 | } | ||
645 | if (lra) kfree(lra); | ||
646 | |||
647 | for (rt = p->range_tr; rt; rt = rt -> next) { | ||
648 | if (lrt) kfree(lrt); | ||
649 | lrt = rt; | ||
650 | } | ||
651 | if (lrt) kfree(lrt); | ||
652 | |||
653 | for (i = 0; i < p->p_types.nprim; i++) | ||
654 | ebitmap_destroy(&p->type_attr_map[i]); | ||
655 | kfree(p->type_attr_map); | ||
656 | |||
627 | return; | 657 | return; |
628 | } | 658 | } |
629 | 659 | ||
@@ -714,7 +744,8 @@ int policydb_context_isvalid(struct policydb *p, struct context *c) | |||
714 | */ | 744 | */ |
715 | static int mls_read_range_helper(struct mls_range *r, void *fp) | 745 | static int mls_read_range_helper(struct mls_range *r, void *fp) |
716 | { | 746 | { |
717 | u32 buf[2], items; | 747 | __le32 buf[2]; |
748 | u32 items; | ||
718 | int rc; | 749 | int rc; |
719 | 750 | ||
720 | rc = next_entry(buf, fp, sizeof(u32)); | 751 | rc = next_entry(buf, fp, sizeof(u32)); |
@@ -775,7 +806,7 @@ static int context_read_and_validate(struct context *c, | |||
775 | struct policydb *p, | 806 | struct policydb *p, |
776 | void *fp) | 807 | void *fp) |
777 | { | 808 | { |
778 | u32 buf[3]; | 809 | __le32 buf[3]; |
779 | int rc; | 810 | int rc; |
780 | 811 | ||
781 | rc = next_entry(buf, fp, sizeof buf); | 812 | rc = next_entry(buf, fp, sizeof buf); |
@@ -815,7 +846,8 @@ static int perm_read(struct policydb *p, struct hashtab *h, void *fp) | |||
815 | char *key = NULL; | 846 | char *key = NULL; |
816 | struct perm_datum *perdatum; | 847 | struct perm_datum *perdatum; |
817 | int rc; | 848 | int rc; |
818 | u32 buf[2], len; | 849 | __le32 buf[2]; |
850 | u32 len; | ||
819 | 851 | ||
820 | perdatum = kmalloc(sizeof(*perdatum), GFP_KERNEL); | 852 | perdatum = kmalloc(sizeof(*perdatum), GFP_KERNEL); |
821 | if (!perdatum) { | 853 | if (!perdatum) { |
@@ -855,7 +887,8 @@ static int common_read(struct policydb *p, struct hashtab *h, void *fp) | |||
855 | { | 887 | { |
856 | char *key = NULL; | 888 | char *key = NULL; |
857 | struct common_datum *comdatum; | 889 | struct common_datum *comdatum; |
858 | u32 buf[4], len, nel; | 890 | __le32 buf[4]; |
891 | u32 len, nel; | ||
859 | int i, rc; | 892 | int i, rc; |
860 | 893 | ||
861 | comdatum = kmalloc(sizeof(*comdatum), GFP_KERNEL); | 894 | comdatum = kmalloc(sizeof(*comdatum), GFP_KERNEL); |
@@ -909,7 +942,8 @@ static int read_cons_helper(struct constraint_node **nodep, int ncons, | |||
909 | { | 942 | { |
910 | struct constraint_node *c, *lc; | 943 | struct constraint_node *c, *lc; |
911 | struct constraint_expr *e, *le; | 944 | struct constraint_expr *e, *le; |
912 | u32 buf[3], nexpr; | 945 | __le32 buf[3]; |
946 | u32 nexpr; | ||
913 | int rc, i, j, depth; | 947 | int rc, i, j, depth; |
914 | 948 | ||
915 | lc = NULL; | 949 | lc = NULL; |
@@ -993,7 +1027,8 @@ static int class_read(struct policydb *p, struct hashtab *h, void *fp) | |||
993 | { | 1027 | { |
994 | char *key = NULL; | 1028 | char *key = NULL; |
995 | struct class_datum *cladatum; | 1029 | struct class_datum *cladatum; |
996 | u32 buf[6], len, len2, ncons, nel; | 1030 | __le32 buf[6]; |
1031 | u32 len, len2, ncons, nel; | ||
997 | int i, rc; | 1032 | int i, rc; |
998 | 1033 | ||
999 | cladatum = kmalloc(sizeof(*cladatum), GFP_KERNEL); | 1034 | cladatum = kmalloc(sizeof(*cladatum), GFP_KERNEL); |
@@ -1087,7 +1122,8 @@ static int role_read(struct policydb *p, struct hashtab *h, void *fp) | |||
1087 | char *key = NULL; | 1122 | char *key = NULL; |
1088 | struct role_datum *role; | 1123 | struct role_datum *role; |
1089 | int rc; | 1124 | int rc; |
1090 | u32 buf[2], len; | 1125 | __le32 buf[2]; |
1126 | u32 len; | ||
1091 | 1127 | ||
1092 | role = kmalloc(sizeof(*role), GFP_KERNEL); | 1128 | role = kmalloc(sizeof(*role), GFP_KERNEL); |
1093 | if (!role) { | 1129 | if (!role) { |
@@ -1147,7 +1183,8 @@ static int type_read(struct policydb *p, struct hashtab *h, void *fp) | |||
1147 | char *key = NULL; | 1183 | char *key = NULL; |
1148 | struct type_datum *typdatum; | 1184 | struct type_datum *typdatum; |
1149 | int rc; | 1185 | int rc; |
1150 | u32 buf[3], len; | 1186 | __le32 buf[3]; |
1187 | u32 len; | ||
1151 | 1188 | ||
1152 | typdatum = kmalloc(sizeof(*typdatum),GFP_KERNEL); | 1189 | typdatum = kmalloc(sizeof(*typdatum),GFP_KERNEL); |
1153 | if (!typdatum) { | 1190 | if (!typdatum) { |
@@ -1191,7 +1228,7 @@ bad: | |||
1191 | */ | 1228 | */ |
1192 | static int mls_read_level(struct mls_level *lp, void *fp) | 1229 | static int mls_read_level(struct mls_level *lp, void *fp) |
1193 | { | 1230 | { |
1194 | u32 buf[1]; | 1231 | __le32 buf[1]; |
1195 | int rc; | 1232 | int rc; |
1196 | 1233 | ||
1197 | memset(lp, 0, sizeof(*lp)); | 1234 | memset(lp, 0, sizeof(*lp)); |
@@ -1219,7 +1256,8 @@ static int user_read(struct policydb *p, struct hashtab *h, void *fp) | |||
1219 | char *key = NULL; | 1256 | char *key = NULL; |
1220 | struct user_datum *usrdatum; | 1257 | struct user_datum *usrdatum; |
1221 | int rc; | 1258 | int rc; |
1222 | u32 buf[2], len; | 1259 | __le32 buf[2]; |
1260 | u32 len; | ||
1223 | 1261 | ||
1224 | usrdatum = kmalloc(sizeof(*usrdatum), GFP_KERNEL); | 1262 | usrdatum = kmalloc(sizeof(*usrdatum), GFP_KERNEL); |
1225 | if (!usrdatum) { | 1263 | if (!usrdatum) { |
@@ -1273,7 +1311,8 @@ static int sens_read(struct policydb *p, struct hashtab *h, void *fp) | |||
1273 | char *key = NULL; | 1311 | char *key = NULL; |
1274 | struct level_datum *levdatum; | 1312 | struct level_datum *levdatum; |
1275 | int rc; | 1313 | int rc; |
1276 | u32 buf[2], len; | 1314 | __le32 buf[2]; |
1315 | u32 len; | ||
1277 | 1316 | ||
1278 | levdatum = kmalloc(sizeof(*levdatum), GFP_ATOMIC); | 1317 | levdatum = kmalloc(sizeof(*levdatum), GFP_ATOMIC); |
1279 | if (!levdatum) { | 1318 | if (!levdatum) { |
@@ -1324,7 +1363,8 @@ static int cat_read(struct policydb *p, struct hashtab *h, void *fp) | |||
1324 | char *key = NULL; | 1363 | char *key = NULL; |
1325 | struct cat_datum *catdatum; | 1364 | struct cat_datum *catdatum; |
1326 | int rc; | 1365 | int rc; |
1327 | u32 buf[3], len; | 1366 | __le32 buf[3]; |
1367 | u32 len; | ||
1328 | 1368 | ||
1329 | catdatum = kmalloc(sizeof(*catdatum), GFP_ATOMIC); | 1369 | catdatum = kmalloc(sizeof(*catdatum), GFP_ATOMIC); |
1330 | if (!catdatum) { | 1370 | if (!catdatum) { |
@@ -1387,7 +1427,8 @@ int policydb_read(struct policydb *p, void *fp) | |||
1387 | struct ocontext *l, *c, *newc; | 1427 | struct ocontext *l, *c, *newc; |
1388 | struct genfs *genfs_p, *genfs, *newgenfs; | 1428 | struct genfs *genfs_p, *genfs, *newgenfs; |
1389 | int i, j, rc; | 1429 | int i, j, rc; |
1390 | u32 buf[8], len, len2, config, nprim, nel, nel2; | 1430 | __le32 buf[8]; |
1431 | u32 len, len2, config, nprim, nel, nel2; | ||
1391 | char *policydb_str; | 1432 | char *policydb_str; |
1392 | struct policydb_compat_info *info; | 1433 | struct policydb_compat_info *info; |
1393 | struct range_trans *rt, *lrt; | 1434 | struct range_trans *rt, *lrt; |
@@ -1403,17 +1444,14 @@ int policydb_read(struct policydb *p, void *fp) | |||
1403 | if (rc < 0) | 1444 | if (rc < 0) |
1404 | goto bad; | 1445 | goto bad; |
1405 | 1446 | ||
1406 | for (i = 0; i < 2; i++) | 1447 | if (le32_to_cpu(buf[0]) != POLICYDB_MAGIC) { |
1407 | buf[i] = le32_to_cpu(buf[i]); | ||
1408 | |||
1409 | if (buf[0] != POLICYDB_MAGIC) { | ||
1410 | printk(KERN_ERR "security: policydb magic number 0x%x does " | 1448 | printk(KERN_ERR "security: policydb magic number 0x%x does " |
1411 | "not match expected magic number 0x%x\n", | 1449 | "not match expected magic number 0x%x\n", |
1412 | buf[0], POLICYDB_MAGIC); | 1450 | le32_to_cpu(buf[0]), POLICYDB_MAGIC); |
1413 | goto bad; | 1451 | goto bad; |
1414 | } | 1452 | } |
1415 | 1453 | ||
1416 | len = buf[1]; | 1454 | len = le32_to_cpu(buf[1]); |
1417 | if (len != strlen(POLICYDB_STRING)) { | 1455 | if (len != strlen(POLICYDB_STRING)) { |
1418 | printk(KERN_ERR "security: policydb string length %d does not " | 1456 | printk(KERN_ERR "security: policydb string length %d does not " |
1419 | "match expected length %Zu\n", | 1457 | "match expected length %Zu\n", |
@@ -1448,19 +1486,17 @@ int policydb_read(struct policydb *p, void *fp) | |||
1448 | rc = next_entry(buf, fp, sizeof(u32)*4); | 1486 | rc = next_entry(buf, fp, sizeof(u32)*4); |
1449 | if (rc < 0) | 1487 | if (rc < 0) |
1450 | goto bad; | 1488 | goto bad; |
1451 | for (i = 0; i < 4; i++) | ||
1452 | buf[i] = le32_to_cpu(buf[i]); | ||
1453 | 1489 | ||
1454 | p->policyvers = buf[0]; | 1490 | p->policyvers = le32_to_cpu(buf[0]); |
1455 | if (p->policyvers < POLICYDB_VERSION_MIN || | 1491 | if (p->policyvers < POLICYDB_VERSION_MIN || |
1456 | p->policyvers > POLICYDB_VERSION_MAX) { | 1492 | p->policyvers > POLICYDB_VERSION_MAX) { |
1457 | printk(KERN_ERR "security: policydb version %d does not match " | 1493 | printk(KERN_ERR "security: policydb version %d does not match " |
1458 | "my version range %d-%d\n", | 1494 | "my version range %d-%d\n", |
1459 | buf[0], POLICYDB_VERSION_MIN, POLICYDB_VERSION_MAX); | 1495 | le32_to_cpu(buf[0]), POLICYDB_VERSION_MIN, POLICYDB_VERSION_MAX); |
1460 | goto bad; | 1496 | goto bad; |
1461 | } | 1497 | } |
1462 | 1498 | ||
1463 | if ((buf[1] & POLICYDB_CONFIG_MLS)) { | 1499 | if ((le32_to_cpu(buf[1]) & POLICYDB_CONFIG_MLS)) { |
1464 | if (ss_initialized && !selinux_mls_enabled) { | 1500 | if (ss_initialized && !selinux_mls_enabled) { |
1465 | printk(KERN_ERR "Cannot switch between non-MLS and MLS " | 1501 | printk(KERN_ERR "Cannot switch between non-MLS and MLS " |
1466 | "policies\n"); | 1502 | "policies\n"); |
@@ -1489,9 +1525,11 @@ int policydb_read(struct policydb *p, void *fp) | |||
1489 | goto bad; | 1525 | goto bad; |
1490 | } | 1526 | } |
1491 | 1527 | ||
1492 | if (buf[2] != info->sym_num || buf[3] != info->ocon_num) { | 1528 | if (le32_to_cpu(buf[2]) != info->sym_num || |
1529 | le32_to_cpu(buf[3]) != info->ocon_num) { | ||
1493 | printk(KERN_ERR "security: policydb table sizes (%d,%d) do " | 1530 | printk(KERN_ERR "security: policydb table sizes (%d,%d) do " |
1494 | "not match mine (%d,%d)\n", buf[2], buf[3], | 1531 | "not match mine (%d,%d)\n", le32_to_cpu(buf[2]), |
1532 | le32_to_cpu(buf[3]), | ||
1495 | info->sym_num, info->ocon_num); | 1533 | info->sym_num, info->ocon_num); |
1496 | goto bad; | 1534 | goto bad; |
1497 | } | 1535 | } |
@@ -1511,7 +1549,7 @@ int policydb_read(struct policydb *p, void *fp) | |||
1511 | p->symtab[i].nprim = nprim; | 1549 | p->symtab[i].nprim = nprim; |
1512 | } | 1550 | } |
1513 | 1551 | ||
1514 | rc = avtab_read(&p->te_avtab, fp, config); | 1552 | rc = avtab_read(&p->te_avtab, fp, p->policyvers); |
1515 | if (rc) | 1553 | if (rc) |
1516 | goto bad; | 1554 | goto bad; |
1517 | 1555 | ||
@@ -1825,6 +1863,21 @@ int policydb_read(struct policydb *p, void *fp) | |||
1825 | } | 1863 | } |
1826 | } | 1864 | } |
1827 | 1865 | ||
1866 | p->type_attr_map = kmalloc(p->p_types.nprim*sizeof(struct ebitmap), GFP_KERNEL); | ||
1867 | if (!p->type_attr_map) | ||
1868 | goto bad; | ||
1869 | |||
1870 | for (i = 0; i < p->p_types.nprim; i++) { | ||
1871 | ebitmap_init(&p->type_attr_map[i]); | ||
1872 | if (p->policyvers >= POLICYDB_VERSION_AVTAB) { | ||
1873 | if (ebitmap_read(&p->type_attr_map[i], fp)) | ||
1874 | goto bad; | ||
1875 | } | ||
1876 | /* add the type itself as the degenerate case */ | ||
1877 | if (ebitmap_set_bit(&p->type_attr_map[i], i, 1)) | ||
1878 | goto bad; | ||
1879 | } | ||
1880 | |||
1828 | rc = 0; | 1881 | rc = 0; |
1829 | out: | 1882 | out: |
1830 | return rc; | 1883 | return rc; |
diff --git a/security/selinux/ss/policydb.h b/security/selinux/ss/policydb.h index 2470e2a1a1c3..b1340711f721 100644 --- a/security/selinux/ss/policydb.h +++ b/security/selinux/ss/policydb.h | |||
@@ -237,6 +237,9 @@ struct policydb { | |||
237 | /* range transitions */ | 237 | /* range transitions */ |
238 | struct range_trans *range_tr; | 238 | struct range_trans *range_tr; |
239 | 239 | ||
240 | /* type -> attribute reverse mapping */ | ||
241 | struct ebitmap *type_attr_map; | ||
242 | |||
240 | unsigned int policyvers; | 243 | unsigned int policyvers; |
241 | }; | 244 | }; |
242 | 245 | ||
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 014120474e69..92b89dc99bcd 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c | |||
@@ -266,8 +266,11 @@ static int context_struct_compute_av(struct context *scontext, | |||
266 | struct constraint_node *constraint; | 266 | struct constraint_node *constraint; |
267 | struct role_allow *ra; | 267 | struct role_allow *ra; |
268 | struct avtab_key avkey; | 268 | struct avtab_key avkey; |
269 | struct avtab_datum *avdatum; | 269 | struct avtab_node *node; |
270 | struct class_datum *tclass_datum; | 270 | struct class_datum *tclass_datum; |
271 | struct ebitmap *sattr, *tattr; | ||
272 | struct ebitmap_node *snode, *tnode; | ||
273 | unsigned int i, j; | ||
271 | 274 | ||
272 | /* | 275 | /* |
273 | * Remap extended Netlink classes for old policy versions. | 276 | * Remap extended Netlink classes for old policy versions. |
@@ -300,21 +303,34 @@ static int context_struct_compute_av(struct context *scontext, | |||
300 | * If a specific type enforcement rule was defined for | 303 | * If a specific type enforcement rule was defined for |
301 | * this permission check, then use it. | 304 | * this permission check, then use it. |
302 | */ | 305 | */ |
303 | avkey.source_type = scontext->type; | ||
304 | avkey.target_type = tcontext->type; | ||
305 | avkey.target_class = tclass; | 306 | avkey.target_class = tclass; |
306 | avdatum = avtab_search(&policydb.te_avtab, &avkey, AVTAB_AV); | 307 | avkey.specified = AVTAB_AV; |
307 | if (avdatum) { | 308 | sattr = &policydb.type_attr_map[scontext->type - 1]; |
308 | if (avdatum->specified & AVTAB_ALLOWED) | 309 | tattr = &policydb.type_attr_map[tcontext->type - 1]; |
309 | avd->allowed = avtab_allowed(avdatum); | 310 | ebitmap_for_each_bit(sattr, snode, i) { |
310 | if (avdatum->specified & AVTAB_AUDITDENY) | 311 | if (!ebitmap_node_get_bit(snode, i)) |
311 | avd->auditdeny = avtab_auditdeny(avdatum); | 312 | continue; |
312 | if (avdatum->specified & AVTAB_AUDITALLOW) | 313 | ebitmap_for_each_bit(tattr, tnode, j) { |
313 | avd->auditallow = avtab_auditallow(avdatum); | 314 | if (!ebitmap_node_get_bit(tnode, j)) |
314 | } | 315 | continue; |
316 | avkey.source_type = i + 1; | ||
317 | avkey.target_type = j + 1; | ||
318 | for (node = avtab_search_node(&policydb.te_avtab, &avkey); | ||
319 | node != NULL; | ||
320 | node = avtab_search_node_next(node, avkey.specified)) { | ||
321 | if (node->key.specified == AVTAB_ALLOWED) | ||
322 | avd->allowed |= node->datum.data; | ||
323 | else if (node->key.specified == AVTAB_AUDITALLOW) | ||
324 | avd->auditallow |= node->datum.data; | ||
325 | else if (node->key.specified == AVTAB_AUDITDENY) | ||
326 | avd->auditdeny &= node->datum.data; | ||
327 | } | ||
315 | 328 | ||
316 | /* Check conditional av table for additional permissions */ | 329 | /* Check conditional av table for additional permissions */ |
317 | cond_compute_av(&policydb.te_cond_avtab, &avkey, avd); | 330 | cond_compute_av(&policydb.te_cond_avtab, &avkey, avd); |
331 | |||
332 | } | ||
333 | } | ||
318 | 334 | ||
319 | /* | 335 | /* |
320 | * Remove any permissions prohibited by a constraint (this includes | 336 | * Remove any permissions prohibited by a constraint (this includes |
@@ -797,7 +813,6 @@ static int security_compute_sid(u32 ssid, | |||
797 | struct avtab_key avkey; | 813 | struct avtab_key avkey; |
798 | struct avtab_datum *avdatum; | 814 | struct avtab_datum *avdatum; |
799 | struct avtab_node *node; | 815 | struct avtab_node *node; |
800 | unsigned int type_change = 0; | ||
801 | int rc = 0; | 816 | int rc = 0; |
802 | 817 | ||
803 | if (!ss_initialized) { | 818 | if (!ss_initialized) { |
@@ -862,33 +877,23 @@ static int security_compute_sid(u32 ssid, | |||
862 | avkey.source_type = scontext->type; | 877 | avkey.source_type = scontext->type; |
863 | avkey.target_type = tcontext->type; | 878 | avkey.target_type = tcontext->type; |
864 | avkey.target_class = tclass; | 879 | avkey.target_class = tclass; |
865 | avdatum = avtab_search(&policydb.te_avtab, &avkey, AVTAB_TYPE); | 880 | avkey.specified = specified; |
881 | avdatum = avtab_search(&policydb.te_avtab, &avkey); | ||
866 | 882 | ||
867 | /* If no permanent rule, also check for enabled conditional rules */ | 883 | /* If no permanent rule, also check for enabled conditional rules */ |
868 | if(!avdatum) { | 884 | if(!avdatum) { |
869 | node = avtab_search_node(&policydb.te_cond_avtab, &avkey, specified); | 885 | node = avtab_search_node(&policydb.te_cond_avtab, &avkey); |
870 | for (; node != NULL; node = avtab_search_node_next(node, specified)) { | 886 | for (; node != NULL; node = avtab_search_node_next(node, specified)) { |
871 | if (node->datum.specified & AVTAB_ENABLED) { | 887 | if (node->key.specified & AVTAB_ENABLED) { |
872 | avdatum = &node->datum; | 888 | avdatum = &node->datum; |
873 | break; | 889 | break; |
874 | } | 890 | } |
875 | } | 891 | } |
876 | } | 892 | } |
877 | 893 | ||
878 | type_change = (avdatum && (avdatum->specified & specified)); | 894 | if (avdatum) { |
879 | if (type_change) { | ||
880 | /* Use the type from the type transition/member/change rule. */ | 895 | /* Use the type from the type transition/member/change rule. */ |
881 | switch (specified) { | 896 | newcontext.type = avdatum->data; |
882 | case AVTAB_TRANSITION: | ||
883 | newcontext.type = avtab_transition(avdatum); | ||
884 | break; | ||
885 | case AVTAB_MEMBER: | ||
886 | newcontext.type = avtab_member(avdatum); | ||
887 | break; | ||
888 | case AVTAB_CHANGE: | ||
889 | newcontext.type = avtab_change(avdatum); | ||
890 | break; | ||
891 | } | ||
892 | } | 897 | } |
893 | 898 | ||
894 | /* Check for class-specific changes. */ | 899 | /* Check for class-specific changes. */ |
@@ -1502,6 +1507,7 @@ int security_get_user_sids(u32 fromsid, | |||
1502 | struct user_datum *user; | 1507 | struct user_datum *user; |
1503 | struct role_datum *role; | 1508 | struct role_datum *role; |
1504 | struct av_decision avd; | 1509 | struct av_decision avd; |
1510 | struct ebitmap_node *rnode, *tnode; | ||
1505 | int rc = 0, i, j; | 1511 | int rc = 0, i, j; |
1506 | 1512 | ||
1507 | if (!ss_initialized) { | 1513 | if (!ss_initialized) { |
@@ -1532,13 +1538,13 @@ int security_get_user_sids(u32 fromsid, | |||
1532 | } | 1538 | } |
1533 | memset(mysids, 0, maxnel*sizeof(*mysids)); | 1539 | memset(mysids, 0, maxnel*sizeof(*mysids)); |
1534 | 1540 | ||
1535 | for (i = ebitmap_startbit(&user->roles); i < ebitmap_length(&user->roles); i++) { | 1541 | ebitmap_for_each_bit(&user->roles, rnode, i) { |
1536 | if (!ebitmap_get_bit(&user->roles, i)) | 1542 | if (!ebitmap_node_get_bit(rnode, i)) |
1537 | continue; | 1543 | continue; |
1538 | role = policydb.role_val_to_struct[i]; | 1544 | role = policydb.role_val_to_struct[i]; |
1539 | usercon.role = i+1; | 1545 | usercon.role = i+1; |
1540 | for (j = ebitmap_startbit(&role->types); j < ebitmap_length(&role->types); j++) { | 1546 | ebitmap_for_each_bit(&role->types, tnode, j) { |
1541 | if (!ebitmap_get_bit(&role->types, j)) | 1547 | if (!ebitmap_node_get_bit(tnode, j)) |
1542 | continue; | 1548 | continue; |
1543 | usercon.type = j+1; | 1549 | usercon.type = j+1; |
1544 | 1550 | ||
diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 904d17394e1c..188df085b7ee 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c | |||
@@ -1427,7 +1427,7 @@ static int snd_atiixp_suspend(snd_card_t *card, pm_message_t state) | |||
1427 | snd_atiixp_aclink_down(chip); | 1427 | snd_atiixp_aclink_down(chip); |
1428 | snd_atiixp_chip_stop(chip); | 1428 | snd_atiixp_chip_stop(chip); |
1429 | 1429 | ||
1430 | pci_set_power_state(chip->pci, 3); | 1430 | pci_set_power_state(chip->pci, PCI_D3hot); |
1431 | pci_disable_device(chip->pci); | 1431 | pci_disable_device(chip->pci); |
1432 | return 0; | 1432 | return 0; |
1433 | } | 1433 | } |
@@ -1438,7 +1438,7 @@ static int snd_atiixp_resume(snd_card_t *card) | |||
1438 | int i; | 1438 | int i; |
1439 | 1439 | ||
1440 | pci_enable_device(chip->pci); | 1440 | pci_enable_device(chip->pci); |
1441 | pci_set_power_state(chip->pci, 0); | 1441 | pci_set_power_state(chip->pci, PCI_D0); |
1442 | pci_set_master(chip->pci); | 1442 | pci_set_master(chip->pci); |
1443 | 1443 | ||
1444 | snd_atiixp_aclink_reset(chip); | 1444 | snd_atiixp_aclink_reset(chip); |