diff options
374 files changed, 5681 insertions, 4430 deletions
diff --git a/Documentation/00-INDEX b/Documentation/00-INDEX index 042073f656e5..fc8e7c7d182f 100644 --- a/Documentation/00-INDEX +++ b/Documentation/00-INDEX | |||
@@ -225,8 +225,6 @@ kprobes.txt | |||
225 | - documents the kernel probes debugging feature. | 225 | - documents the kernel probes debugging feature. |
226 | kref.txt | 226 | kref.txt |
227 | - docs on adding reference counters (krefs) to kernel objects. | 227 | - docs on adding reference counters (krefs) to kernel objects. |
228 | laptop-mode.txt | ||
229 | - how to conserve battery power using laptop-mode. | ||
230 | laptops/ | 228 | laptops/ |
231 | - directory with laptop related info and laptop driver documentation. | 229 | - directory with laptop related info and laptop driver documentation. |
232 | ldm.txt | 230 | ldm.txt |
@@ -301,12 +299,8 @@ pcmcia/ | |||
301 | - info on the Linux PCMCIA driver. | 299 | - info on the Linux PCMCIA driver. |
302 | pi-futex.txt | 300 | pi-futex.txt |
303 | - documentation on lightweight PI-futexes. | 301 | - documentation on lightweight PI-futexes. |
304 | pm.txt | ||
305 | - info on Linux power management support. | ||
306 | pnp.txt | 302 | pnp.txt |
307 | - Linux Plug and Play documentation. | 303 | - Linux Plug and Play documentation. |
308 | power_supply_class.txt | ||
309 | - Tells userspace about battery, UPS, AC or DC power supply properties | ||
310 | power/ | 304 | power/ |
311 | - directory with info on Linux PCI power management. | 305 | - directory with info on Linux PCI power management. |
312 | powerpc/ | 306 | powerpc/ |
diff --git a/Documentation/acpi/dsdt-override.txt b/Documentation/acpi/dsdt-override.txt index 5008f256a2db..febbb1ba4d23 100644 --- a/Documentation/acpi/dsdt-override.txt +++ b/Documentation/acpi/dsdt-override.txt | |||
@@ -1,15 +1,7 @@ | |||
1 | Linux supports two methods of overriding the BIOS DSDT: | 1 | Linux supports a method of overriding the BIOS DSDT: |
2 | 2 | ||
3 | CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel. | 3 | CONFIG_ACPI_CUSTOM_DSDT builds the image into the kernel. |
4 | 4 | ||
5 | CONFIG_ACPI_CUSTOM_DSDT_INITRD adds the image to the initrd. | 5 | When to use this method is described in detail on the |
6 | |||
7 | When to use these methods is described in detail on the | ||
8 | Linux/ACPI home page: | 6 | Linux/ACPI home page: |
9 | http://www.lesswatts.org/projects/acpi/overridingDSDT.php | 7 | http://www.lesswatts.org/projects/acpi/overridingDSDT.php |
10 | |||
11 | Note that if both options are used, the DSDT supplied | ||
12 | by the INITRD method takes precedence. | ||
13 | |||
14 | Documentation/initramfs-add-dsdt.sh is provided for convenience | ||
15 | for use with the CONFIG_ACPI_CUSTOM_DSDT_INITRD method. | ||
diff --git a/Documentation/acpi/initramfs-add-dsdt.sh b/Documentation/acpi/initramfs-add-dsdt.sh deleted file mode 100755 index 17ef6e838e14..000000000000 --- a/Documentation/acpi/initramfs-add-dsdt.sh +++ /dev/null | |||
@@ -1,43 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | # Adds a DSDT file to the initrd (if it's an initramfs) | ||
3 | # first argument is the name of archive | ||
4 | # second argument is the name of the file to add | ||
5 | # The file will be copied as /DSDT.aml | ||
6 | |||
7 | # 20060126: fix "Premature end of file" with some old cpio (Roland Robic) | ||
8 | # 20060205: this time it should really work | ||
9 | |||
10 | # check the arguments | ||
11 | if [ $# -ne 2 ]; then | ||
12 | program_name=$(basename $0) | ||
13 | echo "\ | ||
14 | $program_name: too few arguments | ||
15 | Usage: $program_name initrd-name.img DSDT-to-add.aml | ||
16 | Adds a DSDT file to an initrd (in initramfs format) | ||
17 | |||
18 | initrd-name.img: filename of the initrd in initramfs format | ||
19 | DSDT-to-add.aml: filename of the DSDT file to add | ||
20 | " 1>&2 | ||
21 | exit 1 | ||
22 | fi | ||
23 | |||
24 | # we should check it's an initramfs | ||
25 | |||
26 | tempcpio=$(mktemp -d) | ||
27 | # cleanup on exit, hangup, interrupt, quit, termination | ||
28 | trap 'rm -rf $tempcpio' 0 1 2 3 15 | ||
29 | |||
30 | # extract the archive | ||
31 | gunzip -c "$1" > "$tempcpio"/initramfs.cpio || exit 1 | ||
32 | |||
33 | # copy the DSDT file at the root of the directory so that we can call it "/DSDT.aml" | ||
34 | cp -f "$2" "$tempcpio"/DSDT.aml | ||
35 | |||
36 | # add the file | ||
37 | cd "$tempcpio" | ||
38 | (echo DSDT.aml | cpio --quiet -H newc -o -A -O "$tempcpio"/initramfs.cpio) || exit 1 | ||
39 | cd "$OLDPWD" | ||
40 | |||
41 | # re-compress the archive | ||
42 | gzip -c "$tempcpio"/initramfs.cpio > "$1" | ||
43 | |||
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt index 5681e2fa1496..518ebe609e2b 100644 --- a/Documentation/filesystems/proc.txt +++ b/Documentation/filesystems/proc.txt | |||
@@ -1506,13 +1506,13 @@ laptop_mode | |||
1506 | ----------- | 1506 | ----------- |
1507 | 1507 | ||
1508 | laptop_mode is a knob that controls "laptop mode". All the things that are | 1508 | laptop_mode is a knob that controls "laptop mode". All the things that are |
1509 | controlled by this knob are discussed in Documentation/laptop-mode.txt. | 1509 | controlled by this knob are discussed in Documentation/laptops/laptop-mode.txt. |
1510 | 1510 | ||
1511 | block_dump | 1511 | block_dump |
1512 | ---------- | 1512 | ---------- |
1513 | 1513 | ||
1514 | block_dump enables block I/O debugging when set to a nonzero value. More | 1514 | block_dump enables block I/O debugging when set to a nonzero value. More |
1515 | information on block I/O debugging is in Documentation/laptop-mode.txt. | 1515 | information on block I/O debugging is in Documentation/laptops/laptop-mode.txt. |
1516 | 1516 | ||
1517 | swap_token_timeout | 1517 | swap_token_timeout |
1518 | ------------------ | 1518 | ------------------ |
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 533e67febf81..622f7849edb9 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
@@ -138,7 +138,7 @@ and is between 256 and 4096 characters. It is defined in the file | |||
138 | strict -- Be less tolerant of platforms that are not | 138 | strict -- Be less tolerant of platforms that are not |
139 | strictly ACPI specification compliant. | 139 | strictly ACPI specification compliant. |
140 | 140 | ||
141 | See also Documentation/pm.txt, pci=noacpi | 141 | See also Documentation/power/pm.txt, pci=noacpi |
142 | 142 | ||
143 | acpi_apic_instance= [ACPI, IOAPIC] | 143 | acpi_apic_instance= [ACPI, IOAPIC] |
144 | Format: <int> | 144 | Format: <int> |
@@ -177,9 +177,6 @@ and is between 256 and 4096 characters. It is defined in the file | |||
177 | 177 | ||
178 | acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT | 178 | acpi_no_auto_ssdt [HW,ACPI] Disable automatic loading of SSDT |
179 | 179 | ||
180 | acpi_no_initrd_override [KNL,ACPI] | ||
181 | Disable loading custom ACPI tables from the initramfs | ||
182 | |||
183 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS | 180 | acpi_os_name= [HW,ACPI] Tell ACPI BIOS the name of the OS |
184 | Format: To spoof as Windows 98: ="Microsoft Windows" | 181 | Format: To spoof as Windows 98: ="Microsoft Windows" |
185 | 182 | ||
diff --git a/Documentation/laptops/00-INDEX b/Documentation/laptops/00-INDEX index 729c2c062e10..ee5692b26dd4 100644 --- a/Documentation/laptops/00-INDEX +++ b/Documentation/laptops/00-INDEX | |||
@@ -2,6 +2,8 @@ | |||
2 | - This file | 2 | - This file |
3 | acer-wmi.txt | 3 | acer-wmi.txt |
4 | - information on the Acer Laptop WMI Extras driver. | 4 | - information on the Acer Laptop WMI Extras driver. |
5 | laptop-mode.txt | ||
6 | - how to conserve battery power using laptop-mode. | ||
5 | sony-laptop.txt | 7 | sony-laptop.txt |
6 | - Sony Notebook Control Driver (SNC) Readme. | 8 | - Sony Notebook Control Driver (SNC) Readme. |
7 | sonypi.txt | 9 | sonypi.txt |
diff --git a/Documentation/laptops/acer-wmi.txt b/Documentation/laptops/acer-wmi.txt index b06696329cff..23df051dbf69 100644 --- a/Documentation/laptops/acer-wmi.txt +++ b/Documentation/laptops/acer-wmi.txt | |||
@@ -48,7 +48,7 @@ DSDT. | |||
48 | 48 | ||
49 | To send me the DSDT, as root/sudo: | 49 | To send me the DSDT, as root/sudo: |
50 | 50 | ||
51 | cat /sys/firmware/acpi/DSDT > dsdt | 51 | cat /sys/firmware/acpi/tables/DSDT > dsdt |
52 | 52 | ||
53 | And send me the resulting 'dsdt' file. | 53 | And send me the resulting 'dsdt' file. |
54 | 54 | ||
@@ -169,7 +169,7 @@ can be added to acer-wmi. | |||
169 | 169 | ||
170 | The LED is exposed through the LED subsystem, and can be found in: | 170 | The LED is exposed through the LED subsystem, and can be found in: |
171 | 171 | ||
172 | /sys/devices/platform/acer-wmi/leds/acer-mail:green/ | 172 | /sys/devices/platform/acer-wmi/leds/acer-wmi::mail/ |
173 | 173 | ||
174 | The mail LED is autodetected, so if you don't have one, the LED device won't | 174 | The mail LED is autodetected, so if you don't have one, the LED device won't |
175 | be registered. | 175 | be registered. |
diff --git a/Documentation/laptop-mode.txt b/Documentation/laptops/laptop-mode.txt index eeedee11c8c2..eeedee11c8c2 100644 --- a/Documentation/laptop-mode.txt +++ b/Documentation/laptops/laptop-mode.txt | |||
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 0f23d67f958f..bec5a32e4095 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -486,9 +486,12 @@ static void concat(char *dst, char *args[]) | |||
486 | unsigned int i, len = 0; | 486 | unsigned int i, len = 0; |
487 | 487 | ||
488 | for (i = 0; args[i]; i++) { | 488 | for (i = 0; args[i]; i++) { |
489 | if (i) { | ||
490 | strcat(dst+len, " "); | ||
491 | len++; | ||
492 | } | ||
489 | strcpy(dst+len, args[i]); | 493 | strcpy(dst+len, args[i]); |
490 | strcat(dst+len, " "); | 494 | len += strlen(args[i]); |
491 | len += strlen(args[i]) + 1; | ||
492 | } | 495 | } |
493 | /* In case it's empty. */ | 496 | /* In case it's empty. */ |
494 | dst[len] = '\0'; | 497 | dst[len] = '\0'; |
diff --git a/Documentation/pci.txt b/Documentation/pci.txt index bb7bd27d4682..d2c2e6e2b224 100644 --- a/Documentation/pci.txt +++ b/Documentation/pci.txt | |||
@@ -123,7 +123,7 @@ initialization with a pointer to a structure describing the driver | |||
123 | 123 | ||
124 | 124 | ||
125 | The ID table is an array of struct pci_device_id entries ending with an | 125 | The ID table is an array of struct pci_device_id entries ending with an |
126 | all-zero entry; use of the macro DECLARE_PCI_DEVICE_TABLE is the preferred | 126 | all-zero entry; use of the macro DEFINE_PCI_DEVICE_TABLE is the preferred |
127 | method of declaring the table. Each entry consists of: | 127 | method of declaring the table. Each entry consists of: |
128 | 128 | ||
129 | vendor,device Vendor and device ID to match (or PCI_ANY_ID) | 129 | vendor,device Vendor and device ID to match (or PCI_ANY_ID) |
@@ -193,7 +193,7 @@ Tips on when/where to use the above attributes: | |||
193 | o Do not mark the struct pci_driver. | 193 | o Do not mark the struct pci_driver. |
194 | 194 | ||
195 | o The ID table array should be marked __devinitconst; this is done | 195 | o The ID table array should be marked __devinitconst; this is done |
196 | automatically if the table is declared with DECLARE_PCI_DEVICE_TABLE(). | 196 | automatically if the table is declared with DEFINE_PCI_DEVICE_TABLE(). |
197 | 197 | ||
198 | o The probe() and remove() functions should be marked __devinit | 198 | o The probe() and remove() functions should be marked __devinit |
199 | and __devexit respectively. All initialization functions | 199 | and __devexit respectively. All initialization functions |
diff --git a/Documentation/power/00-INDEX b/Documentation/power/00-INDEX index 8db4e41a052d..a55d7f1c836d 100644 --- a/Documentation/power/00-INDEX +++ b/Documentation/power/00-INDEX | |||
@@ -14,6 +14,12 @@ notifiers.txt | |||
14 | - Registering suspend notifiers in device drivers | 14 | - Registering suspend notifiers in device drivers |
15 | pci.txt | 15 | pci.txt |
16 | - How the PCI Subsystem Does Power Management | 16 | - How the PCI Subsystem Does Power Management |
17 | pm.txt | ||
18 | - info on Linux power management support. | ||
19 | pm_qos_interface.txt | ||
20 | - info on Linux PM Quality of Service interface | ||
21 | power_supply_class.txt | ||
22 | - Tells userspace about battery, UPS, AC or DC power supply properties | ||
17 | s2ram.txt | 23 | s2ram.txt |
18 | - How to get suspend to ram working (and debug it when it isn't) | 24 | - How to get suspend to ram working (and debug it when it isn't) |
19 | states.txt | 25 | states.txt |
diff --git a/Documentation/pm.txt b/Documentation/power/pm.txt index da8589a0e07d..be841507e43f 100644 --- a/Documentation/pm.txt +++ b/Documentation/power/pm.txt | |||
@@ -108,7 +108,7 @@ void pm_unregister_all(pm_callback cback); | |||
108 | * EINVAL if the request is not supported | 108 | * EINVAL if the request is not supported |
109 | * EBUSY if the device is now busy and cannot handle the request | 109 | * EBUSY if the device is now busy and cannot handle the request |
110 | * ENOMEM if the device was unable to handle the request due to memory | 110 | * ENOMEM if the device was unable to handle the request due to memory |
111 | * | 111 | * |
112 | * Details: The device request callback will be called before the | 112 | * Details: The device request callback will be called before the |
113 | * device/system enters a suspend state (ACPI D1-D3) or | 113 | * device/system enters a suspend state (ACPI D1-D3) or |
114 | * or after the device/system resumes from suspend (ACPI D0). | 114 | * or after the device/system resumes from suspend (ACPI D0). |
diff --git a/Documentation/pm_qos_interface.txt b/Documentation/power/pm_qos_interface.txt index 49adb1a33514..49adb1a33514 100644 --- a/Documentation/pm_qos_interface.txt +++ b/Documentation/power/pm_qos_interface.txt | |||
diff --git a/Documentation/power_supply_class.txt b/Documentation/power/power_supply_class.txt index a8686e5a6857..a8686e5a6857 100644 --- a/Documentation/power_supply_class.txt +++ b/Documentation/power/power_supply_class.txt | |||
diff --git a/Documentation/scheduler/sched-stats.txt b/Documentation/scheduler/sched-stats.txt index 442e14d35dea..01e69404ee5e 100644 --- a/Documentation/scheduler/sched-stats.txt +++ b/Documentation/scheduler/sched-stats.txt | |||
@@ -142,7 +142,7 @@ of idleness (idle, busy, and newly idle): | |||
142 | 142 | ||
143 | /proc/<pid>/schedstat | 143 | /proc/<pid>/schedstat |
144 | ---------------- | 144 | ---------------- |
145 | schedstats also adds a new /proc/<pid/schedstat file to include some of | 145 | schedstats also adds a new /proc/<pid>/schedstat file to include some of |
146 | the same information on a per-process level. There are three fields in | 146 | the same information on a per-process level. There are three fields in |
147 | this file correlating for that process to: | 147 | this file correlating for that process to: |
148 | 1) time spent on the cpu | 148 | 1) time spent on the cpu |
diff --git a/Documentation/thermal/sysfs-api.txt b/Documentation/thermal/sysfs-api.txt index ba9c2da5a8c2..d9f28be75403 100644 --- a/Documentation/thermal/sysfs-api.txt +++ b/Documentation/thermal/sysfs-api.txt | |||
@@ -143,10 +143,10 @@ type Strings which represent the thermal zone type. | |||
143 | This is given by thermal zone driver as part of registration. | 143 | This is given by thermal zone driver as part of registration. |
144 | Eg: "ACPI thermal zone" indicates it's a ACPI thermal device | 144 | Eg: "ACPI thermal zone" indicates it's a ACPI thermal device |
145 | RO | 145 | RO |
146 | Optional | 146 | Required |
147 | 147 | ||
148 | temp Current temperature as reported by thermal zone (sensor) | 148 | temp Current temperature as reported by thermal zone (sensor) |
149 | Unit: degree Celsius | 149 | Unit: millidegree Celsius |
150 | RO | 150 | RO |
151 | Required | 151 | Required |
152 | 152 | ||
@@ -163,7 +163,7 @@ mode One of the predefined values in [kernel, user] | |||
163 | charge of the thermal management. | 163 | charge of the thermal management. |
164 | 164 | ||
165 | trip_point_[0-*]_temp The temperature above which trip point will be fired | 165 | trip_point_[0-*]_temp The temperature above which trip point will be fired |
166 | Unit: degree Celsius | 166 | Unit: millidegree Celsius |
167 | RO | 167 | RO |
168 | Optional | 168 | Optional |
169 | 169 | ||
@@ -193,7 +193,7 @@ type String which represents the type of device | |||
193 | eg. For memory controller device on intel_menlow platform: | 193 | eg. For memory controller device on intel_menlow platform: |
194 | this should be "Memory controller" | 194 | this should be "Memory controller" |
195 | RO | 195 | RO |
196 | Optional | 196 | Required |
197 | 197 | ||
198 | max_state The maximum permissible cooling state of this cooling device. | 198 | max_state The maximum permissible cooling state of this cooling device. |
199 | RO | 199 | RO |
@@ -219,16 +219,16 @@ the sys I/F structure will be built like this: | |||
219 | 219 | ||
220 | |thermal_zone1: | 220 | |thermal_zone1: |
221 | |-----type: ACPI thermal zone | 221 | |-----type: ACPI thermal zone |
222 | |-----temp: 37 | 222 | |-----temp: 37000 |
223 | |-----mode: kernel | 223 | |-----mode: kernel |
224 | |-----trip_point_0_temp: 100 | 224 | |-----trip_point_0_temp: 100000 |
225 | |-----trip_point_0_type: critical | 225 | |-----trip_point_0_type: critical |
226 | |-----trip_point_1_temp: 80 | 226 | |-----trip_point_1_temp: 80000 |
227 | |-----trip_point_1_type: passive | 227 | |-----trip_point_1_type: passive |
228 | |-----trip_point_2_temp: 70 | 228 | |-----trip_point_2_temp: 70000 |
229 | |-----trip_point_2_type: active[0] | 229 | |-----trip_point_2_type: active0 |
230 | |-----trip_point_3_temp: 60 | 230 | |-----trip_point_3_temp: 60000 |
231 | |-----trip_point_3_type: active[1] | 231 | |-----trip_point_3_type: active1 |
232 | |-----cdev0: --->/sys/class/thermal/cooling_device0 | 232 | |-----cdev0: --->/sys/class/thermal/cooling_device0 |
233 | |-----cdev0_trip_point: 1 /* cdev0 can be used for passive */ | 233 | |-----cdev0_trip_point: 1 /* cdev0 can be used for passive */ |
234 | |-----cdev1: --->/sys/class/thermal/cooling_device3 | 234 | |-----cdev1: --->/sys/class/thermal/cooling_device3 |
diff --git a/Documentation/usb/usb-help.txt b/Documentation/usb/usb-help.txt index a7408593829f..4273ca2b86ba 100644 --- a/Documentation/usb/usb-help.txt +++ b/Documentation/usb/usb-help.txt | |||
@@ -1,5 +1,5 @@ | |||
1 | usb-help.txt | 1 | usb-help.txt |
2 | 2000-July-12 | 2 | 2008-Mar-7 |
3 | 3 | ||
4 | For USB help other than the readme files that are located in | 4 | For USB help other than the readme files that are located in |
5 | Documentation/usb/*, see the following: | 5 | Documentation/usb/*, see the following: |
@@ -10,9 +10,7 @@ Linux-USB project: http://www.linux-usb.org | |||
10 | Linux USB Guide: http://linux-usb.sourceforge.net | 10 | Linux USB Guide: http://linux-usb.sourceforge.net |
11 | Linux-USB device overview (working devices and drivers): | 11 | Linux-USB device overview (working devices and drivers): |
12 | http://www.qbik.ch/usb/devices/ | 12 | http://www.qbik.ch/usb/devices/ |
13 | 13 | ||
14 | The Linux-USB mailing lists are: | 14 | The Linux-USB mailing list is at linux-usb@vger.kernel.org |
15 | linux-usb-users@lists.sourceforge.net for general user help | ||
16 | linux-usb-devel@lists.sourceforge.net for developer discussions | ||
17 | 15 | ||
18 | ### | 16 | ### |
diff --git a/MAINTAINERS b/MAINTAINERS index fd2dec1ac464..6d628fb6ee01 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -2061,43 +2061,19 @@ M: kernel@wantstofly.org | |||
2061 | L: netdev@vger.kernel.org | 2061 | L: netdev@vger.kernel.org |
2062 | S: Maintained | 2062 | S: Maintained |
2063 | 2063 | ||
2064 | INTEL PRO/100 ETHERNET SUPPORT | 2064 | INTEL ETHERNET DRIVERS (e100/e1000/e1000e/igb/ixgb/ixgbe) |
2065 | P: Auke Kok | 2065 | P: Auke Kok |
2066 | M: auke-jan.h.kok@intel.com | 2066 | M: auke-jan.h.kok@intel.com |
2067 | P: Jesse Brandeburg | 2067 | P: Jesse Brandeburg |
2068 | M: jesse.brandeburg@intel.com | 2068 | M: jesse.brandeburg@intel.com |
2069 | P: Jeff Kirsher | 2069 | P: Jeff Kirsher |
2070 | M: jeffrey.t.kirsher@intel.com | 2070 | M: jeffrey.t.kirsher@intel.com |
2071 | P: Bruce Allan | ||
2072 | M: bruce.w.allan@intel.com | ||
2071 | P: John Ronciak | 2073 | P: John Ronciak |
2072 | M: john.ronciak@intel.com | 2074 | M: john.ronciak@intel.com |
2073 | L: e1000-devel@lists.sourceforge.net | 2075 | L: e1000-devel@lists.sourceforge.net |
2074 | W: http://sourceforge.net/projects/e1000/ | 2076 | W: http://e1000.sourceforge.net/ |
2075 | S: Supported | ||
2076 | |||
2077 | INTEL PRO/1000 GIGABIT ETHERNET SUPPORT | ||
2078 | P: Auke Kok | ||
2079 | M: auke-jan.h.kok@intel.com | ||
2080 | P: Jesse Brandeburg | ||
2081 | M: jesse.brandeburg@intel.com | ||
2082 | P: Jeff Kirsher | ||
2083 | M: jeffrey.t.kirsher@intel.com | ||
2084 | P: John Ronciak | ||
2085 | M: john.ronciak@intel.com | ||
2086 | L: e1000-devel@lists.sourceforge.net | ||
2087 | W: http://sourceforge.net/projects/e1000/ | ||
2088 | S: Supported | ||
2089 | |||
2090 | INTEL PRO/10GbE SUPPORT | ||
2091 | P: Ayyappan Veeraiyan | ||
2092 | M: ayyappan.veeraiyan@intel.com | ||
2093 | P: Auke Kok | ||
2094 | M: auke-jan.h.kok@intel.com | ||
2095 | P: Jesse Brandeburg | ||
2096 | M: jesse.brandeburg@intel.com | ||
2097 | P: John Ronciak | ||
2098 | M: john.ronciak@intel.com | ||
2099 | L: e1000-devel@lists.sourceforge.net | ||
2100 | W: http://sourceforge.net/projects/e1000/ | ||
2101 | S: Supported | 2077 | S: Supported |
2102 | 2078 | ||
2103 | INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT | 2079 | INTEL PRO/WIRELESS 2100 NETWORK CONNECTION SUPPORT |
@@ -2165,7 +2141,7 @@ L: netdev@vger.kernel.org | |||
2165 | S: Maintained | 2141 | S: Maintained |
2166 | 2142 | ||
2167 | IPATH DRIVER: | 2143 | IPATH DRIVER: |
2168 | P: Arthur Jones | 2144 | P: Ralph Campbell |
2169 | M: infinipath@qlogic.com | 2145 | M: infinipath@qlogic.com |
2170 | L: general@lists.openfabrics.org | 2146 | L: general@lists.openfabrics.org |
2171 | T: git git://git.qlogic.com/ipath-linux-2.6 | 2147 | T: git git://git.qlogic.com/ipath-linux-2.6 |
diff --git a/arch/alpha/Kconfig b/arch/alpha/Kconfig index 002703b8c0b0..729cdbdf8036 100644 --- a/arch/alpha/Kconfig +++ b/arch/alpha/Kconfig | |||
@@ -330,6 +330,9 @@ config PCI_DOMAINS | |||
330 | config PCI_SYSCALL | 330 | config PCI_SYSCALL |
331 | def_bool PCI | 331 | def_bool PCI |
332 | 332 | ||
333 | config IOMMU_HELPER | ||
334 | def_bool PCI | ||
335 | |||
333 | config ALPHA_CORE_AGP | 336 | config ALPHA_CORE_AGP |
334 | bool | 337 | bool |
335 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL | 338 | depends on ALPHA_GENERIC || ALPHA_TITAN || ALPHA_MARVEL |
diff --git a/arch/alpha/kernel/pci_iommu.c b/arch/alpha/kernel/pci_iommu.c index e07a23fc5b74..4e1c08636edd 100644 --- a/arch/alpha/kernel/pci_iommu.c +++ b/arch/alpha/kernel/pci_iommu.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/scatterlist.h> | 10 | #include <linux/scatterlist.h> |
11 | #include <linux/log2.h> | 11 | #include <linux/log2.h> |
12 | #include <linux/dma-mapping.h> | 12 | #include <linux/dma-mapping.h> |
13 | #include <linux/iommu-helper.h> | ||
13 | 14 | ||
14 | #include <asm/io.h> | 15 | #include <asm/io.h> |
15 | #include <asm/hwrpb.h> | 16 | #include <asm/hwrpb.h> |
@@ -125,14 +126,6 @@ iommu_arena_new(struct pci_controller *hose, dma_addr_t base, | |||
125 | return iommu_arena_new_node(0, hose, base, window_size, align); | 126 | return iommu_arena_new_node(0, hose, base, window_size, align); |
126 | } | 127 | } |
127 | 128 | ||
128 | static inline int is_span_boundary(unsigned int index, unsigned int nr, | ||
129 | unsigned long shift, | ||
130 | unsigned long boundary_size) | ||
131 | { | ||
132 | shift = (shift + index) & (boundary_size - 1); | ||
133 | return shift + nr > boundary_size; | ||
134 | } | ||
135 | |||
136 | /* Must be called with the arena lock held */ | 129 | /* Must be called with the arena lock held */ |
137 | static long | 130 | static long |
138 | iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena, | 131 | iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena, |
@@ -147,7 +140,6 @@ iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena, | |||
147 | base = arena->dma_base >> PAGE_SHIFT; | 140 | base = arena->dma_base >> PAGE_SHIFT; |
148 | if (dev) { | 141 | if (dev) { |
149 | boundary_size = dma_get_seg_boundary(dev) + 1; | 142 | boundary_size = dma_get_seg_boundary(dev) + 1; |
150 | BUG_ON(!is_power_of_2(boundary_size)); | ||
151 | boundary_size >>= PAGE_SHIFT; | 143 | boundary_size >>= PAGE_SHIFT; |
152 | } else { | 144 | } else { |
153 | boundary_size = 1UL << (32 - PAGE_SHIFT); | 145 | boundary_size = 1UL << (32 - PAGE_SHIFT); |
@@ -161,7 +153,7 @@ iommu_arena_find_pages(struct device *dev, struct pci_iommu_arena *arena, | |||
161 | 153 | ||
162 | again: | 154 | again: |
163 | while (i < n && p+i < nent) { | 155 | while (i < n && p+i < nent) { |
164 | if (!i && is_span_boundary(p, n, base, boundary_size)) { | 156 | if (!i && iommu_is_span_boundary(p, n, base, boundary_size)) { |
165 | p = ALIGN(p + 1, mask + 1); | 157 | p = ALIGN(p + 1, mask + 1); |
166 | goto again; | 158 | goto again; |
167 | } | 159 | } |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 7b8ff66febe1..1a4649667ec8 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -251,6 +251,7 @@ define archhelp | |||
251 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' | 251 | echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)' |
252 | echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' | 252 | echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)' |
253 | echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' | 253 | echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)' |
254 | echo ' uImage - U-Boot wrapped zImage' | ||
254 | echo ' bootpImage - Combined zImage and initial RAM disk' | 255 | echo ' bootpImage - Combined zImage and initial RAM disk' |
255 | echo ' (supply initrd image via make variable INITRD=<path>)' | 256 | echo ' (supply initrd image via make variable INITRD=<path>)' |
256 | echo ' install - Install uncompressed kernel' | 257 | echo ' install - Install uncompressed kernel' |
diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c index 97b7dc13d9aa..538262241483 100644 --- a/arch/arm/common/it8152.c +++ b/arch/arm/common/it8152.c | |||
@@ -274,7 +274,7 @@ static int it8152_pci_platform_notify_remove(struct device *dev) | |||
274 | int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) | 274 | int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) |
275 | { | 275 | { |
276 | dev_dbg(dev, "%s: dma_addr %08x, size %08x\n", | 276 | dev_dbg(dev, "%s: dma_addr %08x, size %08x\n", |
277 | __FUNCTION__, dma_addr, size); | 277 | __func__, dma_addr, size); |
278 | return (dev->bus == &pci_bus_type) && | 278 | return (dev->bus == &pci_bus_type) && |
279 | ((dma_addr + size - PHYS_OFFSET) >= SZ_64M); | 279 | ((dma_addr + size - PHYS_OFFSET) >= SZ_64M); |
280 | } | 280 | } |
@@ -289,7 +289,7 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size) | |||
289 | */ | 289 | */ |
290 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | 290 | int pci_set_dma_mask(struct pci_dev *dev, u64 mask) |
291 | { | 291 | { |
292 | dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask); | 292 | dev_dbg(&dev->dev, "%s: %llx\n", __func__, mask); |
293 | if (mask >= PHYS_OFFSET + SZ_64M - 1) | 293 | if (mask >= PHYS_OFFSET + SZ_64M - 1) |
294 | return 0; | 294 | return 0; |
295 | 295 | ||
@@ -299,7 +299,7 @@ int pci_set_dma_mask(struct pci_dev *dev, u64 mask) | |||
299 | int | 299 | int |
300 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) | 300 | pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask) |
301 | { | 301 | { |
302 | dev_dbg(&dev->dev, "%s: %llx\n", __FUNCTION__, mask); | 302 | dev_dbg(&dev->dev, "%s: %llx\n", __func__, mask); |
303 | if (mask >= PHYS_OFFSET + SZ_64M - 1) | 303 | if (mask >= PHYS_OFFSET + SZ_64M - 1) |
304 | return 0; | 304 | return 0; |
305 | 305 | ||
diff --git a/arch/arm/configs/omap_h2_1610_defconfig b/arch/arm/configs/omap_h2_1610_defconfig index c2345af3707a..323c1deeb953 100644 --- a/arch/arm/configs/omap_h2_1610_defconfig +++ b/arch/arm/configs/omap_h2_1610_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.24-rc5 | 3 | # Linux kernel version: 2.6.25-rc3 |
4 | # Mon Dec 17 20:04:38 2007 | 4 | # Mon Mar 3 03:39:48 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
@@ -21,6 +21,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
22 | CONFIG_GENERIC_HWEIGHT=y | 22 | CONFIG_GENERIC_HWEIGHT=y |
23 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 23 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
24 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
24 | CONFIG_ZONE_DMA=y | 25 | CONFIG_ZONE_DMA=y |
25 | CONFIG_VECTORS_BASE=0xffff0000 | 26 | CONFIG_VECTORS_BASE=0xffff0000 |
26 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
@@ -40,17 +41,22 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
40 | # CONFIG_POSIX_MQUEUE is not set | 41 | # CONFIG_POSIX_MQUEUE is not set |
41 | # CONFIG_BSD_PROCESS_ACCT is not set | 42 | # CONFIG_BSD_PROCESS_ACCT is not set |
42 | # CONFIG_TASKSTATS is not set | 43 | # CONFIG_TASKSTATS is not set |
43 | # CONFIG_USER_NS is not set | ||
44 | # CONFIG_PID_NS is not set | ||
45 | # CONFIG_AUDIT is not set | 44 | # CONFIG_AUDIT is not set |
46 | # CONFIG_IKCONFIG is not set | 45 | # CONFIG_IKCONFIG is not set |
47 | CONFIG_LOG_BUF_SHIFT=14 | 46 | CONFIG_LOG_BUF_SHIFT=14 |
48 | # CONFIG_CGROUPS is not set | 47 | # CONFIG_CGROUPS is not set |
48 | CONFIG_GROUP_SCHED=y | ||
49 | CONFIG_FAIR_GROUP_SCHED=y | 49 | CONFIG_FAIR_GROUP_SCHED=y |
50 | CONFIG_FAIR_USER_SCHED=y | 50 | # CONFIG_RT_GROUP_SCHED is not set |
51 | # CONFIG_FAIR_CGROUP_SCHED is not set | 51 | CONFIG_USER_SCHED=y |
52 | # CONFIG_CGROUP_SCHED is not set | ||
52 | # CONFIG_SYSFS_DEPRECATED is not set | 53 | # CONFIG_SYSFS_DEPRECATED is not set |
53 | # CONFIG_RELAY is not set | 54 | # CONFIG_RELAY is not set |
55 | CONFIG_NAMESPACES=y | ||
56 | # CONFIG_UTS_NS is not set | ||
57 | # CONFIG_IPC_NS is not set | ||
58 | # CONFIG_USER_NS is not set | ||
59 | # CONFIG_PID_NS is not set | ||
54 | CONFIG_BLK_DEV_INITRD=y | 60 | CONFIG_BLK_DEV_INITRD=y |
55 | CONFIG_INITRAMFS_SOURCE="" | 61 | CONFIG_INITRAMFS_SOURCE="" |
56 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 62 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -64,17 +70,26 @@ CONFIG_HOTPLUG=y | |||
64 | CONFIG_PRINTK=y | 70 | CONFIG_PRINTK=y |
65 | CONFIG_BUG=y | 71 | CONFIG_BUG=y |
66 | CONFIG_ELF_CORE=y | 72 | CONFIG_ELF_CORE=y |
73 | CONFIG_COMPAT_BRK=y | ||
67 | CONFIG_BASE_FULL=y | 74 | CONFIG_BASE_FULL=y |
68 | CONFIG_FUTEX=y | 75 | CONFIG_FUTEX=y |
69 | CONFIG_ANON_INODES=y | 76 | CONFIG_ANON_INODES=y |
70 | CONFIG_EPOLL=y | 77 | CONFIG_EPOLL=y |
71 | CONFIG_SIGNALFD=y | 78 | CONFIG_SIGNALFD=y |
79 | CONFIG_TIMERFD=y | ||
72 | CONFIG_EVENTFD=y | 80 | CONFIG_EVENTFD=y |
73 | CONFIG_SHMEM=y | 81 | CONFIG_SHMEM=y |
74 | CONFIG_VM_EVENT_COUNTERS=y | 82 | CONFIG_VM_EVENT_COUNTERS=y |
75 | CONFIG_SLAB=y | 83 | CONFIG_SLAB=y |
76 | # CONFIG_SLUB is not set | 84 | # CONFIG_SLUB is not set |
77 | # CONFIG_SLOB is not set | 85 | # CONFIG_SLOB is not set |
86 | # CONFIG_PROFILING is not set | ||
87 | # CONFIG_MARKERS is not set | ||
88 | CONFIG_HAVE_OPROFILE=y | ||
89 | # CONFIG_KPROBES is not set | ||
90 | CONFIG_HAVE_KPROBES=y | ||
91 | CONFIG_PROC_PAGE_MONITOR=y | ||
92 | CONFIG_SLABINFO=y | ||
78 | CONFIG_RT_MUTEXES=y | 93 | CONFIG_RT_MUTEXES=y |
79 | # CONFIG_TINY_SHMEM is not set | 94 | # CONFIG_TINY_SHMEM is not set |
80 | CONFIG_BASE_SMALL=0 | 95 | CONFIG_BASE_SMALL=0 |
@@ -102,6 +117,8 @@ CONFIG_DEFAULT_AS=y | |||
102 | # CONFIG_DEFAULT_CFQ is not set | 117 | # CONFIG_DEFAULT_CFQ is not set |
103 | # CONFIG_DEFAULT_NOOP is not set | 118 | # CONFIG_DEFAULT_NOOP is not set |
104 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 119 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
120 | CONFIG_CLASSIC_RCU=y | ||
121 | # CONFIG_PREEMPT_RCU is not set | ||
105 | 122 | ||
106 | # | 123 | # |
107 | # System Type | 124 | # System Type |
@@ -130,6 +147,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
130 | # CONFIG_ARCH_KS8695 is not set | 147 | # CONFIG_ARCH_KS8695 is not set |
131 | # CONFIG_ARCH_NS9XXX is not set | 148 | # CONFIG_ARCH_NS9XXX is not set |
132 | # CONFIG_ARCH_MXC is not set | 149 | # CONFIG_ARCH_MXC is not set |
150 | # CONFIG_ARCH_ORION is not set | ||
133 | # CONFIG_ARCH_PNX4008 is not set | 151 | # CONFIG_ARCH_PNX4008 is not set |
134 | # CONFIG_ARCH_PXA is not set | 152 | # CONFIG_ARCH_PXA is not set |
135 | # CONFIG_ARCH_RPC is not set | 153 | # CONFIG_ARCH_RPC is not set |
@@ -139,6 +157,7 @@ CONFIG_DEFAULT_IOSCHED="anticipatory" | |||
139 | # CONFIG_ARCH_LH7A40X is not set | 157 | # CONFIG_ARCH_LH7A40X is not set |
140 | # CONFIG_ARCH_DAVINCI is not set | 158 | # CONFIG_ARCH_DAVINCI is not set |
141 | CONFIG_ARCH_OMAP=y | 159 | CONFIG_ARCH_OMAP=y |
160 | # CONFIG_ARCH_MSM7X00A is not set | ||
142 | 161 | ||
143 | # | 162 | # |
144 | # TI OMAP Implementations | 163 | # TI OMAP Implementations |
@@ -155,6 +174,7 @@ CONFIG_OMAP_MUX=y | |||
155 | # CONFIG_OMAP_MUX_DEBUG is not set | 174 | # CONFIG_OMAP_MUX_DEBUG is not set |
156 | CONFIG_OMAP_MUX_WARNINGS=y | 175 | CONFIG_OMAP_MUX_WARNINGS=y |
157 | CONFIG_OMAP_MCBSP=y | 176 | CONFIG_OMAP_MCBSP=y |
177 | # CONFIG_OMAP_MMU_FWK is not set | ||
158 | # CONFIG_OMAP_MPU_TIMER is not set | 178 | # CONFIG_OMAP_MPU_TIMER is not set |
159 | CONFIG_OMAP_32K_TIMER=y | 179 | CONFIG_OMAP_32K_TIMER=y |
160 | CONFIG_OMAP_32K_TIMER_HZ=128 | 180 | CONFIG_OMAP_32K_TIMER_HZ=128 |
@@ -266,6 +286,7 @@ CONFIG_ZBOOT_ROM_BSS=0x0 | |||
266 | CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh" | 286 | CONFIG_CMDLINE="mem=32M console=ttyS0,115200n8 root=0801 ro init=/bin/sh" |
267 | # CONFIG_XIP_KERNEL is not set | 287 | # CONFIG_XIP_KERNEL is not set |
268 | # CONFIG_KEXEC is not set | 288 | # CONFIG_KEXEC is not set |
289 | # CONFIG_ATAGS_PROC is not set | ||
269 | 290 | ||
270 | # | 291 | # |
271 | # CPU Frequency scaling | 292 | # CPU Frequency scaling |
@@ -311,9 +332,10 @@ CONFIG_PM=y | |||
311 | # CONFIG_PM_LEGACY is not set | 332 | # CONFIG_PM_LEGACY is not set |
312 | # CONFIG_PM_DEBUG is not set | 333 | # CONFIG_PM_DEBUG is not set |
313 | CONFIG_PM_SLEEP=y | 334 | CONFIG_PM_SLEEP=y |
314 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
315 | CONFIG_SUSPEND=y | 335 | CONFIG_SUSPEND=y |
336 | CONFIG_SUSPEND_FREEZER=y | ||
316 | # CONFIG_APM_EMULATION is not set | 337 | # CONFIG_APM_EMULATION is not set |
338 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
317 | 339 | ||
318 | # | 340 | # |
319 | # Networking | 341 | # Networking |
@@ -330,6 +352,7 @@ CONFIG_XFRM=y | |||
330 | # CONFIG_XFRM_USER is not set | 352 | # CONFIG_XFRM_USER is not set |
331 | # CONFIG_XFRM_SUB_POLICY is not set | 353 | # CONFIG_XFRM_SUB_POLICY is not set |
332 | # CONFIG_XFRM_MIGRATE is not set | 354 | # CONFIG_XFRM_MIGRATE is not set |
355 | # CONFIG_XFRM_STATISTICS is not set | ||
333 | # CONFIG_NET_KEY is not set | 356 | # CONFIG_NET_KEY is not set |
334 | CONFIG_INET=y | 357 | CONFIG_INET=y |
335 | # CONFIG_IP_MULTICAST is not set | 358 | # CONFIG_IP_MULTICAST is not set |
@@ -384,6 +407,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
384 | # | 407 | # |
385 | # CONFIG_NET_PKTGEN is not set | 408 | # CONFIG_NET_PKTGEN is not set |
386 | # CONFIG_HAMRADIO is not set | 409 | # CONFIG_HAMRADIO is not set |
410 | # CONFIG_CAN is not set | ||
387 | # CONFIG_IRDA is not set | 411 | # CONFIG_IRDA is not set |
388 | # CONFIG_BT is not set | 412 | # CONFIG_BT is not set |
389 | # CONFIG_AF_RXRPC is not set | 413 | # CONFIG_AF_RXRPC is not set |
@@ -421,11 +445,13 @@ CONFIG_BLK_DEV_LOOP=y | |||
421 | CONFIG_BLK_DEV_RAM=y | 445 | CONFIG_BLK_DEV_RAM=y |
422 | CONFIG_BLK_DEV_RAM_COUNT=16 | 446 | CONFIG_BLK_DEV_RAM_COUNT=16 |
423 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 447 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
424 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 448 | # CONFIG_BLK_DEV_XIP is not set |
425 | # CONFIG_CDROM_PKTCDVD is not set | 449 | # CONFIG_CDROM_PKTCDVD is not set |
426 | CONFIG_ATA_OVER_ETH=m | 450 | CONFIG_ATA_OVER_ETH=m |
427 | CONFIG_MISC_DEVICES=y | 451 | CONFIG_MISC_DEVICES=y |
428 | # CONFIG_EEPROM_93CX6 is not set | 452 | # CONFIG_EEPROM_93CX6 is not set |
453 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
454 | # CONFIG_HAVE_IDE is not set | ||
429 | 455 | ||
430 | # | 456 | # |
431 | # SCSI device support | 457 | # SCSI device support |
@@ -489,6 +515,7 @@ CONFIG_SMC91X=y | |||
489 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 515 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
490 | # CONFIG_B44 is not set | 516 | # CONFIG_B44 is not set |
491 | CONFIG_NETDEV_1000=y | 517 | CONFIG_NETDEV_1000=y |
518 | # CONFIG_E1000E_ENABLED is not set | ||
492 | CONFIG_NETDEV_10000=y | 519 | CONFIG_NETDEV_10000=y |
493 | 520 | ||
494 | # | 521 | # |
@@ -512,7 +539,6 @@ CONFIG_SLIP_COMPRESSED=y | |||
512 | CONFIG_SLHC=y | 539 | CONFIG_SLHC=y |
513 | # CONFIG_SLIP_SMART is not set | 540 | # CONFIG_SLIP_SMART is not set |
514 | # CONFIG_SLIP_MODE_SLIP6 is not set | 541 | # CONFIG_SLIP_MODE_SLIP6 is not set |
515 | # CONFIG_SHAPER is not set | ||
516 | # CONFIG_NETCONSOLE is not set | 542 | # CONFIG_NETCONSOLE is not set |
517 | # CONFIG_NETPOLL is not set | 543 | # CONFIG_NETPOLL is not set |
518 | # CONFIG_NET_POLL_CONTROLLER is not set | 544 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -616,12 +642,10 @@ CONFIG_I2C_OMAP=y | |||
616 | # | 642 | # |
617 | # Miscellaneous I2C Chip support | 643 | # Miscellaneous I2C Chip support |
618 | # | 644 | # |
619 | # CONFIG_SENSORS_DS1337 is not set | ||
620 | # CONFIG_SENSORS_DS1374 is not set | ||
621 | # CONFIG_DS1682 is not set | 645 | # CONFIG_DS1682 is not set |
622 | # CONFIG_SENSORS_EEPROM is not set | 646 | # CONFIG_SENSORS_EEPROM is not set |
623 | # CONFIG_SENSORS_PCF8574 is not set | 647 | # CONFIG_SENSORS_PCF8574 is not set |
624 | # CONFIG_SENSORS_PCA9539 is not set | 648 | # CONFIG_PCF8575 is not set |
625 | # CONFIG_SENSORS_PCF8591 is not set | 649 | # CONFIG_SENSORS_PCF8591 is not set |
626 | # CONFIG_ISP1301_OMAP is not set | 650 | # CONFIG_ISP1301_OMAP is not set |
627 | CONFIG_TPS65010=y | 651 | CONFIG_TPS65010=y |
@@ -649,6 +673,7 @@ CONFIG_HWMON=y | |||
649 | # CONFIG_SENSORS_ADM1031 is not set | 673 | # CONFIG_SENSORS_ADM1031 is not set |
650 | # CONFIG_SENSORS_ADM9240 is not set | 674 | # CONFIG_SENSORS_ADM9240 is not set |
651 | # CONFIG_SENSORS_ADT7470 is not set | 675 | # CONFIG_SENSORS_ADT7470 is not set |
676 | # CONFIG_SENSORS_ADT7473 is not set | ||
652 | # CONFIG_SENSORS_ATXP1 is not set | 677 | # CONFIG_SENSORS_ATXP1 is not set |
653 | # CONFIG_SENSORS_DS1621 is not set | 678 | # CONFIG_SENSORS_DS1621 is not set |
654 | # CONFIG_SENSORS_F71805F is not set | 679 | # CONFIG_SENSORS_F71805F is not set |
@@ -676,6 +701,7 @@ CONFIG_HWMON=y | |||
676 | # CONFIG_SENSORS_SMSC47M1 is not set | 701 | # CONFIG_SENSORS_SMSC47M1 is not set |
677 | # CONFIG_SENSORS_SMSC47M192 is not set | 702 | # CONFIG_SENSORS_SMSC47M192 is not set |
678 | # CONFIG_SENSORS_SMSC47B397 is not set | 703 | # CONFIG_SENSORS_SMSC47B397 is not set |
704 | # CONFIG_SENSORS_ADS7828 is not set | ||
679 | # CONFIG_SENSORS_THMC50 is not set | 705 | # CONFIG_SENSORS_THMC50 is not set |
680 | # CONFIG_SENSORS_VT1211 is not set | 706 | # CONFIG_SENSORS_VT1211 is not set |
681 | # CONFIG_SENSORS_W83781D is not set | 707 | # CONFIG_SENSORS_W83781D is not set |
@@ -683,6 +709,7 @@ CONFIG_HWMON=y | |||
683 | # CONFIG_SENSORS_W83792D is not set | 709 | # CONFIG_SENSORS_W83792D is not set |
684 | # CONFIG_SENSORS_W83793 is not set | 710 | # CONFIG_SENSORS_W83793 is not set |
685 | # CONFIG_SENSORS_W83L785TS is not set | 711 | # CONFIG_SENSORS_W83L785TS is not set |
712 | # CONFIG_SENSORS_W83L786NG is not set | ||
686 | # CONFIG_SENSORS_W83627HF is not set | 713 | # CONFIG_SENSORS_W83627HF is not set |
687 | # CONFIG_SENSORS_W83627EHF is not set | 714 | # CONFIG_SENSORS_W83627EHF is not set |
688 | # CONFIG_HWMON_DEBUG_CHIP is not set | 715 | # CONFIG_HWMON_DEBUG_CHIP is not set |
@@ -705,6 +732,7 @@ CONFIG_SSB_POSSIBLE=y | |||
705 | # Multifunction device drivers | 732 | # Multifunction device drivers |
706 | # | 733 | # |
707 | # CONFIG_MFD_SM501 is not set | 734 | # CONFIG_MFD_SM501 is not set |
735 | # CONFIG_MFD_ASIC3 is not set | ||
708 | 736 | ||
709 | # | 737 | # |
710 | # Multimedia devices | 738 | # Multimedia devices |
@@ -802,10 +830,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
802 | # | 830 | # |
803 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 831 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
804 | # | 832 | # |
805 | |||
806 | # | ||
807 | # USB Gadget Support | ||
808 | # | ||
809 | # CONFIG_USB_GADGET is not set | 833 | # CONFIG_USB_GADGET is not set |
810 | # CONFIG_MMC is not set | 834 | # CONFIG_MMC is not set |
811 | # CONFIG_NEW_LEDS is not set | 835 | # CONFIG_NEW_LEDS is not set |
@@ -826,12 +850,10 @@ CONFIG_EXT2_FS=y | |||
826 | # CONFIG_XFS_FS is not set | 850 | # CONFIG_XFS_FS is not set |
827 | # CONFIG_GFS2_FS is not set | 851 | # CONFIG_GFS2_FS is not set |
828 | # CONFIG_OCFS2_FS is not set | 852 | # CONFIG_OCFS2_FS is not set |
829 | # CONFIG_MINIX_FS is not set | 853 | CONFIG_DNOTIFY=y |
830 | CONFIG_ROMFS_FS=y | ||
831 | CONFIG_INOTIFY=y | 854 | CONFIG_INOTIFY=y |
832 | CONFIG_INOTIFY_USER=y | 855 | CONFIG_INOTIFY_USER=y |
833 | # CONFIG_QUOTA is not set | 856 | # CONFIG_QUOTA is not set |
834 | CONFIG_DNOTIFY=y | ||
835 | # CONFIG_AUTOFS_FS is not set | 857 | # CONFIG_AUTOFS_FS is not set |
836 | # CONFIG_AUTOFS4_FS is not set | 858 | # CONFIG_AUTOFS4_FS is not set |
837 | # CONFIG_FUSE_FS is not set | 859 | # CONFIG_FUSE_FS is not set |
@@ -874,8 +896,10 @@ CONFIG_SYSFS=y | |||
874 | # CONFIG_EFS_FS is not set | 896 | # CONFIG_EFS_FS is not set |
875 | CONFIG_CRAMFS=y | 897 | CONFIG_CRAMFS=y |
876 | # CONFIG_VXFS_FS is not set | 898 | # CONFIG_VXFS_FS is not set |
899 | # CONFIG_MINIX_FS is not set | ||
877 | # CONFIG_HPFS_FS is not set | 900 | # CONFIG_HPFS_FS is not set |
878 | # CONFIG_QNX4FS_FS is not set | 901 | # CONFIG_QNX4FS_FS is not set |
902 | CONFIG_ROMFS_FS=y | ||
879 | # CONFIG_SYSV_FS is not set | 903 | # CONFIG_SYSV_FS is not set |
880 | # CONFIG_UFS_FS is not set | 904 | # CONFIG_UFS_FS is not set |
881 | CONFIG_NETWORK_FILESYSTEMS=y | 905 | CONFIG_NETWORK_FILESYSTEMS=y |
@@ -946,9 +970,6 @@ CONFIG_NLS_ISO8859_1=y | |||
946 | # CONFIG_NLS_KOI8_U is not set | 970 | # CONFIG_NLS_KOI8_U is not set |
947 | # CONFIG_NLS_UTF8 is not set | 971 | # CONFIG_NLS_UTF8 is not set |
948 | # CONFIG_DLM is not set | 972 | # CONFIG_DLM is not set |
949 | CONFIG_INSTRUMENTATION=y | ||
950 | # CONFIG_PROFILING is not set | ||
951 | # CONFIG_MARKERS is not set | ||
952 | 973 | ||
953 | # | 974 | # |
954 | # Kernel hacking | 975 | # Kernel hacking |
@@ -975,6 +996,7 @@ CONFIG_FRAME_POINTER=y | |||
975 | CONFIG_CRYPTO=y | 996 | CONFIG_CRYPTO=y |
976 | CONFIG_CRYPTO_ALGAPI=y | 997 | CONFIG_CRYPTO_ALGAPI=y |
977 | CONFIG_CRYPTO_BLKCIPHER=y | 998 | CONFIG_CRYPTO_BLKCIPHER=y |
999 | # CONFIG_CRYPTO_SEQIV is not set | ||
978 | CONFIG_CRYPTO_MANAGER=y | 1000 | CONFIG_CRYPTO_MANAGER=y |
979 | # CONFIG_CRYPTO_HMAC is not set | 1001 | # CONFIG_CRYPTO_HMAC is not set |
980 | # CONFIG_CRYPTO_XCBC is not set | 1002 | # CONFIG_CRYPTO_XCBC is not set |
@@ -992,6 +1014,9 @@ CONFIG_CRYPTO_CBC=y | |||
992 | CONFIG_CRYPTO_PCBC=m | 1014 | CONFIG_CRYPTO_PCBC=m |
993 | # CONFIG_CRYPTO_LRW is not set | 1015 | # CONFIG_CRYPTO_LRW is not set |
994 | # CONFIG_CRYPTO_XTS is not set | 1016 | # CONFIG_CRYPTO_XTS is not set |
1017 | # CONFIG_CRYPTO_CTR is not set | ||
1018 | # CONFIG_CRYPTO_GCM is not set | ||
1019 | # CONFIG_CRYPTO_CCM is not set | ||
995 | # CONFIG_CRYPTO_CRYPTD is not set | 1020 | # CONFIG_CRYPTO_CRYPTD is not set |
996 | CONFIG_CRYPTO_DES=y | 1021 | CONFIG_CRYPTO_DES=y |
997 | # CONFIG_CRYPTO_FCRYPT is not set | 1022 | # CONFIG_CRYPTO_FCRYPT is not set |
@@ -1006,12 +1031,14 @@ CONFIG_CRYPTO_DES=y | |||
1006 | # CONFIG_CRYPTO_KHAZAD is not set | 1031 | # CONFIG_CRYPTO_KHAZAD is not set |
1007 | # CONFIG_CRYPTO_ANUBIS is not set | 1032 | # CONFIG_CRYPTO_ANUBIS is not set |
1008 | # CONFIG_CRYPTO_SEED is not set | 1033 | # CONFIG_CRYPTO_SEED is not set |
1034 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1009 | # CONFIG_CRYPTO_DEFLATE is not set | 1035 | # CONFIG_CRYPTO_DEFLATE is not set |
1010 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 1036 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
1011 | # CONFIG_CRYPTO_CRC32C is not set | 1037 | # CONFIG_CRYPTO_CRC32C is not set |
1012 | # CONFIG_CRYPTO_CAMELLIA is not set | 1038 | # CONFIG_CRYPTO_CAMELLIA is not set |
1013 | # CONFIG_CRYPTO_TEST is not set | 1039 | # CONFIG_CRYPTO_TEST is not set |
1014 | # CONFIG_CRYPTO_AUTHENC is not set | 1040 | # CONFIG_CRYPTO_AUTHENC is not set |
1041 | # CONFIG_CRYPTO_LZO is not set | ||
1015 | CONFIG_CRYPTO_HW=y | 1042 | CONFIG_CRYPTO_HW=y |
1016 | 1043 | ||
1017 | # | 1044 | # |
diff --git a/arch/arm/configs/omap_osk_5912_defconfig b/arch/arm/configs/omap_osk_5912_defconfig index d592a6487114..d4ca5e6e4ffa 100644 --- a/arch/arm/configs/omap_osk_5912_defconfig +++ b/arch/arm/configs/omap_osk_5912_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.24-rc5 | 3 | # Linux kernel version: 2.6.25-rc3 |
4 | # Mon Dec 17 21:12:45 2007 | 4 | # Mon Mar 3 03:35:17 2008 |
5 | # | 5 | # |
6 | CONFIG_ARM=y | 6 | CONFIG_ARM=y |
7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | 7 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y |
@@ -21,6 +21,7 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 21 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
22 | CONFIG_GENERIC_HWEIGHT=y | 22 | CONFIG_GENERIC_HWEIGHT=y |
23 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 23 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
24 | CONFIG_ARCH_SUPPORTS_AOUT=y | ||
24 | CONFIG_ZONE_DMA=y | 25 | CONFIG_ZONE_DMA=y |
25 | CONFIG_VECTORS_BASE=0xffff0000 | 26 | CONFIG_VECTORS_BASE=0xffff0000 |
26 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 27 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
@@ -39,17 +40,22 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
39 | # CONFIG_POSIX_MQUEUE is not set | 40 | # CONFIG_POSIX_MQUEUE is not set |
40 | # CONFIG_BSD_PROCESS_ACCT is not set | 41 | # CONFIG_BSD_PROCESS_ACCT is not set |
41 | # CONFIG_TASKSTATS is not set | 42 | # CONFIG_TASKSTATS is not set |
42 | # CONFIG_USER_NS is not set | ||
43 | # CONFIG_PID_NS is not set | ||
44 | # CONFIG_AUDIT is not set | 43 | # CONFIG_AUDIT is not set |
45 | # CONFIG_IKCONFIG is not set | 44 | # CONFIG_IKCONFIG is not set |
46 | CONFIG_LOG_BUF_SHIFT=14 | 45 | CONFIG_LOG_BUF_SHIFT=14 |
47 | # CONFIG_CGROUPS is not set | 46 | # CONFIG_CGROUPS is not set |
47 | CONFIG_GROUP_SCHED=y | ||
48 | CONFIG_FAIR_GROUP_SCHED=y | 48 | CONFIG_FAIR_GROUP_SCHED=y |
49 | CONFIG_FAIR_USER_SCHED=y | 49 | # CONFIG_RT_GROUP_SCHED is not set |
50 | # CONFIG_FAIR_CGROUP_SCHED is not set | 50 | CONFIG_USER_SCHED=y |
51 | # CONFIG_CGROUP_SCHED is not set | ||
51 | # CONFIG_SYSFS_DEPRECATED is not set | 52 | # CONFIG_SYSFS_DEPRECATED is not set |
52 | # CONFIG_RELAY is not set | 53 | # CONFIG_RELAY is not set |
54 | CONFIG_NAMESPACES=y | ||
55 | # CONFIG_UTS_NS is not set | ||
56 | # CONFIG_IPC_NS is not set | ||
57 | # CONFIG_USER_NS is not set | ||
58 | # CONFIG_PID_NS is not set | ||
53 | CONFIG_BLK_DEV_INITRD=y | 59 | CONFIG_BLK_DEV_INITRD=y |
54 | CONFIG_INITRAMFS_SOURCE="" | 60 | CONFIG_INITRAMFS_SOURCE="" |
55 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | 61 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y |
@@ -63,17 +69,26 @@ CONFIG_HOTPLUG=y | |||
63 | CONFIG_PRINTK=y | 69 | CONFIG_PRINTK=y |
64 | CONFIG_BUG=y | 70 | CONFIG_BUG=y |
65 | CONFIG_ELF_CORE=y | 71 | CONFIG_ELF_CORE=y |
72 | CONFIG_COMPAT_BRK=y | ||
66 | CONFIG_BASE_FULL=y | 73 | CONFIG_BASE_FULL=y |
67 | CONFIG_FUTEX=y | 74 | CONFIG_FUTEX=y |
68 | CONFIG_ANON_INODES=y | 75 | CONFIG_ANON_INODES=y |
69 | CONFIG_EPOLL=y | 76 | CONFIG_EPOLL=y |
70 | CONFIG_SIGNALFD=y | 77 | CONFIG_SIGNALFD=y |
78 | CONFIG_TIMERFD=y | ||
71 | CONFIG_EVENTFD=y | 79 | CONFIG_EVENTFD=y |
72 | CONFIG_SHMEM=y | 80 | CONFIG_SHMEM=y |
73 | CONFIG_VM_EVENT_COUNTERS=y | 81 | CONFIG_VM_EVENT_COUNTERS=y |
74 | CONFIG_SLAB=y | 82 | CONFIG_SLAB=y |
75 | # CONFIG_SLUB is not set | 83 | # CONFIG_SLUB is not set |
76 | # CONFIG_SLOB is not set | 84 | # CONFIG_SLOB is not set |
85 | # CONFIG_PROFILING is not set | ||
86 | # CONFIG_MARKERS is not set | ||
87 | CONFIG_HAVE_OPROFILE=y | ||
88 | # CONFIG_KPROBES is not set | ||
89 | CONFIG_HAVE_KPROBES=y | ||
90 | CONFIG_PROC_PAGE_MONITOR=y | ||
91 | CONFIG_SLABINFO=y | ||
77 | CONFIG_RT_MUTEXES=y | 92 | CONFIG_RT_MUTEXES=y |
78 | # CONFIG_TINY_SHMEM is not set | 93 | # CONFIG_TINY_SHMEM is not set |
79 | CONFIG_BASE_SMALL=0 | 94 | CONFIG_BASE_SMALL=0 |
@@ -101,6 +116,8 @@ CONFIG_IOSCHED_CFQ=y | |||
101 | CONFIG_DEFAULT_CFQ=y | 116 | CONFIG_DEFAULT_CFQ=y |
102 | # CONFIG_DEFAULT_NOOP is not set | 117 | # CONFIG_DEFAULT_NOOP is not set |
103 | CONFIG_DEFAULT_IOSCHED="cfq" | 118 | CONFIG_DEFAULT_IOSCHED="cfq" |
119 | CONFIG_CLASSIC_RCU=y | ||
120 | # CONFIG_PREEMPT_RCU is not set | ||
104 | 121 | ||
105 | # | 122 | # |
106 | # System Type | 123 | # System Type |
@@ -129,6 +146,7 @@ CONFIG_DEFAULT_IOSCHED="cfq" | |||
129 | # CONFIG_ARCH_KS8695 is not set | 146 | # CONFIG_ARCH_KS8695 is not set |
130 | # CONFIG_ARCH_NS9XXX is not set | 147 | # CONFIG_ARCH_NS9XXX is not set |
131 | # CONFIG_ARCH_MXC is not set | 148 | # CONFIG_ARCH_MXC is not set |
149 | # CONFIG_ARCH_ORION is not set | ||
132 | # CONFIG_ARCH_PNX4008 is not set | 150 | # CONFIG_ARCH_PNX4008 is not set |
133 | # CONFIG_ARCH_PXA is not set | 151 | # CONFIG_ARCH_PXA is not set |
134 | # CONFIG_ARCH_RPC is not set | 152 | # CONFIG_ARCH_RPC is not set |
@@ -138,6 +156,7 @@ CONFIG_DEFAULT_IOSCHED="cfq" | |||
138 | # CONFIG_ARCH_LH7A40X is not set | 156 | # CONFIG_ARCH_LH7A40X is not set |
139 | # CONFIG_ARCH_DAVINCI is not set | 157 | # CONFIG_ARCH_DAVINCI is not set |
140 | CONFIG_ARCH_OMAP=y | 158 | CONFIG_ARCH_OMAP=y |
159 | # CONFIG_ARCH_MSM7X00A is not set | ||
141 | 160 | ||
142 | # | 161 | # |
143 | # TI OMAP Implementations | 162 | # TI OMAP Implementations |
@@ -154,6 +173,7 @@ CONFIG_OMAP_MUX=y | |||
154 | # CONFIG_OMAP_MUX_DEBUG is not set | 173 | # CONFIG_OMAP_MUX_DEBUG is not set |
155 | CONFIG_OMAP_MUX_WARNINGS=y | 174 | CONFIG_OMAP_MUX_WARNINGS=y |
156 | CONFIG_OMAP_MCBSP=y | 175 | CONFIG_OMAP_MCBSP=y |
176 | # CONFIG_OMAP_MMU_FWK is not set | ||
157 | # CONFIG_OMAP_MPU_TIMER is not set | 177 | # CONFIG_OMAP_MPU_TIMER is not set |
158 | CONFIG_OMAP_32K_TIMER=y | 178 | CONFIG_OMAP_32K_TIMER=y |
159 | CONFIG_OMAP_32K_TIMER_HZ=128 | 179 | CONFIG_OMAP_32K_TIMER_HZ=128 |
@@ -173,13 +193,13 @@ CONFIG_ARCH_OMAP16XX=y | |||
173 | # | 193 | # |
174 | # OMAP Board Type | 194 | # OMAP Board Type |
175 | # | 195 | # |
176 | # CONFIG_MACH_OMAP_INNOVATOR is not set | 196 | CONFIG_MACH_OMAP_INNOVATOR=y |
177 | # CONFIG_MACH_OMAP_H2 is not set | 197 | CONFIG_MACH_OMAP_H2=y |
178 | # CONFIG_MACH_OMAP_H3 is not set | 198 | CONFIG_MACH_OMAP_H3=y |
179 | CONFIG_MACH_OMAP_OSK=y | 199 | CONFIG_MACH_OMAP_OSK=y |
180 | # CONFIG_OMAP_OSK_MISTRAL is not set | 200 | # CONFIG_OMAP_OSK_MISTRAL is not set |
181 | # CONFIG_MACH_NOKIA770 is not set | 201 | CONFIG_MACH_NOKIA770=y |
182 | # CONFIG_MACH_OMAP_GENERIC is not set | 202 | CONFIG_MACH_OMAP_GENERIC=y |
183 | 203 | ||
184 | # | 204 | # |
185 | # OMAP CPU Speed | 205 | # OMAP CPU Speed |
@@ -275,6 +295,7 @@ CONFIG_ZBOOT_ROM_BSS=0x0 | |||
275 | CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x10400000,8M root=/dev/ram0 rw" | 295 | CONFIG_CMDLINE="mem=32M console=ttyS0,115200 initrd=0x10400000,8M root=/dev/ram0 rw" |
276 | # CONFIG_XIP_KERNEL is not set | 296 | # CONFIG_XIP_KERNEL is not set |
277 | # CONFIG_KEXEC is not set | 297 | # CONFIG_KEXEC is not set |
298 | # CONFIG_ATAGS_PROC is not set | ||
278 | 299 | ||
279 | # | 300 | # |
280 | # CPU Frequency scaling | 301 | # CPU Frequency scaling |
@@ -307,9 +328,10 @@ CONFIG_PM=y | |||
307 | # CONFIG_PM_LEGACY is not set | 328 | # CONFIG_PM_LEGACY is not set |
308 | # CONFIG_PM_DEBUG is not set | 329 | # CONFIG_PM_DEBUG is not set |
309 | CONFIG_PM_SLEEP=y | 330 | CONFIG_PM_SLEEP=y |
310 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
311 | CONFIG_SUSPEND=y | 331 | CONFIG_SUSPEND=y |
332 | CONFIG_SUSPEND_FREEZER=y | ||
312 | # CONFIG_APM_EMULATION is not set | 333 | # CONFIG_APM_EMULATION is not set |
334 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
313 | 335 | ||
314 | # | 336 | # |
315 | # Networking | 337 | # Networking |
@@ -326,6 +348,7 @@ CONFIG_XFRM=y | |||
326 | # CONFIG_XFRM_USER is not set | 348 | # CONFIG_XFRM_USER is not set |
327 | # CONFIG_XFRM_SUB_POLICY is not set | 349 | # CONFIG_XFRM_SUB_POLICY is not set |
328 | # CONFIG_XFRM_MIGRATE is not set | 350 | # CONFIG_XFRM_MIGRATE is not set |
351 | # CONFIG_XFRM_STATISTICS is not set | ||
329 | # CONFIG_NET_KEY is not set | 352 | # CONFIG_NET_KEY is not set |
330 | CONFIG_INET=y | 353 | CONFIG_INET=y |
331 | CONFIG_IP_MULTICAST=y | 354 | CONFIG_IP_MULTICAST=y |
@@ -381,6 +404,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
381 | # | 404 | # |
382 | # CONFIG_NET_PKTGEN is not set | 405 | # CONFIG_NET_PKTGEN is not set |
383 | # CONFIG_HAMRADIO is not set | 406 | # CONFIG_HAMRADIO is not set |
407 | # CONFIG_CAN is not set | ||
384 | # CONFIG_IRDA is not set | 408 | # CONFIG_IRDA is not set |
385 | # CONFIG_BT is not set | 409 | # CONFIG_BT is not set |
386 | # CONFIG_AF_RXRPC is not set | 410 | # CONFIG_AF_RXRPC is not set |
@@ -493,11 +517,13 @@ CONFIG_BLK_DEV_LOOP=y | |||
493 | CONFIG_BLK_DEV_RAM=y | 517 | CONFIG_BLK_DEV_RAM=y |
494 | CONFIG_BLK_DEV_RAM_COUNT=16 | 518 | CONFIG_BLK_DEV_RAM_COUNT=16 |
495 | CONFIG_BLK_DEV_RAM_SIZE=8192 | 519 | CONFIG_BLK_DEV_RAM_SIZE=8192 |
496 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 520 | # CONFIG_BLK_DEV_XIP is not set |
497 | # CONFIG_CDROM_PKTCDVD is not set | 521 | # CONFIG_CDROM_PKTCDVD is not set |
498 | # CONFIG_ATA_OVER_ETH is not set | 522 | # CONFIG_ATA_OVER_ETH is not set |
499 | CONFIG_MISC_DEVICES=y | 523 | CONFIG_MISC_DEVICES=y |
500 | # CONFIG_EEPROM_93CX6 is not set | 524 | # CONFIG_EEPROM_93CX6 is not set |
525 | # CONFIG_ENCLOSURE_SERVICES is not set | ||
526 | CONFIG_HAVE_IDE=y | ||
501 | CONFIG_IDE=m | 527 | CONFIG_IDE=m |
502 | CONFIG_BLK_DEV_IDE=m | 528 | CONFIG_BLK_DEV_IDE=m |
503 | 529 | ||
@@ -519,7 +545,6 @@ CONFIG_IDE_PROC_FS=y | |||
519 | # | 545 | # |
520 | # CONFIG_IDE_GENERIC is not set | 546 | # CONFIG_IDE_GENERIC is not set |
521 | # CONFIG_BLK_DEV_PLATFORM is not set | 547 | # CONFIG_BLK_DEV_PLATFORM is not set |
522 | # CONFIG_IDE_ARM is not set | ||
523 | # CONFIG_BLK_DEV_IDEDMA is not set | 548 | # CONFIG_BLK_DEV_IDEDMA is not set |
524 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y | 549 | CONFIG_IDE_ARCH_OBSOLETE_INIT=y |
525 | # CONFIG_BLK_DEV_HD is not set | 550 | # CONFIG_BLK_DEV_HD is not set |
@@ -553,6 +578,7 @@ CONFIG_SMC91X=y | |||
553 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | 578 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set |
554 | # CONFIG_B44 is not set | 579 | # CONFIG_B44 is not set |
555 | CONFIG_NETDEV_1000=y | 580 | CONFIG_NETDEV_1000=y |
581 | # CONFIG_E1000E_ENABLED is not set | ||
556 | CONFIG_NETDEV_10000=y | 582 | CONFIG_NETDEV_10000=y |
557 | 583 | ||
558 | # | 584 | # |
@@ -574,7 +600,6 @@ CONFIG_PPP_MULTILINK=y | |||
574 | # CONFIG_PPPOL2TP is not set | 600 | # CONFIG_PPPOL2TP is not set |
575 | # CONFIG_SLIP is not set | 601 | # CONFIG_SLIP is not set |
576 | CONFIG_SLHC=y | 602 | CONFIG_SLHC=y |
577 | # CONFIG_SHAPER is not set | ||
578 | # CONFIG_NETCONSOLE is not set | 603 | # CONFIG_NETCONSOLE is not set |
579 | # CONFIG_NETPOLL is not set | 604 | # CONFIG_NETPOLL is not set |
580 | # CONFIG_NET_POLL_CONTROLLER is not set | 605 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -671,6 +696,7 @@ CONFIG_HW_RANDOM_OMAP=m | |||
671 | # CONFIG_SYNCLINK_CS is not set | 696 | # CONFIG_SYNCLINK_CS is not set |
672 | # CONFIG_CARDMAN_4000 is not set | 697 | # CONFIG_CARDMAN_4000 is not set |
673 | # CONFIG_CARDMAN_4040 is not set | 698 | # CONFIG_CARDMAN_4040 is not set |
699 | # CONFIG_IPWIRELESS is not set | ||
674 | # CONFIG_RAW_DRIVER is not set | 700 | # CONFIG_RAW_DRIVER is not set |
675 | # CONFIG_TCG_TPM is not set | 701 | # CONFIG_TCG_TPM is not set |
676 | CONFIG_I2C=y | 702 | CONFIG_I2C=y |
@@ -698,12 +724,10 @@ CONFIG_I2C_OMAP=y | |||
698 | # | 724 | # |
699 | # Miscellaneous I2C Chip support | 725 | # Miscellaneous I2C Chip support |
700 | # | 726 | # |
701 | # CONFIG_SENSORS_DS1337 is not set | ||
702 | # CONFIG_SENSORS_DS1374 is not set | ||
703 | # CONFIG_DS1682 is not set | 727 | # CONFIG_DS1682 is not set |
704 | # CONFIG_SENSORS_EEPROM is not set | 728 | # CONFIG_SENSORS_EEPROM is not set |
705 | # CONFIG_SENSORS_PCF8574 is not set | 729 | # CONFIG_SENSORS_PCF8574 is not set |
706 | # CONFIG_SENSORS_PCA9539 is not set | 730 | # CONFIG_PCF8575 is not set |
707 | # CONFIG_SENSORS_PCF8591 is not set | 731 | # CONFIG_SENSORS_PCF8591 is not set |
708 | # CONFIG_ISP1301_OMAP is not set | 732 | # CONFIG_ISP1301_OMAP is not set |
709 | CONFIG_TPS65010=y | 733 | CONFIG_TPS65010=y |
@@ -731,6 +755,7 @@ CONFIG_HWMON=y | |||
731 | # CONFIG_SENSORS_ADM1031 is not set | 755 | # CONFIG_SENSORS_ADM1031 is not set |
732 | # CONFIG_SENSORS_ADM9240 is not set | 756 | # CONFIG_SENSORS_ADM9240 is not set |
733 | # CONFIG_SENSORS_ADT7470 is not set | 757 | # CONFIG_SENSORS_ADT7470 is not set |
758 | # CONFIG_SENSORS_ADT7473 is not set | ||
734 | # CONFIG_SENSORS_ATXP1 is not set | 759 | # CONFIG_SENSORS_ATXP1 is not set |
735 | # CONFIG_SENSORS_DS1621 is not set | 760 | # CONFIG_SENSORS_DS1621 is not set |
736 | # CONFIG_SENSORS_F71805F is not set | 761 | # CONFIG_SENSORS_F71805F is not set |
@@ -758,6 +783,7 @@ CONFIG_HWMON=y | |||
758 | # CONFIG_SENSORS_SMSC47M1 is not set | 783 | # CONFIG_SENSORS_SMSC47M1 is not set |
759 | # CONFIG_SENSORS_SMSC47M192 is not set | 784 | # CONFIG_SENSORS_SMSC47M192 is not set |
760 | # CONFIG_SENSORS_SMSC47B397 is not set | 785 | # CONFIG_SENSORS_SMSC47B397 is not set |
786 | # CONFIG_SENSORS_ADS7828 is not set | ||
761 | # CONFIG_SENSORS_THMC50 is not set | 787 | # CONFIG_SENSORS_THMC50 is not set |
762 | # CONFIG_SENSORS_VT1211 is not set | 788 | # CONFIG_SENSORS_VT1211 is not set |
763 | # CONFIG_SENSORS_W83781D is not set | 789 | # CONFIG_SENSORS_W83781D is not set |
@@ -765,6 +791,7 @@ CONFIG_HWMON=y | |||
765 | # CONFIG_SENSORS_W83792D is not set | 791 | # CONFIG_SENSORS_W83792D is not set |
766 | # CONFIG_SENSORS_W83793 is not set | 792 | # CONFIG_SENSORS_W83793 is not set |
767 | # CONFIG_SENSORS_W83L785TS is not set | 793 | # CONFIG_SENSORS_W83L785TS is not set |
794 | # CONFIG_SENSORS_W83L786NG is not set | ||
768 | # CONFIG_SENSORS_W83627HF is not set | 795 | # CONFIG_SENSORS_W83627HF is not set |
769 | # CONFIG_SENSORS_W83627EHF is not set | 796 | # CONFIG_SENSORS_W83627EHF is not set |
770 | # CONFIG_HWMON_DEBUG_CHIP is not set | 797 | # CONFIG_HWMON_DEBUG_CHIP is not set |
@@ -780,6 +807,7 @@ CONFIG_SSB_POSSIBLE=y | |||
780 | # Multifunction device drivers | 807 | # Multifunction device drivers |
781 | # | 808 | # |
782 | # CONFIG_MFD_SM501 is not set | 809 | # CONFIG_MFD_SM501 is not set |
810 | # CONFIG_MFD_ASIC3 is not set | ||
783 | 811 | ||
784 | # | 812 | # |
785 | # Multimedia devices | 813 | # Multimedia devices |
@@ -865,10 +893,6 @@ CONFIG_USB_ARCH_HAS_OHCI=y | |||
865 | # | 893 | # |
866 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 894 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
867 | # | 895 | # |
868 | |||
869 | # | ||
870 | # USB Gadget Support | ||
871 | # | ||
872 | # CONFIG_USB_GADGET is not set | 896 | # CONFIG_USB_GADGET is not set |
873 | # CONFIG_MMC is not set | 897 | # CONFIG_MMC is not set |
874 | # CONFIG_NEW_LEDS is not set | 898 | # CONFIG_NEW_LEDS is not set |
@@ -889,12 +913,10 @@ CONFIG_EXT2_FS=y | |||
889 | # CONFIG_XFS_FS is not set | 913 | # CONFIG_XFS_FS is not set |
890 | # CONFIG_GFS2_FS is not set | 914 | # CONFIG_GFS2_FS is not set |
891 | # CONFIG_OCFS2_FS is not set | 915 | # CONFIG_OCFS2_FS is not set |
892 | # CONFIG_MINIX_FS is not set | 916 | CONFIG_DNOTIFY=y |
893 | # CONFIG_ROMFS_FS is not set | ||
894 | CONFIG_INOTIFY=y | 917 | CONFIG_INOTIFY=y |
895 | CONFIG_INOTIFY_USER=y | 918 | CONFIG_INOTIFY_USER=y |
896 | # CONFIG_QUOTA is not set | 919 | # CONFIG_QUOTA is not set |
897 | CONFIG_DNOTIFY=y | ||
898 | CONFIG_AUTOFS_FS=y | 920 | CONFIG_AUTOFS_FS=y |
899 | CONFIG_AUTOFS4_FS=y | 921 | CONFIG_AUTOFS4_FS=y |
900 | # CONFIG_FUSE_FS is not set | 922 | # CONFIG_FUSE_FS is not set |
@@ -948,8 +970,10 @@ CONFIG_JFFS2_RTIME=y | |||
948 | # CONFIG_JFFS2_RUBIN is not set | 970 | # CONFIG_JFFS2_RUBIN is not set |
949 | # CONFIG_CRAMFS is not set | 971 | # CONFIG_CRAMFS is not set |
950 | # CONFIG_VXFS_FS is not set | 972 | # CONFIG_VXFS_FS is not set |
973 | # CONFIG_MINIX_FS is not set | ||
951 | # CONFIG_HPFS_FS is not set | 974 | # CONFIG_HPFS_FS is not set |
952 | # CONFIG_QNX4FS_FS is not set | 975 | # CONFIG_QNX4FS_FS is not set |
976 | # CONFIG_ROMFS_FS is not set | ||
953 | # CONFIG_SYSV_FS is not set | 977 | # CONFIG_SYSV_FS is not set |
954 | # CONFIG_UFS_FS is not set | 978 | # CONFIG_UFS_FS is not set |
955 | CONFIG_NETWORK_FILESYSTEMS=y | 979 | CONFIG_NETWORK_FILESYSTEMS=y |
@@ -1019,9 +1043,6 @@ CONFIG_NLS_ISO8859_1=m | |||
1019 | # CONFIG_NLS_KOI8_U is not set | 1043 | # CONFIG_NLS_KOI8_U is not set |
1020 | # CONFIG_NLS_UTF8 is not set | 1044 | # CONFIG_NLS_UTF8 is not set |
1021 | # CONFIG_DLM is not set | 1045 | # CONFIG_DLM is not set |
1022 | CONFIG_INSTRUMENTATION=y | ||
1023 | # CONFIG_PROFILING is not set | ||
1024 | # CONFIG_MARKERS is not set | ||
1025 | 1046 | ||
1026 | # | 1047 | # |
1027 | # Kernel hacking | 1048 | # Kernel hacking |
@@ -1045,7 +1066,51 @@ CONFIG_FRAME_POINTER=y | |||
1045 | # CONFIG_KEYS is not set | 1066 | # CONFIG_KEYS is not set |
1046 | # CONFIG_SECURITY is not set | 1067 | # CONFIG_SECURITY is not set |
1047 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | 1068 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set |
1048 | # CONFIG_CRYPTO is not set | 1069 | CONFIG_CRYPTO=y |
1070 | # CONFIG_CRYPTO_SEQIV is not set | ||
1071 | # CONFIG_CRYPTO_MANAGER is not set | ||
1072 | # CONFIG_CRYPTO_HMAC is not set | ||
1073 | # CONFIG_CRYPTO_XCBC is not set | ||
1074 | # CONFIG_CRYPTO_NULL is not set | ||
1075 | # CONFIG_CRYPTO_MD4 is not set | ||
1076 | # CONFIG_CRYPTO_MD5 is not set | ||
1077 | # CONFIG_CRYPTO_SHA1 is not set | ||
1078 | # CONFIG_CRYPTO_SHA256 is not set | ||
1079 | # CONFIG_CRYPTO_SHA512 is not set | ||
1080 | # CONFIG_CRYPTO_WP512 is not set | ||
1081 | # CONFIG_CRYPTO_TGR192 is not set | ||
1082 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1083 | # CONFIG_CRYPTO_ECB is not set | ||
1084 | # CONFIG_CRYPTO_CBC is not set | ||
1085 | # CONFIG_CRYPTO_PCBC is not set | ||
1086 | # CONFIG_CRYPTO_LRW is not set | ||
1087 | # CONFIG_CRYPTO_XTS is not set | ||
1088 | # CONFIG_CRYPTO_CTR is not set | ||
1089 | # CONFIG_CRYPTO_GCM is not set | ||
1090 | # CONFIG_CRYPTO_CCM is not set | ||
1091 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1092 | # CONFIG_CRYPTO_DES is not set | ||
1093 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1094 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1095 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1096 | # CONFIG_CRYPTO_SERPENT is not set | ||
1097 | # CONFIG_CRYPTO_AES is not set | ||
1098 | # CONFIG_CRYPTO_CAST5 is not set | ||
1099 | # CONFIG_CRYPTO_CAST6 is not set | ||
1100 | # CONFIG_CRYPTO_TEA is not set | ||
1101 | # CONFIG_CRYPTO_ARC4 is not set | ||
1102 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1103 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1104 | # CONFIG_CRYPTO_SEED is not set | ||
1105 | # CONFIG_CRYPTO_SALSA20 is not set | ||
1106 | # CONFIG_CRYPTO_DEFLATE is not set | ||
1107 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1108 | # CONFIG_CRYPTO_CRC32C is not set | ||
1109 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1110 | # CONFIG_CRYPTO_TEST is not set | ||
1111 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1112 | # CONFIG_CRYPTO_LZO is not set | ||
1113 | CONFIG_CRYPTO_HW=y | ||
1049 | 1114 | ||
1050 | # | 1115 | # |
1051 | # Library routines | 1116 | # Library routines |
diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index 024a9cf469b4..50f667febe29 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S | |||
@@ -11,6 +11,9 @@ | |||
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #define ATAG_CORE 0x54410001 | ||
15 | #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) | ||
16 | |||
14 | .type __switch_data, %object | 17 | .type __switch_data, %object |
15 | __switch_data: | 18 | __switch_data: |
16 | .long __mmap_switched | 19 | .long __mmap_switched |
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 7898cbc9861a..bff4c6e90dd5 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -29,9 +29,6 @@ | |||
29 | #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) | 29 | #define KERNEL_RAM_VADDR (PAGE_OFFSET + TEXT_OFFSET) |
30 | #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) | 30 | #define KERNEL_RAM_PADDR (PHYS_OFFSET + TEXT_OFFSET) |
31 | 31 | ||
32 | #define ATAG_CORE 0x54410001 | ||
33 | #define ATAG_CORE_SIZE ((2*4 + 3*4) >> 2) | ||
34 | |||
35 | 32 | ||
36 | /* | 33 | /* |
37 | * swapper_pg_dir is the virtual address of the initial page table. | 34 | * swapper_pg_dir is the virtual address of the initial page table. |
diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index a22a98c43ca5..13e371aad879 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c | |||
@@ -431,6 +431,11 @@ int __kprobes longjmp_break_handler(struct kprobe *p, struct pt_regs *regs) | |||
431 | return 0; | 431 | return 0; |
432 | } | 432 | } |
433 | 433 | ||
434 | int __kprobes arch_trampoline_kprobe(struct kprobe *p) | ||
435 | { | ||
436 | return 0; | ||
437 | } | ||
438 | |||
434 | static struct undef_hook kprobes_break_hook = { | 439 | static struct undef_hook kprobes_break_hook = { |
435 | .instr_mask = 0xffffffff, | 440 | .instr_mask = 0xffffffff, |
436 | .instr_val = KPROBE_BREAKPOINT_INSTRUCTION, | 441 | .instr_val = KPROBE_BREAKPOINT_INSTRUCTION, |
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 38313abef657..bf103b24c937 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c | |||
@@ -245,10 +245,7 @@ static struct fb_monspecs at91fb_default_monspecs = { | |||
245 | 245 | ||
246 | static void at91_lcdc_power_control(int on) | 246 | static void at91_lcdc_power_control(int on) |
247 | { | 247 | { |
248 | if (on) | 248 | at91_set_gpio_value(AT91_PIN_PA30, on); |
249 | at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */ | ||
250 | else | ||
251 | at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */ | ||
252 | } | 249 | } |
253 | 250 | ||
254 | /* Driver datas */ | 251 | /* Driver datas */ |
diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index f629c2b5f0c5..ee4964abcaf5 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c | |||
@@ -490,6 +490,11 @@ postcore_initcall(at91_gpio_debugfs_init); | |||
490 | 490 | ||
491 | /*--------------------------------------------------------------------------*/ | 491 | /*--------------------------------------------------------------------------*/ |
492 | 492 | ||
493 | /* This lock class tells lockdep that GPIO irqs are in a different | ||
494 | * category than their parents, so it won't report false recursion. | ||
495 | */ | ||
496 | static struct lock_class_key gpio_lock_class; | ||
497 | |||
493 | /* | 498 | /* |
494 | * Called from the processor-specific init to enable GPIO interrupt support. | 499 | * Called from the processor-specific init to enable GPIO interrupt support. |
495 | */ | 500 | */ |
@@ -510,6 +515,8 @@ void __init at91_gpio_irq_setup(void) | |||
510 | __raw_writel(~0, this->regbase + PIO_IDR); | 515 | __raw_writel(~0, this->regbase + PIO_IDR); |
511 | 516 | ||
512 | for (i = 0, pin = this->chipbase; i < 32; i++, pin++) { | 517 | for (i = 0, pin = this->chipbase; i < 32; i++, pin++) { |
518 | lockdep_set_class(&irq_desc[pin].lock, &gpio_lock_class); | ||
519 | |||
513 | /* | 520 | /* |
514 | * Can use the "simple" and not "edge" handler since it's | 521 | * Can use the "simple" and not "edge" handler since it's |
515 | * shorter, and the AIC handles interrupts sanely. | 522 | * shorter, and the AIC handles interrupts sanely. |
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index 7f31816896ad..45144ad2bed9 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c | |||
@@ -103,7 +103,7 @@ static void | |||
103 | h720x_gpio_handler(unsigned int mask, unsigned int irq, | 103 | h720x_gpio_handler(unsigned int mask, unsigned int irq, |
104 | struct irq_desc *desc) | 104 | struct irq_desc *desc) |
105 | { | 105 | { |
106 | IRQDBG("%s irq: %d\n",__FUNCTION__,irq); | 106 | IRQDBG("%s irq: %d\n", __func__, irq); |
107 | desc = irq_desc + irq; | 107 | desc = irq_desc + irq; |
108 | while (mask) { | 108 | while (mask) { |
109 | if (mask & 1) { | 109 | if (mask & 1) { |
@@ -123,7 +123,7 @@ h720x_gpioa_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
123 | 123 | ||
124 | mask = CPU_REG(GPIO_A_VIRT,GPIO_STAT); | 124 | mask = CPU_REG(GPIO_A_VIRT,GPIO_STAT); |
125 | irq = IRQ_CHAINED_GPIOA(0); | 125 | irq = IRQ_CHAINED_GPIOA(0); |
126 | IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); | 126 | IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq); |
127 | h720x_gpio_handler(mask, irq, desc); | 127 | h720x_gpio_handler(mask, irq, desc); |
128 | } | 128 | } |
129 | 129 | ||
@@ -133,7 +133,7 @@ h720x_gpiob_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
133 | unsigned int mask, irq; | 133 | unsigned int mask, irq; |
134 | mask = CPU_REG(GPIO_B_VIRT,GPIO_STAT); | 134 | mask = CPU_REG(GPIO_B_VIRT,GPIO_STAT); |
135 | irq = IRQ_CHAINED_GPIOB(0); | 135 | irq = IRQ_CHAINED_GPIOB(0); |
136 | IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); | 136 | IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq); |
137 | h720x_gpio_handler(mask, irq, desc); | 137 | h720x_gpio_handler(mask, irq, desc); |
138 | } | 138 | } |
139 | 139 | ||
@@ -144,7 +144,7 @@ h720x_gpioc_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
144 | 144 | ||
145 | mask = CPU_REG(GPIO_C_VIRT,GPIO_STAT); | 145 | mask = CPU_REG(GPIO_C_VIRT,GPIO_STAT); |
146 | irq = IRQ_CHAINED_GPIOC(0); | 146 | irq = IRQ_CHAINED_GPIOC(0); |
147 | IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); | 147 | IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq); |
148 | h720x_gpio_handler(mask, irq, desc); | 148 | h720x_gpio_handler(mask, irq, desc); |
149 | } | 149 | } |
150 | 150 | ||
@@ -155,7 +155,7 @@ h720x_gpiod_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
155 | 155 | ||
156 | mask = CPU_REG(GPIO_D_VIRT,GPIO_STAT); | 156 | mask = CPU_REG(GPIO_D_VIRT,GPIO_STAT); |
157 | irq = IRQ_CHAINED_GPIOD(0); | 157 | irq = IRQ_CHAINED_GPIOD(0); |
158 | IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); | 158 | IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq); |
159 | h720x_gpio_handler(mask, irq, desc); | 159 | h720x_gpio_handler(mask, irq, desc); |
160 | } | 160 | } |
161 | 161 | ||
@@ -167,7 +167,7 @@ h720x_gpioe_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
167 | 167 | ||
168 | mask = CPU_REG(GPIO_E_VIRT,GPIO_STAT); | 168 | mask = CPU_REG(GPIO_E_VIRT,GPIO_STAT); |
169 | irq = IRQ_CHAINED_GPIOE(0); | 169 | irq = IRQ_CHAINED_GPIOE(0); |
170 | IRQDBG("%s mask: 0x%08x irq: %d\n",__FUNCTION__,mask,irq); | 170 | IRQDBG("%s mask: 0x%08x irq: %d\n", __func__, mask,irq); |
171 | h720x_gpio_handler(mask, irq, desc); | 171 | h720x_gpio_handler(mask, irq, desc); |
172 | } | 172 | } |
173 | #endif | 173 | #endif |
diff --git a/arch/arm/mach-imx/dma.c b/arch/arm/mach-imx/dma.c index bc6fb02d213b..a59ff2987cb7 100644 --- a/arch/arm/mach-imx/dma.c +++ b/arch/arm/mach-imx/dma.c | |||
@@ -54,7 +54,7 @@ static inline int imx_dma_sg_next(imx_dmach_t dma_ch, unsigned int lastcount) | |||
54 | 54 | ||
55 | if (!imxdma->name) { | 55 | if (!imxdma->name) { |
56 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", | 56 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", |
57 | __FUNCTION__, dma_ch); | 57 | __func__, dma_ch); |
58 | return 0; | 58 | return 0; |
59 | } | 59 | } |
60 | 60 | ||
@@ -288,7 +288,7 @@ imx_dma_setup_handlers(imx_dmach_t dma_ch, | |||
288 | 288 | ||
289 | if (!imxdma->name) { | 289 | if (!imxdma->name) { |
290 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", | 290 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", |
291 | __FUNCTION__, dma_ch); | 291 | __func__, dma_ch); |
292 | return -ENODEV; | 292 | return -ENODEV; |
293 | } | 293 | } |
294 | 294 | ||
@@ -321,7 +321,7 @@ void imx_dma_enable(imx_dmach_t dma_ch) | |||
321 | 321 | ||
322 | if (!imxdma->name) { | 322 | if (!imxdma->name) { |
323 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", | 323 | printk(KERN_CRIT "%s: called for not allocated channel %d\n", |
324 | __FUNCTION__, dma_ch); | 324 | __func__, dma_ch); |
325 | return; | 325 | return; |
326 | } | 326 | } |
327 | 327 | ||
@@ -365,7 +365,7 @@ int imx_dma_request(imx_dmach_t dma_ch, const char *name) | |||
365 | 365 | ||
366 | if (dma_ch >= IMX_DMA_CHANNELS) { | 366 | if (dma_ch >= IMX_DMA_CHANNELS) { |
367 | printk(KERN_CRIT "%s: called for non-existed channel %d\n", | 367 | printk(KERN_CRIT "%s: called for non-existed channel %d\n", |
368 | __FUNCTION__, dma_ch); | 368 | __func__, dma_ch); |
369 | return -EINVAL; | 369 | return -EINVAL; |
370 | } | 370 | } |
371 | 371 | ||
@@ -396,7 +396,7 @@ void imx_dma_free(imx_dmach_t dma_ch) | |||
396 | if (!imxdma->name) { | 396 | if (!imxdma->name) { |
397 | printk(KERN_CRIT | 397 | printk(KERN_CRIT |
398 | "%s: trying to free channel %d which is already freed\n", | 398 | "%s: trying to free channel %d which is already freed\n", |
399 | __FUNCTION__, dma_ch); | 399 | __func__, dma_ch); |
400 | return; | 400 | return; |
401 | } | 401 | } |
402 | 402 | ||
@@ -456,7 +456,7 @@ imx_dma_request_by_prio(imx_dmach_t * pdma_ch, const char *name, | |||
456 | } | 456 | } |
457 | } | 457 | } |
458 | 458 | ||
459 | printk(KERN_ERR "%s: no free DMA channel found\n", __FUNCTION__); | 459 | printk(KERN_ERR "%s: no free DMA channel found\n", __func__); |
460 | 460 | ||
461 | return -ENODEV; | 461 | return -ENODEV; |
462 | } | 462 | } |
diff --git a/arch/arm/mach-imx/irq.c b/arch/arm/mach-imx/irq.c index a7465db84893..e6695c4e623b 100644 --- a/arch/arm/mach-imx/irq.c +++ b/arch/arm/mach-imx/irq.c | |||
@@ -160,21 +160,21 @@ imx_gpio_irq_type(unsigned int _irq, unsigned int type) | |||
160 | static void | 160 | static void |
161 | imx_gpio_ack_irq(unsigned int irq) | 161 | imx_gpio_ack_irq(unsigned int irq) |
162 | { | 162 | { |
163 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, irq); | 163 | DEBUG_IRQ("%s: irq %d\n", __func__, irq); |
164 | ISR(IRQ_TO_REG(irq)) = 1 << ((irq - IRQ_GPIOA(0)) % 32); | 164 | ISR(IRQ_TO_REG(irq)) = 1 << ((irq - IRQ_GPIOA(0)) % 32); |
165 | } | 165 | } |
166 | 166 | ||
167 | static void | 167 | static void |
168 | imx_gpio_mask_irq(unsigned int irq) | 168 | imx_gpio_mask_irq(unsigned int irq) |
169 | { | 169 | { |
170 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, irq); | 170 | DEBUG_IRQ("%s: irq %d\n", __func__, irq); |
171 | IMR(IRQ_TO_REG(irq)) &= ~( 1 << ((irq - IRQ_GPIOA(0)) % 32)); | 171 | IMR(IRQ_TO_REG(irq)) &= ~( 1 << ((irq - IRQ_GPIOA(0)) % 32)); |
172 | } | 172 | } |
173 | 173 | ||
174 | static void | 174 | static void |
175 | imx_gpio_unmask_irq(unsigned int irq) | 175 | imx_gpio_unmask_irq(unsigned int irq) |
176 | { | 176 | { |
177 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, irq); | 177 | DEBUG_IRQ("%s: irq %d\n", __func__, irq); |
178 | IMR(IRQ_TO_REG(irq)) |= 1 << ((irq - IRQ_GPIOA(0)) % 32); | 178 | IMR(IRQ_TO_REG(irq)) |= 1 << ((irq - IRQ_GPIOA(0)) % 32); |
179 | } | 179 | } |
180 | 180 | ||
diff --git a/arch/arm/mach-iop13xx/iq81340mc.c b/arch/arm/mach-iop13xx/iq81340mc.c index 268a8d84999c..77b24cd1d88d 100644 --- a/arch/arm/mach-iop13xx/iq81340mc.c +++ b/arch/arm/mach-iop13xx/iq81340mc.c | |||
@@ -81,7 +81,7 @@ static void __init iq81340mc_init(void) | |||
81 | static void __init iq81340mc_timer_init(void) | 81 | static void __init iq81340mc_timer_init(void) |
82 | { | 82 | { |
83 | unsigned long bus_freq = iop13xx_core_freq() / iop13xx_xsi_bus_ratio(); | 83 | unsigned long bus_freq = iop13xx_core_freq() / iop13xx_xsi_bus_ratio(); |
84 | printk(KERN_DEBUG "%s: bus frequency: %lu\n", __FUNCTION__, bus_freq); | 84 | printk(KERN_DEBUG "%s: bus frequency: %lu\n", __func__, bus_freq); |
85 | iop_init_time(bus_freq); | 85 | iop_init_time(bus_freq); |
86 | } | 86 | } |
87 | 87 | ||
diff --git a/arch/arm/mach-iop13xx/iq81340sc.c b/arch/arm/mach-iop13xx/iq81340sc.c index a51ffd2683e5..e8522b3b8163 100644 --- a/arch/arm/mach-iop13xx/iq81340sc.c +++ b/arch/arm/mach-iop13xx/iq81340sc.c | |||
@@ -83,7 +83,7 @@ static void __init iq81340sc_init(void) | |||
83 | static void __init iq81340sc_timer_init(void) | 83 | static void __init iq81340sc_timer_init(void) |
84 | { | 84 | { |
85 | unsigned long bus_freq = iop13xx_core_freq() / iop13xx_xsi_bus_ratio(); | 85 | unsigned long bus_freq = iop13xx_core_freq() / iop13xx_xsi_bus_ratio(); |
86 | printk(KERN_DEBUG "%s: bus frequency: %lu\n", __FUNCTION__, bus_freq); | 86 | printk(KERN_DEBUG "%s: bus frequency: %lu\n", __func__, bus_freq); |
87 | iop_init_time(bus_freq); | 87 | iop_init_time(bus_freq); |
88 | } | 88 | } |
89 | 89 | ||
diff --git a/arch/arm/mach-iop13xx/pci.c b/arch/arm/mach-iop13xx/pci.c index 99d94cb1bafd..7825c1aaa27b 100644 --- a/arch/arm/mach-iop13xx/pci.c +++ b/arch/arm/mach-iop13xx/pci.c | |||
@@ -94,13 +94,13 @@ void iop13xx_map_pci_memory(void) | |||
94 | , 0, iop13xx_atux_mem_size, MT_DEVICE); | 94 | , 0, iop13xx_atux_mem_size, MT_DEVICE); |
95 | if (!iop13xx_atux_mem_base) { | 95 | if (!iop13xx_atux_mem_base) { |
96 | printk("%s: atux allocation " | 96 | printk("%s: atux allocation " |
97 | "failed\n", __FUNCTION__); | 97 | "failed\n", __func__); |
98 | BUG(); | 98 | BUG(); |
99 | } | 99 | } |
100 | } else | 100 | } else |
101 | iop13xx_atux_mem_size = 0; | 101 | iop13xx_atux_mem_size = 0; |
102 | PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n", | 102 | PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n", |
103 | __FUNCTION__, atu, iop13xx_atux_mem_size, | 103 | __func__, atu, iop13xx_atux_mem_size, |
104 | iop13xx_atux_mem_base); | 104 | iop13xx_atux_mem_base); |
105 | break; | 105 | break; |
106 | case 1: | 106 | case 1: |
@@ -120,13 +120,13 @@ void iop13xx_map_pci_memory(void) | |||
120 | , 0, iop13xx_atue_mem_size, MT_DEVICE); | 120 | , 0, iop13xx_atue_mem_size, MT_DEVICE); |
121 | if (!iop13xx_atue_mem_base) { | 121 | if (!iop13xx_atue_mem_base) { |
122 | printk("%s: atue allocation " | 122 | printk("%s: atue allocation " |
123 | "failed\n", __FUNCTION__); | 123 | "failed\n", __func__); |
124 | BUG(); | 124 | BUG(); |
125 | } | 125 | } |
126 | } else | 126 | } else |
127 | iop13xx_atue_mem_size = 0; | 127 | iop13xx_atue_mem_size = 0; |
128 | PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n", | 128 | PRINTK("%s: atu: %d bus_size: %d mem_base: %x\n", |
129 | __FUNCTION__, atu, iop13xx_atue_mem_size, | 129 | __func__, atu, iop13xx_atue_mem_size, |
130 | iop13xx_atue_mem_base); | 130 | iop13xx_atue_mem_base); |
131 | break; | 131 | break; |
132 | } | 132 | } |
diff --git a/arch/arm/mach-iop13xx/setup.c b/arch/arm/mach-iop13xx/setup.c index bfe0c87e3397..246f6d478720 100644 --- a/arch/arm/mach-iop13xx/setup.c +++ b/arch/arm/mach-iop13xx/setup.c | |||
@@ -519,7 +519,7 @@ void __init iop13xx_platform_init(void) | |||
519 | if (iq8134x_flash_resource.end > iq8134x_flash_resource.start) | 519 | if (iq8134x_flash_resource.end > iq8134x_flash_resource.start) |
520 | iop13xx_devices[plat_idx++] = &iq8134x_flash; | 520 | iop13xx_devices[plat_idx++] = &iq8134x_flash; |
521 | else | 521 | else |
522 | printk(KERN_ERR "%s: Failed to probe flash size\n", __FUNCTION__); | 522 | printk(KERN_ERR "%s: Failed to probe flash size\n", __func__); |
523 | #endif | 523 | #endif |
524 | 524 | ||
525 | platform_add_devices(iop13xx_devices, plat_idx); | 525 | platform_add_devices(iop13xx_devices, plat_idx); |
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c index bf04121d1a31..64be341109b3 100644 --- a/arch/arm/mach-ixp4xx/common-pci.c +++ b/arch/arm/mach-ixp4xx/common-pci.c | |||
@@ -87,7 +87,7 @@ static inline int check_master_abort(void) | |||
87 | if (isr & PCI_ISR_PFE) { | 87 | if (isr & PCI_ISR_PFE) { |
88 | /* make sure the Master Abort bit is reset */ | 88 | /* make sure the Master Abort bit is reset */ |
89 | *PCI_ISR = PCI_ISR_PFE; | 89 | *PCI_ISR = PCI_ISR_PFE; |
90 | pr_debug("%s failed\n", __FUNCTION__); | 90 | pr_debug("%s failed\n", __func__); |
91 | return 1; | 91 | return 1; |
92 | } | 92 | } |
93 | 93 | ||
diff --git a/arch/arm/mach-ixp4xx/gtwx5715-pci.c b/arch/arm/mach-ixp4xx/gtwx5715-pci.c index 0d5a42455820..49dec7868807 100644 --- a/arch/arm/mach-ixp4xx/gtwx5715-pci.c +++ b/arch/arm/mach-ixp4xx/gtwx5715-pci.c | |||
@@ -65,7 +65,7 @@ static int __init gtwx5715_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
65 | else | 65 | else |
66 | rc = gtwx5715_irqmap[slot][pin-1]; | 66 | rc = gtwx5715_irqmap[slot][pin-1]; |
67 | 67 | ||
68 | printk("%s: Mapped slot %d pin %d to IRQ %d\n", __FUNCTION__,slot, pin, rc); | 68 | printk("%s: Mapped slot %d pin %d to IRQ %d\n", __func__, slot, pin, rc); |
69 | return(rc); | 69 | return(rc); |
70 | } | 70 | } |
71 | 71 | ||
diff --git a/arch/arm/mach-netx/generic.c b/arch/arm/mach-netx/generic.c index b9ca8f98265d..fd7537f7d11e 100644 --- a/arch/arm/mach-netx/generic.c +++ b/arch/arm/mach-netx/generic.c | |||
@@ -133,7 +133,7 @@ netx_hif_ack_irq(unsigned int _irq) | |||
133 | val &= ~((1 << 24) << irq); | 133 | val &= ~((1 << 24) << irq); |
134 | writel(val, NETX_DPMAS_INT_EN); | 134 | writel(val, NETX_DPMAS_INT_EN); |
135 | 135 | ||
136 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); | 136 | DEBUG_IRQ("%s: irq %d\n", __func__, _irq); |
137 | } | 137 | } |
138 | 138 | ||
139 | static void | 139 | static void |
@@ -145,7 +145,7 @@ netx_hif_mask_irq(unsigned int _irq) | |||
145 | val = readl(NETX_DPMAS_INT_EN); | 145 | val = readl(NETX_DPMAS_INT_EN); |
146 | val &= ~((1 << 24) << irq); | 146 | val &= ~((1 << 24) << irq); |
147 | writel(val, NETX_DPMAS_INT_EN); | 147 | writel(val, NETX_DPMAS_INT_EN); |
148 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); | 148 | DEBUG_IRQ("%s: irq %d\n", __func__, _irq); |
149 | } | 149 | } |
150 | 150 | ||
151 | static void | 151 | static void |
@@ -157,7 +157,7 @@ netx_hif_unmask_irq(unsigned int _irq) | |||
157 | val = readl(NETX_DPMAS_INT_EN); | 157 | val = readl(NETX_DPMAS_INT_EN); |
158 | val |= (1 << 24) << irq; | 158 | val |= (1 << 24) << irq; |
159 | writel(val, NETX_DPMAS_INT_EN); | 159 | writel(val, NETX_DPMAS_INT_EN); |
160 | DEBUG_IRQ("%s: irq %d\n", __FUNCTION__, _irq); | 160 | DEBUG_IRQ("%s: irq %d\n", __func__, _irq); |
161 | } | 161 | } |
162 | 162 | ||
163 | static struct irq_chip netx_hif_chip = { | 163 | static struct irq_chip netx_hif_chip = { |
diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c index b2230213b983..5286e9fc1d30 100644 --- a/arch/arm/mach-ns9xxx/gpio.c +++ b/arch/arm/mach-ns9xxx/gpio.c | |||
@@ -31,7 +31,7 @@ | |||
31 | static spinlock_t gpio_lock = __SPIN_LOCK_UNLOCKED(gpio_lock); | 31 | static spinlock_t gpio_lock = __SPIN_LOCK_UNLOCKED(gpio_lock); |
32 | 32 | ||
33 | /* only access gpiores with atomic ops */ | 33 | /* only access gpiores with atomic ops */ |
34 | static DECLARE_BITMAP(gpiores, GPIO_MAX); | 34 | static DECLARE_BITMAP(gpiores, GPIO_MAX + 1); |
35 | 35 | ||
36 | static inline int ns9xxx_valid_gpio(unsigned gpio) | 36 | static inline int ns9xxx_valid_gpio(unsigned gpio) |
37 | { | 37 | { |
diff --git a/arch/arm/mach-omap1/board-h2.c b/arch/arm/mach-omap1/board-h2.c index 070345ee39a5..507987720015 100644 --- a/arch/arm/mach-omap1/board-h2.c +++ b/arch/arm/mach-omap1/board-h2.c | |||
@@ -350,6 +350,10 @@ static void __init h2_init_smc91x(void) | |||
350 | 350 | ||
351 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { | 351 | static struct i2c_board_info __initdata h2_i2c_board_info[] = { |
352 | { | 352 | { |
353 | I2C_BOARD_INFO("tps65010", 0x48), | ||
354 | .type = "tps65010", | ||
355 | .irq = OMAP_GPIO_IRQ(58), | ||
356 | }, { | ||
353 | I2C_BOARD_INFO("isp1301_omap", 0x2d), | 357 | I2C_BOARD_INFO("isp1301_omap", 0x2d), |
354 | .type = "isp1301_omap", | 358 | .type = "isp1301_omap", |
355 | .irq = OMAP_GPIO_IRQ(2), | 359 | .irq = OMAP_GPIO_IRQ(2), |
diff --git a/arch/arm/mach-omap1/board-h3.c b/arch/arm/mach-omap1/board-h3.c index 6fc516855a8c..c3ef1ee5f77b 100644 --- a/arch/arm/mach-omap1/board-h3.c +++ b/arch/arm/mach-omap1/board-h3.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/mtd/nand.h> | 26 | #include <linux/mtd/nand.h> |
27 | #include <linux/mtd/partitions.h> | 27 | #include <linux/mtd/partitions.h> |
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/spi/spi.h> | ||
29 | #include <linux/i2c/tps65010.h> | 30 | #include <linux/i2c/tps65010.h> |
30 | 31 | ||
31 | #include <asm/setup.h> | 32 | #include <asm/setup.h> |
@@ -51,6 +52,8 @@ | |||
51 | #include <asm/arch/mcbsp.h> | 52 | #include <asm/arch/mcbsp.h> |
52 | #include <asm/arch/omap-alsa.h> | 53 | #include <asm/arch/omap-alsa.h> |
53 | 54 | ||
55 | #define H3_TS_GPIO 48 | ||
56 | |||
54 | static int h3_keymap[] = { | 57 | static int h3_keymap[] = { |
55 | KEY(0, 0, KEY_LEFT), | 58 | KEY(0, 0, KEY_LEFT), |
56 | KEY(0, 1, KEY_RIGHT), | 59 | KEY(0, 1, KEY_RIGHT), |
@@ -373,6 +376,17 @@ static struct platform_device h3_lcd_device = { | |||
373 | .id = -1, | 376 | .id = -1, |
374 | }; | 377 | }; |
375 | 378 | ||
379 | static struct spi_board_info h3_spi_board_info[] __initdata = { | ||
380 | [0] = { | ||
381 | .modalias = "tsc2101", | ||
382 | .bus_num = 2, | ||
383 | .chip_select = 0, | ||
384 | .irq = OMAP_GPIO_IRQ(H3_TS_GPIO), | ||
385 | .max_speed_hz = 16000000, | ||
386 | /* .platform_data = &tsc_platform_data, */ | ||
387 | }, | ||
388 | }; | ||
389 | |||
376 | static struct omap_mcbsp_reg_cfg mcbsp_regs = { | 390 | static struct omap_mcbsp_reg_cfg mcbsp_regs = { |
377 | .spcr2 = FREE | FRST | GRST | XRST | XINTM(3), | 391 | .spcr2 = FREE | FRST | GRST | XRST | XINTM(3), |
378 | .spcr1 = RINTM(3) | RRST, | 392 | .spcr1 = RINTM(3) | RRST, |
@@ -457,6 +471,14 @@ static struct omap_board_config_kernel h3_config[] __initdata = { | |||
457 | { OMAP_TAG_LCD, &h3_lcd_config }, | 471 | { OMAP_TAG_LCD, &h3_lcd_config }, |
458 | }; | 472 | }; |
459 | 473 | ||
474 | static struct i2c_board_info __initdata h3_i2c_board_info[] = { | ||
475 | { | ||
476 | I2C_BOARD_INFO("tps65010", 0x48), | ||
477 | .type = "tps65013", | ||
478 | /* .irq = OMAP_GPIO_IRQ(??), */ | ||
479 | }, | ||
480 | }; | ||
481 | |||
460 | static struct omap_gpio_switch h3_gpio_switches[] __initdata = { | 482 | static struct omap_gpio_switch h3_gpio_switches[] __initdata = { |
461 | { | 483 | { |
462 | .name = "mmc_slot", | 484 | .name = "mmc_slot", |
diff --git a/arch/arm/mach-omap1/pm.c b/arch/arm/mach-omap1/pm.c index 8eb5dcdaead2..e6c64e10b7ec 100644 --- a/arch/arm/mach-omap1/pm.c +++ b/arch/arm/mach-omap1/pm.c | |||
@@ -717,7 +717,7 @@ static int __init omap_pm_init(void) | |||
717 | #endif | 717 | #endif |
718 | 718 | ||
719 | #ifdef CONFIG_OMAP_32K_TIMER | 719 | #ifdef CONFIG_OMAP_32K_TIMER |
720 | error = sysfs_create_file(power_kobj, &sleep_while_idle_attr); | 720 | error = sysfs_create_file(power_kobj, &sleep_while_idle_attr.attr); |
721 | if (error) | 721 | if (error) |
722 | printk(KERN_ERR "sysfs_create_file failed: %d\n", error); | 722 | printk(KERN_ERR "sysfs_create_file failed: %d\n", error); |
723 | #endif | 723 | #endif |
diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c index 5a4091f582ed..69c8174f3aac 100644 --- a/arch/arm/mach-omap2/io.c +++ b/arch/arm/mach-omap2/io.c | |||
@@ -42,6 +42,12 @@ static struct map_desc omap2_io_desc[] __initdata = { | |||
42 | .length = L3_24XX_SIZE, | 42 | .length = L3_24XX_SIZE, |
43 | .type = MT_DEVICE | 43 | .type = MT_DEVICE |
44 | }, | 44 | }, |
45 | { | ||
46 | .virtual = L4_24XX_VIRT, | ||
47 | .pfn = __phys_to_pfn(L4_24XX_PHYS), | ||
48 | .length = L4_24XX_SIZE, | ||
49 | .type = MT_DEVICE | ||
50 | }, | ||
45 | #ifdef CONFIG_ARCH_OMAP2430 | 51 | #ifdef CONFIG_ARCH_OMAP2430 |
46 | { | 52 | { |
47 | .virtual = L4_WK_243X_VIRT, | 53 | .virtual = L4_WK_243X_VIRT, |
diff --git a/arch/arm/mach-orion/addr-map.c b/arch/arm/mach-orion/addr-map.c index 2e2fd63643c3..58cc3c0333b6 100644 --- a/arch/arm/mach-orion/addr-map.c +++ b/arch/arm/mach-orion/addr-map.c | |||
@@ -97,14 +97,20 @@ | |||
97 | #define PCIE_BAR_CTRL(n) ORION_PCIE_REG(0x1804 + ((n - 1) * 4)) | 97 | #define PCIE_BAR_CTRL(n) ORION_PCIE_REG(0x1804 + ((n - 1) * 4)) |
98 | #define PCIE_BAR_LO(n) ORION_PCIE_REG(0x0010 + ((n) * 8)) | 98 | #define PCIE_BAR_LO(n) ORION_PCIE_REG(0x0010 + ((n) * 8)) |
99 | #define PCIE_BAR_HI(n) ORION_PCIE_REG(0x0014 + ((n) * 8)) | 99 | #define PCIE_BAR_HI(n) ORION_PCIE_REG(0x0014 + ((n) * 8)) |
100 | #define PCIE_WIN_CTRL(n) ORION_PCIE_REG(0x1820 + ((n) << 4)) | 100 | #define PCIE_WIN_CTRL(n) (((n) < 5) ? \ |
101 | #define PCIE_WIN_BASE(n) ORION_PCIE_REG(0x1824 + ((n) << 4)) | 101 | ORION_PCIE_REG(0x1820 + ((n) << 4)) : \ |
102 | #define PCIE_WIN_REMAP(n) ORION_PCIE_REG(0x182c + ((n) << 4)) | 102 | ORION_PCIE_REG(0x1880)) |
103 | #define PCIE_WIN_BASE(n) (((n) < 5) ? \ | ||
104 | ORION_PCIE_REG(0x1824 + ((n) << 4)) : \ | ||
105 | ORION_PCIE_REG(0x1884)) | ||
106 | #define PCIE_WIN_REMAP(n) (((n) < 5) ? \ | ||
107 | ORION_PCIE_REG(0x182c + ((n) << 4)) : \ | ||
108 | ORION_PCIE_REG(0x188c)) | ||
103 | #define PCIE_DEFWIN_CTRL ORION_PCIE_REG(0x18b0) | 109 | #define PCIE_DEFWIN_CTRL ORION_PCIE_REG(0x18b0) |
104 | #define PCIE_EXPROM_WIN_CTRL ORION_PCIE_REG(0x18c0) | 110 | #define PCIE_EXPROM_WIN_CTRL ORION_PCIE_REG(0x18c0) |
105 | #define PCIE_EXPROM_WIN_REMP ORION_PCIE_REG(0x18c4) | 111 | #define PCIE_EXPROM_WIN_REMP ORION_PCIE_REG(0x18c4) |
106 | #define PCIE_MAX_BARS 3 | 112 | #define PCIE_MAX_BARS 3 |
107 | #define PCIE_MAX_WINS 5 | 113 | #define PCIE_MAX_WINS 6 |
108 | 114 | ||
109 | /* | 115 | /* |
110 | * Use PCIE BAR '1' for all DDR banks | 116 | * Use PCIE BAR '1' for all DDR banks |
diff --git a/arch/arm/mach-orion/common.c b/arch/arm/mach-orion/common.c index 5f0ee4b8a9b7..bbc2b4ec932c 100644 --- a/arch/arm/mach-orion/common.c +++ b/arch/arm/mach-orion/common.c | |||
@@ -17,7 +17,9 @@ | |||
17 | #include <linux/mv643xx_eth.h> | 17 | #include <linux/mv643xx_eth.h> |
18 | #include <linux/mv643xx_i2c.h> | 18 | #include <linux/mv643xx_i2c.h> |
19 | #include <asm/page.h> | 19 | #include <asm/page.h> |
20 | #include <asm/setup.h> | ||
20 | #include <asm/timex.h> | 21 | #include <asm/timex.h> |
22 | #include <asm/mach/arch.h> | ||
21 | #include <asm/mach/map.h> | 23 | #include <asm/mach/map.h> |
22 | #include <asm/arch/hardware.h> | 24 | #include <asm/arch/hardware.h> |
23 | #include "common.h" | 25 | #include "common.h" |
@@ -177,8 +179,8 @@ static struct platform_device orion_ehci1 = { | |||
177 | 179 | ||
178 | static struct resource orion_eth_shared_resources[] = { | 180 | static struct resource orion_eth_shared_resources[] = { |
179 | { | 181 | { |
180 | .start = ORION_ETH_PHYS_BASE, | 182 | .start = ORION_ETH_PHYS_BASE + 0x2000, |
181 | .end = ORION_ETH_PHYS_BASE + 0xffff, | 183 | .end = ORION_ETH_PHYS_BASE + 0x3fff, |
182 | .flags = IORESOURCE_MEM, | 184 | .flags = IORESOURCE_MEM, |
183 | }, | 185 | }, |
184 | }; | 186 | }; |
@@ -347,3 +349,21 @@ void __init orion_init(void) | |||
347 | platform_device_register(&orion_ehci1); | 349 | platform_device_register(&orion_ehci1); |
348 | platform_device_register(&orion_i2c); | 350 | platform_device_register(&orion_i2c); |
349 | } | 351 | } |
352 | |||
353 | /* | ||
354 | * Many orion-based systems have buggy bootloader implementations. | ||
355 | * This is a common fixup for bogus memory tags. | ||
356 | */ | ||
357 | void __init tag_fixup_mem32(struct machine_desc *mdesc, struct tag *t, | ||
358 | char **from, struct meminfo *meminfo) | ||
359 | { | ||
360 | for (; t->hdr.size; t = tag_next(t)) | ||
361 | if (t->hdr.tag == ATAG_MEM && | ||
362 | (!t->u.mem.size || t->u.mem.size & ~PAGE_MASK || | ||
363 | t->u.mem.start & ~PAGE_MASK)) { | ||
364 | printk(KERN_WARNING | ||
365 | "Clearing invalid memory bank %dKB@0x%08x\n", | ||
366 | t->u.mem.size / 1024, t->u.mem.start); | ||
367 | t->hdr.tag = 0; | ||
368 | } | ||
369 | } | ||
diff --git a/arch/arm/mach-orion/common.h b/arch/arm/mach-orion/common.h index 10154ec885df..501497cc2c4d 100644 --- a/arch/arm/mach-orion/common.h +++ b/arch/arm/mach-orion/common.h | |||
@@ -83,4 +83,10 @@ struct mv_sata_platform_data; | |||
83 | 83 | ||
84 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data); | 84 | void __init orion_sata_init(struct mv_sata_platform_data *sata_data); |
85 | 85 | ||
86 | struct machine_desc; | ||
87 | struct meminfo; | ||
88 | struct tag; | ||
89 | extern void __init tag_fixup_mem32(struct machine_desc *, struct tag *, | ||
90 | char **, struct meminfo *); | ||
91 | |||
86 | #endif /* __ARCH_ORION_COMMON_H__ */ | 92 | #endif /* __ARCH_ORION_COMMON_H__ */ |
diff --git a/arch/arm/mach-orion/dns323-setup.c b/arch/arm/mach-orion/dns323-setup.c index 02b280c24820..076e155ad510 100644 --- a/arch/arm/mach-orion/dns323-setup.c +++ b/arch/arm/mach-orion/dns323-setup.c | |||
@@ -319,4 +319,5 @@ MACHINE_START(DNS323, "D-Link DNS-323") | |||
319 | .map_io = orion_map_io, | 319 | .map_io = orion_map_io, |
320 | .init_irq = orion_init_irq, | 320 | .init_irq = orion_init_irq, |
321 | .timer = &orion_timer, | 321 | .timer = &orion_timer, |
322 | .fixup = tag_fixup_mem32, | ||
322 | MACHINE_END | 323 | MACHINE_END |
diff --git a/arch/arm/mach-orion/gpio.c b/arch/arm/mach-orion/gpio.c index d5f00c86d616..f713818c66a3 100644 --- a/arch/arm/mach-orion/gpio.c +++ b/arch/arm/mach-orion/gpio.c | |||
@@ -36,7 +36,7 @@ int gpio_direction_input(unsigned pin) | |||
36 | unsigned long flags; | 36 | unsigned long flags; |
37 | 37 | ||
38 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | 38 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { |
39 | pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin); | 39 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); |
40 | return -EINVAL; | 40 | return -EINVAL; |
41 | } | 41 | } |
42 | 42 | ||
@@ -62,7 +62,7 @@ int gpio_direction_output(unsigned pin, int value) | |||
62 | int mask; | 62 | int mask; |
63 | 63 | ||
64 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | 64 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { |
65 | pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin); | 65 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); |
66 | return -EINVAL; | 66 | return -EINVAL; |
67 | } | 67 | } |
68 | 68 | ||
@@ -141,7 +141,7 @@ int gpio_request(unsigned pin, const char *label) | |||
141 | unsigned long flags; | 141 | unsigned long flags; |
142 | 142 | ||
143 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | 143 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { |
144 | pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin); | 144 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); |
145 | return -EINVAL; | 145 | return -EINVAL; |
146 | } | 146 | } |
147 | 147 | ||
@@ -149,7 +149,7 @@ int gpio_request(unsigned pin, const char *label) | |||
149 | 149 | ||
150 | if (gpio_label[pin]) { | 150 | if (gpio_label[pin]) { |
151 | pr_debug("%s: GPIO %d already used as %s\n", | 151 | pr_debug("%s: GPIO %d already used as %s\n", |
152 | __FUNCTION__, pin, gpio_label[pin]); | 152 | __func__, pin, gpio_label[pin]); |
153 | ret = -EBUSY; | 153 | ret = -EBUSY; |
154 | } else | 154 | } else |
155 | gpio_label[pin] = label ? label : "?"; | 155 | gpio_label[pin] = label ? label : "?"; |
@@ -162,12 +162,12 @@ EXPORT_SYMBOL(gpio_request); | |||
162 | void gpio_free(unsigned pin) | 162 | void gpio_free(unsigned pin) |
163 | { | 163 | { |
164 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { | 164 | if (pin >= GPIO_MAX || !test_bit(pin, gpio_valid)) { |
165 | pr_debug("%s: invalid GPIO %d\n", __FUNCTION__, pin); | 165 | pr_debug("%s: invalid GPIO %d\n", __func__, pin); |
166 | return; | 166 | return; |
167 | } | 167 | } |
168 | 168 | ||
169 | if (!gpio_label[pin]) | 169 | if (!gpio_label[pin]) |
170 | pr_warning("%s: GPIO %d already freed\n", __FUNCTION__, pin); | 170 | pr_warning("%s: GPIO %d already freed\n", __func__, pin); |
171 | else | 171 | else |
172 | gpio_label[pin] = NULL; | 172 | gpio_label[pin] = NULL; |
173 | } | 173 | } |
diff --git a/arch/arm/mach-orion/kurobox_pro-setup.c b/arch/arm/mach-orion/kurobox_pro-setup.c index 6817aca4aa26..785a07bdf1e2 100644 --- a/arch/arm/mach-orion/kurobox_pro-setup.c +++ b/arch/arm/mach-orion/kurobox_pro-setup.c | |||
@@ -240,4 +240,5 @@ MACHINE_START(KUROBOX_PRO, "Buffalo/Revogear Kurobox Pro") | |||
240 | .map_io = orion_map_io, | 240 | .map_io = orion_map_io, |
241 | .init_irq = orion_init_irq, | 241 | .init_irq = orion_init_irq, |
242 | .timer = &orion_timer, | 242 | .timer = &orion_timer, |
243 | .fixup = tag_fixup_mem32, | ||
243 | MACHINE_END | 244 | MACHINE_END |
diff --git a/arch/arm/mach-orion/ts209-setup.c b/arch/arm/mach-orion/ts209-setup.c index b8cfe6813e9d..45764dad16d0 100644 --- a/arch/arm/mach-orion/ts209-setup.c +++ b/arch/arm/mach-orion/ts209-setup.c | |||
@@ -357,4 +357,5 @@ MACHINE_START(TS209, "QNAP TS-109/TS-209") | |||
357 | .map_io = orion_map_io, | 357 | .map_io = orion_map_io, |
358 | .init_irq = orion_init_irq, | 358 | .init_irq = orion_init_irq, |
359 | .timer = &orion_timer, | 359 | .timer = &orion_timer, |
360 | .fixup = tag_fixup_mem32, | ||
360 | MACHINE_END | 361 | MACHINE_END |
diff --git a/arch/arm/mach-pnx4008/clock.c b/arch/arm/mach-pnx4008/clock.c index daa8d3d98eff..8e00ed43fb95 100644 --- a/arch/arm/mach-pnx4008/clock.c +++ b/arch/arm/mach-pnx4008/clock.c | |||
@@ -976,7 +976,7 @@ static int __init clk_init(void) | |||
976 | (*clkp)->set_parent((*clkp), (*clkp)->parent); | 976 | (*clkp)->set_parent((*clkp), (*clkp)->parent); |
977 | } | 977 | } |
978 | pr_debug("%s: clock %s, rate %ld\n", | 978 | pr_debug("%s: clock %s, rate %ld\n", |
979 | __FUNCTION__, (*clkp)->name, (*clkp)->rate); | 979 | __func__, (*clkp)->name, (*clkp)->rate); |
980 | } | 980 | } |
981 | 981 | ||
982 | local_clk_use(&ck_pll4); | 982 | local_clk_use(&ck_pll4); |
diff --git a/arch/arm/mach-pnx4008/dma.c b/arch/arm/mach-pnx4008/dma.c index f7009d845be8..fe152e82590b 100644 --- a/arch/arm/mach-pnx4008/dma.c +++ b/arch/arm/mach-pnx4008/dma.c | |||
@@ -192,7 +192,7 @@ void pnx4008_free_channel(int ch) | |||
192 | if (!dma_channels[ch].name) { | 192 | if (!dma_channels[ch].name) { |
193 | printk(KERN_CRIT | 193 | printk(KERN_CRIT |
194 | "%s: trying to free channel %d which is already freed\n", | 194 | "%s: trying to free channel %d which is already freed\n", |
195 | __FUNCTION__, ch); | 195 | __func__, ch); |
196 | return; | 196 | return; |
197 | } | 197 | } |
198 | 198 | ||
diff --git a/arch/arm/mach-pxa/cm-x270-pci.c b/arch/arm/mach-pxa/cm-x270-pci.c index 15c4e0df3e10..fcda7d5cb693 100644 --- a/arch/arm/mach-pxa/cm-x270-pci.c +++ b/arch/arm/mach-pxa/cm-x270-pci.c | |||
@@ -104,7 +104,7 @@ static int __init cmx270_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) | |||
104 | { | 104 | { |
105 | int irq; | 105 | int irq; |
106 | 106 | ||
107 | dev_dbg(&dev->dev, "%s: slot=%x, pin=%x\n", __FUNCTION__, slot, pin); | 107 | dev_dbg(&dev->dev, "%s: slot=%x, pin=%x\n", __func__, slot, pin); |
108 | 108 | ||
109 | irq = it8152_pci_map_irq(dev, slot, pin); | 109 | irq = it8152_pci_map_irq(dev, slot, pin); |
110 | if (irq) | 110 | if (irq) |
diff --git a/arch/arm/mach-pxa/cm-x270.c b/arch/arm/mach-pxa/cm-x270.c index 6012177a29a3..ecdbc96a4de1 100644 --- a/arch/arm/mach-pxa/cm-x270.c +++ b/arch/arm/mach-pxa/cm-x270.c | |||
@@ -504,11 +504,11 @@ static void cmx270_mci_setpower(struct device *dev, unsigned int vdd) | |||
504 | struct pxamci_platform_data *p_d = dev->platform_data; | 504 | struct pxamci_platform_data *p_d = dev->platform_data; |
505 | 505 | ||
506 | if ((1 << vdd) & p_d->ocr_mask) { | 506 | if ((1 << vdd) & p_d->ocr_mask) { |
507 | printk(KERN_DEBUG "%s: on\n", __FUNCTION__); | 507 | printk(KERN_DEBUG "%s: on\n", __func__); |
508 | GPCR(105) = GPIO_bit(105); | 508 | GPCR(105) = GPIO_bit(105); |
509 | } else { | 509 | } else { |
510 | GPSR(105) = GPIO_bit(105); | 510 | GPSR(105) = GPIO_bit(105); |
511 | printk(KERN_DEBUG "%s: off\n", __FUNCTION__); | 511 | printk(KERN_DEBUG "%s: off\n", __func__); |
512 | } | 512 | } |
513 | } | 513 | } |
514 | 514 | ||
diff --git a/arch/arm/mach-pxa/dma.c b/arch/arm/mach-pxa/dma.c index 93c4f31f127f..3215316d7b06 100644 --- a/arch/arm/mach-pxa/dma.c +++ b/arch/arm/mach-pxa/dma.c | |||
@@ -81,7 +81,7 @@ void pxa_free_dma (int dma_ch) | |||
81 | if (!dma_channels[dma_ch].name) { | 81 | if (!dma_channels[dma_ch].name) { |
82 | printk (KERN_CRIT | 82 | printk (KERN_CRIT |
83 | "%s: trying to free channel %d which is already freed\n", | 83 | "%s: trying to free channel %d which is already freed\n", |
84 | __FUNCTION__, dma_ch); | 84 | __func__, dma_ch); |
85 | return; | 85 | return; |
86 | } | 86 | } |
87 | 87 | ||
diff --git a/arch/arm/mach-pxa/em-x270.c b/arch/arm/mach-pxa/em-x270.c index 3d0ad5065ee5..3bb31314429a 100644 --- a/arch/arm/mach-pxa/em-x270.c +++ b/arch/arm/mach-pxa/em-x270.c | |||
@@ -264,7 +264,7 @@ static int em_x270_mci_init(struct device *dev, | |||
264 | "MMC card detect", data); | 264 | "MMC card detect", data); |
265 | if (err) { | 265 | if (err) { |
266 | printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n", | 266 | printk(KERN_ERR "%s: can't request MMC card detect IRQ: %d\n", |
267 | __FUNCTION__, err); | 267 | __func__, err); |
268 | return err; | 268 | return err; |
269 | } | 269 | } |
270 | 270 | ||
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c index 345c3deeb02e..72a436fb9a29 100644 --- a/arch/arm/mach-pxa/mainstone.c +++ b/arch/arm/mach-pxa/mainstone.c | |||
@@ -390,11 +390,11 @@ static void mainstone_mci_setpower(struct device *dev, unsigned int vdd) | |||
390 | struct pxamci_platform_data* p_d = dev->platform_data; | 390 | struct pxamci_platform_data* p_d = dev->platform_data; |
391 | 391 | ||
392 | if (( 1 << vdd) & p_d->ocr_mask) { | 392 | if (( 1 << vdd) & p_d->ocr_mask) { |
393 | printk(KERN_DEBUG "%s: on\n", __FUNCTION__); | 393 | printk(KERN_DEBUG "%s: on\n", __func__); |
394 | MST_MSCWR1 |= MST_MSCWR1_MMC_ON; | 394 | MST_MSCWR1 |= MST_MSCWR1_MMC_ON; |
395 | MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; | 395 | MST_MSCWR1 &= ~MST_MSCWR1_MS_SEL; |
396 | } else { | 396 | } else { |
397 | printk(KERN_DEBUG "%s: off\n", __FUNCTION__); | 397 | printk(KERN_DEBUG "%s: off\n", __func__); |
398 | MST_MSCWR1 &= ~MST_MSCWR1_MMC_ON; | 398 | MST_MSCWR1 &= ~MST_MSCWR1_MMC_ON; |
399 | } | 399 | } |
400 | } | 400 | } |
diff --git a/arch/arm/mach-pxa/trizeps4.c b/arch/arm/mach-pxa/trizeps4.c index 853fc9433750..f207fcd30cd7 100644 --- a/arch/arm/mach-pxa/trizeps4.c +++ b/arch/arm/mach-pxa/trizeps4.c | |||
@@ -217,7 +217,7 @@ void board_pcmcia_power(int power) | |||
217 | ConXS_BCR = trizeps_conxs_bcr; | 217 | ConXS_BCR = trizeps_conxs_bcr; |
218 | 218 | ||
219 | } | 219 | } |
220 | pr_debug("%s: o%s 0x%x\n", __FUNCTION__, power ? "n": "ff", trizeps_conxs_bcr); | 220 | pr_debug("%s: o%s 0x%x\n", __func__, power ? "n": "ff", trizeps_conxs_bcr); |
221 | } | 221 | } |
222 | 222 | ||
223 | /* backlight power switching for LCD panel */ | 223 | /* backlight power switching for LCD panel */ |
@@ -228,7 +228,7 @@ static void board_backlight_power(int on) | |||
228 | } else { | 228 | } else { |
229 | trizeps_conxs_bcr &= ~ConXS_BCR_L_DISP; | 229 | trizeps_conxs_bcr &= ~ConXS_BCR_L_DISP; |
230 | } | 230 | } |
231 | pr_debug("%s: o%s 0x%x\n", __FUNCTION__, on ? "n" : "ff", trizeps_conxs_bcr); | 231 | pr_debug("%s: o%s 0x%x\n", __func__, on ? "n" : "ff", trizeps_conxs_bcr); |
232 | ConXS_BCR = trizeps_conxs_bcr; | 232 | ConXS_BCR = trizeps_conxs_bcr; |
233 | } | 233 | } |
234 | 234 | ||
@@ -238,10 +238,10 @@ static void board_mci_power(struct device *dev, unsigned int vdd) | |||
238 | struct pxamci_platform_data* p_d = dev->platform_data; | 238 | struct pxamci_platform_data* p_d = dev->platform_data; |
239 | 239 | ||
240 | if (( 1 << vdd) & p_d->ocr_mask) { | 240 | if (( 1 << vdd) & p_d->ocr_mask) { |
241 | pr_debug("%s: on\n", __FUNCTION__); | 241 | pr_debug("%s: on\n", __func__); |
242 | /* FIXME fill in values here */ | 242 | /* FIXME fill in values here */ |
243 | } else { | 243 | } else { |
244 | pr_debug("%s: off\n", __FUNCTION__); | 244 | pr_debug("%s: off\n", __func__); |
245 | /* FIXME fill in values here */ | 245 | /* FIXME fill in values here */ |
246 | } | 246 | } |
247 | } | 247 | } |
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c index f60b7a66dfa0..842d9e6dc5ff 100644 --- a/arch/arm/mach-sa1100/badge4.c +++ b/arch/arm/mach-sa1100/badge4.c | |||
@@ -206,7 +206,7 @@ static int __init badge4_init(void) | |||
206 | if (ret < 0) | 206 | if (ret < 0) |
207 | printk(KERN_ERR | 207 | printk(KERN_ERR |
208 | "%s: SA-1111 initialization failed (%d)\n", | 208 | "%s: SA-1111 initialization failed (%d)\n", |
209 | __FUNCTION__, ret); | 209 | __func__, ret); |
210 | 210 | ||
211 | 211 | ||
212 | /* maybe turn on 5v0 from the start */ | 212 | /* maybe turn on 5v0 from the start */ |
@@ -240,11 +240,11 @@ void badge4_set_5V(unsigned subsystem, int on) | |||
240 | /* detect on->off and off->on transitions */ | 240 | /* detect on->off and off->on transitions */ |
241 | if ((!old_5V_bitmap) && (badge4_5V_bitmap)) { | 241 | if ((!old_5V_bitmap) && (badge4_5V_bitmap)) { |
242 | /* was off, now on */ | 242 | /* was off, now on */ |
243 | printk(KERN_INFO "%s: enabling 5V supply rail\n", __FUNCTION__); | 243 | printk(KERN_INFO "%s: enabling 5V supply rail\n", __func__); |
244 | GPSR = BADGE4_GPIO_PCMEN5V; | 244 | GPSR = BADGE4_GPIO_PCMEN5V; |
245 | } else if ((old_5V_bitmap) && (!badge4_5V_bitmap)) { | 245 | } else if ((old_5V_bitmap) && (!badge4_5V_bitmap)) { |
246 | /* was on, now off */ | 246 | /* was on, now off */ |
247 | printk(KERN_INFO "%s: disabling 5V supply rail\n", __FUNCTION__); | 247 | printk(KERN_INFO "%s: disabling 5V supply rail\n", __func__); |
248 | GPCR = BADGE4_GPIO_PCMEN5V; | 248 | GPCR = BADGE4_GPIO_PCMEN5V; |
249 | } | 249 | } |
250 | 250 | ||
diff --git a/arch/arm/mach-sa1100/cpu-sa1100.c b/arch/arm/mach-sa1100/cpu-sa1100.c index d68630b74d78..343368aa82de 100644 --- a/arch/arm/mach-sa1100/cpu-sa1100.c +++ b/arch/arm/mach-sa1100/cpu-sa1100.c | |||
@@ -139,7 +139,7 @@ static void sa1100_update_dram_timings(int current_speed, int new_speed) | |||
139 | 139 | ||
140 | if (settings->speed == 0) { | 140 | if (settings->speed == 0) { |
141 | panic("%s: couldn't find dram setting for speed %d\n", | 141 | panic("%s: couldn't find dram setting for speed %d\n", |
142 | __FUNCTION__, new_speed); | 142 | __func__, new_speed); |
143 | } | 143 | } |
144 | 144 | ||
145 | /* No risk, no fun: run with interrupts on! */ | 145 | /* No risk, no fun: run with interrupts on! */ |
diff --git a/arch/arm/mach-sa1100/dma.c b/arch/arm/mach-sa1100/dma.c index 1fbe053e8b59..e5080286060e 100644 --- a/arch/arm/mach-sa1100/dma.c +++ b/arch/arm/mach-sa1100/dma.c | |||
@@ -129,7 +129,7 @@ int sa1100_request_dma (dma_device_t device, const char *device_id, | |||
129 | if (err) { | 129 | if (err) { |
130 | printk(KERN_ERR | 130 | printk(KERN_ERR |
131 | "%s: unable to request IRQ %d for %s\n", | 131 | "%s: unable to request IRQ %d for %s\n", |
132 | __FUNCTION__, IRQ_DMA0 + i, device_id); | 132 | __func__, IRQ_DMA0 + i, device_id); |
133 | dma->device = 0; | 133 | dma->device = 0; |
134 | return err; | 134 | return err; |
135 | } | 135 | } |
@@ -165,12 +165,12 @@ void sa1100_free_dma(dma_regs_t *regs) | |||
165 | if (regs == (dma_regs_t *)&DDAR(i)) | 165 | if (regs == (dma_regs_t *)&DDAR(i)) |
166 | break; | 166 | break; |
167 | if (i >= SA1100_DMA_CHANNELS) { | 167 | if (i >= SA1100_DMA_CHANNELS) { |
168 | printk(KERN_ERR "%s: bad DMA identifier\n", __FUNCTION__); | 168 | printk(KERN_ERR "%s: bad DMA identifier\n", __func__); |
169 | return; | 169 | return; |
170 | } | 170 | } |
171 | 171 | ||
172 | if (!dma_chan[i].device) { | 172 | if (!dma_chan[i].device) { |
173 | printk(KERN_ERR "%s: Trying to free free DMA\n", __FUNCTION__); | 173 | printk(KERN_ERR "%s: Trying to free free DMA\n", __func__); |
174 | return; | 174 | return; |
175 | } | 175 | } |
176 | 176 | ||
@@ -329,7 +329,7 @@ void sa1100_reset_dma(dma_regs_t *regs) | |||
329 | if (regs == (dma_regs_t *)&DDAR(i)) | 329 | if (regs == (dma_regs_t *)&DDAR(i)) |
330 | break; | 330 | break; |
331 | if (i >= SA1100_DMA_CHANNELS) { | 331 | if (i >= SA1100_DMA_CHANNELS) { |
332 | printk(KERN_ERR "%s: bad DMA identifier\n", __FUNCTION__); | 332 | printk(KERN_ERR "%s: bad DMA identifier\n", __func__); |
333 | return; | 333 | return; |
334 | } | 334 | } |
335 | 335 | ||
diff --git a/arch/arm/mach-sa1100/h3600.c b/arch/arm/mach-sa1100/h3600.c index b72fee0f2538..8473c37b77d6 100644 --- a/arch/arm/mach-sa1100/h3600.c +++ b/arch/arm/mach-sa1100/h3600.c | |||
@@ -596,7 +596,7 @@ static void h3800_control_egpio(enum ipaq_egpio_type x, int setp) | |||
596 | case IPAQ_EGPIO_CODEC_NRESET: | 596 | case IPAQ_EGPIO_CODEC_NRESET: |
597 | case IPAQ_EGPIO_AUDIO_ON: | 597 | case IPAQ_EGPIO_AUDIO_ON: |
598 | case IPAQ_EGPIO_QMUTE: | 598 | case IPAQ_EGPIO_QMUTE: |
599 | printk("%s: error - should not be called\n", __FUNCTION__); | 599 | printk("%s: error - should not be called\n", __func__); |
600 | break; | 600 | break; |
601 | case IPAQ_EGPIO_OPT_NVRAM_ON: | 601 | case IPAQ_EGPIO_OPT_NVRAM_ON: |
602 | SET_ASIC2(GPIO2_OPT_ON_NVRAM); | 602 | SET_ASIC2(GPIO2_OPT_ON_NVRAM); |
@@ -638,7 +638,7 @@ static int h3800_pm_callback(int req) | |||
638 | static u16 asic2_data; | 638 | static u16 asic2_data; |
639 | int result = 0; | 639 | int result = 0; |
640 | 640 | ||
641 | printk("%s %d\n", __FUNCTION__, req); | 641 | printk("%s %d\n", __func__, req); |
642 | 642 | ||
643 | switch (req) { | 643 | switch (req) { |
644 | case PM_RESUME: | 644 | case PM_RESUME: |
@@ -666,7 +666,7 @@ static int h3800_pm_callback(int req) | |||
666 | asic2_data = H3800_ASIC2_GPIOPIOD; | 666 | asic2_data = H3800_ASIC2_GPIOPIOD; |
667 | break; | 667 | break; |
668 | default: | 668 | default: |
669 | printk("%s: unrecognized PM callback\n", __FUNCTION__); | 669 | printk("%s: unrecognized PM callback\n", __func__); |
670 | break; | 670 | break; |
671 | } | 671 | } |
672 | return result; | 672 | return result; |
@@ -706,7 +706,7 @@ static void h3800_IRQ_demux(unsigned int irq, struct irq_desc *desc) | |||
706 | { | 706 | { |
707 | int i; | 707 | int i; |
708 | 708 | ||
709 | if (0) printk("%s: interrupt received\n", __FUNCTION__); | 709 | if (0) printk("%s: interrupt received\n", __func__); |
710 | 710 | ||
711 | desc->chip->ack(irq); | 711 | desc->chip->ack(irq); |
712 | 712 | ||
@@ -716,21 +716,21 @@ static void h3800_IRQ_demux(unsigned int irq, struct irq_desc *desc) | |||
716 | 716 | ||
717 | /* KPIO */ | 717 | /* KPIO */ |
718 | irq = H3800_ASIC2_KPIINTFLAG; | 718 | irq = H3800_ASIC2_KPIINTFLAG; |
719 | if (0) printk("%s KPIO 0x%08X\n", __FUNCTION__, irq); | 719 | if (0) printk("%s KPIO 0x%08X\n", __func__, irq); |
720 | for (j = 0; j < H3800_KPIO_IRQ_COUNT; j++) | 720 | for (j = 0; j < H3800_KPIO_IRQ_COUNT; j++) |
721 | if (irq & kpio_irq_mask[j]) | 721 | if (irq & kpio_irq_mask[j]) |
722 | handle_edge_irq(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j); | 722 | handle_edge_irq(H3800_KPIO_IRQ_COUNT + j, irq_desc + H3800_KPIO_IRQ_COUNT + j); |
723 | 723 | ||
724 | /* GPIO2 */ | 724 | /* GPIO2 */ |
725 | irq = H3800_ASIC2_GPIINTFLAG; | 725 | irq = H3800_ASIC2_GPIINTFLAG; |
726 | if (0) printk("%s GPIO 0x%08X\n", __FUNCTION__, irq); | 726 | if (0) printk("%s GPIO 0x%08X\n", __func__, irq); |
727 | for (j = 0; j < H3800_GPIO_IRQ_COUNT; j++) | 727 | for (j = 0; j < H3800_GPIO_IRQ_COUNT; j++) |
728 | if (irq & gpio_irq_mask[j]) | 728 | if (irq & gpio_irq_mask[j]) |
729 | handle_edge_irq(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j); | 729 | handle_edge_irq(H3800_GPIO_IRQ_COUNT + j, irq_desc + H3800_GPIO_IRQ_COUNT + j); |
730 | } | 730 | } |
731 | 731 | ||
732 | if (i >= MAX_ASIC_ISR_LOOPS) | 732 | if (i >= MAX_ASIC_ISR_LOOPS) |
733 | printk("%s: interrupt processing overrun\n", __FUNCTION__); | 733 | printk("%s: interrupt processing overrun\n", __func__); |
734 | 734 | ||
735 | /* For level-based interrupts */ | 735 | /* For level-based interrupts */ |
736 | desc->chip->unmask(irq); | 736 | desc->chip->unmask(irq); |
diff --git a/arch/arm/plat-iop/pci.c b/arch/arm/plat-iop/pci.c index 2b5aa1135b11..98d01517b563 100644 --- a/arch/arm/plat-iop/pci.c +++ b/arch/arm/plat-iop/pci.c | |||
@@ -371,7 +371,7 @@ static int __init iop3xx_init_atu_setup(char *str) | |||
371 | default: | 371 | default: |
372 | printk(KERN_DEBUG "\"%s\" malformed at " | 372 | printk(KERN_DEBUG "\"%s\" malformed at " |
373 | "character: \'%c\'", | 373 | "character: \'%c\'", |
374 | __FUNCTION__, | 374 | __func__, |
375 | *str); | 375 | *str); |
376 | *(str + 1) = '\0'; | 376 | *(str + 1) = '\0'; |
377 | } | 377 | } |
diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c index c0d63b0c61c9..d719c15daa55 100644 --- a/arch/arm/plat-omap/cpu-omap.c +++ b/arch/arm/plat-omap/cpu-omap.c | |||
@@ -33,43 +33,33 @@ | |||
33 | #define MPU_CLK "virt_prcm_set" | 33 | #define MPU_CLK "virt_prcm_set" |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | static struct clk *mpu_clk; | ||
37 | |||
36 | /* TODO: Add support for SDRAM timing changes */ | 38 | /* TODO: Add support for SDRAM timing changes */ |
37 | 39 | ||
38 | int omap_verify_speed(struct cpufreq_policy *policy) | 40 | int omap_verify_speed(struct cpufreq_policy *policy) |
39 | { | 41 | { |
40 | struct clk * mpu_clk; | ||
41 | |||
42 | if (policy->cpu) | 42 | if (policy->cpu) |
43 | return -EINVAL; | 43 | return -EINVAL; |
44 | 44 | ||
45 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, | 45 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, |
46 | policy->cpuinfo.max_freq); | 46 | policy->cpuinfo.max_freq); |
47 | mpu_clk = clk_get(NULL, MPU_CLK); | 47 | |
48 | if (IS_ERR(mpu_clk)) | ||
49 | return PTR_ERR(mpu_clk); | ||
50 | policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; | 48 | policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000; |
51 | policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000; | 49 | policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000; |
52 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, | 50 | cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq, |
53 | policy->cpuinfo.max_freq); | 51 | policy->cpuinfo.max_freq); |
54 | clk_put(mpu_clk); | ||
55 | |||
56 | return 0; | 52 | return 0; |
57 | } | 53 | } |
58 | 54 | ||
59 | unsigned int omap_getspeed(unsigned int cpu) | 55 | unsigned int omap_getspeed(unsigned int cpu) |
60 | { | 56 | { |
61 | struct clk * mpu_clk; | ||
62 | unsigned long rate; | 57 | unsigned long rate; |
63 | 58 | ||
64 | if (cpu) | 59 | if (cpu) |
65 | return 0; | 60 | return 0; |
66 | 61 | ||
67 | mpu_clk = clk_get(NULL, MPU_CLK); | ||
68 | if (IS_ERR(mpu_clk)) | ||
69 | return 0; | ||
70 | rate = clk_get_rate(mpu_clk) / 1000; | 62 | rate = clk_get_rate(mpu_clk) / 1000; |
71 | clk_put(mpu_clk); | ||
72 | |||
73 | return rate; | 63 | return rate; |
74 | } | 64 | } |
75 | 65 | ||
@@ -77,14 +67,9 @@ static int omap_target(struct cpufreq_policy *policy, | |||
77 | unsigned int target_freq, | 67 | unsigned int target_freq, |
78 | unsigned int relation) | 68 | unsigned int relation) |
79 | { | 69 | { |
80 | struct clk * mpu_clk; | ||
81 | struct cpufreq_freqs freqs; | 70 | struct cpufreq_freqs freqs; |
82 | int ret = 0; | 71 | int ret = 0; |
83 | 72 | ||
84 | mpu_clk = clk_get(NULL, MPU_CLK); | ||
85 | if (IS_ERR(mpu_clk)) | ||
86 | return PTR_ERR(mpu_clk); | ||
87 | |||
88 | freqs.old = omap_getspeed(0); | 73 | freqs.old = omap_getspeed(0); |
89 | freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; | 74 | freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000; |
90 | freqs.cpu = 0; | 75 | freqs.cpu = 0; |
@@ -92,15 +77,12 @@ static int omap_target(struct cpufreq_policy *policy, | |||
92 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 77 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
93 | ret = clk_set_rate(mpu_clk, target_freq * 1000); | 78 | ret = clk_set_rate(mpu_clk, target_freq * 1000); |
94 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); | 79 | cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); |
95 | clk_put(mpu_clk); | ||
96 | 80 | ||
97 | return ret; | 81 | return ret; |
98 | } | 82 | } |
99 | 83 | ||
100 | static int __init omap_cpu_init(struct cpufreq_policy *policy) | 84 | static int __init omap_cpu_init(struct cpufreq_policy *policy) |
101 | { | 85 | { |
102 | struct clk * mpu_clk; | ||
103 | |||
104 | mpu_clk = clk_get(NULL, MPU_CLK); | 86 | mpu_clk = clk_get(NULL, MPU_CLK); |
105 | if (IS_ERR(mpu_clk)) | 87 | if (IS_ERR(mpu_clk)) |
106 | return PTR_ERR(mpu_clk); | 88 | return PTR_ERR(mpu_clk); |
@@ -111,17 +93,23 @@ static int __init omap_cpu_init(struct cpufreq_policy *policy) | |||
111 | policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; | 93 | policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000; |
112 | policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000; | 94 | policy->cpuinfo.max_freq = clk_round_rate(mpu_clk, VERY_HI_RATE) / 1000; |
113 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; | 95 | policy->cpuinfo.transition_latency = CPUFREQ_ETERNAL; |
114 | clk_put(mpu_clk); | ||
115 | 96 | ||
116 | return 0; | 97 | return 0; |
117 | } | 98 | } |
118 | 99 | ||
100 | static int omap_cpu_exit(struct cpufreq_policy *policy) | ||
101 | { | ||
102 | clk_put(mpu_clk); | ||
103 | return 0; | ||
104 | } | ||
105 | |||
119 | static struct cpufreq_driver omap_driver = { | 106 | static struct cpufreq_driver omap_driver = { |
120 | .flags = CPUFREQ_STICKY, | 107 | .flags = CPUFREQ_STICKY, |
121 | .verify = omap_verify_speed, | 108 | .verify = omap_verify_speed, |
122 | .target = omap_target, | 109 | .target = omap_target, |
123 | .get = omap_getspeed, | 110 | .get = omap_getspeed, |
124 | .init = omap_cpu_init, | 111 | .init = omap_cpu_init, |
112 | .exit = omap_cpu_exit, | ||
125 | .name = "omap", | 113 | .name = "omap", |
126 | }; | 114 | }; |
127 | 115 | ||
diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c index c5dab1d6417e..4a53f9ba6c43 100644 --- a/arch/arm/plat-omap/devices.c +++ b/arch/arm/plat-omap/devices.c | |||
@@ -89,68 +89,6 @@ static inline void omap_init_dsp(void) { } | |||
89 | #endif /* CONFIG_OMAP_DSP */ | 89 | #endif /* CONFIG_OMAP_DSP */ |
90 | 90 | ||
91 | /*-------------------------------------------------------------------------*/ | 91 | /*-------------------------------------------------------------------------*/ |
92 | #if defined(CONFIG_I2C_OMAP) || defined(CONFIG_I2C_OMAP_MODULE) | ||
93 | |||
94 | #define OMAP1_I2C_BASE 0xfffb3800 | ||
95 | #define OMAP2_I2C_BASE1 0x48070000 | ||
96 | #define OMAP_I2C_SIZE 0x3f | ||
97 | #define OMAP1_I2C_INT INT_I2C | ||
98 | #define OMAP2_I2C_INT1 56 | ||
99 | |||
100 | static struct resource i2c_resources1[] = { | ||
101 | { | ||
102 | .start = 0, | ||
103 | .end = 0, | ||
104 | .flags = IORESOURCE_MEM, | ||
105 | }, | ||
106 | { | ||
107 | .start = 0, | ||
108 | .flags = IORESOURCE_IRQ, | ||
109 | }, | ||
110 | }; | ||
111 | |||
112 | /* DMA not used; works around erratum writing to non-empty i2c fifo */ | ||
113 | |||
114 | static struct platform_device omap_i2c_device1 = { | ||
115 | .name = "i2c_omap", | ||
116 | .id = 1, | ||
117 | .num_resources = ARRAY_SIZE(i2c_resources1), | ||
118 | .resource = i2c_resources1, | ||
119 | }; | ||
120 | |||
121 | /* See also arch/arm/mach-omap2/devices.c for second I2C on 24xx */ | ||
122 | static void omap_init_i2c(void) | ||
123 | { | ||
124 | if (cpu_is_omap24xx()) { | ||
125 | i2c_resources1[0].start = OMAP2_I2C_BASE1; | ||
126 | i2c_resources1[0].end = OMAP2_I2C_BASE1 + OMAP_I2C_SIZE; | ||
127 | i2c_resources1[1].start = OMAP2_I2C_INT1; | ||
128 | } else { | ||
129 | i2c_resources1[0].start = OMAP1_I2C_BASE; | ||
130 | i2c_resources1[0].end = OMAP1_I2C_BASE + OMAP_I2C_SIZE; | ||
131 | i2c_resources1[1].start = OMAP1_I2C_INT; | ||
132 | } | ||
133 | |||
134 | /* FIXME define and use a boot tag, in case of boards that | ||
135 | * either don't wire up I2C, or chips that mux it differently... | ||
136 | * it can include clocking and address info, maybe more. | ||
137 | */ | ||
138 | if (cpu_is_omap24xx()) { | ||
139 | omap_cfg_reg(M19_24XX_I2C1_SCL); | ||
140 | omap_cfg_reg(L15_24XX_I2C1_SDA); | ||
141 | } else { | ||
142 | omap_cfg_reg(I2C_SCL); | ||
143 | omap_cfg_reg(I2C_SDA); | ||
144 | } | ||
145 | |||
146 | (void) platform_device_register(&omap_i2c_device1); | ||
147 | } | ||
148 | |||
149 | #else | ||
150 | static inline void omap_init_i2c(void) {} | ||
151 | #endif | ||
152 | |||
153 | /*-------------------------------------------------------------------------*/ | ||
154 | #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) | 92 | #if defined(CONFIG_KEYBOARD_OMAP) || defined(CONFIG_KEYBOARD_OMAP_MODULE) |
155 | 93 | ||
156 | static void omap_init_kp(void) | 94 | static void omap_init_kp(void) |
@@ -501,7 +439,6 @@ static int __init omap_init_devices(void) | |||
501 | * in alphabetical order so they're easier to sort through. | 439 | * in alphabetical order so they're easier to sort through. |
502 | */ | 440 | */ |
503 | omap_init_dsp(); | 441 | omap_init_dsp(); |
504 | omap_init_i2c(); | ||
505 | omap_init_kp(); | 442 | omap_init_kp(); |
506 | omap_init_mmc(); | 443 | omap_init_mmc(); |
507 | omap_init_uwire(); | 444 | omap_init_uwire(); |
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c index a46676db8113..91004a3c4794 100644 --- a/arch/arm/plat-omap/dma.c +++ b/arch/arm/plat-omap/dma.c | |||
@@ -137,7 +137,7 @@ static void omap_disable_channel_irq(int lch); | |||
137 | static inline void omap_enable_channel_irq(int lch); | 137 | static inline void omap_enable_channel_irq(int lch); |
138 | 138 | ||
139 | #define REVISIT_24XX() printk(KERN_ERR "FIXME: no %s on 24xx\n", \ | 139 | #define REVISIT_24XX() printk(KERN_ERR "FIXME: no %s on 24xx\n", \ |
140 | __FUNCTION__); | 140 | __func__); |
141 | 141 | ||
142 | #ifdef CONFIG_ARCH_OMAP15XX | 142 | #ifdef CONFIG_ARCH_OMAP15XX |
143 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ | 143 | /* Returns 1 if the DMA module is in OMAP1510-compatible mode, 0 otherwise */ |
@@ -699,7 +699,7 @@ omap_dma_set_global_params(int arb_rate, int max_fifo_depth, int tparams) | |||
699 | u32 reg; | 699 | u32 reg; |
700 | 700 | ||
701 | if (!cpu_class_is_omap2()) { | 701 | if (!cpu_class_is_omap2()) { |
702 | printk(KERN_ERR "FIXME: no %s on 15xx/16xx\n", __FUNCTION__); | 702 | printk(KERN_ERR "FIXME: no %s on 15xx/16xx\n", __func__); |
703 | return; | 703 | return; |
704 | } | 704 | } |
705 | 705 | ||
@@ -1705,14 +1705,8 @@ static int omap2_dma_handle_ch(int ch) | |||
1705 | status = OMAP_DMA_CSR_REG(ch); | 1705 | status = OMAP_DMA_CSR_REG(ch); |
1706 | } | 1706 | } |
1707 | 1707 | ||
1708 | if (likely(dma_chan[ch].callback != NULL)) { | 1708 | if (likely(dma_chan[ch].callback != NULL)) |
1709 | if (dma_chan[ch].chain_id != -1) | 1709 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); |
1710 | dma_chan[ch].callback(dma_chan[ch].chain_id, status, | ||
1711 | dma_chan[ch].data); | ||
1712 | else | ||
1713 | dma_chan[ch].callback(ch, status, dma_chan[ch].data); | ||
1714 | |||
1715 | } | ||
1716 | 1710 | ||
1717 | OMAP_DMA_CSR_REG(ch) = status; | 1711 | OMAP_DMA_CSR_REG(ch) = status; |
1718 | 1712 | ||
diff --git a/arch/arm/plat-omap/dmtimer.c b/arch/arm/plat-omap/dmtimer.c index e719d0eeb5c8..302ad8dff2cb 100644 --- a/arch/arm/plat-omap/dmtimer.c +++ b/arch/arm/plat-omap/dmtimer.c | |||
@@ -268,7 +268,7 @@ struct omap_dm_timer *omap_dm_timer_request_specific(int id) | |||
268 | if (id <= 0 || id > dm_timer_count || dm_timers[id-1].reserved) { | 268 | if (id <= 0 || id > dm_timer_count || dm_timers[id-1].reserved) { |
269 | spin_unlock_irqrestore(&dm_timer_lock, flags); | 269 | spin_unlock_irqrestore(&dm_timer_lock, flags); |
270 | printk("BUG: warning at %s:%d/%s(): unable to get timer %d\n", | 270 | printk("BUG: warning at %s:%d/%s(): unable to get timer %d\n", |
271 | __FILE__, __LINE__, __FUNCTION__, id); | 271 | __FILE__, __LINE__, __func__, id); |
272 | dump_stack(); | 272 | dump_stack(); |
273 | return NULL; | 273 | return NULL; |
274 | } | 274 | } |
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 56f4d1394d56..66a1455595f4 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -333,13 +333,14 @@ static void _set_gpio_direction(struct gpio_bank *bank, int gpio, int is_input) | |||
333 | void omap_set_gpio_direction(int gpio, int is_input) | 333 | void omap_set_gpio_direction(int gpio, int is_input) |
334 | { | 334 | { |
335 | struct gpio_bank *bank; | 335 | struct gpio_bank *bank; |
336 | unsigned long flags; | ||
336 | 337 | ||
337 | if (check_gpio(gpio) < 0) | 338 | if (check_gpio(gpio) < 0) |
338 | return; | 339 | return; |
339 | bank = get_gpio_bank(gpio); | 340 | bank = get_gpio_bank(gpio); |
340 | spin_lock(&bank->lock); | 341 | spin_lock_irqsave(&bank->lock, flags); |
341 | _set_gpio_direction(bank, get_gpio_index(gpio), is_input); | 342 | _set_gpio_direction(bank, get_gpio_index(gpio), is_input); |
342 | spin_unlock(&bank->lock); | 343 | spin_unlock_irqrestore(&bank->lock, flags); |
343 | } | 344 | } |
344 | 345 | ||
345 | static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) | 346 | static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) |
@@ -406,13 +407,14 @@ static void _set_gpio_dataout(struct gpio_bank *bank, int gpio, int enable) | |||
406 | void omap_set_gpio_dataout(int gpio, int enable) | 407 | void omap_set_gpio_dataout(int gpio, int enable) |
407 | { | 408 | { |
408 | struct gpio_bank *bank; | 409 | struct gpio_bank *bank; |
410 | unsigned long flags; | ||
409 | 411 | ||
410 | if (check_gpio(gpio) < 0) | 412 | if (check_gpio(gpio) < 0) |
411 | return; | 413 | return; |
412 | bank = get_gpio_bank(gpio); | 414 | bank = get_gpio_bank(gpio); |
413 | spin_lock(&bank->lock); | 415 | spin_lock_irqsave(&bank->lock, flags); |
414 | _set_gpio_dataout(bank, get_gpio_index(gpio), enable); | 416 | _set_gpio_dataout(bank, get_gpio_index(gpio), enable); |
415 | spin_unlock(&bank->lock); | 417 | spin_unlock_irqrestore(&bank->lock, flags); |
416 | } | 418 | } |
417 | 419 | ||
418 | int omap_get_gpio_datain(int gpio) | 420 | int omap_get_gpio_datain(int gpio) |
@@ -624,6 +626,7 @@ static int gpio_irq_type(unsigned irq, unsigned type) | |||
624 | struct gpio_bank *bank; | 626 | struct gpio_bank *bank; |
625 | unsigned gpio; | 627 | unsigned gpio; |
626 | int retval; | 628 | int retval; |
629 | unsigned long flags; | ||
627 | 630 | ||
628 | if (!cpu_class_is_omap2() && irq > IH_MPUIO_BASE) | 631 | if (!cpu_class_is_omap2() && irq > IH_MPUIO_BASE) |
629 | gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); | 632 | gpio = OMAP_MPUIO(irq - IH_MPUIO_BASE); |
@@ -642,13 +645,13 @@ static int gpio_irq_type(unsigned irq, unsigned type) | |||
642 | return -EINVAL; | 645 | return -EINVAL; |
643 | 646 | ||
644 | bank = get_irq_chip_data(irq); | 647 | bank = get_irq_chip_data(irq); |
645 | spin_lock(&bank->lock); | 648 | spin_lock_irqsave(&bank->lock, flags); |
646 | retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type); | 649 | retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type); |
647 | if (retval == 0) { | 650 | if (retval == 0) { |
648 | irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK; | 651 | irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK; |
649 | irq_desc[irq].status |= type; | 652 | irq_desc[irq].status |= type; |
650 | } | 653 | } |
651 | spin_unlock(&bank->lock); | 654 | spin_unlock_irqrestore(&bank->lock, flags); |
652 | return retval; | 655 | return retval; |
653 | } | 656 | } |
654 | 657 | ||
@@ -830,11 +833,13 @@ static inline void _set_gpio_irqenable(struct gpio_bank *bank, int gpio, int ena | |||
830 | */ | 833 | */ |
831 | static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | 834 | static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) |
832 | { | 835 | { |
836 | unsigned long flags; | ||
837 | |||
833 | switch (bank->method) { | 838 | switch (bank->method) { |
834 | #ifdef CONFIG_ARCH_OMAP16XX | 839 | #ifdef CONFIG_ARCH_OMAP16XX |
835 | case METHOD_MPUIO: | 840 | case METHOD_MPUIO: |
836 | case METHOD_GPIO_1610: | 841 | case METHOD_GPIO_1610: |
837 | spin_lock(&bank->lock); | 842 | spin_lock_irqsave(&bank->lock, flags); |
838 | if (enable) { | 843 | if (enable) { |
839 | bank->suspend_wakeup |= (1 << gpio); | 844 | bank->suspend_wakeup |= (1 << gpio); |
840 | enable_irq_wake(bank->irq); | 845 | enable_irq_wake(bank->irq); |
@@ -842,7 +847,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | |||
842 | disable_irq_wake(bank->irq); | 847 | disable_irq_wake(bank->irq); |
843 | bank->suspend_wakeup &= ~(1 << gpio); | 848 | bank->suspend_wakeup &= ~(1 << gpio); |
844 | } | 849 | } |
845 | spin_unlock(&bank->lock); | 850 | spin_unlock_irqrestore(&bank->lock, flags); |
846 | return 0; | 851 | return 0; |
847 | #endif | 852 | #endif |
848 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) | 853 | #if defined(CONFIG_ARCH_OMAP24XX) || defined(CONFIG_ARCH_OMAP34XX) |
@@ -853,7 +858,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | |||
853 | (bank - gpio_bank) * 32 + gpio); | 858 | (bank - gpio_bank) * 32 + gpio); |
854 | return -EINVAL; | 859 | return -EINVAL; |
855 | } | 860 | } |
856 | spin_lock(&bank->lock); | 861 | spin_lock_irqsave(&bank->lock, flags); |
857 | if (enable) { | 862 | if (enable) { |
858 | bank->suspend_wakeup |= (1 << gpio); | 863 | bank->suspend_wakeup |= (1 << gpio); |
859 | enable_irq_wake(bank->irq); | 864 | enable_irq_wake(bank->irq); |
@@ -861,7 +866,7 @@ static int _set_gpio_wakeup(struct gpio_bank *bank, int gpio, int enable) | |||
861 | disable_irq_wake(bank->irq); | 866 | disable_irq_wake(bank->irq); |
862 | bank->suspend_wakeup &= ~(1 << gpio); | 867 | bank->suspend_wakeup &= ~(1 << gpio); |
863 | } | 868 | } |
864 | spin_unlock(&bank->lock); | 869 | spin_unlock_irqrestore(&bank->lock, flags); |
865 | return 0; | 870 | return 0; |
866 | #endif | 871 | #endif |
867 | default: | 872 | default: |
@@ -897,16 +902,17 @@ static int gpio_wake_enable(unsigned int irq, unsigned int enable) | |||
897 | int omap_request_gpio(int gpio) | 902 | int omap_request_gpio(int gpio) |
898 | { | 903 | { |
899 | struct gpio_bank *bank; | 904 | struct gpio_bank *bank; |
905 | unsigned long flags; | ||
900 | 906 | ||
901 | if (check_gpio(gpio) < 0) | 907 | if (check_gpio(gpio) < 0) |
902 | return -EINVAL; | 908 | return -EINVAL; |
903 | 909 | ||
904 | bank = get_gpio_bank(gpio); | 910 | bank = get_gpio_bank(gpio); |
905 | spin_lock(&bank->lock); | 911 | spin_lock_irqsave(&bank->lock, flags); |
906 | if (unlikely(bank->reserved_map & (1 << get_gpio_index(gpio)))) { | 912 | if (unlikely(bank->reserved_map & (1 << get_gpio_index(gpio)))) { |
907 | printk(KERN_ERR "omap-gpio: GPIO %d is already reserved!\n", gpio); | 913 | printk(KERN_ERR "omap-gpio: GPIO %d is already reserved!\n", gpio); |
908 | dump_stack(); | 914 | dump_stack(); |
909 | spin_unlock(&bank->lock); | 915 | spin_unlock_irqrestore(&bank->lock, flags); |
910 | return -1; | 916 | return -1; |
911 | } | 917 | } |
912 | bank->reserved_map |= (1 << get_gpio_index(gpio)); | 918 | bank->reserved_map |= (1 << get_gpio_index(gpio)); |
@@ -925,7 +931,7 @@ int omap_request_gpio(int gpio) | |||
925 | __raw_writel(__raw_readl(reg) | (1 << get_gpio_index(gpio)), reg); | 931 | __raw_writel(__raw_readl(reg) | (1 << get_gpio_index(gpio)), reg); |
926 | } | 932 | } |
927 | #endif | 933 | #endif |
928 | spin_unlock(&bank->lock); | 934 | spin_unlock_irqrestore(&bank->lock, flags); |
929 | 935 | ||
930 | return 0; | 936 | return 0; |
931 | } | 937 | } |
@@ -933,15 +939,16 @@ int omap_request_gpio(int gpio) | |||
933 | void omap_free_gpio(int gpio) | 939 | void omap_free_gpio(int gpio) |
934 | { | 940 | { |
935 | struct gpio_bank *bank; | 941 | struct gpio_bank *bank; |
942 | unsigned long flags; | ||
936 | 943 | ||
937 | if (check_gpio(gpio) < 0) | 944 | if (check_gpio(gpio) < 0) |
938 | return; | 945 | return; |
939 | bank = get_gpio_bank(gpio); | 946 | bank = get_gpio_bank(gpio); |
940 | spin_lock(&bank->lock); | 947 | spin_lock_irqsave(&bank->lock, flags); |
941 | if (unlikely(!(bank->reserved_map & (1 << get_gpio_index(gpio))))) { | 948 | if (unlikely(!(bank->reserved_map & (1 << get_gpio_index(gpio))))) { |
942 | printk(KERN_ERR "omap-gpio: GPIO %d wasn't reserved!\n", gpio); | 949 | printk(KERN_ERR "omap-gpio: GPIO %d wasn't reserved!\n", gpio); |
943 | dump_stack(); | 950 | dump_stack(); |
944 | spin_unlock(&bank->lock); | 951 | spin_unlock_irqrestore(&bank->lock, flags); |
945 | return; | 952 | return; |
946 | } | 953 | } |
947 | #ifdef CONFIG_ARCH_OMAP16XX | 954 | #ifdef CONFIG_ARCH_OMAP16XX |
@@ -960,7 +967,7 @@ void omap_free_gpio(int gpio) | |||
960 | #endif | 967 | #endif |
961 | bank->reserved_map &= ~(1 << get_gpio_index(gpio)); | 968 | bank->reserved_map &= ~(1 << get_gpio_index(gpio)); |
962 | _reset_gpio(bank, gpio); | 969 | _reset_gpio(bank, gpio); |
963 | spin_unlock(&bank->lock); | 970 | spin_unlock_irqrestore(&bank->lock, flags); |
964 | } | 971 | } |
965 | 972 | ||
966 | /* | 973 | /* |
@@ -1194,11 +1201,12 @@ static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t me | |||
1194 | { | 1201 | { |
1195 | struct gpio_bank *bank = platform_get_drvdata(pdev); | 1202 | struct gpio_bank *bank = platform_get_drvdata(pdev); |
1196 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; | 1203 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; |
1204 | unsigned long flags; | ||
1197 | 1205 | ||
1198 | spin_lock(&bank->lock); | 1206 | spin_lock_irqsave(&bank->lock, flags); |
1199 | bank->saved_wakeup = __raw_readl(mask_reg); | 1207 | bank->saved_wakeup = __raw_readl(mask_reg); |
1200 | __raw_writel(0xffff & ~bank->suspend_wakeup, mask_reg); | 1208 | __raw_writel(0xffff & ~bank->suspend_wakeup, mask_reg); |
1201 | spin_unlock(&bank->lock); | 1209 | spin_unlock_irqrestore(&bank->lock, flags); |
1202 | 1210 | ||
1203 | return 0; | 1211 | return 0; |
1204 | } | 1212 | } |
@@ -1207,10 +1215,11 @@ static int omap_mpuio_resume_early(struct platform_device *pdev) | |||
1207 | { | 1215 | { |
1208 | struct gpio_bank *bank = platform_get_drvdata(pdev); | 1216 | struct gpio_bank *bank = platform_get_drvdata(pdev); |
1209 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; | 1217 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; |
1218 | unsigned long flags; | ||
1210 | 1219 | ||
1211 | spin_lock(&bank->lock); | 1220 | spin_lock_irqsave(&bank->lock, flags); |
1212 | __raw_writel(bank->saved_wakeup, mask_reg); | 1221 | __raw_writel(bank->saved_wakeup, mask_reg); |
1213 | spin_unlock(&bank->lock); | 1222 | spin_unlock_irqrestore(&bank->lock, flags); |
1214 | 1223 | ||
1215 | return 0; | 1224 | return 0; |
1216 | } | 1225 | } |
@@ -1277,6 +1286,11 @@ static struct clk *gpio_fclks[OMAP34XX_NR_GPIOS]; | |||
1277 | static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS]; | 1286 | static struct clk *gpio_iclks[OMAP34XX_NR_GPIOS]; |
1278 | #endif | 1287 | #endif |
1279 | 1288 | ||
1289 | /* This lock class tells lockdep that GPIO irqs are in a different | ||
1290 | * category than their parents, so it won't report false recursion. | ||
1291 | */ | ||
1292 | static struct lock_class_key gpio_lock_class; | ||
1293 | |||
1280 | static int __init _omap_gpio_init(void) | 1294 | static int __init _omap_gpio_init(void) |
1281 | { | 1295 | { |
1282 | int i; | 1296 | int i; |
@@ -1450,6 +1464,7 @@ static int __init _omap_gpio_init(void) | |||
1450 | #endif | 1464 | #endif |
1451 | for (j = bank->virtual_irq_start; | 1465 | for (j = bank->virtual_irq_start; |
1452 | j < bank->virtual_irq_start + gpio_count; j++) { | 1466 | j < bank->virtual_irq_start + gpio_count; j++) { |
1467 | lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class); | ||
1453 | set_irq_chip_data(j, bank); | 1468 | set_irq_chip_data(j, bank); |
1454 | if (bank_is_mpuio(bank)) | 1469 | if (bank_is_mpuio(bank)) |
1455 | set_irq_chip(j, &mpuio_irq_chip); | 1470 | set_irq_chip(j, &mpuio_irq_chip); |
@@ -1489,6 +1504,7 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg) | |||
1489 | void __iomem *wake_status; | 1504 | void __iomem *wake_status; |
1490 | void __iomem *wake_clear; | 1505 | void __iomem *wake_clear; |
1491 | void __iomem *wake_set; | 1506 | void __iomem *wake_set; |
1507 | unsigned long flags; | ||
1492 | 1508 | ||
1493 | switch (bank->method) { | 1509 | switch (bank->method) { |
1494 | #ifdef CONFIG_ARCH_OMAP16XX | 1510 | #ifdef CONFIG_ARCH_OMAP16XX |
@@ -1509,11 +1525,11 @@ static int omap_gpio_suspend(struct sys_device *dev, pm_message_t mesg) | |||
1509 | continue; | 1525 | continue; |
1510 | } | 1526 | } |
1511 | 1527 | ||
1512 | spin_lock(&bank->lock); | 1528 | spin_lock_irqsave(&bank->lock, flags); |
1513 | bank->saved_wakeup = __raw_readl(wake_status); | 1529 | bank->saved_wakeup = __raw_readl(wake_status); |
1514 | __raw_writel(0xffffffff, wake_clear); | 1530 | __raw_writel(0xffffffff, wake_clear); |
1515 | __raw_writel(bank->suspend_wakeup, wake_set); | 1531 | __raw_writel(bank->suspend_wakeup, wake_set); |
1516 | spin_unlock(&bank->lock); | 1532 | spin_unlock_irqrestore(&bank->lock, flags); |
1517 | } | 1533 | } |
1518 | 1534 | ||
1519 | return 0; | 1535 | return 0; |
@@ -1530,6 +1546,7 @@ static int omap_gpio_resume(struct sys_device *dev) | |||
1530 | struct gpio_bank *bank = &gpio_bank[i]; | 1546 | struct gpio_bank *bank = &gpio_bank[i]; |
1531 | void __iomem *wake_clear; | 1547 | void __iomem *wake_clear; |
1532 | void __iomem *wake_set; | 1548 | void __iomem *wake_set; |
1549 | unsigned long flags; | ||
1533 | 1550 | ||
1534 | switch (bank->method) { | 1551 | switch (bank->method) { |
1535 | #ifdef CONFIG_ARCH_OMAP16XX | 1552 | #ifdef CONFIG_ARCH_OMAP16XX |
@@ -1548,10 +1565,10 @@ static int omap_gpio_resume(struct sys_device *dev) | |||
1548 | continue; | 1565 | continue; |
1549 | } | 1566 | } |
1550 | 1567 | ||
1551 | spin_lock(&bank->lock); | 1568 | spin_lock_irqsave(&bank->lock, flags); |
1552 | __raw_writel(0xffffffff, wake_clear); | 1569 | __raw_writel(0xffffffff, wake_clear); |
1553 | __raw_writel(bank->saved_wakeup, wake_set); | 1570 | __raw_writel(bank->saved_wakeup, wake_set); |
1554 | spin_unlock(&bank->lock); | 1571 | spin_unlock_irqrestore(&bank->lock, flags); |
1555 | } | 1572 | } |
1556 | 1573 | ||
1557 | return 0; | 1574 | return 0; |
diff --git a/arch/arm/plat-s3c24xx/dma.c b/arch/arm/plat-s3c24xx/dma.c index ac9ff1666fcc..60f162dc4fad 100644 --- a/arch/arm/plat-s3c24xx/dma.c +++ b/arch/arm/plat-s3c24xx/dma.c | |||
@@ -130,8 +130,8 @@ dmadbg_showregs(const char *fname, int line, struct s3c2410_dma_chan *chan) | |||
130 | dmadbg_dumpregs(fname, line, chan, &state); | 130 | dmadbg_dumpregs(fname, line, chan, &state); |
131 | } | 131 | } |
132 | 132 | ||
133 | #define dbg_showregs(chan) dmadbg_showregs(__FUNCTION__, __LINE__, (chan)) | 133 | #define dbg_showregs(chan) dmadbg_showregs(__func__, __LINE__, (chan)) |
134 | #define dbg_showchan(chan) dmadbg_showchan(__FUNCTION__, __LINE__, (chan)) | 134 | #define dbg_showchan(chan) dmadbg_showchan(__func__, __LINE__, (chan)) |
135 | #else | 135 | #else |
136 | #define dbg_showregs(chan) do { } while(0) | 136 | #define dbg_showregs(chan) do { } while(0) |
137 | #define dbg_showchan(chan) do { } while(0) | 137 | #define dbg_showchan(chan) do { } while(0) |
@@ -403,7 +403,7 @@ static int s3c2410_dma_start(struct s3c2410_dma_chan *chan) | |||
403 | 403 | ||
404 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { | 404 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { |
405 | pr_debug("%s: buff not yet loaded, no more todo\n", | 405 | pr_debug("%s: buff not yet loaded, no more todo\n", |
406 | __FUNCTION__); | 406 | __func__); |
407 | } else { | 407 | } else { |
408 | chan->load_state = S3C2410_DMALOAD_1RUNNING; | 408 | chan->load_state = S3C2410_DMALOAD_1RUNNING; |
409 | s3c2410_dma_loadbuffer(chan, chan->next); | 409 | s3c2410_dma_loadbuffer(chan, chan->next); |
@@ -463,16 +463,16 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, | |||
463 | return -EINVAL; | 463 | return -EINVAL; |
464 | 464 | ||
465 | pr_debug("%s: id=%p, data=%08x, size=%d\n", | 465 | pr_debug("%s: id=%p, data=%08x, size=%d\n", |
466 | __FUNCTION__, id, (unsigned int)data, size); | 466 | __func__, id, (unsigned int)data, size); |
467 | 467 | ||
468 | buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC); | 468 | buf = kmem_cache_alloc(dma_kmem, GFP_ATOMIC); |
469 | if (buf == NULL) { | 469 | if (buf == NULL) { |
470 | pr_debug("%s: out of memory (%ld alloc)\n", | 470 | pr_debug("%s: out of memory (%ld alloc)\n", |
471 | __FUNCTION__, (long)sizeof(*buf)); | 471 | __func__, (long)sizeof(*buf)); |
472 | return -ENOMEM; | 472 | return -ENOMEM; |
473 | } | 473 | } |
474 | 474 | ||
475 | //pr_debug("%s: new buffer %p\n", __FUNCTION__, buf); | 475 | //pr_debug("%s: new buffer %p\n", __func__, buf); |
476 | //dbg_showchan(chan); | 476 | //dbg_showchan(chan); |
477 | 477 | ||
478 | buf->next = NULL; | 478 | buf->next = NULL; |
@@ -486,18 +486,18 @@ int s3c2410_dma_enqueue(unsigned int channel, void *id, | |||
486 | if (chan->curr == NULL) { | 486 | if (chan->curr == NULL) { |
487 | /* we've got nothing loaded... */ | 487 | /* we've got nothing loaded... */ |
488 | pr_debug("%s: buffer %p queued onto empty channel\n", | 488 | pr_debug("%s: buffer %p queued onto empty channel\n", |
489 | __FUNCTION__, buf); | 489 | __func__, buf); |
490 | 490 | ||
491 | chan->curr = buf; | 491 | chan->curr = buf; |
492 | chan->end = buf; | 492 | chan->end = buf; |
493 | chan->next = NULL; | 493 | chan->next = NULL; |
494 | } else { | 494 | } else { |
495 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", | 495 | pr_debug("dma%d: %s: buffer %p queued onto non-empty channel\n", |
496 | chan->number, __FUNCTION__, buf); | 496 | chan->number, __func__, buf); |
497 | 497 | ||
498 | if (chan->end == NULL) | 498 | if (chan->end == NULL) |
499 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", | 499 | pr_debug("dma%d: %s: %p not empty, and chan->end==NULL?\n", |
500 | chan->number, __FUNCTION__, chan); | 500 | chan->number, __func__, chan); |
501 | 501 | ||
502 | chan->end->next = buf; | 502 | chan->end->next = buf; |
503 | chan->end = buf; | 503 | chan->end = buf; |
@@ -572,7 +572,7 @@ s3c2410_dma_lastxfer(struct s3c2410_dma_chan *chan) | |||
572 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { | 572 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { |
573 | /* flag error? */ | 573 | /* flag error? */ |
574 | printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n", | 574 | printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n", |
575 | chan->number, __FUNCTION__); | 575 | chan->number, __func__); |
576 | return; | 576 | return; |
577 | } | 577 | } |
578 | break; | 578 | break; |
@@ -658,7 +658,7 @@ s3c2410_dma_irq(int irq, void *devpw) | |||
658 | 658 | ||
659 | if (buf->magic != BUF_MAGIC) { | 659 | if (buf->magic != BUF_MAGIC) { |
660 | printk(KERN_ERR "dma%d: %s: buf %p incorrect magic\n", | 660 | printk(KERN_ERR "dma%d: %s: buf %p incorrect magic\n", |
661 | chan->number, __FUNCTION__, buf); | 661 | chan->number, __func__, buf); |
662 | return IRQ_HANDLED; | 662 | return IRQ_HANDLED; |
663 | } | 663 | } |
664 | 664 | ||
@@ -692,7 +692,7 @@ s3c2410_dma_irq(int irq, void *devpw) | |||
692 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { | 692 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { |
693 | /* flag error? */ | 693 | /* flag error? */ |
694 | printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n", | 694 | printk(KERN_ERR "dma%d: timeout waiting for load (%s)\n", |
695 | chan->number, __FUNCTION__); | 695 | chan->number, __func__); |
696 | return IRQ_HANDLED; | 696 | return IRQ_HANDLED; |
697 | } | 697 | } |
698 | 698 | ||
@@ -759,7 +759,7 @@ int s3c2410_dma_request(unsigned int channel, | |||
759 | 759 | ||
760 | if (!chan->irq_claimed) { | 760 | if (!chan->irq_claimed) { |
761 | pr_debug("dma%d: %s : requesting irq %d\n", | 761 | pr_debug("dma%d: %s : requesting irq %d\n", |
762 | channel, __FUNCTION__, chan->irq); | 762 | channel, __func__, chan->irq); |
763 | 763 | ||
764 | chan->irq_claimed = 1; | 764 | chan->irq_claimed = 1; |
765 | local_irq_restore(flags); | 765 | local_irq_restore(flags); |
@@ -786,7 +786,7 @@ int s3c2410_dma_request(unsigned int channel, | |||
786 | 786 | ||
787 | /* need to setup */ | 787 | /* need to setup */ |
788 | 788 | ||
789 | pr_debug("%s: channel initialised, %p\n", __FUNCTION__, chan); | 789 | pr_debug("%s: channel initialised, %p\n", __func__, chan); |
790 | 790 | ||
791 | return chan->number | DMACH_LOW_LEVEL; | 791 | return chan->number | DMACH_LOW_LEVEL; |
792 | } | 792 | } |
@@ -823,7 +823,7 @@ int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *client) | |||
823 | 823 | ||
824 | if (chan->state != S3C2410_DMA_IDLE) { | 824 | if (chan->state != S3C2410_DMA_IDLE) { |
825 | pr_debug("%s: need to stop dma channel %p\n", | 825 | pr_debug("%s: need to stop dma channel %p\n", |
826 | __FUNCTION__, chan); | 826 | __func__, chan); |
827 | 827 | ||
828 | /* possibly flush the channel */ | 828 | /* possibly flush the channel */ |
829 | s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STOP); | 829 | s3c2410_dma_ctrl(channel, S3C2410_DMAOP_STOP); |
@@ -852,7 +852,7 @@ static int s3c2410_dma_dostop(struct s3c2410_dma_chan *chan) | |||
852 | unsigned long flags; | 852 | unsigned long flags; |
853 | unsigned long tmp; | 853 | unsigned long tmp; |
854 | 854 | ||
855 | pr_debug("%s:\n", __FUNCTION__); | 855 | pr_debug("%s:\n", __func__); |
856 | 856 | ||
857 | dbg_showchan(chan); | 857 | dbg_showchan(chan); |
858 | 858 | ||
@@ -907,14 +907,14 @@ static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan) | |||
907 | struct s3c2410_dma_buf *buf, *next; | 907 | struct s3c2410_dma_buf *buf, *next; |
908 | unsigned long flags; | 908 | unsigned long flags; |
909 | 909 | ||
910 | pr_debug("%s: chan %p (%d)\n", __FUNCTION__, chan, chan->number); | 910 | pr_debug("%s: chan %p (%d)\n", __func__, chan, chan->number); |
911 | 911 | ||
912 | dbg_showchan(chan); | 912 | dbg_showchan(chan); |
913 | 913 | ||
914 | local_irq_save(flags); | 914 | local_irq_save(flags); |
915 | 915 | ||
916 | if (chan->state != S3C2410_DMA_IDLE) { | 916 | if (chan->state != S3C2410_DMA_IDLE) { |
917 | pr_debug("%s: stopping channel...\n", __FUNCTION__ ); | 917 | pr_debug("%s: stopping channel...\n", __func__ ); |
918 | s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_STOP); | 918 | s3c2410_dma_ctrl(chan->number, S3C2410_DMAOP_STOP); |
919 | } | 919 | } |
920 | 920 | ||
@@ -929,7 +929,7 @@ static int s3c2410_dma_flush(struct s3c2410_dma_chan *chan) | |||
929 | next = buf->next; | 929 | next = buf->next; |
930 | 930 | ||
931 | pr_debug("%s: free buffer %p, next %p\n", | 931 | pr_debug("%s: free buffer %p, next %p\n", |
932 | __FUNCTION__, buf, buf->next); | 932 | __func__, buf, buf->next); |
933 | 933 | ||
934 | s3c2410_dma_buffdone(chan, buf, S3C2410_RES_ABORT); | 934 | s3c2410_dma_buffdone(chan, buf, S3C2410_RES_ABORT); |
935 | s3c2410_dma_freebuf(buf); | 935 | s3c2410_dma_freebuf(buf); |
@@ -976,7 +976,7 @@ static int s3c2410_dma_started(struct s3c2410_dma_chan *chan) | |||
976 | 976 | ||
977 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { | 977 | if (s3c2410_dma_waitforload(chan, __LINE__) == 0) { |
978 | pr_debug("%s: buff not yet loaded, no more todo\n", | 978 | pr_debug("%s: buff not yet loaded, no more todo\n", |
979 | __FUNCTION__); | 979 | __func__); |
980 | } else { | 980 | } else { |
981 | chan->load_state = S3C2410_DMALOAD_1RUNNING; | 981 | chan->load_state = S3C2410_DMALOAD_1RUNNING; |
982 | s3c2410_dma_loadbuffer(chan, chan->next); | 982 | s3c2410_dma_loadbuffer(chan, chan->next); |
@@ -1050,16 +1050,16 @@ int s3c2410_dma_config(dmach_t channel, | |||
1050 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); | 1050 | struct s3c2410_dma_chan *chan = lookup_dma_channel(channel); |
1051 | 1051 | ||
1052 | pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", | 1052 | pr_debug("%s: chan=%d, xfer_unit=%d, dcon=%08x\n", |
1053 | __FUNCTION__, channel, xferunit, dcon); | 1053 | __func__, channel, xferunit, dcon); |
1054 | 1054 | ||
1055 | if (chan == NULL) | 1055 | if (chan == NULL) |
1056 | return -EINVAL; | 1056 | return -EINVAL; |
1057 | 1057 | ||
1058 | pr_debug("%s: Initial dcon is %08x\n", __FUNCTION__, dcon); | 1058 | pr_debug("%s: Initial dcon is %08x\n", __func__, dcon); |
1059 | 1059 | ||
1060 | dcon |= chan->dcon & dma_sel.dcon_mask; | 1060 | dcon |= chan->dcon & dma_sel.dcon_mask; |
1061 | 1061 | ||
1062 | pr_debug("%s: New dcon is %08x\n", __FUNCTION__, dcon); | 1062 | pr_debug("%s: New dcon is %08x\n", __func__, dcon); |
1063 | 1063 | ||
1064 | switch (xferunit) { | 1064 | switch (xferunit) { |
1065 | case 1: | 1065 | case 1: |
@@ -1075,14 +1075,14 @@ int s3c2410_dma_config(dmach_t channel, | |||
1075 | break; | 1075 | break; |
1076 | 1076 | ||
1077 | default: | 1077 | default: |
1078 | pr_debug("%s: bad transfer size %d\n", __FUNCTION__, xferunit); | 1078 | pr_debug("%s: bad transfer size %d\n", __func__, xferunit); |
1079 | return -EINVAL; | 1079 | return -EINVAL; |
1080 | } | 1080 | } |
1081 | 1081 | ||
1082 | dcon |= S3C2410_DCON_HWTRIG; | 1082 | dcon |= S3C2410_DCON_HWTRIG; |
1083 | dcon |= S3C2410_DCON_INTREQ; | 1083 | dcon |= S3C2410_DCON_INTREQ; |
1084 | 1084 | ||
1085 | pr_debug("%s: dcon now %08x\n", __FUNCTION__, dcon); | 1085 | pr_debug("%s: dcon now %08x\n", __func__, dcon); |
1086 | 1086 | ||
1087 | chan->dcon = dcon; | 1087 | chan->dcon = dcon; |
1088 | chan->xfer_unit = xferunit; | 1088 | chan->xfer_unit = xferunit; |
@@ -1099,7 +1099,7 @@ int s3c2410_dma_setflags(dmach_t channel, unsigned int flags) | |||
1099 | if (chan == NULL) | 1099 | if (chan == NULL) |
1100 | return -EINVAL; | 1100 | return -EINVAL; |
1101 | 1101 | ||
1102 | pr_debug("%s: chan=%p, flags=%08x\n", __FUNCTION__, chan, flags); | 1102 | pr_debug("%s: chan=%p, flags=%08x\n", __func__, chan, flags); |
1103 | 1103 | ||
1104 | chan->flags = flags; | 1104 | chan->flags = flags; |
1105 | 1105 | ||
@@ -1120,7 +1120,7 @@ int s3c2410_dma_set_opfn(dmach_t channel, s3c2410_dma_opfn_t rtn) | |||
1120 | if (chan == NULL) | 1120 | if (chan == NULL) |
1121 | return -EINVAL; | 1121 | return -EINVAL; |
1122 | 1122 | ||
1123 | pr_debug("%s: chan=%p, op rtn=%p\n", __FUNCTION__, chan, rtn); | 1123 | pr_debug("%s: chan=%p, op rtn=%p\n", __func__, chan, rtn); |
1124 | 1124 | ||
1125 | chan->op_fn = rtn; | 1125 | chan->op_fn = rtn; |
1126 | 1126 | ||
@@ -1136,7 +1136,7 @@ int s3c2410_dma_set_buffdone_fn(dmach_t channel, s3c2410_dma_cbfn_t rtn) | |||
1136 | if (chan == NULL) | 1136 | if (chan == NULL) |
1137 | return -EINVAL; | 1137 | return -EINVAL; |
1138 | 1138 | ||
1139 | pr_debug("%s: chan=%p, callback rtn=%p\n", __FUNCTION__, chan, rtn); | 1139 | pr_debug("%s: chan=%p, callback rtn=%p\n", __func__, chan, rtn); |
1140 | 1140 | ||
1141 | chan->callback_fn = rtn; | 1141 | chan->callback_fn = rtn; |
1142 | 1142 | ||
@@ -1170,7 +1170,7 @@ int s3c2410_dma_devconfig(int channel, | |||
1170 | return -EINVAL; | 1170 | return -EINVAL; |
1171 | 1171 | ||
1172 | pr_debug("%s: source=%d, hwcfg=%08x, devaddr=%08lx\n", | 1172 | pr_debug("%s: source=%d, hwcfg=%08x, devaddr=%08lx\n", |
1173 | __FUNCTION__, (int)source, hwcfg, devaddr); | 1173 | __func__, (int)source, hwcfg, devaddr); |
1174 | 1174 | ||
1175 | chan->source = source; | 1175 | chan->source = source; |
1176 | chan->dev_addr = devaddr; | 1176 | chan->dev_addr = devaddr; |
@@ -1180,7 +1180,7 @@ int s3c2410_dma_devconfig(int channel, | |||
1180 | case S3C2410_DMASRC_HW: | 1180 | case S3C2410_DMASRC_HW: |
1181 | /* source is hardware */ | 1181 | /* source is hardware */ |
1182 | pr_debug("%s: hw source, devaddr=%08lx, hwcfg=%d\n", | 1182 | pr_debug("%s: hw source, devaddr=%08lx, hwcfg=%d\n", |
1183 | __FUNCTION__, devaddr, hwcfg); | 1183 | __func__, devaddr, hwcfg); |
1184 | dma_wrreg(chan, S3C2410_DMA_DISRCC, hwcfg & 3); | 1184 | dma_wrreg(chan, S3C2410_DMA_DISRCC, hwcfg & 3); |
1185 | dma_wrreg(chan, S3C2410_DMA_DISRC, devaddr); | 1185 | dma_wrreg(chan, S3C2410_DMA_DISRC, devaddr); |
1186 | dma_wrreg(chan, S3C2410_DMA_DIDSTC, (0<<1) | (0<<0)); | 1186 | dma_wrreg(chan, S3C2410_DMA_DIDSTC, (0<<1) | (0<<0)); |
@@ -1190,8 +1190,8 @@ int s3c2410_dma_devconfig(int channel, | |||
1190 | 1190 | ||
1191 | case S3C2410_DMASRC_MEM: | 1191 | case S3C2410_DMASRC_MEM: |
1192 | /* source is memory */ | 1192 | /* source is memory */ |
1193 | pr_debug( "%s: mem source, devaddr=%08lx, hwcfg=%d\n", | 1193 | pr_debug("%s: mem source, devaddr=%08lx, hwcfg=%d\n", |
1194 | __FUNCTION__, devaddr, hwcfg); | 1194 | __func__, devaddr, hwcfg); |
1195 | dma_wrreg(chan, S3C2410_DMA_DISRCC, (0<<1) | (0<<0)); | 1195 | dma_wrreg(chan, S3C2410_DMA_DISRCC, (0<<1) | (0<<0)); |
1196 | dma_wrreg(chan, S3C2410_DMA_DIDST, devaddr); | 1196 | dma_wrreg(chan, S3C2410_DMA_DIDST, devaddr); |
1197 | dma_wrreg(chan, S3C2410_DMA_DIDSTC, hwcfg & 3); | 1197 | dma_wrreg(chan, S3C2410_DMA_DIDSTC, hwcfg & 3); |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index ade230d445d9..8724ed3298d3 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -1824,7 +1824,7 @@ choice | |||
1824 | Allows the configuration of the timer frequency. | 1824 | Allows the configuration of the timer frequency. |
1825 | 1825 | ||
1826 | config HZ_48 | 1826 | config HZ_48 |
1827 | bool "48 HZ" if SYS_SUPPORTS_48HZ | 1827 | bool "48 HZ" if SYS_SUPPORTS_48HZ || SYS_SUPPORTS_ARBIT_HZ |
1828 | 1828 | ||
1829 | config HZ_100 | 1829 | config HZ_100 |
1830 | bool "100 HZ" if SYS_SUPPORTS_100HZ || SYS_SUPPORTS_ARBIT_HZ | 1830 | bool "100 HZ" if SYS_SUPPORTS_100HZ || SYS_SUPPORTS_ARBIT_HZ |
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 3fb7f3065c92..72097dacabd3 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -12,6 +12,8 @@ | |||
12 | # for "archclean" cleaning up for this architecture. | 12 | # for "archclean" cleaning up for this architecture. |
13 | # | 13 | # |
14 | 14 | ||
15 | KBUILD_DEFCONFIG := ip22_defconfig | ||
16 | |||
15 | cflags-y := | 17 | cflags-y := |
16 | 18 | ||
17 | # | 19 | # |
diff --git a/arch/mips/au1000/common/dbdma.c b/arch/mips/au1000/common/dbdma.c index 428ed275a0f6..57f17b41098d 100644 --- a/arch/mips/au1000/common/dbdma.c +++ b/arch/mips/au1000/common/dbdma.c | |||
@@ -161,22 +161,22 @@ static dbdev_tab_t dbdev_tab[] = { | |||
161 | { DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 }, | 161 | { DSCR_CMD0_ALWAYS, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 }, |
162 | 162 | ||
163 | /* Provide 16 user definable device types */ | 163 | /* Provide 16 user definable device types */ |
164 | { 0, 0, 0, 0, 0, 0, 0 }, | 164 | { ~0, 0, 0, 0, 0, 0, 0 }, |
165 | { 0, 0, 0, 0, 0, 0, 0 }, | 165 | { ~0, 0, 0, 0, 0, 0, 0 }, |
166 | { 0, 0, 0, 0, 0, 0, 0 }, | 166 | { ~0, 0, 0, 0, 0, 0, 0 }, |
167 | { 0, 0, 0, 0, 0, 0, 0 }, | 167 | { ~0, 0, 0, 0, 0, 0, 0 }, |
168 | { 0, 0, 0, 0, 0, 0, 0 }, | 168 | { ~0, 0, 0, 0, 0, 0, 0 }, |
169 | { 0, 0, 0, 0, 0, 0, 0 }, | 169 | { ~0, 0, 0, 0, 0, 0, 0 }, |
170 | { 0, 0, 0, 0, 0, 0, 0 }, | 170 | { ~0, 0, 0, 0, 0, 0, 0 }, |
171 | { 0, 0, 0, 0, 0, 0, 0 }, | 171 | { ~0, 0, 0, 0, 0, 0, 0 }, |
172 | { 0, 0, 0, 0, 0, 0, 0 }, | 172 | { ~0, 0, 0, 0, 0, 0, 0 }, |
173 | { 0, 0, 0, 0, 0, 0, 0 }, | 173 | { ~0, 0, 0, 0, 0, 0, 0 }, |
174 | { 0, 0, 0, 0, 0, 0, 0 }, | 174 | { ~0, 0, 0, 0, 0, 0, 0 }, |
175 | { 0, 0, 0, 0, 0, 0, 0 }, | 175 | { ~0, 0, 0, 0, 0, 0, 0 }, |
176 | { 0, 0, 0, 0, 0, 0, 0 }, | 176 | { ~0, 0, 0, 0, 0, 0, 0 }, |
177 | { 0, 0, 0, 0, 0, 0, 0 }, | 177 | { ~0, 0, 0, 0, 0, 0, 0 }, |
178 | { 0, 0, 0, 0, 0, 0, 0 }, | 178 | { ~0, 0, 0, 0, 0, 0, 0 }, |
179 | { 0, 0, 0, 0, 0, 0, 0 }, | 179 | { ~0, 0, 0, 0, 0, 0, 0 }, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | #define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab) | 182 | #define DBDEV_TAB_SIZE ARRAY_SIZE(dbdev_tab) |
@@ -209,7 +209,7 @@ au1xxx_ddma_add_device(dbdev_tab_t *dev) | |||
209 | dbdev_tab_t *p=NULL; | 209 | dbdev_tab_t *p=NULL; |
210 | static u16 new_id=0x1000; | 210 | static u16 new_id=0x1000; |
211 | 211 | ||
212 | p = find_dbdev_id(0); | 212 | p = find_dbdev_id(~0); |
213 | if ( NULL != p ) | 213 | if ( NULL != p ) |
214 | { | 214 | { |
215 | memcpy(p, dev, sizeof(dbdev_tab_t)); | 215 | memcpy(p, dev, sizeof(dbdev_tab_t)); |
diff --git a/arch/mips/defconfig b/arch/mips/defconfig deleted file mode 100644 index 4f5e56c9335e..000000000000 --- a/arch/mips/defconfig +++ /dev/null | |||
@@ -1,1158 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.23-rc2 | ||
4 | # Tue Aug 7 12:39:49 2007 | ||
5 | # | ||
6 | CONFIG_MIPS=y | ||
7 | |||
8 | # | ||
9 | # Machine selection | ||
10 | # | ||
11 | CONFIG_ZONE_DMA=y | ||
12 | # CONFIG_MACH_ALCHEMY is not set | ||
13 | # CONFIG_BASLER_EXCITE is not set | ||
14 | # CONFIG_MIPS_COBALT is not set | ||
15 | # CONFIG_MACH_DECSTATION is not set | ||
16 | # CONFIG_MACH_JAZZ is not set | ||
17 | # CONFIG_LEMOTE_FULONG is not set | ||
18 | # CONFIG_MIPS_ATLAS is not set | ||
19 | # CONFIG_MIPS_MALTA is not set | ||
20 | # CONFIG_MIPS_SEAD is not set | ||
21 | # CONFIG_MIPS_SIM is not set | ||
22 | # CONFIG_MARKEINS is not set | ||
23 | # CONFIG_MACH_VR41XX is not set | ||
24 | # CONFIG_PNX8550_JBS is not set | ||
25 | # CONFIG_PNX8550_STB810 is not set | ||
26 | # CONFIG_PMC_MSP is not set | ||
27 | # CONFIG_PMC_YOSEMITE is not set | ||
28 | CONFIG_SGI_IP22=y | ||
29 | # CONFIG_SGI_IP27 is not set | ||
30 | # CONFIG_SGI_IP32 is not set | ||
31 | # CONFIG_SIBYTE_CRHINE is not set | ||
32 | # CONFIG_SIBYTE_CARMEL is not set | ||
33 | # CONFIG_SIBYTE_CRHONE is not set | ||
34 | # CONFIG_SIBYTE_RHONE is not set | ||
35 | # CONFIG_SIBYTE_SWARM is not set | ||
36 | # CONFIG_SIBYTE_LITTLESUR is not set | ||
37 | # CONFIG_SIBYTE_SENTOSA is not set | ||
38 | # CONFIG_SIBYTE_BIGSUR is not set | ||
39 | # CONFIG_SNI_RM is not set | ||
40 | # CONFIG_TOSHIBA_JMR3927 is not set | ||
41 | # CONFIG_TOSHIBA_RBTX4927 is not set | ||
42 | # CONFIG_TOSHIBA_RBTX4938 is not set | ||
43 | # CONFIG_WR_PPMC is not set | ||
44 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
45 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
46 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
47 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
48 | CONFIG_GENERIC_HWEIGHT=y | ||
49 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
50 | CONFIG_GENERIC_TIME=y | ||
51 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
52 | # CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ is not set | ||
53 | CONFIG_ARC=y | ||
54 | CONFIG_DMA_NONCOHERENT=y | ||
55 | CONFIG_DMA_NEED_PCI_MAP_STATE=y | ||
56 | CONFIG_EARLY_PRINTK=y | ||
57 | CONFIG_SYS_HAS_EARLY_PRINTK=y | ||
58 | # CONFIG_NO_IOPORT is not set | ||
59 | CONFIG_GENERIC_ISA_DMA_SUPPORT_BROKEN=y | ||
60 | CONFIG_CPU_BIG_ENDIAN=y | ||
61 | # CONFIG_CPU_LITTLE_ENDIAN is not set | ||
62 | CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y | ||
63 | CONFIG_IRQ_CPU=y | ||
64 | CONFIG_SWAP_IO_SPACE=y | ||
65 | CONFIG_ARC32=y | ||
66 | CONFIG_BOOT_ELF32=y | ||
67 | CONFIG_MIPS_L1_CACHE_SHIFT=5 | ||
68 | CONFIG_ARC_CONSOLE=y | ||
69 | CONFIG_ARC_PROMLIB=y | ||
70 | |||
71 | # | ||
72 | # CPU selection | ||
73 | # | ||
74 | # CONFIG_CPU_LOONGSON2 is not set | ||
75 | # CONFIG_CPU_MIPS32_R1 is not set | ||
76 | # CONFIG_CPU_MIPS32_R2 is not set | ||
77 | # CONFIG_CPU_MIPS64_R1 is not set | ||
78 | # CONFIG_CPU_MIPS64_R2 is not set | ||
79 | # CONFIG_CPU_R3000 is not set | ||
80 | # CONFIG_CPU_TX39XX is not set | ||
81 | # CONFIG_CPU_VR41XX is not set | ||
82 | # CONFIG_CPU_R4300 is not set | ||
83 | # CONFIG_CPU_R4X00 is not set | ||
84 | # CONFIG_CPU_TX49XX is not set | ||
85 | CONFIG_CPU_R5000=y | ||
86 | # CONFIG_CPU_R5432 is not set | ||
87 | # CONFIG_CPU_R6000 is not set | ||
88 | # CONFIG_CPU_NEVADA is not set | ||
89 | # CONFIG_CPU_R8000 is not set | ||
90 | # CONFIG_CPU_R10000 is not set | ||
91 | # CONFIG_CPU_RM7000 is not set | ||
92 | # CONFIG_CPU_RM9000 is not set | ||
93 | # CONFIG_CPU_SB1 is not set | ||
94 | CONFIG_SYS_HAS_CPU_R4X00=y | ||
95 | CONFIG_SYS_HAS_CPU_R5000=y | ||
96 | CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y | ||
97 | CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y | ||
98 | CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y | ||
99 | CONFIG_CPU_SUPPORTS_64BIT_KERNEL=y | ||
100 | |||
101 | # | ||
102 | # Kernel type | ||
103 | # | ||
104 | CONFIG_32BIT=y | ||
105 | # CONFIG_64BIT is not set | ||
106 | CONFIG_PAGE_SIZE_4KB=y | ||
107 | # CONFIG_PAGE_SIZE_8KB is not set | ||
108 | # CONFIG_PAGE_SIZE_16KB is not set | ||
109 | # CONFIG_PAGE_SIZE_64KB is not set | ||
110 | CONFIG_BOARD_SCACHE=y | ||
111 | CONFIG_IP22_CPU_SCACHE=y | ||
112 | CONFIG_MIPS_MT_DISABLED=y | ||
113 | # CONFIG_MIPS_MT_SMP is not set | ||
114 | # CONFIG_MIPS_MT_SMTC is not set | ||
115 | CONFIG_CPU_HAS_LLSC=y | ||
116 | CONFIG_CPU_HAS_SYNC=y | ||
117 | CONFIG_GENERIC_HARDIRQS=y | ||
118 | CONFIG_GENERIC_IRQ_PROBE=y | ||
119 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
120 | CONFIG_SELECT_MEMORY_MODEL=y | ||
121 | CONFIG_FLATMEM_MANUAL=y | ||
122 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
123 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
124 | CONFIG_FLATMEM=y | ||
125 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
126 | # CONFIG_SPARSEMEM_STATIC is not set | ||
127 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
128 | # CONFIG_RESOURCES_64BIT is not set | ||
129 | CONFIG_ZONE_DMA_FLAG=1 | ||
130 | CONFIG_BOUNCE=y | ||
131 | CONFIG_VIRT_TO_BUS=y | ||
132 | # CONFIG_HZ_48 is not set | ||
133 | # CONFIG_HZ_100 is not set | ||
134 | # CONFIG_HZ_128 is not set | ||
135 | # CONFIG_HZ_250 is not set | ||
136 | # CONFIG_HZ_256 is not set | ||
137 | CONFIG_HZ_1000=y | ||
138 | # CONFIG_HZ_1024 is not set | ||
139 | CONFIG_SYS_SUPPORTS_ARBIT_HZ=y | ||
140 | CONFIG_HZ=1000 | ||
141 | # CONFIG_PREEMPT_NONE is not set | ||
142 | CONFIG_PREEMPT_VOLUNTARY=y | ||
143 | # CONFIG_PREEMPT is not set | ||
144 | # CONFIG_KEXEC is not set | ||
145 | CONFIG_SECCOMP=y | ||
146 | CONFIG_LOCKDEP_SUPPORT=y | ||
147 | CONFIG_STACKTRACE_SUPPORT=y | ||
148 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
149 | |||
150 | # | ||
151 | # General setup | ||
152 | # | ||
153 | CONFIG_EXPERIMENTAL=y | ||
154 | CONFIG_BROKEN_ON_SMP=y | ||
155 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
156 | CONFIG_LOCALVERSION="" | ||
157 | CONFIG_LOCALVERSION_AUTO=y | ||
158 | CONFIG_SWAP=y | ||
159 | CONFIG_SYSVIPC=y | ||
160 | CONFIG_SYSVIPC_SYSCTL=y | ||
161 | # CONFIG_POSIX_MQUEUE is not set | ||
162 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
163 | # CONFIG_TASKSTATS is not set | ||
164 | # CONFIG_USER_NS is not set | ||
165 | # CONFIG_AUDIT is not set | ||
166 | CONFIG_IKCONFIG=y | ||
167 | CONFIG_IKCONFIG_PROC=y | ||
168 | CONFIG_LOG_BUF_SHIFT=14 | ||
169 | CONFIG_SYSFS_DEPRECATED=y | ||
170 | CONFIG_RELAY=y | ||
171 | # CONFIG_BLK_DEV_INITRD is not set | ||
172 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
173 | CONFIG_SYSCTL=y | ||
174 | CONFIG_EMBEDDED=y | ||
175 | CONFIG_SYSCTL_SYSCALL=y | ||
176 | CONFIG_KALLSYMS=y | ||
177 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
178 | # CONFIG_HOTPLUG is not set | ||
179 | CONFIG_PRINTK=y | ||
180 | CONFIG_BUG=y | ||
181 | CONFIG_ELF_CORE=y | ||
182 | CONFIG_BASE_FULL=y | ||
183 | CONFIG_FUTEX=y | ||
184 | CONFIG_ANON_INODES=y | ||
185 | CONFIG_EPOLL=y | ||
186 | CONFIG_SIGNALFD=y | ||
187 | CONFIG_TIMERFD=y | ||
188 | CONFIG_EVENTFD=y | ||
189 | CONFIG_SHMEM=y | ||
190 | CONFIG_VM_EVENT_COUNTERS=y | ||
191 | CONFIG_SLAB=y | ||
192 | # CONFIG_SLUB is not set | ||
193 | # CONFIG_SLOB is not set | ||
194 | CONFIG_RT_MUTEXES=y | ||
195 | # CONFIG_TINY_SHMEM is not set | ||
196 | CONFIG_BASE_SMALL=0 | ||
197 | CONFIG_MODULES=y | ||
198 | CONFIG_MODULE_UNLOAD=y | ||
199 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
200 | CONFIG_MODVERSIONS=y | ||
201 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
202 | CONFIG_KMOD=y | ||
203 | CONFIG_BLOCK=y | ||
204 | # CONFIG_LBD is not set | ||
205 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
206 | # CONFIG_LSF is not set | ||
207 | # CONFIG_BLK_DEV_BSG is not set | ||
208 | |||
209 | # | ||
210 | # IO Schedulers | ||
211 | # | ||
212 | CONFIG_IOSCHED_NOOP=y | ||
213 | CONFIG_IOSCHED_AS=y | ||
214 | CONFIG_IOSCHED_DEADLINE=y | ||
215 | CONFIG_IOSCHED_CFQ=y | ||
216 | CONFIG_DEFAULT_AS=y | ||
217 | # CONFIG_DEFAULT_DEADLINE is not set | ||
218 | # CONFIG_DEFAULT_CFQ is not set | ||
219 | # CONFIG_DEFAULT_NOOP is not set | ||
220 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
221 | |||
222 | # | ||
223 | # Bus options (PCI, PCMCIA, EISA, ISA, TC) | ||
224 | # | ||
225 | CONFIG_HW_HAS_EISA=y | ||
226 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
227 | # CONFIG_EISA is not set | ||
228 | CONFIG_MMU=y | ||
229 | |||
230 | # | ||
231 | # PCCARD (PCMCIA/CardBus) support | ||
232 | # | ||
233 | |||
234 | # | ||
235 | # Executable file formats | ||
236 | # | ||
237 | CONFIG_BINFMT_ELF=y | ||
238 | CONFIG_BINFMT_MISC=m | ||
239 | CONFIG_TRAD_SIGNALS=y | ||
240 | |||
241 | # | ||
242 | # Power management options | ||
243 | # | ||
244 | CONFIG_PM=y | ||
245 | # CONFIG_PM_LEGACY is not set | ||
246 | # CONFIG_PM_DEBUG is not set | ||
247 | # CONFIG_SUSPEND is not set | ||
248 | |||
249 | # | ||
250 | # Networking | ||
251 | # | ||
252 | CONFIG_NET=y | ||
253 | |||
254 | # | ||
255 | # Networking options | ||
256 | # | ||
257 | CONFIG_PACKET=y | ||
258 | CONFIG_PACKET_MMAP=y | ||
259 | CONFIG_UNIX=y | ||
260 | CONFIG_XFRM=y | ||
261 | CONFIG_XFRM_USER=m | ||
262 | # CONFIG_XFRM_SUB_POLICY is not set | ||
263 | CONFIG_XFRM_MIGRATE=y | ||
264 | CONFIG_NET_KEY=y | ||
265 | CONFIG_NET_KEY_MIGRATE=y | ||
266 | CONFIG_INET=y | ||
267 | CONFIG_IP_MULTICAST=y | ||
268 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
269 | CONFIG_IP_FIB_HASH=y | ||
270 | CONFIG_IP_PNP=y | ||
271 | # CONFIG_IP_PNP_DHCP is not set | ||
272 | CONFIG_IP_PNP_BOOTP=y | ||
273 | # CONFIG_IP_PNP_RARP is not set | ||
274 | # CONFIG_NET_IPIP is not set | ||
275 | # CONFIG_NET_IPGRE is not set | ||
276 | # CONFIG_IP_MROUTE is not set | ||
277 | # CONFIG_ARPD is not set | ||
278 | # CONFIG_SYN_COOKIES is not set | ||
279 | CONFIG_INET_AH=m | ||
280 | CONFIG_INET_ESP=m | ||
281 | CONFIG_INET_IPCOMP=m | ||
282 | CONFIG_INET_XFRM_TUNNEL=m | ||
283 | CONFIG_INET_TUNNEL=m | ||
284 | CONFIG_INET_XFRM_MODE_TRANSPORT=m | ||
285 | CONFIG_INET_XFRM_MODE_TUNNEL=m | ||
286 | CONFIG_INET_XFRM_MODE_BEET=m | ||
287 | CONFIG_INET_DIAG=y | ||
288 | CONFIG_INET_TCP_DIAG=y | ||
289 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
290 | CONFIG_TCP_CONG_CUBIC=y | ||
291 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
292 | CONFIG_TCP_MD5SIG=y | ||
293 | CONFIG_IP_VS=m | ||
294 | # CONFIG_IP_VS_DEBUG is not set | ||
295 | CONFIG_IP_VS_TAB_BITS=12 | ||
296 | |||
297 | # | ||
298 | # IPVS transport protocol load balancing support | ||
299 | # | ||
300 | CONFIG_IP_VS_PROTO_TCP=y | ||
301 | CONFIG_IP_VS_PROTO_UDP=y | ||
302 | CONFIG_IP_VS_PROTO_ESP=y | ||
303 | CONFIG_IP_VS_PROTO_AH=y | ||
304 | |||
305 | # | ||
306 | # IPVS scheduler | ||
307 | # | ||
308 | CONFIG_IP_VS_RR=m | ||
309 | CONFIG_IP_VS_WRR=m | ||
310 | CONFIG_IP_VS_LC=m | ||
311 | CONFIG_IP_VS_WLC=m | ||
312 | CONFIG_IP_VS_LBLC=m | ||
313 | CONFIG_IP_VS_LBLCR=m | ||
314 | CONFIG_IP_VS_DH=m | ||
315 | CONFIG_IP_VS_SH=m | ||
316 | CONFIG_IP_VS_SED=m | ||
317 | CONFIG_IP_VS_NQ=m | ||
318 | |||
319 | # | ||
320 | # IPVS application helper | ||
321 | # | ||
322 | CONFIG_IP_VS_FTP=m | ||
323 | CONFIG_IPV6=m | ||
324 | CONFIG_IPV6_PRIVACY=y | ||
325 | CONFIG_IPV6_ROUTER_PREF=y | ||
326 | CONFIG_IPV6_ROUTE_INFO=y | ||
327 | CONFIG_IPV6_OPTIMISTIC_DAD=y | ||
328 | CONFIG_INET6_AH=m | ||
329 | CONFIG_INET6_ESP=m | ||
330 | CONFIG_INET6_IPCOMP=m | ||
331 | CONFIG_IPV6_MIP6=m | ||
332 | CONFIG_INET6_XFRM_TUNNEL=m | ||
333 | CONFIG_INET6_TUNNEL=m | ||
334 | CONFIG_INET6_XFRM_MODE_TRANSPORT=m | ||
335 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | ||
336 | CONFIG_INET6_XFRM_MODE_BEET=m | ||
337 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | ||
338 | CONFIG_IPV6_SIT=m | ||
339 | CONFIG_IPV6_TUNNEL=m | ||
340 | CONFIG_IPV6_MULTIPLE_TABLES=y | ||
341 | CONFIG_IPV6_SUBTREES=y | ||
342 | CONFIG_NETWORK_SECMARK=y | ||
343 | CONFIG_NETFILTER=y | ||
344 | # CONFIG_NETFILTER_DEBUG is not set | ||
345 | |||
346 | # | ||
347 | # Core Netfilter Configuration | ||
348 | # | ||
349 | CONFIG_NETFILTER_NETLINK=m | ||
350 | CONFIG_NETFILTER_NETLINK_QUEUE=m | ||
351 | CONFIG_NETFILTER_NETLINK_LOG=m | ||
352 | CONFIG_NF_CONNTRACK_ENABLED=m | ||
353 | CONFIG_NF_CONNTRACK=m | ||
354 | CONFIG_NF_CT_ACCT=y | ||
355 | CONFIG_NF_CONNTRACK_MARK=y | ||
356 | CONFIG_NF_CONNTRACK_SECMARK=y | ||
357 | CONFIG_NF_CONNTRACK_EVENTS=y | ||
358 | CONFIG_NF_CT_PROTO_GRE=m | ||
359 | CONFIG_NF_CT_PROTO_SCTP=m | ||
360 | CONFIG_NF_CT_PROTO_UDPLITE=m | ||
361 | CONFIG_NF_CONNTRACK_AMANDA=m | ||
362 | CONFIG_NF_CONNTRACK_FTP=m | ||
363 | CONFIG_NF_CONNTRACK_H323=m | ||
364 | CONFIG_NF_CONNTRACK_IRC=m | ||
365 | # CONFIG_NF_CONNTRACK_NETBIOS_NS is not set | ||
366 | CONFIG_NF_CONNTRACK_PPTP=m | ||
367 | CONFIG_NF_CONNTRACK_SANE=m | ||
368 | CONFIG_NF_CONNTRACK_SIP=m | ||
369 | CONFIG_NF_CONNTRACK_TFTP=m | ||
370 | CONFIG_NF_CT_NETLINK=m | ||
371 | CONFIG_NETFILTER_XTABLES=m | ||
372 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
373 | CONFIG_NETFILTER_XT_TARGET_CONNMARK=m | ||
374 | CONFIG_NETFILTER_XT_TARGET_DSCP=m | ||
375 | CONFIG_NETFILTER_XT_TARGET_MARK=m | ||
376 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
377 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | ||
378 | CONFIG_NETFILTER_XT_TARGET_NOTRACK=m | ||
379 | CONFIG_NETFILTER_XT_TARGET_TRACE=m | ||
380 | CONFIG_NETFILTER_XT_TARGET_SECMARK=m | ||
381 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m | ||
382 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | ||
383 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
384 | CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m | ||
385 | CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m | ||
386 | CONFIG_NETFILTER_XT_MATCH_CONNMARK=m | ||
387 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | ||
388 | CONFIG_NETFILTER_XT_MATCH_DCCP=m | ||
389 | CONFIG_NETFILTER_XT_MATCH_DSCP=m | ||
390 | CONFIG_NETFILTER_XT_MATCH_ESP=m | ||
391 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | ||
392 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
393 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
394 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
395 | CONFIG_NETFILTER_XT_MATCH_MARK=m | ||
396 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | ||
397 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
398 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
399 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m | ||
400 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
401 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | ||
402 | CONFIG_NETFILTER_XT_MATCH_STATE=m | ||
403 | CONFIG_NETFILTER_XT_MATCH_STATISTIC=m | ||
404 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
405 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
406 | CONFIG_NETFILTER_XT_MATCH_U32=m | ||
407 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | ||
408 | |||
409 | # | ||
410 | # IP: Netfilter Configuration | ||
411 | # | ||
412 | CONFIG_NF_CONNTRACK_IPV4=m | ||
413 | CONFIG_NF_CONNTRACK_PROC_COMPAT=y | ||
414 | CONFIG_IP_NF_QUEUE=m | ||
415 | CONFIG_IP_NF_IPTABLES=m | ||
416 | CONFIG_IP_NF_MATCH_IPRANGE=m | ||
417 | CONFIG_IP_NF_MATCH_TOS=m | ||
418 | CONFIG_IP_NF_MATCH_RECENT=m | ||
419 | CONFIG_IP_NF_MATCH_ECN=m | ||
420 | CONFIG_IP_NF_MATCH_AH=m | ||
421 | CONFIG_IP_NF_MATCH_TTL=m | ||
422 | CONFIG_IP_NF_MATCH_OWNER=m | ||
423 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
424 | CONFIG_IP_NF_FILTER=m | ||
425 | CONFIG_IP_NF_TARGET_REJECT=m | ||
426 | CONFIG_IP_NF_TARGET_LOG=m | ||
427 | CONFIG_IP_NF_TARGET_ULOG=m | ||
428 | CONFIG_NF_NAT=m | ||
429 | CONFIG_NF_NAT_NEEDED=y | ||
430 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
431 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
432 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
433 | CONFIG_IP_NF_TARGET_SAME=m | ||
434 | CONFIG_NF_NAT_SNMP_BASIC=m | ||
435 | CONFIG_NF_NAT_PROTO_GRE=m | ||
436 | CONFIG_NF_NAT_FTP=m | ||
437 | CONFIG_NF_NAT_IRC=m | ||
438 | CONFIG_NF_NAT_TFTP=m | ||
439 | CONFIG_NF_NAT_AMANDA=m | ||
440 | CONFIG_NF_NAT_PPTP=m | ||
441 | CONFIG_NF_NAT_H323=m | ||
442 | CONFIG_NF_NAT_SIP=m | ||
443 | CONFIG_IP_NF_MANGLE=m | ||
444 | CONFIG_IP_NF_TARGET_TOS=m | ||
445 | CONFIG_IP_NF_TARGET_ECN=m | ||
446 | CONFIG_IP_NF_TARGET_TTL=m | ||
447 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
448 | CONFIG_IP_NF_RAW=m | ||
449 | CONFIG_IP_NF_ARPTABLES=m | ||
450 | CONFIG_IP_NF_ARPFILTER=m | ||
451 | CONFIG_IP_NF_ARP_MANGLE=m | ||
452 | |||
453 | # | ||
454 | # IPv6: Netfilter Configuration (EXPERIMENTAL) | ||
455 | # | ||
456 | CONFIG_NF_CONNTRACK_IPV6=m | ||
457 | CONFIG_IP6_NF_QUEUE=m | ||
458 | CONFIG_IP6_NF_IPTABLES=m | ||
459 | CONFIG_IP6_NF_MATCH_RT=m | ||
460 | CONFIG_IP6_NF_MATCH_OPTS=m | ||
461 | CONFIG_IP6_NF_MATCH_FRAG=m | ||
462 | CONFIG_IP6_NF_MATCH_HL=m | ||
463 | CONFIG_IP6_NF_MATCH_OWNER=m | ||
464 | CONFIG_IP6_NF_MATCH_IPV6HEADER=m | ||
465 | CONFIG_IP6_NF_MATCH_AH=m | ||
466 | CONFIG_IP6_NF_MATCH_MH=m | ||
467 | CONFIG_IP6_NF_MATCH_EUI64=m | ||
468 | CONFIG_IP6_NF_FILTER=m | ||
469 | CONFIG_IP6_NF_TARGET_LOG=m | ||
470 | CONFIG_IP6_NF_TARGET_REJECT=m | ||
471 | CONFIG_IP6_NF_MANGLE=m | ||
472 | CONFIG_IP6_NF_TARGET_HL=m | ||
473 | CONFIG_IP6_NF_RAW=m | ||
474 | # CONFIG_IP_DCCP is not set | ||
475 | CONFIG_IP_SCTP=m | ||
476 | # CONFIG_SCTP_DBG_MSG is not set | ||
477 | # CONFIG_SCTP_DBG_OBJCNT is not set | ||
478 | # CONFIG_SCTP_HMAC_NONE is not set | ||
479 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
480 | CONFIG_SCTP_HMAC_MD5=y | ||
481 | # CONFIG_TIPC is not set | ||
482 | # CONFIG_ATM is not set | ||
483 | # CONFIG_BRIDGE is not set | ||
484 | # CONFIG_VLAN_8021Q is not set | ||
485 | # CONFIG_DECNET is not set | ||
486 | # CONFIG_LLC2 is not set | ||
487 | # CONFIG_IPX is not set | ||
488 | # CONFIG_ATALK is not set | ||
489 | # CONFIG_X25 is not set | ||
490 | # CONFIG_LAPB is not set | ||
491 | # CONFIG_ECONET is not set | ||
492 | # CONFIG_WAN_ROUTER is not set | ||
493 | |||
494 | # | ||
495 | # QoS and/or fair queueing | ||
496 | # | ||
497 | CONFIG_NET_SCHED=y | ||
498 | CONFIG_NET_SCH_FIFO=y | ||
499 | |||
500 | # | ||
501 | # Queueing/Scheduling | ||
502 | # | ||
503 | CONFIG_NET_SCH_CBQ=m | ||
504 | CONFIG_NET_SCH_HTB=m | ||
505 | CONFIG_NET_SCH_HFSC=m | ||
506 | CONFIG_NET_SCH_PRIO=m | ||
507 | CONFIG_NET_SCH_RR=m | ||
508 | CONFIG_NET_SCH_RED=m | ||
509 | CONFIG_NET_SCH_SFQ=m | ||
510 | CONFIG_NET_SCH_TEQL=m | ||
511 | CONFIG_NET_SCH_TBF=m | ||
512 | CONFIG_NET_SCH_GRED=m | ||
513 | CONFIG_NET_SCH_DSMARK=m | ||
514 | CONFIG_NET_SCH_NETEM=m | ||
515 | CONFIG_NET_SCH_INGRESS=m | ||
516 | |||
517 | # | ||
518 | # Classification | ||
519 | # | ||
520 | CONFIG_NET_CLS=y | ||
521 | CONFIG_NET_CLS_BASIC=m | ||
522 | CONFIG_NET_CLS_TCINDEX=m | ||
523 | CONFIG_NET_CLS_ROUTE4=m | ||
524 | CONFIG_NET_CLS_ROUTE=y | ||
525 | CONFIG_NET_CLS_FW=m | ||
526 | CONFIG_NET_CLS_U32=m | ||
527 | # CONFIG_CLS_U32_PERF is not set | ||
528 | # CONFIG_CLS_U32_MARK is not set | ||
529 | CONFIG_NET_CLS_RSVP=m | ||
530 | CONFIG_NET_CLS_RSVP6=m | ||
531 | # CONFIG_NET_EMATCH is not set | ||
532 | CONFIG_NET_CLS_ACT=y | ||
533 | CONFIG_NET_ACT_POLICE=y | ||
534 | CONFIG_NET_ACT_GACT=m | ||
535 | CONFIG_GACT_PROB=y | ||
536 | CONFIG_NET_ACT_MIRRED=m | ||
537 | CONFIG_NET_ACT_IPT=m | ||
538 | CONFIG_NET_ACT_PEDIT=m | ||
539 | CONFIG_NET_ACT_SIMP=m | ||
540 | CONFIG_NET_CLS_POLICE=y | ||
541 | # CONFIG_NET_CLS_IND is not set | ||
542 | |||
543 | # | ||
544 | # Network testing | ||
545 | # | ||
546 | # CONFIG_NET_PKTGEN is not set | ||
547 | # CONFIG_HAMRADIO is not set | ||
548 | # CONFIG_IRDA is not set | ||
549 | # CONFIG_BT is not set | ||
550 | # CONFIG_AF_RXRPC is not set | ||
551 | CONFIG_FIB_RULES=y | ||
552 | |||
553 | # | ||
554 | # Wireless | ||
555 | # | ||
556 | CONFIG_CFG80211=m | ||
557 | CONFIG_WIRELESS_EXT=y | ||
558 | CONFIG_MAC80211=m | ||
559 | # CONFIG_MAC80211_DEBUG is not set | ||
560 | CONFIG_IEEE80211=m | ||
561 | # CONFIG_IEEE80211_DEBUG is not set | ||
562 | CONFIG_IEEE80211_CRYPT_WEP=m | ||
563 | CONFIG_IEEE80211_CRYPT_CCMP=m | ||
564 | CONFIG_IEEE80211_CRYPT_TKIP=m | ||
565 | CONFIG_IEEE80211_SOFTMAC=m | ||
566 | # CONFIG_IEEE80211_SOFTMAC_DEBUG is not set | ||
567 | CONFIG_RFKILL=m | ||
568 | CONFIG_RFKILL_INPUT=m | ||
569 | # CONFIG_NET_9P is not set | ||
570 | |||
571 | # | ||
572 | # Device Drivers | ||
573 | # | ||
574 | |||
575 | # | ||
576 | # Generic Driver Options | ||
577 | # | ||
578 | CONFIG_STANDALONE=y | ||
579 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
580 | # CONFIG_SYS_HYPERVISOR is not set | ||
581 | CONFIG_CONNECTOR=m | ||
582 | # CONFIG_MTD is not set | ||
583 | # CONFIG_PARPORT is not set | ||
584 | CONFIG_BLK_DEV=y | ||
585 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
586 | # CONFIG_BLK_DEV_LOOP is not set | ||
587 | # CONFIG_BLK_DEV_NBD is not set | ||
588 | # CONFIG_BLK_DEV_RAM is not set | ||
589 | CONFIG_CDROM_PKTCDVD=m | ||
590 | CONFIG_CDROM_PKTCDVD_BUFFERS=8 | ||
591 | # CONFIG_CDROM_PKTCDVD_WCACHE is not set | ||
592 | CONFIG_ATA_OVER_ETH=m | ||
593 | # CONFIG_MISC_DEVICES is not set | ||
594 | # CONFIG_IDE is not set | ||
595 | |||
596 | # | ||
597 | # SCSI device support | ||
598 | # | ||
599 | CONFIG_RAID_ATTRS=m | ||
600 | CONFIG_SCSI=y | ||
601 | CONFIG_SCSI_DMA=y | ||
602 | CONFIG_SCSI_TGT=m | ||
603 | # CONFIG_SCSI_NETLINK is not set | ||
604 | CONFIG_SCSI_PROC_FS=y | ||
605 | |||
606 | # | ||
607 | # SCSI support type (disk, tape, CD-ROM) | ||
608 | # | ||
609 | CONFIG_BLK_DEV_SD=y | ||
610 | CONFIG_CHR_DEV_ST=y | ||
611 | # CONFIG_CHR_DEV_OSST is not set | ||
612 | CONFIG_BLK_DEV_SR=y | ||
613 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
614 | # CONFIG_CHR_DEV_SG is not set | ||
615 | CONFIG_CHR_DEV_SCH=m | ||
616 | |||
617 | # | ||
618 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
619 | # | ||
620 | # CONFIG_SCSI_MULTI_LUN is not set | ||
621 | CONFIG_SCSI_CONSTANTS=y | ||
622 | # CONFIG_SCSI_LOGGING is not set | ||
623 | CONFIG_SCSI_SCAN_ASYNC=y | ||
624 | CONFIG_SCSI_WAIT_SCAN=m | ||
625 | |||
626 | # | ||
627 | # SCSI Transports | ||
628 | # | ||
629 | CONFIG_SCSI_SPI_ATTRS=m | ||
630 | # CONFIG_SCSI_FC_ATTRS is not set | ||
631 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
632 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
633 | CONFIG_SCSI_LOWLEVEL=y | ||
634 | CONFIG_ISCSI_TCP=m | ||
635 | CONFIG_SGIWD93_SCSI=y | ||
636 | # CONFIG_SCSI_DEBUG is not set | ||
637 | # CONFIG_ATA is not set | ||
638 | # CONFIG_MD is not set | ||
639 | CONFIG_NETDEVICES=y | ||
640 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
641 | # CONFIG_IFB is not set | ||
642 | CONFIG_DUMMY=m | ||
643 | CONFIG_BONDING=m | ||
644 | CONFIG_MACVLAN=m | ||
645 | CONFIG_EQUALIZER=m | ||
646 | CONFIG_TUN=m | ||
647 | CONFIG_PHYLIB=m | ||
648 | |||
649 | # | ||
650 | # MII PHY device drivers | ||
651 | # | ||
652 | CONFIG_MARVELL_PHY=m | ||
653 | CONFIG_DAVICOM_PHY=m | ||
654 | CONFIG_QSEMI_PHY=m | ||
655 | CONFIG_LXT_PHY=m | ||
656 | CONFIG_CICADA_PHY=m | ||
657 | # CONFIG_VITESSE_PHY is not set | ||
658 | # CONFIG_SMSC_PHY is not set | ||
659 | # CONFIG_BROADCOM_PHY is not set | ||
660 | # CONFIG_ICPLUS_PHY is not set | ||
661 | # CONFIG_FIXED_PHY is not set | ||
662 | CONFIG_NET_ETHERNET=y | ||
663 | # CONFIG_MII is not set | ||
664 | # CONFIG_AX88796 is not set | ||
665 | # CONFIG_DM9000 is not set | ||
666 | CONFIG_SGISEEQ=y | ||
667 | # CONFIG_NETDEV_1000 is not set | ||
668 | # CONFIG_NETDEV_10000 is not set | ||
669 | |||
670 | # | ||
671 | # Wireless LAN | ||
672 | # | ||
673 | CONFIG_WLAN_PRE80211=y | ||
674 | CONFIG_STRIP=m | ||
675 | CONFIG_WLAN_80211=y | ||
676 | # CONFIG_LIBERTAS is not set | ||
677 | CONFIG_HOSTAP=m | ||
678 | # CONFIG_HOSTAP_FIRMWARE is not set | ||
679 | # CONFIG_WAN is not set | ||
680 | # CONFIG_PPP is not set | ||
681 | # CONFIG_SLIP is not set | ||
682 | # CONFIG_SHAPER is not set | ||
683 | # CONFIG_NETCONSOLE is not set | ||
684 | # CONFIG_NETPOLL is not set | ||
685 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
686 | # CONFIG_ISDN is not set | ||
687 | # CONFIG_PHONE is not set | ||
688 | |||
689 | # | ||
690 | # Input device support | ||
691 | # | ||
692 | CONFIG_INPUT=y | ||
693 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
694 | # CONFIG_INPUT_POLLDEV is not set | ||
695 | |||
696 | # | ||
697 | # Userland interfaces | ||
698 | # | ||
699 | CONFIG_INPUT_MOUSEDEV=m | ||
700 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
701 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
702 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
703 | # CONFIG_INPUT_JOYDEV is not set | ||
704 | # CONFIG_INPUT_TSDEV is not set | ||
705 | # CONFIG_INPUT_EVDEV is not set | ||
706 | # CONFIG_INPUT_EVBUG is not set | ||
707 | |||
708 | # | ||
709 | # Input Device Drivers | ||
710 | # | ||
711 | CONFIG_INPUT_KEYBOARD=y | ||
712 | CONFIG_KEYBOARD_ATKBD=y | ||
713 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
714 | # CONFIG_KEYBOARD_LKKBD is not set | ||
715 | # CONFIG_KEYBOARD_XTKBD is not set | ||
716 | # CONFIG_KEYBOARD_NEWTON is not set | ||
717 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
718 | CONFIG_INPUT_MOUSE=y | ||
719 | CONFIG_MOUSE_PS2=m | ||
720 | # CONFIG_MOUSE_PS2_ALPS is not set | ||
721 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
722 | # CONFIG_MOUSE_PS2_SYNAPTICS is not set | ||
723 | # CONFIG_MOUSE_PS2_LIFEBOOK is not set | ||
724 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
725 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
726 | CONFIG_MOUSE_SERIAL=m | ||
727 | # CONFIG_MOUSE_VSXXXAA is not set | ||
728 | # CONFIG_INPUT_JOYSTICK is not set | ||
729 | # CONFIG_INPUT_TABLET is not set | ||
730 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
731 | # CONFIG_INPUT_MISC is not set | ||
732 | |||
733 | # | ||
734 | # Hardware I/O ports | ||
735 | # | ||
736 | CONFIG_SERIO=y | ||
737 | CONFIG_SERIO_I8042=y | ||
738 | CONFIG_SERIO_SERPORT=y | ||
739 | CONFIG_SERIO_LIBPS2=y | ||
740 | CONFIG_SERIO_RAW=m | ||
741 | # CONFIG_GAMEPORT is not set | ||
742 | |||
743 | # | ||
744 | # Character devices | ||
745 | # | ||
746 | CONFIG_VT=y | ||
747 | CONFIG_VT_CONSOLE=y | ||
748 | CONFIG_HW_CONSOLE=y | ||
749 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
750 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
751 | |||
752 | # | ||
753 | # Serial drivers | ||
754 | # | ||
755 | # CONFIG_SERIAL_8250 is not set | ||
756 | |||
757 | # | ||
758 | # Non-8250 serial port support | ||
759 | # | ||
760 | CONFIG_SERIAL_IP22_ZILOG=m | ||
761 | CONFIG_SERIAL_CORE=m | ||
762 | CONFIG_UNIX98_PTYS=y | ||
763 | CONFIG_LEGACY_PTYS=y | ||
764 | CONFIG_LEGACY_PTY_COUNT=256 | ||
765 | # CONFIG_IPMI_HANDLER is not set | ||
766 | CONFIG_WATCHDOG=y | ||
767 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
768 | |||
769 | # | ||
770 | # Watchdog Device Drivers | ||
771 | # | ||
772 | # CONFIG_SOFT_WATCHDOG is not set | ||
773 | CONFIG_INDYDOG=m | ||
774 | # CONFIG_HW_RANDOM is not set | ||
775 | # CONFIG_RTC is not set | ||
776 | CONFIG_SGI_DS1286=m | ||
777 | # CONFIG_R3964 is not set | ||
778 | CONFIG_RAW_DRIVER=m | ||
779 | CONFIG_MAX_RAW_DEVS=256 | ||
780 | # CONFIG_TCG_TPM is not set | ||
781 | # CONFIG_I2C is not set | ||
782 | |||
783 | # | ||
784 | # SPI support | ||
785 | # | ||
786 | # CONFIG_SPI is not set | ||
787 | # CONFIG_SPI_MASTER is not set | ||
788 | # CONFIG_W1 is not set | ||
789 | # CONFIG_POWER_SUPPLY is not set | ||
790 | # CONFIG_HWMON is not set | ||
791 | |||
792 | # | ||
793 | # Multifunction device drivers | ||
794 | # | ||
795 | # CONFIG_MFD_SM501 is not set | ||
796 | |||
797 | # | ||
798 | # Multimedia devices | ||
799 | # | ||
800 | # CONFIG_VIDEO_DEV is not set | ||
801 | # CONFIG_DVB_CORE is not set | ||
802 | # CONFIG_DAB is not set | ||
803 | |||
804 | # | ||
805 | # Graphics support | ||
806 | # | ||
807 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
808 | |||
809 | # | ||
810 | # Display device support | ||
811 | # | ||
812 | # CONFIG_DISPLAY_SUPPORT is not set | ||
813 | # CONFIG_VGASTATE is not set | ||
814 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
815 | # CONFIG_FB is not set | ||
816 | |||
817 | # | ||
818 | # Console display driver support | ||
819 | # | ||
820 | # CONFIG_VGA_CONSOLE is not set | ||
821 | CONFIG_SGI_NEWPORT_CONSOLE=y | ||
822 | CONFIG_DUMMY_CONSOLE=y | ||
823 | CONFIG_FONT_8x16=y | ||
824 | CONFIG_LOGO=y | ||
825 | # CONFIG_LOGO_LINUX_MONO is not set | ||
826 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
827 | # CONFIG_LOGO_LINUX_CLUT224 is not set | ||
828 | CONFIG_LOGO_SGI_CLUT224=y | ||
829 | |||
830 | # | ||
831 | # Sound | ||
832 | # | ||
833 | # CONFIG_SOUND is not set | ||
834 | CONFIG_HID_SUPPORT=y | ||
835 | CONFIG_HID=y | ||
836 | # CONFIG_HID_DEBUG is not set | ||
837 | CONFIG_USB_SUPPORT=y | ||
838 | # CONFIG_USB_ARCH_HAS_HCD is not set | ||
839 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
840 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
841 | |||
842 | # | ||
843 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
844 | # | ||
845 | |||
846 | # | ||
847 | # USB Gadget Support | ||
848 | # | ||
849 | # CONFIG_USB_GADGET is not set | ||
850 | # CONFIG_MMC is not set | ||
851 | # CONFIG_NEW_LEDS is not set | ||
852 | # CONFIG_RTC_CLASS is not set | ||
853 | |||
854 | # | ||
855 | # DMA Engine support | ||
856 | # | ||
857 | # CONFIG_DMA_ENGINE is not set | ||
858 | |||
859 | # | ||
860 | # DMA Clients | ||
861 | # | ||
862 | |||
863 | # | ||
864 | # DMA Devices | ||
865 | # | ||
866 | |||
867 | # | ||
868 | # Userspace I/O | ||
869 | # | ||
870 | # CONFIG_UIO is not set | ||
871 | |||
872 | # | ||
873 | # File systems | ||
874 | # | ||
875 | CONFIG_EXT2_FS=m | ||
876 | # CONFIG_EXT2_FS_XATTR is not set | ||
877 | # CONFIG_EXT2_FS_XIP is not set | ||
878 | CONFIG_EXT3_FS=y | ||
879 | CONFIG_EXT3_FS_XATTR=y | ||
880 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
881 | CONFIG_EXT3_FS_SECURITY=y | ||
882 | # CONFIG_EXT4DEV_FS is not set | ||
883 | CONFIG_JBD=y | ||
884 | # CONFIG_JBD_DEBUG is not set | ||
885 | CONFIG_FS_MBCACHE=y | ||
886 | # CONFIG_REISERFS_FS is not set | ||
887 | # CONFIG_JFS_FS is not set | ||
888 | CONFIG_FS_POSIX_ACL=y | ||
889 | CONFIG_XFS_FS=m | ||
890 | CONFIG_XFS_QUOTA=y | ||
891 | CONFIG_XFS_SECURITY=y | ||
892 | # CONFIG_XFS_POSIX_ACL is not set | ||
893 | # CONFIG_XFS_RT is not set | ||
894 | # CONFIG_GFS2_FS is not set | ||
895 | # CONFIG_OCFS2_FS is not set | ||
896 | CONFIG_MINIX_FS=m | ||
897 | # CONFIG_ROMFS_FS is not set | ||
898 | CONFIG_INOTIFY=y | ||
899 | CONFIG_INOTIFY_USER=y | ||
900 | CONFIG_QUOTA=y | ||
901 | # CONFIG_QFMT_V1 is not set | ||
902 | CONFIG_QFMT_V2=m | ||
903 | CONFIG_QUOTACTL=y | ||
904 | CONFIG_DNOTIFY=y | ||
905 | CONFIG_AUTOFS_FS=m | ||
906 | CONFIG_AUTOFS4_FS=m | ||
907 | CONFIG_FUSE_FS=m | ||
908 | CONFIG_GENERIC_ACL=y | ||
909 | |||
910 | # | ||
911 | # CD-ROM/DVD Filesystems | ||
912 | # | ||
913 | CONFIG_ISO9660_FS=m | ||
914 | CONFIG_JOLIET=y | ||
915 | CONFIG_ZISOFS=y | ||
916 | CONFIG_UDF_FS=m | ||
917 | CONFIG_UDF_NLS=y | ||
918 | |||
919 | # | ||
920 | # DOS/FAT/NT Filesystems | ||
921 | # | ||
922 | CONFIG_FAT_FS=m | ||
923 | CONFIG_MSDOS_FS=m | ||
924 | CONFIG_VFAT_FS=m | ||
925 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
926 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
927 | # CONFIG_NTFS_FS is not set | ||
928 | |||
929 | # | ||
930 | # Pseudo filesystems | ||
931 | # | ||
932 | CONFIG_PROC_FS=y | ||
933 | CONFIG_PROC_KCORE=y | ||
934 | CONFIG_PROC_SYSCTL=y | ||
935 | CONFIG_SYSFS=y | ||
936 | CONFIG_TMPFS=y | ||
937 | CONFIG_TMPFS_POSIX_ACL=y | ||
938 | # CONFIG_HUGETLB_PAGE is not set | ||
939 | CONFIG_RAMFS=y | ||
940 | CONFIG_CONFIGFS_FS=m | ||
941 | |||
942 | # | ||
943 | # Miscellaneous filesystems | ||
944 | # | ||
945 | # CONFIG_ADFS_FS is not set | ||
946 | # CONFIG_AFFS_FS is not set | ||
947 | # CONFIG_ECRYPT_FS is not set | ||
948 | # CONFIG_HFS_FS is not set | ||
949 | # CONFIG_HFSPLUS_FS is not set | ||
950 | # CONFIG_BEFS_FS is not set | ||
951 | # CONFIG_BFS_FS is not set | ||
952 | CONFIG_EFS_FS=m | ||
953 | # CONFIG_CRAMFS is not set | ||
954 | # CONFIG_VXFS_FS is not set | ||
955 | # CONFIG_HPFS_FS is not set | ||
956 | # CONFIG_QNX4FS_FS is not set | ||
957 | # CONFIG_SYSV_FS is not set | ||
958 | CONFIG_UFS_FS=m | ||
959 | # CONFIG_UFS_FS_WRITE is not set | ||
960 | # CONFIG_UFS_DEBUG is not set | ||
961 | |||
962 | # | ||
963 | # Network File Systems | ||
964 | # | ||
965 | CONFIG_NFS_FS=m | ||
966 | CONFIG_NFS_V3=y | ||
967 | CONFIG_NFS_V3_ACL=y | ||
968 | # CONFIG_NFS_V4 is not set | ||
969 | # CONFIG_NFS_DIRECTIO is not set | ||
970 | CONFIG_NFSD=m | ||
971 | CONFIG_NFSD_V2_ACL=y | ||
972 | CONFIG_NFSD_V3=y | ||
973 | CONFIG_NFSD_V3_ACL=y | ||
974 | # CONFIG_NFSD_V4 is not set | ||
975 | CONFIG_NFSD_TCP=y | ||
976 | CONFIG_LOCKD=m | ||
977 | CONFIG_LOCKD_V4=y | ||
978 | CONFIG_EXPORTFS=m | ||
979 | CONFIG_NFS_ACL_SUPPORT=m | ||
980 | CONFIG_NFS_COMMON=y | ||
981 | CONFIG_SUNRPC=m | ||
982 | CONFIG_SUNRPC_GSS=m | ||
983 | # CONFIG_SUNRPC_BIND34 is not set | ||
984 | CONFIG_RPCSEC_GSS_KRB5=m | ||
985 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
986 | CONFIG_SMB_FS=m | ||
987 | CONFIG_SMB_NLS_DEFAULT=y | ||
988 | CONFIG_SMB_NLS_REMOTE="cp437" | ||
989 | CONFIG_CIFS=m | ||
990 | # CONFIG_CIFS_STATS is not set | ||
991 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
992 | # CONFIG_CIFS_XATTR is not set | ||
993 | # CONFIG_CIFS_DEBUG2 is not set | ||
994 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
995 | # CONFIG_NCP_FS is not set | ||
996 | CONFIG_CODA_FS=m | ||
997 | # CONFIG_CODA_FS_OLD_API is not set | ||
998 | # CONFIG_AFS_FS is not set | ||
999 | |||
1000 | # | ||
1001 | # Partition Types | ||
1002 | # | ||
1003 | CONFIG_PARTITION_ADVANCED=y | ||
1004 | # CONFIG_ACORN_PARTITION is not set | ||
1005 | # CONFIG_OSF_PARTITION is not set | ||
1006 | # CONFIG_AMIGA_PARTITION is not set | ||
1007 | # CONFIG_ATARI_PARTITION is not set | ||
1008 | # CONFIG_MAC_PARTITION is not set | ||
1009 | CONFIG_MSDOS_PARTITION=y | ||
1010 | # CONFIG_BSD_DISKLABEL is not set | ||
1011 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1012 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1013 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1014 | # CONFIG_LDM_PARTITION is not set | ||
1015 | CONFIG_SGI_PARTITION=y | ||
1016 | # CONFIG_ULTRIX_PARTITION is not set | ||
1017 | # CONFIG_SUN_PARTITION is not set | ||
1018 | # CONFIG_KARMA_PARTITION is not set | ||
1019 | # CONFIG_EFI_PARTITION is not set | ||
1020 | # CONFIG_SYSV68_PARTITION is not set | ||
1021 | |||
1022 | # | ||
1023 | # Native Language Support | ||
1024 | # | ||
1025 | CONFIG_NLS=m | ||
1026 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1027 | CONFIG_NLS_CODEPAGE_437=m | ||
1028 | CONFIG_NLS_CODEPAGE_737=m | ||
1029 | CONFIG_NLS_CODEPAGE_775=m | ||
1030 | CONFIG_NLS_CODEPAGE_850=m | ||
1031 | CONFIG_NLS_CODEPAGE_852=m | ||
1032 | CONFIG_NLS_CODEPAGE_855=m | ||
1033 | CONFIG_NLS_CODEPAGE_857=m | ||
1034 | CONFIG_NLS_CODEPAGE_860=m | ||
1035 | CONFIG_NLS_CODEPAGE_861=m | ||
1036 | CONFIG_NLS_CODEPAGE_862=m | ||
1037 | CONFIG_NLS_CODEPAGE_863=m | ||
1038 | CONFIG_NLS_CODEPAGE_864=m | ||
1039 | CONFIG_NLS_CODEPAGE_865=m | ||
1040 | CONFIG_NLS_CODEPAGE_866=m | ||
1041 | CONFIG_NLS_CODEPAGE_869=m | ||
1042 | CONFIG_NLS_CODEPAGE_936=m | ||
1043 | CONFIG_NLS_CODEPAGE_950=m | ||
1044 | CONFIG_NLS_CODEPAGE_932=m | ||
1045 | CONFIG_NLS_CODEPAGE_949=m | ||
1046 | CONFIG_NLS_CODEPAGE_874=m | ||
1047 | CONFIG_NLS_ISO8859_8=m | ||
1048 | CONFIG_NLS_CODEPAGE_1250=m | ||
1049 | CONFIG_NLS_CODEPAGE_1251=m | ||
1050 | CONFIG_NLS_ASCII=m | ||
1051 | CONFIG_NLS_ISO8859_1=m | ||
1052 | CONFIG_NLS_ISO8859_2=m | ||
1053 | CONFIG_NLS_ISO8859_3=m | ||
1054 | CONFIG_NLS_ISO8859_4=m | ||
1055 | CONFIG_NLS_ISO8859_5=m | ||
1056 | CONFIG_NLS_ISO8859_6=m | ||
1057 | CONFIG_NLS_ISO8859_7=m | ||
1058 | CONFIG_NLS_ISO8859_9=m | ||
1059 | CONFIG_NLS_ISO8859_13=m | ||
1060 | CONFIG_NLS_ISO8859_14=m | ||
1061 | CONFIG_NLS_ISO8859_15=m | ||
1062 | CONFIG_NLS_KOI8_R=m | ||
1063 | CONFIG_NLS_KOI8_U=m | ||
1064 | CONFIG_NLS_UTF8=m | ||
1065 | |||
1066 | # | ||
1067 | # Distributed Lock Manager | ||
1068 | # | ||
1069 | CONFIG_DLM=m | ||
1070 | # CONFIG_DLM_DEBUG is not set | ||
1071 | |||
1072 | # | ||
1073 | # Profiling support | ||
1074 | # | ||
1075 | # CONFIG_PROFILING is not set | ||
1076 | |||
1077 | # | ||
1078 | # Kernel hacking | ||
1079 | # | ||
1080 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | ||
1081 | # CONFIG_PRINTK_TIME is not set | ||
1082 | CONFIG_ENABLE_MUST_CHECK=y | ||
1083 | # CONFIG_MAGIC_SYSRQ is not set | ||
1084 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1085 | # CONFIG_DEBUG_FS is not set | ||
1086 | # CONFIG_HEADERS_CHECK is not set | ||
1087 | # CONFIG_DEBUG_KERNEL is not set | ||
1088 | CONFIG_CROSSCOMPILE=y | ||
1089 | CONFIG_CMDLINE="" | ||
1090 | |||
1091 | # | ||
1092 | # Security options | ||
1093 | # | ||
1094 | CONFIG_KEYS=y | ||
1095 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
1096 | # CONFIG_SECURITY is not set | ||
1097 | CONFIG_CRYPTO=y | ||
1098 | CONFIG_CRYPTO_ALGAPI=y | ||
1099 | CONFIG_CRYPTO_ABLKCIPHER=m | ||
1100 | CONFIG_CRYPTO_BLKCIPHER=m | ||
1101 | CONFIG_CRYPTO_HASH=y | ||
1102 | CONFIG_CRYPTO_MANAGER=y | ||
1103 | CONFIG_CRYPTO_HMAC=y | ||
1104 | CONFIG_CRYPTO_XCBC=m | ||
1105 | CONFIG_CRYPTO_NULL=m | ||
1106 | CONFIG_CRYPTO_MD4=m | ||
1107 | CONFIG_CRYPTO_MD5=y | ||
1108 | CONFIG_CRYPTO_SHA1=m | ||
1109 | CONFIG_CRYPTO_SHA256=m | ||
1110 | CONFIG_CRYPTO_SHA512=m | ||
1111 | CONFIG_CRYPTO_WP512=m | ||
1112 | CONFIG_CRYPTO_TGR192=m | ||
1113 | CONFIG_CRYPTO_GF128MUL=m | ||
1114 | CONFIG_CRYPTO_ECB=m | ||
1115 | CONFIG_CRYPTO_CBC=m | ||
1116 | CONFIG_CRYPTO_PCBC=m | ||
1117 | CONFIG_CRYPTO_LRW=m | ||
1118 | CONFIG_CRYPTO_CRYPTD=m | ||
1119 | CONFIG_CRYPTO_DES=m | ||
1120 | CONFIG_CRYPTO_FCRYPT=m | ||
1121 | CONFIG_CRYPTO_BLOWFISH=m | ||
1122 | CONFIG_CRYPTO_TWOFISH=m | ||
1123 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
1124 | CONFIG_CRYPTO_SERPENT=m | ||
1125 | CONFIG_CRYPTO_AES=m | ||
1126 | CONFIG_CRYPTO_CAST5=m | ||
1127 | CONFIG_CRYPTO_CAST6=m | ||
1128 | CONFIG_CRYPTO_TEA=m | ||
1129 | CONFIG_CRYPTO_ARC4=m | ||
1130 | CONFIG_CRYPTO_KHAZAD=m | ||
1131 | CONFIG_CRYPTO_ANUBIS=m | ||
1132 | CONFIG_CRYPTO_DEFLATE=m | ||
1133 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
1134 | CONFIG_CRYPTO_CRC32C=m | ||
1135 | CONFIG_CRYPTO_CAMELLIA=m | ||
1136 | # CONFIG_CRYPTO_TEST is not set | ||
1137 | # CONFIG_CRYPTO_HW is not set | ||
1138 | |||
1139 | # | ||
1140 | # Library routines | ||
1141 | # | ||
1142 | CONFIG_BITREVERSE=m | ||
1143 | # CONFIG_CRC_CCITT is not set | ||
1144 | CONFIG_CRC16=m | ||
1145 | # CONFIG_CRC_ITU_T is not set | ||
1146 | CONFIG_CRC32=m | ||
1147 | # CONFIG_CRC7 is not set | ||
1148 | CONFIG_LIBCRC32C=m | ||
1149 | CONFIG_ZLIB_INFLATE=m | ||
1150 | CONFIG_ZLIB_DEFLATE=m | ||
1151 | CONFIG_TEXTSEARCH=y | ||
1152 | CONFIG_TEXTSEARCH_KMP=m | ||
1153 | CONFIG_TEXTSEARCH_BM=m | ||
1154 | CONFIG_TEXTSEARCH_FSM=m | ||
1155 | CONFIG_PLIST=y | ||
1156 | CONFIG_HAS_IOMEM=y | ||
1157 | CONFIG_HAS_IOPORT=y | ||
1158 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index ffa08362de17..9e78e1a4ca17 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -76,7 +76,6 @@ obj-$(CONFIG_PROC_FS) += proc.o | |||
76 | obj-$(CONFIG_64BIT) += cpu-bugs64.o | 76 | obj-$(CONFIG_64BIT) += cpu-bugs64.o |
77 | 77 | ||
78 | obj-$(CONFIG_I8253) += i8253.o | 78 | obj-$(CONFIG_I8253) += i8253.o |
79 | obj-$(CONFIG_PCSPEAKER) += pcspeaker.o | ||
80 | 79 | ||
81 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o | 80 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o |
82 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o | 81 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
diff --git a/arch/mips/kernel/cpu-bugs64.c b/arch/mips/kernel/cpu-bugs64.c index 417bb3e336ac..a1b48af0992f 100644 --- a/arch/mips/kernel/cpu-bugs64.c +++ b/arch/mips/kernel/cpu-bugs64.c | |||
@@ -167,7 +167,7 @@ static inline void check_mult_sh(void) | |||
167 | panic(bug64hit, !R4000_WAR ? r4kwar : nowar); | 167 | panic(bug64hit, !R4000_WAR ? r4kwar : nowar); |
168 | } | 168 | } |
169 | 169 | ||
170 | static volatile int daddi_ov __initdata = 0; | 170 | static volatile int daddi_ov __cpuinitdata = 0; |
171 | 171 | ||
172 | asmlinkage void __init do_daddi_ov(struct pt_regs *regs) | 172 | asmlinkage void __init do_daddi_ov(struct pt_regs *regs) |
173 | { | 173 | { |
@@ -239,7 +239,7 @@ static inline void check_daddi(void) | |||
239 | panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); | 239 | panic(bug64hit, !DADDI_WAR ? daddiwar : nowar); |
240 | } | 240 | } |
241 | 241 | ||
242 | int daddiu_bug __initdata = -1; | 242 | int daddiu_bug __cpuinitdata = -1; |
243 | 243 | ||
244 | static inline void check_daddiu(void) | 244 | static inline void check_daddiu(void) |
245 | { | 245 | { |
diff --git a/arch/mips/kernel/cpu-probe.c b/arch/mips/kernel/cpu-probe.c index 5861a432a52f..89c3304cb93c 100644 --- a/arch/mips/kernel/cpu-probe.c +++ b/arch/mips/kernel/cpu-probe.c | |||
@@ -550,7 +550,7 @@ static inline void cpu_probe_legacy(struct cpuinfo_mips *c) | |||
550 | } | 550 | } |
551 | } | 551 | } |
552 | 552 | ||
553 | static char unknown_isa[] __initdata = KERN_ERR \ | 553 | static char unknown_isa[] __cpuinitdata = KERN_ERR \ |
554 | "Unsupported ISA type, c0.config0: %d."; | 554 | "Unsupported ISA type, c0.config0: %d."; |
555 | 555 | ||
556 | static inline unsigned int decode_config0(struct cpuinfo_mips *c) | 556 | static inline unsigned int decode_config0(struct cpuinfo_mips *c) |
@@ -656,7 +656,7 @@ static inline unsigned int decode_config3(struct cpuinfo_mips *c) | |||
656 | return config3 & MIPS_CONF_M; | 656 | return config3 & MIPS_CONF_M; |
657 | } | 657 | } |
658 | 658 | ||
659 | static void __init decode_configs(struct cpuinfo_mips *c) | 659 | static void __cpuinit decode_configs(struct cpuinfo_mips *c) |
660 | { | 660 | { |
661 | /* MIPS32 or MIPS64 compliant CPU. */ | 661 | /* MIPS32 or MIPS64 compliant CPU. */ |
662 | c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER | | 662 | c->options = MIPS_CPU_4KEX | MIPS_CPU_4K_CACHE | MIPS_CPU_COUNTER | |
@@ -814,7 +814,7 @@ const char *__cpu_name[NR_CPUS]; | |||
814 | /* | 814 | /* |
815 | * Name a CPU | 815 | * Name a CPU |
816 | */ | 816 | */ |
817 | static __init const char *cpu_to_name(struct cpuinfo_mips *c) | 817 | static __cpuinit const char *cpu_to_name(struct cpuinfo_mips *c) |
818 | { | 818 | { |
819 | const char *name = NULL; | 819 | const char *name = NULL; |
820 | 820 | ||
@@ -896,7 +896,7 @@ static __init const char *cpu_to_name(struct cpuinfo_mips *c) | |||
896 | return name; | 896 | return name; |
897 | } | 897 | } |
898 | 898 | ||
899 | __init void cpu_probe(void) | 899 | __cpuinit void cpu_probe(void) |
900 | { | 900 | { |
901 | struct cpuinfo_mips *c = ¤t_cpu_data; | 901 | struct cpuinfo_mips *c = ¤t_cpu_data; |
902 | unsigned int cpu = smp_processor_id(); | 902 | unsigned int cpu = smp_processor_id(); |
@@ -959,7 +959,7 @@ __init void cpu_probe(void) | |||
959 | c->srsets = 1; | 959 | c->srsets = 1; |
960 | } | 960 | } |
961 | 961 | ||
962 | __init void cpu_report(void) | 962 | __cpuinit void cpu_report(void) |
963 | { | 963 | { |
964 | struct cpuinfo_mips *c = ¤t_cpu_data; | 964 | struct cpuinfo_mips *c = ¤t_cpu_data; |
965 | 965 | ||
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c index 0e2b5cd81f67..86e026f067bc 100644 --- a/arch/mips/kernel/csrc-r4k.c +++ b/arch/mips/kernel/csrc-r4k.c | |||
@@ -22,12 +22,17 @@ static struct clocksource clocksource_mips = { | |||
22 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 22 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
23 | }; | 23 | }; |
24 | 24 | ||
25 | void __init init_mips_clocksource(void) | 25 | int __init init_mips_clocksource(void) |
26 | { | 26 | { |
27 | if (!cpu_has_counter || !mips_hpt_frequency) | ||
28 | return -ENXIO; | ||
29 | |||
27 | /* Calclate a somewhat reasonable rating value */ | 30 | /* Calclate a somewhat reasonable rating value */ |
28 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | 31 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; |
29 | 32 | ||
30 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); | 33 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); |
31 | 34 | ||
32 | clocksource_register(&clocksource_mips); | 35 | clocksource_register(&clocksource_mips); |
36 | |||
37 | return 0; | ||
33 | } | 38 | } |
diff --git a/arch/mips/kernel/head.S b/arch/mips/kernel/head.S index a24fb7900901..361364501d34 100644 --- a/arch/mips/kernel/head.S +++ b/arch/mips/kernel/head.S | |||
@@ -195,7 +195,7 @@ NESTED(kernel_entry, 16, sp) # kernel entry point | |||
195 | j start_kernel | 195 | j start_kernel |
196 | END(kernel_entry) | 196 | END(kernel_entry) |
197 | 197 | ||
198 | __INIT | 198 | __CPUINIT |
199 | 199 | ||
200 | #ifdef CONFIG_SMP | 200 | #ifdef CONFIG_SMP |
201 | /* | 201 | /* |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index fcae66752972..984c0d0a7b4d 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -534,8 +534,7 @@ static int simulate_llsc(struct pt_regs *regs, unsigned int opcode) | |||
534 | 534 | ||
535 | /* | 535 | /* |
536 | * Simulate trapping 'rdhwr' instructions to provide user accessible | 536 | * Simulate trapping 'rdhwr' instructions to provide user accessible |
537 | * registers not implemented in hardware. The only current use of this | 537 | * registers not implemented in hardware. |
538 | * is the thread area pointer. | ||
539 | */ | 538 | */ |
540 | static int simulate_rdhwr(struct pt_regs *regs, unsigned int opcode) | 539 | static int simulate_rdhwr(struct pt_regs *regs, unsigned int opcode) |
541 | { | 540 | { |
@@ -545,11 +544,31 @@ static int simulate_rdhwr(struct pt_regs *regs, unsigned int opcode) | |||
545 | int rd = (opcode & RD) >> 11; | 544 | int rd = (opcode & RD) >> 11; |
546 | int rt = (opcode & RT) >> 16; | 545 | int rt = (opcode & RT) >> 16; |
547 | switch (rd) { | 546 | switch (rd) { |
548 | case 29: | 547 | case 0: /* CPU number */ |
549 | regs->regs[rt] = ti->tp_value; | 548 | regs->regs[rt] = smp_processor_id(); |
550 | return 0; | 549 | return 0; |
550 | case 1: /* SYNCI length */ | ||
551 | regs->regs[rt] = min(current_cpu_data.dcache.linesz, | ||
552 | current_cpu_data.icache.linesz); | ||
553 | return 0; | ||
554 | case 2: /* Read count register */ | ||
555 | regs->regs[rt] = read_c0_count(); | ||
556 | return 0; | ||
557 | case 3: /* Count register resolution */ | ||
558 | switch (current_cpu_data.cputype) { | ||
559 | case CPU_20KC: | ||
560 | case CPU_25KF: | ||
561 | regs->regs[rt] = 1; | ||
562 | break; | ||
551 | default: | 563 | default: |
552 | return -1; | 564 | regs->regs[rt] = 2; |
565 | } | ||
566 | return 0; | ||
567 | case 29: | ||
568 | regs->regs[rt] = ti->tp_value; | ||
569 | return 0; | ||
570 | default: | ||
571 | return -1; | ||
553 | } | 572 | } |
554 | } | 573 | } |
555 | 574 | ||
@@ -1287,7 +1306,7 @@ int cp0_compare_irq; | |||
1287 | int cp0_perfcount_irq; | 1306 | int cp0_perfcount_irq; |
1288 | EXPORT_SYMBOL_GPL(cp0_perfcount_irq); | 1307 | EXPORT_SYMBOL_GPL(cp0_perfcount_irq); |
1289 | 1308 | ||
1290 | void __init per_cpu_trap_init(void) | 1309 | void __cpuinit per_cpu_trap_init(void) |
1291 | { | 1310 | { |
1292 | unsigned int cpu = smp_processor_id(); | 1311 | unsigned int cpu = smp_processor_id(); |
1293 | unsigned int status_set = ST0_CU0; | 1312 | unsigned int status_set = ST0_CU0; |
@@ -1404,11 +1423,12 @@ void __init set_handler(unsigned long offset, void *addr, unsigned long size) | |||
1404 | flush_icache_range(ebase + offset, ebase + offset + size); | 1423 | flush_icache_range(ebase + offset, ebase + offset + size); |
1405 | } | 1424 | } |
1406 | 1425 | ||
1407 | static char panic_null_cerr[] __initdata = | 1426 | static char panic_null_cerr[] __cpuinitdata = |
1408 | "Trying to set NULL cache error exception handler"; | 1427 | "Trying to set NULL cache error exception handler"; |
1409 | 1428 | ||
1410 | /* Install uncached CPU exception handler */ | 1429 | /* Install uncached CPU exception handler */ |
1411 | void __init set_uncached_handler(unsigned long offset, void *addr, unsigned long size) | 1430 | void __cpuinit set_uncached_handler(unsigned long offset, void *addr, |
1431 | unsigned long size) | ||
1412 | { | 1432 | { |
1413 | #ifdef CONFIG_32BIT | 1433 | #ifdef CONFIG_32BIT |
1414 | unsigned long uncached_ebase = KSEG1ADDR(ebase); | 1434 | unsigned long uncached_ebase = KSEG1ADDR(ebase); |
diff --git a/arch/mips/lib/ucmpdi2.c b/arch/mips/lib/ucmpdi2.c index b33d8569bcb0..bb4cb2f828ea 100644 --- a/arch/mips/lib/ucmpdi2.c +++ b/arch/mips/lib/ucmpdi2.c | |||
@@ -17,3 +17,5 @@ word_type __ucmpdi2(unsigned long long a, unsigned long long b) | |||
17 | return 2; | 17 | return 2; |
18 | return 1; | 18 | return 1; |
19 | } | 19 | } |
20 | |||
21 | EXPORT_SYMBOL(__ucmpdi2); | ||
diff --git a/arch/mips/lib/uncached.c b/arch/mips/lib/uncached.c index 27b012d4341c..a6d1c77034d5 100644 --- a/arch/mips/lib/uncached.c +++ b/arch/mips/lib/uncached.c | |||
@@ -36,7 +36,7 @@ | |||
36 | * values, so we can avoid sharing the same stack area between a cached | 36 | * values, so we can avoid sharing the same stack area between a cached |
37 | * and the uncached mode. | 37 | * and the uncached mode. |
38 | */ | 38 | */ |
39 | unsigned long __init run_uncached(void *func) | 39 | unsigned long __cpuinit run_uncached(void *func) |
40 | { | 40 | { |
41 | register long sp __asm__("$sp"); | 41 | register long sp __asm__("$sp"); |
42 | register long ret __asm__("$2"); | 42 | register long ret __asm__("$2"); |
diff --git a/arch/mips/mips-boards/generic/time.c b/arch/mips/mips-boards/generic/time.c index f02ce6308e51..b50e0fc406ac 100644 --- a/arch/mips/mips-boards/generic/time.c +++ b/arch/mips/mips-boards/generic/time.c | |||
@@ -146,7 +146,7 @@ void __init plat_perf_setup(void) | |||
146 | } | 146 | } |
147 | } | 147 | } |
148 | 148 | ||
149 | unsigned int __init get_c0_compare_int(void) | 149 | unsigned int __cpuinit get_c0_compare_int(void) |
150 | { | 150 | { |
151 | #ifdef MSC01E_INT_BASE | 151 | #ifdef MSC01E_INT_BASE |
152 | if (cpu_has_veic) { | 152 | if (cpu_has_veic) { |
diff --git a/arch/mips/mipssim/sim_time.c b/arch/mips/mipssim/sim_time.c index e39bbe989da3..881ecbc1fa23 100644 --- a/arch/mips/mipssim/sim_time.c +++ b/arch/mips/mipssim/sim_time.c | |||
@@ -83,7 +83,7 @@ static void mips_timer_dispatch(void) | |||
83 | } | 83 | } |
84 | 84 | ||
85 | 85 | ||
86 | unsigned __init get_c0_compare_int(void) | 86 | unsigned __cpuinit get_c0_compare_int(void) |
87 | { | 87 | { |
88 | #ifdef MSC01E_INT_BASE | 88 | #ifdef MSC01E_INT_BASE |
89 | if (cpu_has_veic) { | 89 | if (cpu_has_veic) { |
diff --git a/arch/mips/mm/c-r3k.c b/arch/mips/mm/c-r3k.c index 562abb77d1d5..76935e320214 100644 --- a/arch/mips/mm/c-r3k.c +++ b/arch/mips/mm/c-r3k.c | |||
@@ -307,7 +307,7 @@ static void r3k_dma_cache_wback_inv(unsigned long start, unsigned long size) | |||
307 | r3k_flush_dcache_range(start, start + size); | 307 | r3k_flush_dcache_range(start, start + size); |
308 | } | 308 | } |
309 | 309 | ||
310 | void __init r3k_cache_init(void) | 310 | void __cpuinit r3k_cache_init(void) |
311 | { | 311 | { |
312 | extern void build_clear_page(void); | 312 | extern void build_clear_page(void); |
313 | extern void build_copy_page(void); | 313 | extern void build_copy_page(void); |
diff --git a/arch/mips/mm/c-r4k.c b/arch/mips/mm/c-r4k.c index 2c4f7e11f0d5..6496925b5e29 100644 --- a/arch/mips/mm/c-r4k.c +++ b/arch/mips/mm/c-r4k.c | |||
@@ -93,7 +93,7 @@ static inline void r4k_blast_dcache_page_dc32(unsigned long addr) | |||
93 | blast_dcache32_page(addr); | 93 | blast_dcache32_page(addr); |
94 | } | 94 | } |
95 | 95 | ||
96 | static void __init r4k_blast_dcache_page_setup(void) | 96 | static void __cpuinit r4k_blast_dcache_page_setup(void) |
97 | { | 97 | { |
98 | unsigned long dc_lsize = cpu_dcache_line_size(); | 98 | unsigned long dc_lsize = cpu_dcache_line_size(); |
99 | 99 | ||
@@ -107,7 +107,7 @@ static void __init r4k_blast_dcache_page_setup(void) | |||
107 | 107 | ||
108 | static void (* r4k_blast_dcache_page_indexed)(unsigned long addr); | 108 | static void (* r4k_blast_dcache_page_indexed)(unsigned long addr); |
109 | 109 | ||
110 | static void __init r4k_blast_dcache_page_indexed_setup(void) | 110 | static void __cpuinit r4k_blast_dcache_page_indexed_setup(void) |
111 | { | 111 | { |
112 | unsigned long dc_lsize = cpu_dcache_line_size(); | 112 | unsigned long dc_lsize = cpu_dcache_line_size(); |
113 | 113 | ||
@@ -121,7 +121,7 @@ static void __init r4k_blast_dcache_page_indexed_setup(void) | |||
121 | 121 | ||
122 | static void (* r4k_blast_dcache)(void); | 122 | static void (* r4k_blast_dcache)(void); |
123 | 123 | ||
124 | static void __init r4k_blast_dcache_setup(void) | 124 | static void __cpuinit r4k_blast_dcache_setup(void) |
125 | { | 125 | { |
126 | unsigned long dc_lsize = cpu_dcache_line_size(); | 126 | unsigned long dc_lsize = cpu_dcache_line_size(); |
127 | 127 | ||
@@ -206,7 +206,7 @@ static inline void tx49_blast_icache32_page_indexed(unsigned long page) | |||
206 | 206 | ||
207 | static void (* r4k_blast_icache_page)(unsigned long addr); | 207 | static void (* r4k_blast_icache_page)(unsigned long addr); |
208 | 208 | ||
209 | static void __init r4k_blast_icache_page_setup(void) | 209 | static void __cpuinit r4k_blast_icache_page_setup(void) |
210 | { | 210 | { |
211 | unsigned long ic_lsize = cpu_icache_line_size(); | 211 | unsigned long ic_lsize = cpu_icache_line_size(); |
212 | 212 | ||
@@ -223,7 +223,7 @@ static void __init r4k_blast_icache_page_setup(void) | |||
223 | 223 | ||
224 | static void (* r4k_blast_icache_page_indexed)(unsigned long addr); | 224 | static void (* r4k_blast_icache_page_indexed)(unsigned long addr); |
225 | 225 | ||
226 | static void __init r4k_blast_icache_page_indexed_setup(void) | 226 | static void __cpuinit r4k_blast_icache_page_indexed_setup(void) |
227 | { | 227 | { |
228 | unsigned long ic_lsize = cpu_icache_line_size(); | 228 | unsigned long ic_lsize = cpu_icache_line_size(); |
229 | 229 | ||
@@ -247,7 +247,7 @@ static void __init r4k_blast_icache_page_indexed_setup(void) | |||
247 | 247 | ||
248 | static void (* r4k_blast_icache)(void); | 248 | static void (* r4k_blast_icache)(void); |
249 | 249 | ||
250 | static void __init r4k_blast_icache_setup(void) | 250 | static void __cpuinit r4k_blast_icache_setup(void) |
251 | { | 251 | { |
252 | unsigned long ic_lsize = cpu_icache_line_size(); | 252 | unsigned long ic_lsize = cpu_icache_line_size(); |
253 | 253 | ||
@@ -268,7 +268,7 @@ static void __init r4k_blast_icache_setup(void) | |||
268 | 268 | ||
269 | static void (* r4k_blast_scache_page)(unsigned long addr); | 269 | static void (* r4k_blast_scache_page)(unsigned long addr); |
270 | 270 | ||
271 | static void __init r4k_blast_scache_page_setup(void) | 271 | static void __cpuinit r4k_blast_scache_page_setup(void) |
272 | { | 272 | { |
273 | unsigned long sc_lsize = cpu_scache_line_size(); | 273 | unsigned long sc_lsize = cpu_scache_line_size(); |
274 | 274 | ||
@@ -286,7 +286,7 @@ static void __init r4k_blast_scache_page_setup(void) | |||
286 | 286 | ||
287 | static void (* r4k_blast_scache_page_indexed)(unsigned long addr); | 287 | static void (* r4k_blast_scache_page_indexed)(unsigned long addr); |
288 | 288 | ||
289 | static void __init r4k_blast_scache_page_indexed_setup(void) | 289 | static void __cpuinit r4k_blast_scache_page_indexed_setup(void) |
290 | { | 290 | { |
291 | unsigned long sc_lsize = cpu_scache_line_size(); | 291 | unsigned long sc_lsize = cpu_scache_line_size(); |
292 | 292 | ||
@@ -304,7 +304,7 @@ static void __init r4k_blast_scache_page_indexed_setup(void) | |||
304 | 304 | ||
305 | static void (* r4k_blast_scache)(void); | 305 | static void (* r4k_blast_scache)(void); |
306 | 306 | ||
307 | static void __init r4k_blast_scache_setup(void) | 307 | static void __cpuinit r4k_blast_scache_setup(void) |
308 | { | 308 | { |
309 | unsigned long sc_lsize = cpu_scache_line_size(); | 309 | unsigned long sc_lsize = cpu_scache_line_size(); |
310 | 310 | ||
@@ -691,11 +691,11 @@ static inline void rm7k_erratum31(void) | |||
691 | } | 691 | } |
692 | } | 692 | } |
693 | 693 | ||
694 | static char *way_string[] __initdata = { NULL, "direct mapped", "2-way", | 694 | static char *way_string[] __cpuinitdata = { NULL, "direct mapped", "2-way", |
695 | "3-way", "4-way", "5-way", "6-way", "7-way", "8-way" | 695 | "3-way", "4-way", "5-way", "6-way", "7-way", "8-way" |
696 | }; | 696 | }; |
697 | 697 | ||
698 | static void __init probe_pcache(void) | 698 | static void __cpuinit probe_pcache(void) |
699 | { | 699 | { |
700 | struct cpuinfo_mips *c = ¤t_cpu_data; | 700 | struct cpuinfo_mips *c = ¤t_cpu_data; |
701 | unsigned int config = read_c0_config(); | 701 | unsigned int config = read_c0_config(); |
@@ -1016,7 +1016,7 @@ static void __init probe_pcache(void) | |||
1016 | * executes in KSEG1 space or else you will crash and burn badly. You have | 1016 | * executes in KSEG1 space or else you will crash and burn badly. You have |
1017 | * been warned. | 1017 | * been warned. |
1018 | */ | 1018 | */ |
1019 | static int __init probe_scache(void) | 1019 | static int __cpuinit probe_scache(void) |
1020 | { | 1020 | { |
1021 | unsigned long flags, addr, begin, end, pow2; | 1021 | unsigned long flags, addr, begin, end, pow2; |
1022 | unsigned int config = read_c0_config(); | 1022 | unsigned int config = read_c0_config(); |
@@ -1095,7 +1095,7 @@ extern int r5k_sc_init(void); | |||
1095 | extern int rm7k_sc_init(void); | 1095 | extern int rm7k_sc_init(void); |
1096 | extern int mips_sc_init(void); | 1096 | extern int mips_sc_init(void); |
1097 | 1097 | ||
1098 | static void __init setup_scache(void) | 1098 | static void __cpuinit setup_scache(void) |
1099 | { | 1099 | { |
1100 | struct cpuinfo_mips *c = ¤t_cpu_data; | 1100 | struct cpuinfo_mips *c = ¤t_cpu_data; |
1101 | unsigned int config = read_c0_config(); | 1101 | unsigned int config = read_c0_config(); |
@@ -1206,7 +1206,7 @@ void au1x00_fixup_config_od(void) | |||
1206 | } | 1206 | } |
1207 | } | 1207 | } |
1208 | 1208 | ||
1209 | static void __init coherency_setup(void) | 1209 | static void __cpuinit coherency_setup(void) |
1210 | { | 1210 | { |
1211 | change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); | 1211 | change_c0_config(CONF_CM_CMASK, CONF_CM_DEFAULT); |
1212 | 1212 | ||
@@ -1238,7 +1238,7 @@ static void __init coherency_setup(void) | |||
1238 | } | 1238 | } |
1239 | } | 1239 | } |
1240 | 1240 | ||
1241 | void __init r4k_cache_init(void) | 1241 | void __cpuinit r4k_cache_init(void) |
1242 | { | 1242 | { |
1243 | extern void build_clear_page(void); | 1243 | extern void build_clear_page(void); |
1244 | extern void build_copy_page(void); | 1244 | extern void build_copy_page(void); |
diff --git a/arch/mips/mm/c-tx39.c b/arch/mips/mm/c-tx39.c index 9ea121e8cdce..b09d56981d53 100644 --- a/arch/mips/mm/c-tx39.c +++ b/arch/mips/mm/c-tx39.c | |||
@@ -329,7 +329,7 @@ static __init void tx39_probe_cache(void) | |||
329 | } | 329 | } |
330 | } | 330 | } |
331 | 331 | ||
332 | void __init tx39_cache_init(void) | 332 | void __cpuinit tx39_cache_init(void) |
333 | { | 333 | { |
334 | extern void build_clear_page(void); | 334 | extern void build_clear_page(void); |
335 | extern void build_copy_page(void); | 335 | extern void build_copy_page(void); |
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c index 6a24651971df..51ab1faa027d 100644 --- a/arch/mips/mm/cache.c +++ b/arch/mips/mm/cache.c | |||
@@ -127,9 +127,10 @@ void __update_cache(struct vm_area_struct *vma, unsigned long address, | |||
127 | } | 127 | } |
128 | } | 128 | } |
129 | 129 | ||
130 | static char cache_panic[] __initdata = "Yeee, unsupported cache architecture."; | 130 | static char cache_panic[] __cpuinitdata = |
131 | "Yeee, unsupported cache architecture."; | ||
131 | 132 | ||
132 | void __init cpu_cache_init(void) | 133 | void __devinit cpu_cache_init(void) |
133 | { | 134 | { |
134 | if (cpu_has_3k_cache) { | 135 | if (cpu_has_3k_cache) { |
135 | extern void __weak r3k_cache_init(void); | 136 | extern void __weak r3k_cache_init(void); |
diff --git a/arch/mips/mm/cex-sb1.S b/arch/mips/mm/cex-sb1.S index e54a62f2807c..2d08268bb705 100644 --- a/arch/mips/mm/cex-sb1.S +++ b/arch/mips/mm/cex-sb1.S | |||
@@ -34,8 +34,6 @@ | |||
34 | * is changed. | 34 | * is changed. |
35 | */ | 35 | */ |
36 | 36 | ||
37 | __INIT | ||
38 | |||
39 | .set mips64 | 37 | .set mips64 |
40 | .set noreorder | 38 | .set noreorder |
41 | .set noat | 39 | .set noat |
@@ -51,6 +49,8 @@ | |||
51 | * (0x170-0x17f) are used to preserve k0, k1, and ra. | 49 | * (0x170-0x17f) are used to preserve k0, k1, and ra. |
52 | */ | 50 | */ |
53 | 51 | ||
52 | __CPUINIT | ||
53 | |||
54 | LEAF(except_vec2_sb1) | 54 | LEAF(except_vec2_sb1) |
55 | /* | 55 | /* |
56 | * If this error is recoverable, we need to exit the handler | 56 | * If this error is recoverable, we need to exit the handler |
diff --git a/arch/mips/mm/pg-r4k.c b/arch/mips/mm/pg-r4k.c index 9185fbf37c0d..455dedb5b39e 100644 --- a/arch/mips/mm/pg-r4k.c +++ b/arch/mips/mm/pg-r4k.c | |||
@@ -66,21 +66,21 @@ EXPORT_SYMBOL(copy_page); | |||
66 | * with 64-bit kernels. The prefetch offsets have been experimentally tuned | 66 | * with 64-bit kernels. The prefetch offsets have been experimentally tuned |
67 | * an Origin 200. | 67 | * an Origin 200. |
68 | */ | 68 | */ |
69 | static int pref_offset_clear __initdata = 512; | 69 | static int pref_offset_clear __cpuinitdata = 512; |
70 | static int pref_offset_copy __initdata = 256; | 70 | static int pref_offset_copy __cpuinitdata = 256; |
71 | 71 | ||
72 | static unsigned int pref_src_mode __initdata; | 72 | static unsigned int pref_src_mode __cpuinitdata; |
73 | static unsigned int pref_dst_mode __initdata; | 73 | static unsigned int pref_dst_mode __cpuinitdata; |
74 | 74 | ||
75 | static int load_offset __initdata; | 75 | static int load_offset __cpuinitdata; |
76 | static int store_offset __initdata; | 76 | static int store_offset __cpuinitdata; |
77 | 77 | ||
78 | static unsigned int __initdata *dest, *epc; | 78 | static unsigned int __cpuinitdata *dest, *epc; |
79 | 79 | ||
80 | static unsigned int instruction_pending; | 80 | static unsigned int instruction_pending; |
81 | static union mips_instruction delayed_mi; | 81 | static union mips_instruction delayed_mi; |
82 | 82 | ||
83 | static void __init emit_instruction(union mips_instruction mi) | 83 | static void __cpuinit emit_instruction(union mips_instruction mi) |
84 | { | 84 | { |
85 | if (instruction_pending) | 85 | if (instruction_pending) |
86 | *epc++ = delayed_mi.word; | 86 | *epc++ = delayed_mi.word; |
@@ -222,7 +222,7 @@ static inline void build_cdex_p(void) | |||
222 | emit_instruction(mi); | 222 | emit_instruction(mi); |
223 | } | 223 | } |
224 | 224 | ||
225 | static void __init __build_store_reg(int reg) | 225 | static void __cpuinit __build_store_reg(int reg) |
226 | { | 226 | { |
227 | union mips_instruction mi; | 227 | union mips_instruction mi; |
228 | unsigned int width; | 228 | unsigned int width; |
@@ -339,7 +339,7 @@ static inline void build_jr_ra(void) | |||
339 | flush_delay_slot_or_nop(); | 339 | flush_delay_slot_or_nop(); |
340 | } | 340 | } |
341 | 341 | ||
342 | void __init build_clear_page(void) | 342 | void __cpuinit build_clear_page(void) |
343 | { | 343 | { |
344 | unsigned int loop_start; | 344 | unsigned int loop_start; |
345 | unsigned long off; | 345 | unsigned long off; |
@@ -442,7 +442,7 @@ dest = label(); | |||
442 | pr_debug("\t.set pop\n"); | 442 | pr_debug("\t.set pop\n"); |
443 | } | 443 | } |
444 | 444 | ||
445 | void __init build_copy_page(void) | 445 | void __cpuinit build_copy_page(void) |
446 | { | 446 | { |
447 | unsigned int loop_start; | 447 | unsigned int loop_start; |
448 | unsigned long off; | 448 | unsigned long off; |
diff --git a/arch/mips/mm/pg-sb1.c b/arch/mips/mm/pg-sb1.c index 89925ec57d6a..49e289d05414 100644 --- a/arch/mips/mm/pg-sb1.c +++ b/arch/mips/mm/pg-sb1.c | |||
@@ -293,10 +293,10 @@ void copy_page(void *to, void *from) | |||
293 | EXPORT_SYMBOL(clear_page); | 293 | EXPORT_SYMBOL(clear_page); |
294 | EXPORT_SYMBOL(copy_page); | 294 | EXPORT_SYMBOL(copy_page); |
295 | 295 | ||
296 | void __init build_clear_page(void) | 296 | void __cpuinit build_clear_page(void) |
297 | { | 297 | { |
298 | } | 298 | } |
299 | 299 | ||
300 | void __init build_copy_page(void) | 300 | void __cpuinit build_copy_page(void) |
301 | { | 301 | { |
302 | } | 302 | } |
diff --git a/arch/mips/mm/sc-ip22.c b/arch/mips/mm/sc-ip22.c index d236cf8b7374..1f602a110e10 100644 --- a/arch/mips/mm/sc-ip22.c +++ b/arch/mips/mm/sc-ip22.c | |||
@@ -168,7 +168,7 @@ struct bcache_ops indy_sc_ops = { | |||
168 | .bc_inv = indy_sc_wback_invalidate | 168 | .bc_inv = indy_sc_wback_invalidate |
169 | }; | 169 | }; |
170 | 170 | ||
171 | void __init indy_sc_init(void) | 171 | void __cpuinit indy_sc_init(void) |
172 | { | 172 | { |
173 | if (indy_sc_probe()) { | 173 | if (indy_sc_probe()) { |
174 | indy_sc_enable(); | 174 | indy_sc_enable(); |
diff --git a/arch/mips/mm/sc-mips.c b/arch/mips/mm/sc-mips.c index c13170bc675c..b55c2d1b998f 100644 --- a/arch/mips/mm/sc-mips.c +++ b/arch/mips/mm/sc-mips.c | |||
@@ -100,7 +100,7 @@ static inline int __init mips_sc_probe(void) | |||
100 | return 1; | 100 | return 1; |
101 | } | 101 | } |
102 | 102 | ||
103 | int __init mips_sc_init(void) | 103 | int __cpuinit mips_sc_init(void) |
104 | { | 104 | { |
105 | int found = mips_sc_probe(); | 105 | int found = mips_sc_probe(); |
106 | if (found) { | 106 | if (found) { |
@@ -109,4 +109,3 @@ int __init mips_sc_init(void) | |||
109 | } | 109 | } |
110 | return found; | 110 | return found; |
111 | } | 111 | } |
112 | |||
diff --git a/arch/mips/mm/sc-r5k.c b/arch/mips/mm/sc-r5k.c index d35b6c1103a3..f330d38e5575 100644 --- a/arch/mips/mm/sc-r5k.c +++ b/arch/mips/mm/sc-r5k.c | |||
@@ -99,7 +99,7 @@ static struct bcache_ops r5k_sc_ops = { | |||
99 | .bc_inv = r5k_dma_cache_inv_sc | 99 | .bc_inv = r5k_dma_cache_inv_sc |
100 | }; | 100 | }; |
101 | 101 | ||
102 | void __init r5k_sc_init(void) | 102 | void __cpuinit r5k_sc_init(void) |
103 | { | 103 | { |
104 | if (r5k_sc_probe()) { | 104 | if (r5k_sc_probe()) { |
105 | r5k_sc_enable(); | 105 | r5k_sc_enable(); |
diff --git a/arch/mips/mm/sc-rm7k.c b/arch/mips/mm/sc-rm7k.c index 31ec73052423..fc227f3b1199 100644 --- a/arch/mips/mm/sc-rm7k.c +++ b/arch/mips/mm/sc-rm7k.c | |||
@@ -128,7 +128,7 @@ struct bcache_ops rm7k_sc_ops = { | |||
128 | .bc_inv = rm7k_sc_inv | 128 | .bc_inv = rm7k_sc_inv |
129 | }; | 129 | }; |
130 | 130 | ||
131 | void __init rm7k_sc_init(void) | 131 | void __cpuinit rm7k_sc_init(void) |
132 | { | 132 | { |
133 | struct cpuinfo_mips *c = ¤t_cpu_data; | 133 | struct cpuinfo_mips *c = ¤t_cpu_data; |
134 | unsigned int config = read_c0_config(); | 134 | unsigned int config = read_c0_config(); |
diff --git a/arch/mips/mm/tlb-r3k.c b/arch/mips/mm/tlb-r3k.c index 7948e9a5e372..a782549ac80e 100644 --- a/arch/mips/mm/tlb-r3k.c +++ b/arch/mips/mm/tlb-r3k.c | |||
@@ -281,7 +281,7 @@ void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
281 | } | 281 | } |
282 | } | 282 | } |
283 | 283 | ||
284 | void __init tlb_init(void) | 284 | void __cpuinit tlb_init(void) |
285 | { | 285 | { |
286 | local_flush_tlb_all(); | 286 | local_flush_tlb_all(); |
287 | 287 | ||
diff --git a/arch/mips/mm/tlb-r4k.c b/arch/mips/mm/tlb-r4k.c index 74ae0348cc92..63065d6e8063 100644 --- a/arch/mips/mm/tlb-r4k.c +++ b/arch/mips/mm/tlb-r4k.c | |||
@@ -388,7 +388,7 @@ void __init add_wired_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
388 | * lifetime of the system | 388 | * lifetime of the system |
389 | */ | 389 | */ |
390 | 390 | ||
391 | static int temp_tlb_entry __initdata; | 391 | static int temp_tlb_entry __cpuinitdata; |
392 | 392 | ||
393 | __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, | 393 | __init int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, |
394 | unsigned long entryhi, unsigned long pagemask) | 394 | unsigned long entryhi, unsigned long pagemask) |
@@ -427,7 +427,7 @@ out: | |||
427 | return ret; | 427 | return ret; |
428 | } | 428 | } |
429 | 429 | ||
430 | static void __init probe_tlb(unsigned long config) | 430 | static void __cpuinit probe_tlb(unsigned long config) |
431 | { | 431 | { |
432 | struct cpuinfo_mips *c = ¤t_cpu_data; | 432 | struct cpuinfo_mips *c = ¤t_cpu_data; |
433 | unsigned int reg; | 433 | unsigned int reg; |
@@ -455,7 +455,7 @@ static void __init probe_tlb(unsigned long config) | |||
455 | c->tlbsize = ((reg >> 25) & 0x3f) + 1; | 455 | c->tlbsize = ((reg >> 25) & 0x3f) + 1; |
456 | } | 456 | } |
457 | 457 | ||
458 | static int __initdata ntlb = 0; | 458 | static int __cpuinitdata ntlb = 0; |
459 | static int __init set_ntlb(char *str) | 459 | static int __init set_ntlb(char *str) |
460 | { | 460 | { |
461 | get_option(&str, &ntlb); | 461 | get_option(&str, &ntlb); |
@@ -464,7 +464,7 @@ static int __init set_ntlb(char *str) | |||
464 | 464 | ||
465 | __setup("ntlb=", set_ntlb); | 465 | __setup("ntlb=", set_ntlb); |
466 | 466 | ||
467 | void __init tlb_init(void) | 467 | void __cpuinit tlb_init(void) |
468 | { | 468 | { |
469 | unsigned int config = read_c0_config(); | 469 | unsigned int config = read_c0_config(); |
470 | 470 | ||
@@ -473,7 +473,7 @@ void __init tlb_init(void) | |||
473 | * - On R4600 1.7 the tlbp never hits for pages smaller than | 473 | * - On R4600 1.7 the tlbp never hits for pages smaller than |
474 | * the value in the c0_pagemask register. | 474 | * the value in the c0_pagemask register. |
475 | * - The entire mm handling assumes the c0_pagemask register to | 475 | * - The entire mm handling assumes the c0_pagemask register to |
476 | * be set for 4kb pages. | 476 | * be set to fixed-size pages. |
477 | */ | 477 | */ |
478 | probe_tlb(config); | 478 | probe_tlb(config); |
479 | write_c0_pagemask(PM_DEFAULT_MASK); | 479 | write_c0_pagemask(PM_DEFAULT_MASK); |
diff --git a/arch/mips/mm/tlb-r8k.c b/arch/mips/mm/tlb-r8k.c index bd8409d8ff62..4f01a3be215c 100644 --- a/arch/mips/mm/tlb-r8k.c +++ b/arch/mips/mm/tlb-r8k.c | |||
@@ -214,14 +214,14 @@ void __update_tlb(struct vm_area_struct * vma, unsigned long address, pte_t pte) | |||
214 | local_irq_restore(flags); | 214 | local_irq_restore(flags); |
215 | } | 215 | } |
216 | 216 | ||
217 | static void __init probe_tlb(unsigned long config) | 217 | static void __cpuinit probe_tlb(unsigned long config) |
218 | { | 218 | { |
219 | struct cpuinfo_mips *c = ¤t_cpu_data; | 219 | struct cpuinfo_mips *c = ¤t_cpu_data; |
220 | 220 | ||
221 | c->tlbsize = 3 * 128; /* 3 sets each 128 entries */ | 221 | c->tlbsize = 3 * 128; /* 3 sets each 128 entries */ |
222 | } | 222 | } |
223 | 223 | ||
224 | void __init tlb_init(void) | 224 | void __cpuinit tlb_init(void) |
225 | { | 225 | { |
226 | unsigned int config = read_c0_config(); | 226 | unsigned int config = read_c0_config(); |
227 | unsigned long status; | 227 | unsigned long status; |
diff --git a/arch/mips/mm/tlbex.c b/arch/mips/mm/tlbex.c index 218a6cc415e8..3a93d4ce2703 100644 --- a/arch/mips/mm/tlbex.c +++ b/arch/mips/mm/tlbex.c | |||
@@ -60,7 +60,7 @@ static inline int __maybe_unused r10000_llsc_war(void) | |||
60 | * why; it's not an issue caused by the core RTL. | 60 | * why; it's not an issue caused by the core RTL. |
61 | * | 61 | * |
62 | */ | 62 | */ |
63 | static int __init m4kc_tlbp_war(void) | 63 | static int __cpuinit m4kc_tlbp_war(void) |
64 | { | 64 | { |
65 | return (current_cpu_data.processor_id & 0xffff00) == | 65 | return (current_cpu_data.processor_id & 0xffff00) == |
66 | (PRID_COMP_MIPS | PRID_IMP_4KC); | 66 | (PRID_COMP_MIPS | PRID_IMP_4KC); |
@@ -144,16 +144,16 @@ static inline void dump_handler(const u32 *handler, int count) | |||
144 | * We deliberately chose a buffer size of 128, so we won't scribble | 144 | * We deliberately chose a buffer size of 128, so we won't scribble |
145 | * over anything important on overflow before we panic. | 145 | * over anything important on overflow before we panic. |
146 | */ | 146 | */ |
147 | static u32 tlb_handler[128] __initdata; | 147 | static u32 tlb_handler[128] __cpuinitdata; |
148 | 148 | ||
149 | /* simply assume worst case size for labels and relocs */ | 149 | /* simply assume worst case size for labels and relocs */ |
150 | static struct uasm_label labels[128] __initdata; | 150 | static struct uasm_label labels[128] __cpuinitdata; |
151 | static struct uasm_reloc relocs[128] __initdata; | 151 | static struct uasm_reloc relocs[128] __cpuinitdata; |
152 | 152 | ||
153 | /* | 153 | /* |
154 | * The R3000 TLB handler is simple. | 154 | * The R3000 TLB handler is simple. |
155 | */ | 155 | */ |
156 | static void __init build_r3000_tlb_refill_handler(void) | 156 | static void __cpuinit build_r3000_tlb_refill_handler(void) |
157 | { | 157 | { |
158 | long pgdc = (long)pgd_current; | 158 | long pgdc = (long)pgd_current; |
159 | u32 *p; | 159 | u32 *p; |
@@ -197,7 +197,7 @@ static void __init build_r3000_tlb_refill_handler(void) | |||
197 | * other one.To keep things simple, we first assume linear space, | 197 | * other one.To keep things simple, we first assume linear space, |
198 | * then we relocate it to the final handler layout as needed. | 198 | * then we relocate it to the final handler layout as needed. |
199 | */ | 199 | */ |
200 | static u32 final_handler[64] __initdata; | 200 | static u32 final_handler[64] __cpuinitdata; |
201 | 201 | ||
202 | /* | 202 | /* |
203 | * Hazards | 203 | * Hazards |
@@ -221,7 +221,7 @@ static u32 final_handler[64] __initdata; | |||
221 | * | 221 | * |
222 | * As if we MIPS hackers wouldn't know how to nop pipelines happy ... | 222 | * As if we MIPS hackers wouldn't know how to nop pipelines happy ... |
223 | */ | 223 | */ |
224 | static void __init __maybe_unused build_tlb_probe_entry(u32 **p) | 224 | static void __cpuinit __maybe_unused build_tlb_probe_entry(u32 **p) |
225 | { | 225 | { |
226 | switch (current_cpu_type()) { | 226 | switch (current_cpu_type()) { |
227 | /* Found by experiment: R4600 v2.0 needs this, too. */ | 227 | /* Found by experiment: R4600 v2.0 needs this, too. */ |
@@ -245,7 +245,7 @@ static void __init __maybe_unused build_tlb_probe_entry(u32 **p) | |||
245 | */ | 245 | */ |
246 | enum tlb_write_entry { tlb_random, tlb_indexed }; | 246 | enum tlb_write_entry { tlb_random, tlb_indexed }; |
247 | 247 | ||
248 | static void __init build_tlb_write_entry(u32 **p, struct uasm_label **l, | 248 | static void __cpuinit build_tlb_write_entry(u32 **p, struct uasm_label **l, |
249 | struct uasm_reloc **r, | 249 | struct uasm_reloc **r, |
250 | enum tlb_write_entry wmode) | 250 | enum tlb_write_entry wmode) |
251 | { | 251 | { |
@@ -389,7 +389,7 @@ static void __init build_tlb_write_entry(u32 **p, struct uasm_label **l, | |||
389 | * TMP and PTR are scratch. | 389 | * TMP and PTR are scratch. |
390 | * TMP will be clobbered, PTR will hold the pmd entry. | 390 | * TMP will be clobbered, PTR will hold the pmd entry. |
391 | */ | 391 | */ |
392 | static void __init | 392 | static void __cpuinit |
393 | build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | 393 | build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, |
394 | unsigned int tmp, unsigned int ptr) | 394 | unsigned int tmp, unsigned int ptr) |
395 | { | 395 | { |
@@ -450,7 +450,7 @@ build_get_pmde64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
450 | * BVADDR is the faulting address, PTR is scratch. | 450 | * BVADDR is the faulting address, PTR is scratch. |
451 | * PTR will hold the pgd for vmalloc. | 451 | * PTR will hold the pgd for vmalloc. |
452 | */ | 452 | */ |
453 | static void __init | 453 | static void __cpuinit |
454 | build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | 454 | build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, |
455 | unsigned int bvaddr, unsigned int ptr) | 455 | unsigned int bvaddr, unsigned int ptr) |
456 | { | 456 | { |
@@ -522,7 +522,7 @@ build_get_pgd_vmalloc64(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
522 | * TMP and PTR are scratch. | 522 | * TMP and PTR are scratch. |
523 | * TMP will be clobbered, PTR will hold the pgd entry. | 523 | * TMP will be clobbered, PTR will hold the pgd entry. |
524 | */ | 524 | */ |
525 | static void __init __maybe_unused | 525 | static void __cpuinit __maybe_unused |
526 | build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) | 526 | build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) |
527 | { | 527 | { |
528 | long pgdc = (long)pgd_current; | 528 | long pgdc = (long)pgd_current; |
@@ -557,7 +557,7 @@ build_get_pgde32(u32 **p, unsigned int tmp, unsigned int ptr) | |||
557 | 557 | ||
558 | #endif /* !CONFIG_64BIT */ | 558 | #endif /* !CONFIG_64BIT */ |
559 | 559 | ||
560 | static void __init build_adjust_context(u32 **p, unsigned int ctx) | 560 | static void __cpuinit build_adjust_context(u32 **p, unsigned int ctx) |
561 | { | 561 | { |
562 | unsigned int shift = 4 - (PTE_T_LOG2 + 1) + PAGE_SHIFT - 12; | 562 | unsigned int shift = 4 - (PTE_T_LOG2 + 1) + PAGE_SHIFT - 12; |
563 | unsigned int mask = (PTRS_PER_PTE / 2 - 1) << (PTE_T_LOG2 + 1); | 563 | unsigned int mask = (PTRS_PER_PTE / 2 - 1) << (PTE_T_LOG2 + 1); |
@@ -583,7 +583,7 @@ static void __init build_adjust_context(u32 **p, unsigned int ctx) | |||
583 | uasm_i_andi(p, ctx, ctx, mask); | 583 | uasm_i_andi(p, ctx, ctx, mask); |
584 | } | 584 | } |
585 | 585 | ||
586 | static void __init build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) | 586 | static void __cpuinit build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) |
587 | { | 587 | { |
588 | /* | 588 | /* |
589 | * Bug workaround for the Nevada. It seems as if under certain | 589 | * Bug workaround for the Nevada. It seems as if under certain |
@@ -608,7 +608,7 @@ static void __init build_get_ptep(u32 **p, unsigned int tmp, unsigned int ptr) | |||
608 | UASM_i_ADDU(p, ptr, ptr, tmp); /* add in offset */ | 608 | UASM_i_ADDU(p, ptr, ptr, tmp); /* add in offset */ |
609 | } | 609 | } |
610 | 610 | ||
611 | static void __init build_update_entries(u32 **p, unsigned int tmp, | 611 | static void __cpuinit build_update_entries(u32 **p, unsigned int tmp, |
612 | unsigned int ptep) | 612 | unsigned int ptep) |
613 | { | 613 | { |
614 | /* | 614 | /* |
@@ -651,7 +651,7 @@ static void __init build_update_entries(u32 **p, unsigned int tmp, | |||
651 | #endif | 651 | #endif |
652 | } | 652 | } |
653 | 653 | ||
654 | static void __init build_r4000_tlb_refill_handler(void) | 654 | static void __cpuinit build_r4000_tlb_refill_handler(void) |
655 | { | 655 | { |
656 | u32 *p = tlb_handler; | 656 | u32 *p = tlb_handler; |
657 | struct uasm_label *l = labels; | 657 | struct uasm_label *l = labels; |
@@ -783,7 +783,7 @@ u32 handle_tlbl[FASTPATH_SIZE] __cacheline_aligned; | |||
783 | u32 handle_tlbs[FASTPATH_SIZE] __cacheline_aligned; | 783 | u32 handle_tlbs[FASTPATH_SIZE] __cacheline_aligned; |
784 | u32 handle_tlbm[FASTPATH_SIZE] __cacheline_aligned; | 784 | u32 handle_tlbm[FASTPATH_SIZE] __cacheline_aligned; |
785 | 785 | ||
786 | static void __init | 786 | static void __cpuinit |
787 | iPTE_LW(u32 **p, struct uasm_label **l, unsigned int pte, unsigned int ptr) | 787 | iPTE_LW(u32 **p, struct uasm_label **l, unsigned int pte, unsigned int ptr) |
788 | { | 788 | { |
789 | #ifdef CONFIG_SMP | 789 | #ifdef CONFIG_SMP |
@@ -803,7 +803,7 @@ iPTE_LW(u32 **p, struct uasm_label **l, unsigned int pte, unsigned int ptr) | |||
803 | #endif | 803 | #endif |
804 | } | 804 | } |
805 | 805 | ||
806 | static void __init | 806 | static void __cpuinit |
807 | iPTE_SW(u32 **p, struct uasm_reloc **r, unsigned int pte, unsigned int ptr, | 807 | iPTE_SW(u32 **p, struct uasm_reloc **r, unsigned int pte, unsigned int ptr, |
808 | unsigned int mode) | 808 | unsigned int mode) |
809 | { | 809 | { |
@@ -863,7 +863,7 @@ iPTE_SW(u32 **p, struct uasm_reloc **r, unsigned int pte, unsigned int ptr, | |||
863 | * the page table where this PTE is located, PTE will be re-loaded | 863 | * the page table where this PTE is located, PTE will be re-loaded |
864 | * with it's original value. | 864 | * with it's original value. |
865 | */ | 865 | */ |
866 | static void __init | 866 | static void __cpuinit |
867 | build_pte_present(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | 867 | build_pte_present(u32 **p, struct uasm_label **l, struct uasm_reloc **r, |
868 | unsigned int pte, unsigned int ptr, enum label_id lid) | 868 | unsigned int pte, unsigned int ptr, enum label_id lid) |
869 | { | 869 | { |
@@ -874,7 +874,7 @@ build_pte_present(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
874 | } | 874 | } |
875 | 875 | ||
876 | /* Make PTE valid, store result in PTR. */ | 876 | /* Make PTE valid, store result in PTR. */ |
877 | static void __init | 877 | static void __cpuinit |
878 | build_make_valid(u32 **p, struct uasm_reloc **r, unsigned int pte, | 878 | build_make_valid(u32 **p, struct uasm_reloc **r, unsigned int pte, |
879 | unsigned int ptr) | 879 | unsigned int ptr) |
880 | { | 880 | { |
@@ -887,7 +887,7 @@ build_make_valid(u32 **p, struct uasm_reloc **r, unsigned int pte, | |||
887 | * Check if PTE can be written to, if not branch to LABEL. Regardless | 887 | * Check if PTE can be written to, if not branch to LABEL. Regardless |
888 | * restore PTE with value from PTR when done. | 888 | * restore PTE with value from PTR when done. |
889 | */ | 889 | */ |
890 | static void __init | 890 | static void __cpuinit |
891 | build_pte_writable(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | 891 | build_pte_writable(u32 **p, struct uasm_label **l, struct uasm_reloc **r, |
892 | unsigned int pte, unsigned int ptr, enum label_id lid) | 892 | unsigned int pte, unsigned int ptr, enum label_id lid) |
893 | { | 893 | { |
@@ -900,7 +900,7 @@ build_pte_writable(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
900 | /* Make PTE writable, update software status bits as well, then store | 900 | /* Make PTE writable, update software status bits as well, then store |
901 | * at PTR. | 901 | * at PTR. |
902 | */ | 902 | */ |
903 | static void __init | 903 | static void __cpuinit |
904 | build_make_write(u32 **p, struct uasm_reloc **r, unsigned int pte, | 904 | build_make_write(u32 **p, struct uasm_reloc **r, unsigned int pte, |
905 | unsigned int ptr) | 905 | unsigned int ptr) |
906 | { | 906 | { |
@@ -914,7 +914,7 @@ build_make_write(u32 **p, struct uasm_reloc **r, unsigned int pte, | |||
914 | * Check if PTE can be modified, if not branch to LABEL. Regardless | 914 | * Check if PTE can be modified, if not branch to LABEL. Regardless |
915 | * restore PTE with value from PTR when done. | 915 | * restore PTE with value from PTR when done. |
916 | */ | 916 | */ |
917 | static void __init | 917 | static void __cpuinit |
918 | build_pte_modifiable(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | 918 | build_pte_modifiable(u32 **p, struct uasm_label **l, struct uasm_reloc **r, |
919 | unsigned int pte, unsigned int ptr, enum label_id lid) | 919 | unsigned int pte, unsigned int ptr, enum label_id lid) |
920 | { | 920 | { |
@@ -931,7 +931,7 @@ build_pte_modifiable(u32 **p, struct uasm_label **l, struct uasm_reloc **r, | |||
931 | * This places the pte into ENTRYLO0 and writes it with tlbwi. | 931 | * This places the pte into ENTRYLO0 and writes it with tlbwi. |
932 | * Then it returns. | 932 | * Then it returns. |
933 | */ | 933 | */ |
934 | static void __init | 934 | static void __cpuinit |
935 | build_r3000_pte_reload_tlbwi(u32 **p, unsigned int pte, unsigned int tmp) | 935 | build_r3000_pte_reload_tlbwi(u32 **p, unsigned int pte, unsigned int tmp) |
936 | { | 936 | { |
937 | uasm_i_mtc0(p, pte, C0_ENTRYLO0); /* cp0 delay */ | 937 | uasm_i_mtc0(p, pte, C0_ENTRYLO0); /* cp0 delay */ |
@@ -947,7 +947,7 @@ build_r3000_pte_reload_tlbwi(u32 **p, unsigned int pte, unsigned int tmp) | |||
947 | * may have the probe fail bit set as a result of a trap on a | 947 | * may have the probe fail bit set as a result of a trap on a |
948 | * kseg2 access, i.e. without refill. Then it returns. | 948 | * kseg2 access, i.e. without refill. Then it returns. |
949 | */ | 949 | */ |
950 | static void __init | 950 | static void __cpuinit |
951 | build_r3000_tlb_reload_write(u32 **p, struct uasm_label **l, | 951 | build_r3000_tlb_reload_write(u32 **p, struct uasm_label **l, |
952 | struct uasm_reloc **r, unsigned int pte, | 952 | struct uasm_reloc **r, unsigned int pte, |
953 | unsigned int tmp) | 953 | unsigned int tmp) |
@@ -965,7 +965,7 @@ build_r3000_tlb_reload_write(u32 **p, struct uasm_label **l, | |||
965 | uasm_i_rfe(p); /* branch delay */ | 965 | uasm_i_rfe(p); /* branch delay */ |
966 | } | 966 | } |
967 | 967 | ||
968 | static void __init | 968 | static void __cpuinit |
969 | build_r3000_tlbchange_handler_head(u32 **p, unsigned int pte, | 969 | build_r3000_tlbchange_handler_head(u32 **p, unsigned int pte, |
970 | unsigned int ptr) | 970 | unsigned int ptr) |
971 | { | 971 | { |
@@ -985,7 +985,7 @@ build_r3000_tlbchange_handler_head(u32 **p, unsigned int pte, | |||
985 | uasm_i_tlbp(p); /* load delay */ | 985 | uasm_i_tlbp(p); /* load delay */ |
986 | } | 986 | } |
987 | 987 | ||
988 | static void __init build_r3000_tlb_load_handler(void) | 988 | static void __cpuinit build_r3000_tlb_load_handler(void) |
989 | { | 989 | { |
990 | u32 *p = handle_tlbl; | 990 | u32 *p = handle_tlbl; |
991 | struct uasm_label *l = labels; | 991 | struct uasm_label *l = labels; |
@@ -1015,7 +1015,7 @@ static void __init build_r3000_tlb_load_handler(void) | |||
1015 | dump_handler(handle_tlbl, ARRAY_SIZE(handle_tlbl)); | 1015 | dump_handler(handle_tlbl, ARRAY_SIZE(handle_tlbl)); |
1016 | } | 1016 | } |
1017 | 1017 | ||
1018 | static void __init build_r3000_tlb_store_handler(void) | 1018 | static void __cpuinit build_r3000_tlb_store_handler(void) |
1019 | { | 1019 | { |
1020 | u32 *p = handle_tlbs; | 1020 | u32 *p = handle_tlbs; |
1021 | struct uasm_label *l = labels; | 1021 | struct uasm_label *l = labels; |
@@ -1045,7 +1045,7 @@ static void __init build_r3000_tlb_store_handler(void) | |||
1045 | dump_handler(handle_tlbs, ARRAY_SIZE(handle_tlbs)); | 1045 | dump_handler(handle_tlbs, ARRAY_SIZE(handle_tlbs)); |
1046 | } | 1046 | } |
1047 | 1047 | ||
1048 | static void __init build_r3000_tlb_modify_handler(void) | 1048 | static void __cpuinit build_r3000_tlb_modify_handler(void) |
1049 | { | 1049 | { |
1050 | u32 *p = handle_tlbm; | 1050 | u32 *p = handle_tlbm; |
1051 | struct uasm_label *l = labels; | 1051 | struct uasm_label *l = labels; |
@@ -1078,7 +1078,7 @@ static void __init build_r3000_tlb_modify_handler(void) | |||
1078 | /* | 1078 | /* |
1079 | * R4000 style TLB load/store/modify handlers. | 1079 | * R4000 style TLB load/store/modify handlers. |
1080 | */ | 1080 | */ |
1081 | static void __init | 1081 | static void __cpuinit |
1082 | build_r4000_tlbchange_handler_head(u32 **p, struct uasm_label **l, | 1082 | build_r4000_tlbchange_handler_head(u32 **p, struct uasm_label **l, |
1083 | struct uasm_reloc **r, unsigned int pte, | 1083 | struct uasm_reloc **r, unsigned int pte, |
1084 | unsigned int ptr) | 1084 | unsigned int ptr) |
@@ -1103,7 +1103,7 @@ build_r4000_tlbchange_handler_head(u32 **p, struct uasm_label **l, | |||
1103 | build_tlb_probe_entry(p); | 1103 | build_tlb_probe_entry(p); |
1104 | } | 1104 | } |
1105 | 1105 | ||
1106 | static void __init | 1106 | static void __cpuinit |
1107 | build_r4000_tlbchange_handler_tail(u32 **p, struct uasm_label **l, | 1107 | build_r4000_tlbchange_handler_tail(u32 **p, struct uasm_label **l, |
1108 | struct uasm_reloc **r, unsigned int tmp, | 1108 | struct uasm_reloc **r, unsigned int tmp, |
1109 | unsigned int ptr) | 1109 | unsigned int ptr) |
@@ -1120,7 +1120,7 @@ build_r4000_tlbchange_handler_tail(u32 **p, struct uasm_label **l, | |||
1120 | #endif | 1120 | #endif |
1121 | } | 1121 | } |
1122 | 1122 | ||
1123 | static void __init build_r4000_tlb_load_handler(void) | 1123 | static void __cpuinit build_r4000_tlb_load_handler(void) |
1124 | { | 1124 | { |
1125 | u32 *p = handle_tlbl; | 1125 | u32 *p = handle_tlbl; |
1126 | struct uasm_label *l = labels; | 1126 | struct uasm_label *l = labels; |
@@ -1160,7 +1160,7 @@ static void __init build_r4000_tlb_load_handler(void) | |||
1160 | dump_handler(handle_tlbl, ARRAY_SIZE(handle_tlbl)); | 1160 | dump_handler(handle_tlbl, ARRAY_SIZE(handle_tlbl)); |
1161 | } | 1161 | } |
1162 | 1162 | ||
1163 | static void __init build_r4000_tlb_store_handler(void) | 1163 | static void __cpuinit build_r4000_tlb_store_handler(void) |
1164 | { | 1164 | { |
1165 | u32 *p = handle_tlbs; | 1165 | u32 *p = handle_tlbs; |
1166 | struct uasm_label *l = labels; | 1166 | struct uasm_label *l = labels; |
@@ -1191,7 +1191,7 @@ static void __init build_r4000_tlb_store_handler(void) | |||
1191 | dump_handler(handle_tlbs, ARRAY_SIZE(handle_tlbs)); | 1191 | dump_handler(handle_tlbs, ARRAY_SIZE(handle_tlbs)); |
1192 | } | 1192 | } |
1193 | 1193 | ||
1194 | static void __init build_r4000_tlb_modify_handler(void) | 1194 | static void __cpuinit build_r4000_tlb_modify_handler(void) |
1195 | { | 1195 | { |
1196 | u32 *p = handle_tlbm; | 1196 | u32 *p = handle_tlbm; |
1197 | struct uasm_label *l = labels; | 1197 | struct uasm_label *l = labels; |
@@ -1223,7 +1223,7 @@ static void __init build_r4000_tlb_modify_handler(void) | |||
1223 | dump_handler(handle_tlbm, ARRAY_SIZE(handle_tlbm)); | 1223 | dump_handler(handle_tlbm, ARRAY_SIZE(handle_tlbm)); |
1224 | } | 1224 | } |
1225 | 1225 | ||
1226 | void __init build_tlb_refill_handler(void) | 1226 | void __cpuinit build_tlb_refill_handler(void) |
1227 | { | 1227 | { |
1228 | /* | 1228 | /* |
1229 | * The refill handler is generated per-CPU, multi-node systems | 1229 | * The refill handler is generated per-CPU, multi-node systems |
@@ -1269,7 +1269,7 @@ void __init build_tlb_refill_handler(void) | |||
1269 | } | 1269 | } |
1270 | } | 1270 | } |
1271 | 1271 | ||
1272 | void __init flush_tlb_handlers(void) | 1272 | void __cpuinit flush_tlb_handlers(void) |
1273 | { | 1273 | { |
1274 | flush_icache_range((unsigned long)handle_tlbl, | 1274 | flush_icache_range((unsigned long)handle_tlbl, |
1275 | (unsigned long)handle_tlbl + sizeof(handle_tlbl)); | 1275 | (unsigned long)handle_tlbl + sizeof(handle_tlbl)); |
diff --git a/arch/mips/mm/uasm.c b/arch/mips/mm/uasm.c index e3f74ed5f704..1a6f7704cc89 100644 --- a/arch/mips/mm/uasm.c +++ b/arch/mips/mm/uasm.c | |||
@@ -82,7 +82,7 @@ struct insn { | |||
82 | | (e) << RE_SH \ | 82 | | (e) << RE_SH \ |
83 | | (f) << FUNC_SH) | 83 | | (f) << FUNC_SH) |
84 | 84 | ||
85 | static struct insn insn_table[] __initdata = { | 85 | static struct insn insn_table[] __cpuinitdata = { |
86 | { insn_addiu, M(addiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, | 86 | { insn_addiu, M(addiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM }, |
87 | { insn_addu, M(spec_op, 0, 0, 0, 0, addu_op), RS | RT | RD }, | 87 | { insn_addu, M(spec_op, 0, 0, 0, 0, addu_op), RS | RT | RD }, |
88 | { insn_and, M(spec_op, 0, 0, 0, 0, and_op), RS | RT | RD }, | 88 | { insn_and, M(spec_op, 0, 0, 0, 0, and_op), RS | RT | RD }, |
@@ -135,7 +135,7 @@ static struct insn insn_table[] __initdata = { | |||
135 | 135 | ||
136 | #undef M | 136 | #undef M |
137 | 137 | ||
138 | static inline __init u32 build_rs(u32 arg) | 138 | static inline __cpuinit u32 build_rs(u32 arg) |
139 | { | 139 | { |
140 | if (arg & ~RS_MASK) | 140 | if (arg & ~RS_MASK) |
141 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 141 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -143,7 +143,7 @@ static inline __init u32 build_rs(u32 arg) | |||
143 | return (arg & RS_MASK) << RS_SH; | 143 | return (arg & RS_MASK) << RS_SH; |
144 | } | 144 | } |
145 | 145 | ||
146 | static inline __init u32 build_rt(u32 arg) | 146 | static inline __cpuinit u32 build_rt(u32 arg) |
147 | { | 147 | { |
148 | if (arg & ~RT_MASK) | 148 | if (arg & ~RT_MASK) |
149 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 149 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -151,7 +151,7 @@ static inline __init u32 build_rt(u32 arg) | |||
151 | return (arg & RT_MASK) << RT_SH; | 151 | return (arg & RT_MASK) << RT_SH; |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline __init u32 build_rd(u32 arg) | 154 | static inline __cpuinit u32 build_rd(u32 arg) |
155 | { | 155 | { |
156 | if (arg & ~RD_MASK) | 156 | if (arg & ~RD_MASK) |
157 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 157 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -159,7 +159,7 @@ static inline __init u32 build_rd(u32 arg) | |||
159 | return (arg & RD_MASK) << RD_SH; | 159 | return (arg & RD_MASK) << RD_SH; |
160 | } | 160 | } |
161 | 161 | ||
162 | static inline __init u32 build_re(u32 arg) | 162 | static inline __cpuinit u32 build_re(u32 arg) |
163 | { | 163 | { |
164 | if (arg & ~RE_MASK) | 164 | if (arg & ~RE_MASK) |
165 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 165 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -167,7 +167,7 @@ static inline __init u32 build_re(u32 arg) | |||
167 | return (arg & RE_MASK) << RE_SH; | 167 | return (arg & RE_MASK) << RE_SH; |
168 | } | 168 | } |
169 | 169 | ||
170 | static inline __init u32 build_simm(s32 arg) | 170 | static inline __cpuinit u32 build_simm(s32 arg) |
171 | { | 171 | { |
172 | if (arg > 0x7fff || arg < -0x8000) | 172 | if (arg > 0x7fff || arg < -0x8000) |
173 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 173 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -175,7 +175,7 @@ static inline __init u32 build_simm(s32 arg) | |||
175 | return arg & 0xffff; | 175 | return arg & 0xffff; |
176 | } | 176 | } |
177 | 177 | ||
178 | static inline __init u32 build_uimm(u32 arg) | 178 | static inline __cpuinit u32 build_uimm(u32 arg) |
179 | { | 179 | { |
180 | if (arg & ~IMM_MASK) | 180 | if (arg & ~IMM_MASK) |
181 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 181 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -183,7 +183,7 @@ static inline __init u32 build_uimm(u32 arg) | |||
183 | return arg & IMM_MASK; | 183 | return arg & IMM_MASK; |
184 | } | 184 | } |
185 | 185 | ||
186 | static inline __init u32 build_bimm(s32 arg) | 186 | static inline __cpuinit u32 build_bimm(s32 arg) |
187 | { | 187 | { |
188 | if (arg > 0x1ffff || arg < -0x20000) | 188 | if (arg > 0x1ffff || arg < -0x20000) |
189 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 189 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -194,7 +194,7 @@ static inline __init u32 build_bimm(s32 arg) | |||
194 | return ((arg < 0) ? (1 << 15) : 0) | ((arg >> 2) & 0x7fff); | 194 | return ((arg < 0) ? (1 << 15) : 0) | ((arg >> 2) & 0x7fff); |
195 | } | 195 | } |
196 | 196 | ||
197 | static inline __init u32 build_jimm(u32 arg) | 197 | static inline __cpuinit u32 build_jimm(u32 arg) |
198 | { | 198 | { |
199 | if (arg & ~((JIMM_MASK) << 2)) | 199 | if (arg & ~((JIMM_MASK) << 2)) |
200 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 200 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -202,7 +202,7 @@ static inline __init u32 build_jimm(u32 arg) | |||
202 | return (arg >> 2) & JIMM_MASK; | 202 | return (arg >> 2) & JIMM_MASK; |
203 | } | 203 | } |
204 | 204 | ||
205 | static inline __init u32 build_func(u32 arg) | 205 | static inline __cpuinit u32 build_func(u32 arg) |
206 | { | 206 | { |
207 | if (arg & ~FUNC_MASK) | 207 | if (arg & ~FUNC_MASK) |
208 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 208 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -210,7 +210,7 @@ static inline __init u32 build_func(u32 arg) | |||
210 | return arg & FUNC_MASK; | 210 | return arg & FUNC_MASK; |
211 | } | 211 | } |
212 | 212 | ||
213 | static inline __init u32 build_set(u32 arg) | 213 | static inline __cpuinit u32 build_set(u32 arg) |
214 | { | 214 | { |
215 | if (arg & ~SET_MASK) | 215 | if (arg & ~SET_MASK) |
216 | printk(KERN_WARNING "Micro-assembler field overflow\n"); | 216 | printk(KERN_WARNING "Micro-assembler field overflow\n"); |
@@ -222,7 +222,7 @@ static inline __init u32 build_set(u32 arg) | |||
222 | * The order of opcode arguments is implicitly left to right, | 222 | * The order of opcode arguments is implicitly left to right, |
223 | * starting with RS and ending with FUNC or IMM. | 223 | * starting with RS and ending with FUNC or IMM. |
224 | */ | 224 | */ |
225 | static void __init build_insn(u32 **buf, enum opcode opc, ...) | 225 | static void __cpuinit build_insn(u32 **buf, enum opcode opc, ...) |
226 | { | 226 | { |
227 | struct insn *ip = NULL; | 227 | struct insn *ip = NULL; |
228 | unsigned int i; | 228 | unsigned int i; |
@@ -375,14 +375,14 @@ I_u3u1u2(_xor) | |||
375 | I_u2u1u3(_xori) | 375 | I_u2u1u3(_xori) |
376 | 376 | ||
377 | /* Handle labels. */ | 377 | /* Handle labels. */ |
378 | void __init uasm_build_label(struct uasm_label **lab, u32 *addr, int lid) | 378 | void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid) |
379 | { | 379 | { |
380 | (*lab)->addr = addr; | 380 | (*lab)->addr = addr; |
381 | (*lab)->lab = lid; | 381 | (*lab)->lab = lid; |
382 | (*lab)++; | 382 | (*lab)++; |
383 | } | 383 | } |
384 | 384 | ||
385 | int __init uasm_in_compat_space_p(long addr) | 385 | int __cpuinit uasm_in_compat_space_p(long addr) |
386 | { | 386 | { |
387 | /* Is this address in 32bit compat space? */ | 387 | /* Is this address in 32bit compat space? */ |
388 | #ifdef CONFIG_64BIT | 388 | #ifdef CONFIG_64BIT |
@@ -392,7 +392,7 @@ int __init uasm_in_compat_space_p(long addr) | |||
392 | #endif | 392 | #endif |
393 | } | 393 | } |
394 | 394 | ||
395 | int __init uasm_rel_highest(long val) | 395 | int __cpuinit uasm_rel_highest(long val) |
396 | { | 396 | { |
397 | #ifdef CONFIG_64BIT | 397 | #ifdef CONFIG_64BIT |
398 | return ((((val + 0x800080008000L) >> 48) & 0xffff) ^ 0x8000) - 0x8000; | 398 | return ((((val + 0x800080008000L) >> 48) & 0xffff) ^ 0x8000) - 0x8000; |
@@ -401,7 +401,7 @@ int __init uasm_rel_highest(long val) | |||
401 | #endif | 401 | #endif |
402 | } | 402 | } |
403 | 403 | ||
404 | int __init uasm_rel_higher(long val) | 404 | int __cpuinit uasm_rel_higher(long val) |
405 | { | 405 | { |
406 | #ifdef CONFIG_64BIT | 406 | #ifdef CONFIG_64BIT |
407 | return ((((val + 0x80008000L) >> 32) & 0xffff) ^ 0x8000) - 0x8000; | 407 | return ((((val + 0x80008000L) >> 32) & 0xffff) ^ 0x8000) - 0x8000; |
@@ -410,17 +410,17 @@ int __init uasm_rel_higher(long val) | |||
410 | #endif | 410 | #endif |
411 | } | 411 | } |
412 | 412 | ||
413 | int __init uasm_rel_hi(long val) | 413 | int __cpuinit uasm_rel_hi(long val) |
414 | { | 414 | { |
415 | return ((((val + 0x8000L) >> 16) & 0xffff) ^ 0x8000) - 0x8000; | 415 | return ((((val + 0x8000L) >> 16) & 0xffff) ^ 0x8000) - 0x8000; |
416 | } | 416 | } |
417 | 417 | ||
418 | int __init uasm_rel_lo(long val) | 418 | int __cpuinit uasm_rel_lo(long val) |
419 | { | 419 | { |
420 | return ((val & 0xffff) ^ 0x8000) - 0x8000; | 420 | return ((val & 0xffff) ^ 0x8000) - 0x8000; |
421 | } | 421 | } |
422 | 422 | ||
423 | void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr) | 423 | void __cpuinit UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr) |
424 | { | 424 | { |
425 | if (!uasm_in_compat_space_p(addr)) { | 425 | if (!uasm_in_compat_space_p(addr)) { |
426 | uasm_i_lui(buf, rs, uasm_rel_highest(addr)); | 426 | uasm_i_lui(buf, rs, uasm_rel_highest(addr)); |
@@ -436,7 +436,7 @@ void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr) | |||
436 | uasm_i_lui(buf, rs, uasm_rel_hi(addr)); | 436 | uasm_i_lui(buf, rs, uasm_rel_hi(addr)); |
437 | } | 437 | } |
438 | 438 | ||
439 | void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr) | 439 | void __cpuinit UASM_i_LA(u32 **buf, unsigned int rs, long addr) |
440 | { | 440 | { |
441 | UASM_i_LA_mostly(buf, rs, addr); | 441 | UASM_i_LA_mostly(buf, rs, addr); |
442 | if (uasm_rel_lo(addr)) { | 442 | if (uasm_rel_lo(addr)) { |
@@ -448,7 +448,7 @@ void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr) | |||
448 | } | 448 | } |
449 | 449 | ||
450 | /* Handle relocations. */ | 450 | /* Handle relocations. */ |
451 | void __init | 451 | void __cpuinit |
452 | uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid) | 452 | uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid) |
453 | { | 453 | { |
454 | (*rel)->addr = addr; | 454 | (*rel)->addr = addr; |
@@ -457,7 +457,7 @@ uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid) | |||
457 | (*rel)++; | 457 | (*rel)++; |
458 | } | 458 | } |
459 | 459 | ||
460 | static inline void __init | 460 | static inline void __cpuinit |
461 | __resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab) | 461 | __resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab) |
462 | { | 462 | { |
463 | long laddr = (long)lab->addr; | 463 | long laddr = (long)lab->addr; |
@@ -474,7 +474,7 @@ __resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab) | |||
474 | } | 474 | } |
475 | } | 475 | } |
476 | 476 | ||
477 | void __init | 477 | void __cpuinit |
478 | uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab) | 478 | uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab) |
479 | { | 479 | { |
480 | struct uasm_label *l; | 480 | struct uasm_label *l; |
@@ -485,7 +485,7 @@ uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab) | |||
485 | __resolve_relocs(rel, l); | 485 | __resolve_relocs(rel, l); |
486 | } | 486 | } |
487 | 487 | ||
488 | void __init | 488 | void __cpuinit |
489 | uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off) | 489 | uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off) |
490 | { | 490 | { |
491 | for (; rel->lab != UASM_LABEL_INVALID; rel++) | 491 | for (; rel->lab != UASM_LABEL_INVALID; rel++) |
@@ -493,7 +493,7 @@ uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off) | |||
493 | rel->addr += off; | 493 | rel->addr += off; |
494 | } | 494 | } |
495 | 495 | ||
496 | void __init | 496 | void __cpuinit |
497 | uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off) | 497 | uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off) |
498 | { | 498 | { |
499 | for (; lab->lab != UASM_LABEL_INVALID; lab++) | 499 | for (; lab->lab != UASM_LABEL_INVALID; lab++) |
@@ -501,7 +501,7 @@ uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off) | |||
501 | lab->addr += off; | 501 | lab->addr += off; |
502 | } | 502 | } |
503 | 503 | ||
504 | void __init | 504 | void __cpuinit |
505 | uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first, | 505 | uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first, |
506 | u32 *end, u32 *target) | 506 | u32 *end, u32 *target) |
507 | { | 507 | { |
@@ -513,7 +513,7 @@ uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first, | |||
513 | uasm_move_labels(lab, first, end, off); | 513 | uasm_move_labels(lab, first, end, off); |
514 | } | 514 | } |
515 | 515 | ||
516 | int __init uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr) | 516 | int __cpuinit uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr) |
517 | { | 517 | { |
518 | for (; rel->lab != UASM_LABEL_INVALID; rel++) { | 518 | for (; rel->lab != UASM_LABEL_INVALID; rel++) { |
519 | if (rel->addr == addr | 519 | if (rel->addr == addr |
@@ -526,49 +526,49 @@ int __init uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr) | |||
526 | } | 526 | } |
527 | 527 | ||
528 | /* Convenience functions for labeled branches. */ | 528 | /* Convenience functions for labeled branches. */ |
529 | void __init | 529 | void __cpuinit |
530 | uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) | 530 | uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) |
531 | { | 531 | { |
532 | uasm_r_mips_pc16(r, *p, lid); | 532 | uasm_r_mips_pc16(r, *p, lid); |
533 | uasm_i_bltz(p, reg, 0); | 533 | uasm_i_bltz(p, reg, 0); |
534 | } | 534 | } |
535 | 535 | ||
536 | void __init | 536 | void __cpuinit |
537 | uasm_il_b(u32 **p, struct uasm_reloc **r, int lid) | 537 | uasm_il_b(u32 **p, struct uasm_reloc **r, int lid) |
538 | { | 538 | { |
539 | uasm_r_mips_pc16(r, *p, lid); | 539 | uasm_r_mips_pc16(r, *p, lid); |
540 | uasm_i_b(p, 0); | 540 | uasm_i_b(p, 0); |
541 | } | 541 | } |
542 | 542 | ||
543 | void __init | 543 | void __cpuinit |
544 | uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) | 544 | uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) |
545 | { | 545 | { |
546 | uasm_r_mips_pc16(r, *p, lid); | 546 | uasm_r_mips_pc16(r, *p, lid); |
547 | uasm_i_beqz(p, reg, 0); | 547 | uasm_i_beqz(p, reg, 0); |
548 | } | 548 | } |
549 | 549 | ||
550 | void __init | 550 | void __cpuinit |
551 | uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) | 551 | uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) |
552 | { | 552 | { |
553 | uasm_r_mips_pc16(r, *p, lid); | 553 | uasm_r_mips_pc16(r, *p, lid); |
554 | uasm_i_beqzl(p, reg, 0); | 554 | uasm_i_beqzl(p, reg, 0); |
555 | } | 555 | } |
556 | 556 | ||
557 | void __init | 557 | void __cpuinit |
558 | uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) | 558 | uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) |
559 | { | 559 | { |
560 | uasm_r_mips_pc16(r, *p, lid); | 560 | uasm_r_mips_pc16(r, *p, lid); |
561 | uasm_i_bnez(p, reg, 0); | 561 | uasm_i_bnez(p, reg, 0); |
562 | } | 562 | } |
563 | 563 | ||
564 | void __init | 564 | void __cpuinit |
565 | uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) | 565 | uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) |
566 | { | 566 | { |
567 | uasm_r_mips_pc16(r, *p, lid); | 567 | uasm_r_mips_pc16(r, *p, lid); |
568 | uasm_i_bgezl(p, reg, 0); | 568 | uasm_i_bgezl(p, reg, 0); |
569 | } | 569 | } |
570 | 570 | ||
571 | void __init | 571 | void __cpuinit |
572 | uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) | 572 | uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid) |
573 | { | 573 | { |
574 | uasm_r_mips_pc16(r, *p, lid); | 574 | uasm_r_mips_pc16(r, *p, lid); |
diff --git a/arch/mips/mm/uasm.h b/arch/mips/mm/uasm.h index a10fc1135c76..fe0574f6e77d 100644 --- a/arch/mips/mm/uasm.h +++ b/arch/mips/mm/uasm.h | |||
@@ -11,38 +11,38 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
13 | #define Ip_u1u2u3(op) \ | 13 | #define Ip_u1u2u3(op) \ |
14 | void __init \ | 14 | void __cpuinit \ |
15 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 15 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
16 | 16 | ||
17 | #define Ip_u2u1u3(op) \ | 17 | #define Ip_u2u1u3(op) \ |
18 | void __init \ | 18 | void __cpuinit \ |
19 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 19 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
20 | 20 | ||
21 | #define Ip_u3u1u2(op) \ | 21 | #define Ip_u3u1u2(op) \ |
22 | void __init \ | 22 | void __cpuinit \ |
23 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) | 23 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, unsigned int c) |
24 | 24 | ||
25 | #define Ip_u1u2s3(op) \ | 25 | #define Ip_u1u2s3(op) \ |
26 | void __init \ | 26 | void __cpuinit \ |
27 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) | 27 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) |
28 | 28 | ||
29 | #define Ip_u2s3u1(op) \ | 29 | #define Ip_u2s3u1(op) \ |
30 | void __init \ | 30 | void __cpuinit \ |
31 | uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c) | 31 | uasm_i##op(u32 **buf, unsigned int a, signed int b, unsigned int c) |
32 | 32 | ||
33 | #define Ip_u2u1s3(op) \ | 33 | #define Ip_u2u1s3(op) \ |
34 | void __init \ | 34 | void __cpuinit \ |
35 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) | 35 | uasm_i##op(u32 **buf, unsigned int a, unsigned int b, signed int c) |
36 | 36 | ||
37 | #define Ip_u1u2(op) \ | 37 | #define Ip_u1u2(op) \ |
38 | void __init uasm_i##op(u32 **buf, unsigned int a, unsigned int b) | 38 | void __cpuinit uasm_i##op(u32 **buf, unsigned int a, unsigned int b) |
39 | 39 | ||
40 | #define Ip_u1s2(op) \ | 40 | #define Ip_u1s2(op) \ |
41 | void __init uasm_i##op(u32 **buf, unsigned int a, signed int b) | 41 | void __cpuinit uasm_i##op(u32 **buf, unsigned int a, signed int b) |
42 | 42 | ||
43 | #define Ip_u1(op) void __init uasm_i##op(u32 **buf, unsigned int a) | 43 | #define Ip_u1(op) void __cpuinit uasm_i##op(u32 **buf, unsigned int a) |
44 | 44 | ||
45 | #define Ip_0(op) void __init uasm_i##op(u32 **buf) | 45 | #define Ip_0(op) void __cpuinit uasm_i##op(u32 **buf) |
46 | 46 | ||
47 | Ip_u2u1s3(_addiu); | 47 | Ip_u2u1s3(_addiu); |
48 | Ip_u3u1u2(_addu); | 48 | Ip_u3u1u2(_addu); |
@@ -98,19 +98,19 @@ struct uasm_label { | |||
98 | int lab; | 98 | int lab; |
99 | }; | 99 | }; |
100 | 100 | ||
101 | void __init uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); | 101 | void __cpuinit uasm_build_label(struct uasm_label **lab, u32 *addr, int lid); |
102 | #ifdef CONFIG_64BIT | 102 | #ifdef CONFIG_64BIT |
103 | int __init uasm_in_compat_space_p(long addr); | 103 | int uasm_in_compat_space_p(long addr); |
104 | int __init uasm_rel_highest(long val); | 104 | int uasm_rel_highest(long val); |
105 | int __init uasm_rel_higher(long val); | 105 | int uasm_rel_higher(long val); |
106 | #endif | 106 | #endif |
107 | int __init uasm_rel_hi(long val); | 107 | int uasm_rel_hi(long val); |
108 | int __init uasm_rel_lo(long val); | 108 | int uasm_rel_lo(long val); |
109 | void __init UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); | 109 | void UASM_i_LA_mostly(u32 **buf, unsigned int rs, long addr); |
110 | void __init UASM_i_LA(u32 **buf, unsigned int rs, long addr); | 110 | void UASM_i_LA(u32 **buf, unsigned int rs, long addr); |
111 | 111 | ||
112 | #define UASM_L_LA(lb) \ | 112 | #define UASM_L_LA(lb) \ |
113 | static inline void __init uasm_l##lb(struct uasm_label **lab, u32 *addr) \ | 113 | static inline void __cpuinit uasm_l##lb(struct uasm_label **lab, u32 *addr) \ |
114 | { \ | 114 | { \ |
115 | uasm_build_label(lab, addr, label##lb); \ | 115 | uasm_build_label(lab, addr, label##lb); \ |
116 | } | 116 | } |
@@ -164,29 +164,19 @@ struct uasm_reloc { | |||
164 | /* This is zero so we can use zeroed label arrays. */ | 164 | /* This is zero so we can use zeroed label arrays. */ |
165 | #define UASM_LABEL_INVALID 0 | 165 | #define UASM_LABEL_INVALID 0 |
166 | 166 | ||
167 | void __init uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid); | 167 | void uasm_r_mips_pc16(struct uasm_reloc **rel, u32 *addr, int lid); |
168 | void __init | 168 | void uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab); |
169 | uasm_resolve_relocs(struct uasm_reloc *rel, struct uasm_label *lab); | 169 | void uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off); |
170 | void __init | 170 | void uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off); |
171 | uasm_move_relocs(struct uasm_reloc *rel, u32 *first, u32 *end, long off); | 171 | void uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, |
172 | void __init | 172 | u32 *first, u32 *end, u32 *target); |
173 | uasm_move_labels(struct uasm_label *lab, u32 *first, u32 *end, long off); | 173 | int uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr); |
174 | void __init | ||
175 | uasm_copy_handler(struct uasm_reloc *rel, struct uasm_label *lab, u32 *first, | ||
176 | u32 *end, u32 *target); | ||
177 | int __init uasm_insn_has_bdelay(struct uasm_reloc *rel, u32 *addr); | ||
178 | 174 | ||
179 | /* Convenience functions for labeled branches. */ | 175 | /* Convenience functions for labeled branches. */ |
180 | void __init | 176 | void uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
181 | uasm_il_bltz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | 177 | void uasm_il_b(u32 **p, struct uasm_reloc **r, int lid); |
182 | void __init uasm_il_b(u32 **p, struct uasm_reloc **r, int lid); | 178 | void uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
183 | void __init | 179 | void uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
184 | uasm_il_beqz(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | 180 | void uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
185 | void __init | 181 | void uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
186 | uasm_il_beqzl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | 182 | void uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); |
187 | void __init | ||
188 | uasm_il_bnez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | ||
189 | void __init | ||
190 | uasm_il_bgezl(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | ||
191 | void __init | ||
192 | uasm_il_bgez(u32 **p, struct uasm_reloc **r, unsigned int reg, int lid); | ||
diff --git a/arch/mips/pci/pci-bcm1480.c b/arch/mips/pci/pci-bcm1480.c index 30ed36125bcd..ab68c4318a30 100644 --- a/arch/mips/pci/pci-bcm1480.c +++ b/arch/mips/pci/pci-bcm1480.c | |||
@@ -249,8 +249,9 @@ static int __init bcm1480_pcibios_init(void) | |||
249 | * XXX ehs: Should this happen in PCI Device mode? | 249 | * XXX ehs: Should this happen in PCI Device mode? |
250 | */ | 250 | */ |
251 | 251 | ||
252 | set_io_port_base((unsigned long) | 252 | bcm1480_controller.io_map_base = (unsigned long) |
253 | ioremap(A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, 65536)); | 253 | ioremap(A_BCM1480_PHYS_PCI_IO_MATCH_BYTES, 65536); |
254 | set_io_port_base(bcm1480_controller.io_map_base); | ||
254 | isa_slot_offset = (unsigned long) | 255 | isa_slot_offset = (unsigned long) |
255 | ioremap(A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES, 1024*1024); | 256 | ioremap(A_BCM1480_PHYS_PCI_MEM_MATCH_BYTES, 1024*1024); |
256 | 257 | ||
diff --git a/arch/mips/pci/pci-ip27.c b/arch/mips/pci/pci-ip27.c index a322543ac34e..bb64828a92fe 100644 --- a/arch/mips/pci/pci-ip27.c +++ b/arch/mips/pci/pci-ip27.c | |||
@@ -40,7 +40,7 @@ int irq_to_slot[MAX_PCI_BUSSES * MAX_DEVICES_PER_PCIBUS]; | |||
40 | 40 | ||
41 | extern struct pci_ops bridge_pci_ops; | 41 | extern struct pci_ops bridge_pci_ops; |
42 | 42 | ||
43 | int __init bridge_probe(nasid_t nasid, int widget_id, int masterwid) | 43 | int __cpuinit bridge_probe(nasid_t nasid, int widget_id, int masterwid) |
44 | { | 44 | { |
45 | unsigned long offset = NODE_OFFSET(nasid); | 45 | unsigned long offset = NODE_OFFSET(nasid); |
46 | struct bridge_controller *bc; | 46 | struct bridge_controller *bc; |
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index f9471d77c096..358ad6210949 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
@@ -260,7 +260,7 @@ static void pcibios_fixup_device_resources(struct pci_dev *dev, | |||
260 | } | 260 | } |
261 | } | 261 | } |
262 | 262 | ||
263 | void pcibios_fixup_bus(struct pci_bus *bus) | 263 | void __devinit pcibios_fixup_bus(struct pci_bus *bus) |
264 | { | 264 | { |
265 | /* Propagate hose info into the subordinate devices. */ | 265 | /* Propagate hose info into the subordinate devices. */ |
266 | 266 | ||
diff --git a/arch/mips/pmc-sierra/yosemite/smp.c b/arch/mips/pmc-sierra/yosemite/smp.c index 653f3ec61cab..3a7df647ca77 100644 --- a/arch/mips/pmc-sierra/yosemite/smp.c +++ b/arch/mips/pmc-sierra/yosemite/smp.c | |||
@@ -7,10 +7,10 @@ | |||
7 | 7 | ||
8 | #define LAUNCHSTACK_SIZE 256 | 8 | #define LAUNCHSTACK_SIZE 256 |
9 | 9 | ||
10 | static __initdata DEFINE_SPINLOCK(launch_lock); | 10 | static __cpuinitdata DEFINE_SPINLOCK(launch_lock); |
11 | 11 | ||
12 | static unsigned long secondary_sp __initdata; | 12 | static unsigned long secondary_sp __cpuinitdata; |
13 | static unsigned long secondary_gp __initdata; | 13 | static unsigned long secondary_gp __cpuinitdata; |
14 | 14 | ||
15 | static unsigned char launchstack[LAUNCHSTACK_SIZE] __initdata | 15 | static unsigned char launchstack[LAUNCHSTACK_SIZE] __initdata |
16 | __attribute__((aligned(2 * sizeof(long)))); | 16 | __attribute__((aligned(2 * sizeof(long)))); |
diff --git a/arch/mips/sgi-ip27/ip27-init.c b/arch/mips/sgi-ip27/ip27-init.c index a49e7c85f724..7093e7c573a4 100644 --- a/arch/mips/sgi-ip27/ip27-init.c +++ b/arch/mips/sgi-ip27/ip27-init.c | |||
@@ -53,7 +53,7 @@ extern void pcibr_setup(cnodeid_t); | |||
53 | 53 | ||
54 | extern void xtalk_probe_node(cnodeid_t nid); | 54 | extern void xtalk_probe_node(cnodeid_t nid); |
55 | 55 | ||
56 | static void __init per_hub_init(cnodeid_t cnode) | 56 | static void __cpuinit per_hub_init(cnodeid_t cnode) |
57 | { | 57 | { |
58 | struct hub_data *hub = hub_data(cnode); | 58 | struct hub_data *hub = hub_data(cnode); |
59 | nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode); | 59 | nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode); |
diff --git a/arch/mips/sgi-ip27/ip27-timer.c b/arch/mips/sgi-ip27/ip27-timer.c index 08d45369be45..25d3baf0ebc4 100644 --- a/arch/mips/sgi-ip27/ip27-timer.c +++ b/arch/mips/sgi-ip27/ip27-timer.c | |||
@@ -285,7 +285,7 @@ void __cpuinit cpu_time_init(void) | |||
285 | set_c0_status(SRB_TIMOCLK); | 285 | set_c0_status(SRB_TIMOCLK); |
286 | } | 286 | } |
287 | 287 | ||
288 | void __init hub_rtc_init(cnodeid_t cnode) | 288 | void __cpuinit hub_rtc_init(cnodeid_t cnode) |
289 | { | 289 | { |
290 | /* | 290 | /* |
291 | * We only need to initialize the current node. | 291 | * We only need to initialize the current node. |
diff --git a/arch/mips/sgi-ip27/ip27-xtalk.c b/arch/mips/sgi-ip27/ip27-xtalk.c index fc82f34a32ce..6ae64e8dfc40 100644 --- a/arch/mips/sgi-ip27/ip27-xtalk.c +++ b/arch/mips/sgi-ip27/ip27-xtalk.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | extern int bridge_probe(nasid_t nasid, int widget, int masterwid); | 23 | extern int bridge_probe(nasid_t nasid, int widget, int masterwid); |
24 | 24 | ||
25 | static int __init probe_one_port(nasid_t nasid, int widget, int masterwid) | 25 | static int __cpuinit probe_one_port(nasid_t nasid, int widget, int masterwid) |
26 | { | 26 | { |
27 | widgetreg_t widget_id; | 27 | widgetreg_t widget_id; |
28 | xwidget_part_num_t partnum; | 28 | xwidget_part_num_t partnum; |
@@ -46,7 +46,7 @@ static int __init probe_one_port(nasid_t nasid, int widget, int masterwid) | |||
46 | return 0; | 46 | return 0; |
47 | } | 47 | } |
48 | 48 | ||
49 | static int __init xbow_probe(nasid_t nasid) | 49 | static int __cpuinit xbow_probe(nasid_t nasid) |
50 | { | 50 | { |
51 | lboard_t *brd; | 51 | lboard_t *brd; |
52 | klxbow_t *xbow_p; | 52 | klxbow_t *xbow_p; |
@@ -99,7 +99,7 @@ static int __init xbow_probe(nasid_t nasid) | |||
99 | return 0; | 99 | return 0; |
100 | } | 100 | } |
101 | 101 | ||
102 | void __init xtalk_probe_node(cnodeid_t nid) | 102 | void __cpuinit xtalk_probe_node(cnodeid_t nid) |
103 | { | 103 | { |
104 | volatile u64 hubreg; | 104 | volatile u64 hubreg; |
105 | nasid_t nasid; | 105 | nasid_t nasid; |
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 1c6ce3536e4c..ab5cfe8ef988 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -155,7 +155,7 @@ all: zImage | |||
155 | 155 | ||
156 | CPPFLAGS_vmlinux.lds := -Upowerpc | 156 | CPPFLAGS_vmlinux.lds := -Upowerpc |
157 | 157 | ||
158 | BOOT_TARGETS = zImage zImage.initrd uImage treeImage.% cuImage.% | 158 | BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% |
159 | 159 | ||
160 | PHONY += $(BOOT_TARGETS) | 160 | PHONY += $(BOOT_TARGETS) |
161 | 161 | ||
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index e3993a607584..4974d9e56ead 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -186,7 +186,7 @@ quiet_cmd_wrap = WRAP $@ | |||
186 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries | 186 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries |
187 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries | 187 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries |
188 | image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries | 188 | image-$(CONFIG_PPC_IBM_CELL_BLADE) += zImage.pseries |
189 | image-$(CONFIG_PPC_PS3) += zImage-dtb.ps3 | 189 | image-$(CONFIG_PPC_PS3) += dtbImage.ps3 |
190 | image-$(CONFIG_PPC_CELLEB) += zImage.pseries | 190 | image-$(CONFIG_PPC_CELLEB) += zImage.pseries |
191 | image-$(CONFIG_PPC_CHRP) += zImage.chrp | 191 | image-$(CONFIG_PPC_CHRP) += zImage.chrp |
192 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp | 192 | image-$(CONFIG_PPC_EFIKA) += zImage.chrp |
@@ -205,7 +205,7 @@ image-$(CONFIG_DEFAULT_UIMAGE) += uImage | |||
205 | # | 205 | # |
206 | 206 | ||
207 | # Board ports in arch/powerpc/platform/40x/Kconfig | 207 | # Board ports in arch/powerpc/platform/40x/Kconfig |
208 | image-$(CONFIG_EP405) += zImage-dtb.ep405 | 208 | image-$(CONFIG_EP405) += dtbImage.ep405 |
209 | image-$(CONFIG_WALNUT) += treeImage.walnut | 209 | image-$(CONFIG_WALNUT) += treeImage.walnut |
210 | 210 | ||
211 | # Board ports in arch/powerpc/platform/44x/Kconfig | 211 | # Board ports in arch/powerpc/platform/44x/Kconfig |
@@ -220,9 +220,9 @@ image-$(CONFIG_WARP) += cuImage.warp | |||
220 | # Board ports in arch/powerpc/platform/8xx/Kconfig | 220 | # Board ports in arch/powerpc/platform/8xx/Kconfig |
221 | image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads | 221 | image-$(CONFIG_PPC_MPC86XADS) += cuImage.mpc866ads |
222 | image-$(CONFIG_PPC_MPC885ADS) += cuImage.mpc885ads | 222 | image-$(CONFIG_PPC_MPC885ADS) += cuImage.mpc885ads |
223 | image-$(CONFIG_PPC_EP88XC) += zImage-dtb.ep88xc | 223 | image-$(CONFIG_PPC_EP88XC) += dtbImage.ep88xc |
224 | image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \ | 224 | image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \ |
225 | zImage-dtb.adder875-redboot | 225 | dtbImage.adder875-redboot |
226 | 226 | ||
227 | # Board ports in arch/powerpc/platform/52xx/Kconfig | 227 | # Board ports in arch/powerpc/platform/52xx/Kconfig |
228 | image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 cuImage.lite5200b | 228 | image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 cuImage.lite5200b |
@@ -230,7 +230,7 @@ image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 cuImage.lite5200b | |||
230 | # Board ports in arch/powerpc/platform/82xx/Kconfig | 230 | # Board ports in arch/powerpc/platform/82xx/Kconfig |
231 | image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads | 231 | image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads |
232 | image-$(CONFIG_PQ2FADS) += cuImage.pq2fads | 232 | image-$(CONFIG_PQ2FADS) += cuImage.pq2fads |
233 | image-$(CONFIG_EP8248E) += zImage-dtb.ep8248e | 233 | image-$(CONFIG_EP8248E) += dtbImage.ep8248e |
234 | 234 | ||
235 | # Board ports in arch/powerpc/platform/83xx/Kconfig | 235 | # Board ports in arch/powerpc/platform/83xx/Kconfig |
236 | image-$(CONFIG_MPC832x_MDS) += cuImage.mpc832x_mds | 236 | image-$(CONFIG_MPC832x_MDS) += cuImage.mpc832x_mds |
@@ -268,7 +268,8 @@ endif | |||
268 | 268 | ||
269 | initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) | 269 | initrd- := $(patsubst zImage%, zImage.initrd%, $(image-n) $(image-)) |
270 | initrd-y := $(patsubst zImage%, zImage.initrd%, \ | 270 | initrd-y := $(patsubst zImage%, zImage.initrd%, \ |
271 | $(patsubst treeImage%, treeImage.initrd%, $(image-y))) | 271 | $(patsubst dtbImage%, dtbImage.initrd%, \ |
272 | $(patsubst treeImage%, treeImage.initrd%, $(image-y)))) | ||
272 | initrd-y := $(filter-out $(image-y), $(initrd-y)) | 273 | initrd-y := $(filter-out $(image-y), $(initrd-y)) |
273 | targets += $(image-y) $(initrd-y) | 274 | targets += $(image-y) $(initrd-y) |
274 | 275 | ||
@@ -283,10 +284,11 @@ $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) | |||
283 | $(obj)/zImage.%: vmlinux $(wrapperbits) | 284 | $(obj)/zImage.%: vmlinux $(wrapperbits) |
284 | $(call if_changed,wrap,$*) | 285 | $(call if_changed,wrap,$*) |
285 | 286 | ||
286 | $(obj)/zImage-dtb.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | 287 | # dtbImage% - a dtbImage is a zImage with an embedded device tree blob |
288 | $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | ||
287 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) | 289 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts,,$(obj)/ramdisk.image.gz) |
288 | 290 | ||
289 | $(obj)/zImage-dtb.%: vmlinux $(wrapperbits) $(dtstree)/%.dts | 291 | $(obj)/dtbImage.%: vmlinux $(wrapperbits) $(dtstree)/%.dts |
290 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts) | 292 | $(call if_changed,wrap,$*,$(dtstree)/$*.dts) |
291 | 293 | ||
292 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) | 294 | # This cannot be in the root of $(src) as the zImage rule always adds a $(obj) |
diff --git a/arch/powerpc/boot/dts/mpc8377_mds.dts b/arch/powerpc/boot/dts/mpc8377_mds.dts index a3637fff73cc..49c05e97386c 100644 --- a/arch/powerpc/boot/dts/mpc8377_mds.dts +++ b/arch/powerpc/boot/dts/mpc8377_mds.dts | |||
@@ -47,6 +47,72 @@ | |||
47 | reg = <0x00000000 0x20000000>; // 512MB at 0 | 47 | reg = <0x00000000 0x20000000>; // 512MB at 0 |
48 | }; | 48 | }; |
49 | 49 | ||
50 | localbus@e0005000 { | ||
51 | #address-cells = <2>; | ||
52 | #size-cells = <1>; | ||
53 | compatible = "fsl,mpc8377-elbc", "fsl,elbc", "simple-bus"; | ||
54 | reg = <0xe0005000 0x1000>; | ||
55 | interrupts = <77 0x8>; | ||
56 | interrupt-parent = <&ipic>; | ||
57 | |||
58 | // booting from NOR flash | ||
59 | ranges = <0 0x0 0xfe000000 0x02000000 | ||
60 | 1 0x0 0xf8000000 0x00008000 | ||
61 | 3 0x0 0xe0600000 0x00008000>; | ||
62 | |||
63 | flash@0,0 { | ||
64 | #address-cells = <1>; | ||
65 | #size-cells = <1>; | ||
66 | compatible = "cfi-flash"; | ||
67 | reg = <0 0x0 0x2000000>; | ||
68 | bank-width = <2>; | ||
69 | device-width = <1>; | ||
70 | |||
71 | u-boot@0 { | ||
72 | reg = <0x0 0x100000>; | ||
73 | read-only; | ||
74 | }; | ||
75 | |||
76 | fs@100000 { | ||
77 | reg = <0x100000 0x800000>; | ||
78 | }; | ||
79 | |||
80 | kernel@1d00000 { | ||
81 | reg = <0x1d00000 0x200000>; | ||
82 | }; | ||
83 | |||
84 | dtb@1f00000 { | ||
85 | reg = <0x1f00000 0x100000>; | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | bcsr@1,0 { | ||
90 | reg = <1 0x0 0x8000>; | ||
91 | compatible = "fsl,mpc837xmds-bcsr"; | ||
92 | }; | ||
93 | |||
94 | nand@3,0 { | ||
95 | #address-cells = <1>; | ||
96 | #size-cells = <1>; | ||
97 | compatible = "fsl,mpc8377-fcm-nand", | ||
98 | "fsl,elbc-fcm-nand"; | ||
99 | reg = <3 0x0 0x8000>; | ||
100 | |||
101 | u-boot@0 { | ||
102 | reg = <0x0 0x100000>; | ||
103 | read-only; | ||
104 | }; | ||
105 | |||
106 | kernel@100000 { | ||
107 | reg = <0x100000 0x300000>; | ||
108 | }; | ||
109 | |||
110 | fs@400000 { | ||
111 | reg = <0x400000 0x1c00000>; | ||
112 | }; | ||
113 | }; | ||
114 | }; | ||
115 | |||
50 | soc@e0000000 { | 116 | soc@e0000000 { |
51 | #address-cells = <1>; | 117 | #address-cells = <1>; |
52 | #size-cells = <1>; | 118 | #size-cells = <1>; |
@@ -91,7 +157,6 @@ | |||
91 | mode = "cpu"; | 157 | mode = "cpu"; |
92 | }; | 158 | }; |
93 | 159 | ||
94 | /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ | ||
95 | usb@23000 { | 160 | usb@23000 { |
96 | compatible = "fsl-usb2-dr"; | 161 | compatible = "fsl-usb2-dr"; |
97 | reg = <0x23000 0x1000>; | 162 | reg = <0x23000 0x1000>; |
@@ -99,7 +164,8 @@ | |||
99 | #size-cells = <0>; | 164 | #size-cells = <0>; |
100 | interrupt-parent = <&ipic>; | 165 | interrupt-parent = <&ipic>; |
101 | interrupts = <38 0x8>; | 166 | interrupts = <38 0x8>; |
102 | phy_type = "utmi_wide"; | 167 | dr_mode = "host"; |
168 | phy_type = "ulpi"; | ||
103 | }; | 169 | }; |
104 | 170 | ||
105 | mdio@24520 { | 171 | mdio@24520 { |
diff --git a/arch/powerpc/boot/dts/mpc8378_mds.dts b/arch/powerpc/boot/dts/mpc8378_mds.dts index 533e9b06cc8f..1d6ea080ad73 100644 --- a/arch/powerpc/boot/dts/mpc8378_mds.dts +++ b/arch/powerpc/boot/dts/mpc8378_mds.dts | |||
@@ -47,6 +47,72 @@ | |||
47 | reg = <0x00000000 0x20000000>; // 512MB at 0 | 47 | reg = <0x00000000 0x20000000>; // 512MB at 0 |
48 | }; | 48 | }; |
49 | 49 | ||
50 | localbus@e0005000 { | ||
51 | #address-cells = <2>; | ||
52 | #size-cells = <1>; | ||
53 | compatible = "fsl,mpc8378-elbc", "fsl,elbc", "simple-bus"; | ||
54 | reg = <0xe0005000 0x1000>; | ||
55 | interrupts = <77 0x8>; | ||
56 | interrupt-parent = <&ipic>; | ||
57 | |||
58 | // booting from NOR flash | ||
59 | ranges = <0 0x0 0xfe000000 0x02000000 | ||
60 | 1 0x0 0xf8000000 0x00008000 | ||
61 | 3 0x0 0xe0600000 0x00008000>; | ||
62 | |||
63 | flash@0,0 { | ||
64 | #address-cells = <1>; | ||
65 | #size-cells = <1>; | ||
66 | compatible = "cfi-flash"; | ||
67 | reg = <0 0x0 0x2000000>; | ||
68 | bank-width = <2>; | ||
69 | device-width = <1>; | ||
70 | |||
71 | u-boot@0 { | ||
72 | reg = <0x0 0x100000>; | ||
73 | read-only; | ||
74 | }; | ||
75 | |||
76 | fs@100000 { | ||
77 | reg = <0x100000 0x800000>; | ||
78 | }; | ||
79 | |||
80 | kernel@1d00000 { | ||
81 | reg = <0x1d00000 0x200000>; | ||
82 | }; | ||
83 | |||
84 | dtb@1f00000 { | ||
85 | reg = <0x1f00000 0x100000>; | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | bcsr@1,0 { | ||
90 | reg = <1 0x0 0x8000>; | ||
91 | compatible = "fsl,mpc837xmds-bcsr"; | ||
92 | }; | ||
93 | |||
94 | nand@3,0 { | ||
95 | #address-cells = <1>; | ||
96 | #size-cells = <1>; | ||
97 | compatible = "fsl,mpc8378-fcm-nand", | ||
98 | "fsl,elbc-fcm-nand"; | ||
99 | reg = <3 0x0 0x8000>; | ||
100 | |||
101 | u-boot@0 { | ||
102 | reg = <0x0 0x100000>; | ||
103 | read-only; | ||
104 | }; | ||
105 | |||
106 | kernel@100000 { | ||
107 | reg = <0x100000 0x300000>; | ||
108 | }; | ||
109 | |||
110 | fs@400000 { | ||
111 | reg = <0x400000 0x1c00000>; | ||
112 | }; | ||
113 | }; | ||
114 | }; | ||
115 | |||
50 | soc@e0000000 { | 116 | soc@e0000000 { |
51 | #address-cells = <1>; | 117 | #address-cells = <1>; |
52 | #size-cells = <1>; | 118 | #size-cells = <1>; |
@@ -91,7 +157,6 @@ | |||
91 | mode = "cpu"; | 157 | mode = "cpu"; |
92 | }; | 158 | }; |
93 | 159 | ||
94 | /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ | ||
95 | usb@23000 { | 160 | usb@23000 { |
96 | compatible = "fsl-usb2-dr"; | 161 | compatible = "fsl-usb2-dr"; |
97 | reg = <0x23000 0x1000>; | 162 | reg = <0x23000 0x1000>; |
@@ -99,7 +164,8 @@ | |||
99 | #size-cells = <0>; | 164 | #size-cells = <0>; |
100 | interrupt-parent = <&ipic>; | 165 | interrupt-parent = <&ipic>; |
101 | interrupts = <38 0x8>; | 166 | interrupts = <38 0x8>; |
102 | phy_type = "utmi_wide"; | 167 | dr_mode = "host"; |
168 | phy_type = "ulpi"; | ||
103 | }; | 169 | }; |
104 | 170 | ||
105 | mdio@24520 { | 171 | mdio@24520 { |
diff --git a/arch/powerpc/boot/dts/mpc8379_mds.dts b/arch/powerpc/boot/dts/mpc8379_mds.dts index c270685bbde4..fdb4a9255b24 100644 --- a/arch/powerpc/boot/dts/mpc8379_mds.dts +++ b/arch/powerpc/boot/dts/mpc8379_mds.dts | |||
@@ -47,6 +47,72 @@ | |||
47 | reg = <0x00000000 0x20000000>; // 512MB at 0 | 47 | reg = <0x00000000 0x20000000>; // 512MB at 0 |
48 | }; | 48 | }; |
49 | 49 | ||
50 | localbus@e0005000 { | ||
51 | #address-cells = <2>; | ||
52 | #size-cells = <1>; | ||
53 | compatible = "fsl,mpc8379-elbc", "fsl,elbc", "simple-bus"; | ||
54 | reg = <0xe0005000 0x1000>; | ||
55 | interrupts = <77 0x8>; | ||
56 | interrupt-parent = <&ipic>; | ||
57 | |||
58 | // booting from NOR flash | ||
59 | ranges = <0 0x0 0xfe000000 0x02000000 | ||
60 | 1 0x0 0xf8000000 0x00008000 | ||
61 | 3 0x0 0xe0600000 0x00008000>; | ||
62 | |||
63 | flash@0,0 { | ||
64 | #address-cells = <1>; | ||
65 | #size-cells = <1>; | ||
66 | compatible = "cfi-flash"; | ||
67 | reg = <0 0x0 0x2000000>; | ||
68 | bank-width = <2>; | ||
69 | device-width = <1>; | ||
70 | |||
71 | u-boot@0 { | ||
72 | reg = <0x0 0x100000>; | ||
73 | read-only; | ||
74 | }; | ||
75 | |||
76 | fs@100000 { | ||
77 | reg = <0x100000 0x800000>; | ||
78 | }; | ||
79 | |||
80 | kernel@1d00000 { | ||
81 | reg = <0x1d00000 0x200000>; | ||
82 | }; | ||
83 | |||
84 | dtb@1f00000 { | ||
85 | reg = <0x1f00000 0x100000>; | ||
86 | }; | ||
87 | }; | ||
88 | |||
89 | bcsr@1,0 { | ||
90 | reg = <1 0x0 0x8000>; | ||
91 | compatible = "fsl,mpc837xmds-bcsr"; | ||
92 | }; | ||
93 | |||
94 | nand@3,0 { | ||
95 | #address-cells = <1>; | ||
96 | #size-cells = <1>; | ||
97 | compatible = "fsl,mpc8379-fcm-nand", | ||
98 | "fsl,elbc-fcm-nand"; | ||
99 | reg = <3 0x0 0x8000>; | ||
100 | |||
101 | u-boot@0 { | ||
102 | reg = <0x0 0x100000>; | ||
103 | read-only; | ||
104 | }; | ||
105 | |||
106 | kernel@100000 { | ||
107 | reg = <0x100000 0x300000>; | ||
108 | }; | ||
109 | |||
110 | fs@400000 { | ||
111 | reg = <0x400000 0x1c00000>; | ||
112 | }; | ||
113 | }; | ||
114 | }; | ||
115 | |||
50 | soc@e0000000 { | 116 | soc@e0000000 { |
51 | #address-cells = <1>; | 117 | #address-cells = <1>; |
52 | #size-cells = <1>; | 118 | #size-cells = <1>; |
@@ -91,7 +157,6 @@ | |||
91 | mode = "cpu"; | 157 | mode = "cpu"; |
92 | }; | 158 | }; |
93 | 159 | ||
94 | /* phy type (ULPI, UTMI, UTMI_WIDE, SERIAL) */ | ||
95 | usb@23000 { | 160 | usb@23000 { |
96 | compatible = "fsl-usb2-dr"; | 161 | compatible = "fsl-usb2-dr"; |
97 | reg = <0x23000 0x1000>; | 162 | reg = <0x23000 0x1000>; |
@@ -99,7 +164,8 @@ | |||
99 | #size-cells = <0>; | 164 | #size-cells = <0>; |
100 | interrupt-parent = <&ipic>; | 165 | interrupt-parent = <&ipic>; |
101 | interrupts = <38 0x8>; | 166 | interrupts = <38 0x8>; |
102 | phy_type = "utmi_wide"; | 167 | dr_mode = "host"; |
168 | phy_type = "ulpi"; | ||
103 | }; | 169 | }; |
104 | 170 | ||
105 | mdio@24520 { | 171 | mdio@24520 { |
diff --git a/arch/powerpc/boot/dts/sbc8548.dts b/arch/powerpc/boot/dts/sbc8548.dts index 14be38ad5d4b..b86e65d926c1 100644 --- a/arch/powerpc/boot/dts/sbc8548.dts +++ b/arch/powerpc/boot/dts/sbc8548.dts | |||
@@ -184,11 +184,17 @@ | |||
184 | cell-index = <0>; | 184 | cell-index = <0>; |
185 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | 185 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; |
186 | interrupt-map = < | 186 | interrupt-map = < |
187 | /* IDSEL 0x01 (PCI-X slot) */ | 187 | /* IDSEL 0x01 (PCI-X slot) @66MHz */ |
188 | 0x0800 0x0 0x0 0x1 &mpic 0x0 0x1 | 188 | 0x0800 0x0 0x0 0x1 &mpic 0x2 0x1 |
189 | 0x0800 0x0 0x0 0x2 &mpic 0x1 0x1 | 189 | 0x0800 0x0 0x0 0x2 &mpic 0x3 0x1 |
190 | 0x0800 0x0 0x0 0x3 &mpic 0x2 0x1 | 190 | 0x0800 0x0 0x0 0x3 &mpic 0x4 0x1 |
191 | 0x0800 0x0 0x0 0x4 &mpic 0x3 0x1>; | 191 | 0x0800 0x0 0x0 0x4 &mpic 0x1 0x1 |
192 | |||
193 | /* IDSEL 0x11 (PCI, 3.3V 32bit) @33MHz */ | ||
194 | 0x8800 0x0 0x0 0x1 &mpic 0x2 0x1 | ||
195 | 0x8800 0x0 0x0 0x2 &mpic 0x3 0x1 | ||
196 | 0x8800 0x0 0x0 0x3 &mpic 0x4 0x1 | ||
197 | 0x8800 0x0 0x0 0x4 &mpic 0x1 0x1>; | ||
192 | 198 | ||
193 | interrupt-parent = <&mpic>; | 199 | interrupt-parent = <&mpic>; |
194 | interrupts = <0x18 0x2>; | 200 | interrupts = <0x18 0x2>; |
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index c3178155311b..d50e498a072b 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -191,10 +191,14 @@ ps3) | |||
191 | ksection=.kernel:vmlinux.bin | 191 | ksection=.kernel:vmlinux.bin |
192 | isection=.kernel:initrd | 192 | isection=.kernel:initrd |
193 | ;; | 193 | ;; |
194 | ep88xc|ep405|redboot*|ep8248e) | 194 | ep88xc|ep405|ep8248e) |
195 | platformo="$object/fixed-head.o $object/$platform.o" | 195 | platformo="$object/fixed-head.o $object/$platform.o" |
196 | binary=y | 196 | binary=y |
197 | ;; | 197 | ;; |
198 | adder875-redboot) | ||
199 | platformo="$object/fixed-head.o $object/redboot-8xx.o" | ||
200 | binary=y | ||
201 | ;; | ||
198 | esac | 202 | esac |
199 | 203 | ||
200 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" | 204 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" |
diff --git a/arch/powerpc/configs/adder875-redboot_defconfig b/arch/powerpc/configs/adder875-redboot_defconfig deleted file mode 100644 index cab5f9b64567..000000000000 --- a/arch/powerpc/configs/adder875-redboot_defconfig +++ /dev/null | |||
@@ -1,798 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.24-rc6 | ||
4 | # Thu Jan 17 16:17:38 2008 | ||
5 | # | ||
6 | # CONFIG_PPC64 is not set | ||
7 | |||
8 | # | ||
9 | # Processor support | ||
10 | # | ||
11 | # CONFIG_6xx is not set | ||
12 | # CONFIG_PPC_85xx is not set | ||
13 | CONFIG_PPC_8xx=y | ||
14 | # CONFIG_40x is not set | ||
15 | # CONFIG_44x is not set | ||
16 | # CONFIG_E200 is not set | ||
17 | CONFIG_8xx=y | ||
18 | # CONFIG_PPC_MM_SLICES is not set | ||
19 | CONFIG_NOT_COHERENT_CACHE=y | ||
20 | CONFIG_PPC32=y | ||
21 | CONFIG_WORD_SIZE=32 | ||
22 | CONFIG_PPC_MERGE=y | ||
23 | CONFIG_MMU=y | ||
24 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
25 | CONFIG_GENERIC_TIME=y | ||
26 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
27 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
28 | CONFIG_GENERIC_HARDIRQS=y | ||
29 | CONFIG_IRQ_PER_CPU=y | ||
30 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
31 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
32 | CONFIG_GENERIC_HWEIGHT=y | ||
33 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
34 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
35 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
36 | CONFIG_PPC=y | ||
37 | CONFIG_EARLY_PRINTK=y | ||
38 | CONFIG_GENERIC_NVRAM=y | ||
39 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
40 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
41 | CONFIG_PPC_OF=y | ||
42 | CONFIG_OF=y | ||
43 | # CONFIG_PPC_UDBG_16550 is not set | ||
44 | # CONFIG_GENERIC_TBSYNC is not set | ||
45 | CONFIG_AUDIT_ARCH=y | ||
46 | CONFIG_GENERIC_BUG=y | ||
47 | # CONFIG_DEFAULT_UIMAGE is not set | ||
48 | CONFIG_REDBOOT=y | ||
49 | # CONFIG_PPC_DCR_NATIVE is not set | ||
50 | # CONFIG_PPC_DCR_MMIO is not set | ||
51 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
52 | |||
53 | # | ||
54 | # General setup | ||
55 | # | ||
56 | CONFIG_EXPERIMENTAL=y | ||
57 | CONFIG_BROKEN_ON_SMP=y | ||
58 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
59 | CONFIG_LOCALVERSION="" | ||
60 | CONFIG_LOCALVERSION_AUTO=y | ||
61 | # CONFIG_SWAP is not set | ||
62 | CONFIG_SYSVIPC=y | ||
63 | CONFIG_SYSVIPC_SYSCTL=y | ||
64 | # CONFIG_POSIX_MQUEUE is not set | ||
65 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
66 | # CONFIG_TASKSTATS is not set | ||
67 | # CONFIG_USER_NS is not set | ||
68 | # CONFIG_PID_NS is not set | ||
69 | # CONFIG_AUDIT is not set | ||
70 | # CONFIG_IKCONFIG is not set | ||
71 | CONFIG_LOG_BUF_SHIFT=14 | ||
72 | # CONFIG_CGROUPS is not set | ||
73 | CONFIG_FAIR_GROUP_SCHED=y | ||
74 | CONFIG_FAIR_USER_SCHED=y | ||
75 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
76 | CONFIG_SYSFS_DEPRECATED=y | ||
77 | # CONFIG_RELAY is not set | ||
78 | # CONFIG_BLK_DEV_INITRD is not set | ||
79 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
80 | CONFIG_SYSCTL=y | ||
81 | CONFIG_EMBEDDED=y | ||
82 | # CONFIG_SYSCTL_SYSCALL is not set | ||
83 | CONFIG_KALLSYMS=y | ||
84 | # CONFIG_KALLSYMS_ALL is not set | ||
85 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
86 | CONFIG_HOTPLUG=y | ||
87 | CONFIG_PRINTK=y | ||
88 | CONFIG_BUG=y | ||
89 | # CONFIG_ELF_CORE is not set | ||
90 | # CONFIG_BASE_FULL is not set | ||
91 | # CONFIG_FUTEX is not set | ||
92 | CONFIG_ANON_INODES=y | ||
93 | CONFIG_EPOLL=y | ||
94 | CONFIG_SIGNALFD=y | ||
95 | CONFIG_EVENTFD=y | ||
96 | CONFIG_SHMEM=y | ||
97 | # CONFIG_VM_EVENT_COUNTERS is not set | ||
98 | CONFIG_SLUB_DEBUG=y | ||
99 | # CONFIG_SLAB is not set | ||
100 | CONFIG_SLUB=y | ||
101 | # CONFIG_SLOB is not set | ||
102 | # CONFIG_TINY_SHMEM is not set | ||
103 | CONFIG_BASE_SMALL=1 | ||
104 | # CONFIG_MODULES is not set | ||
105 | CONFIG_BLOCK=y | ||
106 | # CONFIG_LBD is not set | ||
107 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
108 | # CONFIG_LSF is not set | ||
109 | # CONFIG_BLK_DEV_BSG is not set | ||
110 | |||
111 | # | ||
112 | # IO Schedulers | ||
113 | # | ||
114 | CONFIG_IOSCHED_NOOP=y | ||
115 | # CONFIG_IOSCHED_AS is not set | ||
116 | CONFIG_IOSCHED_DEADLINE=y | ||
117 | # CONFIG_IOSCHED_CFQ is not set | ||
118 | # CONFIG_DEFAULT_AS is not set | ||
119 | CONFIG_DEFAULT_DEADLINE=y | ||
120 | # CONFIG_DEFAULT_CFQ is not set | ||
121 | # CONFIG_DEFAULT_NOOP is not set | ||
122 | CONFIG_DEFAULT_IOSCHED="deadline" | ||
123 | |||
124 | # | ||
125 | # Platform support | ||
126 | # | ||
127 | # CONFIG_PPC_MPC52xx is not set | ||
128 | # CONFIG_PPC_MPC5200 is not set | ||
129 | # CONFIG_PPC_CELL is not set | ||
130 | # CONFIG_PPC_CELL_NATIVE is not set | ||
131 | CONFIG_CPM1=y | ||
132 | # CONFIG_MPC8XXFADS is not set | ||
133 | # CONFIG_MPC86XADS is not set | ||
134 | # CONFIG_MPC885ADS is not set | ||
135 | # CONFIG_PPC_EP88XC is not set | ||
136 | CONFIG_PPC_ADDER875=y | ||
137 | |||
138 | # | ||
139 | # MPC8xx CPM Options | ||
140 | # | ||
141 | |||
142 | # | ||
143 | # Generic MPC8xx Options | ||
144 | # | ||
145 | CONFIG_8xx_COPYBACK=y | ||
146 | # CONFIG_8xx_CPU6 is not set | ||
147 | CONFIG_8xx_CPU15=y | ||
148 | CONFIG_NO_UCODE_PATCH=y | ||
149 | # CONFIG_USB_SOF_UCODE_PATCH is not set | ||
150 | # CONFIG_I2C_SPI_UCODE_PATCH is not set | ||
151 | # CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set | ||
152 | # CONFIG_PQ2ADS is not set | ||
153 | # CONFIG_MPIC is not set | ||
154 | # CONFIG_MPIC_WEIRD is not set | ||
155 | # CONFIG_PPC_I8259 is not set | ||
156 | # CONFIG_PPC_RTAS is not set | ||
157 | # CONFIG_MMIO_NVRAM is not set | ||
158 | # CONFIG_PPC_MPC106 is not set | ||
159 | # CONFIG_PPC_970_NAP is not set | ||
160 | # CONFIG_PPC_INDIRECT_IO is not set | ||
161 | # CONFIG_GENERIC_IOMAP is not set | ||
162 | # CONFIG_CPU_FREQ is not set | ||
163 | # CONFIG_CPM2 is not set | ||
164 | CONFIG_PPC_CPM_NEW_BINDING=y | ||
165 | # CONFIG_FSL_ULI1575 is not set | ||
166 | CONFIG_CPM=y | ||
167 | |||
168 | # | ||
169 | # Kernel options | ||
170 | # | ||
171 | # CONFIG_HIGHMEM is not set | ||
172 | # CONFIG_TICK_ONESHOT is not set | ||
173 | # CONFIG_NO_HZ is not set | ||
174 | # CONFIG_HIGH_RES_TIMERS is not set | ||
175 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
176 | # CONFIG_HZ_100 is not set | ||
177 | # CONFIG_HZ_250 is not set | ||
178 | # CONFIG_HZ_300 is not set | ||
179 | CONFIG_HZ_1000=y | ||
180 | CONFIG_HZ=1000 | ||
181 | CONFIG_PREEMPT_NONE=y | ||
182 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
183 | # CONFIG_PREEMPT is not set | ||
184 | CONFIG_BINFMT_ELF=y | ||
185 | # CONFIG_BINFMT_MISC is not set | ||
186 | # CONFIG_MATH_EMULATION is not set | ||
187 | # CONFIG_8XX_MINIMAL_FPEMU is not set | ||
188 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
189 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
190 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
191 | CONFIG_SELECT_MEMORY_MODEL=y | ||
192 | CONFIG_FLATMEM_MANUAL=y | ||
193 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
194 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
195 | CONFIG_FLATMEM=y | ||
196 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
197 | # CONFIG_SPARSEMEM_STATIC is not set | ||
198 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
199 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
200 | # CONFIG_RESOURCES_64BIT is not set | ||
201 | CONFIG_ZONE_DMA_FLAG=1 | ||
202 | CONFIG_BOUNCE=y | ||
203 | CONFIG_VIRT_TO_BUS=y | ||
204 | # CONFIG_PROC_DEVICETREE is not set | ||
205 | # CONFIG_CMDLINE_BOOL is not set | ||
206 | # CONFIG_PM is not set | ||
207 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
208 | CONFIG_HIBERNATION_UP_POSSIBLE=y | ||
209 | # CONFIG_SECCOMP is not set | ||
210 | CONFIG_WANT_DEVICE_TREE=y | ||
211 | CONFIG_DEVICE_TREE="adder875-redboot.dts" | ||
212 | CONFIG_ISA_DMA_API=y | ||
213 | |||
214 | # | ||
215 | # Bus options | ||
216 | # | ||
217 | CONFIG_ZONE_DMA=y | ||
218 | CONFIG_FSL_SOC=y | ||
219 | # CONFIG_PCI is not set | ||
220 | # CONFIG_PCI_DOMAINS is not set | ||
221 | # CONFIG_PCI_SYSCALL is not set | ||
222 | # CONFIG_PCI_QSPAN is not set | ||
223 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
224 | # CONFIG_PCCARD is not set | ||
225 | |||
226 | # | ||
227 | # Advanced setup | ||
228 | # | ||
229 | # CONFIG_ADVANCED_OPTIONS is not set | ||
230 | |||
231 | # | ||
232 | # Default settings for advanced configuration options are used | ||
233 | # | ||
234 | CONFIG_HIGHMEM_START=0xfe000000 | ||
235 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
236 | CONFIG_KERNEL_START=0xc0000000 | ||
237 | CONFIG_TASK_SIZE=0x80000000 | ||
238 | CONFIG_CONSISTENT_START=0xfd000000 | ||
239 | CONFIG_CONSISTENT_SIZE=0x00200000 | ||
240 | CONFIG_BOOT_LOAD=0x00400000 | ||
241 | |||
242 | # | ||
243 | # Networking | ||
244 | # | ||
245 | CONFIG_NET=y | ||
246 | |||
247 | # | ||
248 | # Networking options | ||
249 | # | ||
250 | CONFIG_PACKET=y | ||
251 | # CONFIG_PACKET_MMAP is not set | ||
252 | CONFIG_UNIX=y | ||
253 | # CONFIG_NET_KEY is not set | ||
254 | CONFIG_INET=y | ||
255 | CONFIG_IP_MULTICAST=y | ||
256 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
257 | CONFIG_IP_FIB_HASH=y | ||
258 | CONFIG_IP_PNP=y | ||
259 | # CONFIG_IP_PNP_DHCP is not set | ||
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_IP_MROUTE is not set | ||
265 | # CONFIG_ARPD is not set | ||
266 | CONFIG_SYN_COOKIES=y | ||
267 | # CONFIG_INET_AH is not set | ||
268 | # CONFIG_INET_ESP is not set | ||
269 | # CONFIG_INET_IPCOMP is not set | ||
270 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
271 | # CONFIG_INET_TUNNEL is not set | ||
272 | # CONFIG_INET_XFRM_MODE_TRANSPORT is not set | ||
273 | # CONFIG_INET_XFRM_MODE_TUNNEL is not set | ||
274 | # CONFIG_INET_XFRM_MODE_BEET is not set | ||
275 | # CONFIG_INET_LRO is not set | ||
276 | CONFIG_INET_DIAG=y | ||
277 | CONFIG_INET_TCP_DIAG=y | ||
278 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
279 | CONFIG_TCP_CONG_CUBIC=y | ||
280 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
281 | # CONFIG_TCP_MD5SIG is not set | ||
282 | # CONFIG_IPV6 is not set | ||
283 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
284 | # CONFIG_INET6_TUNNEL is not set | ||
285 | # CONFIG_NETWORK_SECMARK is not set | ||
286 | # CONFIG_NETFILTER is not set | ||
287 | # CONFIG_IP_DCCP is not set | ||
288 | # CONFIG_IP_SCTP is not set | ||
289 | # CONFIG_TIPC is not set | ||
290 | # CONFIG_ATM is not set | ||
291 | # CONFIG_BRIDGE is not set | ||
292 | # CONFIG_VLAN_8021Q is not set | ||
293 | # CONFIG_DECNET is not set | ||
294 | # CONFIG_LLC2 is not set | ||
295 | # CONFIG_IPX is not set | ||
296 | # CONFIG_ATALK is not set | ||
297 | # CONFIG_X25 is not set | ||
298 | # CONFIG_LAPB is not set | ||
299 | # CONFIG_ECONET is not set | ||
300 | # CONFIG_WAN_ROUTER is not set | ||
301 | # CONFIG_NET_SCHED is not set | ||
302 | |||
303 | # | ||
304 | # Network testing | ||
305 | # | ||
306 | # CONFIG_NET_PKTGEN is not set | ||
307 | # CONFIG_HAMRADIO is not set | ||
308 | # CONFIG_IRDA is not set | ||
309 | # CONFIG_BT is not set | ||
310 | # CONFIG_AF_RXRPC is not set | ||
311 | |||
312 | # | ||
313 | # Wireless | ||
314 | # | ||
315 | # CONFIG_CFG80211 is not set | ||
316 | # CONFIG_WIRELESS_EXT is not set | ||
317 | # CONFIG_MAC80211 is not set | ||
318 | # CONFIG_IEEE80211 is not set | ||
319 | # CONFIG_RFKILL is not set | ||
320 | # CONFIG_NET_9P is not set | ||
321 | |||
322 | # | ||
323 | # Device Drivers | ||
324 | # | ||
325 | |||
326 | # | ||
327 | # Generic Driver Options | ||
328 | # | ||
329 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
330 | CONFIG_STANDALONE=y | ||
331 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
332 | # CONFIG_FW_LOADER is not set | ||
333 | # CONFIG_DEBUG_DRIVER is not set | ||
334 | # CONFIG_DEBUG_DEVRES is not set | ||
335 | # CONFIG_SYS_HYPERVISOR is not set | ||
336 | # CONFIG_CONNECTOR is not set | ||
337 | CONFIG_MTD=y | ||
338 | # CONFIG_MTD_DEBUG is not set | ||
339 | # CONFIG_MTD_CONCAT is not set | ||
340 | # CONFIG_MTD_PARTITIONS is not set | ||
341 | |||
342 | # | ||
343 | # User Modules And Translation Layers | ||
344 | # | ||
345 | CONFIG_MTD_CHAR=y | ||
346 | CONFIG_MTD_BLKDEVS=y | ||
347 | CONFIG_MTD_BLOCK=y | ||
348 | # CONFIG_FTL is not set | ||
349 | # CONFIG_NFTL is not set | ||
350 | # CONFIG_INFTL is not set | ||
351 | # CONFIG_RFD_FTL is not set | ||
352 | # CONFIG_SSFDC is not set | ||
353 | # CONFIG_MTD_OOPS is not set | ||
354 | |||
355 | # | ||
356 | # RAM/ROM/Flash chip drivers | ||
357 | # | ||
358 | CONFIG_MTD_CFI=y | ||
359 | # CONFIG_MTD_JEDECPROBE is not set | ||
360 | CONFIG_MTD_GEN_PROBE=y | ||
361 | # CONFIG_MTD_CFI_ADV_OPTIONS is not set | ||
362 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
363 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
364 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
365 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
366 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
367 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
368 | CONFIG_MTD_CFI_I1=y | ||
369 | CONFIG_MTD_CFI_I2=y | ||
370 | # CONFIG_MTD_CFI_I4 is not set | ||
371 | # CONFIG_MTD_CFI_I8 is not set | ||
372 | # CONFIG_MTD_CFI_INTELEXT is not set | ||
373 | CONFIG_MTD_CFI_AMDSTD=y | ||
374 | # CONFIG_MTD_CFI_STAA is not set | ||
375 | CONFIG_MTD_CFI_UTIL=y | ||
376 | # CONFIG_MTD_RAM is not set | ||
377 | # CONFIG_MTD_ROM is not set | ||
378 | # CONFIG_MTD_ABSENT is not set | ||
379 | |||
380 | # | ||
381 | # Mapping drivers for chip access | ||
382 | # | ||
383 | # CONFIG_MTD_COMPLEX_MAPPINGS is not set | ||
384 | # CONFIG_MTD_PHYSMAP is not set | ||
385 | CONFIG_MTD_PHYSMAP_OF=y | ||
386 | # CONFIG_MTD_CFI_FLAGADM is not set | ||
387 | # CONFIG_MTD_PLATRAM is not set | ||
388 | |||
389 | # | ||
390 | # Self-contained MTD device drivers | ||
391 | # | ||
392 | # CONFIG_MTD_SLRAM is not set | ||
393 | # CONFIG_MTD_PHRAM is not set | ||
394 | # CONFIG_MTD_MTDRAM is not set | ||
395 | # CONFIG_MTD_BLOCK2MTD is not set | ||
396 | |||
397 | # | ||
398 | # Disk-On-Chip Device Drivers | ||
399 | # | ||
400 | # CONFIG_MTD_DOC2000 is not set | ||
401 | # CONFIG_MTD_DOC2001 is not set | ||
402 | # CONFIG_MTD_DOC2001PLUS is not set | ||
403 | # CONFIG_MTD_NAND is not set | ||
404 | # CONFIG_MTD_ONENAND is not set | ||
405 | |||
406 | # | ||
407 | # UBI - Unsorted block images | ||
408 | # | ||
409 | # CONFIG_MTD_UBI is not set | ||
410 | CONFIG_OF_DEVICE=y | ||
411 | # CONFIG_PARPORT is not set | ||
412 | # CONFIG_BLK_DEV is not set | ||
413 | # CONFIG_MISC_DEVICES is not set | ||
414 | # CONFIG_IDE is not set | ||
415 | |||
416 | # | ||
417 | # SCSI device support | ||
418 | # | ||
419 | # CONFIG_RAID_ATTRS is not set | ||
420 | # CONFIG_SCSI is not set | ||
421 | # CONFIG_SCSI_DMA is not set | ||
422 | # CONFIG_SCSI_NETLINK is not set | ||
423 | # CONFIG_ATA is not set | ||
424 | # CONFIG_MD is not set | ||
425 | # CONFIG_MACINTOSH_DRIVERS is not set | ||
426 | CONFIG_NETDEVICES=y | ||
427 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
428 | # CONFIG_DUMMY is not set | ||
429 | # CONFIG_BONDING is not set | ||
430 | # CONFIG_MACVLAN is not set | ||
431 | # CONFIG_EQUALIZER is not set | ||
432 | # CONFIG_TUN is not set | ||
433 | # CONFIG_VETH is not set | ||
434 | CONFIG_PHYLIB=y | ||
435 | |||
436 | # | ||
437 | # MII PHY device drivers | ||
438 | # | ||
439 | # CONFIG_MARVELL_PHY is not set | ||
440 | CONFIG_DAVICOM_PHY=y | ||
441 | # CONFIG_QSEMI_PHY is not set | ||
442 | # CONFIG_LXT_PHY is not set | ||
443 | # CONFIG_CICADA_PHY is not set | ||
444 | # CONFIG_VITESSE_PHY is not set | ||
445 | # CONFIG_SMSC_PHY is not set | ||
446 | # CONFIG_BROADCOM_PHY is not set | ||
447 | # CONFIG_ICPLUS_PHY is not set | ||
448 | # CONFIG_FIXED_PHY is not set | ||
449 | # CONFIG_MDIO_BITBANG is not set | ||
450 | CONFIG_NET_ETHERNET=y | ||
451 | CONFIG_MII=y | ||
452 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
453 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
454 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
455 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
456 | # CONFIG_B44 is not set | ||
457 | CONFIG_FS_ENET=y | ||
458 | # CONFIG_FS_ENET_HAS_SCC is not set | ||
459 | CONFIG_FS_ENET_HAS_FEC=y | ||
460 | CONFIG_FS_ENET_MDIO_FEC=y | ||
461 | # CONFIG_NETDEV_1000 is not set | ||
462 | # CONFIG_NETDEV_10000 is not set | ||
463 | |||
464 | # | ||
465 | # Wireless LAN | ||
466 | # | ||
467 | # CONFIG_WLAN_PRE80211 is not set | ||
468 | # CONFIG_WLAN_80211 is not set | ||
469 | # CONFIG_WAN is not set | ||
470 | # CONFIG_PPP is not set | ||
471 | # CONFIG_SLIP is not set | ||
472 | # CONFIG_SHAPER is not set | ||
473 | # CONFIG_NETCONSOLE is not set | ||
474 | # CONFIG_NETPOLL is not set | ||
475 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
476 | # CONFIG_ISDN is not set | ||
477 | # CONFIG_PHONE is not set | ||
478 | |||
479 | # | ||
480 | # Input device support | ||
481 | # | ||
482 | CONFIG_INPUT=y | ||
483 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
484 | # CONFIG_INPUT_POLLDEV is not set | ||
485 | |||
486 | # | ||
487 | # Userland interfaces | ||
488 | # | ||
489 | CONFIG_INPUT_MOUSEDEV=y | ||
490 | CONFIG_INPUT_MOUSEDEV_PSAUX=y | ||
491 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
492 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
493 | # CONFIG_INPUT_JOYDEV is not set | ||
494 | # CONFIG_INPUT_EVDEV is not set | ||
495 | # CONFIG_INPUT_EVBUG is not set | ||
496 | |||
497 | # | ||
498 | # Input Device Drivers | ||
499 | # | ||
500 | CONFIG_INPUT_KEYBOARD=y | ||
501 | CONFIG_KEYBOARD_ATKBD=y | ||
502 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
503 | # CONFIG_KEYBOARD_LKKBD is not set | ||
504 | # CONFIG_KEYBOARD_XTKBD is not set | ||
505 | # CONFIG_KEYBOARD_NEWTON is not set | ||
506 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
507 | CONFIG_INPUT_MOUSE=y | ||
508 | CONFIG_MOUSE_PS2=y | ||
509 | CONFIG_MOUSE_PS2_ALPS=y | ||
510 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
511 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
512 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
513 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
514 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
515 | # CONFIG_MOUSE_SERIAL is not set | ||
516 | # CONFIG_MOUSE_VSXXXAA is not set | ||
517 | # CONFIG_INPUT_JOYSTICK is not set | ||
518 | # CONFIG_INPUT_TABLET is not set | ||
519 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
520 | # CONFIG_INPUT_MISC is not set | ||
521 | |||
522 | # | ||
523 | # Hardware I/O ports | ||
524 | # | ||
525 | CONFIG_SERIO=y | ||
526 | CONFIG_SERIO_I8042=y | ||
527 | CONFIG_SERIO_SERPORT=y | ||
528 | CONFIG_SERIO_LIBPS2=y | ||
529 | # CONFIG_SERIO_RAW is not set | ||
530 | # CONFIG_GAMEPORT is not set | ||
531 | |||
532 | # | ||
533 | # Character devices | ||
534 | # | ||
535 | # CONFIG_VT is not set | ||
536 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
537 | |||
538 | # | ||
539 | # Serial drivers | ||
540 | # | ||
541 | # CONFIG_SERIAL_8250 is not set | ||
542 | |||
543 | # | ||
544 | # Non-8250 serial port support | ||
545 | # | ||
546 | # CONFIG_SERIAL_UARTLITE is not set | ||
547 | CONFIG_SERIAL_CORE=y | ||
548 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
549 | CONFIG_SERIAL_CPM=y | ||
550 | CONFIG_SERIAL_CPM_CONSOLE=y | ||
551 | # CONFIG_SERIAL_CPM_SCC1 is not set | ||
552 | # CONFIG_SERIAL_CPM_SCC2 is not set | ||
553 | # CONFIG_SERIAL_CPM_SCC3 is not set | ||
554 | # CONFIG_SERIAL_CPM_SCC4 is not set | ||
555 | CONFIG_SERIAL_CPM_SMC1=y | ||
556 | CONFIG_SERIAL_CPM_SMC2=y | ||
557 | CONFIG_UNIX98_PTYS=y | ||
558 | # CONFIG_LEGACY_PTYS is not set | ||
559 | # CONFIG_IPMI_HANDLER is not set | ||
560 | CONFIG_HW_RANDOM=y | ||
561 | # CONFIG_NVRAM is not set | ||
562 | CONFIG_GEN_RTC=y | ||
563 | # CONFIG_GEN_RTC_X is not set | ||
564 | # CONFIG_R3964 is not set | ||
565 | # CONFIG_RAW_DRIVER is not set | ||
566 | # CONFIG_TCG_TPM is not set | ||
567 | # CONFIG_I2C is not set | ||
568 | |||
569 | # | ||
570 | # SPI support | ||
571 | # | ||
572 | # CONFIG_SPI is not set | ||
573 | # CONFIG_SPI_MASTER is not set | ||
574 | # CONFIG_W1 is not set | ||
575 | # CONFIG_POWER_SUPPLY is not set | ||
576 | # CONFIG_HWMON is not set | ||
577 | # CONFIG_WATCHDOG is not set | ||
578 | |||
579 | # | ||
580 | # Sonics Silicon Backplane | ||
581 | # | ||
582 | CONFIG_SSB_POSSIBLE=y | ||
583 | # CONFIG_SSB is not set | ||
584 | |||
585 | # | ||
586 | # Multifunction device drivers | ||
587 | # | ||
588 | # CONFIG_MFD_SM501 is not set | ||
589 | |||
590 | # | ||
591 | # Multimedia devices | ||
592 | # | ||
593 | # CONFIG_VIDEO_DEV is not set | ||
594 | # CONFIG_DVB_CORE is not set | ||
595 | CONFIG_DAB=y | ||
596 | |||
597 | # | ||
598 | # Graphics support | ||
599 | # | ||
600 | # CONFIG_VGASTATE is not set | ||
601 | CONFIG_VIDEO_OUTPUT_CONTROL=y | ||
602 | # CONFIG_FB is not set | ||
603 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
604 | |||
605 | # | ||
606 | # Display device support | ||
607 | # | ||
608 | # CONFIG_DISPLAY_SUPPORT is not set | ||
609 | |||
610 | # | ||
611 | # Sound | ||
612 | # | ||
613 | # CONFIG_SOUND is not set | ||
614 | # CONFIG_HID_SUPPORT is not set | ||
615 | # CONFIG_USB_SUPPORT is not set | ||
616 | # CONFIG_MMC is not set | ||
617 | # CONFIG_NEW_LEDS is not set | ||
618 | # CONFIG_EDAC is not set | ||
619 | # CONFIG_RTC_CLASS is not set | ||
620 | |||
621 | # | ||
622 | # Userspace I/O | ||
623 | # | ||
624 | # CONFIG_UIO is not set | ||
625 | |||
626 | # | ||
627 | # File systems | ||
628 | # | ||
629 | # CONFIG_EXT2_FS is not set | ||
630 | # CONFIG_EXT3_FS is not set | ||
631 | # CONFIG_EXT4DEV_FS is not set | ||
632 | # CONFIG_REISERFS_FS is not set | ||
633 | # CONFIG_JFS_FS is not set | ||
634 | # CONFIG_FS_POSIX_ACL is not set | ||
635 | # CONFIG_XFS_FS is not set | ||
636 | # CONFIG_GFS2_FS is not set | ||
637 | # CONFIG_OCFS2_FS is not set | ||
638 | # CONFIG_MINIX_FS is not set | ||
639 | # CONFIG_ROMFS_FS is not set | ||
640 | # CONFIG_INOTIFY is not set | ||
641 | # CONFIG_QUOTA is not set | ||
642 | # CONFIG_DNOTIFY is not set | ||
643 | # CONFIG_AUTOFS_FS is not set | ||
644 | # CONFIG_AUTOFS4_FS is not set | ||
645 | # CONFIG_FUSE_FS is not set | ||
646 | |||
647 | # | ||
648 | # CD-ROM/DVD Filesystems | ||
649 | # | ||
650 | # CONFIG_ISO9660_FS is not set | ||
651 | # CONFIG_UDF_FS is not set | ||
652 | |||
653 | # | ||
654 | # DOS/FAT/NT Filesystems | ||
655 | # | ||
656 | # CONFIG_MSDOS_FS is not set | ||
657 | # CONFIG_VFAT_FS is not set | ||
658 | # CONFIG_NTFS_FS is not set | ||
659 | |||
660 | # | ||
661 | # Pseudo filesystems | ||
662 | # | ||
663 | CONFIG_PROC_FS=y | ||
664 | # CONFIG_PROC_KCORE is not set | ||
665 | CONFIG_PROC_SYSCTL=y | ||
666 | CONFIG_SYSFS=y | ||
667 | CONFIG_TMPFS=y | ||
668 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
669 | # CONFIG_HUGETLB_PAGE is not set | ||
670 | # CONFIG_CONFIGFS_FS is not set | ||
671 | |||
672 | # | ||
673 | # Miscellaneous filesystems | ||
674 | # | ||
675 | # CONFIG_ADFS_FS is not set | ||
676 | # CONFIG_AFFS_FS is not set | ||
677 | # CONFIG_HFS_FS is not set | ||
678 | # CONFIG_HFSPLUS_FS is not set | ||
679 | # CONFIG_BEFS_FS is not set | ||
680 | # CONFIG_BFS_FS is not set | ||
681 | # CONFIG_EFS_FS is not set | ||
682 | # CONFIG_JFFS2_FS is not set | ||
683 | CONFIG_CRAMFS=y | ||
684 | # CONFIG_VXFS_FS is not set | ||
685 | # CONFIG_HPFS_FS is not set | ||
686 | # CONFIG_QNX4FS_FS is not set | ||
687 | # CONFIG_SYSV_FS is not set | ||
688 | # CONFIG_UFS_FS is not set | ||
689 | CONFIG_NETWORK_FILESYSTEMS=y | ||
690 | CONFIG_NFS_FS=y | ||
691 | CONFIG_NFS_V3=y | ||
692 | # CONFIG_NFS_V3_ACL is not set | ||
693 | # CONFIG_NFS_V4 is not set | ||
694 | # CONFIG_NFS_DIRECTIO is not set | ||
695 | # CONFIG_NFSD is not set | ||
696 | CONFIG_ROOT_NFS=y | ||
697 | CONFIG_LOCKD=y | ||
698 | CONFIG_LOCKD_V4=y | ||
699 | CONFIG_NFS_COMMON=y | ||
700 | CONFIG_SUNRPC=y | ||
701 | # CONFIG_SUNRPC_BIND34 is not set | ||
702 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
703 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
704 | # CONFIG_SMB_FS is not set | ||
705 | # CONFIG_CIFS is not set | ||
706 | # CONFIG_NCP_FS is not set | ||
707 | # CONFIG_CODA_FS is not set | ||
708 | # CONFIG_AFS_FS is not set | ||
709 | |||
710 | # | ||
711 | # Partition Types | ||
712 | # | ||
713 | CONFIG_PARTITION_ADVANCED=y | ||
714 | # CONFIG_ACORN_PARTITION is not set | ||
715 | # CONFIG_OSF_PARTITION is not set | ||
716 | # CONFIG_AMIGA_PARTITION is not set | ||
717 | # CONFIG_ATARI_PARTITION is not set | ||
718 | # CONFIG_MAC_PARTITION is not set | ||
719 | CONFIG_MSDOS_PARTITION=y | ||
720 | # CONFIG_BSD_DISKLABEL is not set | ||
721 | # CONFIG_MINIX_SUBPARTITION is not set | ||
722 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
723 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
724 | # CONFIG_LDM_PARTITION is not set | ||
725 | # CONFIG_SGI_PARTITION is not set | ||
726 | # CONFIG_ULTRIX_PARTITION is not set | ||
727 | # CONFIG_SUN_PARTITION is not set | ||
728 | # CONFIG_KARMA_PARTITION is not set | ||
729 | # CONFIG_EFI_PARTITION is not set | ||
730 | # CONFIG_SYSV68_PARTITION is not set | ||
731 | # CONFIG_NLS is not set | ||
732 | # CONFIG_DLM is not set | ||
733 | # CONFIG_UCC_SLOW is not set | ||
734 | |||
735 | # | ||
736 | # Library routines | ||
737 | # | ||
738 | # CONFIG_CRC_CCITT is not set | ||
739 | # CONFIG_CRC16 is not set | ||
740 | # CONFIG_CRC_ITU_T is not set | ||
741 | # CONFIG_CRC32 is not set | ||
742 | # CONFIG_CRC7 is not set | ||
743 | # CONFIG_LIBCRC32C is not set | ||
744 | CONFIG_ZLIB_INFLATE=y | ||
745 | CONFIG_HAS_IOMEM=y | ||
746 | CONFIG_HAS_IOPORT=y | ||
747 | CONFIG_HAS_DMA=y | ||
748 | CONFIG_INSTRUMENTATION=y | ||
749 | # CONFIG_PROFILING is not set | ||
750 | # CONFIG_MARKERS is not set | ||
751 | |||
752 | # | ||
753 | # Kernel hacking | ||
754 | # | ||
755 | # CONFIG_PRINTK_TIME is not set | ||
756 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
757 | CONFIG_ENABLE_MUST_CHECK=y | ||
758 | CONFIG_MAGIC_SYSRQ=y | ||
759 | # CONFIG_UNUSED_SYMBOLS is not set | ||
760 | # CONFIG_DEBUG_FS is not set | ||
761 | # CONFIG_HEADERS_CHECK is not set | ||
762 | CONFIG_DEBUG_KERNEL=y | ||
763 | # CONFIG_DEBUG_SHIRQ is not set | ||
764 | CONFIG_DETECT_SOFTLOCKUP=y | ||
765 | CONFIG_SCHED_DEBUG=y | ||
766 | # CONFIG_SCHEDSTATS is not set | ||
767 | # CONFIG_TIMER_STATS is not set | ||
768 | # CONFIG_SLUB_DEBUG_ON is not set | ||
769 | # CONFIG_DEBUG_SPINLOCK is not set | ||
770 | # CONFIG_DEBUG_MUTEXES is not set | ||
771 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
772 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
773 | # CONFIG_DEBUG_KOBJECT is not set | ||
774 | CONFIG_DEBUG_BUGVERBOSE=y | ||
775 | CONFIG_DEBUG_INFO=y | ||
776 | # CONFIG_DEBUG_VM is not set | ||
777 | # CONFIG_DEBUG_LIST is not set | ||
778 | # CONFIG_DEBUG_SG is not set | ||
779 | CONFIG_FORCED_INLINING=y | ||
780 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
781 | # CONFIG_FAULT_INJECTION is not set | ||
782 | # CONFIG_SAMPLES is not set | ||
783 | # CONFIG_DEBUG_STACKOVERFLOW is not set | ||
784 | # CONFIG_DEBUG_STACK_USAGE is not set | ||
785 | # CONFIG_DEBUG_PAGEALLOC is not set | ||
786 | # CONFIG_DEBUGGER is not set | ||
787 | # CONFIG_BDI_SWITCH is not set | ||
788 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
789 | |||
790 | # | ||
791 | # Security options | ||
792 | # | ||
793 | # CONFIG_KEYS is not set | ||
794 | # CONFIG_SECURITY is not set | ||
795 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
796 | # CONFIG_CRYPTO is not set | ||
797 | # CONFIG_PPC_CLOCK is not set | ||
798 | CONFIG_PPC_LIB_RHEAP=y | ||
diff --git a/arch/powerpc/configs/adder875-uboot_defconfig b/arch/powerpc/configs/adder875_defconfig index 1faf7ef59a23..a3cc94a2ff06 100644 --- a/arch/powerpc/configs/adder875-uboot_defconfig +++ b/arch/powerpc/configs/adder875_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.24-rc6 | 3 | # Linux kernel version: 2.6.25-rc2 |
4 | # Thu Jan 17 16:17:18 2008 | 4 | # Wed Feb 20 12:26:07 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -26,6 +26,7 @@ CONFIG_GENERIC_TIME=y | |||
26 | CONFIG_GENERIC_TIME_VSYSCALL=y | 26 | CONFIG_GENERIC_TIME_VSYSCALL=y |
27 | CONFIG_GENERIC_CLOCKEVENTS=y | 27 | CONFIG_GENERIC_CLOCKEVENTS=y |
28 | CONFIG_GENERIC_HARDIRQS=y | 28 | CONFIG_GENERIC_HARDIRQS=y |
29 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
29 | CONFIG_IRQ_PER_CPU=y | 30 | CONFIG_IRQ_PER_CPU=y |
30 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 31 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
31 | CONFIG_ARCH_HAS_ILOG2_U32=y | 32 | CONFIG_ARCH_HAS_ILOG2_U32=y |
@@ -64,17 +65,18 @@ CONFIG_SYSVIPC_SYSCTL=y | |||
64 | # CONFIG_POSIX_MQUEUE is not set | 65 | # CONFIG_POSIX_MQUEUE is not set |
65 | # CONFIG_BSD_PROCESS_ACCT is not set | 66 | # CONFIG_BSD_PROCESS_ACCT is not set |
66 | # CONFIG_TASKSTATS is not set | 67 | # CONFIG_TASKSTATS is not set |
67 | # CONFIG_USER_NS is not set | ||
68 | # CONFIG_PID_NS is not set | ||
69 | # CONFIG_AUDIT is not set | 68 | # CONFIG_AUDIT is not set |
70 | # CONFIG_IKCONFIG is not set | 69 | # CONFIG_IKCONFIG is not set |
71 | CONFIG_LOG_BUF_SHIFT=14 | 70 | CONFIG_LOG_BUF_SHIFT=14 |
72 | # CONFIG_CGROUPS is not set | 71 | # CONFIG_CGROUPS is not set |
72 | CONFIG_GROUP_SCHED=y | ||
73 | CONFIG_FAIR_GROUP_SCHED=y | 73 | CONFIG_FAIR_GROUP_SCHED=y |
74 | CONFIG_FAIR_USER_SCHED=y | 74 | # CONFIG_RT_GROUP_SCHED is not set |
75 | # CONFIG_FAIR_CGROUP_SCHED is not set | 75 | CONFIG_USER_SCHED=y |
76 | # CONFIG_CGROUP_SCHED is not set | ||
76 | CONFIG_SYSFS_DEPRECATED=y | 77 | CONFIG_SYSFS_DEPRECATED=y |
77 | # CONFIG_RELAY is not set | 78 | # CONFIG_RELAY is not set |
79 | # CONFIG_NAMESPACES is not set | ||
78 | # CONFIG_BLK_DEV_INITRD is not set | 80 | # CONFIG_BLK_DEV_INITRD is not set |
79 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | 81 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set |
80 | CONFIG_SYSCTL=y | 82 | CONFIG_SYSCTL=y |
@@ -87,11 +89,13 @@ CONFIG_HOTPLUG=y | |||
87 | CONFIG_PRINTK=y | 89 | CONFIG_PRINTK=y |
88 | CONFIG_BUG=y | 90 | CONFIG_BUG=y |
89 | # CONFIG_ELF_CORE is not set | 91 | # CONFIG_ELF_CORE is not set |
92 | CONFIG_COMPAT_BRK=y | ||
90 | # CONFIG_BASE_FULL is not set | 93 | # CONFIG_BASE_FULL is not set |
91 | # CONFIG_FUTEX is not set | 94 | # CONFIG_FUTEX is not set |
92 | CONFIG_ANON_INODES=y | 95 | CONFIG_ANON_INODES=y |
93 | CONFIG_EPOLL=y | 96 | CONFIG_EPOLL=y |
94 | CONFIG_SIGNALFD=y | 97 | CONFIG_SIGNALFD=y |
98 | CONFIG_TIMERFD=y | ||
95 | CONFIG_EVENTFD=y | 99 | CONFIG_EVENTFD=y |
96 | CONFIG_SHMEM=y | 100 | CONFIG_SHMEM=y |
97 | # CONFIG_VM_EVENT_COUNTERS is not set | 101 | # CONFIG_VM_EVENT_COUNTERS is not set |
@@ -99,6 +103,12 @@ CONFIG_SLUB_DEBUG=y | |||
99 | # CONFIG_SLAB is not set | 103 | # CONFIG_SLAB is not set |
100 | CONFIG_SLUB=y | 104 | CONFIG_SLUB=y |
101 | # CONFIG_SLOB is not set | 105 | # CONFIG_SLOB is not set |
106 | # CONFIG_PROFILING is not set | ||
107 | # CONFIG_MARKERS is not set | ||
108 | CONFIG_HAVE_OPROFILE=y | ||
109 | CONFIG_HAVE_KPROBES=y | ||
110 | CONFIG_PROC_PAGE_MONITOR=y | ||
111 | CONFIG_SLABINFO=y | ||
102 | # CONFIG_TINY_SHMEM is not set | 112 | # CONFIG_TINY_SHMEM is not set |
103 | CONFIG_BASE_SMALL=1 | 113 | CONFIG_BASE_SMALL=1 |
104 | # CONFIG_MODULES is not set | 114 | # CONFIG_MODULES is not set |
@@ -120,12 +130,14 @@ CONFIG_DEFAULT_DEADLINE=y | |||
120 | # CONFIG_DEFAULT_CFQ is not set | 130 | # CONFIG_DEFAULT_CFQ is not set |
121 | # CONFIG_DEFAULT_NOOP is not set | 131 | # CONFIG_DEFAULT_NOOP is not set |
122 | CONFIG_DEFAULT_IOSCHED="deadline" | 132 | CONFIG_DEFAULT_IOSCHED="deadline" |
133 | CONFIG_CLASSIC_RCU=y | ||
134 | # CONFIG_PREEMPT_RCU is not set | ||
123 | 135 | ||
124 | # | 136 | # |
125 | # Platform support | 137 | # Platform support |
126 | # | 138 | # |
127 | # CONFIG_PPC_MPC52xx is not set | 139 | # CONFIG_PPC_MPC512x is not set |
128 | # CONFIG_PPC_MPC5200 is not set | 140 | # CONFIG_PPC_MPC5121 is not set |
129 | # CONFIG_PPC_CELL is not set | 141 | # CONFIG_PPC_CELL is not set |
130 | # CONFIG_PPC_CELL_NATIVE is not set | 142 | # CONFIG_PPC_CELL_NATIVE is not set |
131 | CONFIG_CPM1=y | 143 | CONFIG_CPM1=y |
@@ -150,6 +162,7 @@ CONFIG_NO_UCODE_PATCH=y | |||
150 | # CONFIG_I2C_SPI_UCODE_PATCH is not set | 162 | # CONFIG_I2C_SPI_UCODE_PATCH is not set |
151 | # CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set | 163 | # CONFIG_I2C_SPI_SMC1_UCODE_PATCH is not set |
152 | # CONFIG_PQ2ADS is not set | 164 | # CONFIG_PQ2ADS is not set |
165 | # CONFIG_IPIC is not set | ||
153 | # CONFIG_MPIC is not set | 166 | # CONFIG_MPIC is not set |
154 | # CONFIG_MPIC_WEIRD is not set | 167 | # CONFIG_MPIC_WEIRD is not set |
155 | # CONFIG_PPC_I8259 is not set | 168 | # CONFIG_PPC_I8259 is not set |
@@ -160,7 +173,6 @@ CONFIG_NO_UCODE_PATCH=y | |||
160 | # CONFIG_PPC_INDIRECT_IO is not set | 173 | # CONFIG_PPC_INDIRECT_IO is not set |
161 | # CONFIG_GENERIC_IOMAP is not set | 174 | # CONFIG_GENERIC_IOMAP is not set |
162 | # CONFIG_CPU_FREQ is not set | 175 | # CONFIG_CPU_FREQ is not set |
163 | # CONFIG_CPM2 is not set | ||
164 | CONFIG_PPC_CPM_NEW_BINDING=y | 176 | CONFIG_PPC_CPM_NEW_BINDING=y |
165 | # CONFIG_FSL_ULI1575 is not set | 177 | # CONFIG_FSL_ULI1575 is not set |
166 | CONFIG_CPM=y | 178 | CONFIG_CPM=y |
@@ -178,14 +190,19 @@ CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | |||
178 | # CONFIG_HZ_300 is not set | 190 | # CONFIG_HZ_300 is not set |
179 | CONFIG_HZ_1000=y | 191 | CONFIG_HZ_1000=y |
180 | CONFIG_HZ=1000 | 192 | CONFIG_HZ=1000 |
193 | # CONFIG_SCHED_HRTICK is not set | ||
181 | CONFIG_PREEMPT_NONE=y | 194 | CONFIG_PREEMPT_NONE=y |
182 | # CONFIG_PREEMPT_VOLUNTARY is not set | 195 | # CONFIG_PREEMPT_VOLUNTARY is not set |
183 | # CONFIG_PREEMPT is not set | 196 | # CONFIG_PREEMPT is not set |
197 | CONFIG_RCU_TRACE=y | ||
184 | CONFIG_BINFMT_ELF=y | 198 | CONFIG_BINFMT_ELF=y |
185 | # CONFIG_BINFMT_MISC is not set | 199 | # CONFIG_BINFMT_MISC is not set |
186 | # CONFIG_MATH_EMULATION is not set | 200 | # CONFIG_MATH_EMULATION is not set |
187 | # CONFIG_8XX_MINIMAL_FPEMU is not set | 201 | # CONFIG_8XX_MINIMAL_FPEMU is not set |
202 | # CONFIG_IOMMU_HELPER is not set | ||
188 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 203 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
204 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
205 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
189 | CONFIG_ARCH_FLATMEM_ENABLE=y | 206 | CONFIG_ARCH_FLATMEM_ENABLE=y |
190 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 207 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
191 | CONFIG_SELECT_MEMORY_MODEL=y | 208 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -204,11 +221,7 @@ CONFIG_VIRT_TO_BUS=y | |||
204 | # CONFIG_PROC_DEVICETREE is not set | 221 | # CONFIG_PROC_DEVICETREE is not set |
205 | # CONFIG_CMDLINE_BOOL is not set | 222 | # CONFIG_CMDLINE_BOOL is not set |
206 | # CONFIG_PM is not set | 223 | # CONFIG_PM is not set |
207 | CONFIG_SUSPEND_UP_POSSIBLE=y | ||
208 | CONFIG_HIBERNATION_UP_POSSIBLE=y | ||
209 | # CONFIG_SECCOMP is not set | 224 | # CONFIG_SECCOMP is not set |
210 | CONFIG_WANT_DEVICE_TREE=y | ||
211 | CONFIG_DEVICE_TREE="adder875-uboot.dts" | ||
212 | CONFIG_ISA_DMA_API=y | 225 | CONFIG_ISA_DMA_API=y |
213 | 226 | ||
214 | # | 227 | # |
@@ -305,6 +318,7 @@ CONFIG_DEFAULT_TCP_CONG="cubic" | |||
305 | # | 318 | # |
306 | # CONFIG_NET_PKTGEN is not set | 319 | # CONFIG_NET_PKTGEN is not set |
307 | # CONFIG_HAMRADIO is not set | 320 | # CONFIG_HAMRADIO is not set |
321 | # CONFIG_CAN is not set | ||
308 | # CONFIG_IRDA is not set | 322 | # CONFIG_IRDA is not set |
309 | # CONFIG_BT is not set | 323 | # CONFIG_BT is not set |
310 | # CONFIG_AF_RXRPC is not set | 324 | # CONFIG_AF_RXRPC is not set |
@@ -411,6 +425,7 @@ CONFIG_OF_DEVICE=y | |||
411 | # CONFIG_PARPORT is not set | 425 | # CONFIG_PARPORT is not set |
412 | # CONFIG_BLK_DEV is not set | 426 | # CONFIG_BLK_DEV is not set |
413 | # CONFIG_MISC_DEVICES is not set | 427 | # CONFIG_MISC_DEVICES is not set |
428 | CONFIG_HAVE_IDE=y | ||
414 | # CONFIG_IDE is not set | 429 | # CONFIG_IDE is not set |
415 | 430 | ||
416 | # | 431 | # |
@@ -445,6 +460,7 @@ CONFIG_DAVICOM_PHY=y | |||
445 | # CONFIG_SMSC_PHY is not set | 460 | # CONFIG_SMSC_PHY is not set |
446 | # CONFIG_BROADCOM_PHY is not set | 461 | # CONFIG_BROADCOM_PHY is not set |
447 | # CONFIG_ICPLUS_PHY is not set | 462 | # CONFIG_ICPLUS_PHY is not set |
463 | # CONFIG_REALTEK_PHY is not set | ||
448 | # CONFIG_FIXED_PHY is not set | 464 | # CONFIG_FIXED_PHY is not set |
449 | # CONFIG_MDIO_BITBANG is not set | 465 | # CONFIG_MDIO_BITBANG is not set |
450 | CONFIG_NET_ETHERNET=y | 466 | CONFIG_NET_ETHERNET=y |
@@ -469,7 +485,6 @@ CONFIG_FS_ENET_MDIO_FEC=y | |||
469 | # CONFIG_WAN is not set | 485 | # CONFIG_WAN is not set |
470 | # CONFIG_PPP is not set | 486 | # CONFIG_PPP is not set |
471 | # CONFIG_SLIP is not set | 487 | # CONFIG_SLIP is not set |
472 | # CONFIG_SHAPER is not set | ||
473 | # CONFIG_NETCONSOLE is not set | 488 | # CONFIG_NETCONSOLE is not set |
474 | # CONFIG_NETPOLL is not set | 489 | # CONFIG_NETPOLL is not set |
475 | # CONFIG_NET_POLL_CONTROLLER is not set | 490 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -574,6 +589,7 @@ CONFIG_GEN_RTC=y | |||
574 | # CONFIG_W1 is not set | 589 | # CONFIG_W1 is not set |
575 | # CONFIG_POWER_SUPPLY is not set | 590 | # CONFIG_POWER_SUPPLY is not set |
576 | # CONFIG_HWMON is not set | 591 | # CONFIG_HWMON is not set |
592 | CONFIG_THERMAL=y | ||
577 | # CONFIG_WATCHDOG is not set | 593 | # CONFIG_WATCHDOG is not set |
578 | 594 | ||
579 | # | 595 | # |
@@ -614,6 +630,7 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y | |||
614 | # CONFIG_HID_SUPPORT is not set | 630 | # CONFIG_HID_SUPPORT is not set |
615 | # CONFIG_USB_SUPPORT is not set | 631 | # CONFIG_USB_SUPPORT is not set |
616 | # CONFIG_MMC is not set | 632 | # CONFIG_MMC is not set |
633 | # CONFIG_MEMSTICK is not set | ||
617 | # CONFIG_NEW_LEDS is not set | 634 | # CONFIG_NEW_LEDS is not set |
618 | # CONFIG_EDAC is not set | 635 | # CONFIG_EDAC is not set |
619 | # CONFIG_RTC_CLASS is not set | 636 | # CONFIG_RTC_CLASS is not set |
@@ -635,11 +652,9 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y | |||
635 | # CONFIG_XFS_FS is not set | 652 | # CONFIG_XFS_FS is not set |
636 | # CONFIG_GFS2_FS is not set | 653 | # CONFIG_GFS2_FS is not set |
637 | # CONFIG_OCFS2_FS is not set | 654 | # CONFIG_OCFS2_FS is not set |
638 | # CONFIG_MINIX_FS is not set | 655 | # CONFIG_DNOTIFY is not set |
639 | # CONFIG_ROMFS_FS is not set | ||
640 | # CONFIG_INOTIFY is not set | 656 | # CONFIG_INOTIFY is not set |
641 | # CONFIG_QUOTA is not set | 657 | # CONFIG_QUOTA is not set |
642 | # CONFIG_DNOTIFY is not set | ||
643 | # CONFIG_AUTOFS_FS is not set | 658 | # CONFIG_AUTOFS_FS is not set |
644 | # CONFIG_AUTOFS4_FS is not set | 659 | # CONFIG_AUTOFS4_FS is not set |
645 | # CONFIG_FUSE_FS is not set | 660 | # CONFIG_FUSE_FS is not set |
@@ -682,8 +697,10 @@ CONFIG_TMPFS=y | |||
682 | # CONFIG_JFFS2_FS is not set | 697 | # CONFIG_JFFS2_FS is not set |
683 | CONFIG_CRAMFS=y | 698 | CONFIG_CRAMFS=y |
684 | # CONFIG_VXFS_FS is not set | 699 | # CONFIG_VXFS_FS is not set |
700 | # CONFIG_MINIX_FS is not set | ||
685 | # CONFIG_HPFS_FS is not set | 701 | # CONFIG_HPFS_FS is not set |
686 | # CONFIG_QNX4FS_FS is not set | 702 | # CONFIG_QNX4FS_FS is not set |
703 | # CONFIG_ROMFS_FS is not set | ||
687 | # CONFIG_SYSV_FS is not set | 704 | # CONFIG_SYSV_FS is not set |
688 | # CONFIG_UFS_FS is not set | 705 | # CONFIG_UFS_FS is not set |
689 | CONFIG_NETWORK_FILESYSTEMS=y | 706 | CONFIG_NETWORK_FILESYSTEMS=y |
@@ -730,7 +747,6 @@ CONFIG_MSDOS_PARTITION=y | |||
730 | # CONFIG_SYSV68_PARTITION is not set | 747 | # CONFIG_SYSV68_PARTITION is not set |
731 | # CONFIG_NLS is not set | 748 | # CONFIG_NLS is not set |
732 | # CONFIG_DLM is not set | 749 | # CONFIG_DLM is not set |
733 | # CONFIG_UCC_SLOW is not set | ||
734 | 750 | ||
735 | # | 751 | # |
736 | # Library routines | 752 | # Library routines |
@@ -745,9 +761,6 @@ CONFIG_ZLIB_INFLATE=y | |||
745 | CONFIG_HAS_IOMEM=y | 761 | CONFIG_HAS_IOMEM=y |
746 | CONFIG_HAS_IOPORT=y | 762 | CONFIG_HAS_IOPORT=y |
747 | CONFIG_HAS_DMA=y | 763 | CONFIG_HAS_DMA=y |
748 | CONFIG_INSTRUMENTATION=y | ||
749 | # CONFIG_PROFILING is not set | ||
750 | # CONFIG_MARKERS is not set | ||
751 | 764 | ||
752 | # | 765 | # |
753 | # Kernel hacking | 766 | # Kernel hacking |
@@ -757,7 +770,7 @@ CONFIG_ENABLE_WARN_DEPRECATED=y | |||
757 | CONFIG_ENABLE_MUST_CHECK=y | 770 | CONFIG_ENABLE_MUST_CHECK=y |
758 | CONFIG_MAGIC_SYSRQ=y | 771 | CONFIG_MAGIC_SYSRQ=y |
759 | # CONFIG_UNUSED_SYMBOLS is not set | 772 | # CONFIG_UNUSED_SYMBOLS is not set |
760 | # CONFIG_DEBUG_FS is not set | 773 | CONFIG_DEBUG_FS=y |
761 | # CONFIG_HEADERS_CHECK is not set | 774 | # CONFIG_HEADERS_CHECK is not set |
762 | CONFIG_DEBUG_KERNEL=y | 775 | CONFIG_DEBUG_KERNEL=y |
763 | # CONFIG_DEBUG_SHIRQ is not set | 776 | # CONFIG_DEBUG_SHIRQ is not set |
@@ -766,6 +779,7 @@ CONFIG_SCHED_DEBUG=y | |||
766 | # CONFIG_SCHEDSTATS is not set | 779 | # CONFIG_SCHEDSTATS is not set |
767 | # CONFIG_TIMER_STATS is not set | 780 | # CONFIG_TIMER_STATS is not set |
768 | # CONFIG_SLUB_DEBUG_ON is not set | 781 | # CONFIG_SLUB_DEBUG_ON is not set |
782 | # CONFIG_SLUB_STATS is not set | ||
769 | # CONFIG_DEBUG_SPINLOCK is not set | 783 | # CONFIG_DEBUG_SPINLOCK is not set |
770 | # CONFIG_DEBUG_MUTEXES is not set | 784 | # CONFIG_DEBUG_MUTEXES is not set |
771 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 785 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
@@ -776,14 +790,15 @@ CONFIG_DEBUG_INFO=y | |||
776 | # CONFIG_DEBUG_VM is not set | 790 | # CONFIG_DEBUG_VM is not set |
777 | # CONFIG_DEBUG_LIST is not set | 791 | # CONFIG_DEBUG_LIST is not set |
778 | # CONFIG_DEBUG_SG is not set | 792 | # CONFIG_DEBUG_SG is not set |
779 | CONFIG_FORCED_INLINING=y | ||
780 | # CONFIG_BOOT_PRINTK_DELAY is not set | 793 | # CONFIG_BOOT_PRINTK_DELAY is not set |
794 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
781 | # CONFIG_FAULT_INJECTION is not set | 795 | # CONFIG_FAULT_INJECTION is not set |
782 | # CONFIG_SAMPLES is not set | 796 | # CONFIG_SAMPLES is not set |
783 | # CONFIG_DEBUG_STACKOVERFLOW is not set | 797 | # CONFIG_DEBUG_STACKOVERFLOW is not set |
784 | # CONFIG_DEBUG_STACK_USAGE is not set | 798 | # CONFIG_DEBUG_STACK_USAGE is not set |
785 | # CONFIG_DEBUG_PAGEALLOC is not set | 799 | # CONFIG_DEBUG_PAGEALLOC is not set |
786 | # CONFIG_DEBUGGER is not set | 800 | # CONFIG_DEBUGGER is not set |
801 | # CONFIG_VIRQ_DEBUG is not set | ||
787 | # CONFIG_BDI_SWITCH is not set | 802 | # CONFIG_BDI_SWITCH is not set |
788 | # CONFIG_PPC_EARLY_DEBUG is not set | 803 | # CONFIG_PPC_EARLY_DEBUG is not set |
789 | 804 | ||
diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index f7458396cd7c..3c9452d4308b 100644 --- a/arch/powerpc/kernel/head_8xx.S +++ b/arch/powerpc/kernel/head_8xx.S | |||
@@ -332,8 +332,18 @@ InstructionTLBMiss: | |||
332 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ | 332 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ |
333 | lwz r10, 0(r11) /* Get the pte */ | 333 | lwz r10, 0(r11) /* Get the pte */ |
334 | 334 | ||
335 | #ifdef CONFIG_SWAP | ||
336 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
337 | andi. r11, r10, _PAGE_PRESENT | ||
338 | beq 4f | ||
339 | ori r10, r10, _PAGE_ACCESSED | ||
340 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
341 | stw r10, 0(r11) | ||
342 | 4: | ||
343 | #else | ||
335 | ori r10, r10, _PAGE_ACCESSED | 344 | ori r10, r10, _PAGE_ACCESSED |
336 | stw r10, 0(r11) | 345 | stw r10, 0(r11) |
346 | #endif | ||
337 | 347 | ||
338 | /* The Linux PTE won't go exactly into the MMU TLB. | 348 | /* The Linux PTE won't go exactly into the MMU TLB. |
339 | * Software indicator bits 21, 22 and 28 must be clear. | 349 | * Software indicator bits 21, 22 and 28 must be clear. |
@@ -398,8 +408,17 @@ DataStoreTLBMiss: | |||
398 | DO_8xx_CPU6(0x3b80, r3) | 408 | DO_8xx_CPU6(0x3b80, r3) |
399 | mtspr SPRN_MD_TWC, r11 | 409 | mtspr SPRN_MD_TWC, r11 |
400 | 410 | ||
401 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | 411 | #ifdef CONFIG_SWAP |
412 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
413 | andi. r11, r10, _PAGE_PRESENT | ||
414 | beq 4f | ||
402 | ori r10, r10, _PAGE_ACCESSED | 415 | ori r10, r10, _PAGE_ACCESSED |
416 | 4: | ||
417 | /* and update pte in table */ | ||
418 | #else | ||
419 | ori r10, r10, _PAGE_ACCESSED | ||
420 | #endif | ||
421 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
403 | stw r10, 0(r11) | 422 | stw r10, 0(r11) |
404 | 423 | ||
405 | /* The Linux PTE won't go exactly into the MMU TLB. | 424 | /* The Linux PTE won't go exactly into the MMU TLB. |
@@ -507,7 +526,16 @@ DataTLBError: | |||
507 | 526 | ||
508 | /* Update 'changed', among others. | 527 | /* Update 'changed', among others. |
509 | */ | 528 | */ |
529 | #ifdef CONFIG_SWAP | ||
530 | ori r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE | ||
531 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
532 | andi. r11, r10, _PAGE_PRESENT | ||
533 | beq 4f | ||
534 | ori r10, r10, _PAGE_ACCESSED | ||
535 | 4: | ||
536 | #else | ||
510 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE | 537 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE |
538 | #endif | ||
511 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ | 539 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ |
512 | stw r10, 0(r11) /* and update pte in table */ | 540 | stw r10, 0(r11) /* and update pte in table */ |
513 | 541 | ||
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 5c2e253ddfb1..9d2c56621f1e 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -785,6 +785,21 @@ _GLOBAL(__lshrdi3) | |||
785 | or r4,r4,r7 # LSW |= t2 | 785 | or r4,r4,r7 # LSW |= t2 |
786 | blr | 786 | blr |
787 | 787 | ||
788 | /* | ||
789 | * 64-bit comparison: __ucmpdi2(u64 a, u64 b) | ||
790 | * Returns 0 if a < b, 1 if a == b, 2 if a > b. | ||
791 | */ | ||
792 | _GLOBAL(__ucmpdi2) | ||
793 | cmplw r3,r5 | ||
794 | li r3,1 | ||
795 | bne 1f | ||
796 | cmplw r4,r6 | ||
797 | beqlr | ||
798 | 1: li r3,0 | ||
799 | bltlr | ||
800 | li r3,2 | ||
801 | blr | ||
802 | |||
788 | _GLOBAL(abs) | 803 | _GLOBAL(abs) |
789 | srawi r4,r3,31 | 804 | srawi r4,r3,31 |
790 | xor r3,r3,r4 | 805 | xor r3,r3,r4 |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 980fe32895c0..89c83ccb85c1 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -748,7 +748,13 @@ static void __devinit pcibios_fixup_resources(struct pci_dev *dev) | |||
748 | struct resource *res = dev->resource + i; | 748 | struct resource *res = dev->resource + i; |
749 | if (!res->flags) | 749 | if (!res->flags) |
750 | continue; | 750 | continue; |
751 | if (res->end == 0xffffffff) { | 751 | /* On platforms that have PPC_PCI_PROBE_ONLY set, we don't |
752 | * consider 0 as an unassigned BAR value. It's technically | ||
753 | * a valid value, but linux doesn't like it... so when we can | ||
754 | * re-assign things, we do so, but if we can't, we keep it | ||
755 | * around and hope for the best... | ||
756 | */ | ||
757 | if (res->start == 0 && !(ppc_pci_flags & PPC_PCI_PROBE_ONLY)) { | ||
752 | pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n", | 758 | pr_debug("PCI:%s Resource %d %016llx-%016llx [%x] is unassigned\n", |
753 | pci_name(dev), i, | 759 | pci_name(dev), i, |
754 | (unsigned long long)res->start, | 760 | (unsigned long long)res->start, |
diff --git a/arch/powerpc/kernel/ppc_ksyms.c b/arch/powerpc/kernel/ppc_ksyms.c index aa9ff35b0e63..9c98424277a8 100644 --- a/arch/powerpc/kernel/ppc_ksyms.c +++ b/arch/powerpc/kernel/ppc_ksyms.c | |||
@@ -58,6 +58,7 @@ extern void program_check_exception(struct pt_regs *regs); | |||
58 | extern void single_step_exception(struct pt_regs *regs); | 58 | extern void single_step_exception(struct pt_regs *regs); |
59 | extern int sys_sigreturn(struct pt_regs *regs); | 59 | extern int sys_sigreturn(struct pt_regs *regs); |
60 | 60 | ||
61 | EXPORT_SYMBOL(empty_zero_page); | ||
61 | EXPORT_SYMBOL(clear_pages); | 62 | EXPORT_SYMBOL(clear_pages); |
62 | EXPORT_SYMBOL(copy_page); | 63 | EXPORT_SYMBOL(copy_page); |
63 | EXPORT_SYMBOL(ISA_DMA_THRESHOLD); | 64 | EXPORT_SYMBOL(ISA_DMA_THRESHOLD); |
@@ -149,6 +150,8 @@ long long __lshrdi3(long long, int); | |||
149 | EXPORT_SYMBOL(__ashrdi3); | 150 | EXPORT_SYMBOL(__ashrdi3); |
150 | EXPORT_SYMBOL(__ashldi3); | 151 | EXPORT_SYMBOL(__ashldi3); |
151 | EXPORT_SYMBOL(__lshrdi3); | 152 | EXPORT_SYMBOL(__lshrdi3); |
153 | int __ucmpdi2(unsigned long long, unsigned long long); | ||
154 | EXPORT_SYMBOL(__ucmpdi2); | ||
152 | #endif | 155 | #endif |
153 | 156 | ||
154 | EXPORT_SYMBOL(memcpy); | 157 | EXPORT_SYMBOL(memcpy); |
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index 32f416175db1..590f1f67c874 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c | |||
@@ -506,10 +506,10 @@ void __init htab_initialize(void) | |||
506 | } else { | 506 | } else { |
507 | /* Find storage for the HPT. Must be contiguous in | 507 | /* Find storage for the HPT. Must be contiguous in |
508 | * the absolute address space. On cell we want it to be | 508 | * the absolute address space. On cell we want it to be |
509 | * in the first 1 Gig. | 509 | * in the first 2 Gig so we can use it for IOMMU hacks. |
510 | */ | 510 | */ |
511 | if (machine_is(cell)) | 511 | if (machine_is(cell)) |
512 | limit = 0x40000000; | 512 | limit = 0x80000000; |
513 | else | 513 | else |
514 | limit = 0; | 514 | limit = 0; |
515 | 515 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c index 8a9c26973605..64d17b0d6455 100644 --- a/arch/powerpc/platforms/83xx/mpc837x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c | |||
@@ -39,12 +39,9 @@ static int mpc837xmds_usb_cfg(void) | |||
39 | if (ret) | 39 | if (ret) |
40 | return ret; | 40 | return ret; |
41 | /* Map BCSR area */ | 41 | /* Map BCSR area */ |
42 | np = of_find_node_by_name(NULL, "bcsr"); | 42 | np = of_find_compatible_node(NULL, NULL, "fsl,mpc837xmds-bcsr"); |
43 | if (np) { | 43 | if (np) { |
44 | struct resource res; | 44 | bcsr_regs = of_iomap(np, 0); |
45 | |||
46 | of_address_to_resource(np, 0, &res); | ||
47 | bcsr_regs = ioremap(res.start, res.end - res.start + 1); | ||
48 | of_node_put(np); | 45 | of_node_put(np); |
49 | } | 46 | } |
50 | if (!bcsr_regs) | 47 | if (!bcsr_regs) |
@@ -96,6 +93,7 @@ static void __init mpc837x_mds_setup_arch(void) | |||
96 | static struct of_device_id mpc837x_ids[] = { | 93 | static struct of_device_id mpc837x_ids[] = { |
97 | { .type = "soc", }, | 94 | { .type = "soc", }, |
98 | { .compatible = "soc", }, | 95 | { .compatible = "soc", }, |
96 | { .compatible = "simple-bus", }, | ||
99 | {}, | 97 | {}, |
100 | }; | 98 | }; |
101 | 99 | ||
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 0afd22595546..a578b966ecbc 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -22,7 +22,6 @@ config PPC_83xx | |||
22 | select FSL_SOC | 22 | select FSL_SOC |
23 | select MPC83xx | 23 | select MPC83xx |
24 | select IPIC | 24 | select IPIC |
25 | select FSL_EMB_PERFMON | ||
26 | 25 | ||
27 | config PPC_86xx | 26 | config PPC_86xx |
28 | bool "Freescale 86xx" | 27 | bool "Freescale 86xx" |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 73d81ce14b67..0c3face0ddbb 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -113,7 +113,12 @@ config FSL_BOOKE | |||
113 | default y | 113 | default y |
114 | 114 | ||
115 | config FSL_EMB_PERFMON | 115 | config FSL_EMB_PERFMON |
116 | bool | 116 | bool "Freescale Embedded Perfmon" |
117 | depends on E500 || PPC_83xx | ||
118 | help | ||
119 | This is the Performance Monitor support found on the e500 core | ||
120 | and some e300 cores (c3 and c4). Select this only if your | ||
121 | core supports the Embedded Performance Monitor APU | ||
117 | 122 | ||
118 | config PTE_64BIT | 123 | config PTE_64BIT |
119 | bool | 124 | bool |
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index cf6c2c89211d..0ad83aeb70b1 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -170,7 +170,8 @@ void spu_release_saved(struct spu_context *ctx) | |||
170 | { | 170 | { |
171 | BUG_ON(ctx->state != SPU_STATE_SAVED); | 171 | BUG_ON(ctx->state != SPU_STATE_SAVED); |
172 | 172 | ||
173 | if (test_and_clear_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags)) | 173 | if (test_and_clear_bit(SPU_SCHED_WAS_ACTIVE, &ctx->sched_flags) && |
174 | test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) | ||
174 | spu_activate(ctx, 0); | 175 | spu_activate(ctx, 0); |
175 | 176 | ||
176 | spu_release(ctx); | 177 | spu_release(ctx); |
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index 6221968c2a3c..cac69e116776 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -220,6 +220,7 @@ static int spu_run_init(struct spu_context *ctx, u32 *npc) | |||
220 | } | 220 | } |
221 | } | 221 | } |
222 | 222 | ||
223 | set_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags); | ||
223 | return 0; | 224 | return 0; |
224 | } | 225 | } |
225 | 226 | ||
@@ -234,7 +235,7 @@ static int spu_run_fini(struct spu_context *ctx, u32 *npc, | |||
234 | *npc = ctx->ops->npc_read(ctx); | 235 | *npc = ctx->ops->npc_read(ctx); |
235 | 236 | ||
236 | spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED); | 237 | spuctx_switch_state(ctx, SPU_UTIL_IDLE_LOADED); |
237 | ctx->policy = SCHED_IDLE; | 238 | clear_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags); |
238 | spu_release(ctx); | 239 | spu_release(ctx); |
239 | 240 | ||
240 | if (signal_pending(current)) | 241 | if (signal_pending(current)) |
diff --git a/arch/powerpc/platforms/cell/spufs/sched.c b/arch/powerpc/platforms/cell/spufs/sched.c index 5d5f680cd0b8..00528ef84ad2 100644 --- a/arch/powerpc/platforms/cell/spufs/sched.c +++ b/arch/powerpc/platforms/cell/spufs/sched.c | |||
@@ -867,7 +867,7 @@ static noinline void spusched_tick(struct spu_context *ctx) | |||
867 | if (ctx->policy == SCHED_FIFO) | 867 | if (ctx->policy == SCHED_FIFO) |
868 | goto out; | 868 | goto out; |
869 | 869 | ||
870 | if (--ctx->time_slice && ctx->policy != SCHED_IDLE) | 870 | if (--ctx->time_slice && test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) |
871 | goto out; | 871 | goto out; |
872 | 872 | ||
873 | spu = ctx->spu; | 873 | spu = ctx->spu; |
@@ -877,7 +877,7 @@ static noinline void spusched_tick(struct spu_context *ctx) | |||
877 | new = grab_runnable_context(ctx->prio + 1, spu->node); | 877 | new = grab_runnable_context(ctx->prio + 1, spu->node); |
878 | if (new) { | 878 | if (new) { |
879 | spu_unschedule(spu, ctx); | 879 | spu_unschedule(spu, ctx); |
880 | if (ctx->policy != SCHED_IDLE) | 880 | if (test_bit(SPU_SCHED_SPU_RUN, &ctx->sched_flags)) |
881 | spu_add_to_rq(ctx); | 881 | spu_add_to_rq(ctx); |
882 | } else { | 882 | } else { |
883 | spu_context_nospu_trace(spusched_tick__newslice, ctx); | 883 | spu_context_nospu_trace(spusched_tick__newslice, ctx); |
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 2c2fe3c07d72..cdc515182f82 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -44,6 +44,7 @@ struct spu_gang; | |||
44 | enum { | 44 | enum { |
45 | SPU_SCHED_NOTIFY_ACTIVE, | 45 | SPU_SCHED_NOTIFY_ACTIVE, |
46 | SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */ | 46 | SPU_SCHED_WAS_ACTIVE, /* was active upon spu_acquire_saved() */ |
47 | SPU_SCHED_SPU_RUN, /* context is within spu_run */ | ||
47 | }; | 48 | }; |
48 | 49 | ||
49 | struct spu_context { | 50 | struct spu_context { |
diff --git a/arch/powerpc/platforms/powermac/pic.c b/arch/powerpc/platforms/powermac/pic.c index 40736400ef80..829b8b02527b 100644 --- a/arch/powerpc/platforms/powermac/pic.c +++ b/arch/powerpc/platforms/powermac/pic.c | |||
@@ -618,9 +618,9 @@ static int pmacpic_find_viaint(void) | |||
618 | if (np == NULL) | 618 | if (np == NULL) |
619 | goto not_found; | 619 | goto not_found; |
620 | viaint = irq_of_parse_and_map(np, 0);; | 620 | viaint = irq_of_parse_and_map(np, 0);; |
621 | #endif /* CONFIG_ADB_PMU */ | ||
622 | 621 | ||
623 | not_found: | 622 | not_found: |
623 | #endif /* CONFIG_ADB_PMU */ | ||
624 | return viaint; | 624 | return viaint; |
625 | } | 625 | } |
626 | 626 | ||
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 6efbd5e5bb1b..cc81fd1141b0 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
@@ -509,7 +509,7 @@ int qe_upload_firmware(const struct qe_firmware *firmware) | |||
509 | } | 509 | } |
510 | 510 | ||
511 | /* Validate some of the fields */ | 511 | /* Validate some of the fields */ |
512 | if ((firmware->count < 1) || (firmware->count >= MAX_QE_RISC)) { | 512 | if ((firmware->count < 1) || (firmware->count > MAX_QE_RISC)) { |
513 | printk(KERN_ERR "qe-firmware: invalid data\n"); | 513 | printk(KERN_ERR "qe-firmware: invalid data\n"); |
514 | return -EINVAL; | 514 | return -EINVAL; |
515 | } | 515 | } |
@@ -609,7 +609,10 @@ struct qe_firmware_info *qe_get_firmware_info(void) | |||
609 | * If we haven't checked yet, and a driver hasn't uploaded a firmware | 609 | * If we haven't checked yet, and a driver hasn't uploaded a firmware |
610 | * yet, then check the device tree for information. | 610 | * yet, then check the device tree for information. |
611 | */ | 611 | */ |
612 | if (initialized || qe_firmware_uploaded) | 612 | if (qe_firmware_uploaded) |
613 | return &qe_firmware_info; | ||
614 | |||
615 | if (initialized) | ||
613 | return NULL; | 616 | return NULL; |
614 | 617 | ||
615 | initialized = 1; | 618 | initialized = 1; |
diff --git a/arch/ppc/kernel/head_8xx.S b/arch/ppc/kernel/head_8xx.S index eb8d26f87362..321bda2de2cb 100644 --- a/arch/ppc/kernel/head_8xx.S +++ b/arch/ppc/kernel/head_8xx.S | |||
@@ -329,8 +329,18 @@ InstructionTLBMiss: | |||
329 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ | 329 | mfspr r11, SPRN_MD_TWC /* ....and get the pte address */ |
330 | lwz r10, 0(r11) /* Get the pte */ | 330 | lwz r10, 0(r11) /* Get the pte */ |
331 | 331 | ||
332 | #ifdef CONFIG_SWAP | ||
333 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
334 | andi. r11, r10, _PAGE_PRESENT | ||
335 | beq 4f | ||
336 | ori r10, r10, _PAGE_ACCESSED | ||
337 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
338 | stw r10, 0(r11) | ||
339 | 4: | ||
340 | #else | ||
332 | ori r10, r10, _PAGE_ACCESSED | 341 | ori r10, r10, _PAGE_ACCESSED |
333 | stw r10, 0(r11) | 342 | stw r10, 0(r11) |
343 | #endif | ||
334 | 344 | ||
335 | /* The Linux PTE won't go exactly into the MMU TLB. | 345 | /* The Linux PTE won't go exactly into the MMU TLB. |
336 | * Software indicator bits 21, 22 and 28 must be clear. | 346 | * Software indicator bits 21, 22 and 28 must be clear. |
@@ -395,8 +405,17 @@ DataStoreTLBMiss: | |||
395 | DO_8xx_CPU6(0x3b80, r3) | 405 | DO_8xx_CPU6(0x3b80, r3) |
396 | mtspr SPRN_MD_TWC, r11 | 406 | mtspr SPRN_MD_TWC, r11 |
397 | 407 | ||
398 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | 408 | #ifdef CONFIG_SWAP |
409 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
410 | andi. r11, r10, _PAGE_PRESENT | ||
411 | beq 4f | ||
412 | ori r10, r10, _PAGE_ACCESSED | ||
413 | 4: | ||
414 | /* and update pte in table */ | ||
415 | #else | ||
399 | ori r10, r10, _PAGE_ACCESSED | 416 | ori r10, r10, _PAGE_ACCESSED |
417 | #endif | ||
418 | mfspr r11, SPRN_MD_TWC /* get the pte address again */ | ||
400 | stw r10, 0(r11) | 419 | stw r10, 0(r11) |
401 | 420 | ||
402 | /* The Linux PTE won't go exactly into the MMU TLB. | 421 | /* The Linux PTE won't go exactly into the MMU TLB. |
@@ -575,7 +594,16 @@ DataTLBError: | |||
575 | 594 | ||
576 | /* Update 'changed', among others. | 595 | /* Update 'changed', among others. |
577 | */ | 596 | */ |
597 | #ifdef CONFIG_SWAP | ||
598 | ori r10, r10, _PAGE_DIRTY|_PAGE_HWWRITE | ||
599 | /* do not set the _PAGE_ACCESSED bit of a non-present page */ | ||
600 | andi. r11, r10, _PAGE_PRESENT | ||
601 | beq 4f | ||
602 | ori r10, r10, _PAGE_ACCESSED | ||
603 | 4: | ||
604 | #else | ||
578 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE | 605 | ori r10, r10, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE |
606 | #endif | ||
579 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ | 607 | mfspr r11, SPRN_MD_TWC /* Get pte address again */ |
580 | stw r10, 0(r11) /* and update pte in table */ | 608 | stw r10, 0(r11) /* and update pte in table */ |
581 | 609 | ||
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index f41c9538ca30..6c70fed0f9a0 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -66,9 +66,6 @@ config MMU | |||
66 | config ZONE_DMA | 66 | config ZONE_DMA |
67 | def_bool y | 67 | def_bool y |
68 | 68 | ||
69 | config QUICKLIST | ||
70 | def_bool X86_32 | ||
71 | |||
72 | config SBUS | 69 | config SBUS |
73 | bool | 70 | bool |
74 | 71 | ||
@@ -1262,7 +1259,7 @@ menuconfig APM | |||
1262 | machines with more than one CPU. | 1259 | machines with more than one CPU. |
1263 | 1260 | ||
1264 | In order to use APM, you will need supporting software. For location | 1261 | In order to use APM, you will need supporting software. For location |
1265 | and more information, read <file:Documentation/pm.txt> and the | 1262 | and more information, read <file:Documentation/power/pm.txt> and the |
1266 | Battery Powered Linux mini-HOWTO, available from | 1263 | Battery Powered Linux mini-HOWTO, available from |
1267 | <http://www.tldp.org/docs.html#howto>. | 1264 | <http://www.tldp.org/docs.html#howto>. |
1268 | 1265 | ||
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 8f64abe699fd..d5904eef1d31 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -1055,10 +1055,17 @@ static int putreg32(struct task_struct *child, unsigned regno, u32 value) | |||
1055 | R32(esi, si); | 1055 | R32(esi, si); |
1056 | R32(ebp, bp); | 1056 | R32(ebp, bp); |
1057 | R32(eax, ax); | 1057 | R32(eax, ax); |
1058 | R32(orig_eax, orig_ax); | ||
1059 | R32(eip, ip); | 1058 | R32(eip, ip); |
1060 | R32(esp, sp); | 1059 | R32(esp, sp); |
1061 | 1060 | ||
1061 | case offsetof(struct user32, regs.orig_eax): | ||
1062 | /* | ||
1063 | * Sign-extend the value so that orig_eax = -1 | ||
1064 | * causes (long)orig_ax < 0 tests to fire correctly. | ||
1065 | */ | ||
1066 | regs->orig_ax = (long) (s32) value; | ||
1067 | break; | ||
1068 | |||
1062 | case offsetof(struct user32, regs.eflags): | 1069 | case offsetof(struct user32, regs.eflags): |
1063 | return set_flags(child, value); | 1070 | return set_flags(child, value); |
1064 | 1071 | ||
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index 56b72fb67f9b..1c83e5124c65 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -311,6 +311,35 @@ give_sigsegv: | |||
311 | } | 311 | } |
312 | 312 | ||
313 | /* | 313 | /* |
314 | * Return -1L or the syscall number that @regs is executing. | ||
315 | */ | ||
316 | static long current_syscall(struct pt_regs *regs) | ||
317 | { | ||
318 | /* | ||
319 | * We always sign-extend a -1 value being set here, | ||
320 | * so this is always either -1L or a syscall number. | ||
321 | */ | ||
322 | return regs->orig_ax; | ||
323 | } | ||
324 | |||
325 | /* | ||
326 | * Return a value that is -EFOO if the system call in @regs->orig_ax | ||
327 | * returned an error. This only works for @regs from @current. | ||
328 | */ | ||
329 | static long current_syscall_ret(struct pt_regs *regs) | ||
330 | { | ||
331 | #ifdef CONFIG_IA32_EMULATION | ||
332 | if (test_thread_flag(TIF_IA32)) | ||
333 | /* | ||
334 | * Sign-extend the value so (int)-EFOO becomes (long)-EFOO | ||
335 | * and will match correctly in comparisons. | ||
336 | */ | ||
337 | return (int) regs->ax; | ||
338 | #endif | ||
339 | return regs->ax; | ||
340 | } | ||
341 | |||
342 | /* | ||
314 | * OK, we're invoking a handler | 343 | * OK, we're invoking a handler |
315 | */ | 344 | */ |
316 | 345 | ||
@@ -327,9 +356,9 @@ handle_signal(unsigned long sig, siginfo_t *info, struct k_sigaction *ka, | |||
327 | #endif | 356 | #endif |
328 | 357 | ||
329 | /* Are we from a system call? */ | 358 | /* Are we from a system call? */ |
330 | if ((long)regs->orig_ax >= 0) { | 359 | if (current_syscall(regs) >= 0) { |
331 | /* If so, check system call restarting.. */ | 360 | /* If so, check system call restarting.. */ |
332 | switch (regs->ax) { | 361 | switch (current_syscall_ret(regs)) { |
333 | case -ERESTART_RESTARTBLOCK: | 362 | case -ERESTART_RESTARTBLOCK: |
334 | case -ERESTARTNOHAND: | 363 | case -ERESTARTNOHAND: |
335 | regs->ax = -EINTR; | 364 | regs->ax = -EINTR; |
@@ -426,10 +455,9 @@ static void do_signal(struct pt_regs *regs) | |||
426 | } | 455 | } |
427 | 456 | ||
428 | /* Did we come from a system call? */ | 457 | /* Did we come from a system call? */ |
429 | if ((long)regs->orig_ax >= 0) { | 458 | if (current_syscall(regs) >= 0) { |
430 | /* Restart the system call - no handlers present */ | 459 | /* Restart the system call - no handlers present */ |
431 | long res = regs->ax; | 460 | switch (current_syscall_ret(regs)) { |
432 | switch (res) { | ||
433 | case -ERESTARTNOHAND: | 461 | case -ERESTARTNOHAND: |
434 | case -ERESTARTSYS: | 462 | case -ERESTARTSYS: |
435 | case -ERESTARTNOINTR: | 463 | case -ERESTARTNOINTR: |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index cccb38a59653..a104c532ff70 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -84,7 +84,6 @@ struct lguest_data lguest_data = { | |||
84 | .blocked_interrupts = { 1 }, /* Block timer interrupts */ | 84 | .blocked_interrupts = { 1 }, /* Block timer interrupts */ |
85 | .syscall_vec = SYSCALL_VECTOR, | 85 | .syscall_vec = SYSCALL_VECTOR, |
86 | }; | 86 | }; |
87 | static cycle_t clock_base; | ||
88 | 87 | ||
89 | /*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a | 88 | /*G:037 async_hcall() is pretty simple: I'm quite proud of it really. We have a |
90 | * ring buffer of stored hypercalls which the Host will run though next time we | 89 | * ring buffer of stored hypercalls which the Host will run though next time we |
@@ -327,8 +326,8 @@ static void lguest_cpuid(unsigned int *ax, unsigned int *bx, | |||
327 | case 1: /* Basic feature request. */ | 326 | case 1: /* Basic feature request. */ |
328 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ | 327 | /* We only allow kernel to see SSE3, CMPXCHG16B and SSSE3 */ |
329 | *cx &= 0x00002201; | 328 | *cx &= 0x00002201; |
330 | /* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, FPU. */ | 329 | /* SSE, SSE2, FXSR, MMX, CMOV, CMPXCHG8B, TSC, FPU. */ |
331 | *dx &= 0x07808101; | 330 | *dx &= 0x07808111; |
332 | /* The Host can do a nice optimization if it knows that the | 331 | /* The Host can do a nice optimization if it knows that the |
333 | * kernel mappings (addresses above 0xC0000000 or whatever | 332 | * kernel mappings (addresses above 0xC0000000 or whatever |
334 | * PAGE_OFFSET is set to) haven't changed. But Linux calls | 333 | * PAGE_OFFSET is set to) haven't changed. But Linux calls |
@@ -481,7 +480,7 @@ static void lguest_set_pmd(pmd_t *pmdp, pmd_t pmdval) | |||
481 | { | 480 | { |
482 | *pmdp = pmdval; | 481 | *pmdp = pmdval; |
483 | lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK, | 482 | lazy_hcall(LHCALL_SET_PMD, __pa(pmdp)&PAGE_MASK, |
484 | (__pa(pmdp)&(PAGE_SIZE-1)), 0); | 483 | (__pa(pmdp)&(PAGE_SIZE-1))/4, 0); |
485 | } | 484 | } |
486 | 485 | ||
487 | /* There are a couple of legacy places where the kernel sets a PTE, but we | 486 | /* There are a couple of legacy places where the kernel sets a PTE, but we |
@@ -595,19 +594,25 @@ static unsigned long lguest_get_wallclock(void) | |||
595 | return lguest_data.time.tv_sec; | 594 | return lguest_data.time.tv_sec; |
596 | } | 595 | } |
597 | 596 | ||
597 | /* The TSC is a Time Stamp Counter. The Host tells us what speed it runs at, | ||
598 | * or 0 if it's unusable as a reliable clock source. This matches what we want | ||
599 | * here: if we return 0 from this function, the x86 TSC clock will not register | ||
600 | * itself. */ | ||
601 | static unsigned long lguest_cpu_khz(void) | ||
602 | { | ||
603 | return lguest_data.tsc_khz; | ||
604 | } | ||
605 | |||
606 | /* If we can't use the TSC, the kernel falls back to our "lguest_clock", where | ||
607 | * we read the time value given to us by the Host. */ | ||
598 | static cycle_t lguest_clock_read(void) | 608 | static cycle_t lguest_clock_read(void) |
599 | { | 609 | { |
600 | unsigned long sec, nsec; | 610 | unsigned long sec, nsec; |
601 | 611 | ||
602 | /* If the Host tells the TSC speed, we can trust that. */ | 612 | /* Since the time is in two parts (seconds and nanoseconds), we risk |
603 | if (lguest_data.tsc_khz) | 613 | * reading it just as it's changing from 99 & 0.999999999 to 100 and 0, |
604 | return native_read_tsc(); | 614 | * and getting 99 and 0. As Linux tends to come apart under the stress |
605 | 615 | * of time travel, we must be careful: */ | |
606 | /* If we can't use the TSC, we read the time value written by the Host. | ||
607 | * Since it's in two parts (seconds and nanoseconds), we risk reading | ||
608 | * it just as it's changing from 99 & 0.999999999 to 100 and 0, and | ||
609 | * getting 99 and 0. As Linux tends to come apart under the stress of | ||
610 | * time travel, we must be careful: */ | ||
611 | do { | 616 | do { |
612 | /* First we read the seconds part. */ | 617 | /* First we read the seconds part. */ |
613 | sec = lguest_data.time.tv_sec; | 618 | sec = lguest_data.time.tv_sec; |
@@ -622,14 +627,14 @@ static cycle_t lguest_clock_read(void) | |||
622 | /* Now if the seconds part has changed, try again. */ | 627 | /* Now if the seconds part has changed, try again. */ |
623 | } while (unlikely(lguest_data.time.tv_sec != sec)); | 628 | } while (unlikely(lguest_data.time.tv_sec != sec)); |
624 | 629 | ||
625 | /* Our non-TSC clock is in real nanoseconds. */ | 630 | /* Our lguest clock is in real nanoseconds. */ |
626 | return sec*1000000000ULL + nsec; | 631 | return sec*1000000000ULL + nsec; |
627 | } | 632 | } |
628 | 633 | ||
629 | /* This is what we tell the kernel is our clocksource. */ | 634 | /* This is the fallback clocksource: lower priority than the TSC clocksource. */ |
630 | static struct clocksource lguest_clock = { | 635 | static struct clocksource lguest_clock = { |
631 | .name = "lguest", | 636 | .name = "lguest", |
632 | .rating = 400, | 637 | .rating = 200, |
633 | .read = lguest_clock_read, | 638 | .read = lguest_clock_read, |
634 | .mask = CLOCKSOURCE_MASK(64), | 639 | .mask = CLOCKSOURCE_MASK(64), |
635 | .mult = 1 << 22, | 640 | .mult = 1 << 22, |
@@ -637,12 +642,6 @@ static struct clocksource lguest_clock = { | |||
637 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 642 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
638 | }; | 643 | }; |
639 | 644 | ||
640 | /* The "scheduler clock" is just our real clock, adjusted to start at zero */ | ||
641 | static unsigned long long lguest_sched_clock(void) | ||
642 | { | ||
643 | return cyc2ns(&lguest_clock, lguest_clock_read() - clock_base); | ||
644 | } | ||
645 | |||
646 | /* We also need a "struct clock_event_device": Linux asks us to set it to go | 645 | /* We also need a "struct clock_event_device": Linux asks us to set it to go |
647 | * off some time in the future. Actually, James Morris figured all this out, I | 646 | * off some time in the future. Actually, James Morris figured all this out, I |
648 | * just applied the patch. */ | 647 | * just applied the patch. */ |
@@ -712,19 +711,8 @@ static void lguest_time_init(void) | |||
712 | /* Set up the timer interrupt (0) to go to our simple timer routine */ | 711 | /* Set up the timer interrupt (0) to go to our simple timer routine */ |
713 | set_irq_handler(0, lguest_time_irq); | 712 | set_irq_handler(0, lguest_time_irq); |
714 | 713 | ||
715 | /* Our clock structure looks like arch/x86/kernel/tsc_32.c if we can | ||
716 | * use the TSC, otherwise it's a dumb nanosecond-resolution clock. | ||
717 | * Either way, the "rating" is set so high that it's always chosen over | ||
718 | * any other clocksource. */ | ||
719 | if (lguest_data.tsc_khz) | ||
720 | lguest_clock.mult = clocksource_khz2mult(lguest_data.tsc_khz, | ||
721 | lguest_clock.shift); | ||
722 | clock_base = lguest_clock_read(); | ||
723 | clocksource_register(&lguest_clock); | 714 | clocksource_register(&lguest_clock); |
724 | 715 | ||
725 | /* Now we've set up our clock, we can use it as the scheduler clock */ | ||
726 | pv_time_ops.sched_clock = lguest_sched_clock; | ||
727 | |||
728 | /* We can't set cpumask in the initializer: damn C limitations! Set it | 716 | /* We can't set cpumask in the initializer: damn C limitations! Set it |
729 | * here and register our timer device. */ | 717 | * here and register our timer device. */ |
730 | lguest_clockevent.cpumask = cpumask_of_cpu(0); | 718 | lguest_clockevent.cpumask = cpumask_of_cpu(0); |
@@ -995,6 +983,7 @@ __init void lguest_init(void) | |||
995 | /* time operations */ | 983 | /* time operations */ |
996 | pv_time_ops.get_wallclock = lguest_get_wallclock; | 984 | pv_time_ops.get_wallclock = lguest_get_wallclock; |
997 | pv_time_ops.time_init = lguest_time_init; | 985 | pv_time_ops.time_init = lguest_time_init; |
986 | pv_time_ops.get_cpu_khz = lguest_cpu_khz; | ||
998 | 987 | ||
999 | /* Now is a good time to look at the implementations of these functions | 988 | /* Now is a good time to look at the implementations of these functions |
1000 | * before returning to the rest of lguest_init(). */ | 989 | * before returning to the rest of lguest_init(). */ |
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c index ac3c959e271d..8fe576baa148 100644 --- a/arch/x86/mm/ioremap.c +++ b/arch/x86/mm/ioremap.c | |||
@@ -134,8 +134,6 @@ static void __iomem *__ioremap(unsigned long phys_addr, unsigned long size, | |||
134 | return NULL; | 134 | return NULL; |
135 | } | 135 | } |
136 | 136 | ||
137 | WARN_ON_ONCE(page_is_ram(pfn)); | ||
138 | |||
139 | switch (mode) { | 137 | switch (mode) { |
140 | case IOR_MODE_UNCACHED: | 138 | case IOR_MODE_UNCACHED: |
141 | default: | 139 | default: |
diff --git a/arch/x86/mm/pgtable_32.c b/arch/x86/mm/pgtable_32.c index 73aba7125203..2f9e9afcb9f4 100644 --- a/arch/x86/mm/pgtable_32.c +++ b/arch/x86/mm/pgtable_32.c | |||
@@ -342,12 +342,16 @@ static void pgd_mop_up_pmds(struct mm_struct *mm, pgd_t *pgdp) | |||
342 | 342 | ||
343 | pgd_t *pgd_alloc(struct mm_struct *mm) | 343 | pgd_t *pgd_alloc(struct mm_struct *mm) |
344 | { | 344 | { |
345 | pgd_t *pgd = quicklist_alloc(0, GFP_KERNEL, pgd_ctor); | 345 | pgd_t *pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); |
346 | 346 | ||
347 | mm->pgd = pgd; /* so that alloc_pd can use it */ | 347 | /* so that alloc_pd can use it */ |
348 | mm->pgd = pgd; | ||
349 | if (pgd) | ||
350 | pgd_ctor(pgd); | ||
348 | 351 | ||
349 | if (pgd && !pgd_prepopulate_pmd(mm, pgd)) { | 352 | if (pgd && !pgd_prepopulate_pmd(mm, pgd)) { |
350 | quicklist_free(0, pgd_dtor, pgd); | 353 | pgd_dtor(pgd); |
354 | free_page((unsigned long)pgd); | ||
351 | pgd = NULL; | 355 | pgd = NULL; |
352 | } | 356 | } |
353 | 357 | ||
@@ -357,12 +361,8 @@ pgd_t *pgd_alloc(struct mm_struct *mm) | |||
357 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) | 361 | void pgd_free(struct mm_struct *mm, pgd_t *pgd) |
358 | { | 362 | { |
359 | pgd_mop_up_pmds(mm, pgd); | 363 | pgd_mop_up_pmds(mm, pgd); |
360 | quicklist_free(0, pgd_dtor, pgd); | 364 | pgd_dtor(pgd); |
361 | } | 365 | free_page((unsigned long)pgd); |
362 | |||
363 | void check_pgt_cache(void) | ||
364 | { | ||
365 | quicklist_trim(0, pgd_dtor, 25, 16); | ||
366 | } | 366 | } |
367 | 367 | ||
368 | void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) | 368 | void __pte_free_tlb(struct mmu_gather *tlb, struct page *pte) |
diff --git a/arch/x86/pci/pcbios.c b/arch/x86/pci/pcbios.c index 10ac8c316c46..2f7109ac4c15 100644 --- a/arch/x86/pci/pcbios.c +++ b/arch/x86/pci/pcbios.c | |||
@@ -198,6 +198,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus, | |||
198 | "b" (bx), | 198 | "b" (bx), |
199 | "D" ((long)reg), | 199 | "D" ((long)reg), |
200 | "S" (&pci_indirect)); | 200 | "S" (&pci_indirect)); |
201 | /* | ||
202 | * Zero-extend the result beyond 8 bits, do not trust the | ||
203 | * BIOS having done it: | ||
204 | */ | ||
205 | *value &= 0xff; | ||
201 | break; | 206 | break; |
202 | case 2: | 207 | case 2: |
203 | __asm__("lcall *(%%esi); cld\n\t" | 208 | __asm__("lcall *(%%esi); cld\n\t" |
@@ -210,6 +215,11 @@ static int pci_bios_read(unsigned int seg, unsigned int bus, | |||
210 | "b" (bx), | 215 | "b" (bx), |
211 | "D" ((long)reg), | 216 | "D" ((long)reg), |
212 | "S" (&pci_indirect)); | 217 | "S" (&pci_indirect)); |
218 | /* | ||
219 | * Zero-extend the result beyond 16 bits, do not trust the | ||
220 | * BIOS having done it: | ||
221 | */ | ||
222 | *value &= 0xffff; | ||
213 | break; | 223 | break; |
214 | case 4: | 224 | case 4: |
215 | __asm__("lcall *(%%esi); cld\n\t" | 225 | __asm__("lcall *(%%esi); cld\n\t" |
diff --git a/block/genhd.c b/block/genhd.c index c44527d16c52..00da5219ee37 100644 --- a/block/genhd.c +++ b/block/genhd.c | |||
@@ -360,7 +360,9 @@ static struct kobject *base_probe(dev_t devt, int *part, void *data) | |||
360 | 360 | ||
361 | static int __init genhd_device_init(void) | 361 | static int __init genhd_device_init(void) |
362 | { | 362 | { |
363 | class_register(&block_class); | 363 | int error = class_register(&block_class); |
364 | if (unlikely(error)) | ||
365 | return error; | ||
364 | bdev_map = kobj_map_init(base_probe, &block_class_lock); | 366 | bdev_map = kobj_map_init(base_probe, &block_class_lock); |
365 | blk_dev_init(); | 367 | blk_dev_init(); |
366 | 368 | ||
diff --git a/crypto/async_tx/async_memcpy.c b/crypto/async_tx/async_memcpy.c index 0f6282207b32..84caa4efc0d4 100644 --- a/crypto/async_tx/async_memcpy.c +++ b/crypto/async_tx/async_memcpy.c | |||
@@ -66,11 +66,11 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | |||
66 | } | 66 | } |
67 | 67 | ||
68 | if (tx) { | 68 | if (tx) { |
69 | pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len); | 69 | pr_debug("%s: (async) len: %zu\n", __func__, len); |
70 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); | 70 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); |
71 | } else { | 71 | } else { |
72 | void *dest_buf, *src_buf; | 72 | void *dest_buf, *src_buf; |
73 | pr_debug("%s: (sync) len: %zu\n", __FUNCTION__, len); | 73 | pr_debug("%s: (sync) len: %zu\n", __func__, len); |
74 | 74 | ||
75 | /* wait for any prerequisite operations */ | 75 | /* wait for any prerequisite operations */ |
76 | if (depend_tx) { | 76 | if (depend_tx) { |
@@ -80,7 +80,7 @@ async_memcpy(struct page *dest, struct page *src, unsigned int dest_offset, | |||
80 | BUG_ON(depend_tx->ack); | 80 | BUG_ON(depend_tx->ack); |
81 | if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR) | 81 | if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR) |
82 | panic("%s: DMA_ERROR waiting for depend_tx\n", | 82 | panic("%s: DMA_ERROR waiting for depend_tx\n", |
83 | __FUNCTION__); | 83 | __func__); |
84 | } | 84 | } |
85 | 85 | ||
86 | dest_buf = kmap_atomic(dest, KM_USER0) + dest_offset; | 86 | dest_buf = kmap_atomic(dest, KM_USER0) + dest_offset; |
diff --git a/crypto/async_tx/async_memset.c b/crypto/async_tx/async_memset.c index 09c0e83664bc..f5ff3906b035 100644 --- a/crypto/async_tx/async_memset.c +++ b/crypto/async_tx/async_memset.c | |||
@@ -63,11 +63,11 @@ async_memset(struct page *dest, int val, unsigned int offset, | |||
63 | } | 63 | } |
64 | 64 | ||
65 | if (tx) { | 65 | if (tx) { |
66 | pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len); | 66 | pr_debug("%s: (async) len: %zu\n", __func__, len); |
67 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); | 67 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); |
68 | } else { /* run the memset synchronously */ | 68 | } else { /* run the memset synchronously */ |
69 | void *dest_buf; | 69 | void *dest_buf; |
70 | pr_debug("%s: (sync) len: %zu\n", __FUNCTION__, len); | 70 | pr_debug("%s: (sync) len: %zu\n", __func__, len); |
71 | 71 | ||
72 | dest_buf = (void *) (((char *) page_address(dest)) + offset); | 72 | dest_buf = (void *) (((char *) page_address(dest)) + offset); |
73 | 73 | ||
@@ -79,7 +79,7 @@ async_memset(struct page *dest, int val, unsigned int offset, | |||
79 | BUG_ON(depend_tx->ack); | 79 | BUG_ON(depend_tx->ack); |
80 | if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR) | 80 | if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR) |
81 | panic("%s: DMA_ERROR waiting for depend_tx\n", | 81 | panic("%s: DMA_ERROR waiting for depend_tx\n", |
82 | __FUNCTION__); | 82 | __func__); |
83 | } | 83 | } |
84 | 84 | ||
85 | memset(dest_buf, val, len); | 85 | memset(dest_buf, val, len); |
diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c index 562882189de5..2be3bae89930 100644 --- a/crypto/async_tx/async_tx.c +++ b/crypto/async_tx/async_tx.c | |||
@@ -472,11 +472,11 @@ async_trigger_callback(enum async_tx_flags flags, | |||
472 | tx = NULL; | 472 | tx = NULL; |
473 | 473 | ||
474 | if (tx) { | 474 | if (tx) { |
475 | pr_debug("%s: (async)\n", __FUNCTION__); | 475 | pr_debug("%s: (async)\n", __func__); |
476 | 476 | ||
477 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); | 477 | async_tx_submit(chan, tx, flags, depend_tx, cb_fn, cb_param); |
478 | } else { | 478 | } else { |
479 | pr_debug("%s: (sync)\n", __FUNCTION__); | 479 | pr_debug("%s: (sync)\n", __func__); |
480 | 480 | ||
481 | /* wait for any prerequisite operations */ | 481 | /* wait for any prerequisite operations */ |
482 | if (depend_tx) { | 482 | if (depend_tx) { |
@@ -486,7 +486,7 @@ async_trigger_callback(enum async_tx_flags flags, | |||
486 | BUG_ON(depend_tx->ack); | 486 | BUG_ON(depend_tx->ack); |
487 | if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR) | 487 | if (dma_wait_for_async_tx(depend_tx) == DMA_ERROR) |
488 | panic("%s: DMA_ERROR waiting for depend_tx\n", | 488 | panic("%s: DMA_ERROR waiting for depend_tx\n", |
489 | __FUNCTION__); | 489 | __func__); |
490 | } | 490 | } |
491 | 491 | ||
492 | async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); | 492 | async_tx_sync_epilog(flags, depend_tx, cb_fn, cb_param); |
diff --git a/crypto/async_tx/async_xor.c b/crypto/async_tx/async_xor.c index 2259a4ff15cb..7a9db353f198 100644 --- a/crypto/async_tx/async_xor.c +++ b/crypto/async_tx/async_xor.c | |||
@@ -47,7 +47,7 @@ do_async_xor(struct dma_device *device, | |||
47 | int i; | 47 | int i; |
48 | unsigned long dma_prep_flags = cb_fn ? DMA_PREP_INTERRUPT : 0; | 48 | unsigned long dma_prep_flags = cb_fn ? DMA_PREP_INTERRUPT : 0; |
49 | 49 | ||
50 | pr_debug("%s: len: %zu\n", __FUNCTION__, len); | 50 | pr_debug("%s: len: %zu\n", __func__, len); |
51 | 51 | ||
52 | dma_dest = dma_map_page(device->dev, dest, offset, len, | 52 | dma_dest = dma_map_page(device->dev, dest, offset, len, |
53 | DMA_FROM_DEVICE); | 53 | DMA_FROM_DEVICE); |
@@ -86,7 +86,7 @@ do_sync_xor(struct page *dest, struct page **src_list, unsigned int offset, | |||
86 | void *_dest; | 86 | void *_dest; |
87 | int i; | 87 | int i; |
88 | 88 | ||
89 | pr_debug("%s: len: %zu\n", __FUNCTION__, len); | 89 | pr_debug("%s: len: %zu\n", __func__, len); |
90 | 90 | ||
91 | /* reuse the 'src_list' array to convert to buffer pointers */ | 91 | /* reuse the 'src_list' array to convert to buffer pointers */ |
92 | for (i = 0; i < src_cnt; i++) | 92 | for (i = 0; i < src_cnt; i++) |
@@ -196,7 +196,7 @@ async_xor(struct page *dest, struct page **src_list, unsigned int offset, | |||
196 | DMA_ERROR) | 196 | DMA_ERROR) |
197 | panic("%s: DMA_ERROR waiting for " | 197 | panic("%s: DMA_ERROR waiting for " |
198 | "depend_tx\n", | 198 | "depend_tx\n", |
199 | __FUNCTION__); | 199 | __func__); |
200 | } | 200 | } |
201 | 201 | ||
202 | do_sync_xor(dest, &src_list[src_off], offset, | 202 | do_sync_xor(dest, &src_list[src_off], offset, |
@@ -276,7 +276,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list, | |||
276 | unsigned long dma_prep_flags = cb_fn ? DMA_PREP_INTERRUPT : 0; | 276 | unsigned long dma_prep_flags = cb_fn ? DMA_PREP_INTERRUPT : 0; |
277 | int i; | 277 | int i; |
278 | 278 | ||
279 | pr_debug("%s: (async) len: %zu\n", __FUNCTION__, len); | 279 | pr_debug("%s: (async) len: %zu\n", __func__, len); |
280 | 280 | ||
281 | for (i = 0; i < src_cnt; i++) | 281 | for (i = 0; i < src_cnt; i++) |
282 | dma_src[i] = dma_map_page(device->dev, src_list[i], | 282 | dma_src[i] = dma_map_page(device->dev, src_list[i], |
@@ -299,7 +299,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list, | |||
299 | } else { | 299 | } else { |
300 | unsigned long xor_flags = flags; | 300 | unsigned long xor_flags = flags; |
301 | 301 | ||
302 | pr_debug("%s: (sync) len: %zu\n", __FUNCTION__, len); | 302 | pr_debug("%s: (sync) len: %zu\n", __func__, len); |
303 | 303 | ||
304 | xor_flags |= ASYNC_TX_XOR_DROP_DST; | 304 | xor_flags |= ASYNC_TX_XOR_DROP_DST; |
305 | xor_flags &= ~ASYNC_TX_ACK; | 305 | xor_flags &= ~ASYNC_TX_ACK; |
@@ -310,7 +310,7 @@ async_xor_zero_sum(struct page *dest, struct page **src_list, | |||
310 | if (tx) { | 310 | if (tx) { |
311 | if (dma_wait_for_async_tx(tx) == DMA_ERROR) | 311 | if (dma_wait_for_async_tx(tx) == DMA_ERROR) |
312 | panic("%s: DMA_ERROR waiting for tx\n", | 312 | panic("%s: DMA_ERROR waiting for tx\n", |
313 | __FUNCTION__); | 313 | __func__); |
314 | async_tx_ack(tx); | 314 | async_tx_ack(tx); |
315 | } | 315 | } |
316 | 316 | ||
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index f688c214be0c..b4f5e8542829 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -283,34 +283,22 @@ config ACPI_TOSHIBA | |||
283 | If you have a legacy free Toshiba laptop (such as the Libretto L1 | 283 | If you have a legacy free Toshiba laptop (such as the Libretto L1 |
284 | series), say Y. | 284 | series), say Y. |
285 | 285 | ||
286 | config ACPI_CUSTOM_DSDT | 286 | config ACPI_CUSTOM_DSDT_FILE |
287 | bool "Include Custom DSDT" | 287 | string "Custom DSDT Table file to include" |
288 | default "" | ||
288 | depends on !STANDALONE | 289 | depends on !STANDALONE |
289 | default n | ||
290 | help | 290 | help |
291 | This option supports a custom DSDT by linking it into the kernel. | 291 | This option supports a custom DSDT by linking it into the kernel. |
292 | See Documentation/acpi/dsdt-override.txt | 292 | See Documentation/acpi/dsdt-override.txt |
293 | 293 | ||
294 | If unsure, say N. | ||
295 | |||
296 | config ACPI_CUSTOM_DSDT_FILE | ||
297 | string "Custom DSDT Table file to include" | ||
298 | depends on ACPI_CUSTOM_DSDT | ||
299 | default "" | ||
300 | help | ||
301 | Enter the full path name to the file which includes the AmlCode | 294 | Enter the full path name to the file which includes the AmlCode |
302 | declaration. | 295 | declaration. |
303 | 296 | ||
304 | config ACPI_CUSTOM_DSDT_INITRD | 297 | If unsure, don't enter a file name. |
305 | bool "Read Custom DSDT from initramfs" | ||
306 | depends on BLK_DEV_INITRD | ||
307 | default n | ||
308 | help | ||
309 | This option supports a custom DSDT by optionally loading it from initrd. | ||
310 | See Documentation/acpi/dsdt-override.txt | ||
311 | 298 | ||
312 | If you are not using this feature now, but may use it later, | 299 | config ACPI_CUSTOM_DSDT |
313 | it is safe to say Y here. | 300 | bool |
301 | default ACPI_CUSTOM_DSDT_FILE != "" | ||
314 | 302 | ||
315 | config ACPI_BLACKLIST_YEAR | 303 | config ACPI_BLACKLIST_YEAR |
316 | int "Disable ACPI for systems before Jan 1st this year" if X86_32 | 304 | int "Disable ACPI for systems before Jan 1st this year" if X86_32 |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index ce3c0a2cbac4..5b6760e0f957 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
@@ -776,7 +776,7 @@ static int __init acpi_init(void) | |||
776 | 776 | ||
777 | acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); | 777 | acpi_kobj = kobject_create_and_add("acpi", firmware_kobj); |
778 | if (!acpi_kobj) { | 778 | if (!acpi_kobj) { |
779 | printk(KERN_WARNING "%s: kset create error\n", __FUNCTION__); | 779 | printk(KERN_WARNING "%s: kset create error\n", __func__); |
780 | acpi_kobj = NULL; | 780 | acpi_kobj = NULL; |
781 | } | 781 | } |
782 | 782 | ||
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 24a7865a57cb..6c5da83cdb68 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -449,6 +449,7 @@ static int acpi_button_add(struct acpi_device *device) | |||
449 | input->phys = button->phys; | 449 | input->phys = button->phys; |
450 | input->id.bustype = BUS_HOST; | 450 | input->id.bustype = BUS_HOST; |
451 | input->id.product = button->type; | 451 | input->id.product = button->type; |
452 | input->dev.parent = &device->dev; | ||
452 | 453 | ||
453 | switch (button->type) { | 454 | switch (button->type) { |
454 | case ACPI_BUTTON_TYPE_POWER: | 455 | case ACPI_BUTTON_TYPE_POWER: |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index caf873c14bfb..e7e197e3a4ff 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -129,6 +129,7 @@ static struct acpi_ec { | |||
129 | struct mutex lock; | 129 | struct mutex lock; |
130 | wait_queue_head_t wait; | 130 | wait_queue_head_t wait; |
131 | struct list_head list; | 131 | struct list_head list; |
132 | atomic_t irq_count; | ||
132 | u8 handlers_installed; | 133 | u8 handlers_installed; |
133 | } *boot_ec, *first_ec; | 134 | } *boot_ec, *first_ec; |
134 | 135 | ||
@@ -181,6 +182,8 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
181 | { | 182 | { |
182 | int ret = 0; | 183 | int ret = 0; |
183 | 184 | ||
185 | atomic_set(&ec->irq_count, 0); | ||
186 | |||
184 | if (unlikely(event == ACPI_EC_EVENT_OBF_1 && | 187 | if (unlikely(event == ACPI_EC_EVENT_OBF_1 && |
185 | test_bit(EC_FLAGS_NO_OBF1_GPE, &ec->flags))) | 188 | test_bit(EC_FLAGS_NO_OBF1_GPE, &ec->flags))) |
186 | force_poll = 1; | 189 | force_poll = 1; |
@@ -227,6 +230,7 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
227 | while (time_before(jiffies, delay)) { | 230 | while (time_before(jiffies, delay)) { |
228 | if (acpi_ec_check_status(ec, event)) | 231 | if (acpi_ec_check_status(ec, event)) |
229 | goto end; | 232 | goto end; |
233 | msleep(5); | ||
230 | } | 234 | } |
231 | } | 235 | } |
232 | pr_err(PREFIX "acpi_ec_wait timeout," | 236 | pr_err(PREFIX "acpi_ec_wait timeout," |
@@ -529,6 +533,13 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
529 | struct acpi_ec *ec = data; | 533 | struct acpi_ec *ec = data; |
530 | 534 | ||
531 | pr_debug(PREFIX "~~~> interrupt\n"); | 535 | pr_debug(PREFIX "~~~> interrupt\n"); |
536 | atomic_inc(&ec->irq_count); | ||
537 | if (atomic_read(&ec->irq_count) > 5) { | ||
538 | pr_err(PREFIX "GPE storm detected, disabling EC GPE\n"); | ||
539 | acpi_disable_gpe(NULL, ec->gpe, ACPI_ISR); | ||
540 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); | ||
541 | return ACPI_INTERRUPT_HANDLED; | ||
542 | } | ||
532 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 543 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
533 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) | 544 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) |
534 | wake_up(&ec->wait); | 545 | wake_up(&ec->wait); |
@@ -943,11 +954,7 @@ int __init acpi_ec_ecdt_probe(void) | |||
943 | boot_ec->command_addr = ecdt_ptr->control.address; | 954 | boot_ec->command_addr = ecdt_ptr->control.address; |
944 | boot_ec->data_addr = ecdt_ptr->data.address; | 955 | boot_ec->data_addr = ecdt_ptr->data.address; |
945 | boot_ec->gpe = ecdt_ptr->gpe; | 956 | boot_ec->gpe = ecdt_ptr->gpe; |
946 | if (ACPI_FAILURE(acpi_get_handle(NULL, ecdt_ptr->id, | 957 | boot_ec->handle = ACPI_ROOT_OBJECT; |
947 | &boot_ec->handle))) { | ||
948 | pr_info("Failed to locate handle for boot EC\n"); | ||
949 | boot_ec->handle = ACPI_ROOT_OBJECT; | ||
950 | } | ||
951 | } else { | 958 | } else { |
952 | /* This workaround is needed only on some broken machines, | 959 | /* This workaround is needed only on some broken machines, |
953 | * which require early EC, but fail to provide ECDT */ | 960 | * which require early EC, but fail to provide ECDT */ |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 8edba7b678eb..a697fb6cf050 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -91,10 +91,6 @@ static DEFINE_SPINLOCK(acpi_res_lock); | |||
91 | #define OSI_STRING_LENGTH_MAX 64 /* arbitrary */ | 91 | #define OSI_STRING_LENGTH_MAX 64 /* arbitrary */ |
92 | static char osi_additional_string[OSI_STRING_LENGTH_MAX]; | 92 | static char osi_additional_string[OSI_STRING_LENGTH_MAX]; |
93 | 93 | ||
94 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
95 | static int acpi_no_initrd_override; | ||
96 | #endif | ||
97 | |||
98 | /* | 94 | /* |
99 | * "Ode to _OSI(Linux)" | 95 | * "Ode to _OSI(Linux)" |
100 | * | 96 | * |
@@ -324,67 +320,6 @@ acpi_os_predefined_override(const struct acpi_predefined_names *init_val, | |||
324 | return AE_OK; | 320 | return AE_OK; |
325 | } | 321 | } |
326 | 322 | ||
327 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
328 | static struct acpi_table_header *acpi_find_dsdt_initrd(void) | ||
329 | { | ||
330 | struct file *firmware_file; | ||
331 | mm_segment_t oldfs; | ||
332 | unsigned long len, len2; | ||
333 | struct acpi_table_header *dsdt_buffer, *ret = NULL; | ||
334 | struct kstat stat; | ||
335 | char *ramfs_dsdt_name = "/DSDT.aml"; | ||
336 | |||
337 | printk(KERN_INFO PREFIX "Checking initramfs for custom DSDT\n"); | ||
338 | |||
339 | /* | ||
340 | * Never do this at home, only the user-space is allowed to open a file. | ||
341 | * The clean way would be to use the firmware loader. | ||
342 | * But this code must be run before there is any userspace available. | ||
343 | * A static/init firmware infrastructure doesn't exist yet... | ||
344 | */ | ||
345 | if (vfs_stat(ramfs_dsdt_name, &stat) < 0) | ||
346 | return ret; | ||
347 | |||
348 | len = stat.size; | ||
349 | /* check especially against empty files */ | ||
350 | if (len <= 4) { | ||
351 | printk(KERN_ERR PREFIX "Failed: DSDT only %lu bytes.\n", len); | ||
352 | return ret; | ||
353 | } | ||
354 | |||
355 | firmware_file = filp_open(ramfs_dsdt_name, O_RDONLY, 0); | ||
356 | if (IS_ERR(firmware_file)) { | ||
357 | printk(KERN_ERR PREFIX "Failed to open %s.\n", ramfs_dsdt_name); | ||
358 | return ret; | ||
359 | } | ||
360 | |||
361 | dsdt_buffer = kmalloc(len, GFP_ATOMIC); | ||
362 | if (!dsdt_buffer) { | ||
363 | printk(KERN_ERR PREFIX "Failed to allocate %lu bytes.\n", len); | ||
364 | goto err; | ||
365 | } | ||
366 | |||
367 | oldfs = get_fs(); | ||
368 | set_fs(KERNEL_DS); | ||
369 | len2 = vfs_read(firmware_file, (char __user *)dsdt_buffer, len, | ||
370 | &firmware_file->f_pos); | ||
371 | set_fs(oldfs); | ||
372 | if (len2 < len) { | ||
373 | printk(KERN_ERR PREFIX "Failed to read %lu bytes from %s.\n", | ||
374 | len, ramfs_dsdt_name); | ||
375 | ACPI_FREE(dsdt_buffer); | ||
376 | goto err; | ||
377 | } | ||
378 | |||
379 | printk(KERN_INFO PREFIX "Found %lu byte DSDT in %s.\n", | ||
380 | len, ramfs_dsdt_name); | ||
381 | ret = dsdt_buffer; | ||
382 | err: | ||
383 | filp_close(firmware_file, NULL); | ||
384 | return ret; | ||
385 | } | ||
386 | #endif | ||
387 | |||
388 | acpi_status | 323 | acpi_status |
389 | acpi_os_table_override(struct acpi_table_header * existing_table, | 324 | acpi_os_table_override(struct acpi_table_header * existing_table, |
390 | struct acpi_table_header ** new_table) | 325 | struct acpi_table_header ** new_table) |
@@ -398,16 +333,6 @@ acpi_os_table_override(struct acpi_table_header * existing_table, | |||
398 | if (strncmp(existing_table->signature, "DSDT", 4) == 0) | 333 | if (strncmp(existing_table->signature, "DSDT", 4) == 0) |
399 | *new_table = (struct acpi_table_header *)AmlCode; | 334 | *new_table = (struct acpi_table_header *)AmlCode; |
400 | #endif | 335 | #endif |
401 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
402 | if ((strncmp(existing_table->signature, "DSDT", 4) == 0) && | ||
403 | !acpi_no_initrd_override) { | ||
404 | struct acpi_table_header *initrd_table; | ||
405 | |||
406 | initrd_table = acpi_find_dsdt_initrd(); | ||
407 | if (initrd_table) | ||
408 | *new_table = initrd_table; | ||
409 | } | ||
410 | #endif | ||
411 | if (*new_table != NULL) { | 336 | if (*new_table != NULL) { |
412 | printk(KERN_WARNING PREFIX "Override [%4.4s-%8.8s], " | 337 | printk(KERN_WARNING PREFIX "Override [%4.4s-%8.8s], " |
413 | "this is unsafe: tainting kernel\n", | 338 | "this is unsafe: tainting kernel\n", |
@@ -418,15 +343,6 @@ acpi_os_table_override(struct acpi_table_header * existing_table, | |||
418 | return AE_OK; | 343 | return AE_OK; |
419 | } | 344 | } |
420 | 345 | ||
421 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
422 | static int __init acpi_no_initrd_override_setup(char *s) | ||
423 | { | ||
424 | acpi_no_initrd_override = 1; | ||
425 | return 1; | ||
426 | } | ||
427 | __setup("acpi_no_initrd_override", acpi_no_initrd_override_setup); | ||
428 | #endif | ||
429 | |||
430 | static irqreturn_t acpi_irq(int irq, void *dev_id) | 346 | static irqreturn_t acpi_irq(int irq, void *dev_id) |
431 | { | 347 | { |
432 | u32 handled; | 348 | u32 handled; |
@@ -1237,7 +1153,7 @@ int acpi_check_resource_conflict(struct resource *res) | |||
1237 | 1153 | ||
1238 | if (clash) { | 1154 | if (clash) { |
1239 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { | 1155 | if (acpi_enforce_resources != ENFORCE_RESOURCES_NO) { |
1240 | printk(KERN_INFO "%sACPI: %s resource %s [0x%llx-0x%llx]" | 1156 | printk("%sACPI: %s resource %s [0x%llx-0x%llx]" |
1241 | " conflicts with ACPI region %s" | 1157 | " conflicts with ACPI region %s" |
1242 | " [0x%llx-0x%llx]\n", | 1158 | " [0x%llx-0x%llx]\n", |
1243 | acpi_enforce_resources == ENFORCE_RESOURCES_LAX | 1159 | acpi_enforce_resources == ENFORCE_RESOURCES_LAX |
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c index 7f19859580c7..7af414a3c63e 100644 --- a/drivers/acpi/pci_irq.c +++ b/drivers/acpi/pci_irq.c | |||
@@ -25,6 +25,7 @@ | |||
25 | */ | 25 | */ |
26 | 26 | ||
27 | 27 | ||
28 | #include <linux/dmi.h> | ||
28 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
29 | #include <linux/module.h> | 30 | #include <linux/module.h> |
30 | #include <linux/init.h> | 31 | #include <linux/init.h> |
@@ -76,6 +77,101 @@ static struct acpi_prt_entry *acpi_pci_irq_find_prt_entry(int segment, | |||
76 | return NULL; | 77 | return NULL; |
77 | } | 78 | } |
78 | 79 | ||
80 | /* http://bugzilla.kernel.org/show_bug.cgi?id=4773 */ | ||
81 | static struct dmi_system_id medion_md9580[] = { | ||
82 | { | ||
83 | .ident = "Medion MD9580-F laptop", | ||
84 | .matches = { | ||
85 | DMI_MATCH(DMI_SYS_VENDOR, "MEDIONNB"), | ||
86 | DMI_MATCH(DMI_PRODUCT_NAME, "A555"), | ||
87 | }, | ||
88 | }, | ||
89 | { } | ||
90 | }; | ||
91 | |||
92 | /* http://bugzilla.kernel.org/show_bug.cgi?id=5044 */ | ||
93 | static struct dmi_system_id dell_optiplex[] = { | ||
94 | { | ||
95 | .ident = "Dell Optiplex GX1", | ||
96 | .matches = { | ||
97 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Computer Corporation"), | ||
98 | DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex GX1 600S+"), | ||
99 | }, | ||
100 | }, | ||
101 | { } | ||
102 | }; | ||
103 | |||
104 | /* http://bugzilla.kernel.org/show_bug.cgi?id=10138 */ | ||
105 | static struct dmi_system_id hp_t5710[] = { | ||
106 | { | ||
107 | .ident = "HP t5710", | ||
108 | .matches = { | ||
109 | DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), | ||
110 | DMI_MATCH(DMI_PRODUCT_NAME, "hp t5000 series"), | ||
111 | DMI_MATCH(DMI_BOARD_NAME, "098Ch"), | ||
112 | }, | ||
113 | }, | ||
114 | { } | ||
115 | }; | ||
116 | |||
117 | struct prt_quirk { | ||
118 | struct dmi_system_id *system; | ||
119 | unsigned int segment; | ||
120 | unsigned int bus; | ||
121 | unsigned int device; | ||
122 | unsigned char pin; | ||
123 | char *source; /* according to BIOS */ | ||
124 | char *actual_source; | ||
125 | }; | ||
126 | |||
127 | /* | ||
128 | * These systems have incorrect _PRT entries. The BIOS claims the PCI | ||
129 | * interrupt at the listed segment/bus/device/pin is connected to the first | ||
130 | * link device, but it is actually connected to the second. | ||
131 | */ | ||
132 | static struct prt_quirk prt_quirks[] = { | ||
133 | { medion_md9580, 0, 0, 9, 'A', | ||
134 | "\\_SB_.PCI0.ISA.LNKA", | ||
135 | "\\_SB_.PCI0.ISA.LNKB"}, | ||
136 | { dell_optiplex, 0, 0, 0xd, 'A', | ||
137 | "\\_SB_.LNKB", | ||
138 | "\\_SB_.LNKA"}, | ||
139 | { hp_t5710, 0, 0, 1, 'A', | ||
140 | "\\_SB_.PCI0.LNK1", | ||
141 | "\\_SB_.PCI0.LNK3"}, | ||
142 | }; | ||
143 | |||
144 | static void | ||
145 | do_prt_fixups(struct acpi_prt_entry *entry, struct acpi_pci_routing_table *prt) | ||
146 | { | ||
147 | int i; | ||
148 | struct prt_quirk *quirk; | ||
149 | |||
150 | for (i = 0; i < ARRAY_SIZE(prt_quirks); i++) { | ||
151 | quirk = &prt_quirks[i]; | ||
152 | |||
153 | /* All current quirks involve link devices, not GSIs */ | ||
154 | if (!prt->source) | ||
155 | continue; | ||
156 | |||
157 | if (dmi_check_system(quirk->system) && | ||
158 | entry->id.segment == quirk->segment && | ||
159 | entry->id.bus == quirk->bus && | ||
160 | entry->id.device == quirk->device && | ||
161 | entry->pin + 'A' == quirk->pin && | ||
162 | !strcmp(prt->source, quirk->source) && | ||
163 | strlen(prt->source) >= strlen(quirk->actual_source)) { | ||
164 | printk(KERN_WARNING PREFIX "firmware reports " | ||
165 | "%04x:%02x:%02x[%c] connected to %s; " | ||
166 | "changing to %s\n", | ||
167 | entry->id.segment, entry->id.bus, | ||
168 | entry->id.device, 'A' + entry->pin, | ||
169 | prt->source, quirk->actual_source); | ||
170 | strcpy(prt->source, quirk->actual_source); | ||
171 | } | ||
172 | } | ||
173 | } | ||
174 | |||
79 | static int | 175 | static int |
80 | acpi_pci_irq_add_entry(acpi_handle handle, | 176 | acpi_pci_irq_add_entry(acpi_handle handle, |
81 | int segment, int bus, struct acpi_pci_routing_table *prt) | 177 | int segment, int bus, struct acpi_pci_routing_table *prt) |
@@ -96,6 +192,8 @@ acpi_pci_irq_add_entry(acpi_handle handle, | |||
96 | entry->id.function = prt->address & 0xFFFF; | 192 | entry->id.function = prt->address & 0xFFFF; |
97 | entry->pin = prt->pin; | 193 | entry->pin = prt->pin; |
98 | 194 | ||
195 | do_prt_fixups(entry, prt); | ||
196 | |||
99 | /* | 197 | /* |
100 | * Type 1: Dynamic | 198 | * Type 1: Dynamic |
101 | * --------------- | 199 | * --------------- |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index f14ff1ffab29..c3fed31166b5 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -184,7 +184,7 @@ static void acpi_pci_bridge_scan(struct acpi_device *device) | |||
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | static int acpi_pci_root_add(struct acpi_device *device) | 187 | static int __devinit acpi_pci_root_add(struct acpi_device *device) |
188 | { | 188 | { |
189 | int result = 0; | 189 | int result = 0; |
190 | struct acpi_pci_root *root = NULL; | 190 | struct acpi_pci_root *root = NULL; |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index a3cc8a98255c..36a68fa114e3 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -840,17 +840,19 @@ static int is_processor_present(acpi_handle handle) | |||
840 | 840 | ||
841 | 841 | ||
842 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); | 842 | status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); |
843 | /* | ||
844 | * if a processor object does not have an _STA object, | ||
845 | * OSPM assumes that the processor is present. | ||
846 | */ | ||
847 | if (status == AE_NOT_FOUND) | ||
848 | return 1; | ||
849 | 843 | ||
850 | if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT)) | 844 | if (ACPI_SUCCESS(status) && (sta & ACPI_STA_DEVICE_PRESENT)) |
851 | return 1; | 845 | return 1; |
852 | 846 | ||
853 | ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present")); | 847 | /* |
848 | * _STA is mandatory for a processor that supports hot plug | ||
849 | */ | ||
850 | if (status == AE_NOT_FOUND) | ||
851 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | ||
852 | "Processor does not support hot plug\n")); | ||
853 | else | ||
854 | ACPI_EXCEPTION((AE_INFO, status, | ||
855 | "Processor Device is not present")); | ||
854 | return 0; | 856 | return 0; |
855 | } | 857 | } |
856 | 858 | ||
@@ -886,8 +888,8 @@ int acpi_processor_device_add(acpi_handle handle, struct acpi_device **device) | |||
886 | return 0; | 888 | return 0; |
887 | } | 889 | } |
888 | 890 | ||
889 | static void | 891 | static void __ref acpi_processor_hotplug_notify(acpi_handle handle, |
890 | acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | 892 | u32 event, void *data) |
891 | { | 893 | { |
892 | struct acpi_processor *pr; | 894 | struct acpi_processor *pr; |
893 | struct acpi_device *device = NULL; | 895 | struct acpi_device *device = NULL; |
@@ -897,9 +899,10 @@ acpi_processor_hotplug_notify(acpi_handle handle, u32 event, void *data) | |||
897 | switch (event) { | 899 | switch (event) { |
898 | case ACPI_NOTIFY_BUS_CHECK: | 900 | case ACPI_NOTIFY_BUS_CHECK: |
899 | case ACPI_NOTIFY_DEVICE_CHECK: | 901 | case ACPI_NOTIFY_DEVICE_CHECK: |
900 | printk("Processor driver received %s event\n", | 902 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
903 | "Processor driver received %s event\n", | ||
901 | (event == ACPI_NOTIFY_BUS_CHECK) ? | 904 | (event == ACPI_NOTIFY_BUS_CHECK) ? |
902 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK"); | 905 | "ACPI_NOTIFY_BUS_CHECK" : "ACPI_NOTIFY_DEVICE_CHECK")); |
903 | 906 | ||
904 | if (!is_processor_present(handle)) | 907 | if (!is_processor_present(handle)) |
905 | break; | 908 | break; |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 3fac011f9cf9..57570ac47803 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -609,7 +609,8 @@ acpi_bus_get_ejd(acpi_handle handle, acpi_handle *ejd) | |||
609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); | 609 | status = acpi_evaluate_object(handle, "_EJD", NULL, &buffer); |
610 | if (ACPI_SUCCESS(status)) { | 610 | if (ACPI_SUCCESS(status)) { |
611 | obj = buffer.pointer; | 611 | obj = buffer.pointer; |
612 | status = acpi_get_handle(NULL, obj->string.pointer, ejd); | 612 | status = acpi_get_handle(ACPI_ROOT_OBJECT, obj->string.pointer, |
613 | ejd); | ||
613 | kfree(buffer.pointer); | 614 | kfree(buffer.pointer); |
614 | } | 615 | } |
615 | return status; | 616 | return status; |
@@ -966,7 +967,7 @@ static void acpi_device_set_id(struct acpi_device *device, | |||
966 | case ACPI_BUS_TYPE_DEVICE: | 967 | case ACPI_BUS_TYPE_DEVICE: |
967 | status = acpi_get_object_info(handle, &buffer); | 968 | status = acpi_get_object_info(handle, &buffer); |
968 | if (ACPI_FAILURE(status)) { | 969 | if (ACPI_FAILURE(status)) { |
969 | printk(KERN_ERR PREFIX "%s: Error reading device info\n", __FUNCTION__); | 970 | printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__); |
970 | return; | 971 | return; |
971 | } | 972 | } |
972 | 973 | ||
diff --git a/drivers/acpi/sleep/main.c b/drivers/acpi/sleep/main.c index 293a1cbb47c0..d2f71a54726c 100644 --- a/drivers/acpi/sleep/main.c +++ b/drivers/acpi/sleep/main.c | |||
@@ -504,7 +504,7 @@ static void acpi_power_off_prepare(void) | |||
504 | static void acpi_power_off(void) | 504 | static void acpi_power_off(void) |
505 | { | 505 | { |
506 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ | 506 | /* acpi_sleep_prepare(ACPI_STATE_S5) should have already been called */ |
507 | printk("%s called\n", __FUNCTION__); | 507 | printk("%s called\n", __func__); |
508 | local_irq_disable(); | 508 | local_irq_disable(); |
509 | acpi_enable_wakeup_device(ACPI_STATE_S5); | 509 | acpi_enable_wakeup_device(ACPI_STATE_S5); |
510 | acpi_enter_sleep_state(ACPI_STATE_S5); | 510 | acpi_enter_sleep_state(ACPI_STATE_S5); |
diff --git a/drivers/acpi/system.c b/drivers/acpi/system.c index 55cf4c05bb74..4749f379a915 100644 --- a/drivers/acpi/system.c +++ b/drivers/acpi/system.c | |||
@@ -319,7 +319,7 @@ void acpi_irq_stats_init(void) | |||
319 | goto fail; | 319 | goto fail; |
320 | 320 | ||
321 | for (i = 0; i < num_counters; ++i) { | 321 | for (i = 0; i < num_counters; ++i) { |
322 | char buffer[10]; | 322 | char buffer[12]; |
323 | char *name; | 323 | char *name; |
324 | 324 | ||
325 | if (i < num_gpes) | 325 | if (i < num_gpes) |
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 8d4b79b4f933..c4e00ac8ea85 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -879,6 +879,8 @@ static void acpi_thermal_check(void *data) | |||
879 | } | 879 | } |
880 | 880 | ||
881 | /* sys I/F for generic thermal sysfs support */ | 881 | /* sys I/F for generic thermal sysfs support */ |
882 | #define KELVIN_TO_MILLICELSIUS(t) (t * 100 - 273200) | ||
883 | |||
882 | static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) | 884 | static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) |
883 | { | 885 | { |
884 | struct acpi_thermal *tz = thermal->devdata; | 886 | struct acpi_thermal *tz = thermal->devdata; |
@@ -886,7 +888,7 @@ static int thermal_get_temp(struct thermal_zone_device *thermal, char *buf) | |||
886 | if (!tz) | 888 | if (!tz) |
887 | return -EINVAL; | 889 | return -EINVAL; |
888 | 890 | ||
889 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS(tz->temperature)); | 891 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS(tz->temperature)); |
890 | } | 892 | } |
891 | 893 | ||
892 | static const char enabled[] = "kernel"; | 894 | static const char enabled[] = "kernel"; |
@@ -980,21 +982,21 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, | |||
980 | 982 | ||
981 | if (tz->trips.critical.flags.valid) { | 983 | if (tz->trips.critical.flags.valid) { |
982 | if (!trip) | 984 | if (!trip) |
983 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 985 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
984 | tz->trips.critical.temperature)); | 986 | tz->trips.critical.temperature)); |
985 | trip--; | 987 | trip--; |
986 | } | 988 | } |
987 | 989 | ||
988 | if (tz->trips.hot.flags.valid) { | 990 | if (tz->trips.hot.flags.valid) { |
989 | if (!trip) | 991 | if (!trip) |
990 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 992 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
991 | tz->trips.hot.temperature)); | 993 | tz->trips.hot.temperature)); |
992 | trip--; | 994 | trip--; |
993 | } | 995 | } |
994 | 996 | ||
995 | if (tz->trips.passive.flags.valid) { | 997 | if (tz->trips.passive.flags.valid) { |
996 | if (!trip) | 998 | if (!trip) |
997 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 999 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
998 | tz->trips.passive.temperature)); | 1000 | tz->trips.passive.temperature)); |
999 | trip--; | 1001 | trip--; |
1000 | } | 1002 | } |
@@ -1002,7 +1004,7 @@ static int thermal_get_trip_temp(struct thermal_zone_device *thermal, | |||
1002 | for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && | 1004 | for (i = 0; i < ACPI_THERMAL_MAX_ACTIVE && |
1003 | tz->trips.active[i].flags.valid; i++) { | 1005 | tz->trips.active[i].flags.valid; i++) { |
1004 | if (!trip) | 1006 | if (!trip) |
1005 | return sprintf(buf, "%ld\n", KELVIN_TO_CELSIUS( | 1007 | return sprintf(buf, "%ld\n", KELVIN_TO_MILLICELSIUS( |
1006 | tz->trips.active[i].temperature)); | 1008 | tz->trips.active[i].temperature)); |
1007 | trip--; | 1009 | trip--; |
1008 | } | 1010 | } |
diff --git a/drivers/acpi/toshiba_acpi.c b/drivers/acpi/toshiba_acpi.c index 9e8c20c6a0b7..0a43c8e0eff3 100644 --- a/drivers/acpi/toshiba_acpi.c +++ b/drivers/acpi/toshiba_acpi.c | |||
@@ -99,6 +99,13 @@ MODULE_LICENSE("GPL"); | |||
99 | #define HCI_VIDEO_OUT_CRT 0x2 | 99 | #define HCI_VIDEO_OUT_CRT 0x2 |
100 | #define HCI_VIDEO_OUT_TV 0x4 | 100 | #define HCI_VIDEO_OUT_TV 0x4 |
101 | 101 | ||
102 | static const struct acpi_device_id toshiba_device_ids[] = { | ||
103 | {"TOS6200", 0}, | ||
104 | {"TOS1900", 0}, | ||
105 | {"", 0}, | ||
106 | }; | ||
107 | MODULE_DEVICE_TABLE(acpi, toshiba_device_ids); | ||
108 | |||
102 | /* utility | 109 | /* utility |
103 | */ | 110 | */ |
104 | 111 | ||
diff --git a/drivers/acpi/utilities/utdebug.c b/drivers/acpi/utilities/utdebug.c index c7e128e5369b..7361204b1eef 100644 --- a/drivers/acpi/utilities/utdebug.c +++ b/drivers/acpi/utilities/utdebug.c | |||
@@ -109,7 +109,7 @@ void acpi_ut_track_stack_ptr(void) | |||
109 | * RETURN: Updated pointer to the function name | 109 | * RETURN: Updated pointer to the function name |
110 | * | 110 | * |
111 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. | 111 | * DESCRIPTION: Remove the "Acpi" prefix from the function name, if present. |
112 | * This allows compiler macros such as __FUNCTION__ to be used | 112 | * This allows compiler macros such as __func__ to be used |
113 | * with no change to the debug output. | 113 | * with no change to the debug output. |
114 | * | 114 | * |
115 | ******************************************************************************/ | 115 | ******************************************************************************/ |
diff --git a/drivers/acpi/utilities/utobject.c b/drivers/acpi/utilities/utobject.c index 76ee766c84f9..e08b3fa6639f 100644 --- a/drivers/acpi/utilities/utobject.c +++ b/drivers/acpi/utilities/utobject.c | |||
@@ -432,7 +432,7 @@ acpi_ut_get_simple_object_size(union acpi_operand_object *internal_object, | |||
432 | * element -- which is legal) | 432 | * element -- which is legal) |
433 | */ | 433 | */ |
434 | if (!internal_object) { | 434 | if (!internal_object) { |
435 | *obj_length = 0; | 435 | *obj_length = sizeof(union acpi_object); |
436 | return_ACPI_STATUS(AE_OK); | 436 | return_ACPI_STATUS(AE_OK); |
437 | } | 437 | } |
438 | 438 | ||
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c index eba55b7d6c95..44ea60cf21c0 100644 --- a/drivers/acpi/utils.c +++ b/drivers/acpi/utils.c | |||
@@ -407,6 +407,12 @@ acpi_evaluate_reference(acpi_handle handle, | |||
407 | break; | 407 | break; |
408 | } | 408 | } |
409 | 409 | ||
410 | if (!element->reference.handle) { | ||
411 | printk(KERN_WARNING PREFIX "Invalid reference in" | ||
412 | " package %s\n", pathname); | ||
413 | status = AE_NULL_ENTRY; | ||
414 | break; | ||
415 | } | ||
410 | /* Get the acpi_handle. */ | 416 | /* Get the acpi_handle. */ |
411 | 417 | ||
412 | list->handles[i] = element->reference.handle; | 418 | list->handles[i] = element->reference.handle; |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 12cce69b5441..1bc0c74f2755 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -713,7 +713,7 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
713 | 713 | ||
714 | kfree(obj); | 714 | kfree(obj); |
715 | 715 | ||
716 | if (device->cap._BCL && device->cap._BCM && device->cap._BQC && max_level > 0){ | 716 | if (device->cap._BCL && device->cap._BCM && max_level > 0) { |
717 | int result; | 717 | int result; |
718 | static int count = 0; | 718 | static int count = 0; |
719 | char *name; | 719 | char *name; |
@@ -1201,7 +1201,7 @@ static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) | |||
1201 | if (!video) | 1201 | if (!video) |
1202 | goto end; | 1202 | goto end; |
1203 | 1203 | ||
1204 | printk(KERN_INFO PREFIX "Please implement %s\n", __FUNCTION__); | 1204 | printk(KERN_INFO PREFIX "Please implement %s\n", __func__); |
1205 | seq_printf(seq, "<TODO>\n"); | 1205 | seq_printf(seq, "<TODO>\n"); |
1206 | 1206 | ||
1207 | end: | 1207 | end: |
diff --git a/drivers/acpi/wmi.c b/drivers/acpi/wmi.c index efacc9f8bfe3..c33b1c6e93b1 100644 --- a/drivers/acpi/wmi.c +++ b/drivers/acpi/wmi.c | |||
@@ -293,7 +293,7 @@ struct acpi_buffer *out) | |||
293 | { | 293 | { |
294 | struct guid_block *block = NULL; | 294 | struct guid_block *block = NULL; |
295 | struct wmi_block *wblock = NULL; | 295 | struct wmi_block *wblock = NULL; |
296 | acpi_handle handle; | 296 | acpi_handle handle, wc_handle; |
297 | acpi_status status, wc_status = AE_ERROR; | 297 | acpi_status status, wc_status = AE_ERROR; |
298 | struct acpi_object_list input, wc_input; | 298 | struct acpi_object_list input, wc_input; |
299 | union acpi_object wc_params[1], wq_params[1]; | 299 | union acpi_object wc_params[1], wq_params[1]; |
@@ -338,8 +338,10 @@ struct acpi_buffer *out) | |||
338 | * expensive, but have no corresponding WCxx method. So we | 338 | * expensive, but have no corresponding WCxx method. So we |
339 | * should not fail if this happens. | 339 | * should not fail if this happens. |
340 | */ | 340 | */ |
341 | wc_status = acpi_evaluate_object(handle, wc_method, | 341 | wc_status = acpi_get_handle(handle, wc_method, &wc_handle); |
342 | &wc_input, NULL); | 342 | if (ACPI_SUCCESS(wc_status)) |
343 | wc_status = acpi_evaluate_object(handle, wc_method, | ||
344 | &wc_input, NULL); | ||
343 | } | 345 | } |
344 | 346 | ||
345 | strcpy(method, "WQ"); | 347 | strcpy(method, "WQ"); |
@@ -351,7 +353,7 @@ struct acpi_buffer *out) | |||
351 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if | 353 | * If ACPI_WMI_EXPENSIVE, call the relevant WCxx method, even if |
352 | * the WQxx method failed - we should disable collection anyway. | 354 | * the WQxx method failed - we should disable collection anyway. |
353 | */ | 355 | */ |
354 | if ((block->flags & ACPI_WMI_EXPENSIVE) && wc_status) { | 356 | if ((block->flags & ACPI_WMI_EXPENSIVE) && ACPI_SUCCESS(wc_status)) { |
355 | wc_params[0].integer.value = 0; | 357 | wc_params[0].integer.value = 0; |
356 | status = acpi_evaluate_object(handle, | 358 | status = acpi_evaluate_object(handle, |
357 | wc_method, &wc_input, NULL); | 359 | wc_method, &wc_input, NULL); |
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig index ba8f7f4dfa11..e469647330de 100644 --- a/drivers/ata/Kconfig +++ b/drivers/ata/Kconfig | |||
@@ -538,6 +538,15 @@ config PATA_RADISYS | |||
538 | 538 | ||
539 | If unsure, say N. | 539 | If unsure, say N. |
540 | 540 | ||
541 | config PATA_RB500 | ||
542 | tristate "RouterBoard 500 PATA CompactFlash support" | ||
543 | depends on MIKROTIK_RB500 | ||
544 | help | ||
545 | This option enables support for the RouterBoard 500 | ||
546 | PATA CompactFlash controller. | ||
547 | |||
548 | If unsure, say N. | ||
549 | |||
541 | config PATA_RZ1000 | 550 | config PATA_RZ1000 |
542 | tristate "PC Tech RZ1000 PATA support" | 551 | tristate "PC Tech RZ1000 PATA support" |
543 | depends on PCI | 552 | depends on PCI |
diff --git a/drivers/ata/Makefile b/drivers/ata/Makefile index 701651e37c89..0511e6f0bb58 100644 --- a/drivers/ata/Makefile +++ b/drivers/ata/Makefile | |||
@@ -55,6 +55,7 @@ obj-$(CONFIG_PATA_PDC2027X) += pata_pdc2027x.o | |||
55 | obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o | 55 | obj-$(CONFIG_PATA_PDC_OLD) += pata_pdc202xx_old.o |
56 | obj-$(CONFIG_PATA_QDI) += pata_qdi.o | 56 | obj-$(CONFIG_PATA_QDI) += pata_qdi.o |
57 | obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o | 57 | obj-$(CONFIG_PATA_RADISYS) += pata_radisys.o |
58 | obj-$(CONFIG_PATA_RB500) += pata_rb500_cf.o | ||
58 | obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o | 59 | obj-$(CONFIG_PATA_RZ1000) += pata_rz1000.o |
59 | obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o | 60 | obj-$(CONFIG_PATA_SC1200) += pata_sc1200.o |
60 | obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o | 61 | obj-$(CONFIG_PATA_SERVERWORKS) += pata_serverworks.o |
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 8a49835bd0f8..6978469eb16d 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -567,6 +567,18 @@ static const struct pci_device_id ahci_pci_tbl[] = { | |||
567 | { PCI_VDEVICE(NVIDIA, 0x0abd), board_ahci }, /* MCP79 */ | 567 | { PCI_VDEVICE(NVIDIA, 0x0abd), board_ahci }, /* MCP79 */ |
568 | { PCI_VDEVICE(NVIDIA, 0x0abe), board_ahci }, /* MCP79 */ | 568 | { PCI_VDEVICE(NVIDIA, 0x0abe), board_ahci }, /* MCP79 */ |
569 | { PCI_VDEVICE(NVIDIA, 0x0abf), board_ahci }, /* MCP79 */ | 569 | { PCI_VDEVICE(NVIDIA, 0x0abf), board_ahci }, /* MCP79 */ |
570 | { PCI_VDEVICE(NVIDIA, 0x0bc8), board_ahci }, /* MCP7B */ | ||
571 | { PCI_VDEVICE(NVIDIA, 0x0bc9), board_ahci }, /* MCP7B */ | ||
572 | { PCI_VDEVICE(NVIDIA, 0x0bca), board_ahci }, /* MCP7B */ | ||
573 | { PCI_VDEVICE(NVIDIA, 0x0bcb), board_ahci }, /* MCP7B */ | ||
574 | { PCI_VDEVICE(NVIDIA, 0x0bcc), board_ahci }, /* MCP7B */ | ||
575 | { PCI_VDEVICE(NVIDIA, 0x0bcd), board_ahci }, /* MCP7B */ | ||
576 | { PCI_VDEVICE(NVIDIA, 0x0bce), board_ahci }, /* MCP7B */ | ||
577 | { PCI_VDEVICE(NVIDIA, 0x0bcf), board_ahci }, /* MCP7B */ | ||
578 | { PCI_VDEVICE(NVIDIA, 0x0bd0), board_ahci }, /* MCP7B */ | ||
579 | { PCI_VDEVICE(NVIDIA, 0x0bd1), board_ahci }, /* MCP7B */ | ||
580 | { PCI_VDEVICE(NVIDIA, 0x0bd2), board_ahci }, /* MCP7B */ | ||
581 | { PCI_VDEVICE(NVIDIA, 0x0bd3), board_ahci }, /* MCP7B */ | ||
570 | 582 | ||
571 | /* SiS */ | 583 | /* SiS */ |
572 | { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ | 584 | { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ |
@@ -672,7 +684,7 @@ static void ahci_save_initial_config(struct pci_dev *pdev, | |||
672 | cap &= ~HOST_CAP_NCQ; | 684 | cap &= ~HOST_CAP_NCQ; |
673 | } | 685 | } |
674 | 686 | ||
675 | if ((cap && HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { | 687 | if ((cap & HOST_CAP_PMP) && (hpriv->flags & AHCI_HFLAG_NO_PMP)) { |
676 | dev_printk(KERN_INFO, &pdev->dev, | 688 | dev_printk(KERN_INFO, &pdev->dev, |
677 | "controller can't do PMP, turning off CAP_PMP\n"); | 689 | "controller can't do PMP, turning off CAP_PMP\n"); |
678 | cap &= ~HOST_CAP_PMP; | 690 | cap &= ~HOST_CAP_PMP; |
diff --git a/drivers/ata/libata-acpi.c b/drivers/ata/libata-acpi.c index 9e8ec19260af..0770cb7391a4 100644 --- a/drivers/ata/libata-acpi.c +++ b/drivers/ata/libata-acpi.c | |||
@@ -382,7 +382,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) | |||
382 | 382 | ||
383 | if (ata_msg_probe(ap)) | 383 | if (ata_msg_probe(ap)) |
384 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n", | 384 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER: port#: %d\n", |
385 | __FUNCTION__, ap->port_no); | 385 | __func__, ap->port_no); |
386 | 386 | ||
387 | /* _GTF has no input parameters */ | 387 | /* _GTF has no input parameters */ |
388 | status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output); | 388 | status = acpi_evaluate_object(dev->acpi_handle, "_GTF", NULL, &output); |
@@ -402,7 +402,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) | |||
402 | if (ata_msg_probe(ap)) | 402 | if (ata_msg_probe(ap)) |
403 | ata_dev_printk(dev, KERN_DEBUG, "%s: Run _GTF: " | 403 | ata_dev_printk(dev, KERN_DEBUG, "%s: Run _GTF: " |
404 | "length or ptr is NULL (0x%llx, 0x%p)\n", | 404 | "length or ptr is NULL (0x%llx, 0x%p)\n", |
405 | __FUNCTION__, | 405 | __func__, |
406 | (unsigned long long)output.length, | 406 | (unsigned long long)output.length, |
407 | output.pointer); | 407 | output.pointer); |
408 | rc = -EINVAL; | 408 | rc = -EINVAL; |
@@ -432,7 +432,7 @@ static int ata_dev_get_GTF(struct ata_device *dev, struct ata_acpi_gtf **gtf) | |||
432 | if (ata_msg_probe(ap)) | 432 | if (ata_msg_probe(ap)) |
433 | ata_dev_printk(dev, KERN_DEBUG, | 433 | ata_dev_printk(dev, KERN_DEBUG, |
434 | "%s: returning gtf=%p, gtf_count=%d\n", | 434 | "%s: returning gtf=%p, gtf_count=%d\n", |
435 | __FUNCTION__, *gtf, rc); | 435 | __func__, *gtf, rc); |
436 | } | 436 | } |
437 | return rc; | 437 | return rc; |
438 | 438 | ||
@@ -725,7 +725,7 @@ static int ata_acpi_push_id(struct ata_device *dev) | |||
725 | 725 | ||
726 | if (ata_msg_probe(ap)) | 726 | if (ata_msg_probe(ap)) |
727 | ata_dev_printk(dev, KERN_DEBUG, "%s: ix = %d, port#: %d\n", | 727 | ata_dev_printk(dev, KERN_DEBUG, "%s: ix = %d, port#: %d\n", |
728 | __FUNCTION__, dev->devno, ap->port_no); | 728 | __func__, dev->devno, ap->port_no); |
729 | 729 | ||
730 | /* Give the drive Identify data to the drive via the _SDD method */ | 730 | /* Give the drive Identify data to the drive via the _SDD method */ |
731 | /* _SDD: set up input parameters */ | 731 | /* _SDD: set up input parameters */ |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 4fbcce758b04..4bbe31f98ef8 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -106,7 +106,8 @@ static struct ata_force_ent *ata_force_tbl; | |||
106 | static int ata_force_tbl_size; | 106 | static int ata_force_tbl_size; |
107 | 107 | ||
108 | static char ata_force_param_buf[PAGE_SIZE] __initdata; | 108 | static char ata_force_param_buf[PAGE_SIZE] __initdata; |
109 | module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0444); | 109 | /* param_buf is thrown away after initialization, disallow read */ |
110 | module_param_string(force, ata_force_param_buf, sizeof(ata_force_param_buf), 0); | ||
110 | MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)"); | 111 | MODULE_PARM_DESC(force, "Force ATA configurations including cable type, link speed and transfer mode (see Documentation/kernel-parameters.txt for details)"); |
111 | 112 | ||
112 | int atapi_enabled = 1; | 113 | int atapi_enabled = 1; |
@@ -1719,7 +1720,7 @@ void ata_port_flush_task(struct ata_port *ap) | |||
1719 | cancel_rearming_delayed_work(&ap->port_task); | 1720 | cancel_rearming_delayed_work(&ap->port_task); |
1720 | 1721 | ||
1721 | if (ata_msg_ctl(ap)) | 1722 | if (ata_msg_ctl(ap)) |
1722 | ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __FUNCTION__); | 1723 | ata_port_printk(ap, KERN_DEBUG, "%s: EXIT\n", __func__); |
1723 | } | 1724 | } |
1724 | 1725 | ||
1725 | static void ata_qc_complete_internal(struct ata_queued_cmd *qc) | 1726 | static void ata_qc_complete_internal(struct ata_queued_cmd *qc) |
@@ -2056,7 +2057,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class, | |||
2056 | int rc; | 2057 | int rc; |
2057 | 2058 | ||
2058 | if (ata_msg_ctl(ap)) | 2059 | if (ata_msg_ctl(ap)) |
2059 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__); | 2060 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__); |
2060 | 2061 | ||
2061 | ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ | 2062 | ata_dev_select(ap, dev->devno, 1, 1); /* select device 0/1 */ |
2062 | retry: | 2063 | retry: |
@@ -2253,12 +2254,12 @@ int ata_dev_configure(struct ata_device *dev) | |||
2253 | 2254 | ||
2254 | if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { | 2255 | if (!ata_dev_enabled(dev) && ata_msg_info(ap)) { |
2255 | ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n", | 2256 | ata_dev_printk(dev, KERN_INFO, "%s: ENTER/EXIT -- nodev\n", |
2256 | __FUNCTION__); | 2257 | __func__); |
2257 | return 0; | 2258 | return 0; |
2258 | } | 2259 | } |
2259 | 2260 | ||
2260 | if (ata_msg_probe(ap)) | 2261 | if (ata_msg_probe(ap)) |
2261 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __FUNCTION__); | 2262 | ata_dev_printk(dev, KERN_DEBUG, "%s: ENTER\n", __func__); |
2262 | 2263 | ||
2263 | /* set horkage */ | 2264 | /* set horkage */ |
2264 | dev->horkage |= ata_dev_blacklisted(dev); | 2265 | dev->horkage |= ata_dev_blacklisted(dev); |
@@ -2279,7 +2280,7 @@ int ata_dev_configure(struct ata_device *dev) | |||
2279 | ata_dev_printk(dev, KERN_DEBUG, | 2280 | ata_dev_printk(dev, KERN_DEBUG, |
2280 | "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " | 2281 | "%s: cfg 49:%04x 82:%04x 83:%04x 84:%04x " |
2281 | "85:%04x 86:%04x 87:%04x 88:%04x\n", | 2282 | "85:%04x 86:%04x 87:%04x 88:%04x\n", |
2282 | __FUNCTION__, | 2283 | __func__, |
2283 | id[49], id[82], id[83], id[84], | 2284 | id[49], id[82], id[83], id[84], |
2284 | id[85], id[86], id[87], id[88]); | 2285 | id[85], id[86], id[87], id[88]); |
2285 | 2286 | ||
@@ -2511,13 +2512,13 @@ int ata_dev_configure(struct ata_device *dev) | |||
2511 | 2512 | ||
2512 | if (ata_msg_probe(ap)) | 2513 | if (ata_msg_probe(ap)) |
2513 | ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n", | 2514 | ata_dev_printk(dev, KERN_DEBUG, "%s: EXIT, drv_stat = 0x%x\n", |
2514 | __FUNCTION__, ata_chk_status(ap)); | 2515 | __func__, ata_chk_status(ap)); |
2515 | return 0; | 2516 | return 0; |
2516 | 2517 | ||
2517 | err_out_nosup: | 2518 | err_out_nosup: |
2518 | if (ata_msg_probe(ap)) | 2519 | if (ata_msg_probe(ap)) |
2519 | ata_dev_printk(dev, KERN_DEBUG, | 2520 | ata_dev_printk(dev, KERN_DEBUG, |
2520 | "%s: EXIT, err\n", __FUNCTION__); | 2521 | "%s: EXIT, err\n", __func__); |
2521 | return rc; | 2522 | return rc; |
2522 | } | 2523 | } |
2523 | 2524 | ||
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index 698ce2cea52c..681252fd8143 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -2150,6 +2150,15 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2150 | ap->ops->set_piomode(ap, dev); | 2150 | ap->ops->set_piomode(ap, dev); |
2151 | } | 2151 | } |
2152 | 2152 | ||
2153 | if (!softreset && !hardreset) { | ||
2154 | if (verbose) | ||
2155 | ata_link_printk(link, KERN_INFO, "no reset method " | ||
2156 | "available, skipping reset\n"); | ||
2157 | if (!(lflags & ATA_LFLAG_ASSUME_CLASS)) | ||
2158 | lflags |= ATA_LFLAG_ASSUME_ATA; | ||
2159 | goto done; | ||
2160 | } | ||
2161 | |||
2153 | /* Determine which reset to use and record in ehc->i.action. | 2162 | /* Determine which reset to use and record in ehc->i.action. |
2154 | * prereset() may examine and modify it. | 2163 | * prereset() may examine and modify it. |
2155 | */ | 2164 | */ |
@@ -2254,6 +2263,7 @@ int ata_eh_reset(struct ata_link *link, int classify, | |||
2254 | lflags |= ATA_LFLAG_ASSUME_ATA; | 2263 | lflags |= ATA_LFLAG_ASSUME_ATA; |
2255 | } | 2264 | } |
2256 | 2265 | ||
2266 | done: | ||
2257 | ata_link_for_each_dev(dev, link) { | 2267 | ata_link_for_each_dev(dev, link) { |
2258 | /* After the reset, the device state is PIO 0 and the | 2268 | /* After the reset, the device state is PIO 0 and the |
2259 | * controller state is undefined. Reset also wakes up | 2269 | * controller state is undefined. Reset also wakes up |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 60cd4b179766..20dc572fb45a 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
@@ -56,7 +56,8 @@ u8 ata_irq_on(struct ata_port *ap) | |||
56 | ap->ctl &= ~ATA_NIEN; | 56 | ap->ctl &= ~ATA_NIEN; |
57 | ap->last_ctl = ap->ctl; | 57 | ap->last_ctl = ap->ctl; |
58 | 58 | ||
59 | iowrite8(ap->ctl, ioaddr->ctl_addr); | 59 | if (ioaddr->ctl_addr) |
60 | iowrite8(ap->ctl, ioaddr->ctl_addr); | ||
60 | tmp = ata_wait_idle(ap); | 61 | tmp = ata_wait_idle(ap); |
61 | 62 | ||
62 | ap->ops->irq_clear(ap); | 63 | ap->ops->irq_clear(ap); |
@@ -81,12 +82,14 @@ void ata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) | |||
81 | unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR; | 82 | unsigned int is_addr = tf->flags & ATA_TFLAG_ISADDR; |
82 | 83 | ||
83 | if (tf->ctl != ap->last_ctl) { | 84 | if (tf->ctl != ap->last_ctl) { |
84 | iowrite8(tf->ctl, ioaddr->ctl_addr); | 85 | if (ioaddr->ctl_addr) |
86 | iowrite8(tf->ctl, ioaddr->ctl_addr); | ||
85 | ap->last_ctl = tf->ctl; | 87 | ap->last_ctl = tf->ctl; |
86 | ata_wait_idle(ap); | 88 | ata_wait_idle(ap); |
87 | } | 89 | } |
88 | 90 | ||
89 | if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) { | 91 | if (is_addr && (tf->flags & ATA_TFLAG_LBA48)) { |
92 | WARN_ON(!ioaddr->ctl_addr); | ||
90 | iowrite8(tf->hob_feature, ioaddr->feature_addr); | 93 | iowrite8(tf->hob_feature, ioaddr->feature_addr); |
91 | iowrite8(tf->hob_nsect, ioaddr->nsect_addr); | 94 | iowrite8(tf->hob_nsect, ioaddr->nsect_addr); |
92 | iowrite8(tf->hob_lbal, ioaddr->lbal_addr); | 95 | iowrite8(tf->hob_lbal, ioaddr->lbal_addr); |
@@ -167,14 +170,17 @@ void ata_tf_read(struct ata_port *ap, struct ata_taskfile *tf) | |||
167 | tf->device = ioread8(ioaddr->device_addr); | 170 | tf->device = ioread8(ioaddr->device_addr); |
168 | 171 | ||
169 | if (tf->flags & ATA_TFLAG_LBA48) { | 172 | if (tf->flags & ATA_TFLAG_LBA48) { |
170 | iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr); | 173 | if (likely(ioaddr->ctl_addr)) { |
171 | tf->hob_feature = ioread8(ioaddr->error_addr); | 174 | iowrite8(tf->ctl | ATA_HOB, ioaddr->ctl_addr); |
172 | tf->hob_nsect = ioread8(ioaddr->nsect_addr); | 175 | tf->hob_feature = ioread8(ioaddr->error_addr); |
173 | tf->hob_lbal = ioread8(ioaddr->lbal_addr); | 176 | tf->hob_nsect = ioread8(ioaddr->nsect_addr); |
174 | tf->hob_lbam = ioread8(ioaddr->lbam_addr); | 177 | tf->hob_lbal = ioread8(ioaddr->lbal_addr); |
175 | tf->hob_lbah = ioread8(ioaddr->lbah_addr); | 178 | tf->hob_lbam = ioread8(ioaddr->lbam_addr); |
176 | iowrite8(tf->ctl, ioaddr->ctl_addr); | 179 | tf->hob_lbah = ioread8(ioaddr->lbah_addr); |
177 | ap->last_ctl = tf->ctl; | 180 | iowrite8(tf->ctl, ioaddr->ctl_addr); |
181 | ap->last_ctl = tf->ctl; | ||
182 | } else | ||
183 | WARN_ON(1); | ||
178 | } | 184 | } |
179 | } | 185 | } |
180 | 186 | ||
@@ -352,7 +358,8 @@ void ata_bmdma_freeze(struct ata_port *ap) | |||
352 | ap->ctl |= ATA_NIEN; | 358 | ap->ctl |= ATA_NIEN; |
353 | ap->last_ctl = ap->ctl; | 359 | ap->last_ctl = ap->ctl; |
354 | 360 | ||
355 | iowrite8(ap->ctl, ioaddr->ctl_addr); | 361 | if (ioaddr->ctl_addr) |
362 | iowrite8(ap->ctl, ioaddr->ctl_addr); | ||
356 | 363 | ||
357 | /* Under certain circumstances, some controllers raise IRQ on | 364 | /* Under certain circumstances, some controllers raise IRQ on |
358 | * ATA_NIEN manipulation. Also, many controllers fail to mask | 365 | * ATA_NIEN manipulation. Also, many controllers fail to mask |
@@ -459,13 +466,14 @@ void ata_bmdma_drive_eh(struct ata_port *ap, ata_prereset_fn_t prereset, | |||
459 | */ | 466 | */ |
460 | void ata_bmdma_error_handler(struct ata_port *ap) | 467 | void ata_bmdma_error_handler(struct ata_port *ap) |
461 | { | 468 | { |
462 | ata_reset_fn_t hardreset; | 469 | ata_reset_fn_t softreset = NULL, hardreset = NULL; |
463 | 470 | ||
464 | hardreset = NULL; | 471 | if (ap->ioaddr.ctl_addr) |
472 | softreset = ata_std_softreset; | ||
465 | if (sata_scr_valid(&ap->link)) | 473 | if (sata_scr_valid(&ap->link)) |
466 | hardreset = sata_std_hardreset; | 474 | hardreset = sata_std_hardreset; |
467 | 475 | ||
468 | ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, hardreset, | 476 | ata_bmdma_drive_eh(ap, ata_std_prereset, softreset, hardreset, |
469 | ata_std_postreset); | 477 | ata_std_postreset); |
470 | } | 478 | } |
471 | 479 | ||
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index 028af5dbeed6..511c89b9bae8 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c | |||
@@ -39,7 +39,7 @@ | |||
39 | #undef PDC_DEBUG | 39 | #undef PDC_DEBUG |
40 | 40 | ||
41 | #ifdef PDC_DEBUG | 41 | #ifdef PDC_DEBUG |
42 | #define PDPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __FUNCTION__, ## args) | 42 | #define PDPRINTK(fmt, args...) printk(KERN_ERR "%s: " fmt, __func__, ## args) |
43 | #else | 43 | #else |
44 | #define PDPRINTK(fmt, args...) | 44 | #define PDPRINTK(fmt, args...) |
45 | #endif | 45 | #endif |
diff --git a/drivers/ata/pata_rb500_cf.c b/drivers/ata/pata_rb500_cf.c new file mode 100644 index 000000000000..4ce9b03fe6c8 --- /dev/null +++ b/drivers/ata/pata_rb500_cf.c | |||
@@ -0,0 +1,314 @@ | |||
1 | /* | ||
2 | * A low-level PATA driver to handle a Compact Flash connected on the | ||
3 | * Mikrotik's RouterBoard 532 board. | ||
4 | * | ||
5 | * Copyright (C) 2007 Gabor Juhos <juhosg at openwrt.org> | ||
6 | * Copyright (C) 2008 Florian Fainelli <florian@openwrt.org> | ||
7 | * | ||
8 | * This file was based on: drivers/ata/pata_ixp4xx_cf.c | ||
9 | * Copyright (C) 2006-07 Tower Technologies | ||
10 | * Author: Alessandro Zummo <a.zummo@towertech.it> | ||
11 | * | ||
12 | * Also was based on the driver for Linux 2.4.xx published by Mikrotik for | ||
13 | * their RouterBoard 1xx and 5xx series devices. The original Mikrotik code | ||
14 | * seems not to have a license. | ||
15 | * | ||
16 | * This program is free software; you can redistribute it and/or modify | ||
17 | * it under the terms of the GNU General Public License version 2 as | ||
18 | * published by the Free Software Foundation. | ||
19 | * | ||
20 | */ | ||
21 | |||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/module.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | |||
26 | #include <linux/io.h> | ||
27 | #include <linux/interrupt.h> | ||
28 | #include <linux/irq.h> | ||
29 | |||
30 | #include <linux/libata.h> | ||
31 | #include <scsi/scsi_host.h> | ||
32 | |||
33 | #include <asm/gpio.h> | ||
34 | |||
35 | #define DRV_NAME "pata-rb500-cf" | ||
36 | #define DRV_VERSION "0.1.0" | ||
37 | #define DRV_DESC "PATA driver for RouterBOARD 532 Compact Flash" | ||
38 | |||
39 | #define RB500_CF_MAXPORTS 1 | ||
40 | #define RB500_CF_IO_DELAY 400 | ||
41 | |||
42 | #define RB500_CF_REG_CMD 0x0800 | ||
43 | #define RB500_CF_REG_CTRL 0x080E | ||
44 | #define RB500_CF_REG_DATA 0x0C00 | ||
45 | |||
46 | struct rb500_cf_info { | ||
47 | void __iomem *iobase; | ||
48 | unsigned int gpio_line; | ||
49 | int frozen; | ||
50 | unsigned int irq; | ||
51 | }; | ||
52 | |||
53 | /* ------------------------------------------------------------------------ */ | ||
54 | |||
55 | static inline void rb500_pata_finish_io(struct ata_port *ap) | ||
56 | { | ||
57 | struct ata_host *ah = ap->host; | ||
58 | struct rb500_cf_info *info = ah->private_data; | ||
59 | |||
60 | ata_altstatus(ap); | ||
61 | ndelay(RB500_CF_IO_DELAY); | ||
62 | |||
63 | set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH); | ||
64 | } | ||
65 | |||
66 | static void rb500_pata_exec_command(struct ata_port *ap, | ||
67 | const struct ata_taskfile *tf) | ||
68 | { | ||
69 | writeb(tf->command, ap->ioaddr.command_addr); | ||
70 | rb500_pata_finish_io(ap); | ||
71 | } | ||
72 | |||
73 | static void rb500_pata_data_xfer(struct ata_device *adev, unsigned char *buf, | ||
74 | unsigned int buflen, int write_data) | ||
75 | { | ||
76 | struct ata_port *ap = adev->link->ap; | ||
77 | void __iomem *ioaddr = ap->ioaddr.data_addr; | ||
78 | |||
79 | if (write_data) { | ||
80 | for (; buflen > 0; buflen--, buf++) | ||
81 | writeb(*buf, ioaddr); | ||
82 | } else { | ||
83 | for (; buflen > 0; buflen--, buf++) | ||
84 | *buf = readb(ioaddr); | ||
85 | } | ||
86 | |||
87 | rb500_pata_finish_io(adev->link->ap); | ||
88 | } | ||
89 | |||
90 | static void rb500_pata_freeze(struct ata_port *ap) | ||
91 | { | ||
92 | struct rb500_cf_info *info = ap->host->private_data; | ||
93 | |||
94 | info->frozen = 1; | ||
95 | } | ||
96 | |||
97 | static void rb500_pata_thaw(struct ata_port *ap) | ||
98 | { | ||
99 | struct rb500_cf_info *info = ap->host->private_data; | ||
100 | |||
101 | info->frozen = 0; | ||
102 | } | ||
103 | |||
104 | static irqreturn_t rb500_pata_irq_handler(int irq, void *dev_instance) | ||
105 | { | ||
106 | struct ata_host *ah = dev_instance; | ||
107 | struct rb500_cf_info *info = ah->private_data; | ||
108 | |||
109 | if (gpio_get_value(info->gpio_line)) { | ||
110 | set_irq_type(info->irq, IRQ_TYPE_LEVEL_LOW); | ||
111 | if (!info->frozen) | ||
112 | ata_interrupt(info->irq, dev_instance); | ||
113 | } else { | ||
114 | set_irq_type(info->irq, IRQ_TYPE_LEVEL_HIGH); | ||
115 | } | ||
116 | |||
117 | return IRQ_HANDLED; | ||
118 | } | ||
119 | |||
120 | static void rb500_pata_irq_clear(struct ata_port *ap) | ||
121 | { | ||
122 | } | ||
123 | |||
124 | static int rb500_pata_port_start(struct ata_port *ap) | ||
125 | { | ||
126 | return 0; | ||
127 | } | ||
128 | |||
129 | static struct ata_port_operations rb500_pata_port_ops = { | ||
130 | .tf_load = ata_tf_load, | ||
131 | .tf_read = ata_tf_read, | ||
132 | |||
133 | .exec_command = rb500_pata_exec_command, | ||
134 | .check_status = ata_check_status, | ||
135 | .dev_select = ata_std_dev_select, | ||
136 | |||
137 | .data_xfer = rb500_pata_data_xfer, | ||
138 | |||
139 | .qc_prep = ata_qc_prep, | ||
140 | .qc_issue = ata_qc_issue_prot, | ||
141 | |||
142 | .freeze = rb500_pata_freeze, | ||
143 | .thaw = rb500_pata_thaw, | ||
144 | .error_handler = ata_bmdma_error_handler, | ||
145 | |||
146 | .irq_handler = rb500_pata_irq_handler, | ||
147 | .irq_clear = rb500_pata_irq_clear, | ||
148 | .irq_on = ata_irq_on, | ||
149 | |||
150 | .port_start = rb500_pata_port_start, | ||
151 | }; | ||
152 | |||
153 | /* ------------------------------------------------------------------------ */ | ||
154 | |||
155 | static struct scsi_host_template rb500_pata_sht = { | ||
156 | .module = THIS_MODULE, | ||
157 | .name = DRV_NAME, | ||
158 | .ioctl = ata_scsi_ioctl, | ||
159 | .queuecommand = ata_scsi_queuecmd, | ||
160 | .slave_configure = ata_scsi_slave_config, | ||
161 | .slave_destroy = ata_scsi_slave_destroy, | ||
162 | .bios_param = ata_std_bios_param, | ||
163 | .proc_name = DRV_NAME, | ||
164 | |||
165 | .can_queue = ATA_DEF_QUEUE, | ||
166 | .this_id = ATA_SHT_THIS_ID, | ||
167 | .sg_tablesize = LIBATA_MAX_PRD, | ||
168 | .dma_boundary = ATA_DMA_BOUNDARY, | ||
169 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | ||
170 | .emulated = ATA_SHT_EMULATED, | ||
171 | .use_clustering = ATA_SHT_USE_CLUSTERING, | ||
172 | }; | ||
173 | |||
174 | /* ------------------------------------------------------------------------ */ | ||
175 | |||
176 | static void rb500_pata_setup_ports(struct ata_host *ah) | ||
177 | { | ||
178 | struct rb500_cf_info *info = ah->private_data; | ||
179 | struct ata_port *ap; | ||
180 | |||
181 | ap = ah->ports[0]; | ||
182 | |||
183 | ap->ops = &rb500_pata_port_ops; | ||
184 | ap->pio_mask = 0x1f; /* PIO4 */ | ||
185 | ap->flags = ATA_FLAG_NO_LEGACY | ATA_FLAG_MMIO; | ||
186 | |||
187 | ap->ioaddr.cmd_addr = info->iobase + RB500_CF_REG_CMD; | ||
188 | ap->ioaddr.ctl_addr = info->iobase + RB500_CF_REG_CTRL; | ||
189 | ap->ioaddr.altstatus_addr = info->iobase + RB500_CF_REG_CTRL; | ||
190 | |||
191 | ata_std_ports(&ap->ioaddr); | ||
192 | |||
193 | ap->ioaddr.data_addr = info->iobase + RB500_CF_REG_DATA; | ||
194 | } | ||
195 | |||
196 | static __devinit int rb500_pata_driver_probe(struct platform_device *pdev) | ||
197 | { | ||
198 | unsigned int irq; | ||
199 | int gpio; | ||
200 | struct resource *res; | ||
201 | struct ata_host *ah; | ||
202 | struct rb500_cf_info *info; | ||
203 | int ret; | ||
204 | |||
205 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
206 | if (!res) { | ||
207 | dev_err(&pdev->dev, "no IOMEM resource found\n"); | ||
208 | return -EINVAL; | ||
209 | } | ||
210 | |||
211 | irq = platform_get_irq(pdev, 0); | ||
212 | if (irq <= 0) { | ||
213 | dev_err(&pdev->dev, "no IRQ resource found\n"); | ||
214 | return -ENOENT; | ||
215 | } | ||
216 | |||
217 | gpio = irq_to_gpio(irq); | ||
218 | if (gpio < 0) { | ||
219 | dev_err(&pdev->dev, "no GPIO found for irq%d\n", irq); | ||
220 | return -ENOENT; | ||
221 | } | ||
222 | |||
223 | ret = gpio_request(gpio, DRV_NAME); | ||
224 | if (ret) { | ||
225 | dev_err(&pdev->dev, "GPIO request failed\n"); | ||
226 | return ret; | ||
227 | } | ||
228 | |||
229 | /* allocate host */ | ||
230 | ah = ata_host_alloc(&pdev->dev, RB500_CF_MAXPORTS); | ||
231 | if (!ah) | ||
232 | return -ENOMEM; | ||
233 | |||
234 | platform_set_drvdata(pdev, ah); | ||
235 | |||
236 | info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL); | ||
237 | if (!info) | ||
238 | return -ENOMEM; | ||
239 | |||
240 | ah->private_data = info; | ||
241 | info->gpio_line = gpio; | ||
242 | info->irq = irq; | ||
243 | |||
244 | info->iobase = devm_ioremap_nocache(&pdev->dev, res->start, | ||
245 | res->end - res->start + 1); | ||
246 | if (!info->iobase) | ||
247 | return -ENOMEM; | ||
248 | |||
249 | ret = gpio_direction_input(gpio); | ||
250 | if (ret) { | ||
251 | dev_err(&pdev->dev, "unable to set GPIO direction, err=%d\n", | ||
252 | ret); | ||
253 | goto err_free_gpio; | ||
254 | } | ||
255 | |||
256 | rb500_pata_setup_ports(ah); | ||
257 | |||
258 | ret = ata_host_activate(ah, irq, rb500_pata_irq_handler, | ||
259 | IRQF_TRIGGER_LOW, &rb500_pata_sht); | ||
260 | if (ret) | ||
261 | goto err_free_gpio; | ||
262 | |||
263 | return 0; | ||
264 | |||
265 | err_free_gpio: | ||
266 | gpio_free(gpio); | ||
267 | |||
268 | return ret; | ||
269 | } | ||
270 | |||
271 | static __devexit int rb500_pata_driver_remove(struct platform_device *pdev) | ||
272 | { | ||
273 | struct ata_host *ah = platform_get_drvdata(pdev); | ||
274 | struct rb500_cf_info *info = ah->private_data; | ||
275 | |||
276 | ata_host_detach(ah); | ||
277 | gpio_free(info->gpio_line); | ||
278 | |||
279 | return 0; | ||
280 | } | ||
281 | |||
282 | static struct platform_driver rb500_pata_platform_driver = { | ||
283 | .probe = rb500_pata_driver_probe, | ||
284 | .remove = __devexit_p(rb500_pata_driver_remove), | ||
285 | .driver = { | ||
286 | .name = DRV_NAME, | ||
287 | .owner = THIS_MODULE, | ||
288 | }, | ||
289 | }; | ||
290 | |||
291 | /* ------------------------------------------------------------------------ */ | ||
292 | |||
293 | #define DRV_INFO DRV_DESC " version " DRV_VERSION | ||
294 | |||
295 | static int __init rb500_pata_module_init(void) | ||
296 | { | ||
297 | printk(KERN_INFO DRV_INFO "\n"); | ||
298 | |||
299 | return platform_driver_register(&rb500_pata_platform_driver); | ||
300 | } | ||
301 | |||
302 | static void __exit rb500_pata_module_exit(void) | ||
303 | { | ||
304 | platform_driver_unregister(&rb500_pata_platform_driver); | ||
305 | } | ||
306 | |||
307 | MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>"); | ||
308 | MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); | ||
309 | MODULE_DESCRIPTION(DRV_DESC); | ||
310 | MODULE_VERSION(DRV_VERSION); | ||
311 | MODULE_LICENSE("GPL"); | ||
312 | |||
313 | module_init(rb500_pata_module_init); | ||
314 | module_exit(rb500_pata_module_exit); | ||
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index c662d686154a..47c57a4294b7 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c | |||
@@ -331,8 +331,8 @@ module_param(fs_keystream, int, 0); | |||
331 | #define FS_DEBUG_QSIZE 0x00001000 | 331 | #define FS_DEBUG_QSIZE 0x00001000 |
332 | 332 | ||
333 | 333 | ||
334 | #define func_enter() fs_dprintk (FS_DEBUG_FLOW, "fs: enter %s\n", __FUNCTION__) | 334 | #define func_enter() fs_dprintk(FS_DEBUG_FLOW, "fs: enter %s\n", __func__) |
335 | #define func_exit() fs_dprintk (FS_DEBUG_FLOW, "fs: exit %s\n", __FUNCTION__) | 335 | #define func_exit() fs_dprintk(FS_DEBUG_FLOW, "fs: exit %s\n", __func__) |
336 | 336 | ||
337 | 337 | ||
338 | static struct fs_dev *fs_boards = NULL; | 338 | static struct fs_dev *fs_boards = NULL; |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index f97e050338f0..9427a61f62b0 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
@@ -95,8 +95,8 @@ | |||
95 | #if 1 | 95 | #if 1 |
96 | #define ASSERT(expr) if (!(expr)) { \ | 96 | #define ASSERT(expr) if (!(expr)) { \ |
97 | printk(FORE200E "assertion failed! %s[%d]: %s\n", \ | 97 | printk(FORE200E "assertion failed! %s[%d]: %s\n", \ |
98 | __FUNCTION__, __LINE__, #expr); \ | 98 | __func__, __LINE__, #expr); \ |
99 | panic(FORE200E "%s", __FUNCTION__); \ | 99 | panic(FORE200E "%s", __func__); \ |
100 | } | 100 | } |
101 | #else | 101 | #else |
102 | #define ASSERT(expr) do {} while (0) | 102 | #define ASSERT(expr) do {} while (0) |
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c index eee54c0cde68..b967919fb7e2 100644 --- a/drivers/atm/idt77252.c +++ b/drivers/atm/idt77252.c | |||
@@ -555,7 +555,7 @@ idt77252_tx_dump(struct idt77252_dev *card) | |||
555 | struct vc_map *vc; | 555 | struct vc_map *vc; |
556 | int i; | 556 | int i; |
557 | 557 | ||
558 | printk("%s\n", __FUNCTION__); | 558 | printk("%s\n", __func__); |
559 | for (i = 0; i < card->tct_size; i++) { | 559 | for (i = 0; i < card->tct_size; i++) { |
560 | vc = card->vcs[i]; | 560 | vc = card->vcs[i]; |
561 | if (!vc) | 561 | if (!vc) |
@@ -1035,7 +1035,7 @@ dequeue_rx(struct idt77252_dev *card, struct rsq_entry *rsqe) | |||
1035 | skb = sb_pool_skb(card, le32_to_cpu(rsqe->word_2)); | 1035 | skb = sb_pool_skb(card, le32_to_cpu(rsqe->word_2)); |
1036 | if (skb == NULL) { | 1036 | if (skb == NULL) { |
1037 | printk("%s: NULL skb in %s, rsqe: %08x %08x %08x %08x\n", | 1037 | printk("%s: NULL skb in %s, rsqe: %08x %08x %08x %08x\n", |
1038 | card->name, __FUNCTION__, | 1038 | card->name, __func__, |
1039 | le32_to_cpu(rsqe->word_1), le32_to_cpu(rsqe->word_2), | 1039 | le32_to_cpu(rsqe->word_1), le32_to_cpu(rsqe->word_2), |
1040 | le32_to_cpu(rsqe->word_3), le32_to_cpu(rsqe->word_4)); | 1040 | le32_to_cpu(rsqe->word_3), le32_to_cpu(rsqe->word_4)); |
1041 | return; | 1041 | return; |
@@ -1873,7 +1873,7 @@ add_rx_skb(struct idt77252_dev *card, int queue, | |||
1873 | return; | 1873 | return; |
1874 | 1874 | ||
1875 | if (sb_pool_add(card, skb, queue)) { | 1875 | if (sb_pool_add(card, skb, queue)) { |
1876 | printk("%s: SB POOL full\n", __FUNCTION__); | 1876 | printk("%s: SB POOL full\n", __func__); |
1877 | goto outfree; | 1877 | goto outfree; |
1878 | } | 1878 | } |
1879 | 1879 | ||
@@ -1883,7 +1883,7 @@ add_rx_skb(struct idt77252_dev *card, int queue, | |||
1883 | IDT77252_PRV_PADDR(skb) = paddr; | 1883 | IDT77252_PRV_PADDR(skb) = paddr; |
1884 | 1884 | ||
1885 | if (push_rx_skb(card, skb, queue)) { | 1885 | if (push_rx_skb(card, skb, queue)) { |
1886 | printk("%s: FB QUEUE full\n", __FUNCTION__); | 1886 | printk("%s: FB QUEUE full\n", __func__); |
1887 | goto outunmap; | 1887 | goto outunmap; |
1888 | } | 1888 | } |
1889 | } | 1889 | } |
@@ -3821,12 +3821,12 @@ static int __init idt77252_init(void) | |||
3821 | { | 3821 | { |
3822 | struct sk_buff *skb; | 3822 | struct sk_buff *skb; |
3823 | 3823 | ||
3824 | printk("%s: at %p\n", __FUNCTION__, idt77252_init); | 3824 | printk("%s: at %p\n", __func__, idt77252_init); |
3825 | 3825 | ||
3826 | if (sizeof(skb->cb) < sizeof(struct atm_skb_data) + | 3826 | if (sizeof(skb->cb) < sizeof(struct atm_skb_data) + |
3827 | sizeof(struct idt77252_skb_prv)) { | 3827 | sizeof(struct idt77252_skb_prv)) { |
3828 | printk(KERN_ERR "%s: skb->cb is too small (%lu < %lu)\n", | 3828 | printk(KERN_ERR "%s: skb->cb is too small (%lu < %lu)\n", |
3829 | __FUNCTION__, (unsigned long) sizeof(skb->cb), | 3829 | __func__, (unsigned long) sizeof(skb->cb), |
3830 | (unsigned long) sizeof(struct atm_skb_data) + | 3830 | (unsigned long) sizeof(struct atm_skb_data) + |
3831 | sizeof(struct idt77252_skb_prv)); | 3831 | sizeof(struct idt77252_skb_prv)); |
3832 | return -EIO; | 3832 | return -EIO; |
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index efaf282c438c..911ec600fe71 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -648,7 +648,7 @@ u64 dma_get_required_mask(struct device *dev) | |||
648 | high_totalram += high_totalram - 1; | 648 | high_totalram += high_totalram - 1; |
649 | mask = (((u64)high_totalram) << 32) + 0xffffffff; | 649 | mask = (((u64)high_totalram) << 32) + 0xffffffff; |
650 | } | 650 | } |
651 | return mask & *dev->dma_mask; | 651 | return mask; |
652 | } | 652 | } |
653 | EXPORT_SYMBOL_GPL(dma_get_required_mask); | 653 | EXPORT_SYMBOL_GPL(dma_get_required_mask); |
654 | #endif | 654 | #endif |
diff --git a/drivers/base/sys.c b/drivers/base/sys.c index 2f79c55acdcc..8e13fd942163 100644 --- a/drivers/base/sys.c +++ b/drivers/base/sys.c | |||
@@ -133,6 +133,7 @@ int sysdev_class_register(struct sysdev_class * cls) | |||
133 | pr_debug("Registering sysdev class '%s'\n", | 133 | pr_debug("Registering sysdev class '%s'\n", |
134 | kobject_name(&cls->kset.kobj)); | 134 | kobject_name(&cls->kset.kobj)); |
135 | INIT_LIST_HEAD(&cls->drivers); | 135 | INIT_LIST_HEAD(&cls->drivers); |
136 | memset(&cls->kset.kobj, 0x00, sizeof(struct kobject)); | ||
136 | cls->kset.kobj.parent = &system_kset->kobj; | 137 | cls->kset.kobj.parent = &system_kset->kobj; |
137 | cls->kset.kobj.ktype = &ktype_sysdev_class; | 138 | cls->kset.kobj.ktype = &ktype_sysdev_class; |
138 | cls->kset.kobj.kset = system_kset; | 139 | cls->kset.kobj.kset = system_kset; |
@@ -227,6 +228,9 @@ int sysdev_register(struct sys_device * sysdev) | |||
227 | 228 | ||
228 | pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj)); | 229 | pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj)); |
229 | 230 | ||
231 | /* initialize the kobject to 0, in case it had previously been used */ | ||
232 | memset(&sysdev->kobj, 0x00, sizeof(struct kobject)); | ||
233 | |||
230 | /* Make sure the kset is set */ | 234 | /* Make sure the kset is set */ |
231 | sysdev->kobj.kset = &cls->kset; | 235 | sysdev->kobj.kset = &cls->kset; |
232 | 236 | ||
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 32c79a55511b..7652e87d60c5 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c | |||
@@ -217,7 +217,6 @@ static int use_virtual_dma; | |||
217 | */ | 217 | */ |
218 | 218 | ||
219 | static DEFINE_SPINLOCK(floppy_lock); | 219 | static DEFINE_SPINLOCK(floppy_lock); |
220 | static struct completion device_release; | ||
221 | 220 | ||
222 | static unsigned short virtual_dma_port = 0x3f0; | 221 | static unsigned short virtual_dma_port = 0x3f0; |
223 | irqreturn_t floppy_interrupt(int irq, void *dev_id); | 222 | irqreturn_t floppy_interrupt(int irq, void *dev_id); |
@@ -4144,7 +4143,6 @@ DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL); | |||
4144 | 4143 | ||
4145 | static void floppy_device_release(struct device *dev) | 4144 | static void floppy_device_release(struct device *dev) |
4146 | { | 4145 | { |
4147 | complete(&device_release); | ||
4148 | } | 4146 | } |
4149 | 4147 | ||
4150 | static struct platform_device floppy_device[N_DRIVE]; | 4148 | static struct platform_device floppy_device[N_DRIVE]; |
@@ -4539,7 +4537,6 @@ void cleanup_module(void) | |||
4539 | { | 4537 | { |
4540 | int drive; | 4538 | int drive; |
4541 | 4539 | ||
4542 | init_completion(&device_release); | ||
4543 | blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); | 4540 | blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); |
4544 | unregister_blkdev(FLOPPY_MAJOR, "fd"); | 4541 | unregister_blkdev(FLOPPY_MAJOR, "fd"); |
4545 | 4542 | ||
@@ -4564,8 +4561,6 @@ void cleanup_module(void) | |||
4564 | 4561 | ||
4565 | /* eject disk, if any */ | 4562 | /* eject disk, if any */ |
4566 | fd_eject(0); | 4563 | fd_eject(0); |
4567 | |||
4568 | wait_for_completion(&device_release); | ||
4569 | } | 4564 | } |
4570 | 4565 | ||
4571 | module_param(floppy, charp, 0); | 4566 | module_param(floppy, charp, 0); |
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c index 9e61fca46117..41ca721d2523 100644 --- a/drivers/block/viodasd.c +++ b/drivers/block/viodasd.c | |||
@@ -528,8 +528,7 @@ static int block_event_to_scatterlist(const struct vioblocklpevent *bevent, | |||
528 | numsg = VIOMAXBLOCKDMA; | 528 | numsg = VIOMAXBLOCKDMA; |
529 | 529 | ||
530 | *total_len = 0; | 530 | *total_len = 0; |
531 | memset(sg, 0, sizeof(sg[0]) * VIOMAXBLOCKDMA); | 531 | sg_init_table(sg, VIOMAXBLOCKDMA); |
532 | |||
533 | for (i = 0; (i < numsg) && (rw_data->dma_info[i].len > 0); ++i) { | 532 | for (i = 0; (i < numsg) && (rw_data->dma_info[i].len > 0); ++i) { |
534 | sg_dma_address(&sg[i]) = rw_data->dma_info[i].token; | 533 | sg_dma_address(&sg[i]) = rw_data->dma_info[i].token; |
535 | sg_dma_len(&sg[i]) = rw_data->dma_info[i].len; | 534 | sg_dma_len(&sg[i]) = rw_data->dma_info[i].len; |
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index f16c94cbf488..8b884f87d8b7 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -149,6 +149,9 @@ static struct usb_device_id blacklist_ids[] = { | |||
149 | { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC }, | 149 | { USB_DEVICE(0x0400, 0x0807), .driver_info = HCI_BROKEN_ISOC }, |
150 | { USB_DEVICE(0x0400, 0x080a), .driver_info = HCI_BROKEN_ISOC }, | 150 | { USB_DEVICE(0x0400, 0x080a), .driver_info = HCI_BROKEN_ISOC }, |
151 | 151 | ||
152 | /* CONWISE Technology based adapters with buggy SCO support */ | ||
153 | { USB_DEVICE(0x0e5e, 0x6622), .driver_info = HCI_BROKEN_ISOC }, | ||
154 | |||
152 | /* Belkin F8T012 and F8T013 devices */ | 155 | /* Belkin F8T012 and F8T013 devices */ |
153 | { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, | 156 | { USB_DEVICE(0x050d, 0x0012), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, |
154 | { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, | 157 | { USB_DEVICE(0x050d, 0x0013), .driver_info = HCI_RESET | HCI_WRONG_SCO_MTU }, |
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index dfaab2322de3..6d0dc5f9b6bb 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c | |||
@@ -190,6 +190,14 @@ enum card_type { | |||
190 | F32_8 = 8192, /* 3072 bytes downl. + 1024 bytes uplink * 2 -> 8192 */ | 190 | F32_8 = 8192, /* 3072 bytes downl. + 1024 bytes uplink * 2 -> 8192 */ |
191 | }; | 191 | }; |
192 | 192 | ||
193 | /* Initialization states a card can be in */ | ||
194 | enum card_state { | ||
195 | NOZOMI_STATE_UKNOWN = 0, | ||
196 | NOZOMI_STATE_ENABLED = 1, /* pci device enabled */ | ||
197 | NOZOMI_STATE_ALLOCATED = 2, /* config setup done */ | ||
198 | NOZOMI_STATE_READY = 3, /* flowcontrols received */ | ||
199 | }; | ||
200 | |||
193 | /* Two different toggle channels exist */ | 201 | /* Two different toggle channels exist */ |
194 | enum channel_type { | 202 | enum channel_type { |
195 | CH_A = 0, | 203 | CH_A = 0, |
@@ -385,6 +393,7 @@ struct nozomi { | |||
385 | spinlock_t spin_mutex; /* secures access to registers and tty */ | 393 | spinlock_t spin_mutex; /* secures access to registers and tty */ |
386 | 394 | ||
387 | unsigned int index_start; | 395 | unsigned int index_start; |
396 | enum card_state state; | ||
388 | u32 open_ttys; | 397 | u32 open_ttys; |
389 | }; | 398 | }; |
390 | 399 | ||
@@ -686,6 +695,7 @@ static int nozomi_read_config_table(struct nozomi *dc) | |||
686 | dc->last_ier = dc->last_ier | CTRL_DL; | 695 | dc->last_ier = dc->last_ier | CTRL_DL; |
687 | writew(dc->last_ier, dc->reg_ier); | 696 | writew(dc->last_ier, dc->reg_ier); |
688 | 697 | ||
698 | dc->state = NOZOMI_STATE_ALLOCATED; | ||
689 | dev_info(&dc->pdev->dev, "Initialization OK!\n"); | 699 | dev_info(&dc->pdev->dev, "Initialization OK!\n"); |
690 | return 1; | 700 | return 1; |
691 | } | 701 | } |
@@ -944,6 +954,14 @@ static int receive_flow_control(struct nozomi *dc) | |||
944 | case CTRL_APP2: | 954 | case CTRL_APP2: |
945 | port = PORT_APP2; | 955 | port = PORT_APP2; |
946 | enable_ier = APP2_DL; | 956 | enable_ier = APP2_DL; |
957 | if (dc->state == NOZOMI_STATE_ALLOCATED) { | ||
958 | /* | ||
959 | * After card initialization the flow control | ||
960 | * received for APP2 is always the last | ||
961 | */ | ||
962 | dc->state = NOZOMI_STATE_READY; | ||
963 | dev_info(&dc->pdev->dev, "Device READY!\n"); | ||
964 | } | ||
947 | break; | 965 | break; |
948 | default: | 966 | default: |
949 | dev_err(&dc->pdev->dev, | 967 | dev_err(&dc->pdev->dev, |
@@ -1366,22 +1384,12 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev, | |||
1366 | 1384 | ||
1367 | dc->pdev = pdev; | 1385 | dc->pdev = pdev; |
1368 | 1386 | ||
1369 | /* Find out what card type it is */ | ||
1370 | nozomi_get_card_type(dc); | ||
1371 | |||
1372 | ret = pci_enable_device(dc->pdev); | 1387 | ret = pci_enable_device(dc->pdev); |
1373 | if (ret) { | 1388 | if (ret) { |
1374 | dev_err(&pdev->dev, "Failed to enable PCI Device\n"); | 1389 | dev_err(&pdev->dev, "Failed to enable PCI Device\n"); |
1375 | goto err_free; | 1390 | goto err_free; |
1376 | } | 1391 | } |
1377 | 1392 | ||
1378 | start = pci_resource_start(dc->pdev, 0); | ||
1379 | if (start == 0) { | ||
1380 | dev_err(&pdev->dev, "No I/O address for card detected\n"); | ||
1381 | ret = -ENODEV; | ||
1382 | goto err_disable_device; | ||
1383 | } | ||
1384 | |||
1385 | ret = pci_request_regions(dc->pdev, NOZOMI_NAME); | 1393 | ret = pci_request_regions(dc->pdev, NOZOMI_NAME); |
1386 | if (ret) { | 1394 | if (ret) { |
1387 | dev_err(&pdev->dev, "I/O address 0x%04x already in use\n", | 1395 | dev_err(&pdev->dev, "I/O address 0x%04x already in use\n", |
@@ -1389,6 +1397,16 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev, | |||
1389 | goto err_disable_device; | 1397 | goto err_disable_device; |
1390 | } | 1398 | } |
1391 | 1399 | ||
1400 | start = pci_resource_start(dc->pdev, 0); | ||
1401 | if (start == 0) { | ||
1402 | dev_err(&pdev->dev, "No I/O address for card detected\n"); | ||
1403 | ret = -ENODEV; | ||
1404 | goto err_rel_regs; | ||
1405 | } | ||
1406 | |||
1407 | /* Find out what card type it is */ | ||
1408 | nozomi_get_card_type(dc); | ||
1409 | |||
1392 | dc->base_addr = ioremap(start, dc->card_type); | 1410 | dc->base_addr = ioremap(start, dc->card_type); |
1393 | if (!dc->base_addr) { | 1411 | if (!dc->base_addr) { |
1394 | dev_err(&pdev->dev, "Unable to map card MMIO\n"); | 1412 | dev_err(&pdev->dev, "Unable to map card MMIO\n"); |
@@ -1425,6 +1443,14 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev, | |||
1425 | dc->index_start = ndev_idx * MAX_PORT; | 1443 | dc->index_start = ndev_idx * MAX_PORT; |
1426 | ndevs[ndev_idx] = dc; | 1444 | ndevs[ndev_idx] = dc; |
1427 | 1445 | ||
1446 | pci_set_drvdata(pdev, dc); | ||
1447 | |||
1448 | /* Enable RESET interrupt */ | ||
1449 | dc->last_ier = RESET; | ||
1450 | iowrite16(dc->last_ier, dc->reg_ier); | ||
1451 | |||
1452 | dc->state = NOZOMI_STATE_ENABLED; | ||
1453 | |||
1428 | for (i = 0; i < MAX_PORT; i++) { | 1454 | for (i = 0; i < MAX_PORT; i++) { |
1429 | mutex_init(&dc->port[i].tty_sem); | 1455 | mutex_init(&dc->port[i].tty_sem); |
1430 | dc->port[i].tty_open_count = 0; | 1456 | dc->port[i].tty_open_count = 0; |
@@ -1433,12 +1459,6 @@ static int __devinit nozomi_card_init(struct pci_dev *pdev, | |||
1433 | &pdev->dev); | 1459 | &pdev->dev); |
1434 | } | 1460 | } |
1435 | 1461 | ||
1436 | /* Enable RESET interrupt. */ | ||
1437 | dc->last_ier = RESET; | ||
1438 | writew(dc->last_ier, dc->reg_ier); | ||
1439 | |||
1440 | pci_set_drvdata(pdev, dc); | ||
1441 | |||
1442 | return 0; | 1462 | return 0; |
1443 | 1463 | ||
1444 | err_free_sbuf: | 1464 | err_free_sbuf: |
@@ -1553,7 +1573,7 @@ static int ntty_open(struct tty_struct *tty, struct file *file) | |||
1553 | struct nozomi *dc = get_dc_by_tty(tty); | 1573 | struct nozomi *dc = get_dc_by_tty(tty); |
1554 | unsigned long flags; | 1574 | unsigned long flags; |
1555 | 1575 | ||
1556 | if (!port || !dc) | 1576 | if (!port || !dc || dc->state != NOZOMI_STATE_READY) |
1557 | return -ENODEV; | 1577 | return -ENODEV; |
1558 | 1578 | ||
1559 | if (mutex_lock_interruptible(&port->tty_sem)) | 1579 | if (mutex_lock_interruptible(&port->tty_sem)) |
@@ -1716,6 +1736,10 @@ static int ntty_tiocmget(struct tty_struct *tty, struct file *file) | |||
1716 | static int ntty_tiocmset(struct tty_struct *tty, struct file *file, | 1736 | static int ntty_tiocmset(struct tty_struct *tty, struct file *file, |
1717 | unsigned int set, unsigned int clear) | 1737 | unsigned int set, unsigned int clear) |
1718 | { | 1738 | { |
1739 | struct nozomi *dc = get_dc_by_tty(tty); | ||
1740 | unsigned long flags; | ||
1741 | |||
1742 | spin_lock_irqsave(&dc->spin_mutex, flags); | ||
1719 | if (set & TIOCM_RTS) | 1743 | if (set & TIOCM_RTS) |
1720 | set_rts(tty, 1); | 1744 | set_rts(tty, 1); |
1721 | else if (clear & TIOCM_RTS) | 1745 | else if (clear & TIOCM_RTS) |
@@ -1725,6 +1749,7 @@ static int ntty_tiocmset(struct tty_struct *tty, struct file *file, | |||
1725 | set_dtr(tty, 1); | 1749 | set_dtr(tty, 1); |
1726 | else if (clear & TIOCM_DTR) | 1750 | else if (clear & TIOCM_DTR) |
1727 | set_dtr(tty, 0); | 1751 | set_dtr(tty, 0); |
1752 | spin_unlock_irqrestore(&dc->spin_mutex, flags); | ||
1728 | 1753 | ||
1729 | return 0; | 1754 | return 0; |
1730 | } | 1755 | } |
@@ -1762,7 +1787,7 @@ static int ntty_ioctl_tiocgicount(struct port *port, void __user *argp) | |||
1762 | icount.brk = cnow.brk; | 1787 | icount.brk = cnow.brk; |
1763 | icount.buf_overrun = cnow.buf_overrun; | 1788 | icount.buf_overrun = cnow.buf_overrun; |
1764 | 1789 | ||
1765 | return copy_to_user(argp, &icount, sizeof(icount)); | 1790 | return copy_to_user(argp, &icount, sizeof(icount)) ? -EFAULT : 0; |
1766 | } | 1791 | } |
1767 | 1792 | ||
1768 | static int ntty_ioctl(struct tty_struct *tty, struct file *file, | 1793 | static int ntty_ioctl(struct tty_struct *tty, struct file *file, |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index 8fc4fe4e38f1..3f9d0a9ac36d 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -1620,14 +1620,8 @@ static int __init rc_init_drivers(void) | |||
1620 | 1620 | ||
1621 | static void rc_release_drivers(void) | 1621 | static void rc_release_drivers(void) |
1622 | { | 1622 | { |
1623 | unsigned long flags; | ||
1624 | |||
1625 | spin_lock_irqsave(&riscom_lock, flags); | ||
1626 | |||
1627 | tty_unregister_driver(riscom_driver); | 1623 | tty_unregister_driver(riscom_driver); |
1628 | put_tty_driver(riscom_driver); | 1624 | put_tty_driver(riscom_driver); |
1629 | |||
1630 | spin_unlock_irqrestore(&riscom_lock, flags); | ||
1631 | } | 1625 | } |
1632 | 1626 | ||
1633 | #ifndef MODULE | 1627 | #ifndef MODULE |
@@ -1715,7 +1709,7 @@ static int __init riscom8_init_module (void) | |||
1715 | 1709 | ||
1716 | if (iobase || iobase1 || iobase2 || iobase3) { | 1710 | if (iobase || iobase1 || iobase2 || iobase3) { |
1717 | for(i = 0; i < RC_NBOARD; i++) | 1711 | for(i = 0; i < RC_NBOARD; i++) |
1718 | rc_board[0].base = 0; | 1712 | rc_board[i].base = 0; |
1719 | } | 1713 | } |
1720 | 1714 | ||
1721 | if (iobase) | 1715 | if (iobase) |
diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c index 29965231b912..8db0e7f9d3f4 100644 --- a/drivers/dma/dmaengine.c +++ b/drivers/dma/dmaengine.c | |||
@@ -357,7 +357,7 @@ int dma_async_device_register(struct dma_device *device) | |||
357 | !device->device_prep_dma_zero_sum); | 357 | !device->device_prep_dma_zero_sum); |
358 | BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) && | 358 | BUG_ON(dma_has_cap(DMA_MEMSET, device->cap_mask) && |
359 | !device->device_prep_dma_memset); | 359 | !device->device_prep_dma_memset); |
360 | BUG_ON(dma_has_cap(DMA_ZERO_SUM, device->cap_mask) && | 360 | BUG_ON(dma_has_cap(DMA_INTERRUPT, device->cap_mask) && |
361 | !device->device_prep_dma_interrupt); | 361 | !device->device_prep_dma_interrupt); |
362 | 362 | ||
363 | BUG_ON(!device->device_alloc_chan_resources); | 363 | BUG_ON(!device->device_alloc_chan_resources); |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index cc9a68158d99..ad2f938597e2 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -57,12 +57,12 @@ static void dma_init(struct fsl_dma_chan *fsl_chan) | |||
57 | 57 | ||
58 | } | 58 | } |
59 | 59 | ||
60 | static void set_sr(struct fsl_dma_chan *fsl_chan, dma_addr_t val) | 60 | static void set_sr(struct fsl_dma_chan *fsl_chan, u32 val) |
61 | { | 61 | { |
62 | DMA_OUT(fsl_chan, &fsl_chan->reg_base->sr, val, 32); | 62 | DMA_OUT(fsl_chan, &fsl_chan->reg_base->sr, val, 32); |
63 | } | 63 | } |
64 | 64 | ||
65 | static dma_addr_t get_sr(struct fsl_dma_chan *fsl_chan) | 65 | static u32 get_sr(struct fsl_dma_chan *fsl_chan) |
66 | { | 66 | { |
67 | return DMA_IN(fsl_chan, &fsl_chan->reg_base->sr, 32); | 67 | return DMA_IN(fsl_chan, &fsl_chan->reg_base->sr, 32); |
68 | } | 68 | } |
@@ -406,6 +406,32 @@ static void fsl_dma_free_chan_resources(struct dma_chan *chan) | |||
406 | dma_pool_destroy(fsl_chan->desc_pool); | 406 | dma_pool_destroy(fsl_chan->desc_pool); |
407 | } | 407 | } |
408 | 408 | ||
409 | static struct dma_async_tx_descriptor * | ||
410 | fsl_dma_prep_interrupt(struct dma_chan *chan) | ||
411 | { | ||
412 | struct fsl_dma_chan *fsl_chan; | ||
413 | struct fsl_desc_sw *new; | ||
414 | |||
415 | if (!chan) | ||
416 | return NULL; | ||
417 | |||
418 | fsl_chan = to_fsl_chan(chan); | ||
419 | |||
420 | new = fsl_dma_alloc_descriptor(fsl_chan); | ||
421 | if (!new) { | ||
422 | dev_err(fsl_chan->dev, "No free memory for link descriptor\n"); | ||
423 | return NULL; | ||
424 | } | ||
425 | |||
426 | new->async_tx.cookie = -EBUSY; | ||
427 | new->async_tx.ack = 0; | ||
428 | |||
429 | /* Set End-of-link to the last link descriptor of new list*/ | ||
430 | set_ld_eol(fsl_chan, new); | ||
431 | |||
432 | return &new->async_tx; | ||
433 | } | ||
434 | |||
409 | static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy( | 435 | static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy( |
410 | struct dma_chan *chan, dma_addr_t dma_dest, dma_addr_t dma_src, | 436 | struct dma_chan *chan, dma_addr_t dma_dest, dma_addr_t dma_src, |
411 | size_t len, unsigned long flags) | 437 | size_t len, unsigned long flags) |
@@ -436,7 +462,7 @@ static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy( | |||
436 | dev_dbg(fsl_chan->dev, "new link desc alloc %p\n", new); | 462 | dev_dbg(fsl_chan->dev, "new link desc alloc %p\n", new); |
437 | #endif | 463 | #endif |
438 | 464 | ||
439 | copy = min(len, FSL_DMA_BCR_MAX_CNT); | 465 | copy = min(len, (size_t)FSL_DMA_BCR_MAX_CNT); |
440 | 466 | ||
441 | set_desc_cnt(fsl_chan, &new->hw, copy); | 467 | set_desc_cnt(fsl_chan, &new->hw, copy); |
442 | set_desc_src(fsl_chan, &new->hw, dma_src); | 468 | set_desc_src(fsl_chan, &new->hw, dma_src); |
@@ -513,7 +539,6 @@ static void fsl_chan_ld_cleanup(struct fsl_dma_chan *fsl_chan) | |||
513 | 539 | ||
514 | spin_lock_irqsave(&fsl_chan->desc_lock, flags); | 540 | spin_lock_irqsave(&fsl_chan->desc_lock, flags); |
515 | 541 | ||
516 | fsl_dma_update_completed_cookie(fsl_chan); | ||
517 | dev_dbg(fsl_chan->dev, "chan completed_cookie = %d\n", | 542 | dev_dbg(fsl_chan->dev, "chan completed_cookie = %d\n", |
518 | fsl_chan->completed_cookie); | 543 | fsl_chan->completed_cookie); |
519 | list_for_each_entry_safe(desc, _desc, &fsl_chan->ld_queue, node) { | 544 | list_for_each_entry_safe(desc, _desc, &fsl_chan->ld_queue, node) { |
@@ -581,8 +606,8 @@ static void fsl_chan_xfer_ld_queue(struct fsl_dma_chan *fsl_chan) | |||
581 | if (ld_node != &fsl_chan->ld_queue) { | 606 | if (ld_node != &fsl_chan->ld_queue) { |
582 | /* Get the ld start address from ld_queue */ | 607 | /* Get the ld start address from ld_queue */ |
583 | next_dest_addr = to_fsl_desc(ld_node)->async_tx.phys; | 608 | next_dest_addr = to_fsl_desc(ld_node)->async_tx.phys; |
584 | dev_dbg(fsl_chan->dev, "xfer LDs staring from 0x%016llx\n", | 609 | dev_dbg(fsl_chan->dev, "xfer LDs staring from %p\n", |
585 | (u64)next_dest_addr); | 610 | (void *)next_dest_addr); |
586 | set_cdar(fsl_chan, next_dest_addr); | 611 | set_cdar(fsl_chan, next_dest_addr); |
587 | dma_start(fsl_chan); | 612 | dma_start(fsl_chan); |
588 | } else { | 613 | } else { |
@@ -662,7 +687,7 @@ static enum dma_status fsl_dma_is_complete(struct dma_chan *chan, | |||
662 | static irqreturn_t fsl_dma_chan_do_interrupt(int irq, void *data) | 687 | static irqreturn_t fsl_dma_chan_do_interrupt(int irq, void *data) |
663 | { | 688 | { |
664 | struct fsl_dma_chan *fsl_chan = (struct fsl_dma_chan *)data; | 689 | struct fsl_dma_chan *fsl_chan = (struct fsl_dma_chan *)data; |
665 | dma_addr_t stat; | 690 | u32 stat; |
666 | 691 | ||
667 | stat = get_sr(fsl_chan); | 692 | stat = get_sr(fsl_chan); |
668 | dev_dbg(fsl_chan->dev, "event: channel %d, stat = 0x%x\n", | 693 | dev_dbg(fsl_chan->dev, "event: channel %d, stat = 0x%x\n", |
@@ -681,10 +706,10 @@ static irqreturn_t fsl_dma_chan_do_interrupt(int irq, void *data) | |||
681 | */ | 706 | */ |
682 | if (stat & FSL_DMA_SR_EOSI) { | 707 | if (stat & FSL_DMA_SR_EOSI) { |
683 | dev_dbg(fsl_chan->dev, "event: End-of-segments INT\n"); | 708 | dev_dbg(fsl_chan->dev, "event: End-of-segments INT\n"); |
684 | dev_dbg(fsl_chan->dev, "event: clndar 0x%016llx, " | 709 | dev_dbg(fsl_chan->dev, "event: clndar %p, nlndar %p\n", |
685 | "nlndar 0x%016llx\n", (u64)get_cdar(fsl_chan), | 710 | (void *)get_cdar(fsl_chan), (void *)get_ndar(fsl_chan)); |
686 | (u64)get_ndar(fsl_chan)); | ||
687 | stat &= ~FSL_DMA_SR_EOSI; | 711 | stat &= ~FSL_DMA_SR_EOSI; |
712 | fsl_dma_update_completed_cookie(fsl_chan); | ||
688 | } | 713 | } |
689 | 714 | ||
690 | /* If it current transfer is the end-of-transfer, | 715 | /* If it current transfer is the end-of-transfer, |
@@ -726,12 +751,15 @@ static void dma_do_tasklet(unsigned long data) | |||
726 | fsl_chan_ld_cleanup(fsl_chan); | 751 | fsl_chan_ld_cleanup(fsl_chan); |
727 | } | 752 | } |
728 | 753 | ||
754 | #ifdef FSL_DMA_CALLBACKTEST | ||
729 | static void fsl_dma_callback_test(struct fsl_dma_chan *fsl_chan) | 755 | static void fsl_dma_callback_test(struct fsl_dma_chan *fsl_chan) |
730 | { | 756 | { |
731 | if (fsl_chan) | 757 | if (fsl_chan) |
732 | dev_info(fsl_chan->dev, "selftest: callback is ok!\n"); | 758 | dev_info(fsl_chan->dev, "selftest: callback is ok!\n"); |
733 | } | 759 | } |
760 | #endif | ||
734 | 761 | ||
762 | #ifdef CONFIG_FSL_DMA_SELFTEST | ||
735 | static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan) | 763 | static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan) |
736 | { | 764 | { |
737 | struct dma_chan *chan; | 765 | struct dma_chan *chan; |
@@ -837,9 +865,9 @@ static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan) | |||
837 | if (err) { | 865 | if (err) { |
838 | for (i = 0; (*(src + i) == *(dest + i)) && (i < test_size); | 866 | for (i = 0; (*(src + i) == *(dest + i)) && (i < test_size); |
839 | i++); | 867 | i++); |
840 | dev_err(fsl_chan->dev, "selftest: Test failed, data %d/%d is " | 868 | dev_err(fsl_chan->dev, "selftest: Test failed, data %d/%ld is " |
841 | "error! src 0x%x, dest 0x%x\n", | 869 | "error! src 0x%x, dest 0x%x\n", |
842 | i, test_size, *(src + i), *(dest + i)); | 870 | i, (long)test_size, *(src + i), *(dest + i)); |
843 | } | 871 | } |
844 | 872 | ||
845 | free_resources: | 873 | free_resources: |
@@ -848,6 +876,7 @@ out: | |||
848 | kfree(src); | 876 | kfree(src); |
849 | return err; | 877 | return err; |
850 | } | 878 | } |
879 | #endif | ||
851 | 880 | ||
852 | static int __devinit of_fsl_dma_chan_probe(struct of_device *dev, | 881 | static int __devinit of_fsl_dma_chan_probe(struct of_device *dev, |
853 | const struct of_device_id *match) | 882 | const struct of_device_id *match) |
@@ -1008,8 +1037,8 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev, | |||
1008 | } | 1037 | } |
1009 | 1038 | ||
1010 | dev_info(&dev->dev, "Probe the Freescale DMA driver for %s " | 1039 | dev_info(&dev->dev, "Probe the Freescale DMA driver for %s " |
1011 | "controller at 0x%08x...\n", | 1040 | "controller at %p...\n", |
1012 | match->compatible, fdev->reg.start); | 1041 | match->compatible, (void *)fdev->reg.start); |
1013 | fdev->reg_base = ioremap(fdev->reg.start, fdev->reg.end | 1042 | fdev->reg_base = ioremap(fdev->reg.start, fdev->reg.end |
1014 | - fdev->reg.start + 1); | 1043 | - fdev->reg.start + 1); |
1015 | 1044 | ||
@@ -1017,6 +1046,7 @@ static int __devinit of_fsl_dma_probe(struct of_device *dev, | |||
1017 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); | 1046 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); |
1018 | fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources; | 1047 | fdev->common.device_alloc_chan_resources = fsl_dma_alloc_chan_resources; |
1019 | fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources; | 1048 | fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources; |
1049 | fdev->common.device_prep_dma_interrupt = fsl_dma_prep_interrupt; | ||
1020 | fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy; | 1050 | fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy; |
1021 | fdev->common.device_is_tx_complete = fsl_dma_is_complete; | 1051 | fdev->common.device_is_tx_complete = fsl_dma_is_complete; |
1022 | fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending; | 1052 | fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending; |
diff --git a/drivers/dma/iop-adma.c b/drivers/dma/iop-adma.c index 3986d54492bd..f82b0906d466 100644 --- a/drivers/dma/iop-adma.c +++ b/drivers/dma/iop-adma.c | |||
@@ -140,7 +140,7 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan) | |||
140 | int busy = iop_chan_is_busy(iop_chan); | 140 | int busy = iop_chan_is_busy(iop_chan); |
141 | int seen_current = 0, slot_cnt = 0, slots_per_op = 0; | 141 | int seen_current = 0, slot_cnt = 0, slots_per_op = 0; |
142 | 142 | ||
143 | dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__); | 143 | dev_dbg(iop_chan->device->common.dev, "%s\n", __func__); |
144 | /* free completed slots from the chain starting with | 144 | /* free completed slots from the chain starting with |
145 | * the oldest descriptor | 145 | * the oldest descriptor |
146 | */ | 146 | */ |
@@ -438,7 +438,7 @@ iop_adma_tx_submit(struct dma_async_tx_descriptor *tx) | |||
438 | spin_unlock_bh(&iop_chan->lock); | 438 | spin_unlock_bh(&iop_chan->lock); |
439 | 439 | ||
440 | dev_dbg(iop_chan->device->common.dev, "%s cookie: %d slot: %d\n", | 440 | dev_dbg(iop_chan->device->common.dev, "%s cookie: %d slot: %d\n", |
441 | __FUNCTION__, sw_desc->async_tx.cookie, sw_desc->idx); | 441 | __func__, sw_desc->async_tx.cookie, sw_desc->idx); |
442 | 442 | ||
443 | return cookie; | 443 | return cookie; |
444 | } | 444 | } |
@@ -520,7 +520,7 @@ iop_adma_prep_dma_interrupt(struct dma_chan *chan) | |||
520 | struct iop_adma_desc_slot *sw_desc, *grp_start; | 520 | struct iop_adma_desc_slot *sw_desc, *grp_start; |
521 | int slot_cnt, slots_per_op; | 521 | int slot_cnt, slots_per_op; |
522 | 522 | ||
523 | dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__); | 523 | dev_dbg(iop_chan->device->common.dev, "%s\n", __func__); |
524 | 524 | ||
525 | spin_lock_bh(&iop_chan->lock); | 525 | spin_lock_bh(&iop_chan->lock); |
526 | slot_cnt = iop_chan_interrupt_slot_count(&slots_per_op, iop_chan); | 526 | slot_cnt = iop_chan_interrupt_slot_count(&slots_per_op, iop_chan); |
@@ -548,7 +548,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest, | |||
548 | BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT)); | 548 | BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT)); |
549 | 549 | ||
550 | dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", | 550 | dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", |
551 | __FUNCTION__, len); | 551 | __func__, len); |
552 | 552 | ||
553 | spin_lock_bh(&iop_chan->lock); | 553 | spin_lock_bh(&iop_chan->lock); |
554 | slot_cnt = iop_chan_memcpy_slot_count(len, &slots_per_op); | 554 | slot_cnt = iop_chan_memcpy_slot_count(len, &slots_per_op); |
@@ -580,7 +580,7 @@ iop_adma_prep_dma_memset(struct dma_chan *chan, dma_addr_t dma_dest, | |||
580 | BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT)); | 580 | BUG_ON(unlikely(len > IOP_ADMA_MAX_BYTE_COUNT)); |
581 | 581 | ||
582 | dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", | 582 | dev_dbg(iop_chan->device->common.dev, "%s len: %u\n", |
583 | __FUNCTION__, len); | 583 | __func__, len); |
584 | 584 | ||
585 | spin_lock_bh(&iop_chan->lock); | 585 | spin_lock_bh(&iop_chan->lock); |
586 | slot_cnt = iop_chan_memset_slot_count(len, &slots_per_op); | 586 | slot_cnt = iop_chan_memset_slot_count(len, &slots_per_op); |
@@ -614,7 +614,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest, | |||
614 | 614 | ||
615 | dev_dbg(iop_chan->device->common.dev, | 615 | dev_dbg(iop_chan->device->common.dev, |
616 | "%s src_cnt: %d len: %u flags: %lx\n", | 616 | "%s src_cnt: %d len: %u flags: %lx\n", |
617 | __FUNCTION__, src_cnt, len, flags); | 617 | __func__, src_cnt, len, flags); |
618 | 618 | ||
619 | spin_lock_bh(&iop_chan->lock); | 619 | spin_lock_bh(&iop_chan->lock); |
620 | slot_cnt = iop_chan_xor_slot_count(len, src_cnt, &slots_per_op); | 620 | slot_cnt = iop_chan_xor_slot_count(len, src_cnt, &slots_per_op); |
@@ -648,7 +648,7 @@ iop_adma_prep_dma_zero_sum(struct dma_chan *chan, dma_addr_t *dma_src, | |||
648 | return NULL; | 648 | return NULL; |
649 | 649 | ||
650 | dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", | 650 | dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n", |
651 | __FUNCTION__, src_cnt, len); | 651 | __func__, src_cnt, len); |
652 | 652 | ||
653 | spin_lock_bh(&iop_chan->lock); | 653 | spin_lock_bh(&iop_chan->lock); |
654 | slot_cnt = iop_chan_zero_sum_slot_count(len, src_cnt, &slots_per_op); | 654 | slot_cnt = iop_chan_zero_sum_slot_count(len, src_cnt, &slots_per_op); |
@@ -659,7 +659,7 @@ iop_adma_prep_dma_zero_sum(struct dma_chan *chan, dma_addr_t *dma_src, | |||
659 | iop_desc_set_zero_sum_byte_count(grp_start, len); | 659 | iop_desc_set_zero_sum_byte_count(grp_start, len); |
660 | grp_start->xor_check_result = result; | 660 | grp_start->xor_check_result = result; |
661 | pr_debug("\t%s: grp_start->xor_check_result: %p\n", | 661 | pr_debug("\t%s: grp_start->xor_check_result: %p\n", |
662 | __FUNCTION__, grp_start->xor_check_result); | 662 | __func__, grp_start->xor_check_result); |
663 | sw_desc->unmap_src_cnt = src_cnt; | 663 | sw_desc->unmap_src_cnt = src_cnt; |
664 | sw_desc->unmap_len = len; | 664 | sw_desc->unmap_len = len; |
665 | while (src_cnt--) | 665 | while (src_cnt--) |
@@ -700,7 +700,7 @@ static void iop_adma_free_chan_resources(struct dma_chan *chan) | |||
700 | iop_chan->last_used = NULL; | 700 | iop_chan->last_used = NULL; |
701 | 701 | ||
702 | dev_dbg(iop_chan->device->common.dev, "%s slots_allocated %d\n", | 702 | dev_dbg(iop_chan->device->common.dev, "%s slots_allocated %d\n", |
703 | __FUNCTION__, iop_chan->slots_allocated); | 703 | __func__, iop_chan->slots_allocated); |
704 | spin_unlock_bh(&iop_chan->lock); | 704 | spin_unlock_bh(&iop_chan->lock); |
705 | 705 | ||
706 | /* one is ok since we left it on there on purpose */ | 706 | /* one is ok since we left it on there on purpose */ |
@@ -753,7 +753,7 @@ static irqreturn_t iop_adma_eot_handler(int irq, void *data) | |||
753 | { | 753 | { |
754 | struct iop_adma_chan *chan = data; | 754 | struct iop_adma_chan *chan = data; |
755 | 755 | ||
756 | dev_dbg(chan->device->common.dev, "%s\n", __FUNCTION__); | 756 | dev_dbg(chan->device->common.dev, "%s\n", __func__); |
757 | 757 | ||
758 | tasklet_schedule(&chan->irq_tasklet); | 758 | tasklet_schedule(&chan->irq_tasklet); |
759 | 759 | ||
@@ -766,7 +766,7 @@ static irqreturn_t iop_adma_eoc_handler(int irq, void *data) | |||
766 | { | 766 | { |
767 | struct iop_adma_chan *chan = data; | 767 | struct iop_adma_chan *chan = data; |
768 | 768 | ||
769 | dev_dbg(chan->device->common.dev, "%s\n", __FUNCTION__); | 769 | dev_dbg(chan->device->common.dev, "%s\n", __func__); |
770 | 770 | ||
771 | tasklet_schedule(&chan->irq_tasklet); | 771 | tasklet_schedule(&chan->irq_tasklet); |
772 | 772 | ||
@@ -823,7 +823,7 @@ static int __devinit iop_adma_memcpy_self_test(struct iop_adma_device *device) | |||
823 | int err = 0; | 823 | int err = 0; |
824 | struct iop_adma_chan *iop_chan; | 824 | struct iop_adma_chan *iop_chan; |
825 | 825 | ||
826 | dev_dbg(device->common.dev, "%s\n", __FUNCTION__); | 826 | dev_dbg(device->common.dev, "%s\n", __func__); |
827 | 827 | ||
828 | src = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); | 828 | src = kzalloc(sizeof(u8) * IOP_ADMA_TEST_SIZE, GFP_KERNEL); |
829 | if (!src) | 829 | if (!src) |
@@ -906,7 +906,7 @@ iop_adma_xor_zero_sum_self_test(struct iop_adma_device *device) | |||
906 | int err = 0; | 906 | int err = 0; |
907 | struct iop_adma_chan *iop_chan; | 907 | struct iop_adma_chan *iop_chan; |
908 | 908 | ||
909 | dev_dbg(device->common.dev, "%s\n", __FUNCTION__); | 909 | dev_dbg(device->common.dev, "%s\n", __func__); |
910 | 910 | ||
911 | for (src_idx = 0; src_idx < IOP_ADMA_NUM_SRC_TEST; src_idx++) { | 911 | for (src_idx = 0; src_idx < IOP_ADMA_NUM_SRC_TEST; src_idx++) { |
912 | xor_srcs[src_idx] = alloc_page(GFP_KERNEL); | 912 | xor_srcs[src_idx] = alloc_page(GFP_KERNEL); |
@@ -1159,7 +1159,7 @@ static int __devinit iop_adma_probe(struct platform_device *pdev) | |||
1159 | } | 1159 | } |
1160 | 1160 | ||
1161 | dev_dbg(&pdev->dev, "%s: allocted descriptor pool virt %p phys %p\n", | 1161 | dev_dbg(&pdev->dev, "%s: allocted descriptor pool virt %p phys %p\n", |
1162 | __FUNCTION__, adev->dma_desc_pool_virt, | 1162 | __func__, adev->dma_desc_pool_virt, |
1163 | (void *) adev->dma_desc_pool); | 1163 | (void *) adev->dma_desc_pool); |
1164 | 1164 | ||
1165 | adev->id = plat_data->hw_id; | 1165 | adev->id = plat_data->hw_id; |
@@ -1289,7 +1289,7 @@ static void iop_chan_start_null_memcpy(struct iop_adma_chan *iop_chan) | |||
1289 | dma_cookie_t cookie; | 1289 | dma_cookie_t cookie; |
1290 | int slot_cnt, slots_per_op; | 1290 | int slot_cnt, slots_per_op; |
1291 | 1291 | ||
1292 | dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__); | 1292 | dev_dbg(iop_chan->device->common.dev, "%s\n", __func__); |
1293 | 1293 | ||
1294 | spin_lock_bh(&iop_chan->lock); | 1294 | spin_lock_bh(&iop_chan->lock); |
1295 | slot_cnt = iop_chan_memcpy_slot_count(0, &slots_per_op); | 1295 | slot_cnt = iop_chan_memcpy_slot_count(0, &slots_per_op); |
@@ -1346,7 +1346,7 @@ static void iop_chan_start_null_xor(struct iop_adma_chan *iop_chan) | |||
1346 | dma_cookie_t cookie; | 1346 | dma_cookie_t cookie; |
1347 | int slot_cnt, slots_per_op; | 1347 | int slot_cnt, slots_per_op; |
1348 | 1348 | ||
1349 | dev_dbg(iop_chan->device->common.dev, "%s\n", __FUNCTION__); | 1349 | dev_dbg(iop_chan->device->common.dev, "%s\n", __func__); |
1350 | 1350 | ||
1351 | spin_lock_bh(&iop_chan->lock); | 1351 | spin_lock_bh(&iop_chan->lock); |
1352 | slot_cnt = iop_chan_xor_slot_count(0, 2, &slots_per_op); | 1352 | slot_cnt = iop_chan_xor_slot_count(0, 2, &slots_per_op); |
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig index fe9e768cfbc4..25bdc2dd9ce1 100644 --- a/drivers/firewire/Kconfig +++ b/drivers/firewire/Kconfig | |||
@@ -1,5 +1,3 @@ | |||
1 | # -*- shell-script -*- | ||
2 | |||
3 | comment "An alternative FireWire stack is available with EXPERIMENTAL=y" | 1 | comment "An alternative FireWire stack is available with EXPERIMENTAL=y" |
4 | depends on EXPERIMENTAL=n | 2 | depends on EXPERIMENTAL=n |
5 | 3 | ||
@@ -21,27 +19,7 @@ config FIREWIRE | |||
21 | NOTE: | 19 | NOTE: |
22 | 20 | ||
23 | You should only build ONE of the stacks, unless you REALLY know what | 21 | You should only build ONE of the stacks, unless you REALLY know what |
24 | you are doing. If you install both, you should configure them only as | 22 | you are doing. |
25 | modules rather than link them statically, and you should blacklist one | ||
26 | of the concurrent low-level drivers in /etc/modprobe.conf. Add either | ||
27 | |||
28 | blacklist firewire-ohci | ||
29 | or | ||
30 | blacklist ohci1394 | ||
31 | |||
32 | there depending on which driver you DON'T want to have auto-loaded. | ||
33 | You can optionally do the same with the other IEEE 1394/ FireWire | ||
34 | drivers. | ||
35 | |||
36 | If you have an old modprobe which doesn't implement the blacklist | ||
37 | directive, use either | ||
38 | |||
39 | install firewire-ohci /bin/true | ||
40 | or | ||
41 | install ohci1394 /bin/true | ||
42 | |||
43 | and so on, depending on which modules you DON't want to have | ||
44 | auto-loaded. | ||
45 | 23 | ||
46 | config FIREWIRE_OHCI | 24 | config FIREWIRE_OHCI |
47 | tristate "Support for OHCI FireWire host controllers" | 25 | tristate "Support for OHCI FireWire host controllers" |
@@ -57,8 +35,24 @@ config FIREWIRE_OHCI | |||
57 | 35 | ||
58 | NOTE: | 36 | NOTE: |
59 | 37 | ||
60 | If you also build ohci1394 of the classic stack, blacklist either | 38 | You should only build ohci1394 or firewire-ohci, but not both. |
61 | ohci1394 or firewire-ohci to let hotplug load only the desired driver. | 39 | If you nevertheless want to install both, you should configure them |
40 | only as modules and blacklist the driver(s) which you don't want to | ||
41 | have auto-loaded. Add either | ||
42 | |||
43 | blacklist firewire-ohci | ||
44 | or | ||
45 | blacklist ohci1394 | ||
46 | blacklist video1394 | ||
47 | blacklist dv1394 | ||
48 | |||
49 | to /etc/modprobe.conf or /etc/modprobe.d/* and update modprobe.conf | ||
50 | depending on your distribution. The latter two modules should be | ||
51 | blacklisted together with ohci1394 because they depend on ohci1394. | ||
52 | |||
53 | If you have an old modprobe which doesn't implement the blacklist | ||
54 | directive, use "install modulename /bin/true" for the modules to be | ||
55 | blacklisted. | ||
62 | 56 | ||
63 | config FIREWIRE_SBP2 | 57 | config FIREWIRE_SBP2 |
64 | tristate "Support for storage devices (SBP-2 protocol driver)" | 58 | tristate "Support for storage devices (SBP-2 protocol driver)" |
@@ -75,9 +69,3 @@ config FIREWIRE_SBP2 | |||
75 | 69 | ||
76 | You should also enable support for disks, CD-ROMs, etc. in the SCSI | 70 | You should also enable support for disks, CD-ROMs, etc. in the SCSI |
77 | configuration section. | 71 | configuration section. |
78 | |||
79 | NOTE: | ||
80 | |||
81 | If you also build sbp2 of the classic stack, blacklist either sbp2 | ||
82 | or firewire-sbp2 to let hotplug load only the desired driver. | ||
83 | |||
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c index 7ebad3c14cb8..996d61f0d460 100644 --- a/drivers/firewire/fw-ohci.c +++ b/drivers/firewire/fw-ohci.c | |||
@@ -33,6 +33,10 @@ | |||
33 | #include <asm/page.h> | 33 | #include <asm/page.h> |
34 | #include <asm/system.h> | 34 | #include <asm/system.h> |
35 | 35 | ||
36 | #ifdef CONFIG_PPC_PMAC | ||
37 | #include <asm/pmac_feature.h> | ||
38 | #endif | ||
39 | |||
36 | #include "fw-ohci.h" | 40 | #include "fw-ohci.h" |
37 | #include "fw-transaction.h" | 41 | #include "fw-transaction.h" |
38 | 42 | ||
@@ -175,6 +179,7 @@ struct fw_ohci { | |||
175 | int generation; | 179 | int generation; |
176 | int request_generation; | 180 | int request_generation; |
177 | u32 bus_seconds; | 181 | u32 bus_seconds; |
182 | bool old_uninorth; | ||
178 | 183 | ||
179 | /* | 184 | /* |
180 | * Spinlock for accessing fw_ohci data. Never call out of | 185 | * Spinlock for accessing fw_ohci data. Never call out of |
@@ -276,19 +281,13 @@ static int ar_context_add_page(struct ar_context *ctx) | |||
276 | { | 281 | { |
277 | struct device *dev = ctx->ohci->card.device; | 282 | struct device *dev = ctx->ohci->card.device; |
278 | struct ar_buffer *ab; | 283 | struct ar_buffer *ab; |
279 | dma_addr_t ab_bus; | 284 | dma_addr_t uninitialized_var(ab_bus); |
280 | size_t offset; | 285 | size_t offset; |
281 | 286 | ||
282 | ab = (struct ar_buffer *) __get_free_page(GFP_ATOMIC); | 287 | ab = dma_alloc_coherent(dev, PAGE_SIZE, &ab_bus, GFP_ATOMIC); |
283 | if (ab == NULL) | 288 | if (ab == NULL) |
284 | return -ENOMEM; | 289 | return -ENOMEM; |
285 | 290 | ||
286 | ab_bus = dma_map_single(dev, ab, PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
287 | if (dma_mapping_error(ab_bus)) { | ||
288 | free_page((unsigned long) ab); | ||
289 | return -ENOMEM; | ||
290 | } | ||
291 | |||
292 | memset(&ab->descriptor, 0, sizeof(ab->descriptor)); | 291 | memset(&ab->descriptor, 0, sizeof(ab->descriptor)); |
293 | ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE | | 292 | ab->descriptor.control = cpu_to_le16(DESCRIPTOR_INPUT_MORE | |
294 | DESCRIPTOR_STATUS | | 293 | DESCRIPTOR_STATUS | |
@@ -299,8 +298,6 @@ static int ar_context_add_page(struct ar_context *ctx) | |||
299 | ab->descriptor.res_count = cpu_to_le16(PAGE_SIZE - offset); | 298 | ab->descriptor.res_count = cpu_to_le16(PAGE_SIZE - offset); |
300 | ab->descriptor.branch_address = 0; | 299 | ab->descriptor.branch_address = 0; |
301 | 300 | ||
302 | dma_sync_single_for_device(dev, ab_bus, PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
303 | |||
304 | ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1); | 301 | ctx->last_buffer->descriptor.branch_address = cpu_to_le32(ab_bus | 1); |
305 | ctx->last_buffer->next = ab; | 302 | ctx->last_buffer->next = ab; |
306 | ctx->last_buffer = ab; | 303 | ctx->last_buffer = ab; |
@@ -311,15 +308,22 @@ static int ar_context_add_page(struct ar_context *ctx) | |||
311 | return 0; | 308 | return 0; |
312 | } | 309 | } |
313 | 310 | ||
311 | #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) | ||
312 | #define cond_le32_to_cpu(v) \ | ||
313 | (ohci->old_uninorth ? (__force __u32)(v) : le32_to_cpu(v)) | ||
314 | #else | ||
315 | #define cond_le32_to_cpu(v) le32_to_cpu(v) | ||
316 | #endif | ||
317 | |||
314 | static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer) | 318 | static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer) |
315 | { | 319 | { |
316 | struct fw_ohci *ohci = ctx->ohci; | 320 | struct fw_ohci *ohci = ctx->ohci; |
317 | struct fw_packet p; | 321 | struct fw_packet p; |
318 | u32 status, length, tcode; | 322 | u32 status, length, tcode; |
319 | 323 | ||
320 | p.header[0] = le32_to_cpu(buffer[0]); | 324 | p.header[0] = cond_le32_to_cpu(buffer[0]); |
321 | p.header[1] = le32_to_cpu(buffer[1]); | 325 | p.header[1] = cond_le32_to_cpu(buffer[1]); |
322 | p.header[2] = le32_to_cpu(buffer[2]); | 326 | p.header[2] = cond_le32_to_cpu(buffer[2]); |
323 | 327 | ||
324 | tcode = (p.header[0] >> 4) & 0x0f; | 328 | tcode = (p.header[0] >> 4) & 0x0f; |
325 | switch (tcode) { | 329 | switch (tcode) { |
@@ -331,7 +335,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer) | |||
331 | break; | 335 | break; |
332 | 336 | ||
333 | case TCODE_READ_BLOCK_REQUEST : | 337 | case TCODE_READ_BLOCK_REQUEST : |
334 | p.header[3] = le32_to_cpu(buffer[3]); | 338 | p.header[3] = cond_le32_to_cpu(buffer[3]); |
335 | p.header_length = 16; | 339 | p.header_length = 16; |
336 | p.payload_length = 0; | 340 | p.payload_length = 0; |
337 | break; | 341 | break; |
@@ -340,7 +344,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer) | |||
340 | case TCODE_READ_BLOCK_RESPONSE: | 344 | case TCODE_READ_BLOCK_RESPONSE: |
341 | case TCODE_LOCK_REQUEST: | 345 | case TCODE_LOCK_REQUEST: |
342 | case TCODE_LOCK_RESPONSE: | 346 | case TCODE_LOCK_RESPONSE: |
343 | p.header[3] = le32_to_cpu(buffer[3]); | 347 | p.header[3] = cond_le32_to_cpu(buffer[3]); |
344 | p.header_length = 16; | 348 | p.header_length = 16; |
345 | p.payload_length = p.header[3] >> 16; | 349 | p.payload_length = p.header[3] >> 16; |
346 | break; | 350 | break; |
@@ -357,7 +361,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer) | |||
357 | 361 | ||
358 | /* FIXME: What to do about evt_* errors? */ | 362 | /* FIXME: What to do about evt_* errors? */ |
359 | length = (p.header_length + p.payload_length + 3) / 4; | 363 | length = (p.header_length + p.payload_length + 3) / 4; |
360 | status = le32_to_cpu(buffer[length]); | 364 | status = cond_le32_to_cpu(buffer[length]); |
361 | 365 | ||
362 | p.ack = ((status >> 16) & 0x1f) - 16; | 366 | p.ack = ((status >> 16) & 0x1f) - 16; |
363 | p.speed = (status >> 21) & 0x7; | 367 | p.speed = (status >> 21) & 0x7; |
@@ -375,7 +379,7 @@ static __le32 *handle_ar_packet(struct ar_context *ctx, __le32 *buffer) | |||
375 | */ | 379 | */ |
376 | 380 | ||
377 | if (p.ack + 16 == 0x09) | 381 | if (p.ack + 16 == 0x09) |
378 | ohci->request_generation = (buffer[2] >> 16) & 0xff; | 382 | ohci->request_generation = (p.header[2] >> 16) & 0xff; |
379 | else if (ctx == &ohci->ar_request_ctx) | 383 | else if (ctx == &ohci->ar_request_ctx) |
380 | fw_core_handle_request(&ohci->card, &p); | 384 | fw_core_handle_request(&ohci->card, &p); |
381 | else | 385 | else |
@@ -397,6 +401,7 @@ static void ar_context_tasklet(unsigned long data) | |||
397 | 401 | ||
398 | if (d->res_count == 0) { | 402 | if (d->res_count == 0) { |
399 | size_t size, rest, offset; | 403 | size_t size, rest, offset; |
404 | dma_addr_t buffer_bus; | ||
400 | 405 | ||
401 | /* | 406 | /* |
402 | * This descriptor is finished and we may have a | 407 | * This descriptor is finished and we may have a |
@@ -405,9 +410,7 @@ static void ar_context_tasklet(unsigned long data) | |||
405 | */ | 410 | */ |
406 | 411 | ||
407 | offset = offsetof(struct ar_buffer, data); | 412 | offset = offsetof(struct ar_buffer, data); |
408 | dma_unmap_single(ohci->card.device, | 413 | buffer_bus = le32_to_cpu(ab->descriptor.data_address) - offset; |
409 | le32_to_cpu(ab->descriptor.data_address) - offset, | ||
410 | PAGE_SIZE, DMA_BIDIRECTIONAL); | ||
411 | 414 | ||
412 | buffer = ab; | 415 | buffer = ab; |
413 | ab = ab->next; | 416 | ab = ab->next; |
@@ -423,7 +426,8 @@ static void ar_context_tasklet(unsigned long data) | |||
423 | while (buffer < end) | 426 | while (buffer < end) |
424 | buffer = handle_ar_packet(ctx, buffer); | 427 | buffer = handle_ar_packet(ctx, buffer); |
425 | 428 | ||
426 | free_page((unsigned long)buffer); | 429 | dma_free_coherent(ohci->card.device, PAGE_SIZE, |
430 | buffer, buffer_bus); | ||
427 | ar_context_add_page(ctx); | 431 | ar_context_add_page(ctx); |
428 | } else { | 432 | } else { |
429 | buffer = ctx->pointer; | 433 | buffer = ctx->pointer; |
@@ -532,7 +536,7 @@ static int | |||
532 | context_add_buffer(struct context *ctx) | 536 | context_add_buffer(struct context *ctx) |
533 | { | 537 | { |
534 | struct descriptor_buffer *desc; | 538 | struct descriptor_buffer *desc; |
535 | dma_addr_t bus_addr; | 539 | dma_addr_t uninitialized_var(bus_addr); |
536 | int offset; | 540 | int offset; |
537 | 541 | ||
538 | /* | 542 | /* |
@@ -1022,13 +1026,14 @@ static void bus_reset_tasklet(unsigned long data) | |||
1022 | */ | 1026 | */ |
1023 | 1027 | ||
1024 | self_id_count = (reg_read(ohci, OHCI1394_SelfIDCount) >> 3) & 0x3ff; | 1028 | self_id_count = (reg_read(ohci, OHCI1394_SelfIDCount) >> 3) & 0x3ff; |
1025 | generation = (le32_to_cpu(ohci->self_id_cpu[0]) >> 16) & 0xff; | 1029 | generation = (cond_le32_to_cpu(ohci->self_id_cpu[0]) >> 16) & 0xff; |
1026 | rmb(); | 1030 | rmb(); |
1027 | 1031 | ||
1028 | for (i = 1, j = 0; j < self_id_count; i += 2, j++) { | 1032 | for (i = 1, j = 0; j < self_id_count; i += 2, j++) { |
1029 | if (ohci->self_id_cpu[i] != ~ohci->self_id_cpu[i + 1]) | 1033 | if (ohci->self_id_cpu[i] != ~ohci->self_id_cpu[i + 1]) |
1030 | fw_error("inconsistent self IDs\n"); | 1034 | fw_error("inconsistent self IDs\n"); |
1031 | ohci->self_id_buffer[j] = le32_to_cpu(ohci->self_id_cpu[i]); | 1035 | ohci->self_id_buffer[j] = |
1036 | cond_le32_to_cpu(ohci->self_id_cpu[i]); | ||
1032 | } | 1037 | } |
1033 | rmb(); | 1038 | rmb(); |
1034 | 1039 | ||
@@ -1316,7 +1321,7 @@ ohci_set_config_rom(struct fw_card *card, u32 *config_rom, size_t length) | |||
1316 | unsigned long flags; | 1321 | unsigned long flags; |
1317 | int retval = -EBUSY; | 1322 | int retval = -EBUSY; |
1318 | __be32 *next_config_rom; | 1323 | __be32 *next_config_rom; |
1319 | dma_addr_t next_config_rom_bus; | 1324 | dma_addr_t uninitialized_var(next_config_rom_bus); |
1320 | 1325 | ||
1321 | ohci = fw_ohci(card); | 1326 | ohci = fw_ohci(card); |
1322 | 1327 | ||
@@ -1487,7 +1492,7 @@ static int handle_ir_dualbuffer_packet(struct context *context, | |||
1487 | void *p, *end; | 1492 | void *p, *end; |
1488 | int i; | 1493 | int i; |
1489 | 1494 | ||
1490 | if (db->first_res_count > 0 && db->second_res_count > 0) { | 1495 | if (db->first_res_count != 0 && db->second_res_count != 0) { |
1491 | if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) { | 1496 | if (ctx->excess_bytes <= le16_to_cpu(db->second_req_count)) { |
1492 | /* This descriptor isn't done yet, stop iteration. */ | 1497 | /* This descriptor isn't done yet, stop iteration. */ |
1493 | return 0; | 1498 | return 0; |
@@ -1513,7 +1518,7 @@ static int handle_ir_dualbuffer_packet(struct context *context, | |||
1513 | memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4); | 1518 | memcpy(ctx->header + i + 4, p + 8, ctx->base.header_size - 4); |
1514 | i += ctx->base.header_size; | 1519 | i += ctx->base.header_size; |
1515 | ctx->excess_bytes += | 1520 | ctx->excess_bytes += |
1516 | (le32_to_cpu(*(u32 *)(p + 4)) >> 16) & 0xffff; | 1521 | (le32_to_cpu(*(__le32 *)(p + 4)) >> 16) & 0xffff; |
1517 | p += ctx->base.header_size + 4; | 1522 | p += ctx->base.header_size + 4; |
1518 | } | 1523 | } |
1519 | ctx->header_length = i; | 1524 | ctx->header_length = i; |
@@ -2048,6 +2053,18 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2048 | int err; | 2053 | int err; |
2049 | size_t size; | 2054 | size_t size; |
2050 | 2055 | ||
2056 | #ifdef CONFIG_PPC_PMAC | ||
2057 | /* Necessary on some machines if fw-ohci was loaded/ unloaded before */ | ||
2058 | if (machine_is(powermac)) { | ||
2059 | struct device_node *ofn = pci_device_to_OF_node(dev); | ||
2060 | |||
2061 | if (ofn) { | ||
2062 | pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 1); | ||
2063 | pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1); | ||
2064 | } | ||
2065 | } | ||
2066 | #endif /* CONFIG_PPC_PMAC */ | ||
2067 | |||
2051 | ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); | 2068 | ohci = kzalloc(sizeof(*ohci), GFP_KERNEL); |
2052 | if (ohci == NULL) { | 2069 | if (ohci == NULL) { |
2053 | fw_error("Could not malloc fw_ohci data.\n"); | 2070 | fw_error("Could not malloc fw_ohci data.\n"); |
@@ -2066,6 +2083,10 @@ pci_probe(struct pci_dev *dev, const struct pci_device_id *ent) | |||
2066 | pci_write_config_dword(dev, OHCI1394_PCI_HCI_Control, 0); | 2083 | pci_write_config_dword(dev, OHCI1394_PCI_HCI_Control, 0); |
2067 | pci_set_drvdata(dev, ohci); | 2084 | pci_set_drvdata(dev, ohci); |
2068 | 2085 | ||
2086 | #if defined(CONFIG_PPC_PMAC) && defined(CONFIG_PPC32) | ||
2087 | ohci->old_uninorth = dev->vendor == PCI_VENDOR_ID_APPLE && | ||
2088 | dev->device == PCI_DEVICE_ID_APPLE_UNI_N_FW; | ||
2089 | #endif | ||
2069 | spin_lock_init(&ohci->lock); | 2090 | spin_lock_init(&ohci->lock); |
2070 | 2091 | ||
2071 | tasklet_init(&ohci->bus_reset_tasklet, | 2092 | tasklet_init(&ohci->bus_reset_tasklet, |
@@ -2182,6 +2203,19 @@ static void pci_remove(struct pci_dev *dev) | |||
2182 | pci_disable_device(dev); | 2203 | pci_disable_device(dev); |
2183 | fw_card_put(&ohci->card); | 2204 | fw_card_put(&ohci->card); |
2184 | 2205 | ||
2206 | #ifdef CONFIG_PPC_PMAC | ||
2207 | /* On UniNorth, power down the cable and turn off the chip clock | ||
2208 | * to save power on laptops */ | ||
2209 | if (machine_is(powermac)) { | ||
2210 | struct device_node *ofn = pci_device_to_OF_node(dev); | ||
2211 | |||
2212 | if (ofn) { | ||
2213 | pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0); | ||
2214 | pmac_call_feature(PMAC_FTR_1394_CABLE_POWER, ofn, 0, 0); | ||
2215 | } | ||
2216 | } | ||
2217 | #endif /* CONFIG_PPC_PMAC */ | ||
2218 | |||
2185 | fw_notify("Removed fw-ohci device.\n"); | 2219 | fw_notify("Removed fw-ohci device.\n"); |
2186 | } | 2220 | } |
2187 | 2221 | ||
@@ -2202,6 +2236,16 @@ static int pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2202 | if (err) | 2236 | if (err) |
2203 | fw_error("pci_set_power_state failed with %d\n", err); | 2237 | fw_error("pci_set_power_state failed with %d\n", err); |
2204 | 2238 | ||
2239 | /* PowerMac suspend code comes last */ | ||
2240 | #ifdef CONFIG_PPC_PMAC | ||
2241 | if (machine_is(powermac)) { | ||
2242 | struct device_node *ofn = pci_device_to_OF_node(pdev); | ||
2243 | |||
2244 | if (ofn) | ||
2245 | pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 0); | ||
2246 | } | ||
2247 | #endif /* CONFIG_PPC_PMAC */ | ||
2248 | |||
2205 | return 0; | 2249 | return 0; |
2206 | } | 2250 | } |
2207 | 2251 | ||
@@ -2210,6 +2254,16 @@ static int pci_resume(struct pci_dev *pdev) | |||
2210 | struct fw_ohci *ohci = pci_get_drvdata(pdev); | 2254 | struct fw_ohci *ohci = pci_get_drvdata(pdev); |
2211 | int err; | 2255 | int err; |
2212 | 2256 | ||
2257 | /* PowerMac resume code comes first */ | ||
2258 | #ifdef CONFIG_PPC_PMAC | ||
2259 | if (machine_is(powermac)) { | ||
2260 | struct device_node *ofn = pci_device_to_OF_node(pdev); | ||
2261 | |||
2262 | if (ofn) | ||
2263 | pmac_call_feature(PMAC_FTR_1394_ENABLE, ofn, 0, 1); | ||
2264 | } | ||
2265 | #endif /* CONFIG_PPC_PMAC */ | ||
2266 | |||
2213 | pci_set_power_state(pdev, PCI_D0); | 2267 | pci_set_power_state(pdev, PCI_D0); |
2214 | pci_restore_state(pdev); | 2268 | pci_restore_state(pdev); |
2215 | err = pci_enable_device(pdev); | 2269 | err = pci_enable_device(pdev); |
diff --git a/drivers/firewire/fw-sbp2.c b/drivers/firewire/fw-sbp2.c index 03069a454c07..62b4e47d0cc0 100644 --- a/drivers/firewire/fw-sbp2.c +++ b/drivers/firewire/fw-sbp2.c | |||
@@ -173,6 +173,7 @@ struct sbp2_target { | |||
173 | #define SBP2_ORB_TIMEOUT 2000U /* Timeout in ms */ | 173 | #define SBP2_ORB_TIMEOUT 2000U /* Timeout in ms */ |
174 | #define SBP2_ORB_NULL 0x80000000 | 174 | #define SBP2_ORB_NULL 0x80000000 |
175 | #define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000 | 175 | #define SBP2_MAX_SG_ELEMENT_LENGTH 0xf000 |
176 | #define SBP2_RETRY_LIMIT 0xf /* 15 retries */ | ||
176 | 177 | ||
177 | #define SBP2_DIRECTION_TO_MEDIA 0x0 | 178 | #define SBP2_DIRECTION_TO_MEDIA 0x0 |
178 | #define SBP2_DIRECTION_FROM_MEDIA 0x1 | 179 | #define SBP2_DIRECTION_FROM_MEDIA 0x1 |
@@ -330,6 +331,11 @@ static const struct { | |||
330 | .model = ~0, | 331 | .model = ~0, |
331 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, | 332 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, |
332 | }, | 333 | }, |
334 | /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ { | ||
335 | .firmware_revision = 0x002600, | ||
336 | .model = ~0, | ||
337 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, | ||
338 | }, | ||
333 | 339 | ||
334 | /* | 340 | /* |
335 | * There are iPods (2nd gen, 3rd gen) with model_id == 0, but | 341 | * There are iPods (2nd gen, 3rd gen) with model_id == 0, but |
@@ -812,6 +818,30 @@ static void sbp2_target_put(struct sbp2_target *tgt) | |||
812 | kref_put(&tgt->kref, sbp2_release_target); | 818 | kref_put(&tgt->kref, sbp2_release_target); |
813 | } | 819 | } |
814 | 820 | ||
821 | static void | ||
822 | complete_set_busy_timeout(struct fw_card *card, int rcode, | ||
823 | void *payload, size_t length, void *done) | ||
824 | { | ||
825 | complete(done); | ||
826 | } | ||
827 | |||
828 | static void sbp2_set_busy_timeout(struct sbp2_logical_unit *lu) | ||
829 | { | ||
830 | struct fw_device *device = fw_device(lu->tgt->unit->device.parent); | ||
831 | DECLARE_COMPLETION_ONSTACK(done); | ||
832 | struct fw_transaction t; | ||
833 | static __be32 busy_timeout; | ||
834 | |||
835 | /* FIXME: we should try to set dual-phase cycle_limit too */ | ||
836 | busy_timeout = cpu_to_be32(SBP2_RETRY_LIMIT); | ||
837 | |||
838 | fw_send_request(device->card, &t, TCODE_WRITE_QUADLET_REQUEST, | ||
839 | lu->tgt->node_id, lu->generation, device->max_speed, | ||
840 | CSR_REGISTER_BASE + CSR_BUSY_TIMEOUT, &busy_timeout, | ||
841 | sizeof(busy_timeout), complete_set_busy_timeout, &done); | ||
842 | wait_for_completion(&done); | ||
843 | } | ||
844 | |||
815 | static void sbp2_reconnect(struct work_struct *work); | 845 | static void sbp2_reconnect(struct work_struct *work); |
816 | 846 | ||
817 | static void sbp2_login(struct work_struct *work) | 847 | static void sbp2_login(struct work_struct *work) |
@@ -864,10 +894,8 @@ static void sbp2_login(struct work_struct *work) | |||
864 | fw_notify("%s: logged in to LUN %04x (%d retries)\n", | 894 | fw_notify("%s: logged in to LUN %04x (%d retries)\n", |
865 | tgt->bus_id, lu->lun, lu->retries); | 895 | tgt->bus_id, lu->lun, lu->retries); |
866 | 896 | ||
867 | #if 0 | 897 | /* set appropriate retry limit(s) in BUSY_TIMEOUT register */ |
868 | /* FIXME: The linux1394 sbp2 does this last step. */ | 898 | sbp2_set_busy_timeout(lu); |
869 | sbp2_set_busy_timeout(scsi_id); | ||
870 | #endif | ||
871 | 899 | ||
872 | PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect); | 900 | PREPARE_DELAYED_WORK(&lu->work, sbp2_reconnect); |
873 | sbp2_agent_reset(lu); | 901 | sbp2_agent_reset(lu); |
diff --git a/drivers/firewire/fw-topology.c b/drivers/firewire/fw-topology.c index e47bb040197a..d2c7a3d7e1cb 100644 --- a/drivers/firewire/fw-topology.c +++ b/drivers/firewire/fw-topology.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/module.h> | 21 | #include <linux/module.h> |
22 | #include <linux/wait.h> | 22 | #include <linux/wait.h> |
23 | #include <linux/errno.h> | 23 | #include <linux/errno.h> |
24 | #include <asm/bug.h> | ||
24 | #include <asm/system.h> | 25 | #include <asm/system.h> |
25 | #include "fw-transaction.h" | 26 | #include "fw-transaction.h" |
26 | #include "fw-topology.h" | 27 | #include "fw-topology.h" |
@@ -424,8 +425,8 @@ update_tree(struct fw_card *card, struct fw_node *root) | |||
424 | node1 = fw_node(list1.next); | 425 | node1 = fw_node(list1.next); |
425 | 426 | ||
426 | while (&node0->link != &list0) { | 427 | while (&node0->link != &list0) { |
428 | WARN_ON(node0->port_count != node1->port_count); | ||
427 | 429 | ||
428 | /* assert(node0->port_count == node1->port_count); */ | ||
429 | if (node0->link_on && !node1->link_on) | 430 | if (node0->link_on && !node1->link_on) |
430 | event = FW_NODE_LINK_OFF; | 431 | event = FW_NODE_LINK_OFF; |
431 | else if (!node0->link_on && node1->link_on) | 432 | else if (!node0->link_on && node1->link_on) |
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c index 7fcc59dedf08..99529e59a0b1 100644 --- a/drivers/firewire/fw-transaction.c +++ b/drivers/firewire/fw-transaction.c | |||
@@ -751,7 +751,7 @@ handle_topology_map(struct fw_card *card, struct fw_request *request, | |||
751 | void *payload, size_t length, void *callback_data) | 751 | void *payload, size_t length, void *callback_data) |
752 | { | 752 | { |
753 | int i, start, end; | 753 | int i, start, end; |
754 | u32 *map; | 754 | __be32 *map; |
755 | 755 | ||
756 | if (!TCODE_IS_READ_REQUEST(tcode)) { | 756 | if (!TCODE_IS_READ_REQUEST(tcode)) { |
757 | fw_send_response(card, request, RCODE_TYPE_ERROR); | 757 | fw_send_response(card, request, RCODE_TYPE_ERROR); |
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h index 09cb72870454..a43bb22912f9 100644 --- a/drivers/firewire/fw-transaction.h +++ b/drivers/firewire/fw-transaction.h | |||
@@ -86,12 +86,12 @@ | |||
86 | static inline void | 86 | static inline void |
87 | fw_memcpy_from_be32(void *_dst, void *_src, size_t size) | 87 | fw_memcpy_from_be32(void *_dst, void *_src, size_t size) |
88 | { | 88 | { |
89 | u32 *dst = _dst; | 89 | u32 *dst = _dst; |
90 | u32 *src = _src; | 90 | __be32 *src = _src; |
91 | int i; | 91 | int i; |
92 | 92 | ||
93 | for (i = 0; i < size / 4; i++) | 93 | for (i = 0; i < size / 4; i++) |
94 | dst[i] = cpu_to_be32(src[i]); | 94 | dst[i] = be32_to_cpu(src[i]); |
95 | } | 95 | } |
96 | 96 | ||
97 | static inline void | 97 | static inline void |
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index 92583cd4bffd..6e72fd31184d 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -184,6 +184,7 @@ static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios) | |||
184 | gc->direction_output = pca953x_gpio_direction_output; | 184 | gc->direction_output = pca953x_gpio_direction_output; |
185 | gc->get = pca953x_gpio_get_value; | 185 | gc->get = pca953x_gpio_get_value; |
186 | gc->set = pca953x_gpio_set_value; | 186 | gc->set = pca953x_gpio_set_value; |
187 | gc->can_sleep = 1; | ||
187 | 188 | ||
188 | gc->base = chip->gpio_start; | 189 | gc->base = chip->gpio_start; |
189 | gc->ngpio = gpios; | 190 | gc->ngpio = gpios; |
diff --git a/drivers/i2c/busses/i2c-amd756.c b/drivers/i2c/busses/i2c-amd756.c index 573abe440842..2fa43183d375 100644 --- a/drivers/i2c/busses/i2c-amd756.c +++ b/drivers/i2c/busses/i2c-amd756.c | |||
@@ -335,7 +335,7 @@ static int __devinit amd756_probe(struct pci_dev *pdev, | |||
335 | u8 temp; | 335 | u8 temp; |
336 | 336 | ||
337 | /* driver_data might come from user-space, so check it */ | 337 | /* driver_data might come from user-space, so check it */ |
338 | if (id->driver_data > ARRAY_SIZE(chipname)) | 338 | if (id->driver_data >= ARRAY_SIZE(chipname)) |
339 | return -EINVAL; | 339 | return -EINVAL; |
340 | 340 | ||
341 | if (amd756_ioport) { | 341 | if (amd756_ioport) { |
diff --git a/drivers/i2c/chips/Makefile b/drivers/i2c/chips/Makefile index 501f00cea782..e47aca0ca5ae 100644 --- a/drivers/i2c/chips/Makefile +++ b/drivers/i2c/chips/Makefile | |||
@@ -1,6 +1,13 @@ | |||
1 | # | 1 | # |
2 | # Makefile for miscellaneous I2C chip drivers. | 2 | # Makefile for miscellaneous I2C chip drivers. |
3 | # | 3 | # |
4 | # Think twice before you add a new driver to this directory. | ||
5 | # Device drivers are better grouped according to the functionality they | ||
6 | # implement rather than to the bus they are connected to. In particular: | ||
7 | # * Hardware monitoring chip drivers go to drivers/hwmon | ||
8 | # * RTC chip drivers go to drivers/rtc | ||
9 | # * I/O expander drivers go to drivers/gpio | ||
10 | # | ||
4 | 11 | ||
5 | obj-$(CONFIG_DS1682) += ds1682.o | 12 | obj-$(CONFIG_DS1682) += ds1682.o |
6 | obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o | 13 | obj-$(CONFIG_SENSORS_EEPROM) += eeprom.o |
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 96da22e9a5a4..fd84b2a36338 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
@@ -90,12 +90,16 @@ static int i2c_device_probe(struct device *dev) | |||
90 | { | 90 | { |
91 | struct i2c_client *client = to_i2c_client(dev); | 91 | struct i2c_client *client = to_i2c_client(dev); |
92 | struct i2c_driver *driver = to_i2c_driver(dev->driver); | 92 | struct i2c_driver *driver = to_i2c_driver(dev->driver); |
93 | int status; | ||
93 | 94 | ||
94 | if (!driver->probe) | 95 | if (!driver->probe) |
95 | return -ENODEV; | 96 | return -ENODEV; |
96 | client->driver = driver; | 97 | client->driver = driver; |
97 | dev_dbg(dev, "probe\n"); | 98 | dev_dbg(dev, "probe\n"); |
98 | return driver->probe(client); | 99 | status = driver->probe(client); |
100 | if (status) | ||
101 | client->driver = NULL; | ||
102 | return status; | ||
99 | } | 103 | } |
100 | 104 | ||
101 | static int i2c_device_remove(struct device *dev) | 105 | static int i2c_device_remove(struct device *dev) |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 9e2b1964d71a..f53f72daae34 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -376,6 +376,11 @@ static const struct { | |||
376 | .model_id = SBP2_ROM_VALUE_WILDCARD, | 376 | .model_id = SBP2_ROM_VALUE_WILDCARD, |
377 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, | 377 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, |
378 | }, | 378 | }, |
379 | /* Datafab MD2-FW2 with Symbios/LSILogic SYM13FW500 bridge */ { | ||
380 | .firmware_revision = 0x002600, | ||
381 | .model_id = SBP2_ROM_VALUE_WILDCARD, | ||
382 | .workarounds = SBP2_WORKAROUND_128K_MAX_TRANS, | ||
383 | }, | ||
379 | /* iPod 4th generation */ { | 384 | /* iPod 4th generation */ { |
380 | .firmware_revision = 0x0a2700, | 385 | .firmware_revision = 0x0a2700, |
381 | .model_id = 0x000021, | 386 | .model_id = 0x000021, |
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index b10ade92efed..4df405157086 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c | |||
@@ -3759,6 +3759,7 @@ static void cm_remove_one(struct ib_device *device) | |||
3759 | port = cm_dev->port[i-1]; | 3759 | port = cm_dev->port[i-1]; |
3760 | ib_modify_port(device, port->port_num, 0, &port_modify); | 3760 | ib_modify_port(device, port->port_num, 0, &port_modify); |
3761 | ib_unregister_mad_agent(port->mad_agent); | 3761 | ib_unregister_mad_agent(port->mad_agent); |
3762 | flush_workqueue(cm.wq); | ||
3762 | cm_remove_port_fs(port); | 3763 | cm_remove_port_fs(port); |
3763 | } | 3764 | } |
3764 | kobject_put(&cm_dev->dev_obj); | 3765 | kobject_put(&cm_dev->dev_obj); |
@@ -3813,6 +3814,7 @@ static void __exit ib_cm_cleanup(void) | |||
3813 | cancel_delayed_work(&timewait_info->work.work); | 3814 | cancel_delayed_work(&timewait_info->work.work); |
3814 | spin_unlock_irq(&cm.lock); | 3815 | spin_unlock_irq(&cm.lock); |
3815 | 3816 | ||
3817 | ib_unregister_client(&cm_client); | ||
3816 | destroy_workqueue(cm.wq); | 3818 | destroy_workqueue(cm.wq); |
3817 | 3819 | ||
3818 | list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) { | 3820 | list_for_each_entry_safe(timewait_info, tmp, &cm.timewait_list, list) { |
@@ -3820,7 +3822,6 @@ static void __exit ib_cm_cleanup(void) | |||
3820 | kfree(timewait_info); | 3822 | kfree(timewait_info); |
3821 | } | 3823 | } |
3822 | 3824 | ||
3823 | ib_unregister_client(&cm_client); | ||
3824 | class_unregister(&cm_class); | 3825 | class_unregister(&cm_class); |
3825 | idr_destroy(&cm.local_id_table); | 3826 | idr_destroy(&cm.local_id_table); |
3826 | } | 3827 | } |
diff --git a/drivers/infiniband/core/fmr_pool.c b/drivers/infiniband/core/fmr_pool.c index 7f00347364f7..06d502c06a4d 100644 --- a/drivers/infiniband/core/fmr_pool.c +++ b/drivers/infiniband/core/fmr_pool.c | |||
@@ -139,7 +139,7 @@ static inline struct ib_pool_fmr *ib_fmr_cache_lookup(struct ib_fmr_pool *pool, | |||
139 | static void ib_fmr_batch_release(struct ib_fmr_pool *pool) | 139 | static void ib_fmr_batch_release(struct ib_fmr_pool *pool) |
140 | { | 140 | { |
141 | int ret; | 141 | int ret; |
142 | struct ib_pool_fmr *fmr, *next; | 142 | struct ib_pool_fmr *fmr; |
143 | LIST_HEAD(unmap_list); | 143 | LIST_HEAD(unmap_list); |
144 | LIST_HEAD(fmr_list); | 144 | LIST_HEAD(fmr_list); |
145 | 145 | ||
@@ -158,20 +158,6 @@ static void ib_fmr_batch_release(struct ib_fmr_pool *pool) | |||
158 | #endif | 158 | #endif |
159 | } | 159 | } |
160 | 160 | ||
161 | /* | ||
162 | * The free_list may hold FMRs that have been put there | ||
163 | * because they haven't reached the max_remap count. | ||
164 | * Invalidate their mapping as well. | ||
165 | */ | ||
166 | list_for_each_entry_safe(fmr, next, &pool->free_list, list) { | ||
167 | if (fmr->remap_count == 0) | ||
168 | continue; | ||
169 | hlist_del_init(&fmr->cache_node); | ||
170 | fmr->remap_count = 0; | ||
171 | list_add_tail(&fmr->fmr->list, &fmr_list); | ||
172 | list_move(&fmr->list, &unmap_list); | ||
173 | } | ||
174 | |||
175 | list_splice(&pool->dirty_list, &unmap_list); | 161 | list_splice(&pool->dirty_list, &unmap_list); |
176 | INIT_LIST_HEAD(&pool->dirty_list); | 162 | INIT_LIST_HEAD(&pool->dirty_list); |
177 | pool->dirty_len = 0; | 163 | pool->dirty_len = 0; |
@@ -384,6 +370,11 @@ void ib_destroy_fmr_pool(struct ib_fmr_pool *pool) | |||
384 | 370 | ||
385 | i = 0; | 371 | i = 0; |
386 | list_for_each_entry_safe(fmr, tmp, &pool->free_list, list) { | 372 | list_for_each_entry_safe(fmr, tmp, &pool->free_list, list) { |
373 | if (fmr->remap_count) { | ||
374 | INIT_LIST_HEAD(&fmr_list); | ||
375 | list_add_tail(&fmr->fmr->list, &fmr_list); | ||
376 | ib_unmap_fmr(&fmr_list); | ||
377 | } | ||
387 | ib_dealloc_fmr(fmr->fmr); | 378 | ib_dealloc_fmr(fmr->fmr); |
388 | list_del(&fmr->list); | 379 | list_del(&fmr->list); |
389 | kfree(fmr); | 380 | kfree(fmr); |
@@ -407,8 +398,23 @@ EXPORT_SYMBOL(ib_destroy_fmr_pool); | |||
407 | */ | 398 | */ |
408 | int ib_flush_fmr_pool(struct ib_fmr_pool *pool) | 399 | int ib_flush_fmr_pool(struct ib_fmr_pool *pool) |
409 | { | 400 | { |
410 | int serial = atomic_inc_return(&pool->req_ser); | 401 | int serial; |
402 | struct ib_pool_fmr *fmr, *next; | ||
403 | |||
404 | /* | ||
405 | * The free_list holds FMRs that may have been used | ||
406 | * but have not been remapped enough times to be dirty. | ||
407 | * Put them on the dirty list now so that the cleanup | ||
408 | * thread will reap them too. | ||
409 | */ | ||
410 | spin_lock_irq(&pool->pool_lock); | ||
411 | list_for_each_entry_safe(fmr, next, &pool->free_list, list) { | ||
412 | if (fmr->remap_count > 0) | ||
413 | list_move(&fmr->list, &pool->dirty_list); | ||
414 | } | ||
415 | spin_unlock_irq(&pool->pool_lock); | ||
411 | 416 | ||
417 | serial = atomic_inc_return(&pool->req_ser); | ||
412 | wake_up_process(pool->thread); | 418 | wake_up_process(pool->thread); |
413 | 419 | ||
414 | if (wait_event_interruptible(pool->force_wait, | 420 | if (wait_event_interruptible(pool->force_wait, |
diff --git a/drivers/infiniband/core/iwcm.c b/drivers/infiniband/core/iwcm.c index 223b1aa7d92b..81c9195b512a 100644 --- a/drivers/infiniband/core/iwcm.c +++ b/drivers/infiniband/core/iwcm.c | |||
@@ -839,6 +839,7 @@ static void cm_work_handler(struct work_struct *_work) | |||
839 | unsigned long flags; | 839 | unsigned long flags; |
840 | int empty; | 840 | int empty; |
841 | int ret = 0; | 841 | int ret = 0; |
842 | int destroy_id; | ||
842 | 843 | ||
843 | spin_lock_irqsave(&cm_id_priv->lock, flags); | 844 | spin_lock_irqsave(&cm_id_priv->lock, flags); |
844 | empty = list_empty(&cm_id_priv->work_list); | 845 | empty = list_empty(&cm_id_priv->work_list); |
@@ -857,9 +858,9 @@ static void cm_work_handler(struct work_struct *_work) | |||
857 | destroy_cm_id(&cm_id_priv->id); | 858 | destroy_cm_id(&cm_id_priv->id); |
858 | } | 859 | } |
859 | BUG_ON(atomic_read(&cm_id_priv->refcount)==0); | 860 | BUG_ON(atomic_read(&cm_id_priv->refcount)==0); |
861 | destroy_id = test_bit(IWCM_F_CALLBACK_DESTROY, &cm_id_priv->flags); | ||
860 | if (iwcm_deref_id(cm_id_priv)) { | 862 | if (iwcm_deref_id(cm_id_priv)) { |
861 | if (test_bit(IWCM_F_CALLBACK_DESTROY, | 863 | if (destroy_id) { |
862 | &cm_id_priv->flags)) { | ||
863 | BUG_ON(!list_empty(&cm_id_priv->work_list)); | 864 | BUG_ON(!list_empty(&cm_id_priv->work_list)); |
864 | free_cm_id(cm_id_priv); | 865 | free_cm_id(cm_id_priv); |
865 | } | 866 | } |
diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c index df1838f8f94d..b2ea9210467f 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c | |||
@@ -189,7 +189,7 @@ static struct ib_cq *iwch_create_cq(struct ib_device *ibdev, int entries, int ve | |||
189 | return ERR_PTR(-ENOMEM); | 189 | return ERR_PTR(-ENOMEM); |
190 | } | 190 | } |
191 | chp->rhp = rhp; | 191 | chp->rhp = rhp; |
192 | chp->ibcq.cqe = (1 << chp->cq.size_log2) - 1; | 192 | chp->ibcq.cqe = 1 << chp->cq.size_log2; |
193 | spin_lock_init(&chp->lock); | 193 | spin_lock_init(&chp->lock); |
194 | atomic_set(&chp->refcnt, 1); | 194 | atomic_set(&chp->refcnt, 1); |
195 | init_waitqueue_head(&chp->wait); | 195 | init_waitqueue_head(&chp->wait); |
@@ -819,8 +819,11 @@ static struct ib_qp *iwch_create_qp(struct ib_pd *pd, | |||
819 | kfree(qhp); | 819 | kfree(qhp); |
820 | return ERR_PTR(-ENOMEM); | 820 | return ERR_PTR(-ENOMEM); |
821 | } | 821 | } |
822 | |||
822 | attrs->cap.max_recv_wr = rqsize - 1; | 823 | attrs->cap.max_recv_wr = rqsize - 1; |
823 | attrs->cap.max_send_wr = sqsize; | 824 | attrs->cap.max_send_wr = sqsize; |
825 | attrs->cap.max_inline_data = T3_MAX_INLINE; | ||
826 | |||
824 | qhp->rhp = rhp; | 827 | qhp->rhp = rhp; |
825 | qhp->attr.pd = php->pdid; | 828 | qhp->attr.pd = php->pdid; |
826 | qhp->attr.scq = ((struct iwch_cq *) attrs->send_cq)->cq.cqid; | 829 | qhp->attr.scq = ((struct iwch_cq *) attrs->send_cq)->cq.cqid; |
diff --git a/drivers/infiniband/hw/ipath/ipath_common.h b/drivers/infiniband/hw/ipath/ipath_common.h index 414621095540..591901aab6b7 100644 --- a/drivers/infiniband/hw/ipath/ipath_common.h +++ b/drivers/infiniband/hw/ipath/ipath_common.h | |||
@@ -75,7 +75,7 @@ | |||
75 | #define IPATH_IB_LINKDOWN 0 | 75 | #define IPATH_IB_LINKDOWN 0 |
76 | #define IPATH_IB_LINKARM 1 | 76 | #define IPATH_IB_LINKARM 1 |
77 | #define IPATH_IB_LINKACTIVE 2 | 77 | #define IPATH_IB_LINKACTIVE 2 |
78 | #define IPATH_IB_LINKINIT 3 | 78 | #define IPATH_IB_LINKDOWN_ONLY 3 |
79 | #define IPATH_IB_LINKDOWN_SLEEP 4 | 79 | #define IPATH_IB_LINKDOWN_SLEEP 4 |
80 | #define IPATH_IB_LINKDOWN_DISABLE 5 | 80 | #define IPATH_IB_LINKDOWN_DISABLE 5 |
81 | #define IPATH_IB_LINK_LOOPBACK 6 /* enable local loopback */ | 81 | #define IPATH_IB_LINK_LOOPBACK 6 /* enable local loopback */ |
diff --git a/drivers/infiniband/hw/ipath/ipath_driver.c b/drivers/infiniband/hw/ipath/ipath_driver.c index d5ff6ca2db30..ca4d0acc6786 100644 --- a/drivers/infiniband/hw/ipath/ipath_driver.c +++ b/drivers/infiniband/hw/ipath/ipath_driver.c | |||
@@ -851,8 +851,7 @@ void ipath_disarm_piobufs(struct ipath_devdata *dd, unsigned first, | |||
851 | * -ETIMEDOUT state can have multiple states set, for any of several | 851 | * -ETIMEDOUT state can have multiple states set, for any of several |
852 | * transitions. | 852 | * transitions. |
853 | */ | 853 | */ |
854 | static int ipath_wait_linkstate(struct ipath_devdata *dd, u32 state, | 854 | int ipath_wait_linkstate(struct ipath_devdata *dd, u32 state, int msecs) |
855 | int msecs) | ||
856 | { | 855 | { |
857 | dd->ipath_state_wanted = state; | 856 | dd->ipath_state_wanted = state; |
858 | wait_event_interruptible_timeout(ipath_state_wait, | 857 | wait_event_interruptible_timeout(ipath_state_wait, |
@@ -1656,8 +1655,8 @@ void ipath_cancel_sends(struct ipath_devdata *dd, int restore_sendctrl) | |||
1656 | static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which) | 1655 | static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which) |
1657 | { | 1656 | { |
1658 | static const char *what[4] = { | 1657 | static const char *what[4] = { |
1659 | [0] = "DOWN", | 1658 | [0] = "NOP", |
1660 | [INFINIPATH_IBCC_LINKCMD_INIT] = "INIT", | 1659 | [INFINIPATH_IBCC_LINKCMD_DOWN] = "DOWN", |
1661 | [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED", | 1660 | [INFINIPATH_IBCC_LINKCMD_ARMED] = "ARMED", |
1662 | [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE" | 1661 | [INFINIPATH_IBCC_LINKCMD_ACTIVE] = "ACTIVE" |
1663 | }; | 1662 | }; |
@@ -1672,9 +1671,9 @@ static void ipath_set_ib_lstate(struct ipath_devdata *dd, int which) | |||
1672 | (dd, dd->ipath_kregs->kr_ibcstatus) >> | 1671 | (dd, dd->ipath_kregs->kr_ibcstatus) >> |
1673 | INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) & | 1672 | INFINIPATH_IBCS_LINKTRAININGSTATE_SHIFT) & |
1674 | INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]); | 1673 | INFINIPATH_IBCS_LINKTRAININGSTATE_MASK]); |
1675 | /* flush all queued sends when going to DOWN or INIT, to be sure that | 1674 | /* flush all queued sends when going to DOWN to be sure that |
1676 | * they don't block MAD packets */ | 1675 | * they don't block MAD packets */ |
1677 | if (!linkcmd || linkcmd == INFINIPATH_IBCC_LINKCMD_INIT) | 1676 | if (linkcmd == INFINIPATH_IBCC_LINKCMD_DOWN) |
1678 | ipath_cancel_sends(dd, 1); | 1677 | ipath_cancel_sends(dd, 1); |
1679 | 1678 | ||
1680 | ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, | 1679 | ipath_write_kreg(dd, dd->ipath_kregs->kr_ibcctrl, |
@@ -1687,6 +1686,13 @@ int ipath_set_linkstate(struct ipath_devdata *dd, u8 newstate) | |||
1687 | int ret; | 1686 | int ret; |
1688 | 1687 | ||
1689 | switch (newstate) { | 1688 | switch (newstate) { |
1689 | case IPATH_IB_LINKDOWN_ONLY: | ||
1690 | ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKCMD_DOWN << | ||
1691 | INFINIPATH_IBCC_LINKCMD_SHIFT); | ||
1692 | /* don't wait */ | ||
1693 | ret = 0; | ||
1694 | goto bail; | ||
1695 | |||
1690 | case IPATH_IB_LINKDOWN: | 1696 | case IPATH_IB_LINKDOWN: |
1691 | ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKINITCMD_POLL << | 1697 | ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKINITCMD_POLL << |
1692 | INFINIPATH_IBCC_LINKINITCMD_SHIFT); | 1698 | INFINIPATH_IBCC_LINKINITCMD_SHIFT); |
@@ -1709,16 +1715,6 @@ int ipath_set_linkstate(struct ipath_devdata *dd, u8 newstate) | |||
1709 | ret = 0; | 1715 | ret = 0; |
1710 | goto bail; | 1716 | goto bail; |
1711 | 1717 | ||
1712 | case IPATH_IB_LINKINIT: | ||
1713 | if (dd->ipath_flags & IPATH_LINKINIT) { | ||
1714 | ret = 0; | ||
1715 | goto bail; | ||
1716 | } | ||
1717 | ipath_set_ib_lstate(dd, INFINIPATH_IBCC_LINKCMD_INIT << | ||
1718 | INFINIPATH_IBCC_LINKCMD_SHIFT); | ||
1719 | lstate = IPATH_LINKINIT; | ||
1720 | break; | ||
1721 | |||
1722 | case IPATH_IB_LINKARM: | 1718 | case IPATH_IB_LINKARM: |
1723 | if (dd->ipath_flags & IPATH_LINKARMED) { | 1719 | if (dd->ipath_flags & IPATH_LINKARMED) { |
1724 | ret = 0; | 1720 | ret = 0; |
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 4cc0f95ea877..ecf3f7ff7717 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h | |||
@@ -767,6 +767,7 @@ void ipath_kreceive(struct ipath_portdata *); | |||
767 | int ipath_setrcvhdrsize(struct ipath_devdata *, unsigned); | 767 | int ipath_setrcvhdrsize(struct ipath_devdata *, unsigned); |
768 | int ipath_reset_device(int); | 768 | int ipath_reset_device(int); |
769 | void ipath_get_faststats(unsigned long); | 769 | void ipath_get_faststats(unsigned long); |
770 | int ipath_wait_linkstate(struct ipath_devdata *, u32, int); | ||
770 | int ipath_set_linkstate(struct ipath_devdata *, u8); | 771 | int ipath_set_linkstate(struct ipath_devdata *, u8); |
771 | int ipath_set_mtu(struct ipath_devdata *, u16); | 772 | int ipath_set_mtu(struct ipath_devdata *, u16); |
772 | int ipath_set_lid(struct ipath_devdata *, u32, u8); | 773 | int ipath_set_lid(struct ipath_devdata *, u32, u8); |
diff --git a/drivers/infiniband/hw/ipath/ipath_mad.c b/drivers/infiniband/hw/ipath/ipath_mad.c index d98d5f103700..b34b91d3723a 100644 --- a/drivers/infiniband/hw/ipath/ipath_mad.c +++ b/drivers/infiniband/hw/ipath/ipath_mad.c | |||
@@ -555,10 +555,7 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
555 | /* FALLTHROUGH */ | 555 | /* FALLTHROUGH */ |
556 | case IB_PORT_DOWN: | 556 | case IB_PORT_DOWN: |
557 | if (lstate == 0) | 557 | if (lstate == 0) |
558 | if (get_linkdowndefaultstate(dd)) | 558 | lstate = IPATH_IB_LINKDOWN_ONLY; |
559 | lstate = IPATH_IB_LINKDOWN_SLEEP; | ||
560 | else | ||
561 | lstate = IPATH_IB_LINKDOWN; | ||
562 | else if (lstate == 1) | 559 | else if (lstate == 1) |
563 | lstate = IPATH_IB_LINKDOWN_SLEEP; | 560 | lstate = IPATH_IB_LINKDOWN_SLEEP; |
564 | else if (lstate == 2) | 561 | else if (lstate == 2) |
@@ -568,6 +565,8 @@ static int recv_subn_set_portinfo(struct ib_smp *smp, | |||
568 | else | 565 | else |
569 | goto err; | 566 | goto err; |
570 | ipath_set_linkstate(dd, lstate); | 567 | ipath_set_linkstate(dd, lstate); |
568 | ipath_wait_linkstate(dd, IPATH_LINKINIT | IPATH_LINKARMED | | ||
569 | IPATH_LINKACTIVE, 1000); | ||
571 | break; | 570 | break; |
572 | case IB_PORT_ARMED: | 571 | case IB_PORT_ARMED: |
573 | ipath_set_linkstate(dd, IPATH_IB_LINKARM); | 572 | ipath_set_linkstate(dd, IPATH_IB_LINKARM); |
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 80dc623cee40..087ed3166479 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c | |||
@@ -329,8 +329,9 @@ struct ipath_qp *ipath_lookup_qpn(struct ipath_qp_table *qpt, u32 qpn) | |||
329 | /** | 329 | /** |
330 | * ipath_reset_qp - initialize the QP state to the reset state | 330 | * ipath_reset_qp - initialize the QP state to the reset state |
331 | * @qp: the QP to reset | 331 | * @qp: the QP to reset |
332 | * @type: the QP type | ||
332 | */ | 333 | */ |
333 | static void ipath_reset_qp(struct ipath_qp *qp) | 334 | static void ipath_reset_qp(struct ipath_qp *qp, enum ib_qp_type type) |
334 | { | 335 | { |
335 | qp->remote_qpn = 0; | 336 | qp->remote_qpn = 0; |
336 | qp->qkey = 0; | 337 | qp->qkey = 0; |
@@ -342,7 +343,7 @@ static void ipath_reset_qp(struct ipath_qp *qp) | |||
342 | qp->s_psn = 0; | 343 | qp->s_psn = 0; |
343 | qp->r_psn = 0; | 344 | qp->r_psn = 0; |
344 | qp->r_msn = 0; | 345 | qp->r_msn = 0; |
345 | if (qp->ibqp.qp_type == IB_QPT_RC) { | 346 | if (type == IB_QPT_RC) { |
346 | qp->s_state = IB_OPCODE_RC_SEND_LAST; | 347 | qp->s_state = IB_OPCODE_RC_SEND_LAST; |
347 | qp->r_state = IB_OPCODE_RC_SEND_LAST; | 348 | qp->r_state = IB_OPCODE_RC_SEND_LAST; |
348 | } else { | 349 | } else { |
@@ -414,7 +415,7 @@ int ipath_error_qp(struct ipath_qp *qp, enum ib_wc_status err) | |||
414 | wc.wr_id = qp->r_wr_id; | 415 | wc.wr_id = qp->r_wr_id; |
415 | wc.opcode = IB_WC_RECV; | 416 | wc.opcode = IB_WC_RECV; |
416 | wc.status = err; | 417 | wc.status = err; |
417 | ipath_cq_enter(to_icq(qp->ibqp.send_cq), &wc, 1); | 418 | ipath_cq_enter(to_icq(qp->ibqp.recv_cq), &wc, 1); |
418 | } | 419 | } |
419 | wc.status = IB_WC_WR_FLUSH_ERR; | 420 | wc.status = IB_WC_WR_FLUSH_ERR; |
420 | 421 | ||
@@ -534,7 +535,7 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
534 | 535 | ||
535 | switch (new_state) { | 536 | switch (new_state) { |
536 | case IB_QPS_RESET: | 537 | case IB_QPS_RESET: |
537 | ipath_reset_qp(qp); | 538 | ipath_reset_qp(qp, ibqp->qp_type); |
538 | break; | 539 | break; |
539 | 540 | ||
540 | case IB_QPS_ERR: | 541 | case IB_QPS_ERR: |
@@ -647,7 +648,7 @@ int ipath_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, | |||
647 | attr->port_num = 1; | 648 | attr->port_num = 1; |
648 | attr->timeout = qp->timeout; | 649 | attr->timeout = qp->timeout; |
649 | attr->retry_cnt = qp->s_retry_cnt; | 650 | attr->retry_cnt = qp->s_retry_cnt; |
650 | attr->rnr_retry = qp->s_rnr_retry; | 651 | attr->rnr_retry = qp->s_rnr_retry_cnt; |
651 | attr->alt_port_num = 0; | 652 | attr->alt_port_num = 0; |
652 | attr->alt_timeout = 0; | 653 | attr->alt_timeout = 0; |
653 | 654 | ||
@@ -839,7 +840,7 @@ struct ib_qp *ipath_create_qp(struct ib_pd *ibpd, | |||
839 | goto bail_qp; | 840 | goto bail_qp; |
840 | } | 841 | } |
841 | qp->ip = NULL; | 842 | qp->ip = NULL; |
842 | ipath_reset_qp(qp); | 843 | ipath_reset_qp(qp, init_attr->qp_type); |
843 | break; | 844 | break; |
844 | 845 | ||
845 | default: | 846 | default: |
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c index 459e46e2c016..40f3e37d7adc 100644 --- a/drivers/infiniband/hw/ipath/ipath_rc.c +++ b/drivers/infiniband/hw/ipath/ipath_rc.c | |||
@@ -1196,6 +1196,10 @@ static inline void ipath_rc_rcv_resp(struct ipath_ibdev *dev, | |||
1196 | list_move_tail(&qp->timerwait, | 1196 | list_move_tail(&qp->timerwait, |
1197 | &dev->pending[dev->pending_index]); | 1197 | &dev->pending[dev->pending_index]); |
1198 | spin_unlock(&dev->pending_lock); | 1198 | spin_unlock(&dev->pending_lock); |
1199 | |||
1200 | if (opcode == OP(RDMA_READ_RESPONSE_MIDDLE)) | ||
1201 | qp->s_retry = qp->s_retry_cnt; | ||
1202 | |||
1199 | /* | 1203 | /* |
1200 | * Update the RDMA receive state but do the copy w/o | 1204 | * Update the RDMA receive state but do the copy w/o |
1201 | * holding the locks and blocking interrupts. | 1205 | * holding the locks and blocking interrupts. |
diff --git a/drivers/infiniband/hw/ipath/ipath_registers.h b/drivers/infiniband/hw/ipath/ipath_registers.h index 6d2a17f9c1da..92ad73a7fff0 100644 --- a/drivers/infiniband/hw/ipath/ipath_registers.h +++ b/drivers/infiniband/hw/ipath/ipath_registers.h | |||
@@ -185,7 +185,7 @@ | |||
185 | #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3 | 185 | #define INFINIPATH_IBCC_LINKINITCMD_SLEEP 3 |
186 | #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16 | 186 | #define INFINIPATH_IBCC_LINKINITCMD_SHIFT 16 |
187 | #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL | 187 | #define INFINIPATH_IBCC_LINKCMD_MASK 0x3ULL |
188 | #define INFINIPATH_IBCC_LINKCMD_INIT 1 /* move to 0x11 */ | 188 | #define INFINIPATH_IBCC_LINKCMD_DOWN 1 /* move to 0x11 */ |
189 | #define INFINIPATH_IBCC_LINKCMD_ARMED 2 /* move to 0x21 */ | 189 | #define INFINIPATH_IBCC_LINKCMD_ARMED 2 /* move to 0x21 */ |
190 | #define INFINIPATH_IBCC_LINKCMD_ACTIVE 3 /* move to 0x31 */ | 190 | #define INFINIPATH_IBCC_LINKCMD_ACTIVE 3 /* move to 0x31 */ |
191 | #define INFINIPATH_IBCC_LINKCMD_SHIFT 18 | 191 | #define INFINIPATH_IBCC_LINKCMD_SHIFT 18 |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 52b1bebfa744..2490b2d79dbb 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <net/icmp.h> | 38 | #include <net/icmp.h> |
39 | #include <linux/icmpv6.h> | 39 | #include <linux/icmpv6.h> |
40 | #include <linux/delay.h> | 40 | #include <linux/delay.h> |
41 | #include <linux/vmalloc.h> | ||
41 | 42 | ||
42 | #include "ipoib.h" | 43 | #include "ipoib.h" |
43 | 44 | ||
@@ -637,6 +638,7 @@ static inline int post_send(struct ipoib_dev_priv *priv, | |||
637 | priv->tx_sge[0].addr = addr; | 638 | priv->tx_sge[0].addr = addr; |
638 | priv->tx_sge[0].length = len; | 639 | priv->tx_sge[0].length = len; |
639 | 640 | ||
641 | priv->tx_wr.num_sge = 1; | ||
640 | priv->tx_wr.wr_id = wr_id | IPOIB_OP_CM; | 642 | priv->tx_wr.wr_id = wr_id | IPOIB_OP_CM; |
641 | 643 | ||
642 | return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr); | 644 | return ib_post_send(tx->qp, &priv->tx_wr, &bad_wr); |
@@ -1030,13 +1032,13 @@ static int ipoib_cm_tx_init(struct ipoib_cm_tx *p, u32 qpn, | |||
1030 | struct ipoib_dev_priv *priv = netdev_priv(p->dev); | 1032 | struct ipoib_dev_priv *priv = netdev_priv(p->dev); |
1031 | int ret; | 1033 | int ret; |
1032 | 1034 | ||
1033 | p->tx_ring = kzalloc(ipoib_sendq_size * sizeof *p->tx_ring, | 1035 | p->tx_ring = vmalloc(ipoib_sendq_size * sizeof *p->tx_ring); |
1034 | GFP_KERNEL); | ||
1035 | if (!p->tx_ring) { | 1036 | if (!p->tx_ring) { |
1036 | ipoib_warn(priv, "failed to allocate tx ring\n"); | 1037 | ipoib_warn(priv, "failed to allocate tx ring\n"); |
1037 | ret = -ENOMEM; | 1038 | ret = -ENOMEM; |
1038 | goto err_tx; | 1039 | goto err_tx; |
1039 | } | 1040 | } |
1041 | memset(p->tx_ring, 0, ipoib_sendq_size * sizeof *p->tx_ring); | ||
1040 | 1042 | ||
1041 | p->qp = ipoib_cm_create_tx_qp(p->dev, p); | 1043 | p->qp = ipoib_cm_create_tx_qp(p->dev, p); |
1042 | if (IS_ERR(p->qp)) { | 1044 | if (IS_ERR(p->qp)) { |
@@ -1077,6 +1079,7 @@ err_id: | |||
1077 | ib_destroy_qp(p->qp); | 1079 | ib_destroy_qp(p->qp); |
1078 | err_qp: | 1080 | err_qp: |
1079 | p->qp = NULL; | 1081 | p->qp = NULL; |
1082 | vfree(p->tx_ring); | ||
1080 | err_tx: | 1083 | err_tx: |
1081 | return ret; | 1084 | return ret; |
1082 | } | 1085 | } |
@@ -1127,7 +1130,7 @@ timeout: | |||
1127 | if (p->qp) | 1130 | if (p->qp) |
1128 | ib_destroy_qp(p->qp); | 1131 | ib_destroy_qp(p->qp); |
1129 | 1132 | ||
1130 | kfree(p->tx_ring); | 1133 | vfree(p->tx_ring); |
1131 | kfree(p); | 1134 | kfree(p); |
1132 | } | 1135 | } |
1133 | 1136 | ||
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index f96477a8ca5a..57282048865c 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
42 | #include <linux/slab.h> | 42 | #include <linux/slab.h> |
43 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
44 | #include <linux/vmalloc.h> | ||
44 | 45 | ||
45 | #include <linux/if_arp.h> /* For ARPHRD_xxx */ | 46 | #include <linux/if_arp.h> /* For ARPHRD_xxx */ |
46 | 47 | ||
@@ -887,13 +888,13 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port) | |||
887 | goto out; | 888 | goto out; |
888 | } | 889 | } |
889 | 890 | ||
890 | priv->tx_ring = kzalloc(ipoib_sendq_size * sizeof *priv->tx_ring, | 891 | priv->tx_ring = vmalloc(ipoib_sendq_size * sizeof *priv->tx_ring); |
891 | GFP_KERNEL); | ||
892 | if (!priv->tx_ring) { | 892 | if (!priv->tx_ring) { |
893 | printk(KERN_WARNING "%s: failed to allocate TX ring (%d entries)\n", | 893 | printk(KERN_WARNING "%s: failed to allocate TX ring (%d entries)\n", |
894 | ca->name, ipoib_sendq_size); | 894 | ca->name, ipoib_sendq_size); |
895 | goto out_rx_ring_cleanup; | 895 | goto out_rx_ring_cleanup; |
896 | } | 896 | } |
897 | memset(priv->tx_ring, 0, ipoib_sendq_size * sizeof *priv->tx_ring); | ||
897 | 898 | ||
898 | /* priv->tx_head, tx_tail & tx_outstanding are already 0 */ | 899 | /* priv->tx_head, tx_tail & tx_outstanding are already 0 */ |
899 | 900 | ||
@@ -903,7 +904,7 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port) | |||
903 | return 0; | 904 | return 0; |
904 | 905 | ||
905 | out_tx_ring_cleanup: | 906 | out_tx_ring_cleanup: |
906 | kfree(priv->tx_ring); | 907 | vfree(priv->tx_ring); |
907 | 908 | ||
908 | out_rx_ring_cleanup: | 909 | out_rx_ring_cleanup: |
909 | kfree(priv->rx_ring); | 910 | kfree(priv->rx_ring); |
@@ -928,7 +929,7 @@ void ipoib_dev_cleanup(struct net_device *dev) | |||
928 | ipoib_ib_dev_cleanup(dev); | 929 | ipoib_ib_dev_cleanup(dev); |
929 | 930 | ||
930 | kfree(priv->rx_ring); | 931 | kfree(priv->rx_ring); |
931 | kfree(priv->tx_ring); | 932 | vfree(priv->tx_ring); |
932 | 933 | ||
933 | priv->rx_ring = NULL; | 934 | priv->rx_ring = NULL; |
934 | priv->tx_ring = NULL; | 935 | priv->tx_ring = NULL; |
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c index 2628339e3a99..31a53c5bcb13 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c | |||
@@ -650,7 +650,7 @@ void ipoib_mcast_send(struct net_device *dev, void *mgid, struct sk_buff *skb) | |||
650 | */ | 650 | */ |
651 | spin_lock(&priv->lock); | 651 | spin_lock(&priv->lock); |
652 | 652 | ||
653 | if (!test_bit(IPOIB_MCAST_STARTED, &priv->flags) || | 653 | if (!test_bit(IPOIB_FLAG_OPER_UP, &priv->flags) || |
654 | !priv->broadcast || | 654 | !priv->broadcast || |
655 | !test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) { | 655 | !test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) { |
656 | ++dev->stats.tx_dropped; | 656 | ++dev->stats.tx_dropped; |
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c index 714b8db02b29..993f0a8ff28f 100644 --- a/drivers/infiniband/ulp/iser/iser_verbs.c +++ b/drivers/infiniband/ulp/iser/iser_verbs.c | |||
@@ -237,36 +237,32 @@ static int iser_free_ib_conn_res(struct iser_conn *ib_conn) | |||
237 | static | 237 | static |
238 | struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id) | 238 | struct iser_device *iser_device_find_by_ib_device(struct rdma_cm_id *cma_id) |
239 | { | 239 | { |
240 | struct list_head *p_list; | 240 | struct iser_device *device; |
241 | struct iser_device *device = NULL; | ||
242 | 241 | ||
243 | mutex_lock(&ig.device_list_mutex); | 242 | mutex_lock(&ig.device_list_mutex); |
244 | 243 | ||
245 | p_list = ig.device_list.next; | 244 | list_for_each_entry(device, &ig.device_list, ig_list) |
246 | while (p_list != &ig.device_list) { | ||
247 | device = list_entry(p_list, struct iser_device, ig_list); | ||
248 | /* find if there's a match using the node GUID */ | 245 | /* find if there's a match using the node GUID */ |
249 | if (device->ib_device->node_guid == cma_id->device->node_guid) | 246 | if (device->ib_device->node_guid == cma_id->device->node_guid) |
250 | break; | 247 | goto inc_refcnt; |
251 | } | ||
252 | 248 | ||
253 | if (device == NULL) { | 249 | device = kzalloc(sizeof *device, GFP_KERNEL); |
254 | device = kzalloc(sizeof *device, GFP_KERNEL); | 250 | if (device == NULL) |
255 | if (device == NULL) | 251 | goto out; |
256 | goto out; | 252 | |
257 | /* assign this device to the device */ | 253 | /* assign this device to the device */ |
258 | device->ib_device = cma_id->device; | 254 | device->ib_device = cma_id->device; |
259 | /* init the device and link it into ig device list */ | 255 | /* init the device and link it into ig device list */ |
260 | if (iser_create_device_ib_res(device)) { | 256 | if (iser_create_device_ib_res(device)) { |
261 | kfree(device); | 257 | kfree(device); |
262 | device = NULL; | 258 | device = NULL; |
263 | goto out; | 259 | goto out; |
264 | } | ||
265 | list_add(&device->ig_list, &ig.device_list); | ||
266 | } | 260 | } |
267 | out: | 261 | list_add(&device->ig_list, &ig.device_list); |
268 | BUG_ON(device == NULL); | 262 | |
263 | inc_refcnt: | ||
269 | device->refcount++; | 264 | device->refcount++; |
265 | out: | ||
270 | mutex_unlock(&ig.device_list_mutex); | 266 | mutex_unlock(&ig.device_list_mutex); |
271 | return device; | 267 | return device; |
272 | } | 268 | } |
@@ -372,6 +368,12 @@ static void iser_addr_handler(struct rdma_cm_id *cma_id) | |||
372 | int ret; | 368 | int ret; |
373 | 369 | ||
374 | device = iser_device_find_by_ib_device(cma_id); | 370 | device = iser_device_find_by_ib_device(cma_id); |
371 | if (!device) { | ||
372 | iser_err("device lookup/creation failed\n"); | ||
373 | iser_connect_error(cma_id); | ||
374 | return; | ||
375 | } | ||
376 | |||
375 | ib_conn = (struct iser_conn *)cma_id->context; | 377 | ib_conn = (struct iser_conn *)cma_id->context; |
376 | ib_conn->device = device; | 378 | ib_conn->device = device; |
377 | 379 | ||
@@ -380,7 +382,6 @@ static void iser_addr_handler(struct rdma_cm_id *cma_id) | |||
380 | iser_err("resolve route failed: %d\n", ret); | 382 | iser_err("resolve route failed: %d\n", ret); |
381 | iser_connect_error(cma_id); | 383 | iser_connect_error(cma_id); |
382 | } | 384 | } |
383 | return; | ||
384 | } | 385 | } |
385 | 386 | ||
386 | static void iser_route_handler(struct rdma_cm_id *cma_id) | 387 | static void iser_route_handler(struct rdma_cm_id *cma_id) |
diff --git a/drivers/input/serio/i8042.h b/drivers/input/serio/i8042.h index dd22d91f8b39..c972e5d03a3f 100644 --- a/drivers/input/serio/i8042.h +++ b/drivers/input/serio/i8042.h | |||
@@ -16,7 +16,7 @@ | |||
16 | 16 | ||
17 | #if defined(CONFIG_MACH_JAZZ) | 17 | #if defined(CONFIG_MACH_JAZZ) |
18 | #include "i8042-jazzio.h" | 18 | #include "i8042-jazzio.h" |
19 | #elif defined(CONFIG_SGI_IP22) | 19 | #elif defined(CONFIG_SGI_HAS_I8042) |
20 | #include "i8042-ip22io.h" | 20 | #include "i8042-ip22io.h" |
21 | #elif defined(CONFIG_PPC) | 21 | #elif defined(CONFIG_PPC) |
22 | #include "i8042-ppcio.h" | 22 | #include "i8042-ppcio.h" |
diff --git a/drivers/isdn/i4l/isdn_common.c b/drivers/isdn/i4l/isdn_common.c index 9cef6fcf587b..d4ad6992f776 100644 --- a/drivers/isdn/i4l/isdn_common.c +++ b/drivers/isdn/i4l/isdn_common.c | |||
@@ -981,13 +981,13 @@ isdn_readbchan_tty(int di, int channel, struct tty_struct *tty, int cisco_hack) | |||
981 | } | 981 | } |
982 | 982 | ||
983 | 983 | ||
984 | static __inline int | 984 | static inline int |
985 | isdn_minor2drv(int minor) | 985 | isdn_minor2drv(int minor) |
986 | { | 986 | { |
987 | return (dev->drvmap[minor]); | 987 | return (dev->drvmap[minor]); |
988 | } | 988 | } |
989 | 989 | ||
990 | static __inline int | 990 | static inline int |
991 | isdn_minor2chan(int minor) | 991 | isdn_minor2chan(int minor) |
992 | { | 992 | { |
993 | return (dev->chanmap[minor]); | 993 | return (dev->chanmap[minor]); |
diff --git a/drivers/isdn/i4l/isdn_v110.c b/drivers/isdn/i4l/isdn_v110.c index 5484d3c38a57..c5d02b6aafab 100644 --- a/drivers/isdn/i4l/isdn_v110.c +++ b/drivers/isdn/i4l/isdn_v110.c | |||
@@ -62,7 +62,7 @@ static unsigned char V110_OffMatrix_38400[] = | |||
62 | * and to 67452301 when keylen = 2. This is necessary because ordering on | 62 | * and to 67452301 when keylen = 2. This is necessary because ordering on |
63 | * the isdn line is the other way. | 63 | * the isdn line is the other way. |
64 | */ | 64 | */ |
65 | static __inline unsigned char | 65 | static inline unsigned char |
66 | FlipBits(unsigned char c, int keylen) | 66 | FlipBits(unsigned char c, int keylen) |
67 | { | 67 | { |
68 | unsigned char b = c; | 68 | unsigned char b = c; |
diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c index 7743d73768df..c632c08cbbdc 100644 --- a/drivers/lguest/core.c +++ b/drivers/lguest/core.c | |||
@@ -69,11 +69,22 @@ static __init int map_switcher(void) | |||
69 | switcher_page[i] = virt_to_page(addr); | 69 | switcher_page[i] = virt_to_page(addr); |
70 | } | 70 | } |
71 | 71 | ||
72 | /* First we check that the Switcher won't overlap the fixmap area at | ||
73 | * the top of memory. It's currently nowhere near, but it could have | ||
74 | * very strange effects if it ever happened. */ | ||
75 | if (SWITCHER_ADDR + (TOTAL_SWITCHER_PAGES+1)*PAGE_SIZE > FIXADDR_START){ | ||
76 | err = -ENOMEM; | ||
77 | printk("lguest: mapping switcher would thwack fixmap\n"); | ||
78 | goto free_pages; | ||
79 | } | ||
80 | |||
72 | /* Now we reserve the "virtual memory area" we want: 0xFFC00000 | 81 | /* Now we reserve the "virtual memory area" we want: 0xFFC00000 |
73 | * (SWITCHER_ADDR). We might not get it in theory, but in practice | 82 | * (SWITCHER_ADDR). We might not get it in theory, but in practice |
74 | * it's worked so far. */ | 83 | * it's worked so far. The end address needs +1 because __get_vm_area |
84 | * allocates an extra guard page, so we need space for that. */ | ||
75 | switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE, | 85 | switcher_vma = __get_vm_area(TOTAL_SWITCHER_PAGES * PAGE_SIZE, |
76 | VM_ALLOC, SWITCHER_ADDR, VMALLOC_END); | 86 | VM_ALLOC, SWITCHER_ADDR, SWITCHER_ADDR |
87 | + (TOTAL_SWITCHER_PAGES+1) * PAGE_SIZE); | ||
77 | if (!switcher_vma) { | 88 | if (!switcher_vma) { |
78 | err = -ENOMEM; | 89 | err = -ENOMEM; |
79 | printk("lguest: could not map switcher pages high\n"); | 90 | printk("lguest: could not map switcher pages high\n"); |
diff --git a/drivers/lguest/lguest_user.c b/drivers/lguest/lguest_user.c index 85d42d3d01a9..2221485b0773 100644 --- a/drivers/lguest/lguest_user.c +++ b/drivers/lguest/lguest_user.c | |||
@@ -241,15 +241,16 @@ static ssize_t write(struct file *file, const char __user *in, | |||
241 | cpu = &lg->cpus[cpu_id]; | 241 | cpu = &lg->cpus[cpu_id]; |
242 | if (!cpu) | 242 | if (!cpu) |
243 | return -EINVAL; | 243 | return -EINVAL; |
244 | } | ||
245 | 244 | ||
246 | /* Once the Guest is dead, all you can do is read() why it died. */ | 245 | /* Once the Guest is dead, you can only read() why it died. */ |
247 | if (lg && lg->dead) | 246 | if (lg->dead) |
248 | return -ENOENT; | 247 | return -ENOENT; |
249 | 248 | ||
250 | /* If you're not the task which owns the Guest, you can only break */ | 249 | /* If you're not the task which owns the Guest, all you can do |
251 | if (lg && current != cpu->tsk && req != LHREQ_BREAK) | 250 | * is break the Launcher out of running the Guest. */ |
252 | return -EPERM; | 251 | if (current != cpu->tsk && req != LHREQ_BREAK) |
252 | return -EPERM; | ||
253 | } | ||
253 | 254 | ||
254 | switch (req) { | 255 | switch (req) { |
255 | case LHREQ_INITIALIZE: | 256 | case LHREQ_INITIALIZE: |
diff --git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c index 275f23c2deb4..a7f64a9d67e0 100644 --- a/drivers/lguest/page_tables.c +++ b/drivers/lguest/page_tables.c | |||
@@ -391,7 +391,7 @@ static unsigned int find_pgdir(struct lguest *lg, unsigned long pgtable) | |||
391 | { | 391 | { |
392 | unsigned int i; | 392 | unsigned int i; |
393 | for (i = 0; i < ARRAY_SIZE(lg->pgdirs); i++) | 393 | for (i = 0; i < ARRAY_SIZE(lg->pgdirs); i++) |
394 | if (lg->pgdirs[i].gpgdir == pgtable) | 394 | if (lg->pgdirs[i].pgdir && lg->pgdirs[i].gpgdir == pgtable) |
395 | break; | 395 | break; |
396 | return i; | 396 | return i; |
397 | } | 397 | } |
diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c index 741a2e3f4fc6..a348bb0791d3 100644 --- a/drivers/macintosh/via-pmu-backlight.c +++ b/drivers/macintosh/via-pmu-backlight.c | |||
@@ -17,7 +17,7 @@ | |||
17 | 17 | ||
18 | static struct backlight_ops pmu_backlight_data; | 18 | static struct backlight_ops pmu_backlight_data; |
19 | static DEFINE_SPINLOCK(pmu_backlight_lock); | 19 | static DEFINE_SPINLOCK(pmu_backlight_lock); |
20 | static int sleeping; | 20 | static int sleeping, uses_pmu_bl; |
21 | static u8 bl_curve[FB_BACKLIGHT_LEVELS]; | 21 | static u8 bl_curve[FB_BACKLIGHT_LEVELS]; |
22 | 22 | ||
23 | static void pmu_backlight_init_curve(u8 off, u8 min, u8 max) | 23 | static void pmu_backlight_init_curve(u8 off, u8 min, u8 max) |
@@ -128,7 +128,7 @@ void pmu_backlight_set_sleep(int sleep) | |||
128 | 128 | ||
129 | spin_lock_irqsave(&pmu_backlight_lock, flags); | 129 | spin_lock_irqsave(&pmu_backlight_lock, flags); |
130 | sleeping = sleep; | 130 | sleeping = sleep; |
131 | if (pmac_backlight) { | 131 | if (pmac_backlight && uses_pmu_bl) { |
132 | if (sleep) { | 132 | if (sleep) { |
133 | struct adb_request req; | 133 | struct adb_request req; |
134 | 134 | ||
@@ -166,6 +166,7 @@ void __init pmu_backlight_init() | |||
166 | printk(KERN_ERR "PMU Backlight registration failed\n"); | 166 | printk(KERN_ERR "PMU Backlight registration failed\n"); |
167 | return; | 167 | return; |
168 | } | 168 | } |
169 | uses_pmu_bl = 1; | ||
169 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; | 170 | bd->props.max_brightness = FB_BACKLIGHT_LEVELS - 1; |
170 | pmu_backlight_init_curve(0x7F, 0x46, 0x0E); | 171 | pmu_backlight_init_curve(0x7F, 0x46, 0x0E); |
171 | 172 | ||
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index ebec663d5d37..d6365a9f0637 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -2528,7 +2528,7 @@ EXPORT_SYMBOL(pmu_wait_complete); | |||
2528 | EXPORT_SYMBOL(pmu_suspend); | 2528 | EXPORT_SYMBOL(pmu_suspend); |
2529 | EXPORT_SYMBOL(pmu_resume); | 2529 | EXPORT_SYMBOL(pmu_resume); |
2530 | EXPORT_SYMBOL(pmu_unlock); | 2530 | EXPORT_SYMBOL(pmu_unlock); |
2531 | #if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) | 2531 | #if defined(CONFIG_PPC32) |
2532 | EXPORT_SYMBOL(pmu_enable_irled); | 2532 | EXPORT_SYMBOL(pmu_enable_irled); |
2533 | EXPORT_SYMBOL(pmu_battery_count); | 2533 | EXPORT_SYMBOL(pmu_battery_count); |
2534 | EXPORT_SYMBOL(pmu_batteries); | 2534 | EXPORT_SYMBOL(pmu_batteries); |
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index 831aed9c56ff..c14dacdacfac 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c | |||
@@ -1045,7 +1045,8 @@ void bitmap_daemon_work(struct bitmap *bitmap) | |||
1045 | if (bitmap == NULL) | 1045 | if (bitmap == NULL) |
1046 | return; | 1046 | return; |
1047 | if (time_before(jiffies, bitmap->daemon_lastrun + bitmap->daemon_sleep*HZ)) | 1047 | if (time_before(jiffies, bitmap->daemon_lastrun + bitmap->daemon_sleep*HZ)) |
1048 | return; | 1048 | goto done; |
1049 | |||
1049 | bitmap->daemon_lastrun = jiffies; | 1050 | bitmap->daemon_lastrun = jiffies; |
1050 | if (bitmap->allclean) { | 1051 | if (bitmap->allclean) { |
1051 | bitmap->mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT; | 1052 | bitmap->mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT; |
@@ -1142,6 +1143,7 @@ void bitmap_daemon_work(struct bitmap *bitmap) | |||
1142 | } | 1143 | } |
1143 | } | 1144 | } |
1144 | 1145 | ||
1146 | done: | ||
1145 | if (bitmap->allclean == 0) | 1147 | if (bitmap->allclean == 0) |
1146 | bitmap->mddev->thread->timeout = bitmap->daemon_sleep * HZ; | 1148 | bitmap->mddev->thread->timeout = bitmap->daemon_sleep * HZ; |
1147 | } | 1149 | } |
diff --git a/drivers/md/md.c b/drivers/md/md.c index 827824a9f3e9..ccbbf63727cc 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5149,7 +5149,7 @@ static int md_seq_show(struct seq_file *seq, void *v) | |||
5149 | if (mddev->ro==1) | 5149 | if (mddev->ro==1) |
5150 | seq_printf(seq, " (read-only)"); | 5150 | seq_printf(seq, " (read-only)"); |
5151 | if (mddev->ro==2) | 5151 | if (mddev->ro==2) |
5152 | seq_printf(seq, "(auto-read-only)"); | 5152 | seq_printf(seq, " (auto-read-only)"); |
5153 | seq_printf(seq, " %s", mddev->pers->name); | 5153 | seq_printf(seq, " %s", mddev->pers->name); |
5154 | } | 5154 | } |
5155 | 5155 | ||
diff --git a/drivers/memstick/Kconfig b/drivers/memstick/Kconfig index 1093fdb07297..f0ca41c20323 100644 --- a/drivers/memstick/Kconfig +++ b/drivers/memstick/Kconfig | |||
@@ -8,7 +8,7 @@ menuconfig MEMSTICK | |||
8 | Sony MemoryStick is a proprietary storage/extension card protocol. | 8 | Sony MemoryStick is a proprietary storage/extension card protocol. |
9 | 9 | ||
10 | If you want MemoryStick support, you should say Y here and also | 10 | If you want MemoryStick support, you should say Y here and also |
11 | to the specific driver for your MMC interface. | 11 | to the specific driver for your MemoryStick interface. |
12 | 12 | ||
13 | if MEMSTICK | 13 | if MEMSTICK |
14 | 14 | ||
diff --git a/drivers/memstick/core/memstick.c b/drivers/memstick/core/memstick.c index bba467fe4bce..de80dba12f9b 100644 --- a/drivers/memstick/core/memstick.c +++ b/drivers/memstick/core/memstick.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | 19 | ||
20 | #define DRIVER_NAME "memstick" | 20 | #define DRIVER_NAME "memstick" |
21 | #define DRIVER_VERSION "0.2" | ||
22 | 21 | ||
23 | static unsigned int cmd_retries = 3; | 22 | static unsigned int cmd_retries = 3; |
24 | module_param(cmd_retries, uint, 0644); | 23 | module_param(cmd_retries, uint, 0644); |
@@ -236,7 +235,7 @@ int memstick_next_req(struct memstick_host *host, struct memstick_request **mrq) | |||
236 | rc = host->card->next_request(host->card, mrq); | 235 | rc = host->card->next_request(host->card, mrq); |
237 | 236 | ||
238 | if (!rc) | 237 | if (!rc) |
239 | host->retries = cmd_retries; | 238 | host->retries = cmd_retries > 1 ? cmd_retries - 1 : 1; |
240 | else | 239 | else |
241 | *mrq = NULL; | 240 | *mrq = NULL; |
242 | 241 | ||
@@ -271,7 +270,7 @@ void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, | |||
271 | mrq->data_dir = READ; | 270 | mrq->data_dir = READ; |
272 | 271 | ||
273 | mrq->sg = *sg; | 272 | mrq->sg = *sg; |
274 | mrq->io_type = MEMSTICK_IO_SG; | 273 | mrq->long_data = 1; |
275 | 274 | ||
276 | if (tpc == MS_TPC_SET_CMD || tpc == MS_TPC_EX_SET_CMD) | 275 | if (tpc == MS_TPC_SET_CMD || tpc == MS_TPC_EX_SET_CMD) |
277 | mrq->need_card_int = 1; | 276 | mrq->need_card_int = 1; |
@@ -306,7 +305,7 @@ void memstick_init_req(struct memstick_request *mrq, unsigned char tpc, | |||
306 | if (mrq->data_dir == WRITE) | 305 | if (mrq->data_dir == WRITE) |
307 | memcpy(mrq->data, buf, mrq->data_len); | 306 | memcpy(mrq->data, buf, mrq->data_len); |
308 | 307 | ||
309 | mrq->io_type = MEMSTICK_IO_VAL; | 308 | mrq->long_data = 0; |
310 | 309 | ||
311 | if (tpc == MS_TPC_SET_CMD || tpc == MS_TPC_EX_SET_CMD) | 310 | if (tpc == MS_TPC_SET_CMD || tpc == MS_TPC_EX_SET_CMD) |
312 | mrq->need_card_int = 1; | 311 | mrq->need_card_int = 1; |
@@ -561,6 +560,31 @@ void memstick_free_host(struct memstick_host *host) | |||
561 | } | 560 | } |
562 | EXPORT_SYMBOL(memstick_free_host); | 561 | EXPORT_SYMBOL(memstick_free_host); |
563 | 562 | ||
563 | /** | ||
564 | * memstick_suspend_host - notify bus driver of host suspension | ||
565 | * @host - host to use | ||
566 | */ | ||
567 | void memstick_suspend_host(struct memstick_host *host) | ||
568 | { | ||
569 | mutex_lock(&host->lock); | ||
570 | host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF); | ||
571 | mutex_unlock(&host->lock); | ||
572 | } | ||
573 | EXPORT_SYMBOL(memstick_suspend_host); | ||
574 | |||
575 | /** | ||
576 | * memstick_resume_host - notify bus driver of host resumption | ||
577 | * @host - host to use | ||
578 | */ | ||
579 | void memstick_resume_host(struct memstick_host *host) | ||
580 | { | ||
581 | mutex_lock(&host->lock); | ||
582 | host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON); | ||
583 | mutex_unlock(&host->lock); | ||
584 | memstick_detect_change(host); | ||
585 | } | ||
586 | EXPORT_SYMBOL(memstick_resume_host); | ||
587 | |||
564 | int memstick_register_driver(struct memstick_driver *drv) | 588 | int memstick_register_driver(struct memstick_driver *drv) |
565 | { | 589 | { |
566 | drv->driver.bus = &memstick_bus_type; | 590 | drv->driver.bus = &memstick_bus_type; |
@@ -611,4 +635,3 @@ module_exit(memstick_exit); | |||
611 | MODULE_AUTHOR("Alex Dubov"); | 635 | MODULE_AUTHOR("Alex Dubov"); |
612 | MODULE_LICENSE("GPL"); | 636 | MODULE_LICENSE("GPL"); |
613 | MODULE_DESCRIPTION("Sony MemoryStick core driver"); | 637 | MODULE_DESCRIPTION("Sony MemoryStick core driver"); |
614 | MODULE_VERSION(DRIVER_VERSION); | ||
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 423ad8cf4bb9..1d637e4561d3 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c | |||
@@ -16,10 +16,10 @@ | |||
16 | #include <linux/idr.h> | 16 | #include <linux/idr.h> |
17 | #include <linux/hdreg.h> | 17 | #include <linux/hdreg.h> |
18 | #include <linux/kthread.h> | 18 | #include <linux/kthread.h> |
19 | #include <linux/delay.h> | ||
19 | #include <linux/memstick.h> | 20 | #include <linux/memstick.h> |
20 | 21 | ||
21 | #define DRIVER_NAME "mspro_block" | 22 | #define DRIVER_NAME "mspro_block" |
22 | #define DRIVER_VERSION "0.2" | ||
23 | 23 | ||
24 | static int major; | 24 | static int major; |
25 | module_param(major, int, 0644); | 25 | module_param(major, int, 0644); |
@@ -110,6 +110,17 @@ struct mspro_mbr { | |||
110 | unsigned int sectors_per_partition; | 110 | unsigned int sectors_per_partition; |
111 | } __attribute__((packed)); | 111 | } __attribute__((packed)); |
112 | 112 | ||
113 | struct mspro_specfile { | ||
114 | char name[8]; | ||
115 | char ext[3]; | ||
116 | unsigned char attr; | ||
117 | unsigned char reserved[10]; | ||
118 | unsigned short time; | ||
119 | unsigned short date; | ||
120 | unsigned short cluster; | ||
121 | unsigned int size; | ||
122 | } __attribute__((packed)); | ||
123 | |||
113 | struct mspro_devinfo { | 124 | struct mspro_devinfo { |
114 | unsigned short cylinders; | 125 | unsigned short cylinders; |
115 | unsigned short heads; | 126 | unsigned short heads; |
@@ -293,6 +304,20 @@ static ssize_t mspro_block_attr_show_sysinfo(struct device *dev, | |||
293 | dev_attr); | 304 | dev_attr); |
294 | struct mspro_sys_info *x_sys = x_attr->data; | 305 | struct mspro_sys_info *x_sys = x_attr->data; |
295 | ssize_t rc = 0; | 306 | ssize_t rc = 0; |
307 | int date_tz = 0, date_tz_f = 0; | ||
308 | |||
309 | if (x_sys->assembly_date[0] > 0x80U) { | ||
310 | date_tz = (~x_sys->assembly_date[0]) + 1; | ||
311 | date_tz_f = date_tz & 3; | ||
312 | date_tz >>= 2; | ||
313 | date_tz = -date_tz; | ||
314 | date_tz_f *= 15; | ||
315 | } else if (x_sys->assembly_date[0] < 0x80U) { | ||
316 | date_tz = x_sys->assembly_date[0]; | ||
317 | date_tz_f = date_tz & 3; | ||
318 | date_tz >>= 2; | ||
319 | date_tz_f *= 15; | ||
320 | } | ||
296 | 321 | ||
297 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "class: %x\n", | 322 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "class: %x\n", |
298 | x_sys->class); | 323 | x_sys->class); |
@@ -305,8 +330,8 @@ static ssize_t mspro_block_attr_show_sysinfo(struct device *dev, | |||
305 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "page size: %x\n", | 330 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "page size: %x\n", |
306 | be16_to_cpu(x_sys->page_size)); | 331 | be16_to_cpu(x_sys->page_size)); |
307 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "assembly date: " | 332 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "assembly date: " |
308 | "%d %04u-%02u-%02u %02u:%02u:%02u\n", | 333 | "GMT%+d:%d %04u-%02u-%02u %02u:%02u:%02u\n", |
309 | x_sys->assembly_date[0], | 334 | date_tz, date_tz_f, |
310 | be16_to_cpu(*(unsigned short *) | 335 | be16_to_cpu(*(unsigned short *) |
311 | &x_sys->assembly_date[1]), | 336 | &x_sys->assembly_date[1]), |
312 | x_sys->assembly_date[3], x_sys->assembly_date[4], | 337 | x_sys->assembly_date[3], x_sys->assembly_date[4], |
@@ -398,6 +423,41 @@ static ssize_t mspro_block_attr_show_mbr(struct device *dev, | |||
398 | return rc; | 423 | return rc; |
399 | } | 424 | } |
400 | 425 | ||
426 | static ssize_t mspro_block_attr_show_specfile(struct device *dev, | ||
427 | struct device_attribute *attr, | ||
428 | char *buffer) | ||
429 | { | ||
430 | struct mspro_sys_attr *x_attr = container_of(attr, | ||
431 | struct mspro_sys_attr, | ||
432 | dev_attr); | ||
433 | struct mspro_specfile *x_spfile = x_attr->data; | ||
434 | char name[9], ext[4]; | ||
435 | ssize_t rc = 0; | ||
436 | |||
437 | memcpy(name, x_spfile->name, 8); | ||
438 | name[8] = 0; | ||
439 | memcpy(ext, x_spfile->ext, 3); | ||
440 | ext[3] = 0; | ||
441 | |||
442 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "name: %s\n", name); | ||
443 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "ext: %s\n", ext); | ||
444 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "attribute: %x\n", | ||
445 | x_spfile->attr); | ||
446 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "time: %d:%d:%d\n", | ||
447 | x_spfile->time >> 11, | ||
448 | (x_spfile->time >> 5) & 0x3f, | ||
449 | (x_spfile->time & 0x1f) * 2); | ||
450 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "date: %d-%d-%d\n", | ||
451 | (x_spfile->date >> 9) + 1980, | ||
452 | (x_spfile->date >> 5) & 0xf, | ||
453 | x_spfile->date & 0x1f); | ||
454 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "start cluster: %x\n", | ||
455 | x_spfile->cluster); | ||
456 | rc += scnprintf(buffer + rc, PAGE_SIZE - rc, "size: %x\n", | ||
457 | x_spfile->size); | ||
458 | return rc; | ||
459 | } | ||
460 | |||
401 | static ssize_t mspro_block_attr_show_devinfo(struct device *dev, | 461 | static ssize_t mspro_block_attr_show_devinfo(struct device *dev, |
402 | struct device_attribute *attr, | 462 | struct device_attribute *attr, |
403 | char *buffer) | 463 | char *buffer) |
@@ -430,6 +490,9 @@ static sysfs_show_t mspro_block_attr_show(unsigned char tag) | |||
430 | return mspro_block_attr_show_modelname; | 490 | return mspro_block_attr_show_modelname; |
431 | case MSPRO_BLOCK_ID_MBR: | 491 | case MSPRO_BLOCK_ID_MBR: |
432 | return mspro_block_attr_show_mbr; | 492 | return mspro_block_attr_show_mbr; |
493 | case MSPRO_BLOCK_ID_SPECFILEVALUES1: | ||
494 | case MSPRO_BLOCK_ID_SPECFILEVALUES2: | ||
495 | return mspro_block_attr_show_specfile; | ||
433 | case MSPRO_BLOCK_ID_DEVINFO: | 496 | case MSPRO_BLOCK_ID_DEVINFO: |
434 | return mspro_block_attr_show_devinfo; | 497 | return mspro_block_attr_show_devinfo; |
435 | default: | 498 | default: |
@@ -629,7 +692,7 @@ static void mspro_block_process_request(struct memstick_dev *card, | |||
629 | param.system = msb->system; | 692 | param.system = msb->system; |
630 | param.data_count = cpu_to_be16(page_count); | 693 | param.data_count = cpu_to_be16(page_count); |
631 | param.data_address = cpu_to_be32((uint32_t)t_sec); | 694 | param.data_address = cpu_to_be32((uint32_t)t_sec); |
632 | param.cmd_param = 0; | 695 | param.tpc_param = 0; |
633 | 696 | ||
634 | msb->data_dir = rq_data_dir(req); | 697 | msb->data_dir = rq_data_dir(req); |
635 | msb->transfer_cmd = msb->data_dir == READ | 698 | msb->transfer_cmd = msb->data_dir == READ |
@@ -758,10 +821,10 @@ static int mspro_block_switch_to_parallel(struct memstick_dev *card) | |||
758 | struct memstick_host *host = card->host; | 821 | struct memstick_host *host = card->host; |
759 | struct mspro_block_data *msb = memstick_get_drvdata(card); | 822 | struct mspro_block_data *msb = memstick_get_drvdata(card); |
760 | struct mspro_param_register param = { | 823 | struct mspro_param_register param = { |
761 | .system = 0, | 824 | .system = MEMSTICK_SYS_PAR4, |
762 | .data_count = 0, | 825 | .data_count = 0, |
763 | .data_address = 0, | 826 | .data_address = 0, |
764 | .cmd_param = 0 | 827 | .tpc_param = 0 |
765 | }; | 828 | }; |
766 | 829 | ||
767 | card->next_request = h_mspro_block_req_init; | 830 | card->next_request = h_mspro_block_req_init; |
@@ -773,8 +836,8 @@ static int mspro_block_switch_to_parallel(struct memstick_dev *card) | |||
773 | if (card->current_mrq.error) | 836 | if (card->current_mrq.error) |
774 | return card->current_mrq.error; | 837 | return card->current_mrq.error; |
775 | 838 | ||
776 | msb->system = 0; | 839 | msb->system = MEMSTICK_SYS_PAR4; |
777 | host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_PARALLEL); | 840 | host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_PAR4); |
778 | 841 | ||
779 | card->next_request = h_mspro_block_req_init; | 842 | card->next_request = h_mspro_block_req_init; |
780 | msb->mrq_handler = h_mspro_block_default; | 843 | msb->mrq_handler = h_mspro_block_default; |
@@ -783,8 +846,24 @@ static int mspro_block_switch_to_parallel(struct memstick_dev *card) | |||
783 | wait_for_completion(&card->mrq_complete); | 846 | wait_for_completion(&card->mrq_complete); |
784 | 847 | ||
785 | if (card->current_mrq.error) { | 848 | if (card->current_mrq.error) { |
786 | msb->system = 0x80; | 849 | msb->system = MEMSTICK_SYS_SERIAL; |
850 | host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_OFF); | ||
851 | msleep(1000); | ||
852 | host->set_param(host, MEMSTICK_POWER, MEMSTICK_POWER_ON); | ||
787 | host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_SERIAL); | 853 | host->set_param(host, MEMSTICK_INTERFACE, MEMSTICK_SERIAL); |
854 | |||
855 | if (memstick_set_rw_addr(card)) | ||
856 | return card->current_mrq.error; | ||
857 | |||
858 | param.system = msb->system; | ||
859 | |||
860 | card->next_request = h_mspro_block_req_init; | ||
861 | msb->mrq_handler = h_mspro_block_default; | ||
862 | memstick_init_req(&card->current_mrq, MS_TPC_WRITE_REG, ¶m, | ||
863 | sizeof(param)); | ||
864 | memstick_new_req(host); | ||
865 | wait_for_completion(&card->mrq_complete); | ||
866 | |||
788 | return -EFAULT; | 867 | return -EFAULT; |
789 | } | 868 | } |
790 | 869 | ||
@@ -802,7 +881,7 @@ static int mspro_block_read_attributes(struct memstick_dev *card) | |||
802 | .system = msb->system, | 881 | .system = msb->system, |
803 | .data_count = cpu_to_be16(1), | 882 | .data_count = cpu_to_be16(1), |
804 | .data_address = 0, | 883 | .data_address = 0, |
805 | .cmd_param = 0 | 884 | .tpc_param = 0 |
806 | }; | 885 | }; |
807 | struct mspro_attribute *attr = NULL; | 886 | struct mspro_attribute *attr = NULL; |
808 | struct mspro_sys_attr *s_attr = NULL; | 887 | struct mspro_sys_attr *s_attr = NULL; |
@@ -922,7 +1001,7 @@ static int mspro_block_read_attributes(struct memstick_dev *card) | |||
922 | param.system = msb->system; | 1001 | param.system = msb->system; |
923 | param.data_count = cpu_to_be16((rc / msb->page_size) + 1); | 1002 | param.data_count = cpu_to_be16((rc / msb->page_size) + 1); |
924 | param.data_address = cpu_to_be32(addr / msb->page_size); | 1003 | param.data_address = cpu_to_be32(addr / msb->page_size); |
925 | param.cmd_param = 0; | 1004 | param.tpc_param = 0; |
926 | 1005 | ||
927 | sg_init_one(&msb->req_sg[0], buffer, | 1006 | sg_init_one(&msb->req_sg[0], buffer, |
928 | be16_to_cpu(param.data_count) * msb->page_size); | 1007 | be16_to_cpu(param.data_count) * msb->page_size); |
@@ -964,7 +1043,7 @@ static int mspro_block_init_card(struct memstick_dev *card) | |||
964 | struct memstick_host *host = card->host; | 1043 | struct memstick_host *host = card->host; |
965 | int rc = 0; | 1044 | int rc = 0; |
966 | 1045 | ||
967 | msb->system = 0x80; | 1046 | msb->system = MEMSTICK_SYS_SERIAL; |
968 | card->reg_addr.r_offset = offsetof(struct mspro_register, status); | 1047 | card->reg_addr.r_offset = offsetof(struct mspro_register, status); |
969 | card->reg_addr.r_length = sizeof(struct ms_status_register); | 1048 | card->reg_addr.r_length = sizeof(struct ms_status_register); |
970 | card->reg_addr.w_offset = offsetof(struct mspro_register, param); | 1049 | card->reg_addr.w_offset = offsetof(struct mspro_register, param); |
@@ -973,7 +1052,7 @@ static int mspro_block_init_card(struct memstick_dev *card) | |||
973 | if (memstick_set_rw_addr(card)) | 1052 | if (memstick_set_rw_addr(card)) |
974 | return -EIO; | 1053 | return -EIO; |
975 | 1054 | ||
976 | if (host->caps & MEMSTICK_CAP_PARALLEL) { | 1055 | if (host->caps & MEMSTICK_CAP_PAR4) { |
977 | if (mspro_block_switch_to_parallel(card)) | 1056 | if (mspro_block_switch_to_parallel(card)) |
978 | printk(KERN_WARNING "%s: could not switch to " | 1057 | printk(KERN_WARNING "%s: could not switch to " |
979 | "parallel interface\n", card->dev.bus_id); | 1058 | "parallel interface\n", card->dev.bus_id); |
@@ -1348,4 +1427,3 @@ MODULE_LICENSE("GPL"); | |||
1348 | MODULE_AUTHOR("Alex Dubov"); | 1427 | MODULE_AUTHOR("Alex Dubov"); |
1349 | MODULE_DESCRIPTION("Sony MemoryStickPro block device driver"); | 1428 | MODULE_DESCRIPTION("Sony MemoryStickPro block device driver"); |
1350 | MODULE_DEVICE_TABLE(memstick, mspro_block_id_tbl); | 1429 | MODULE_DEVICE_TABLE(memstick, mspro_block_id_tbl); |
1351 | MODULE_VERSION(DRIVER_VERSION); | ||
diff --git a/drivers/memstick/host/Kconfig b/drivers/memstick/host/Kconfig index c002fcc3c879..4ce5c8dffb68 100644 --- a/drivers/memstick/host/Kconfig +++ b/drivers/memstick/host/Kconfig | |||
@@ -20,3 +20,13 @@ config MEMSTICK_TIFM_MS | |||
20 | To compile this driver as a module, choose M here: the | 20 | To compile this driver as a module, choose M here: the |
21 | module will be called tifm_ms. | 21 | module will be called tifm_ms. |
22 | 22 | ||
23 | config MEMSTICK_JMICRON_38X | ||
24 | tristate "JMicron JMB38X MemoryStick interface support (EXPERIMENTAL)" | ||
25 | depends on EXPERIMENTAL && PCI | ||
26 | |||
27 | help | ||
28 | Say Y here if you want to be able to access MemoryStick cards with | ||
29 | the JMicron(R) JMB38X MemoryStick card reader. | ||
30 | |||
31 | To compile this driver as a module, choose M here: the | ||
32 | module will be called jmb38x_ms. | ||
diff --git a/drivers/memstick/host/Makefile b/drivers/memstick/host/Makefile index ee666380efa1..12530e4311d3 100644 --- a/drivers/memstick/host/Makefile +++ b/drivers/memstick/host/Makefile | |||
@@ -3,8 +3,8 @@ | |||
3 | # | 3 | # |
4 | 4 | ||
5 | ifeq ($(CONFIG_MEMSTICK_DEBUG),y) | 5 | ifeq ($(CONFIG_MEMSTICK_DEBUG),y) |
6 | EXTRA_CFLAGS += -DDEBUG | 6 | EXTRA_CFLAGS += -DDEBUG |
7 | endif | 7 | endif |
8 | 8 | ||
9 | obj-$(CONFIG_MEMSTICK_TIFM_MS) += tifm_ms.o | 9 | obj-$(CONFIG_MEMSTICK_TIFM_MS) += tifm_ms.o |
10 | 10 | obj-$(CONFIG_MEMSTICK_JMICRON_38X) += jmb38x_ms.o | |
diff --git a/drivers/memstick/host/jmb38x_ms.c b/drivers/memstick/host/jmb38x_ms.c new file mode 100644 index 000000000000..03fe8783b1ee --- /dev/null +++ b/drivers/memstick/host/jmb38x_ms.c | |||
@@ -0,0 +1,945 @@ | |||
1 | /* | ||
2 | * jmb38x_ms.c - JMicron jmb38x MemoryStick card reader | ||
3 | * | ||
4 | * Copyright (C) 2008 Alex Dubov <oakad@yahoo.com> | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License version 2 as | ||
8 | * published by the Free Software Foundation. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #include <linux/spinlock.h> | ||
13 | #include <linux/interrupt.h> | ||
14 | #include <linux/pci.h> | ||
15 | #include <linux/delay.h> | ||
16 | #include <linux/highmem.h> | ||
17 | #include <linux/memstick.h> | ||
18 | |||
19 | #define DRIVER_NAME "jmb38x_ms" | ||
20 | |||
21 | static int no_dma; | ||
22 | module_param(no_dma, bool, 0644); | ||
23 | |||
24 | enum { | ||
25 | DMA_ADDRESS = 0x00, | ||
26 | BLOCK = 0x04, | ||
27 | DMA_CONTROL = 0x08, | ||
28 | TPC_P0 = 0x0c, | ||
29 | TPC_P1 = 0x10, | ||
30 | TPC = 0x14, | ||
31 | HOST_CONTROL = 0x18, | ||
32 | DATA = 0x1c, | ||
33 | STATUS = 0x20, | ||
34 | INT_STATUS = 0x24, | ||
35 | INT_STATUS_ENABLE = 0x28, | ||
36 | INT_SIGNAL_ENABLE = 0x2c, | ||
37 | TIMER = 0x30, | ||
38 | TIMER_CONTROL = 0x34, | ||
39 | PAD_OUTPUT_ENABLE = 0x38, | ||
40 | PAD_PU_PD = 0x3c, | ||
41 | CLOCK_DELAY = 0x40, | ||
42 | ADMA_ADDRESS = 0x44, | ||
43 | CLOCK_CONTROL = 0x48, | ||
44 | LED_CONTROL = 0x4c, | ||
45 | VERSION = 0x50 | ||
46 | }; | ||
47 | |||
48 | struct jmb38x_ms_host { | ||
49 | struct jmb38x_ms *chip; | ||
50 | void __iomem *addr; | ||
51 | spinlock_t lock; | ||
52 | int id; | ||
53 | char host_id[DEVICE_ID_SIZE]; | ||
54 | int irq; | ||
55 | unsigned int block_pos; | ||
56 | unsigned long timeout_jiffies; | ||
57 | struct timer_list timer; | ||
58 | struct memstick_request *req; | ||
59 | unsigned char eject:1, | ||
60 | use_dma:1; | ||
61 | unsigned char cmd_flags; | ||
62 | unsigned char io_pos; | ||
63 | unsigned int io_word[2]; | ||
64 | }; | ||
65 | |||
66 | struct jmb38x_ms { | ||
67 | struct pci_dev *pdev; | ||
68 | int host_cnt; | ||
69 | struct memstick_host *hosts[]; | ||
70 | }; | ||
71 | |||
72 | #define BLOCK_COUNT_MASK 0xffff0000 | ||
73 | #define BLOCK_SIZE_MASK 0x00000fff | ||
74 | |||
75 | #define DMA_CONTROL_ENABLE 0x00000001 | ||
76 | |||
77 | #define TPC_DATA_SEL 0x00008000 | ||
78 | #define TPC_DIR 0x00004000 | ||
79 | #define TPC_WAIT_INT 0x00002000 | ||
80 | #define TPC_GET_INT 0x00000800 | ||
81 | #define TPC_CODE_SZ_MASK 0x00000700 | ||
82 | #define TPC_DATA_SZ_MASK 0x00000007 | ||
83 | |||
84 | #define HOST_CONTROL_RESET_REQ 0x00008000 | ||
85 | #define HOST_CONTROL_REI 0x00004000 | ||
86 | #define HOST_CONTROL_LED 0x00000400 | ||
87 | #define HOST_CONTROL_FAST_CLK 0x00000200 | ||
88 | #define HOST_CONTROL_RESET 0x00000100 | ||
89 | #define HOST_CONTROL_POWER_EN 0x00000080 | ||
90 | #define HOST_CONTROL_CLOCK_EN 0x00000040 | ||
91 | #define HOST_CONTROL_IF_SHIFT 4 | ||
92 | |||
93 | #define HOST_CONTROL_IF_SERIAL 0x0 | ||
94 | #define HOST_CONTROL_IF_PAR4 0x1 | ||
95 | #define HOST_CONTROL_IF_PAR8 0x3 | ||
96 | |||
97 | #define STATUS_HAS_MEDIA 0x00000400 | ||
98 | #define STATUS_FIFO_EMPTY 0x00000200 | ||
99 | #define STATUS_FIFO_FULL 0x00000100 | ||
100 | |||
101 | #define INT_STATUS_TPC_ERR 0x00080000 | ||
102 | #define INT_STATUS_CRC_ERR 0x00040000 | ||
103 | #define INT_STATUS_TIMER_TO 0x00020000 | ||
104 | #define INT_STATUS_HSK_TO 0x00010000 | ||
105 | #define INT_STATUS_ANY_ERR 0x00008000 | ||
106 | #define INT_STATUS_FIFO_WRDY 0x00000080 | ||
107 | #define INT_STATUS_FIFO_RRDY 0x00000040 | ||
108 | #define INT_STATUS_MEDIA_OUT 0x00000010 | ||
109 | #define INT_STATUS_MEDIA_IN 0x00000008 | ||
110 | #define INT_STATUS_DMA_BOUNDARY 0x00000004 | ||
111 | #define INT_STATUS_EOTRAN 0x00000002 | ||
112 | #define INT_STATUS_EOTPC 0x00000001 | ||
113 | |||
114 | #define INT_STATUS_ALL 0x000f801f | ||
115 | |||
116 | #define PAD_OUTPUT_ENABLE_MS 0x0F3F | ||
117 | |||
118 | #define PAD_PU_PD_OFF 0x7FFF0000 | ||
119 | #define PAD_PU_PD_ON_MS_SOCK0 0x5f8f0000 | ||
120 | #define PAD_PU_PD_ON_MS_SOCK1 0x0f0f0000 | ||
121 | |||
122 | enum { | ||
123 | CMD_READY = 0x01, | ||
124 | FIFO_READY = 0x02, | ||
125 | REG_DATA = 0x04, | ||
126 | AUTO_GET_INT = 0x08 | ||
127 | }; | ||
128 | |||
129 | static unsigned int jmb38x_ms_read_data(struct jmb38x_ms_host *host, | ||
130 | unsigned char *buf, unsigned int length) | ||
131 | { | ||
132 | unsigned int off = 0; | ||
133 | |||
134 | while (host->io_pos && length) { | ||
135 | buf[off++] = host->io_word[0] & 0xff; | ||
136 | host->io_word[0] >>= 8; | ||
137 | length--; | ||
138 | host->io_pos--; | ||
139 | } | ||
140 | |||
141 | if (!length) | ||
142 | return off; | ||
143 | |||
144 | while (!(STATUS_FIFO_EMPTY & readl(host->addr + STATUS))) { | ||
145 | if (length < 4) | ||
146 | break; | ||
147 | *(unsigned int *)(buf + off) = __raw_readl(host->addr + DATA); | ||
148 | length -= 4; | ||
149 | off += 4; | ||
150 | } | ||
151 | |||
152 | if (length | ||
153 | && !(STATUS_FIFO_EMPTY & readl(host->addr + STATUS))) { | ||
154 | host->io_word[0] = readl(host->addr + DATA); | ||
155 | for (host->io_pos = 4; host->io_pos; --host->io_pos) { | ||
156 | buf[off++] = host->io_word[0] & 0xff; | ||
157 | host->io_word[0] >>= 8; | ||
158 | length--; | ||
159 | if (!length) | ||
160 | break; | ||
161 | } | ||
162 | } | ||
163 | |||
164 | return off; | ||
165 | } | ||
166 | |||
167 | static unsigned int jmb38x_ms_read_reg_data(struct jmb38x_ms_host *host, | ||
168 | unsigned char *buf, | ||
169 | unsigned int length) | ||
170 | { | ||
171 | unsigned int off = 0; | ||
172 | |||
173 | while (host->io_pos > 4 && length) { | ||
174 | buf[off++] = host->io_word[0] & 0xff; | ||
175 | host->io_word[0] >>= 8; | ||
176 | length--; | ||
177 | host->io_pos--; | ||
178 | } | ||
179 | |||
180 | if (!length) | ||
181 | return off; | ||
182 | |||
183 | while (host->io_pos && length) { | ||
184 | buf[off++] = host->io_word[1] & 0xff; | ||
185 | host->io_word[1] >>= 8; | ||
186 | length--; | ||
187 | host->io_pos--; | ||
188 | } | ||
189 | |||
190 | return off; | ||
191 | } | ||
192 | |||
193 | static unsigned int jmb38x_ms_write_data(struct jmb38x_ms_host *host, | ||
194 | unsigned char *buf, | ||
195 | unsigned int length) | ||
196 | { | ||
197 | unsigned int off = 0; | ||
198 | |||
199 | if (host->io_pos) { | ||
200 | while (host->io_pos < 4 && length) { | ||
201 | host->io_word[0] |= buf[off++] << (host->io_pos * 8); | ||
202 | host->io_pos++; | ||
203 | length--; | ||
204 | } | ||
205 | } | ||
206 | |||
207 | if (host->io_pos == 4 | ||
208 | && !(STATUS_FIFO_FULL & readl(host->addr + STATUS))) { | ||
209 | writel(host->io_word[0], host->addr + DATA); | ||
210 | host->io_pos = 0; | ||
211 | host->io_word[0] = 0; | ||
212 | } else if (host->io_pos) { | ||
213 | return off; | ||
214 | } | ||
215 | |||
216 | if (!length) | ||
217 | return off; | ||
218 | |||
219 | while (!(STATUS_FIFO_FULL & readl(host->addr + STATUS))) { | ||
220 | if (length < 4) | ||
221 | break; | ||
222 | |||
223 | __raw_writel(*(unsigned int *)(buf + off), | ||
224 | host->addr + DATA); | ||
225 | length -= 4; | ||
226 | off += 4; | ||
227 | } | ||
228 | |||
229 | switch (length) { | ||
230 | case 3: | ||
231 | host->io_word[0] |= buf[off + 2] << 16; | ||
232 | host->io_pos++; | ||
233 | case 2: | ||
234 | host->io_word[0] |= buf[off + 1] << 8; | ||
235 | host->io_pos++; | ||
236 | case 1: | ||
237 | host->io_word[0] |= buf[off]; | ||
238 | host->io_pos++; | ||
239 | } | ||
240 | |||
241 | off += host->io_pos; | ||
242 | |||
243 | return off; | ||
244 | } | ||
245 | |||
246 | static unsigned int jmb38x_ms_write_reg_data(struct jmb38x_ms_host *host, | ||
247 | unsigned char *buf, | ||
248 | unsigned int length) | ||
249 | { | ||
250 | unsigned int off = 0; | ||
251 | |||
252 | while (host->io_pos < 4 && length) { | ||
253 | host->io_word[0] &= ~(0xff << (host->io_pos * 8)); | ||
254 | host->io_word[0] |= buf[off++] << (host->io_pos * 8); | ||
255 | host->io_pos++; | ||
256 | length--; | ||
257 | } | ||
258 | |||
259 | if (!length) | ||
260 | return off; | ||
261 | |||
262 | while (host->io_pos < 8 && length) { | ||
263 | host->io_word[1] &= ~(0xff << (host->io_pos * 8)); | ||
264 | host->io_word[1] |= buf[off++] << (host->io_pos * 8); | ||
265 | host->io_pos++; | ||
266 | length--; | ||
267 | } | ||
268 | |||
269 | return off; | ||
270 | } | ||
271 | |||
272 | static int jmb38x_ms_transfer_data(struct jmb38x_ms_host *host) | ||
273 | { | ||
274 | unsigned int length; | ||
275 | unsigned int off; | ||
276 | unsigned int t_size, p_off, p_cnt; | ||
277 | unsigned char *buf; | ||
278 | struct page *pg; | ||
279 | unsigned long flags = 0; | ||
280 | |||
281 | if (host->req->long_data) { | ||
282 | length = host->req->sg.length - host->block_pos; | ||
283 | off = host->req->sg.offset + host->block_pos; | ||
284 | } else { | ||
285 | length = host->req->data_len - host->block_pos; | ||
286 | off = 0; | ||
287 | } | ||
288 | |||
289 | while (length) { | ||
290 | if (host->req->long_data) { | ||
291 | pg = nth_page(sg_page(&host->req->sg), | ||
292 | off >> PAGE_SHIFT); | ||
293 | p_off = offset_in_page(off); | ||
294 | p_cnt = PAGE_SIZE - p_off; | ||
295 | p_cnt = min(p_cnt, length); | ||
296 | |||
297 | local_irq_save(flags); | ||
298 | buf = kmap_atomic(pg, KM_BIO_SRC_IRQ) + p_off; | ||
299 | } else { | ||
300 | buf = host->req->data + host->block_pos; | ||
301 | p_cnt = host->req->data_len - host->block_pos; | ||
302 | } | ||
303 | |||
304 | if (host->req->data_dir == WRITE) | ||
305 | t_size = !(host->cmd_flags & REG_DATA) | ||
306 | ? jmb38x_ms_write_data(host, buf, p_cnt) | ||
307 | : jmb38x_ms_write_reg_data(host, buf, p_cnt); | ||
308 | else | ||
309 | t_size = !(host->cmd_flags & REG_DATA) | ||
310 | ? jmb38x_ms_read_data(host, buf, p_cnt) | ||
311 | : jmb38x_ms_read_reg_data(host, buf, p_cnt); | ||
312 | |||
313 | if (host->req->long_data) { | ||
314 | kunmap_atomic(buf - p_off, KM_BIO_SRC_IRQ); | ||
315 | local_irq_restore(flags); | ||
316 | } | ||
317 | |||
318 | if (!t_size) | ||
319 | break; | ||
320 | host->block_pos += t_size; | ||
321 | length -= t_size; | ||
322 | off += t_size; | ||
323 | } | ||
324 | |||
325 | if (!length && host->req->data_dir == WRITE) { | ||
326 | if (host->cmd_flags & REG_DATA) { | ||
327 | writel(host->io_word[0], host->addr + TPC_P0); | ||
328 | writel(host->io_word[1], host->addr + TPC_P1); | ||
329 | } else if (host->io_pos) { | ||
330 | writel(host->io_word[0], host->addr + DATA); | ||
331 | } | ||
332 | } | ||
333 | |||
334 | return length; | ||
335 | } | ||
336 | |||
337 | static int jmb38x_ms_issue_cmd(struct memstick_host *msh) | ||
338 | { | ||
339 | struct jmb38x_ms_host *host = memstick_priv(msh); | ||
340 | unsigned char *data; | ||
341 | unsigned int data_len, cmd, t_val; | ||
342 | |||
343 | if (!(STATUS_HAS_MEDIA & readl(host->addr + STATUS))) { | ||
344 | dev_dbg(msh->cdev.dev, "no media status\n"); | ||
345 | host->req->error = -ETIME; | ||
346 | return host->req->error; | ||
347 | } | ||
348 | |||
349 | dev_dbg(msh->cdev.dev, "control %08x\n", | ||
350 | readl(host->addr + HOST_CONTROL)); | ||
351 | dev_dbg(msh->cdev.dev, "status %08x\n", readl(host->addr + INT_STATUS)); | ||
352 | dev_dbg(msh->cdev.dev, "hstatus %08x\n", readl(host->addr + STATUS)); | ||
353 | |||
354 | host->cmd_flags = 0; | ||
355 | host->block_pos = 0; | ||
356 | host->io_pos = 0; | ||
357 | host->io_word[0] = 0; | ||
358 | host->io_word[1] = 0; | ||
359 | |||
360 | cmd = host->req->tpc << 16; | ||
361 | cmd |= TPC_DATA_SEL; | ||
362 | |||
363 | if (host->req->data_dir == READ) | ||
364 | cmd |= TPC_DIR; | ||
365 | if (host->req->need_card_int) | ||
366 | cmd |= TPC_WAIT_INT; | ||
367 | if (host->req->get_int_reg) | ||
368 | cmd |= TPC_GET_INT; | ||
369 | |||
370 | data = host->req->data; | ||
371 | |||
372 | host->use_dma = !no_dma; | ||
373 | |||
374 | if (host->req->long_data) { | ||
375 | data_len = host->req->sg.length; | ||
376 | } else { | ||
377 | data_len = host->req->data_len; | ||
378 | host->use_dma = 0; | ||
379 | } | ||
380 | |||
381 | if (data_len <= 8) { | ||
382 | cmd &= ~(TPC_DATA_SEL | 0xf); | ||
383 | host->cmd_flags |= REG_DATA; | ||
384 | cmd |= data_len & 0xf; | ||
385 | host->use_dma = 0; | ||
386 | } | ||
387 | |||
388 | if (host->use_dma) { | ||
389 | if (1 != pci_map_sg(host->chip->pdev, &host->req->sg, 1, | ||
390 | host->req->data_dir == READ | ||
391 | ? PCI_DMA_FROMDEVICE | ||
392 | : PCI_DMA_TODEVICE)) { | ||
393 | host->req->error = -ENOMEM; | ||
394 | return host->req->error; | ||
395 | } | ||
396 | data_len = sg_dma_len(&host->req->sg); | ||
397 | writel(sg_dma_address(&host->req->sg), | ||
398 | host->addr + DMA_ADDRESS); | ||
399 | writel(((1 << 16) & BLOCK_COUNT_MASK) | ||
400 | | (data_len & BLOCK_SIZE_MASK), | ||
401 | host->addr + BLOCK); | ||
402 | writel(DMA_CONTROL_ENABLE, host->addr + DMA_CONTROL); | ||
403 | } else if (!(host->cmd_flags & REG_DATA)) { | ||
404 | writel(((1 << 16) & BLOCK_COUNT_MASK) | ||
405 | | (data_len & BLOCK_SIZE_MASK), | ||
406 | host->addr + BLOCK); | ||
407 | t_val = readl(host->addr + INT_STATUS_ENABLE); | ||
408 | t_val |= host->req->data_dir == READ | ||
409 | ? INT_STATUS_FIFO_RRDY | ||
410 | : INT_STATUS_FIFO_WRDY; | ||
411 | |||
412 | writel(t_val, host->addr + INT_STATUS_ENABLE); | ||
413 | writel(t_val, host->addr + INT_SIGNAL_ENABLE); | ||
414 | } else { | ||
415 | cmd &= ~(TPC_DATA_SEL | 0xf); | ||
416 | host->cmd_flags |= REG_DATA; | ||
417 | cmd |= data_len & 0xf; | ||
418 | |||
419 | if (host->req->data_dir == WRITE) { | ||
420 | jmb38x_ms_transfer_data(host); | ||
421 | writel(host->io_word[0], host->addr + TPC_P0); | ||
422 | writel(host->io_word[1], host->addr + TPC_P1); | ||
423 | } | ||
424 | } | ||
425 | |||
426 | mod_timer(&host->timer, jiffies + host->timeout_jiffies); | ||
427 | writel(HOST_CONTROL_LED | readl(host->addr + HOST_CONTROL), | ||
428 | host->addr + HOST_CONTROL); | ||
429 | host->req->error = 0; | ||
430 | |||
431 | writel(cmd, host->addr + TPC); | ||
432 | dev_dbg(msh->cdev.dev, "executing TPC %08x, len %x\n", cmd, data_len); | ||
433 | |||
434 | return 0; | ||
435 | } | ||
436 | |||
437 | static void jmb38x_ms_complete_cmd(struct memstick_host *msh, int last) | ||
438 | { | ||
439 | struct jmb38x_ms_host *host = memstick_priv(msh); | ||
440 | unsigned int t_val = 0; | ||
441 | int rc; | ||
442 | |||
443 | del_timer(&host->timer); | ||
444 | |||
445 | dev_dbg(msh->cdev.dev, "c control %08x\n", | ||
446 | readl(host->addr + HOST_CONTROL)); | ||
447 | dev_dbg(msh->cdev.dev, "c status %08x\n", | ||
448 | readl(host->addr + INT_STATUS)); | ||
449 | dev_dbg(msh->cdev.dev, "c hstatus %08x\n", readl(host->addr + STATUS)); | ||
450 | |||
451 | if (host->req->get_int_reg) { | ||
452 | t_val = readl(host->addr + TPC_P0); | ||
453 | host->req->int_reg = (t_val & 0xff); | ||
454 | } | ||
455 | |||
456 | if (host->use_dma) { | ||
457 | writel(0, host->addr + DMA_CONTROL); | ||
458 | pci_unmap_sg(host->chip->pdev, &host->req->sg, 1, | ||
459 | host->req->data_dir == READ | ||
460 | ? PCI_DMA_FROMDEVICE : PCI_DMA_TODEVICE); | ||
461 | } else { | ||
462 | t_val = readl(host->addr + INT_STATUS_ENABLE); | ||
463 | if (host->req->data_dir == READ) | ||
464 | t_val &= ~INT_STATUS_FIFO_RRDY; | ||
465 | else | ||
466 | t_val &= ~INT_STATUS_FIFO_WRDY; | ||
467 | |||
468 | writel(t_val, host->addr + INT_STATUS_ENABLE); | ||
469 | writel(t_val, host->addr + INT_SIGNAL_ENABLE); | ||
470 | } | ||
471 | |||
472 | writel((~HOST_CONTROL_LED) & readl(host->addr + HOST_CONTROL), | ||
473 | host->addr + HOST_CONTROL); | ||
474 | |||
475 | if (!last) { | ||
476 | do { | ||
477 | rc = memstick_next_req(msh, &host->req); | ||
478 | } while (!rc && jmb38x_ms_issue_cmd(msh)); | ||
479 | } else { | ||
480 | do { | ||
481 | rc = memstick_next_req(msh, &host->req); | ||
482 | if (!rc) | ||
483 | host->req->error = -ETIME; | ||
484 | } while (!rc); | ||
485 | } | ||
486 | } | ||
487 | |||
488 | static irqreturn_t jmb38x_ms_isr(int irq, void *dev_id) | ||
489 | { | ||
490 | struct memstick_host *msh = dev_id; | ||
491 | struct jmb38x_ms_host *host = memstick_priv(msh); | ||
492 | unsigned int irq_status; | ||
493 | |||
494 | spin_lock(&host->lock); | ||
495 | irq_status = readl(host->addr + INT_STATUS); | ||
496 | dev_dbg(&host->chip->pdev->dev, "irq_status = %08x\n", irq_status); | ||
497 | if (irq_status == 0 || irq_status == (~0)) { | ||
498 | spin_unlock(&host->lock); | ||
499 | return IRQ_NONE; | ||
500 | } | ||
501 | |||
502 | if (host->req) { | ||
503 | if (irq_status & INT_STATUS_ANY_ERR) { | ||
504 | if (irq_status & INT_STATUS_CRC_ERR) | ||
505 | host->req->error = -EILSEQ; | ||
506 | else | ||
507 | host->req->error = -ETIME; | ||
508 | } else { | ||
509 | if (host->use_dma) { | ||
510 | if (irq_status & INT_STATUS_EOTRAN) | ||
511 | host->cmd_flags |= FIFO_READY; | ||
512 | } else { | ||
513 | if (irq_status & (INT_STATUS_FIFO_RRDY | ||
514 | | INT_STATUS_FIFO_WRDY)) | ||
515 | jmb38x_ms_transfer_data(host); | ||
516 | |||
517 | if (irq_status & INT_STATUS_EOTRAN) { | ||
518 | jmb38x_ms_transfer_data(host); | ||
519 | host->cmd_flags |= FIFO_READY; | ||
520 | } | ||
521 | } | ||
522 | |||
523 | if (irq_status & INT_STATUS_EOTPC) { | ||
524 | host->cmd_flags |= CMD_READY; | ||
525 | if (host->cmd_flags & REG_DATA) { | ||
526 | if (host->req->data_dir == READ) { | ||
527 | host->io_word[0] | ||
528 | = readl(host->addr | ||
529 | + TPC_P0); | ||
530 | host->io_word[1] | ||
531 | = readl(host->addr | ||
532 | + TPC_P1); | ||
533 | host->io_pos = 8; | ||
534 | |||
535 | jmb38x_ms_transfer_data(host); | ||
536 | } | ||
537 | host->cmd_flags |= FIFO_READY; | ||
538 | } | ||
539 | } | ||
540 | } | ||
541 | } | ||
542 | |||
543 | if (irq_status & (INT_STATUS_MEDIA_IN | INT_STATUS_MEDIA_OUT)) { | ||
544 | dev_dbg(&host->chip->pdev->dev, "media changed\n"); | ||
545 | memstick_detect_change(msh); | ||
546 | } | ||
547 | |||
548 | writel(irq_status, host->addr + INT_STATUS); | ||
549 | |||
550 | if (host->req | ||
551 | && (((host->cmd_flags & CMD_READY) | ||
552 | && (host->cmd_flags & FIFO_READY)) | ||
553 | || host->req->error)) | ||
554 | jmb38x_ms_complete_cmd(msh, 0); | ||
555 | |||
556 | spin_unlock(&host->lock); | ||
557 | return IRQ_HANDLED; | ||
558 | } | ||
559 | |||
560 | static void jmb38x_ms_abort(unsigned long data) | ||
561 | { | ||
562 | struct memstick_host *msh = (struct memstick_host *)data; | ||
563 | struct jmb38x_ms_host *host = memstick_priv(msh); | ||
564 | unsigned long flags; | ||
565 | |||
566 | dev_dbg(&host->chip->pdev->dev, "abort\n"); | ||
567 | spin_lock_irqsave(&host->lock, flags); | ||
568 | if (host->req) { | ||
569 | host->req->error = -ETIME; | ||
570 | jmb38x_ms_complete_cmd(msh, 0); | ||
571 | } | ||
572 | spin_unlock_irqrestore(&host->lock, flags); | ||
573 | } | ||
574 | |||
575 | static void jmb38x_ms_request(struct memstick_host *msh) | ||
576 | { | ||
577 | struct jmb38x_ms_host *host = memstick_priv(msh); | ||
578 | unsigned long flags; | ||
579 | int rc; | ||
580 | |||
581 | spin_lock_irqsave(&host->lock, flags); | ||
582 | if (host->req) { | ||
583 | spin_unlock_irqrestore(&host->lock, flags); | ||
584 | BUG(); | ||
585 | return; | ||
586 | } | ||
587 | |||
588 | do { | ||
589 | rc = memstick_next_req(msh, &host->req); | ||
590 | } while (!rc && jmb38x_ms_issue_cmd(msh)); | ||
591 | spin_unlock_irqrestore(&host->lock, flags); | ||
592 | } | ||
593 | |||
594 | static void jmb38x_ms_reset(struct jmb38x_ms_host *host) | ||
595 | { | ||
596 | unsigned int host_ctl = readl(host->addr + HOST_CONTROL); | ||
597 | |||
598 | writel(host_ctl | HOST_CONTROL_RESET_REQ | HOST_CONTROL_RESET, | ||
599 | host->addr + HOST_CONTROL); | ||
600 | |||
601 | while (HOST_CONTROL_RESET_REQ | ||
602 | & (host_ctl = readl(host->addr + HOST_CONTROL))) { | ||
603 | ndelay(100); | ||
604 | dev_dbg(&host->chip->pdev->dev, "reset\n"); | ||
605 | } | ||
606 | |||
607 | writel(INT_STATUS_ALL, host->addr + INT_STATUS_ENABLE); | ||
608 | writel(INT_STATUS_ALL, host->addr + INT_SIGNAL_ENABLE); | ||
609 | |||
610 | dev_dbg(&host->chip->pdev->dev, "reset\n"); | ||
611 | } | ||
612 | |||
613 | static void jmb38x_ms_set_param(struct memstick_host *msh, | ||
614 | enum memstick_param param, | ||
615 | int value) | ||
616 | { | ||
617 | struct jmb38x_ms_host *host = memstick_priv(msh); | ||
618 | unsigned int host_ctl; | ||
619 | unsigned long flags; | ||
620 | |||
621 | spin_lock_irqsave(&host->lock, flags); | ||
622 | |||
623 | switch (param) { | ||
624 | case MEMSTICK_POWER: | ||
625 | if (value == MEMSTICK_POWER_ON) { | ||
626 | jmb38x_ms_reset(host); | ||
627 | |||
628 | writel(host->id ? PAD_PU_PD_ON_MS_SOCK1 | ||
629 | : PAD_PU_PD_ON_MS_SOCK0, | ||
630 | host->addr + PAD_PU_PD); | ||
631 | |||
632 | writel(PAD_OUTPUT_ENABLE_MS, | ||
633 | host->addr + PAD_OUTPUT_ENABLE); | ||
634 | |||
635 | host_ctl = readl(host->addr + HOST_CONTROL); | ||
636 | host_ctl |= 7; | ||
637 | writel(host_ctl | (HOST_CONTROL_POWER_EN | ||
638 | | HOST_CONTROL_CLOCK_EN), | ||
639 | host->addr + HOST_CONTROL); | ||
640 | |||
641 | dev_dbg(&host->chip->pdev->dev, "power on\n"); | ||
642 | } else if (value == MEMSTICK_POWER_OFF) { | ||
643 | writel(readl(host->addr + HOST_CONTROL) | ||
644 | & ~(HOST_CONTROL_POWER_EN | ||
645 | | HOST_CONTROL_CLOCK_EN), | ||
646 | host->addr + HOST_CONTROL); | ||
647 | writel(0, host->addr + PAD_OUTPUT_ENABLE); | ||
648 | writel(PAD_PU_PD_OFF, host->addr + PAD_PU_PD); | ||
649 | dev_dbg(&host->chip->pdev->dev, "power off\n"); | ||
650 | } | ||
651 | break; | ||
652 | case MEMSTICK_INTERFACE: | ||
653 | /* jmb38x_ms_reset(host); */ | ||
654 | |||
655 | host_ctl = readl(host->addr + HOST_CONTROL); | ||
656 | host_ctl &= ~(3 << HOST_CONTROL_IF_SHIFT); | ||
657 | /* host_ctl |= 7; */ | ||
658 | |||
659 | if (value == MEMSTICK_SERIAL) { | ||
660 | host_ctl &= ~HOST_CONTROL_FAST_CLK; | ||
661 | host_ctl |= HOST_CONTROL_IF_SERIAL | ||
662 | << HOST_CONTROL_IF_SHIFT; | ||
663 | host_ctl |= HOST_CONTROL_REI; | ||
664 | writel(0, host->addr + CLOCK_DELAY); | ||
665 | } else if (value == MEMSTICK_PAR4) { | ||
666 | host_ctl |= HOST_CONTROL_FAST_CLK; | ||
667 | host_ctl |= HOST_CONTROL_IF_PAR4 | ||
668 | << HOST_CONTROL_IF_SHIFT; | ||
669 | host_ctl &= ~HOST_CONTROL_REI; | ||
670 | writel(4, host->addr + CLOCK_DELAY); | ||
671 | } else if (value == MEMSTICK_PAR8) { | ||
672 | host_ctl |= HOST_CONTROL_FAST_CLK; | ||
673 | host_ctl |= HOST_CONTROL_IF_PAR8 | ||
674 | << HOST_CONTROL_IF_SHIFT; | ||
675 | host_ctl &= ~HOST_CONTROL_REI; | ||
676 | writel(4, host->addr + CLOCK_DELAY); | ||
677 | } | ||
678 | writel(host_ctl, host->addr + HOST_CONTROL); | ||
679 | break; | ||
680 | }; | ||
681 | |||
682 | spin_unlock_irqrestore(&host->lock, flags); | ||
683 | } | ||
684 | |||
685 | #ifdef CONFIG_PM | ||
686 | |||
687 | static int jmb38x_ms_suspend(struct pci_dev *dev, pm_message_t state) | ||
688 | { | ||
689 | struct jmb38x_ms *jm = pci_get_drvdata(dev); | ||
690 | int cnt; | ||
691 | |||
692 | for (cnt = 0; cnt < jm->host_cnt; ++cnt) { | ||
693 | if (!jm->hosts[cnt]) | ||
694 | break; | ||
695 | memstick_suspend_host(jm->hosts[cnt]); | ||
696 | } | ||
697 | |||
698 | pci_save_state(dev); | ||
699 | pci_enable_wake(dev, pci_choose_state(dev, state), 0); | ||
700 | pci_disable_device(dev); | ||
701 | pci_set_power_state(dev, pci_choose_state(dev, state)); | ||
702 | return 0; | ||
703 | } | ||
704 | |||
705 | static int jmb38x_ms_resume(struct pci_dev *dev) | ||
706 | { | ||
707 | struct jmb38x_ms *jm = pci_get_drvdata(dev); | ||
708 | int rc; | ||
709 | |||
710 | pci_set_power_state(dev, PCI_D0); | ||
711 | pci_restore_state(dev); | ||
712 | rc = pci_enable_device(dev); | ||
713 | if (rc) | ||
714 | return rc; | ||
715 | pci_set_master(dev); | ||
716 | |||
717 | pci_read_config_dword(dev, 0xac, &rc); | ||
718 | pci_write_config_dword(dev, 0xac, rc | 0x00470000); | ||
719 | |||
720 | for (rc = 0; rc < jm->host_cnt; ++rc) { | ||
721 | if (!jm->hosts[rc]) | ||
722 | break; | ||
723 | memstick_resume_host(jm->hosts[rc]); | ||
724 | memstick_detect_change(jm->hosts[rc]); | ||
725 | } | ||
726 | |||
727 | return 0; | ||
728 | } | ||
729 | |||
730 | #else | ||
731 | |||
732 | #define jmb38x_ms_suspend NULL | ||
733 | #define jmb38x_ms_resume NULL | ||
734 | |||
735 | #endif /* CONFIG_PM */ | ||
736 | |||
737 | static int jmb38x_ms_count_slots(struct pci_dev *pdev) | ||
738 | { | ||
739 | int cnt, rc = 0; | ||
740 | |||
741 | for (cnt = 0; cnt < PCI_ROM_RESOURCE; ++cnt) { | ||
742 | if (!(IORESOURCE_MEM & pci_resource_flags(pdev, cnt))) | ||
743 | break; | ||
744 | |||
745 | if (256 != pci_resource_len(pdev, cnt)) | ||
746 | break; | ||
747 | |||
748 | ++rc; | ||
749 | } | ||
750 | return rc; | ||
751 | } | ||
752 | |||
753 | static struct memstick_host *jmb38x_ms_alloc_host(struct jmb38x_ms *jm, int cnt) | ||
754 | { | ||
755 | struct memstick_host *msh; | ||
756 | struct jmb38x_ms_host *host; | ||
757 | |||
758 | msh = memstick_alloc_host(sizeof(struct jmb38x_ms_host), | ||
759 | &jm->pdev->dev); | ||
760 | if (!msh) | ||
761 | return NULL; | ||
762 | |||
763 | host = memstick_priv(msh); | ||
764 | host->chip = jm; | ||
765 | host->addr = ioremap(pci_resource_start(jm->pdev, cnt), | ||
766 | pci_resource_len(jm->pdev, cnt)); | ||
767 | if (!host->addr) | ||
768 | goto err_out_free; | ||
769 | |||
770 | spin_lock_init(&host->lock); | ||
771 | host->id = cnt; | ||
772 | snprintf(host->host_id, DEVICE_ID_SIZE, DRIVER_NAME ":slot%d", | ||
773 | host->id); | ||
774 | host->irq = jm->pdev->irq; | ||
775 | host->timeout_jiffies = msecs_to_jiffies(4000); | ||
776 | msh->request = jmb38x_ms_request; | ||
777 | msh->set_param = jmb38x_ms_set_param; | ||
778 | /* | ||
779 | msh->caps = MEMSTICK_CAP_AUTO_GET_INT | MEMSTICK_CAP_PAR4 | ||
780 | | MEMSTICK_CAP_PAR8; | ||
781 | */ | ||
782 | msh->caps = MEMSTICK_CAP_PAR4 | MEMSTICK_CAP_PAR8; | ||
783 | |||
784 | setup_timer(&host->timer, jmb38x_ms_abort, (unsigned long)msh); | ||
785 | |||
786 | if (!request_irq(host->irq, jmb38x_ms_isr, IRQF_SHARED, host->host_id, | ||
787 | msh)) | ||
788 | return msh; | ||
789 | |||
790 | iounmap(host->addr); | ||
791 | err_out_free: | ||
792 | kfree(msh); | ||
793 | return NULL; | ||
794 | } | ||
795 | |||
796 | static void jmb38x_ms_free_host(struct memstick_host *msh) | ||
797 | { | ||
798 | struct jmb38x_ms_host *host = memstick_priv(msh); | ||
799 | |||
800 | free_irq(host->irq, msh); | ||
801 | iounmap(host->addr); | ||
802 | memstick_free_host(msh); | ||
803 | } | ||
804 | |||
805 | static int jmb38x_ms_probe(struct pci_dev *pdev, | ||
806 | const struct pci_device_id *dev_id) | ||
807 | { | ||
808 | struct jmb38x_ms *jm; | ||
809 | int pci_dev_busy = 0; | ||
810 | int rc, cnt; | ||
811 | |||
812 | rc = pci_set_dma_mask(pdev, DMA_32BIT_MASK); | ||
813 | if (rc) | ||
814 | return rc; | ||
815 | |||
816 | rc = pci_enable_device(pdev); | ||
817 | if (rc) | ||
818 | return rc; | ||
819 | |||
820 | pci_set_master(pdev); | ||
821 | |||
822 | rc = pci_request_regions(pdev, DRIVER_NAME); | ||
823 | if (rc) { | ||
824 | pci_dev_busy = 1; | ||
825 | goto err_out; | ||
826 | } | ||
827 | |||
828 | pci_read_config_dword(pdev, 0xac, &rc); | ||
829 | pci_write_config_dword(pdev, 0xac, rc | 0x00470000); | ||
830 | |||
831 | cnt = jmb38x_ms_count_slots(pdev); | ||
832 | if (!cnt) { | ||
833 | rc = -ENODEV; | ||
834 | pci_dev_busy = 1; | ||
835 | goto err_out; | ||
836 | } | ||
837 | |||
838 | jm = kzalloc(sizeof(struct jmb38x_ms) | ||
839 | + cnt * sizeof(struct memstick_host *), GFP_KERNEL); | ||
840 | if (!jm) { | ||
841 | rc = -ENOMEM; | ||
842 | goto err_out_int; | ||
843 | } | ||
844 | |||
845 | jm->pdev = pdev; | ||
846 | jm->host_cnt = cnt; | ||
847 | pci_set_drvdata(pdev, jm); | ||
848 | |||
849 | for (cnt = 0; cnt < jm->host_cnt; ++cnt) { | ||
850 | jm->hosts[cnt] = jmb38x_ms_alloc_host(jm, cnt); | ||
851 | if (!jm->hosts[cnt]) | ||
852 | break; | ||
853 | |||
854 | rc = memstick_add_host(jm->hosts[cnt]); | ||
855 | |||
856 | if (rc) { | ||
857 | jmb38x_ms_free_host(jm->hosts[cnt]); | ||
858 | jm->hosts[cnt] = NULL; | ||
859 | break; | ||
860 | } | ||
861 | } | ||
862 | |||
863 | if (cnt) | ||
864 | return 0; | ||
865 | |||
866 | rc = -ENODEV; | ||
867 | |||
868 | pci_set_drvdata(pdev, NULL); | ||
869 | kfree(jm); | ||
870 | err_out_int: | ||
871 | pci_release_regions(pdev); | ||
872 | err_out: | ||
873 | if (!pci_dev_busy) | ||
874 | pci_disable_device(pdev); | ||
875 | return rc; | ||
876 | } | ||
877 | |||
878 | static void jmb38x_ms_remove(struct pci_dev *dev) | ||
879 | { | ||
880 | struct jmb38x_ms *jm = pci_get_drvdata(dev); | ||
881 | struct jmb38x_ms_host *host; | ||
882 | int cnt; | ||
883 | unsigned long flags; | ||
884 | |||
885 | for (cnt = 0; cnt < jm->host_cnt; ++cnt) { | ||
886 | if (!jm->hosts[cnt]) | ||
887 | break; | ||
888 | |||
889 | host = memstick_priv(jm->hosts[cnt]); | ||
890 | |||
891 | writel(0, host->addr + INT_SIGNAL_ENABLE); | ||
892 | writel(0, host->addr + INT_STATUS_ENABLE); | ||
893 | mmiowb(); | ||
894 | dev_dbg(&jm->pdev->dev, "interrupts off\n"); | ||
895 | spin_lock_irqsave(&host->lock, flags); | ||
896 | if (host->req) { | ||
897 | host->req->error = -ETIME; | ||
898 | jmb38x_ms_complete_cmd(jm->hosts[cnt], 1); | ||
899 | } | ||
900 | spin_unlock_irqrestore(&host->lock, flags); | ||
901 | |||
902 | memstick_remove_host(jm->hosts[cnt]); | ||
903 | dev_dbg(&jm->pdev->dev, "host removed\n"); | ||
904 | |||
905 | jmb38x_ms_free_host(jm->hosts[cnt]); | ||
906 | } | ||
907 | |||
908 | pci_set_drvdata(dev, NULL); | ||
909 | pci_release_regions(dev); | ||
910 | pci_disable_device(dev); | ||
911 | kfree(jm); | ||
912 | } | ||
913 | |||
914 | static struct pci_device_id jmb38x_ms_id_tbl [] = { | ||
915 | { PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB38X_MS, PCI_ANY_ID, | ||
916 | PCI_ANY_ID, 0, 0, 0 }, | ||
917 | { } | ||
918 | }; | ||
919 | |||
920 | static struct pci_driver jmb38x_ms_driver = { | ||
921 | .name = DRIVER_NAME, | ||
922 | .id_table = jmb38x_ms_id_tbl, | ||
923 | .probe = jmb38x_ms_probe, | ||
924 | .remove = jmb38x_ms_remove, | ||
925 | .suspend = jmb38x_ms_suspend, | ||
926 | .resume = jmb38x_ms_resume | ||
927 | }; | ||
928 | |||
929 | static int __init jmb38x_ms_init(void) | ||
930 | { | ||
931 | return pci_register_driver(&jmb38x_ms_driver); | ||
932 | } | ||
933 | |||
934 | static void __exit jmb38x_ms_exit(void) | ||
935 | { | ||
936 | pci_unregister_driver(&jmb38x_ms_driver); | ||
937 | } | ||
938 | |||
939 | MODULE_AUTHOR("Alex Dubov"); | ||
940 | MODULE_DESCRIPTION("JMicron jmb38x MemoryStick driver"); | ||
941 | MODULE_LICENSE("GPL"); | ||
942 | MODULE_DEVICE_TABLE(pci, jmb38x_ms_id_tbl); | ||
943 | |||
944 | module_init(jmb38x_ms_init); | ||
945 | module_exit(jmb38x_ms_exit); | ||
diff --git a/drivers/memstick/host/tifm_ms.c b/drivers/memstick/host/tifm_ms.c index 4fb24215bd95..2b5bf52a8302 100644 --- a/drivers/memstick/host/tifm_ms.c +++ b/drivers/memstick/host/tifm_ms.c | |||
@@ -20,293 +20,315 @@ | |||
20 | #include <asm/io.h> | 20 | #include <asm/io.h> |
21 | 21 | ||
22 | #define DRIVER_NAME "tifm_ms" | 22 | #define DRIVER_NAME "tifm_ms" |
23 | #define DRIVER_VERSION "0.1" | ||
24 | 23 | ||
25 | static int no_dma; | 24 | static int no_dma; |
26 | module_param(no_dma, bool, 0644); | 25 | module_param(no_dma, bool, 0644); |
27 | 26 | ||
28 | #define TIFM_MS_TIMEOUT 0x00100 | 27 | /* |
29 | #define TIFM_MS_BADCRC 0x00200 | 28 | * Some control bits of TIFM appear to conform to Sony's reference design, |
30 | #define TIFM_MS_EOTPC 0x01000 | 29 | * so I'm just assuming they all are. |
31 | #define TIFM_MS_INT 0x02000 | 30 | */ |
32 | |||
33 | /* The meaning of the bit majority in this constant is unknown. */ | ||
34 | #define TIFM_MS_SERIAL 0x04010 | ||
35 | 31 | ||
36 | #define TIFM_MS_SYS_LATCH 0x00100 | 32 | #define TIFM_MS_STAT_DRQ 0x04000 |
37 | #define TIFM_MS_SYS_NOT_RDY 0x00800 | 33 | #define TIFM_MS_STAT_MSINT 0x02000 |
38 | #define TIFM_MS_SYS_DATA 0x10000 | 34 | #define TIFM_MS_STAT_RDY 0x01000 |
35 | #define TIFM_MS_STAT_CRC 0x00200 | ||
36 | #define TIFM_MS_STAT_TOE 0x00100 | ||
37 | #define TIFM_MS_STAT_EMP 0x00020 | ||
38 | #define TIFM_MS_STAT_FUL 0x00010 | ||
39 | #define TIFM_MS_STAT_CED 0x00008 | ||
40 | #define TIFM_MS_STAT_ERR 0x00004 | ||
41 | #define TIFM_MS_STAT_BRQ 0x00002 | ||
42 | #define TIFM_MS_STAT_CNK 0x00001 | ||
43 | |||
44 | #define TIFM_MS_SYS_DMA 0x10000 | ||
45 | #define TIFM_MS_SYS_RESET 0x08000 | ||
46 | #define TIFM_MS_SYS_SRAC 0x04000 | ||
47 | #define TIFM_MS_SYS_INTEN 0x02000 | ||
48 | #define TIFM_MS_SYS_NOCRC 0x01000 | ||
49 | #define TIFM_MS_SYS_INTCLR 0x00800 | ||
50 | #define TIFM_MS_SYS_MSIEN 0x00400 | ||
51 | #define TIFM_MS_SYS_FCLR 0x00200 | ||
52 | #define TIFM_MS_SYS_FDIR 0x00100 | ||
53 | #define TIFM_MS_SYS_DAM 0x00080 | ||
54 | #define TIFM_MS_SYS_DRM 0x00040 | ||
55 | #define TIFM_MS_SYS_DRQSL 0x00020 | ||
56 | #define TIFM_MS_SYS_REI 0x00010 | ||
57 | #define TIFM_MS_SYS_REO 0x00008 | ||
58 | #define TIFM_MS_SYS_BSY_MASK 0x00007 | ||
59 | |||
60 | #define TIFM_MS_SYS_FIFO (TIFM_MS_SYS_INTEN | TIFM_MS_SYS_MSIEN \ | ||
61 | | TIFM_MS_SYS_FCLR | TIFM_MS_SYS_BSY_MASK) | ||
39 | 62 | ||
40 | /* Hardware flags */ | 63 | /* Hardware flags */ |
41 | enum { | 64 | enum { |
42 | CMD_READY = 0x0001, | 65 | CMD_READY = 0x01, |
43 | FIFO_READY = 0x0002, | 66 | FIFO_READY = 0x02, |
44 | CARD_READY = 0x0004, | 67 | CARD_INT = 0x04 |
45 | DATA_CARRY = 0x0008 | ||
46 | }; | 68 | }; |
47 | 69 | ||
48 | struct tifm_ms { | 70 | struct tifm_ms { |
49 | struct tifm_dev *dev; | 71 | struct tifm_dev *dev; |
50 | unsigned short eject:1, | 72 | struct timer_list timer; |
51 | no_dma:1; | 73 | struct memstick_request *req; |
52 | unsigned short cmd_flags; | ||
53 | unsigned int mode_mask; | 74 | unsigned int mode_mask; |
54 | unsigned int block_pos; | 75 | unsigned int block_pos; |
55 | unsigned long timeout_jiffies; | 76 | unsigned long timeout_jiffies; |
56 | 77 | unsigned char eject:1, | |
57 | struct timer_list timer; | 78 | use_dma:1; |
58 | struct memstick_request *req; | 79 | unsigned char cmd_flags; |
80 | unsigned char io_pos; | ||
59 | unsigned int io_word; | 81 | unsigned int io_word; |
60 | }; | 82 | }; |
61 | 83 | ||
62 | static void tifm_ms_read_fifo(struct tifm_ms *host, unsigned int fifo_offset, | 84 | static unsigned int tifm_ms_read_data(struct tifm_ms *host, |
63 | struct page *pg, unsigned int page_off, | 85 | unsigned char *buf, unsigned int length) |
64 | unsigned int length) | ||
65 | { | 86 | { |
66 | struct tifm_dev *sock = host->dev; | 87 | struct tifm_dev *sock = host->dev; |
67 | unsigned int cnt = 0, off = 0; | 88 | unsigned int off = 0; |
68 | unsigned char *buf = kmap_atomic(pg, KM_BIO_DST_IRQ) + page_off; | 89 | |
90 | while (host->io_pos && length) { | ||
91 | buf[off++] = host->io_word & 0xff; | ||
92 | host->io_word >>= 8; | ||
93 | length--; | ||
94 | host->io_pos--; | ||
95 | } | ||
69 | 96 | ||
70 | if (host->cmd_flags & DATA_CARRY) { | 97 | if (!length) |
71 | while ((fifo_offset & 3) && length) { | 98 | return off; |
99 | |||
100 | while (!(TIFM_MS_STAT_EMP & readl(sock->addr + SOCK_MS_STATUS))) { | ||
101 | if (length < 4) | ||
102 | break; | ||
103 | *(unsigned int *)(buf + off) = __raw_readl(sock->addr | ||
104 | + SOCK_MS_DATA); | ||
105 | length -= 4; | ||
106 | off += 4; | ||
107 | } | ||
108 | |||
109 | if (length | ||
110 | && !(TIFM_MS_STAT_EMP & readl(sock->addr + SOCK_MS_STATUS))) { | ||
111 | host->io_word = readl(sock->addr + SOCK_MS_DATA); | ||
112 | for (host->io_pos = 4; host->io_pos; --host->io_pos) { | ||
72 | buf[off++] = host->io_word & 0xff; | 113 | buf[off++] = host->io_word & 0xff; |
73 | host->io_word >>= 8; | 114 | host->io_word >>= 8; |
74 | length--; | 115 | length--; |
75 | fifo_offset++; | 116 | if (!length) |
117 | break; | ||
76 | } | 118 | } |
77 | if (!(fifo_offset & 3)) | ||
78 | host->cmd_flags &= ~DATA_CARRY; | ||
79 | if (!length) | ||
80 | return; | ||
81 | } | 119 | } |
82 | 120 | ||
83 | do { | 121 | return off; |
84 | host->io_word = readl(sock->addr + SOCK_FIFO_ACCESS | ||
85 | + fifo_offset); | ||
86 | cnt = 4; | ||
87 | while (length && cnt) { | ||
88 | buf[off++] = (host->io_word >> 8) & 0xff; | ||
89 | cnt--; | ||
90 | length--; | ||
91 | } | ||
92 | fifo_offset += 4 - cnt; | ||
93 | } while (length); | ||
94 | |||
95 | if (cnt) | ||
96 | host->cmd_flags |= DATA_CARRY; | ||
97 | |||
98 | kunmap_atomic(buf - page_off, KM_BIO_DST_IRQ); | ||
99 | } | 122 | } |
100 | 123 | ||
101 | static void tifm_ms_write_fifo(struct tifm_ms *host, unsigned int fifo_offset, | 124 | static unsigned int tifm_ms_write_data(struct tifm_ms *host, |
102 | struct page *pg, unsigned int page_off, | 125 | unsigned char *buf, unsigned int length) |
103 | unsigned int length) | ||
104 | { | 126 | { |
105 | struct tifm_dev *sock = host->dev; | 127 | struct tifm_dev *sock = host->dev; |
106 | unsigned int cnt = 0, off = 0; | 128 | unsigned int off = 0; |
107 | unsigned char *buf = kmap_atomic(pg, KM_BIO_SRC_IRQ) + page_off; | ||
108 | 129 | ||
109 | if (host->cmd_flags & DATA_CARRY) { | 130 | if (host->io_pos) { |
110 | while (fifo_offset & 3) { | 131 | while (host->io_pos < 4 && length) { |
111 | host->io_word |= buf[off++] << (8 * (fifo_offset & 3)); | 132 | host->io_word |= buf[off++] << (host->io_pos * 8); |
133 | host->io_pos++; | ||
112 | length--; | 134 | length--; |
113 | fifo_offset++; | ||
114 | } | 135 | } |
115 | if (!(fifo_offset & 3)) { | ||
116 | writel(host->io_word, sock->addr + SOCK_FIFO_ACCESS | ||
117 | + fifo_offset - 4); | ||
118 | |||
119 | host->cmd_flags &= ~DATA_CARRY; | ||
120 | } | ||
121 | if (!length) | ||
122 | return; | ||
123 | } | 136 | } |
124 | 137 | ||
125 | do { | 138 | if (host->io_pos == 4 |
126 | cnt = 4; | 139 | && !(TIFM_MS_STAT_FUL & readl(sock->addr + SOCK_MS_STATUS))) { |
140 | writel(TIFM_MS_SYS_FDIR | readl(sock->addr + SOCK_MS_SYSTEM), | ||
141 | sock->addr + SOCK_MS_SYSTEM); | ||
142 | writel(host->io_word, sock->addr + SOCK_MS_DATA); | ||
143 | host->io_pos = 0; | ||
127 | host->io_word = 0; | 144 | host->io_word = 0; |
128 | while (length && cnt) { | 145 | } else if (host->io_pos) { |
129 | host->io_word |= buf[off++] << (4 - cnt); | 146 | return off; |
130 | cnt--; | 147 | } |
131 | length--; | ||
132 | } | ||
133 | fifo_offset += 4 - cnt; | ||
134 | if (!cnt) | ||
135 | writel(host->io_word, sock->addr + SOCK_FIFO_ACCESS | ||
136 | + fifo_offset - 4); | ||
137 | |||
138 | } while (length); | ||
139 | |||
140 | if (cnt) | ||
141 | host->cmd_flags |= DATA_CARRY; | ||
142 | 148 | ||
143 | kunmap_atomic(buf - page_off, KM_BIO_SRC_IRQ); | 149 | if (!length) |
144 | } | 150 | return off; |
145 | 151 | ||
146 | static void tifm_ms_move_block(struct tifm_ms *host, unsigned int length) | 152 | while (!(TIFM_MS_STAT_FUL & readl(sock->addr + SOCK_MS_STATUS))) { |
147 | { | 153 | if (length < 4) |
148 | unsigned int t_size; | 154 | break; |
149 | unsigned int off = host->req->sg.offset + host->block_pos; | 155 | writel(TIFM_MS_SYS_FDIR | readl(sock->addr + SOCK_MS_SYSTEM), |
150 | unsigned int p_off, p_cnt; | 156 | sock->addr + SOCK_MS_SYSTEM); |
151 | struct page *pg; | 157 | __raw_writel(*(unsigned int *)(buf + off), |
152 | unsigned long flags; | 158 | sock->addr + SOCK_MS_DATA); |
159 | length -= 4; | ||
160 | off += 4; | ||
161 | } | ||
153 | 162 | ||
154 | dev_dbg(&host->dev->dev, "moving block\n"); | 163 | switch (length) { |
155 | local_irq_save(flags); | 164 | case 3: |
156 | t_size = length; | 165 | host->io_word |= buf[off + 2] << 16; |
157 | while (t_size) { | 166 | host->io_pos++; |
158 | pg = nth_page(sg_page(&host->req->sg), off >> PAGE_SHIFT); | 167 | case 2: |
159 | p_off = offset_in_page(off); | 168 | host->io_word |= buf[off + 1] << 8; |
160 | p_cnt = PAGE_SIZE - p_off; | 169 | host->io_pos++; |
161 | p_cnt = min(p_cnt, t_size); | 170 | case 1: |
171 | host->io_word |= buf[off]; | ||
172 | host->io_pos++; | ||
173 | } | ||
162 | 174 | ||
163 | if (host->req->data_dir == WRITE) | 175 | off += host->io_pos; |
164 | tifm_ms_write_fifo(host, length - t_size, | ||
165 | pg, p_off, p_cnt); | ||
166 | else | ||
167 | tifm_ms_read_fifo(host, length - t_size, | ||
168 | pg, p_off, p_cnt); | ||
169 | 176 | ||
170 | t_size -= p_cnt; | 177 | return off; |
171 | } | ||
172 | local_irq_restore(flags); | ||
173 | } | 178 | } |
174 | 179 | ||
175 | static int tifm_ms_transfer_data(struct tifm_ms *host, int skip) | 180 | static unsigned int tifm_ms_transfer_data(struct tifm_ms *host) |
176 | { | 181 | { |
177 | struct tifm_dev *sock = host->dev; | 182 | struct tifm_dev *sock = host->dev; |
178 | unsigned int length = host->req->sg.length - host->block_pos; | 183 | unsigned int length; |
184 | unsigned int off; | ||
185 | unsigned int t_size, p_off, p_cnt; | ||
186 | unsigned char *buf; | ||
187 | struct page *pg; | ||
188 | unsigned long flags = 0; | ||
189 | |||
190 | if (host->req->long_data) { | ||
191 | length = host->req->sg.length - host->block_pos; | ||
192 | off = host->req->sg.offset + host->block_pos; | ||
193 | } else { | ||
194 | length = host->req->data_len - host->block_pos; | ||
195 | off = 0; | ||
196 | } | ||
197 | dev_dbg(&sock->dev, "fifo data transfer, %d, %d\n", length, | ||
198 | host->block_pos); | ||
199 | |||
200 | while (length) { | ||
201 | if (host->req->long_data) { | ||
202 | pg = nth_page(sg_page(&host->req->sg), | ||
203 | off >> PAGE_SHIFT); | ||
204 | p_off = offset_in_page(off); | ||
205 | p_cnt = PAGE_SIZE - p_off; | ||
206 | p_cnt = min(p_cnt, length); | ||
207 | |||
208 | local_irq_save(flags); | ||
209 | buf = kmap_atomic(pg, KM_BIO_SRC_IRQ) + p_off; | ||
210 | } else { | ||
211 | buf = host->req->data + host->block_pos; | ||
212 | p_cnt = host->req->data_len - host->block_pos; | ||
213 | } | ||
179 | 214 | ||
180 | if (!length) | 215 | t_size = host->req->data_dir == WRITE |
181 | return 1; | 216 | ? tifm_ms_write_data(host, buf, p_cnt) |
217 | : tifm_ms_read_data(host, buf, p_cnt); | ||
182 | 218 | ||
183 | if (length > TIFM_FIFO_SIZE) | 219 | if (host->req->long_data) { |
184 | length = TIFM_FIFO_SIZE; | 220 | kunmap_atomic(buf - p_off, KM_BIO_SRC_IRQ); |
221 | local_irq_restore(flags); | ||
222 | } | ||
185 | 223 | ||
186 | if (!skip) { | 224 | if (!t_size) |
187 | tifm_ms_move_block(host, length); | 225 | break; |
188 | host->block_pos += length; | 226 | host->block_pos += t_size; |
227 | length -= t_size; | ||
228 | off += t_size; | ||
189 | } | 229 | } |
190 | 230 | ||
191 | if ((host->req->data_dir == READ) | 231 | dev_dbg(&sock->dev, "fifo data transfer, %d remaining\n", length); |
192 | && (host->block_pos == host->req->sg.length)) | 232 | if (!length && (host->req->data_dir == WRITE)) { |
193 | return 1; | 233 | if (host->io_pos) { |
194 | 234 | writel(TIFM_MS_SYS_FDIR | |
195 | writel(ilog2(length) - 2, sock->addr + SOCK_FIFO_PAGE_SIZE); | 235 | | readl(sock->addr + SOCK_MS_SYSTEM), |
196 | if (host->req->data_dir == WRITE) | 236 | sock->addr + SOCK_MS_SYSTEM); |
197 | writel((1 << 8) | TIFM_DMA_TX, sock->addr + SOCK_DMA_CONTROL); | 237 | writel(host->io_word, sock->addr + SOCK_MS_DATA); |
198 | else | 238 | } |
199 | writel((1 << 8), sock->addr + SOCK_DMA_CONTROL); | 239 | writel(TIFM_MS_SYS_FDIR |
240 | | readl(sock->addr + SOCK_MS_SYSTEM), | ||
241 | sock->addr + SOCK_MS_SYSTEM); | ||
242 | writel(0, sock->addr + SOCK_MS_DATA); | ||
243 | } else { | ||
244 | readl(sock->addr + SOCK_MS_DATA); | ||
245 | } | ||
200 | 246 | ||
201 | return 0; | 247 | return length; |
202 | } | 248 | } |
203 | 249 | ||
204 | static int tifm_ms_issue_cmd(struct tifm_ms *host) | 250 | static int tifm_ms_issue_cmd(struct tifm_ms *host) |
205 | { | 251 | { |
206 | struct tifm_dev *sock = host->dev; | 252 | struct tifm_dev *sock = host->dev; |
207 | unsigned char *data; | 253 | unsigned char *data; |
208 | unsigned int data_len = 0, cmd = 0, cmd_mask = 0, cnt, tval = 0; | 254 | unsigned int data_len, cmd, sys_param; |
209 | 255 | ||
210 | host->cmd_flags = 0; | 256 | host->cmd_flags = 0; |
257 | host->block_pos = 0; | ||
258 | host->io_pos = 0; | ||
259 | host->io_word = 0; | ||
260 | host->cmd_flags = 0; | ||
211 | 261 | ||
212 | if (host->req->io_type == MEMSTICK_IO_SG) { | 262 | data = host->req->data; |
213 | if (!host->no_dma) { | ||
214 | if (1 != tifm_map_sg(sock, &host->req->sg, 1, | ||
215 | host->req->data_dir == READ | ||
216 | ? PCI_DMA_FROMDEVICE | ||
217 | : PCI_DMA_TODEVICE)) { | ||
218 | host->req->error = -ENOMEM; | ||
219 | return host->req->error; | ||
220 | } | ||
221 | data_len = sg_dma_len(&host->req->sg); | ||
222 | } else | ||
223 | data_len = host->req->sg.length; | ||
224 | |||
225 | writel(TIFM_FIFO_INT_SETALL, | ||
226 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); | ||
227 | writel(TIFM_FIFO_ENABLE, | ||
228 | sock->addr + SOCK_FIFO_CONTROL); | ||
229 | writel(TIFM_FIFO_INTMASK, | ||
230 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); | ||
231 | 263 | ||
232 | if (!host->no_dma) { | 264 | host->use_dma = !no_dma; |
233 | writel(ilog2(data_len) - 2, | ||
234 | sock->addr + SOCK_FIFO_PAGE_SIZE); | ||
235 | writel(sg_dma_address(&host->req->sg), | ||
236 | sock->addr + SOCK_DMA_ADDRESS); | ||
237 | if (host->req->data_dir == WRITE) | ||
238 | writel((1 << 8) | TIFM_DMA_TX | TIFM_DMA_EN, | ||
239 | sock->addr + SOCK_DMA_CONTROL); | ||
240 | else | ||
241 | writel((1 << 8) | TIFM_DMA_EN, | ||
242 | sock->addr + SOCK_DMA_CONTROL); | ||
243 | } else { | ||
244 | tifm_ms_transfer_data(host, | ||
245 | host->req->data_dir == READ); | ||
246 | } | ||
247 | 265 | ||
248 | cmd_mask = readl(sock->addr + SOCK_MS_SYSTEM); | 266 | if (host->req->long_data) { |
249 | cmd_mask |= TIFM_MS_SYS_DATA | TIFM_MS_SYS_NOT_RDY; | 267 | data_len = host->req->sg.length; |
250 | writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM); | 268 | if (!is_power_of_2(data_len)) |
251 | } else if (host->req->io_type == MEMSTICK_IO_VAL) { | 269 | host->use_dma = 0; |
252 | data = host->req->data; | 270 | } else { |
253 | data_len = host->req->data_len; | 271 | data_len = host->req->data_len; |
272 | host->use_dma = 0; | ||
273 | } | ||
254 | 274 | ||
255 | cmd_mask = host->mode_mask | 0x2607; /* unknown constant */ | 275 | writel(TIFM_FIFO_INT_SETALL, |
256 | 276 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); | |
257 | if (host->req->data_dir == WRITE) { | 277 | writel(TIFM_FIFO_ENABLE, |
258 | cmd_mask |= TIFM_MS_SYS_LATCH; | 278 | sock->addr + SOCK_FIFO_CONTROL); |
259 | writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM); | 279 | |
260 | for (cnt = 0; (data_len - cnt) >= 4; cnt += 4) { | 280 | if (host->use_dma) { |
261 | writel(TIFM_MS_SYS_LATCH | 281 | if (1 != tifm_map_sg(sock, &host->req->sg, 1, |
262 | | readl(sock->addr + SOCK_MS_SYSTEM), | 282 | host->req->data_dir == READ |
263 | sock->addr + SOCK_MS_SYSTEM); | 283 | ? PCI_DMA_FROMDEVICE |
264 | __raw_writel(*(unsigned int *)(data + cnt), | 284 | : PCI_DMA_TODEVICE)) { |
265 | sock->addr + SOCK_MS_DATA); | 285 | host->req->error = -ENOMEM; |
266 | dev_dbg(&sock->dev, "writing %x\n", | 286 | return host->req->error; |
267 | *(int *)(data + cnt)); | 287 | } |
268 | } | 288 | data_len = sg_dma_len(&host->req->sg); |
269 | switch (data_len - cnt) { | ||
270 | case 3: | ||
271 | tval |= data[cnt + 2] << 16; | ||
272 | case 2: | ||
273 | tval |= data[cnt + 1] << 8; | ||
274 | case 1: | ||
275 | tval |= data[cnt]; | ||
276 | writel(TIFM_MS_SYS_LATCH | ||
277 | | readl(sock->addr + SOCK_MS_SYSTEM), | ||
278 | sock->addr + SOCK_MS_SYSTEM); | ||
279 | writel(tval, sock->addr + SOCK_MS_DATA); | ||
280 | dev_dbg(&sock->dev, "writing %x\n", tval); | ||
281 | } | ||
282 | 289 | ||
283 | writel(TIFM_MS_SYS_LATCH | 290 | writel(ilog2(data_len) - 2, |
284 | | readl(sock->addr + SOCK_MS_SYSTEM), | 291 | sock->addr + SOCK_FIFO_PAGE_SIZE); |
285 | sock->addr + SOCK_MS_SYSTEM); | 292 | writel(TIFM_FIFO_INTMASK, |
286 | writel(0, sock->addr + SOCK_MS_DATA); | 293 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); |
287 | dev_dbg(&sock->dev, "writing %x\n", 0); | 294 | sys_param = TIFM_DMA_EN | (1 << 8); |
295 | if (host->req->data_dir == WRITE) | ||
296 | sys_param |= TIFM_DMA_TX; | ||
297 | |||
298 | writel(TIFM_FIFO_INTMASK, | ||
299 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); | ||
288 | 300 | ||
289 | } else | 301 | writel(sg_dma_address(&host->req->sg), |
290 | writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM); | 302 | sock->addr + SOCK_DMA_ADDRESS); |
303 | writel(sys_param, sock->addr + SOCK_DMA_CONTROL); | ||
304 | } else { | ||
305 | writel(host->mode_mask | TIFM_MS_SYS_FIFO, | ||
306 | sock->addr + SOCK_MS_SYSTEM); | ||
291 | 307 | ||
292 | cmd_mask = readl(sock->addr + SOCK_MS_SYSTEM); | 308 | writel(TIFM_FIFO_MORE, |
293 | cmd_mask &= ~TIFM_MS_SYS_DATA; | 309 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); |
294 | cmd_mask |= TIFM_MS_SYS_NOT_RDY; | 310 | } |
295 | dev_dbg(&sock->dev, "mask %x\n", cmd_mask); | ||
296 | writel(cmd_mask, sock->addr + SOCK_MS_SYSTEM); | ||
297 | } else | ||
298 | BUG(); | ||
299 | 311 | ||
300 | mod_timer(&host->timer, jiffies + host->timeout_jiffies); | 312 | mod_timer(&host->timer, jiffies + host->timeout_jiffies); |
301 | writel(TIFM_CTRL_LED | readl(sock->addr + SOCK_CONTROL), | 313 | writel(TIFM_CTRL_LED | readl(sock->addr + SOCK_CONTROL), |
302 | sock->addr + SOCK_CONTROL); | 314 | sock->addr + SOCK_CONTROL); |
303 | host->req->error = 0; | 315 | host->req->error = 0; |
304 | 316 | ||
317 | sys_param = readl(sock->addr + SOCK_MS_SYSTEM); | ||
318 | sys_param |= TIFM_MS_SYS_INTCLR; | ||
319 | |||
320 | if (host->use_dma) | ||
321 | sys_param |= TIFM_MS_SYS_DMA; | ||
322 | else | ||
323 | sys_param &= ~TIFM_MS_SYS_DMA; | ||
324 | |||
325 | writel(sys_param, sock->addr + SOCK_MS_SYSTEM); | ||
326 | |||
305 | cmd = (host->req->tpc & 0xf) << 12; | 327 | cmd = (host->req->tpc & 0xf) << 12; |
306 | cmd |= data_len; | 328 | cmd |= data_len; |
307 | writel(cmd, sock->addr + SOCK_MS_COMMAND); | 329 | writel(cmd, sock->addr + SOCK_MS_COMMAND); |
308 | 330 | ||
309 | dev_dbg(&sock->dev, "executing TPC %x, %x\n", cmd, cmd_mask); | 331 | dev_dbg(&sock->dev, "executing TPC %x, %x\n", cmd, sys_param); |
310 | return 0; | 332 | return 0; |
311 | } | 333 | } |
312 | 334 | ||
@@ -314,47 +336,20 @@ static void tifm_ms_complete_cmd(struct tifm_ms *host) | |||
314 | { | 336 | { |
315 | struct tifm_dev *sock = host->dev; | 337 | struct tifm_dev *sock = host->dev; |
316 | struct memstick_host *msh = tifm_get_drvdata(sock); | 338 | struct memstick_host *msh = tifm_get_drvdata(sock); |
317 | unsigned int tval = 0, data_len; | ||
318 | unsigned char *data; | ||
319 | int rc; | 339 | int rc; |
320 | 340 | ||
321 | del_timer(&host->timer); | 341 | del_timer(&host->timer); |
322 | if (host->req->io_type == MEMSTICK_IO_SG) { | ||
323 | if (!host->no_dma) | ||
324 | tifm_unmap_sg(sock, &host->req->sg, 1, | ||
325 | host->req->data_dir == READ | ||
326 | ? PCI_DMA_FROMDEVICE | ||
327 | : PCI_DMA_TODEVICE); | ||
328 | } else if (host->req->io_type == MEMSTICK_IO_VAL) { | ||
329 | writel(~TIFM_MS_SYS_DATA & readl(sock->addr + SOCK_MS_SYSTEM), | ||
330 | sock->addr + SOCK_MS_SYSTEM); | ||
331 | |||
332 | data = host->req->data; | ||
333 | data_len = host->req->data_len; | ||
334 | 342 | ||
335 | if (host->req->data_dir == READ) { | 343 | if (host->use_dma) |
336 | for (rc = 0; (data_len - rc) >= 4; rc += 4) | 344 | tifm_unmap_sg(sock, &host->req->sg, 1, |
337 | *(int *)(data + rc) | 345 | host->req->data_dir == READ |
338 | = __raw_readl(sock->addr | 346 | ? PCI_DMA_FROMDEVICE |
339 | + SOCK_MS_DATA); | 347 | : PCI_DMA_TODEVICE); |
340 | |||
341 | if (data_len - rc) | ||
342 | tval = readl(sock->addr + SOCK_MS_DATA); | ||
343 | switch (data_len - rc) { | ||
344 | case 3: | ||
345 | data[rc + 2] = (tval >> 16) & 0xff; | ||
346 | case 2: | ||
347 | data[rc + 1] = (tval >> 8) & 0xff; | ||
348 | case 1: | ||
349 | data[rc] = tval & 0xff; | ||
350 | } | ||
351 | readl(sock->addr + SOCK_MS_DATA); | ||
352 | } | ||
353 | } | ||
354 | 348 | ||
355 | writel((~TIFM_CTRL_LED) & readl(sock->addr + SOCK_CONTROL), | 349 | writel((~TIFM_CTRL_LED) & readl(sock->addr + SOCK_CONTROL), |
356 | sock->addr + SOCK_CONTROL); | 350 | sock->addr + SOCK_CONTROL); |
357 | 351 | ||
352 | dev_dbg(&sock->dev, "TPC complete\n"); | ||
358 | do { | 353 | do { |
359 | rc = memstick_next_req(msh, &host->req); | 354 | rc = memstick_next_req(msh, &host->req); |
360 | } while (!rc && tifm_ms_issue_cmd(host)); | 355 | } while (!rc && tifm_ms_issue_cmd(host)); |
@@ -365,11 +360,10 @@ static int tifm_ms_check_status(struct tifm_ms *host) | |||
365 | if (!host->req->error) { | 360 | if (!host->req->error) { |
366 | if (!(host->cmd_flags & CMD_READY)) | 361 | if (!(host->cmd_flags & CMD_READY)) |
367 | return 1; | 362 | return 1; |
368 | if ((host->req->io_type == MEMSTICK_IO_SG) | 363 | if (!(host->cmd_flags & FIFO_READY)) |
369 | && !(host->cmd_flags & FIFO_READY)) | ||
370 | return 1; | 364 | return 1; |
371 | if (host->req->need_card_int | 365 | if (host->req->need_card_int |
372 | && !(host->cmd_flags & CARD_READY)) | 366 | && !(host->cmd_flags & CARD_INT)) |
373 | return 1; | 367 | return 1; |
374 | } | 368 | } |
375 | return 0; | 369 | return 0; |
@@ -379,18 +373,24 @@ static int tifm_ms_check_status(struct tifm_ms *host) | |||
379 | static void tifm_ms_data_event(struct tifm_dev *sock) | 373 | static void tifm_ms_data_event(struct tifm_dev *sock) |
380 | { | 374 | { |
381 | struct tifm_ms *host; | 375 | struct tifm_ms *host; |
382 | unsigned int fifo_status = 0; | 376 | unsigned int fifo_status = 0, host_status = 0; |
383 | int rc = 1; | 377 | int rc = 1; |
384 | 378 | ||
385 | spin_lock(&sock->lock); | 379 | spin_lock(&sock->lock); |
386 | host = memstick_priv((struct memstick_host *)tifm_get_drvdata(sock)); | 380 | host = memstick_priv((struct memstick_host *)tifm_get_drvdata(sock)); |
387 | fifo_status = readl(sock->addr + SOCK_DMA_FIFO_STATUS); | 381 | fifo_status = readl(sock->addr + SOCK_DMA_FIFO_STATUS); |
388 | dev_dbg(&sock->dev, "data event: fifo_status %x, flags %x\n", | 382 | host_status = readl(sock->addr + SOCK_MS_STATUS); |
389 | fifo_status, host->cmd_flags); | 383 | dev_dbg(&sock->dev, |
384 | "data event: fifo_status %x, host_status %x, flags %x\n", | ||
385 | fifo_status, host_status, host->cmd_flags); | ||
390 | 386 | ||
391 | if (host->req) { | 387 | if (host->req) { |
392 | if (fifo_status & TIFM_FIFO_READY) { | 388 | if (host->use_dma && (fifo_status & 1)) { |
393 | if (!host->no_dma || tifm_ms_transfer_data(host, 0)) { | 389 | host->cmd_flags |= FIFO_READY; |
390 | rc = tifm_ms_check_status(host); | ||
391 | } | ||
392 | if (!host->use_dma && (fifo_status & TIFM_FIFO_MORE)) { | ||
393 | if (!tifm_ms_transfer_data(host)) { | ||
394 | host->cmd_flags |= FIFO_READY; | 394 | host->cmd_flags |= FIFO_READY; |
395 | rc = tifm_ms_check_status(host); | 395 | rc = tifm_ms_check_status(host); |
396 | } | 396 | } |
@@ -419,9 +419,9 @@ static void tifm_ms_card_event(struct tifm_dev *sock) | |||
419 | host_status, host->cmd_flags); | 419 | host_status, host->cmd_flags); |
420 | 420 | ||
421 | if (host->req) { | 421 | if (host->req) { |
422 | if (host_status & TIFM_MS_TIMEOUT) | 422 | if (host_status & TIFM_MS_STAT_TOE) |
423 | host->req->error = -ETIME; | 423 | host->req->error = -ETIME; |
424 | else if (host_status & TIFM_MS_BADCRC) | 424 | else if (host_status & TIFM_MS_STAT_CRC) |
425 | host->req->error = -EILSEQ; | 425 | host->req->error = -EILSEQ; |
426 | 426 | ||
427 | if (host->req->error) { | 427 | if (host->req->error) { |
@@ -430,18 +430,17 @@ static void tifm_ms_card_event(struct tifm_dev *sock) | |||
430 | writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL); | 430 | writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL); |
431 | } | 431 | } |
432 | 432 | ||
433 | if (host_status & TIFM_MS_EOTPC) | 433 | if (host_status & TIFM_MS_STAT_RDY) |
434 | host->cmd_flags |= CMD_READY; | 434 | host->cmd_flags |= CMD_READY; |
435 | if (host_status & TIFM_MS_INT) | 435 | |
436 | host->cmd_flags |= CARD_READY; | 436 | if (host_status & TIFM_MS_STAT_MSINT) |
437 | host->cmd_flags |= CARD_INT; | ||
437 | 438 | ||
438 | rc = tifm_ms_check_status(host); | 439 | rc = tifm_ms_check_status(host); |
439 | 440 | ||
440 | } | 441 | } |
441 | 442 | ||
442 | writel(TIFM_MS_SYS_NOT_RDY | readl(sock->addr + SOCK_MS_SYSTEM), | 443 | writel(TIFM_MS_SYS_INTCLR | readl(sock->addr + SOCK_MS_SYSTEM), |
443 | sock->addr + SOCK_MS_SYSTEM); | ||
444 | writel((~TIFM_MS_SYS_DATA) & readl(sock->addr + SOCK_MS_SYSTEM), | ||
445 | sock->addr + SOCK_MS_SYSTEM); | 444 | sock->addr + SOCK_MS_SYSTEM); |
446 | 445 | ||
447 | if (!rc) | 446 | if (!rc) |
@@ -497,15 +496,26 @@ static void tifm_ms_set_param(struct memstick_host *msh, | |||
497 | 496 | ||
498 | switch (param) { | 497 | switch (param) { |
499 | case MEMSTICK_POWER: | 498 | case MEMSTICK_POWER: |
500 | /* this is set by card detection mechanism */ | 499 | /* also affected by media detection mechanism */ |
500 | if (value == MEMSTICK_POWER_ON) { | ||
501 | host->mode_mask = TIFM_MS_SYS_SRAC | TIFM_MS_SYS_REI; | ||
502 | writel(TIFM_MS_SYS_RESET, sock->addr + SOCK_MS_SYSTEM); | ||
503 | writel(TIFM_MS_SYS_FCLR | TIFM_MS_SYS_INTCLR, | ||
504 | sock->addr + SOCK_MS_SYSTEM); | ||
505 | writel(0xffffffff, sock->addr + SOCK_MS_STATUS); | ||
506 | } else if (value == MEMSTICK_POWER_OFF) { | ||
507 | writel(TIFM_MS_SYS_FCLR | TIFM_MS_SYS_INTCLR, | ||
508 | sock->addr + SOCK_MS_SYSTEM); | ||
509 | writel(0xffffffff, sock->addr + SOCK_MS_STATUS); | ||
510 | } | ||
501 | break; | 511 | break; |
502 | case MEMSTICK_INTERFACE: | 512 | case MEMSTICK_INTERFACE: |
503 | if (value == MEMSTICK_SERIAL) { | 513 | if (value == MEMSTICK_SERIAL) { |
504 | host->mode_mask = TIFM_MS_SERIAL; | 514 | host->mode_mask = TIFM_MS_SYS_SRAC | TIFM_MS_SYS_REI; |
505 | writel((~TIFM_CTRL_FAST_CLK) | 515 | writel((~TIFM_CTRL_FAST_CLK) |
506 | & readl(sock->addr + SOCK_CONTROL), | 516 | & readl(sock->addr + SOCK_CONTROL), |
507 | sock->addr + SOCK_CONTROL); | 517 | sock->addr + SOCK_CONTROL); |
508 | } else if (value == MEMSTICK_PARALLEL) { | 518 | } else if (value == MEMSTICK_PAR4) { |
509 | host->mode_mask = 0; | 519 | host->mode_mask = 0; |
510 | writel(TIFM_CTRL_FAST_CLK | 520 | writel(TIFM_CTRL_FAST_CLK |
511 | | readl(sock->addr + SOCK_CONTROL), | 521 | | readl(sock->addr + SOCK_CONTROL), |
@@ -532,21 +542,6 @@ static void tifm_ms_abort(unsigned long data) | |||
532 | tifm_eject(host->dev); | 542 | tifm_eject(host->dev); |
533 | } | 543 | } |
534 | 544 | ||
535 | static int tifm_ms_initialize_host(struct tifm_ms *host) | ||
536 | { | ||
537 | struct tifm_dev *sock = host->dev; | ||
538 | struct memstick_host *msh = tifm_get_drvdata(sock); | ||
539 | |||
540 | host->mode_mask = TIFM_MS_SERIAL; | ||
541 | writel(0x8000, sock->addr + SOCK_MS_SYSTEM); | ||
542 | writel(0x0200 | TIFM_MS_SYS_NOT_RDY, sock->addr + SOCK_MS_SYSTEM); | ||
543 | writel(0xffffffff, sock->addr + SOCK_MS_STATUS); | ||
544 | if (tifm_has_ms_pif(sock)) | ||
545 | msh->caps |= MEMSTICK_CAP_PARALLEL; | ||
546 | |||
547 | return 0; | ||
548 | } | ||
549 | |||
550 | static int tifm_ms_probe(struct tifm_dev *sock) | 545 | static int tifm_ms_probe(struct tifm_dev *sock) |
551 | { | 546 | { |
552 | struct memstick_host *msh; | 547 | struct memstick_host *msh; |
@@ -568,7 +563,6 @@ static int tifm_ms_probe(struct tifm_dev *sock) | |||
568 | tifm_set_drvdata(sock, msh); | 563 | tifm_set_drvdata(sock, msh); |
569 | host->dev = sock; | 564 | host->dev = sock; |
570 | host->timeout_jiffies = msecs_to_jiffies(1000); | 565 | host->timeout_jiffies = msecs_to_jiffies(1000); |
571 | host->no_dma = no_dma; | ||
572 | 566 | ||
573 | setup_timer(&host->timer, tifm_ms_abort, (unsigned long)host); | 567 | setup_timer(&host->timer, tifm_ms_abort, (unsigned long)host); |
574 | 568 | ||
@@ -576,10 +570,10 @@ static int tifm_ms_probe(struct tifm_dev *sock) | |||
576 | msh->set_param = tifm_ms_set_param; | 570 | msh->set_param = tifm_ms_set_param; |
577 | sock->card_event = tifm_ms_card_event; | 571 | sock->card_event = tifm_ms_card_event; |
578 | sock->data_event = tifm_ms_data_event; | 572 | sock->data_event = tifm_ms_data_event; |
579 | rc = tifm_ms_initialize_host(host); | 573 | if (tifm_has_ms_pif(sock)) |
574 | msh->caps |= MEMSTICK_CAP_PAR4; | ||
580 | 575 | ||
581 | if (!rc) | 576 | rc = memstick_add_host(msh); |
582 | rc = memstick_add_host(msh); | ||
583 | if (!rc) | 577 | if (!rc) |
584 | return 0; | 578 | return 0; |
585 | 579 | ||
@@ -601,7 +595,7 @@ static void tifm_ms_remove(struct tifm_dev *sock) | |||
601 | writel(TIFM_FIFO_INT_SETALL, | 595 | writel(TIFM_FIFO_INT_SETALL, |
602 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); | 596 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); |
603 | writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL); | 597 | writel(TIFM_DMA_RESET, sock->addr + SOCK_DMA_CONTROL); |
604 | if ((host->req->io_type == MEMSTICK_IO_SG) && !host->no_dma) | 598 | if (host->use_dma) |
605 | tifm_unmap_sg(sock, &host->req->sg, 1, | 599 | tifm_unmap_sg(sock, &host->req->sg, 1, |
606 | host->req->data_dir == READ | 600 | host->req->data_dir == READ |
607 | ? PCI_DMA_TODEVICE | 601 | ? PCI_DMA_TODEVICE |
@@ -617,10 +611,6 @@ static void tifm_ms_remove(struct tifm_dev *sock) | |||
617 | spin_unlock_irqrestore(&sock->lock, flags); | 611 | spin_unlock_irqrestore(&sock->lock, flags); |
618 | 612 | ||
619 | memstick_remove_host(msh); | 613 | memstick_remove_host(msh); |
620 | |||
621 | writel(0x0200 | TIFM_MS_SYS_NOT_RDY, sock->addr + SOCK_MS_SYSTEM); | ||
622 | writel(0xffffffff, sock->addr + SOCK_MS_STATUS); | ||
623 | |||
624 | memstick_free_host(msh); | 614 | memstick_free_host(msh); |
625 | } | 615 | } |
626 | 616 | ||
@@ -628,17 +618,17 @@ static void tifm_ms_remove(struct tifm_dev *sock) | |||
628 | 618 | ||
629 | static int tifm_ms_suspend(struct tifm_dev *sock, pm_message_t state) | 619 | static int tifm_ms_suspend(struct tifm_dev *sock, pm_message_t state) |
630 | { | 620 | { |
621 | struct memstick_host *msh = tifm_get_drvdata(sock); | ||
622 | |||
623 | memstick_suspend_host(msh); | ||
631 | return 0; | 624 | return 0; |
632 | } | 625 | } |
633 | 626 | ||
634 | static int tifm_ms_resume(struct tifm_dev *sock) | 627 | static int tifm_ms_resume(struct tifm_dev *sock) |
635 | { | 628 | { |
636 | struct memstick_host *msh = tifm_get_drvdata(sock); | 629 | struct memstick_host *msh = tifm_get_drvdata(sock); |
637 | struct tifm_ms *host = memstick_priv(msh); | ||
638 | |||
639 | tifm_ms_initialize_host(host); | ||
640 | memstick_detect_change(msh); | ||
641 | 630 | ||
631 | memstick_resume_host(msh); | ||
642 | return 0; | 632 | return 0; |
643 | } | 633 | } |
644 | 634 | ||
@@ -679,7 +669,6 @@ MODULE_AUTHOR("Alex Dubov"); | |||
679 | MODULE_DESCRIPTION("TI FlashMedia MemoryStick driver"); | 669 | MODULE_DESCRIPTION("TI FlashMedia MemoryStick driver"); |
680 | MODULE_LICENSE("GPL"); | 670 | MODULE_LICENSE("GPL"); |
681 | MODULE_DEVICE_TABLE(tifm, tifm_ms_id_tbl); | 671 | MODULE_DEVICE_TABLE(tifm, tifm_ms_id_tbl); |
682 | MODULE_VERSION(DRIVER_VERSION); | ||
683 | 672 | ||
684 | module_init(tifm_ms_init); | 673 | module_init(tifm_ms_init); |
685 | module_exit(tifm_ms_exit); | 674 | module_exit(tifm_ms_exit); |
diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 982e27b86d10..962817e49fba 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig | |||
@@ -108,6 +108,7 @@ config ACER_WMI | |||
108 | depends on ACPI | 108 | depends on ACPI |
109 | depends on LEDS_CLASS | 109 | depends on LEDS_CLASS |
110 | depends on BACKLIGHT_CLASS_DEVICE | 110 | depends on BACKLIGHT_CLASS_DEVICE |
111 | depends on SERIO_I8042 | ||
111 | select ACPI_WMI | 112 | select ACPI_WMI |
112 | ---help--- | 113 | ---help--- |
113 | This is a driver for newer Acer (and Wistron) laptops. It adds | 114 | This is a driver for newer Acer (and Wistron) laptops. It adds |
diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c index 74d12b4a3abd..dd13a3749927 100644 --- a/drivers/misc/acer-wmi.c +++ b/drivers/misc/acer-wmi.c | |||
@@ -219,6 +219,15 @@ static struct dmi_system_id acer_quirks[] = { | |||
219 | }, | 219 | }, |
220 | { | 220 | { |
221 | .callback = dmi_matched, | 221 | .callback = dmi_matched, |
222 | .ident = "Acer Aspire 3610", | ||
223 | .matches = { | ||
224 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
225 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 3610"), | ||
226 | }, | ||
227 | .driver_data = &quirk_acer_travelmate_2490, | ||
228 | }, | ||
229 | { | ||
230 | .callback = dmi_matched, | ||
222 | .ident = "Acer Aspire 5100", | 231 | .ident = "Acer Aspire 5100", |
223 | .matches = { | 232 | .matches = { |
224 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 233 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
@@ -228,6 +237,15 @@ static struct dmi_system_id acer_quirks[] = { | |||
228 | }, | 237 | }, |
229 | { | 238 | { |
230 | .callback = dmi_matched, | 239 | .callback = dmi_matched, |
240 | .ident = "Acer Aspire 5610", | ||
241 | .matches = { | ||
242 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | ||
243 | DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5610"), | ||
244 | }, | ||
245 | .driver_data = &quirk_acer_travelmate_2490, | ||
246 | }, | ||
247 | { | ||
248 | .callback = dmi_matched, | ||
231 | .ident = "Acer Aspire 5630", | 249 | .ident = "Acer Aspire 5630", |
232 | .matches = { | 250 | .matches = { |
233 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), | 251 | DMI_MATCH(DMI_SYS_VENDOR, "Acer"), |
@@ -761,11 +779,11 @@ enum led_brightness value) | |||
761 | } | 779 | } |
762 | 780 | ||
763 | static struct led_classdev mail_led = { | 781 | static struct led_classdev mail_led = { |
764 | .name = "acer-mail:green", | 782 | .name = "acer-wmi::mail", |
765 | .brightness_set = mail_led_set, | 783 | .brightness_set = mail_led_set, |
766 | }; | 784 | }; |
767 | 785 | ||
768 | static int __init acer_led_init(struct device *dev) | 786 | static int __devinit acer_led_init(struct device *dev) |
769 | { | 787 | { |
770 | return led_classdev_register(dev, &mail_led); | 788 | return led_classdev_register(dev, &mail_led); |
771 | } | 789 | } |
@@ -798,7 +816,7 @@ static struct backlight_ops acer_bl_ops = { | |||
798 | .update_status = update_bl_status, | 816 | .update_status = update_bl_status, |
799 | }; | 817 | }; |
800 | 818 | ||
801 | static int __init acer_backlight_init(struct device *dev) | 819 | static int __devinit acer_backlight_init(struct device *dev) |
802 | { | 820 | { |
803 | struct backlight_device *bd; | 821 | struct backlight_device *bd; |
804 | 822 | ||
@@ -817,7 +835,7 @@ static int __init acer_backlight_init(struct device *dev) | |||
817 | return 0; | 835 | return 0; |
818 | } | 836 | } |
819 | 837 | ||
820 | static void __exit acer_backlight_exit(void) | 838 | static void acer_backlight_exit(void) |
821 | { | 839 | { |
822 | backlight_device_unregister(acer_backlight_device); | 840 | backlight_device_unregister(acer_backlight_device); |
823 | } | 841 | } |
@@ -1052,11 +1070,12 @@ static int __init acer_wmi_init(void) | |||
1052 | 1070 | ||
1053 | if (wmi_has_guid(WMID_GUID2) && interface) { | 1071 | if (wmi_has_guid(WMID_GUID2) && interface) { |
1054 | if (ACPI_FAILURE(WMID_set_capabilities())) { | 1072 | if (ACPI_FAILURE(WMID_set_capabilities())) { |
1055 | printk(ACER_ERR "Unable to detect available devices\n"); | 1073 | printk(ACER_ERR "Unable to detect available WMID " |
1074 | "devices\n"); | ||
1056 | return -ENODEV; | 1075 | return -ENODEV; |
1057 | } | 1076 | } |
1058 | } else if (!wmi_has_guid(WMID_GUID2) && interface) { | 1077 | } else if (!wmi_has_guid(WMID_GUID2) && interface) { |
1059 | printk(ACER_ERR "Unable to detect available devices\n"); | 1078 | printk(ACER_ERR "No WMID device detection method found\n"); |
1060 | return -ENODEV; | 1079 | return -ENODEV; |
1061 | } | 1080 | } |
1062 | 1081 | ||
@@ -1064,21 +1083,20 @@ static int __init acer_wmi_init(void) | |||
1064 | interface = &AMW0_interface; | 1083 | interface = &AMW0_interface; |
1065 | 1084 | ||
1066 | if (ACPI_FAILURE(AMW0_set_capabilities())) { | 1085 | if (ACPI_FAILURE(AMW0_set_capabilities())) { |
1067 | printk(ACER_ERR "Unable to detect available devices\n"); | 1086 | printk(ACER_ERR "Unable to detect available AMW0 " |
1087 | "devices\n"); | ||
1068 | return -ENODEV; | 1088 | return -ENODEV; |
1069 | } | 1089 | } |
1070 | } | 1090 | } |
1071 | 1091 | ||
1072 | if (wmi_has_guid(AMW0_GUID1)) { | 1092 | if (wmi_has_guid(AMW0_GUID1)) |
1073 | if (ACPI_FAILURE(AMW0_find_mailled())) | 1093 | AMW0_find_mailled(); |
1074 | printk(ACER_ERR "Unable to detect mail LED\n"); | ||
1075 | } | ||
1076 | 1094 | ||
1077 | find_quirks(); | 1095 | find_quirks(); |
1078 | 1096 | ||
1079 | if (!interface) { | 1097 | if (!interface) { |
1080 | printk(ACER_ERR "No or unsupported WMI interface, unable to "); | 1098 | printk(ACER_ERR "No or unsupported WMI interface, unable to " |
1081 | printk(KERN_CONT "load.\n"); | 1099 | "load\n"); |
1082 | return -ENODEV; | 1100 | return -ENODEV; |
1083 | } | 1101 | } |
1084 | 1102 | ||
diff --git a/drivers/misc/sony-laptop.c b/drivers/misc/sony-laptop.c index 899e3f75f288..02ff3d19b1cc 100644 --- a/drivers/misc/sony-laptop.c +++ b/drivers/misc/sony-laptop.c | |||
@@ -315,7 +315,7 @@ static void sony_laptop_report_input_event(u8 event) | |||
315 | break; | 315 | break; |
316 | 316 | ||
317 | default: | 317 | default: |
318 | if (event > ARRAY_SIZE(sony_laptop_input_index)) { | 318 | if (event >= ARRAY_SIZE(sony_laptop_input_index)) { |
319 | dprintk("sony_laptop_report_input_event, event not known: %d\n", event); | 319 | dprintk("sony_laptop_report_input_event, event not known: %d\n", event); |
320 | break; | 320 | break; |
321 | } | 321 | } |
diff --git a/drivers/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index 63a089b29545..67503ea71d21 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c | |||
@@ -368,6 +368,8 @@ static int tifm_7xx1_probe(struct pci_dev *dev, | |||
368 | goto err_out_irq; | 368 | goto err_out_irq; |
369 | 369 | ||
370 | writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1), | 370 | writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1), |
371 | fm->addr + FM_CLEAR_INTERRUPT_ENABLE); | ||
372 | writel(TIFM_IRQ_ENABLE | TIFM_IRQ_SOCKMASK((1 << fm->num_sockets) - 1), | ||
371 | fm->addr + FM_SET_INTERRUPT_ENABLE); | 373 | fm->addr + FM_SET_INTERRUPT_ENABLE); |
372 | return 0; | 374 | return 0; |
373 | 375 | ||
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index 20d5c7bd940a..1c14a186f000 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c | |||
@@ -180,7 +180,7 @@ static void tifm_sd_transfer_data(struct tifm_sd *host) | |||
180 | host->sg_pos++; | 180 | host->sg_pos++; |
181 | if (host->sg_pos == host->sg_len) { | 181 | if (host->sg_pos == host->sg_len) { |
182 | if ((r_data->flags & MMC_DATA_WRITE) | 182 | if ((r_data->flags & MMC_DATA_WRITE) |
183 | && DATA_CARRY) | 183 | && (host->cmd_flags & DATA_CARRY)) |
184 | writel(host->bounce_buf_data[0], | 184 | writel(host->bounce_buf_data[0], |
185 | host->dev->addr | 185 | host->dev->addr |
186 | + SOCK_MMCSD_DATA); | 186 | + SOCK_MMCSD_DATA); |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index a0f0e605d630..fe7b5ec09708 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -2366,15 +2366,15 @@ config GELIC_NET | |||
2366 | module will be called ps3_gelic. | 2366 | module will be called ps3_gelic. |
2367 | 2367 | ||
2368 | config GELIC_WIRELESS | 2368 | config GELIC_WIRELESS |
2369 | bool "PS3 Wireless support" | 2369 | bool "PS3 Wireless support" |
2370 | depends on GELIC_NET | 2370 | depends on GELIC_NET |
2371 | select WIRELESS_EXT | 2371 | select WIRELESS_EXT |
2372 | help | 2372 | help |
2373 | This option adds the support for the wireless feature of PS3. | 2373 | This option adds the support for the wireless feature of PS3. |
2374 | If you have the wireless-less model of PS3 or have no plan to | 2374 | If you have the wireless-less model of PS3 or have no plan to |
2375 | use wireless feature, disabling this option saves memory. As | 2375 | use wireless feature, disabling this option saves memory. As |
2376 | the driver automatically distinguishes the models, you can | 2376 | the driver automatically distinguishes the models, you can |
2377 | safely enable this option even if you have a wireless-less model. | 2377 | safely enable this option even if you have a wireless-less model. |
2378 | 2378 | ||
2379 | config GIANFAR | 2379 | config GIANFAR |
2380 | tristate "Gianfar Ethernet" | 2380 | tristate "Gianfar Ethernet" |
@@ -2519,7 +2519,7 @@ config CHELSIO_T3 | |||
2519 | 2519 | ||
2520 | config EHEA | 2520 | config EHEA |
2521 | tristate "eHEA Ethernet support" | 2521 | tristate "eHEA Ethernet support" |
2522 | depends on IBMEBUS && INET | 2522 | depends on IBMEBUS && INET && SPARSEMEM |
2523 | select INET_LRO | 2523 | select INET_LRO |
2524 | ---help--- | 2524 | ---help--- |
2525 | This driver supports the IBM pSeries eHEA ethernet adapter. | 2525 | This driver supports the IBM pSeries eHEA ethernet adapter. |
diff --git a/drivers/net/ac3200.c b/drivers/net/ac3200.c index 5136d94923aa..b1448637107f 100644 --- a/drivers/net/ac3200.c +++ b/drivers/net/ac3200.c | |||
@@ -369,7 +369,7 @@ MODULE_PARM_DESC(mem, "Memory base address(es)"); | |||
369 | MODULE_DESCRIPTION("Ansel AC3200 EISA ethernet driver"); | 369 | MODULE_DESCRIPTION("Ansel AC3200 EISA ethernet driver"); |
370 | MODULE_LICENSE("GPL"); | 370 | MODULE_LICENSE("GPL"); |
371 | 371 | ||
372 | int __init init_module(void) | 372 | static int __init ac3200_module_init(void) |
373 | { | 373 | { |
374 | struct net_device *dev; | 374 | struct net_device *dev; |
375 | int this_dev, found = 0; | 375 | int this_dev, found = 0; |
@@ -404,8 +404,7 @@ static void cleanup_card(struct net_device *dev) | |||
404 | iounmap(ei_status.mem); | 404 | iounmap(ei_status.mem); |
405 | } | 405 | } |
406 | 406 | ||
407 | void __exit | 407 | static void __exit ac3200_module_exit(void) |
408 | cleanup_module(void) | ||
409 | { | 408 | { |
410 | int this_dev; | 409 | int this_dev; |
411 | 410 | ||
@@ -418,4 +417,6 @@ cleanup_module(void) | |||
418 | } | 417 | } |
419 | } | 418 | } |
420 | } | 419 | } |
420 | module_init(ac3200_module_init); | ||
421 | module_exit(ac3200_module_exit); | ||
421 | #endif /* MODULE */ | 422 | #endif /* MODULE */ |
diff --git a/drivers/net/apne.c b/drivers/net/apne.c index c12cbdf368b1..47a8275d3962 100644 --- a/drivers/net/apne.c +++ b/drivers/net/apne.c | |||
@@ -569,7 +569,7 @@ static irqreturn_t apne_interrupt(int irq, void *dev_id) | |||
569 | #ifdef MODULE | 569 | #ifdef MODULE |
570 | static struct net_device *apne_dev; | 570 | static struct net_device *apne_dev; |
571 | 571 | ||
572 | int __init init_module(void) | 572 | static int __init apne_module_init(void) |
573 | { | 573 | { |
574 | apne_dev = apne_probe(-1); | 574 | apne_dev = apne_probe(-1); |
575 | if (IS_ERR(apne_dev)) | 575 | if (IS_ERR(apne_dev)) |
@@ -577,7 +577,7 @@ int __init init_module(void) | |||
577 | return 0; | 577 | return 0; |
578 | } | 578 | } |
579 | 579 | ||
580 | void __exit cleanup_module(void) | 580 | static void __exit apne_module_exit(void) |
581 | { | 581 | { |
582 | unregister_netdev(apne_dev); | 582 | unregister_netdev(apne_dev); |
583 | 583 | ||
@@ -591,7 +591,8 @@ void __exit cleanup_module(void) | |||
591 | 591 | ||
592 | free_netdev(apne_dev); | 592 | free_netdev(apne_dev); |
593 | } | 593 | } |
594 | 594 | module_init(apne_module_init); | |
595 | module_exit(apne_module_exit); | ||
595 | #endif | 596 | #endif |
596 | 597 | ||
597 | static int init_pcmcia(void) | 598 | static int init_pcmcia(void) |
diff --git a/drivers/net/appletalk/ltpc.c b/drivers/net/appletalk/ltpc.c index 6ab2c2d4d673..fef5560bc7a2 100644 --- a/drivers/net/appletalk/ltpc.c +++ b/drivers/net/appletalk/ltpc.c | |||
@@ -1252,7 +1252,7 @@ module_param(irq, int, 0); | |||
1252 | module_param(dma, int, 0); | 1252 | module_param(dma, int, 0); |
1253 | 1253 | ||
1254 | 1254 | ||
1255 | int __init init_module(void) | 1255 | static int __init ltpc_module_init(void) |
1256 | { | 1256 | { |
1257 | if(io == 0) | 1257 | if(io == 0) |
1258 | printk(KERN_NOTICE | 1258 | printk(KERN_NOTICE |
@@ -1263,6 +1263,7 @@ int __init init_module(void) | |||
1263 | return PTR_ERR(dev_ltpc); | 1263 | return PTR_ERR(dev_ltpc); |
1264 | return 0; | 1264 | return 0; |
1265 | } | 1265 | } |
1266 | module_init(ltpc_module_init); | ||
1266 | #endif | 1267 | #endif |
1267 | 1268 | ||
1268 | static void __exit ltpc_cleanup(void) | 1269 | static void __exit ltpc_cleanup(void) |
diff --git a/drivers/net/arcnet/capmode.c b/drivers/net/arcnet/capmode.c index cc4610db6395..02cb8f1c1148 100644 --- a/drivers/net/arcnet/capmode.c +++ b/drivers/net/arcnet/capmode.c | |||
@@ -80,17 +80,19 @@ void arcnet_cap_init(void) | |||
80 | 80 | ||
81 | #ifdef MODULE | 81 | #ifdef MODULE |
82 | 82 | ||
83 | int __init init_module(void) | 83 | static int __init capmode_module_init(void) |
84 | { | 84 | { |
85 | printk(VERSION); | 85 | printk(VERSION); |
86 | arcnet_cap_init(); | 86 | arcnet_cap_init(); |
87 | return 0; | 87 | return 0; |
88 | } | 88 | } |
89 | 89 | ||
90 | void cleanup_module(void) | 90 | static void __exit capmode_module_exit(void) |
91 | { | 91 | { |
92 | arcnet_unregister_proto(&capmode_proto); | 92 | arcnet_unregister_proto(&capmode_proto); |
93 | } | 93 | } |
94 | module_init(capmode_module_init); | ||
95 | module_exit(capmode_module_exit); | ||
94 | 96 | ||
95 | MODULE_LICENSE("GPL"); | 97 | MODULE_LICENSE("GPL"); |
96 | #endif /* MODULE */ | 98 | #endif /* MODULE */ |
diff --git a/drivers/net/atarilance.c b/drivers/net/atarilance.c index b74dbeef8050..13c293b286de 100644 --- a/drivers/net/atarilance.c +++ b/drivers/net/atarilance.c | |||
@@ -336,8 +336,6 @@ struct lance_addr { | |||
336 | 336 | ||
337 | /***************************** Prototypes *****************************/ | 337 | /***************************** Prototypes *****************************/ |
338 | 338 | ||
339 | static int addr_accessible( volatile void *regp, int wordflag, int | ||
340 | writeflag ); | ||
341 | static unsigned long lance_probe1( struct net_device *dev, struct lance_addr | 339 | static unsigned long lance_probe1( struct net_device *dev, struct lance_addr |
342 | *init_rec ); | 340 | *init_rec ); |
343 | static int lance_open( struct net_device *dev ); | 341 | static int lance_open( struct net_device *dev ); |
@@ -406,7 +404,8 @@ struct net_device * __init atarilance_probe(int unit) | |||
406 | 404 | ||
407 | /* Derived from hwreg_present() in atari/config.c: */ | 405 | /* Derived from hwreg_present() in atari/config.c: */ |
408 | 406 | ||
409 | static int __init addr_accessible( volatile void *regp, int wordflag, int writeflag ) | 407 | static noinline int __init addr_accessible(volatile void *regp, int wordflag, |
408 | int writeflag) | ||
410 | { | 409 | { |
411 | int ret; | 410 | int ret; |
412 | long flags; | 411 | long flags; |
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index 36ba6dc96acc..cdf3090a1885 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2782,16 +2782,13 @@ static void __devexit e100_remove(struct pci_dev *pdev) | |||
2782 | } | 2782 | } |
2783 | } | 2783 | } |
2784 | 2784 | ||
2785 | #ifdef CONFIG_PM | ||
2786 | static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | 2785 | static int e100_suspend(struct pci_dev *pdev, pm_message_t state) |
2787 | { | 2786 | { |
2788 | struct net_device *netdev = pci_get_drvdata(pdev); | 2787 | struct net_device *netdev = pci_get_drvdata(pdev); |
2789 | struct nic *nic = netdev_priv(netdev); | 2788 | struct nic *nic = netdev_priv(netdev); |
2790 | 2789 | ||
2791 | if (netif_running(netdev)) | 2790 | if (netif_running(netdev)) |
2792 | napi_disable(&nic->napi); | 2791 | e100_down(nic); |
2793 | del_timer_sync(&nic->watchdog); | ||
2794 | netif_carrier_off(nic->netdev); | ||
2795 | netif_device_detach(netdev); | 2792 | netif_device_detach(netdev); |
2796 | 2793 | ||
2797 | pci_save_state(pdev); | 2794 | pci_save_state(pdev); |
@@ -2804,14 +2801,13 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state) | |||
2804 | pci_enable_wake(pdev, PCI_D3cold, 0); | 2801 | pci_enable_wake(pdev, PCI_D3cold, 0); |
2805 | } | 2802 | } |
2806 | 2803 | ||
2807 | free_irq(pdev->irq, netdev); | ||
2808 | |||
2809 | pci_disable_device(pdev); | 2804 | pci_disable_device(pdev); |
2810 | pci_set_power_state(pdev, PCI_D3hot); | 2805 | pci_set_power_state(pdev, PCI_D3hot); |
2811 | 2806 | ||
2812 | return 0; | 2807 | return 0; |
2813 | } | 2808 | } |
2814 | 2809 | ||
2810 | #ifdef CONFIG_PM | ||
2815 | static int e100_resume(struct pci_dev *pdev) | 2811 | static int e100_resume(struct pci_dev *pdev) |
2816 | { | 2812 | { |
2817 | struct net_device *netdev = pci_get_drvdata(pdev); | 2813 | struct net_device *netdev = pci_get_drvdata(pdev); |
@@ -2832,26 +2828,7 @@ static int e100_resume(struct pci_dev *pdev) | |||
2832 | 2828 | ||
2833 | static void e100_shutdown(struct pci_dev *pdev) | 2829 | static void e100_shutdown(struct pci_dev *pdev) |
2834 | { | 2830 | { |
2835 | struct net_device *netdev = pci_get_drvdata(pdev); | 2831 | e100_suspend(pdev, PMSG_SUSPEND); |
2836 | struct nic *nic = netdev_priv(netdev); | ||
2837 | |||
2838 | if (netif_running(netdev)) | ||
2839 | napi_disable(&nic->napi); | ||
2840 | del_timer_sync(&nic->watchdog); | ||
2841 | netif_carrier_off(nic->netdev); | ||
2842 | |||
2843 | if ((nic->flags & wol_magic) | e100_asf(nic)) { | ||
2844 | pci_enable_wake(pdev, PCI_D3hot, 1); | ||
2845 | pci_enable_wake(pdev, PCI_D3cold, 1); | ||
2846 | } else { | ||
2847 | pci_enable_wake(pdev, PCI_D3hot, 0); | ||
2848 | pci_enable_wake(pdev, PCI_D3cold, 0); | ||
2849 | } | ||
2850 | |||
2851 | free_irq(pdev->irq, netdev); | ||
2852 | |||
2853 | pci_disable_device(pdev); | ||
2854 | pci_set_power_state(pdev, PCI_D3hot); | ||
2855 | } | 2832 | } |
2856 | 2833 | ||
2857 | /* ------------------ PCI Error Recovery infrastructure -------------- */ | 2834 | /* ------------------ PCI Error Recovery infrastructure -------------- */ |
diff --git a/drivers/net/enc28j60.c b/drivers/net/enc28j60.c index 0809a6a5a286..46a90e9ec563 100644 --- a/drivers/net/enc28j60.c +++ b/drivers/net/enc28j60.c | |||
@@ -900,7 +900,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) | |||
900 | if (RSV_GETBIT(rxstat, RSV_LENCHECKERR)) | 900 | if (RSV_GETBIT(rxstat, RSV_LENCHECKERR)) |
901 | ndev->stats.rx_frame_errors++; | 901 | ndev->stats.rx_frame_errors++; |
902 | } else { | 902 | } else { |
903 | skb = dev_alloc_skb(len); | 903 | skb = dev_alloc_skb(len + NET_IP_ALIGN); |
904 | if (!skb) { | 904 | if (!skb) { |
905 | if (netif_msg_rx_err(priv)) | 905 | if (netif_msg_rx_err(priv)) |
906 | dev_err(&ndev->dev, | 906 | dev_err(&ndev->dev, |
@@ -908,6 +908,7 @@ static void enc28j60_hw_rx(struct net_device *ndev) | |||
908 | ndev->stats.rx_dropped++; | 908 | ndev->stats.rx_dropped++; |
909 | } else { | 909 | } else { |
910 | skb->dev = ndev; | 910 | skb->dev = ndev; |
911 | skb_reserve(skb, NET_IP_ALIGN); | ||
911 | /* copy the packet from the receive buffer */ | 912 | /* copy the packet from the receive buffer */ |
912 | enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv), | 913 | enc28j60_mem_read(priv, priv->next_pk_ptr + sizeof(rsv), |
913 | len, skb_put(skb, len)); | 914 | len, skb_put(skb, len)); |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 23d0a4afe0e1..c2095ce531c9 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -2133,7 +2133,7 @@ static void ixgbe_watchdog(unsigned long data) | |||
2133 | (link_speed == IXGBE_LINK_SPEED_10GB_FULL ? | 2133 | (link_speed == IXGBE_LINK_SPEED_10GB_FULL ? |
2134 | "10 Gbps" : | 2134 | "10 Gbps" : |
2135 | (link_speed == IXGBE_LINK_SPEED_1GB_FULL ? | 2135 | (link_speed == IXGBE_LINK_SPEED_1GB_FULL ? |
2136 | "1 Gpbs" : "unknown speed")), | 2136 | "1 Gbps" : "unknown speed")), |
2137 | ((FLOW_RX && FLOW_TX) ? "RX/TX" : | 2137 | ((FLOW_RX && FLOW_TX) ? "RX/TX" : |
2138 | (FLOW_RX ? "RX" : | 2138 | (FLOW_RX ? "RX" : |
2139 | (FLOW_TX ? "TX" : "None")))); | 2139 | (FLOW_TX ? "TX" : "None")))); |
diff --git a/drivers/net/mv643xx_eth.c b/drivers/net/mv643xx_eth.c index b528ce77c406..771139e283af 100644 --- a/drivers/net/mv643xx_eth.c +++ b/drivers/net/mv643xx_eth.c | |||
@@ -2104,6 +2104,7 @@ MODULE_LICENSE("GPL"); | |||
2104 | MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani" | 2104 | MODULE_AUTHOR( "Rabeeh Khoury, Assaf Hoffman, Matthew Dharm, Manish Lachwani" |
2105 | " and Dale Farnsworth"); | 2105 | " and Dale Farnsworth"); |
2106 | MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX"); | 2106 | MODULE_DESCRIPTION("Ethernet driver for Marvell MV643XX"); |
2107 | MODULE_ALIAS("platform:mv643xx_eth"); | ||
2107 | 2108 | ||
2108 | /* | 2109 | /* |
2109 | * The second part is the low level driver of the gigE ethernet ports. | 2110 | * The second part is the low level driver of the gigE ethernet ports. |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index e8a63e483a2b..ce95c5d168fe 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1268,7 +1268,7 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1268 | } | 1268 | } |
1269 | } | 1269 | } |
1270 | 1270 | ||
1271 | if (interrupts && ei_debug) | 1271 | if (interrupts && ei_debug > 3) |
1272 | { | 1272 | { |
1273 | handled = 1; | 1273 | handled = 1; |
1274 | if (nr_serviced >= MAX_SERVICE) | 1274 | if (nr_serviced >= MAX_SERVICE) |
diff --git a/drivers/net/phy/Kconfig b/drivers/net/phy/Kconfig index f4ca0591231d..3ac8529bb92c 100644 --- a/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig | |||
@@ -67,6 +67,7 @@ config REALTEK_PHY | |||
67 | 67 | ||
68 | config FIXED_PHY | 68 | config FIXED_PHY |
69 | bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" | 69 | bool "Driver for MDIO Bus/PHY emulation with fixed speed/link PHYs" |
70 | depends on PHYLIB=y | ||
70 | ---help--- | 71 | ---help--- |
71 | Adds the platform "fixed" MDIO Bus to cover the boards that use | 72 | Adds the platform "fixed" MDIO Bus to cover the boards that use |
72 | PHYs that are not connected to the real MDIO bus. | 73 | PHYs that are not connected to the real MDIO bus. |
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c index 7ed632db00d7..d926168bc780 100644 --- a/drivers/net/phy/davicom.c +++ b/drivers/net/phy/davicom.c | |||
@@ -37,6 +37,7 @@ | |||
37 | 37 | ||
38 | #define MII_DM9161_SCR 0x10 | 38 | #define MII_DM9161_SCR 0x10 |
39 | #define MII_DM9161_SCR_INIT 0x0610 | 39 | #define MII_DM9161_SCR_INIT 0x0610 |
40 | #define MII_DM9161_SCR_RMII 0x0100 | ||
40 | 41 | ||
41 | /* DM9161 Interrupt Register */ | 42 | /* DM9161 Interrupt Register */ |
42 | #define MII_DM9161_INTR 0x15 | 43 | #define MII_DM9161_INTR 0x15 |
@@ -103,7 +104,7 @@ static int dm9161_config_aneg(struct phy_device *phydev) | |||
103 | 104 | ||
104 | static int dm9161_config_init(struct phy_device *phydev) | 105 | static int dm9161_config_init(struct phy_device *phydev) |
105 | { | 106 | { |
106 | int err; | 107 | int err, temp; |
107 | 108 | ||
108 | /* Isolate the PHY */ | 109 | /* Isolate the PHY */ |
109 | err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); | 110 | err = phy_write(phydev, MII_BMCR, BMCR_ISOLATE); |
@@ -111,9 +112,19 @@ static int dm9161_config_init(struct phy_device *phydev) | |||
111 | if (err < 0) | 112 | if (err < 0) |
112 | return err; | 113 | return err; |
113 | 114 | ||
114 | /* Do not bypass the scrambler/descrambler */ | 115 | switch (phydev->interface) { |
115 | err = phy_write(phydev, MII_DM9161_SCR, MII_DM9161_SCR_INIT); | 116 | case PHY_INTERFACE_MODE_MII: |
117 | temp = MII_DM9161_SCR_INIT; | ||
118 | break; | ||
119 | case PHY_INTERFACE_MODE_RMII: | ||
120 | temp = MII_DM9161_SCR_INIT | MII_DM9161_SCR_RMII; | ||
121 | break; | ||
122 | default: | ||
123 | return -EINVAL; | ||
124 | } | ||
116 | 125 | ||
126 | /* Do not bypass the scrambler/descrambler */ | ||
127 | err = phy_write(phydev, MII_DM9161_SCR, temp); | ||
117 | if (err < 0) | 128 | if (err < 0) |
118 | return err; | 129 | return err; |
119 | 130 | ||
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index 86e5dba079fe..3d10ca050b79 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c | |||
@@ -302,14 +302,14 @@ pppol2tp_session_find(struct pppol2tp_tunnel *tunnel, u16 session_id) | |||
302 | struct pppol2tp_session *session; | 302 | struct pppol2tp_session *session; |
303 | struct hlist_node *walk; | 303 | struct hlist_node *walk; |
304 | 304 | ||
305 | read_lock(&tunnel->hlist_lock); | 305 | read_lock_bh(&tunnel->hlist_lock); |
306 | hlist_for_each_entry(session, walk, session_list, hlist) { | 306 | hlist_for_each_entry(session, walk, session_list, hlist) { |
307 | if (session->tunnel_addr.s_session == session_id) { | 307 | if (session->tunnel_addr.s_session == session_id) { |
308 | read_unlock(&tunnel->hlist_lock); | 308 | read_unlock_bh(&tunnel->hlist_lock); |
309 | return session; | 309 | return session; |
310 | } | 310 | } |
311 | } | 311 | } |
312 | read_unlock(&tunnel->hlist_lock); | 312 | read_unlock_bh(&tunnel->hlist_lock); |
313 | 313 | ||
314 | return NULL; | 314 | return NULL; |
315 | } | 315 | } |
@@ -320,14 +320,14 @@ static struct pppol2tp_tunnel *pppol2tp_tunnel_find(u16 tunnel_id) | |||
320 | { | 320 | { |
321 | struct pppol2tp_tunnel *tunnel = NULL; | 321 | struct pppol2tp_tunnel *tunnel = NULL; |
322 | 322 | ||
323 | read_lock(&pppol2tp_tunnel_list_lock); | 323 | read_lock_bh(&pppol2tp_tunnel_list_lock); |
324 | list_for_each_entry(tunnel, &pppol2tp_tunnel_list, list) { | 324 | list_for_each_entry(tunnel, &pppol2tp_tunnel_list, list) { |
325 | if (tunnel->stats.tunnel_id == tunnel_id) { | 325 | if (tunnel->stats.tunnel_id == tunnel_id) { |
326 | read_unlock(&pppol2tp_tunnel_list_lock); | 326 | read_unlock_bh(&pppol2tp_tunnel_list_lock); |
327 | return tunnel; | 327 | return tunnel; |
328 | } | 328 | } |
329 | } | 329 | } |
330 | read_unlock(&pppol2tp_tunnel_list_lock); | 330 | read_unlock_bh(&pppol2tp_tunnel_list_lock); |
331 | 331 | ||
332 | return NULL; | 332 | return NULL; |
333 | } | 333 | } |
@@ -342,10 +342,11 @@ static struct pppol2tp_tunnel *pppol2tp_tunnel_find(u16 tunnel_id) | |||
342 | static void pppol2tp_recv_queue_skb(struct pppol2tp_session *session, struct sk_buff *skb) | 342 | static void pppol2tp_recv_queue_skb(struct pppol2tp_session *session, struct sk_buff *skb) |
343 | { | 343 | { |
344 | struct sk_buff *skbp; | 344 | struct sk_buff *skbp; |
345 | struct sk_buff *tmp; | ||
345 | u16 ns = PPPOL2TP_SKB_CB(skb)->ns; | 346 | u16 ns = PPPOL2TP_SKB_CB(skb)->ns; |
346 | 347 | ||
347 | spin_lock(&session->reorder_q.lock); | 348 | spin_lock_bh(&session->reorder_q.lock); |
348 | skb_queue_walk(&session->reorder_q, skbp) { | 349 | skb_queue_walk_safe(&session->reorder_q, skbp, tmp) { |
349 | if (PPPOL2TP_SKB_CB(skbp)->ns > ns) { | 350 | if (PPPOL2TP_SKB_CB(skbp)->ns > ns) { |
350 | __skb_insert(skb, skbp->prev, skbp, &session->reorder_q); | 351 | __skb_insert(skb, skbp->prev, skbp, &session->reorder_q); |
351 | PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG, | 352 | PRINTK(session->debug, PPPOL2TP_MSG_SEQ, KERN_DEBUG, |
@@ -360,7 +361,7 @@ static void pppol2tp_recv_queue_skb(struct pppol2tp_session *session, struct sk_ | |||
360 | __skb_queue_tail(&session->reorder_q, skb); | 361 | __skb_queue_tail(&session->reorder_q, skb); |
361 | 362 | ||
362 | out: | 363 | out: |
363 | spin_unlock(&session->reorder_q.lock); | 364 | spin_unlock_bh(&session->reorder_q.lock); |
364 | } | 365 | } |
365 | 366 | ||
366 | /* Dequeue a single skb. | 367 | /* Dequeue a single skb. |
@@ -371,10 +372,9 @@ static void pppol2tp_recv_dequeue_skb(struct pppol2tp_session *session, struct s | |||
371 | int length = PPPOL2TP_SKB_CB(skb)->length; | 372 | int length = PPPOL2TP_SKB_CB(skb)->length; |
372 | struct sock *session_sock = NULL; | 373 | struct sock *session_sock = NULL; |
373 | 374 | ||
374 | /* We're about to requeue the skb, so unlink it and return resources | 375 | /* We're about to requeue the skb, so return resources |
375 | * to its current owner (a socket receive buffer). | 376 | * to its current owner (a socket receive buffer). |
376 | */ | 377 | */ |
377 | skb_unlink(skb, &session->reorder_q); | ||
378 | skb_orphan(skb); | 378 | skb_orphan(skb); |
379 | 379 | ||
380 | tunnel->stats.rx_packets++; | 380 | tunnel->stats.rx_packets++; |
@@ -442,7 +442,7 @@ static void pppol2tp_recv_dequeue(struct pppol2tp_session *session) | |||
442 | * expect to send up next, dequeue it and any other | 442 | * expect to send up next, dequeue it and any other |
443 | * in-sequence packets behind it. | 443 | * in-sequence packets behind it. |
444 | */ | 444 | */ |
445 | spin_lock(&session->reorder_q.lock); | 445 | spin_lock_bh(&session->reorder_q.lock); |
446 | skb_queue_walk_safe(&session->reorder_q, skb, tmp) { | 446 | skb_queue_walk_safe(&session->reorder_q, skb, tmp) { |
447 | if (time_after(jiffies, PPPOL2TP_SKB_CB(skb)->expires)) { | 447 | if (time_after(jiffies, PPPOL2TP_SKB_CB(skb)->expires)) { |
448 | session->stats.rx_seq_discards++; | 448 | session->stats.rx_seq_discards++; |
@@ -470,13 +470,18 @@ static void pppol2tp_recv_dequeue(struct pppol2tp_session *session) | |||
470 | goto out; | 470 | goto out; |
471 | } | 471 | } |
472 | } | 472 | } |
473 | spin_unlock(&session->reorder_q.lock); | 473 | __skb_unlink(skb, &session->reorder_q); |
474 | |||
475 | /* Process the skb. We release the queue lock while we | ||
476 | * do so to let other contexts process the queue. | ||
477 | */ | ||
478 | spin_unlock_bh(&session->reorder_q.lock); | ||
474 | pppol2tp_recv_dequeue_skb(session, skb); | 479 | pppol2tp_recv_dequeue_skb(session, skb); |
475 | spin_lock(&session->reorder_q.lock); | 480 | spin_lock_bh(&session->reorder_q.lock); |
476 | } | 481 | } |
477 | 482 | ||
478 | out: | 483 | out: |
479 | spin_unlock(&session->reorder_q.lock); | 484 | spin_unlock_bh(&session->reorder_q.lock); |
480 | } | 485 | } |
481 | 486 | ||
482 | /* Internal receive frame. Do the real work of receiving an L2TP data frame | 487 | /* Internal receive frame. Do the real work of receiving an L2TP data frame |
@@ -1059,7 +1064,7 @@ static int pppol2tp_xmit(struct ppp_channel *chan, struct sk_buff *skb) | |||
1059 | 1064 | ||
1060 | /* Get routing info from the tunnel socket */ | 1065 | /* Get routing info from the tunnel socket */ |
1061 | dst_release(skb->dst); | 1066 | dst_release(skb->dst); |
1062 | skb->dst = sk_dst_get(sk_tun); | 1067 | skb->dst = dst_clone(__sk_dst_get(sk_tun)); |
1063 | skb_orphan(skb); | 1068 | skb_orphan(skb); |
1064 | skb->sk = sk_tun; | 1069 | skb->sk = sk_tun; |
1065 | 1070 | ||
@@ -1107,7 +1112,7 @@ static void pppol2tp_tunnel_closeall(struct pppol2tp_tunnel *tunnel) | |||
1107 | PRINTK(tunnel->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO, | 1112 | PRINTK(tunnel->debug, PPPOL2TP_MSG_CONTROL, KERN_INFO, |
1108 | "%s: closing all sessions...\n", tunnel->name); | 1113 | "%s: closing all sessions...\n", tunnel->name); |
1109 | 1114 | ||
1110 | write_lock(&tunnel->hlist_lock); | 1115 | write_lock_bh(&tunnel->hlist_lock); |
1111 | for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) { | 1116 | for (hash = 0; hash < PPPOL2TP_HASH_SIZE; hash++) { |
1112 | again: | 1117 | again: |
1113 | hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) { | 1118 | hlist_for_each_safe(walk, tmp, &tunnel->session_hlist[hash]) { |
@@ -1129,7 +1134,7 @@ again: | |||
1129 | * disappear as we're jumping between locks. | 1134 | * disappear as we're jumping between locks. |
1130 | */ | 1135 | */ |
1131 | sock_hold(sk); | 1136 | sock_hold(sk); |
1132 | write_unlock(&tunnel->hlist_lock); | 1137 | write_unlock_bh(&tunnel->hlist_lock); |
1133 | lock_sock(sk); | 1138 | lock_sock(sk); |
1134 | 1139 | ||
1135 | if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) { | 1140 | if (sk->sk_state & (PPPOX_CONNECTED | PPPOX_BOUND)) { |
@@ -1154,11 +1159,11 @@ again: | |||
1154 | * list so we are guaranteed to make forward | 1159 | * list so we are guaranteed to make forward |
1155 | * progress. | 1160 | * progress. |
1156 | */ | 1161 | */ |
1157 | write_lock(&tunnel->hlist_lock); | 1162 | write_lock_bh(&tunnel->hlist_lock); |
1158 | goto again; | 1163 | goto again; |
1159 | } | 1164 | } |
1160 | } | 1165 | } |
1161 | write_unlock(&tunnel->hlist_lock); | 1166 | write_unlock_bh(&tunnel->hlist_lock); |
1162 | } | 1167 | } |
1163 | 1168 | ||
1164 | /* Really kill the tunnel. | 1169 | /* Really kill the tunnel. |
@@ -1167,9 +1172,9 @@ again: | |||
1167 | static void pppol2tp_tunnel_free(struct pppol2tp_tunnel *tunnel) | 1172 | static void pppol2tp_tunnel_free(struct pppol2tp_tunnel *tunnel) |
1168 | { | 1173 | { |
1169 | /* Remove from socket list */ | 1174 | /* Remove from socket list */ |
1170 | write_lock(&pppol2tp_tunnel_list_lock); | 1175 | write_lock_bh(&pppol2tp_tunnel_list_lock); |
1171 | list_del_init(&tunnel->list); | 1176 | list_del_init(&tunnel->list); |
1172 | write_unlock(&pppol2tp_tunnel_list_lock); | 1177 | write_unlock_bh(&pppol2tp_tunnel_list_lock); |
1173 | 1178 | ||
1174 | atomic_dec(&pppol2tp_tunnel_count); | 1179 | atomic_dec(&pppol2tp_tunnel_count); |
1175 | kfree(tunnel); | 1180 | kfree(tunnel); |
@@ -1245,9 +1250,9 @@ static void pppol2tp_session_destruct(struct sock *sk) | |||
1245 | /* Delete the session socket from the | 1250 | /* Delete the session socket from the |
1246 | * hash | 1251 | * hash |
1247 | */ | 1252 | */ |
1248 | write_lock(&tunnel->hlist_lock); | 1253 | write_lock_bh(&tunnel->hlist_lock); |
1249 | hlist_del_init(&session->hlist); | 1254 | hlist_del_init(&session->hlist); |
1250 | write_unlock(&tunnel->hlist_lock); | 1255 | write_unlock_bh(&tunnel->hlist_lock); |
1251 | 1256 | ||
1252 | atomic_dec(&pppol2tp_session_count); | 1257 | atomic_dec(&pppol2tp_session_count); |
1253 | } | 1258 | } |
@@ -1392,9 +1397,9 @@ static struct sock *pppol2tp_prepare_tunnel_socket(int fd, u16 tunnel_id, | |||
1392 | 1397 | ||
1393 | /* Add tunnel to our list */ | 1398 | /* Add tunnel to our list */ |
1394 | INIT_LIST_HEAD(&tunnel->list); | 1399 | INIT_LIST_HEAD(&tunnel->list); |
1395 | write_lock(&pppol2tp_tunnel_list_lock); | 1400 | write_lock_bh(&pppol2tp_tunnel_list_lock); |
1396 | list_add(&tunnel->list, &pppol2tp_tunnel_list); | 1401 | list_add(&tunnel->list, &pppol2tp_tunnel_list); |
1397 | write_unlock(&pppol2tp_tunnel_list_lock); | 1402 | write_unlock_bh(&pppol2tp_tunnel_list_lock); |
1398 | atomic_inc(&pppol2tp_tunnel_count); | 1403 | atomic_inc(&pppol2tp_tunnel_count); |
1399 | 1404 | ||
1400 | /* Bump the reference count. The tunnel context is deleted | 1405 | /* Bump the reference count. The tunnel context is deleted |
@@ -1599,11 +1604,11 @@ static int pppol2tp_connect(struct socket *sock, struct sockaddr *uservaddr, | |||
1599 | sk->sk_user_data = session; | 1604 | sk->sk_user_data = session; |
1600 | 1605 | ||
1601 | /* Add session to the tunnel's hash list */ | 1606 | /* Add session to the tunnel's hash list */ |
1602 | write_lock(&tunnel->hlist_lock); | 1607 | write_lock_bh(&tunnel->hlist_lock); |
1603 | hlist_add_head(&session->hlist, | 1608 | hlist_add_head(&session->hlist, |
1604 | pppol2tp_session_id_hash(tunnel, | 1609 | pppol2tp_session_id_hash(tunnel, |
1605 | session->tunnel_addr.s_session)); | 1610 | session->tunnel_addr.s_session)); |
1606 | write_unlock(&tunnel->hlist_lock); | 1611 | write_unlock_bh(&tunnel->hlist_lock); |
1607 | 1612 | ||
1608 | atomic_inc(&pppol2tp_session_count); | 1613 | atomic_inc(&pppol2tp_session_count); |
1609 | 1614 | ||
@@ -2205,7 +2210,7 @@ static struct pppol2tp_session *next_session(struct pppol2tp_tunnel *tunnel, str | |||
2205 | int next = 0; | 2210 | int next = 0; |
2206 | int i; | 2211 | int i; |
2207 | 2212 | ||
2208 | read_lock(&tunnel->hlist_lock); | 2213 | read_lock_bh(&tunnel->hlist_lock); |
2209 | for (i = 0; i < PPPOL2TP_HASH_SIZE; i++) { | 2214 | for (i = 0; i < PPPOL2TP_HASH_SIZE; i++) { |
2210 | hlist_for_each_entry(session, walk, &tunnel->session_hlist[i], hlist) { | 2215 | hlist_for_each_entry(session, walk, &tunnel->session_hlist[i], hlist) { |
2211 | if (curr == NULL) { | 2216 | if (curr == NULL) { |
@@ -2223,7 +2228,7 @@ static struct pppol2tp_session *next_session(struct pppol2tp_tunnel *tunnel, str | |||
2223 | } | 2228 | } |
2224 | } | 2229 | } |
2225 | out: | 2230 | out: |
2226 | read_unlock(&tunnel->hlist_lock); | 2231 | read_unlock_bh(&tunnel->hlist_lock); |
2227 | if (!found) | 2232 | if (!found) |
2228 | session = NULL; | 2233 | session = NULL; |
2229 | 2234 | ||
@@ -2234,13 +2239,13 @@ static struct pppol2tp_tunnel *next_tunnel(struct pppol2tp_tunnel *curr) | |||
2234 | { | 2239 | { |
2235 | struct pppol2tp_tunnel *tunnel = NULL; | 2240 | struct pppol2tp_tunnel *tunnel = NULL; |
2236 | 2241 | ||
2237 | read_lock(&pppol2tp_tunnel_list_lock); | 2242 | read_lock_bh(&pppol2tp_tunnel_list_lock); |
2238 | if (list_is_last(&curr->list, &pppol2tp_tunnel_list)) { | 2243 | if (list_is_last(&curr->list, &pppol2tp_tunnel_list)) { |
2239 | goto out; | 2244 | goto out; |
2240 | } | 2245 | } |
2241 | tunnel = list_entry(curr->list.next, struct pppol2tp_tunnel, list); | 2246 | tunnel = list_entry(curr->list.next, struct pppol2tp_tunnel, list); |
2242 | out: | 2247 | out: |
2243 | read_unlock(&pppol2tp_tunnel_list_lock); | 2248 | read_unlock_bh(&pppol2tp_tunnel_list_lock); |
2244 | 2249 | ||
2245 | return tunnel; | 2250 | return tunnel; |
2246 | } | 2251 | } |
diff --git a/drivers/net/s2io.c b/drivers/net/s2io.c index 6179a0a2032c..c72787adeba3 100644 --- a/drivers/net/s2io.c +++ b/drivers/net/s2io.c | |||
@@ -1088,7 +1088,7 @@ static int s2io_print_pci_mode(struct s2io_nic *nic) | |||
1088 | * '-1' on failure | 1088 | * '-1' on failure |
1089 | */ | 1089 | */ |
1090 | 1090 | ||
1091 | int init_tti(struct s2io_nic *nic, int link) | 1091 | static int init_tti(struct s2io_nic *nic, int link) |
1092 | { | 1092 | { |
1093 | struct XENA_dev_config __iomem *bar0 = nic->bar0; | 1093 | struct XENA_dev_config __iomem *bar0 = nic->bar0; |
1094 | register u64 val64 = 0; | 1094 | register u64 val64 = 0; |
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c index 77d9dd7ea34f..567c62757e9d 100644 --- a/drivers/net/tulip/de2104x.c +++ b/drivers/net/tulip/de2104x.c | |||
@@ -910,7 +910,8 @@ static void de_set_media (struct de_private *de) | |||
910 | unsigned media = de->media_type; | 910 | unsigned media = de->media_type; |
911 | u32 macmode = dr32(MacMode); | 911 | u32 macmode = dr32(MacMode); |
912 | 912 | ||
913 | BUG_ON(de_is_running(de)); | 913 | if (de_is_running(de)) |
914 | printk(KERN_WARNING "%s: chip is running while changing media!\n", de->dev->name); | ||
914 | 915 | ||
915 | if (de->de21040) | 916 | if (de->de21040) |
916 | dw32(CSR11, FULL_DUPLEX_MAGIC); | 917 | dw32(CSR11, FULL_DUPLEX_MAGIC); |
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c index 15d5c58e57bc..e59255a155a9 100644 --- a/drivers/net/wan/sbni.c +++ b/drivers/net/wan/sbni.c | |||
@@ -751,7 +751,7 @@ upload_data( struct net_device *dev, unsigned framelen, unsigned frameno, | |||
751 | } | 751 | } |
752 | 752 | ||
753 | 753 | ||
754 | static __inline void | 754 | static inline void |
755 | send_complete( struct net_local *nl ) | 755 | send_complete( struct net_local *nl ) |
756 | { | 756 | { |
757 | #ifdef CONFIG_SBNI_MULTILINE | 757 | #ifdef CONFIG_SBNI_MULTILINE |
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c index bdc6a1cc2103..f0ef7081bdeb 100644 --- a/drivers/net/wireless/libertas/cmdresp.c +++ b/drivers/net/wireless/libertas/cmdresp.c | |||
@@ -578,7 +578,7 @@ int lbs_process_rx_command(struct lbs_private *priv) | |||
578 | goto done; | 578 | goto done; |
579 | } | 579 | } |
580 | if (respcmd != CMD_RET(curcmd) && | 580 | if (respcmd != CMD_RET(curcmd) && |
581 | respcmd != CMD_802_11_ASSOCIATE && curcmd != CMD_RET_802_11_ASSOCIATE) { | 581 | respcmd != CMD_RET_802_11_ASSOCIATE && curcmd != CMD_802_11_ASSOCIATE) { |
582 | lbs_pr_info("Invalid CMD_RESP %x to command %x!\n", respcmd, curcmd); | 582 | lbs_pr_info("Invalid CMD_RESP %x to command %x!\n", respcmd, curcmd); |
583 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 583 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
584 | ret = -1; | 584 | ret = -1; |
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index e808db98f2f5..93ea212fedd5 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c | |||
@@ -2302,9 +2302,9 @@ static void rt61pci_configure_filter(struct ieee80211_hw *hw, | |||
2302 | * Apply some rules to the filters: | 2302 | * Apply some rules to the filters: |
2303 | * - Some filters imply different filters to be set. | 2303 | * - Some filters imply different filters to be set. |
2304 | * - Some things we can't filter out at all. | 2304 | * - Some things we can't filter out at all. |
2305 | * - Multicast filter seems to kill broadcast traffic so never use it. | ||
2305 | */ | 2306 | */ |
2306 | if (mc_count) | 2307 | *total_flags |= FIF_ALLMULTI; |
2307 | *total_flags |= FIF_ALLMULTI; | ||
2308 | if (*total_flags & FIF_OTHER_BSS || | 2308 | if (*total_flags & FIF_OTHER_BSS || |
2309 | *total_flags & FIF_PROMISC_IN_BSS) | 2309 | *total_flags & FIF_PROMISC_IN_BSS) |
2310 | *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS; | 2310 | *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS; |
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 4fac2d414d84..8103d41a1543 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c | |||
@@ -1869,9 +1869,9 @@ static void rt73usb_configure_filter(struct ieee80211_hw *hw, | |||
1869 | * Apply some rules to the filters: | 1869 | * Apply some rules to the filters: |
1870 | * - Some filters imply different filters to be set. | 1870 | * - Some filters imply different filters to be set. |
1871 | * - Some things we can't filter out at all. | 1871 | * - Some things we can't filter out at all. |
1872 | * - Multicast filter seems to kill broadcast traffic so never use it. | ||
1872 | */ | 1873 | */ |
1873 | if (mc_count) | 1874 | *total_flags |= FIF_ALLMULTI; |
1874 | *total_flags |= FIF_ALLMULTI; | ||
1875 | if (*total_flags & FIF_OTHER_BSS || | 1875 | if (*total_flags & FIF_OTHER_BSS || |
1876 | *total_flags & FIF_PROMISC_IN_BSS) | 1876 | *total_flags & FIF_PROMISC_IN_BSS) |
1877 | *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS; | 1877 | *total_flags |= FIF_PROMISC_IN_BSS | FIF_OTHER_BSS; |
@@ -2098,6 +2098,7 @@ static struct usb_device_id rt73usb_device_table[] = { | |||
2098 | /* D-Link */ | 2098 | /* D-Link */ |
2099 | { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) }, | 2099 | { USB_DEVICE(0x07d1, 0x3c03), USB_DEVICE_DATA(&rt73usb_ops) }, |
2100 | { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, | 2100 | { USB_DEVICE(0x07d1, 0x3c04), USB_DEVICE_DATA(&rt73usb_ops) }, |
2101 | { USB_DEVICE(0x07d1, 0x3c07), USB_DEVICE_DATA(&rt73usb_ops) }, | ||
2101 | /* Gemtek */ | 2102 | /* Gemtek */ |
2102 | { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, | 2103 | { USB_DEVICE(0x15a9, 0x0004), USB_DEVICE_DATA(&rt73usb_ops) }, |
2103 | /* Gigabyte */ | 2104 | /* Gigabyte */ |
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 6a9403d79e0c..d708358326e5 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
@@ -143,14 +143,18 @@ void pci_bus_add_devices(struct pci_bus *bus) | |||
143 | /* register the bus with sysfs as the parent is now | 143 | /* register the bus with sysfs as the parent is now |
144 | * properly registered. */ | 144 | * properly registered. */ |
145 | child_bus = dev->subordinate; | 145 | child_bus = dev->subordinate; |
146 | if (child_bus->is_added) | ||
147 | continue; | ||
146 | child_bus->dev.parent = child_bus->bridge; | 148 | child_bus->dev.parent = child_bus->bridge; |
147 | retval = device_register(&child_bus->dev); | 149 | retval = device_register(&child_bus->dev); |
148 | if (retval) | 150 | if (retval) |
149 | dev_err(&dev->dev, "Error registering pci_bus," | 151 | dev_err(&dev->dev, "Error registering pci_bus," |
150 | " continuing...\n"); | 152 | " continuing...\n"); |
151 | else | 153 | else { |
154 | child_bus->is_added = 1; | ||
152 | retval = device_create_file(&child_bus->dev, | 155 | retval = device_create_file(&child_bus->dev, |
153 | &dev_attr_cpuaffinity); | 156 | &dev_attr_cpuaffinity); |
157 | } | ||
154 | if (retval) | 158 | if (retval) |
155 | dev_err(&dev->dev, "Error creating cpuaffinity" | 159 | dev_err(&dev->dev, "Error creating cpuaffinity" |
156 | " file, continuing...\n"); | 160 | " file, continuing...\n"); |
diff --git a/drivers/pci/hotplug/ibmphp_ebda.c b/drivers/pci/hotplug/ibmphp_ebda.c index 600ed7b67ae7..bbccde9f228f 100644 --- a/drivers/pci/hotplug/ibmphp_ebda.c +++ b/drivers/pci/hotplug/ibmphp_ebda.c | |||
@@ -963,6 +963,7 @@ static int __init ebda_rsrc_controller (void) | |||
963 | 963 | ||
964 | bus_info_ptr1 = ibmphp_find_same_bus_num (hpc_ptr->slots[index].slot_bus_num); | 964 | bus_info_ptr1 = ibmphp_find_same_bus_num (hpc_ptr->slots[index].slot_bus_num); |
965 | if (!bus_info_ptr1) { | 965 | if (!bus_info_ptr1) { |
966 | kfree(tmp_slot); | ||
966 | rc = -ENODEV; | 967 | rc = -ENODEV; |
967 | goto error; | 968 | goto error; |
968 | } | 969 | } |
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 4a23654184fc..72f7476930c8 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -272,21 +272,29 @@ static int acpi_pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
272 | { | 272 | { |
273 | acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); | 273 | acpi_handle handle = DEVICE_ACPI_HANDLE(&dev->dev); |
274 | acpi_handle tmp; | 274 | acpi_handle tmp; |
275 | static int state_conv[] = { | 275 | static const u8 state_conv[] = { |
276 | [0] = 0, | 276 | [PCI_D0] = ACPI_STATE_D0, |
277 | [1] = 1, | 277 | [PCI_D1] = ACPI_STATE_D1, |
278 | [2] = 2, | 278 | [PCI_D2] = ACPI_STATE_D2, |
279 | [3] = 3, | 279 | [PCI_D3hot] = ACPI_STATE_D3, |
280 | [4] = 3 | 280 | [PCI_D3cold] = ACPI_STATE_D3 |
281 | }; | 281 | }; |
282 | int acpi_state = state_conv[(int __force) state]; | ||
283 | 282 | ||
284 | if (!handle) | 283 | if (!handle) |
285 | return -ENODEV; | 284 | return -ENODEV; |
286 | /* If the ACPI device has _EJ0, ignore the device */ | 285 | /* If the ACPI device has _EJ0, ignore the device */ |
287 | if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp))) | 286 | if (ACPI_SUCCESS(acpi_get_handle(handle, "_EJ0", &tmp))) |
288 | return 0; | 287 | return 0; |
289 | return acpi_bus_set_power(handle, acpi_state); | 288 | |
289 | switch (state) { | ||
290 | case PCI_D0: | ||
291 | case PCI_D1: | ||
292 | case PCI_D2: | ||
293 | case PCI_D3hot: | ||
294 | case PCI_D3cold: | ||
295 | return acpi_bus_set_power(handle, state_conv[state]); | ||
296 | } | ||
297 | return -EINVAL; | ||
290 | } | 298 | } |
291 | 299 | ||
292 | 300 | ||
diff --git a/drivers/pnp/quirks.c b/drivers/pnp/quirks.c index 4065139753b6..37993206ae5d 100644 --- a/drivers/pnp/quirks.c +++ b/drivers/pnp/quirks.c | |||
@@ -17,7 +17,6 @@ | |||
17 | #include <linux/slab.h> | 17 | #include <linux/slab.h> |
18 | #include <linux/pnp.h> | 18 | #include <linux/pnp.h> |
19 | #include <linux/io.h> | 19 | #include <linux/io.h> |
20 | #include <linux/dmi.h> | ||
21 | #include <linux/kallsyms.h> | 20 | #include <linux/kallsyms.h> |
22 | #include "base.h" | 21 | #include "base.h" |
23 | 22 | ||
@@ -109,42 +108,73 @@ static void quirk_sb16audio_resources(struct pnp_dev *dev) | |||
109 | "pnp: SB audio device quirk - increasing port range\n"); | 108 | "pnp: SB audio device quirk - increasing port range\n"); |
110 | } | 109 | } |
111 | 110 | ||
112 | static void quirk_supermicro_h8dce_system(struct pnp_dev *dev) | 111 | |
112 | #include <linux/pci.h> | ||
113 | |||
114 | static void quirk_system_pci_resources(struct pnp_dev *dev) | ||
113 | { | 115 | { |
114 | int i; | 116 | struct pci_dev *pdev = NULL; |
115 | static struct dmi_system_id supermicro_h8dce[] = { | 117 | resource_size_t pnp_start, pnp_end, pci_start, pci_end; |
116 | { | 118 | int i, j; |
117 | .ident = "Supermicro H8DCE", | ||
118 | .matches = { | ||
119 | DMI_MATCH(DMI_SYS_VENDOR, "Supermicro"), | ||
120 | DMI_MATCH(DMI_PRODUCT_NAME, "H8DCE"), | ||
121 | }, | ||
122 | }, | ||
123 | { } | ||
124 | }; | ||
125 | |||
126 | if (!dmi_check_system(supermicro_h8dce)) | ||
127 | return; | ||
128 | 119 | ||
129 | /* | 120 | /* |
130 | * On the Supermicro H8DCE, there's a system device with resources | 121 | * Some BIOSes have PNP motherboard devices with resources that |
131 | * that overlap BAR 6 of the built-in SATA PCI adapter. If the PNP | 122 | * partially overlap PCI BARs. The PNP system driver claims these |
132 | * system device claims them, the sata_nv driver won't be able to. | 123 | * motherboard resources, which prevents the normal PCI driver from |
133 | * More details at: | 124 | * requesting them later. |
134 | * https://bugzilla.redhat.com/show_bug.cgi?id=280641 | 125 | * |
135 | * https://bugzilla.redhat.com/show_bug.cgi?id=313491 | 126 | * This patch disables the PNP resources that conflict with PCI BARs |
136 | * http://lkml.org/lkml/2008/1/9/449 | 127 | * so they won't be claimed by the PNP system driver. |
137 | * http://thread.gmane.org/gmane.linux.acpi.devel/27312 | ||
138 | */ | 128 | */ |
139 | for (i = 0; i < PNP_MAX_MEM; i++) { | 129 | for_each_pci_dev(pdev) { |
140 | if (pnp_mem_valid(dev, i) && pnp_mem_len(dev, i) && | 130 | for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) { |
141 | (pnp_mem_start(dev, i) & 0xdfef0000) == 0xdfef0000) { | 131 | if (!(pci_resource_flags(pdev, i) & IORESOURCE_MEM) || |
142 | dev_warn(&dev->dev, "disabling 0x%llx-0x%llx to prevent" | 132 | pci_resource_len(pdev, i) == 0) |
143 | " conflict with sata_nv PCI device\n", | 133 | continue; |
144 | (unsigned long long) pnp_mem_start(dev, i), | 134 | |
145 | (unsigned long long) (pnp_mem_start(dev, i) + | 135 | pci_start = pci_resource_start(pdev, i); |
146 | pnp_mem_len(dev, i) - 1)); | 136 | pci_end = pci_resource_end(pdev, i); |
147 | pnp_mem_flags(dev, i) = 0; | 137 | for (j = 0; j < PNP_MAX_MEM; j++) { |
138 | if (!pnp_mem_valid(dev, j) || | ||
139 | pnp_mem_len(dev, j) == 0) | ||
140 | continue; | ||
141 | |||
142 | pnp_start = pnp_mem_start(dev, j); | ||
143 | pnp_end = pnp_mem_end(dev, j); | ||
144 | |||
145 | /* | ||
146 | * If the PNP region doesn't overlap the PCI | ||
147 | * region at all, there's no problem. | ||
148 | */ | ||
149 | if (pnp_end < pci_start || pnp_start > pci_end) | ||
150 | continue; | ||
151 | |||
152 | /* | ||
153 | * If the PNP region completely encloses (or is | ||
154 | * at least as large as) the PCI region, that's | ||
155 | * also OK. For example, this happens when the | ||
156 | * PNP device describes a bridge with PCI | ||
157 | * behind it. | ||
158 | */ | ||
159 | if (pnp_start <= pci_start && | ||
160 | pnp_end >= pci_end) | ||
161 | continue; | ||
162 | |||
163 | /* | ||
164 | * Otherwise, the PNP region overlaps *part* of | ||
165 | * the PCI region, and that might prevent a PCI | ||
166 | * driver from requesting its resources. | ||
167 | */ | ||
168 | dev_warn(&dev->dev, "mem resource " | ||
169 | "(0x%llx-0x%llx) overlaps %s BAR %d " | ||
170 | "(0x%llx-0x%llx), disabling\n", | ||
171 | (unsigned long long) pnp_start, | ||
172 | (unsigned long long) pnp_end, | ||
173 | pci_name(pdev), i, | ||
174 | (unsigned long long) pci_start, | ||
175 | (unsigned long long) pci_end); | ||
176 | pnp_mem_flags(dev, j) = 0; | ||
177 | } | ||
148 | } | 178 | } |
149 | } | 179 | } |
150 | } | 180 | } |
@@ -169,8 +199,8 @@ static struct pnp_fixup pnp_fixups[] = { | |||
169 | {"CTL0043", quirk_sb16audio_resources}, | 199 | {"CTL0043", quirk_sb16audio_resources}, |
170 | {"CTL0044", quirk_sb16audio_resources}, | 200 | {"CTL0044", quirk_sb16audio_resources}, |
171 | {"CTL0045", quirk_sb16audio_resources}, | 201 | {"CTL0045", quirk_sb16audio_resources}, |
172 | {"PNP0c01", quirk_supermicro_h8dce_system}, | 202 | {"PNP0c01", quirk_system_pci_resources}, |
173 | {"PNP0c02", quirk_supermicro_h8dce_system}, | 203 | {"PNP0c02", quirk_system_pci_resources}, |
174 | {""} | 204 | {""} |
175 | }; | 205 | }; |
176 | 206 | ||
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index a64d85821996..c0e50a461055 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
@@ -138,7 +138,7 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = { | |||
138 | { /* end of list */ }, | 138 | { /* end of list */ }, |
139 | }; | 139 | }; |
140 | 140 | ||
141 | static struct of_platform_driver __devinitdata of_platform_serial_driver = { | 141 | static struct of_platform_driver of_platform_serial_driver = { |
142 | .owner = THIS_MODULE, | 142 | .owner = THIS_MODULE, |
143 | .name = "of_serial", | 143 | .name = "of_serial", |
144 | .probe = of_platform_serial_probe, | 144 | .probe = of_platform_serial_probe, |
diff --git a/drivers/spi/au1550_spi.c b/drivers/spi/au1550_spi.c index c47a650183a1..41a3d00c4515 100644 --- a/drivers/spi/au1550_spi.c +++ b/drivers/spi/au1550_spi.c | |||
@@ -99,7 +99,7 @@ static dbdev_tab_t au1550_spi_mem_dbdev = | |||
99 | static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw); | 99 | static void au1550_spi_bits_handlers_set(struct au1550_spi *hw, int bpw); |
100 | 100 | ||
101 | 101 | ||
102 | /** | 102 | /* |
103 | * compute BRG and DIV bits to setup spi clock based on main input clock rate | 103 | * compute BRG and DIV bits to setup spi clock based on main input clock rate |
104 | * that was specified in platform data structure | 104 | * that was specified in platform data structure |
105 | * according to au1550 datasheet: | 105 | * according to au1550 datasheet: |
@@ -650,7 +650,7 @@ static int au1550_spi_txrx_bufs(struct spi_device *spi, struct spi_transfer *t) | |||
650 | return hw->txrx_bufs(spi, t); | 650 | return hw->txrx_bufs(spi, t); |
651 | } | 651 | } |
652 | 652 | ||
653 | static irqreturn_t au1550_spi_irq(int irq, void *dev, struct pt_regs *regs) | 653 | static irqreturn_t au1550_spi_irq(int irq, void *dev) |
654 | { | 654 | { |
655 | struct au1550_spi *hw = dev; | 655 | struct au1550_spi *hw = dev; |
656 | return hw->irq_callback(hw); | 656 | return hw->irq_callback(hw); |
diff --git a/drivers/spi/spi_bitbang.c b/drivers/spi/spi_bitbang.c index f7f8580edad8..71e881419cdd 100644 --- a/drivers/spi/spi_bitbang.c +++ b/drivers/spi/spi_bitbang.c | |||
@@ -344,12 +344,14 @@ static void bitbang_work(struct work_struct *work) | |||
344 | t->rx_dma = t->tx_dma = 0; | 344 | t->rx_dma = t->tx_dma = 0; |
345 | status = bitbang->txrx_bufs(spi, t); | 345 | status = bitbang->txrx_bufs(spi, t); |
346 | } | 346 | } |
347 | if (status > 0) | ||
348 | m->actual_length += status; | ||
347 | if (status != t->len) { | 349 | if (status != t->len) { |
348 | if (status > 0) | 350 | /* always report some kind of error */ |
349 | status = -EMSGSIZE; | 351 | if (status >= 0) |
352 | status = -EREMOTEIO; | ||
350 | break; | 353 | break; |
351 | } | 354 | } |
352 | m->actual_length += status; | ||
353 | status = 0; | 355 | status = 0; |
354 | 356 | ||
355 | /* protocol tweaks before next transfer */ | 357 | /* protocol tweaks before next transfer */ |
diff --git a/drivers/thermal/Kconfig b/drivers/thermal/Kconfig index 69f19f224875..3ab313ed441c 100644 --- a/drivers/thermal/Kconfig +++ b/drivers/thermal/Kconfig | |||
@@ -4,6 +4,7 @@ | |||
4 | 4 | ||
5 | menuconfig THERMAL | 5 | menuconfig THERMAL |
6 | bool "Generic Thermal sysfs driver" | 6 | bool "Generic Thermal sysfs driver" |
7 | select HWMON | ||
7 | default y | 8 | default y |
8 | help | 9 | help |
9 | Generic Thermal Sysfs driver offers a generic mechanism for | 10 | Generic Thermal Sysfs driver offers a generic mechanism for |
diff --git a/drivers/thermal/thermal.c b/drivers/thermal/thermal.c index 8b86e53ccf7a..41bd4c805ace 100644 --- a/drivers/thermal/thermal.c +++ b/drivers/thermal/thermal.c | |||
@@ -30,8 +30,10 @@ | |||
30 | #include <linux/idr.h> | 30 | #include <linux/idr.h> |
31 | #include <linux/thermal.h> | 31 | #include <linux/thermal.h> |
32 | #include <linux/spinlock.h> | 32 | #include <linux/spinlock.h> |
33 | #include <linux/hwmon.h> | ||
34 | #include <linux/hwmon-sysfs.h> | ||
33 | 35 | ||
34 | MODULE_AUTHOR("Zhang Rui") | 36 | MODULE_AUTHOR("Zhang Rui"); |
35 | MODULE_DESCRIPTION("Generic thermal management sysfs support"); | 37 | MODULE_DESCRIPTION("Generic thermal management sysfs support"); |
36 | MODULE_LICENSE("GPL"); | 38 | MODULE_LICENSE("GPL"); |
37 | 39 | ||
@@ -56,6 +58,9 @@ static LIST_HEAD(thermal_tz_list); | |||
56 | static LIST_HEAD(thermal_cdev_list); | 58 | static LIST_HEAD(thermal_cdev_list); |
57 | static DEFINE_MUTEX(thermal_list_lock); | 59 | static DEFINE_MUTEX(thermal_list_lock); |
58 | 60 | ||
61 | static struct device *thermal_hwmon; | ||
62 | #define MAX_THERMAL_ZONES 10 | ||
63 | |||
59 | static int get_idr(struct idr *idr, struct mutex *lock, int *id) | 64 | static int get_idr(struct idr *idr, struct mutex *lock, int *id) |
60 | { | 65 | { |
61 | int err; | 66 | int err; |
@@ -87,7 +92,67 @@ static void release_idr(struct idr *idr, struct mutex *lock, int id) | |||
87 | mutex_unlock(lock); | 92 | mutex_unlock(lock); |
88 | } | 93 | } |
89 | 94 | ||
90 | /* sys I/F for thermal zone */ | 95 | /* hwmon sys I/F*/ |
96 | static ssize_t | ||
97 | name_show(struct device *dev, struct device_attribute *attr, char *buf) | ||
98 | { | ||
99 | return sprintf(buf, "thermal_sys_class\n"); | ||
100 | } | ||
101 | |||
102 | static ssize_t | ||
103 | temp_input_show(struct device *dev, struct device_attribute *attr, char *buf) | ||
104 | { | ||
105 | struct thermal_zone_device *tz; | ||
106 | struct sensor_device_attribute *sensor_attr | ||
107 | = to_sensor_dev_attr(attr); | ||
108 | |||
109 | list_for_each_entry(tz, &thermal_tz_list, node) | ||
110 | if (tz->id == sensor_attr->index) | ||
111 | return tz->ops->get_temp(tz, buf); | ||
112 | |||
113 | return -ENODEV; | ||
114 | } | ||
115 | |||
116 | static ssize_t | ||
117 | temp_crit_show(struct device *dev, struct device_attribute *attr, | ||
118 | char *buf) | ||
119 | { | ||
120 | struct thermal_zone_device *tz; | ||
121 | struct sensor_device_attribute *sensor_attr | ||
122 | = to_sensor_dev_attr(attr); | ||
123 | |||
124 | list_for_each_entry(tz, &thermal_tz_list, node) | ||
125 | if (tz->id == sensor_attr->index) | ||
126 | return tz->ops->get_trip_temp(tz, 0, buf); | ||
127 | |||
128 | return -ENODEV; | ||
129 | } | ||
130 | |||
131 | static DEVICE_ATTR(name, 0444, name_show, NULL); | ||
132 | static struct sensor_device_attribute sensor_attrs[] = { | ||
133 | SENSOR_ATTR(temp1_input, 0444, temp_input_show, NULL, 0), | ||
134 | SENSOR_ATTR(temp1_crit, 0444, temp_crit_show, NULL, 0), | ||
135 | SENSOR_ATTR(temp2_input, 0444, temp_input_show, NULL, 1), | ||
136 | SENSOR_ATTR(temp2_crit, 0444, temp_crit_show, NULL, 1), | ||
137 | SENSOR_ATTR(temp3_input, 0444, temp_input_show, NULL, 2), | ||
138 | SENSOR_ATTR(temp3_crit, 0444, temp_crit_show, NULL, 2), | ||
139 | SENSOR_ATTR(temp4_input, 0444, temp_input_show, NULL, 3), | ||
140 | SENSOR_ATTR(temp4_crit, 0444, temp_crit_show, NULL, 3), | ||
141 | SENSOR_ATTR(temp5_input, 0444, temp_input_show, NULL, 4), | ||
142 | SENSOR_ATTR(temp5_crit, 0444, temp_crit_show, NULL, 4), | ||
143 | SENSOR_ATTR(temp6_input, 0444, temp_input_show, NULL, 5), | ||
144 | SENSOR_ATTR(temp6_crit, 0444, temp_crit_show, NULL, 5), | ||
145 | SENSOR_ATTR(temp7_input, 0444, temp_input_show, NULL, 6), | ||
146 | SENSOR_ATTR(temp7_crit, 0444, temp_crit_show, NULL, 6), | ||
147 | SENSOR_ATTR(temp8_input, 0444, temp_input_show, NULL, 7), | ||
148 | SENSOR_ATTR(temp8_crit, 0444, temp_crit_show, NULL, 7), | ||
149 | SENSOR_ATTR(temp9_input, 0444, temp_input_show, NULL, 8), | ||
150 | SENSOR_ATTR(temp9_crit, 0444, temp_crit_show, NULL, 8), | ||
151 | SENSOR_ATTR(temp10_input, 0444, temp_input_show, NULL, 9), | ||
152 | SENSOR_ATTR(temp10_crit, 0444, temp_crit_show, NULL, 9), | ||
153 | }; | ||
154 | |||
155 | /* thermal zone sys I/F */ | ||
91 | 156 | ||
92 | #define to_thermal_zone(_dev) \ | 157 | #define to_thermal_zone(_dev) \ |
93 | container_of(_dev, struct thermal_zone_device, device) | 158 | container_of(_dev, struct thermal_zone_device, device) |
@@ -214,7 +279,7 @@ do { \ | |||
214 | device_remove_file(_dev, &trip_point_attrs[_index * 2 + 1]); \ | 279 | device_remove_file(_dev, &trip_point_attrs[_index * 2 + 1]); \ |
215 | } while (0) | 280 | } while (0) |
216 | 281 | ||
217 | /* sys I/F for cooling device */ | 282 | /* cooling device sys I/F */ |
218 | #define to_cooling_device(_dev) \ | 283 | #define to_cooling_device(_dev) \ |
219 | container_of(_dev, struct thermal_cooling_device, device) | 284 | container_of(_dev, struct thermal_cooling_device, device) |
220 | 285 | ||
@@ -447,6 +512,9 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type, | |||
447 | struct thermal_zone_device *pos; | 512 | struct thermal_zone_device *pos; |
448 | int result; | 513 | int result; |
449 | 514 | ||
515 | if (!type) | ||
516 | return ERR_PTR(-EINVAL); | ||
517 | |||
450 | if (strlen(type) >= THERMAL_NAME_LENGTH) | 518 | if (strlen(type) >= THERMAL_NAME_LENGTH) |
451 | return ERR_PTR(-EINVAL); | 519 | return ERR_PTR(-EINVAL); |
452 | 520 | ||
@@ -477,11 +545,9 @@ struct thermal_cooling_device *thermal_cooling_device_register(char *type, | |||
477 | } | 545 | } |
478 | 546 | ||
479 | /* sys I/F */ | 547 | /* sys I/F */ |
480 | if (type) { | 548 | result = device_create_file(&cdev->device, &dev_attr_cdev_type); |
481 | result = device_create_file(&cdev->device, &dev_attr_cdev_type); | 549 | if (result) |
482 | if (result) | 550 | goto unregister; |
483 | goto unregister; | ||
484 | } | ||
485 | 551 | ||
486 | result = device_create_file(&cdev->device, &dev_attr_max_state); | 552 | result = device_create_file(&cdev->device, &dev_attr_max_state); |
487 | if (result) | 553 | if (result) |
@@ -547,8 +613,8 @@ void thermal_cooling_device_unregister(struct | |||
547 | tz->ops->unbind(tz, cdev); | 613 | tz->ops->unbind(tz, cdev); |
548 | } | 614 | } |
549 | mutex_unlock(&thermal_list_lock); | 615 | mutex_unlock(&thermal_list_lock); |
550 | if (cdev->type[0]) | 616 | |
551 | device_remove_file(&cdev->device, &dev_attr_cdev_type); | 617 | device_remove_file(&cdev->device, &dev_attr_cdev_type); |
552 | device_remove_file(&cdev->device, &dev_attr_max_state); | 618 | device_remove_file(&cdev->device, &dev_attr_max_state); |
553 | device_remove_file(&cdev->device, &dev_attr_cur_state); | 619 | device_remove_file(&cdev->device, &dev_attr_cur_state); |
554 | 620 | ||
@@ -580,6 +646,9 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, | |||
580 | int result; | 646 | int result; |
581 | int count; | 647 | int count; |
582 | 648 | ||
649 | if (!type) | ||
650 | return ERR_PTR(-EINVAL); | ||
651 | |||
583 | if (strlen(type) >= THERMAL_NAME_LENGTH) | 652 | if (strlen(type) >= THERMAL_NAME_LENGTH) |
584 | return ERR_PTR(-EINVAL); | 653 | return ERR_PTR(-EINVAL); |
585 | 654 | ||
@@ -601,6 +670,13 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, | |||
601 | kfree(tz); | 670 | kfree(tz); |
602 | return ERR_PTR(result); | 671 | return ERR_PTR(result); |
603 | } | 672 | } |
673 | if (tz->id >= MAX_THERMAL_ZONES) { | ||
674 | printk(KERN_ERR PREFIX | ||
675 | "Too many thermal zones\n"); | ||
676 | release_idr(&thermal_tz_idr, &thermal_idr_lock, tz->id); | ||
677 | kfree(tz); | ||
678 | return ERR_PTR(-EINVAL); | ||
679 | } | ||
604 | 680 | ||
605 | strcpy(tz->type, type); | 681 | strcpy(tz->type, type); |
606 | tz->ops = ops; | 682 | tz->ops = ops; |
@@ -615,13 +691,28 @@ struct thermal_zone_device *thermal_zone_device_register(char *type, | |||
615 | return ERR_PTR(result); | 691 | return ERR_PTR(result); |
616 | } | 692 | } |
617 | 693 | ||
618 | /* sys I/F */ | 694 | /* hwmon sys I/F */ |
619 | if (type) { | 695 | result = device_create_file(thermal_hwmon, |
620 | result = device_create_file(&tz->device, &dev_attr_type); | 696 | &sensor_attrs[tz->id * 2].dev_attr); |
621 | if (result) | 697 | if (result) |
622 | goto unregister; | 698 | goto unregister; |
699 | |||
700 | if (trips > 0) { | ||
701 | char buf[40]; | ||
702 | result = tz->ops->get_trip_type(tz, 0, buf); | ||
703 | if (result > 0 && !strcmp(buf, "critical\n")) { | ||
704 | result = device_create_file(thermal_hwmon, | ||
705 | &sensor_attrs[tz->id * 2 + 1].dev_attr); | ||
706 | if (result) | ||
707 | goto unregister; | ||
708 | } | ||
623 | } | 709 | } |
624 | 710 | ||
711 | /* sys I/F */ | ||
712 | result = device_create_file(&tz->device, &dev_attr_type); | ||
713 | if (result) | ||
714 | goto unregister; | ||
715 | |||
625 | result = device_create_file(&tz->device, &dev_attr_temp); | 716 | result = device_create_file(&tz->device, &dev_attr_temp); |
626 | if (result) | 717 | if (result) |
627 | goto unregister; | 718 | goto unregister; |
@@ -687,8 +778,17 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) | |||
687 | tz->ops->unbind(tz, cdev); | 778 | tz->ops->unbind(tz, cdev); |
688 | mutex_unlock(&thermal_list_lock); | 779 | mutex_unlock(&thermal_list_lock); |
689 | 780 | ||
690 | if (tz->type[0]) | 781 | device_remove_file(thermal_hwmon, |
691 | device_remove_file(&tz->device, &dev_attr_type); | 782 | &sensor_attrs[tz->id * 2].dev_attr); |
783 | if (tz->trips > 0) { | ||
784 | char buf[40]; | ||
785 | if (tz->ops->get_trip_type(tz, 0, buf) > 0) | ||
786 | if (!strcmp(buf, "critical\n")) | ||
787 | device_remove_file(thermal_hwmon, | ||
788 | &sensor_attrs[tz->id * 2 + 1].dev_attr); | ||
789 | } | ||
790 | |||
791 | device_remove_file(&tz->device, &dev_attr_type); | ||
692 | device_remove_file(&tz->device, &dev_attr_temp); | 792 | device_remove_file(&tz->device, &dev_attr_temp); |
693 | if (tz->ops->get_mode) | 793 | if (tz->ops->get_mode) |
694 | device_remove_file(&tz->device, &dev_attr_mode); | 794 | device_remove_file(&tz->device, &dev_attr_mode); |
@@ -705,6 +805,19 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz) | |||
705 | 805 | ||
706 | EXPORT_SYMBOL(thermal_zone_device_unregister); | 806 | EXPORT_SYMBOL(thermal_zone_device_unregister); |
707 | 807 | ||
808 | static void thermal_exit(void) | ||
809 | { | ||
810 | if (thermal_hwmon) { | ||
811 | device_remove_file(thermal_hwmon, &dev_attr_name); | ||
812 | hwmon_device_unregister(thermal_hwmon); | ||
813 | } | ||
814 | class_unregister(&thermal_class); | ||
815 | idr_destroy(&thermal_tz_idr); | ||
816 | idr_destroy(&thermal_cdev_idr); | ||
817 | mutex_destroy(&thermal_idr_lock); | ||
818 | mutex_destroy(&thermal_list_lock); | ||
819 | } | ||
820 | |||
708 | static int __init thermal_init(void) | 821 | static int __init thermal_init(void) |
709 | { | 822 | { |
710 | int result = 0; | 823 | int result = 0; |
@@ -716,16 +829,20 @@ static int __init thermal_init(void) | |||
716 | mutex_destroy(&thermal_idr_lock); | 829 | mutex_destroy(&thermal_idr_lock); |
717 | mutex_destroy(&thermal_list_lock); | 830 | mutex_destroy(&thermal_list_lock); |
718 | } | 831 | } |
719 | return result; | ||
720 | } | ||
721 | 832 | ||
722 | static void __exit thermal_exit(void) | 833 | thermal_hwmon = hwmon_device_register(NULL); |
723 | { | 834 | if (IS_ERR(thermal_hwmon)) { |
724 | class_unregister(&thermal_class); | 835 | result = PTR_ERR(thermal_hwmon); |
725 | idr_destroy(&thermal_tz_idr); | 836 | thermal_hwmon = NULL; |
726 | idr_destroy(&thermal_cdev_idr); | 837 | printk(KERN_ERR PREFIX |
727 | mutex_destroy(&thermal_idr_lock); | 838 | "unable to register hwmon device\n"); |
728 | mutex_destroy(&thermal_list_lock); | 839 | thermal_exit(); |
840 | return result; | ||
841 | } | ||
842 | |||
843 | result = device_create_file(thermal_hwmon, &dev_attr_name); | ||
844 | |||
845 | return result; | ||
729 | } | 846 | } |
730 | 847 | ||
731 | subsys_initcall(thermal_init); | 848 | subsys_initcall(thermal_init); |
diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index c13955164686..6f45dd669b33 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig | |||
@@ -131,7 +131,7 @@ config USB_ATMEL_USBA | |||
131 | 131 | ||
132 | config USB_GADGET_FSL_USB2 | 132 | config USB_GADGET_FSL_USB2 |
133 | boolean "Freescale Highspeed USB DR Peripheral Controller" | 133 | boolean "Freescale Highspeed USB DR Peripheral Controller" |
134 | depends on MPC834x || PPC_MPC831x | 134 | depends on FSL_SOC |
135 | select USB_GADGET_DUALSPEED | 135 | select USB_GADGET_DUALSPEED |
136 | help | 136 | help |
137 | Some of Freescale PowerPC processors have a High Speed | 137 | Some of Freescale PowerPC processors have a High Speed |
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index b8ad55aff842..46ee7f4c0912 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -281,23 +281,44 @@ static void ehci_iaa_watchdog(unsigned long param) | |||
281 | { | 281 | { |
282 | struct ehci_hcd *ehci = (struct ehci_hcd *) param; | 282 | struct ehci_hcd *ehci = (struct ehci_hcd *) param; |
283 | unsigned long flags; | 283 | unsigned long flags; |
284 | u32 status, cmd; | ||
285 | 284 | ||
286 | spin_lock_irqsave (&ehci->lock, flags); | 285 | spin_lock_irqsave (&ehci->lock, flags); |
287 | WARN_ON(!ehci->reclaim); | ||
288 | 286 | ||
289 | status = ehci_readl(ehci, &ehci->regs->status); | 287 | /* Lost IAA irqs wedge things badly; seen first with a vt8235. |
290 | cmd = ehci_readl(ehci, &ehci->regs->command); | 288 | * So we need this watchdog, but must protect it against both |
291 | ehci_dbg(ehci, "IAA watchdog: status %x cmd %x\n", status, cmd); | 289 | * (a) SMP races against real IAA firing and retriggering, and |
292 | 290 | * (b) clean HC shutdown, when IAA watchdog was pending. | |
293 | /* lost IAA irqs wedge things badly; seen first with a vt8235 */ | 291 | */ |
294 | if (ehci->reclaim) { | 292 | if (ehci->reclaim |
295 | if (status & STS_IAA) { | 293 | && !timer_pending(&ehci->iaa_watchdog) |
296 | ehci_vdbg (ehci, "lost IAA\n"); | 294 | && HC_IS_RUNNING(ehci_to_hcd(ehci)->state)) { |
295 | u32 cmd, status; | ||
296 | |||
297 | /* If we get here, IAA is *REALLY* late. It's barely | ||
298 | * conceivable that the system is so busy that CMD_IAAD | ||
299 | * is still legitimately set, so let's be sure it's | ||
300 | * clear before we read STS_IAA. (The HC should clear | ||
301 | * CMD_IAAD when it sets STS_IAA.) | ||
302 | */ | ||
303 | cmd = ehci_readl(ehci, &ehci->regs->command); | ||
304 | if (cmd & CMD_IAAD) | ||
305 | ehci_writel(ehci, cmd & ~CMD_IAAD, | ||
306 | &ehci->regs->command); | ||
307 | |||
308 | /* If IAA is set here it either legitimately triggered | ||
309 | * before we cleared IAAD above (but _way_ late, so we'll | ||
310 | * still count it as lost) ... or a silicon erratum: | ||
311 | * - VIA seems to set IAA without triggering the IRQ; | ||
312 | * - IAAD potentially cleared without setting IAA. | ||
313 | */ | ||
314 | status = ehci_readl(ehci, &ehci->regs->status); | ||
315 | if ((status & STS_IAA) || !(cmd & CMD_IAAD)) { | ||
297 | COUNT (ehci->stats.lost_iaa); | 316 | COUNT (ehci->stats.lost_iaa); |
298 | ehci_writel(ehci, STS_IAA, &ehci->regs->status); | 317 | ehci_writel(ehci, STS_IAA, &ehci->regs->status); |
299 | } | 318 | } |
300 | ehci_writel(ehci, cmd & ~CMD_IAAD, &ehci->regs->command); | 319 | |
320 | ehci_vdbg(ehci, "IAA watchdog: status %x cmd %x\n", | ||
321 | status, cmd); | ||
301 | end_unlink_async(ehci); | 322 | end_unlink_async(ehci); |
302 | } | 323 | } |
303 | 324 | ||
@@ -631,7 +652,7 @@ static int ehci_run (struct usb_hcd *hcd) | |||
631 | static irqreturn_t ehci_irq (struct usb_hcd *hcd) | 652 | static irqreturn_t ehci_irq (struct usb_hcd *hcd) |
632 | { | 653 | { |
633 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); | 654 | struct ehci_hcd *ehci = hcd_to_ehci (hcd); |
634 | u32 status, pcd_status = 0; | 655 | u32 status, pcd_status = 0, cmd; |
635 | int bh; | 656 | int bh; |
636 | 657 | ||
637 | spin_lock (&ehci->lock); | 658 | spin_lock (&ehci->lock); |
@@ -652,7 +673,7 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
652 | 673 | ||
653 | /* clear (just) interrupts */ | 674 | /* clear (just) interrupts */ |
654 | ehci_writel(ehci, status, &ehci->regs->status); | 675 | ehci_writel(ehci, status, &ehci->regs->status); |
655 | ehci_readl(ehci, &ehci->regs->command); /* unblock posted write */ | 676 | cmd = ehci_readl(ehci, &ehci->regs->command); |
656 | bh = 0; | 677 | bh = 0; |
657 | 678 | ||
658 | #ifdef EHCI_VERBOSE_DEBUG | 679 | #ifdef EHCI_VERBOSE_DEBUG |
@@ -673,8 +694,17 @@ static irqreturn_t ehci_irq (struct usb_hcd *hcd) | |||
673 | 694 | ||
674 | /* complete the unlinking of some qh [4.15.2.3] */ | 695 | /* complete the unlinking of some qh [4.15.2.3] */ |
675 | if (status & STS_IAA) { | 696 | if (status & STS_IAA) { |
676 | COUNT (ehci->stats.reclaim); | 697 | /* guard against (alleged) silicon errata */ |
677 | end_unlink_async(ehci); | 698 | if (cmd & CMD_IAAD) { |
699 | ehci_writel(ehci, cmd & ~CMD_IAAD, | ||
700 | &ehci->regs->command); | ||
701 | ehci_dbg(ehci, "IAA with IAAD still set?\n"); | ||
702 | } | ||
703 | if (ehci->reclaim) { | ||
704 | COUNT(ehci->stats.reclaim); | ||
705 | end_unlink_async(ehci); | ||
706 | } else | ||
707 | ehci_dbg(ehci, "IAA with nothing to reclaim?\n"); | ||
678 | } | 708 | } |
679 | 709 | ||
680 | /* remote wakeup [4.3.1] */ | 710 | /* remote wakeup [4.3.1] */ |
@@ -781,7 +811,7 @@ static int ehci_urb_enqueue ( | |||
781 | static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) | 811 | static void unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh) |
782 | { | 812 | { |
783 | /* failfast */ | 813 | /* failfast */ |
784 | if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state)) | 814 | if (!HC_IS_RUNNING(ehci_to_hcd(ehci)->state) && ehci->reclaim) |
785 | end_unlink_async(ehci); | 815 | end_unlink_async(ehci); |
786 | 816 | ||
787 | /* if it's not linked then there's nothing to do */ | 817 | /* if it's not linked then there's nothing to do */ |
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 08c65c1a3771..779d07851a4d 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -94,6 +94,7 @@ static struct usb_device_id id_table_earthmate [] = { | |||
94 | 94 | ||
95 | static struct usb_device_id id_table_cyphidcomrs232 [] = { | 95 | static struct usb_device_id id_table_cyphidcomrs232 [] = { |
96 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, | 96 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, |
97 | { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, | ||
97 | { } /* Terminating entry */ | 98 | { } /* Terminating entry */ |
98 | }; | 99 | }; |
99 | 100 | ||
@@ -106,6 +107,7 @@ static struct usb_device_id id_table_combined [] = { | |||
106 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, | 107 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB) }, |
107 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, | 108 | { USB_DEVICE(VENDOR_ID_DELORME, PRODUCT_ID_EARTHMATEUSB_LT20) }, |
108 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, | 109 | { USB_DEVICE(VENDOR_ID_CYPRESS, PRODUCT_ID_CYPHIDCOM) }, |
110 | { USB_DEVICE(VENDOR_ID_POWERCOM, PRODUCT_ID_UPS) }, | ||
109 | { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) }, | 111 | { USB_DEVICE(VENDOR_ID_DAZZLE, PRODUCT_ID_CA42) }, |
110 | { } /* Terminating entry */ | 112 | { } /* Terminating entry */ |
111 | }; | 113 | }; |
diff --git a/drivers/usb/serial/cypress_m8.h b/drivers/usb/serial/cypress_m8.h index e1c7c27e18b7..0388065bb794 100644 --- a/drivers/usb/serial/cypress_m8.h +++ b/drivers/usb/serial/cypress_m8.h | |||
@@ -19,6 +19,10 @@ | |||
19 | #define VENDOR_ID_CYPRESS 0x04b4 | 19 | #define VENDOR_ID_CYPRESS 0x04b4 |
20 | #define PRODUCT_ID_CYPHIDCOM 0x5500 | 20 | #define PRODUCT_ID_CYPHIDCOM 0x5500 |
21 | 21 | ||
22 | /* Powercom UPS, chip CY7C63723 */ | ||
23 | #define VENDOR_ID_POWERCOM 0x0d9f | ||
24 | #define PRODUCT_ID_UPS 0x0002 | ||
25 | |||
22 | /* Nokia CA-42 USB to serial cable */ | 26 | /* Nokia CA-42 USB to serial cable */ |
23 | #define VENDOR_ID_DAZZLE 0x07d0 | 27 | #define VENDOR_ID_DAZZLE 0x07d0 |
24 | #define PRODUCT_ID_CA42 0x4101 | 28 | #define PRODUCT_ID_CA42 0x4101 |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 91dc433dbcf1..3abb3c863647 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -359,6 +359,7 @@ static struct usb_device_id id_table_combined [] = { | |||
359 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, | 359 | { USB_DEVICE(FTDI_VID, FTDI_MAXSTREAM_PID) }, |
360 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, | 360 | { USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) }, |
361 | { USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) }, | 361 | { USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) }, |
362 | { USB_DEVICE(FTDI_VID, FTDI_PROPOX_JTAGCABLEII_PID) }, | ||
362 | { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID), | 363 | { USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID), |
363 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, | 364 | .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, |
364 | { USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID), | 365 | { USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID), |
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h index e1eb742abcd5..6da539ede0ee 100644 --- a/drivers/usb/serial/ftdi_sio.h +++ b/drivers/usb/serial/ftdi_sio.h | |||
@@ -557,6 +557,9 @@ | |||
557 | #define TML_VID 0x1B91 /* Vendor ID */ | 557 | #define TML_VID 0x1B91 /* Vendor ID */ |
558 | #define TML_USB_SERIAL_PID 0x0064 /* USB - Serial Converter */ | 558 | #define TML_USB_SERIAL_PID 0x0064 /* USB - Serial Converter */ |
559 | 559 | ||
560 | /* Propox devices */ | ||
561 | #define FTDI_PROPOX_JTAGCABLEII_PID 0xD738 | ||
562 | |||
560 | /* Commands */ | 563 | /* Commands */ |
561 | #define FTDI_SIO_RESET 0 /* Reset the port */ | 564 | #define FTDI_SIO_RESET 0 /* Reset the port */ |
562 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ | 565 | #define FTDI_SIO_MODEM_CTRL 1 /* Set the modem control register */ |
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 97fa3c428435..7cfce9dabb90 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -323,7 +323,7 @@ static void flush_and_resubmit_read_urb (struct usb_serial_port *port) | |||
323 | room = tty_buffer_request_room(tty, urb->actual_length); | 323 | room = tty_buffer_request_room(tty, urb->actual_length); |
324 | if (room) { | 324 | if (room) { |
325 | tty_insert_flip_string(tty, urb->transfer_buffer, room); | 325 | tty_insert_flip_string(tty, urb->transfer_buffer, room); |
326 | tty_flip_buffer_push(tty); /* is this allowed from an URB callback ? */ | 326 | tty_flip_buffer_push(tty); |
327 | } | 327 | } |
328 | } | 328 | } |
329 | 329 | ||
@@ -349,10 +349,12 @@ void usb_serial_generic_read_bulk_callback (struct urb *urb) | |||
349 | 349 | ||
350 | /* Throttle the device if requested by tty */ | 350 | /* Throttle the device if requested by tty */ |
351 | spin_lock_irqsave(&port->lock, flags); | 351 | spin_lock_irqsave(&port->lock, flags); |
352 | if (!(port->throttled = port->throttle_req)) | 352 | if (!(port->throttled = port->throttle_req)) { |
353 | /* Handle data and continue reading from device */ | 353 | spin_unlock_irqrestore(&port->lock, flags); |
354 | flush_and_resubmit_read_urb(port); | 354 | flush_and_resubmit_read_urb(port); |
355 | spin_unlock_irqrestore(&port->lock, flags); | 355 | } else { |
356 | spin_unlock_irqrestore(&port->lock, flags); | ||
357 | } | ||
356 | } | 358 | } |
357 | EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); | 359 | EXPORT_SYMBOL_GPL(usb_serial_generic_read_bulk_callback); |
358 | 360 | ||
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 828a4377ec6a..a396fbbdc9c2 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -111,6 +111,42 @@ static int option_send_setup(struct usb_serial_port *port); | |||
111 | #define HUAWEI_PRODUCT_E220BIS 0x1004 | 111 | #define HUAWEI_PRODUCT_E220BIS 0x1004 |
112 | 112 | ||
113 | #define NOVATELWIRELESS_VENDOR_ID 0x1410 | 113 | #define NOVATELWIRELESS_VENDOR_ID 0x1410 |
114 | |||
115 | /* MERLIN EVDO PRODUCTS */ | ||
116 | #define NOVATELWIRELESS_PRODUCT_V640 0x1100 | ||
117 | #define NOVATELWIRELESS_PRODUCT_V620 0x1110 | ||
118 | #define NOVATELWIRELESS_PRODUCT_V740 0x1120 | ||
119 | #define NOVATELWIRELESS_PRODUCT_V720 0x1130 | ||
120 | |||
121 | /* MERLIN HSDPA/HSPA PRODUCTS */ | ||
122 | #define NOVATELWIRELESS_PRODUCT_U730 0x1400 | ||
123 | #define NOVATELWIRELESS_PRODUCT_U740 0x1410 | ||
124 | #define NOVATELWIRELESS_PRODUCT_U870 0x1420 | ||
125 | #define NOVATELWIRELESS_PRODUCT_XU870 0x1430 | ||
126 | #define NOVATELWIRELESS_PRODUCT_X950D 0x1450 | ||
127 | |||
128 | /* EXPEDITE PRODUCTS */ | ||
129 | #define NOVATELWIRELESS_PRODUCT_EV620 0x2100 | ||
130 | #define NOVATELWIRELESS_PRODUCT_ES720 0x2110 | ||
131 | #define NOVATELWIRELESS_PRODUCT_E725 0x2120 | ||
132 | #define NOVATELWIRELESS_PRODUCT_EU730 0x2400 | ||
133 | #define NOVATELWIRELESS_PRODUCT_EU740 0x2410 | ||
134 | #define NOVATELWIRELESS_PRODUCT_EU870D 0x2420 | ||
135 | |||
136 | /* OVATION PRODUCTS */ | ||
137 | #define NOVATELWIRELESS_PRODUCT_MC727 0x4100 | ||
138 | #define NOVATELWIRELESS_PRODUCT_MC950D 0x4400 | ||
139 | |||
140 | /* FUTURE NOVATEL PRODUCTS */ | ||
141 | #define NOVATELWIRELESS_PRODUCT_EVDO_1 0x6000 | ||
142 | #define NOVATELWIRELESS_PRODUCT_HSPA_1 0x7000 | ||
143 | #define NOVATELWIRELESS_PRODUCT_EMBEDDED_1 0x8000 | ||
144 | #define NOVATELWIRELESS_PRODUCT_GLOBAL_1 0x9000 | ||
145 | #define NOVATELWIRELESS_PRODUCT_EVDO_2 0x6001 | ||
146 | #define NOVATELWIRELESS_PRODUCT_HSPA_2 0x7001 | ||
147 | #define NOVATELWIRELESS_PRODUCT_EMBEDDED_2 0x8001 | ||
148 | #define NOVATELWIRELESS_PRODUCT_GLOBAL_2 0x9001 | ||
149 | |||
114 | #define DELL_VENDOR_ID 0x413C | 150 | #define DELL_VENDOR_ID 0x413C |
115 | 151 | ||
116 | #define KYOCERA_VENDOR_ID 0x0c88 | 152 | #define KYOCERA_VENDOR_ID 0x0c88 |
@@ -168,21 +204,34 @@ static struct usb_device_id option_ids[] = { | |||
168 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, | 204 | { USB_DEVICE(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E600) }, |
169 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, | 205 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220, 0xff, 0xff, 0xff) }, |
170 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, | 206 | { USB_DEVICE_AND_INTERFACE_INFO(HUAWEI_VENDOR_ID, HUAWEI_PRODUCT_E220BIS, 0xff, 0xff, 0xff) }, |
171 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1100) }, /* Novatel Merlin XS620/S640 */ | 207 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V640) }, /* Novatel Merlin V640/XV620 */ |
172 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1110) }, /* Novatel Merlin S620 */ | 208 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V620) }, /* Novatel Merlin V620/S620 */ |
173 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1120) }, /* Novatel Merlin EX720 */ | 209 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V740) }, /* Novatel Merlin EX720/V740/X720 */ |
174 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1130) }, /* Novatel Merlin S720 */ | 210 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_V720) }, /* Novatel Merlin V720/S720/PC720 */ |
175 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1400) }, /* Novatel U730 */ | 211 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U730) }, /* Novatel U730/U740 (VF version) */ |
176 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1410) }, /* Novatel U740 */ | 212 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U740) }, /* Novatel U740 */ |
177 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1420) }, /* Novatel EU870 */ | 213 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_U870) }, /* Novatel U870 */ |
178 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x1430) }, /* Novatel Merlin XU870 HSDPA/3G */ | 214 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_XU870) }, /* Novatel Merlin XU870 HSDPA/3G */ |
179 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2100) }, /* Novatel EV620 CDMA/EV-DO */ | 215 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_X950D) }, /* Novatel X950D */ |
180 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2110) }, /* Novatel Merlin ES620 / Merlin ES720 / Ovation U720 */ | 216 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EV620) }, /* Novatel EV620/ES620 CDMA/EV-DO */ |
217 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_ES720) }, /* Novatel ES620/ES720/U720/USB720 */ | ||
218 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_E725) }, /* Novatel E725/E726 */ | ||
181 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ | 219 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2130) }, /* Novatel Merlin ES620 SM Bus */ |
182 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x2410) }, /* Novatel EU740 */ | 220 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU730) }, /* Novatel EU730 and Vodafone EU740 */ |
183 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4100) }, /* Novatel U727 */ | 221 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU740) }, /* Novatel non-Vodafone EU740 */ |
184 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x4400) }, /* Novatel MC950 */ | 222 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EU870D) }, /* Novatel EU850D/EU860D/EU870D */ |
223 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC950D) }, /* Novatel MC930D/MC950D */ | ||
224 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_MC727) }, /* Novatel MC727/U727/USB727 */ | ||
185 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */ | 225 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, 0x5010) }, /* Novatel U727 */ |
226 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_1) }, /* Novatel EVDO product */ | ||
227 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_1) }, /* Novatel HSPA product */ | ||
228 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_1) }, /* Novatel Embedded product */ | ||
229 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_1) }, /* Novatel Global product */ | ||
230 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EVDO_2) }, /* Novatel EVDO product */ | ||
231 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_HSPA_2) }, /* Novatel HSPA product */ | ||
232 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_EMBEDDED_2) }, /* Novatel Embedded product */ | ||
233 | { USB_DEVICE(NOVATELWIRELESS_VENDOR_ID, NOVATELWIRELESS_PRODUCT_GLOBAL_2) }, /* Novatel Global product */ | ||
234 | |||
186 | { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ | 235 | { USB_DEVICE(DELL_VENDOR_ID, 0x8114) }, /* Dell Wireless 5700 Mobile Broadband CDMA/EVDO Mini-Card == Novatel Expedite EV620 CDMA/EV-DO */ |
187 | { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ | 236 | { USB_DEVICE(DELL_VENDOR_ID, 0x8115) }, /* Dell Wireless 5500 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
188 | { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ | 237 | { USB_DEVICE(DELL_VENDOR_ID, 0x8116) }, /* Dell Wireless 5505 Mobile Broadband HSDPA Mini-Card == Novatel Expedite EU740 HSDPA/3G */ |
diff --git a/drivers/usb/storage/sddr55.c b/drivers/usb/storage/sddr55.c index d43a3415e12f..6d14327c921d 100644 --- a/drivers/usb/storage/sddr55.c +++ b/drivers/usb/storage/sddr55.c | |||
@@ -522,8 +522,8 @@ int sddr55_reset(struct us_data *us) { | |||
522 | 522 | ||
523 | static unsigned long sddr55_get_capacity(struct us_data *us) { | 523 | static unsigned long sddr55_get_capacity(struct us_data *us) { |
524 | 524 | ||
525 | unsigned char manufacturerID; | 525 | unsigned char uninitialized_var(manufacturerID); |
526 | unsigned char deviceID; | 526 | unsigned char uninitialized_var(deviceID); |
527 | int result; | 527 | int result; |
528 | struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra; | 528 | struct sddr55_card_info *info = (struct sddr55_card_info *)us->extra; |
529 | 529 | ||
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 758435f8a6f8..e0b0580705e4 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig | |||
@@ -553,6 +553,19 @@ config FB_BF54X_LQ043 | |||
553 | help | 553 | help |
554 | This is the framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD | 554 | This is the framebuffer device driver for a SHARP LQ043T1DG01 TFT LCD |
555 | 555 | ||
556 | config FB_BFIN_T350MCQB | ||
557 | tristate "Varitronix COG-T350MCQB TFT LCD display (BF527 EZKIT)" | ||
558 | depends on FB && BLACKFIN | ||
559 | select BFIN_GPTIMERS | ||
560 | select FB_CFB_FILLRECT | ||
561 | select FB_CFB_COPYAREA | ||
562 | select FB_CFB_IMAGEBLIT | ||
563 | help | ||
564 | This is the framebuffer device driver for a Varitronix VL-PS-COG-T350MCQB-01 display TFT LCD | ||
565 | This display is a QVGA 320x240 24-bit RGB display interfaced by an 8-bit wide PPI | ||
566 | It uses PPI[0..7] PPI_FS1, PPI_FS2 and PPI_CLK. | ||
567 | |||
568 | |||
556 | config FB_STI | 569 | config FB_STI |
557 | tristate "HP STI frame buffer device support" | 570 | tristate "HP STI frame buffer device support" |
558 | depends on FB && PARISC | 571 | depends on FB && PARISC |
diff --git a/drivers/video/Makefile b/drivers/video/Makefile index 83e02b3429b6..03371c789039 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile | |||
@@ -122,6 +122,7 @@ obj-$(CONFIG_FB_EFI) += efifb.o | |||
122 | obj-$(CONFIG_FB_VGA16) += vga16fb.o | 122 | obj-$(CONFIG_FB_VGA16) += vga16fb.o |
123 | obj-$(CONFIG_FB_OF) += offb.o | 123 | obj-$(CONFIG_FB_OF) += offb.o |
124 | obj-$(CONFIG_FB_BF54X_LQ043) += bf54x-lq043fb.o | 124 | obj-$(CONFIG_FB_BF54X_LQ043) += bf54x-lq043fb.o |
125 | obj-$(CONFIG_FB_BFIN_T350MCQB) += bfin-t350mcqb-fb.o | ||
125 | 126 | ||
126 | # the test framebuffer is last | 127 | # the test framebuffer is last |
127 | obj-$(CONFIG_FB_VIRTUAL) += vfb.o | 128 | obj-$(CONFIG_FB_VIRTUAL) += vfb.o |
diff --git a/drivers/video/bf54x-lq043fb.c b/drivers/video/bf54x-lq043fb.c index 0ce791e6f79c..986a550c0439 100644 --- a/drivers/video/bf54x-lq043fb.c +++ b/drivers/video/bf54x-lq043fb.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * | 8 | * |
9 | * | 9 | * |
10 | * Modified: | 10 | * Modified: |
11 | * Copyright 2004-2007 Analog Devices Inc. | 11 | * Copyright 2007-2008 Analog Devices Inc. |
12 | * | 12 | * |
13 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 13 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
14 | * | 14 | * |
@@ -241,7 +241,7 @@ static int request_ports(struct bfin_bf54xfb_info *fbi) | |||
241 | u16 eppi_req_18[] = EPPI0_18; | 241 | u16 eppi_req_18[] = EPPI0_18; |
242 | u16 disp = fbi->mach_info->disp; | 242 | u16 disp = fbi->mach_info->disp; |
243 | 243 | ||
244 | if (gpio_request(disp, NULL)) { | 244 | if (gpio_request(disp, DRIVER_NAME)) { |
245 | printk(KERN_ERR "Requesting GPIO %d faild\n", disp); | 245 | printk(KERN_ERR "Requesting GPIO %d faild\n", disp); |
246 | return -EFAULT; | 246 | return -EFAULT; |
247 | } | 247 | } |
@@ -672,7 +672,7 @@ static int __init bfin_bf54x_probe(struct platform_device *pdev) | |||
672 | &bfin_lq043fb_bl_ops); | 672 | &bfin_lq043fb_bl_ops); |
673 | bl_dev->props.max_brightness = 255; | 673 | bl_dev->props.max_brightness = 255; |
674 | 674 | ||
675 | lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops); | 675 | lcd_dev = lcd_device_register(DRIVER_NAME, &pdev->dev, NULL, &bfin_lcd_ops); |
676 | lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n"); | 676 | lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n"); |
677 | #endif | 677 | #endif |
678 | 678 | ||
diff --git a/drivers/video/bfin-t350mcqb-fb.c b/drivers/video/bfin-t350mcqb-fb.c new file mode 100644 index 000000000000..a2bb2de9e020 --- /dev/null +++ b/drivers/video/bfin-t350mcqb-fb.c | |||
@@ -0,0 +1,685 @@ | |||
1 | /* | ||
2 | * File: drivers/video/bfin-t350mcqb-fb.c | ||
3 | * Based on: | ||
4 | * Author: Michael Hennerich <hennerich@blackfin.uclinux.org> | ||
5 | * | ||
6 | * Created: | ||
7 | * Description: Blackfin LCD Framebufer driver | ||
8 | * | ||
9 | * | ||
10 | * Modified: | ||
11 | * Copyright 2004-2007 Analog Devices Inc. | ||
12 | * | ||
13 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | ||
14 | * | ||
15 | * This program is free software; you can redistribute it and/or modify | ||
16 | * it under the terms of the GNU General Public License as published by | ||
17 | * the Free Software Foundation; either version 2 of the License, or | ||
18 | * (at your option) any later version. | ||
19 | * | ||
20 | * This program is distributed in the hope that it will be useful, | ||
21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
23 | * GNU General Public License for more details. | ||
24 | * | ||
25 | * You should have received a copy of the GNU General Public License | ||
26 | * along with this program; if not, see the file COPYING, or write | ||
27 | * to the Free Software Foundation, Inc., | ||
28 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
29 | */ | ||
30 | |||
31 | #include <linux/module.h> | ||
32 | #include <linux/kernel.h> | ||
33 | #include <linux/errno.h> | ||
34 | #include <linux/string.h> | ||
35 | #include <linux/fb.h> | ||
36 | #include <linux/init.h> | ||
37 | #include <linux/types.h> | ||
38 | #include <linux/interrupt.h> | ||
39 | #include <linux/device.h> | ||
40 | #include <linux/backlight.h> | ||
41 | #include <linux/lcd.h> | ||
42 | #include <linux/dma-mapping.h> | ||
43 | #include <linux/platform_device.h> | ||
44 | |||
45 | #include <asm/blackfin.h> | ||
46 | #include <asm/irq.h> | ||
47 | #include <asm/dma-mapping.h> | ||
48 | #include <asm/dma.h> | ||
49 | #include <asm/portmux.h> | ||
50 | #include <asm/gptimers.h> | ||
51 | |||
52 | #define NO_BL_SUPPORT | ||
53 | |||
54 | #define LCD_X_RES 320 /* Horizontal Resolution */ | ||
55 | #define LCD_Y_RES 240 /* Vertical Resolution */ | ||
56 | #define LCD_BPP 24 /* Bit Per Pixel */ | ||
57 | |||
58 | #define DMA_BUS_SIZE 16 | ||
59 | #define LCD_CLK (12*1000*1000) /* 12MHz */ | ||
60 | |||
61 | #define CLOCKS_PER_PIX 3 | ||
62 | |||
63 | /* | ||
64 | * HS and VS timing parameters (all in number of PPI clk ticks) | ||
65 | */ | ||
66 | |||
67 | #define U_LINE 1 /* Blanking Lines */ | ||
68 | |||
69 | #define H_ACTPIX (LCD_X_RES * CLOCKS_PER_PIX) /* active horizontal pixel */ | ||
70 | #define H_PERIOD (408 * CLOCKS_PER_PIX) /* HS period */ | ||
71 | #define H_PULSE 90 /* HS pulse width */ | ||
72 | #define H_START 204 /* first valid pixel */ | ||
73 | |||
74 | #define V_LINES (LCD_Y_RES + U_LINE) /* total vertical lines */ | ||
75 | #define V_PULSE (3 * H_PERIOD) /* VS pulse width (1-5 H_PERIODs) */ | ||
76 | #define V_PERIOD (H_PERIOD * V_LINES) /* VS period */ | ||
77 | |||
78 | #define ACTIVE_VIDEO_MEM_OFFSET (U_LINE * H_ACTPIX) | ||
79 | |||
80 | #define BFIN_LCD_NBR_PALETTE_ENTRIES 256 | ||
81 | |||
82 | #define DRIVER_NAME "bfin-t350mcqb" | ||
83 | static char driver_name[] = DRIVER_NAME; | ||
84 | |||
85 | struct bfin_t350mcqbfb_info { | ||
86 | struct fb_info *fb; | ||
87 | struct device *dev; | ||
88 | unsigned char *fb_buffer; /* RGB Buffer */ | ||
89 | dma_addr_t dma_handle; | ||
90 | int lq043_mmap; | ||
91 | int lq043_open_cnt; | ||
92 | int irq; | ||
93 | spinlock_t lock; /* lock */ | ||
94 | }; | ||
95 | |||
96 | static int nocursor; | ||
97 | module_param(nocursor, int, 0644); | ||
98 | MODULE_PARM_DESC(nocursor, "cursor enable/disable"); | ||
99 | |||
100 | #define PPI_TX_MODE 0x2 | ||
101 | #define PPI_XFER_TYPE_11 0xC | ||
102 | #define PPI_PORT_CFG_01 0x10 | ||
103 | #define PPI_PACK_EN 0x80 | ||
104 | #define PPI_POLS_1 0x8000 | ||
105 | |||
106 | static void bfin_t350mcqb_config_ppi(struct bfin_t350mcqbfb_info *fbi) | ||
107 | { | ||
108 | bfin_write_PPI_DELAY(H_START); | ||
109 | bfin_write_PPI_COUNT(H_ACTPIX-1); | ||
110 | bfin_write_PPI_FRAME(V_LINES); | ||
111 | |||
112 | bfin_write_PPI_CONTROL(PPI_TX_MODE | /* output mode , PORT_DIR */ | ||
113 | PPI_XFER_TYPE_11 | /* sync mode XFR_TYPE */ | ||
114 | PPI_PORT_CFG_01 | /* two frame sync PORT_CFG */ | ||
115 | PPI_PACK_EN | /* packing enabled PACK_EN */ | ||
116 | PPI_POLS_1); /* faling edge syncs POLS */ | ||
117 | } | ||
118 | |||
119 | static inline void bfin_t350mcqb_disable_ppi(void) | ||
120 | { | ||
121 | bfin_write_PPI_CONTROL(bfin_read_PPI_CONTROL() & ~PORT_EN); | ||
122 | } | ||
123 | |||
124 | static inline void bfin_t350mcqb_enable_ppi(void) | ||
125 | { | ||
126 | bfin_write_PPI_CONTROL(bfin_read_PPI_CONTROL() | PORT_EN); | ||
127 | } | ||
128 | |||
129 | static void bfin_t350mcqb_start_timers(void) | ||
130 | { | ||
131 | unsigned long flags; | ||
132 | |||
133 | local_irq_save(flags); | ||
134 | enable_gptimers(TIMER1bit); | ||
135 | enable_gptimers(TIMER0bit); | ||
136 | local_irq_restore(flags); | ||
137 | } | ||
138 | |||
139 | static void bfin_t350mcqb_stop_timers(void) | ||
140 | { | ||
141 | disable_gptimers(TIMER0bit | TIMER1bit); | ||
142 | |||
143 | set_gptimer_status(0, TIMER_STATUS_TRUN0 | TIMER_STATUS_TRUN1 | | ||
144 | TIMER_STATUS_TIMIL0 | TIMER_STATUS_TIMIL1 | | ||
145 | TIMER_STATUS_TOVF0 | TIMER_STATUS_TOVF1); | ||
146 | |||
147 | } | ||
148 | |||
149 | static void bfin_t350mcqb_init_timers(void) | ||
150 | { | ||
151 | |||
152 | bfin_t350mcqb_stop_timers(); | ||
153 | |||
154 | set_gptimer_period(TIMER0_id, H_PERIOD); | ||
155 | set_gptimer_pwidth(TIMER0_id, H_PULSE); | ||
156 | set_gptimer_config(TIMER0_id, TIMER_MODE_PWM | TIMER_PERIOD_CNT | | ||
157 | TIMER_TIN_SEL | TIMER_CLK_SEL| | ||
158 | TIMER_EMU_RUN); | ||
159 | |||
160 | set_gptimer_period(TIMER1_id, V_PERIOD); | ||
161 | set_gptimer_pwidth(TIMER1_id, V_PULSE); | ||
162 | set_gptimer_config(TIMER1_id, TIMER_MODE_PWM | TIMER_PERIOD_CNT | | ||
163 | TIMER_TIN_SEL | TIMER_CLK_SEL | | ||
164 | TIMER_EMU_RUN); | ||
165 | |||
166 | } | ||
167 | |||
168 | static void bfin_t350mcqb_config_dma(struct bfin_t350mcqbfb_info *fbi) | ||
169 | { | ||
170 | |||
171 | set_dma_config(CH_PPI, | ||
172 | set_bfin_dma_config(DIR_READ, DMA_FLOW_AUTO, | ||
173 | INTR_DISABLE, DIMENSION_2D, | ||
174 | DATA_SIZE_16, | ||
175 | DMA_NOSYNC_KEEP_DMA_BUF)); | ||
176 | set_dma_x_count(CH_PPI, (LCD_X_RES * LCD_BPP) / DMA_BUS_SIZE); | ||
177 | set_dma_x_modify(CH_PPI, DMA_BUS_SIZE / 8); | ||
178 | set_dma_y_count(CH_PPI, V_LINES); | ||
179 | |||
180 | set_dma_y_modify(CH_PPI, DMA_BUS_SIZE / 8); | ||
181 | set_dma_start_addr(CH_PPI, (unsigned long)fbi->fb_buffer); | ||
182 | |||
183 | } | ||
184 | |||
185 | static int bfin_t350mcqb_request_ports(int action) | ||
186 | { | ||
187 | u16 ppi0_req_8[] = {P_PPI0_CLK, P_PPI0_FS1, P_PPI0_FS2, | ||
188 | P_PPI0_D0, P_PPI0_D1, P_PPI0_D2, | ||
189 | P_PPI0_D3, P_PPI0_D4, P_PPI0_D5, | ||
190 | P_PPI0_D6, P_PPI0_D7, 0}; | ||
191 | |||
192 | if (action) { | ||
193 | if (peripheral_request_list(ppi0_req_8, DRIVER_NAME)) { | ||
194 | printk(KERN_ERR "Requesting Peripherals faild\n"); | ||
195 | return -EFAULT; | ||
196 | } | ||
197 | } else | ||
198 | peripheral_free_list(ppi0_req_8); | ||
199 | |||
200 | return 0; | ||
201 | } | ||
202 | |||
203 | static int bfin_t350mcqb_fb_open(struct fb_info *info, int user) | ||
204 | { | ||
205 | struct bfin_t350mcqbfb_info *fbi = info->par; | ||
206 | |||
207 | spin_lock(&fbi->lock); | ||
208 | fbi->lq043_open_cnt++; | ||
209 | |||
210 | if (fbi->lq043_open_cnt <= 1) { | ||
211 | |||
212 | bfin_t350mcqb_disable_ppi(); | ||
213 | SSYNC(); | ||
214 | |||
215 | bfin_t350mcqb_config_dma(fbi); | ||
216 | bfin_t350mcqb_config_ppi(fbi); | ||
217 | bfin_t350mcqb_init_timers(); | ||
218 | |||
219 | /* start dma */ | ||
220 | enable_dma(CH_PPI); | ||
221 | bfin_t350mcqb_enable_ppi(); | ||
222 | bfin_t350mcqb_start_timers(); | ||
223 | } | ||
224 | |||
225 | spin_unlock(&fbi->lock); | ||
226 | |||
227 | return 0; | ||
228 | } | ||
229 | |||
230 | static int bfin_t350mcqb_fb_release(struct fb_info *info, int user) | ||
231 | { | ||
232 | struct bfin_t350mcqbfb_info *fbi = info->par; | ||
233 | |||
234 | spin_lock(&fbi->lock); | ||
235 | |||
236 | fbi->lq043_open_cnt--; | ||
237 | fbi->lq043_mmap = 0; | ||
238 | |||
239 | if (fbi->lq043_open_cnt <= 0) { | ||
240 | bfin_t350mcqb_disable_ppi(); | ||
241 | SSYNC(); | ||
242 | disable_dma(CH_PPI); | ||
243 | bfin_t350mcqb_stop_timers(); | ||
244 | memset(fbi->fb_buffer, 0, info->fix.smem_len); | ||
245 | } | ||
246 | |||
247 | spin_unlock(&fbi->lock); | ||
248 | |||
249 | return 0; | ||
250 | } | ||
251 | |||
252 | static int bfin_t350mcqb_fb_check_var(struct fb_var_screeninfo *var, | ||
253 | struct fb_info *info) | ||
254 | { | ||
255 | |||
256 | if (var->bits_per_pixel != LCD_BPP) { | ||
257 | pr_debug("%s: depth not supported: %u BPP\n", __FUNCTION__, | ||
258 | var->bits_per_pixel); | ||
259 | return -EINVAL; | ||
260 | } | ||
261 | |||
262 | if (info->var.xres != var->xres || info->var.yres != var->yres || | ||
263 | info->var.xres_virtual != var->xres_virtual || | ||
264 | info->var.yres_virtual != var->yres_virtual) { | ||
265 | pr_debug("%s: Resolution not supported: X%u x Y%u \n", | ||
266 | __FUNCTION__, var->xres, var->yres); | ||
267 | return -EINVAL; | ||
268 | } | ||
269 | |||
270 | /* | ||
271 | * Memory limit | ||
272 | */ | ||
273 | |||
274 | if ((info->fix.line_length * var->yres_virtual) > info->fix.smem_len) { | ||
275 | pr_debug("%s: Memory Limit requested yres_virtual = %u\n", | ||
276 | __FUNCTION__, var->yres_virtual); | ||
277 | return -ENOMEM; | ||
278 | } | ||
279 | |||
280 | return 0; | ||
281 | } | ||
282 | |||
283 | static int bfin_t350mcqb_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) | ||
284 | { | ||
285 | struct bfin_t350mcqbfb_info *fbi = info->par; | ||
286 | |||
287 | if (fbi->lq043_mmap) | ||
288 | return -1; | ||
289 | |||
290 | spin_lock(&fbi->lock); | ||
291 | fbi->lq043_mmap = 1; | ||
292 | spin_unlock(&fbi->lock); | ||
293 | |||
294 | vma->vm_start = (unsigned long)(fbi->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET); | ||
295 | |||
296 | vma->vm_end = vma->vm_start + info->fix.smem_len; | ||
297 | /* For those who don't understand how mmap works, go read | ||
298 | * Documentation/nommu-mmap.txt. | ||
299 | * For those that do, you will know that the VM_MAYSHARE flag | ||
300 | * must be set in the vma->vm_flags structure on noMMU | ||
301 | * Other flags can be set, and are documented in | ||
302 | * include/linux/mm.h | ||
303 | */ | ||
304 | vma->vm_flags |= VM_MAYSHARE; | ||
305 | |||
306 | return 0; | ||
307 | } | ||
308 | |||
309 | int bfin_t350mcqb_fb_cursor(struct fb_info *info, struct fb_cursor *cursor) | ||
310 | { | ||
311 | if (nocursor) | ||
312 | return 0; | ||
313 | else | ||
314 | return -EINVAL; /* just to force soft_cursor() call */ | ||
315 | } | ||
316 | |||
317 | static int bfin_t350mcqb_fb_setcolreg(u_int regno, u_int red, u_int green, | ||
318 | u_int blue, u_int transp, | ||
319 | struct fb_info *info) | ||
320 | { | ||
321 | if (regno >= BFIN_LCD_NBR_PALETTE_ENTRIES) | ||
322 | return -EINVAL; | ||
323 | |||
324 | if (info->var.grayscale) { | ||
325 | /* grayscale = 0.30*R + 0.59*G + 0.11*B */ | ||
326 | red = green = blue = (red * 77 + green * 151 + blue * 28) >> 8; | ||
327 | } | ||
328 | |||
329 | if (info->fix.visual == FB_VISUAL_TRUECOLOR) { | ||
330 | |||
331 | u32 value; | ||
332 | /* Place color in the pseudopalette */ | ||
333 | if (regno > 16) | ||
334 | return -EINVAL; | ||
335 | |||
336 | red >>= (16 - info->var.red.length); | ||
337 | green >>= (16 - info->var.green.length); | ||
338 | blue >>= (16 - info->var.blue.length); | ||
339 | |||
340 | value = (red << info->var.red.offset) | | ||
341 | (green << info->var.green.offset) | | ||
342 | (blue << info->var.blue.offset); | ||
343 | value &= 0xFFFFFF; | ||
344 | |||
345 | ((u32 *) (info->pseudo_palette))[regno] = value; | ||
346 | |||
347 | } | ||
348 | |||
349 | return 0; | ||
350 | } | ||
351 | |||
352 | static struct fb_ops bfin_t350mcqb_fb_ops = { | ||
353 | .owner = THIS_MODULE, | ||
354 | .fb_open = bfin_t350mcqb_fb_open, | ||
355 | .fb_release = bfin_t350mcqb_fb_release, | ||
356 | .fb_check_var = bfin_t350mcqb_fb_check_var, | ||
357 | .fb_fillrect = cfb_fillrect, | ||
358 | .fb_copyarea = cfb_copyarea, | ||
359 | .fb_imageblit = cfb_imageblit, | ||
360 | .fb_mmap = bfin_t350mcqb_fb_mmap, | ||
361 | .fb_cursor = bfin_t350mcqb_fb_cursor, | ||
362 | .fb_setcolreg = bfin_t350mcqb_fb_setcolreg, | ||
363 | }; | ||
364 | |||
365 | #ifndef NO_BL_SUPPORT | ||
366 | static int bl_get_brightness(struct backlight_device *bd) | ||
367 | { | ||
368 | return 0; | ||
369 | } | ||
370 | |||
371 | static struct backlight_ops bfin_lq043fb_bl_ops = { | ||
372 | .get_brightness = bl_get_brightness, | ||
373 | }; | ||
374 | |||
375 | static struct backlight_device *bl_dev; | ||
376 | |||
377 | static int bfin_lcd_get_power(struct lcd_device *dev) | ||
378 | { | ||
379 | return 0; | ||
380 | } | ||
381 | |||
382 | static int bfin_lcd_set_power(struct lcd_device *dev, int power) | ||
383 | { | ||
384 | return 0; | ||
385 | } | ||
386 | |||
387 | static int bfin_lcd_get_contrast(struct lcd_device *dev) | ||
388 | { | ||
389 | return 0; | ||
390 | } | ||
391 | |||
392 | static int bfin_lcd_set_contrast(struct lcd_device *dev, int contrast) | ||
393 | { | ||
394 | |||
395 | return 0; | ||
396 | } | ||
397 | |||
398 | static int bfin_lcd_check_fb(struct fb_info *fi) | ||
399 | { | ||
400 | if (!fi || (fi == &bfin_t350mcqb_fb)) | ||
401 | return 1; | ||
402 | return 0; | ||
403 | } | ||
404 | |||
405 | static struct lcd_ops bfin_lcd_ops = { | ||
406 | .get_power = bfin_lcd_get_power, | ||
407 | .set_power = bfin_lcd_set_power, | ||
408 | .get_contrast = bfin_lcd_get_contrast, | ||
409 | .set_contrast = bfin_lcd_set_contrast, | ||
410 | .check_fb = bfin_lcd_check_fb, | ||
411 | }; | ||
412 | |||
413 | static struct lcd_device *lcd_dev; | ||
414 | #endif | ||
415 | |||
416 | static irqreturn_t bfin_t350mcqb_irq_error(int irq, void *dev_id) | ||
417 | { | ||
418 | /*struct bfin_t350mcqbfb_info *info = (struct bfin_t350mcqbfb_info *)dev_id;*/ | ||
419 | |||
420 | u16 status = bfin_read_PPI_STATUS(); | ||
421 | bfin_write_PPI_STATUS(0xFFFF); | ||
422 | |||
423 | if (status) { | ||
424 | bfin_t350mcqb_disable_ppi(); | ||
425 | disable_dma(CH_PPI); | ||
426 | |||
427 | /* start dma */ | ||
428 | enable_dma(CH_PPI); | ||
429 | bfin_t350mcqb_enable_ppi(); | ||
430 | bfin_write_PPI_STATUS(0xFFFF); | ||
431 | } | ||
432 | |||
433 | return IRQ_HANDLED; | ||
434 | } | ||
435 | |||
436 | static int __init bfin_t350mcqb_probe(struct platform_device *pdev) | ||
437 | { | ||
438 | struct bfin_t350mcqbfb_info *info; | ||
439 | struct fb_info *fbinfo; | ||
440 | int ret; | ||
441 | |||
442 | printk(KERN_INFO DRIVER_NAME ": %dx%d %d-bit RGB FrameBuffer initializing...\n", | ||
443 | LCD_X_RES, LCD_Y_RES, LCD_BPP); | ||
444 | |||
445 | if (request_dma(CH_PPI, "CH_PPI") < 0) { | ||
446 | printk(KERN_ERR DRIVER_NAME | ||
447 | ": couldn't request CH_PPI DMA\n"); | ||
448 | ret = -EFAULT; | ||
449 | goto out1; | ||
450 | } | ||
451 | |||
452 | fbinfo = | ||
453 | framebuffer_alloc(sizeof(struct bfin_t350mcqbfb_info), &pdev->dev); | ||
454 | if (!fbinfo) { | ||
455 | ret = -ENOMEM; | ||
456 | goto out2; | ||
457 | } | ||
458 | |||
459 | info = fbinfo->par; | ||
460 | info->fb = fbinfo; | ||
461 | info->dev = &pdev->dev; | ||
462 | |||
463 | platform_set_drvdata(pdev, fbinfo); | ||
464 | |||
465 | strcpy(fbinfo->fix.id, driver_name); | ||
466 | |||
467 | fbinfo->fix.type = FB_TYPE_PACKED_PIXELS; | ||
468 | fbinfo->fix.type_aux = 0; | ||
469 | fbinfo->fix.xpanstep = 0; | ||
470 | fbinfo->fix.ypanstep = 0; | ||
471 | fbinfo->fix.ywrapstep = 0; | ||
472 | fbinfo->fix.accel = FB_ACCEL_NONE; | ||
473 | fbinfo->fix.visual = FB_VISUAL_TRUECOLOR; | ||
474 | |||
475 | fbinfo->var.nonstd = 0; | ||
476 | fbinfo->var.activate = FB_ACTIVATE_NOW; | ||
477 | fbinfo->var.height = -1; | ||
478 | fbinfo->var.width = -1; | ||
479 | fbinfo->var.accel_flags = 0; | ||
480 | fbinfo->var.vmode = FB_VMODE_NONINTERLACED; | ||
481 | |||
482 | fbinfo->var.xres = LCD_X_RES; | ||
483 | fbinfo->var.xres_virtual = LCD_X_RES; | ||
484 | fbinfo->var.yres = LCD_Y_RES; | ||
485 | fbinfo->var.yres_virtual = LCD_Y_RES; | ||
486 | fbinfo->var.bits_per_pixel = LCD_BPP; | ||
487 | |||
488 | fbinfo->var.red.offset = 0; | ||
489 | fbinfo->var.green.offset = 8; | ||
490 | fbinfo->var.blue.offset = 16; | ||
491 | fbinfo->var.transp.offset = 0; | ||
492 | fbinfo->var.red.length = 8; | ||
493 | fbinfo->var.green.length = 8; | ||
494 | fbinfo->var.blue.length = 8; | ||
495 | fbinfo->var.transp.length = 0; | ||
496 | fbinfo->fix.smem_len = LCD_X_RES * LCD_Y_RES * LCD_BPP / 8; | ||
497 | |||
498 | fbinfo->fix.line_length = fbinfo->var.xres_virtual * | ||
499 | fbinfo->var.bits_per_pixel / 8; | ||
500 | |||
501 | |||
502 | fbinfo->fbops = &bfin_t350mcqb_fb_ops; | ||
503 | fbinfo->flags = FBINFO_FLAG_DEFAULT; | ||
504 | |||
505 | info->fb_buffer = | ||
506 | dma_alloc_coherent(NULL, fbinfo->fix.smem_len, &info->dma_handle, | ||
507 | GFP_KERNEL); | ||
508 | |||
509 | if (NULL == info->fb_buffer) { | ||
510 | printk(KERN_ERR DRIVER_NAME | ||
511 | ": couldn't allocate dma buffer.\n"); | ||
512 | ret = -ENOMEM; | ||
513 | goto out3; | ||
514 | } | ||
515 | |||
516 | memset(info->fb_buffer, 0, fbinfo->fix.smem_len); | ||
517 | |||
518 | fbinfo->screen_base = (void *)info->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET; | ||
519 | fbinfo->fix.smem_start = (int)info->fb_buffer + ACTIVE_VIDEO_MEM_OFFSET; | ||
520 | |||
521 | fbinfo->fbops = &bfin_t350mcqb_fb_ops; | ||
522 | |||
523 | fbinfo->pseudo_palette = kmalloc(sizeof(u32) * 16, GFP_KERNEL); | ||
524 | if (!fbinfo->pseudo_palette) { | ||
525 | printk(KERN_ERR DRIVER_NAME | ||
526 | "Fail to allocate pseudo_palette\n"); | ||
527 | |||
528 | ret = -ENOMEM; | ||
529 | goto out4; | ||
530 | } | ||
531 | |||
532 | memset(fbinfo->pseudo_palette, 0, sizeof(u32) * 16); | ||
533 | |||
534 | if (fb_alloc_cmap(&fbinfo->cmap, BFIN_LCD_NBR_PALETTE_ENTRIES, 0) | ||
535 | < 0) { | ||
536 | printk(KERN_ERR DRIVER_NAME | ||
537 | "Fail to allocate colormap (%d entries)\n", | ||
538 | BFIN_LCD_NBR_PALETTE_ENTRIES); | ||
539 | ret = -EFAULT; | ||
540 | goto out5; | ||
541 | } | ||
542 | |||
543 | if (bfin_t350mcqb_request_ports(1)) { | ||
544 | printk(KERN_ERR DRIVER_NAME ": couldn't request gpio port.\n"); | ||
545 | ret = -EFAULT; | ||
546 | goto out6; | ||
547 | } | ||
548 | |||
549 | info->irq = platform_get_irq(pdev, 0); | ||
550 | if (info->irq < 0) { | ||
551 | ret = -EINVAL; | ||
552 | goto out7; | ||
553 | } | ||
554 | |||
555 | if (request_irq(info->irq, (void *)bfin_t350mcqb_irq_error, IRQF_DISABLED, | ||
556 | "PPI ERROR", info) < 0) { | ||
557 | printk(KERN_ERR DRIVER_NAME | ||
558 | ": unable to request PPI ERROR IRQ\n"); | ||
559 | ret = -EFAULT; | ||
560 | goto out7; | ||
561 | } | ||
562 | |||
563 | if (register_framebuffer(fbinfo) < 0) { | ||
564 | printk(KERN_ERR DRIVER_NAME | ||
565 | ": unable to register framebuffer.\n"); | ||
566 | ret = -EINVAL; | ||
567 | goto out8; | ||
568 | } | ||
569 | #ifndef NO_BL_SUPPORT | ||
570 | bl_dev = | ||
571 | backlight_device_register("bf52x-bl", NULL, NULL, | ||
572 | &bfin_lq043fb_bl_ops); | ||
573 | bl_dev->props.max_brightness = 255; | ||
574 | |||
575 | lcd_dev = lcd_device_register(DRIVER_NAME, NULL, &bfin_lcd_ops); | ||
576 | lcd_dev->props.max_contrast = 255, printk(KERN_INFO "Done.\n"); | ||
577 | #endif | ||
578 | |||
579 | return 0; | ||
580 | |||
581 | out8: | ||
582 | free_irq(info->irq, info); | ||
583 | out7: | ||
584 | bfin_t350mcqb_request_ports(0); | ||
585 | out6: | ||
586 | fb_dealloc_cmap(&fbinfo->cmap); | ||
587 | out5: | ||
588 | kfree(fbinfo->pseudo_palette); | ||
589 | out4: | ||
590 | dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, | ||
591 | info->dma_handle); | ||
592 | out3: | ||
593 | framebuffer_release(fbinfo); | ||
594 | out2: | ||
595 | free_dma(CH_PPI); | ||
596 | out1: | ||
597 | platform_set_drvdata(pdev, NULL); | ||
598 | |||
599 | return ret; | ||
600 | } | ||
601 | |||
602 | static int bfin_t350mcqb_remove(struct platform_device *pdev) | ||
603 | { | ||
604 | |||
605 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | ||
606 | struct bfin_t350mcqbfb_info *info = fbinfo->par; | ||
607 | |||
608 | free_dma(CH_PPI); | ||
609 | free_irq(info->irq, info); | ||
610 | |||
611 | if (info->fb_buffer != NULL) | ||
612 | dma_free_coherent(NULL, fbinfo->fix.smem_len, info->fb_buffer, | ||
613 | info->dma_handle); | ||
614 | |||
615 | kfree(fbinfo->pseudo_palette); | ||
616 | fb_dealloc_cmap(&fbinfo->cmap); | ||
617 | |||
618 | #ifndef NO_BL_SUPPORT | ||
619 | lcd_device_unregister(lcd_dev); | ||
620 | backlight_device_unregister(bl_dev); | ||
621 | #endif | ||
622 | |||
623 | unregister_framebuffer(fbinfo); | ||
624 | |||
625 | bfin_t350mcqb_request_ports(0); | ||
626 | |||
627 | printk(KERN_INFO DRIVER_NAME ": Unregister LCD driver.\n"); | ||
628 | |||
629 | return 0; | ||
630 | } | ||
631 | |||
632 | #ifdef CONFIG_PM | ||
633 | static int bfin_t350mcqb_suspend(struct platform_device *pdev, pm_message_t state) | ||
634 | { | ||
635 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | ||
636 | struct bfin_t350mcqbfb_info *info = fbinfo->par; | ||
637 | |||
638 | bfin_t350mcqb_disable_ppi(); | ||
639 | disable_dma(CH_PPI); | ||
640 | bfin_write_PPI_STATUS(0xFFFF); | ||
641 | |||
642 | return 0; | ||
643 | } | ||
644 | |||
645 | static int bfin_t350mcqb_resume(struct platform_device *pdev) | ||
646 | { | ||
647 | struct fb_info *fbinfo = platform_get_drvdata(pdev); | ||
648 | struct bfin_t350mcqbfb_info *info = fbinfo->par; | ||
649 | |||
650 | enable_dma(CH_PPI); | ||
651 | bfin_t350mcqb_enable_ppi(); | ||
652 | |||
653 | return 0; | ||
654 | } | ||
655 | #else | ||
656 | #define bfin_t350mcqb_suspend NULL | ||
657 | #define bfin_t350mcqb_resume NULL | ||
658 | #endif | ||
659 | |||
660 | static struct platform_driver bfin_t350mcqb_driver = { | ||
661 | .probe = bfin_t350mcqb_probe, | ||
662 | .remove = bfin_t350mcqb_remove, | ||
663 | .suspend = bfin_t350mcqb_suspend, | ||
664 | .resume = bfin_t350mcqb_resume, | ||
665 | .driver = { | ||
666 | .name = DRIVER_NAME, | ||
667 | .owner = THIS_MODULE, | ||
668 | }, | ||
669 | }; | ||
670 | |||
671 | static int __devinit bfin_t350mcqb_driver_init(void) | ||
672 | { | ||
673 | return platform_driver_register(&bfin_t350mcqb_driver); | ||
674 | } | ||
675 | |||
676 | static void __exit bfin_t350mcqb_driver_cleanup(void) | ||
677 | { | ||
678 | platform_driver_unregister(&bfin_t350mcqb_driver); | ||
679 | } | ||
680 | |||
681 | MODULE_DESCRIPTION("Blackfin TFT LCD Driver"); | ||
682 | MODULE_LICENSE("GPL"); | ||
683 | |||
684 | module_init(bfin_t350mcqb_driver_init); | ||
685 | module_exit(bfin_t350mcqb_driver_cleanup); | ||
diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c index 80cd117ca65c..01f77bcc68f9 100644 --- a/drivers/video/mbx/mbxfb.c +++ b/drivers/video/mbx/mbxfb.c | |||
@@ -889,7 +889,7 @@ static int __devinit mbxfb_probe(struct platform_device *dev) | |||
889 | struct mbxfb_info *mfbi; | 889 | struct mbxfb_info *mfbi; |
890 | struct mbxfb_platform_data *pdata; | 890 | struct mbxfb_platform_data *pdata; |
891 | 891 | ||
892 | dev_dbg(dev, "mbxfb_probe\n"); | 892 | dev_dbg(&dev->dev, "mbxfb_probe\n"); |
893 | 893 | ||
894 | pdata = dev->dev.platform_data; | 894 | pdata = dev->dev.platform_data; |
895 | if (!pdata) { | 895 | if (!pdata) { |
diff --git a/drivers/video/stifb.c b/drivers/video/stifb.c index e7c8db2eb49b..f98be301140c 100644 --- a/drivers/video/stifb.c +++ b/drivers/video/stifb.c | |||
@@ -505,16 +505,24 @@ ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber) | |||
505 | static void | 505 | static void |
506 | rattlerSetupPlanes(struct stifb_info *fb) | 506 | rattlerSetupPlanes(struct stifb_info *fb) |
507 | { | 507 | { |
508 | int saved_id, y; | ||
509 | |||
510 | /* Write RAMDAC pixel read mask register so all overlay | ||
511 | * planes are display-enabled. (CRX24 uses Bt462 pixel | ||
512 | * read mask register for overlay planes, not image planes). | ||
513 | */ | ||
508 | CRX24_SETUP_RAMDAC(fb); | 514 | CRX24_SETUP_RAMDAC(fb); |
509 | 515 | ||
510 | /* replacement for: SETUP_FB(fb, CRX24_OVERLAY_PLANES); */ | 516 | /* change fb->id temporarily to fool SETUP_FB() */ |
511 | WRITE_WORD(0x83000300, fb, REG_14); | 517 | saved_id = fb->id; |
512 | SETUP_HW(fb); | 518 | fb->id = CRX24_OVERLAY_PLANES; |
513 | WRITE_BYTE(1, fb, REG_16b1); | 519 | SETUP_FB(fb); |
520 | fb->id = saved_id; | ||
521 | |||
522 | for (y = 0; y < fb->info.var.yres; ++y) | ||
523 | memset(fb->info.screen_base + y * fb->info.fix.line_length, | ||
524 | 0xff, fb->info.var.xres * fb->info.var.bits_per_pixel/8); | ||
514 | 525 | ||
515 | fb_memset((void*)fb->info.fix.smem_start, 0xff, | ||
516 | fb->info.var.yres*fb->info.fix.line_length); | ||
517 | |||
518 | CRX24_SET_OVLY_MASK(fb); | 526 | CRX24_SET_OVLY_MASK(fb); |
519 | SETUP_FB(fb); | 527 | SETUP_FB(fb); |
520 | } | 528 | } |
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c index 919ce75db9e2..0a4e07d43d2d 100644 --- a/drivers/video/tridentfb.c +++ b/drivers/video/tridentfb.c | |||
@@ -566,44 +566,32 @@ static inline void write3CE(int reg, unsigned char val) | |||
566 | 566 | ||
567 | static void enable_mmio(void) | 567 | static void enable_mmio(void) |
568 | { | 568 | { |
569 | unsigned char tmp; | ||
570 | |||
571 | /* Goto New Mode */ | 569 | /* Goto New Mode */ |
572 | outb(0x0B, 0x3C4); | 570 | outb(0x0B, 0x3C4); |
573 | inb(0x3C5); | 571 | inb(0x3C5); |
574 | 572 | ||
575 | /* Unprotect registers */ | 573 | /* Unprotect registers */ |
576 | outb(NewMode1, 0x3C4); | 574 | outb(NewMode1, 0x3C4); |
577 | tmp = inb(0x3C5); | ||
578 | outb(0x80, 0x3C5); | 575 | outb(0x80, 0x3C5); |
579 | 576 | ||
580 | /* Enable MMIO */ | 577 | /* Enable MMIO */ |
581 | outb(PCIReg, 0x3D4); | 578 | outb(PCIReg, 0x3D4); |
582 | outb(inb(0x3D5) | 0x01, 0x3D5); | 579 | outb(inb(0x3D5) | 0x01, 0x3D5); |
583 | |||
584 | t_outb(NewMode1, 0x3C4); | ||
585 | t_outb(tmp, 0x3C5); | ||
586 | } | 580 | } |
587 | 581 | ||
588 | static void disable_mmio(void) | 582 | static void disable_mmio(void) |
589 | { | 583 | { |
590 | unsigned char tmp; | ||
591 | |||
592 | /* Goto New Mode */ | 584 | /* Goto New Mode */ |
593 | t_outb(0x0B, 0x3C4); | 585 | t_outb(0x0B, 0x3C4); |
594 | t_inb(0x3C5); | 586 | t_inb(0x3C5); |
595 | 587 | ||
596 | /* Unprotect registers */ | 588 | /* Unprotect registers */ |
597 | t_outb(NewMode1, 0x3C4); | 589 | t_outb(NewMode1, 0x3C4); |
598 | tmp = t_inb(0x3C5); | ||
599 | t_outb(0x80, 0x3C5); | 590 | t_outb(0x80, 0x3C5); |
600 | 591 | ||
601 | /* Disable MMIO */ | 592 | /* Disable MMIO */ |
602 | t_outb(PCIReg, 0x3D4); | 593 | t_outb(PCIReg, 0x3D4); |
603 | t_outb(t_inb(0x3D5) & ~0x01, 0x3D5); | 594 | t_outb(t_inb(0x3D5) & ~0x01, 0x3D5); |
604 | |||
605 | outb(NewMode1, 0x3C4); | ||
606 | outb(tmp, 0x3C5); | ||
607 | } | 595 | } |
608 | 596 | ||
609 | #define crtc_unlock() write3X4(CRTVSyncEnd, read3X4(CRTVSyncEnd) & 0x7F) | 597 | #define crtc_unlock() write3X4(CRTVSyncEnd, read3X4(CRTVSyncEnd) & 0x7F) |
@@ -757,7 +745,7 @@ static unsigned int __devinit get_memsize(void) | |||
757 | switch (tmp) { | 745 | switch (tmp) { |
758 | 746 | ||
759 | case 0x01: | 747 | case 0x01: |
760 | k = 512; | 748 | k = 512 * Kb; |
761 | break; | 749 | break; |
762 | case 0x02: | 750 | case 0x02: |
763 | k = 6 * Mb; /* XP */ | 751 | k = 6 * Mb; /* XP */ |
diff --git a/drivers/watchdog/cpu5wdt.c b/drivers/watchdog/cpu5wdt.c index 5941ca601a3a..df72f90123df 100644 --- a/drivers/watchdog/cpu5wdt.c +++ b/drivers/watchdog/cpu5wdt.c | |||
@@ -59,9 +59,9 @@ static int ticks = 10000; | |||
59 | 59 | ||
60 | static struct { | 60 | static struct { |
61 | struct completion stop; | 61 | struct completion stop; |
62 | volatile int running; | 62 | int running; |
63 | struct timer_list timer; | 63 | struct timer_list timer; |
64 | volatile int queue; | 64 | int queue; |
65 | int default_ticks; | 65 | int default_ticks; |
66 | unsigned long inuse; | 66 | unsigned long inuse; |
67 | } cpu5wdt_device; | 67 | } cpu5wdt_device; |
diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c index a2e174b09fe7..6483d1066b95 100644 --- a/drivers/watchdog/hpwdt.c +++ b/drivers/watchdog/hpwdt.c | |||
@@ -58,41 +58,6 @@ struct bios32_service_dir { | |||
58 | u8 reserved[5]; | 58 | u8 reserved[5]; |
59 | }; | 59 | }; |
60 | 60 | ||
61 | /* | ||
62 | * smbios_entry_point - defines SMBIOS entry point structure | ||
63 | * | ||
64 | * anchor[4] - anchor string (_SM_) | ||
65 | * checksum - checksum of the entry point structure | ||
66 | * length - length of the entry point structure | ||
67 | * major_ver - major version (02h for revision 2.1) | ||
68 | * minor_ver - minor version (01h for revision 2.1) | ||
69 | * max_struct_size - size of the largest SMBIOS structure | ||
70 | * revision - entry point structure revision implemented | ||
71 | * formatted_area[5] - reserved | ||
72 | * intermediate_anchor[5] - intermediate anchor string (_DMI_) | ||
73 | * intermediate_checksum - intermediate checksum | ||
74 | * table_length - structure table length | ||
75 | * table_address - structure table address | ||
76 | * table_num_structs - number of SMBIOS structures present | ||
77 | * bcd_revision - BCD revision | ||
78 | */ | ||
79 | struct smbios_entry_point { | ||
80 | u8 anchor[4]; | ||
81 | u8 checksum; | ||
82 | u8 length; | ||
83 | u8 major_ver; | ||
84 | u8 minor_ver; | ||
85 | u16 max_struct_size; | ||
86 | u8 revision; | ||
87 | u8 formatted_area[5]; | ||
88 | u8 intermediate_anchor[5]; | ||
89 | u8 intermediate_checksum; | ||
90 | u16 table_length; | ||
91 | u64 table_address; | ||
92 | u16 table_num_structs; | ||
93 | u8 bcd_revision; | ||
94 | }; | ||
95 | |||
96 | /* type 212 */ | 61 | /* type 212 */ |
97 | struct smbios_cru64_info { | 62 | struct smbios_cru64_info { |
98 | u8 type; | 63 | u8 type; |
@@ -175,31 +140,13 @@ static struct pci_device_id hpwdt_devices[] = { | |||
175 | }; | 140 | }; |
176 | MODULE_DEVICE_TABLE(pci, hpwdt_devices); | 141 | MODULE_DEVICE_TABLE(pci, hpwdt_devices); |
177 | 142 | ||
178 | /* | ||
179 | * bios_checksum | ||
180 | */ | ||
181 | static int __devinit bios_checksum(const char __iomem *ptr, int len) | ||
182 | { | ||
183 | char sum = 0; | ||
184 | int i; | ||
185 | |||
186 | /* | ||
187 | * calculate checksum of size bytes. This should add up | ||
188 | * to zero if we have a valid header. | ||
189 | */ | ||
190 | for (i = 0; i < len; i++) | ||
191 | sum += ptr[i]; | ||
192 | |||
193 | return ((sum == 0) && (len > 0)); | ||
194 | } | ||
195 | |||
196 | #ifndef CONFIG_X86_64 | 143 | #ifndef CONFIG_X86_64 |
197 | /* --32 Bit Bios------------------------------------------------------------ */ | 144 | /* --32 Bit Bios------------------------------------------------------------ */ |
198 | 145 | ||
199 | #define HPWDT_ARCH 32 | 146 | #define HPWDT_ARCH 32 |
200 | 147 | ||
201 | asmlinkage void asminline_call(struct cmn_registers *pi86Regs, | 148 | static void asminline_call(struct cmn_registers *pi86Regs, |
202 | unsigned long *pRomEntry) | 149 | unsigned long *pRomEntry) |
203 | { | 150 | { |
204 | asm("pushl %ebp \n\t" | 151 | asm("pushl %ebp \n\t" |
205 | "movl %esp, %ebp \n\t" | 152 | "movl %esp, %ebp \n\t" |
@@ -303,6 +250,24 @@ static int __devinit cru_detect(unsigned long map_entry, | |||
303 | } | 250 | } |
304 | 251 | ||
305 | /* | 252 | /* |
253 | * bios_checksum | ||
254 | */ | ||
255 | static int __devinit bios_checksum(const char __iomem *ptr, int len) | ||
256 | { | ||
257 | char sum = 0; | ||
258 | int i; | ||
259 | |||
260 | /* | ||
261 | * calculate checksum of size bytes. This should add up | ||
262 | * to zero if we have a valid header. | ||
263 | */ | ||
264 | for (i = 0; i < len; i++) | ||
265 | sum += ptr[i]; | ||
266 | |||
267 | return ((sum == 0) && (len > 0)); | ||
268 | } | ||
269 | |||
270 | /* | ||
306 | * bios32_present | 271 | * bios32_present |
307 | * | 272 | * |
308 | * Routine Description: | 273 | * Routine Description: |
@@ -368,8 +333,8 @@ static int __devinit detect_cru_service(void) | |||
368 | 333 | ||
369 | #define HPWDT_ARCH 64 | 334 | #define HPWDT_ARCH 64 |
370 | 335 | ||
371 | asmlinkage void asminline_call(struct cmn_registers *pi86Regs, | 336 | static void asminline_call(struct cmn_registers *pi86Regs, |
372 | unsigned long *pRomEntry) | 337 | unsigned long *pRomEntry) |
373 | { | 338 | { |
374 | asm("pushq %rbp \n\t" | 339 | asm("pushq %rbp \n\t" |
375 | "movq %rsp, %rbp \n\t" | 340 | "movq %rsp, %rbp \n\t" |
@@ -410,12 +375,8 @@ asmlinkage void asminline_call(struct cmn_registers *pi86Regs, | |||
410 | * dmi_find_cru | 375 | * dmi_find_cru |
411 | * | 376 | * |
412 | * Routine Description: | 377 | * Routine Description: |
413 | * This function checks wether or not a SMBIOS/DMI record is | 378 | * This function checks whether or not a SMBIOS/DMI record is |
414 | * the 64bit CRU info or not | 379 | * the 64bit CRU info or not |
415 | * | ||
416 | * Return Value: | ||
417 | * 0 : SUCCESS - if record found | ||
418 | * <0 : FAILURE - if record not found | ||
419 | */ | 380 | */ |
420 | static void __devinit dmi_find_cru(const struct dmi_header *dm) | 381 | static void __devinit dmi_find_cru(const struct dmi_header *dm) |
421 | { | 382 | { |
@@ -434,138 +395,11 @@ static void __devinit dmi_find_cru(const struct dmi_header *dm) | |||
434 | } | 395 | } |
435 | } | 396 | } |
436 | 397 | ||
437 | /* | ||
438 | * dmi_table | ||
439 | * | ||
440 | * Routine Description: | ||
441 | * Decode the SMBIOS/DMI table and check if we have a 64bit CRU record | ||
442 | * or not. | ||
443 | * | ||
444 | * We have to be cautious here. We have seen BIOSes with DMI pointers | ||
445 | * pointing to completely the wrong place for example | ||
446 | */ | ||
447 | static void __devinit dmi_table(u8 *buf, int len, int num, | ||
448 | void (*decode)(const struct dmi_header *)) | ||
449 | { | ||
450 | u8 *data = buf; | ||
451 | int i = 0; | ||
452 | |||
453 | /* | ||
454 | * Stop when we see all the items the table claimed to have | ||
455 | * OR we run off the end of the table (also happens) | ||
456 | */ | ||
457 | while ((i < num) && (data - buf + sizeof(struct dmi_header)) <= len) { | ||
458 | const struct dmi_header *dm = (const struct dmi_header *)data; | ||
459 | |||
460 | /* | ||
461 | * We want to know the total length (formated area and strings) | ||
462 | * before decoding to make sure we won't run off the table in | ||
463 | * dmi_decode or dmi_string | ||
464 | */ | ||
465 | data += dm->length; | ||
466 | while ((data - buf < len - 1) && (data[0] || data[1])) | ||
467 | data++; | ||
468 | if (data - buf < len - 1) | ||
469 | decode(dm); | ||
470 | data += 2; | ||
471 | i++; | ||
472 | } | ||
473 | } | ||
474 | |||
475 | /* | ||
476 | * smbios_present | ||
477 | * | ||
478 | * Routine Description: | ||
479 | * This function parses the SMBIOS entry point table to retrieve | ||
480 | * the 64 bit CRU Service. | ||
481 | * | ||
482 | * Return Value: | ||
483 | * 0 : SUCCESS | ||
484 | * <0 : FAILURE | ||
485 | */ | ||
486 | static int __devinit smbios_present(const char __iomem *p) | ||
487 | { | ||
488 | struct smbios_entry_point *eps = | ||
489 | (struct smbios_entry_point *) p; | ||
490 | int length; | ||
491 | u8 *buf; | ||
492 | |||
493 | /* check if we have indeed the SMBIOS table entry point */ | ||
494 | if ((strncmp((char *)eps->anchor, "_SM_", | ||
495 | sizeof(eps->anchor))) == 0) { | ||
496 | length = eps->length; | ||
497 | |||
498 | /* SMBIOS v2.1 implementation might use 0x1e */ | ||
499 | if ((length == 0x1e) && | ||
500 | (eps->major_ver == 2) && | ||
501 | (eps->minor_ver == 1)) | ||
502 | length = 0x1f; | ||
503 | |||
504 | /* | ||
505 | * Now we will check: | ||
506 | * - SMBIOS checksum must be 0 | ||
507 | * - intermediate anchor should be _DMI_ | ||
508 | * - intermediate checksum should be 0 | ||
509 | */ | ||
510 | if ((bios_checksum(p, length)) && | ||
511 | (strncmp((char *)eps->intermediate_anchor, "_DMI_", | ||
512 | sizeof(eps->intermediate_anchor)) == 0) && | ||
513 | (bios_checksum(p+0x10, 15))) { | ||
514 | buf = ioremap(eps->table_address, eps->table_length); | ||
515 | if (buf == NULL) | ||
516 | return -ENODEV; | ||
517 | |||
518 | |||
519 | /* Scan the DMI table for the 64 bit CRU service */ | ||
520 | dmi_table(buf, eps->table_length, | ||
521 | eps->table_num_structs, dmi_find_cru); | ||
522 | |||
523 | iounmap(buf); | ||
524 | return 0; | ||
525 | } | ||
526 | } | ||
527 | |||
528 | return -ENODEV; | ||
529 | } | ||
530 | |||
531 | static int __devinit smbios_scan_machine(void) | ||
532 | { | ||
533 | char __iomem *p, *q; | ||
534 | int rc; | ||
535 | |||
536 | if (efi_enabled) { | ||
537 | if (efi.smbios == EFI_INVALID_TABLE_ADDR) | ||
538 | return -ENODEV; | ||
539 | |||
540 | p = ioremap(efi.smbios, 32); | ||
541 | if (p == NULL) | ||
542 | return -ENOMEM; | ||
543 | |||
544 | rc = smbios_present(p); | ||
545 | iounmap(p); | ||
546 | } else { | ||
547 | /* | ||
548 | * Search from 0x0f0000 through 0x0fffff, inclusive. | ||
549 | */ | ||
550 | p = ioremap(PCI_ROM_BASE1, ROM_SIZE); | ||
551 | if (p == NULL) | ||
552 | return -ENOMEM; | ||
553 | |||
554 | for (q = p; q < p + ROM_SIZE; q += 16) { | ||
555 | rc = smbios_present(q); | ||
556 | if (!rc) { | ||
557 | break; | ||
558 | } | ||
559 | } | ||
560 | iounmap(p); | ||
561 | } | ||
562 | } | ||
563 | |||
564 | static int __devinit detect_cru_service(void) | 398 | static int __devinit detect_cru_service(void) |
565 | { | 399 | { |
566 | cru_rom_addr = NULL; | 400 | cru_rom_addr = NULL; |
567 | 401 | ||
568 | smbios_scan_machine(); /* will become dmi_walk(dmi_find_cru); */ | 402 | dmi_walk(dmi_find_cru); |
569 | 403 | ||
570 | /* if cru_rom_addr has been set then we found a CRU service */ | 404 | /* if cru_rom_addr has been set then we found a CRU service */ |
571 | return ((cru_rom_addr != NULL)? 0: -ENODEV); | 405 | return ((cru_rom_addr != NULL)? 0: -ENODEV); |
diff --git a/drivers/watchdog/it8712f_wdt.c b/drivers/watchdog/it8712f_wdt.c index 1b6d7d1b715d..1efcad3b6fca 100644 --- a/drivers/watchdog/it8712f_wdt.c +++ b/drivers/watchdog/it8712f_wdt.c | |||
@@ -7,7 +7,8 @@ | |||
7 | * | 7 | * |
8 | * drivers/char/watchdog/scx200_wdt.c | 8 | * drivers/char/watchdog/scx200_wdt.c |
9 | * drivers/hwmon/it87.c | 9 | * drivers/hwmon/it87.c |
10 | * IT8712F EC-LPC I/O Preliminary Specification 0.9.2.pdf | 10 | * IT8712F EC-LPC I/O Preliminary Specification 0.8.2 |
11 | * IT8712F EC-LPC I/O Preliminary Specification 0.9.3 | ||
11 | * | 12 | * |
12 | * This program is free software; you can redistribute it and/or | 13 | * This program is free software; you can redistribute it and/or |
13 | * modify it under the terms of the GNU General Public License as | 14 | * modify it under the terms of the GNU General Public License as |
@@ -40,6 +41,7 @@ MODULE_DESCRIPTION("IT8712F Watchdog Driver"); | |||
40 | MODULE_LICENSE("GPL"); | 41 | MODULE_LICENSE("GPL"); |
41 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); | 42 | MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR); |
42 | 43 | ||
44 | static int max_units = 255; | ||
43 | static int margin = 60; /* in seconds */ | 45 | static int margin = 60; /* in seconds */ |
44 | module_param(margin, int, 0); | 46 | module_param(margin, int, 0); |
45 | MODULE_PARM_DESC(margin, "Watchdog margin in seconds"); | 47 | MODULE_PARM_DESC(margin, "Watchdog margin in seconds"); |
@@ -51,6 +53,7 @@ MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close"); | |||
51 | static struct semaphore it8712f_wdt_sem; | 53 | static struct semaphore it8712f_wdt_sem; |
52 | static unsigned expect_close; | 54 | static unsigned expect_close; |
53 | static spinlock_t io_lock; | 55 | static spinlock_t io_lock; |
56 | static unsigned char revision; | ||
54 | 57 | ||
55 | /* Dog Food address - We use the game port address */ | 58 | /* Dog Food address - We use the game port address */ |
56 | static unsigned short address; | 59 | static unsigned short address; |
@@ -108,6 +111,15 @@ superio_inw(int reg) | |||
108 | return val; | 111 | return val; |
109 | } | 112 | } |
110 | 113 | ||
114 | static void | ||
115 | superio_outw(int val, int reg) | ||
116 | { | ||
117 | outb(reg++, REG); | ||
118 | outb((val >> 8) & 0xff, VAL); | ||
119 | outb(reg, REG); | ||
120 | outb(val & 0xff, VAL); | ||
121 | } | ||
122 | |||
111 | static inline void | 123 | static inline void |
112 | superio_select(int ldn) | 124 | superio_select(int ldn) |
113 | { | 125 | { |
@@ -143,15 +155,33 @@ static void | |||
143 | it8712f_wdt_update_margin(void) | 155 | it8712f_wdt_update_margin(void) |
144 | { | 156 | { |
145 | int config = WDT_OUT_KRST | WDT_OUT_PWROK; | 157 | int config = WDT_OUT_KRST | WDT_OUT_PWROK; |
146 | 158 | int units = margin; | |
147 | printk(KERN_INFO NAME ": timer margin %d seconds\n", margin); | 159 | |
148 | 160 | /* Switch to minutes precision if the configured margin | |
149 | /* The timeout register only has 8bits wide */ | 161 | * value does not fit within the register width. |
150 | if (margin < 256) | 162 | */ |
151 | config |= WDT_UNIT_SEC; /* else UNIT are MINUTES */ | 163 | if (units <= max_units) { |
164 | config |= WDT_UNIT_SEC; /* else UNIT is MINUTES */ | ||
165 | printk(KERN_INFO NAME ": timer margin %d seconds\n", units); | ||
166 | } else { | ||
167 | units /= 60; | ||
168 | printk(KERN_INFO NAME ": timer margin %d minutes\n", units); | ||
169 | } | ||
152 | superio_outb(config, WDT_CONFIG); | 170 | superio_outb(config, WDT_CONFIG); |
153 | 171 | ||
154 | superio_outb((margin > 255) ? (margin / 60) : margin, WDT_TIMEOUT); | 172 | if (revision >= 0x08) |
173 | superio_outw(units, WDT_TIMEOUT); | ||
174 | else | ||
175 | superio_outb(units, WDT_TIMEOUT); | ||
176 | } | ||
177 | |||
178 | static int | ||
179 | it8712f_wdt_get_status(void) | ||
180 | { | ||
181 | if (superio_inb(WDT_CONTROL) & 0x01) | ||
182 | return WDIOF_CARDRESET; | ||
183 | else | ||
184 | return 0; | ||
155 | } | 185 | } |
156 | 186 | ||
157 | static void | 187 | static void |
@@ -234,7 +264,7 @@ it8712f_wdt_ioctl(struct inode *inode, struct file *file, | |||
234 | .firmware_version = 1, | 264 | .firmware_version = 1, |
235 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, | 265 | .options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING, |
236 | }; | 266 | }; |
237 | int new_margin; | 267 | int value; |
238 | 268 | ||
239 | switch (cmd) { | 269 | switch (cmd) { |
240 | default: | 270 | default: |
@@ -244,17 +274,27 @@ it8712f_wdt_ioctl(struct inode *inode, struct file *file, | |||
244 | return -EFAULT; | 274 | return -EFAULT; |
245 | return 0; | 275 | return 0; |
246 | case WDIOC_GETSTATUS: | 276 | case WDIOC_GETSTATUS: |
277 | superio_enter(); | ||
278 | superio_select(LDN_GPIO); | ||
279 | |||
280 | value = it8712f_wdt_get_status(); | ||
281 | |||
282 | superio_exit(); | ||
283 | |||
284 | return put_user(value, p); | ||
247 | case WDIOC_GETBOOTSTATUS: | 285 | case WDIOC_GETBOOTSTATUS: |
248 | return put_user(0, p); | 286 | return put_user(0, p); |
249 | case WDIOC_KEEPALIVE: | 287 | case WDIOC_KEEPALIVE: |
250 | it8712f_wdt_ping(); | 288 | it8712f_wdt_ping(); |
251 | return 0; | 289 | return 0; |
252 | case WDIOC_SETTIMEOUT: | 290 | case WDIOC_SETTIMEOUT: |
253 | if (get_user(new_margin, p)) | 291 | if (get_user(value, p)) |
254 | return -EFAULT; | 292 | return -EFAULT; |
255 | if (new_margin < 1) | 293 | if (value < 1) |
294 | return -EINVAL; | ||
295 | if (value > (max_units * 60)) | ||
256 | return -EINVAL; | 296 | return -EINVAL; |
257 | margin = new_margin; | 297 | margin = value; |
258 | superio_enter(); | 298 | superio_enter(); |
259 | superio_select(LDN_GPIO); | 299 | superio_select(LDN_GPIO); |
260 | 300 | ||
@@ -262,6 +302,7 @@ it8712f_wdt_ioctl(struct inode *inode, struct file *file, | |||
262 | 302 | ||
263 | superio_exit(); | 303 | superio_exit(); |
264 | it8712f_wdt_ping(); | 304 | it8712f_wdt_ping(); |
305 | /* Fall through */ | ||
265 | case WDIOC_GETTIMEOUT: | 306 | case WDIOC_GETTIMEOUT: |
266 | if (put_user(margin, p)) | 307 | if (put_user(margin, p)) |
267 | return -EFAULT; | 308 | return -EFAULT; |
@@ -336,9 +377,18 @@ it8712f_wdt_find(unsigned short *address) | |||
336 | } | 377 | } |
337 | 378 | ||
338 | err = 0; | 379 | err = 0; |
339 | printk(KERN_DEBUG NAME ": Found IT%04xF chip revision %d - " | 380 | revision = superio_inb(DEVREV) & 0x0f; |
381 | |||
382 | /* Later revisions have 16-bit values per datasheet 0.9.1 */ | ||
383 | if (revision >= 0x08) | ||
384 | max_units = 65535; | ||
385 | |||
386 | if (margin > (max_units * 60)) | ||
387 | margin = (max_units * 60); | ||
388 | |||
389 | printk(KERN_INFO NAME ": Found IT%04xF chip revision %d - " | ||
340 | "using DogFood address 0x%x\n", | 390 | "using DogFood address 0x%x\n", |
341 | chip_type, superio_inb(DEVREV) & 0x0f, *address); | 391 | chip_type, revision, *address); |
342 | 392 | ||
343 | exit: | 393 | exit: |
344 | superio_exit(); | 394 | superio_exit(); |
diff --git a/drivers/watchdog/machzwd.c b/drivers/watchdog/machzwd.c index e6e07b4575eb..6905135a776c 100644 --- a/drivers/watchdog/machzwd.c +++ b/drivers/watchdog/machzwd.c | |||
@@ -141,7 +141,7 @@ static unsigned long next_heartbeat = 0; | |||
141 | #ifndef ZF_DEBUG | 141 | #ifndef ZF_DEBUG |
142 | # define dprintk(format, args...) | 142 | # define dprintk(format, args...) |
143 | #else | 143 | #else |
144 | # define dprintk(format, args...) printk(KERN_DEBUG PFX ":%s:%d: " format, __FUNCTION__, __LINE__ , ## args) | 144 | # define dprintk(format, args...) printk(KERN_DEBUG PFX ":%s:%d: " format, __func__, __LINE__ , ## args) |
145 | #endif | 145 | #endif |
146 | 146 | ||
147 | 147 | ||
diff --git a/drivers/watchdog/mtx-1_wdt.c b/drivers/watchdog/mtx-1_wdt.c index 789831b3fa00..10b89f2703bd 100644 --- a/drivers/watchdog/mtx-1_wdt.c +++ b/drivers/watchdog/mtx-1_wdt.c | |||
@@ -59,9 +59,9 @@ static int ticks = 100 * HZ; | |||
59 | 59 | ||
60 | static struct { | 60 | static struct { |
61 | struct completion stop; | 61 | struct completion stop; |
62 | volatile int running; | 62 | int running; |
63 | struct timer_list timer; | 63 | struct timer_list timer; |
64 | volatile int queue; | 64 | int queue; |
65 | int default_ticks; | 65 | int default_ticks; |
66 | unsigned long inuse; | 66 | unsigned long inuse; |
67 | unsigned gpio; | 67 | unsigned gpio; |
diff --git a/drivers/watchdog/pcwd_usb.c b/drivers/watchdog/pcwd_usb.c index 0f3fd6c9c354..bf443d077a1e 100644 --- a/drivers/watchdog/pcwd_usb.c +++ b/drivers/watchdog/pcwd_usb.c | |||
@@ -179,11 +179,11 @@ static void usb_pcwd_intr_done(struct urb *urb) | |||
179 | case -ENOENT: | 179 | case -ENOENT: |
180 | case -ESHUTDOWN: | 180 | case -ESHUTDOWN: |
181 | /* this urb is terminated, clean up */ | 181 | /* this urb is terminated, clean up */ |
182 | dbg("%s - urb shutting down with status: %d", __FUNCTION__, urb->status); | 182 | dbg("%s - urb shutting down with status: %d", __func__, urb->status); |
183 | return; | 183 | return; |
184 | /* -EPIPE: should clear the halt */ | 184 | /* -EPIPE: should clear the halt */ |
185 | default: /* error */ | 185 | default: /* error */ |
186 | dbg("%s - nonzero urb status received: %d", __FUNCTION__, urb->status); | 186 | dbg("%s - nonzero urb status received: %d", __func__, urb->status); |
187 | goto resubmit; | 187 | goto resubmit; |
188 | } | 188 | } |
189 | 189 | ||
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index 5d1c15f83d23..7645e8812156 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -144,7 +144,7 @@ static int s3c2410wdt_start(void) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | DBG("%s: wdt_count=0x%08x, wtcon=%08lx\n", | 146 | DBG("%s: wdt_count=0x%08x, wtcon=%08lx\n", |
147 | __FUNCTION__, wdt_count, wtcon); | 147 | __func__, wdt_count, wtcon); |
148 | 148 | ||
149 | writel(wdt_count, wdt_base + S3C2410_WTDAT); | 149 | writel(wdt_count, wdt_base + S3C2410_WTDAT); |
150 | writel(wdt_count, wdt_base + S3C2410_WTCNT); | 150 | writel(wdt_count, wdt_base + S3C2410_WTCNT); |
@@ -167,7 +167,7 @@ static int s3c2410wdt_set_heartbeat(int timeout) | |||
167 | count = timeout * freq; | 167 | count = timeout * freq; |
168 | 168 | ||
169 | DBG("%s: count=%d, timeout=%d, freq=%d\n", | 169 | DBG("%s: count=%d, timeout=%d, freq=%d\n", |
170 | __FUNCTION__, count, timeout, freq); | 170 | __func__, count, timeout, freq); |
171 | 171 | ||
172 | /* if the count is bigger than the watchdog register, | 172 | /* if the count is bigger than the watchdog register, |
173 | then work out what we need to do (and if) we can | 173 | then work out what we need to do (and if) we can |
@@ -189,7 +189,7 @@ static int s3c2410wdt_set_heartbeat(int timeout) | |||
189 | tmr_margin = timeout; | 189 | tmr_margin = timeout; |
190 | 190 | ||
191 | DBG("%s: timeout=%d, divisor=%d, count=%d (%08x)\n", | 191 | DBG("%s: timeout=%d, divisor=%d, count=%d (%08x)\n", |
192 | __FUNCTION__, timeout, divisor, count, count/divisor); | 192 | __func__, timeout, divisor, count, count/divisor); |
193 | 193 | ||
194 | count /= divisor; | 194 | count /= divisor; |
195 | wdt_count = count; | 195 | wdt_count = count; |
@@ -355,7 +355,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
355 | int ret; | 355 | int ret; |
356 | int size; | 356 | int size; |
357 | 357 | ||
358 | DBG("%s: probe=%p\n", __FUNCTION__, pdev); | 358 | DBG("%s: probe=%p\n", __func__, pdev); |
359 | 359 | ||
360 | dev = &pdev->dev; | 360 | dev = &pdev->dev; |
361 | wdt_dev = &pdev->dev; | 361 | wdt_dev = &pdev->dev; |
diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c index 61dde863bd40..1277f7e9cc54 100644 --- a/drivers/watchdog/shwdt.c +++ b/drivers/watchdog/shwdt.c | |||
@@ -298,7 +298,7 @@ static int sh_wdt_mmap(struct file *file, struct vm_area_struct *vma) | |||
298 | if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT, | 298 | if (io_remap_pfn_range(vma, vma->vm_start, addr >> PAGE_SHIFT, |
299 | PAGE_SIZE, vma->vm_page_prot)) { | 299 | PAGE_SIZE, vma->vm_page_prot)) { |
300 | printk(KERN_ERR PFX "%s: io_remap_pfn_range failed\n", | 300 | printk(KERN_ERR PFX "%s: io_remap_pfn_range failed\n", |
301 | __FUNCTION__); | 301 | __func__); |
302 | return -EAGAIN; | 302 | return -EAGAIN; |
303 | } | 303 | } |
304 | 304 | ||
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index 1eb771d79cca..3e6b3f41ee1f 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c | |||
@@ -232,6 +232,7 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
232 | fhp->fh_dentry = dentry; | 232 | fhp->fh_dentry = dentry; |
233 | fhp->fh_export = exp; | 233 | fhp->fh_export = exp; |
234 | nfsd_nr_verified++; | 234 | nfsd_nr_verified++; |
235 | cache_get(&exp->h); | ||
235 | } else { | 236 | } else { |
236 | /* | 237 | /* |
237 | * just rechecking permissions | 238 | * just rechecking permissions |
@@ -241,6 +242,7 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
241 | dprintk("nfsd: fh_verify - just checking\n"); | 242 | dprintk("nfsd: fh_verify - just checking\n"); |
242 | dentry = fhp->fh_dentry; | 243 | dentry = fhp->fh_dentry; |
243 | exp = fhp->fh_export; | 244 | exp = fhp->fh_export; |
245 | cache_get(&exp->h); | ||
244 | /* | 246 | /* |
245 | * Set user creds for this exportpoint; necessary even | 247 | * Set user creds for this exportpoint; necessary even |
246 | * in the "just checking" case because this may be a | 248 | * in the "just checking" case because this may be a |
@@ -252,8 +254,6 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access) | |||
252 | if (error) | 254 | if (error) |
253 | goto out; | 255 | goto out; |
254 | } | 256 | } |
255 | cache_get(&exp->h); | ||
256 | |||
257 | 257 | ||
258 | error = nfsd_mode_check(rqstp, dentry->d_inode->i_mode, type); | 258 | error = nfsd_mode_check(rqstp, dentry->d_inode->i_mode, type); |
259 | if (error) | 259 | if (error) |
diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c index ee50c9610e7f..b8057c51b205 100644 --- a/fs/ocfs2/cluster/tcp.c +++ b/fs/ocfs2/cluster/tcp.c | |||
@@ -451,9 +451,9 @@ static void o2net_set_nn_state(struct o2net_node *nn, | |||
451 | /* delay if we're withing a RECONNECT_DELAY of the | 451 | /* delay if we're withing a RECONNECT_DELAY of the |
452 | * last attempt */ | 452 | * last attempt */ |
453 | delay = (nn->nn_last_connect_attempt + | 453 | delay = (nn->nn_last_connect_attempt + |
454 | msecs_to_jiffies(o2net_reconnect_delay(sc->sc_node))) | 454 | msecs_to_jiffies(o2net_reconnect_delay(NULL))) |
455 | - jiffies; | 455 | - jiffies; |
456 | if (delay > msecs_to_jiffies(o2net_reconnect_delay(sc->sc_node))) | 456 | if (delay > msecs_to_jiffies(o2net_reconnect_delay(NULL))) |
457 | delay = 0; | 457 | delay = 0; |
458 | mlog(ML_CONN, "queueing conn attempt in %lu jiffies\n", delay); | 458 | mlog(ML_CONN, "queueing conn attempt in %lu jiffies\n", delay); |
459 | queue_delayed_work(o2net_wq, &nn->nn_connect_work, delay); | 459 | queue_delayed_work(o2net_wq, &nn->nn_connect_work, delay); |
@@ -1552,12 +1552,11 @@ static void o2net_connect_expired(struct work_struct *work) | |||
1552 | 1552 | ||
1553 | spin_lock(&nn->nn_lock); | 1553 | spin_lock(&nn->nn_lock); |
1554 | if (!nn->nn_sc_valid) { | 1554 | if (!nn->nn_sc_valid) { |
1555 | struct o2nm_node *node = nn->nn_sc->sc_node; | ||
1556 | mlog(ML_ERROR, "no connection established with node %u after " | 1555 | mlog(ML_ERROR, "no connection established with node %u after " |
1557 | "%u.%u seconds, giving up and returning errors.\n", | 1556 | "%u.%u seconds, giving up and returning errors.\n", |
1558 | o2net_num_from_nn(nn), | 1557 | o2net_num_from_nn(nn), |
1559 | o2net_idle_timeout(node) / 1000, | 1558 | o2net_idle_timeout(NULL) / 1000, |
1560 | o2net_idle_timeout(node) % 1000); | 1559 | o2net_idle_timeout(NULL) % 1000); |
1561 | 1560 | ||
1562 | o2net_set_nn_state(nn, NULL, 0, -ENOTCONN); | 1561 | o2net_set_nn_state(nn, NULL, 0, -ENOTCONN); |
1563 | } | 1562 | } |
diff --git a/fs/ocfs2/dlm/dlmcommon.h b/fs/ocfs2/dlm/dlmcommon.h index 9843ee17ea27..dc8ea666efdb 100644 --- a/fs/ocfs2/dlm/dlmcommon.h +++ b/fs/ocfs2/dlm/dlmcommon.h | |||
@@ -176,6 +176,7 @@ struct dlm_mig_lockres_priv | |||
176 | { | 176 | { |
177 | struct dlm_lock_resource *lockres; | 177 | struct dlm_lock_resource *lockres; |
178 | u8 real_master; | 178 | u8 real_master; |
179 | u8 extra_ref; | ||
179 | }; | 180 | }; |
180 | 181 | ||
181 | struct dlm_assert_master_priv | 182 | struct dlm_assert_master_priv |
@@ -602,17 +603,19 @@ enum dlm_query_join_response_code { | |||
602 | JOIN_PROTOCOL_MISMATCH, | 603 | JOIN_PROTOCOL_MISMATCH, |
603 | }; | 604 | }; |
604 | 605 | ||
606 | struct dlm_query_join_packet { | ||
607 | u8 code; /* Response code. dlm_minor and fs_minor | ||
608 | are only valid if this is JOIN_OK */ | ||
609 | u8 dlm_minor; /* The minor version of the protocol the | ||
610 | dlm is speaking. */ | ||
611 | u8 fs_minor; /* The minor version of the protocol the | ||
612 | filesystem is speaking. */ | ||
613 | u8 reserved; | ||
614 | }; | ||
615 | |||
605 | union dlm_query_join_response { | 616 | union dlm_query_join_response { |
606 | u32 intval; | 617 | u32 intval; |
607 | struct { | 618 | struct dlm_query_join_packet packet; |
608 | u8 code; /* Response code. dlm_minor and fs_minor | ||
609 | are only valid if this is JOIN_OK */ | ||
610 | u8 dlm_minor; /* The minor version of the protocol the | ||
611 | dlm is speaking. */ | ||
612 | u8 fs_minor; /* The minor version of the protocol the | ||
613 | filesystem is speaking. */ | ||
614 | u8 reserved; | ||
615 | } packet; | ||
616 | }; | 619 | }; |
617 | 620 | ||
618 | struct dlm_lock_request | 621 | struct dlm_lock_request |
diff --git a/fs/ocfs2/dlm/dlmconvert.c b/fs/ocfs2/dlm/dlmconvert.c index ecb4d997221e..75997b4deaf3 100644 --- a/fs/ocfs2/dlm/dlmconvert.c +++ b/fs/ocfs2/dlm/dlmconvert.c | |||
@@ -487,7 +487,7 @@ int dlm_convert_lock_handler(struct o2net_msg *msg, u32 len, void *data, | |||
487 | "cookie=%u:%llu\n", | 487 | "cookie=%u:%llu\n", |
488 | dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)), | 488 | dlm_get_lock_cookie_node(be64_to_cpu(cnv->cookie)), |
489 | dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie))); | 489 | dlm_get_lock_cookie_seq(be64_to_cpu(cnv->cookie))); |
490 | __dlm_print_one_lock_resource(res); | 490 | dlm_print_one_lock_resource(res); |
491 | goto leave; | 491 | goto leave; |
492 | } | 492 | } |
493 | 493 | ||
diff --git a/fs/ocfs2/dlm/dlmdomain.c b/fs/ocfs2/dlm/dlmdomain.c index 638d2ebb892b..0879d86113e3 100644 --- a/fs/ocfs2/dlm/dlmdomain.c +++ b/fs/ocfs2/dlm/dlmdomain.c | |||
@@ -713,14 +713,46 @@ static int dlm_query_join_proto_check(char *proto_type, int node, | |||
713 | return rc; | 713 | return rc; |
714 | } | 714 | } |
715 | 715 | ||
716 | /* | ||
717 | * struct dlm_query_join_packet is made up of four one-byte fields. They | ||
718 | * are effectively in big-endian order already. However, little-endian | ||
719 | * machines swap them before putting the packet on the wire (because | ||
720 | * query_join's response is a status, and that status is treated as a u32 | ||
721 | * on the wire). Thus, a big-endian and little-endian machines will treat | ||
722 | * this structure differently. | ||
723 | * | ||
724 | * The solution is to have little-endian machines swap the structure when | ||
725 | * converting from the structure to the u32 representation. This will | ||
726 | * result in the structure having the correct format on the wire no matter | ||
727 | * the host endian format. | ||
728 | */ | ||
729 | static void dlm_query_join_packet_to_wire(struct dlm_query_join_packet *packet, | ||
730 | u32 *wire) | ||
731 | { | ||
732 | union dlm_query_join_response response; | ||
733 | |||
734 | response.packet = *packet; | ||
735 | *wire = cpu_to_be32(response.intval); | ||
736 | } | ||
737 | |||
738 | static void dlm_query_join_wire_to_packet(u32 wire, | ||
739 | struct dlm_query_join_packet *packet) | ||
740 | { | ||
741 | union dlm_query_join_response response; | ||
742 | |||
743 | response.intval = cpu_to_be32(wire); | ||
744 | *packet = response.packet; | ||
745 | } | ||
746 | |||
716 | static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, | 747 | static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, |
717 | void **ret_data) | 748 | void **ret_data) |
718 | { | 749 | { |
719 | struct dlm_query_join_request *query; | 750 | struct dlm_query_join_request *query; |
720 | union dlm_query_join_response response = { | 751 | struct dlm_query_join_packet packet = { |
721 | .packet.code = JOIN_DISALLOW, | 752 | .code = JOIN_DISALLOW, |
722 | }; | 753 | }; |
723 | struct dlm_ctxt *dlm = NULL; | 754 | struct dlm_ctxt *dlm = NULL; |
755 | u32 response; | ||
724 | u8 nodenum; | 756 | u8 nodenum; |
725 | 757 | ||
726 | query = (struct dlm_query_join_request *) msg->buf; | 758 | query = (struct dlm_query_join_request *) msg->buf; |
@@ -737,11 +769,11 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, | |||
737 | mlog(0, "node %u is not in our live map yet\n", | 769 | mlog(0, "node %u is not in our live map yet\n", |
738 | query->node_idx); | 770 | query->node_idx); |
739 | 771 | ||
740 | response.packet.code = JOIN_DISALLOW; | 772 | packet.code = JOIN_DISALLOW; |
741 | goto respond; | 773 | goto respond; |
742 | } | 774 | } |
743 | 775 | ||
744 | response.packet.code = JOIN_OK_NO_MAP; | 776 | packet.code = JOIN_OK_NO_MAP; |
745 | 777 | ||
746 | spin_lock(&dlm_domain_lock); | 778 | spin_lock(&dlm_domain_lock); |
747 | dlm = __dlm_lookup_domain_full(query->domain, query->name_len); | 779 | dlm = __dlm_lookup_domain_full(query->domain, query->name_len); |
@@ -760,7 +792,7 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, | |||
760 | mlog(0, "disallow join as node %u does not " | 792 | mlog(0, "disallow join as node %u does not " |
761 | "have node %u in its nodemap\n", | 793 | "have node %u in its nodemap\n", |
762 | query->node_idx, nodenum); | 794 | query->node_idx, nodenum); |
763 | response.packet.code = JOIN_DISALLOW; | 795 | packet.code = JOIN_DISALLOW; |
764 | goto unlock_respond; | 796 | goto unlock_respond; |
765 | } | 797 | } |
766 | } | 798 | } |
@@ -780,23 +812,23 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, | |||
780 | /*If this is a brand new context and we | 812 | /*If this is a brand new context and we |
781 | * haven't started our join process yet, then | 813 | * haven't started our join process yet, then |
782 | * the other node won the race. */ | 814 | * the other node won the race. */ |
783 | response.packet.code = JOIN_OK_NO_MAP; | 815 | packet.code = JOIN_OK_NO_MAP; |
784 | } else if (dlm->joining_node != DLM_LOCK_RES_OWNER_UNKNOWN) { | 816 | } else if (dlm->joining_node != DLM_LOCK_RES_OWNER_UNKNOWN) { |
785 | /* Disallow parallel joins. */ | 817 | /* Disallow parallel joins. */ |
786 | response.packet.code = JOIN_DISALLOW; | 818 | packet.code = JOIN_DISALLOW; |
787 | } else if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) { | 819 | } else if (dlm->reco.state & DLM_RECO_STATE_ACTIVE) { |
788 | mlog(0, "node %u trying to join, but recovery " | 820 | mlog(0, "node %u trying to join, but recovery " |
789 | "is ongoing.\n", bit); | 821 | "is ongoing.\n", bit); |
790 | response.packet.code = JOIN_DISALLOW; | 822 | packet.code = JOIN_DISALLOW; |
791 | } else if (test_bit(bit, dlm->recovery_map)) { | 823 | } else if (test_bit(bit, dlm->recovery_map)) { |
792 | mlog(0, "node %u trying to join, but it " | 824 | mlog(0, "node %u trying to join, but it " |
793 | "still needs recovery.\n", bit); | 825 | "still needs recovery.\n", bit); |
794 | response.packet.code = JOIN_DISALLOW; | 826 | packet.code = JOIN_DISALLOW; |
795 | } else if (test_bit(bit, dlm->domain_map)) { | 827 | } else if (test_bit(bit, dlm->domain_map)) { |
796 | mlog(0, "node %u trying to join, but it " | 828 | mlog(0, "node %u trying to join, but it " |
797 | "is still in the domain! needs recovery?\n", | 829 | "is still in the domain! needs recovery?\n", |
798 | bit); | 830 | bit); |
799 | response.packet.code = JOIN_DISALLOW; | 831 | packet.code = JOIN_DISALLOW; |
800 | } else { | 832 | } else { |
801 | /* Alright we're fully a part of this domain | 833 | /* Alright we're fully a part of this domain |
802 | * so we keep some state as to who's joining | 834 | * so we keep some state as to who's joining |
@@ -807,19 +839,15 @@ static int dlm_query_join_handler(struct o2net_msg *msg, u32 len, void *data, | |||
807 | if (dlm_query_join_proto_check("DLM", bit, | 839 | if (dlm_query_join_proto_check("DLM", bit, |
808 | &dlm->dlm_locking_proto, | 840 | &dlm->dlm_locking_proto, |
809 | &query->dlm_proto)) { | 841 | &query->dlm_proto)) { |
810 | response.packet.code = | 842 | packet.code = JOIN_PROTOCOL_MISMATCH; |
811 | JOIN_PROTOCOL_MISMATCH; | ||
812 | } else if (dlm_query_join_proto_check("fs", bit, | 843 | } else if (dlm_query_join_proto_check("fs", bit, |
813 | &dlm->fs_locking_proto, | 844 | &dlm->fs_locking_proto, |
814 | &query->fs_proto)) { | 845 | &query->fs_proto)) { |
815 | response.packet.code = | 846 | packet.code = JOIN_PROTOCOL_MISMATCH; |
816 | JOIN_PROTOCOL_MISMATCH; | ||
817 | } else { | 847 | } else { |
818 | response.packet.dlm_minor = | 848 | packet.dlm_minor = query->dlm_proto.pv_minor; |
819 | query->dlm_proto.pv_minor; | 849 | packet.fs_minor = query->fs_proto.pv_minor; |
820 | response.packet.fs_minor = | 850 | packet.code = JOIN_OK; |
821 | query->fs_proto.pv_minor; | ||
822 | response.packet.code = JOIN_OK; | ||
823 | __dlm_set_joining_node(dlm, query->node_idx); | 851 | __dlm_set_joining_node(dlm, query->node_idx); |
824 | } | 852 | } |
825 | } | 853 | } |
@@ -830,9 +858,10 @@ unlock_respond: | |||
830 | spin_unlock(&dlm_domain_lock); | 858 | spin_unlock(&dlm_domain_lock); |
831 | 859 | ||
832 | respond: | 860 | respond: |
833 | mlog(0, "We respond with %u\n", response.packet.code); | 861 | mlog(0, "We respond with %u\n", packet.code); |
834 | 862 | ||
835 | return response.intval; | 863 | dlm_query_join_packet_to_wire(&packet, &response); |
864 | return response; | ||
836 | } | 865 | } |
837 | 866 | ||
838 | static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data, | 867 | static int dlm_assert_joined_handler(struct o2net_msg *msg, u32 len, void *data, |
@@ -937,7 +966,7 @@ static int dlm_send_join_cancels(struct dlm_ctxt *dlm, | |||
937 | sizeof(unsigned long))) { | 966 | sizeof(unsigned long))) { |
938 | mlog(ML_ERROR, | 967 | mlog(ML_ERROR, |
939 | "map_size %u != BITS_TO_LONGS(O2NM_MAX_NODES) %u\n", | 968 | "map_size %u != BITS_TO_LONGS(O2NM_MAX_NODES) %u\n", |
940 | map_size, BITS_TO_LONGS(O2NM_MAX_NODES)); | 969 | map_size, (unsigned)BITS_TO_LONGS(O2NM_MAX_NODES)); |
941 | return -EINVAL; | 970 | return -EINVAL; |
942 | } | 971 | } |
943 | 972 | ||
@@ -968,7 +997,8 @@ static int dlm_request_join(struct dlm_ctxt *dlm, | |||
968 | { | 997 | { |
969 | int status; | 998 | int status; |
970 | struct dlm_query_join_request join_msg; | 999 | struct dlm_query_join_request join_msg; |
971 | union dlm_query_join_response join_resp; | 1000 | struct dlm_query_join_packet packet; |
1001 | u32 join_resp; | ||
972 | 1002 | ||
973 | mlog(0, "querying node %d\n", node); | 1003 | mlog(0, "querying node %d\n", node); |
974 | 1004 | ||
@@ -984,11 +1014,12 @@ static int dlm_request_join(struct dlm_ctxt *dlm, | |||
984 | 1014 | ||
985 | status = o2net_send_message(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, &join_msg, | 1015 | status = o2net_send_message(DLM_QUERY_JOIN_MSG, DLM_MOD_KEY, &join_msg, |
986 | sizeof(join_msg), node, | 1016 | sizeof(join_msg), node, |
987 | &join_resp.intval); | 1017 | &join_resp); |
988 | if (status < 0 && status != -ENOPROTOOPT) { | 1018 | if (status < 0 && status != -ENOPROTOOPT) { |
989 | mlog_errno(status); | 1019 | mlog_errno(status); |
990 | goto bail; | 1020 | goto bail; |
991 | } | 1021 | } |
1022 | dlm_query_join_wire_to_packet(join_resp, &packet); | ||
992 | 1023 | ||
993 | /* -ENOPROTOOPT from the net code means the other side isn't | 1024 | /* -ENOPROTOOPT from the net code means the other side isn't |
994 | listening for our message type -- that's fine, it means | 1025 | listening for our message type -- that's fine, it means |
@@ -997,10 +1028,10 @@ static int dlm_request_join(struct dlm_ctxt *dlm, | |||
997 | if (status == -ENOPROTOOPT) { | 1028 | if (status == -ENOPROTOOPT) { |
998 | status = 0; | 1029 | status = 0; |
999 | *response = JOIN_OK_NO_MAP; | 1030 | *response = JOIN_OK_NO_MAP; |
1000 | } else if (join_resp.packet.code == JOIN_DISALLOW || | 1031 | } else if (packet.code == JOIN_DISALLOW || |
1001 | join_resp.packet.code == JOIN_OK_NO_MAP) { | 1032 | packet.code == JOIN_OK_NO_MAP) { |
1002 | *response = join_resp.packet.code; | 1033 | *response = packet.code; |
1003 | } else if (join_resp.packet.code == JOIN_PROTOCOL_MISMATCH) { | 1034 | } else if (packet.code == JOIN_PROTOCOL_MISMATCH) { |
1004 | mlog(ML_NOTICE, | 1035 | mlog(ML_NOTICE, |
1005 | "This node requested DLM locking protocol %u.%u and " | 1036 | "This node requested DLM locking protocol %u.%u and " |
1006 | "filesystem locking protocol %u.%u. At least one of " | 1037 | "filesystem locking protocol %u.%u. At least one of " |
@@ -1012,14 +1043,12 @@ static int dlm_request_join(struct dlm_ctxt *dlm, | |||
1012 | dlm->fs_locking_proto.pv_minor, | 1043 | dlm->fs_locking_proto.pv_minor, |
1013 | node); | 1044 | node); |
1014 | status = -EPROTO; | 1045 | status = -EPROTO; |
1015 | *response = join_resp.packet.code; | 1046 | *response = packet.code; |
1016 | } else if (join_resp.packet.code == JOIN_OK) { | 1047 | } else if (packet.code == JOIN_OK) { |
1017 | *response = join_resp.packet.code; | 1048 | *response = packet.code; |
1018 | /* Use the same locking protocol as the remote node */ | 1049 | /* Use the same locking protocol as the remote node */ |
1019 | dlm->dlm_locking_proto.pv_minor = | 1050 | dlm->dlm_locking_proto.pv_minor = packet.dlm_minor; |
1020 | join_resp.packet.dlm_minor; | 1051 | dlm->fs_locking_proto.pv_minor = packet.fs_minor; |
1021 | dlm->fs_locking_proto.pv_minor = | ||
1022 | join_resp.packet.fs_minor; | ||
1023 | mlog(0, | 1052 | mlog(0, |
1024 | "Node %d responds JOIN_OK with DLM locking protocol " | 1053 | "Node %d responds JOIN_OK with DLM locking protocol " |
1025 | "%u.%u and fs locking protocol %u.%u\n", | 1054 | "%u.%u and fs locking protocol %u.%u\n", |
@@ -1031,11 +1060,11 @@ static int dlm_request_join(struct dlm_ctxt *dlm, | |||
1031 | } else { | 1060 | } else { |
1032 | status = -EINVAL; | 1061 | status = -EINVAL; |
1033 | mlog(ML_ERROR, "invalid response %d from node %u\n", | 1062 | mlog(ML_ERROR, "invalid response %d from node %u\n", |
1034 | join_resp.packet.code, node); | 1063 | packet.code, node); |
1035 | } | 1064 | } |
1036 | 1065 | ||
1037 | mlog(0, "status %d, node %d response is %d\n", status, node, | 1066 | mlog(0, "status %d, node %d response is %d\n", status, node, |
1038 | *response); | 1067 | *response); |
1039 | 1068 | ||
1040 | bail: | 1069 | bail: |
1041 | return status; | 1070 | return status; |
diff --git a/fs/ocfs2/dlm/dlmmaster.c b/fs/ocfs2/dlm/dlmmaster.c index c92d1b19fc0b..ea6b89577860 100644 --- a/fs/ocfs2/dlm/dlmmaster.c +++ b/fs/ocfs2/dlm/dlmmaster.c | |||
@@ -1663,7 +1663,12 @@ way_up_top: | |||
1663 | dlm_put_mle(tmpmle); | 1663 | dlm_put_mle(tmpmle); |
1664 | } | 1664 | } |
1665 | send_response: | 1665 | send_response: |
1666 | 1666 | /* | |
1667 | * __dlm_lookup_lockres() grabbed a reference to this lockres. | ||
1668 | * The reference is released by dlm_assert_master_worker() under | ||
1669 | * the call to dlm_dispatch_assert_master(). If | ||
1670 | * dlm_assert_master_worker() isn't called, we drop it here. | ||
1671 | */ | ||
1667 | if (dispatch_assert) { | 1672 | if (dispatch_assert) { |
1668 | if (response != DLM_MASTER_RESP_YES) | 1673 | if (response != DLM_MASTER_RESP_YES) |
1669 | mlog(ML_ERROR, "invalid response %d\n", response); | 1674 | mlog(ML_ERROR, "invalid response %d\n", response); |
@@ -1678,7 +1683,11 @@ send_response: | |||
1678 | if (ret < 0) { | 1683 | if (ret < 0) { |
1679 | mlog(ML_ERROR, "failed to dispatch assert master work\n"); | 1684 | mlog(ML_ERROR, "failed to dispatch assert master work\n"); |
1680 | response = DLM_MASTER_RESP_ERROR; | 1685 | response = DLM_MASTER_RESP_ERROR; |
1686 | dlm_lockres_put(res); | ||
1681 | } | 1687 | } |
1688 | } else { | ||
1689 | if (res) | ||
1690 | dlm_lockres_put(res); | ||
1682 | } | 1691 | } |
1683 | 1692 | ||
1684 | dlm_put(dlm); | 1693 | dlm_put(dlm); |
@@ -2348,7 +2357,7 @@ int dlm_deref_lockres_handler(struct o2net_msg *msg, u32 len, void *data, | |||
2348 | mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref " | 2357 | mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref " |
2349 | "but it is already dropped!\n", dlm->name, | 2358 | "but it is already dropped!\n", dlm->name, |
2350 | res->lockname.len, res->lockname.name, node); | 2359 | res->lockname.len, res->lockname.name, node); |
2351 | __dlm_print_one_lock_resource(res); | 2360 | dlm_print_one_lock_resource(res); |
2352 | } | 2361 | } |
2353 | ret = 0; | 2362 | ret = 0; |
2354 | goto done; | 2363 | goto done; |
@@ -2408,7 +2417,7 @@ static void dlm_deref_lockres_worker(struct dlm_work_item *item, void *data) | |||
2408 | mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref " | 2417 | mlog(ML_ERROR, "%s:%.*s: node %u trying to drop ref " |
2409 | "but it is already dropped!\n", dlm->name, | 2418 | "but it is already dropped!\n", dlm->name, |
2410 | res->lockname.len, res->lockname.name, node); | 2419 | res->lockname.len, res->lockname.name, node); |
2411 | __dlm_print_one_lock_resource(res); | 2420 | dlm_print_one_lock_resource(res); |
2412 | } | 2421 | } |
2413 | 2422 | ||
2414 | dlm_lockres_put(res); | 2423 | dlm_lockres_put(res); |
@@ -2933,6 +2942,9 @@ static void dlm_remove_nonlocal_locks(struct dlm_ctxt *dlm, | |||
2933 | dlm_lockres_clear_refmap_bit(lock->ml.node, res); | 2942 | dlm_lockres_clear_refmap_bit(lock->ml.node, res); |
2934 | list_del_init(&lock->list); | 2943 | list_del_init(&lock->list); |
2935 | dlm_lock_put(lock); | 2944 | dlm_lock_put(lock); |
2945 | /* In a normal unlock, we would have added a | ||
2946 | * DLM_UNLOCK_FREE_LOCK action. Force it. */ | ||
2947 | dlm_lock_put(lock); | ||
2936 | } | 2948 | } |
2937 | } | 2949 | } |
2938 | queue++; | 2950 | queue++; |
diff --git a/fs/ocfs2/dlm/dlmrecovery.c b/fs/ocfs2/dlm/dlmrecovery.c index 91f747b8a538..bcb9260c3735 100644 --- a/fs/ocfs2/dlm/dlmrecovery.c +++ b/fs/ocfs2/dlm/dlmrecovery.c | |||
@@ -519,9 +519,9 @@ static int dlm_do_recovery(struct dlm_ctxt *dlm) | |||
519 | return 0; | 519 | return 0; |
520 | 520 | ||
521 | master_here: | 521 | master_here: |
522 | mlog(0, "(%d) mastering recovery of %s:%u here(this=%u)!\n", | 522 | mlog(ML_NOTICE, "(%d) Node %u is the Recovery Master for the Dead Node " |
523 | task_pid_nr(dlm->dlm_reco_thread_task), | 523 | "%u for Domain %s\n", task_pid_nr(dlm->dlm_reco_thread_task), |
524 | dlm->name, dlm->reco.dead_node, dlm->node_num); | 524 | dlm->node_num, dlm->reco.dead_node, dlm->name); |
525 | 525 | ||
526 | status = dlm_remaster_locks(dlm, dlm->reco.dead_node); | 526 | status = dlm_remaster_locks(dlm, dlm->reco.dead_node); |
527 | if (status < 0) { | 527 | if (status < 0) { |
@@ -1191,7 +1191,7 @@ static int dlm_add_lock_to_array(struct dlm_lock *lock, | |||
1191 | (ml->type == LKM_EXMODE || | 1191 | (ml->type == LKM_EXMODE || |
1192 | memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) { | 1192 | memcmp(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN))) { |
1193 | mlog(ML_ERROR, "mismatched lvbs!\n"); | 1193 | mlog(ML_ERROR, "mismatched lvbs!\n"); |
1194 | __dlm_print_one_lock_resource(lock->lockres); | 1194 | dlm_print_one_lock_resource(lock->lockres); |
1195 | BUG(); | 1195 | BUG(); |
1196 | } | 1196 | } |
1197 | memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN); | 1197 | memcpy(mres->lvb, lock->lksb->lvb, DLM_LVB_LEN); |
@@ -1327,6 +1327,7 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, | |||
1327 | (struct dlm_migratable_lockres *)msg->buf; | 1327 | (struct dlm_migratable_lockres *)msg->buf; |
1328 | int ret = 0; | 1328 | int ret = 0; |
1329 | u8 real_master; | 1329 | u8 real_master; |
1330 | u8 extra_refs = 0; | ||
1330 | char *buf = NULL; | 1331 | char *buf = NULL; |
1331 | struct dlm_work_item *item = NULL; | 1332 | struct dlm_work_item *item = NULL; |
1332 | struct dlm_lock_resource *res = NULL; | 1333 | struct dlm_lock_resource *res = NULL; |
@@ -1404,16 +1405,28 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, | |||
1404 | __dlm_insert_lockres(dlm, res); | 1405 | __dlm_insert_lockres(dlm, res); |
1405 | spin_unlock(&dlm->spinlock); | 1406 | spin_unlock(&dlm->spinlock); |
1406 | 1407 | ||
1408 | /* Add an extra ref for this lock-less lockres lest the | ||
1409 | * dlm_thread purges it before we get the chance to add | ||
1410 | * locks to it */ | ||
1411 | dlm_lockres_get(res); | ||
1412 | |||
1413 | /* There are three refs that need to be put. | ||
1414 | * 1. Taken above. | ||
1415 | * 2. kref_init in dlm_new_lockres()->dlm_init_lockres(). | ||
1416 | * 3. dlm_lookup_lockres() | ||
1417 | * The first one is handled at the end of this function. The | ||
1418 | * other two are handled in the worker thread after locks have | ||
1419 | * been attached. Yes, we don't wait for purge time to match | ||
1420 | * kref_init. The lockres will still have atleast one ref | ||
1421 | * added because it is in the hash __dlm_insert_lockres() */ | ||
1422 | extra_refs++; | ||
1423 | |||
1407 | /* now that the new lockres is inserted, | 1424 | /* now that the new lockres is inserted, |
1408 | * make it usable by other processes */ | 1425 | * make it usable by other processes */ |
1409 | spin_lock(&res->spinlock); | 1426 | spin_lock(&res->spinlock); |
1410 | res->state &= ~DLM_LOCK_RES_IN_PROGRESS; | 1427 | res->state &= ~DLM_LOCK_RES_IN_PROGRESS; |
1411 | spin_unlock(&res->spinlock); | 1428 | spin_unlock(&res->spinlock); |
1412 | wake_up(&res->wq); | 1429 | wake_up(&res->wq); |
1413 | |||
1414 | /* add an extra ref for just-allocated lockres | ||
1415 | * otherwise the lockres will be purged immediately */ | ||
1416 | dlm_lockres_get(res); | ||
1417 | } | 1430 | } |
1418 | 1431 | ||
1419 | /* at this point we have allocated everything we need, | 1432 | /* at this point we have allocated everything we need, |
@@ -1443,12 +1456,17 @@ int dlm_mig_lockres_handler(struct o2net_msg *msg, u32 len, void *data, | |||
1443 | dlm_init_work_item(dlm, item, dlm_mig_lockres_worker, buf); | 1456 | dlm_init_work_item(dlm, item, dlm_mig_lockres_worker, buf); |
1444 | item->u.ml.lockres = res; /* already have a ref */ | 1457 | item->u.ml.lockres = res; /* already have a ref */ |
1445 | item->u.ml.real_master = real_master; | 1458 | item->u.ml.real_master = real_master; |
1459 | item->u.ml.extra_ref = extra_refs; | ||
1446 | spin_lock(&dlm->work_lock); | 1460 | spin_lock(&dlm->work_lock); |
1447 | list_add_tail(&item->list, &dlm->work_list); | 1461 | list_add_tail(&item->list, &dlm->work_list); |
1448 | spin_unlock(&dlm->work_lock); | 1462 | spin_unlock(&dlm->work_lock); |
1449 | queue_work(dlm->dlm_worker, &dlm->dispatched_work); | 1463 | queue_work(dlm->dlm_worker, &dlm->dispatched_work); |
1450 | 1464 | ||
1451 | leave: | 1465 | leave: |
1466 | /* One extra ref taken needs to be put here */ | ||
1467 | if (extra_refs) | ||
1468 | dlm_lockres_put(res); | ||
1469 | |||
1452 | dlm_put(dlm); | 1470 | dlm_put(dlm); |
1453 | if (ret < 0) { | 1471 | if (ret < 0) { |
1454 | if (buf) | 1472 | if (buf) |
@@ -1464,17 +1482,19 @@ leave: | |||
1464 | 1482 | ||
1465 | static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data) | 1483 | static void dlm_mig_lockres_worker(struct dlm_work_item *item, void *data) |
1466 | { | 1484 | { |
1467 | struct dlm_ctxt *dlm = data; | 1485 | struct dlm_ctxt *dlm; |
1468 | struct dlm_migratable_lockres *mres; | 1486 | struct dlm_migratable_lockres *mres; |
1469 | int ret = 0; | 1487 | int ret = 0; |
1470 | struct dlm_lock_resource *res; | 1488 | struct dlm_lock_resource *res; |
1471 | u8 real_master; | 1489 | u8 real_master; |
1490 | u8 extra_ref; | ||
1472 | 1491 | ||
1473 | dlm = item->dlm; | 1492 | dlm = item->dlm; |
1474 | mres = (struct dlm_migratable_lockres *)data; | 1493 | mres = (struct dlm_migratable_lockres *)data; |
1475 | 1494 | ||
1476 | res = item->u.ml.lockres; | 1495 | res = item->u.ml.lockres; |
1477 | real_master = item->u.ml.real_master; | 1496 | real_master = item->u.ml.real_master; |
1497 | extra_ref = item->u.ml.extra_ref; | ||
1478 | 1498 | ||
1479 | if (real_master == DLM_LOCK_RES_OWNER_UNKNOWN) { | 1499 | if (real_master == DLM_LOCK_RES_OWNER_UNKNOWN) { |
1480 | /* this case is super-rare. only occurs if | 1500 | /* this case is super-rare. only occurs if |
@@ -1517,6 +1537,12 @@ again: | |||
1517 | } | 1537 | } |
1518 | 1538 | ||
1519 | leave: | 1539 | leave: |
1540 | /* See comment in dlm_mig_lockres_handler() */ | ||
1541 | if (res) { | ||
1542 | if (extra_ref) | ||
1543 | dlm_lockres_put(res); | ||
1544 | dlm_lockres_put(res); | ||
1545 | } | ||
1520 | kfree(data); | 1546 | kfree(data); |
1521 | mlog_exit(ret); | 1547 | mlog_exit(ret); |
1522 | } | 1548 | } |
@@ -1644,7 +1670,8 @@ int dlm_master_requery_handler(struct o2net_msg *msg, u32 len, void *data, | |||
1644 | /* retry!? */ | 1670 | /* retry!? */ |
1645 | BUG(); | 1671 | BUG(); |
1646 | } | 1672 | } |
1647 | } | 1673 | } else /* put.. incase we are not the master */ |
1674 | dlm_lockres_put(res); | ||
1648 | spin_unlock(&res->spinlock); | 1675 | spin_unlock(&res->spinlock); |
1649 | } | 1676 | } |
1650 | spin_unlock(&dlm->spinlock); | 1677 | spin_unlock(&dlm->spinlock); |
@@ -1921,6 +1948,7 @@ void dlm_move_lockres_to_recovery_list(struct dlm_ctxt *dlm, | |||
1921 | "Recovering res %s:%.*s, is already on recovery list!\n", | 1948 | "Recovering res %s:%.*s, is already on recovery list!\n", |
1922 | dlm->name, res->lockname.len, res->lockname.name); | 1949 | dlm->name, res->lockname.len, res->lockname.name); |
1923 | list_del_init(&res->recovering); | 1950 | list_del_init(&res->recovering); |
1951 | dlm_lockres_put(res); | ||
1924 | } | 1952 | } |
1925 | /* We need to hold a reference while on the recovery list */ | 1953 | /* We need to hold a reference while on the recovery list */ |
1926 | dlm_lockres_get(res); | 1954 | dlm_lockres_get(res); |
@@ -2130,11 +2158,16 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm, | |||
2130 | assert_spin_locked(&dlm->spinlock); | 2158 | assert_spin_locked(&dlm->spinlock); |
2131 | assert_spin_locked(&res->spinlock); | 2159 | assert_spin_locked(&res->spinlock); |
2132 | 2160 | ||
2161 | /* We do two dlm_lock_put(). One for removing from list and the other is | ||
2162 | * to force the DLM_UNLOCK_FREE_LOCK action so as to free the locks */ | ||
2163 | |||
2133 | /* TODO: check pending_asts, pending_basts here */ | 2164 | /* TODO: check pending_asts, pending_basts here */ |
2134 | list_for_each_entry_safe(lock, next, &res->granted, list) { | 2165 | list_for_each_entry_safe(lock, next, &res->granted, list) { |
2135 | if (lock->ml.node == dead_node) { | 2166 | if (lock->ml.node == dead_node) { |
2136 | list_del_init(&lock->list); | 2167 | list_del_init(&lock->list); |
2137 | dlm_lock_put(lock); | 2168 | dlm_lock_put(lock); |
2169 | /* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */ | ||
2170 | dlm_lock_put(lock); | ||
2138 | freed++; | 2171 | freed++; |
2139 | } | 2172 | } |
2140 | } | 2173 | } |
@@ -2142,6 +2175,8 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm, | |||
2142 | if (lock->ml.node == dead_node) { | 2175 | if (lock->ml.node == dead_node) { |
2143 | list_del_init(&lock->list); | 2176 | list_del_init(&lock->list); |
2144 | dlm_lock_put(lock); | 2177 | dlm_lock_put(lock); |
2178 | /* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */ | ||
2179 | dlm_lock_put(lock); | ||
2145 | freed++; | 2180 | freed++; |
2146 | } | 2181 | } |
2147 | } | 2182 | } |
@@ -2149,6 +2184,8 @@ static void dlm_free_dead_locks(struct dlm_ctxt *dlm, | |||
2149 | if (lock->ml.node == dead_node) { | 2184 | if (lock->ml.node == dead_node) { |
2150 | list_del_init(&lock->list); | 2185 | list_del_init(&lock->list); |
2151 | dlm_lock_put(lock); | 2186 | dlm_lock_put(lock); |
2187 | /* Can't schedule DLM_UNLOCK_FREE_LOCK - do manually */ | ||
2188 | dlm_lock_put(lock); | ||
2152 | freed++; | 2189 | freed++; |
2153 | } | 2190 | } |
2154 | } | 2191 | } |
diff --git a/fs/ocfs2/dlm/dlmthread.c b/fs/ocfs2/dlm/dlmthread.c index cebd089f8955..4060bb328bc8 100644 --- a/fs/ocfs2/dlm/dlmthread.c +++ b/fs/ocfs2/dlm/dlmthread.c | |||
@@ -176,12 +176,14 @@ static int dlm_purge_lockres(struct dlm_ctxt *dlm, | |||
176 | res->lockname.name, master); | 176 | res->lockname.name, master); |
177 | 177 | ||
178 | if (!master) { | 178 | if (!master) { |
179 | /* drop spinlock... retake below */ | ||
180 | spin_unlock(&dlm->spinlock); | ||
181 | |||
179 | spin_lock(&res->spinlock); | 182 | spin_lock(&res->spinlock); |
180 | /* This ensures that clear refmap is sent after the set */ | 183 | /* This ensures that clear refmap is sent after the set */ |
181 | __dlm_wait_on_lockres_flags(res, DLM_LOCK_RES_SETREF_INPROG); | 184 | __dlm_wait_on_lockres_flags(res, DLM_LOCK_RES_SETREF_INPROG); |
182 | spin_unlock(&res->spinlock); | 185 | spin_unlock(&res->spinlock); |
183 | /* drop spinlock to do messaging, retake below */ | 186 | |
184 | spin_unlock(&dlm->spinlock); | ||
185 | /* clear our bit from the master's refmap, ignore errors */ | 187 | /* clear our bit from the master's refmap, ignore errors */ |
186 | ret = dlm_drop_lockres_ref(dlm, res); | 188 | ret = dlm_drop_lockres_ref(dlm, res); |
187 | if (ret < 0) { | 189 | if (ret < 0) { |
diff --git a/fs/ocfs2/dlmglue.c b/fs/ocfs2/dlmglue.c index f7794306b2bd..1f1873bf41fb 100644 --- a/fs/ocfs2/dlmglue.c +++ b/fs/ocfs2/dlmglue.c | |||
@@ -2409,7 +2409,7 @@ static int ocfs2_dlm_seq_show(struct seq_file *m, void *v) | |||
2409 | return 0; | 2409 | return 0; |
2410 | } | 2410 | } |
2411 | 2411 | ||
2412 | static struct seq_operations ocfs2_dlm_seq_ops = { | 2412 | static const struct seq_operations ocfs2_dlm_seq_ops = { |
2413 | .start = ocfs2_dlm_seq_start, | 2413 | .start = ocfs2_dlm_seq_start, |
2414 | .stop = ocfs2_dlm_seq_stop, | 2414 | .stop = ocfs2_dlm_seq_stop, |
2415 | .next = ocfs2_dlm_seq_next, | 2415 | .next = ocfs2_dlm_seq_next, |
diff --git a/fs/ocfs2/resize.c b/fs/ocfs2/resize.c index 37835ffcb039..8166968e9015 100644 --- a/fs/ocfs2/resize.c +++ b/fs/ocfs2/resize.c | |||
@@ -597,7 +597,7 @@ int ocfs2_group_add(struct inode *inode, struct ocfs2_new_group_input *input) | |||
597 | memset(cr, 0, sizeof(struct ocfs2_chain_rec)); | 597 | memset(cr, 0, sizeof(struct ocfs2_chain_rec)); |
598 | } | 598 | } |
599 | 599 | ||
600 | cr->c_blkno = le64_to_cpu(input->group); | 600 | cr->c_blkno = cpu_to_le64(input->group); |
601 | le32_add_cpu(&cr->c_total, input->clusters * cl_bpc); | 601 | le32_add_cpu(&cr->c_total, input->clusters * cl_bpc); |
602 | le32_add_cpu(&cr->c_free, input->frees * cl_bpc); | 602 | le32_add_cpu(&cr->c_free, input->frees * cl_bpc); |
603 | 603 | ||
diff --git a/fs/proc/base.c b/fs/proc/base.c index 91a1bd67ac1d..9a4da0aae02e 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -2269,6 +2269,9 @@ static const struct pid_entry tgid_base_stuff[] = { | |||
2269 | DIR("task", S_IRUGO|S_IXUGO, task), | 2269 | DIR("task", S_IRUGO|S_IXUGO, task), |
2270 | DIR("fd", S_IRUSR|S_IXUSR, fd), | 2270 | DIR("fd", S_IRUSR|S_IXUSR, fd), |
2271 | DIR("fdinfo", S_IRUSR|S_IXUSR, fdinfo), | 2271 | DIR("fdinfo", S_IRUSR|S_IXUSR, fdinfo), |
2272 | #ifdef CONFIG_NET | ||
2273 | DIR("net", S_IRUGO|S_IXUSR, net), | ||
2274 | #endif | ||
2272 | REG("environ", S_IRUSR, environ), | 2275 | REG("environ", S_IRUSR, environ), |
2273 | INF("auxv", S_IRUSR, pid_auxv), | 2276 | INF("auxv", S_IRUSR, pid_auxv), |
2274 | ONE("status", S_IRUGO, pid_status), | 2277 | ONE("status", S_IRUGO, pid_status), |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 68971e66cd41..a36ad3c75cf4 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
@@ -377,15 +377,14 @@ static struct dentry_operations proc_dentry_operations = | |||
377 | * Don't create negative dentries here, return -ENOENT by hand | 377 | * Don't create negative dentries here, return -ENOENT by hand |
378 | * instead. | 378 | * instead. |
379 | */ | 379 | */ |
380 | struct dentry *proc_lookup(struct inode * dir, struct dentry *dentry, struct nameidata *nd) | 380 | struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *dir, |
381 | struct dentry *dentry) | ||
381 | { | 382 | { |
382 | struct inode *inode = NULL; | 383 | struct inode *inode = NULL; |
383 | struct proc_dir_entry * de; | ||
384 | int error = -ENOENT; | 384 | int error = -ENOENT; |
385 | 385 | ||
386 | lock_kernel(); | 386 | lock_kernel(); |
387 | spin_lock(&proc_subdir_lock); | 387 | spin_lock(&proc_subdir_lock); |
388 | de = PDE(dir); | ||
389 | if (de) { | 388 | if (de) { |
390 | for (de = de->subdir; de ; de = de->next) { | 389 | for (de = de->subdir; de ; de = de->next) { |
391 | if (de->namelen != dentry->d_name.len) | 390 | if (de->namelen != dentry->d_name.len) |
@@ -393,8 +392,6 @@ struct dentry *proc_lookup(struct inode * dir, struct dentry *dentry, struct nam | |||
393 | if (!memcmp(dentry->d_name.name, de->name, de->namelen)) { | 392 | if (!memcmp(dentry->d_name.name, de->name, de->namelen)) { |
394 | unsigned int ino; | 393 | unsigned int ino; |
395 | 394 | ||
396 | if (de->shadow_proc) | ||
397 | de = de->shadow_proc(current, de); | ||
398 | ino = de->low_ino; | 395 | ino = de->low_ino; |
399 | de_get(de); | 396 | de_get(de); |
400 | spin_unlock(&proc_subdir_lock); | 397 | spin_unlock(&proc_subdir_lock); |
@@ -417,6 +414,12 @@ out_unlock: | |||
417 | return ERR_PTR(error); | 414 | return ERR_PTR(error); |
418 | } | 415 | } |
419 | 416 | ||
417 | struct dentry *proc_lookup(struct inode *dir, struct dentry *dentry, | ||
418 | struct nameidata *nd) | ||
419 | { | ||
420 | return proc_lookup_de(PDE(dir), dir, dentry); | ||
421 | } | ||
422 | |||
420 | /* | 423 | /* |
421 | * This returns non-zero if at EOF, so that the /proc | 424 | * This returns non-zero if at EOF, so that the /proc |
422 | * root directory can use this and check if it should | 425 | * root directory can use this and check if it should |
@@ -426,10 +429,9 @@ out_unlock: | |||
426 | * value of the readdir() call, as long as it's non-negative | 429 | * value of the readdir() call, as long as it's non-negative |
427 | * for success.. | 430 | * for success.. |
428 | */ | 431 | */ |
429 | int proc_readdir(struct file * filp, | 432 | int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent, |
430 | void * dirent, filldir_t filldir) | 433 | filldir_t filldir) |
431 | { | 434 | { |
432 | struct proc_dir_entry * de; | ||
433 | unsigned int ino; | 435 | unsigned int ino; |
434 | int i; | 436 | int i; |
435 | struct inode *inode = filp->f_path.dentry->d_inode; | 437 | struct inode *inode = filp->f_path.dentry->d_inode; |
@@ -438,7 +440,6 @@ int proc_readdir(struct file * filp, | |||
438 | lock_kernel(); | 440 | lock_kernel(); |
439 | 441 | ||
440 | ino = inode->i_ino; | 442 | ino = inode->i_ino; |
441 | de = PDE(inode); | ||
442 | if (!de) { | 443 | if (!de) { |
443 | ret = -EINVAL; | 444 | ret = -EINVAL; |
444 | goto out; | 445 | goto out; |
@@ -499,6 +500,13 @@ out: unlock_kernel(); | |||
499 | return ret; | 500 | return ret; |
500 | } | 501 | } |
501 | 502 | ||
503 | int proc_readdir(struct file *filp, void *dirent, filldir_t filldir) | ||
504 | { | ||
505 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
506 | |||
507 | return proc_readdir_de(PDE(inode), filp, dirent, filldir); | ||
508 | } | ||
509 | |||
502 | /* | 510 | /* |
503 | * These are the generic /proc directory operations. They | 511 | * These are the generic /proc directory operations. They |
504 | * use the in-memory "struct proc_dir_entry" tree to parse | 512 | * use the in-memory "struct proc_dir_entry" tree to parse |
diff --git a/fs/proc/internal.h b/fs/proc/internal.h index 1c81c8f1aeed..bc72f5c8c47d 100644 --- a/fs/proc/internal.h +++ b/fs/proc/internal.h | |||
@@ -64,6 +64,8 @@ extern const struct file_operations proc_numa_maps_operations; | |||
64 | extern const struct file_operations proc_smaps_operations; | 64 | extern const struct file_operations proc_smaps_operations; |
65 | extern const struct file_operations proc_clear_refs_operations; | 65 | extern const struct file_operations proc_clear_refs_operations; |
66 | extern const struct file_operations proc_pagemap_operations; | 66 | extern const struct file_operations proc_pagemap_operations; |
67 | extern const struct file_operations proc_net_operations; | ||
68 | extern const struct inode_operations proc_net_inode_operations; | ||
67 | 69 | ||
68 | void free_proc_entry(struct proc_dir_entry *de); | 70 | void free_proc_entry(struct proc_dir_entry *de); |
69 | 71 | ||
@@ -83,3 +85,8 @@ static inline int proc_fd(struct inode *inode) | |||
83 | { | 85 | { |
84 | return PROC_I(inode)->fd; | 86 | return PROC_I(inode)->fd; |
85 | } | 87 | } |
88 | |||
89 | struct dentry *proc_lookup_de(struct proc_dir_entry *de, struct inode *ino, | ||
90 | struct dentry *dentry); | ||
91 | int proc_readdir_de(struct proc_dir_entry *de, struct file *filp, void *dirent, | ||
92 | filldir_t filldir); | ||
diff --git a/fs/proc/proc_net.c b/fs/proc/proc_net.c index 14e9b5aaf863..4caa5f774fb7 100644 --- a/fs/proc/proc_net.c +++ b/fs/proc/proc_net.c | |||
@@ -63,6 +63,82 @@ int seq_release_net(struct inode *ino, struct file *f) | |||
63 | } | 63 | } |
64 | EXPORT_SYMBOL_GPL(seq_release_net); | 64 | EXPORT_SYMBOL_GPL(seq_release_net); |
65 | 65 | ||
66 | static struct net *get_proc_task_net(struct inode *dir) | ||
67 | { | ||
68 | struct task_struct *task; | ||
69 | struct nsproxy *ns; | ||
70 | struct net *net = NULL; | ||
71 | |||
72 | rcu_read_lock(); | ||
73 | task = pid_task(proc_pid(dir), PIDTYPE_PID); | ||
74 | if (task != NULL) { | ||
75 | ns = task_nsproxy(task); | ||
76 | if (ns != NULL) | ||
77 | net = get_net(ns->net_ns); | ||
78 | } | ||
79 | rcu_read_unlock(); | ||
80 | |||
81 | return net; | ||
82 | } | ||
83 | |||
84 | static struct dentry *proc_tgid_net_lookup(struct inode *dir, | ||
85 | struct dentry *dentry, struct nameidata *nd) | ||
86 | { | ||
87 | struct dentry *de; | ||
88 | struct net *net; | ||
89 | |||
90 | de = ERR_PTR(-ENOENT); | ||
91 | net = get_proc_task_net(dir); | ||
92 | if (net != NULL) { | ||
93 | de = proc_lookup_de(net->proc_net, dir, dentry); | ||
94 | put_net(net); | ||
95 | } | ||
96 | return de; | ||
97 | } | ||
98 | |||
99 | static int proc_tgid_net_getattr(struct vfsmount *mnt, struct dentry *dentry, | ||
100 | struct kstat *stat) | ||
101 | { | ||
102 | struct inode *inode = dentry->d_inode; | ||
103 | struct net *net; | ||
104 | |||
105 | net = get_proc_task_net(inode); | ||
106 | |||
107 | generic_fillattr(inode, stat); | ||
108 | |||
109 | if (net != NULL) { | ||
110 | stat->nlink = net->proc_net->nlink; | ||
111 | put_net(net); | ||
112 | } | ||
113 | |||
114 | return 0; | ||
115 | } | ||
116 | |||
117 | const struct inode_operations proc_net_inode_operations = { | ||
118 | .lookup = proc_tgid_net_lookup, | ||
119 | .getattr = proc_tgid_net_getattr, | ||
120 | }; | ||
121 | |||
122 | static int proc_tgid_net_readdir(struct file *filp, void *dirent, | ||
123 | filldir_t filldir) | ||
124 | { | ||
125 | int ret; | ||
126 | struct net *net; | ||
127 | |||
128 | ret = -EINVAL; | ||
129 | net = get_proc_task_net(filp->f_path.dentry->d_inode); | ||
130 | if (net != NULL) { | ||
131 | ret = proc_readdir_de(net->proc_net, filp, dirent, filldir); | ||
132 | put_net(net); | ||
133 | } | ||
134 | return ret; | ||
135 | } | ||
136 | |||
137 | const struct file_operations proc_net_operations = { | ||
138 | .read = generic_read_dir, | ||
139 | .readdir = proc_tgid_net_readdir, | ||
140 | }; | ||
141 | |||
66 | 142 | ||
67 | struct proc_dir_entry *proc_net_fops_create(struct net *net, | 143 | struct proc_dir_entry *proc_net_fops_create(struct net *net, |
68 | const char *name, mode_t mode, const struct file_operations *fops) | 144 | const char *name, mode_t mode, const struct file_operations *fops) |
@@ -83,14 +159,6 @@ struct net *get_proc_net(const struct inode *inode) | |||
83 | } | 159 | } |
84 | EXPORT_SYMBOL_GPL(get_proc_net); | 160 | EXPORT_SYMBOL_GPL(get_proc_net); |
85 | 161 | ||
86 | static struct proc_dir_entry *shadow_pde; | ||
87 | |||
88 | static struct proc_dir_entry *proc_net_shadow(struct task_struct *task, | ||
89 | struct proc_dir_entry *de) | ||
90 | { | ||
91 | return task->nsproxy->net_ns->proc_net; | ||
92 | } | ||
93 | |||
94 | struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, | 162 | struct proc_dir_entry *proc_net_mkdir(struct net *net, const char *name, |
95 | struct proc_dir_entry *parent) | 163 | struct proc_dir_entry *parent) |
96 | { | 164 | { |
@@ -104,45 +172,39 @@ EXPORT_SYMBOL_GPL(proc_net_mkdir); | |||
104 | 172 | ||
105 | static __net_init int proc_net_ns_init(struct net *net) | 173 | static __net_init int proc_net_ns_init(struct net *net) |
106 | { | 174 | { |
107 | struct proc_dir_entry *root, *netd, *net_statd; | 175 | struct proc_dir_entry *netd, *net_statd; |
108 | int err; | 176 | int err; |
109 | 177 | ||
110 | err = -ENOMEM; | 178 | err = -ENOMEM; |
111 | root = kzalloc(sizeof(*root), GFP_KERNEL); | 179 | netd = kzalloc(sizeof(*netd), GFP_KERNEL); |
112 | if (!root) | 180 | if (!netd) |
113 | goto out; | 181 | goto out; |
114 | 182 | ||
115 | err = -EEXIST; | 183 | netd->data = net; |
116 | netd = proc_net_mkdir(net, "net", root); | 184 | netd->nlink = 2; |
117 | if (!netd) | 185 | netd->name = "net"; |
118 | goto free_root; | 186 | netd->namelen = 3; |
187 | netd->parent = &proc_root; | ||
119 | 188 | ||
120 | err = -EEXIST; | 189 | err = -EEXIST; |
121 | net_statd = proc_net_mkdir(net, "stat", netd); | 190 | net_statd = proc_net_mkdir(net, "stat", netd); |
122 | if (!net_statd) | 191 | if (!net_statd) |
123 | goto free_net; | 192 | goto free_net; |
124 | 193 | ||
125 | root->data = net; | ||
126 | |||
127 | net->proc_net_root = root; | ||
128 | net->proc_net = netd; | 194 | net->proc_net = netd; |
129 | net->proc_net_stat = net_statd; | 195 | net->proc_net_stat = net_statd; |
130 | err = 0; | 196 | return 0; |
131 | 197 | ||
198 | free_net: | ||
199 | kfree(netd); | ||
132 | out: | 200 | out: |
133 | return err; | 201 | return err; |
134 | free_net: | ||
135 | remove_proc_entry("net", root); | ||
136 | free_root: | ||
137 | kfree(root); | ||
138 | goto out; | ||
139 | } | 202 | } |
140 | 203 | ||
141 | static __net_exit void proc_net_ns_exit(struct net *net) | 204 | static __net_exit void proc_net_ns_exit(struct net *net) |
142 | { | 205 | { |
143 | remove_proc_entry("stat", net->proc_net); | 206 | remove_proc_entry("stat", net->proc_net); |
144 | remove_proc_entry("net", net->proc_net_root); | 207 | kfree(net->proc_net); |
145 | kfree(net->proc_net_root); | ||
146 | } | 208 | } |
147 | 209 | ||
148 | static struct pernet_operations __net_initdata proc_net_ns_ops = { | 210 | static struct pernet_operations __net_initdata proc_net_ns_ops = { |
@@ -152,8 +214,7 @@ static struct pernet_operations __net_initdata proc_net_ns_ops = { | |||
152 | 214 | ||
153 | int __init proc_net_init(void) | 215 | int __init proc_net_init(void) |
154 | { | 216 | { |
155 | shadow_pde = proc_mkdir("net", NULL); | 217 | proc_symlink("net", NULL, "self/net"); |
156 | shadow_pde->shadow_proc = proc_net_shadow; | ||
157 | 218 | ||
158 | return register_pernet_subsys(&proc_net_ns_ops); | 219 | return register_pernet_subsys(&proc_net_ns_ops); |
159 | } | 220 | } |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 6dc0334815f7..4206454734e0 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -640,17 +640,17 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
640 | 640 | ||
641 | ret = -EACCES; | 641 | ret = -EACCES; |
642 | if (!ptrace_may_attach(task)) | 642 | if (!ptrace_may_attach(task)) |
643 | goto out; | 643 | goto out_task; |
644 | 644 | ||
645 | ret = -EINVAL; | 645 | ret = -EINVAL; |
646 | /* file position must be aligned */ | 646 | /* file position must be aligned */ |
647 | if (*ppos % PM_ENTRY_BYTES) | 647 | if (*ppos % PM_ENTRY_BYTES) |
648 | goto out; | 648 | goto out_task; |
649 | 649 | ||
650 | ret = 0; | 650 | ret = 0; |
651 | mm = get_task_mm(task); | 651 | mm = get_task_mm(task); |
652 | if (!mm) | 652 | if (!mm) |
653 | goto out; | 653 | goto out_task; |
654 | 654 | ||
655 | ret = -ENOMEM; | 655 | ret = -ENOMEM; |
656 | uaddr = (unsigned long)buf & PAGE_MASK; | 656 | uaddr = (unsigned long)buf & PAGE_MASK; |
@@ -658,7 +658,7 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
658 | pagecount = (PAGE_ALIGN(uend) - uaddr) / PAGE_SIZE; | 658 | pagecount = (PAGE_ALIGN(uend) - uaddr) / PAGE_SIZE; |
659 | pages = kmalloc(pagecount * sizeof(struct page *), GFP_KERNEL); | 659 | pages = kmalloc(pagecount * sizeof(struct page *), GFP_KERNEL); |
660 | if (!pages) | 660 | if (!pages) |
661 | goto out_task; | 661 | goto out_mm; |
662 | 662 | ||
663 | down_read(¤t->mm->mmap_sem); | 663 | down_read(¤t->mm->mmap_sem); |
664 | ret = get_user_pages(current, current->mm, uaddr, pagecount, | 664 | ret = get_user_pages(current, current->mm, uaddr, pagecount, |
@@ -668,6 +668,12 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
668 | if (ret < 0) | 668 | if (ret < 0) |
669 | goto out_free; | 669 | goto out_free; |
670 | 670 | ||
671 | if (ret != pagecount) { | ||
672 | pagecount = ret; | ||
673 | ret = -EFAULT; | ||
674 | goto out_pages; | ||
675 | } | ||
676 | |||
671 | pm.out = buf; | 677 | pm.out = buf; |
672 | pm.end = buf + count; | 678 | pm.end = buf + count; |
673 | 679 | ||
@@ -699,15 +705,17 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, | |||
699 | ret = pm.out - buf; | 705 | ret = pm.out - buf; |
700 | } | 706 | } |
701 | 707 | ||
708 | out_pages: | ||
702 | for (; pagecount; pagecount--) { | 709 | for (; pagecount; pagecount--) { |
703 | page = pages[pagecount-1]; | 710 | page = pages[pagecount-1]; |
704 | if (!PageReserved(page)) | 711 | if (!PageReserved(page)) |
705 | SetPageDirty(page); | 712 | SetPageDirty(page); |
706 | page_cache_release(page); | 713 | page_cache_release(page); |
707 | } | 714 | } |
708 | mmput(mm); | ||
709 | out_free: | 715 | out_free: |
710 | kfree(pages); | 716 | kfree(pages); |
717 | out_mm: | ||
718 | mmput(mm); | ||
711 | out_task: | 719 | out_task: |
712 | put_task_struct(task); | 720 | put_task_struct(task); |
713 | out: | 721 | out: |
diff --git a/include/asm-arm/arch-omap/board-h3.h b/include/asm-arm/arch-omap/board-h3.h index 1c2b55c61ca0..0f6404435ea8 100644 --- a/include/asm-arm/arch-omap/board-h3.h +++ b/include/asm-arm/arch-omap/board-h3.h | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #define NR_IRQS (MAXIRQNUM + 1) | 37 | #define NR_IRQS (MAXIRQNUM + 1) |
38 | 38 | ||
39 | extern void __init h3_mmc_init(void); | 39 | extern void h3_mmc_init(void); |
40 | extern void h3_mmc_slot_cover_handler(void *arg, int state); | 40 | extern void h3_mmc_slot_cover_handler(void *arg, int state); |
41 | 41 | ||
42 | #endif /* __ASM_ARCH_OMAP_H3_H */ | 42 | #endif /* __ASM_ARCH_OMAP_H3_H */ |
diff --git a/include/asm-arm/arch-omap/common.h b/include/asm-arm/arch-omap/common.h index 442aecbb8f44..224e009e5296 100644 --- a/include/asm-arm/arch-omap/common.h +++ b/include/asm-arm/arch-omap/common.h | |||
@@ -27,9 +27,7 @@ | |||
27 | #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H | 27 | #ifndef __ARCH_ARM_MACH_OMAP_COMMON_H |
28 | #define __ARCH_ARM_MACH_OMAP_COMMON_H | 28 | #define __ARCH_ARM_MACH_OMAP_COMMON_H |
29 | 29 | ||
30 | #ifdef CONFIG_I2C_OMAP | ||
31 | #include <linux/i2c.h> | 30 | #include <linux/i2c.h> |
32 | #endif | ||
33 | 31 | ||
34 | struct sys_timer; | 32 | struct sys_timer; |
35 | 33 | ||
@@ -41,7 +39,12 @@ extern int omap_register_i2c_bus(int bus_id, u32 clkrate, | |||
41 | struct i2c_board_info const *info, | 39 | struct i2c_board_info const *info, |
42 | unsigned len); | 40 | unsigned len); |
43 | #else | 41 | #else |
44 | #define omap_register_i2c_bus(a, b, c, d) 0 | 42 | static inline int omap_register_i2c_bus(int bus_id, u32 clkrate, |
43 | struct i2c_board_info const *info, | ||
44 | unsigned len) | ||
45 | { | ||
46 | return 0; | ||
47 | } | ||
45 | #endif | 48 | #endif |
46 | 49 | ||
47 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ | 50 | #endif /* __ARCH_ARM_MACH_OMAP_COMMON_H */ |
diff --git a/include/asm-arm/arch-omap/gpioexpander.h b/include/asm-arm/arch-omap/gpioexpander.h index 7a43b0a912e4..4eed1f80e2fb 100644 --- a/include/asm-arm/arch-omap/gpioexpander.h +++ b/include/asm-arm/arch-omap/gpioexpander.h | |||
@@ -18,7 +18,18 @@ | |||
18 | 18 | ||
19 | /* Function Prototypes for GPIO Expander functions */ | 19 | /* Function Prototypes for GPIO Expander functions */ |
20 | 20 | ||
21 | #ifdef CONFIG_GPIOEXPANDER_OMAP | ||
21 | int read_gpio_expa(u8 *, int); | 22 | int read_gpio_expa(u8 *, int); |
22 | int write_gpio_expa(u8 , int); | 23 | int write_gpio_expa(u8 , int); |
24 | #else | ||
25 | static inline int read_gpio_expa(u8 *val, int addr) | ||
26 | { | ||
27 | return 0; | ||
28 | } | ||
29 | static inline int write_gpio_expa(u8 val, int addr) | ||
30 | { | ||
31 | return 0; | ||
32 | } | ||
33 | #endif | ||
23 | 34 | ||
24 | #endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */ | 35 | #endif /* __ASM_ARCH_OMAP_GPIOEXPANDER_H */ |
diff --git a/include/asm-arm/pgtable-nommu.h b/include/asm-arm/pgtable-nommu.h index 33c83dd87965..2e5868bbe03b 100644 --- a/include/asm-arm/pgtable-nommu.h +++ b/include/asm-arm/pgtable-nommu.h | |||
@@ -92,6 +92,8 @@ extern unsigned int kobjsize(const void *objp); | |||
92 | 92 | ||
93 | #define FIRST_USER_ADDRESS (0) | 93 | #define FIRST_USER_ADDRESS (0) |
94 | 94 | ||
95 | #include <asm-generic/pgtable.h> | ||
96 | |||
95 | #else | 97 | #else |
96 | 98 | ||
97 | /* | 99 | /* |
diff --git a/include/asm-arm/plat-s3c/uncompress.h b/include/asm-arm/plat-s3c/uncompress.h index b5e6208175d1..19b9eda39485 100644 --- a/include/asm-arm/plat-s3c/uncompress.h +++ b/include/asm-arm/plat-s3c/uncompress.h | |||
@@ -27,8 +27,8 @@ static void arch_detect_cpu(void); | |||
27 | 27 | ||
28 | /* defines for UART registers */ | 28 | /* defines for UART registers */ |
29 | 29 | ||
30 | #include "asm/plat-s3c/regs-serial.h" | 30 | #include <asm/plat-s3c/regs-serial.h> |
31 | #include "asm/plat-s3c/regs-watchdog.h" | 31 | #include <asm/plat-s3c/regs-watchdog.h> |
32 | 32 | ||
33 | /* working in physical space... */ | 33 | /* working in physical space... */ |
34 | #undef S3C2410_WDOGREG | 34 | #undef S3C2410_WDOGREG |
diff --git a/include/asm-arm/proc-fns.h b/include/asm-arm/proc-fns.h index a4ce457199d3..75ec760f4c74 100644 --- a/include/asm-arm/proc-fns.h +++ b/include/asm-arm/proc-fns.h | |||
@@ -214,9 +214,9 @@ | |||
214 | #ifndef __ASSEMBLY__ | 214 | #ifndef __ASSEMBLY__ |
215 | 215 | ||
216 | #ifndef MULTI_CPU | 216 | #ifndef MULTI_CPU |
217 | #include "asm/cpu-single.h" | 217 | #include <asm/cpu-single.h> |
218 | #else | 218 | #else |
219 | #include "asm/cpu-multi32.h" | 219 | #include <asm/cpu-multi32.h> |
220 | #endif | 220 | #endif |
221 | 221 | ||
222 | #include <asm/memory.h> | 222 | #include <asm/memory.h> |
diff --git a/include/asm-h8300/uaccess.h b/include/asm-h8300/uaccess.h index a22350ec271a..356068cd0879 100644 --- a/include/asm-h8300/uaccess.h +++ b/include/asm-h8300/uaccess.h | |||
@@ -91,22 +91,19 @@ extern int __put_user_bad(void); | |||
91 | #define get_user(x, ptr) \ | 91 | #define get_user(x, ptr) \ |
92 | ({ \ | 92 | ({ \ |
93 | int __gu_err = 0; \ | 93 | int __gu_err = 0; \ |
94 | uint32_t __gu_val = 0; \ | 94 | typeof(*(ptr)) __gu_val = *ptr; \ |
95 | switch (sizeof(*(ptr))) { \ | 95 | switch (sizeof(*(ptr))) { \ |
96 | case 1: \ | 96 | case 1: \ |
97 | case 2: \ | 97 | case 2: \ |
98 | case 4: \ | 98 | case 4: \ |
99 | __gu_val = *(ptr); \ | 99 | case 8: \ |
100 | break; \ | ||
101 | case 8: \ | ||
102 | memcpy(&__gu_val, ptr, sizeof (*(ptr))); \ | ||
103 | break; \ | 100 | break; \ |
104 | default: \ | 101 | default: \ |
105 | __gu_val = 0; \ | ||
106 | __gu_err = __get_user_bad(); \ | 102 | __gu_err = __get_user_bad(); \ |
103 | __gu_val = 0; \ | ||
107 | break; \ | 104 | break; \ |
108 | } \ | 105 | } \ |
109 | (x) = (typeof(*(ptr)))__gu_val; \ | 106 | (x) = __gu_val; \ |
110 | __gu_err; \ | 107 | __gu_err; \ |
111 | }) | 108 | }) |
112 | #define __get_user(x, ptr) get_user(x, ptr) | 109 | #define __get_user(x, ptr) get_user(x, ptr) |
diff --git a/include/asm-mips/cacheflush.h b/include/asm-mips/cacheflush.h index 4933b4947ed0..01e7eadc97e2 100644 --- a/include/asm-mips/cacheflush.h +++ b/include/asm-mips/cacheflush.h | |||
@@ -93,7 +93,7 @@ extern void (*flush_data_cache_page)(unsigned long addr); | |||
93 | clear_bit(PG_dcache_dirty, &(page)->flags) | 93 | clear_bit(PG_dcache_dirty, &(page)->flags) |
94 | 94 | ||
95 | /* Run kernel code uncached, useful for cache probing functions. */ | 95 | /* Run kernel code uncached, useful for cache probing functions. */ |
96 | unsigned long __init run_uncached(void *func); | 96 | unsigned long run_uncached(void *func); |
97 | 97 | ||
98 | extern void *kmap_coherent(struct page *page, unsigned long addr); | 98 | extern void *kmap_coherent(struct page *page, unsigned long addr); |
99 | extern void kunmap_coherent(void); | 99 | extern void kunmap_coherent(void); |
diff --git a/include/asm-mips/highmem.h b/include/asm-mips/highmem.h index 4d6bd5c31c7b..4374ab2adc75 100644 --- a/include/asm-mips/highmem.h +++ b/include/asm-mips/highmem.h | |||
@@ -39,7 +39,6 @@ extern pte_t *pkmap_page_table; | |||
39 | * easily, subsequent pte tables have to be allocated in one physical | 39 | * easily, subsequent pte tables have to be allocated in one physical |
40 | * chunk of RAM. | 40 | * chunk of RAM. |
41 | */ | 41 | */ |
42 | #define PKMAP_BASE (0xfe000000UL) | ||
43 | #define LAST_PKMAP 1024 | 42 | #define LAST_PKMAP 1024 |
44 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) | 43 | #define LAST_PKMAP_MASK (LAST_PKMAP-1) |
45 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) | 44 | #define PKMAP_NR(virt) ((virt-PKMAP_BASE) >> PAGE_SHIFT) |
diff --git a/include/asm-mips/mach-ip27/cpu-feature-overrides.h b/include/asm-mips/mach-ip27/cpu-feature-overrides.h index fe076380c189..7d3112b148d9 100644 --- a/include/asm-mips/mach-ip27/cpu-feature-overrides.h +++ b/include/asm-mips/mach-ip27/cpu-feature-overrides.h | |||
@@ -34,7 +34,11 @@ | |||
34 | #define cpu_has_64bits 1 | 34 | #define cpu_has_64bits 1 |
35 | 35 | ||
36 | #define cpu_has_4kex 1 | 36 | #define cpu_has_4kex 1 |
37 | #define cpu_has_3k_cache 0 | ||
38 | #define cpu_has_6k_cache 0 | ||
37 | #define cpu_has_4k_cache 1 | 39 | #define cpu_has_4k_cache 1 |
40 | #define cpu_has_8k_cache 0 | ||
41 | #define cpu_has_tx39_cache 0 | ||
38 | 42 | ||
39 | #define cpu_has_inclusive_pcaches 1 | 43 | #define cpu_has_inclusive_pcaches 1 |
40 | 44 | ||
diff --git a/include/asm-mips/mach-jmr3927/ioremap.h b/include/asm-mips/mach-jmr3927/ioremap.h index aa131ad7f717..29989ff10d66 100644 --- a/include/asm-mips/mach-jmr3927/ioremap.h +++ b/include/asm-mips/mach-jmr3927/ioremap.h | |||
@@ -25,7 +25,7 @@ static inline void __iomem *plat_ioremap(phys_t offset, unsigned long size, | |||
25 | { | 25 | { |
26 | #define TXX9_DIRECTMAP_BASE 0xff000000ul | 26 | #define TXX9_DIRECTMAP_BASE 0xff000000ul |
27 | if (offset >= TXX9_DIRECTMAP_BASE && | 27 | if (offset >= TXX9_DIRECTMAP_BASE && |
28 | offset < TXX9_DIRECTMAP_BASE + 0xf0000) | 28 | offset < TXX9_DIRECTMAP_BASE + 0xff0000) |
29 | return (void __iomem *)offset; | 29 | return (void __iomem *)offset; |
30 | return NULL; | 30 | return NULL; |
31 | } | 31 | } |
diff --git a/include/asm-mips/mach-lasat/irq.h b/include/asm-mips/mach-lasat/irq.h index da75f89f3723..3a282419d5f9 100644 --- a/include/asm-mips/mach-lasat/irq.h +++ b/include/asm-mips/mach-lasat/irq.h | |||
@@ -1,7 +1,7 @@ | |||
1 | #ifndef _ASM_MACH_LASAT_IRQ_H | 1 | #ifndef _ASM_MACH_LASAT_IRQ_H |
2 | #define _ASM_MACH_LASAT_IRQ_H | 2 | #define _ASM_MACH_LASAT_IRQ_H |
3 | 3 | ||
4 | #define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 0) | 4 | #define LASAT_CASCADE_IRQ (MIPS_CPU_IRQ_BASE + 2) |
5 | 5 | ||
6 | #define LASAT_IRQ_BASE 8 | 6 | #define LASAT_IRQ_BASE 8 |
7 | #define LASAT_IRQ_END 23 | 7 | #define LASAT_IRQ_END 23 |
diff --git a/include/asm-mips/pgtable-32.h b/include/asm-mips/pgtable-32.h index a0947092d0e0..ceefe027c761 100644 --- a/include/asm-mips/pgtable-32.h +++ b/include/asm-mips/pgtable-32.h | |||
@@ -65,6 +65,8 @@ extern int add_temporary_entry(unsigned long entrylo0, unsigned long entrylo1, | |||
65 | 65 | ||
66 | #define VMALLOC_START MAP_BASE | 66 | #define VMALLOC_START MAP_BASE |
67 | 67 | ||
68 | #define PKMAP_BASE (0xfe000000UL) | ||
69 | |||
68 | #ifdef CONFIG_HIGHMEM | 70 | #ifdef CONFIG_HIGHMEM |
69 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) | 71 | # define VMALLOC_END (PKMAP_BASE-2*PAGE_SIZE) |
70 | #else | 72 | #else |
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index a8fd16e1981f..d3bd5c5aa2ec 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h | |||
@@ -64,10 +64,11 @@ static inline int mips_clockevent_init(void) | |||
64 | * Initialize the count register as a clocksource | 64 | * Initialize the count register as a clocksource |
65 | */ | 65 | */ |
66 | #ifdef CONFIG_CEVT_R4K | 66 | #ifdef CONFIG_CEVT_R4K |
67 | extern void init_mips_clocksource(void); | 67 | extern int init_mips_clocksource(void); |
68 | #else | 68 | #else |
69 | static inline void init_mips_clocksource(void) | 69 | static inline int init_mips_clocksource(void) |
70 | { | 70 | { |
71 | return 0; | ||
71 | } | 72 | } |
72 | #endif | 73 | #endif |
73 | 74 | ||
diff --git a/include/asm-powerpc/pgtable-ppc32.h b/include/asm-powerpc/pgtable-ppc32.h index d1332bbcbd9b..2c79f550272b 100644 --- a/include/asm-powerpc/pgtable-ppc32.h +++ b/include/asm-powerpc/pgtable-ppc32.h | |||
@@ -339,14 +339,6 @@ extern int icache_44x_need_flush; | |||
339 | #define _PMD_PAGE_MASK 0x000c | 339 | #define _PMD_PAGE_MASK 0x000c |
340 | #define _PMD_PAGE_8M 0x000c | 340 | #define _PMD_PAGE_8M 0x000c |
341 | 341 | ||
342 | /* | ||
343 | * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE | ||
344 | * for an address even if _PAGE_PRESENT is not set, as a performance | ||
345 | * optimization. This is a bug if you ever want to use swap unless | ||
346 | * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific | ||
347 | * definitions for __swp_entry etc. below, which would be gross. | ||
348 | * -- paulus | ||
349 | */ | ||
350 | #define _PTE_NONE_MASK _PAGE_ACCESSED | 342 | #define _PTE_NONE_MASK _PAGE_ACCESSED |
351 | 343 | ||
352 | #else /* CONFIG_6xx */ | 344 | #else /* CONFIG_6xx */ |
diff --git a/include/asm-ppc/pgtable.h b/include/asm-ppc/pgtable.h index 69347bdbb401..70435d32129a 100644 --- a/include/asm-ppc/pgtable.h +++ b/include/asm-ppc/pgtable.h | |||
@@ -299,14 +299,6 @@ extern unsigned long ioremap_bot, ioremap_base; | |||
299 | #define _PMD_PAGE_MASK 0x000c | 299 | #define _PMD_PAGE_MASK 0x000c |
300 | #define _PMD_PAGE_8M 0x000c | 300 | #define _PMD_PAGE_8M 0x000c |
301 | 301 | ||
302 | /* | ||
303 | * The 8xx TLB miss handler allegedly sets _PAGE_ACCESSED in the PTE | ||
304 | * for an address even if _PAGE_PRESENT is not set, as a performance | ||
305 | * optimization. This is a bug if you ever want to use swap unless | ||
306 | * _PAGE_ACCESSED is 2, which it isn't, or unless you have 8xx-specific | ||
307 | * definitions for __swp_entry etc. below, which would be gross. | ||
308 | * -- paulus | ||
309 | */ | ||
310 | #define _PTE_NONE_MASK _PAGE_ACCESSED | 302 | #define _PTE_NONE_MASK _PAGE_ACCESSED |
311 | 303 | ||
312 | #else /* CONFIG_6xx */ | 304 | #else /* CONFIG_6xx */ |
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index a842c7222b1e..4e6a0fca0b47 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -26,10 +26,9 @@ struct mm_struct; | |||
26 | struct vm_area_struct; | 26 | struct vm_area_struct; |
27 | 27 | ||
28 | extern pgd_t swapper_pg_dir[1024]; | 28 | extern pgd_t swapper_pg_dir[1024]; |
29 | extern struct kmem_cache *pmd_cache; | ||
30 | void check_pgt_cache(void); | ||
31 | 29 | ||
32 | static inline void pgtable_cache_init(void) {} | 30 | static inline void pgtable_cache_init(void) { } |
31 | static inline void check_pgt_cache(void) { } | ||
33 | void paging_init(void); | 32 | void paging_init(void); |
34 | 33 | ||
35 | 34 | ||
diff --git a/include/linux/Kbuild b/include/linux/Kbuild index 994df3780007..0fac822c1157 100644 --- a/include/linux/Kbuild +++ b/include/linux/Kbuild | |||
@@ -205,7 +205,6 @@ unifdef-y += futex.h | |||
205 | unifdef-y += fs.h | 205 | unifdef-y += fs.h |
206 | unifdef-y += gameport.h | 206 | unifdef-y += gameport.h |
207 | unifdef-y += generic_serial.h | 207 | unifdef-y += generic_serial.h |
208 | unifdef-y += genhd.h | ||
209 | unifdef-y += gfs2_ondisk.h | 208 | unifdef-y += gfs2_ondisk.h |
210 | unifdef-y += hayesesp.h | 209 | unifdef-y += hayesesp.h |
211 | unifdef-y += hdlcdrv.h | 210 | unifdef-y += hdlcdrv.h |
diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h index fcbe8b640ffb..c8d216357865 100644 --- a/include/linux/ethtool.h +++ b/include/linux/ethtool.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef _LINUX_ETHTOOL_H | 12 | #ifndef _LINUX_ETHTOOL_H |
13 | #define _LINUX_ETHTOOL_H | 13 | #define _LINUX_ETHTOOL_H |
14 | 14 | ||
15 | #include <linux/types.h> | ||
15 | 16 | ||
16 | /* This should work for both 32 and 64 bit userland. */ | 17 | /* This should work for both 32 and 64 bit userland. */ |
17 | struct ethtool_cmd { | 18 | struct ethtool_cmd { |
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h index 51d214138814..adcbb05b120b 100644 --- a/include/linux/exportfs.h +++ b/include/linux/exportfs.h | |||
@@ -49,11 +49,11 @@ struct fid { | |||
49 | 49 | ||
50 | /** | 50 | /** |
51 | * struct export_operations - for nfsd to communicate with file systems | 51 | * struct export_operations - for nfsd to communicate with file systems |
52 | * @decode_fh: decode a file handle fragment and return a &struct dentry | ||
53 | * @encode_fh: encode a file handle fragment from a dentry | 52 | * @encode_fh: encode a file handle fragment from a dentry |
53 | * @fh_to_dentry: find the implied object and get a dentry for it | ||
54 | * @fh_to_parent: find the implied object's parent and get a dentry for it | ||
54 | * @get_name: find the name for a given inode in a given directory | 55 | * @get_name: find the name for a given inode in a given directory |
55 | * @get_parent: find the parent of a given directory | 56 | * @get_parent: find the parent of a given directory |
56 | * @get_dentry: find a dentry for the inode given a file handle sub-fragment | ||
57 | * | 57 | * |
58 | * See Documentation/filesystems/Exporting for details on how to use | 58 | * See Documentation/filesystems/Exporting for details on how to use |
59 | * this interface correctly. | 59 | * this interface correctly. |
diff --git a/include/linux/firmware.h b/include/linux/firmware.h index 33d8f2087b6e..4d10c7328d2d 100644 --- a/include/linux/firmware.h +++ b/include/linux/firmware.h | |||
@@ -10,7 +10,10 @@ struct firmware { | |||
10 | size_t size; | 10 | size_t size; |
11 | u8 *data; | 11 | u8 *data; |
12 | }; | 12 | }; |
13 | |||
13 | struct device; | 14 | struct device; |
15 | |||
16 | #if defined(CONFIG_FW_LOADER) || defined(CONFIG_FW_LOADER_MODULE) | ||
14 | int request_firmware(const struct firmware **fw, const char *name, | 17 | int request_firmware(const struct firmware **fw, const char *name, |
15 | struct device *device); | 18 | struct device *device); |
16 | int request_firmware_nowait( | 19 | int request_firmware_nowait( |
@@ -19,4 +22,24 @@ int request_firmware_nowait( | |||
19 | void (*cont)(const struct firmware *fw, void *context)); | 22 | void (*cont)(const struct firmware *fw, void *context)); |
20 | 23 | ||
21 | void release_firmware(const struct firmware *fw); | 24 | void release_firmware(const struct firmware *fw); |
25 | #else | ||
26 | static inline int request_firmware(const struct firmware **fw, | ||
27 | const char *name, | ||
28 | struct device *device) | ||
29 | { | ||
30 | return -EINVAL; | ||
31 | } | ||
32 | static inline int request_firmware_nowait( | ||
33 | struct module *module, int uevent, | ||
34 | const char *name, struct device *device, void *context, | ||
35 | void (*cont)(const struct firmware *fw, void *context)) | ||
36 | { | ||
37 | return -EINVAL; | ||
38 | } | ||
39 | |||
40 | static inline void release_firmware(const struct firmware *fw) | ||
41 | { | ||
42 | } | ||
43 | #endif | ||
44 | |||
22 | #endif | 45 | #endif |
diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 32c2ac49a070..ecd2bf63fc84 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h | |||
@@ -55,24 +55,6 @@ enum { | |||
55 | UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */ | 55 | UNIXWARE_PARTITION = 0x63, /* Same as GNU_HURD and SCO Unix */ |
56 | }; | 56 | }; |
57 | 57 | ||
58 | #ifndef __KERNEL__ | ||
59 | |||
60 | struct partition { | ||
61 | unsigned char boot_ind; /* 0x80 - active */ | ||
62 | unsigned char head; /* starting head */ | ||
63 | unsigned char sector; /* starting sector */ | ||
64 | unsigned char cyl; /* starting cylinder */ | ||
65 | unsigned char sys_ind; /* What partition type */ | ||
66 | unsigned char end_head; /* end head */ | ||
67 | unsigned char end_sector; /* end sector */ | ||
68 | unsigned char end_cyl; /* end cylinder */ | ||
69 | unsigned int start_sect; /* starting sector counting from 0 */ | ||
70 | unsigned int nr_sects; /* nr of sectors in partition */ | ||
71 | } __attribute__((packed)); | ||
72 | |||
73 | #endif | ||
74 | |||
75 | #ifdef __KERNEL__ | ||
76 | #include <linux/major.h> | 58 | #include <linux/major.h> |
77 | #include <linux/device.h> | 59 | #include <linux/device.h> |
78 | #include <linux/smp.h> | 60 | #include <linux/smp.h> |
@@ -228,7 +210,7 @@ static inline void part_stat_set_all(struct hd_struct *part, int value) { | |||
228 | sizeof(struct disk_stats)); | 210 | sizeof(struct disk_stats)); |
229 | } | 211 | } |
230 | 212 | ||
231 | #else | 213 | #else /* !CONFIG_SMP */ |
232 | #define __disk_stat_add(gendiskp, field, addnd) \ | 214 | #define __disk_stat_add(gendiskp, field, addnd) \ |
233 | (gendiskp->dkstats.field += addnd) | 215 | (gendiskp->dkstats.field += addnd) |
234 | #define disk_stat_read(gendiskp, field) (gendiskp->dkstats.field) | 216 | #define disk_stat_read(gendiskp, field) (gendiskp->dkstats.field) |
@@ -256,7 +238,7 @@ static inline void part_stat_set_all(struct hd_struct *part, int value) | |||
256 | memset(&part->dkstats, value, sizeof(struct disk_stats)); | 238 | memset(&part->dkstats, value, sizeof(struct disk_stats)); |
257 | } | 239 | } |
258 | 240 | ||
259 | #endif | 241 | #endif /* CONFIG_SMP */ |
260 | 242 | ||
261 | #define disk_stat_add(gendiskp, field, addnd) \ | 243 | #define disk_stat_add(gendiskp, field, addnd) \ |
262 | do { \ | 244 | do { \ |
@@ -395,8 +377,6 @@ static inline void set_capacity(struct gendisk *disk, sector_t size) | |||
395 | disk->capacity = size; | 377 | disk->capacity = size; |
396 | } | 378 | } |
397 | 379 | ||
398 | #endif /* __KERNEL__ */ | ||
399 | |||
400 | #ifdef CONFIG_SOLARIS_X86_PARTITION | 380 | #ifdef CONFIG_SOLARIS_X86_PARTITION |
401 | 381 | ||
402 | #define SOLARIS_X86_NUMSLICE 16 | 382 | #define SOLARIS_X86_NUMSLICE 16 |
@@ -540,8 +520,6 @@ struct unixware_disklabel { | |||
540 | # define MINIX_NR_SUBPARTITIONS 4 | 520 | # define MINIX_NR_SUBPARTITIONS 4 |
541 | #endif /* CONFIG_MINIX_SUBPARTITION */ | 521 | #endif /* CONFIG_MINIX_SUBPARTITION */ |
542 | 522 | ||
543 | #ifdef __KERNEL__ | ||
544 | |||
545 | #define ADDPART_FLAG_NONE 0 | 523 | #define ADDPART_FLAG_NONE 0 |
546 | #define ADDPART_FLAG_RAID 1 | 524 | #define ADDPART_FLAG_RAID 1 |
547 | #define ADDPART_FLAG_WHOLEDISK 2 | 525 | #define ADDPART_FLAG_WHOLEDISK 2 |
@@ -570,8 +548,6 @@ static inline struct block_device *bdget_disk(struct gendisk *disk, int index) | |||
570 | return bdget(MKDEV(disk->major, disk->first_minor) + index); | 548 | return bdget(MKDEV(disk->major, disk->first_minor) + index); |
571 | } | 549 | } |
572 | 550 | ||
573 | #endif | ||
574 | |||
575 | #else /* CONFIG_BLOCK */ | 551 | #else /* CONFIG_BLOCK */ |
576 | 552 | ||
577 | static inline void printk_all_partitions(void) { } | 553 | static inline void printk_all_partitions(void) { } |
@@ -584,4 +560,4 @@ static inline dev_t blk_lookup_devt(const char *name) | |||
584 | 560 | ||
585 | #endif /* CONFIG_BLOCK */ | 561 | #endif /* CONFIG_BLOCK */ |
586 | 562 | ||
587 | #endif | 563 | #endif /* _LINUX_GENHD_H */ |
diff --git a/include/linux/memstick.h b/include/linux/memstick.h index 334d059d6794..b7ee25888836 100644 --- a/include/linux/memstick.h +++ b/include/linux/memstick.h | |||
@@ -22,6 +22,8 @@ struct ms_status_register { | |||
22 | unsigned char reserved; | 22 | unsigned char reserved; |
23 | unsigned char interrupt; | 23 | unsigned char interrupt; |
24 | #define MEMSTICK_INT_CMDNAK 0x0001 | 24 | #define MEMSTICK_INT_CMDNAK 0x0001 |
25 | #define MEMSTICK_INT_IOREQ 0x0008 | ||
26 | #define MEMSTICK_INT_IOBREQ 0x0010 | ||
25 | #define MEMSTICK_INT_BREQ 0x0020 | 27 | #define MEMSTICK_INT_BREQ 0x0020 |
26 | #define MEMSTICK_INT_ERR 0x0040 | 28 | #define MEMSTICK_INT_ERR 0x0040 |
27 | #define MEMSTICK_INT_CED 0x0080 | 29 | #define MEMSTICK_INT_CED 0x0080 |
@@ -47,13 +49,17 @@ struct ms_status_register { | |||
47 | 49 | ||
48 | struct ms_id_register { | 50 | struct ms_id_register { |
49 | unsigned char type; | 51 | unsigned char type; |
50 | unsigned char reserved; | 52 | unsigned char if_mode; |
51 | unsigned char category; | 53 | unsigned char category; |
52 | unsigned char class; | 54 | unsigned char class; |
53 | } __attribute__((packed)); | 55 | } __attribute__((packed)); |
54 | 56 | ||
55 | struct ms_param_register { | 57 | struct ms_param_register { |
56 | unsigned char system; | 58 | unsigned char system; |
59 | #define MEMSTICK_SYS_ATEN 0xc0 | ||
60 | #define MEMSTICK_SYS_BAMD 0x80 | ||
61 | #define MEMSTICK_SYS_PAM 0x08 | ||
62 | |||
57 | unsigned char block_address_msb; | 63 | unsigned char block_address_msb; |
58 | unsigned short block_address; | 64 | unsigned short block_address; |
59 | unsigned char cp; | 65 | unsigned char cp; |
@@ -90,16 +96,48 @@ struct ms_register { | |||
90 | 96 | ||
91 | struct mspro_param_register { | 97 | struct mspro_param_register { |
92 | unsigned char system; | 98 | unsigned char system; |
99 | #define MEMSTICK_SYS_SERIAL 0x80 | ||
100 | #define MEMSTICK_SYS_PAR4 0x00 | ||
101 | #define MEMSTICK_SYS_PAR8 0x40 | ||
102 | |||
103 | unsigned short data_count; | ||
104 | unsigned int data_address; | ||
105 | unsigned char tpc_param; | ||
106 | } __attribute__((packed)); | ||
107 | |||
108 | struct mspro_io_info_register { | ||
109 | unsigned char version; | ||
110 | unsigned char io_category; | ||
111 | unsigned char current_req; | ||
112 | unsigned char card_opt_info; | ||
113 | unsigned char rdy_wait_time; | ||
114 | } __attribute__((packed)); | ||
115 | |||
116 | struct mspro_io_func_register { | ||
117 | unsigned char func_enable; | ||
118 | unsigned char func_select; | ||
119 | unsigned char func_intmask; | ||
120 | unsigned char transfer_mode; | ||
121 | } __attribute__((packed)); | ||
122 | |||
123 | struct mspro_io_cmd_register { | ||
124 | unsigned short tpc_param; | ||
93 | unsigned short data_count; | 125 | unsigned short data_count; |
94 | unsigned int data_address; | 126 | unsigned int data_address; |
95 | unsigned char cmd_param; | ||
96 | } __attribute__((packed)); | 127 | } __attribute__((packed)); |
97 | 128 | ||
98 | struct mspro_register { | 129 | struct mspro_register { |
99 | struct ms_status_register status; | 130 | struct ms_status_register status; |
100 | struct ms_id_register id; | 131 | struct ms_id_register id; |
101 | unsigned char reserved[8]; | 132 | unsigned char reserved0[8]; |
102 | struct mspro_param_register param; | 133 | struct mspro_param_register param; |
134 | unsigned char reserved1[8]; | ||
135 | struct mspro_io_info_register io_info; | ||
136 | struct mspro_io_func_register io_func; | ||
137 | unsigned char reserved2[7]; | ||
138 | struct mspro_io_cmd_register io_cmd; | ||
139 | unsigned char io_int; | ||
140 | unsigned char io_int_func; | ||
103 | } __attribute__((packed)); | 141 | } __attribute__((packed)); |
104 | 142 | ||
105 | struct ms_register_addr { | 143 | struct ms_register_addr { |
@@ -110,49 +148,55 @@ struct ms_register_addr { | |||
110 | } __attribute__((packed)); | 148 | } __attribute__((packed)); |
111 | 149 | ||
112 | enum { | 150 | enum { |
151 | MS_TPC_READ_MG_STATUS = 0x01, | ||
113 | MS_TPC_READ_LONG_DATA = 0x02, | 152 | MS_TPC_READ_LONG_DATA = 0x02, |
114 | MS_TPC_READ_SHORT_DATA = 0x03, | 153 | MS_TPC_READ_SHORT_DATA = 0x03, |
154 | MS_TPC_READ_MG_DATA = 0x03, | ||
115 | MS_TPC_READ_REG = 0x04, | 155 | MS_TPC_READ_REG = 0x04, |
116 | MS_TPC_READ_IO_DATA = 0x05, /* unverified */ | 156 | MS_TPC_READ_QUAD_DATA = 0x05, |
157 | MS_TPC_READ_IO_DATA = 0x05, | ||
117 | MS_TPC_GET_INT = 0x07, | 158 | MS_TPC_GET_INT = 0x07, |
118 | MS_TPC_SET_RW_REG_ADRS = 0x08, | 159 | MS_TPC_SET_RW_REG_ADRS = 0x08, |
119 | MS_TPC_EX_SET_CMD = 0x09, | 160 | MS_TPC_EX_SET_CMD = 0x09, |
120 | MS_TPC_WRITE_IO_DATA = 0x0a, /* unverified */ | 161 | MS_TPC_WRITE_QUAD_DATA = 0x0a, |
162 | MS_TPC_WRITE_IO_DATA = 0x0a, | ||
121 | MS_TPC_WRITE_REG = 0x0b, | 163 | MS_TPC_WRITE_REG = 0x0b, |
122 | MS_TPC_WRITE_SHORT_DATA = 0x0c, | 164 | MS_TPC_WRITE_SHORT_DATA = 0x0c, |
165 | MS_TPC_WRITE_MG_DATA = 0x0c, | ||
123 | MS_TPC_WRITE_LONG_DATA = 0x0d, | 166 | MS_TPC_WRITE_LONG_DATA = 0x0d, |
124 | MS_TPC_SET_CMD = 0x0e | 167 | MS_TPC_SET_CMD = 0x0e |
125 | }; | 168 | }; |
126 | 169 | ||
127 | enum { | 170 | enum { |
128 | MS_CMD_BLOCK_END = 0x33, | 171 | MS_CMD_BLOCK_END = 0x33, |
129 | MS_CMD_RESET = 0x3c, | 172 | MS_CMD_RESET = 0x3c, |
130 | MS_CMD_BLOCK_WRITE = 0x55, | 173 | MS_CMD_BLOCK_WRITE = 0x55, |
131 | MS_CMD_SLEEP = 0x5a, | 174 | MS_CMD_SLEEP = 0x5a, |
132 | MS_CMD_BLOCK_ERASE = 0x99, | 175 | MS_CMD_BLOCK_ERASE = 0x99, |
133 | MS_CMD_BLOCK_READ = 0xaa, | 176 | MS_CMD_BLOCK_READ = 0xaa, |
134 | MS_CMD_CLEAR_BUF = 0xc3, | 177 | MS_CMD_CLEAR_BUF = 0xc3, |
135 | MS_CMD_FLASH_STOP = 0xcc, | 178 | MS_CMD_FLASH_STOP = 0xcc, |
136 | MSPRO_CMD_FORMAT = 0x10, | 179 | MS_CMD_LOAD_ID = 0x60, |
137 | MSPRO_CMD_SLEEP = 0x11, | 180 | MS_CMD_CMP_ICV = 0x7f, |
138 | MSPRO_CMD_READ_DATA = 0x20, | 181 | MSPRO_CMD_FORMAT = 0x10, |
139 | MSPRO_CMD_WRITE_DATA = 0x21, | 182 | MSPRO_CMD_SLEEP = 0x11, |
140 | MSPRO_CMD_READ_ATRB = 0x24, | 183 | MSPRO_CMD_WAKEUP = 0x12, |
141 | MSPRO_CMD_STOP = 0x25, | 184 | MSPRO_CMD_READ_DATA = 0x20, |
142 | MSPRO_CMD_ERASE = 0x26, | 185 | MSPRO_CMD_WRITE_DATA = 0x21, |
143 | MSPRO_CMD_SET_IBA = 0x46, | 186 | MSPRO_CMD_READ_ATRB = 0x24, |
144 | MSPRO_CMD_SET_IBD = 0x47 | 187 | MSPRO_CMD_STOP = 0x25, |
145 | /* | 188 | MSPRO_CMD_ERASE = 0x26, |
146 | MSPRO_CMD_RESET | 189 | MSPRO_CMD_READ_QUAD = 0x27, |
147 | MSPRO_CMD_WAKEUP | 190 | MSPRO_CMD_WRITE_QUAD = 0x28, |
148 | MSPRO_CMD_IN_IO_DATA | 191 | MSPRO_CMD_SET_IBD = 0x46, |
149 | MSPRO_CMD_OUT_IO_DATA | 192 | MSPRO_CMD_GET_IBD = 0x47, |
150 | MSPRO_CMD_READ_IO_ATRB | 193 | MSPRO_CMD_IN_IO_DATA = 0xb0, |
151 | MSPRO_CMD_IN_IO_FIFO | 194 | MSPRO_CMD_OUT_IO_DATA = 0xb1, |
152 | MSPRO_CMD_OUT_IO_FIFO | 195 | MSPRO_CMD_READ_IO_ATRB = 0xb2, |
153 | MSPRO_CMD_IN_IOM | 196 | MSPRO_CMD_IN_IO_FIFO = 0xb3, |
154 | MSPRO_CMD_OUT_IOM | 197 | MSPRO_CMD_OUT_IO_FIFO = 0xb4, |
155 | */ | 198 | MSPRO_CMD_IN_IOM = 0xb5, |
199 | MSPRO_CMD_OUT_IOM = 0xb6, | ||
156 | }; | 200 | }; |
157 | 201 | ||
158 | /*** Driver structures and functions ***/ | 202 | /*** Driver structures and functions ***/ |
@@ -165,7 +209,8 @@ enum memstick_param { MEMSTICK_POWER = 1, MEMSTICK_INTERFACE }; | |||
165 | #define MEMSTICK_POWER_ON 1 | 209 | #define MEMSTICK_POWER_ON 1 |
166 | 210 | ||
167 | #define MEMSTICK_SERIAL 0 | 211 | #define MEMSTICK_SERIAL 0 |
168 | #define MEMSTICK_PARALLEL 1 | 212 | #define MEMSTICK_PAR4 1 |
213 | #define MEMSTICK_PAR8 2 | ||
169 | 214 | ||
170 | struct memstick_host; | 215 | struct memstick_host; |
171 | struct memstick_driver; | 216 | struct memstick_driver; |
@@ -195,11 +240,7 @@ struct memstick_request { | |||
195 | unsigned char data_dir:1, | 240 | unsigned char data_dir:1, |
196 | need_card_int:1, | 241 | need_card_int:1, |
197 | get_int_reg:1, | 242 | get_int_reg:1, |
198 | io_type:2; | 243 | long_data:1; |
199 | #define MEMSTICK_IO_NONE 0 | ||
200 | #define MEMSTICK_IO_VAL 1 | ||
201 | #define MEMSTICK_IO_SG 2 | ||
202 | |||
203 | unsigned char int_reg; | 244 | unsigned char int_reg; |
204 | int error; | 245 | int error; |
205 | union { | 246 | union { |
@@ -231,8 +272,9 @@ struct memstick_host { | |||
231 | struct mutex lock; | 272 | struct mutex lock; |
232 | unsigned int id; | 273 | unsigned int id; |
233 | unsigned int caps; | 274 | unsigned int caps; |
234 | #define MEMSTICK_CAP_PARALLEL 1 | 275 | #define MEMSTICK_CAP_AUTO_GET_INT 1 |
235 | #define MEMSTICK_CAP_AUTO_GET_INT 2 | 276 | #define MEMSTICK_CAP_PAR4 2 |
277 | #define MEMSTICK_CAP_PAR8 4 | ||
236 | 278 | ||
237 | struct work_struct media_checker; | 279 | struct work_struct media_checker; |
238 | struct class_device cdev; | 280 | struct class_device cdev; |
@@ -270,6 +312,8 @@ int memstick_add_host(struct memstick_host *host); | |||
270 | void memstick_remove_host(struct memstick_host *host); | 312 | void memstick_remove_host(struct memstick_host *host); |
271 | void memstick_free_host(struct memstick_host *host); | 313 | void memstick_free_host(struct memstick_host *host); |
272 | void memstick_detect_change(struct memstick_host *host); | 314 | void memstick_detect_change(struct memstick_host *host); |
315 | void memstick_suspend_host(struct memstick_host *host); | ||
316 | void memstick_resume_host(struct memstick_host *host); | ||
273 | 317 | ||
274 | void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, | 318 | void memstick_init_req_sg(struct memstick_request *mrq, unsigned char tpc, |
275 | struct scatterlist *sg); | 319 | struct scatterlist *sg); |
diff --git a/include/linux/mm.h b/include/linux/mm.h index 3f3ccfe42de0..b695875d63e3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -235,15 +235,22 @@ static inline int get_page_unless_zero(struct page *page) | |||
235 | struct page *vmalloc_to_page(const void *addr); | 235 | struct page *vmalloc_to_page(const void *addr); |
236 | unsigned long vmalloc_to_pfn(const void *addr); | 236 | unsigned long vmalloc_to_pfn(const void *addr); |
237 | 237 | ||
238 | #ifdef CONFIG_MMU | 238 | /* |
239 | /* Determine if an address is within the vmalloc range */ | 239 | * Determine if an address is within the vmalloc range |
240 | * | ||
241 | * On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there | ||
242 | * is no special casing required. | ||
243 | */ | ||
240 | static inline int is_vmalloc_addr(const void *x) | 244 | static inline int is_vmalloc_addr(const void *x) |
241 | { | 245 | { |
246 | #ifdef CONFIG_MMU | ||
242 | unsigned long addr = (unsigned long)x; | 247 | unsigned long addr = (unsigned long)x; |
243 | 248 | ||
244 | return addr >= VMALLOC_START && addr < VMALLOC_END; | 249 | return addr >= VMALLOC_START && addr < VMALLOC_END; |
245 | } | 250 | #else |
251 | return 0; | ||
246 | #endif | 252 | #endif |
253 | } | ||
247 | 254 | ||
248 | static inline struct page *compound_head(struct page *page) | 255 | static inline struct page *compound_head(struct page *page) |
249 | { | 256 | { |
diff --git a/include/linux/netfilter/nfnetlink_compat.h b/include/linux/netfilter/nfnetlink_compat.h index 02a42d875cf7..e1451760c9cd 100644 --- a/include/linux/netfilter/nfnetlink_compat.h +++ b/include/linux/netfilter/nfnetlink_compat.h | |||
@@ -1,6 +1,6 @@ | |||
1 | #ifndef _NFNETLINK_COMPAT_H | 1 | #ifndef _NFNETLINK_COMPAT_H |
2 | #define _NFNETLINK_COMPAT_H | 2 | #define _NFNETLINK_COMPAT_H |
3 | #ifndef __KERNEL | 3 | #ifndef __KERNEL__ |
4 | /* Old nfnetlink macros for userspace */ | 4 | /* Old nfnetlink macros for userspace */ |
5 | 5 | ||
6 | /* nfnetlink groups: Up to 32 maximum */ | 6 | /* nfnetlink groups: Up to 32 maximum */ |
diff --git a/include/linux/pci.h b/include/linux/pci.h index f3165e7ac431..9010f5458767 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -278,6 +278,7 @@ struct pci_bus { | |||
278 | struct device dev; | 278 | struct device dev; |
279 | struct bin_attribute *legacy_io; /* legacy I/O for this bus */ | 279 | struct bin_attribute *legacy_io; /* legacy I/O for this bus */ |
280 | struct bin_attribute *legacy_mem; /* legacy mem */ | 280 | struct bin_attribute *legacy_mem; /* legacy mem */ |
281 | unsigned int is_added:1; | ||
281 | }; | 282 | }; |
282 | 283 | ||
283 | #define pci_bus_b(n) list_entry(n, struct pci_bus, node) | 284 | #define pci_bus_b(n) list_entry(n, struct pci_bus, node) |
@@ -389,13 +390,13 @@ struct pci_driver { | |||
389 | #define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) | 390 | #define to_pci_driver(drv) container_of(drv, struct pci_driver, driver) |
390 | 391 | ||
391 | /** | 392 | /** |
392 | * DECLARE_PCI_DEVICE_TABLE - macro used to describe a pci device table | 393 | * DEFINE_PCI_DEVICE_TABLE - macro used to describe a pci device table |
393 | * @_table: device table name | 394 | * @_table: device table name |
394 | * | 395 | * |
395 | * This macro is used to create a struct pci_device_id array (a device table) | 396 | * This macro is used to create a struct pci_device_id array (a device table) |
396 | * in a generic manner. | 397 | * in a generic manner. |
397 | */ | 398 | */ |
398 | #define DECLARE_PCI_DEVICE_TABLE(_table) \ | 399 | #define DEFINE_PCI_DEVICE_TABLE(_table) \ |
399 | const struct pci_device_id _table[] __devinitconst | 400 | const struct pci_device_id _table[] __devinitconst |
400 | 401 | ||
401 | /** | 402 | /** |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index effdb558a588..70eb3c803d47 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2184,6 +2184,7 @@ | |||
2184 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 | 2184 | #define PCI_DEVICE_ID_JMICRON_JMB366 0x2366 |
2185 | #define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 | 2185 | #define PCI_DEVICE_ID_JMICRON_JMB368 0x2368 |
2186 | #define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 | 2186 | #define PCI_DEVICE_ID_JMICRON_JMB38X_SD 0x2381 |
2187 | #define PCI_DEVICE_ID_JMICRON_JMB38X_MS 0x2383 | ||
2187 | 2188 | ||
2188 | #define PCI_VENDOR_ID_KORENIX 0x1982 | 2189 | #define PCI_VENDOR_ID_KORENIX 0x1982 |
2189 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 | 2190 | #define PCI_DEVICE_ID_KORENIX_JETCARDF0 0x1600 |
diff --git a/include/linux/pmu.h b/include/linux/pmu.h index 4c5f65392d36..cafe98d96948 100644 --- a/include/linux/pmu.h +++ b/include/linux/pmu.h | |||
@@ -147,8 +147,15 @@ extern void pmu_wait_complete(struct adb_request *req); | |||
147 | /* For use before switching interrupts off for a long time; | 147 | /* For use before switching interrupts off for a long time; |
148 | * warning: not stackable | 148 | * warning: not stackable |
149 | */ | 149 | */ |
150 | #if defined(CONFIG_ADB_PMU) | ||
150 | extern void pmu_suspend(void); | 151 | extern void pmu_suspend(void); |
151 | extern void pmu_resume(void); | 152 | extern void pmu_resume(void); |
153 | #else | ||
154 | static inline void pmu_suspend(void) | ||
155 | {} | ||
156 | static inline void pmu_resume(void) | ||
157 | {} | ||
158 | #endif | ||
152 | 159 | ||
153 | extern void pmu_enable_irled(int on); | 160 | extern void pmu_enable_irled(int on); |
154 | 161 | ||
@@ -192,7 +199,7 @@ extern unsigned int pmu_power_flags; | |||
192 | extern void pmu_backlight_init(void); | 199 | extern void pmu_backlight_init(void); |
193 | 200 | ||
194 | /* some code needs to know if the PMU was suspended for hibernation */ | 201 | /* some code needs to know if the PMU was suspended for hibernation */ |
195 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) | 202 | #if defined(CONFIG_SUSPEND) && defined(CONFIG_PPC32) |
196 | extern int pmu_sys_suspended; | 203 | extern int pmu_sys_suspended; |
197 | #else | 204 | #else |
198 | /* if power management is not configured it can't be suspended */ | 205 | /* if power management is not configured it can't be suspended */ |
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h index d9a9e718ad19..9b6c935f69cf 100644 --- a/include/linux/proc_fs.h +++ b/include/linux/proc_fs.h | |||
@@ -50,8 +50,6 @@ typedef int (read_proc_t)(char *page, char **start, off_t off, | |||
50 | typedef int (write_proc_t)(struct file *file, const char __user *buffer, | 50 | typedef int (write_proc_t)(struct file *file, const char __user *buffer, |
51 | unsigned long count, void *data); | 51 | unsigned long count, void *data); |
52 | typedef int (get_info_t)(char *, char **, off_t, int); | 52 | typedef int (get_info_t)(char *, char **, off_t, int); |
53 | typedef struct proc_dir_entry *(shadow_proc_t)(struct task_struct *task, | ||
54 | struct proc_dir_entry *pde); | ||
55 | 53 | ||
56 | struct proc_dir_entry { | 54 | struct proc_dir_entry { |
57 | unsigned int low_ino; | 55 | unsigned int low_ino; |
@@ -82,7 +80,6 @@ struct proc_dir_entry { | |||
82 | int pde_users; /* number of callers into module in progress */ | 80 | int pde_users; /* number of callers into module in progress */ |
83 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ | 81 | spinlock_t pde_unload_lock; /* proc_fops checks and pde_users bumps */ |
84 | struct completion *pde_unload_completion; | 82 | struct completion *pde_unload_completion; |
85 | shadow_proc_t *shadow_proc; | ||
86 | }; | 83 | }; |
87 | 84 | ||
88 | struct kcore_list { | 85 | struct kcore_list { |
diff --git a/include/linux/tifm.h b/include/linux/tifm.h index da76ed85f595..848c0f392541 100644 --- a/include/linux/tifm.h +++ b/include/linux/tifm.h | |||
@@ -70,9 +70,9 @@ enum { | |||
70 | 70 | ||
71 | #define TIFM_FIFO_ENABLE 0x00000001 | 71 | #define TIFM_FIFO_ENABLE 0x00000001 |
72 | #define TIFM_FIFO_READY 0x00000001 | 72 | #define TIFM_FIFO_READY 0x00000001 |
73 | #define TIFM_FIFO_MORE 0x00000008 | ||
73 | #define TIFM_FIFO_INT_SETALL 0x0000ffff | 74 | #define TIFM_FIFO_INT_SETALL 0x0000ffff |
74 | #define TIFM_FIFO_INTMASK 0x00000005 | 75 | #define TIFM_FIFO_INTMASK 0x00000005 |
75 | #define TIFM_FIFO_SIZE 0x00000200 | ||
76 | 76 | ||
77 | #define TIFM_DMA_RESET 0x00000002 | 77 | #define TIFM_DMA_RESET 0x00000002 |
78 | #define TIFM_DMA_TX 0x00008000 | 78 | #define TIFM_DMA_TX 0x00008000 |
diff --git a/include/linux/usb/Kbuild b/include/linux/usb/Kbuild index b8cba1dcb2c6..42e84fc315e3 100644 --- a/include/linux/usb/Kbuild +++ b/include/linux/usb/Kbuild | |||
@@ -3,5 +3,5 @@ header-y += cdc.h | |||
3 | header-y += ch9.h | 3 | header-y += ch9.h |
4 | header-y += gadgetfs.h | 4 | header-y += gadgetfs.h |
5 | header-y += midi.h | 5 | header-y += midi.h |
6 | unifdef-y += g_printer.h | 6 | header-y += g_printer.h |
7 | 7 | ||
diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index aa3047ff00d1..f3295296b435 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h | |||
@@ -15,8 +15,6 @@ | |||
15 | #ifndef __LINUX_USB_GADGET_H | 15 | #ifndef __LINUX_USB_GADGET_H |
16 | #define __LINUX_USB_GADGET_H | 16 | #define __LINUX_USB_GADGET_H |
17 | 17 | ||
18 | #ifdef __KERNEL__ | ||
19 | |||
20 | struct usb_ep; | 18 | struct usb_ep; |
21 | 19 | ||
22 | /** | 20 | /** |
@@ -848,6 +846,4 @@ extern struct usb_ep *usb_ep_autoconfig(struct usb_gadget *, | |||
848 | 846 | ||
849 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; | 847 | extern void usb_ep_autoconfig_reset(struct usb_gadget *) __devinit; |
850 | 848 | ||
851 | #endif /* __KERNEL__ */ | ||
852 | |||
853 | #endif /* __LINUX_USB_GADGET_H */ | 849 | #endif /* __LINUX_USB_GADGET_H */ |
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index 771d17783c18..750648df13f4 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -170,7 +170,7 @@ static inline int skb_frags_no(struct sk_buff *skb) | |||
170 | int bt_err(__u16 code); | 170 | int bt_err(__u16 code); |
171 | 171 | ||
172 | extern int hci_sock_init(void); | 172 | extern int hci_sock_init(void); |
173 | extern int hci_sock_cleanup(void); | 173 | extern void hci_sock_cleanup(void); |
174 | 174 | ||
175 | extern int bt_sysfs_init(void); | 175 | extern int bt_sysfs_init(void); |
176 | extern void bt_sysfs_cleanup(void); | 176 | extern void bt_sysfs_cleanup(void); |
diff --git a/include/net/dst.h b/include/net/dst.h index e3ac7d0fc4e1..ae13370e8484 100644 --- a/include/net/dst.h +++ b/include/net/dst.h | |||
@@ -52,15 +52,10 @@ struct dst_entry | |||
52 | unsigned short header_len; /* more space at head required */ | 52 | unsigned short header_len; /* more space at head required */ |
53 | unsigned short trailer_len; /* space to reserve at tail */ | 53 | unsigned short trailer_len; /* space to reserve at tail */ |
54 | 54 | ||
55 | u32 metrics[RTAX_MAX]; | ||
56 | struct dst_entry *path; | ||
57 | |||
58 | unsigned long rate_last; /* rate limiting for ICMP */ | ||
59 | unsigned int rate_tokens; | 55 | unsigned int rate_tokens; |
56 | unsigned long rate_last; /* rate limiting for ICMP */ | ||
60 | 57 | ||
61 | #ifdef CONFIG_NET_CLS_ROUTE | 58 | struct dst_entry *path; |
62 | __u32 tclassid; | ||
63 | #endif | ||
64 | 59 | ||
65 | struct neighbour *neighbour; | 60 | struct neighbour *neighbour; |
66 | struct hh_cache *hh; | 61 | struct hh_cache *hh; |
@@ -70,10 +65,20 @@ struct dst_entry | |||
70 | int (*output)(struct sk_buff*); | 65 | int (*output)(struct sk_buff*); |
71 | 66 | ||
72 | struct dst_ops *ops; | 67 | struct dst_ops *ops; |
73 | 68 | ||
74 | unsigned long lastuse; | 69 | u32 metrics[RTAX_MAX]; |
70 | |||
71 | #ifdef CONFIG_NET_CLS_ROUTE | ||
72 | __u32 tclassid; | ||
73 | #endif | ||
74 | |||
75 | /* | ||
76 | * __refcnt wants to be on a different cache line from | ||
77 | * input/output/ops or performance tanks badly | ||
78 | */ | ||
75 | atomic_t __refcnt; /* client references */ | 79 | atomic_t __refcnt; /* client references */ |
76 | int __use; | 80 | int __use; |
81 | unsigned long lastuse; | ||
77 | union { | 82 | union { |
78 | struct dst_entry *next; | 83 | struct dst_entry *next; |
79 | struct rtable *rt_next; | 84 | struct rtable *rt_next; |
diff --git a/include/net/irda/irttp.h b/include/net/irda/irttp.h index 32c385dd9e06..0788c23d2828 100644 --- a/include/net/irda/irttp.h +++ b/include/net/irda/irttp.h | |||
@@ -169,17 +169,17 @@ int irttp_disconnect_request(struct tsap_cb *self, struct sk_buff *skb, | |||
169 | void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow); | 169 | void irttp_flow_request(struct tsap_cb *self, LOCAL_FLOW flow); |
170 | struct tsap_cb *irttp_dup(struct tsap_cb *self, void *instance); | 170 | struct tsap_cb *irttp_dup(struct tsap_cb *self, void *instance); |
171 | 171 | ||
172 | static __inline __u32 irttp_get_saddr(struct tsap_cb *self) | 172 | static inline __u32 irttp_get_saddr(struct tsap_cb *self) |
173 | { | 173 | { |
174 | return irlmp_get_saddr(self->lsap); | 174 | return irlmp_get_saddr(self->lsap); |
175 | } | 175 | } |
176 | 176 | ||
177 | static __inline __u32 irttp_get_daddr(struct tsap_cb *self) | 177 | static inline __u32 irttp_get_daddr(struct tsap_cb *self) |
178 | { | 178 | { |
179 | return irlmp_get_daddr(self->lsap); | 179 | return irlmp_get_daddr(self->lsap); |
180 | } | 180 | } |
181 | 181 | ||
182 | static __inline __u32 irttp_get_max_seg_size(struct tsap_cb *self) | 182 | static inline __u32 irttp_get_max_seg_size(struct tsap_cb *self) |
183 | { | 183 | { |
184 | return self->max_seg_size; | 184 | return self->max_seg_size; |
185 | } | 185 | } |
diff --git a/include/net/net_namespace.h b/include/net/net_namespace.h index 28738b7d53eb..923f2b8b9096 100644 --- a/include/net/net_namespace.h +++ b/include/net/net_namespace.h | |||
@@ -31,7 +31,6 @@ struct net { | |||
31 | 31 | ||
32 | struct proc_dir_entry *proc_net; | 32 | struct proc_dir_entry *proc_net; |
33 | struct proc_dir_entry *proc_net_stat; | 33 | struct proc_dir_entry *proc_net_stat; |
34 | struct proc_dir_entry *proc_net_root; | ||
35 | 34 | ||
36 | struct list_head sysctl_table_headers; | 35 | struct list_head sysctl_table_headers; |
37 | 36 | ||
diff --git a/include/net/netfilter/nf_conntrack_extend.h b/include/net/netfilter/nf_conntrack_extend.h index 49aac6323fbe..f736e842977f 100644 --- a/include/net/netfilter/nf_conntrack_extend.h +++ b/include/net/netfilter/nf_conntrack_extend.h | |||
@@ -17,7 +17,6 @@ enum nf_ct_ext_id | |||
17 | struct nf_ct_ext { | 17 | struct nf_ct_ext { |
18 | u8 offset[NF_CT_EXT_NUM]; | 18 | u8 offset[NF_CT_EXT_NUM]; |
19 | u8 len; | 19 | u8 len; |
20 | u8 real_len; | ||
21 | char data[0]; | 20 | char data[0]; |
22 | }; | 21 | }; |
23 | 22 | ||
diff --git a/init/Kconfig b/init/Kconfig index 074ac97f55e3..a97924bc5b8d 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -865,38 +865,10 @@ source "block/Kconfig" | |||
865 | config PREEMPT_NOTIFIERS | 865 | config PREEMPT_NOTIFIERS |
866 | bool | 866 | bool |
867 | 867 | ||
868 | choice | ||
869 | prompt "RCU implementation type:" | ||
870 | default CLASSIC_RCU | ||
871 | help | ||
872 | This allows you to choose either the classic RCU implementation | ||
873 | that is designed for best read-side performance on non-realtime | ||
874 | systems, or the preemptible RCU implementation for best latency | ||
875 | on realtime systems. Note that some kernel preemption modes | ||
876 | will restrict your choice. | ||
877 | |||
878 | Select the default if you are unsure. | ||
879 | |||
880 | config CLASSIC_RCU | 868 | config CLASSIC_RCU |
881 | bool "Classic RCU" | 869 | def_bool !PREEMPT_RCU |
882 | help | 870 | help |
883 | This option selects the classic RCU implementation that is | 871 | This option selects the classic RCU implementation that is |
884 | designed for best read-side performance on non-realtime | 872 | designed for best read-side performance on non-realtime |
885 | systems. | 873 | systems. Classic RCU is the default. Note that the |
886 | 874 | PREEMPT_RCU symbol is used to select/deselect this option. | |
887 | Say Y if you are unsure. | ||
888 | |||
889 | config PREEMPT_RCU | ||
890 | bool "Preemptible RCU" | ||
891 | depends on PREEMPT | ||
892 | help | ||
893 | This option reduces the latency of the kernel by making certain | ||
894 | RCU sections preemptible. Normally RCU code is non-preemptible, if | ||
895 | this option is selected then read-only RCU sections become | ||
896 | preemptible. This helps latency, but may expose bugs due to | ||
897 | now-naive assumptions about each RCU read-side critical section | ||
898 | remaining on a given CPU through its execution. | ||
899 | |||
900 | Say N if you are unsure. | ||
901 | |||
902 | endchoice | ||
diff --git a/init/initramfs.c b/init/initramfs.c index c0b1e0533d80..d53fee8d8604 100644 --- a/init/initramfs.c +++ b/init/initramfs.c | |||
@@ -538,7 +538,7 @@ skip: | |||
538 | initrd_end = 0; | 538 | initrd_end = 0; |
539 | } | 539 | } |
540 | 540 | ||
541 | int __init populate_rootfs(void) | 541 | static int __init populate_rootfs(void) |
542 | { | 542 | { |
543 | char *err = unpack_to_rootfs(__initramfs_start, | 543 | char *err = unpack_to_rootfs(__initramfs_start, |
544 | __initramfs_end - __initramfs_start, 0); | 544 | __initramfs_end - __initramfs_start, 0); |
@@ -577,10 +577,4 @@ int __init populate_rootfs(void) | |||
577 | } | 577 | } |
578 | return 0; | 578 | return 0; |
579 | } | 579 | } |
580 | #ifndef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
581 | /* | ||
582 | * if this option is enabled, populate_rootfs() is called _earlier_ in the | ||
583 | * boot sequence. This insures that the ACPI initialisation can find the file. | ||
584 | */ | ||
585 | rootfs_initcall(populate_rootfs); | 580 | rootfs_initcall(populate_rootfs); |
586 | #endif | ||
diff --git a/init/main.c b/init/main.c index fbb0167c6b8a..99ce94930b09 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -102,12 +102,6 @@ static inline void mark_rodata_ro(void) { } | |||
102 | extern void tc_init(void); | 102 | extern void tc_init(void); |
103 | #endif | 103 | #endif |
104 | 104 | ||
105 | #ifdef CONFIG_ACPI_CUSTOM_DSDT_INITRD | ||
106 | extern int populate_rootfs(void); | ||
107 | #else | ||
108 | static inline void populate_rootfs(void) {} | ||
109 | #endif | ||
110 | |||
111 | enum system_states system_state; | 105 | enum system_states system_state; |
112 | EXPORT_SYMBOL(system_state); | 106 | EXPORT_SYMBOL(system_state); |
113 | 107 | ||
@@ -650,7 +644,6 @@ asmlinkage void __init start_kernel(void) | |||
650 | 644 | ||
651 | check_bugs(); | 645 | check_bugs(); |
652 | 646 | ||
653 | populate_rootfs(); /* For DSDT override from initramfs */ | ||
654 | acpi_early_init(); /* before LAPIC and SMP init */ | 647 | acpi_early_init(); /* before LAPIC and SMP init */ |
655 | 648 | ||
656 | /* Do the rest non-__init'ed, we're now alive */ | 649 | /* Do the rest non-__init'ed, we're now alive */ |
@@ -271,9 +271,10 @@ static struct mempolicy *shm_get_policy(struct vm_area_struct *vma, | |||
271 | 271 | ||
272 | if (sfd->vm_ops->get_policy) | 272 | if (sfd->vm_ops->get_policy) |
273 | pol = sfd->vm_ops->get_policy(vma, addr); | 273 | pol = sfd->vm_ops->get_policy(vma, addr); |
274 | else if (vma->vm_policy) | 274 | else if (vma->vm_policy) { |
275 | pol = vma->vm_policy; | 275 | pol = vma->vm_policy; |
276 | else | 276 | mpol_get(pol); /* get_vma_policy() expects this */ |
277 | } else | ||
277 | pol = current->mempolicy; | 278 | pol = current->mempolicy; |
278 | return pol; | 279 | return pol; |
279 | } | 280 | } |
diff --git a/kernel/Kconfig.preempt b/kernel/Kconfig.preempt index 0669b70fa6a3..9fdba03dc1fc 100644 --- a/kernel/Kconfig.preempt +++ b/kernel/Kconfig.preempt | |||
@@ -52,8 +52,23 @@ config PREEMPT | |||
52 | 52 | ||
53 | endchoice | 53 | endchoice |
54 | 54 | ||
55 | config PREEMPT_RCU | ||
56 | bool "Preemptible RCU" | ||
57 | depends on PREEMPT | ||
58 | default n | ||
59 | help | ||
60 | This option reduces the latency of the kernel by making certain | ||
61 | RCU sections preemptible. Normally RCU code is non-preemptible, if | ||
62 | this option is selected then read-only RCU sections become | ||
63 | preemptible. This helps latency, but may expose bugs due to | ||
64 | now-naive assumptions about each RCU read-side critical section | ||
65 | remaining on a given CPU through its execution. | ||
66 | |||
67 | Say N if you are unsure. | ||
68 | |||
55 | config RCU_TRACE | 69 | config RCU_TRACE |
56 | bool "Enable tracing for RCU - currently stats in debugfs" | 70 | bool "Enable tracing for RCU - currently stats in debugfs" |
71 | depends on PREEMPT_RCU | ||
57 | select DEBUG_FS | 72 | select DEBUG_FS |
58 | default y | 73 | default y |
59 | help | 74 | help |
diff --git a/kernel/module.c b/kernel/module.c index be4807fb90e4..5d437bffd8dc 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -2178,10 +2178,20 @@ sys_init_module(void __user *umod, | |||
2178 | wake_up(&module_wq); | 2178 | wake_up(&module_wq); |
2179 | return ret; | 2179 | return ret; |
2180 | } | 2180 | } |
2181 | if (ret > 0) { | ||
2182 | printk(KERN_WARNING "%s: '%s'->init suspiciously returned %d, " | ||
2183 | "it should follow 0/-E convention\n" | ||
2184 | KERN_WARNING "%s: loading module anyway...\n", | ||
2185 | __func__, mod->name, ret, | ||
2186 | __func__); | ||
2187 | dump_stack(); | ||
2188 | } | ||
2181 | 2189 | ||
2182 | /* Now it's a first class citizen! */ | 2190 | /* Now it's a first class citizen! Wake up anyone waiting for it. */ |
2183 | mutex_lock(&module_mutex); | ||
2184 | mod->state = MODULE_STATE_LIVE; | 2191 | mod->state = MODULE_STATE_LIVE; |
2192 | wake_up(&module_wq); | ||
2193 | |||
2194 | mutex_lock(&module_mutex); | ||
2185 | /* Drop initial reference. */ | 2195 | /* Drop initial reference. */ |
2186 | module_put(mod); | 2196 | module_put(mod); |
2187 | unwind_remove_table(mod->unwind_info, 1); | 2197 | unwind_remove_table(mod->unwind_info, 1); |
@@ -2190,7 +2200,6 @@ sys_init_module(void __user *umod, | |||
2190 | mod->init_size = 0; | 2200 | mod->init_size = 0; |
2191 | mod->init_text_size = 0; | 2201 | mod->init_text_size = 0; |
2192 | mutex_unlock(&module_mutex); | 2202 | mutex_unlock(&module_mutex); |
2193 | wake_up(&module_wq); | ||
2194 | 2203 | ||
2195 | return 0; | 2204 | return 0; |
2196 | } | 2205 | } |
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 79833170bb9c..6233f3b4ae66 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
@@ -190,7 +190,7 @@ config APM_EMULATION | |||
190 | notification of APM "events" (e.g. battery status change). | 190 | notification of APM "events" (e.g. battery status change). |
191 | 191 | ||
192 | In order to use APM, you will need supporting software. For location | 192 | In order to use APM, you will need supporting software. For location |
193 | and more information, read <file:Documentation/pm.txt> and the | 193 | and more information, read <file:Documentation/power/pm.txt> and the |
194 | Battery Powered Linux mini-HOWTO, available from | 194 | Battery Powered Linux mini-HOWTO, available from |
195 | <http://www.tldp.org/docs.html#howto>. | 195 | <http://www.tldp.org/docs.html#howto>. |
196 | 196 | ||
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c index 72a020cabb4c..5f91a07c4eac 100644 --- a/kernel/power/snapshot.c +++ b/kernel/power/snapshot.c | |||
@@ -447,7 +447,7 @@ static void memory_bm_free(struct memory_bitmap *bm, int clear_nosave_free) | |||
447 | * of @bm->cur_zone_bm are updated. | 447 | * of @bm->cur_zone_bm are updated. |
448 | */ | 448 | */ |
449 | 449 | ||
450 | static void memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn, | 450 | static int memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn, |
451 | void **addr, unsigned int *bit_nr) | 451 | void **addr, unsigned int *bit_nr) |
452 | { | 452 | { |
453 | struct zone_bitmap *zone_bm; | 453 | struct zone_bitmap *zone_bm; |
@@ -461,7 +461,8 @@ static void memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn, | |||
461 | while (pfn < zone_bm->start_pfn || pfn >= zone_bm->end_pfn) { | 461 | while (pfn < zone_bm->start_pfn || pfn >= zone_bm->end_pfn) { |
462 | zone_bm = zone_bm->next; | 462 | zone_bm = zone_bm->next; |
463 | 463 | ||
464 | BUG_ON(!zone_bm); | 464 | if (!zone_bm) |
465 | return -EFAULT; | ||
465 | } | 466 | } |
466 | bm->cur.zone_bm = zone_bm; | 467 | bm->cur.zone_bm = zone_bm; |
467 | } | 468 | } |
@@ -479,23 +480,40 @@ static void memory_bm_find_bit(struct memory_bitmap *bm, unsigned long pfn, | |||
479 | pfn -= bb->start_pfn; | 480 | pfn -= bb->start_pfn; |
480 | *bit_nr = pfn % BM_BITS_PER_CHUNK; | 481 | *bit_nr = pfn % BM_BITS_PER_CHUNK; |
481 | *addr = bb->data + pfn / BM_BITS_PER_CHUNK; | 482 | *addr = bb->data + pfn / BM_BITS_PER_CHUNK; |
483 | return 0; | ||
482 | } | 484 | } |
483 | 485 | ||
484 | static void memory_bm_set_bit(struct memory_bitmap *bm, unsigned long pfn) | 486 | static void memory_bm_set_bit(struct memory_bitmap *bm, unsigned long pfn) |
485 | { | 487 | { |
486 | void *addr; | 488 | void *addr; |
487 | unsigned int bit; | 489 | unsigned int bit; |
490 | int error; | ||
488 | 491 | ||
489 | memory_bm_find_bit(bm, pfn, &addr, &bit); | 492 | error = memory_bm_find_bit(bm, pfn, &addr, &bit); |
493 | BUG_ON(error); | ||
490 | set_bit(bit, addr); | 494 | set_bit(bit, addr); |
491 | } | 495 | } |
492 | 496 | ||
497 | static int mem_bm_set_bit_check(struct memory_bitmap *bm, unsigned long pfn) | ||
498 | { | ||
499 | void *addr; | ||
500 | unsigned int bit; | ||
501 | int error; | ||
502 | |||
503 | error = memory_bm_find_bit(bm, pfn, &addr, &bit); | ||
504 | if (!error) | ||
505 | set_bit(bit, addr); | ||
506 | return error; | ||
507 | } | ||
508 | |||
493 | static void memory_bm_clear_bit(struct memory_bitmap *bm, unsigned long pfn) | 509 | static void memory_bm_clear_bit(struct memory_bitmap *bm, unsigned long pfn) |
494 | { | 510 | { |
495 | void *addr; | 511 | void *addr; |
496 | unsigned int bit; | 512 | unsigned int bit; |
513 | int error; | ||
497 | 514 | ||
498 | memory_bm_find_bit(bm, pfn, &addr, &bit); | 515 | error = memory_bm_find_bit(bm, pfn, &addr, &bit); |
516 | BUG_ON(error); | ||
499 | clear_bit(bit, addr); | 517 | clear_bit(bit, addr); |
500 | } | 518 | } |
501 | 519 | ||
@@ -503,8 +521,10 @@ static int memory_bm_test_bit(struct memory_bitmap *bm, unsigned long pfn) | |||
503 | { | 521 | { |
504 | void *addr; | 522 | void *addr; |
505 | unsigned int bit; | 523 | unsigned int bit; |
524 | int error; | ||
506 | 525 | ||
507 | memory_bm_find_bit(bm, pfn, &addr, &bit); | 526 | error = memory_bm_find_bit(bm, pfn, &addr, &bit); |
527 | BUG_ON(error); | ||
508 | return test_bit(bit, addr); | 528 | return test_bit(bit, addr); |
509 | } | 529 | } |
510 | 530 | ||
@@ -709,8 +729,15 @@ static void mark_nosave_pages(struct memory_bitmap *bm) | |||
709 | region->end_pfn << PAGE_SHIFT); | 729 | region->end_pfn << PAGE_SHIFT); |
710 | 730 | ||
711 | for (pfn = region->start_pfn; pfn < region->end_pfn; pfn++) | 731 | for (pfn = region->start_pfn; pfn < region->end_pfn; pfn++) |
712 | if (pfn_valid(pfn)) | 732 | if (pfn_valid(pfn)) { |
713 | memory_bm_set_bit(bm, pfn); | 733 | /* |
734 | * It is safe to ignore the result of | ||
735 | * mem_bm_set_bit_check() here, since we won't | ||
736 | * touch the PFNs for which the error is | ||
737 | * returned anyway. | ||
738 | */ | ||
739 | mem_bm_set_bit_check(bm, pfn); | ||
740 | } | ||
714 | } | 741 | } |
715 | } | 742 | } |
716 | 743 | ||
diff --git a/kernel/sched.c b/kernel/sched.c index b02e4fc25645..d1ad69b270ca 100644 --- a/kernel/sched.c +++ b/kernel/sched.c | |||
@@ -301,7 +301,7 @@ struct cfs_rq { | |||
301 | /* 'curr' points to currently running entity on this cfs_rq. | 301 | /* 'curr' points to currently running entity on this cfs_rq. |
302 | * It is set to NULL otherwise (i.e when none are currently running). | 302 | * It is set to NULL otherwise (i.e when none are currently running). |
303 | */ | 303 | */ |
304 | struct sched_entity *curr; | 304 | struct sched_entity *curr, *next; |
305 | 305 | ||
306 | unsigned long nr_spread_over; | 306 | unsigned long nr_spread_over; |
307 | 307 | ||
@@ -1084,7 +1084,7 @@ calc_delta_mine(unsigned long delta_exec, unsigned long weight, | |||
1084 | u64 tmp; | 1084 | u64 tmp; |
1085 | 1085 | ||
1086 | if (unlikely(!lw->inv_weight)) | 1086 | if (unlikely(!lw->inv_weight)) |
1087 | lw->inv_weight = (WMULT_CONST - lw->weight/2) / lw->weight + 1; | 1087 | lw->inv_weight = (WMULT_CONST-lw->weight/2) / (lw->weight+1); |
1088 | 1088 | ||
1089 | tmp = (u64)delta_exec * weight; | 1089 | tmp = (u64)delta_exec * weight; |
1090 | /* | 1090 | /* |
@@ -1108,11 +1108,13 @@ calc_delta_fair(unsigned long delta_exec, struct load_weight *lw) | |||
1108 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) | 1108 | static inline void update_load_add(struct load_weight *lw, unsigned long inc) |
1109 | { | 1109 | { |
1110 | lw->weight += inc; | 1110 | lw->weight += inc; |
1111 | lw->inv_weight = 0; | ||
1111 | } | 1112 | } |
1112 | 1113 | ||
1113 | static inline void update_load_sub(struct load_weight *lw, unsigned long dec) | 1114 | static inline void update_load_sub(struct load_weight *lw, unsigned long dec) |
1114 | { | 1115 | { |
1115 | lw->weight -= dec; | 1116 | lw->weight -= dec; |
1117 | lw->inv_weight = 0; | ||
1116 | } | 1118 | } |
1117 | 1119 | ||
1118 | /* | 1120 | /* |
@@ -4268,11 +4270,10 @@ void rt_mutex_setprio(struct task_struct *p, int prio) | |||
4268 | oldprio = p->prio; | 4270 | oldprio = p->prio; |
4269 | on_rq = p->se.on_rq; | 4271 | on_rq = p->se.on_rq; |
4270 | running = task_current(rq, p); | 4272 | running = task_current(rq, p); |
4271 | if (on_rq) { | 4273 | if (on_rq) |
4272 | dequeue_task(rq, p, 0); | 4274 | dequeue_task(rq, p, 0); |
4273 | if (running) | 4275 | if (running) |
4274 | p->sched_class->put_prev_task(rq, p); | 4276 | p->sched_class->put_prev_task(rq, p); |
4275 | } | ||
4276 | 4277 | ||
4277 | if (rt_prio(prio)) | 4278 | if (rt_prio(prio)) |
4278 | p->sched_class = &rt_sched_class; | 4279 | p->sched_class = &rt_sched_class; |
@@ -4281,10 +4282,9 @@ void rt_mutex_setprio(struct task_struct *p, int prio) | |||
4281 | 4282 | ||
4282 | p->prio = prio; | 4283 | p->prio = prio; |
4283 | 4284 | ||
4285 | if (running) | ||
4286 | p->sched_class->set_curr_task(rq); | ||
4284 | if (on_rq) { | 4287 | if (on_rq) { |
4285 | if (running) | ||
4286 | p->sched_class->set_curr_task(rq); | ||
4287 | |||
4288 | enqueue_task(rq, p, 0); | 4288 | enqueue_task(rq, p, 0); |
4289 | 4289 | ||
4290 | check_class_changed(rq, p, prev_class, oldprio, running); | 4290 | check_class_changed(rq, p, prev_class, oldprio, running); |
@@ -4581,19 +4581,17 @@ recheck: | |||
4581 | update_rq_clock(rq); | 4581 | update_rq_clock(rq); |
4582 | on_rq = p->se.on_rq; | 4582 | on_rq = p->se.on_rq; |
4583 | running = task_current(rq, p); | 4583 | running = task_current(rq, p); |
4584 | if (on_rq) { | 4584 | if (on_rq) |
4585 | deactivate_task(rq, p, 0); | 4585 | deactivate_task(rq, p, 0); |
4586 | if (running) | 4586 | if (running) |
4587 | p->sched_class->put_prev_task(rq, p); | 4587 | p->sched_class->put_prev_task(rq, p); |
4588 | } | ||
4589 | 4588 | ||
4590 | oldprio = p->prio; | 4589 | oldprio = p->prio; |
4591 | __setscheduler(rq, p, policy, param->sched_priority); | 4590 | __setscheduler(rq, p, policy, param->sched_priority); |
4592 | 4591 | ||
4592 | if (running) | ||
4593 | p->sched_class->set_curr_task(rq); | ||
4593 | if (on_rq) { | 4594 | if (on_rq) { |
4594 | if (running) | ||
4595 | p->sched_class->set_curr_task(rq); | ||
4596 | |||
4597 | activate_task(rq, p, 0); | 4595 | activate_task(rq, p, 0); |
4598 | 4596 | ||
4599 | check_class_changed(rq, p, prev_class, oldprio, running); | 4597 | check_class_changed(rq, p, prev_class, oldprio, running); |
@@ -5813,13 +5811,6 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
5813 | /* Must be high prio: stop_machine expects to yield to it. */ | 5811 | /* Must be high prio: stop_machine expects to yield to it. */ |
5814 | rq = task_rq_lock(p, &flags); | 5812 | rq = task_rq_lock(p, &flags); |
5815 | __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); | 5813 | __setscheduler(rq, p, SCHED_FIFO, MAX_RT_PRIO-1); |
5816 | |||
5817 | /* Update our root-domain */ | ||
5818 | if (rq->rd) { | ||
5819 | BUG_ON(!cpu_isset(cpu, rq->rd->span)); | ||
5820 | cpu_set(cpu, rq->rd->online); | ||
5821 | } | ||
5822 | |||
5823 | task_rq_unlock(rq, &flags); | 5814 | task_rq_unlock(rq, &flags); |
5824 | cpu_rq(cpu)->migration_thread = p; | 5815 | cpu_rq(cpu)->migration_thread = p; |
5825 | break; | 5816 | break; |
@@ -5828,6 +5819,15 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
5828 | case CPU_ONLINE_FROZEN: | 5819 | case CPU_ONLINE_FROZEN: |
5829 | /* Strictly unnecessary, as first user will wake it. */ | 5820 | /* Strictly unnecessary, as first user will wake it. */ |
5830 | wake_up_process(cpu_rq(cpu)->migration_thread); | 5821 | wake_up_process(cpu_rq(cpu)->migration_thread); |
5822 | |||
5823 | /* Update our root-domain */ | ||
5824 | rq = cpu_rq(cpu); | ||
5825 | spin_lock_irqsave(&rq->lock, flags); | ||
5826 | if (rq->rd) { | ||
5827 | BUG_ON(!cpu_isset(cpu, rq->rd->span)); | ||
5828 | cpu_set(cpu, rq->rd->online); | ||
5829 | } | ||
5830 | spin_unlock_irqrestore(&rq->lock, flags); | ||
5831 | break; | 5831 | break; |
5832 | 5832 | ||
5833 | #ifdef CONFIG_HOTPLUG_CPU | 5833 | #ifdef CONFIG_HOTPLUG_CPU |
@@ -5879,7 +5879,8 @@ migration_call(struct notifier_block *nfb, unsigned long action, void *hcpu) | |||
5879 | spin_unlock_irq(&rq->lock); | 5879 | spin_unlock_irq(&rq->lock); |
5880 | break; | 5880 | break; |
5881 | 5881 | ||
5882 | case CPU_DOWN_PREPARE: | 5882 | case CPU_DYING: |
5883 | case CPU_DYING_FROZEN: | ||
5883 | /* Update our root-domain */ | 5884 | /* Update our root-domain */ |
5884 | rq = cpu_rq(cpu); | 5885 | rq = cpu_rq(cpu); |
5885 | spin_lock_irqsave(&rq->lock, flags); | 5886 | spin_lock_irqsave(&rq->lock, flags); |
@@ -6103,6 +6104,8 @@ static void rq_attach_root(struct rq *rq, struct root_domain *rd) | |||
6103 | rq->rd = rd; | 6104 | rq->rd = rd; |
6104 | 6105 | ||
6105 | cpu_set(rq->cpu, rd->span); | 6106 | cpu_set(rq->cpu, rd->span); |
6107 | if (cpu_isset(rq->cpu, cpu_online_map)) | ||
6108 | cpu_set(rq->cpu, rd->online); | ||
6106 | 6109 | ||
6107 | for (class = sched_class_highest; class; class = class->next) { | 6110 | for (class = sched_class_highest; class; class = class->next) { |
6108 | if (class->join_domain) | 6111 | if (class->join_domain) |
@@ -7613,11 +7616,10 @@ void sched_move_task(struct task_struct *tsk) | |||
7613 | running = task_current(rq, tsk); | 7616 | running = task_current(rq, tsk); |
7614 | on_rq = tsk->se.on_rq; | 7617 | on_rq = tsk->se.on_rq; |
7615 | 7618 | ||
7616 | if (on_rq) { | 7619 | if (on_rq) |
7617 | dequeue_task(rq, tsk, 0); | 7620 | dequeue_task(rq, tsk, 0); |
7618 | if (unlikely(running)) | 7621 | if (unlikely(running)) |
7619 | tsk->sched_class->put_prev_task(rq, tsk); | 7622 | tsk->sched_class->put_prev_task(rq, tsk); |
7620 | } | ||
7621 | 7623 | ||
7622 | set_task_rq(tsk, task_cpu(tsk)); | 7624 | set_task_rq(tsk, task_cpu(tsk)); |
7623 | 7625 | ||
@@ -7626,11 +7628,10 @@ void sched_move_task(struct task_struct *tsk) | |||
7626 | tsk->sched_class->moved_group(tsk); | 7628 | tsk->sched_class->moved_group(tsk); |
7627 | #endif | 7629 | #endif |
7628 | 7630 | ||
7629 | if (on_rq) { | 7631 | if (unlikely(running)) |
7630 | if (unlikely(running)) | 7632 | tsk->sched_class->set_curr_task(rq); |
7631 | tsk->sched_class->set_curr_task(rq); | 7633 | if (on_rq) |
7632 | enqueue_task(rq, tsk, 0); | 7634 | enqueue_task(rq, tsk, 0); |
7633 | } | ||
7634 | 7635 | ||
7635 | task_rq_unlock(rq, &flags); | 7636 | task_rq_unlock(rq, &flags); |
7636 | } | 7637 | } |
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index e2a530515619..f2cc59080efa 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -175,8 +175,15 @@ static void __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
175 | * Maintain a cache of leftmost tree entries (it is frequently | 175 | * Maintain a cache of leftmost tree entries (it is frequently |
176 | * used): | 176 | * used): |
177 | */ | 177 | */ |
178 | if (leftmost) | 178 | if (leftmost) { |
179 | cfs_rq->rb_leftmost = &se->run_node; | 179 | cfs_rq->rb_leftmost = &se->run_node; |
180 | /* | ||
181 | * maintain cfs_rq->min_vruntime to be a monotonic increasing | ||
182 | * value tracking the leftmost vruntime in the tree. | ||
183 | */ | ||
184 | cfs_rq->min_vruntime = | ||
185 | max_vruntime(cfs_rq->min_vruntime, se->vruntime); | ||
186 | } | ||
180 | 187 | ||
181 | rb_link_node(&se->run_node, parent, link); | 188 | rb_link_node(&se->run_node, parent, link); |
182 | rb_insert_color(&se->run_node, &cfs_rq->tasks_timeline); | 189 | rb_insert_color(&se->run_node, &cfs_rq->tasks_timeline); |
@@ -184,8 +191,24 @@ static void __enqueue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
184 | 191 | ||
185 | static void __dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) | 192 | static void __dequeue_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) |
186 | { | 193 | { |
187 | if (cfs_rq->rb_leftmost == &se->run_node) | 194 | if (cfs_rq->rb_leftmost == &se->run_node) { |
188 | cfs_rq->rb_leftmost = rb_next(&se->run_node); | 195 | struct rb_node *next_node; |
196 | struct sched_entity *next; | ||
197 | |||
198 | next_node = rb_next(&se->run_node); | ||
199 | cfs_rq->rb_leftmost = next_node; | ||
200 | |||
201 | if (next_node) { | ||
202 | next = rb_entry(next_node, | ||
203 | struct sched_entity, run_node); | ||
204 | cfs_rq->min_vruntime = | ||
205 | max_vruntime(cfs_rq->min_vruntime, | ||
206 | next->vruntime); | ||
207 | } | ||
208 | } | ||
209 | |||
210 | if (cfs_rq->next == se) | ||
211 | cfs_rq->next = NULL; | ||
189 | 212 | ||
190 | rb_erase(&se->run_node, &cfs_rq->tasks_timeline); | 213 | rb_erase(&se->run_node, &cfs_rq->tasks_timeline); |
191 | } | 214 | } |
@@ -260,12 +283,8 @@ static u64 __sched_period(unsigned long nr_running) | |||
260 | */ | 283 | */ |
261 | static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) | 284 | static u64 sched_slice(struct cfs_rq *cfs_rq, struct sched_entity *se) |
262 | { | 285 | { |
263 | u64 slice = __sched_period(cfs_rq->nr_running); | 286 | return calc_delta_mine(__sched_period(cfs_rq->nr_running), |
264 | 287 | se->load.weight, &cfs_rq->load); | |
265 | slice *= se->load.weight; | ||
266 | do_div(slice, cfs_rq->load.weight); | ||
267 | |||
268 | return slice; | ||
269 | } | 288 | } |
270 | 289 | ||
271 | /* | 290 | /* |
@@ -303,7 +322,6 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, | |||
303 | unsigned long delta_exec) | 322 | unsigned long delta_exec) |
304 | { | 323 | { |
305 | unsigned long delta_exec_weighted; | 324 | unsigned long delta_exec_weighted; |
306 | u64 vruntime; | ||
307 | 325 | ||
308 | schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max)); | 326 | schedstat_set(curr->exec_max, max((u64)delta_exec, curr->exec_max)); |
309 | 327 | ||
@@ -315,19 +333,6 @@ __update_curr(struct cfs_rq *cfs_rq, struct sched_entity *curr, | |||
315 | &curr->load); | 333 | &curr->load); |
316 | } | 334 | } |
317 | curr->vruntime += delta_exec_weighted; | 335 | curr->vruntime += delta_exec_weighted; |
318 | |||
319 | /* | ||
320 | * maintain cfs_rq->min_vruntime to be a monotonic increasing | ||
321 | * value tracking the leftmost vruntime in the tree. | ||
322 | */ | ||
323 | if (first_fair(cfs_rq)) { | ||
324 | vruntime = min_vruntime(curr->vruntime, | ||
325 | __pick_next_entity(cfs_rq)->vruntime); | ||
326 | } else | ||
327 | vruntime = curr->vruntime; | ||
328 | |||
329 | cfs_rq->min_vruntime = | ||
330 | max_vruntime(cfs_rq->min_vruntime, vruntime); | ||
331 | } | 336 | } |
332 | 337 | ||
333 | static void update_curr(struct cfs_rq *cfs_rq) | 338 | static void update_curr(struct cfs_rq *cfs_rq) |
@@ -493,7 +498,11 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
493 | { | 498 | { |
494 | u64 vruntime; | 499 | u64 vruntime; |
495 | 500 | ||
496 | vruntime = cfs_rq->min_vruntime; | 501 | if (first_fair(cfs_rq)) { |
502 | vruntime = min_vruntime(cfs_rq->min_vruntime, | ||
503 | __pick_next_entity(cfs_rq)->vruntime); | ||
504 | } else | ||
505 | vruntime = cfs_rq->min_vruntime; | ||
497 | 506 | ||
498 | if (sched_feat(TREE_AVG)) { | 507 | if (sched_feat(TREE_AVG)) { |
499 | struct sched_entity *last = __pick_last_entity(cfs_rq); | 508 | struct sched_entity *last = __pick_last_entity(cfs_rq); |
@@ -515,8 +524,10 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
515 | 524 | ||
516 | if (!initial) { | 525 | if (!initial) { |
517 | /* sleeps upto a single latency don't count. */ | 526 | /* sleeps upto a single latency don't count. */ |
518 | if (sched_feat(NEW_FAIR_SLEEPERS)) | 527 | if (sched_feat(NEW_FAIR_SLEEPERS)) { |
519 | vruntime -= sysctl_sched_latency; | 528 | vruntime -= calc_delta_fair(sysctl_sched_latency, |
529 | &cfs_rq->load); | ||
530 | } | ||
520 | 531 | ||
521 | /* ensure we never gain time by being placed backwards. */ | 532 | /* ensure we never gain time by being placed backwards. */ |
522 | vruntime = max_vruntime(se->vruntime, vruntime); | 533 | vruntime = max_vruntime(se->vruntime, vruntime); |
@@ -616,12 +627,32 @@ set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se) | |||
616 | se->prev_sum_exec_runtime = se->sum_exec_runtime; | 627 | se->prev_sum_exec_runtime = se->sum_exec_runtime; |
617 | } | 628 | } |
618 | 629 | ||
630 | static struct sched_entity * | ||
631 | pick_next(struct cfs_rq *cfs_rq, struct sched_entity *se) | ||
632 | { | ||
633 | s64 diff, gran; | ||
634 | |||
635 | if (!cfs_rq->next) | ||
636 | return se; | ||
637 | |||
638 | diff = cfs_rq->next->vruntime - se->vruntime; | ||
639 | if (diff < 0) | ||
640 | return se; | ||
641 | |||
642 | gran = calc_delta_fair(sysctl_sched_wakeup_granularity, &cfs_rq->load); | ||
643 | if (diff > gran) | ||
644 | return se; | ||
645 | |||
646 | return cfs_rq->next; | ||
647 | } | ||
648 | |||
619 | static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) | 649 | static struct sched_entity *pick_next_entity(struct cfs_rq *cfs_rq) |
620 | { | 650 | { |
621 | struct sched_entity *se = NULL; | 651 | struct sched_entity *se = NULL; |
622 | 652 | ||
623 | if (first_fair(cfs_rq)) { | 653 | if (first_fair(cfs_rq)) { |
624 | se = __pick_next_entity(cfs_rq); | 654 | se = __pick_next_entity(cfs_rq); |
655 | se = pick_next(cfs_rq, se); | ||
625 | set_next_entity(cfs_rq, se); | 656 | set_next_entity(cfs_rq, se); |
626 | } | 657 | } |
627 | 658 | ||
@@ -1060,6 +1091,9 @@ static void check_preempt_wakeup(struct rq *rq, struct task_struct *p) | |||
1060 | resched_task(curr); | 1091 | resched_task(curr); |
1061 | return; | 1092 | return; |
1062 | } | 1093 | } |
1094 | |||
1095 | cfs_rq_of(pse)->next = pse; | ||
1096 | |||
1063 | /* | 1097 | /* |
1064 | * Batch tasks do not preempt (their preemption is driven by | 1098 | * Batch tasks do not preempt (their preemption is driven by |
1065 | * the tick): | 1099 | * the tick): |
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 4bb5a11e18a2..025922807e6e 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -310,7 +310,9 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir) | |||
310 | start_dma_addr = virt_to_bus(io_tlb_start) & mask; | 310 | start_dma_addr = virt_to_bus(io_tlb_start) & mask; |
311 | 311 | ||
312 | offset_slots = ALIGN(start_dma_addr, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; | 312 | offset_slots = ALIGN(start_dma_addr, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; |
313 | max_slots = ALIGN(mask + 1, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT; | 313 | max_slots = mask + 1 |
314 | ? ALIGN(mask + 1, 1 << IO_TLB_SHIFT) >> IO_TLB_SHIFT | ||
315 | : 1UL << (BITS_PER_LONG - IO_TLB_SHIFT); | ||
314 | 316 | ||
315 | /* | 317 | /* |
316 | * For mappings greater than a page, we limit the stride (and | 318 | * For mappings greater than a page, we limit the stride (and |
@@ -333,16 +335,18 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir) | |||
333 | index = ALIGN(io_tlb_index, stride); | 335 | index = ALIGN(io_tlb_index, stride); |
334 | if (index >= io_tlb_nslabs) | 336 | if (index >= io_tlb_nslabs) |
335 | index = 0; | 337 | index = 0; |
336 | |||
337 | while (is_span_boundary(index, nslots, offset_slots, | ||
338 | max_slots)) { | ||
339 | index += stride; | ||
340 | if (index >= io_tlb_nslabs) | ||
341 | index = 0; | ||
342 | } | ||
343 | wrap = index; | 338 | wrap = index; |
344 | 339 | ||
345 | do { | 340 | do { |
341 | while (is_span_boundary(index, nslots, offset_slots, | ||
342 | max_slots)) { | ||
343 | index += stride; | ||
344 | if (index >= io_tlb_nslabs) | ||
345 | index = 0; | ||
346 | if (index == wrap) | ||
347 | goto not_found; | ||
348 | } | ||
349 | |||
346 | /* | 350 | /* |
347 | * If we find a slot that indicates we have 'nslots' | 351 | * If we find a slot that indicates we have 'nslots' |
348 | * number of contiguous buffers, we allocate the | 352 | * number of contiguous buffers, we allocate the |
@@ -367,14 +371,12 @@ map_single(struct device *hwdev, char *buffer, size_t size, int dir) | |||
367 | 371 | ||
368 | goto found; | 372 | goto found; |
369 | } | 373 | } |
370 | do { | 374 | index += stride; |
371 | index += stride; | 375 | if (index >= io_tlb_nslabs) |
372 | if (index >= io_tlb_nslabs) | 376 | index = 0; |
373 | index = 0; | ||
374 | } while (is_span_boundary(index, nslots, offset_slots, | ||
375 | max_slots)); | ||
376 | } while (index != wrap); | 377 | } while (index != wrap); |
377 | 378 | ||
379 | not_found: | ||
378 | spin_unlock_irqrestore(&io_tlb_lock, flags); | 380 | spin_unlock_irqrestore(&io_tlb_lock, flags); |
379 | return NULL; | 381 | return NULL; |
380 | } | 382 | } |
diff --git a/mm/filemap.c b/mm/filemap.c index ab98557e228e..df343d1e6345 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1742,21 +1742,27 @@ size_t iov_iter_copy_from_user(struct page *page, | |||
1742 | } | 1742 | } |
1743 | EXPORT_SYMBOL(iov_iter_copy_from_user); | 1743 | EXPORT_SYMBOL(iov_iter_copy_from_user); |
1744 | 1744 | ||
1745 | static void __iov_iter_advance_iov(struct iov_iter *i, size_t bytes) | 1745 | void iov_iter_advance(struct iov_iter *i, size_t bytes) |
1746 | { | 1746 | { |
1747 | BUG_ON(i->count < bytes); | ||
1748 | |||
1747 | if (likely(i->nr_segs == 1)) { | 1749 | if (likely(i->nr_segs == 1)) { |
1748 | i->iov_offset += bytes; | 1750 | i->iov_offset += bytes; |
1751 | i->count -= bytes; | ||
1749 | } else { | 1752 | } else { |
1750 | const struct iovec *iov = i->iov; | 1753 | const struct iovec *iov = i->iov; |
1751 | size_t base = i->iov_offset; | 1754 | size_t base = i->iov_offset; |
1752 | 1755 | ||
1753 | /* | 1756 | /* |
1754 | * The !iov->iov_len check ensures we skip over unlikely | 1757 | * The !iov->iov_len check ensures we skip over unlikely |
1755 | * zero-length segments. | 1758 | * zero-length segments (without overruning the iovec). |
1756 | */ | 1759 | */ |
1757 | while (bytes || !iov->iov_len) { | 1760 | while (bytes || unlikely(!iov->iov_len && i->count)) { |
1758 | int copy = min(bytes, iov->iov_len - base); | 1761 | int copy; |
1759 | 1762 | ||
1763 | copy = min(bytes, iov->iov_len - base); | ||
1764 | BUG_ON(!i->count || i->count < copy); | ||
1765 | i->count -= copy; | ||
1760 | bytes -= copy; | 1766 | bytes -= copy; |
1761 | base += copy; | 1767 | base += copy; |
1762 | if (iov->iov_len == base) { | 1768 | if (iov->iov_len == base) { |
@@ -1768,14 +1774,6 @@ static void __iov_iter_advance_iov(struct iov_iter *i, size_t bytes) | |||
1768 | i->iov_offset = base; | 1774 | i->iov_offset = base; |
1769 | } | 1775 | } |
1770 | } | 1776 | } |
1771 | |||
1772 | void iov_iter_advance(struct iov_iter *i, size_t bytes) | ||
1773 | { | ||
1774 | BUG_ON(i->count < bytes); | ||
1775 | |||
1776 | __iov_iter_advance_iov(i, bytes); | ||
1777 | i->count -= bytes; | ||
1778 | } | ||
1779 | EXPORT_SYMBOL(iov_iter_advance); | 1777 | EXPORT_SYMBOL(iov_iter_advance); |
1780 | 1778 | ||
1781 | /* | 1779 | /* |
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index dcacc811e70e..74c1b6b0b37b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -286,6 +286,12 @@ static struct page *alloc_buddy_huge_page(struct vm_area_struct *vma, | |||
286 | 286 | ||
287 | spin_lock(&hugetlb_lock); | 287 | spin_lock(&hugetlb_lock); |
288 | if (page) { | 288 | if (page) { |
289 | /* | ||
290 | * This page is now managed by the hugetlb allocator and has | ||
291 | * no users -- drop the buddy allocator's reference. | ||
292 | */ | ||
293 | put_page_testzero(page); | ||
294 | VM_BUG_ON(page_count(page)); | ||
289 | nid = page_to_nid(page); | 295 | nid = page_to_nid(page); |
290 | set_compound_page_dtor(page, free_huge_page); | 296 | set_compound_page_dtor(page, free_huge_page); |
291 | /* | 297 | /* |
@@ -369,13 +375,14 @@ free: | |||
369 | enqueue_huge_page(page); | 375 | enqueue_huge_page(page); |
370 | else { | 376 | else { |
371 | /* | 377 | /* |
372 | * Decrement the refcount and free the page using its | 378 | * The page has a reference count of zero already, so |
373 | * destructor. This must be done with hugetlb_lock | 379 | * call free_huge_page directly instead of using |
380 | * put_page. This must be done with hugetlb_lock | ||
374 | * unlocked which is safe because free_huge_page takes | 381 | * unlocked which is safe because free_huge_page takes |
375 | * hugetlb_lock before deciding how to free the page. | 382 | * hugetlb_lock before deciding how to free the page. |
376 | */ | 383 | */ |
377 | spin_unlock(&hugetlb_lock); | 384 | spin_unlock(&hugetlb_lock); |
378 | put_page(page); | 385 | free_huge_page(page); |
379 | spin_lock(&hugetlb_lock); | 386 | spin_lock(&hugetlb_lock); |
380 | } | 387 | } |
381 | } | 388 | } |
diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 6c7ba1a63d23..3c3601121509 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c | |||
@@ -1296,7 +1296,9 @@ struct zonelist *huge_zonelist(struct vm_area_struct *vma, unsigned long addr, | |||
1296 | unsigned nid; | 1296 | unsigned nid; |
1297 | 1297 | ||
1298 | nid = interleave_nid(pol, vma, addr, HPAGE_SHIFT); | 1298 | nid = interleave_nid(pol, vma, addr, HPAGE_SHIFT); |
1299 | __mpol_free(pol); /* finished with pol */ | 1299 | if (unlikely(pol != &default_policy && |
1300 | pol != current->mempolicy)) | ||
1301 | __mpol_free(pol); /* finished with pol */ | ||
1300 | return NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_flags); | 1302 | return NODE_DATA(nid)->node_zonelists + gfp_zone(gfp_flags); |
1301 | } | 1303 | } |
1302 | 1304 | ||
@@ -1360,6 +1362,9 @@ alloc_page_vma(gfp_t gfp, struct vm_area_struct *vma, unsigned long addr) | |||
1360 | unsigned nid; | 1362 | unsigned nid; |
1361 | 1363 | ||
1362 | nid = interleave_nid(pol, vma, addr, PAGE_SHIFT); | 1364 | nid = interleave_nid(pol, vma, addr, PAGE_SHIFT); |
1365 | if (unlikely(pol != &default_policy && | ||
1366 | pol != current->mempolicy)) | ||
1367 | __mpol_free(pol); /* finished with pol */ | ||
1363 | return alloc_page_interleave(gfp, 0, nid); | 1368 | return alloc_page_interleave(gfp, 0, nid); |
1364 | } | 1369 | } |
1365 | zl = zonelist_policy(gfp, pol); | 1370 | zl = zonelist_policy(gfp, pol); |
diff --git a/net/bluetooth/bnep/bnep.h b/net/bluetooth/bnep/bnep.h index a2992280c3d1..e69244dd8de8 100644 --- a/net/bluetooth/bnep/bnep.h +++ b/net/bluetooth/bnep/bnep.h | |||
@@ -174,7 +174,7 @@ struct bnep_session { | |||
174 | 174 | ||
175 | void bnep_net_setup(struct net_device *dev); | 175 | void bnep_net_setup(struct net_device *dev); |
176 | int bnep_sock_init(void); | 176 | int bnep_sock_init(void); |
177 | int bnep_sock_cleanup(void); | 177 | void bnep_sock_cleanup(void); |
178 | 178 | ||
179 | static inline int bnep_mc_hash(__u8 *addr) | 179 | static inline int bnep_mc_hash(__u8 *addr) |
180 | { | 180 | { |
diff --git a/net/bluetooth/bnep/sock.c b/net/bluetooth/bnep/sock.c index 81065e548a1f..201e5b1ce473 100644 --- a/net/bluetooth/bnep/sock.c +++ b/net/bluetooth/bnep/sock.c | |||
@@ -257,12 +257,10 @@ error: | |||
257 | return err; | 257 | return err; |
258 | } | 258 | } |
259 | 259 | ||
260 | int __exit bnep_sock_cleanup(void) | 260 | void __exit bnep_sock_cleanup(void) |
261 | { | 261 | { |
262 | if (bt_sock_unregister(BTPROTO_BNEP) < 0) | 262 | if (bt_sock_unregister(BTPROTO_BNEP) < 0) |
263 | BT_ERR("Can't unregister BNEP socket"); | 263 | BT_ERR("Can't unregister BNEP socket"); |
264 | 264 | ||
265 | proto_unregister(&bnep_proto); | 265 | proto_unregister(&bnep_proto); |
266 | |||
267 | return 0; | ||
268 | } | 266 | } |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 930b58e7149a..aec6929f5c16 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -902,8 +902,6 @@ int hci_unregister_dev(struct hci_dev *hdev) | |||
902 | 902 | ||
903 | BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); | 903 | BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); |
904 | 904 | ||
905 | hci_unregister_sysfs(hdev); | ||
906 | |||
907 | write_lock_bh(&hci_dev_list_lock); | 905 | write_lock_bh(&hci_dev_list_lock); |
908 | list_del(&hdev->list); | 906 | list_del(&hdev->list); |
909 | write_unlock_bh(&hci_dev_list_lock); | 907 | write_unlock_bh(&hci_dev_list_lock); |
@@ -915,6 +913,8 @@ int hci_unregister_dev(struct hci_dev *hdev) | |||
915 | 913 | ||
916 | hci_notify(hdev, HCI_DEV_UNREG); | 914 | hci_notify(hdev, HCI_DEV_UNREG); |
917 | 915 | ||
916 | hci_unregister_sysfs(hdev); | ||
917 | |||
918 | __hci_dev_put(hdev); | 918 | __hci_dev_put(hdev); |
919 | 919 | ||
920 | return 0; | 920 | return 0; |
diff --git a/net/bluetooth/hci_sock.c b/net/bluetooth/hci_sock.c index 14991323c273..b5d4019d3572 100644 --- a/net/bluetooth/hci_sock.c +++ b/net/bluetooth/hci_sock.c | |||
@@ -734,7 +734,7 @@ error: | |||
734 | return err; | 734 | return err; |
735 | } | 735 | } |
736 | 736 | ||
737 | int __exit hci_sock_cleanup(void) | 737 | void __exit hci_sock_cleanup(void) |
738 | { | 738 | { |
739 | if (bt_sock_unregister(BTPROTO_HCI) < 0) | 739 | if (bt_sock_unregister(BTPROTO_HCI) < 0) |
740 | BT_ERR("HCI socket unregistration failed"); | 740 | BT_ERR("HCI socket unregistration failed"); |
@@ -742,6 +742,4 @@ int __exit hci_sock_cleanup(void) | |||
742 | hci_unregister_notifier(&hci_sock_nblock); | 742 | hci_unregister_notifier(&hci_sock_nblock); |
743 | 743 | ||
744 | proto_unregister(&hci_sk_proto); | 744 | proto_unregister(&hci_sk_proto); |
745 | |||
746 | return 0; | ||
747 | } | 745 | } |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index ed750f9ceb07..01578f544ad6 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1035,6 +1035,13 @@ static void tcp_cwnd_validate(struct sock *sk) | |||
1035 | * introducing MSS oddities to segment boundaries. In rare cases where | 1035 | * introducing MSS oddities to segment boundaries. In rare cases where |
1036 | * mss_now != mss_cache, we will request caller to create a small skb | 1036 | * mss_now != mss_cache, we will request caller to create a small skb |
1037 | * per input skb which could be mostly avoided here (if desired). | 1037 | * per input skb which could be mostly avoided here (if desired). |
1038 | * | ||
1039 | * We explicitly want to create a request for splitting write queue tail | ||
1040 | * to a small skb for Nagle purposes while avoiding unnecessary modulos, | ||
1041 | * thus all the complexity (cwnd_len is always MSS multiple which we | ||
1042 | * return whenever allowed by the other factors). Basically we need the | ||
1043 | * modulo only when the receiver window alone is the limiting factor or | ||
1044 | * when we would be allowed to send the split-due-to-Nagle skb fully. | ||
1038 | */ | 1045 | */ |
1039 | static unsigned int tcp_mss_split_point(struct sock *sk, struct sk_buff *skb, | 1046 | static unsigned int tcp_mss_split_point(struct sock *sk, struct sk_buff *skb, |
1040 | unsigned int mss_now, unsigned int cwnd) | 1047 | unsigned int mss_now, unsigned int cwnd) |
@@ -1048,10 +1055,11 @@ static unsigned int tcp_mss_split_point(struct sock *sk, struct sk_buff *skb, | |||
1048 | if (likely(cwnd_len <= window && skb != tcp_write_queue_tail(sk))) | 1055 | if (likely(cwnd_len <= window && skb != tcp_write_queue_tail(sk))) |
1049 | return cwnd_len; | 1056 | return cwnd_len; |
1050 | 1057 | ||
1051 | if (skb == tcp_write_queue_tail(sk) && cwnd_len <= skb->len) | 1058 | needed = min(skb->len, window); |
1059 | |||
1060 | if (skb == tcp_write_queue_tail(sk) && cwnd_len <= needed) | ||
1052 | return cwnd_len; | 1061 | return cwnd_len; |
1053 | 1062 | ||
1054 | needed = min(skb->len, window); | ||
1055 | return needed - needed % mss_now; | 1063 | return needed - needed % mss_now; |
1056 | } | 1064 | } |
1057 | 1065 | ||
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index e06bf0028bb1..684ec9c1ad38 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -381,7 +381,7 @@ int nf_ct_expect_related(struct nf_conntrack_expect *expect) | |||
381 | if (nf_ct_expect_count >= nf_ct_expect_max) { | 381 | if (nf_ct_expect_count >= nf_ct_expect_max) { |
382 | if (net_ratelimit()) | 382 | if (net_ratelimit()) |
383 | printk(KERN_WARNING | 383 | printk(KERN_WARNING |
384 | "nf_conntrack: expectation table full"); | 384 | "nf_conntrack: expectation table full\n"); |
385 | ret = -EMFILE; | 385 | ret = -EMFILE; |
386 | goto out; | 386 | goto out; |
387 | } | 387 | } |
diff --git a/net/netfilter/nf_conntrack_extend.c b/net/netfilter/nf_conntrack_extend.c index 8b9be1e978cd..2bd9963b5b3e 100644 --- a/net/netfilter/nf_conntrack_extend.c +++ b/net/netfilter/nf_conntrack_extend.c | |||
@@ -19,14 +19,6 @@ | |||
19 | static struct nf_ct_ext_type *nf_ct_ext_types[NF_CT_EXT_NUM]; | 19 | static struct nf_ct_ext_type *nf_ct_ext_types[NF_CT_EXT_NUM]; |
20 | static DEFINE_MUTEX(nf_ct_ext_type_mutex); | 20 | static DEFINE_MUTEX(nf_ct_ext_type_mutex); |
21 | 21 | ||
22 | /* Horrible trick to figure out smallest amount worth kmallocing. */ | ||
23 | #define CACHE(x) (x) + 0 * | ||
24 | enum { | ||
25 | NF_CT_EXT_MIN_SIZE = | ||
26 | #include <linux/kmalloc_sizes.h> | ||
27 | 1 }; | ||
28 | #undef CACHE | ||
29 | |||
30 | void __nf_ct_ext_destroy(struct nf_conn *ct) | 22 | void __nf_ct_ext_destroy(struct nf_conn *ct) |
31 | { | 23 | { |
32 | unsigned int i; | 24 | unsigned int i; |
@@ -53,7 +45,7 @@ EXPORT_SYMBOL(__nf_ct_ext_destroy); | |||
53 | static void * | 45 | static void * |
54 | nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp) | 46 | nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp) |
55 | { | 47 | { |
56 | unsigned int off, len, real_len; | 48 | unsigned int off, len; |
57 | struct nf_ct_ext_type *t; | 49 | struct nf_ct_ext_type *t; |
58 | 50 | ||
59 | rcu_read_lock(); | 51 | rcu_read_lock(); |
@@ -61,16 +53,14 @@ nf_ct_ext_create(struct nf_ct_ext **ext, enum nf_ct_ext_id id, gfp_t gfp) | |||
61 | BUG_ON(t == NULL); | 53 | BUG_ON(t == NULL); |
62 | off = ALIGN(sizeof(struct nf_ct_ext), t->align); | 54 | off = ALIGN(sizeof(struct nf_ct_ext), t->align); |
63 | len = off + t->len; | 55 | len = off + t->len; |
64 | real_len = t->alloc_size; | ||
65 | rcu_read_unlock(); | 56 | rcu_read_unlock(); |
66 | 57 | ||
67 | *ext = kzalloc(real_len, gfp); | 58 | *ext = kzalloc(t->alloc_size, gfp); |
68 | if (!*ext) | 59 | if (!*ext) |
69 | return NULL; | 60 | return NULL; |
70 | 61 | ||
71 | (*ext)->offset[id] = off; | 62 | (*ext)->offset[id] = off; |
72 | (*ext)->len = len; | 63 | (*ext)->len = len; |
73 | (*ext)->real_len = real_len; | ||
74 | 64 | ||
75 | return (void *)(*ext) + off; | 65 | return (void *)(*ext) + off; |
76 | } | 66 | } |
@@ -95,7 +85,7 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) | |||
95 | newlen = newoff + t->len; | 85 | newlen = newoff + t->len; |
96 | rcu_read_unlock(); | 86 | rcu_read_unlock(); |
97 | 87 | ||
98 | if (newlen >= ct->ext->real_len) { | 88 | if (newlen >= ksize(ct->ext)) { |
99 | new = kmalloc(newlen, gfp); | 89 | new = kmalloc(newlen, gfp); |
100 | if (!new) | 90 | if (!new) |
101 | return NULL; | 91 | return NULL; |
@@ -114,7 +104,6 @@ void *__nf_ct_ext_add(struct nf_conn *ct, enum nf_ct_ext_id id, gfp_t gfp) | |||
114 | rcu_read_unlock(); | 104 | rcu_read_unlock(); |
115 | } | 105 | } |
116 | kfree(ct->ext); | 106 | kfree(ct->ext); |
117 | new->real_len = newlen; | ||
118 | ct->ext = new; | 107 | ct->ext = new; |
119 | } | 108 | } |
120 | 109 | ||
@@ -156,8 +145,6 @@ static void update_alloc_size(struct nf_ct_ext_type *type) | |||
156 | t1->alloc_size = ALIGN(t1->alloc_size, t2->align) | 145 | t1->alloc_size = ALIGN(t1->alloc_size, t2->align) |
157 | + t2->len; | 146 | + t2->len; |
158 | } | 147 | } |
159 | if (t1->alloc_size < NF_CT_EXT_MIN_SIZE) | ||
160 | t1->alloc_size = NF_CT_EXT_MIN_SIZE; | ||
161 | } | 148 | } |
162 | } | 149 | } |
163 | 150 | ||
diff --git a/net/netfilter/nf_queue.c b/net/netfilter/nf_queue.c index bfc2928c1912..ddc80ea114cd 100644 --- a/net/netfilter/nf_queue.c +++ b/net/netfilter/nf_queue.c | |||
@@ -51,7 +51,7 @@ int nf_unregister_queue_handler(int pf, const struct nf_queue_handler *qh) | |||
51 | return -EINVAL; | 51 | return -EINVAL; |
52 | 52 | ||
53 | mutex_lock(&queue_handler_mutex); | 53 | mutex_lock(&queue_handler_mutex); |
54 | if (queue_handler[pf] != qh) { | 54 | if (queue_handler[pf] && queue_handler[pf] != qh) { |
55 | mutex_unlock(&queue_handler_mutex); | 55 | mutex_unlock(&queue_handler_mutex); |
56 | return -EINVAL; | 56 | return -EINVAL; |
57 | } | 57 | } |
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c index 7efa40d47393..bf3f19b21fe4 100644 --- a/net/netfilter/nfnetlink_log.c +++ b/net/netfilter/nfnetlink_log.c | |||
@@ -556,7 +556,7 @@ nfulnl_log_packet(unsigned int pf, | |||
556 | /* FIXME: do we want to make the size calculation conditional based on | 556 | /* FIXME: do we want to make the size calculation conditional based on |
557 | * what is actually present? way more branches and checks, but more | 557 | * what is actually present? way more branches and checks, but more |
558 | * memory efficient... */ | 558 | * memory efficient... */ |
559 | size = NLMSG_ALIGN(sizeof(struct nfgenmsg)) | 559 | size = NLMSG_SPACE(sizeof(struct nfgenmsg)) |
560 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hdr)) | 560 | + nla_total_size(sizeof(struct nfulnl_msg_packet_hdr)) |
561 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ | 561 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ |
562 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ | 562 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ |
@@ -702,20 +702,30 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | |||
702 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); | 702 | struct nfgenmsg *nfmsg = NLMSG_DATA(nlh); |
703 | u_int16_t group_num = ntohs(nfmsg->res_id); | 703 | u_int16_t group_num = ntohs(nfmsg->res_id); |
704 | struct nfulnl_instance *inst; | 704 | struct nfulnl_instance *inst; |
705 | struct nfulnl_msg_config_cmd *cmd = NULL; | ||
705 | int ret = 0; | 706 | int ret = 0; |
706 | 707 | ||
708 | if (nfula[NFULA_CFG_CMD]) { | ||
709 | u_int8_t pf = nfmsg->nfgen_family; | ||
710 | cmd = nla_data(nfula[NFULA_CFG_CMD]); | ||
711 | |||
712 | /* Commands without queue context */ | ||
713 | switch (cmd->command) { | ||
714 | case NFULNL_CFG_CMD_PF_BIND: | ||
715 | return nf_log_register(pf, &nfulnl_logger); | ||
716 | case NFULNL_CFG_CMD_PF_UNBIND: | ||
717 | nf_log_unregister_pf(pf); | ||
718 | return 0; | ||
719 | } | ||
720 | } | ||
721 | |||
707 | inst = instance_lookup_get(group_num); | 722 | inst = instance_lookup_get(group_num); |
708 | if (inst && inst->peer_pid != NETLINK_CB(skb).pid) { | 723 | if (inst && inst->peer_pid != NETLINK_CB(skb).pid) { |
709 | ret = -EPERM; | 724 | ret = -EPERM; |
710 | goto out_put; | 725 | goto out_put; |
711 | } | 726 | } |
712 | 727 | ||
713 | if (nfula[NFULA_CFG_CMD]) { | 728 | if (cmd != NULL) { |
714 | u_int8_t pf = nfmsg->nfgen_family; | ||
715 | struct nfulnl_msg_config_cmd *cmd; | ||
716 | |||
717 | cmd = nla_data(nfula[NFULA_CFG_CMD]); | ||
718 | |||
719 | switch (cmd->command) { | 729 | switch (cmd->command) { |
720 | case NFULNL_CFG_CMD_BIND: | 730 | case NFULNL_CFG_CMD_BIND: |
721 | if (inst) { | 731 | if (inst) { |
@@ -738,14 +748,6 @@ nfulnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | |||
738 | 748 | ||
739 | instance_destroy(inst); | 749 | instance_destroy(inst); |
740 | goto out; | 750 | goto out; |
741 | case NFULNL_CFG_CMD_PF_BIND: | ||
742 | ret = nf_log_register(pf, &nfulnl_logger); | ||
743 | break; | ||
744 | case NFULNL_CFG_CMD_PF_UNBIND: | ||
745 | /* This is a bug and a feature. We cannot unregister | ||
746 | * other handlers, like nfnetlink_inst can */ | ||
747 | nf_log_unregister_pf(pf); | ||
748 | break; | ||
749 | default: | 751 | default: |
750 | ret = -ENOTSUPP; | 752 | ret = -ENOTSUPP; |
751 | break; | 753 | break; |
diff --git a/net/netfilter/nfnetlink_queue.c b/net/netfilter/nfnetlink_queue.c index 0043d3a9f87e..012cb6910820 100644 --- a/net/netfilter/nfnetlink_queue.c +++ b/net/netfilter/nfnetlink_queue.c | |||
@@ -224,7 +224,7 @@ nfqnl_build_packet_message(struct nfqnl_instance *queue, | |||
224 | struct net_device *indev; | 224 | struct net_device *indev; |
225 | struct net_device *outdev; | 225 | struct net_device *outdev; |
226 | 226 | ||
227 | size = NLMSG_ALIGN(sizeof(struct nfgenmsg)) | 227 | size = NLMSG_SPACE(sizeof(struct nfgenmsg)) |
228 | + nla_total_size(sizeof(struct nfqnl_msg_packet_hdr)) | 228 | + nla_total_size(sizeof(struct nfqnl_msg_packet_hdr)) |
229 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ | 229 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ |
230 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ | 230 | + nla_total_size(sizeof(u_int32_t)) /* ifindex */ |
@@ -703,19 +703,12 @@ nfqnl_recv_config(struct sock *ctnl, struct sk_buff *skb, | |||
703 | /* Commands without queue context - might sleep */ | 703 | /* Commands without queue context - might sleep */ |
704 | switch (cmd->command) { | 704 | switch (cmd->command) { |
705 | case NFQNL_CFG_CMD_PF_BIND: | 705 | case NFQNL_CFG_CMD_PF_BIND: |
706 | ret = nf_register_queue_handler(ntohs(cmd->pf), | 706 | return nf_register_queue_handler(ntohs(cmd->pf), |
707 | &nfqh); | 707 | &nfqh); |
708 | break; | ||
709 | case NFQNL_CFG_CMD_PF_UNBIND: | 708 | case NFQNL_CFG_CMD_PF_UNBIND: |
710 | ret = nf_unregister_queue_handler(ntohs(cmd->pf), | 709 | return nf_unregister_queue_handler(ntohs(cmd->pf), |
711 | &nfqh); | 710 | &nfqh); |
712 | break; | ||
713 | default: | ||
714 | break; | ||
715 | } | 711 | } |
716 | |||
717 | if (ret < 0) | ||
718 | return ret; | ||
719 | } | 712 | } |
720 | 713 | ||
721 | rcu_read_lock(); | 714 | rcu_read_lock(); |
diff --git a/net/netfilter/xt_time.c b/net/netfilter/xt_time.c index e9a8794bc3ab..9fa2e0824708 100644 --- a/net/netfilter/xt_time.c +++ b/net/netfilter/xt_time.c | |||
@@ -95,8 +95,11 @@ static inline void localtime_2(struct xtm *r, time_t time) | |||
95 | */ | 95 | */ |
96 | r->dse = time / 86400; | 96 | r->dse = time / 86400; |
97 | 97 | ||
98 | /* 1970-01-01 (w=0) was a Thursday (4). */ | 98 | /* |
99 | r->weekday = (4 + r->dse) % 7; | 99 | * 1970-01-01 (w=0) was a Thursday (4). |
100 | * -1 and +1 map Sunday properly onto 7. | ||
101 | */ | ||
102 | r->weekday = (4 + r->dse - 1) % 7 + 1; | ||
100 | } | 103 | } |
101 | 104 | ||
102 | static void localtime_3(struct xtm *r, time_t time) | 105 | static void localtime_3(struct xtm *r, time_t time) |
diff --git a/net/rxrpc/ar-recvmsg.c b/net/rxrpc/ar-recvmsg.c index f19121d4795b..a39bf97f8830 100644 --- a/net/rxrpc/ar-recvmsg.c +++ b/net/rxrpc/ar-recvmsg.c | |||
@@ -143,7 +143,8 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
143 | /* copy the peer address and timestamp */ | 143 | /* copy the peer address and timestamp */ |
144 | if (!continue_call) { | 144 | if (!continue_call) { |
145 | if (msg->msg_name && msg->msg_namelen > 0) | 145 | if (msg->msg_name && msg->msg_namelen > 0) |
146 | memcpy(&msg->msg_name, &call->conn->trans->peer->srx, | 146 | memcpy(msg->msg_name, |
147 | &call->conn->trans->peer->srx, | ||
147 | sizeof(call->conn->trans->peer->srx)); | 148 | sizeof(call->conn->trans->peer->srx)); |
148 | sock_recv_timestamp(msg, &rx->sk, skb); | 149 | sock_recv_timestamp(msg, &rx->sk, skb); |
149 | } | 150 | } |
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index a27511ebc4cb..ceefda025e2d 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c | |||
@@ -209,6 +209,7 @@ int sctp_add_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *new, | |||
209 | int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) | 209 | int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) |
210 | { | 210 | { |
211 | struct sctp_sockaddr_entry *addr, *temp; | 211 | struct sctp_sockaddr_entry *addr, *temp; |
212 | int found = 0; | ||
212 | 213 | ||
213 | /* We hold the socket lock when calling this function, | 214 | /* We hold the socket lock when calling this function, |
214 | * and that acts as a writer synchronizing lock. | 215 | * and that acts as a writer synchronizing lock. |
@@ -216,13 +217,14 @@ int sctp_del_bind_addr(struct sctp_bind_addr *bp, union sctp_addr *del_addr) | |||
216 | list_for_each_entry_safe(addr, temp, &bp->address_list, list) { | 217 | list_for_each_entry_safe(addr, temp, &bp->address_list, list) { |
217 | if (sctp_cmp_addr_exact(&addr->a, del_addr)) { | 218 | if (sctp_cmp_addr_exact(&addr->a, del_addr)) { |
218 | /* Found the exact match. */ | 219 | /* Found the exact match. */ |
220 | found = 1; | ||
219 | addr->valid = 0; | 221 | addr->valid = 0; |
220 | list_del_rcu(&addr->list); | 222 | list_del_rcu(&addr->list); |
221 | break; | 223 | break; |
222 | } | 224 | } |
223 | } | 225 | } |
224 | 226 | ||
225 | if (addr && !addr->valid) { | 227 | if (found) { |
226 | call_rcu(&addr->rcu, sctp_local_addr_free); | 228 | call_rcu(&addr->rcu, sctp_local_addr_free); |
227 | SCTP_DBG_OBJCNT_DEC(addr); | 229 | SCTP_DBG_OBJCNT_DEC(addr); |
228 | return 0; | 230 | return 0; |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 87f940587d5f..9aa0733aee87 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -89,6 +89,7 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev, | |||
89 | struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; | 89 | struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)ptr; |
90 | struct sctp_sockaddr_entry *addr = NULL; | 90 | struct sctp_sockaddr_entry *addr = NULL; |
91 | struct sctp_sockaddr_entry *temp; | 91 | struct sctp_sockaddr_entry *temp; |
92 | int found = 0; | ||
92 | 93 | ||
93 | switch (ev) { | 94 | switch (ev) { |
94 | case NETDEV_UP: | 95 | case NETDEV_UP: |
@@ -111,13 +112,14 @@ static int sctp_inet6addr_event(struct notifier_block *this, unsigned long ev, | |||
111 | &sctp_local_addr_list, list) { | 112 | &sctp_local_addr_list, list) { |
112 | if (ipv6_addr_equal(&addr->a.v6.sin6_addr, | 113 | if (ipv6_addr_equal(&addr->a.v6.sin6_addr, |
113 | &ifa->addr)) { | 114 | &ifa->addr)) { |
115 | found = 1; | ||
114 | addr->valid = 0; | 116 | addr->valid = 0; |
115 | list_del_rcu(&addr->list); | 117 | list_del_rcu(&addr->list); |
116 | break; | 118 | break; |
117 | } | 119 | } |
118 | } | 120 | } |
119 | spin_unlock_bh(&sctp_local_addr_lock); | 121 | spin_unlock_bh(&sctp_local_addr_lock); |
120 | if (addr && !addr->valid) | 122 | if (found) |
121 | call_rcu(&addr->rcu, sctp_local_addr_free); | 123 | call_rcu(&addr->rcu, sctp_local_addr_free); |
122 | break; | 124 | break; |
123 | } | 125 | } |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index 688546dccd82..ad0a4069b95b 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -628,6 +628,7 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
628 | struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; | 628 | struct in_ifaddr *ifa = (struct in_ifaddr *)ptr; |
629 | struct sctp_sockaddr_entry *addr = NULL; | 629 | struct sctp_sockaddr_entry *addr = NULL; |
630 | struct sctp_sockaddr_entry *temp; | 630 | struct sctp_sockaddr_entry *temp; |
631 | int found = 0; | ||
631 | 632 | ||
632 | switch (ev) { | 633 | switch (ev) { |
633 | case NETDEV_UP: | 634 | case NETDEV_UP: |
@@ -647,13 +648,14 @@ static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev, | |||
647 | list_for_each_entry_safe(addr, temp, | 648 | list_for_each_entry_safe(addr, temp, |
648 | &sctp_local_addr_list, list) { | 649 | &sctp_local_addr_list, list) { |
649 | if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) { | 650 | if (addr->a.v4.sin_addr.s_addr == ifa->ifa_local) { |
651 | found = 1; | ||
650 | addr->valid = 0; | 652 | addr->valid = 0; |
651 | list_del_rcu(&addr->list); | 653 | list_del_rcu(&addr->list); |
652 | break; | 654 | break; |
653 | } | 655 | } |
654 | } | 656 | } |
655 | spin_unlock_bh(&sctp_local_addr_lock); | 657 | spin_unlock_bh(&sctp_local_addr_lock); |
656 | if (addr && !addr->valid) | 658 | if (found) |
657 | call_rcu(&addr->rcu, sctp_local_addr_free); | 659 | call_rcu(&addr->rcu, sctp_local_addr_free); |
658 | break; | 660 | break; |
659 | } | 661 | } |
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c index e45be4e3f80d..578630e8e00d 100644 --- a/net/sctp/sm_make_chunk.c +++ b/net/sctp/sm_make_chunk.c | |||
@@ -2375,6 +2375,14 @@ static int sctp_process_param(struct sctp_association *asoc, | |||
2375 | asoc->peer.ipv4_address = 0; | 2375 | asoc->peer.ipv4_address = 0; |
2376 | asoc->peer.ipv6_address = 0; | 2376 | asoc->peer.ipv6_address = 0; |
2377 | 2377 | ||
2378 | /* Assume that peer supports the address family | ||
2379 | * by which it sends a packet. | ||
2380 | */ | ||
2381 | if (peer_addr->sa.sa_family == AF_INET6) | ||
2382 | asoc->peer.ipv6_address = 1; | ||
2383 | else if (peer_addr->sa.sa_family == AF_INET) | ||
2384 | asoc->peer.ipv4_address = 1; | ||
2385 | |||
2378 | /* Cycle through address types; avoid divide by 0. */ | 2386 | /* Cycle through address types; avoid divide by 0. */ |
2379 | sat = ntohs(param.p->length) - sizeof(sctp_paramhdr_t); | 2387 | sat = ntohs(param.p->length) - sizeof(sctp_paramhdr_t); |
2380 | if (sat) | 2388 | if (sat) |
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 939892691a26..d994d822900d 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -2933,17 +2933,39 @@ static int sctp_setsockopt_maxburst(struct sock *sk, | |||
2933 | char __user *optval, | 2933 | char __user *optval, |
2934 | int optlen) | 2934 | int optlen) |
2935 | { | 2935 | { |
2936 | struct sctp_assoc_value params; | ||
2937 | struct sctp_sock *sp; | ||
2938 | struct sctp_association *asoc; | ||
2936 | int val; | 2939 | int val; |
2940 | int assoc_id = 0; | ||
2937 | 2941 | ||
2938 | if (optlen != sizeof(int)) | 2942 | if (optlen < sizeof(int)) |
2939 | return -EINVAL; | 2943 | return -EINVAL; |
2940 | if (get_user(val, (int __user *)optval)) | ||
2941 | return -EFAULT; | ||
2942 | 2944 | ||
2943 | if (val < 0) | 2945 | if (optlen == sizeof(int)) { |
2946 | printk(KERN_WARNING | ||
2947 | "SCTP: Use of int in max_burst socket option deprecated\n"); | ||
2948 | printk(KERN_WARNING | ||
2949 | "SCTP: Use struct sctp_assoc_value instead\n"); | ||
2950 | if (copy_from_user(&val, optval, optlen)) | ||
2951 | return -EFAULT; | ||
2952 | } else if (optlen == sizeof(struct sctp_assoc_value)) { | ||
2953 | if (copy_from_user(¶ms, optval, optlen)) | ||
2954 | return -EFAULT; | ||
2955 | val = params.assoc_value; | ||
2956 | assoc_id = params.assoc_id; | ||
2957 | } else | ||
2944 | return -EINVAL; | 2958 | return -EINVAL; |
2945 | 2959 | ||
2946 | sctp_sk(sk)->max_burst = val; | 2960 | sp = sctp_sk(sk); |
2961 | |||
2962 | if (assoc_id != 0) { | ||
2963 | asoc = sctp_id2assoc(sk, assoc_id); | ||
2964 | if (!asoc) | ||
2965 | return -EINVAL; | ||
2966 | asoc->max_burst = val; | ||
2967 | } else | ||
2968 | sp->max_burst = val; | ||
2947 | 2969 | ||
2948 | return 0; | 2970 | return 0; |
2949 | } | 2971 | } |
@@ -5005,20 +5027,45 @@ static int sctp_getsockopt_maxburst(struct sock *sk, int len, | |||
5005 | char __user *optval, | 5027 | char __user *optval, |
5006 | int __user *optlen) | 5028 | int __user *optlen) |
5007 | { | 5029 | { |
5008 | int val; | 5030 | struct sctp_assoc_value params; |
5031 | struct sctp_sock *sp; | ||
5032 | struct sctp_association *asoc; | ||
5009 | 5033 | ||
5010 | if (len < sizeof(int)) | 5034 | if (len < sizeof(int)) |
5011 | return -EINVAL; | 5035 | return -EINVAL; |
5012 | 5036 | ||
5013 | len = sizeof(int); | 5037 | if (len == sizeof(int)) { |
5038 | printk(KERN_WARNING | ||
5039 | "SCTP: Use of int in max_burst socket option deprecated\n"); | ||
5040 | printk(KERN_WARNING | ||
5041 | "SCTP: Use struct sctp_assoc_value instead\n"); | ||
5042 | params.assoc_id = 0; | ||
5043 | } else if (len == sizeof (struct sctp_assoc_value)) { | ||
5044 | if (copy_from_user(¶ms, optval, len)) | ||
5045 | return -EFAULT; | ||
5046 | } else | ||
5047 | return -EINVAL; | ||
5014 | 5048 | ||
5015 | val = sctp_sk(sk)->max_burst; | 5049 | sp = sctp_sk(sk); |
5016 | if (put_user(len, optlen)) | 5050 | |
5017 | return -EFAULT; | 5051 | if (params.assoc_id != 0) { |
5018 | if (copy_to_user(optval, &val, len)) | 5052 | asoc = sctp_id2assoc(sk, params.assoc_id); |
5019 | return -EFAULT; | 5053 | if (!asoc) |
5054 | return -EINVAL; | ||
5055 | params.assoc_value = asoc->max_burst; | ||
5056 | } else | ||
5057 | params.assoc_value = sp->max_burst; | ||
5058 | |||
5059 | if (len == sizeof(int)) { | ||
5060 | if (copy_to_user(optval, ¶ms.assoc_value, len)) | ||
5061 | return -EFAULT; | ||
5062 | } else { | ||
5063 | if (copy_to_user(optval, ¶ms, len)) | ||
5064 | return -EFAULT; | ||
5065 | } | ||
5066 | |||
5067 | return 0; | ||
5020 | 5068 | ||
5021 | return -ENOTSUPP; | ||
5022 | } | 5069 | } |
5023 | 5070 | ||
5024 | static int sctp_getsockopt_hmac_ident(struct sock *sk, int len, | 5071 | static int sctp_getsockopt_hmac_ident(struct sock *sk, int len, |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c index 0598b229c11d..981f190c1b39 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c +++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c | |||
@@ -156,7 +156,7 @@ static int send_write(struct svcxprt_rdma *xprt, struct svc_rqst *rqstp, | |||
156 | struct svc_rdma_op_ctxt *ctxt; | 156 | struct svc_rdma_op_ctxt *ctxt; |
157 | int ret = 0; | 157 | int ret = 0; |
158 | 158 | ||
159 | BUG_ON(sge_count >= 32); | 159 | BUG_ON(sge_count > RPCSVC_MAXPAGES); |
160 | dprintk("svcrdma: RDMA_WRITE rmr=%x, to=%llx, xdr_off=%d, " | 160 | dprintk("svcrdma: RDMA_WRITE rmr=%x, to=%llx, xdr_off=%d, " |
161 | "write_len=%d, xdr_sge=%p, sge_count=%d\n", | 161 | "write_len=%d, xdr_sge=%p, sge_count=%d\n", |
162 | rmr, (unsigned long long)to, xdr_off, | 162 | rmr, (unsigned long long)to, xdr_off, |
diff --git a/net/sunrpc/xprtrdma/svc_rdma_transport.c b/net/sunrpc/xprtrdma/svc_rdma_transport.c index f09444c451bc..16fd3f6718ff 100644 --- a/net/sunrpc/xprtrdma/svc_rdma_transport.c +++ b/net/sunrpc/xprtrdma/svc_rdma_transport.c | |||
@@ -54,7 +54,6 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, | |||
54 | int flags); | 54 | int flags); |
55 | static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt); | 55 | static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt); |
56 | static void svc_rdma_release_rqst(struct svc_rqst *); | 56 | static void svc_rdma_release_rqst(struct svc_rqst *); |
57 | static void rdma_destroy_xprt(struct svcxprt_rdma *xprt); | ||
58 | static void dto_tasklet_func(unsigned long data); | 57 | static void dto_tasklet_func(unsigned long data); |
59 | static void svc_rdma_detach(struct svc_xprt *xprt); | 58 | static void svc_rdma_detach(struct svc_xprt *xprt); |
60 | static void svc_rdma_free(struct svc_xprt *xprt); | 59 | static void svc_rdma_free(struct svc_xprt *xprt); |
@@ -247,6 +246,7 @@ static void dto_tasklet_func(unsigned long data) | |||
247 | sq_cq_reap(xprt); | 246 | sq_cq_reap(xprt); |
248 | } | 247 | } |
249 | 248 | ||
249 | svc_xprt_put(&xprt->sc_xprt); | ||
250 | spin_lock_irqsave(&dto_lock, flags); | 250 | spin_lock_irqsave(&dto_lock, flags); |
251 | } | 251 | } |
252 | spin_unlock_irqrestore(&dto_lock, flags); | 252 | spin_unlock_irqrestore(&dto_lock, flags); |
@@ -275,8 +275,10 @@ static void rq_comp_handler(struct ib_cq *cq, void *cq_context) | |||
275 | * add it | 275 | * add it |
276 | */ | 276 | */ |
277 | spin_lock_irqsave(&dto_lock, flags); | 277 | spin_lock_irqsave(&dto_lock, flags); |
278 | if (list_empty(&xprt->sc_dto_q)) | 278 | if (list_empty(&xprt->sc_dto_q)) { |
279 | svc_xprt_get(&xprt->sc_xprt); | ||
279 | list_add_tail(&xprt->sc_dto_q, &dto_xprt_q); | 280 | list_add_tail(&xprt->sc_dto_q, &dto_xprt_q); |
281 | } | ||
280 | spin_unlock_irqrestore(&dto_lock, flags); | 282 | spin_unlock_irqrestore(&dto_lock, flags); |
281 | 283 | ||
282 | /* Tasklet does all the work to avoid irqsave locks. */ | 284 | /* Tasklet does all the work to avoid irqsave locks. */ |
@@ -386,8 +388,10 @@ static void sq_comp_handler(struct ib_cq *cq, void *cq_context) | |||
386 | * add it | 388 | * add it |
387 | */ | 389 | */ |
388 | spin_lock_irqsave(&dto_lock, flags); | 390 | spin_lock_irqsave(&dto_lock, flags); |
389 | if (list_empty(&xprt->sc_dto_q)) | 391 | if (list_empty(&xprt->sc_dto_q)) { |
392 | svc_xprt_get(&xprt->sc_xprt); | ||
390 | list_add_tail(&xprt->sc_dto_q, &dto_xprt_q); | 393 | list_add_tail(&xprt->sc_dto_q, &dto_xprt_q); |
394 | } | ||
391 | spin_unlock_irqrestore(&dto_lock, flags); | 395 | spin_unlock_irqrestore(&dto_lock, flags); |
392 | 396 | ||
393 | /* Tasklet does all the work to avoid irqsave locks. */ | 397 | /* Tasklet does all the work to avoid irqsave locks. */ |
@@ -611,6 +615,7 @@ static int rdma_cma_handler(struct rdma_cm_id *cma_id, | |||
611 | switch (event->event) { | 615 | switch (event->event) { |
612 | case RDMA_CM_EVENT_ESTABLISHED: | 616 | case RDMA_CM_EVENT_ESTABLISHED: |
613 | /* Accept complete */ | 617 | /* Accept complete */ |
618 | svc_xprt_get(xprt); | ||
614 | dprintk("svcrdma: Connection completed on DTO xprt=%p, " | 619 | dprintk("svcrdma: Connection completed on DTO xprt=%p, " |
615 | "cm_id=%p\n", xprt, cma_id); | 620 | "cm_id=%p\n", xprt, cma_id); |
616 | clear_bit(RDMAXPRT_CONN_PENDING, &rdma->sc_flags); | 621 | clear_bit(RDMAXPRT_CONN_PENDING, &rdma->sc_flags); |
@@ -661,15 +666,15 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, | |||
661 | 666 | ||
662 | listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP); | 667 | listen_id = rdma_create_id(rdma_listen_handler, cma_xprt, RDMA_PS_TCP); |
663 | if (IS_ERR(listen_id)) { | 668 | if (IS_ERR(listen_id)) { |
664 | rdma_destroy_xprt(cma_xprt); | 669 | svc_xprt_put(&cma_xprt->sc_xprt); |
665 | dprintk("svcrdma: rdma_create_id failed = %ld\n", | 670 | dprintk("svcrdma: rdma_create_id failed = %ld\n", |
666 | PTR_ERR(listen_id)); | 671 | PTR_ERR(listen_id)); |
667 | return (void *)listen_id; | 672 | return (void *)listen_id; |
668 | } | 673 | } |
669 | ret = rdma_bind_addr(listen_id, sa); | 674 | ret = rdma_bind_addr(listen_id, sa); |
670 | if (ret) { | 675 | if (ret) { |
671 | rdma_destroy_xprt(cma_xprt); | ||
672 | rdma_destroy_id(listen_id); | 676 | rdma_destroy_id(listen_id); |
677 | svc_xprt_put(&cma_xprt->sc_xprt); | ||
673 | dprintk("svcrdma: rdma_bind_addr failed = %d\n", ret); | 678 | dprintk("svcrdma: rdma_bind_addr failed = %d\n", ret); |
674 | return ERR_PTR(ret); | 679 | return ERR_PTR(ret); |
675 | } | 680 | } |
@@ -678,8 +683,9 @@ static struct svc_xprt *svc_rdma_create(struct svc_serv *serv, | |||
678 | ret = rdma_listen(listen_id, RPCRDMA_LISTEN_BACKLOG); | 683 | ret = rdma_listen(listen_id, RPCRDMA_LISTEN_BACKLOG); |
679 | if (ret) { | 684 | if (ret) { |
680 | rdma_destroy_id(listen_id); | 685 | rdma_destroy_id(listen_id); |
681 | rdma_destroy_xprt(cma_xprt); | 686 | svc_xprt_put(&cma_xprt->sc_xprt); |
682 | dprintk("svcrdma: rdma_listen failed = %d\n", ret); | 687 | dprintk("svcrdma: rdma_listen failed = %d\n", ret); |
688 | return ERR_PTR(ret); | ||
683 | } | 689 | } |
684 | 690 | ||
685 | /* | 691 | /* |
@@ -820,6 +826,7 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
820 | newxprt->sc_sq_depth = qp_attr.cap.max_send_wr; | 826 | newxprt->sc_sq_depth = qp_attr.cap.max_send_wr; |
821 | newxprt->sc_max_requests = qp_attr.cap.max_recv_wr; | 827 | newxprt->sc_max_requests = qp_attr.cap.max_recv_wr; |
822 | } | 828 | } |
829 | svc_xprt_get(&newxprt->sc_xprt); | ||
823 | newxprt->sc_qp = newxprt->sc_cm_id->qp; | 830 | newxprt->sc_qp = newxprt->sc_cm_id->qp; |
824 | 831 | ||
825 | /* Register all of physical memory */ | 832 | /* Register all of physical memory */ |
@@ -891,8 +898,15 @@ static struct svc_xprt *svc_rdma_accept(struct svc_xprt *xprt) | |||
891 | 898 | ||
892 | errout: | 899 | errout: |
893 | dprintk("svcrdma: failure accepting new connection rc=%d.\n", ret); | 900 | dprintk("svcrdma: failure accepting new connection rc=%d.\n", ret); |
901 | /* Take a reference in case the DTO handler runs */ | ||
902 | svc_xprt_get(&newxprt->sc_xprt); | ||
903 | if (newxprt->sc_qp && !IS_ERR(newxprt->sc_qp)) { | ||
904 | ib_destroy_qp(newxprt->sc_qp); | ||
905 | svc_xprt_put(&newxprt->sc_xprt); | ||
906 | } | ||
894 | rdma_destroy_id(newxprt->sc_cm_id); | 907 | rdma_destroy_id(newxprt->sc_cm_id); |
895 | rdma_destroy_xprt(newxprt); | 908 | /* This call to put will destroy the transport */ |
909 | svc_xprt_put(&newxprt->sc_xprt); | ||
896 | return NULL; | 910 | return NULL; |
897 | } | 911 | } |
898 | 912 | ||
@@ -919,54 +933,60 @@ static void svc_rdma_release_rqst(struct svc_rqst *rqstp) | |||
919 | rqstp->rq_xprt_ctxt = NULL; | 933 | rqstp->rq_xprt_ctxt = NULL; |
920 | } | 934 | } |
921 | 935 | ||
922 | /* Disable data ready events for this connection */ | 936 | /* |
937 | * When connected, an svc_xprt has at least three references: | ||
938 | * | ||
939 | * - A reference held by the QP. We still hold that here because this | ||
940 | * code deletes the QP and puts the reference. | ||
941 | * | ||
942 | * - A reference held by the cm_id between the ESTABLISHED and | ||
943 | * DISCONNECTED events. If the remote peer disconnected first, this | ||
944 | * reference could be gone. | ||
945 | * | ||
946 | * - A reference held by the svc_recv code that called this function | ||
947 | * as part of close processing. | ||
948 | * | ||
949 | * At a minimum two references should still be held. | ||
950 | */ | ||
923 | static void svc_rdma_detach(struct svc_xprt *xprt) | 951 | static void svc_rdma_detach(struct svc_xprt *xprt) |
924 | { | 952 | { |
925 | struct svcxprt_rdma *rdma = | 953 | struct svcxprt_rdma *rdma = |
926 | container_of(xprt, struct svcxprt_rdma, sc_xprt); | 954 | container_of(xprt, struct svcxprt_rdma, sc_xprt); |
927 | unsigned long flags; | ||
928 | |||
929 | dprintk("svc: svc_rdma_detach(%p)\n", xprt); | 955 | dprintk("svc: svc_rdma_detach(%p)\n", xprt); |
930 | /* | 956 | |
931 | * Shutdown the connection. This will ensure we don't get any | 957 | /* Disconnect and flush posted WQE */ |
932 | * more events from the provider. | ||
933 | */ | ||
934 | rdma_disconnect(rdma->sc_cm_id); | 958 | rdma_disconnect(rdma->sc_cm_id); |
935 | rdma_destroy_id(rdma->sc_cm_id); | ||
936 | 959 | ||
937 | /* We may already be on the DTO list */ | 960 | /* Destroy the QP if present (not a listener) */ |
938 | spin_lock_irqsave(&dto_lock, flags); | 961 | if (rdma->sc_qp && !IS_ERR(rdma->sc_qp)) { |
939 | if (!list_empty(&rdma->sc_dto_q)) | 962 | ib_destroy_qp(rdma->sc_qp); |
940 | list_del_init(&rdma->sc_dto_q); | 963 | svc_xprt_put(xprt); |
941 | spin_unlock_irqrestore(&dto_lock, flags); | 964 | } |
965 | |||
966 | /* Destroy the CM ID */ | ||
967 | rdma_destroy_id(rdma->sc_cm_id); | ||
942 | } | 968 | } |
943 | 969 | ||
944 | static void svc_rdma_free(struct svc_xprt *xprt) | 970 | static void svc_rdma_free(struct svc_xprt *xprt) |
945 | { | 971 | { |
946 | struct svcxprt_rdma *rdma = (struct svcxprt_rdma *)xprt; | 972 | struct svcxprt_rdma *rdma = (struct svcxprt_rdma *)xprt; |
947 | dprintk("svcrdma: svc_rdma_free(%p)\n", rdma); | 973 | dprintk("svcrdma: svc_rdma_free(%p)\n", rdma); |
948 | rdma_destroy_xprt(rdma); | 974 | /* We should only be called from kref_put */ |
949 | kfree(rdma); | 975 | BUG_ON(atomic_read(&xprt->xpt_ref.refcount) != 0); |
950 | } | 976 | if (rdma->sc_sq_cq && !IS_ERR(rdma->sc_sq_cq)) |
951 | 977 | ib_destroy_cq(rdma->sc_sq_cq); | |
952 | static void rdma_destroy_xprt(struct svcxprt_rdma *xprt) | ||
953 | { | ||
954 | if (xprt->sc_qp && !IS_ERR(xprt->sc_qp)) | ||
955 | ib_destroy_qp(xprt->sc_qp); | ||
956 | |||
957 | if (xprt->sc_sq_cq && !IS_ERR(xprt->sc_sq_cq)) | ||
958 | ib_destroy_cq(xprt->sc_sq_cq); | ||
959 | 978 | ||
960 | if (xprt->sc_rq_cq && !IS_ERR(xprt->sc_rq_cq)) | 979 | if (rdma->sc_rq_cq && !IS_ERR(rdma->sc_rq_cq)) |
961 | ib_destroy_cq(xprt->sc_rq_cq); | 980 | ib_destroy_cq(rdma->sc_rq_cq); |
962 | 981 | ||
963 | if (xprt->sc_phys_mr && !IS_ERR(xprt->sc_phys_mr)) | 982 | if (rdma->sc_phys_mr && !IS_ERR(rdma->sc_phys_mr)) |
964 | ib_dereg_mr(xprt->sc_phys_mr); | 983 | ib_dereg_mr(rdma->sc_phys_mr); |
965 | 984 | ||
966 | if (xprt->sc_pd && !IS_ERR(xprt->sc_pd)) | 985 | if (rdma->sc_pd && !IS_ERR(rdma->sc_pd)) |
967 | ib_dealloc_pd(xprt->sc_pd); | 986 | ib_dealloc_pd(rdma->sc_pd); |
968 | 987 | ||
969 | destroy_context_cache(xprt->sc_ctxt_head); | 988 | destroy_context_cache(rdma->sc_ctxt_head); |
989 | kfree(rdma); | ||
970 | } | 990 | } |
971 | 991 | ||
972 | static int svc_rdma_has_wspace(struct svc_xprt *xprt) | 992 | static int svc_rdma_has_wspace(struct svc_xprt *xprt) |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 74c2f9db2aac..263d04ab2d94 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
@@ -247,6 +247,10 @@ my ($function, %function_table,%parametertypes,$declaration_purpose); | |||
247 | my ($type,$declaration_name,$return_type); | 247 | my ($type,$declaration_name,$return_type); |
248 | my ($newsection,$newcontents,$prototype,$filelist, $brcount, %source_map); | 248 | my ($newsection,$newcontents,$prototype,$filelist, $brcount, %source_map); |
249 | 249 | ||
250 | if (defined($ENV{'KBUILD_VERBOSE'})) { | ||
251 | $verbose = "$ENV{'KBUILD_VERBOSE'}"; | ||
252 | } | ||
253 | |||
250 | # Generated docbook code is inserted in a template at a point where | 254 | # Generated docbook code is inserted in a template at a point where |
251 | # docbook v3.1 requires a non-zero sequence of RefEntry's; see: | 255 | # docbook v3.1 requires a non-zero sequence of RefEntry's; see: |
252 | # http://www.oasis-open.org/docbook/documentation/reference/html/refentry.html | 256 | # http://www.oasis-open.org/docbook/documentation/reference/html/refentry.html |
diff --git a/security/smack/smack.h b/security/smack/smack.h index a21a0e907ab3..62c1e982849d 100644 --- a/security/smack/smack.h +++ b/security/smack/smack.h | |||
@@ -26,14 +26,6 @@ | |||
26 | #define SMK_MAXLEN 23 | 26 | #define SMK_MAXLEN 23 |
27 | #define SMK_LABELLEN (SMK_MAXLEN+1) | 27 | #define SMK_LABELLEN (SMK_MAXLEN+1) |
28 | 28 | ||
29 | /* | ||
30 | * How many kinds of access are there? | ||
31 | * Here's your answer. | ||
32 | */ | ||
33 | #define SMK_ACCESSDASH '-' | ||
34 | #define SMK_ACCESSLOW "rwxa" | ||
35 | #define SMK_ACCESSKINDS (sizeof(SMK_ACCESSLOW) - 1) | ||
36 | |||
37 | struct superblock_smack { | 29 | struct superblock_smack { |
38 | char *smk_root; | 30 | char *smk_root; |
39 | char *smk_floor; | 31 | char *smk_floor; |
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c index 358c92c1a153..afe7c9b0732a 100644 --- a/security/smack/smackfs.c +++ b/security/smack/smackfs.c | |||
@@ -81,10 +81,23 @@ static struct semaphore smack_write_sem; | |||
81 | /* | 81 | /* |
82 | * Values for parsing cipso rules | 82 | * Values for parsing cipso rules |
83 | * SMK_DIGITLEN: Length of a digit field in a rule. | 83 | * SMK_DIGITLEN: Length of a digit field in a rule. |
84 | * SMK_CIPSOMEN: Minimum possible cipso rule length. | 84 | * SMK_CIPSOMIN: Minimum possible cipso rule length. |
85 | * SMK_CIPSOMAX: Maximum possible cipso rule length. | ||
85 | */ | 86 | */ |
86 | #define SMK_DIGITLEN 4 | 87 | #define SMK_DIGITLEN 4 |
87 | #define SMK_CIPSOMIN (SMK_MAXLEN + 2 * SMK_DIGITLEN) | 88 | #define SMK_CIPSOMIN (SMK_LABELLEN + 2 * SMK_DIGITLEN) |
89 | #define SMK_CIPSOMAX (SMK_CIPSOMIN + SMACK_CIPSO_MAXCATNUM * SMK_DIGITLEN) | ||
90 | |||
91 | /* | ||
92 | * Values for parsing MAC rules | ||
93 | * SMK_ACCESS: Maximum possible combination of access permissions | ||
94 | * SMK_ACCESSLEN: Maximum length for a rule access field | ||
95 | * SMK_LOADLEN: Smack rule length | ||
96 | */ | ||
97 | #define SMK_ACCESS "rwxa" | ||
98 | #define SMK_ACCESSLEN (sizeof(SMK_ACCESS) - 1) | ||
99 | #define SMK_LOADLEN (SMK_LABELLEN + SMK_LABELLEN + SMK_ACCESSLEN) | ||
100 | |||
88 | 101 | ||
89 | /* | 102 | /* |
90 | * Seq_file read operations for /smack/load | 103 | * Seq_file read operations for /smack/load |
@@ -229,14 +242,10 @@ static void smk_set_access(struct smack_rule *srp) | |||
229 | * The format is exactly: | 242 | * The format is exactly: |
230 | * char subject[SMK_LABELLEN] | 243 | * char subject[SMK_LABELLEN] |
231 | * char object[SMK_LABELLEN] | 244 | * char object[SMK_LABELLEN] |
232 | * char access[SMK_ACCESSKINDS] | 245 | * char access[SMK_ACCESSLEN] |
233 | * | ||
234 | * Anything following is commentary and ignored. | ||
235 | * | 246 | * |
236 | * writes must be SMK_LABELLEN+SMK_LABELLEN+4 bytes. | 247 | * writes must be SMK_LABELLEN+SMK_LABELLEN+SMK_ACCESSLEN bytes. |
237 | */ | 248 | */ |
238 | #define MINIMUM_LOAD (SMK_LABELLEN + SMK_LABELLEN + SMK_ACCESSKINDS) | ||
239 | |||
240 | static ssize_t smk_write_load(struct file *file, const char __user *buf, | 249 | static ssize_t smk_write_load(struct file *file, const char __user *buf, |
241 | size_t count, loff_t *ppos) | 250 | size_t count, loff_t *ppos) |
242 | { | 251 | { |
@@ -253,7 +262,7 @@ static ssize_t smk_write_load(struct file *file, const char __user *buf, | |||
253 | return -EPERM; | 262 | return -EPERM; |
254 | if (*ppos != 0) | 263 | if (*ppos != 0) |
255 | return -EINVAL; | 264 | return -EINVAL; |
256 | if (count < MINIMUM_LOAD) | 265 | if (count != SMK_LOADLEN) |
257 | return -EINVAL; | 266 | return -EINVAL; |
258 | 267 | ||
259 | data = kzalloc(count, GFP_KERNEL); | 268 | data = kzalloc(count, GFP_KERNEL); |
@@ -513,7 +522,7 @@ static ssize_t smk_write_cipso(struct file *file, const char __user *buf, | |||
513 | return -EPERM; | 522 | return -EPERM; |
514 | if (*ppos != 0) | 523 | if (*ppos != 0) |
515 | return -EINVAL; | 524 | return -EINVAL; |
516 | if (count <= SMK_CIPSOMIN) | 525 | if (count < SMK_CIPSOMIN || count > SMK_CIPSOMAX) |
517 | return -EINVAL; | 526 | return -EINVAL; |
518 | 527 | ||
519 | data = kzalloc(count + 1, GFP_KERNEL); | 528 | data = kzalloc(count + 1, GFP_KERNEL); |
@@ -547,7 +556,7 @@ static ssize_t smk_write_cipso(struct file *file, const char __user *buf, | |||
547 | if (ret != 1 || catlen > SMACK_CIPSO_MAXCATNUM) | 556 | if (ret != 1 || catlen > SMACK_CIPSO_MAXCATNUM) |
548 | goto out; | 557 | goto out; |
549 | 558 | ||
550 | if (count <= (SMK_CIPSOMIN + catlen * SMK_DIGITLEN)) | 559 | if (count != (SMK_CIPSOMIN + catlen * SMK_DIGITLEN)) |
551 | goto out; | 560 | goto out; |
552 | 561 | ||
553 | memset(mapcatset, 0, sizeof(mapcatset)); | 562 | memset(mapcatset, 0, sizeof(mapcatset)); |
diff --git a/sound/usb/usbaudio.c b/sound/usb/usbaudio.c index 675672f313be..f48838a078cb 100644 --- a/sound/usb/usbaudio.c +++ b/sound/usb/usbaudio.c | |||
@@ -1762,6 +1762,8 @@ static int check_hw_params_convention(struct snd_usb_substream *subs) | |||
1762 | 1762 | ||
1763 | channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL); | 1763 | channels = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL); |
1764 | rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL); | 1764 | rates = kcalloc(MAX_MASK, sizeof(u32), GFP_KERNEL); |
1765 | if (!channels || !rates) | ||
1766 | goto __out; | ||
1765 | 1767 | ||
1766 | list_for_each(p, &subs->fmt_list) { | 1768 | list_for_each(p, &subs->fmt_list) { |
1767 | struct audioformat *f; | 1769 | struct audioformat *f; |