diff options
278 files changed, 5428 insertions, 3521 deletions
diff --git a/Documentation/lguest/lguest.c b/Documentation/lguest/lguest.c index 42008395534d..9b0e322118b5 100644 --- a/Documentation/lguest/lguest.c +++ b/Documentation/lguest/lguest.c | |||
@@ -1040,6 +1040,11 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, | |||
1040 | / getpagesize(); | 1040 | / getpagesize(); |
1041 | p = get_pages(pages); | 1041 | p = get_pages(pages); |
1042 | 1042 | ||
1043 | /* Initialize the virtqueue */ | ||
1044 | vq->next = NULL; | ||
1045 | vq->last_avail_idx = 0; | ||
1046 | vq->dev = dev; | ||
1047 | |||
1043 | /* Initialize the configuration. */ | 1048 | /* Initialize the configuration. */ |
1044 | vq->config.num = num_descs; | 1049 | vq->config.num = num_descs; |
1045 | vq->config.irq = devices.next_irq++; | 1050 | vq->config.irq = devices.next_irq++; |
@@ -1057,9 +1062,6 @@ static void add_virtqueue(struct device *dev, unsigned int num_descs, | |||
1057 | for (i = &dev->vq; *i; i = &(*i)->next); | 1062 | for (i = &dev->vq; *i; i = &(*i)->next); |
1058 | *i = vq; | 1063 | *i = vq; |
1059 | 1064 | ||
1060 | /* Link virtqueue back to device. */ | ||
1061 | vq->dev = dev; | ||
1062 | |||
1063 | /* Set the routine to call when the Guest does something to this | 1065 | /* Set the routine to call when the Guest does something to this |
1064 | * virtqueue. */ | 1066 | * virtqueue. */ |
1065 | vq->handle_output = handle_output; | 1067 | vq->handle_output = handle_output; |
@@ -1093,6 +1095,7 @@ static struct device *new_device(const char *name, u16 type, int fd, | |||
1093 | dev->desc = new_dev_desc(type); | 1095 | dev->desc = new_dev_desc(type); |
1094 | dev->handle_input = handle_input; | 1096 | dev->handle_input = handle_input; |
1095 | dev->name = name; | 1097 | dev->name = name; |
1098 | dev->vq = NULL; | ||
1096 | return dev; | 1099 | return dev; |
1097 | } | 1100 | } |
1098 | 1101 | ||
diff --git a/Documentation/parport-lowlevel.txt b/Documentation/parport-lowlevel.txt index 265fcdcb8e5f..120eb20dbb09 100644 --- a/Documentation/parport-lowlevel.txt +++ b/Documentation/parport-lowlevel.txt | |||
@@ -339,6 +339,10 @@ Use this function to register your device driver on a parallel port | |||
339 | ('port'). Once you have done that, you will be able to use | 339 | ('port'). Once you have done that, you will be able to use |
340 | parport_claim and parport_release in order to use the port. | 340 | parport_claim and parport_release in order to use the port. |
341 | 341 | ||
342 | The ('name') argument is the name of the device that appears in /proc | ||
343 | filesystem. The string must be valid for the whole lifetime of the | ||
344 | device (until parport_unregister_device is called). | ||
345 | |||
342 | This function will register three callbacks into your driver: | 346 | This function will register three callbacks into your driver: |
343 | 'preempt', 'wakeup' and 'irq'. Each of these may be NULL in order to | 347 | 'preempt', 'wakeup' and 'irq'. Each of these may be NULL in order to |
344 | indicate that you do not want a callback. | 348 | indicate that you do not want a callback. |
diff --git a/Documentation/powerpc/booting-without-of.txt b/Documentation/powerpc/booting-without-of.txt index ac1be25c1e25..e9a3cb1d6b06 100644 --- a/Documentation/powerpc/booting-without-of.txt +++ b/Documentation/powerpc/booting-without-of.txt | |||
@@ -1645,8 +1645,9 @@ platforms are moved over to use the flattened-device-tree model. | |||
1645 | MAC addresses passed by the firmware when no information other | 1645 | MAC addresses passed by the firmware when no information other |
1646 | than indices is available to associate an address with a device. | 1646 | than indices is available to associate an address with a device. |
1647 | - phy-connection-type : a string naming the controller/PHY interface type, | 1647 | - phy-connection-type : a string naming the controller/PHY interface type, |
1648 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id", "tbi", | 1648 | i.e., "mii" (default), "rmii", "gmii", "rgmii", "rgmii-id" (Internal |
1649 | or "rtbi". | 1649 | Delay), "rgmii-txid" (delay on TX only), "rgmii-rxid" (delay on RX only), |
1650 | "tbi", or "rtbi". | ||
1650 | 1651 | ||
1651 | Example: | 1652 | Example: |
1652 | ucc@2000 { | 1653 | ucc@2000 { |
diff --git a/Documentation/thinkpad-acpi.txt b/Documentation/thinkpad-acpi.txt index ec499265deca..10c041ca13c7 100644 --- a/Documentation/thinkpad-acpi.txt +++ b/Documentation/thinkpad-acpi.txt | |||
@@ -1,7 +1,7 @@ | |||
1 | ThinkPad ACPI Extras Driver | 1 | ThinkPad ACPI Extras Driver |
2 | 2 | ||
3 | Version 0.16 | 3 | Version 0.17 |
4 | August 2nd, 2007 | 4 | October 04th, 2007 |
5 | 5 | ||
6 | Borislav Deianov <borislav@users.sf.net> | 6 | Borislav Deianov <borislav@users.sf.net> |
7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 7 | Henrique de Moraes Holschuh <hmh@hmh.eng.br> |
@@ -923,19 +923,34 @@ sysfs backlight device "thinkpad_screen" | |||
923 | This feature allows software control of the LCD brightness on ThinkPad | 923 | This feature allows software control of the LCD brightness on ThinkPad |
924 | models which don't have a hardware brightness slider. | 924 | models which don't have a hardware brightness slider. |
925 | 925 | ||
926 | It has some limitations: the LCD backlight cannot be actually turned on or off | 926 | It has some limitations: the LCD backlight cannot be actually turned on or |
927 | by this interface, and in many ThinkPad models, the "dim while on battery" | 927 | off by this interface, and in many ThinkPad models, the "dim while on |
928 | functionality will be enabled by the BIOS when this interface is used, and | 928 | battery" functionality will be enabled by the BIOS when this interface is |
929 | cannot be controlled. | 929 | used, and cannot be controlled. |
930 | 930 | ||
931 | The backlight control has eight levels, ranging from 0 to 7. Some of the | 931 | On IBM (and some of the earlier Lenovo) ThinkPads, the backlight control |
932 | levels may not be distinct. | 932 | has eight brightness levels, ranging from 0 to 7. Some of the levels |
933 | 933 | may not be distinct. Later Lenovo models that implement the ACPI | |
934 | There are two interfaces to the firmware for brightness control, EC and CMOS. | 934 | display backlight brightness control methods have 16 levels, ranging |
935 | To select which one should be used, use the brightness_mode module parameter: | 935 | from 0 to 15. |
936 | brightness_mode=1 selects EC mode, brightness_mode=2 selects CMOS mode, | 936 | |
937 | brightness_mode=3 selects both EC and CMOS. The driver tries to autodetect | 937 | There are two interfaces to the firmware for direct brightness control, |
938 | which interface to use. | 938 | EC and CMOS. To select which one should be used, use the |
939 | brightness_mode module parameter: brightness_mode=1 selects EC mode, | ||
940 | brightness_mode=2 selects CMOS mode, brightness_mode=3 selects both EC | ||
941 | and CMOS. The driver tries to autodetect which interface to use. | ||
942 | |||
943 | When display backlight brightness controls are available through the | ||
944 | standard ACPI interface, it is best to use it instead of this direct | ||
945 | ThinkPad-specific interface. The driver will disable its native | ||
946 | backlight brightness control interface if it detects that the standard | ||
947 | ACPI interface is available in the ThinkPad. | ||
948 | |||
949 | The brightness_enable module parameter can be used to control whether | ||
950 | the LCD brightness control feature will be enabled when available. | ||
951 | brightness_enable=0 forces it to be disabled. brightness_enable=1 | ||
952 | forces it to be enabled when available, even if the standard ACPI | ||
953 | interface is also available. | ||
939 | 954 | ||
940 | Procfs notes: | 955 | Procfs notes: |
941 | 956 | ||
@@ -947,11 +962,11 @@ Procfs notes: | |||
947 | 962 | ||
948 | Sysfs notes: | 963 | Sysfs notes: |
949 | 964 | ||
950 | The interface is implemented through the backlight sysfs class, which is poorly | 965 | The interface is implemented through the backlight sysfs class, which is |
951 | documented at this time. | 966 | poorly documented at this time. |
952 | 967 | ||
953 | Locate the thinkpad_screen device under /sys/class/backlight, and inside it | 968 | Locate the thinkpad_screen device under /sys/class/backlight, and inside |
954 | there will be the following attributes: | 969 | it there will be the following attributes: |
955 | 970 | ||
956 | max_brightness: | 971 | max_brightness: |
957 | Reads the maximum brightness the hardware can be set to. | 972 | Reads the maximum brightness the hardware can be set to. |
@@ -961,17 +976,19 @@ there will be the following attributes: | |||
961 | Reads what brightness the screen is set to at this instant. | 976 | Reads what brightness the screen is set to at this instant. |
962 | 977 | ||
963 | brightness: | 978 | brightness: |
964 | Writes request the driver to change brightness to the given | 979 | Writes request the driver to change brightness to the |
965 | value. Reads will tell you what brightness the driver is trying | 980 | given value. Reads will tell you what brightness the |
966 | to set the display to when "power" is set to zero and the display | 981 | driver is trying to set the display to when "power" is set |
967 | has not been dimmed by a kernel power management event. | 982 | to zero and the display has not been dimmed by a kernel |
983 | power management event. | ||
968 | 984 | ||
969 | power: | 985 | power: |
970 | power management mode, where 0 is "display on", and 1 to 3 will | 986 | power management mode, where 0 is "display on", and 1 to 3 |
971 | dim the display backlight to brightness level 0 because | 987 | will dim the display backlight to brightness level 0 |
972 | thinkpad-acpi cannot really turn the backlight off. Kernel | 988 | because thinkpad-acpi cannot really turn the backlight |
973 | power management events can temporarily increase the current | 989 | off. Kernel power management events can temporarily |
974 | power management level, i.e. they can dim the display. | 990 | increase the current power management level, i.e. they can |
991 | dim the display. | ||
975 | 992 | ||
976 | 993 | ||
977 | Volume control -- /proc/acpi/ibm/volume | 994 | Volume control -- /proc/acpi/ibm/volume |
diff --git a/MAINTAINERS b/MAINTAINERS index cad0882754a6..b21a911193e8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -1914,10 +1914,8 @@ L: linux1394-devel@lists.sourceforge.net | |||
1914 | S: Maintained | 1914 | S: Maintained |
1915 | 1915 | ||
1916 | IMS TWINTURBO FRAMEBUFFER DRIVER | 1916 | IMS TWINTURBO FRAMEBUFFER DRIVER |
1917 | P: Paul Mundt | ||
1918 | M: lethal@chaoticdreams.org | ||
1919 | L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only) | 1917 | L: linux-fbdev-devel@lists.sourceforge.net (subscribers-only) |
1920 | S: Maintained | 1918 | S: Orphan |
1921 | 1919 | ||
1922 | INFINIBAND SUBSYSTEM | 1920 | INFINIBAND SUBSYSTEM |
1923 | P: Roland Dreier | 1921 | P: Roland Dreier |
@@ -2446,7 +2444,7 @@ M68K ON APPLE MACINTOSH | |||
2446 | P: Joshua Thompson | 2444 | P: Joshua Thompson |
2447 | M: funaho@jurai.org | 2445 | M: funaho@jurai.org |
2448 | W: http://www.mac.linux-m68k.org/ | 2446 | W: http://www.mac.linux-m68k.org/ |
2449 | L: linux-mac68k@mac.linux-m68k.org | 2447 | L: linux-m68k@lists.linux-m68k.org |
2450 | S: Maintained | 2448 | S: Maintained |
2451 | 2449 | ||
2452 | M68K ON HP9000/300 | 2450 | M68K ON HP9000/300 |
@@ -3636,18 +3634,12 @@ M: laredo@gnu.org | |||
3636 | W: http://www.stradis.com/ | 3634 | W: http://www.stradis.com/ |
3637 | S: Maintained | 3635 | S: Maintained |
3638 | 3636 | ||
3639 | SUPERH (sh) | 3637 | SUPERH |
3640 | P: Paul Mundt | ||
3641 | M: lethal@linux-sh.org | ||
3642 | L: linuxsh-dev@lists.sourceforge.net (subscribers-only) | ||
3643 | W: http://www.linux-sh.org | ||
3644 | S: Maintained | ||
3645 | |||
3646 | SUPERH64 (sh64) | ||
3647 | P: Paul Mundt | 3638 | P: Paul Mundt |
3648 | M: lethal@linux-sh.org | 3639 | M: lethal@linux-sh.org |
3649 | L: linuxsh-shmedia-dev@lists.sourceforge.net | 3640 | L: linux-sh@vger.kernel.org |
3650 | W: http://www.linux-sh.org | 3641 | W: http://www.linux-sh.org |
3642 | T: git kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6.git | ||
3651 | S: Maintained | 3643 | S: Maintained |
3652 | 3644 | ||
3653 | SUN3/3X | 3645 | SUN3/3X |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index 9f9de3e95826..2a3a7ea5958c 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -3,7 +3,7 @@ | |||
3 | # see Documentation/kbuild/kconfig-language.txt. | 3 | # see Documentation/kbuild/kconfig-language.txt. |
4 | # | 4 | # |
5 | 5 | ||
6 | mainmenu "uClinux/Blackfin (w/o MMU) Kernel Configuration" | 6 | mainmenu "Blackfin Kernel Configuration" |
7 | 7 | ||
8 | config MMU | 8 | config MMU |
9 | bool | 9 | bool |
@@ -29,10 +29,6 @@ config ZONE_DMA | |||
29 | bool | 29 | bool |
30 | default y | 30 | default y |
31 | 31 | ||
32 | config BFIN | ||
33 | bool | ||
34 | default y | ||
35 | |||
36 | config SEMAPHORE_SLEEPERS | 32 | config SEMAPHORE_SLEEPERS |
37 | bool | 33 | bool |
38 | default y | 34 | default y |
@@ -50,7 +46,7 @@ config GENERIC_HARDIRQS | |||
50 | default y | 46 | default y |
51 | 47 | ||
52 | config GENERIC_IRQ_PROBE | 48 | config GENERIC_IRQ_PROBE |
53 | bool | 49 | bool |
54 | default y | 50 | default y |
55 | 51 | ||
56 | config GENERIC_TIME | 52 | config GENERIC_TIME |
@@ -69,11 +65,6 @@ config GENERIC_CALIBRATE_DELAY | |||
69 | bool | 65 | bool |
70 | default y | 66 | default y |
71 | 67 | ||
72 | config IRQCHIP_DEMUX_GPIO | ||
73 | bool | ||
74 | depends on (BF52x || BF53x || BF561 || BF54x) | ||
75 | default y | ||
76 | |||
77 | source "init/Kconfig" | 68 | source "init/Kconfig" |
78 | source "kernel/Kconfig.preempt" | 69 | source "kernel/Kconfig.preempt" |
79 | 70 | ||
@@ -140,6 +131,11 @@ config BF544 | |||
140 | help | 131 | help |
141 | BF544 Processor Support. | 132 | BF544 Processor Support. |
142 | 133 | ||
134 | config BF547 | ||
135 | bool "BF547" | ||
136 | help | ||
137 | BF547 Processor Support. | ||
138 | |||
143 | config BF548 | 139 | config BF548 |
144 | bool "BF548" | 140 | bool "BF548" |
145 | help | 141 | help |
@@ -166,11 +162,11 @@ choice | |||
166 | 162 | ||
167 | config BF_REV_0_0 | 163 | config BF_REV_0_0 |
168 | bool "0.0" | 164 | bool "0.0" |
169 | depends on (BF549 || BF527) | 165 | depends on (BF52x || BF54x) |
170 | 166 | ||
171 | config BF_REV_0_1 | 167 | config BF_REV_0_1 |
172 | bool "0.2" | 168 | bool "0.1" |
173 | depends on (BF549 || BF527) | 169 | depends on (BF52x || BF54x) |
174 | 170 | ||
175 | config BF_REV_0_2 | 171 | config BF_REV_0_2 |
176 | bool "0.2" | 172 | bool "0.2" |
@@ -208,7 +204,7 @@ config BF53x | |||
208 | 204 | ||
209 | config BF54x | 205 | config BF54x |
210 | bool | 206 | bool |
211 | depends on (BF542 || BF544 || BF548 || BF549) | 207 | depends on (BF542 || BF544 || BF547 || BF548 || BF549) |
212 | default y | 208 | default y |
213 | 209 | ||
214 | config BFIN_DUAL_CORE | 210 | config BFIN_DUAL_CORE |
@@ -221,95 +217,6 @@ config BFIN_SINGLE_CORE | |||
221 | depends on !BFIN_DUAL_CORE | 217 | depends on !BFIN_DUAL_CORE |
222 | default y | 218 | default y |
223 | 219 | ||
224 | choice | ||
225 | prompt "System type" | ||
226 | default BFIN533_STAMP | ||
227 | help | ||
228 | Do NOT change the board here. Please use the top level | ||
229 | configuration to ensure that all the other settings are | ||
230 | correct. | ||
231 | |||
232 | config BFIN527_EZKIT | ||
233 | bool "BF527-EZKIT" | ||
234 | depends on (BF522 || BF525 || BF527) | ||
235 | help | ||
236 | BF533-EZKIT-LITE board Support. | ||
237 | |||
238 | config BFIN533_EZKIT | ||
239 | bool "BF533-EZKIT" | ||
240 | depends on (BF533 || BF532 || BF531) | ||
241 | help | ||
242 | BF533-EZKIT-LITE board Support. | ||
243 | |||
244 | config BFIN533_STAMP | ||
245 | bool "BF533-STAMP" | ||
246 | depends on (BF533 || BF532 || BF531) | ||
247 | help | ||
248 | BF533-STAMP board Support. | ||
249 | |||
250 | config BFIN537_STAMP | ||
251 | bool "BF537-STAMP" | ||
252 | depends on (BF537 || BF536 || BF534) | ||
253 | help | ||
254 | BF537-STAMP board Support. | ||
255 | |||
256 | config BFIN533_BLUETECHNIX_CM | ||
257 | bool "Bluetechnix CM-BF533" | ||
258 | depends on (BF533) | ||
259 | help | ||
260 | CM-BF533 support for EVAL- and DEV-Board. | ||
261 | |||
262 | config BFIN537_BLUETECHNIX_CM | ||
263 | bool "Bluetechnix CM-BF537" | ||
264 | depends on (BF537) | ||
265 | help | ||
266 | CM-BF537 support for EVAL- and DEV-Board. | ||
267 | |||
268 | config BFIN548_EZKIT | ||
269 | bool "BF548-EZKIT" | ||
270 | depends on (BF548 || BF549) | ||
271 | help | ||
272 | BFIN548-EZKIT board Support. | ||
273 | |||
274 | config BFIN561_BLUETECHNIX_CM | ||
275 | bool "Bluetechnix CM-BF561" | ||
276 | depends on (BF561) | ||
277 | help | ||
278 | CM-BF561 support for EVAL- and DEV-Board. | ||
279 | |||
280 | config BFIN561_EZKIT | ||
281 | bool "BF561-EZKIT" | ||
282 | depends on (BF561) | ||
283 | help | ||
284 | BF561-EZKIT-LITE board Support. | ||
285 | |||
286 | config BFIN561_TEPLA | ||
287 | bool "BF561-TEPLA" | ||
288 | depends on (BF561) | ||
289 | help | ||
290 | BF561-TEPLA board Support. | ||
291 | |||
292 | config PNAV10 | ||
293 | bool "PNAV 1.0 board" | ||
294 | depends on (BF537) | ||
295 | help | ||
296 | PNAV 1.0 board Support. | ||
297 | |||
298 | config H8606_HVSISTEMAS | ||
299 | bool "HV Sistemas H8606" | ||
300 | depends on (BF532) | ||
301 | help | ||
302 | HV Sistemas H8606 board support. | ||
303 | |||
304 | config GENERIC_BOARD | ||
305 | bool "Custom" | ||
306 | depends on (BF537 || BF536 \ | ||
307 | || BF534 || BF561 || BF535 || BF533 || BF532 || BF531) | ||
308 | help | ||
309 | GENERIC or Custom board Support. | ||
310 | |||
311 | endchoice | ||
312 | |||
313 | config MEM_GENERIC_BOARD | 220 | config MEM_GENERIC_BOARD |
314 | bool | 221 | bool |
315 | depends on GENERIC_BOARD | 222 | depends on GENERIC_BOARD |
@@ -389,9 +296,9 @@ config BFIN_KERNEL_CLOCK | |||
389 | configuration. | 296 | configuration. |
390 | 297 | ||
391 | config PLL_BYPASS | 298 | config PLL_BYPASS |
392 | bool "Bypass PLL" | 299 | bool "Bypass PLL" |
393 | depends on BFIN_KERNEL_CLOCK | 300 | depends on BFIN_KERNEL_CLOCK |
394 | default n | 301 | default n |
395 | 302 | ||
396 | config CLKIN_HALF | 303 | config CLKIN_HALF |
397 | bool "Half Clock In" | 304 | bool "Half Clock In" |
@@ -468,11 +375,11 @@ config MAX_VCO_HZ | |||
468 | default 500000000 if BF534 | 375 | default 500000000 if BF534 |
469 | default 400000000 if BF536 | 376 | default 400000000 if BF536 |
470 | default 600000000 if BF537 | 377 | default 600000000 if BF537 |
471 | default 533000000 if BF538 | 378 | default 533333333 if BF538 |
472 | default 533000000 if BF539 | 379 | default 533333333 if BF539 |
473 | default 600000000 if BF542 | 380 | default 600000000 if BF542 |
474 | default 533000000 if BF544 | 381 | default 533333333 if BF544 |
475 | default 533000000 if BF549 | 382 | default 533333333 if BF549 |
476 | default 600000000 if BF561 | 383 | default 600000000 if BF561 |
477 | 384 | ||
478 | config MIN_VCO_HZ | 385 | config MIN_VCO_HZ |
@@ -481,7 +388,7 @@ config MIN_VCO_HZ | |||
481 | 388 | ||
482 | config MAX_SCLK_HZ | 389 | config MAX_SCLK_HZ |
483 | int | 390 | int |
484 | default 133000000 | 391 | default 133333333 |
485 | 392 | ||
486 | config MIN_SCLK_HZ | 393 | config MIN_SCLK_HZ |
487 | int | 394 | int |
@@ -959,6 +866,20 @@ config BANK_3 | |||
959 | default 0x99B3 | 866 | default 0x99B3 |
960 | endmenu | 867 | endmenu |
961 | 868 | ||
869 | config EBIU_MBSCTLVAL | ||
870 | hex "EBIU Bank Select Control Register" | ||
871 | depends on BF54x | ||
872 | default 0 | ||
873 | |||
874 | config EBIU_MODEVAL | ||
875 | hex "Flash Memory Mode Control Register" | ||
876 | depends on BF54x | ||
877 | default 1 | ||
878 | |||
879 | config EBIU_FCTLVAL | ||
880 | hex "Flash Memory Bank Control Register" | ||
881 | depends on BF54x | ||
882 | default 6 | ||
962 | endmenu | 883 | endmenu |
963 | 884 | ||
964 | ############################################################################# | 885 | ############################################################################# |
@@ -1075,174 +996,7 @@ source "fs/Kconfig" | |||
1075 | 996 | ||
1076 | source "kernel/Kconfig.instrumentation" | 997 | source "kernel/Kconfig.instrumentation" |
1077 | 998 | ||
1078 | menu "Kernel hacking" | 999 | source "arch/blackfin/Kconfig.debug" |
1079 | |||
1080 | source "lib/Kconfig.debug" | ||
1081 | |||
1082 | config DEBUG_HWERR | ||
1083 | bool "Hardware error interrupt debugging" | ||
1084 | depends on DEBUG_KERNEL | ||
1085 | help | ||
1086 | When enabled, the hardware error interrupt is never disabled, and | ||
1087 | will happen immediately when an error condition occurs. This comes | ||
1088 | at a slight cost in code size, but is necessary if you are getting | ||
1089 | hardware error interrupts and need to know where they are coming | ||
1090 | from. | ||
1091 | |||
1092 | config DEBUG_ICACHE_CHECK | ||
1093 | bool "Check Instruction cache coherency" | ||
1094 | depends on DEBUG_KERNEL | ||
1095 | depends on DEBUG_HWERR | ||
1096 | help | ||
1097 | Say Y here if you are getting weird unexplained errors. This will | ||
1098 | ensure that icache is what SDRAM says it should be by doing a | ||
1099 | byte wise comparison between SDRAM and instruction cache. This | ||
1100 | also relocates the irq_panic() function to L1 memory, (which is | ||
1101 | un-cached). | ||
1102 | |||
1103 | config DEBUG_HUNT_FOR_ZERO | ||
1104 | bool "Catch NULL pointer reads/writes" | ||
1105 | default y | ||
1106 | help | ||
1107 | Say Y here to catch reads/writes to anywhere in the memory range | ||
1108 | from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in | ||
1109 | catching common programming errors such as NULL pointer dereferences. | ||
1110 | |||
1111 | Misbehaving applications will be killed (generate a SEGV) while the | ||
1112 | kernel will trigger a panic. | ||
1113 | |||
1114 | Enabling this option will take up an extra entry in CPLB table. | ||
1115 | Otherwise, there is no extra overhead. | ||
1116 | |||
1117 | config DEBUG_BFIN_HWTRACE_ON | ||
1118 | bool "Turn on Blackfin's Hardware Trace" | ||
1119 | default y | ||
1120 | help | ||
1121 | All Blackfins include a Trace Unit which stores a history of the last | ||
1122 | 16 changes in program flow taken by the program sequencer. The history | ||
1123 | allows the user to recreate the program sequencer’s recent path. This | ||
1124 | can be handy when an application dies - we print out the execution | ||
1125 | path of how it got to the offending instruction. | ||
1126 | |||
1127 | By turning this off, you may save a tiny amount of power. | ||
1128 | |||
1129 | choice | ||
1130 | prompt "Omit loop Tracing" | ||
1131 | default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF | ||
1132 | depends on DEBUG_BFIN_HWTRACE_ON | ||
1133 | help | ||
1134 | The trace buffer can be configured to omit recording of changes in | ||
1135 | program flow that match either the last entry or one of the last | ||
1136 | two entries. Omitting one of these entries from the record prevents | ||
1137 | the trace buffer from overflowing because of any sort of loop (for, do | ||
1138 | while, etc) in the program. | ||
1139 | |||
1140 | Because zero-overhead Hardware loops are not recorded in the trace buffer, | ||
1141 | this feature can be used to prevent trace overflow from loops that | ||
1142 | are nested four deep. | ||
1143 | |||
1144 | config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF | ||
1145 | bool "Trace all Loops" | ||
1146 | help | ||
1147 | The trace buffer records all changes of flow | ||
1148 | |||
1149 | config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE | ||
1150 | bool "Compress single-level loops" | ||
1151 | help | ||
1152 | The trace buffer does not record single loops - helpful if trace | ||
1153 | is spinning on a while or do loop. | ||
1154 | |||
1155 | config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO | ||
1156 | bool "Compress two-level loops" | ||
1157 | help | ||
1158 | The trace buffer does not record loops two levels deep. Helpful if | ||
1159 | the trace is spinning in a nested loop | ||
1160 | |||
1161 | endchoice | ||
1162 | |||
1163 | config DEBUG_BFIN_HWTRACE_COMPRESSION | ||
1164 | int | ||
1165 | depends on DEBUG_BFIN_HWTRACE_ON | ||
1166 | default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF | ||
1167 | default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE | ||
1168 | default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO | ||
1169 | |||
1170 | |||
1171 | config DEBUG_BFIN_HWTRACE_EXPAND | ||
1172 | bool "Expand Trace Buffer greater than 16 entries" | ||
1173 | depends on DEBUG_BFIN_HWTRACE_ON | ||
1174 | default n | ||
1175 | help | ||
1176 | By selecting this option, every time the 16 hardware entries in | ||
1177 | the Blackfin's HW Trace buffer are full, the kernel will move them | ||
1178 | into a software buffer, for dumping when there is an issue. This | ||
1179 | has a great impact on performance, (an interrupt every 16 change of | ||
1180 | flows) and should normally be turned off, except in those nasty | ||
1181 | debugging sessions | ||
1182 | |||
1183 | config DEBUG_BFIN_HWTRACE_EXPAND_LEN | ||
1184 | int "Size of Trace buffer (in power of 2k)" | ||
1185 | range 0 4 | ||
1186 | depends on DEBUG_BFIN_HWTRACE_EXPAND | ||
1187 | default 1 | ||
1188 | help | ||
1189 | This sets the size of the software buffer that the trace information | ||
1190 | is kept in. | ||
1191 | 0 for (2^0) 1k, or 256 entries, | ||
1192 | 1 for (2^1) 2k, or 512 entries, | ||
1193 | 2 for (2^2) 4k, or 1024 entries, | ||
1194 | 3 for (2^3) 8k, or 2048 entries, | ||
1195 | 4 for (2^4) 16k, or 4096 entries | ||
1196 | |||
1197 | config DEBUG_BFIN_NO_KERN_HWTRACE | ||
1198 | bool "Trace user apps (turn off hwtrace in kernel)" | ||
1199 | depends on DEBUG_BFIN_HWTRACE_ON | ||
1200 | default n | ||
1201 | help | ||
1202 | Some pieces of the kernel contain a lot of flow changes which can | ||
1203 | quickly fill up the hardware trace buffer. When debugging crashes, | ||
1204 | the hardware trace may indicate that the problem lies in kernel | ||
1205 | space when in reality an application is buggy. | ||
1206 | |||
1207 | Say Y here to disable hardware tracing in some known "jumpy" pieces | ||
1208 | of code so that the trace buffer will extend further back. | ||
1209 | |||
1210 | config EARLY_PRINTK | ||
1211 | bool "Early printk" | ||
1212 | default n | ||
1213 | help | ||
1214 | This option enables special console drivers which allow the kernel | ||
1215 | to print messages very early in the bootup process. | ||
1216 | |||
1217 | This is useful for kernel debugging when your machine crashes very | ||
1218 | early before the console code is initialized. After enabling this | ||
1219 | feature, you must add "earlyprintk=serial,uart0,57600" to the | ||
1220 | command line (bootargs). It is safe to say Y here in all cases, as | ||
1221 | all of this lives in the init section and is thrown away after the | ||
1222 | kernel boots completely. | ||
1223 | |||
1224 | config DUAL_CORE_TEST_MODULE | ||
1225 | tristate "Dual Core Test Module" | ||
1226 | depends on (BF561) | ||
1227 | default n | ||
1228 | help | ||
1229 | Say Y here to build-in dual core test module for dual core test. | ||
1230 | |||
1231 | config CPLB_INFO | ||
1232 | bool "Display the CPLB information" | ||
1233 | help | ||
1234 | Display the CPLB information. | ||
1235 | |||
1236 | config ACCESS_CHECK | ||
1237 | bool "Check the user pointer address" | ||
1238 | default y | ||
1239 | help | ||
1240 | Usually the pointer transfer from user space is checked to see if its | ||
1241 | address is in the kernel space. | ||
1242 | |||
1243 | Say N here to disable that check to improve the performance. | ||
1244 | |||
1245 | endmenu | ||
1246 | 1000 | ||
1247 | source "security/Kconfig" | 1001 | source "security/Kconfig" |
1248 | 1002 | ||
diff --git a/arch/blackfin/Kconfig.debug b/arch/blackfin/Kconfig.debug new file mode 100644 index 000000000000..59b87a483c68 --- /dev/null +++ b/arch/blackfin/Kconfig.debug | |||
@@ -0,0 +1,178 @@ | |||
1 | menu "Kernel hacking" | ||
2 | |||
3 | source "lib/Kconfig.debug" | ||
4 | |||
5 | config DEBUG_MMRS | ||
6 | bool "Generate Blackfin MMR tree" | ||
7 | select DEBUG_FS | ||
8 | help | ||
9 | Create a tree of Blackfin MMRs via the debugfs tree. If | ||
10 | you enable this, you will find all MMRs laid out in the | ||
11 | /sys/kernel/debug/blackfin/ directory where you can read/write | ||
12 | MMRs directly from userspace. This is obviously just a debug | ||
13 | feature. | ||
14 | |||
15 | config DEBUG_HWERR | ||
16 | bool "Hardware error interrupt debugging" | ||
17 | depends on DEBUG_KERNEL | ||
18 | help | ||
19 | When enabled, the hardware error interrupt is never disabled, and | ||
20 | will happen immediately when an error condition occurs. This comes | ||
21 | at a slight cost in code size, but is necessary if you are getting | ||
22 | hardware error interrupts and need to know where they are coming | ||
23 | from. | ||
24 | |||
25 | config DEBUG_ICACHE_CHECK | ||
26 | bool "Check Instruction cache coherency" | ||
27 | depends on DEBUG_KERNEL | ||
28 | depends on DEBUG_HWERR | ||
29 | help | ||
30 | Say Y here if you are getting weird unexplained errors. This will | ||
31 | ensure that icache is what SDRAM says it should be by doing a | ||
32 | byte wise comparison between SDRAM and instruction cache. This | ||
33 | also relocates the irq_panic() function to L1 memory, (which is | ||
34 | un-cached). | ||
35 | |||
36 | config DEBUG_HUNT_FOR_ZERO | ||
37 | bool "Catch NULL pointer reads/writes" | ||
38 | default y | ||
39 | help | ||
40 | Say Y here to catch reads/writes to anywhere in the memory range | ||
41 | from 0x0000 - 0x0FFF (the first 4k) of memory. This is useful in | ||
42 | catching common programming errors such as NULL pointer dereferences. | ||
43 | |||
44 | Misbehaving applications will be killed (generate a SEGV) while the | ||
45 | kernel will trigger a panic. | ||
46 | |||
47 | Enabling this option will take up an extra entry in CPLB table. | ||
48 | Otherwise, there is no extra overhead. | ||
49 | |||
50 | config DEBUG_BFIN_HWTRACE_ON | ||
51 | bool "Turn on Blackfin's Hardware Trace" | ||
52 | default y | ||
53 | help | ||
54 | All Blackfins include a Trace Unit which stores a history of the last | ||
55 | 16 changes in program flow taken by the program sequencer. The history | ||
56 | allows the user to recreate the program sequencer’s recent path. This | ||
57 | can be handy when an application dies - we print out the execution | ||
58 | path of how it got to the offending instruction. | ||
59 | |||
60 | By turning this off, you may save a tiny amount of power. | ||
61 | |||
62 | choice | ||
63 | prompt "Omit loop Tracing" | ||
64 | default DEBUG_BFIN_HWTRACE_COMPRESSION_OFF | ||
65 | depends on DEBUG_BFIN_HWTRACE_ON | ||
66 | help | ||
67 | The trace buffer can be configured to omit recording of changes in | ||
68 | program flow that match either the last entry or one of the last | ||
69 | two entries. Omitting one of these entries from the record prevents | ||
70 | the trace buffer from overflowing because of any sort of loop (for, do | ||
71 | while, etc) in the program. | ||
72 | |||
73 | Because zero-overhead Hardware loops are not recorded in the trace buffer, | ||
74 | this feature can be used to prevent trace overflow from loops that | ||
75 | are nested four deep. | ||
76 | |||
77 | config DEBUG_BFIN_HWTRACE_COMPRESSION_OFF | ||
78 | bool "Trace all Loops" | ||
79 | help | ||
80 | The trace buffer records all changes of flow | ||
81 | |||
82 | config DEBUG_BFIN_HWTRACE_COMPRESSION_ONE | ||
83 | bool "Compress single-level loops" | ||
84 | help | ||
85 | The trace buffer does not record single loops - helpful if trace | ||
86 | is spinning on a while or do loop. | ||
87 | |||
88 | config DEBUG_BFIN_HWTRACE_COMPRESSION_TWO | ||
89 | bool "Compress two-level loops" | ||
90 | help | ||
91 | The trace buffer does not record loops two levels deep. Helpful if | ||
92 | the trace is spinning in a nested loop | ||
93 | |||
94 | endchoice | ||
95 | |||
96 | config DEBUG_BFIN_HWTRACE_COMPRESSION | ||
97 | int | ||
98 | depends on DEBUG_BFIN_HWTRACE_ON | ||
99 | default 0 if DEBUG_BFIN_HWTRACE_COMPRESSION_OFF | ||
100 | default 1 if DEBUG_BFIN_HWTRACE_COMPRESSION_ONE | ||
101 | default 2 if DEBUG_BFIN_HWTRACE_COMPRESSION_TWO | ||
102 | |||
103 | |||
104 | config DEBUG_BFIN_HWTRACE_EXPAND | ||
105 | bool "Expand Trace Buffer greater than 16 entries" | ||
106 | depends on DEBUG_BFIN_HWTRACE_ON | ||
107 | default n | ||
108 | help | ||
109 | By selecting this option, every time the 16 hardware entries in | ||
110 | the Blackfin's HW Trace buffer are full, the kernel will move them | ||
111 | into a software buffer, for dumping when there is an issue. This | ||
112 | has a great impact on performance, (an interrupt every 16 change of | ||
113 | flows) and should normally be turned off, except in those nasty | ||
114 | debugging sessions | ||
115 | |||
116 | config DEBUG_BFIN_HWTRACE_EXPAND_LEN | ||
117 | int "Size of Trace buffer (in power of 2k)" | ||
118 | range 0 4 | ||
119 | depends on DEBUG_BFIN_HWTRACE_EXPAND | ||
120 | default 1 | ||
121 | help | ||
122 | This sets the size of the software buffer that the trace information | ||
123 | is kept in. | ||
124 | 0 for (2^0) 1k, or 256 entries, | ||
125 | 1 for (2^1) 2k, or 512 entries, | ||
126 | 2 for (2^2) 4k, or 1024 entries, | ||
127 | 3 for (2^3) 8k, or 2048 entries, | ||
128 | 4 for (2^4) 16k, or 4096 entries | ||
129 | |||
130 | config DEBUG_BFIN_NO_KERN_HWTRACE | ||
131 | bool "Trace user apps (turn off hwtrace in kernel)" | ||
132 | depends on DEBUG_BFIN_HWTRACE_ON | ||
133 | default n | ||
134 | help | ||
135 | Some pieces of the kernel contain a lot of flow changes which can | ||
136 | quickly fill up the hardware trace buffer. When debugging crashes, | ||
137 | the hardware trace may indicate that the problem lies in kernel | ||
138 | space when in reality an application is buggy. | ||
139 | |||
140 | Say Y here to disable hardware tracing in some known "jumpy" pieces | ||
141 | of code so that the trace buffer will extend further back. | ||
142 | |||
143 | config EARLY_PRINTK | ||
144 | bool "Early printk" | ||
145 | default n | ||
146 | help | ||
147 | This option enables special console drivers which allow the kernel | ||
148 | to print messages very early in the bootup process. | ||
149 | |||
150 | This is useful for kernel debugging when your machine crashes very | ||
151 | early before the console code is initialized. After enabling this | ||
152 | feature, you must add "earlyprintk=serial,uart0,57600" to the | ||
153 | command line (bootargs). It is safe to say Y here in all cases, as | ||
154 | all of this lives in the init section and is thrown away after the | ||
155 | kernel boots completely. | ||
156 | |||
157 | config DUAL_CORE_TEST_MODULE | ||
158 | tristate "Dual Core Test Module" | ||
159 | depends on (BF561) | ||
160 | default n | ||
161 | help | ||
162 | Say Y here to build-in dual core test module for dual core test. | ||
163 | |||
164 | config CPLB_INFO | ||
165 | bool "Display the CPLB information" | ||
166 | help | ||
167 | Display the CPLB information. | ||
168 | |||
169 | config ACCESS_CHECK | ||
170 | bool "Check the user pointer address" | ||
171 | default y | ||
172 | help | ||
173 | Usually the pointer transfer from user space is checked to see if its | ||
174 | address is in the kernel space. | ||
175 | |||
176 | Say N here to disable that check to improve the performance. | ||
177 | |||
178 | endmenu | ||
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index f7cac7c51e7e..c47e000f8324 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
@@ -31,6 +31,7 @@ machine-$(CONFIG_BF536) := bf537 | |||
31 | machine-$(CONFIG_BF537) := bf537 | 31 | machine-$(CONFIG_BF537) := bf537 |
32 | machine-$(CONFIG_BF542) := bf548 | 32 | machine-$(CONFIG_BF542) := bf548 |
33 | machine-$(CONFIG_BF544) := bf548 | 33 | machine-$(CONFIG_BF544) := bf548 |
34 | machine-$(CONFIG_BF547) := bf548 | ||
34 | machine-$(CONFIG_BF548) := bf548 | 35 | machine-$(CONFIG_BF548) := bf548 |
35 | machine-$(CONFIG_BF549) := bf548 | 36 | machine-$(CONFIG_BF549) := bf548 |
36 | machine-$(CONFIG_BF561) := bf561 | 37 | machine-$(CONFIG_BF561) := bf561 |
@@ -48,6 +49,7 @@ cpu-$(CONFIG_BF536) := bf536 | |||
48 | cpu-$(CONFIG_BF537) := bf537 | 49 | cpu-$(CONFIG_BF537) := bf537 |
49 | cpu-$(CONFIG_BF542) := bf542 | 50 | cpu-$(CONFIG_BF542) := bf542 |
50 | cpu-$(CONFIG_BF544) := bf544 | 51 | cpu-$(CONFIG_BF544) := bf544 |
52 | cpu-$(CONFIG_BF547) := bf547 | ||
51 | cpu-$(CONFIG_BF548) := bf548 | 53 | cpu-$(CONFIG_BF548) := bf548 |
52 | cpu-$(CONFIG_BF549) := bf549 | 54 | cpu-$(CONFIG_BF549) := bf549 |
53 | cpu-$(CONFIG_BF561) := bf561 | 55 | cpu-$(CONFIG_BF561) := bf561 |
diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig index 1f6a93df6b32..fa6eb4e00fae 100644 --- a/arch/blackfin/configs/BF527-EZKIT_defconfig +++ b/arch/blackfin/configs/BF527-EZKIT_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.9 | 3 | # Linux kernel version: 2.6.22.12 |
4 | # | 4 | # |
5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -8,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
9 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
10 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
11 | CONFIG_BFIN=y | ||
12 | CONFIG_SEMAPHORE_SLEEPERS=y | 11 | CONFIG_SEMAPHORE_SLEEPERS=y |
13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 12 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
14 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
@@ -18,7 +17,6 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
18 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
21 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 21 | ||
24 | # | 22 | # |
@@ -127,6 +125,7 @@ CONFIG_BF527=y | |||
127 | # CONFIG_BF537 is not set | 125 | # CONFIG_BF537 is not set |
128 | # CONFIG_BF542 is not set | 126 | # CONFIG_BF542 is not set |
129 | # CONFIG_BF544 is not set | 127 | # CONFIG_BF544 is not set |
128 | # CONFIG_BF547 is not set | ||
130 | # CONFIG_BF548 is not set | 129 | # CONFIG_BF548 is not set |
131 | # CONFIG_BF549 is not set | 130 | # CONFIG_BF549 is not set |
132 | # CONFIG_BF561 is not set | 131 | # CONFIG_BF561 is not set |
@@ -140,19 +139,8 @@ CONFIG_BF_REV_0_0=y | |||
140 | # CONFIG_BF_REV_NONE is not set | 139 | # CONFIG_BF_REV_NONE is not set |
141 | CONFIG_BF52x=y | 140 | CONFIG_BF52x=y |
142 | CONFIG_BFIN_SINGLE_CORE=y | 141 | CONFIG_BFIN_SINGLE_CORE=y |
143 | CONFIG_BFIN527_EZKIT=y | ||
144 | # CONFIG_BFIN533_EZKIT is not set | ||
145 | # CONFIG_BFIN533_STAMP is not set | ||
146 | # CONFIG_BFIN537_STAMP is not set | ||
147 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | ||
148 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | ||
149 | # CONFIG_BFIN548_EZKIT is not set | ||
150 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
151 | # CONFIG_BFIN561_EZKIT is not set | ||
152 | # CONFIG_BFIN561_TEPLA is not set | ||
153 | # CONFIG_PNAV10 is not set | ||
154 | # CONFIG_GENERIC_BOARD is not set | ||
155 | CONFIG_MEM_MT48LC32M16A2TG_75=y | 142 | CONFIG_MEM_MT48LC32M16A2TG_75=y |
143 | CONFIG_BFIN527_EZKIT=y | ||
156 | 144 | ||
157 | # | 145 | # |
158 | # BF527 Specific Configuration | 146 | # BF527 Specific Configuration |
@@ -244,7 +232,7 @@ CONFIG_CLKIN_HZ=25000000 | |||
244 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 232 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
245 | CONFIG_MAX_VCO_HZ=600000000 | 233 | CONFIG_MAX_VCO_HZ=600000000 |
246 | CONFIG_MIN_VCO_HZ=50000000 | 234 | CONFIG_MIN_VCO_HZ=50000000 |
247 | CONFIG_MAX_SCLK_HZ=133333333 | 235 | CONFIG_MAX_SCLK_HZ=133000000 |
248 | CONFIG_MIN_SCLK_HZ=27000000 | 236 | CONFIG_MIN_SCLK_HZ=27000000 |
249 | 237 | ||
250 | # | 238 | # |
@@ -301,6 +289,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
301 | # CONFIG_RESOURCES_64BIT is not set | 289 | # CONFIG_RESOURCES_64BIT is not set |
302 | CONFIG_ZONE_DMA_FLAG=1 | 290 | CONFIG_ZONE_DMA_FLAG=1 |
303 | CONFIG_LARGE_ALLOCS=y | 291 | CONFIG_LARGE_ALLOCS=y |
292 | # CONFIG_BFIN_GPTIMERS is not set | ||
304 | CONFIG_BFIN_DMA_5XX=y | 293 | CONFIG_BFIN_DMA_5XX=y |
305 | # CONFIG_DMA_UNCACHED_2M is not set | 294 | # CONFIG_DMA_UNCACHED_2M is not set |
306 | CONFIG_DMA_UNCACHED_1M=y | 295 | CONFIG_DMA_UNCACHED_1M=y |
@@ -322,7 +311,7 @@ CONFIG_L1_MAX_PIECE=16 | |||
322 | # | 311 | # |
323 | 312 | ||
324 | # | 313 | # |
325 | # EBIU_AMBCTL Global Control | 314 | # EBIU_AMGCTL Global Control |
326 | # | 315 | # |
327 | CONFIG_C_AMCKEN=y | 316 | CONFIG_C_AMCKEN=y |
328 | CONFIG_C_CDPRIO=y | 317 | CONFIG_C_CDPRIO=y |
@@ -548,6 +537,7 @@ CONFIG_BFIN_NAND_CLE=2 | |||
548 | CONFIG_BFIN_NAND_ALE=1 | 537 | CONFIG_BFIN_NAND_ALE=1 |
549 | CONFIG_BFIN_NAND_READY=3 | 538 | CONFIG_BFIN_NAND_READY=3 |
550 | CONFIG_MTD_NAND_IDS=m | 539 | CONFIG_MTD_NAND_IDS=m |
540 | # CONFIG_MTD_NAND_BF5XX is not set | ||
551 | # CONFIG_MTD_NAND_DISKONCHIP is not set | 541 | # CONFIG_MTD_NAND_DISKONCHIP is not set |
552 | # CONFIG_MTD_NAND_NANDSIM is not set | 542 | # CONFIG_MTD_NAND_NANDSIM is not set |
553 | # CONFIG_MTD_NAND_PLATFORM is not set | 543 | # CONFIG_MTD_NAND_PLATFORM is not set |
@@ -637,6 +627,7 @@ CONFIG_BFIN_MAC_RMII=y | |||
637 | # CONFIG_DM9000 is not set | 627 | # CONFIG_DM9000 is not set |
638 | CONFIG_NETDEV_1000=y | 628 | CONFIG_NETDEV_1000=y |
639 | CONFIG_NETDEV_10000=y | 629 | CONFIG_NETDEV_10000=y |
630 | # CONFIG_AX88180 is not set | ||
640 | 631 | ||
641 | # | 632 | # |
642 | # Wireless LAN | 633 | # Wireless LAN |
@@ -708,7 +699,7 @@ CONFIG_INPUT_MISC=y | |||
708 | # CONFIG_SPI_ADC_BF533 is not set | 699 | # CONFIG_SPI_ADC_BF533 is not set |
709 | # CONFIG_BF5xx_PFLAGS is not set | 700 | # CONFIG_BF5xx_PFLAGS is not set |
710 | # CONFIG_BF5xx_PPIFCD is not set | 701 | # CONFIG_BF5xx_PPIFCD is not set |
711 | # CONFIG_BF5xx_TIMERS is not set | 702 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
712 | # CONFIG_BF5xx_PPI is not set | 703 | # CONFIG_BF5xx_PPI is not set |
713 | # CONFIG_BFIN_SPORT is not set | 704 | # CONFIG_BFIN_SPORT is not set |
714 | # CONFIG_BFIN_TIMER_LATENCY is not set | 705 | # CONFIG_BFIN_TIMER_LATENCY is not set |
diff --git a/arch/blackfin/configs/BF533-EZKIT_defconfig b/arch/blackfin/configs/BF533-EZKIT_defconfig index 9e9b420342d1..4fdb49362ba3 100644 --- a/arch/blackfin/configs/BF533-EZKIT_defconfig +++ b/arch/blackfin/configs/BF533-EZKIT_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.6 | 3 | # Linux kernel version: 2.6.22.12 |
4 | # | 4 | # |
5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -8,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
9 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
10 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
11 | CONFIG_BFIN=y | ||
12 | CONFIG_SEMAPHORE_SLEEPERS=y | 11 | CONFIG_SEMAPHORE_SLEEPERS=y |
13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 12 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
14 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
@@ -18,7 +17,6 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
18 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
21 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 21 | ||
24 | # | 22 | # |
@@ -64,7 +62,6 @@ CONFIG_FUTEX=y | |||
64 | CONFIG_ANON_INODES=y | 62 | CONFIG_ANON_INODES=y |
65 | CONFIG_EPOLL=y | 63 | CONFIG_EPOLL=y |
66 | CONFIG_SIGNALFD=y | 64 | CONFIG_SIGNALFD=y |
67 | CONFIG_TIMERFD=y | ||
68 | CONFIG_EVENTFD=y | 65 | CONFIG_EVENTFD=y |
69 | CONFIG_VM_EVENT_COUNTERS=y | 66 | CONFIG_VM_EVENT_COUNTERS=y |
70 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 |
@@ -117,6 +114,9 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
117 | # | 114 | # |
118 | # Processor and Board Settings | 115 | # Processor and Board Settings |
119 | # | 116 | # |
117 | # CONFIG_BF522 is not set | ||
118 | # CONFIG_BF525 is not set | ||
119 | # CONFIG_BF527 is not set | ||
120 | # CONFIG_BF531 is not set | 120 | # CONFIG_BF531 is not set |
121 | # CONFIG_BF532 is not set | 121 | # CONFIG_BF532 is not set |
122 | CONFIG_BF533=y | 122 | CONFIG_BF533=y |
@@ -125,10 +125,12 @@ CONFIG_BF533=y | |||
125 | # CONFIG_BF537 is not set | 125 | # CONFIG_BF537 is not set |
126 | # CONFIG_BF542 is not set | 126 | # CONFIG_BF542 is not set |
127 | # CONFIG_BF544 is not set | 127 | # CONFIG_BF544 is not set |
128 | # CONFIG_BF547 is not set | ||
128 | # CONFIG_BF548 is not set | 129 | # CONFIG_BF548 is not set |
129 | # CONFIG_BF549 is not set | 130 | # CONFIG_BF549 is not set |
130 | # CONFIG_BF561 is not set | 131 | # CONFIG_BF561 is not set |
131 | # CONFIG_BF_REV_0_0 is not set | 132 | # CONFIG_BF_REV_0_0 is not set |
133 | # CONFIG_BF_REV_0_1 is not set | ||
132 | # CONFIG_BF_REV_0_2 is not set | 134 | # CONFIG_BF_REV_0_2 is not set |
133 | CONFIG_BF_REV_0_3=y | 135 | CONFIG_BF_REV_0_3=y |
134 | # CONFIG_BF_REV_0_4 is not set | 136 | # CONFIG_BF_REV_0_4 is not set |
@@ -137,18 +139,12 @@ CONFIG_BF_REV_0_3=y | |||
137 | # CONFIG_BF_REV_NONE is not set | 139 | # CONFIG_BF_REV_NONE is not set |
138 | CONFIG_BF53x=y | 140 | CONFIG_BF53x=y |
139 | CONFIG_BFIN_SINGLE_CORE=y | 141 | CONFIG_BFIN_SINGLE_CORE=y |
142 | CONFIG_MEM_MT48LC16M16A2TG_75=y | ||
140 | CONFIG_BFIN533_EZKIT=y | 143 | CONFIG_BFIN533_EZKIT=y |
141 | # CONFIG_BFIN533_STAMP is not set | 144 | # CONFIG_BFIN533_STAMP is not set |
142 | # CONFIG_BFIN537_STAMP is not set | ||
143 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | 145 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set |
144 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | 146 | # CONFIG_H8606_HVSISTEMAS is not set |
145 | # CONFIG_BFIN548_EZKIT is not set | 147 | # CONFIG_GENERIC_BF533_BOARD is not set |
146 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
147 | # CONFIG_BFIN561_EZKIT is not set | ||
148 | # CONFIG_BFIN561_TEPLA is not set | ||
149 | # CONFIG_PNAV10 is not set | ||
150 | # CONFIG_GENERIC_BOARD is not set | ||
151 | CONFIG_MEM_MT48LC16M16A2TG_75=y | ||
152 | 148 | ||
153 | # | 149 | # |
154 | # BF533/2/1 Specific Configuration | 150 | # BF533/2/1 Specific Configuration |
@@ -198,7 +194,7 @@ CONFIG_CLKIN_HZ=27000000 | |||
198 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 194 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
199 | CONFIG_MAX_VCO_HZ=750000000 | 195 | CONFIG_MAX_VCO_HZ=750000000 |
200 | CONFIG_MIN_VCO_HZ=50000000 | 196 | CONFIG_MIN_VCO_HZ=50000000 |
201 | CONFIG_MAX_SCLK_HZ=133333333 | 197 | CONFIG_MAX_SCLK_HZ=133000000 |
202 | CONFIG_MIN_SCLK_HZ=27000000 | 198 | CONFIG_MIN_SCLK_HZ=27000000 |
203 | 199 | ||
204 | # | 200 | # |
@@ -255,6 +251,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
255 | # CONFIG_RESOURCES_64BIT is not set | 251 | # CONFIG_RESOURCES_64BIT is not set |
256 | CONFIG_ZONE_DMA_FLAG=1 | 252 | CONFIG_ZONE_DMA_FLAG=1 |
257 | CONFIG_LARGE_ALLOCS=y | 253 | CONFIG_LARGE_ALLOCS=y |
254 | # CONFIG_BFIN_GPTIMERS is not set | ||
258 | CONFIG_BFIN_DMA_5XX=y | 255 | CONFIG_BFIN_DMA_5XX=y |
259 | # CONFIG_DMA_UNCACHED_2M is not set | 256 | # CONFIG_DMA_UNCACHED_2M is not set |
260 | CONFIG_DMA_UNCACHED_1M=y | 257 | CONFIG_DMA_UNCACHED_1M=y |
@@ -276,7 +273,7 @@ CONFIG_L1_MAX_PIECE=16 | |||
276 | # | 273 | # |
277 | 274 | ||
278 | # | 275 | # |
279 | # EBIU_AMBCTL Global Control | 276 | # EBIU_AMGCTL Global Control |
280 | # | 277 | # |
281 | CONFIG_C_AMCKEN=y | 278 | CONFIG_C_AMCKEN=y |
282 | CONFIG_C_CDPRIO=y | 279 | CONFIG_C_CDPRIO=y |
@@ -526,14 +523,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
526 | CONFIG_MTD_BF5xx=m | 523 | CONFIG_MTD_BF5xx=m |
527 | CONFIG_BFIN_FLASH_SIZE=0x400000 | 524 | CONFIG_BFIN_FLASH_SIZE=0x400000 |
528 | CONFIG_EBIU_FLASH_BASE=0x20000000 | 525 | CONFIG_EBIU_FLASH_BASE=0x20000000 |
529 | |||
530 | # | ||
531 | # FLASH_EBIU_AMBCTL Control | ||
532 | # | ||
533 | CONFIG_BFIN_FLASH_BANK_0=0x7BB0 | ||
534 | CONFIG_BFIN_FLASH_BANK_1=0x7BB0 | ||
535 | CONFIG_BFIN_FLASH_BANK_2=0x7BB0 | ||
536 | CONFIG_BFIN_FLASH_BANK_3=0x7BB0 | ||
537 | # CONFIG_MTD_UCLINUX is not set | 526 | # CONFIG_MTD_UCLINUX is not set |
538 | # CONFIG_MTD_PLATRAM is not set | 527 | # CONFIG_MTD_PLATRAM is not set |
539 | 528 | ||
@@ -622,6 +611,7 @@ CONFIG_SMC91X=y | |||
622 | # CONFIG_DM9000 is not set | 611 | # CONFIG_DM9000 is not set |
623 | CONFIG_NETDEV_1000=y | 612 | CONFIG_NETDEV_1000=y |
624 | CONFIG_NETDEV_10000=y | 613 | CONFIG_NETDEV_10000=y |
614 | # CONFIG_AX88180 is not set | ||
625 | 615 | ||
626 | # | 616 | # |
627 | # Wireless LAN | 617 | # Wireless LAN |
@@ -683,9 +673,9 @@ CONFIG_INPUT_EVDEV=m | |||
683 | # | 673 | # |
684 | # CONFIG_AD9960 is not set | 674 | # CONFIG_AD9960 is not set |
685 | # CONFIG_SPI_ADC_BF533 is not set | 675 | # CONFIG_SPI_ADC_BF533 is not set |
686 | # CONFIG_BFIN_PFLAGS is not set | 676 | # CONFIG_BF5xx_PFLAGS is not set |
687 | # CONFIG_BF5xx_PPIFCD is not set | 677 | # CONFIG_BF5xx_PPIFCD is not set |
688 | # CONFIG_BF5xx_TIMERS is not set | 678 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
689 | # CONFIG_BF5xx_PPI is not set | 679 | # CONFIG_BF5xx_PPI is not set |
690 | CONFIG_BFIN_SPORT=y | 680 | CONFIG_BFIN_SPORT=y |
691 | # CONFIG_BFIN_TIMER_LATENCY is not set | 681 | # CONFIG_BFIN_TIMER_LATENCY is not set |
@@ -708,6 +698,7 @@ CONFIG_SERIAL_BFIN_DMA=y | |||
708 | # CONFIG_SERIAL_BFIN_PIO is not set | 698 | # CONFIG_SERIAL_BFIN_PIO is not set |
709 | CONFIG_SERIAL_BFIN_UART0=y | 699 | CONFIG_SERIAL_BFIN_UART0=y |
710 | # CONFIG_BFIN_UART0_CTSRTS is not set | 700 | # CONFIG_BFIN_UART0_CTSRTS is not set |
701 | # CONFIG_SERIAL_BFIN_UART1 is not set | ||
711 | CONFIG_SERIAL_CORE=y | 702 | CONFIG_SERIAL_CORE=y |
712 | CONFIG_SERIAL_CORE_CONSOLE=y | 703 | CONFIG_SERIAL_CORE_CONSOLE=y |
713 | # CONFIG_SERIAL_BFIN_SPORT is not set | 704 | # CONFIG_SERIAL_BFIN_SPORT is not set |
diff --git a/arch/blackfin/configs/BF533-STAMP_defconfig b/arch/blackfin/configs/BF533-STAMP_defconfig index f59ade980109..b04e8e533e9a 100644 --- a/arch/blackfin/configs/BF533-STAMP_defconfig +++ b/arch/blackfin/configs/BF533-STAMP_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.6 | 3 | # Linux kernel version: 2.6.22.12 |
4 | # | 4 | # |
5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -8,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
9 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
10 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
11 | CONFIG_BFIN=y | ||
12 | CONFIG_SEMAPHORE_SLEEPERS=y | 11 | CONFIG_SEMAPHORE_SLEEPERS=y |
13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 12 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
14 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
@@ -18,7 +17,6 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
18 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
21 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 21 | ||
24 | # | 22 | # |
@@ -64,7 +62,6 @@ CONFIG_FUTEX=y | |||
64 | CONFIG_ANON_INODES=y | 62 | CONFIG_ANON_INODES=y |
65 | CONFIG_EPOLL=y | 63 | CONFIG_EPOLL=y |
66 | CONFIG_SIGNALFD=y | 64 | CONFIG_SIGNALFD=y |
67 | CONFIG_TIMERFD=y | ||
68 | CONFIG_EVENTFD=y | 65 | CONFIG_EVENTFD=y |
69 | CONFIG_VM_EVENT_COUNTERS=y | 66 | CONFIG_VM_EVENT_COUNTERS=y |
70 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 |
@@ -117,6 +114,9 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
117 | # | 114 | # |
118 | # Processor and Board Settings | 115 | # Processor and Board Settings |
119 | # | 116 | # |
117 | # CONFIG_BF522 is not set | ||
118 | # CONFIG_BF525 is not set | ||
119 | # CONFIG_BF527 is not set | ||
120 | # CONFIG_BF531 is not set | 120 | # CONFIG_BF531 is not set |
121 | # CONFIG_BF532 is not set | 121 | # CONFIG_BF532 is not set |
122 | CONFIG_BF533=y | 122 | CONFIG_BF533=y |
@@ -125,10 +125,12 @@ CONFIG_BF533=y | |||
125 | # CONFIG_BF537 is not set | 125 | # CONFIG_BF537 is not set |
126 | # CONFIG_BF542 is not set | 126 | # CONFIG_BF542 is not set |
127 | # CONFIG_BF544 is not set | 127 | # CONFIG_BF544 is not set |
128 | # CONFIG_BF547 is not set | ||
128 | # CONFIG_BF548 is not set | 129 | # CONFIG_BF548 is not set |
129 | # CONFIG_BF549 is not set | 130 | # CONFIG_BF549 is not set |
130 | # CONFIG_BF561 is not set | 131 | # CONFIG_BF561 is not set |
131 | # CONFIG_BF_REV_0_0 is not set | 132 | # CONFIG_BF_REV_0_0 is not set |
133 | # CONFIG_BF_REV_0_1 is not set | ||
132 | # CONFIG_BF_REV_0_2 is not set | 134 | # CONFIG_BF_REV_0_2 is not set |
133 | CONFIG_BF_REV_0_3=y | 135 | CONFIG_BF_REV_0_3=y |
134 | # CONFIG_BF_REV_0_4 is not set | 136 | # CONFIG_BF_REV_0_4 is not set |
@@ -137,19 +139,13 @@ CONFIG_BF_REV_0_3=y | |||
137 | # CONFIG_BF_REV_NONE is not set | 139 | # CONFIG_BF_REV_NONE is not set |
138 | CONFIG_BF53x=y | 140 | CONFIG_BF53x=y |
139 | CONFIG_BFIN_SINGLE_CORE=y | 141 | CONFIG_BFIN_SINGLE_CORE=y |
142 | CONFIG_MEM_MT48LC64M4A2FB_7E=y | ||
143 | CONFIG_BFIN_SHARED_FLASH_ENET=y | ||
140 | # CONFIG_BFIN533_EZKIT is not set | 144 | # CONFIG_BFIN533_EZKIT is not set |
141 | CONFIG_BFIN533_STAMP=y | 145 | CONFIG_BFIN533_STAMP=y |
142 | # CONFIG_BFIN537_STAMP is not set | ||
143 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | 146 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set |
144 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | 147 | # CONFIG_H8606_HVSISTEMAS is not set |
145 | # CONFIG_BFIN548_EZKIT is not set | 148 | # CONFIG_GENERIC_BF533_BOARD is not set |
146 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
147 | # CONFIG_BFIN561_EZKIT is not set | ||
148 | # CONFIG_BFIN561_TEPLA is not set | ||
149 | # CONFIG_PNAV10 is not set | ||
150 | # CONFIG_GENERIC_BOARD is not set | ||
151 | CONFIG_MEM_MT48LC64M4A2FB_7E=y | ||
152 | CONFIG_BFIN_SHARED_FLASH_ENET=y | ||
153 | 149 | ||
154 | # | 150 | # |
155 | # BF533/2/1 Specific Configuration | 151 | # BF533/2/1 Specific Configuration |
@@ -199,7 +195,7 @@ CONFIG_CLKIN_HZ=11059200 | |||
199 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 195 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
200 | CONFIG_MAX_VCO_HZ=750000000 | 196 | CONFIG_MAX_VCO_HZ=750000000 |
201 | CONFIG_MIN_VCO_HZ=50000000 | 197 | CONFIG_MIN_VCO_HZ=50000000 |
202 | CONFIG_MAX_SCLK_HZ=133333333 | 198 | CONFIG_MAX_SCLK_HZ=133000000 |
203 | CONFIG_MIN_SCLK_HZ=27000000 | 199 | CONFIG_MIN_SCLK_HZ=27000000 |
204 | 200 | ||
205 | # | 201 | # |
@@ -267,6 +263,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
267 | # CONFIG_RESOURCES_64BIT is not set | 263 | # CONFIG_RESOURCES_64BIT is not set |
268 | CONFIG_ZONE_DMA_FLAG=1 | 264 | CONFIG_ZONE_DMA_FLAG=1 |
269 | CONFIG_LARGE_ALLOCS=y | 265 | CONFIG_LARGE_ALLOCS=y |
266 | # CONFIG_BFIN_GPTIMERS is not set | ||
270 | CONFIG_BFIN_DMA_5XX=y | 267 | CONFIG_BFIN_DMA_5XX=y |
271 | # CONFIG_DMA_UNCACHED_2M is not set | 268 | # CONFIG_DMA_UNCACHED_2M is not set |
272 | CONFIG_DMA_UNCACHED_1M=y | 269 | CONFIG_DMA_UNCACHED_1M=y |
@@ -288,7 +285,7 @@ CONFIG_L1_MAX_PIECE=16 | |||
288 | # | 285 | # |
289 | 286 | ||
290 | # | 287 | # |
291 | # EBIU_AMBCTL Global Control | 288 | # EBIU_AMGCTL Global Control |
292 | # | 289 | # |
293 | CONFIG_C_AMCKEN=y | 290 | CONFIG_C_AMCKEN=y |
294 | CONFIG_C_CDPRIO=y | 291 | CONFIG_C_CDPRIO=y |
@@ -634,6 +631,7 @@ CONFIG_SMC91X=y | |||
634 | # CONFIG_DM9000 is not set | 631 | # CONFIG_DM9000 is not set |
635 | CONFIG_NETDEV_1000=y | 632 | CONFIG_NETDEV_1000=y |
636 | CONFIG_NETDEV_10000=y | 633 | CONFIG_NETDEV_10000=y |
634 | # CONFIG_AX88180 is not set | ||
637 | 635 | ||
638 | # | 636 | # |
639 | # Wireless LAN | 637 | # Wireless LAN |
@@ -704,9 +702,9 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=39 | |||
704 | # | 702 | # |
705 | # CONFIG_AD9960 is not set | 703 | # CONFIG_AD9960 is not set |
706 | # CONFIG_SPI_ADC_BF533 is not set | 704 | # CONFIG_SPI_ADC_BF533 is not set |
707 | # CONFIG_BFIN_PFLAGS is not set | 705 | # CONFIG_BF5xx_PFLAGS is not set |
708 | # CONFIG_BF5xx_PPIFCD is not set | 706 | # CONFIG_BF5xx_PPIFCD is not set |
709 | # CONFIG_BF5xx_TIMERS is not set | 707 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
710 | # CONFIG_BF5xx_PPI is not set | 708 | # CONFIG_BF5xx_PPI is not set |
711 | CONFIG_BFIN_SPORT=y | 709 | CONFIG_BFIN_SPORT=y |
712 | # CONFIG_BFIN_TIMER_LATENCY is not set | 710 | # CONFIG_BFIN_TIMER_LATENCY is not set |
@@ -732,6 +730,7 @@ CONFIG_SERIAL_BFIN_DMA=y | |||
732 | # CONFIG_SERIAL_BFIN_PIO is not set | 730 | # CONFIG_SERIAL_BFIN_PIO is not set |
733 | CONFIG_SERIAL_BFIN_UART0=y | 731 | CONFIG_SERIAL_BFIN_UART0=y |
734 | # CONFIG_BFIN_UART0_CTSRTS is not set | 732 | # CONFIG_BFIN_UART0_CTSRTS is not set |
733 | # CONFIG_SERIAL_BFIN_UART1 is not set | ||
735 | CONFIG_SERIAL_CORE=y | 734 | CONFIG_SERIAL_CORE=y |
736 | CONFIG_SERIAL_CORE_CONSOLE=y | 735 | CONFIG_SERIAL_CORE_CONSOLE=y |
737 | # CONFIG_SERIAL_BFIN_SPORT is not set | 736 | # CONFIG_SERIAL_BFIN_SPORT is not set |
@@ -925,6 +924,7 @@ CONFIG_NTSC=y | |||
925 | # CONFIG_PAL_YCBCR is not set | 924 | # CONFIG_PAL_YCBCR is not set |
926 | CONFIG_ADV7393_1XMEM=y | 925 | CONFIG_ADV7393_1XMEM=y |
927 | # CONFIG_ADV7393_2XMEM is not set | 926 | # CONFIG_ADV7393_2XMEM is not set |
927 | # CONFIG_FB_BFIN_T350MCQB is not set | ||
928 | # CONFIG_FB_S1D13XXX is not set | 928 | # CONFIG_FB_S1D13XXX is not set |
929 | # CONFIG_FB_VIRTUAL is not set | 929 | # CONFIG_FB_VIRTUAL is not set |
930 | # CONFIG_LOGO is not set | 930 | # CONFIG_LOGO is not set |
@@ -979,11 +979,6 @@ CONFIG_SND_BFIN_AD73311_SE=4 | |||
979 | # CONFIG_SND_SOC is not set | 979 | # CONFIG_SND_SOC is not set |
980 | 980 | ||
981 | # | 981 | # |
982 | # SoC Audio for the ADI Blackfin | ||
983 | # | ||
984 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set | ||
985 | |||
986 | # | ||
987 | # Open Sound System | 982 | # Open Sound System |
988 | # | 983 | # |
989 | # CONFIG_SOUND_PRIME is not set | 984 | # CONFIG_SOUND_PRIME is not set |
diff --git a/arch/blackfin/configs/BF537-STAMP_defconfig b/arch/blackfin/configs/BF537-STAMP_defconfig index 07eb63dc25e0..f812b66318b9 100644 --- a/arch/blackfin/configs/BF537-STAMP_defconfig +++ b/arch/blackfin/configs/BF537-STAMP_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.6 | 3 | # Linux kernel version: 2.6.22.12 |
4 | # | 4 | # |
5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -8,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
9 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
10 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
11 | CONFIG_BFIN=y | ||
12 | CONFIG_SEMAPHORE_SLEEPERS=y | 11 | CONFIG_SEMAPHORE_SLEEPERS=y |
13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 12 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
14 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
@@ -18,7 +17,6 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
18 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
21 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 21 | ||
24 | # | 22 | # |
@@ -64,7 +62,6 @@ CONFIG_FUTEX=y | |||
64 | CONFIG_ANON_INODES=y | 62 | CONFIG_ANON_INODES=y |
65 | CONFIG_EPOLL=y | 63 | CONFIG_EPOLL=y |
66 | CONFIG_SIGNALFD=y | 64 | CONFIG_SIGNALFD=y |
67 | CONFIG_TIMERFD=y | ||
68 | CONFIG_EVENTFD=y | 65 | CONFIG_EVENTFD=y |
69 | CONFIG_VM_EVENT_COUNTERS=y | 66 | CONFIG_VM_EVENT_COUNTERS=y |
70 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 |
@@ -117,6 +114,9 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
117 | # | 114 | # |
118 | # Processor and Board Settings | 115 | # Processor and Board Settings |
119 | # | 116 | # |
117 | # CONFIG_BF522 is not set | ||
118 | # CONFIG_BF525 is not set | ||
119 | # CONFIG_BF527 is not set | ||
120 | # CONFIG_BF531 is not set | 120 | # CONFIG_BF531 is not set |
121 | # CONFIG_BF532 is not set | 121 | # CONFIG_BF532 is not set |
122 | # CONFIG_BF533 is not set | 122 | # CONFIG_BF533 is not set |
@@ -125,10 +125,12 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
125 | CONFIG_BF537=y | 125 | CONFIG_BF537=y |
126 | # CONFIG_BF542 is not set | 126 | # CONFIG_BF542 is not set |
127 | # CONFIG_BF544 is not set | 127 | # CONFIG_BF544 is not set |
128 | # CONFIG_BF547 is not set | ||
128 | # CONFIG_BF548 is not set | 129 | # CONFIG_BF548 is not set |
129 | # CONFIG_BF549 is not set | 130 | # CONFIG_BF549 is not set |
130 | # CONFIG_BF561 is not set | 131 | # CONFIG_BF561 is not set |
131 | # CONFIG_BF_REV_0_0 is not set | 132 | # CONFIG_BF_REV_0_0 is not set |
133 | # CONFIG_BF_REV_0_1 is not set | ||
132 | CONFIG_BF_REV_0_2=y | 134 | CONFIG_BF_REV_0_2=y |
133 | # CONFIG_BF_REV_0_3 is not set | 135 | # CONFIG_BF_REV_0_3 is not set |
134 | # CONFIG_BF_REV_0_4 is not set | 136 | # CONFIG_BF_REV_0_4 is not set |
@@ -137,33 +139,8 @@ CONFIG_BF_REV_0_2=y | |||
137 | # CONFIG_BF_REV_NONE is not set | 139 | # CONFIG_BF_REV_NONE is not set |
138 | CONFIG_BF53x=y | 140 | CONFIG_BF53x=y |
139 | CONFIG_BFIN_SINGLE_CORE=y | 141 | CONFIG_BFIN_SINGLE_CORE=y |
140 | # CONFIG_BFIN533_EZKIT is not set | ||
141 | # CONFIG_BFIN533_STAMP is not set | ||
142 | CONFIG_BFIN537_STAMP=y | ||
143 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | ||
144 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | ||
145 | # CONFIG_BFIN548_EZKIT is not set | ||
146 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
147 | # CONFIG_BFIN561_EZKIT is not set | ||
148 | # CONFIG_BFIN561_TEPLA is not set | ||
149 | # CONFIG_PNAV10 is not set | ||
150 | # CONFIG_GENERIC_BOARD is not set | ||
151 | CONFIG_MEM_MT48LC32M8A2_75=y | 142 | CONFIG_MEM_MT48LC32M8A2_75=y |
152 | CONFIG_IRQ_PLL_WAKEUP=7 | 143 | CONFIG_IRQ_PLL_WAKEUP=7 |
153 | |||
154 | # | ||
155 | # BF537 Specific Configuration | ||
156 | # | ||
157 | |||
158 | # | ||
159 | # Interrupt Priority Assignment | ||
160 | # | ||
161 | |||
162 | # | ||
163 | # Priority | ||
164 | # | ||
165 | CONFIG_IRQ_DMA_ERROR=7 | ||
166 | CONFIG_IRQ_ERROR=7 | ||
167 | CONFIG_IRQ_RTC=8 | 144 | CONFIG_IRQ_RTC=8 |
168 | CONFIG_IRQ_PPI=8 | 145 | CONFIG_IRQ_PPI=8 |
169 | CONFIG_IRQ_SPORT0_RX=9 | 146 | CONFIG_IRQ_SPORT0_RX=9 |
@@ -176,8 +153,6 @@ CONFIG_IRQ_UART0_RX=10 | |||
176 | CONFIG_IRQ_UART0_TX=10 | 153 | CONFIG_IRQ_UART0_TX=10 |
177 | CONFIG_IRQ_UART1_RX=10 | 154 | CONFIG_IRQ_UART1_RX=10 |
178 | CONFIG_IRQ_UART1_TX=10 | 155 | CONFIG_IRQ_UART1_TX=10 |
179 | CONFIG_IRQ_CAN_RX=11 | ||
180 | CONFIG_IRQ_CAN_TX=11 | ||
181 | CONFIG_IRQ_MAC_RX=11 | 156 | CONFIG_IRQ_MAC_RX=11 |
182 | CONFIG_IRQ_MAC_TX=11 | 157 | CONFIG_IRQ_MAC_TX=11 |
183 | CONFIG_IRQ_TMR0=12 | 158 | CONFIG_IRQ_TMR0=12 |
@@ -188,11 +163,31 @@ CONFIG_IRQ_TMR4=12 | |||
188 | CONFIG_IRQ_TMR5=12 | 163 | CONFIG_IRQ_TMR5=12 |
189 | CONFIG_IRQ_TMR6=12 | 164 | CONFIG_IRQ_TMR6=12 |
190 | CONFIG_IRQ_TMR7=12 | 165 | CONFIG_IRQ_TMR7=12 |
191 | CONFIG_IRQ_PROG_INTA=12 | ||
192 | CONFIG_IRQ_PORTG_INTB=12 | 166 | CONFIG_IRQ_PORTG_INTB=12 |
193 | CONFIG_IRQ_MEM_DMA0=13 | 167 | CONFIG_IRQ_MEM_DMA0=13 |
194 | CONFIG_IRQ_MEM_DMA1=13 | 168 | CONFIG_IRQ_MEM_DMA1=13 |
195 | CONFIG_IRQ_WATCH=13 | 169 | CONFIG_IRQ_WATCH=13 |
170 | CONFIG_BFIN537_STAMP=y | ||
171 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | ||
172 | # CONFIG_PNAV10 is not set | ||
173 | # CONFIG_GENERIC_BF537_BOARD is not set | ||
174 | |||
175 | # | ||
176 | # BF537 Specific Configuration | ||
177 | # | ||
178 | |||
179 | # | ||
180 | # Interrupt Priority Assignment | ||
181 | # | ||
182 | |||
183 | # | ||
184 | # Priority | ||
185 | # | ||
186 | CONFIG_IRQ_DMA_ERROR=7 | ||
187 | CONFIG_IRQ_ERROR=7 | ||
188 | CONFIG_IRQ_CAN_RX=11 | ||
189 | CONFIG_IRQ_CAN_TX=11 | ||
190 | CONFIG_IRQ_PROG_INTA=12 | ||
196 | 191 | ||
197 | # | 192 | # |
198 | # Board customizations | 193 | # Board customizations |
@@ -206,7 +201,7 @@ CONFIG_CLKIN_HZ=25000000 | |||
206 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 201 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
207 | CONFIG_MAX_VCO_HZ=600000000 | 202 | CONFIG_MAX_VCO_HZ=600000000 |
208 | CONFIG_MIN_VCO_HZ=50000000 | 203 | CONFIG_MIN_VCO_HZ=50000000 |
209 | CONFIG_MAX_SCLK_HZ=133333333 | 204 | CONFIG_MAX_SCLK_HZ=133000000 |
210 | CONFIG_MIN_SCLK_HZ=27000000 | 205 | CONFIG_MIN_SCLK_HZ=27000000 |
211 | 206 | ||
212 | # | 207 | # |
@@ -263,6 +258,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
263 | # CONFIG_RESOURCES_64BIT is not set | 258 | # CONFIG_RESOURCES_64BIT is not set |
264 | CONFIG_ZONE_DMA_FLAG=1 | 259 | CONFIG_ZONE_DMA_FLAG=1 |
265 | CONFIG_LARGE_ALLOCS=y | 260 | CONFIG_LARGE_ALLOCS=y |
261 | # CONFIG_BFIN_GPTIMERS is not set | ||
266 | CONFIG_BFIN_DMA_5XX=y | 262 | CONFIG_BFIN_DMA_5XX=y |
267 | # CONFIG_DMA_UNCACHED_2M is not set | 263 | # CONFIG_DMA_UNCACHED_2M is not set |
268 | CONFIG_DMA_UNCACHED_1M=y | 264 | CONFIG_DMA_UNCACHED_1M=y |
@@ -284,7 +280,7 @@ CONFIG_L1_MAX_PIECE=16 | |||
284 | # | 280 | # |
285 | 281 | ||
286 | # | 282 | # |
287 | # EBIU_AMBCTL Global Control | 283 | # EBIU_AMGCTL Global Control |
288 | # | 284 | # |
289 | CONFIG_C_AMCKEN=y | 285 | CONFIG_C_AMCKEN=y |
290 | CONFIG_C_CDPRIO=y | 286 | CONFIG_C_CDPRIO=y |
@@ -534,14 +530,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
534 | CONFIG_MTD_BF5xx=m | 530 | CONFIG_MTD_BF5xx=m |
535 | CONFIG_BFIN_FLASH_SIZE=0x400000 | 531 | CONFIG_BFIN_FLASH_SIZE=0x400000 |
536 | CONFIG_EBIU_FLASH_BASE=0x20000000 | 532 | CONFIG_EBIU_FLASH_BASE=0x20000000 |
537 | |||
538 | # | ||
539 | # FLASH_EBIU_AMBCTL Control | ||
540 | # | ||
541 | CONFIG_BFIN_FLASH_BANK_0=0x7BB0 | ||
542 | CONFIG_BFIN_FLASH_BANK_1=0x7BB0 | ||
543 | CONFIG_BFIN_FLASH_BANK_2=0x7BB0 | ||
544 | CONFIG_BFIN_FLASH_BANK_3=0x7BB0 | ||
545 | # CONFIG_MTD_UCLINUX is not set | 533 | # CONFIG_MTD_UCLINUX is not set |
546 | # CONFIG_MTD_PLATRAM is not set | 534 | # CONFIG_MTD_PLATRAM is not set |
547 | 535 | ||
@@ -660,6 +648,7 @@ CONFIG_BFIN_RX_DESC_NUM=20 | |||
660 | # CONFIG_DM9000 is not set | 648 | # CONFIG_DM9000 is not set |
661 | CONFIG_NETDEV_1000=y | 649 | CONFIG_NETDEV_1000=y |
662 | CONFIG_NETDEV_10000=y | 650 | CONFIG_NETDEV_10000=y |
651 | # CONFIG_AX88180 is not set | ||
663 | 652 | ||
664 | # | 653 | # |
665 | # Wireless LAN | 654 | # Wireless LAN |
@@ -730,9 +719,9 @@ CONFIG_BFIN_TWIKEYPAD_IRQ_PFX=72 | |||
730 | # | 719 | # |
731 | # CONFIG_AD9960 is not set | 720 | # CONFIG_AD9960 is not set |
732 | # CONFIG_SPI_ADC_BF533 is not set | 721 | # CONFIG_SPI_ADC_BF533 is not set |
733 | # CONFIG_BFIN_PFLAGS is not set | 722 | # CONFIG_BF5xx_PFLAGS is not set |
734 | # CONFIG_BF5xx_PPIFCD is not set | 723 | # CONFIG_BF5xx_PPIFCD is not set |
735 | # CONFIG_BF5xx_TIMERS is not set | 724 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
736 | # CONFIG_BF5xx_PPI is not set | 725 | # CONFIG_BF5xx_PPI is not set |
737 | CONFIG_BFIN_SPORT=y | 726 | CONFIG_BFIN_SPORT=y |
738 | # CONFIG_BFIN_TIMER_LATENCY is not set | 727 | # CONFIG_BFIN_TIMER_LATENCY is not set |
@@ -967,6 +956,7 @@ CONFIG_FB_BF537_LQ035=m | |||
967 | CONFIG_LQ035_SLAVE_ADDR=0x58 | 956 | CONFIG_LQ035_SLAVE_ADDR=0x58 |
968 | # CONFIG_FB_BFIN_LANDSCAPE is not set | 957 | # CONFIG_FB_BFIN_LANDSCAPE is not set |
969 | # CONFIG_FB_BFIN_BGR is not set | 958 | # CONFIG_FB_BFIN_BGR is not set |
959 | # CONFIG_FB_BFIN_T350MCQB is not set | ||
970 | # CONFIG_FB_S1D13XXX is not set | 960 | # CONFIG_FB_S1D13XXX is not set |
971 | # CONFIG_FB_VIRTUAL is not set | 961 | # CONFIG_FB_VIRTUAL is not set |
972 | # CONFIG_LOGO is not set | 962 | # CONFIG_LOGO is not set |
@@ -1021,11 +1011,6 @@ CONFIG_SND_BFIN_AD73311_SE=4 | |||
1021 | # CONFIG_SND_SOC is not set | 1011 | # CONFIG_SND_SOC is not set |
1022 | 1012 | ||
1023 | # | 1013 | # |
1024 | # SoC Audio for the ADI Blackfin | ||
1025 | # | ||
1026 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set | ||
1027 | |||
1028 | # | ||
1029 | # Open Sound System | 1014 | # Open Sound System |
1030 | # | 1015 | # |
1031 | # CONFIG_SOUND_PRIME is not set | 1016 | # CONFIG_SOUND_PRIME is not set |
diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig index 0dd3d2253dc2..48367cc9fe35 100644 --- a/arch/blackfin/configs/BF548-EZKIT_defconfig +++ b/arch/blackfin/configs/BF548-EZKIT_defconfig | |||
@@ -1,7 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.10 | 3 | # Linux kernel version: 2.6.22.12 |
4 | # Sat Oct 27 02:34:07 2007 | ||
5 | # | 4 | # |
6 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
7 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -9,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
9 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
10 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
11 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
12 | CONFIG_BFIN=y | ||
13 | CONFIG_SEMAPHORE_SLEEPERS=y | 11 | CONFIG_SEMAPHORE_SLEEPERS=y |
14 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 12 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
15 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
@@ -19,7 +17,6 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
19 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
20 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
21 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
22 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
23 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
24 | 21 | ||
25 | # | 22 | # |
@@ -128,6 +125,7 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
128 | # CONFIG_BF537 is not set | 125 | # CONFIG_BF537 is not set |
129 | # CONFIG_BF542 is not set | 126 | # CONFIG_BF542 is not set |
130 | # CONFIG_BF544 is not set | 127 | # CONFIG_BF544 is not set |
128 | # CONFIG_BF547 is not set | ||
131 | # CONFIG_BF548 is not set | 129 | # CONFIG_BF548 is not set |
132 | CONFIG_BF549=y | 130 | CONFIG_BF549=y |
133 | # CONFIG_BF561 is not set | 131 | # CONFIG_BF561 is not set |
@@ -141,19 +139,6 @@ CONFIG_BF_REV_0_0=y | |||
141 | # CONFIG_BF_REV_NONE is not set | 139 | # CONFIG_BF_REV_NONE is not set |
142 | CONFIG_BF54x=y | 140 | CONFIG_BF54x=y |
143 | CONFIG_BFIN_SINGLE_CORE=y | 141 | CONFIG_BFIN_SINGLE_CORE=y |
144 | # CONFIG_BFIN527_EZKIT is not set | ||
145 | # CONFIG_BFIN533_EZKIT is not set | ||
146 | # CONFIG_BFIN533_STAMP is not set | ||
147 | # CONFIG_BFIN537_STAMP is not set | ||
148 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | ||
149 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | ||
150 | CONFIG_BFIN548_EZKIT=y | ||
151 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
152 | # CONFIG_BFIN561_EZKIT is not set | ||
153 | # CONFIG_BFIN561_TEPLA is not set | ||
154 | # CONFIG_PNAV10 is not set | ||
155 | # CONFIG_H8606_HVSISTEMAS is not set | ||
156 | # CONFIG_GENERIC_BOARD is not set | ||
157 | CONFIG_IRQ_PLL_WAKEUP=7 | 142 | CONFIG_IRQ_PLL_WAKEUP=7 |
158 | CONFIG_IRQ_RTC=8 | 143 | CONFIG_IRQ_RTC=8 |
159 | CONFIG_IRQ_SPORT0_RX=9 | 144 | CONFIG_IRQ_SPORT0_RX=9 |
@@ -180,6 +165,7 @@ CONFIG_IRQ_TIMER7=11 | |||
180 | CONFIG_IRQ_TIMER8=11 | 165 | CONFIG_IRQ_TIMER8=11 |
181 | CONFIG_IRQ_TIMER9=11 | 166 | CONFIG_IRQ_TIMER9=11 |
182 | CONFIG_IRQ_TIMER10=11 | 167 | CONFIG_IRQ_TIMER10=11 |
168 | CONFIG_BFIN548_EZKIT=y | ||
183 | 169 | ||
184 | # | 170 | # |
185 | # BF548 Specific Configuration | 171 | # BF548 Specific Configuration |
@@ -279,9 +265,9 @@ CONFIG_PINT3_ASSIGN=0x02020303 | |||
279 | # | 265 | # |
280 | CONFIG_CLKIN_HZ=25000000 | 266 | CONFIG_CLKIN_HZ=25000000 |
281 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 267 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
282 | CONFIG_MAX_VCO_HZ=533333333 | 268 | CONFIG_MAX_VCO_HZ=533000000 |
283 | CONFIG_MIN_VCO_HZ=50000000 | 269 | CONFIG_MIN_VCO_HZ=50000000 |
284 | CONFIG_MAX_SCLK_HZ=133333333 | 270 | CONFIG_MAX_SCLK_HZ=133000000 |
285 | CONFIG_MIN_SCLK_HZ=27000000 | 271 | CONFIG_MIN_SCLK_HZ=27000000 |
286 | 272 | ||
287 | # | 273 | # |
@@ -376,6 +362,9 @@ CONFIG_BANK_0=0x7BB0 | |||
376 | CONFIG_BANK_1=0x5554 | 362 | CONFIG_BANK_1=0x5554 |
377 | CONFIG_BANK_2=0x7BB0 | 363 | CONFIG_BANK_2=0x7BB0 |
378 | CONFIG_BANK_3=0x99B3 | 364 | CONFIG_BANK_3=0x99B3 |
365 | CONFIG_EBUI_MBSCTLVAL=0x0 | ||
366 | CONFIG_EBUI_MODEVAL=0x1 | ||
367 | CONFIG_EBUI_FCTLVAL=0x6 | ||
379 | 368 | ||
380 | # | 369 | # |
381 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | 370 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) |
@@ -702,6 +691,7 @@ CONFIG_SMSC911X=y | |||
702 | # CONFIG_DM9000 is not set | 691 | # CONFIG_DM9000 is not set |
703 | CONFIG_NETDEV_1000=y | 692 | CONFIG_NETDEV_1000=y |
704 | CONFIG_NETDEV_10000=y | 693 | CONFIG_NETDEV_10000=y |
694 | # CONFIG_AX88180 is not set | ||
705 | 695 | ||
706 | # | 696 | # |
707 | # Wireless LAN | 697 | # Wireless LAN |
@@ -1058,6 +1048,8 @@ CONFIG_SND_SOC=y | |||
1058 | CONFIG_SND_BF5XX_SOC=y | 1048 | CONFIG_SND_BF5XX_SOC=y |
1059 | CONFIG_SND_BF5XX_SOC_AC97=y | 1049 | CONFIG_SND_BF5XX_SOC_AC97=y |
1060 | CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y | 1050 | CONFIG_SND_BF5XX_SOC_BF548_EZKIT=y |
1051 | # CONFIG_SND_BF5XX_SOC_WM8750 is not set | ||
1052 | # CONFIG_SND_BF5XX_SOC_WM8731 is not set | ||
1061 | CONFIG_SND_BF5XX_SPORT_NUM=0 | 1053 | CONFIG_SND_BF5XX_SPORT_NUM=0 |
1062 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set | 1054 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set |
1063 | CONFIG_SND_SOC_AD1980=y | 1055 | CONFIG_SND_SOC_AD1980=y |
diff --git a/arch/blackfin/configs/BF561-EZKIT_defconfig b/arch/blackfin/configs/BF561-EZKIT_defconfig index 277d72dac0f9..e9f100b45eb1 100644 --- a/arch/blackfin/configs/BF561-EZKIT_defconfig +++ b/arch/blackfin/configs/BF561-EZKIT_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.6 | 3 | # Linux kernel version: 2.6.22.12 |
4 | # | 4 | # |
5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -8,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
9 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
10 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
11 | CONFIG_BFIN=y | ||
12 | CONFIG_SEMAPHORE_SLEEPERS=y | 11 | CONFIG_SEMAPHORE_SLEEPERS=y |
13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 12 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
14 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
@@ -18,7 +17,6 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
18 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
21 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 21 | ||
24 | # | 22 | # |
@@ -64,7 +62,6 @@ CONFIG_FUTEX=y | |||
64 | CONFIG_ANON_INODES=y | 62 | CONFIG_ANON_INODES=y |
65 | CONFIG_EPOLL=y | 63 | CONFIG_EPOLL=y |
66 | CONFIG_SIGNALFD=y | 64 | CONFIG_SIGNALFD=y |
67 | CONFIG_TIMERFD=y | ||
68 | CONFIG_EVENTFD=y | 65 | CONFIG_EVENTFD=y |
69 | CONFIG_VM_EVENT_COUNTERS=y | 66 | CONFIG_VM_EVENT_COUNTERS=y |
70 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | 67 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 |
@@ -117,6 +114,9 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
117 | # | 114 | # |
118 | # Processor and Board Settings | 115 | # Processor and Board Settings |
119 | # | 116 | # |
117 | # CONFIG_BF522 is not set | ||
118 | # CONFIG_BF525 is not set | ||
119 | # CONFIG_BF527 is not set | ||
120 | # CONFIG_BF531 is not set | 120 | # CONFIG_BF531 is not set |
121 | # CONFIG_BF532 is not set | 121 | # CONFIG_BF532 is not set |
122 | # CONFIG_BF533 is not set | 122 | # CONFIG_BF533 is not set |
@@ -125,10 +125,12 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
125 | # CONFIG_BF537 is not set | 125 | # CONFIG_BF537 is not set |
126 | # CONFIG_BF542 is not set | 126 | # CONFIG_BF542 is not set |
127 | # CONFIG_BF544 is not set | 127 | # CONFIG_BF544 is not set |
128 | # CONFIG_BF547 is not set | ||
128 | # CONFIG_BF548 is not set | 129 | # CONFIG_BF548 is not set |
129 | # CONFIG_BF549 is not set | 130 | # CONFIG_BF549 is not set |
130 | CONFIG_BF561=y | 131 | CONFIG_BF561=y |
131 | # CONFIG_BF_REV_0_0 is not set | 132 | # CONFIG_BF_REV_0_0 is not set |
133 | # CONFIG_BF_REV_0_1 is not set | ||
132 | # CONFIG_BF_REV_0_2 is not set | 134 | # CONFIG_BF_REV_0_2 is not set |
133 | CONFIG_BF_REV_0_3=y | 135 | CONFIG_BF_REV_0_3=y |
134 | # CONFIG_BF_REV_0_4 is not set | 136 | # CONFIG_BF_REV_0_4 is not set |
@@ -136,18 +138,15 @@ CONFIG_BF_REV_0_3=y | |||
136 | # CONFIG_BF_REV_ANY is not set | 138 | # CONFIG_BF_REV_ANY is not set |
137 | # CONFIG_BF_REV_NONE is not set | 139 | # CONFIG_BF_REV_NONE is not set |
138 | CONFIG_BFIN_DUAL_CORE=y | 140 | CONFIG_BFIN_DUAL_CORE=y |
139 | # CONFIG_BFIN533_EZKIT is not set | 141 | CONFIG_MEM_MT48LC16M16A2TG_75=y |
140 | # CONFIG_BFIN533_STAMP is not set | 142 | CONFIG_IRQ_PLL_WAKEUP=7 |
141 | # CONFIG_BFIN537_STAMP is not set | 143 | CONFIG_IRQ_SPORT0_ERROR=7 |
142 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | 144 | CONFIG_IRQ_SPORT1_ERROR=7 |
143 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | 145 | CONFIG_IRQ_SPI_ERROR=7 |
144 | # CONFIG_BFIN548_EZKIT is not set | ||
145 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
146 | CONFIG_BFIN561_EZKIT=y | 146 | CONFIG_BFIN561_EZKIT=y |
147 | # CONFIG_BFIN561_TEPLA is not set | 147 | # CONFIG_BFIN561_TEPLA is not set |
148 | # CONFIG_PNAV10 is not set | 148 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set |
149 | # CONFIG_GENERIC_BOARD is not set | 149 | # CONFIG_GENERIC_BF561_BOARD is not set |
150 | CONFIG_MEM_MT48LC16M16A2TG_75=y | ||
151 | 150 | ||
152 | # | 151 | # |
153 | # BF561 Specific Configuration | 152 | # BF561 Specific Configuration |
@@ -170,15 +169,11 @@ CONFIG_BF561_COREB_RESET=y | |||
170 | # | 169 | # |
171 | # Priority | 170 | # Priority |
172 | # | 171 | # |
173 | CONFIG_IRQ_PLL_WAKEUP=7 | ||
174 | CONFIG_IRQ_DMA1_ERROR=7 | 172 | CONFIG_IRQ_DMA1_ERROR=7 |
175 | CONFIG_IRQ_DMA2_ERROR=7 | 173 | CONFIG_IRQ_DMA2_ERROR=7 |
176 | CONFIG_IRQ_IMDMA_ERROR=7 | 174 | CONFIG_IRQ_IMDMA_ERROR=7 |
177 | CONFIG_IRQ_PPI0_ERROR=7 | 175 | CONFIG_IRQ_PPI0_ERROR=7 |
178 | CONFIG_IRQ_PPI1_ERROR=7 | 176 | CONFIG_IRQ_PPI1_ERROR=7 |
179 | CONFIG_IRQ_SPORT0_ERROR=7 | ||
180 | CONFIG_IRQ_SPORT1_ERROR=7 | ||
181 | CONFIG_IRQ_SPI_ERROR=7 | ||
182 | CONFIG_IRQ_UART_ERROR=7 | 177 | CONFIG_IRQ_UART_ERROR=7 |
183 | CONFIG_IRQ_RESERVED_ERROR=7 | 178 | CONFIG_IRQ_RESERVED_ERROR=7 |
184 | CONFIG_IRQ_DMA1_0=8 | 179 | CONFIG_IRQ_DMA1_0=8 |
@@ -243,7 +238,7 @@ CONFIG_CLKIN_HZ=30000000 | |||
243 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 238 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
244 | CONFIG_MAX_VCO_HZ=600000000 | 239 | CONFIG_MAX_VCO_HZ=600000000 |
245 | CONFIG_MIN_VCO_HZ=50000000 | 240 | CONFIG_MIN_VCO_HZ=50000000 |
246 | CONFIG_MAX_SCLK_HZ=133333333 | 241 | CONFIG_MAX_SCLK_HZ=133000000 |
247 | CONFIG_MIN_SCLK_HZ=27000000 | 242 | CONFIG_MIN_SCLK_HZ=27000000 |
248 | 243 | ||
249 | # | 244 | # |
@@ -300,6 +295,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
300 | # CONFIG_RESOURCES_64BIT is not set | 295 | # CONFIG_RESOURCES_64BIT is not set |
301 | CONFIG_ZONE_DMA_FLAG=1 | 296 | CONFIG_ZONE_DMA_FLAG=1 |
302 | CONFIG_LARGE_ALLOCS=y | 297 | CONFIG_LARGE_ALLOCS=y |
298 | # CONFIG_BFIN_GPTIMERS is not set | ||
303 | CONFIG_BFIN_DMA_5XX=y | 299 | CONFIG_BFIN_DMA_5XX=y |
304 | # CONFIG_DMA_UNCACHED_2M is not set | 300 | # CONFIG_DMA_UNCACHED_2M is not set |
305 | CONFIG_DMA_UNCACHED_1M=y | 301 | CONFIG_DMA_UNCACHED_1M=y |
@@ -321,7 +317,7 @@ CONFIG_L1_MAX_PIECE=16 | |||
321 | # | 317 | # |
322 | 318 | ||
323 | # | 319 | # |
324 | # EBIU_AMBCTL Global Control | 320 | # EBIU_AMGCTL Global Control |
325 | # | 321 | # |
326 | CONFIG_C_AMCKEN=y | 322 | CONFIG_C_AMCKEN=y |
327 | CONFIG_C_CDPRIO=y | 323 | CONFIG_C_CDPRIO=y |
@@ -564,14 +560,6 @@ CONFIG_MTD_COMPLEX_MAPPINGS=y | |||
564 | CONFIG_MTD_BF5xx=m | 560 | CONFIG_MTD_BF5xx=m |
565 | CONFIG_BFIN_FLASH_SIZE=0x0400000 | 561 | CONFIG_BFIN_FLASH_SIZE=0x0400000 |
566 | CONFIG_EBIU_FLASH_BASE=0x20000000 | 562 | CONFIG_EBIU_FLASH_BASE=0x20000000 |
567 | |||
568 | # | ||
569 | # FLASH_EBIU_AMBCTL Control | ||
570 | # | ||
571 | CONFIG_BFIN_FLASH_BANK_0=0x7BB0 | ||
572 | CONFIG_BFIN_FLASH_BANK_1=0x7BB0 | ||
573 | CONFIG_BFIN_FLASH_BANK_2=0x7BB0 | ||
574 | CONFIG_BFIN_FLASH_BANK_3=0x7BB0 | ||
575 | # CONFIG_MTD_UCLINUX is not set | 563 | # CONFIG_MTD_UCLINUX is not set |
576 | # CONFIG_MTD_PLATRAM is not set | 564 | # CONFIG_MTD_PLATRAM is not set |
577 | 565 | ||
@@ -660,6 +648,7 @@ CONFIG_SMC91X=y | |||
660 | # CONFIG_DM9000 is not set | 648 | # CONFIG_DM9000 is not set |
661 | CONFIG_NETDEV_1000=y | 649 | CONFIG_NETDEV_1000=y |
662 | CONFIG_NETDEV_10000=y | 650 | CONFIG_NETDEV_10000=y |
651 | # CONFIG_AX88180 is not set | ||
663 | 652 | ||
664 | # | 653 | # |
665 | # Wireless LAN | 654 | # Wireless LAN |
@@ -721,9 +710,9 @@ CONFIG_INPUT_EVDEV=m | |||
721 | # | 710 | # |
722 | # CONFIG_AD9960 is not set | 711 | # CONFIG_AD9960 is not set |
723 | # CONFIG_SPI_ADC_BF533 is not set | 712 | # CONFIG_SPI_ADC_BF533 is not set |
724 | # CONFIG_BFIN_PFLAGS is not set | 713 | # CONFIG_BF5xx_PFLAGS is not set |
725 | # CONFIG_BF5xx_PPIFCD is not set | 714 | # CONFIG_BF5xx_PPIFCD is not set |
726 | # CONFIG_BF5xx_TIMERS is not set | 715 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
727 | # CONFIG_BF5xx_PPI is not set | 716 | # CONFIG_BF5xx_PPI is not set |
728 | # CONFIG_BFIN_SPORT is not set | 717 | # CONFIG_BFIN_SPORT is not set |
729 | # CONFIG_BFIN_TIMER_LATENCY is not set | 718 | # CONFIG_BFIN_TIMER_LATENCY is not set |
diff --git a/arch/blackfin/configs/H8606_defconfig b/arch/blackfin/configs/H8606_defconfig new file mode 100644 index 000000000000..18cbb8c3c373 --- /dev/null +++ b/arch/blackfin/configs/H8606_defconfig | |||
@@ -0,0 +1,1160 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.22.12 | ||
4 | # | ||
5 | # CONFIG_MMU is not set | ||
6 | # CONFIG_FPU is not set | ||
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | ||
8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | ||
9 | CONFIG_BLACKFIN=y | ||
10 | CONFIG_ZONE_DMA=y | ||
11 | CONFIG_SEMAPHORE_SLEEPERS=y | ||
12 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
13 | CONFIG_GENERIC_HWEIGHT=y | ||
14 | CONFIG_GENERIC_HARDIRQS=y | ||
15 | CONFIG_GENERIC_IRQ_PROBE=y | ||
16 | # CONFIG_GENERIC_TIME is not set | ||
17 | CONFIG_GENERIC_GPIO=y | ||
18 | CONFIG_FORCE_MAX_ZONEORDER=14 | ||
19 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
21 | |||
22 | # | ||
23 | # Code maturity level options | ||
24 | # | ||
25 | CONFIG_EXPERIMENTAL=y | ||
26 | CONFIG_BROKEN_ON_SMP=y | ||
27 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
28 | |||
29 | # | ||
30 | # General setup | ||
31 | # | ||
32 | CONFIG_LOCALVERSION="" | ||
33 | CONFIG_LOCALVERSION_AUTO=y | ||
34 | CONFIG_SYSVIPC=y | ||
35 | # CONFIG_IPC_NS is not set | ||
36 | CONFIG_SYSVIPC_SYSCTL=y | ||
37 | # CONFIG_POSIX_MQUEUE is not set | ||
38 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
39 | # CONFIG_TASKSTATS is not set | ||
40 | # CONFIG_UTS_NS is not set | ||
41 | # CONFIG_AUDIT is not set | ||
42 | # CONFIG_IKCONFIG is not set | ||
43 | CONFIG_LOG_BUF_SHIFT=14 | ||
44 | CONFIG_SYSFS_DEPRECATED=y | ||
45 | # CONFIG_RELAY is not set | ||
46 | # CONFIG_BLK_DEV_INITRD is not set | ||
47 | # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set | ||
48 | CONFIG_SYSCTL=y | ||
49 | CONFIG_EMBEDDED=y | ||
50 | CONFIG_UID16=y | ||
51 | CONFIG_SYSCTL_SYSCALL=y | ||
52 | CONFIG_KALLSYMS=y | ||
53 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
54 | CONFIG_HOTPLUG=y | ||
55 | CONFIG_PRINTK=y | ||
56 | CONFIG_BUG=y | ||
57 | CONFIG_ELF_CORE=y | ||
58 | CONFIG_BASE_FULL=y | ||
59 | CONFIG_FUTEX=y | ||
60 | CONFIG_ANON_INODES=y | ||
61 | CONFIG_EPOLL=y | ||
62 | CONFIG_SIGNALFD=y | ||
63 | CONFIG_EVENTFD=y | ||
64 | CONFIG_VM_EVENT_COUNTERS=y | ||
65 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=3 | ||
66 | # CONFIG_NP2 is not set | ||
67 | CONFIG_SLAB=y | ||
68 | # CONFIG_SLUB is not set | ||
69 | # CONFIG_SLOB is not set | ||
70 | CONFIG_RT_MUTEXES=y | ||
71 | CONFIG_TINY_SHMEM=y | ||
72 | CONFIG_BASE_SMALL=0 | ||
73 | |||
74 | # | ||
75 | # Loadable module support | ||
76 | # | ||
77 | CONFIG_MODULES=y | ||
78 | CONFIG_MODULE_UNLOAD=y | ||
79 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
80 | # CONFIG_MODVERSIONS is not set | ||
81 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
82 | CONFIG_KMOD=y | ||
83 | |||
84 | # | ||
85 | # Block layer | ||
86 | # | ||
87 | CONFIG_BLOCK=y | ||
88 | # CONFIG_LBD is not set | ||
89 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
90 | # CONFIG_LSF is not set | ||
91 | |||
92 | # | ||
93 | # IO Schedulers | ||
94 | # | ||
95 | CONFIG_IOSCHED_NOOP=y | ||
96 | CONFIG_IOSCHED_AS=y | ||
97 | # CONFIG_IOSCHED_DEADLINE is not set | ||
98 | CONFIG_IOSCHED_CFQ=y | ||
99 | CONFIG_DEFAULT_AS=y | ||
100 | # CONFIG_DEFAULT_DEADLINE is not set | ||
101 | # CONFIG_DEFAULT_CFQ is not set | ||
102 | # CONFIG_DEFAULT_NOOP is not set | ||
103 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
104 | CONFIG_PREEMPT_NONE=y | ||
105 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
106 | # CONFIG_PREEMPT is not set | ||
107 | |||
108 | # | ||
109 | # Blackfin Processor Options | ||
110 | # | ||
111 | |||
112 | # | ||
113 | # Processor and Board Settings | ||
114 | # | ||
115 | # CONFIG_BF522 is not set | ||
116 | # CONFIG_BF525 is not set | ||
117 | # CONFIG_BF527 is not set | ||
118 | # CONFIG_BF531 is not set | ||
119 | CONFIG_BF532=y | ||
120 | # CONFIG_BF533 is not set | ||
121 | # CONFIG_BF534 is not set | ||
122 | # CONFIG_BF536 is not set | ||
123 | # CONFIG_BF537 is not set | ||
124 | # CONFIG_BF542 is not set | ||
125 | # CONFIG_BF544 is not set | ||
126 | # CONFIG_BF547 is not set | ||
127 | # CONFIG_BF548 is not set | ||
128 | # CONFIG_BF549 is not set | ||
129 | # CONFIG_BF561 is not set | ||
130 | # CONFIG_BF_REV_0_0 is not set | ||
131 | # CONFIG_BF_REV_0_1 is not set | ||
132 | # CONFIG_BF_REV_0_2 is not set | ||
133 | # CONFIG_BF_REV_0_3 is not set | ||
134 | # CONFIG_BF_REV_0_4 is not set | ||
135 | CONFIG_BF_REV_0_5=y | ||
136 | # CONFIG_BF_REV_ANY is not set | ||
137 | # CONFIG_BF_REV_NONE is not set | ||
138 | CONFIG_BF53x=y | ||
139 | CONFIG_BFIN_SINGLE_CORE=y | ||
140 | CONFIG_MEM_MT48LC16M16A2TG_75=y | ||
141 | # CONFIG_BFIN533_EZKIT is not set | ||
142 | # CONFIG_BFIN533_STAMP is not set | ||
143 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | ||
144 | CONFIG_H8606_HVSISTEMAS=y | ||
145 | # CONFIG_GENERIC_BF533_BOARD is not set | ||
146 | |||
147 | # | ||
148 | # BF533/2/1 Specific Configuration | ||
149 | # | ||
150 | |||
151 | # | ||
152 | # Interrupt Priority Assignment | ||
153 | # | ||
154 | |||
155 | # | ||
156 | # Priority | ||
157 | # | ||
158 | CONFIG_UART_ERROR=7 | ||
159 | CONFIG_SPORT0_ERROR=7 | ||
160 | CONFIG_SPI_ERROR=7 | ||
161 | CONFIG_SPORT1_ERROR=7 | ||
162 | CONFIG_PPI_ERROR=7 | ||
163 | CONFIG_DMA_ERROR=7 | ||
164 | CONFIG_PLLWAKE_ERROR=7 | ||
165 | CONFIG_RTC_ERROR=8 | ||
166 | CONFIG_DMA0_PPI=8 | ||
167 | CONFIG_DMA1_SPORT0RX=9 | ||
168 | CONFIG_DMA2_SPORT0TX=9 | ||
169 | CONFIG_DMA3_SPORT1RX=9 | ||
170 | CONFIG_DMA4_SPORT1TX=9 | ||
171 | CONFIG_DMA5_SPI=10 | ||
172 | CONFIG_DMA6_UARTRX=10 | ||
173 | CONFIG_DMA7_UARTTX=10 | ||
174 | CONFIG_TIMER0=11 | ||
175 | CONFIG_TIMER1=11 | ||
176 | CONFIG_TIMER2=11 | ||
177 | CONFIG_PFA=12 | ||
178 | CONFIG_PFB=12 | ||
179 | CONFIG_MEMDMA0=13 | ||
180 | CONFIG_MEMDMA1=13 | ||
181 | CONFIG_WDTIMER=13 | ||
182 | |||
183 | # | ||
184 | # Board customizations | ||
185 | # | ||
186 | # CONFIG_CMDLINE_BOOL is not set | ||
187 | |||
188 | # | ||
189 | # Clock/PLL Setup | ||
190 | # | ||
191 | CONFIG_CLKIN_HZ=25000000 | ||
192 | # CONFIG_BFIN_KERNEL_CLOCK is not set | ||
193 | CONFIG_MAX_VCO_HZ=400000000 | ||
194 | CONFIG_MIN_VCO_HZ=50000000 | ||
195 | CONFIG_MAX_SCLK_HZ=133000000 | ||
196 | CONFIG_MIN_SCLK_HZ=27000000 | ||
197 | |||
198 | # | ||
199 | # Kernel Timer/Scheduler | ||
200 | # | ||
201 | # CONFIG_HZ_100 is not set | ||
202 | CONFIG_HZ_250=y | ||
203 | # CONFIG_HZ_300 is not set | ||
204 | # CONFIG_HZ_1000 is not set | ||
205 | CONFIG_HZ=250 | ||
206 | |||
207 | # | ||
208 | # Memory Setup | ||
209 | # | ||
210 | CONFIG_MEM_SIZE=32 | ||
211 | CONFIG_MEM_ADD_WIDTH=9 | ||
212 | CONFIG_BOOT_LOAD=0x1000 | ||
213 | CONFIG_BFIN_SCRATCH_REG_RETN=y | ||
214 | # CONFIG_BFIN_SCRATCH_REG_RETE is not set | ||
215 | # CONFIG_BFIN_SCRATCH_REG_CYCLES is not set | ||
216 | |||
217 | # | ||
218 | # Blackfin Kernel Optimizations | ||
219 | # | ||
220 | |||
221 | # | ||
222 | # Memory Optimizations | ||
223 | # | ||
224 | CONFIG_I_ENTRY_L1=y | ||
225 | CONFIG_EXCPT_IRQ_SYSC_L1=y | ||
226 | CONFIG_DO_IRQ_L1=y | ||
227 | CONFIG_CORE_TIMER_IRQ_L1=y | ||
228 | CONFIG_IDLE_L1=y | ||
229 | CONFIG_SCHEDULE_L1=y | ||
230 | CONFIG_ARITHMETIC_OPS_L1=y | ||
231 | CONFIG_ACCESS_OK_L1=y | ||
232 | CONFIG_MEMSET_L1=y | ||
233 | CONFIG_MEMCPY_L1=y | ||
234 | CONFIG_SYS_BFIN_SPINLOCK_L1=y | ||
235 | # CONFIG_IP_CHECKSUM_L1 is not set | ||
236 | # CONFIG_CACHELINE_ALIGNED_L1 is not set | ||
237 | # CONFIG_SYSCALL_TAB_L1 is not set | ||
238 | # CONFIG_CPLB_SWITCH_TAB_L1 is not set | ||
239 | CONFIG_RAMKERNEL=y | ||
240 | # CONFIG_ROMKERNEL is not set | ||
241 | CONFIG_SELECT_MEMORY_MODEL=y | ||
242 | CONFIG_FLATMEM_MANUAL=y | ||
243 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
244 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
245 | CONFIG_FLATMEM=y | ||
246 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
247 | # CONFIG_SPARSEMEM_STATIC is not set | ||
248 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
249 | # CONFIG_RESOURCES_64BIT is not set | ||
250 | CONFIG_ZONE_DMA_FLAG=1 | ||
251 | CONFIG_LARGE_ALLOCS=y | ||
252 | CONFIG_BFIN_GPTIMERS=y | ||
253 | CONFIG_BFIN_DMA_5XX=y | ||
254 | # CONFIG_DMA_UNCACHED_2M is not set | ||
255 | CONFIG_DMA_UNCACHED_1M=y | ||
256 | # CONFIG_DMA_UNCACHED_NONE is not set | ||
257 | |||
258 | # | ||
259 | # Cache Support | ||
260 | # | ||
261 | CONFIG_BFIN_ICACHE=y | ||
262 | CONFIG_BFIN_DCACHE=y | ||
263 | # CONFIG_BFIN_DCACHE_BANKA is not set | ||
264 | CONFIG_BFIN_ICACHE_LOCK=y | ||
265 | CONFIG_BFIN_WB=y | ||
266 | # CONFIG_BFIN_WT is not set | ||
267 | CONFIG_L1_MAX_PIECE=16 | ||
268 | |||
269 | # | ||
270 | # Asynchonous Memory Configuration | ||
271 | # | ||
272 | |||
273 | # | ||
274 | # EBIU_AMGCTL Global Control | ||
275 | # | ||
276 | CONFIG_C_AMCKEN=y | ||
277 | CONFIG_C_CDPRIO=y | ||
278 | # CONFIG_C_AMBEN is not set | ||
279 | # CONFIG_C_AMBEN_B0 is not set | ||
280 | # CONFIG_C_AMBEN_B0_B1 is not set | ||
281 | # CONFIG_C_AMBEN_B0_B1_B2 is not set | ||
282 | CONFIG_C_AMBEN_ALL=y | ||
283 | |||
284 | # | ||
285 | # EBIU_AMBCTL Control | ||
286 | # | ||
287 | CONFIG_BANK_0=0x7BB0 | ||
288 | CONFIG_BANK_1=0x7BB0 | ||
289 | CONFIG_BANK_2=0x7BB0 | ||
290 | CONFIG_BANK_3=0x99B3 | ||
291 | |||
292 | # | ||
293 | # Bus options (PCI, PCMCIA, EISA, MCA, ISA) | ||
294 | # | ||
295 | # CONFIG_PCI is not set | ||
296 | # CONFIG_ARCH_SUPPORTS_MSI is not set | ||
297 | |||
298 | # | ||
299 | # PCCARD (PCMCIA/CardBus) support | ||
300 | # | ||
301 | # CONFIG_PCCARD is not set | ||
302 | |||
303 | # | ||
304 | # Executable file formats | ||
305 | # | ||
306 | CONFIG_BINFMT_ELF_FDPIC=y | ||
307 | CONFIG_BINFMT_FLAT=y | ||
308 | CONFIG_BINFMT_ZFLAT=y | ||
309 | # CONFIG_BINFMT_SHARED_FLAT is not set | ||
310 | # CONFIG_BINFMT_MISC is not set | ||
311 | |||
312 | # | ||
313 | # Power management options | ||
314 | # | ||
315 | CONFIG_PM=y | ||
316 | CONFIG_PM_LEGACY=y | ||
317 | # CONFIG_PM_DEBUG is not set | ||
318 | # CONFIG_PM_SYSFS_DEPRECATED is not set | ||
319 | CONFIG_PM_WAKEUP_GPIO_BY_SIC_IWR=y | ||
320 | # CONFIG_PM_WAKEUP_BY_GPIO is not set | ||
321 | # CONFIG_PM_WAKEUP_GPIO_API is not set | ||
322 | CONFIG_PM_WAKEUP_SIC_IWR=0x100000 | ||
323 | |||
324 | # | ||
325 | # Networking | ||
326 | # | ||
327 | CONFIG_NET=y | ||
328 | |||
329 | # | ||
330 | # Networking options | ||
331 | # | ||
332 | CONFIG_PACKET=y | ||
333 | # CONFIG_PACKET_MMAP is not set | ||
334 | CONFIG_UNIX=y | ||
335 | CONFIG_XFRM=y | ||
336 | # CONFIG_XFRM_USER is not set | ||
337 | # CONFIG_XFRM_SUB_POLICY is not set | ||
338 | # CONFIG_XFRM_MIGRATE is not set | ||
339 | # CONFIG_NET_KEY is not set | ||
340 | CONFIG_INET=y | ||
341 | # CONFIG_IP_MULTICAST is not set | ||
342 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
343 | CONFIG_IP_FIB_HASH=y | ||
344 | CONFIG_IP_PNP=y | ||
345 | # CONFIG_IP_PNP_DHCP is not set | ||
346 | # CONFIG_IP_PNP_BOOTP is not set | ||
347 | # CONFIG_IP_PNP_RARP is not set | ||
348 | # CONFIG_NET_IPIP is not set | ||
349 | # CONFIG_NET_IPGRE is not set | ||
350 | # CONFIG_ARPD is not set | ||
351 | CONFIG_SYN_COOKIES=y | ||
352 | # CONFIG_INET_AH is not set | ||
353 | # CONFIG_INET_ESP is not set | ||
354 | # CONFIG_INET_IPCOMP is not set | ||
355 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
356 | # CONFIG_INET_TUNNEL is not set | ||
357 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
358 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
359 | CONFIG_INET_XFRM_MODE_BEET=y | ||
360 | CONFIG_INET_DIAG=y | ||
361 | CONFIG_INET_TCP_DIAG=y | ||
362 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
363 | CONFIG_TCP_CONG_CUBIC=y | ||
364 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
365 | # CONFIG_TCP_MD5SIG is not set | ||
366 | # CONFIG_IPV6 is not set | ||
367 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
368 | # CONFIG_INET6_TUNNEL is not set | ||
369 | # CONFIG_NETLABEL is not set | ||
370 | # CONFIG_NETWORK_SECMARK is not set | ||
371 | # CONFIG_NETFILTER is not set | ||
372 | # CONFIG_IP_DCCP is not set | ||
373 | # CONFIG_IP_SCTP is not set | ||
374 | # CONFIG_TIPC is not set | ||
375 | # CONFIG_ATM is not set | ||
376 | # CONFIG_BRIDGE is not set | ||
377 | # CONFIG_VLAN_8021Q is not set | ||
378 | # CONFIG_DECNET is not set | ||
379 | # CONFIG_LLC2 is not set | ||
380 | # CONFIG_IPX is not set | ||
381 | # CONFIG_ATALK is not set | ||
382 | # CONFIG_X25 is not set | ||
383 | # CONFIG_LAPB is not set | ||
384 | # CONFIG_ECONET is not set | ||
385 | # CONFIG_WAN_ROUTER is not set | ||
386 | |||
387 | # | ||
388 | # QoS and/or fair queueing | ||
389 | # | ||
390 | # CONFIG_NET_SCHED is not set | ||
391 | |||
392 | # | ||
393 | # Network testing | ||
394 | # | ||
395 | # CONFIG_NET_PKTGEN is not set | ||
396 | # CONFIG_HAMRADIO is not set | ||
397 | CONFIG_IRDA=m | ||
398 | |||
399 | # | ||
400 | # IrDA protocols | ||
401 | # | ||
402 | CONFIG_IRLAN=m | ||
403 | CONFIG_IRCOMM=m | ||
404 | # CONFIG_IRDA_ULTRA is not set | ||
405 | |||
406 | # | ||
407 | # IrDA options | ||
408 | # | ||
409 | CONFIG_IRDA_CACHE_LAST_LSAP=y | ||
410 | # CONFIG_IRDA_FAST_RR is not set | ||
411 | # CONFIG_IRDA_DEBUG is not set | ||
412 | |||
413 | # | ||
414 | # Infrared-port device drivers | ||
415 | # | ||
416 | |||
417 | # | ||
418 | # SIR device drivers | ||
419 | # | ||
420 | CONFIG_IRTTY_SIR=m | ||
421 | |||
422 | # | ||
423 | # Dongle support | ||
424 | # | ||
425 | # CONFIG_DONGLE is not set | ||
426 | |||
427 | # | ||
428 | # Old SIR device drivers | ||
429 | # | ||
430 | # CONFIG_IRPORT_SIR is not set | ||
431 | |||
432 | # | ||
433 | # Old Serial dongle support | ||
434 | # | ||
435 | |||
436 | # | ||
437 | # FIR device drivers | ||
438 | # | ||
439 | # CONFIG_BT is not set | ||
440 | # CONFIG_AF_RXRPC is not set | ||
441 | |||
442 | # | ||
443 | # Wireless | ||
444 | # | ||
445 | # CONFIG_CFG80211 is not set | ||
446 | # CONFIG_WIRELESS_EXT is not set | ||
447 | # CONFIG_MAC80211 is not set | ||
448 | # CONFIG_IEEE80211 is not set | ||
449 | # CONFIG_RFKILL is not set | ||
450 | |||
451 | # | ||
452 | # Device Drivers | ||
453 | # | ||
454 | |||
455 | # | ||
456 | # Generic Driver Options | ||
457 | # | ||
458 | CONFIG_STANDALONE=y | ||
459 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
460 | # CONFIG_FW_LOADER is not set | ||
461 | # CONFIG_SYS_HYPERVISOR is not set | ||
462 | |||
463 | # | ||
464 | # Connector - unified userspace <-> kernelspace linker | ||
465 | # | ||
466 | # CONFIG_CONNECTOR is not set | ||
467 | CONFIG_MTD=y | ||
468 | # CONFIG_MTD_DEBUG is not set | ||
469 | # CONFIG_MTD_CONCAT is not set | ||
470 | CONFIG_MTD_PARTITIONS=y | ||
471 | # CONFIG_MTD_REDBOOT_PARTS is not set | ||
472 | # CONFIG_MTD_CMDLINE_PARTS is not set | ||
473 | |||
474 | # | ||
475 | # User Modules And Translation Layers | ||
476 | # | ||
477 | CONFIG_MTD_CHAR=y | ||
478 | CONFIG_MTD_BLKDEVS=y | ||
479 | CONFIG_MTD_BLOCK=y | ||
480 | # CONFIG_FTL is not set | ||
481 | # CONFIG_NFTL is not set | ||
482 | # CONFIG_INFTL is not set | ||
483 | # CONFIG_RFD_FTL is not set | ||
484 | # CONFIG_SSFDC is not set | ||
485 | |||
486 | # | ||
487 | # RAM/ROM/Flash chip drivers | ||
488 | # | ||
489 | # CONFIG_MTD_CFI is not set | ||
490 | # CONFIG_MTD_JEDECPROBE is not set | ||
491 | CONFIG_MTD_MAP_BANK_WIDTH_1=y | ||
492 | CONFIG_MTD_MAP_BANK_WIDTH_2=y | ||
493 | CONFIG_MTD_MAP_BANK_WIDTH_4=y | ||
494 | # CONFIG_MTD_MAP_BANK_WIDTH_8 is not set | ||
495 | # CONFIG_MTD_MAP_BANK_WIDTH_16 is not set | ||
496 | # CONFIG_MTD_MAP_BANK_WIDTH_32 is not set | ||
497 | CONFIG_MTD_CFI_I1=y | ||
498 | CONFIG_MTD_CFI_I2=y | ||
499 | # CONFIG_MTD_CFI_I4 is not set | ||
500 | # CONFIG_MTD_CFI_I8 is not set | ||
501 | CONFIG_MTD_RAM=y | ||
502 | CONFIG_MTD_ROM=y | ||
503 | # CONFIG_MTD_ABSENT is not set | ||
504 | |||
505 | # | ||
506 | # Mapping drivers for chip access | ||
507 | # | ||
508 | CONFIG_MTD_COMPLEX_MAPPINGS=y | ||
509 | # CONFIG_MTD_PHYSMAP is not set | ||
510 | # CONFIG_MTD_BF5xx is not set | ||
511 | # CONFIG_MTD_UCLINUX is not set | ||
512 | # CONFIG_MTD_PLATRAM is not set | ||
513 | |||
514 | # | ||
515 | # Self-contained MTD device drivers | ||
516 | # | ||
517 | # CONFIG_MTD_DATAFLASH is not set | ||
518 | CONFIG_MTD_M25P80=y | ||
519 | CONFIG_M25PXX_USE_FAST_READ=y | ||
520 | # CONFIG_MTD_SLRAM is not set | ||
521 | # CONFIG_MTD_PHRAM is not set | ||
522 | # CONFIG_MTD_MTDRAM is not set | ||
523 | # CONFIG_MTD_BLOCK2MTD is not set | ||
524 | |||
525 | # | ||
526 | # Disk-On-Chip Device Drivers | ||
527 | # | ||
528 | # CONFIG_MTD_DOC2000 is not set | ||
529 | # CONFIG_MTD_DOC2001 is not set | ||
530 | # CONFIG_MTD_DOC2001PLUS is not set | ||
531 | # CONFIG_MTD_NAND is not set | ||
532 | # CONFIG_MTD_ONENAND is not set | ||
533 | |||
534 | # | ||
535 | # UBI - Unsorted block images | ||
536 | # | ||
537 | # CONFIG_MTD_UBI is not set | ||
538 | |||
539 | # | ||
540 | # Parallel port support | ||
541 | # | ||
542 | # CONFIG_PARPORT is not set | ||
543 | |||
544 | # | ||
545 | # Plug and Play support | ||
546 | # | ||
547 | # CONFIG_PNPACPI is not set | ||
548 | |||
549 | # | ||
550 | # Block devices | ||
551 | # | ||
552 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
553 | # CONFIG_BLK_DEV_LOOP is not set | ||
554 | # CONFIG_BLK_DEV_NBD is not set | ||
555 | CONFIG_BLK_DEV_RAM=y | ||
556 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
557 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
558 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
559 | # CONFIG_CDROM_PKTCDVD is not set | ||
560 | # CONFIG_ATA_OVER_ETH is not set | ||
561 | |||
562 | # | ||
563 | # Misc devices | ||
564 | # | ||
565 | # CONFIG_IDE is not set | ||
566 | |||
567 | # | ||
568 | # SCSI device support | ||
569 | # | ||
570 | # CONFIG_RAID_ATTRS is not set | ||
571 | # CONFIG_SCSI is not set | ||
572 | # CONFIG_SCSI_NETLINK is not set | ||
573 | # CONFIG_ATA is not set | ||
574 | |||
575 | # | ||
576 | # Multi-device support (RAID and LVM) | ||
577 | # | ||
578 | # CONFIG_MD is not set | ||
579 | |||
580 | # | ||
581 | # Network device support | ||
582 | # | ||
583 | CONFIG_NETDEVICES=y | ||
584 | # CONFIG_DUMMY is not set | ||
585 | # CONFIG_BONDING is not set | ||
586 | # CONFIG_EQUALIZER is not set | ||
587 | # CONFIG_TUN is not set | ||
588 | # CONFIG_PHYLIB is not set | ||
589 | |||
590 | # | ||
591 | # Ethernet (10 or 100Mbit) | ||
592 | # | ||
593 | CONFIG_NET_ETHERNET=y | ||
594 | CONFIG_MII=y | ||
595 | # CONFIG_SMC91X is not set | ||
596 | # CONFIG_SMSC911X is not set | ||
597 | CONFIG_DM9000=y | ||
598 | CONFIG_NETDEV_1000=y | ||
599 | CONFIG_NETDEV_10000=y | ||
600 | # CONFIG_AX88180 is not set | ||
601 | |||
602 | # | ||
603 | # Wireless LAN | ||
604 | # | ||
605 | # CONFIG_WLAN_PRE80211 is not set | ||
606 | # CONFIG_WLAN_80211 is not set | ||
607 | # CONFIG_WAN is not set | ||
608 | # CONFIG_PPP is not set | ||
609 | # CONFIG_SLIP is not set | ||
610 | # CONFIG_SHAPER is not set | ||
611 | # CONFIG_NETCONSOLE is not set | ||
612 | # CONFIG_NETPOLL is not set | ||
613 | # CONFIG_NET_POLL_CONTROLLER is not set | ||
614 | |||
615 | # | ||
616 | # ISDN subsystem | ||
617 | # | ||
618 | # CONFIG_ISDN is not set | ||
619 | |||
620 | # | ||
621 | # Telephony Support | ||
622 | # | ||
623 | # CONFIG_PHONE is not set | ||
624 | |||
625 | # | ||
626 | # Input device support | ||
627 | # | ||
628 | CONFIG_INPUT=y | ||
629 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
630 | # CONFIG_INPUT_POLLDEV is not set | ||
631 | |||
632 | # | ||
633 | # Userland interfaces | ||
634 | # | ||
635 | # CONFIG_INPUT_MOUSEDEV is not set | ||
636 | # CONFIG_INPUT_JOYDEV is not set | ||
637 | # CONFIG_INPUT_TSDEV is not set | ||
638 | CONFIG_INPUT_EVDEV=m | ||
639 | # CONFIG_INPUT_EVBUG is not set | ||
640 | |||
641 | # | ||
642 | # Input Device Drivers | ||
643 | # | ||
644 | # CONFIG_INPUT_KEYBOARD is not set | ||
645 | # CONFIG_INPUT_MOUSE is not set | ||
646 | # CONFIG_INPUT_JOYSTICK is not set | ||
647 | # CONFIG_INPUT_TABLET is not set | ||
648 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
649 | CONFIG_INPUT_MISC=y | ||
650 | # CONFIG_INPUT_ATI_REMOTE is not set | ||
651 | # CONFIG_INPUT_ATI_REMOTE2 is not set | ||
652 | # CONFIG_INPUT_KEYSPAN_REMOTE is not set | ||
653 | # CONFIG_INPUT_POWERMATE is not set | ||
654 | # CONFIG_INPUT_YEALINK is not set | ||
655 | # CONFIG_INPUT_UINPUT is not set | ||
656 | # CONFIG_BF53X_PFBUTTONS is not set | ||
657 | |||
658 | # | ||
659 | # Hardware I/O ports | ||
660 | # | ||
661 | # CONFIG_SERIO is not set | ||
662 | # CONFIG_GAMEPORT is not set | ||
663 | |||
664 | # | ||
665 | # Character devices | ||
666 | # | ||
667 | # CONFIG_AD9960 is not set | ||
668 | # CONFIG_SPI_ADC_BF533 is not set | ||
669 | CONFIG_BF5xx_PFLAGS=y | ||
670 | # CONFIG_BF5xx_PFLAGS_PROC is not set | ||
671 | # CONFIG_BF5xx_PPIFCD is not set | ||
672 | CONFIG_BFIN_SIMPLE_TIMER=y | ||
673 | # CONFIG_BF5xx_PPI is not set | ||
674 | CONFIG_BFIN_SPORT=y | ||
675 | CONFIG_BFIN_TIMER_LATENCY=y | ||
676 | # CONFIG_AD5304 is not set | ||
677 | # CONFIG_BF5xx_FBDMA is not set | ||
678 | # CONFIG_VT is not set | ||
679 | # CONFIG_SERIAL_NONSTANDARD is not set | ||
680 | |||
681 | # | ||
682 | # Serial drivers | ||
683 | # | ||
684 | # CONFIG_SERIAL_8250 is not set | ||
685 | |||
686 | # | ||
687 | # Non-8250 serial port support | ||
688 | # | ||
689 | CONFIG_SERIAL_BFIN=y | ||
690 | CONFIG_SERIAL_BFIN_CONSOLE=y | ||
691 | CONFIG_SERIAL_BFIN_DMA=y | ||
692 | # CONFIG_SERIAL_BFIN_PIO is not set | ||
693 | CONFIG_SERIAL_BFIN_UART0=y | ||
694 | # CONFIG_BFIN_UART0_CTSRTS is not set | ||
695 | # CONFIG_SERIAL_BFIN_UART1 is not set | ||
696 | CONFIG_SERIAL_CORE=y | ||
697 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
698 | # CONFIG_SERIAL_BFIN_SPORT is not set | ||
699 | CONFIG_UNIX98_PTYS=y | ||
700 | # CONFIG_LEGACY_PTYS is not set | ||
701 | |||
702 | # | ||
703 | # CAN, the car bus and industrial fieldbus | ||
704 | # | ||
705 | # CONFIG_CAN4LINUX is not set | ||
706 | |||
707 | # | ||
708 | # IPMI | ||
709 | # | ||
710 | # CONFIG_IPMI_HANDLER is not set | ||
711 | CONFIG_WATCHDOG=y | ||
712 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
713 | |||
714 | # | ||
715 | # Watchdog Device Drivers | ||
716 | # | ||
717 | # CONFIG_SOFT_WATCHDOG is not set | ||
718 | # CONFIG_BFIN_WDT is not set | ||
719 | # CONFIG_HW_RANDOM is not set | ||
720 | # CONFIG_GEN_RTC is not set | ||
721 | CONFIG_BLACKFIN_DPMC=y | ||
722 | # CONFIG_R3964 is not set | ||
723 | # CONFIG_RAW_DRIVER is not set | ||
724 | |||
725 | # | ||
726 | # TPM devices | ||
727 | # | ||
728 | # CONFIG_TCG_TPM is not set | ||
729 | # CONFIG_I2C is not set | ||
730 | |||
731 | # | ||
732 | # SPI support | ||
733 | # | ||
734 | CONFIG_SPI=y | ||
735 | CONFIG_SPI_MASTER=y | ||
736 | |||
737 | # | ||
738 | # SPI Master Controller Drivers | ||
739 | # | ||
740 | CONFIG_SPI_BFIN=y | ||
741 | # CONFIG_SPI_BITBANG is not set | ||
742 | |||
743 | # | ||
744 | # SPI Protocol Masters | ||
745 | # | ||
746 | CONFIG_SPI_AT25=y | ||
747 | CONFIG_SPI_SPIDEV=y | ||
748 | |||
749 | # | ||
750 | # Dallas's 1-wire bus | ||
751 | # | ||
752 | # CONFIG_W1 is not set | ||
753 | CONFIG_HWMON=y | ||
754 | # CONFIG_HWMON_VID is not set | ||
755 | # CONFIG_SENSORS_ABITUGURU is not set | ||
756 | # CONFIG_SENSORS_F71805F is not set | ||
757 | # CONFIG_SENSORS_LM70 is not set | ||
758 | # CONFIG_SENSORS_PC87427 is not set | ||
759 | # CONFIG_SENSORS_SMSC47M1 is not set | ||
760 | # CONFIG_SENSORS_SMSC47B397 is not set | ||
761 | # CONFIG_SENSORS_VT1211 is not set | ||
762 | # CONFIG_SENSORS_W83627HF is not set | ||
763 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
764 | |||
765 | # | ||
766 | # Multifunction device drivers | ||
767 | # | ||
768 | # CONFIG_MFD_SM501 is not set | ||
769 | |||
770 | # | ||
771 | # Multimedia devices | ||
772 | # | ||
773 | # CONFIG_VIDEO_DEV is not set | ||
774 | # CONFIG_DVB_CORE is not set | ||
775 | CONFIG_DAB=y | ||
776 | |||
777 | # | ||
778 | # Graphics support | ||
779 | # | ||
780 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
781 | |||
782 | # | ||
783 | # Display device support | ||
784 | # | ||
785 | # CONFIG_DISPLAY_SUPPORT is not set | ||
786 | # CONFIG_VGASTATE is not set | ||
787 | # CONFIG_FB is not set | ||
788 | |||
789 | # | ||
790 | # Sound | ||
791 | # | ||
792 | CONFIG_SOUND=m | ||
793 | |||
794 | # | ||
795 | # Advanced Linux Sound Architecture | ||
796 | # | ||
797 | CONFIG_SND=m | ||
798 | CONFIG_SND_TIMER=m | ||
799 | CONFIG_SND_PCM=m | ||
800 | # CONFIG_SND_SEQUENCER is not set | ||
801 | CONFIG_SND_OSSEMUL=y | ||
802 | CONFIG_SND_MIXER_OSS=m | ||
803 | CONFIG_SND_PCM_OSS=m | ||
804 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
805 | # CONFIG_SND_DYNAMIC_MINORS is not set | ||
806 | CONFIG_SND_SUPPORT_OLD_API=y | ||
807 | CONFIG_SND_VERBOSE_PROCFS=y | ||
808 | # CONFIG_SND_VERBOSE_PRINTK is not set | ||
809 | # CONFIG_SND_DEBUG is not set | ||
810 | |||
811 | # | ||
812 | # Generic devices | ||
813 | # | ||
814 | # CONFIG_SND_DUMMY is not set | ||
815 | # CONFIG_SND_MTPAV is not set | ||
816 | # CONFIG_SND_SERIAL_U16550 is not set | ||
817 | # CONFIG_SND_MPU401 is not set | ||
818 | |||
819 | # | ||
820 | # ALSA Blackfin devices | ||
821 | # | ||
822 | CONFIG_SND_BLACKFIN_AD1836=m | ||
823 | CONFIG_SND_BLACKFIN_AD1836_TDM=y | ||
824 | # CONFIG_SND_BLACKFIN_AD1836_I2S is not set | ||
825 | CONFIG_SND_BLACKFIN_AD1836_MULSUB=y | ||
826 | # CONFIG_SND_BLACKFIN_AD1836_5P1 is not set | ||
827 | CONFIG_SND_BLACKFIN_SPORT=0 | ||
828 | CONFIG_SND_BLACKFIN_SPI_PFBIT=4 | ||
829 | # CONFIG_SND_BFIN_AD73311 is not set | ||
830 | |||
831 | # | ||
832 | # System on Chip audio support | ||
833 | # | ||
834 | # CONFIG_SND_SOC is not set | ||
835 | |||
836 | # | ||
837 | # Open Sound System | ||
838 | # | ||
839 | # CONFIG_SOUND_PRIME is not set | ||
840 | |||
841 | # | ||
842 | # HID Devices | ||
843 | # | ||
844 | CONFIG_HID=y | ||
845 | # CONFIG_HID_DEBUG is not set | ||
846 | |||
847 | # | ||
848 | # USB support | ||
849 | # | ||
850 | CONFIG_USB_ARCH_HAS_HCD=y | ||
851 | # CONFIG_USB_ARCH_HAS_OHCI is not set | ||
852 | # CONFIG_USB_ARCH_HAS_EHCI is not set | ||
853 | # CONFIG_USB is not set | ||
854 | |||
855 | # | ||
856 | # Enable Host or Gadget support to see Inventra options | ||
857 | # | ||
858 | |||
859 | # | ||
860 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
861 | # | ||
862 | |||
863 | # | ||
864 | # USB Gadget Support | ||
865 | # | ||
866 | # CONFIG_USB_GADGET is not set | ||
867 | # CONFIG_MMC is not set | ||
868 | |||
869 | # | ||
870 | # LED devices | ||
871 | # | ||
872 | # CONFIG_NEW_LEDS is not set | ||
873 | |||
874 | # | ||
875 | # LED drivers | ||
876 | # | ||
877 | |||
878 | # | ||
879 | # LED Triggers | ||
880 | # | ||
881 | |||
882 | # | ||
883 | # InfiniBand support | ||
884 | # | ||
885 | |||
886 | # | ||
887 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
888 | # | ||
889 | |||
890 | # | ||
891 | # Real Time Clock | ||
892 | # | ||
893 | CONFIG_RTC_LIB=y | ||
894 | CONFIG_RTC_CLASS=y | ||
895 | CONFIG_RTC_HCTOSYS=y | ||
896 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
897 | # CONFIG_RTC_DEBUG is not set | ||
898 | |||
899 | # | ||
900 | # RTC interfaces | ||
901 | # | ||
902 | CONFIG_RTC_INTF_SYSFS=y | ||
903 | CONFIG_RTC_INTF_PROC=y | ||
904 | CONFIG_RTC_INTF_DEV=y | ||
905 | CONFIG_RTC_INTF_DEV_UIE_EMUL=y | ||
906 | # CONFIG_RTC_DRV_TEST is not set | ||
907 | |||
908 | # | ||
909 | # I2C RTC drivers | ||
910 | # | ||
911 | |||
912 | # | ||
913 | # SPI RTC drivers | ||
914 | # | ||
915 | # CONFIG_RTC_DRV_RS5C348 is not set | ||
916 | # CONFIG_RTC_DRV_MAX6902 is not set | ||
917 | |||
918 | # | ||
919 | # Platform RTC drivers | ||
920 | # | ||
921 | # CONFIG_RTC_DRV_DS1553 is not set | ||
922 | # CONFIG_RTC_DRV_DS1742 is not set | ||
923 | # CONFIG_RTC_DRV_M48T86 is not set | ||
924 | # CONFIG_RTC_DRV_V3020 is not set | ||
925 | |||
926 | # | ||
927 | # on-CPU RTC drivers | ||
928 | # | ||
929 | CONFIG_RTC_DRV_BFIN=y | ||
930 | |||
931 | # | ||
932 | # DMA Engine support | ||
933 | # | ||
934 | # CONFIG_DMA_ENGINE is not set | ||
935 | |||
936 | # | ||
937 | # DMA Clients | ||
938 | # | ||
939 | |||
940 | # | ||
941 | # DMA Devices | ||
942 | # | ||
943 | |||
944 | # | ||
945 | # PBX support | ||
946 | # | ||
947 | # CONFIG_PBX is not set | ||
948 | |||
949 | # | ||
950 | # File systems | ||
951 | # | ||
952 | CONFIG_EXT2_FS=y | ||
953 | CONFIG_EXT2_FS_XATTR=y | ||
954 | # CONFIG_EXT2_FS_POSIX_ACL is not set | ||
955 | # CONFIG_EXT2_FS_SECURITY is not set | ||
956 | # CONFIG_EXT3_FS is not set | ||
957 | # CONFIG_EXT4DEV_FS is not set | ||
958 | CONFIG_FS_MBCACHE=y | ||
959 | # CONFIG_REISERFS_FS is not set | ||
960 | # CONFIG_JFS_FS is not set | ||
961 | # CONFIG_FS_POSIX_ACL is not set | ||
962 | # CONFIG_XFS_FS is not set | ||
963 | # CONFIG_GFS2_FS is not set | ||
964 | # CONFIG_OCFS2_FS is not set | ||
965 | # CONFIG_MINIX_FS is not set | ||
966 | # CONFIG_ROMFS_FS is not set | ||
967 | CONFIG_INOTIFY=y | ||
968 | CONFIG_INOTIFY_USER=y | ||
969 | # CONFIG_QUOTA is not set | ||
970 | CONFIG_DNOTIFY=y | ||
971 | # CONFIG_AUTOFS_FS is not set | ||
972 | # CONFIG_AUTOFS4_FS is not set | ||
973 | # CONFIG_FUSE_FS is not set | ||
974 | |||
975 | # | ||
976 | # CD-ROM/DVD Filesystems | ||
977 | # | ||
978 | # CONFIG_ISO9660_FS is not set | ||
979 | # CONFIG_UDF_FS is not set | ||
980 | |||
981 | # | ||
982 | # DOS/FAT/NT Filesystems | ||
983 | # | ||
984 | # CONFIG_MSDOS_FS is not set | ||
985 | # CONFIG_VFAT_FS is not set | ||
986 | # CONFIG_NTFS_FS is not set | ||
987 | |||
988 | # | ||
989 | # Pseudo filesystems | ||
990 | # | ||
991 | CONFIG_PROC_FS=y | ||
992 | CONFIG_PROC_SYSCTL=y | ||
993 | CONFIG_SYSFS=y | ||
994 | # CONFIG_TMPFS is not set | ||
995 | # CONFIG_HUGETLB_PAGE is not set | ||
996 | CONFIG_RAMFS=y | ||
997 | # CONFIG_CONFIGFS_FS is not set | ||
998 | |||
999 | # | ||
1000 | # Miscellaneous filesystems | ||
1001 | # | ||
1002 | # CONFIG_ADFS_FS is not set | ||
1003 | # CONFIG_AFFS_FS is not set | ||
1004 | # CONFIG_HFS_FS is not set | ||
1005 | # CONFIG_HFSPLUS_FS is not set | ||
1006 | # CONFIG_BEFS_FS is not set | ||
1007 | # CONFIG_BFS_FS is not set | ||
1008 | # CONFIG_EFS_FS is not set | ||
1009 | # CONFIG_YAFFS_FS is not set | ||
1010 | CONFIG_JFFS2_FS=y | ||
1011 | CONFIG_JFFS2_FS_DEBUG=0 | ||
1012 | CONFIG_JFFS2_FS_WRITEBUFFER=y | ||
1013 | # CONFIG_JFFS2_SUMMARY is not set | ||
1014 | # CONFIG_JFFS2_FS_XATTR is not set | ||
1015 | # CONFIG_JFFS2_COMPRESSION_OPTIONS is not set | ||
1016 | CONFIG_JFFS2_ZLIB=y | ||
1017 | CONFIG_JFFS2_RTIME=y | ||
1018 | # CONFIG_JFFS2_RUBIN is not set | ||
1019 | # CONFIG_CRAMFS is not set | ||
1020 | # CONFIG_VXFS_FS is not set | ||
1021 | # CONFIG_HPFS_FS is not set | ||
1022 | # CONFIG_QNX4FS_FS is not set | ||
1023 | # CONFIG_SYSV_FS is not set | ||
1024 | # CONFIG_UFS_FS is not set | ||
1025 | |||
1026 | # | ||
1027 | # Network File Systems | ||
1028 | # | ||
1029 | CONFIG_NFS_FS=m | ||
1030 | CONFIG_NFS_V3=y | ||
1031 | # CONFIG_NFS_V3_ACL is not set | ||
1032 | # CONFIG_NFS_V4 is not set | ||
1033 | # CONFIG_NFS_DIRECTIO is not set | ||
1034 | # CONFIG_NFSD is not set | ||
1035 | CONFIG_LOCKD=m | ||
1036 | CONFIG_LOCKD_V4=y | ||
1037 | CONFIG_NFS_COMMON=y | ||
1038 | CONFIG_SUNRPC=m | ||
1039 | # CONFIG_SUNRPC_BIND34 is not set | ||
1040 | # CONFIG_RPCSEC_GSS_KRB5 is not set | ||
1041 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1042 | # CONFIG_SMB_FS is not set | ||
1043 | # CONFIG_CIFS is not set | ||
1044 | # CONFIG_NCP_FS is not set | ||
1045 | # CONFIG_CODA_FS is not set | ||
1046 | # CONFIG_AFS_FS is not set | ||
1047 | # CONFIG_9P_FS is not set | ||
1048 | |||
1049 | # | ||
1050 | # Partition Types | ||
1051 | # | ||
1052 | # CONFIG_PARTITION_ADVANCED is not set | ||
1053 | CONFIG_MSDOS_PARTITION=y | ||
1054 | |||
1055 | # | ||
1056 | # Native Language Support | ||
1057 | # | ||
1058 | CONFIG_NLS=m | ||
1059 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1060 | # CONFIG_NLS_CODEPAGE_437 is not set | ||
1061 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1062 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1063 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1064 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1065 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1066 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1067 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1068 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1069 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1070 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1071 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1072 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1073 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1074 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1075 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1076 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1077 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1078 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1079 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1080 | # CONFIG_NLS_ISO8859_8 is not set | ||
1081 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1082 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1083 | # CONFIG_NLS_ASCII is not set | ||
1084 | # CONFIG_NLS_ISO8859_1 is not set | ||
1085 | # CONFIG_NLS_ISO8859_2 is not set | ||
1086 | # CONFIG_NLS_ISO8859_3 is not set | ||
1087 | # CONFIG_NLS_ISO8859_4 is not set | ||
1088 | # CONFIG_NLS_ISO8859_5 is not set | ||
1089 | # CONFIG_NLS_ISO8859_6 is not set | ||
1090 | # CONFIG_NLS_ISO8859_7 is not set | ||
1091 | # CONFIG_NLS_ISO8859_9 is not set | ||
1092 | # CONFIG_NLS_ISO8859_13 is not set | ||
1093 | # CONFIG_NLS_ISO8859_14 is not set | ||
1094 | # CONFIG_NLS_ISO8859_15 is not set | ||
1095 | # CONFIG_NLS_KOI8_R is not set | ||
1096 | # CONFIG_NLS_KOI8_U is not set | ||
1097 | # CONFIG_NLS_UTF8 is not set | ||
1098 | |||
1099 | # | ||
1100 | # Distributed Lock Manager | ||
1101 | # | ||
1102 | # CONFIG_DLM is not set | ||
1103 | |||
1104 | # | ||
1105 | # Profiling support | ||
1106 | # | ||
1107 | # CONFIG_PROFILING is not set | ||
1108 | |||
1109 | # | ||
1110 | # Kernel hacking | ||
1111 | # | ||
1112 | # CONFIG_PRINTK_TIME is not set | ||
1113 | CONFIG_ENABLE_MUST_CHECK=y | ||
1114 | # CONFIG_MAGIC_SYSRQ is not set | ||
1115 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1116 | # CONFIG_DEBUG_FS is not set | ||
1117 | # CONFIG_HEADERS_CHECK is not set | ||
1118 | # CONFIG_DEBUG_KERNEL is not set | ||
1119 | # CONFIG_DEBUG_BUGVERBOSE is not set | ||
1120 | # CONFIG_DEBUG_MMRS is not set | ||
1121 | CONFIG_DEBUG_HUNT_FOR_ZERO=y | ||
1122 | CONFIG_DEBUG_BFIN_HWTRACE_ON=y | ||
1123 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_OFF=y | ||
1124 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_ONE is not set | ||
1125 | # CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION_TWO is not set | ||
1126 | CONFIG_DEBUG_BFIN_HWTRACE_COMPRESSION=0 | ||
1127 | # CONFIG_DEBUG_BFIN_HWTRACE_EXPAND is not set | ||
1128 | # CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE is not set | ||
1129 | # CONFIG_EARLY_PRINTK is not set | ||
1130 | CONFIG_CPLB_INFO=y | ||
1131 | CONFIG_ACCESS_CHECK=y | ||
1132 | |||
1133 | # | ||
1134 | # Security options | ||
1135 | # | ||
1136 | # CONFIG_KEYS is not set | ||
1137 | CONFIG_SECURITY=y | ||
1138 | # CONFIG_SECURITY_NETWORK is not set | ||
1139 | CONFIG_SECURITY_CAPABILITIES=y | ||
1140 | |||
1141 | # | ||
1142 | # Cryptographic options | ||
1143 | # | ||
1144 | # CONFIG_CRYPTO is not set | ||
1145 | |||
1146 | # | ||
1147 | # Library routines | ||
1148 | # | ||
1149 | CONFIG_BITREVERSE=y | ||
1150 | CONFIG_CRC_CCITT=m | ||
1151 | # CONFIG_CRC16 is not set | ||
1152 | # CONFIG_CRC_ITU_T is not set | ||
1153 | CONFIG_CRC32=y | ||
1154 | # CONFIG_LIBCRC32C is not set | ||
1155 | CONFIG_ZLIB_INFLATE=y | ||
1156 | CONFIG_ZLIB_DEFLATE=y | ||
1157 | CONFIG_PLIST=y | ||
1158 | CONFIG_HAS_IOMEM=y | ||
1159 | CONFIG_HAS_IOPORT=y | ||
1160 | CONFIG_HAS_DMA=y | ||
diff --git a/arch/blackfin/configs/PNAV-10_defconfig b/arch/blackfin/configs/PNAV-10_defconfig index 3d403e0b82c2..25709f504d8f 100644 --- a/arch/blackfin/configs/PNAV-10_defconfig +++ b/arch/blackfin/configs/PNAV-10_defconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.22.6 | 3 | # Linux kernel version: 2.6.22.12 |
4 | # | 4 | # |
5 | # CONFIG_MMU is not set | 5 | # CONFIG_MMU is not set |
6 | # CONFIG_FPU is not set | 6 | # CONFIG_FPU is not set |
@@ -8,7 +8,6 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y | |||
8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set | 8 | # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set |
9 | CONFIG_BLACKFIN=y | 9 | CONFIG_BLACKFIN=y |
10 | CONFIG_ZONE_DMA=y | 10 | CONFIG_ZONE_DMA=y |
11 | CONFIG_BFIN=y | ||
12 | CONFIG_SEMAPHORE_SLEEPERS=y | 11 | CONFIG_SEMAPHORE_SLEEPERS=y |
13 | CONFIG_GENERIC_FIND_NEXT_BIT=y | 12 | CONFIG_GENERIC_FIND_NEXT_BIT=y |
14 | CONFIG_GENERIC_HWEIGHT=y | 13 | CONFIG_GENERIC_HWEIGHT=y |
@@ -18,7 +17,6 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
18 | CONFIG_GENERIC_GPIO=y | 17 | CONFIG_GENERIC_GPIO=y |
19 | CONFIG_FORCE_MAX_ZONEORDER=14 | 18 | CONFIG_FORCE_MAX_ZONEORDER=14 |
20 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 19 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
21 | CONFIG_IRQCHIP_DEMUX_GPIO=y | ||
22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
23 | 21 | ||
24 | # | 22 | # |
@@ -62,7 +60,6 @@ CONFIG_FUTEX=y | |||
62 | CONFIG_ANON_INODES=y | 60 | CONFIG_ANON_INODES=y |
63 | CONFIG_EPOLL=y | 61 | CONFIG_EPOLL=y |
64 | CONFIG_SIGNALFD=y | 62 | CONFIG_SIGNALFD=y |
65 | CONFIG_TIMERFD=y | ||
66 | CONFIG_EVENTFD=y | 63 | CONFIG_EVENTFD=y |
67 | CONFIG_VM_EVENT_COUNTERS=y | 64 | CONFIG_VM_EVENT_COUNTERS=y |
68 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=9 | 65 | CONFIG_BIG_ORDER_ALLOC_NOFAIL_MAGIC=9 |
@@ -115,6 +112,9 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
115 | # | 112 | # |
116 | # Processor and Board Settings | 113 | # Processor and Board Settings |
117 | # | 114 | # |
115 | # CONFIG_BF522 is not set | ||
116 | # CONFIG_BF525 is not set | ||
117 | # CONFIG_BF527 is not set | ||
118 | # CONFIG_BF531 is not set | 118 | # CONFIG_BF531 is not set |
119 | # CONFIG_BF532 is not set | 119 | # CONFIG_BF532 is not set |
120 | # CONFIG_BF533 is not set | 120 | # CONFIG_BF533 is not set |
@@ -123,10 +123,12 @@ CONFIG_PREEMPT_VOLUNTARY=y | |||
123 | CONFIG_BF537=y | 123 | CONFIG_BF537=y |
124 | # CONFIG_BF542 is not set | 124 | # CONFIG_BF542 is not set |
125 | # CONFIG_BF544 is not set | 125 | # CONFIG_BF544 is not set |
126 | # CONFIG_BF547 is not set | ||
126 | # CONFIG_BF548 is not set | 127 | # CONFIG_BF548 is not set |
127 | # CONFIG_BF549 is not set | 128 | # CONFIG_BF549 is not set |
128 | # CONFIG_BF561 is not set | 129 | # CONFIG_BF561 is not set |
129 | # CONFIG_BF_REV_0_0 is not set | 130 | # CONFIG_BF_REV_0_0 is not set |
131 | # CONFIG_BF_REV_0_1 is not set | ||
130 | CONFIG_BF_REV_0_2=y | 132 | CONFIG_BF_REV_0_2=y |
131 | # CONFIG_BF_REV_0_3 is not set | 133 | # CONFIG_BF_REV_0_3 is not set |
132 | # CONFIG_BF_REV_0_4 is not set | 134 | # CONFIG_BF_REV_0_4 is not set |
@@ -135,33 +137,8 @@ CONFIG_BF_REV_0_2=y | |||
135 | # CONFIG_BF_REV_NONE is not set | 137 | # CONFIG_BF_REV_NONE is not set |
136 | CONFIG_BF53x=y | 138 | CONFIG_BF53x=y |
137 | CONFIG_BFIN_SINGLE_CORE=y | 139 | CONFIG_BFIN_SINGLE_CORE=y |
138 | # CONFIG_BFIN533_EZKIT is not set | ||
139 | # CONFIG_BFIN533_STAMP is not set | ||
140 | # CONFIG_BFIN537_STAMP is not set | ||
141 | # CONFIG_BFIN533_BLUETECHNIX_CM is not set | ||
142 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | ||
143 | # CONFIG_BFIN548_EZKIT is not set | ||
144 | # CONFIG_BFIN561_BLUETECHNIX_CM is not set | ||
145 | # CONFIG_BFIN561_EZKIT is not set | ||
146 | # CONFIG_BFIN561_TEPLA is not set | ||
147 | CONFIG_PNAV10=y | ||
148 | # CONFIG_GENERIC_BOARD is not set | ||
149 | CONFIG_MEM_MT48LC32M8A2_75=y | 140 | CONFIG_MEM_MT48LC32M8A2_75=y |
150 | CONFIG_IRQ_PLL_WAKEUP=7 | 141 | CONFIG_IRQ_PLL_WAKEUP=7 |
151 | |||
152 | # | ||
153 | # BF537 Specific Configuration | ||
154 | # | ||
155 | |||
156 | # | ||
157 | # Interrupt Priority Assignment | ||
158 | # | ||
159 | |||
160 | # | ||
161 | # Priority | ||
162 | # | ||
163 | CONFIG_IRQ_DMA_ERROR=7 | ||
164 | CONFIG_IRQ_ERROR=7 | ||
165 | CONFIG_IRQ_RTC=8 | 142 | CONFIG_IRQ_RTC=8 |
166 | CONFIG_IRQ_PPI=8 | 143 | CONFIG_IRQ_PPI=8 |
167 | CONFIG_IRQ_SPORT0_RX=9 | 144 | CONFIG_IRQ_SPORT0_RX=9 |
@@ -174,8 +151,6 @@ CONFIG_IRQ_UART0_RX=10 | |||
174 | CONFIG_IRQ_UART0_TX=10 | 151 | CONFIG_IRQ_UART0_TX=10 |
175 | CONFIG_IRQ_UART1_RX=10 | 152 | CONFIG_IRQ_UART1_RX=10 |
176 | CONFIG_IRQ_UART1_TX=10 | 153 | CONFIG_IRQ_UART1_TX=10 |
177 | CONFIG_IRQ_CAN_RX=11 | ||
178 | CONFIG_IRQ_CAN_TX=11 | ||
179 | CONFIG_IRQ_MAC_RX=11 | 154 | CONFIG_IRQ_MAC_RX=11 |
180 | CONFIG_IRQ_MAC_TX=11 | 155 | CONFIG_IRQ_MAC_TX=11 |
181 | CONFIG_IRQ_TMR0=12 | 156 | CONFIG_IRQ_TMR0=12 |
@@ -186,11 +161,31 @@ CONFIG_IRQ_TMR4=12 | |||
186 | CONFIG_IRQ_TMR5=12 | 161 | CONFIG_IRQ_TMR5=12 |
187 | CONFIG_IRQ_TMR6=12 | 162 | CONFIG_IRQ_TMR6=12 |
188 | CONFIG_IRQ_TMR7=12 | 163 | CONFIG_IRQ_TMR7=12 |
189 | CONFIG_IRQ_PROG_INTA=12 | ||
190 | CONFIG_IRQ_PORTG_INTB=12 | 164 | CONFIG_IRQ_PORTG_INTB=12 |
191 | CONFIG_IRQ_MEM_DMA0=13 | 165 | CONFIG_IRQ_MEM_DMA0=13 |
192 | CONFIG_IRQ_MEM_DMA1=13 | 166 | CONFIG_IRQ_MEM_DMA1=13 |
193 | CONFIG_IRQ_WATCH=13 | 167 | CONFIG_IRQ_WATCH=13 |
168 | # CONFIG_BFIN537_STAMP is not set | ||
169 | # CONFIG_BFIN537_BLUETECHNIX_CM is not set | ||
170 | CONFIG_PNAV10=y | ||
171 | # CONFIG_GENERIC_BF537_BOARD is not set | ||
172 | |||
173 | # | ||
174 | # BF537 Specific Configuration | ||
175 | # | ||
176 | |||
177 | # | ||
178 | # Interrupt Priority Assignment | ||
179 | # | ||
180 | |||
181 | # | ||
182 | # Priority | ||
183 | # | ||
184 | CONFIG_IRQ_DMA_ERROR=7 | ||
185 | CONFIG_IRQ_ERROR=7 | ||
186 | CONFIG_IRQ_CAN_RX=11 | ||
187 | CONFIG_IRQ_CAN_TX=11 | ||
188 | CONFIG_IRQ_PROG_INTA=12 | ||
194 | 189 | ||
195 | # | 190 | # |
196 | # Board customizations | 191 | # Board customizations |
@@ -204,7 +199,7 @@ CONFIG_CLKIN_HZ=24576000 | |||
204 | # CONFIG_BFIN_KERNEL_CLOCK is not set | 199 | # CONFIG_BFIN_KERNEL_CLOCK is not set |
205 | CONFIG_MAX_VCO_HZ=600000000 | 200 | CONFIG_MAX_VCO_HZ=600000000 |
206 | CONFIG_MIN_VCO_HZ=50000000 | 201 | CONFIG_MIN_VCO_HZ=50000000 |
207 | CONFIG_MAX_SCLK_HZ=133333333 | 202 | CONFIG_MAX_SCLK_HZ=133000000 |
208 | CONFIG_MIN_SCLK_HZ=27000000 | 203 | CONFIG_MIN_SCLK_HZ=27000000 |
209 | 204 | ||
210 | # | 205 | # |
@@ -261,6 +256,7 @@ CONFIG_SPLIT_PTLOCK_CPUS=4 | |||
261 | # CONFIG_RESOURCES_64BIT is not set | 256 | # CONFIG_RESOURCES_64BIT is not set |
262 | CONFIG_ZONE_DMA_FLAG=1 | 257 | CONFIG_ZONE_DMA_FLAG=1 |
263 | CONFIG_LARGE_ALLOCS=y | 258 | CONFIG_LARGE_ALLOCS=y |
259 | # CONFIG_BFIN_GPTIMERS is not set | ||
264 | CONFIG_BFIN_DMA_5XX=y | 260 | CONFIG_BFIN_DMA_5XX=y |
265 | # CONFIG_DMA_UNCACHED_2M is not set | 261 | # CONFIG_DMA_UNCACHED_2M is not set |
266 | CONFIG_DMA_UNCACHED_1M=y | 262 | CONFIG_DMA_UNCACHED_1M=y |
@@ -282,7 +278,7 @@ CONFIG_L1_MAX_PIECE=16 | |||
282 | # | 278 | # |
283 | 279 | ||
284 | # | 280 | # |
285 | # EBIU_AMBCTL Global Control | 281 | # EBIU_AMGCTL Global Control |
286 | # | 282 | # |
287 | CONFIG_C_AMCKEN=y | 283 | CONFIG_C_AMCKEN=y |
288 | CONFIG_C_CDPRIO=y | 284 | CONFIG_C_CDPRIO=y |
@@ -593,6 +589,7 @@ CONFIG_BFIN_MAC_RMII=y | |||
593 | # CONFIG_DM9000 is not set | 589 | # CONFIG_DM9000 is not set |
594 | CONFIG_NETDEV_1000=y | 590 | CONFIG_NETDEV_1000=y |
595 | CONFIG_NETDEV_10000=y | 591 | CONFIG_NETDEV_10000=y |
592 | # CONFIG_AX88180 is not set | ||
596 | 593 | ||
597 | # | 594 | # |
598 | # Wireless LAN | 595 | # Wireless LAN |
@@ -675,9 +672,9 @@ CONFIG_INPUT_UINPUT=y | |||
675 | # | 672 | # |
676 | # CONFIG_AD9960 is not set | 673 | # CONFIG_AD9960 is not set |
677 | # CONFIG_SPI_ADC_BF533 is not set | 674 | # CONFIG_SPI_ADC_BF533 is not set |
678 | # CONFIG_BFIN_PFLAGS is not set | 675 | # CONFIG_BF5xx_PFLAGS is not set |
679 | # CONFIG_BF5xx_PPIFCD is not set | 676 | # CONFIG_BF5xx_PPIFCD is not set |
680 | # CONFIG_BF5xx_TIMERS is not set | 677 | # CONFIG_BFIN_SIMPLE_TIMER is not set |
681 | # CONFIG_BF5xx_PPI is not set | 678 | # CONFIG_BF5xx_PPI is not set |
682 | CONFIG_BFIN_SPORT=y | 679 | CONFIG_BFIN_SPORT=y |
683 | # CONFIG_BFIN_TIMER_LATENCY is not set | 680 | # CONFIG_BFIN_TIMER_LATENCY is not set |
@@ -897,6 +894,7 @@ CONFIG_FB_BF537_LQ035=y | |||
897 | CONFIG_LQ035_SLAVE_ADDR=0x58 | 894 | CONFIG_LQ035_SLAVE_ADDR=0x58 |
898 | CONFIG_FB_BFIN_LANDSCAPE=y | 895 | CONFIG_FB_BFIN_LANDSCAPE=y |
899 | # CONFIG_FB_BFIN_BGR is not set | 896 | # CONFIG_FB_BFIN_BGR is not set |
897 | # CONFIG_FB_BFIN_T350MCQB is not set | ||
900 | # CONFIG_FB_S1D13XXX is not set | 898 | # CONFIG_FB_S1D13XXX is not set |
901 | # CONFIG_FB_VIRTUAL is not set | 899 | # CONFIG_FB_VIRTUAL is not set |
902 | # CONFIG_LOGO is not set | 900 | # CONFIG_LOGO is not set |
@@ -939,11 +937,6 @@ CONFIG_SND=m | |||
939 | # CONFIG_SND_SOC is not set | 937 | # CONFIG_SND_SOC is not set |
940 | 938 | ||
941 | # | 939 | # |
942 | # SoC Audio for the ADI Blackfin | ||
943 | # | ||
944 | # CONFIG_SND_BF5XX_HAVE_COLD_RESET is not set | ||
945 | |||
946 | # | ||
947 | # Open Sound System | 940 | # Open Sound System |
948 | # | 941 | # |
949 | CONFIG_SOUND_PRIME=y | 942 | CONFIG_SOUND_PRIME=y |
diff --git a/arch/blackfin/kernel/bfin_dma_5xx.c b/arch/blackfin/kernel/bfin_dma_5xx.c index 503eef4c7fec..b54446055a43 100644 --- a/arch/blackfin/kernel/bfin_dma_5xx.c +++ b/arch/blackfin/kernel/bfin_dma_5xx.c | |||
@@ -436,6 +436,7 @@ unsigned long get_dma_curr_desc_ptr(unsigned int channel) | |||
436 | 436 | ||
437 | return dma_ch[channel].regs->curr_desc_ptr; | 437 | return dma_ch[channel].regs->curr_desc_ptr; |
438 | } | 438 | } |
439 | EXPORT_SYMBOL(get_dma_curr_desc_ptr); | ||
439 | 440 | ||
440 | unsigned long get_dma_curr_addr(unsigned int channel) | 441 | unsigned long get_dma_curr_addr(unsigned int channel) |
441 | { | 442 | { |
diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c index 2198afe40f33..0bfbb269e350 100644 --- a/arch/blackfin/kernel/bfin_ksyms.c +++ b/arch/blackfin/kernel/bfin_ksyms.c | |||
@@ -37,9 +37,6 @@ | |||
37 | /* platform dependent support */ | 37 | /* platform dependent support */ |
38 | 38 | ||
39 | EXPORT_SYMBOL(__ioremap); | 39 | EXPORT_SYMBOL(__ioremap); |
40 | EXPORT_SYMBOL(strcmp); | ||
41 | EXPORT_SYMBOL(strncmp); | ||
42 | EXPORT_SYMBOL(dump_thread); | ||
43 | 40 | ||
44 | EXPORT_SYMBOL(ip_fast_csum); | 41 | EXPORT_SYMBOL(ip_fast_csum); |
45 | 42 | ||
@@ -51,6 +48,7 @@ EXPORT_SYMBOL(__down_trylock); | |||
51 | EXPORT_SYMBOL(__down_interruptible); | 48 | EXPORT_SYMBOL(__down_interruptible); |
52 | 49 | ||
53 | EXPORT_SYMBOL(is_in_rom); | 50 | EXPORT_SYMBOL(is_in_rom); |
51 | EXPORT_SYMBOL(bfin_return_from_exception); | ||
54 | 52 | ||
55 | /* Networking helper routines. */ | 53 | /* Networking helper routines. */ |
56 | EXPORT_SYMBOL(csum_partial_copy); | 54 | EXPORT_SYMBOL(csum_partial_copy); |
@@ -60,13 +58,11 @@ EXPORT_SYMBOL(csum_partial_copy); | |||
60 | * their interface isn't gonna change any time soon now, so | 58 | * their interface isn't gonna change any time soon now, so |
61 | * it's OK to leave it out of version control. | 59 | * it's OK to leave it out of version control. |
62 | */ | 60 | */ |
63 | EXPORT_SYMBOL(strcpy); | ||
64 | EXPORT_SYMBOL(memcpy); | 61 | EXPORT_SYMBOL(memcpy); |
65 | EXPORT_SYMBOL(memset); | 62 | EXPORT_SYMBOL(memset); |
66 | EXPORT_SYMBOL(memcmp); | 63 | EXPORT_SYMBOL(memcmp); |
67 | EXPORT_SYMBOL(memmove); | 64 | EXPORT_SYMBOL(memmove); |
68 | EXPORT_SYMBOL(memchr); | 65 | EXPORT_SYMBOL(memchr); |
69 | EXPORT_SYMBOL(get_wchan); | ||
70 | 66 | ||
71 | /* | 67 | /* |
72 | * libgcc functions - functions that are used internally by the | 68 | * libgcc functions - functions that are used internally by the |
@@ -102,6 +98,7 @@ EXPORT_SYMBOL(outsw); | |||
102 | EXPORT_SYMBOL(insw); | 98 | EXPORT_SYMBOL(insw); |
103 | EXPORT_SYMBOL(outsl); | 99 | EXPORT_SYMBOL(outsl); |
104 | EXPORT_SYMBOL(insl); | 100 | EXPORT_SYMBOL(insl); |
101 | EXPORT_SYMBOL(insl_16); | ||
105 | EXPORT_SYMBOL(irq_flags); | 102 | EXPORT_SYMBOL(irq_flags); |
106 | EXPORT_SYMBOL(iounmap); | 103 | EXPORT_SYMBOL(iounmap); |
107 | EXPORT_SYMBOL(blackfin_dcache_invalidate_range); | 104 | EXPORT_SYMBOL(blackfin_dcache_invalidate_range); |
diff --git a/arch/blackfin/kernel/cplbinit.c b/arch/blackfin/kernel/cplbinit.c index f2db6a5e2b5b..6320bc45fbba 100644 --- a/arch/blackfin/kernel/cplbinit.c +++ b/arch/blackfin/kernel/cplbinit.c | |||
@@ -26,29 +26,22 @@ | |||
26 | #include <asm/cplb.h> | 26 | #include <asm/cplb.h> |
27 | #include <asm/cplbinit.h> | 27 | #include <asm/cplbinit.h> |
28 | 28 | ||
29 | u_long icplb_table[MAX_CPLBS+1]; | 29 | u_long icplb_table[MAX_CPLBS + 1]; |
30 | u_long dcplb_table[MAX_CPLBS+1]; | 30 | u_long dcplb_table[MAX_CPLBS + 1]; |
31 | 31 | ||
32 | #ifdef CONFIG_CPLB_SWITCH_TAB_L1 | 32 | #ifdef CONFIG_CPLB_SWITCH_TAB_L1 |
33 | u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data)); | 33 | # define PDT_ATTR __attribute__((l1_data)) |
34 | u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data)); | ||
35 | |||
36 | #ifdef CONFIG_CPLB_INFO | ||
37 | u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data)); | ||
38 | u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data)); | ||
39 | #endif /* CONFIG_CPLB_INFO */ | ||
40 | |||
41 | #else | 34 | #else |
35 | # define PDT_ATTR | ||
36 | #endif | ||
42 | 37 | ||
43 | u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]; | 38 | u_long ipdt_table[MAX_SWITCH_I_CPLBS + 1] PDT_ATTR; |
44 | u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]; | 39 | u_long dpdt_table[MAX_SWITCH_D_CPLBS + 1] PDT_ATTR; |
45 | 40 | ||
46 | #ifdef CONFIG_CPLB_INFO | 41 | #ifdef CONFIG_CPLB_INFO |
47 | u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]; | 42 | u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS] PDT_ATTR; |
48 | u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]; | 43 | u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS] PDT_ATTR; |
49 | #endif /* CONFIG_CPLB_INFO */ | 44 | #endif |
50 | |||
51 | #endif /*CONFIG_CPLB_SWITCH_TAB_L1*/ | ||
52 | 45 | ||
53 | struct s_cplb { | 46 | struct s_cplb { |
54 | struct cplb_tab init_i; | 47 | struct cplb_tab init_i; |
@@ -71,7 +64,7 @@ static struct cplb_desc cplb_data[] = { | |||
71 | #else | 64 | #else |
72 | .valid = 0, | 65 | .valid = 0, |
73 | #endif | 66 | #endif |
74 | .name = "ZERO Pointer Saveguard", | 67 | .name = "Zero Pointer Guard Page", |
75 | }, | 68 | }, |
76 | { | 69 | { |
77 | .start = L1_CODE_START, | 70 | .start = L1_CODE_START, |
@@ -102,20 +95,20 @@ static struct cplb_desc cplb_data[] = { | |||
102 | .end = 0, /* dynamic */ | 95 | .end = 0, /* dynamic */ |
103 | .psize = 0, | 96 | .psize = 0, |
104 | .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB, | 97 | .attr = INITIAL_T | SWITCH_T | I_CPLB | D_CPLB, |
105 | .i_conf = SDRAM_IGENERIC, | 98 | .i_conf = SDRAM_IGENERIC, |
106 | .d_conf = SDRAM_DGENERIC, | 99 | .d_conf = SDRAM_DGENERIC, |
107 | .valid = 1, | 100 | .valid = 1, |
108 | .name = "SDRAM Kernel", | 101 | .name = "Kernel Memory", |
109 | }, | 102 | }, |
110 | { | 103 | { |
111 | .start = 0, /* dynamic */ | 104 | .start = 0, /* dynamic */ |
112 | .end = 0, /* dynamic */ | 105 | .end = 0, /* dynamic */ |
113 | .psize = 0, | 106 | .psize = 0, |
114 | .attr = INITIAL_T | SWITCH_T | D_CPLB, | 107 | .attr = INITIAL_T | SWITCH_T | D_CPLB, |
115 | .i_conf = SDRAM_IGENERIC, | 108 | .i_conf = SDRAM_IGENERIC, |
116 | .d_conf = SDRAM_DNON_CHBL, | 109 | .d_conf = SDRAM_DNON_CHBL, |
117 | .valid = 1, | 110 | .valid = 1, |
118 | .name = "SDRAM RAM MTD", | 111 | .name = "uClinux MTD Memory", |
119 | }, | 112 | }, |
120 | { | 113 | { |
121 | .start = 0, /* dynamic */ | 114 | .start = 0, /* dynamic */ |
@@ -124,7 +117,7 @@ static struct cplb_desc cplb_data[] = { | |||
124 | .attr = INITIAL_T | SWITCH_T | D_CPLB, | 117 | .attr = INITIAL_T | SWITCH_T | D_CPLB, |
125 | .d_conf = SDRAM_DNON_CHBL, | 118 | .d_conf = SDRAM_DNON_CHBL, |
126 | .valid = 1, | 119 | .valid = 1, |
127 | .name = "SDRAM Uncached DMA ZONE", | 120 | .name = "Uncached DMA Zone", |
128 | }, | 121 | }, |
129 | { | 122 | { |
130 | .start = 0, /* dynamic */ | 123 | .start = 0, /* dynamic */ |
@@ -134,7 +127,7 @@ static struct cplb_desc cplb_data[] = { | |||
134 | .i_conf = 0, /* dynamic */ | 127 | .i_conf = 0, /* dynamic */ |
135 | .d_conf = 0, /* dynamic */ | 128 | .d_conf = 0, /* dynamic */ |
136 | .valid = 1, | 129 | .valid = 1, |
137 | .name = "SDRAM Reserved Memory", | 130 | .name = "Reserved Memory", |
138 | }, | 131 | }, |
139 | { | 132 | { |
140 | .start = ASYNC_BANK0_BASE, | 133 | .start = ASYNC_BANK0_BASE, |
@@ -143,14 +136,14 @@ static struct cplb_desc cplb_data[] = { | |||
143 | .attr = SWITCH_T | D_CPLB, | 136 | .attr = SWITCH_T | D_CPLB, |
144 | .d_conf = SDRAM_EBIU, | 137 | .d_conf = SDRAM_EBIU, |
145 | .valid = 1, | 138 | .valid = 1, |
146 | .name = "ASYNC Memory", | 139 | .name = "Asynchronous Memory Banks", |
147 | }, | 140 | }, |
148 | { | 141 | { |
149 | #if defined(CONFIG_BF561) | 142 | #ifdef L2_START |
150 | .start = L2_SRAM, | 143 | .start = L2_START, |
151 | .end = L2_SRAM_END, | 144 | .end = L2_START + L2_LENGTH, |
152 | .psize = SIZE_1M, | 145 | .psize = SIZE_1M, |
153 | .attr = SWITCH_T | D_CPLB, | 146 | .attr = SWITCH_T | I_CPLB | D_CPLB, |
154 | .i_conf = L2_MEMORY, | 147 | .i_conf = L2_MEMORY, |
155 | .d_conf = L2_MEMORY, | 148 | .d_conf = L2_MEMORY, |
156 | .valid = 1, | 149 | .valid = 1, |
@@ -158,13 +151,23 @@ static struct cplb_desc cplb_data[] = { | |||
158 | .valid = 0, | 151 | .valid = 0, |
159 | #endif | 152 | #endif |
160 | .name = "L2 Memory", | 153 | .name = "L2 Memory", |
161 | } | 154 | }, |
155 | { | ||
156 | .start = BOOT_ROM_START, | ||
157 | .end = BOOT_ROM_START + BOOT_ROM_LENGTH, | ||
158 | .psize = SIZE_1M, | ||
159 | .attr = SWITCH_T | I_CPLB | D_CPLB, | ||
160 | .i_conf = SDRAM_IGENERIC, | ||
161 | .d_conf = SDRAM_DGENERIC, | ||
162 | .valid = 1, | ||
163 | .name = "On-Chip BootROM", | ||
164 | }, | ||
162 | }; | 165 | }; |
163 | 166 | ||
164 | static u16 __init lock_kernel_check(u32 start, u32 end) | 167 | static u16 __init lock_kernel_check(u32 start, u32 end) |
165 | { | 168 | { |
166 | if ((start <= (u32) _stext && end >= (u32) _end) | 169 | if ((end <= (u32) _end && end >= (u32)_stext) || |
167 | || (start >= (u32) _stext && end <= (u32) _end)) | 170 | (start <= (u32) _end && start >= (u32)_stext)) |
168 | return IN_KERNEL; | 171 | return IN_KERNEL; |
169 | return 0; | 172 | return 0; |
170 | } | 173 | } |
@@ -350,7 +353,7 @@ void __init generate_cpl_tables(void) | |||
350 | else | 353 | else |
351 | cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL; | 354 | cplb_data[RES_MEM].i_conf = SDRAM_INON_CHBL; |
352 | 355 | ||
353 | for (i = ZERO_P; i <= L2_MEM; i++) { | 356 | for (i = ZERO_P; i < ARRAY_SIZE(cplb_data); ++i) { |
354 | if (!cplb_data[i].valid) | 357 | if (!cplb_data[i].valid) |
355 | continue; | 358 | continue; |
356 | 359 | ||
diff --git a/arch/blackfin/kernel/early_printk.c b/arch/blackfin/kernel/early_printk.c index 6ec518a81113..724f4a5a1d46 100644 --- a/arch/blackfin/kernel/early_printk.c +++ b/arch/blackfin/kernel/early_printk.c | |||
@@ -205,7 +205,8 @@ asmlinkage void __init early_trap_c(struct pt_regs *fp, void *retaddr) | |||
205 | if (likely(early_console == NULL)) | 205 | if (likely(early_console == NULL)) |
206 | setup_early_printk(DEFAULT_EARLY_PORT); | 206 | setup_early_printk(DEFAULT_EARLY_PORT); |
207 | 207 | ||
208 | dump_bfin_regs(fp, retaddr); | 208 | dump_bfin_mem((void *)fp->retx); |
209 | show_regs(fp); | ||
209 | dump_bfin_trace_buffer(); | 210 | dump_bfin_trace_buffer(); |
210 | 211 | ||
211 | panic("Died early"); | 212 | panic("Died early"); |
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c index 9124467651c4..5bf15125f0d6 100644 --- a/arch/blackfin/kernel/process.c +++ b/arch/blackfin/kernel/process.c | |||
@@ -134,27 +134,6 @@ void cpu_idle(void) | |||
134 | } | 134 | } |
135 | } | 135 | } |
136 | 136 | ||
137 | void show_regs(struct pt_regs *regs) | ||
138 | { | ||
139 | printk(KERN_NOTICE "\n"); | ||
140 | printk(KERN_NOTICE | ||
141 | "PC: %08lu Status: %04lu SysStatus: %04lu RETS: %08lu\n", | ||
142 | regs->pc, regs->astat, regs->seqstat, regs->rets); | ||
143 | printk(KERN_NOTICE | ||
144 | "A0.x: %08lx A0.w: %08lx A1.x: %08lx A1.w: %08lx\n", | ||
145 | regs->a0x, regs->a0w, regs->a1x, regs->a1w); | ||
146 | printk(KERN_NOTICE "P0: %08lx P1: %08lx P2: %08lx P3: %08lx\n", | ||
147 | regs->p0, regs->p1, regs->p2, regs->p3); | ||
148 | printk(KERN_NOTICE "P4: %08lx P5: %08lx\n", regs->p4, regs->p5); | ||
149 | printk(KERN_NOTICE "R0: %08lx R1: %08lx R2: %08lx R3: %08lx\n", | ||
150 | regs->r0, regs->r1, regs->r2, regs->r3); | ||
151 | printk(KERN_NOTICE "R4: %08lx R5: %08lx R6: %08lx R7: %08lx\n", | ||
152 | regs->r4, regs->r5, regs->r6, regs->r7); | ||
153 | |||
154 | if (!regs->ipend) | ||
155 | printk(KERN_NOTICE "USP: %08lx\n", rdusp()); | ||
156 | } | ||
157 | |||
158 | /* Fill in the fpu structure for a core dump. */ | 137 | /* Fill in the fpu structure for a core dump. */ |
159 | 138 | ||
160 | int dump_fpu(struct pt_regs *regs, elf_fpregset_t * fpregs) | 139 | int dump_fpu(struct pt_regs *regs, elf_fpregset_t * fpregs) |
@@ -239,51 +218,6 @@ copy_thread(int nr, unsigned long clone_flags, | |||
239 | } | 218 | } |
240 | 219 | ||
241 | /* | 220 | /* |
242 | * fill in the user structure for a core dump.. | ||
243 | */ | ||
244 | void dump_thread(struct pt_regs *regs, struct user *dump) | ||
245 | { | ||
246 | dump->magic = CMAGIC; | ||
247 | dump->start_code = 0; | ||
248 | dump->start_stack = rdusp() & ~(PAGE_SIZE - 1); | ||
249 | dump->u_tsize = ((unsigned long)current->mm->end_code) >> PAGE_SHIFT; | ||
250 | dump->u_dsize = ((unsigned long)(current->mm->brk + | ||
251 | (PAGE_SIZE - 1))) >> PAGE_SHIFT; | ||
252 | dump->u_dsize -= dump->u_tsize; | ||
253 | dump->u_ssize = 0; | ||
254 | |||
255 | if (dump->start_stack < TASK_SIZE) | ||
256 | dump->u_ssize = | ||
257 | ((unsigned long)(TASK_SIZE - | ||
258 | dump->start_stack)) >> PAGE_SHIFT; | ||
259 | |||
260 | dump->u_ar0 = (struct user_regs_struct *)((int)&dump->regs - (int)dump); | ||
261 | |||
262 | dump->regs.r0 = regs->r0; | ||
263 | dump->regs.r1 = regs->r1; | ||
264 | dump->regs.r2 = regs->r2; | ||
265 | dump->regs.r3 = regs->r3; | ||
266 | dump->regs.r4 = regs->r4; | ||
267 | dump->regs.r5 = regs->r5; | ||
268 | dump->regs.r6 = regs->r6; | ||
269 | dump->regs.r7 = regs->r7; | ||
270 | dump->regs.p0 = regs->p0; | ||
271 | dump->regs.p1 = regs->p1; | ||
272 | dump->regs.p2 = regs->p2; | ||
273 | dump->regs.p3 = regs->p3; | ||
274 | dump->regs.p4 = regs->p4; | ||
275 | dump->regs.p5 = regs->p5; | ||
276 | dump->regs.orig_p0 = regs->orig_p0; | ||
277 | dump->regs.a0w = regs->a0w; | ||
278 | dump->regs.a1w = regs->a1w; | ||
279 | dump->regs.a0x = regs->a0x; | ||
280 | dump->regs.a1x = regs->a1x; | ||
281 | dump->regs.rets = regs->rets; | ||
282 | dump->regs.astat = regs->astat; | ||
283 | dump->regs.pc = regs->pc; | ||
284 | } | ||
285 | |||
286 | /* | ||
287 | * sys_execve() executes a new program. | 221 | * sys_execve() executes a new program. |
288 | */ | 222 | */ |
289 | 223 | ||
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 934234f43839..d2822010b7ce 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <asm/cacheflush.h> | 43 | #include <asm/cacheflush.h> |
44 | #include <asm/blackfin.h> | 44 | #include <asm/blackfin.h> |
45 | #include <asm/cplbinit.h> | 45 | #include <asm/cplbinit.h> |
46 | #include <asm/div64.h> | ||
46 | #include <asm/fixed_code.h> | 47 | #include <asm/fixed_code.h> |
47 | #include <asm/early_printk.h> | 48 | #include <asm/early_printk.h> |
48 | 49 | ||
@@ -504,13 +505,17 @@ EXPORT_SYMBOL(get_sclk); | |||
504 | 505 | ||
505 | unsigned long sclk_to_usecs(unsigned long sclk) | 506 | unsigned long sclk_to_usecs(unsigned long sclk) |
506 | { | 507 | { |
507 | return (USEC_PER_SEC * (u64)sclk) / get_sclk(); | 508 | u64 tmp = USEC_PER_SEC * (u64)sclk; |
509 | do_div(tmp, get_sclk()); | ||
510 | return tmp; | ||
508 | } | 511 | } |
509 | EXPORT_SYMBOL(sclk_to_usecs); | 512 | EXPORT_SYMBOL(sclk_to_usecs); |
510 | 513 | ||
511 | unsigned long usecs_to_sclk(unsigned long usecs) | 514 | unsigned long usecs_to_sclk(unsigned long usecs) |
512 | { | 515 | { |
513 | return (get_sclk() * (u64)usecs) / USEC_PER_SEC; | 516 | u64 tmp = get_sclk() * (u64)usecs; |
517 | do_div(tmp, USEC_PER_SEC); | ||
518 | return tmp; | ||
514 | } | 519 | } |
515 | EXPORT_SYMBOL(usecs_to_sclk); | 520 | EXPORT_SYMBOL(usecs_to_sclk); |
516 | 521 | ||
diff --git a/arch/blackfin/kernel/traps.c b/arch/blackfin/kernel/traps.c index cfa05436c972..21a55ef19cbd 100644 --- a/arch/blackfin/kernel/traps.c +++ b/arch/blackfin/kernel/traps.c | |||
@@ -158,7 +158,7 @@ static void decode_address(char *buf, unsigned long address) | |||
158 | } | 158 | } |
159 | 159 | ||
160 | /* we were unable to find this address anywhere */ | 160 | /* we were unable to find this address anywhere */ |
161 | sprintf(buf, "[<0x%p>]", (void *)address); | 161 | sprintf(buf, "<0x%p> /* unknown address */", (void *)address); |
162 | 162 | ||
163 | done: | 163 | done: |
164 | write_unlock_irqrestore(&tasklist_lock, flags); | 164 | write_unlock_irqrestore(&tasklist_lock, flags); |
@@ -169,7 +169,9 @@ asmlinkage void double_fault_c(struct pt_regs *fp) | |||
169 | console_verbose(); | 169 | console_verbose(); |
170 | oops_in_progress = 1; | 170 | oops_in_progress = 1; |
171 | printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); | 171 | printk(KERN_EMERG "\n" KERN_EMERG "Double Fault\n"); |
172 | dump_bfin_regs(fp, (void *)fp->retx); | 172 | dump_bfin_process(fp); |
173 | dump_bfin_mem((void *)fp->retx); | ||
174 | show_regs(fp); | ||
173 | panic("Double Fault - unrecoverable event\n"); | 175 | panic("Double Fault - unrecoverable event\n"); |
174 | 176 | ||
175 | } | 177 | } |
@@ -250,7 +252,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
250 | case VEC_EXCPT03: | 252 | case VEC_EXCPT03: |
251 | info.si_code = SEGV_STACKFLOW; | 253 | info.si_code = SEGV_STACKFLOW; |
252 | sig = SIGSEGV; | 254 | sig = SIGSEGV; |
253 | printk(KERN_NOTICE EXC_0x03); | 255 | printk(KERN_NOTICE EXC_0x03(KERN_NOTICE)); |
254 | CHK_DEBUGGER_TRAP(); | 256 | CHK_DEBUGGER_TRAP(); |
255 | break; | 257 | break; |
256 | /* 0x04 - User Defined, Caught by default */ | 258 | /* 0x04 - User Defined, Caught by default */ |
@@ -279,7 +281,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
279 | case VEC_OVFLOW: | 281 | case VEC_OVFLOW: |
280 | info.si_code = TRAP_TRACEFLOW; | 282 | info.si_code = TRAP_TRACEFLOW; |
281 | sig = SIGTRAP; | 283 | sig = SIGTRAP; |
282 | printk(KERN_NOTICE EXC_0x11); | 284 | printk(KERN_NOTICE EXC_0x11(KERN_NOTICE)); |
283 | CHK_DEBUGGER_TRAP(); | 285 | CHK_DEBUGGER_TRAP(); |
284 | break; | 286 | break; |
285 | /* 0x12 - Reserved, Caught by default */ | 287 | /* 0x12 - Reserved, Caught by default */ |
@@ -301,36 +303,35 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
301 | case VEC_UNDEF_I: | 303 | case VEC_UNDEF_I: |
302 | info.si_code = ILL_ILLOPC; | 304 | info.si_code = ILL_ILLOPC; |
303 | sig = SIGILL; | 305 | sig = SIGILL; |
304 | printk(KERN_NOTICE EXC_0x21); | 306 | printk(KERN_NOTICE EXC_0x21(KERN_NOTICE)); |
305 | CHK_DEBUGGER_TRAP(); | 307 | CHK_DEBUGGER_TRAP(); |
306 | break; | 308 | break; |
307 | /* 0x22 - Illegal Instruction Combination, handled here */ | 309 | /* 0x22 - Illegal Instruction Combination, handled here */ |
308 | case VEC_ILGAL_I: | 310 | case VEC_ILGAL_I: |
309 | info.si_code = ILL_ILLPARAOP; | 311 | info.si_code = ILL_ILLPARAOP; |
310 | sig = SIGILL; | 312 | sig = SIGILL; |
311 | printk(KERN_NOTICE EXC_0x22); | 313 | printk(KERN_NOTICE EXC_0x22(KERN_NOTICE)); |
312 | CHK_DEBUGGER_TRAP(); | 314 | CHK_DEBUGGER_TRAP(); |
313 | break; | 315 | break; |
314 | /* 0x23 - Data CPLB Protection Violation, | 316 | /* 0x23 - Data CPLB protection violation, handled here */ |
315 | normal case is handled in _cplb_hdr */ | ||
316 | case VEC_CPLB_VL: | 317 | case VEC_CPLB_VL: |
317 | info.si_code = ILL_CPLB_VI; | 318 | info.si_code = ILL_CPLB_VI; |
318 | sig = SIGILL; | 319 | sig = SIGBUS; |
319 | printk(KERN_NOTICE EXC_0x23); | 320 | printk(KERN_NOTICE EXC_0x23(KERN_NOTICE)); |
320 | CHK_DEBUGGER_TRAP(); | 321 | CHK_DEBUGGER_TRAP(); |
321 | break; | 322 | break; |
322 | /* 0x24 - Data access misaligned, handled here */ | 323 | /* 0x24 - Data access misaligned, handled here */ |
323 | case VEC_MISALI_D: | 324 | case VEC_MISALI_D: |
324 | info.si_code = BUS_ADRALN; | 325 | info.si_code = BUS_ADRALN; |
325 | sig = SIGBUS; | 326 | sig = SIGBUS; |
326 | printk(KERN_NOTICE EXC_0x24); | 327 | printk(KERN_NOTICE EXC_0x24(KERN_NOTICE)); |
327 | CHK_DEBUGGER_TRAP(); | 328 | CHK_DEBUGGER_TRAP(); |
328 | break; | 329 | break; |
329 | /* 0x25 - Unrecoverable Event, handled here */ | 330 | /* 0x25 - Unrecoverable Event, handled here */ |
330 | case VEC_UNCOV: | 331 | case VEC_UNCOV: |
331 | info.si_code = ILL_ILLEXCPT; | 332 | info.si_code = ILL_ILLEXCPT; |
332 | sig = SIGILL; | 333 | sig = SIGILL; |
333 | printk(KERN_NOTICE EXC_0x25); | 334 | printk(KERN_NOTICE EXC_0x25(KERN_NOTICE)); |
334 | CHK_DEBUGGER_TRAP(); | 335 | CHK_DEBUGGER_TRAP(); |
335 | break; | 336 | break; |
336 | /* 0x26 - Data CPLB Miss, normal case is handled in _cplb_hdr, | 337 | /* 0x26 - Data CPLB Miss, normal case is handled in _cplb_hdr, |
@@ -338,7 +339,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
338 | case VEC_CPLB_M: | 339 | case VEC_CPLB_M: |
339 | info.si_code = BUS_ADRALN; | 340 | info.si_code = BUS_ADRALN; |
340 | sig = SIGBUS; | 341 | sig = SIGBUS; |
341 | printk(KERN_NOTICE EXC_0x26); | 342 | printk(KERN_NOTICE EXC_0x26(KERN_NOTICE)); |
342 | CHK_DEBUGGER_TRAP(); | 343 | CHK_DEBUGGER_TRAP(); |
343 | break; | 344 | break; |
344 | /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ | 345 | /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero, handled here */ |
@@ -349,7 +350,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
349 | printk(KERN_NOTICE "NULL pointer access (probably)\n"); | 350 | printk(KERN_NOTICE "NULL pointer access (probably)\n"); |
350 | #else | 351 | #else |
351 | sig = SIGILL; | 352 | sig = SIGILL; |
352 | printk(KERN_NOTICE EXC_0x27); | 353 | printk(KERN_NOTICE EXC_0x27(KERN_NOTICE)); |
353 | #endif | 354 | #endif |
354 | CHK_DEBUGGER_TRAP(); | 355 | CHK_DEBUGGER_TRAP(); |
355 | break; | 356 | break; |
@@ -357,7 +358,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
357 | case VEC_WATCH: | 358 | case VEC_WATCH: |
358 | info.si_code = TRAP_WATCHPT; | 359 | info.si_code = TRAP_WATCHPT; |
359 | sig = SIGTRAP; | 360 | sig = SIGTRAP; |
360 | pr_debug(EXC_0x28); | 361 | pr_debug(EXC_0x28(KERN_DEBUG)); |
361 | CHK_DEBUGGER_TRAP_MAYBE(); | 362 | CHK_DEBUGGER_TRAP_MAYBE(); |
362 | /* Check if this is a watchpoint in kernel space */ | 363 | /* Check if this is a watchpoint in kernel space */ |
363 | if (fp->ipend & 0xffc0) | 364 | if (fp->ipend & 0xffc0) |
@@ -379,22 +380,21 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
379 | case VEC_MISALI_I: | 380 | case VEC_MISALI_I: |
380 | info.si_code = BUS_ADRALN; | 381 | info.si_code = BUS_ADRALN; |
381 | sig = SIGBUS; | 382 | sig = SIGBUS; |
382 | printk(KERN_NOTICE EXC_0x2A); | 383 | printk(KERN_NOTICE EXC_0x2A(KERN_NOTICE)); |
383 | CHK_DEBUGGER_TRAP(); | 384 | CHK_DEBUGGER_TRAP(); |
384 | break; | 385 | break; |
385 | /* 0x2B - Instruction CPLB protection Violation, | 386 | /* 0x2B - Instruction CPLB protection violation, handled here */ |
386 | handled in _cplb_hdr */ | ||
387 | case VEC_CPLB_I_VL: | 387 | case VEC_CPLB_I_VL: |
388 | info.si_code = ILL_CPLB_VI; | 388 | info.si_code = ILL_CPLB_VI; |
389 | sig = SIGILL; | 389 | sig = SIGBUS; |
390 | printk(KERN_NOTICE EXC_0x2B); | 390 | printk(KERN_NOTICE EXC_0x2B(KERN_NOTICE)); |
391 | CHK_DEBUGGER_TRAP(); | 391 | CHK_DEBUGGER_TRAP(); |
392 | break; | 392 | break; |
393 | /* 0x2C - Instruction CPLB miss, handled in _cplb_hdr */ | 393 | /* 0x2C - Instruction CPLB miss, handled in _cplb_hdr */ |
394 | case VEC_CPLB_I_M: | 394 | case VEC_CPLB_I_M: |
395 | info.si_code = ILL_CPLB_MISS; | 395 | info.si_code = ILL_CPLB_MISS; |
396 | sig = SIGBUS; | 396 | sig = SIGBUS; |
397 | printk(KERN_NOTICE EXC_0x2C); | 397 | printk(KERN_NOTICE EXC_0x2C(KERN_NOTICE)); |
398 | CHK_DEBUGGER_TRAP(); | 398 | CHK_DEBUGGER_TRAP(); |
399 | break; | 399 | break; |
400 | /* 0x2D - Instruction CPLB Multiple Hits, handled here */ | 400 | /* 0x2D - Instruction CPLB Multiple Hits, handled here */ |
@@ -405,7 +405,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
405 | printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n"); | 405 | printk(KERN_NOTICE "Jump to address 0 - 0x0fff\n"); |
406 | #else | 406 | #else |
407 | sig = SIGILL; | 407 | sig = SIGILL; |
408 | printk(KERN_NOTICE EXC_0x2D); | 408 | printk(KERN_NOTICE EXC_0x2D(KERN_NOTICE)); |
409 | #endif | 409 | #endif |
410 | CHK_DEBUGGER_TRAP(); | 410 | CHK_DEBUGGER_TRAP(); |
411 | break; | 411 | break; |
@@ -413,7 +413,7 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
413 | case VEC_ILL_RES: | 413 | case VEC_ILL_RES: |
414 | info.si_code = ILL_PRVOPC; | 414 | info.si_code = ILL_PRVOPC; |
415 | sig = SIGILL; | 415 | sig = SIGILL; |
416 | printk(KERN_NOTICE EXC_0x2E); | 416 | printk(KERN_NOTICE EXC_0x2E(KERN_NOTICE)); |
417 | CHK_DEBUGGER_TRAP(); | 417 | CHK_DEBUGGER_TRAP(); |
418 | break; | 418 | break; |
419 | /* 0x2F - Reserved, Caught by default */ | 419 | /* 0x2F - Reserved, Caught by default */ |
@@ -446,7 +446,9 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
446 | 446 | ||
447 | if (sig != SIGTRAP) { | 447 | if (sig != SIGTRAP) { |
448 | unsigned long stack; | 448 | unsigned long stack; |
449 | dump_bfin_regs(fp, (void *)fp->retx); | 449 | dump_bfin_process(fp); |
450 | dump_bfin_mem((void *)fp->retx); | ||
451 | show_regs(fp); | ||
450 | 452 | ||
451 | /* Print out the trace buffer if it makes sense */ | 453 | /* Print out the trace buffer if it makes sense */ |
452 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE | 454 | #ifndef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE |
@@ -460,22 +462,25 @@ asmlinkage void trap_c(struct pt_regs *fp) | |||
460 | show_stack(current, &stack); | 462 | show_stack(current, &stack); |
461 | if (oops_in_progress) { | 463 | if (oops_in_progress) { |
462 | #ifndef CONFIG_ACCESS_CHECK | 464 | #ifndef CONFIG_ACCESS_CHECK |
463 | printk(KERN_EMERG "Hey - dork - please turn on " | 465 | printk(KERN_EMERG "Please turn on " |
464 | "CONFIG_ACCESS_CHECK\n"); | 466 | "CONFIG_ACCESS_CHECK\n"); |
465 | #endif | 467 | #endif |
466 | panic("Kernel exception"); | 468 | panic("Kernel exception"); |
467 | } | 469 | } |
468 | |||
469 | /* Ensure that bad return addresses don't end up in an infinite | ||
470 | * loop, due to speculative loads/reads | ||
471 | */ | ||
472 | fp->pc = SAFE_USER_INSTRUCTION; | ||
473 | } | 470 | } |
471 | |||
474 | info.si_signo = sig; | 472 | info.si_signo = sig; |
475 | info.si_errno = 0; | 473 | info.si_errno = 0; |
476 | info.si_addr = (void *)fp->pc; | 474 | info.si_addr = (void *)fp->pc; |
477 | force_sig_info(sig, &info, current); | 475 | force_sig_info(sig, &info, current); |
478 | 476 | ||
477 | /* Ensure that bad return addresses don't end up in an infinite | ||
478 | * loop, due to speculative loads/reads. This needs to be done after | ||
479 | * the signal has been sent. | ||
480 | */ | ||
481 | if (trapnr == VEC_CPLB_I_M && sig != SIGTRAP) | ||
482 | fp->pc = SAFE_USER_INSTRUCTION; | ||
483 | |||
479 | trace_buffer_restore(j); | 484 | trace_buffer_restore(j); |
480 | return; | 485 | return; |
481 | } | 486 | } |
@@ -600,37 +605,48 @@ void dump_stack(void) | |||
600 | show_stack(current, &stack); | 605 | show_stack(current, &stack); |
601 | trace_buffer_restore(tflags); | 606 | trace_buffer_restore(tflags); |
602 | } | 607 | } |
603 | |||
604 | EXPORT_SYMBOL(dump_stack); | 608 | EXPORT_SYMBOL(dump_stack); |
605 | 609 | ||
606 | void dump_bfin_regs(struct pt_regs *fp, void *retaddr) | 610 | void dump_bfin_process(struct pt_regs *fp) |
607 | { | 611 | { |
608 | char buf [150]; | 612 | /* We should be able to look at fp->ipend, but we don't push it on the |
613 | * stack all the time, so do this until we fix that */ | ||
614 | unsigned int context = bfin_read_IPEND(); | ||
615 | |||
616 | if (oops_in_progress) | ||
617 | printk(KERN_EMERG "Kernel OOPS in progress\n"); | ||
618 | |||
619 | if (context & 0x0020) | ||
620 | printk(KERN_NOTICE "Deferred excecption or HW Error context\n"); | ||
621 | else if (context & 0x3FC0) | ||
622 | printk(KERN_NOTICE "Interrupt context\n"); | ||
623 | else if (context & 0x4000) | ||
624 | printk(KERN_NOTICE "Deferred Interrupt context\n"); | ||
625 | else if (context & 0x8000) | ||
626 | printk(KERN_NOTICE "Kernel process context\n"); | ||
627 | |||
628 | if (current->pid && current->mm) { | ||
629 | printk(KERN_NOTICE "CURRENT PROCESS:\n"); | ||
630 | printk(KERN_NOTICE "COMM=%s PID=%d\n", | ||
631 | current->comm, current->pid); | ||
632 | |||
633 | printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" | ||
634 | KERN_NOTICE "BSS = 0x%p-0x%p USER-STACK = 0x%p\n" | ||
635 | KERN_NOTICE "\n", | ||
636 | (void *)current->mm->start_code, | ||
637 | (void *)current->mm->end_code, | ||
638 | (void *)current->mm->start_data, | ||
639 | (void *)current->mm->end_data, | ||
640 | (void *)current->mm->end_data, | ||
641 | (void *)current->mm->brk, | ||
642 | (void *)current->mm->start_stack); | ||
643 | } else | ||
644 | printk(KERN_NOTICE "\n" KERN_NOTICE | ||
645 | "No Valid process in current context\n"); | ||
646 | } | ||
609 | 647 | ||
610 | if (!oops_in_progress) { | 648 | void dump_bfin_mem(void *retaddr) |
611 | if (current->pid && current->mm) { | 649 | { |
612 | printk(KERN_NOTICE "\n" KERN_NOTICE "CURRENT PROCESS:\n"); | ||
613 | printk(KERN_NOTICE "COMM=%s PID=%d\n", | ||
614 | current->comm, current->pid); | ||
615 | |||
616 | printk(KERN_NOTICE "TEXT = 0x%p-0x%p DATA = 0x%p-0x%p\n" | ||
617 | KERN_NOTICE "BSS = 0x%p-0x%p USER-STACK = 0x%p\n" | ||
618 | KERN_NOTICE "\n", | ||
619 | (void *)current->mm->start_code, | ||
620 | (void *)current->mm->end_code, | ||
621 | (void *)current->mm->start_data, | ||
622 | (void *)current->mm->end_data, | ||
623 | (void *)current->mm->end_data, | ||
624 | (void *)current->mm->brk, | ||
625 | (void *)current->mm->start_stack); | ||
626 | } else { | ||
627 | printk (KERN_NOTICE "\n" KERN_NOTICE | ||
628 | "No Valid pid - Either things are really messed up," | ||
629 | " or you are in the kernel\n"); | ||
630 | } | ||
631 | } else { | ||
632 | printk(KERN_NOTICE "Kernel or interrupt exception\n"); | ||
633 | } | ||
634 | 650 | ||
635 | if (retaddr >= (void *)FIXED_CODE_START && retaddr < (void *)physical_mem_end | 651 | if (retaddr >= (void *)FIXED_CODE_START && retaddr < (void *)physical_mem_end |
636 | #if L1_CODE_LENGTH != 0 | 652 | #if L1_CODE_LENGTH != 0 |
@@ -671,8 +687,13 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr) | |||
671 | printk("\n"); | 687 | printk("\n"); |
672 | } else | 688 | } else |
673 | printk("\n" KERN_NOTICE | 689 | printk("\n" KERN_NOTICE |
674 | "Cannot look at the [PC] for it is" | 690 | "Cannot look at the [PC] <%p> for it is" |
675 | " in unreadable memory - sorry\n"); | 691 | " in unreadable memory - sorry\n", retaddr); |
692 | } | ||
693 | |||
694 | void show_regs(struct pt_regs *fp) | ||
695 | { | ||
696 | char buf [150]; | ||
676 | 697 | ||
677 | printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\n"); | 698 | printk(KERN_NOTICE "\n" KERN_NOTICE "SEQUENCER STATUS:\n"); |
678 | printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", | 699 | printk(KERN_NOTICE " SEQSTAT: %08lx IPEND: %04lx SYSCFG: %04lx\n", |
@@ -686,6 +707,8 @@ void dump_bfin_regs(struct pt_regs *fp, void *retaddr) | |||
686 | printk(KERN_NOTICE " RETX: %s\n", buf); | 707 | printk(KERN_NOTICE " RETX: %s\n", buf); |
687 | decode_address(buf, fp->rets); | 708 | decode_address(buf, fp->rets); |
688 | printk(KERN_NOTICE " RETS: %s\n", buf); | 709 | printk(KERN_NOTICE " RETS: %s\n", buf); |
710 | decode_address(buf, fp->pc); | ||
711 | printk(KERN_NOTICE " PC: %s\n", buf); | ||
689 | 712 | ||
690 | if ((long)fp->seqstat & SEQSTAT_EXCAUSE) { | 713 | if ((long)fp->seqstat & SEQSTAT_EXCAUSE) { |
691 | decode_address(buf, bfin_read_DCPLB_FAULT_ADDR()); | 714 | decode_address(buf, bfin_read_DCPLB_FAULT_ADDR()); |
@@ -800,7 +823,9 @@ void panic_cplb_error(int cplb_panic, struct pt_regs *fp) | |||
800 | 823 | ||
801 | printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR()); | 824 | printk(KERN_EMERG "DCPLB_FAULT_ADDR=%p\n", (void *)bfin_read_DCPLB_FAULT_ADDR()); |
802 | printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR()); | 825 | printk(KERN_EMERG "ICPLB_FAULT_ADDR=%p\n", (void *)bfin_read_ICPLB_FAULT_ADDR()); |
803 | dump_bfin_regs(fp, (void *)fp->retx); | 826 | dump_bfin_process(fp); |
827 | dump_bfin_mem((void *)fp->retx); | ||
828 | show_regs(fp); | ||
804 | dump_stack(); | 829 | dump_stack(); |
805 | panic("Unrecoverable event\n"); | 830 | panic("Unrecoverable event\n"); |
806 | } | 831 | } |
diff --git a/arch/blackfin/lib/Makefile b/arch/blackfin/lib/Makefile index bfdad52c570b..635288fc5f54 100644 --- a/arch/blackfin/lib/Makefile +++ b/arch/blackfin/lib/Makefile | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | lib-y := \ | 5 | lib-y := \ |
6 | ashldi3.o ashrdi3.o lshrdi3.o \ | 6 | ashldi3.o ashrdi3.o lshrdi3.o \ |
7 | muldi3.o divsi3.o udivsi3.o udivdi3.o modsi3.o umodsi3.o \ | 7 | muldi3.o divsi3.o udivsi3.o modsi3.o umodsi3.o \ |
8 | checksum.o memcpy.o memset.o memcmp.o memchr.o memmove.o \ | 8 | checksum.o memcpy.o memset.o memcmp.o memchr.o memmove.o \ |
9 | strcmp.o strcpy.o strncmp.o strncpy.o \ | 9 | strcmp.o strcpy.o strncmp.o strncpy.o \ |
10 | umulsi3_highpart.o smulsi3_highpart.o \ | 10 | umulsi3_highpart.o smulsi3_highpart.o \ |
diff --git a/arch/blackfin/lib/ins.S b/arch/blackfin/lib/ins.S index a17cc77ac36f..df7b8833a0c5 100644 --- a/arch/blackfin/lib/ins.S +++ b/arch/blackfin/lib/ins.S | |||
@@ -77,3 +77,22 @@ ENTRY(_insb) | |||
77 | sti R3; | 77 | sti R3; |
78 | RTS; | 78 | RTS; |
79 | ENDPROC(_insb) | 79 | ENDPROC(_insb) |
80 | |||
81 | |||
82 | |||
83 | ENTRY(_insl_16) | ||
84 | P0 = R0; /* P0 = port */ | ||
85 | cli R3; | ||
86 | P1 = R1; /* P1 = address */ | ||
87 | P2 = R2; /* P2 = count */ | ||
88 | SSYNC; | ||
89 | LSETUP( .Llong16_loop_s, .Llong16_loop_e) LC0 = P2; | ||
90 | .Llong16_loop_s: R0 = [P0]; | ||
91 | W[P1++] = R0; | ||
92 | R0 = R0 >> 16; | ||
93 | W[P1++] = R0; | ||
94 | NOP; | ||
95 | .Llong16_loop_e: NOP; | ||
96 | sti R3; | ||
97 | RTS; | ||
98 | ENDPROC(_insl_16) | ||
diff --git a/arch/blackfin/lib/strcmp.c b/arch/blackfin/lib/strcmp.c index 4eeefd86907f..fde39a1950ce 100644 --- a/arch/blackfin/lib/strcmp.c +++ b/arch/blackfin/lib/strcmp.c | |||
@@ -1,10 +1,19 @@ | |||
1 | #include <linux/types.h> | 1 | /* |
2 | * Provide symbol in case str func is not inlined. | ||
3 | * | ||
4 | * Copyright (c) 2006-2007 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
2 | 8 | ||
3 | #define strcmp __inline_strcmp | 9 | #define strcmp __inline_strcmp |
4 | #include <asm/string.h> | 10 | #include <asm/string.h> |
5 | #undef strcmp | 11 | #undef strcmp |
6 | 12 | ||
13 | #include <linux/module.h> | ||
14 | |||
7 | int strcmp(const char *dest, const char *src) | 15 | int strcmp(const char *dest, const char *src) |
8 | { | 16 | { |
9 | return __inline_strcmp(dest, src); | 17 | return __inline_strcmp(dest, src); |
10 | } | 18 | } |
19 | EXPORT_SYMBOL(strcmp); | ||
diff --git a/arch/blackfin/lib/strcpy.c b/arch/blackfin/lib/strcpy.c index 534589db7256..2a8836b1f4d3 100644 --- a/arch/blackfin/lib/strcpy.c +++ b/arch/blackfin/lib/strcpy.c | |||
@@ -1,10 +1,19 @@ | |||
1 | #include <linux/types.h> | 1 | /* |
2 | * Provide symbol in case str func is not inlined. | ||
3 | * | ||
4 | * Copyright (c) 2006-2007 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
2 | 8 | ||
3 | #define strcpy __inline_strcpy | 9 | #define strcpy __inline_strcpy |
4 | #include <asm/string.h> | 10 | #include <asm/string.h> |
5 | #undef strcpy | 11 | #undef strcpy |
6 | 12 | ||
13 | #include <linux/module.h> | ||
14 | |||
7 | char *strcpy(char *dest, const char *src) | 15 | char *strcpy(char *dest, const char *src) |
8 | { | 16 | { |
9 | return __inline_strcpy(dest, src); | 17 | return __inline_strcpy(dest, src); |
10 | } | 18 | } |
19 | EXPORT_SYMBOL(strcpy); | ||
diff --git a/arch/blackfin/lib/strncmp.c b/arch/blackfin/lib/strncmp.c index d791f120bff7..2aaae78a68e0 100644 --- a/arch/blackfin/lib/strncmp.c +++ b/arch/blackfin/lib/strncmp.c | |||
@@ -1,10 +1,19 @@ | |||
1 | #include <linux/types.h> | 1 | /* |
2 | * Provide symbol in case str func is not inlined. | ||
3 | * | ||
4 | * Copyright (c) 2006-2007 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
2 | 8 | ||
3 | #define strncmp __inline_strncmp | 9 | #define strncmp __inline_strncmp |
4 | #include <asm/string.h> | 10 | #include <asm/string.h> |
5 | #undef strncmp | 11 | #undef strncmp |
6 | 12 | ||
13 | #include <linux/module.h> | ||
14 | |||
7 | int strncmp(const char *cs, const char *ct, size_t count) | 15 | int strncmp(const char *cs, const char *ct, size_t count) |
8 | { | 16 | { |
9 | return __inline_strncmp(cs, ct, count); | 17 | return __inline_strncmp(cs, ct, count); |
10 | } | 18 | } |
19 | EXPORT_SYMBOL(strncmp); | ||
diff --git a/arch/blackfin/lib/strncpy.c b/arch/blackfin/lib/strncpy.c index 1fecb5c71ffb..ea1dc6bf2373 100644 --- a/arch/blackfin/lib/strncpy.c +++ b/arch/blackfin/lib/strncpy.c | |||
@@ -1,10 +1,19 @@ | |||
1 | #include <linux/types.h> | 1 | /* |
2 | * Provide symbol in case str func is not inlined. | ||
3 | * | ||
4 | * Copyright (c) 2006-2007 Analog Devices Inc. | ||
5 | * | ||
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
2 | 8 | ||
3 | #define strncpy __inline_strncpy | 9 | #define strncpy __inline_strncpy |
4 | #include <asm/string.h> | 10 | #include <asm/string.h> |
5 | #undef strncpy | 11 | #undef strncpy |
6 | 12 | ||
13 | #include <linux/module.h> | ||
14 | |||
7 | char *strncpy(char *dest, const char *src, size_t n) | 15 | char *strncpy(char *dest, const char *src, size_t n) |
8 | { | 16 | { |
9 | return __inline_strncpy(dest, src, n); | 17 | return __inline_strncpy(dest, src, n); |
10 | } | 18 | } |
19 | EXPORT_SYMBOL(strncpy); | ||
diff --git a/arch/blackfin/lib/udivdi3.S b/arch/blackfin/lib/udivdi3.S deleted file mode 100644 index ad1ebee675e1..000000000000 --- a/arch/blackfin/lib/udivdi3.S +++ /dev/null | |||
@@ -1,375 +0,0 @@ | |||
1 | /* | ||
2 | * udivdi3.S - unsigned long long division | ||
3 | * | ||
4 | * Copyright 2003-2007 Analog Devices Inc. | ||
5 | * Enter bugs at http://blackfin.uclinux.org/ | ||
6 | * | ||
7 | * Licensed under the GPLv2 or later. | ||
8 | */ | ||
9 | |||
10 | #include <linux/linkage.h> | ||
11 | |||
12 | #define CARRY AC0 | ||
13 | |||
14 | #ifdef CONFIG_ARITHMETIC_OPS_L1 | ||
15 | .section .l1.text | ||
16 | #else | ||
17 | .text | ||
18 | #endif | ||
19 | |||
20 | |||
21 | ENTRY(___udivdi3) | ||
22 | R3 = [SP + 12]; | ||
23 | [--SP] = (R7:4, P5:3); | ||
24 | |||
25 | /* Attempt to use divide primitive first; these will handle | ||
26 | ** most cases, and they're quick - avoids stalls incurred by | ||
27 | ** testing for identities. | ||
28 | */ | ||
29 | |||
30 | R4 = R2 | R3; | ||
31 | CC = R4 == 0; | ||
32 | IF CC JUMP .LDIV_BY_ZERO; | ||
33 | |||
34 | R4.H = 0x8000; | ||
35 | R4 >>>= 16; // R4 now 0xFFFF8000 | ||
36 | R5 = R0 | R2; // If either dividend or | ||
37 | R4 = R5 & R4; // divisor have bits in | ||
38 | CC = R4; // top half or low half's sign | ||
39 | IF CC JUMP .LIDENTS; // bit, skip builtins. | ||
40 | R4 = R1 | R3; // Also check top halves | ||
41 | CC = R4; | ||
42 | IF CC JUMP .LIDENTS; | ||
43 | |||
44 | /* Can use the builtins. */ | ||
45 | |||
46 | AQ = CC; // Clear AQ (CC==0) | ||
47 | DIVQ(R0, R2); | ||
48 | DIVQ(R0, R2); | ||
49 | DIVQ(R0, R2); | ||
50 | DIVQ(R0, R2); | ||
51 | DIVQ(R0, R2); | ||
52 | DIVQ(R0, R2); | ||
53 | DIVQ(R0, R2); | ||
54 | DIVQ(R0, R2); | ||
55 | DIVQ(R0, R2); | ||
56 | DIVQ(R0, R2); | ||
57 | DIVQ(R0, R2); | ||
58 | DIVQ(R0, R2); | ||
59 | DIVQ(R0, R2); | ||
60 | DIVQ(R0, R2); | ||
61 | DIVQ(R0, R2); | ||
62 | DIVQ(R0, R2); | ||
63 | DIVQ(R0, R2); | ||
64 | R0 = R0.L (Z); | ||
65 | R1 = 0; | ||
66 | (R7:4, P5:3) = [SP++]; | ||
67 | RTS; | ||
68 | |||
69 | .LIDENTS: | ||
70 | /* Test for common identities. Value to be returned is | ||
71 | ** placed in R6,R7. | ||
72 | */ | ||
73 | // Check for 0/y, return 0 | ||
74 | R4 = R0 | R1; | ||
75 | CC = R4 == 0; | ||
76 | IF CC JUMP .LRETURN_R0; | ||
77 | |||
78 | // Check for x/x, return 1 | ||
79 | R6 = R0 - R2; // If x == y, then both R6 and R7 will be zero | ||
80 | R7 = R1 - R3; | ||
81 | R4 = R6 | R7; // making R4 zero. | ||
82 | R6 += 1; // which would now make R6:R7==1. | ||
83 | CC = R4 == 0; | ||
84 | IF CC JUMP .LRETURN_IDENT; | ||
85 | |||
86 | // Check for x/1, return x | ||
87 | R6 = R0; | ||
88 | R7 = R1; | ||
89 | CC = R3 == 0; | ||
90 | IF !CC JUMP .Lnexttest; | ||
91 | CC = R2 == 1; | ||
92 | IF CC JUMP .LRETURN_IDENT; | ||
93 | |||
94 | .Lnexttest: | ||
95 | R4.L = ONES R2; // check for div by power of two which | ||
96 | R5.L = ONES R3; // can be done using a shift | ||
97 | R6 = PACK (R5.L, R4.L); | ||
98 | CC = R6 == 1; | ||
99 | IF CC JUMP .Lpower_of_two_upper_zero; | ||
100 | R6 = PACK (R4.L, R5.L); | ||
101 | CC = R6 == 1; | ||
102 | IF CC JUMP .Lpower_of_two_lower_zero; | ||
103 | |||
104 | // Check for x < y, return 0 | ||
105 | R6 = 0; | ||
106 | R7 = R6; | ||
107 | CC = R1 < R3 (IU); | ||
108 | IF CC JUMP .LRETURN_IDENT; | ||
109 | CC = R1 == R3; | ||
110 | IF !CC JUMP .Lno_idents; | ||
111 | CC = R0 < R2 (IU); | ||
112 | IF CC JUMP .LRETURN_IDENT; | ||
113 | |||
114 | .Lno_idents: // Idents don't match. Go for the full operation | ||
115 | |||
116 | |||
117 | // If X, or X and Y have high bit set, it'll affect the | ||
118 | // results, so shift right one to stop this. Note: we've already | ||
119 | // checked that X >= Y, so Y's msb won't be set unless X's | ||
120 | // is. | ||
121 | |||
122 | R4 = 0; | ||
123 | CC = R1 < 0; | ||
124 | IF !CC JUMP .Lx_msb_clear; | ||
125 | CC = !CC; // 1 -> 0; | ||
126 | R1 = ROT R1 BY -1; // Shift X >> 1 | ||
127 | R0 = ROT R0 BY -1; // lsb -> CC | ||
128 | BITSET(R4,31); // to record only x msb was set | ||
129 | CC = R3 < 0; | ||
130 | IF !CC JUMP .Ly_msb_clear; | ||
131 | CC = !CC; | ||
132 | R3 = ROT R3 BY -1; // Shift Y >> 1 | ||
133 | R2 = ROT R2 BY -1; | ||
134 | BITCLR(R4,31); // clear bit to record only x msb was set | ||
135 | |||
136 | .Ly_msb_clear: | ||
137 | .Lx_msb_clear: | ||
138 | // Bit 31 in R4 indicates X msb set, but Y msb wasn't, and no bits | ||
139 | // were lost, so we should shift result left by one. | ||
140 | |||
141 | [--SP] = R4; // save for later | ||
142 | |||
143 | // In the loop that follows, each iteration we add | ||
144 | // either Y' or -Y' to the Remainder. We compute the | ||
145 | // negated Y', and store, for convenience. Y' goes | ||
146 | // into P0:P1, while -Y' goes into P2:P3. | ||
147 | |||
148 | P0 = R2; | ||
149 | P1 = R3; | ||
150 | R2 = -R2; | ||
151 | CC = CARRY; | ||
152 | CC = !CC; | ||
153 | R4 = CC; | ||
154 | R3 = -R3; | ||
155 | R3 = R3 - R4; | ||
156 | |||
157 | R6 = 0; // remainder = 0 | ||
158 | R7 = R6; | ||
159 | |||
160 | [--SP] = R2; P2 = SP; | ||
161 | [--SP] = R3; P3 = SP; | ||
162 | [--SP] = R6; P5 = SP; // AQ = 0 | ||
163 | [--SP] = P1; | ||
164 | |||
165 | /* In the loop that follows, we use the following | ||
166 | ** register assignments: | ||
167 | ** R0,R1 X, workspace | ||
168 | ** R2,R3 Y, workspace | ||
169 | ** R4,R5 partial Div | ||
170 | ** R6,R7 partial remainder | ||
171 | ** P5 AQ | ||
172 | ** The remainder and div form a 128-bit number, with | ||
173 | ** the remainder in the high 64-bits. | ||
174 | */ | ||
175 | R4 = R0; // Div = X' | ||
176 | R5 = R1; | ||
177 | R3 = 0; | ||
178 | |||
179 | P4 = 64; // Iterate once per bit | ||
180 | LSETUP(.LULST,.LULEND) LC0 = P4; | ||
181 | .LULST: | ||
182 | /* Shift Div and remainder up by one. The bit shifted | ||
183 | ** out of the top of the quotient is shifted into the bottom | ||
184 | ** of the remainder. | ||
185 | */ | ||
186 | CC = R3; | ||
187 | R4 = ROT R4 BY 1; | ||
188 | R5 = ROT R5 BY 1 || // low q to high q | ||
189 | R2 = [P5]; // load saved AQ | ||
190 | R6 = ROT R6 BY 1 || // high q to low r | ||
191 | R0 = [P2]; // load -Y' | ||
192 | R7 = ROT R7 BY 1 || // low r to high r | ||
193 | R1 = [P3]; | ||
194 | |||
195 | // Assume add -Y' | ||
196 | CC = R2 < 0; // But if AQ is set... | ||
197 | IF CC R0 = P0; // then add Y' instead | ||
198 | IF CC R1 = P1; | ||
199 | |||
200 | R6 = R6 + R0; // Rem += (Y' or -Y') | ||
201 | CC = CARRY; | ||
202 | R0 = CC; | ||
203 | R7 = R7 + R1; | ||
204 | R7 = R7 + R0 (NS) || | ||
205 | R1 = [SP]; | ||
206 | // Set the next AQ bit | ||
207 | R1 = R7 ^ R1; // from Remainder and Y' | ||
208 | R1 = R1 >> 31 || // Negate AQ's value, and | ||
209 | [P5] = R1; // save next AQ | ||
210 | BITTGL(R1, 0); // add neg AQ to the Div | ||
211 | .LULEND: R4 = R4 + R1; | ||
212 | |||
213 | R6 = [SP + 16]; | ||
214 | |||
215 | R0 = R4; | ||
216 | R1 = R5; | ||
217 | CC = BITTST(R6,30); // Just set CC=0 | ||
218 | R4 = ROT R0 BY 1; // but if we had to shift X, | ||
219 | R5 = ROT R1 BY 1; // and didn't shift any bits out, | ||
220 | CC = BITTST(R6,31); // then the result will be half as | ||
221 | IF CC R0 = R4; // much as required, so shift left | ||
222 | IF CC R1 = R5; // one space. | ||
223 | |||
224 | SP += 20; | ||
225 | (R7:4, P5:3) = [SP++]; | ||
226 | RTS; | ||
227 | |||
228 | .Lpower_of_two: | ||
229 | /* Y has a single bit set, which means it's a power of two. | ||
230 | ** That means we can perform the division just by shifting | ||
231 | ** X to the right the appropriate number of bits | ||
232 | */ | ||
233 | |||
234 | /* signbits returns the number of sign bits, minus one. | ||
235 | ** 1=>30, 2=>29, ..., 0x40000000=>0. Which means we need | ||
236 | ** to shift right n-signbits spaces. It also means 0x80000000 | ||
237 | ** is a special case, because that *also* gives a signbits of 0 | ||
238 | */ | ||
239 | .Lpower_of_two_lower_zero: | ||
240 | R7 = 0; | ||
241 | R6 = R1 >> 31; | ||
242 | CC = R3 < 0; | ||
243 | IF CC JUMP .LRETURN_IDENT; | ||
244 | |||
245 | R2.L = SIGNBITS R3; | ||
246 | R2 = R2.L (Z); | ||
247 | R2 += -62; | ||
248 | (R7:4, P5:3) = [SP++]; | ||
249 | JUMP ___lshftli; | ||
250 | |||
251 | .Lpower_of_two_upper_zero: | ||
252 | CC = R2 < 0; | ||
253 | IF CC JUMP .Lmaxint_shift; | ||
254 | |||
255 | R2.L = SIGNBITS R2; | ||
256 | R2 = R2.L (Z); | ||
257 | R2 += -30; | ||
258 | (R7:4, P5:3) = [SP++]; | ||
259 | JUMP ___lshftli; | ||
260 | |||
261 | .Lmaxint_shift: | ||
262 | R2 = -31; | ||
263 | (R7:4, P5:3) = [SP++]; | ||
264 | JUMP ___lshftli; | ||
265 | |||
266 | .LRETURN_IDENT: | ||
267 | R0 = R6; | ||
268 | R1 = R7; | ||
269 | .LRETURN_R0: | ||
270 | (R7:4, P5:3) = [SP++]; | ||
271 | RTS; | ||
272 | .LDIV_BY_ZERO: | ||
273 | R0 = ~R2; | ||
274 | R1 = R0; | ||
275 | (R7:4, P5:3) = [SP++]; | ||
276 | RTS; | ||
277 | |||
278 | ENDPROC(___udivdi3) | ||
279 | |||
280 | |||
281 | ENTRY(___lshftli) | ||
282 | CC = R2 == 0; | ||
283 | IF CC JUMP .Lfinished; // nothing to do | ||
284 | CC = R2 < 0; | ||
285 | IF CC JUMP .Lrshift; | ||
286 | R3 = 64; | ||
287 | CC = R2 < R3; | ||
288 | IF !CC JUMP .Lretzero; | ||
289 | |||
290 | // We're shifting left, and it's less than 64 bits, so | ||
291 | // a valid result will be returned. | ||
292 | |||
293 | R3 >>= 1; // R3 now 32 | ||
294 | CC = R2 < R3; | ||
295 | |||
296 | IF !CC JUMP .Lzerohalf; | ||
297 | |||
298 | // We're shifting left, between 1 and 31 bits, which means | ||
299 | // some of the low half will be shifted into the high half. | ||
300 | // Work out how much. | ||
301 | |||
302 | R3 = R3 - R2; | ||
303 | |||
304 | // Save that much data from the bottom half. | ||
305 | |||
306 | P1 = R7; | ||
307 | R7 = R0; | ||
308 | R7 >>= R3; | ||
309 | |||
310 | // Adjust both parts of the parameter. | ||
311 | |||
312 | R0 <<= R2; | ||
313 | R1 <<= R2; | ||
314 | |||
315 | // And include the bits moved across. | ||
316 | |||
317 | R1 = R1 | R7; | ||
318 | R7 = P1; | ||
319 | RTS; | ||
320 | |||
321 | .Lzerohalf: | ||
322 | // We're shifting left, between 32 and 63 bits, so the | ||
323 | // bottom half will become zero, and the top half will | ||
324 | // lose some bits. How many? | ||
325 | |||
326 | R2 = R2 - R3; // N - 32 | ||
327 | R1 = LSHIFT R0 BY R2.L; | ||
328 | R0 = R0 - R0; | ||
329 | RTS; | ||
330 | |||
331 | .Lretzero: | ||
332 | R0 = R0 - R0; | ||
333 | R1 = R0; | ||
334 | .Lfinished: | ||
335 | RTS; | ||
336 | |||
337 | .Lrshift: | ||
338 | // We're shifting right, but by how much? | ||
339 | R2 = -R2; | ||
340 | R3 = 64; | ||
341 | CC = R2 < R3; | ||
342 | IF !CC JUMP .Lretzero; | ||
343 | |||
344 | // Shifting right less than 64 bits, so some result bits will | ||
345 | // be retained. | ||
346 | |||
347 | R3 >>= 1; // R3 now 32 | ||
348 | CC = R2 < R3; | ||
349 | IF !CC JUMP .Lsignhalf; | ||
350 | |||
351 | // Shifting right between 1 and 31 bits, so need to copy | ||
352 | // data across words. | ||
353 | |||
354 | P1 = R7; | ||
355 | R3 = R3 - R2; | ||
356 | R7 = R1; | ||
357 | R7 <<= R3; | ||
358 | R1 >>= R2; | ||
359 | R0 >>= R2; | ||
360 | R0 = R7 | R0; | ||
361 | R7 = P1; | ||
362 | RTS; | ||
363 | |||
364 | .Lsignhalf: | ||
365 | // Shifting right between 32 and 63 bits, so the top half | ||
366 | // will become all zero-bits, and the bottom half is some | ||
367 | // of the top half. But how much? | ||
368 | |||
369 | R2 = R2 - R3; | ||
370 | R0 = R1; | ||
371 | R0 >>= R2; | ||
372 | R1 = 0; | ||
373 | RTS; | ||
374 | |||
375 | ENDPROC(___lshftli) | ||
diff --git a/arch/blackfin/mach-bf527/Kconfig b/arch/blackfin/mach-bf527/Kconfig index 50321f723dee..5c736837d4bf 100644 --- a/arch/blackfin/mach-bf527/Kconfig +++ b/arch/blackfin/mach-bf527/Kconfig | |||
@@ -1,5 +1,7 @@ | |||
1 | if (BF52x) | 1 | if (BF52x) |
2 | 2 | ||
3 | source "arch/blackfin/mach-bf527/boards/Kconfig" | ||
4 | |||
3 | menu "BF527 Specific Configuration" | 5 | menu "BF527 Specific Configuration" |
4 | 6 | ||
5 | comment "Alternative Multiplexing Scheme" | 7 | comment "Alternative Multiplexing Scheme" |
diff --git a/arch/blackfin/mach-bf527/boards/Kconfig b/arch/blackfin/mach-bf527/boards/Kconfig new file mode 100644 index 000000000000..6a570ad03746 --- /dev/null +++ b/arch/blackfin/mach-bf527/boards/Kconfig | |||
@@ -0,0 +1,12 @@ | |||
1 | choice | ||
2 | prompt "System type" | ||
3 | default BFIN527_EZKIT | ||
4 | help | ||
5 | Select your board! | ||
6 | |||
7 | config BFIN527_EZKIT | ||
8 | bool "BF527-EZKIT" | ||
9 | help | ||
10 | BF527-EZKIT-LITE board support. | ||
11 | |||
12 | endchoice | ||
diff --git a/arch/blackfin/mach-bf527/boards/Makefile b/arch/blackfin/mach-bf527/boards/Makefile index 912ac8ebc889..7277d35ef111 100644 --- a/arch/blackfin/mach-bf527/boards/Makefile +++ b/arch/blackfin/mach-bf527/boards/Makefile | |||
@@ -1,7 +1,5 @@ | |||
1 | # | 1 | # |
2 | # arch/blackfin/mach-bf532/boards/Makefile | 2 | # arch/blackfin/mach-bf527/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += eth_mac.o | 5 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o |
6 | obj-$(CONFIG_BFIN527_EZKIT) += ezkit.o | ||
7 | |||
diff --git a/arch/blackfin/mach-bf527/boards/eth_mac.c b/arch/blackfin/mach-bf527/boards/eth_mac.c deleted file mode 100644 index a725cc8a9290..000000000000 --- a/arch/blackfin/mach-bf527/boards/eth_mac.c +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/blackfin/mach-bf537/board/eth_mac.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Analog Devices, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/module.h> | ||
21 | #include <asm/blackfin.h> | ||
22 | |||
23 | #if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP) | ||
24 | |||
25 | /* | ||
26 | * Currently the MAC address is saved in Flash by U-Boot | ||
27 | */ | ||
28 | #define FLASH_MAC 0x203f0000 | ||
29 | |||
30 | void get_bf537_ether_addr(char *addr) | ||
31 | { | ||
32 | unsigned int flash_mac = (unsigned int) FLASH_MAC; | ||
33 | *(u32 *)(&(addr[0])) = bfin_read32(flash_mac); | ||
34 | flash_mac += 4; | ||
35 | *(u16 *)(&(addr[4])) = bfin_read16(flash_mac); | ||
36 | } | ||
37 | |||
38 | #else | ||
39 | |||
40 | /* | ||
41 | * Provide MAC address function for other specific board setting | ||
42 | */ | ||
43 | void get_bf537_ether_addr(char *addr) | ||
44 | { | ||
45 | printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__); | ||
46 | } | ||
47 | |||
48 | #endif | ||
49 | |||
50 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf527/boards/ezkit.c b/arch/blackfin/mach-bf527/boards/ezkit.c index bf1bedcc8868..003e2ac654d8 100644 --- a/arch/blackfin/mach-bf527/boards/ezkit.c +++ b/arch/blackfin/mach-bf527/boards/ezkit.c | |||
@@ -35,17 +35,18 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
38 | #include <linux/usb_isp1362.h> | 38 | #include <linux/usb/isp1362.h> |
39 | #endif | 39 | #endif |
40 | #include <linux/pata_platform.h> | 40 | #include <linux/pata_platform.h> |
41 | #include <linux/irq.h> | 41 | #include <linux/irq.h> |
42 | #include <linux/interrupt.h> | 42 | #include <linux/interrupt.h> |
43 | #include <linux/usb_sl811.h> | 43 | #include <linux/usb/sl811.h> |
44 | #include <asm/cplb.h> | 44 | #include <asm/cplb.h> |
45 | #include <asm/dma.h> | 45 | #include <asm/dma.h> |
46 | #include <asm/bfin5xx_spi.h> | 46 | #include <asm/bfin5xx_spi.h> |
47 | #include <asm/reboot.h> | 47 | #include <asm/reboot.h> |
48 | #include <asm/nand.h> | 48 | #include <asm/nand.h> |
49 | #include <asm/portmux.h> | ||
49 | #include <linux/spi/ad7877.h> | 50 | #include <linux/spi/ad7877.h> |
50 | 51 | ||
51 | /* | 52 | /* |
@@ -450,6 +451,13 @@ static const struct ad7877_platform_data bfin_ad7877_ts_info = { | |||
450 | }; | 451 | }; |
451 | #endif | 452 | #endif |
452 | 453 | ||
454 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
455 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
456 | static struct bfin5xx_spi_chip spi_wm8731_chip_info = { | ||
457 | .enable_dma = 0, | ||
458 | .bits_per_word = 16, | ||
459 | }; | ||
460 | #endif | ||
453 | static struct spi_board_info bfin_spi_board_info[] __initdata = { | 461 | static struct spi_board_info bfin_spi_board_info[] __initdata = { |
454 | #if defined(CONFIG_MTD_M25P80) \ | 462 | #if defined(CONFIG_MTD_M25P80) \ |
455 | || defined(CONFIG_MTD_M25P80_MODULE) | 463 | || defined(CONFIG_MTD_M25P80_MODULE) |
@@ -551,17 +559,29 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
551 | .platform_data = &bfin_ad7877_ts_info, | 559 | .platform_data = &bfin_ad7877_ts_info, |
552 | .irq = IRQ_PF6, | 560 | .irq = IRQ_PF6, |
553 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 561 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
554 | .bus_num = 1, | 562 | .bus_num = 0, |
555 | .chip_select = 1, | 563 | .chip_select = 1, |
556 | .controller_data = &spi_ad7877_chip_info, | 564 | .controller_data = &spi_ad7877_chip_info, |
557 | }, | 565 | }, |
558 | #endif | 566 | #endif |
567 | #if defined(CONFIG_SND_SOC_WM8731) || defined(CONFIG_SND_SOC_WM8731_MODULE) \ | ||
568 | && defined(CONFIG_SND_SOC_WM8731_SPI) | ||
569 | { | ||
570 | .modalias = "wm8731", | ||
571 | .max_speed_hz = 3125000, /* max spi clock (SCK) speed in HZ */ | ||
572 | .bus_num = 0, | ||
573 | .chip_select = 5, | ||
574 | .controller_data = &spi_wm8731_chip_info, | ||
575 | .mode = SPI_MODE_0, | ||
576 | }, | ||
577 | #endif | ||
559 | }; | 578 | }; |
560 | 579 | ||
561 | /* SPI controller data */ | 580 | /* SPI controller data */ |
562 | static struct bfin5xx_spi_master bfin_spi0_info = { | 581 | static struct bfin5xx_spi_master bfin_spi0_info = { |
563 | .num_chipselect = 8, | 582 | .num_chipselect = 8, |
564 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 583 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
584 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
565 | }; | 585 | }; |
566 | 586 | ||
567 | /* SPI (0) */ | 587 | /* SPI (0) */ |
@@ -788,3 +808,14 @@ void native_machine_restart(char *cmd) | |||
788 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 808 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
789 | bfin_gpio_reset_spi0_ssel1(); | 809 | bfin_gpio_reset_spi0_ssel1(); |
790 | } | 810 | } |
811 | |||
812 | /* | ||
813 | * Currently the MAC address is saved in Flash by U-Boot | ||
814 | */ | ||
815 | #define FLASH_MAC 0x203f0000 | ||
816 | void bfin_get_ether_addr(char *addr) | ||
817 | { | ||
818 | *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); | ||
819 | *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); | ||
820 | } | ||
821 | EXPORT_SYMBOL(bfin_get_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf533/Kconfig b/arch/blackfin/mach-bf533/Kconfig index 14297b3ed5c3..76beb75f12da 100644 --- a/arch/blackfin/mach-bf533/Kconfig +++ b/arch/blackfin/mach-bf533/Kconfig | |||
@@ -1,5 +1,7 @@ | |||
1 | if (BF533 || BF532 || BF531) | 1 | if (BF533 || BF532 || BF531) |
2 | 2 | ||
3 | source "arch/blackfin/mach-bf533/boards/Kconfig" | ||
4 | |||
3 | menu "BF533/2/1 Specific Configuration" | 5 | menu "BF533/2/1 Specific Configuration" |
4 | 6 | ||
5 | comment "Interrupt Priority Assignment" | 7 | comment "Interrupt Priority Assignment" |
diff --git a/arch/blackfin/mach-bf533/boards/H8606.c b/arch/blackfin/mach-bf533/boards/H8606.c index b941550f9568..6bcf4047f89c 100644 --- a/arch/blackfin/mach-bf533/boards/H8606.c +++ b/arch/blackfin/mach-bf533/boards/H8606.c | |||
@@ -36,20 +36,21 @@ | |||
36 | #include <linux/spi/spi.h> | 36 | #include <linux/spi/spi.h> |
37 | #include <linux/spi/flash.h> | 37 | #include <linux/spi/flash.h> |
38 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 38 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
39 | #include <linux/usb_isp1362.h> | 39 | #include <linux/usb/isp1362.h> |
40 | #endif | 40 | #endif |
41 | #include <linux/pata_platform.h> | 41 | #include <linux/pata_platform.h> |
42 | #include <linux/irq.h> | 42 | #include <linux/irq.h> |
43 | #include <asm/dma.h> | 43 | #include <asm/dma.h> |
44 | #include <asm/bfin5xx_spi.h> | 44 | #include <asm/bfin5xx_spi.h> |
45 | #include <asm/reboot.h> | 45 | #include <asm/reboot.h> |
46 | #include <asm/portmux.h> | ||
46 | 47 | ||
47 | /* | 48 | /* |
48 | * Name the Board for the /proc/cpuinfo | 49 | * Name the Board for the /proc/cpuinfo |
49 | */ | 50 | */ |
50 | const char bfin_board_name[] = "HV Sistemas H8606"; | 51 | const char bfin_board_name[] = "HV Sistemas H8606"; |
51 | 52 | ||
52 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_BFIN_MODULE) | 53 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
53 | static struct platform_device rtc_device = { | 54 | static struct platform_device rtc_device = { |
54 | .name = "rtc-bfin", | 55 | .name = "rtc-bfin", |
55 | .id = -1, | 56 | .id = -1, |
@@ -93,10 +94,6 @@ static struct resource smc91x_resources[] = { | |||
93 | .end = IRQ_PROG_INTB, | 94 | .end = IRQ_PROG_INTB, |
94 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 95 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
95 | }, { | 96 | }, { |
96 | /* | ||
97 | * denotes the flag pin and is used directly if | ||
98 | * CONFIG_IRQCHIP_DEMUX_GPIO is defined. | ||
99 | */ | ||
100 | .start = IRQ_PF7, | 97 | .start = IRQ_PF7, |
101 | .end = IRQ_PF7, | 98 | .end = IRQ_PF7, |
102 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 99 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
@@ -269,6 +266,7 @@ static struct resource bfin_spi0_resource[] = { | |||
269 | static struct bfin5xx_spi_master bfin_spi0_info = { | 266 | static struct bfin5xx_spi_master bfin_spi0_info = { |
270 | .num_chipselect = 8, | 267 | .num_chipselect = 8, |
271 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 268 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
269 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
272 | }; | 270 | }; |
273 | 271 | ||
274 | static struct platform_device bfin_spi0_device = { | 272 | static struct platform_device bfin_spi0_device = { |
@@ -342,4 +340,4 @@ static int __init H8606_init(void) | |||
342 | return 0; | 340 | return 0; |
343 | } | 341 | } |
344 | 342 | ||
345 | arch_initcall(H8606_init); \ No newline at end of file | 343 | arch_initcall(H8606_init); |
diff --git a/arch/blackfin/mach-bf533/boards/Kconfig b/arch/blackfin/mach-bf533/boards/Kconfig new file mode 100644 index 000000000000..751de5110afc --- /dev/null +++ b/arch/blackfin/mach-bf533/boards/Kconfig | |||
@@ -0,0 +1,34 @@ | |||
1 | choice | ||
2 | prompt "System type" | ||
3 | default BFIN533_STAMP | ||
4 | help | ||
5 | Select your board! | ||
6 | |||
7 | config BFIN533_EZKIT | ||
8 | bool "BF533-EZKIT" | ||
9 | help | ||
10 | BF533-EZKIT-LITE board support. | ||
11 | |||
12 | config BFIN533_STAMP | ||
13 | bool "BF533-STAMP" | ||
14 | help | ||
15 | BF533-STAMP board support. | ||
16 | |||
17 | config BFIN533_BLUETECHNIX_CM | ||
18 | bool "Bluetechnix CM-BF533" | ||
19 | depends on (BF533) | ||
20 | help | ||
21 | CM-BF533 support for EVAL- and DEV-Board. | ||
22 | |||
23 | config H8606_HVSISTEMAS | ||
24 | bool "HV Sistemas H8606" | ||
25 | depends on (BF532) | ||
26 | help | ||
27 | HV Sistemas H8606 board support. | ||
28 | |||
29 | config GENERIC_BF533_BOARD | ||
30 | bool "Generic" | ||
31 | help | ||
32 | Generic or Custom board support. | ||
33 | |||
34 | endchoice | ||
diff --git a/arch/blackfin/mach-bf533/boards/Makefile b/arch/blackfin/mach-bf533/boards/Makefile index 2452b456ccbd..54f57fb9791e 100644 --- a/arch/blackfin/mach-bf533/boards/Makefile +++ b/arch/blackfin/mach-bf533/boards/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # arch/blackfin/mach-bf533/boards/Makefile | 2 | # arch/blackfin/mach-bf533/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_GENERIC_BOARD) += generic_board.o | 5 | obj-$(CONFIG_GENERIC_BF533_BOARD) += generic_board.o |
6 | obj-$(CONFIG_BFIN533_STAMP) += stamp.o | 6 | obj-$(CONFIG_BFIN533_STAMP) += stamp.o |
7 | obj-$(CONFIG_BFIN533_EZKIT) += ezkit.o | 7 | obj-$(CONFIG_BFIN533_EZKIT) += ezkit.o |
8 | obj-$(CONFIG_BFIN533_BLUETECHNIX_CM) += cm_bf533.o | 8 | obj-$(CONFIG_BFIN533_BLUETECHNIX_CM) += cm_bf533.o |
diff --git a/arch/blackfin/mach-bf533/boards/cm_bf533.c b/arch/blackfin/mach-bf533/boards/cm_bf533.c index a863522a4467..21df2f375497 100644 --- a/arch/blackfin/mach-bf533/boards/cm_bf533.c +++ b/arch/blackfin/mach-bf533/boards/cm_bf533.c | |||
@@ -33,11 +33,12 @@ | |||
33 | #include <linux/mtd/partitions.h> | 33 | #include <linux/mtd/partitions.h> |
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
35 | #include <linux/spi/flash.h> | 35 | #include <linux/spi/flash.h> |
36 | #include <linux/usb_isp1362.h> | 36 | #include <linux/usb/isp1362.h> |
37 | #include <linux/pata_platform.h> | 37 | #include <linux/pata_platform.h> |
38 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
39 | #include <asm/dma.h> | 39 | #include <asm/dma.h> |
40 | #include <asm/bfin5xx_spi.h> | 40 | #include <asm/bfin5xx_spi.h> |
41 | #include <asm/portmux.h> | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Name the Board for the /proc/cpuinfo | 44 | * Name the Board for the /proc/cpuinfo |
@@ -175,6 +176,7 @@ static struct resource bfin_spi0_resource[] = { | |||
175 | static struct bfin5xx_spi_master bfin_spi0_info = { | 176 | static struct bfin5xx_spi_master bfin_spi0_info = { |
176 | .num_chipselect = 8, | 177 | .num_chipselect = 8, |
177 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 178 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
179 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
178 | }; | 180 | }; |
179 | 181 | ||
180 | static struct platform_device bfin_spi0_device = { | 182 | static struct platform_device bfin_spi0_device = { |
diff --git a/arch/blackfin/mach-bf533/boards/ezkit.c b/arch/blackfin/mach-bf533/boards/ezkit.c index 34b63920e272..be852034a68b 100644 --- a/arch/blackfin/mach-bf533/boards/ezkit.c +++ b/arch/blackfin/mach-bf533/boards/ezkit.c | |||
@@ -34,11 +34,12 @@ | |||
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #include <linux/usb_isp1362.h> | 37 | #include <linux/usb/isp1362.h> |
38 | #include <linux/pata_platform.h> | 38 | #include <linux/pata_platform.h> |
39 | #include <linux/irq.h> | 39 | #include <linux/irq.h> |
40 | #include <asm/dma.h> | 40 | #include <asm/dma.h> |
41 | #include <asm/bfin5xx_spi.h> | 41 | #include <asm/bfin5xx_spi.h> |
42 | #include <asm/portmux.h> | ||
42 | 43 | ||
43 | /* | 44 | /* |
44 | * Name the Board for the /proc/cpuinfo | 45 | * Name the Board for the /proc/cpuinfo |
@@ -187,6 +188,7 @@ static struct resource bfin_spi0_resource[] = { | |||
187 | static struct bfin5xx_spi_master bfin_spi0_info = { | 188 | static struct bfin5xx_spi_master bfin_spi0_info = { |
188 | .num_chipselect = 8, | 189 | .num_chipselect = 8, |
189 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 190 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
191 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
190 | }; | 192 | }; |
191 | 193 | ||
192 | static struct platform_device bfin_spi0_device = { | 194 | static struct platform_device bfin_spi0_device = { |
diff --git a/arch/blackfin/mach-bf533/boards/generic_board.c b/arch/blackfin/mach-bf533/boards/generic_board.c index 310b7772c458..e359a0d6467f 100644 --- a/arch/blackfin/mach-bf533/boards/generic_board.c +++ b/arch/blackfin/mach-bf533/boards/generic_board.c | |||
@@ -58,10 +58,6 @@ static struct resource smc91x_resources[] = { | |||
58 | .end = IRQ_PROG_INTB, | 58 | .end = IRQ_PROG_INTB, |
59 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 59 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
60 | }, { | 60 | }, { |
61 | /* | ||
62 | * denotes the flag pin and is used directly if | ||
63 | * CONFIG_IRQCHIP_DEMUX_GPIO is defined. | ||
64 | */ | ||
65 | .start = IRQ_PF7, | 61 | .start = IRQ_PF7, |
66 | .end = IRQ_PF7, | 62 | .end = IRQ_PF7, |
67 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 63 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
diff --git a/arch/blackfin/mach-bf533/boards/stamp.c b/arch/blackfin/mach-bf533/boards/stamp.c index 62ffa500420f..8fde8d832850 100644 --- a/arch/blackfin/mach-bf533/boards/stamp.c +++ b/arch/blackfin/mach-bf533/boards/stamp.c | |||
@@ -35,13 +35,14 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
38 | #include <linux/usb_isp1362.h> | 38 | #include <linux/usb/isp1362.h> |
39 | #endif | 39 | #endif |
40 | #include <linux/pata_platform.h> | 40 | #include <linux/pata_platform.h> |
41 | #include <linux/irq.h> | 41 | #include <linux/irq.h> |
42 | #include <asm/dma.h> | 42 | #include <asm/dma.h> |
43 | #include <asm/bfin5xx_spi.h> | 43 | #include <asm/bfin5xx_spi.h> |
44 | #include <asm/reboot.h> | 44 | #include <asm/reboot.h> |
45 | #include <asm/portmux.h> | ||
45 | 46 | ||
46 | /* | 47 | /* |
47 | * Name the Board for the /proc/cpuinfo | 48 | * Name the Board for the /proc/cpuinfo |
@@ -286,6 +287,7 @@ static struct resource bfin_spi0_resource[] = { | |||
286 | static struct bfin5xx_spi_master bfin_spi0_info = { | 287 | static struct bfin5xx_spi_master bfin_spi0_info = { |
287 | .num_chipselect = 8, | 288 | .num_chipselect = 8, |
288 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 289 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
290 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
289 | }; | 291 | }; |
290 | 292 | ||
291 | static struct platform_device bfin_spi0_device = { | 293 | static struct platform_device bfin_spi0_device = { |
diff --git a/arch/blackfin/mach-bf537/Kconfig b/arch/blackfin/mach-bf537/Kconfig index e6648db09519..8255374c04aa 100644 --- a/arch/blackfin/mach-bf537/Kconfig +++ b/arch/blackfin/mach-bf537/Kconfig | |||
@@ -1,5 +1,7 @@ | |||
1 | if (BF537 || BF534 || BF536) | 1 | if (BF537 || BF534 || BF536) |
2 | 2 | ||
3 | source "arch/blackfin/mach-bf537/boards/Kconfig" | ||
4 | |||
3 | menu "BF537 Specific Configuration" | 5 | menu "BF537 Specific Configuration" |
4 | 6 | ||
5 | comment "Interrupt Priority Assignment" | 7 | comment "Interrupt Priority Assignment" |
diff --git a/arch/blackfin/mach-bf537/boards/Kconfig b/arch/blackfin/mach-bf537/boards/Kconfig new file mode 100644 index 000000000000..96a15196e416 --- /dev/null +++ b/arch/blackfin/mach-bf537/boards/Kconfig | |||
@@ -0,0 +1,29 @@ | |||
1 | choice | ||
2 | prompt "System type" | ||
3 | default BFIN537_STAMP | ||
4 | help | ||
5 | Select your board! | ||
6 | |||
7 | config BFIN537_STAMP | ||
8 | bool "BF537-STAMP" | ||
9 | help | ||
10 | BF537-STAMP board support. | ||
11 | |||
12 | config BFIN537_BLUETECHNIX_CM | ||
13 | bool "Bluetechnix CM-BF537" | ||
14 | depends on (BF537) | ||
15 | help | ||
16 | CM-BF537 support for EVAL- and DEV-Board. | ||
17 | |||
18 | config PNAV10 | ||
19 | bool "PNAV board" | ||
20 | depends on (BF537) | ||
21 | help | ||
22 | PNAV board support. | ||
23 | |||
24 | config GENERIC_BF537_BOARD | ||
25 | bool "Generic" | ||
26 | help | ||
27 | Generic or Custom board support. | ||
28 | |||
29 | endchoice | ||
diff --git a/arch/blackfin/mach-bf537/boards/Makefile b/arch/blackfin/mach-bf537/boards/Makefile index 23323cacc3aa..94a85174283a 100644 --- a/arch/blackfin/mach-bf537/boards/Makefile +++ b/arch/blackfin/mach-bf537/boards/Makefile | |||
@@ -2,8 +2,7 @@ | |||
2 | # arch/blackfin/mach-bf537/boards/Makefile | 2 | # arch/blackfin/mach-bf537/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y += eth_mac.o | 5 | obj-$(CONFIG_GENERIC_BF537_BOARD) += generic_board.o |
6 | obj-$(CONFIG_GENERIC_BOARD) += generic_board.o | 6 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o |
7 | obj-$(CONFIG_BFIN537_STAMP) += stamp.o led.o | 7 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o |
8 | obj-$(CONFIG_BFIN537_BLUETECHNIX_CM) += cm_bf537.o | 8 | obj-$(CONFIG_PNAV10) += pnav10.o |
9 | obj-$(CONFIG_PNAV10) += pnav10.o | ||
diff --git a/arch/blackfin/mach-bf537/boards/cm_bf537.c b/arch/blackfin/mach-bf537/boards/cm_bf537.c index 2915931045e3..c0fb06dbc42e 100644 --- a/arch/blackfin/mach-bf537/boards/cm_bf537.c +++ b/arch/blackfin/mach-bf537/boards/cm_bf537.c | |||
@@ -34,11 +34,12 @@ | |||
34 | #include <linux/mtd/partitions.h> | 34 | #include <linux/mtd/partitions.h> |
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #include <linux/usb_isp1362.h> | 37 | #include <linux/usb/isp1362.h> |
38 | #include <linux/pata_platform.h> | 38 | #include <linux/pata_platform.h> |
39 | #include <linux/irq.h> | 39 | #include <linux/irq.h> |
40 | #include <asm/dma.h> | 40 | #include <asm/dma.h> |
41 | #include <asm/bfin5xx_spi.h> | 41 | #include <asm/bfin5xx_spi.h> |
42 | #include <asm/portmux.h> | ||
42 | 43 | ||
43 | /* | 44 | /* |
44 | * Name the Board for the /proc/cpuinfo | 45 | * Name the Board for the /proc/cpuinfo |
@@ -194,6 +195,7 @@ static struct resource bfin_spi0_resource[] = { | |||
194 | static struct bfin5xx_spi_master bfin_spi0_info = { | 195 | static struct bfin5xx_spi_master bfin_spi0_info = { |
195 | .num_chipselect = 8, | 196 | .num_chipselect = 8, |
196 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 197 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
198 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
197 | }; | 199 | }; |
198 | 200 | ||
199 | static struct platform_device bfin_spi0_device = { | 201 | static struct platform_device bfin_spi0_device = { |
@@ -425,3 +427,10 @@ static int __init cm_bf537_init(void) | |||
425 | } | 427 | } |
426 | 428 | ||
427 | arch_initcall(cm_bf537_init); | 429 | arch_initcall(cm_bf537_init); |
430 | |||
431 | void bfin_get_ether_addr(char *addr) | ||
432 | { | ||
433 | random_ether_addr(addr); | ||
434 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
435 | } | ||
436 | EXPORT_SYMBOL(bfin_get_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf537/boards/eth_mac.c b/arch/blackfin/mach-bf537/boards/eth_mac.c deleted file mode 100644 index a725cc8a9290..000000000000 --- a/arch/blackfin/mach-bf537/boards/eth_mac.c +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | /* | ||
2 | * arch/blackfin/mach-bf537/board/eth_mac.c | ||
3 | * | ||
4 | * Copyright (C) 2007 Analog Devices, Inc. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | #include <linux/module.h> | ||
21 | #include <asm/blackfin.h> | ||
22 | |||
23 | #if defined(CONFIG_GENERIC_BOARD) || defined(CONFIG_BFIN537_STAMP) | ||
24 | |||
25 | /* | ||
26 | * Currently the MAC address is saved in Flash by U-Boot | ||
27 | */ | ||
28 | #define FLASH_MAC 0x203f0000 | ||
29 | |||
30 | void get_bf537_ether_addr(char *addr) | ||
31 | { | ||
32 | unsigned int flash_mac = (unsigned int) FLASH_MAC; | ||
33 | *(u32 *)(&(addr[0])) = bfin_read32(flash_mac); | ||
34 | flash_mac += 4; | ||
35 | *(u16 *)(&(addr[4])) = bfin_read16(flash_mac); | ||
36 | } | ||
37 | |||
38 | #else | ||
39 | |||
40 | /* | ||
41 | * Provide MAC address function for other specific board setting | ||
42 | */ | ||
43 | void get_bf537_ether_addr(char *addr) | ||
44 | { | ||
45 | printk(KERN_WARNING "%s: No valid Ethernet MAC address found\n", __FILE__); | ||
46 | } | ||
47 | |||
48 | #endif | ||
49 | |||
50 | EXPORT_SYMBOL(get_bf537_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf537/boards/generic_board.c b/arch/blackfin/mach-bf537/boards/generic_board.c index 255da7a98481..09f4bfbd2350 100644 --- a/arch/blackfin/mach-bf537/boards/generic_board.c +++ b/arch/blackfin/mach-bf537/boards/generic_board.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
38 | #include <linux/usb_isp1362.h> | 38 | #include <linux/usb/isp1362.h> |
39 | #endif | 39 | #endif |
40 | #include <linux/pata_platform.h> | 40 | #include <linux/pata_platform.h> |
41 | #include <linux/irq.h> | 41 | #include <linux/irq.h> |
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/dma.h> | 44 | #include <asm/dma.h> |
45 | #include <asm/bfin5xx_spi.h> | 45 | #include <asm/bfin5xx_spi.h> |
46 | #include <asm/reboot.h> | 46 | #include <asm/reboot.h> |
47 | #include <asm/portmux.h> | ||
47 | #include <linux/spi/ad7877.h> | 48 | #include <linux/spi/ad7877.h> |
48 | 49 | ||
49 | /* | 50 | /* |
@@ -502,7 +503,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
502 | .platform_data = &bfin_ad7877_ts_info, | 503 | .platform_data = &bfin_ad7877_ts_info, |
503 | .irq = IRQ_PF6, | 504 | .irq = IRQ_PF6, |
504 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 505 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
505 | .bus_num = 1, | 506 | .bus_num = 0, |
506 | .chip_select = 1, | 507 | .chip_select = 1, |
507 | .controller_data = &spi_ad7877_chip_info, | 508 | .controller_data = &spi_ad7877_chip_info, |
508 | }, | 509 | }, |
@@ -513,6 +514,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
513 | static struct bfin5xx_spi_master bfin_spi0_info = { | 514 | static struct bfin5xx_spi_master bfin_spi0_info = { |
514 | .num_chipselect = 8, | 515 | .num_chipselect = 8, |
515 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 516 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
517 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
516 | }; | 518 | }; |
517 | 519 | ||
518 | /* SPI (0) */ | 520 | /* SPI (0) */ |
@@ -730,3 +732,10 @@ void native_machine_restart(char *cmd) | |||
730 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 732 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
731 | bfin_gpio_reset_spi0_ssel1(); | 733 | bfin_gpio_reset_spi0_ssel1(); |
732 | } | 734 | } |
735 | |||
736 | void bfin_get_ether_addr(char *addr) | ||
737 | { | ||
738 | random_ether_addr(addr); | ||
739 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
740 | } | ||
741 | EXPORT_SYMBOL(bfin_get_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf537/boards/pnav10.c b/arch/blackfin/mach-bf537/boards/pnav10.c index 87b808926789..fd5f4a6f08e4 100644 --- a/arch/blackfin/mach-bf537/boards/pnav10.c +++ b/arch/blackfin/mach-bf537/boards/pnav10.c | |||
@@ -35,11 +35,12 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
38 | #include <linux/usb_isp1362.h> | 38 | #include <linux/usb/isp1362.h> |
39 | #endif | 39 | #endif |
40 | #include <linux/irq.h> | 40 | #include <linux/irq.h> |
41 | #include <asm/dma.h> | 41 | #include <asm/dma.h> |
42 | #include <asm/bfin5xx_spi.h> | 42 | #include <asm/bfin5xx_spi.h> |
43 | #include <asm/portmux.h> | ||
43 | #include <linux/usb/sl811.h> | 44 | #include <linux/usb/sl811.h> |
44 | 45 | ||
45 | #include <linux/spi/ad7877.h> | 46 | #include <linux/spi/ad7877.h> |
@@ -295,7 +296,7 @@ static struct bfin5xx_spi_chip spi_mmc_chip_info = { | |||
295 | 296 | ||
296 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 297 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
297 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | 298 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { |
298 | .cs_change_per_word = 1, | 299 | .cs_change_per_word = 0, |
299 | .enable_dma = 0, | 300 | .enable_dma = 0, |
300 | .bits_per_word = 16, | 301 | .bits_per_word = 16, |
301 | }; | 302 | }; |
@@ -387,7 +388,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
387 | .platform_data = &bfin_ad7877_ts_info, | 388 | .platform_data = &bfin_ad7877_ts_info, |
388 | .irq = IRQ_PF2, | 389 | .irq = IRQ_PF2, |
389 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 390 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
390 | .bus_num = 1, | 391 | .bus_num = 0, |
391 | .chip_select = 5, | 392 | .chip_select = 5, |
392 | .controller_data = &spi_ad7877_chip_info, | 393 | .controller_data = &spi_ad7877_chip_info, |
393 | }, | 394 | }, |
@@ -413,6 +414,7 @@ static struct resource bfin_spi0_resource[] = { | |||
413 | static struct bfin5xx_spi_master bfin_spi0_info = { | 414 | static struct bfin5xx_spi_master bfin_spi0_info = { |
414 | .num_chipselect = 8, | 415 | .num_chipselect = 8, |
415 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 416 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
417 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
416 | }; | 418 | }; |
417 | 419 | ||
418 | static struct platform_device bfin_spi0_device = { | 420 | static struct platform_device bfin_spi0_device = { |
@@ -508,3 +510,10 @@ static int __init stamp_init(void) | |||
508 | } | 510 | } |
509 | 511 | ||
510 | arch_initcall(stamp_init); | 512 | arch_initcall(stamp_init); |
513 | |||
514 | void bfin_get_ether_addr(char *addr) | ||
515 | { | ||
516 | random_ether_addr(addr); | ||
517 | printk(KERN_WARNING "%s:%s: Setting Ethernet MAC to a random one\n", __FILE__, __func__); | ||
518 | } | ||
519 | EXPORT_SYMBOL(bfin_get_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index 5f7b91fbafe8..07b0dc273d2f 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -35,7 +35,7 @@ | |||
35 | #include <linux/spi/spi.h> | 35 | #include <linux/spi/spi.h> |
36 | #include <linux/spi/flash.h> | 36 | #include <linux/spi/flash.h> |
37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) | 37 | #if defined(CONFIG_USB_ISP1362_HCD) || defined(CONFIG_USB_ISP1362_HCD_MODULE) |
38 | #include <linux/usb_isp1362.h> | 38 | #include <linux/usb/isp1362.h> |
39 | #endif | 39 | #endif |
40 | #include <linux/pata_platform.h> | 40 | #include <linux/pata_platform.h> |
41 | #include <linux/irq.h> | 41 | #include <linux/irq.h> |
@@ -44,6 +44,7 @@ | |||
44 | #include <asm/dma.h> | 44 | #include <asm/dma.h> |
45 | #include <asm/bfin5xx_spi.h> | 45 | #include <asm/bfin5xx_spi.h> |
46 | #include <asm/reboot.h> | 46 | #include <asm/reboot.h> |
47 | #include <asm/portmux.h> | ||
47 | #include <linux/spi/ad7877.h> | 48 | #include <linux/spi/ad7877.h> |
48 | 49 | ||
49 | /* | 50 | /* |
@@ -182,6 +183,28 @@ static struct platform_device dm9000_device = { | |||
182 | }; | 183 | }; |
183 | #endif | 184 | #endif |
184 | 185 | ||
186 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) | ||
187 | static struct resource ax88180_resources[] = { | ||
188 | [0] = { | ||
189 | .start = 0x20300000, | ||
190 | .end = 0x20300000 + 0x8000, | ||
191 | .flags = IORESOURCE_MEM, | ||
192 | }, | ||
193 | [1] = { | ||
194 | .start = IRQ_PF7, | ||
195 | .end = IRQ_PF7, | ||
196 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL), | ||
197 | }, | ||
198 | }; | ||
199 | |||
200 | static struct platform_device ax88180_device = { | ||
201 | .name = "ax88180", | ||
202 | .id = -1, | ||
203 | .num_resources = ARRAY_SIZE(ax88180_resources), | ||
204 | .resource = ax88180_resources, | ||
205 | }; | ||
206 | #endif | ||
207 | |||
185 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) | 208 | #if defined(CONFIG_USB_SL811_HCD) || defined(CONFIG_USB_SL811_HCD_MODULE) |
186 | static struct resource sl811_hcd_resources[] = { | 209 | static struct resource sl811_hcd_resources[] = { |
187 | { | 210 | { |
@@ -502,7 +525,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
502 | .platform_data = &bfin_ad7877_ts_info, | 525 | .platform_data = &bfin_ad7877_ts_info, |
503 | .irq = IRQ_PF6, | 526 | .irq = IRQ_PF6, |
504 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ | 527 | .max_speed_hz = 12500000, /* max spi clock (SCK) speed in HZ */ |
505 | .bus_num = 1, | 528 | .bus_num = 0, |
506 | .chip_select = 1, | 529 | .chip_select = 1, |
507 | .controller_data = &spi_ad7877_chip_info, | 530 | .controller_data = &spi_ad7877_chip_info, |
508 | }, | 531 | }, |
@@ -513,6 +536,7 @@ static struct spi_board_info bfin_spi_board_info[] __initdata = { | |||
513 | static struct bfin5xx_spi_master bfin_spi0_info = { | 536 | static struct bfin5xx_spi_master bfin_spi0_info = { |
514 | .num_chipselect = 8, | 537 | .num_chipselect = 8, |
515 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 538 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
539 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
516 | }; | 540 | }; |
517 | 541 | ||
518 | /* SPI (0) */ | 542 | /* SPI (0) */ |
@@ -554,15 +578,20 @@ static struct platform_device bfin_fb_adv7393_device = { | |||
554 | 578 | ||
555 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 579 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
556 | static struct resource bfin_uart_resources[] = { | 580 | static struct resource bfin_uart_resources[] = { |
581 | #ifdef CONFIG_SERIAL_BFIN_UART0 | ||
557 | { | 582 | { |
558 | .start = 0xFFC00400, | 583 | .start = 0xFFC00400, |
559 | .end = 0xFFC004FF, | 584 | .end = 0xFFC004FF, |
560 | .flags = IORESOURCE_MEM, | 585 | .flags = IORESOURCE_MEM, |
561 | }, { | 586 | }, |
587 | #endif | ||
588 | #ifdef CONFIG_SERIAL_BFIN_UART1 | ||
589 | { | ||
562 | .start = 0xFFC02000, | 590 | .start = 0xFFC02000, |
563 | .end = 0xFFC020FF, | 591 | .end = 0xFFC020FF, |
564 | .flags = IORESOURCE_MEM, | 592 | .flags = IORESOURCE_MEM, |
565 | }, | 593 | }, |
594 | #endif | ||
566 | }; | 595 | }; |
567 | 596 | ||
568 | static struct platform_device bfin_uart_device = { | 597 | static struct platform_device bfin_uart_device = { |
@@ -669,6 +698,10 @@ static struct platform_device *stamp_devices[] __initdata = { | |||
669 | &dm9000_device, | 698 | &dm9000_device, |
670 | #endif | 699 | #endif |
671 | 700 | ||
701 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) | ||
702 | &ax88180_device, | ||
703 | #endif | ||
704 | |||
672 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) | 705 | #if defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE) |
673 | &bfin_mac_device, | 706 | &bfin_mac_device, |
674 | #endif | 707 | #endif |
@@ -730,3 +763,14 @@ void native_machine_restart(char *cmd) | |||
730 | if ((bfin_read_SYSCR() & 0x7) == 0x3) | 763 | if ((bfin_read_SYSCR() & 0x7) == 0x3) |
731 | bfin_gpio_reset_spi0_ssel1(); | 764 | bfin_gpio_reset_spi0_ssel1(); |
732 | } | 765 | } |
766 | |||
767 | /* | ||
768 | * Currently the MAC address is saved in Flash by U-Boot | ||
769 | */ | ||
770 | #define FLASH_MAC 0x203f0000 | ||
771 | void bfin_get_ether_addr(char *addr) | ||
772 | { | ||
773 | *(u32 *)(&(addr[0])) = bfin_read32(FLASH_MAC); | ||
774 | *(u16 *)(&(addr[4])) = bfin_read16(FLASH_MAC + 4); | ||
775 | } | ||
776 | EXPORT_SYMBOL(bfin_get_ether_addr); | ||
diff --git a/arch/blackfin/mach-bf548/Kconfig b/arch/blackfin/mach-bf548/Kconfig index 08d8dc83701c..d8bd3b49f150 100644 --- a/arch/blackfin/mach-bf548/Kconfig +++ b/arch/blackfin/mach-bf548/Kconfig | |||
@@ -1,5 +1,7 @@ | |||
1 | if (BF54x) | 1 | if (BF54x) |
2 | 2 | ||
3 | source "arch/blackfin/mach-bf548/boards/Kconfig" | ||
4 | |||
3 | menu "BF548 Specific Configuration" | 5 | menu "BF548 Specific Configuration" |
4 | 6 | ||
5 | config DEB_DMA_URGENT | 7 | config DEB_DMA_URGENT |
diff --git a/arch/blackfin/mach-bf548/boards/Kconfig b/arch/blackfin/mach-bf548/boards/Kconfig new file mode 100644 index 000000000000..057129064037 --- /dev/null +++ b/arch/blackfin/mach-bf548/boards/Kconfig | |||
@@ -0,0 +1,12 @@ | |||
1 | choice | ||
2 | prompt "System type" | ||
3 | default BFIN548_EZKIT | ||
4 | help | ||
5 | Select your board! | ||
6 | |||
7 | config BFIN548_EZKIT | ||
8 | bool "BF548-EZKIT" | ||
9 | help | ||
10 | BFIN548-EZKIT board support. | ||
11 | |||
12 | endchoice | ||
diff --git a/arch/blackfin/mach-bf548/boards/Makefile b/arch/blackfin/mach-bf548/boards/Makefile index 486e07c99a51..a444cc739578 100644 --- a/arch/blackfin/mach-bf548/boards/Makefile +++ b/arch/blackfin/mach-bf548/boards/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # arch/blackfin/mach-bf548/boards/Makefile | 2 | # arch/blackfin/mach-bf548/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o | 5 | obj-$(CONFIG_BFIN548_EZKIT) += ezkit.o led.o |
diff --git a/arch/blackfin/mach-bf548/boards/ezkit.c b/arch/blackfin/mach-bf548/boards/ezkit.c index 6b6490e66b30..d37d6653c4bc 100644 --- a/arch/blackfin/mach-bf548/boards/ezkit.c +++ b/arch/blackfin/mach-bf548/boards/ezkit.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/dma.h> | 42 | #include <asm/dma.h> |
43 | #include <asm/gpio.h> | 43 | #include <asm/gpio.h> |
44 | #include <asm/nand.h> | 44 | #include <asm/nand.h> |
45 | #include <asm/portmux.h> | ||
45 | #include <asm/mach/bf54x_keys.h> | 46 | #include <asm/mach/bf54x_keys.h> |
46 | #include <linux/input.h> | 47 | #include <linux/input.h> |
47 | #include <linux/spi/ad7877.h> | 48 | #include <linux/spi/ad7877.h> |
@@ -377,7 +378,7 @@ static struct bfin5xx_spi_chip spi_flash_chip_info = { | |||
377 | 378 | ||
378 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) | 379 | #if defined(CONFIG_TOUCHSCREEN_AD7877) || defined(CONFIG_TOUCHSCREEN_AD7877_MODULE) |
379 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { | 380 | static struct bfin5xx_spi_chip spi_ad7877_chip_info = { |
380 | .cs_change_per_word = 1, | 381 | .cs_change_per_word = 0, |
381 | .enable_dma = 0, | 382 | .enable_dma = 0, |
382 | .bits_per_word = 16, | 383 | .bits_per_word = 16, |
383 | }; | 384 | }; |
@@ -453,9 +454,10 @@ static struct resource bfin_spi1_resource[] = { | |||
453 | }; | 454 | }; |
454 | 455 | ||
455 | /* SPI controller data */ | 456 | /* SPI controller data */ |
456 | static struct bfin5xx_spi_master bf54x_spi_master_info = { | 457 | static struct bfin5xx_spi_master bf54x_spi_master_info0 = { |
457 | .num_chipselect = 8, | 458 | .num_chipselect = 8, |
458 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 459 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
460 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
459 | }; | 461 | }; |
460 | 462 | ||
461 | static struct platform_device bf54x_spi_master0 = { | 463 | static struct platform_device bf54x_spi_master0 = { |
@@ -464,17 +466,23 @@ static struct platform_device bf54x_spi_master0 = { | |||
464 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), | 466 | .num_resources = ARRAY_SIZE(bfin_spi0_resource), |
465 | .resource = bfin_spi0_resource, | 467 | .resource = bfin_spi0_resource, |
466 | .dev = { | 468 | .dev = { |
467 | .platform_data = &bf54x_spi_master_info, /* Passed to driver */ | 469 | .platform_data = &bf54x_spi_master_info0, /* Passed to driver */ |
468 | }, | 470 | }, |
469 | }; | 471 | }; |
470 | 472 | ||
473 | static struct bfin5xx_spi_master bf54x_spi_master_info1 = { | ||
474 | .num_chipselect = 8, | ||
475 | .enable_dma = 1, /* master has the ability to do dma transfer */ | ||
476 | .pin_req = {P_SPI1_SCK, P_SPI1_MISO, P_SPI1_MOSI, 0}, | ||
477 | }; | ||
478 | |||
471 | static struct platform_device bf54x_spi_master1 = { | 479 | static struct platform_device bf54x_spi_master1 = { |
472 | .name = "bfin-spi", | 480 | .name = "bfin-spi", |
473 | .id = 1, /* Bus number */ | 481 | .id = 1, /* Bus number */ |
474 | .num_resources = ARRAY_SIZE(bfin_spi1_resource), | 482 | .num_resources = ARRAY_SIZE(bfin_spi1_resource), |
475 | .resource = bfin_spi1_resource, | 483 | .resource = bfin_spi1_resource, |
476 | .dev = { | 484 | .dev = { |
477 | .platform_data = &bf54x_spi_master_info, /* Passed to driver */ | 485 | .platform_data = &bf54x_spi_master_info1, /* Passed to driver */ |
478 | }, | 486 | }, |
479 | }; | 487 | }; |
480 | #endif /* spi master and devices */ | 488 | #endif /* spi master and devices */ |
@@ -500,6 +508,7 @@ static struct platform_device i2c_bfin_twi0_device = { | |||
500 | .resource = bfin_twi0_resource, | 508 | .resource = bfin_twi0_resource, |
501 | }; | 509 | }; |
502 | 510 | ||
511 | #if !defined(CONFIG_BF542) /* The BF542 only has 1 TWI */ | ||
503 | static struct resource bfin_twi1_resource[] = { | 512 | static struct resource bfin_twi1_resource[] = { |
504 | [0] = { | 513 | [0] = { |
505 | .start = TWI1_REGBASE, | 514 | .start = TWI1_REGBASE, |
@@ -520,6 +529,7 @@ static struct platform_device i2c_bfin_twi1_device = { | |||
520 | .resource = bfin_twi1_resource, | 529 | .resource = bfin_twi1_resource, |
521 | }; | 530 | }; |
522 | #endif | 531 | #endif |
532 | #endif | ||
523 | 533 | ||
524 | static struct platform_device *ezkit_devices[] __initdata = { | 534 | static struct platform_device *ezkit_devices[] __initdata = { |
525 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) | 535 | #if defined(CONFIG_RTC_DRV_BFIN) || defined(CONFIG_RTC_DRV_BFIN_MODULE) |
@@ -569,8 +579,10 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
569 | 579 | ||
570 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) | 580 | #if defined(CONFIG_I2C_BLACKFIN_TWI) || defined(CONFIG_I2C_BLACKFIN_TWI_MODULE) |
571 | &i2c_bfin_twi0_device, | 581 | &i2c_bfin_twi0_device, |
582 | #if !defined(CONFIG_BF542) | ||
572 | &i2c_bfin_twi1_device, | 583 | &i2c_bfin_twi1_device, |
573 | #endif | 584 | #endif |
585 | #endif | ||
574 | }; | 586 | }; |
575 | 587 | ||
576 | static int __init stamp_init(void) | 588 | static int __init stamp_init(void) |
diff --git a/arch/blackfin/mach-bf548/head.S b/arch/blackfin/mach-bf548/head.S index 3071c243d426..74b34c7f3629 100644 --- a/arch/blackfin/mach-bf548/head.S +++ b/arch/blackfin/mach-bf548/head.S | |||
@@ -158,6 +158,27 @@ ENTRY(__stext) | |||
158 | w[p2] = r0; | 158 | w[p2] = r0; |
159 | ssync; | 159 | ssync; |
160 | 160 | ||
161 | p2.h = hi(EBIU_MBSCTL); | ||
162 | p2.l = lo(EBIU_MBSCTL); | ||
163 | r0.h = hi(CONFIG_EBIU_MBSCTLVAL); | ||
164 | r0.l = lo(CONFIG_EBIU_MBSCTLVAL); | ||
165 | [p2] = r0; | ||
166 | ssync; | ||
167 | |||
168 | p2.h = hi(EBIU_MODE); | ||
169 | p2.l = lo(EBIU_MODE); | ||
170 | r0.h = hi(CONFIG_EBIU_MODEVAL); | ||
171 | r0.l = lo(CONFIG_EBIU_MODEVAL); | ||
172 | [p2] = r0; | ||
173 | ssync; | ||
174 | |||
175 | p2.h = hi(EBIU_FCTL); | ||
176 | p2.l = lo(EBIU_FCTL); | ||
177 | r0.h = hi(CONFIG_EBIU_FCTLVAL); | ||
178 | r0.l = lo(CONFIG_EBIU_FCTLVAL); | ||
179 | [p2] = r0; | ||
180 | ssync; | ||
181 | |||
161 | /* This section keeps the processor in supervisor mode | 182 | /* This section keeps the processor in supervisor mode |
162 | * during kernel boot. Switches to user mode at end of boot. | 183 | * during kernel boot. Switches to user mode at end of boot. |
163 | * See page 3-9 of Hardware Reference manual for documentation. | 184 | * See page 3-9 of Hardware Reference manual for documentation. |
diff --git a/arch/blackfin/mach-bf561/Kconfig b/arch/blackfin/mach-bf561/Kconfig index 0a17c4cf0059..3f4895450bea 100644 --- a/arch/blackfin/mach-bf561/Kconfig +++ b/arch/blackfin/mach-bf561/Kconfig | |||
@@ -1,4 +1,6 @@ | |||
1 | if BF561 | 1 | if (BF561) |
2 | |||
3 | source "arch/blackfin/mach-bf561/boards/Kconfig" | ||
2 | 4 | ||
3 | menu "BF561 Specific Configuration" | 5 | menu "BF561 Specific Configuration" |
4 | 6 | ||
diff --git a/arch/blackfin/mach-bf561/boards/Kconfig b/arch/blackfin/mach-bf561/boards/Kconfig new file mode 100644 index 000000000000..e41a67b1fb53 --- /dev/null +++ b/arch/blackfin/mach-bf561/boards/Kconfig | |||
@@ -0,0 +1,27 @@ | |||
1 | choice | ||
2 | prompt "System type" | ||
3 | default BFIN561_EZKIT | ||
4 | help | ||
5 | Select your board! | ||
6 | |||
7 | config BFIN561_EZKIT | ||
8 | bool "BF561-EZKIT" | ||
9 | help | ||
10 | BF561-EZKIT-LITE board support. | ||
11 | |||
12 | config BFIN561_TEPLA | ||
13 | bool "BF561-TEPLA" | ||
14 | help | ||
15 | BF561-TEPLA board support. | ||
16 | |||
17 | config BFIN561_BLUETECHNIX_CM | ||
18 | bool "Bluetechnix CM-BF561" | ||
19 | help | ||
20 | CM-BF561 support for EVAL- and DEV-Board. | ||
21 | |||
22 | config GENERIC_BF561_BOARD | ||
23 | bool "Generic" | ||
24 | help | ||
25 | Generic or Custom board support. | ||
26 | |||
27 | endchoice | ||
diff --git a/arch/blackfin/mach-bf561/boards/Makefile b/arch/blackfin/mach-bf561/boards/Makefile index 495a1cf9d452..04add010b568 100644 --- a/arch/blackfin/mach-bf561/boards/Makefile +++ b/arch/blackfin/mach-bf561/boards/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # arch/blackfin/mach-bf561/boards/Makefile | 2 | # arch/blackfin/mach-bf561/boards/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_GENERIC_BOARD) += generic_board.o | 5 | obj-$(CONFIG_GENERIC_BF561_BOARD) += generic_board.o |
6 | obj-$(CONFIG_BFIN561_BLUETECHNIX_CM) += cm_bf561.o | 6 | obj-$(CONFIG_BFIN561_BLUETECHNIX_CM) += cm_bf561.o |
7 | obj-$(CONFIG_BFIN561_EZKIT) += ezkit.o | 7 | obj-$(CONFIG_BFIN561_EZKIT) += ezkit.o |
8 | obj-$(CONFIG_BFIN561_TEPLA) += tepla.o | 8 | obj-$(CONFIG_BFIN561_TEPLA) += tepla.o |
diff --git a/arch/blackfin/mach-bf561/boards/cm_bf561.c b/arch/blackfin/mach-bf561/boards/cm_bf561.c index 97aeb43fd8b4..c19cd29b948a 100644 --- a/arch/blackfin/mach-bf561/boards/cm_bf561.c +++ b/arch/blackfin/mach-bf561/boards/cm_bf561.c | |||
@@ -33,11 +33,12 @@ | |||
33 | #include <linux/mtd/partitions.h> | 33 | #include <linux/mtd/partitions.h> |
34 | #include <linux/spi/spi.h> | 34 | #include <linux/spi/spi.h> |
35 | #include <linux/spi/flash.h> | 35 | #include <linux/spi/flash.h> |
36 | #include <linux/usb_isp1362.h> | 36 | #include <linux/usb/isp1362.h> |
37 | #include <linux/pata_platform.h> | 37 | #include <linux/pata_platform.h> |
38 | #include <linux/irq.h> | 38 | #include <linux/irq.h> |
39 | #include <asm/dma.h> | 39 | #include <asm/dma.h> |
40 | #include <asm/bfin5xx_spi.h> | 40 | #include <asm/bfin5xx_spi.h> |
41 | #include <asm/portmux.h> | ||
41 | 42 | ||
42 | /* | 43 | /* |
43 | * Name the Board for the /proc/cpuinfo | 44 | * Name the Board for the /proc/cpuinfo |
@@ -182,6 +183,7 @@ static struct resource bfin_spi0_resource[] = { | |||
182 | static struct bfin5xx_spi_master bfin_spi0_info = { | 183 | static struct bfin5xx_spi_master bfin_spi0_info = { |
183 | .num_chipselect = 8, | 184 | .num_chipselect = 8, |
184 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 185 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
186 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
185 | }; | 187 | }; |
186 | 188 | ||
187 | static struct platform_device bfin_spi0_device = { | 189 | static struct platform_device bfin_spi0_device = { |
diff --git a/arch/blackfin/mach-bf561/boards/ezkit.c b/arch/blackfin/mach-bf561/boards/ezkit.c index 059d516cec23..4ff8f6e7a11f 100644 --- a/arch/blackfin/mach-bf561/boards/ezkit.c +++ b/arch/blackfin/mach-bf561/boards/ezkit.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <linux/pata_platform.h> | 35 | #include <linux/pata_platform.h> |
36 | #include <asm/dma.h> | 36 | #include <asm/dma.h> |
37 | #include <asm/bfin5xx_spi.h> | 37 | #include <asm/bfin5xx_spi.h> |
38 | #include <asm/portmux.h> | ||
38 | 39 | ||
39 | /* | 40 | /* |
40 | * Name the Board for the /proc/cpuinfo | 41 | * Name the Board for the /proc/cpuinfo |
@@ -115,6 +116,28 @@ static struct platform_device smc91x_device = { | |||
115 | }; | 116 | }; |
116 | #endif | 117 | #endif |
117 | 118 | ||
119 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) | ||
120 | static struct resource ax88180_resources[] = { | ||
121 | [0] = { | ||
122 | .start = 0x2c000000, | ||
123 | .end = 0x2c000000 + 0x8000, | ||
124 | .flags = IORESOURCE_MEM, | ||
125 | }, | ||
126 | [1] = { | ||
127 | .start = IRQ_PF10, | ||
128 | .end = IRQ_PF10, | ||
129 | .flags = (IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL), | ||
130 | }, | ||
131 | }; | ||
132 | |||
133 | static struct platform_device ax88180_device = { | ||
134 | .name = "ax88180", | ||
135 | .id = -1, | ||
136 | .num_resources = ARRAY_SIZE(ax88180_resources), | ||
137 | .resource = ax88180_resources, | ||
138 | }; | ||
139 | #endif | ||
140 | |||
118 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) | 141 | #if defined(CONFIG_SERIAL_BFIN) || defined(CONFIG_SERIAL_BFIN_MODULE) |
119 | static struct resource bfin_uart_resources[] = { | 142 | static struct resource bfin_uart_resources[] = { |
120 | { | 143 | { |
@@ -160,6 +183,7 @@ static struct resource bfin_spi0_resource[] = { | |||
160 | static struct bfin5xx_spi_master bfin_spi0_info = { | 183 | static struct bfin5xx_spi_master bfin_spi0_info = { |
161 | .num_chipselect = 8, | 184 | .num_chipselect = 8, |
162 | .enable_dma = 1, /* master has the ability to do dma transfer */ | 185 | .enable_dma = 1, /* master has the ability to do dma transfer */ |
186 | .pin_req = {P_SPI0_SCK, P_SPI0_MISO, P_SPI0_MOSI, 0}, | ||
163 | }; | 187 | }; |
164 | 188 | ||
165 | static struct platform_device bfin_spi0_device = { | 189 | static struct platform_device bfin_spi0_device = { |
@@ -226,6 +250,11 @@ static struct platform_device *ezkit_devices[] __initdata = { | |||
226 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) | 250 | #if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) |
227 | &smc91x_device, | 251 | &smc91x_device, |
228 | #endif | 252 | #endif |
253 | |||
254 | #if defined(CONFIG_AX88180) || defined(CONFIG_AX88180_MODULE) | ||
255 | &ax88180_device, | ||
256 | #endif | ||
257 | |||
229 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) | 258 | #if defined(CONFIG_SPI_BFIN) || defined(CONFIG_SPI_BFIN_MODULE) |
230 | &bfin_spi0_device, | 259 | &bfin_spi0_device, |
231 | #endif | 260 | #endif |
diff --git a/arch/blackfin/mach-bf561/boards/generic_board.c b/arch/blackfin/mach-bf561/boards/generic_board.c index 46816be4b2ba..fc80c5d059f8 100644 --- a/arch/blackfin/mach-bf561/boards/generic_board.c +++ b/arch/blackfin/mach-bf561/boards/generic_board.c | |||
@@ -48,10 +48,6 @@ static struct resource smc91x_resources[] = { | |||
48 | .end = IRQ_PROG_INTB, | 48 | .end = IRQ_PROG_INTB, |
49 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 49 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
50 | }, { | 50 | }, { |
51 | /* | ||
52 | * denotes the flag pin and is used directly if | ||
53 | * CONFIG_IRQCHIP_DEMUX_GPIO is defined. | ||
54 | */ | ||
55 | .start = IRQ_PF9, | 51 | .start = IRQ_PF9, |
56 | .end = IRQ_PF9, | 52 | .end = IRQ_PF9, |
57 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, | 53 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
diff --git a/arch/blackfin/mach-bf561/boards/tepla.c b/arch/blackfin/mach-bf561/boards/tepla.c index 4a17c6da2a59..ec6a2207c202 100644 --- a/arch/blackfin/mach-bf561/boards/tepla.c +++ b/arch/blackfin/mach-bf561/boards/tepla.c | |||
@@ -31,10 +31,6 @@ static struct resource smc91x_resources[] = { | |||
31 | .end = IRQ_PROG_INTB, | 31 | .end = IRQ_PROG_INTB, |
32 | .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, | 32 | .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, |
33 | }, { | 33 | }, { |
34 | /* | ||
35 | * denotes the flag pin and is used directly if | ||
36 | * CONFIG_IRQCHIP_DEMUX_GPIO is defined. | ||
37 | */ | ||
38 | .start = IRQ_PF7, | 34 | .start = IRQ_PF7, |
39 | .end = IRQ_PF7, | 35 | .end = IRQ_PF7, |
40 | .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, | 36 | .flags = IORESOURCE_IRQ|IORESOURCE_IRQ_HIGHLEVEL, |
diff --git a/arch/blackfin/mach-common/cplbinfo.c b/arch/blackfin/mach-common/cplbinfo.c index 785ca9816971..a4f0b428a34d 100644 --- a/arch/blackfin/mach-common/cplbinfo.c +++ b/arch/blackfin/mach-common/cplbinfo.c | |||
@@ -91,7 +91,7 @@ static char *cplb_print_entry(char *buf, int type) | |||
91 | } else | 91 | } else |
92 | buf += sprintf(buf, "Data CPLB entry:\n"); | 92 | buf += sprintf(buf, "Data CPLB entry:\n"); |
93 | 93 | ||
94 | buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\n\tiCount\toCount\n"); | 94 | buf += sprintf(buf, "Address\t\tData\tSize\tValid\tLocked\tSwapin\tiCount\toCount\n"); |
95 | 95 | ||
96 | while (*p_addr != 0xffffffff) { | 96 | while (*p_addr != 0xffffffff) { |
97 | entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data); | 97 | entry = cplb_find_entry(cplb_addr, cplb_data, *p_addr, *p_data); |
diff --git a/arch/blackfin/mach-common/cplbmgr.S b/arch/blackfin/mach-common/cplbmgr.S index 946703ef48ff..6f909cbfac7b 100644 --- a/arch/blackfin/mach-common/cplbmgr.S +++ b/arch/blackfin/mach-common/cplbmgr.S | |||
@@ -73,7 +73,7 @@ ENTRY(_cplb_mgr) | |||
73 | /* ICPLB Miss Exception. We need to choose one of the | 73 | /* ICPLB Miss Exception. We need to choose one of the |
74 | * currently-installed CPLBs, and replace it with one | 74 | * currently-installed CPLBs, and replace it with one |
75 | * from the configuration table. | 75 | * from the configuration table. |
76 | */ | 76 | */ |
77 | 77 | ||
78 | P4.L = LO(ICPLB_FAULT_ADDR); | 78 | P4.L = LO(ICPLB_FAULT_ADDR); |
79 | P4.H = HI(ICPLB_FAULT_ADDR); | 79 | P4.H = HI(ICPLB_FAULT_ADDR); |
@@ -222,7 +222,7 @@ ENTRY(_cplb_mgr) | |||
222 | 222 | ||
223 | /* See if failed address > start address */ | 223 | /* See if failed address > start address */ |
224 | CC = R4 <= R0(IU); | 224 | CC = R4 <= R0(IU); |
225 | IF !CC JUMP .Linext; | 225 | IF !CC JUMP .Linext; |
226 | 226 | ||
227 | /* extract page size (17:16)*/ | 227 | /* extract page size (17:16)*/ |
228 | R3 = EXTRACT(R2, R1.L) (Z); | 228 | R3 = EXTRACT(R2, R1.L) (Z); |
@@ -271,16 +271,27 @@ ENTRY(_cplb_mgr) | |||
271 | 271 | ||
272 | /* FAILED CASES*/ | 272 | /* FAILED CASES*/ |
273 | .Lno_page_in_table: | 273 | .Lno_page_in_table: |
274 | ( R7:4,P5:3 ) = [SP++]; | ||
275 | R0 = CPLB_NO_ADDR_MATCH; | 274 | R0 = CPLB_NO_ADDR_MATCH; |
276 | RTS; | 275 | JUMP .Lfail_ret; |
276 | |||
277 | .Lall_locked: | 277 | .Lall_locked: |
278 | ( R7:4,P5:3 ) = [SP++]; | ||
279 | R0 = CPLB_NO_UNLOCKED; | 278 | R0 = CPLB_NO_UNLOCKED; |
280 | RTS; | 279 | JUMP .Lfail_ret; |
280 | |||
281 | .Lprot_violation: | 281 | .Lprot_violation: |
282 | ( R7:4,P5:3 ) = [SP++]; | ||
283 | R0 = CPLB_PROT_VIOL; | 282 | R0 = CPLB_PROT_VIOL; |
283 | |||
284 | .Lfail_ret: | ||
285 | /* Make sure we turn protection/cache back on, even in the failing case */ | ||
286 | BITSET(R5,ENICPLB_P); | ||
287 | CLI R2; | ||
288 | SSYNC; /* SSYNC required before writing to IMEM_CONTROL. */ | ||
289 | .align 8; | ||
290 | [P4] = R5; | ||
291 | SSYNC; | ||
292 | STI R2; | ||
293 | |||
294 | ( R7:4,P5:3 ) = [SP++]; | ||
284 | RTS; | 295 | RTS; |
285 | 296 | ||
286 | .Ldcplb_write: | 297 | .Ldcplb_write: |
diff --git a/arch/blackfin/mach-common/entry.S b/arch/blackfin/mach-common/entry.S index 1b13fa470977..dc9d3ee2e691 100644 --- a/arch/blackfin/mach-common/entry.S +++ b/arch/blackfin/mach-common/entry.S | |||
@@ -33,7 +33,7 @@ | |||
33 | * after a timer-interrupt and after each system call. | 33 | * after a timer-interrupt and after each system call. |
34 | */ | 34 | */ |
35 | 35 | ||
36 | 36 | #include <linux/init.h> | |
37 | #include <linux/linkage.h> | 37 | #include <linux/linkage.h> |
38 | #include <linux/unistd.h> | 38 | #include <linux/unistd.h> |
39 | #include <asm/blackfin.h> | 39 | #include <asm/blackfin.h> |
@@ -71,25 +71,44 @@ ENDPROC(_safe_speculative_execution) | |||
71 | * This one does not lower the level to IRQ5, and thus can be used to | 71 | * This one does not lower the level to IRQ5, and thus can be used to |
72 | * patch up CPLB misses on the kernel stack. | 72 | * patch up CPLB misses on the kernel stack. |
73 | */ | 73 | */ |
74 | ENTRY(_ex_dcplb) | ||
75 | #if ANOMALY_05000261 | 74 | #if ANOMALY_05000261 |
75 | #define _ex_dviol _ex_workaround_261 | ||
76 | #define _ex_dmiss _ex_workaround_261 | ||
77 | #define _ex_dmult _ex_workaround_261 | ||
78 | |||
79 | ENTRY(_ex_workaround_261) | ||
76 | /* | 80 | /* |
77 | * Work around an anomaly: if we see a new DCPLB fault, return | 81 | * Work around an anomaly: if we see a new DCPLB fault, return |
78 | * without doing anything. Then, if we get the same fault again, | 82 | * without doing anything. Then, if we get the same fault again, |
79 | * handle it. | 83 | * handle it. |
80 | */ | 84 | */ |
85 | P4 = R7; /* Store EXCAUSE */ | ||
81 | p5.l = _last_cplb_fault_retx; | 86 | p5.l = _last_cplb_fault_retx; |
82 | p5.h = _last_cplb_fault_retx; | 87 | p5.h = _last_cplb_fault_retx; |
83 | r7 = [p5]; | 88 | r7 = [p5]; |
84 | r6 = retx; | 89 | r6 = retx; |
85 | [p5] = r6; | 90 | [p5] = r6; |
86 | cc = r6 == r7; | 91 | cc = r6 == r7; |
87 | if !cc jump _return_from_exception; | 92 | if !cc jump _bfin_return_from_exception; |
88 | /* fall through */ | 93 | /* fall through */ |
94 | R7 = P4; | ||
95 | R6 = 0x26; /* Data CPLB Miss */ | ||
96 | cc = R6 == R7; | ||
97 | if cc jump _ex_dcplb_miss (BP); | ||
98 | /* Handle 0x23 Data CPLB Protection Violation | ||
99 | * and Data CPLB Multiple Hits - Linux Trap Zero | ||
100 | */ | ||
101 | jump _ex_trap_c; | ||
102 | ENDPROC(_ex_workaround_261) | ||
103 | |||
104 | #else | ||
105 | #define _ex_dviol _ex_trap_c | ||
106 | #define _ex_dmiss _ex_dcplb_miss | ||
107 | #define _ex_dmult _ex_trap_c | ||
89 | #endif | 108 | #endif |
90 | ENDPROC(_ex_dcplb) | ||
91 | 109 | ||
92 | ENTRY(_ex_icplb) | 110 | ENTRY(_ex_dcplb_miss) |
111 | ENTRY(_ex_icplb_miss) | ||
93 | (R7:6,P5:4) = [sp++]; | 112 | (R7:6,P5:4) = [sp++]; |
94 | ASTAT = [sp++]; | 113 | ASTAT = [sp++]; |
95 | SAVE_ALL_SYS | 114 | SAVE_ALL_SYS |
@@ -98,7 +117,7 @@ ENTRY(_ex_icplb) | |||
98 | RESTORE_ALL_SYS | 117 | RESTORE_ALL_SYS |
99 | SP = EX_SCRATCH_REG; | 118 | SP = EX_SCRATCH_REG; |
100 | rtx; | 119 | rtx; |
101 | ENDPROC(_ex_icplb) | 120 | ENDPROC(_ex_icplb_miss) |
102 | 121 | ||
103 | ENTRY(_ex_syscall) | 122 | ENTRY(_ex_syscall) |
104 | DEBUG_START_HWTRACE(p5, r7) | 123 | DEBUG_START_HWTRACE(p5, r7) |
@@ -120,7 +139,7 @@ ENTRY(_ex_single_step) | |||
120 | r7 = retx; | 139 | r7 = retx; |
121 | r6 = reti; | 140 | r6 = reti; |
122 | cc = r7 == r6; | 141 | cc = r7 == r6; |
123 | if cc jump _return_from_exception | 142 | if cc jump _bfin_return_from_exception |
124 | r7 = syscfg; | 143 | r7 = syscfg; |
125 | bitclr (r7, 0); | 144 | bitclr (r7, 0); |
126 | syscfg = R7; | 145 | syscfg = R7; |
@@ -137,8 +156,9 @@ ENTRY(_ex_single_step) | |||
137 | r7 = [p4]; | 156 | r7 = [p4]; |
138 | cc = r6 == r7; | 157 | cc = r6 == r7; |
139 | if !cc jump _ex_trap_c; | 158 | if !cc jump _ex_trap_c; |
159 | ENDPROC(_ex_single_step) | ||
140 | 160 | ||
141 | ENTRY(_return_from_exception) | 161 | ENTRY(_bfin_return_from_exception) |
142 | DEBUG_START_HWTRACE(p5, r7) | 162 | DEBUG_START_HWTRACE(p5, r7) |
143 | #if ANOMALY_05000257 | 163 | #if ANOMALY_05000257 |
144 | R7=LC0; | 164 | R7=LC0; |
@@ -150,7 +170,7 @@ ENTRY(_return_from_exception) | |||
150 | ASTAT = [sp++]; | 170 | ASTAT = [sp++]; |
151 | sp = EX_SCRATCH_REG; | 171 | sp = EX_SCRATCH_REG; |
152 | rtx; | 172 | rtx; |
153 | ENDPROC(_ex_soft_bp) | 173 | ENDPROC(_bfin_return_from_exception) |
154 | 174 | ||
155 | ENTRY(_handle_bad_cplb) | 175 | ENTRY(_handle_bad_cplb) |
156 | /* To get here, we just tried and failed to change a CPLB | 176 | /* To get here, we just tried and failed to change a CPLB |
@@ -843,7 +863,7 @@ ENTRY(_ex_trace_buff_full) | |||
843 | LC0 = [sp++]; | 863 | LC0 = [sp++]; |
844 | P2 = [sp++]; | 864 | P2 = [sp++]; |
845 | P3 = [sp++]; | 865 | P3 = [sp++]; |
846 | jump _return_from_exception; | 866 | jump _bfin_return_from_exception; |
847 | ENDPROC(_ex_trace_buff_full) | 867 | ENDPROC(_ex_trace_buff_full) |
848 | 868 | ||
849 | #if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4 | 869 | #if CONFIG_DEBUG_BFIN_HWTRACE_EXPAND_LEN == 4 |
@@ -861,7 +881,7 @@ ENTRY(_software_trace_buff) | |||
861 | #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */ | 881 | #endif /* CONFIG_DEBUG_BFIN_HWTRACE_EXPAND */ |
862 | 882 | ||
863 | #if CONFIG_EARLY_PRINTK | 883 | #if CONFIG_EARLY_PRINTK |
864 | .section .init.text | 884 | __INIT |
865 | ENTRY(_early_trap) | 885 | ENTRY(_early_trap) |
866 | SAVE_ALL_SYS | 886 | SAVE_ALL_SYS |
867 | trace_buffer_stop(p0,r0); | 887 | trace_buffer_stop(p0,r0); |
@@ -896,6 +916,7 @@ ENTRY(_early_trap) | |||
896 | call _early_trap_c; | 916 | call _early_trap_c; |
897 | SP += 12; | 917 | SP += 12; |
898 | ENDPROC(_early_trap) | 918 | ENDPROC(_early_trap) |
919 | __FINIT | ||
899 | #endif /* CONFIG_EARLY_PRINTK */ | 920 | #endif /* CONFIG_EARLY_PRINTK */ |
900 | 921 | ||
901 | /* | 922 | /* |
@@ -908,6 +929,7 @@ ENDPROC(_early_trap) | |||
908 | #else | 929 | #else |
909 | .data | 930 | .data |
910 | #endif | 931 | #endif |
932 | |||
911 | ENTRY(_ex_table) | 933 | ENTRY(_ex_table) |
912 | /* entry for each EXCAUSE[5:0] | 934 | /* entry for each EXCAUSE[5:0] |
913 | * This table must be in sync with the table in ./kernel/traps.c | 935 | * This table must be in sync with the table in ./kernel/traps.c |
@@ -952,16 +974,16 @@ ENTRY(_ex_table) | |||
952 | .long _ex_trap_c /* 0x20 - Reserved */ | 974 | .long _ex_trap_c /* 0x20 - Reserved */ |
953 | .long _ex_trap_c /* 0x21 - Undefined Instruction */ | 975 | .long _ex_trap_c /* 0x21 - Undefined Instruction */ |
954 | .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */ | 976 | .long _ex_trap_c /* 0x22 - Illegal Instruction Combination */ |
955 | .long _ex_dcplb /* 0x23 - Data CPLB Protection Violation */ | 977 | .long _ex_dviol /* 0x23 - Data CPLB Protection Violation */ |
956 | .long _ex_trap_c /* 0x24 - Data access misaligned */ | 978 | .long _ex_trap_c /* 0x24 - Data access misaligned */ |
957 | .long _ex_trap_c /* 0x25 - Unrecoverable Event */ | 979 | .long _ex_trap_c /* 0x25 - Unrecoverable Event */ |
958 | .long _ex_dcplb /* 0x26 - Data CPLB Miss */ | 980 | .long _ex_dmiss /* 0x26 - Data CPLB Miss */ |
959 | .long _ex_trap_c /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */ | 981 | .long _ex_dmult /* 0x27 - Data CPLB Multiple Hits - Linux Trap Zero */ |
960 | .long _ex_trap_c /* 0x28 - Emulation Watchpoint */ | 982 | .long _ex_trap_c /* 0x28 - Emulation Watchpoint */ |
961 | .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */ | 983 | .long _ex_trap_c /* 0x29 - Instruction fetch access error (535 only) */ |
962 | .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */ | 984 | .long _ex_trap_c /* 0x2A - Instruction fetch misaligned */ |
963 | .long _ex_icplb /* 0x2B - Instruction CPLB protection Violation */ | 985 | .long _ex_trap_c /* 0x2B - Instruction CPLB protection Violation */ |
964 | .long _ex_icplb /* 0x2C - Instruction CPLB miss */ | 986 | .long _ex_icplb_miss /* 0x2C - Instruction CPLB miss */ |
965 | .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */ | 987 | .long _ex_trap_c /* 0x2D - Instruction CPLB Multiple Hits */ |
966 | .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */ | 988 | .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */ |
967 | .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */ | 989 | .long _ex_trap_c /* 0x2E - Illegal use of Supervisor Resource */ |
diff --git a/arch/blackfin/mach-common/interrupt.S b/arch/blackfin/mach-common/interrupt.S index c6b32fe0f6e9..4de376418a18 100644 --- a/arch/blackfin/mach-common/interrupt.S +++ b/arch/blackfin/mach-common/interrupt.S | |||
@@ -30,7 +30,6 @@ | |||
30 | 30 | ||
31 | #include <asm/blackfin.h> | 31 | #include <asm/blackfin.h> |
32 | #include <asm/mach/irq.h> | 32 | #include <asm/mach/irq.h> |
33 | #include <linux/autoconf.h> | ||
34 | #include <linux/linkage.h> | 33 | #include <linux/linkage.h> |
35 | #include <asm/entry.h> | 34 | #include <asm/entry.h> |
36 | #include <asm/asm-offsets.h> | 35 | #include <asm/asm-offsets.h> |
diff --git a/arch/blackfin/mach-common/ints-priority-dc.c b/arch/blackfin/mach-common/ints-priority-dc.c index c2f05fabedc1..4882f0e801a9 100644 --- a/arch/blackfin/mach-common/ints-priority-dc.c +++ b/arch/blackfin/mach-common/ints-priority-dc.c | |||
@@ -181,7 +181,6 @@ static struct irq_chip bf561_internal_irqchip = { | |||
181 | .unmask = bf561_internal_unmask_irq, | 181 | .unmask = bf561_internal_unmask_irq, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
185 | static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; | 184 | static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; |
186 | static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; | 185 | static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; |
187 | 186 | ||
@@ -362,8 +361,6 @@ static void bf561_demux_gpio_irq(unsigned int inta_irq, | |||
362 | 361 | ||
363 | } | 362 | } |
364 | 363 | ||
365 | #endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ | ||
366 | |||
367 | void __init init_exception_vectors(void) | 364 | void __init init_exception_vectors(void) |
368 | { | 365 | { |
369 | SSYNC(); | 366 | SSYNC(); |
@@ -413,26 +410,21 @@ int __init init_arch_irq(void) | |||
413 | set_irq_chip(irq, &bf561_core_irqchip); | 410 | set_irq_chip(irq, &bf561_core_irqchip); |
414 | else | 411 | else |
415 | set_irq_chip(irq, &bf561_internal_irqchip); | 412 | set_irq_chip(irq, &bf561_internal_irqchip); |
416 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | 413 | |
417 | if ((irq != IRQ_PROG0_INTA) && | 414 | if ((irq != IRQ_PROG0_INTA) && |
418 | (irq != IRQ_PROG1_INTA) && (irq != IRQ_PROG2_INTA)) { | 415 | (irq != IRQ_PROG1_INTA) && |
419 | #endif | 416 | (irq != IRQ_PROG2_INTA)) |
420 | set_irq_handler(irq, handle_simple_irq); | 417 | set_irq_handler(irq, handle_simple_irq); |
421 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | 418 | else |
422 | } else { | ||
423 | set_irq_chained_handler(irq, bf561_demux_gpio_irq); | 419 | set_irq_chained_handler(irq, bf561_demux_gpio_irq); |
424 | } | ||
425 | #endif | ||
426 | |||
427 | } | 420 | } |
428 | 421 | ||
429 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
430 | for (irq = IRQ_PF0; irq <= IRQ_PF47; irq++) { | 422 | for (irq = IRQ_PF0; irq <= IRQ_PF47; irq++) { |
431 | set_irq_chip(irq, &bf561_gpio_irqchip); | 423 | set_irq_chip(irq, &bf561_gpio_irqchip); |
432 | /* if configured as edge, then will be changed to do_edge_IRQ */ | 424 | /* if configured as edge, then will be changed to do_edge_IRQ */ |
433 | set_irq_handler(irq, handle_level_irq); | 425 | set_irq_handler(irq, handle_level_irq); |
434 | } | 426 | } |
435 | #endif | 427 | |
436 | bfin_write_IMASK(0); | 428 | bfin_write_IMASK(0); |
437 | CSYNC(); | 429 | CSYNC(); |
438 | ilat = bfin_read_ILAT(); | 430 | ilat = bfin_read_ILAT(); |
@@ -457,9 +449,8 @@ int __init init_arch_irq(void) | |||
457 | } | 449 | } |
458 | 450 | ||
459 | #ifdef CONFIG_DO_IRQ_L1 | 451 | #ifdef CONFIG_DO_IRQ_L1 |
460 | void do_irq(int vec, struct pt_regs *fp)__attribute__((l1_text)); | 452 | __attribute__((l1_text)) |
461 | #endif | 453 | #endif |
462 | |||
463 | void do_irq(int vec, struct pt_regs *fp) | 454 | void do_irq(int vec, struct pt_regs *fp) |
464 | { | 455 | { |
465 | if (vec == EVT_IVTMR_P) { | 456 | if (vec == EVT_IVTMR_P) { |
diff --git a/arch/blackfin/mach-common/ints-priority-sc.c b/arch/blackfin/mach-common/ints-priority-sc.c index 2d2b63567b30..147f0731087a 100644 --- a/arch/blackfin/mach-common/ints-priority-sc.c +++ b/arch/blackfin/mach-common/ints-priority-sc.c | |||
@@ -308,7 +308,7 @@ static void bfin_demux_error_irq(unsigned int int_err_irq, | |||
308 | } | 308 | } |
309 | #endif /* BF537_GENERIC_ERROR_INT_DEMUX */ | 309 | #endif /* BF537_GENERIC_ERROR_INT_DEMUX */ |
310 | 310 | ||
311 | #if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && !defined(CONFIG_BF54x) | 311 | #if !defined(CONFIG_BF54x) |
312 | 312 | ||
313 | static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; | 313 | static unsigned short gpio_enabled[gpio_bank(MAX_BLACKFIN_GPIOS)]; |
314 | static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; | 314 | static unsigned short gpio_edge_triggered[gpio_bank(MAX_BLACKFIN_GPIOS)]; |
@@ -464,7 +464,7 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq, | |||
464 | } | 464 | } |
465 | } | 465 | } |
466 | 466 | ||
467 | #else /* CONFIG_IRQCHIP_DEMUX_GPIO */ | 467 | #else /* CONFIG_BF54x */ |
468 | 468 | ||
469 | #define NR_PINT_SYS_IRQS 4 | 469 | #define NR_PINT_SYS_IRQS 4 |
470 | #define NR_PINT_BITS 32 | 470 | #define NR_PINT_BITS 32 |
@@ -726,7 +726,7 @@ static void bfin_demux_gpio_irq(unsigned int intb_irq, | |||
726 | } | 726 | } |
727 | 727 | ||
728 | } | 728 | } |
729 | #endif /* CONFIG_IRQCHIP_DEMUX_GPIO */ | 729 | #endif |
730 | 730 | ||
731 | void __init init_exception_vectors(void) | 731 | void __init init_exception_vectors(void) |
732 | { | 732 | { |
@@ -766,10 +766,10 @@ int __init init_arch_irq(void) | |||
766 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); | 766 | bfin_write_SIC_IMASK1(SIC_UNMASK_ALL); |
767 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); | 767 | bfin_write_SIC_IWR0(IWR_ENABLE_ALL); |
768 | bfin_write_SIC_IWR1(IWR_ENABLE_ALL); | 768 | bfin_write_SIC_IWR1(IWR_ENABLE_ALL); |
769 | #ifdef CONFIG_BF54x | 769 | # ifdef CONFIG_BF54x |
770 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); | 770 | bfin_write_SIC_IMASK2(SIC_UNMASK_ALL); |
771 | bfin_write_SIC_IWR2(IWR_ENABLE_ALL); | 771 | bfin_write_SIC_IWR2(IWR_ENABLE_ALL); |
772 | #endif | 772 | # endif |
773 | #else | 773 | #else |
774 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); | 774 | bfin_write_SIC_IMASK(SIC_UNMASK_ALL); |
775 | bfin_write_SIC_IWR(IWR_ENABLE_ALL); | 775 | bfin_write_SIC_IWR(IWR_ENABLE_ALL); |
@@ -778,13 +778,13 @@ int __init init_arch_irq(void) | |||
778 | 778 | ||
779 | local_irq_disable(); | 779 | local_irq_disable(); |
780 | 780 | ||
781 | #if defined(CONFIG_IRQCHIP_DEMUX_GPIO) && defined(CONFIG_BF54x) | 781 | #ifdef CONFIG_BF54x |
782 | #ifdef CONFIG_PINTx_REASSIGN | 782 | # ifdef CONFIG_PINTx_REASSIGN |
783 | pint[0]->assign = CONFIG_PINT0_ASSIGN; | 783 | pint[0]->assign = CONFIG_PINT0_ASSIGN; |
784 | pint[1]->assign = CONFIG_PINT1_ASSIGN; | 784 | pint[1]->assign = CONFIG_PINT1_ASSIGN; |
785 | pint[2]->assign = CONFIG_PINT2_ASSIGN; | 785 | pint[2]->assign = CONFIG_PINT2_ASSIGN; |
786 | pint[3]->assign = CONFIG_PINT3_ASSIGN; | 786 | pint[3]->assign = CONFIG_PINT3_ASSIGN; |
787 | #endif | 787 | # endif |
788 | /* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */ | 788 | /* Whenever PINTx_ASSIGN is altered init_pint_lut() must be executed! */ |
789 | init_pint_lut(); | 789 | init_pint_lut(); |
790 | #endif | 790 | #endif |
@@ -799,18 +799,17 @@ int __init init_arch_irq(void) | |||
799 | #endif | 799 | #endif |
800 | 800 | ||
801 | switch (irq) { | 801 | switch (irq) { |
802 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
803 | #if defined(CONFIG_BF53x) | 802 | #if defined(CONFIG_BF53x) |
804 | case IRQ_PROG_INTA: | 803 | case IRQ_PROG_INTA: |
805 | set_irq_chained_handler(irq, | 804 | set_irq_chained_handler(irq, |
806 | bfin_demux_gpio_irq); | 805 | bfin_demux_gpio_irq); |
807 | break; | 806 | break; |
808 | #if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) | 807 | # if defined(BF537_FAMILY) && !(defined(CONFIG_BFIN_MAC) || defined(CONFIG_BFIN_MAC_MODULE)) |
809 | case IRQ_MAC_RX: | 808 | case IRQ_MAC_RX: |
810 | set_irq_chained_handler(irq, | 809 | set_irq_chained_handler(irq, |
811 | bfin_demux_gpio_irq); | 810 | bfin_demux_gpio_irq); |
812 | break; | 811 | break; |
813 | #endif | 812 | # endif |
814 | #elif defined(CONFIG_BF54x) | 813 | #elif defined(CONFIG_BF54x) |
815 | case IRQ_PINT0: | 814 | case IRQ_PINT0: |
816 | set_irq_chained_handler(irq, | 815 | set_irq_chained_handler(irq, |
@@ -842,7 +841,6 @@ int __init init_arch_irq(void) | |||
842 | bfin_demux_gpio_irq); | 841 | bfin_demux_gpio_irq); |
843 | break; | 842 | break; |
844 | #endif | 843 | #endif |
845 | #endif | ||
846 | default: | 844 | default: |
847 | set_irq_handler(irq, handle_simple_irq); | 845 | set_irq_handler(irq, handle_simple_irq); |
848 | break; | 846 | break; |
@@ -861,7 +859,6 @@ int __init init_arch_irq(void) | |||
861 | } | 859 | } |
862 | #endif | 860 | #endif |
863 | 861 | ||
864 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
865 | #ifndef CONFIG_BF54x | 862 | #ifndef CONFIG_BF54x |
866 | for (irq = IRQ_PF0; irq < NR_IRQS; irq++) { | 863 | for (irq = IRQ_PF0; irq < NR_IRQS; irq++) { |
867 | #else | 864 | #else |
@@ -871,7 +868,7 @@ int __init init_arch_irq(void) | |||
871 | /* if configured as edge, then will be changed to do_edge_IRQ */ | 868 | /* if configured as edge, then will be changed to do_edge_IRQ */ |
872 | set_irq_handler(irq, handle_level_irq); | 869 | set_irq_handler(irq, handle_level_irq); |
873 | } | 870 | } |
874 | #endif | 871 | |
875 | bfin_write_IMASK(0); | 872 | bfin_write_IMASK(0); |
876 | CSYNC(); | 873 | CSYNC(); |
877 | ilat = bfin_read_ILAT(); | 874 | ilat = bfin_read_ILAT(); |
@@ -896,9 +893,8 @@ int __init init_arch_irq(void) | |||
896 | } | 893 | } |
897 | 894 | ||
898 | #ifdef CONFIG_DO_IRQ_L1 | 895 | #ifdef CONFIG_DO_IRQ_L1 |
899 | void do_irq(int vec, struct pt_regs *fp) __attribute__((l1_text)); | 896 | __attribute__((l1_text)) |
900 | #endif | 897 | #endif |
901 | |||
902 | void do_irq(int vec, struct pt_regs *fp) | 898 | void do_irq(int vec, struct pt_regs *fp) |
903 | { | 899 | { |
904 | if (vec == EVT_IVTMR_P) { | 900 | if (vec == EVT_IVTMR_P) { |
diff --git a/arch/blackfin/mach-common/irqpanic.c b/arch/blackfin/mach-common/irqpanic.c index f05e3dadaf33..b22959b197e5 100644 --- a/arch/blackfin/mach-common/irqpanic.c +++ b/arch/blackfin/mach-common/irqpanic.c | |||
@@ -153,27 +153,29 @@ asmlinkage void irq_panic(int reason, struct pt_regs *regs) | |||
153 | case (SEQSTAT_HWERRCAUSE_SYSTEM_MMR): /* System MMR Error */ | 153 | case (SEQSTAT_HWERRCAUSE_SYSTEM_MMR): /* System MMR Error */ |
154 | info.si_code = BUS_ADRALN; | 154 | info.si_code = BUS_ADRALN; |
155 | sig = SIGBUS; | 155 | sig = SIGBUS; |
156 | printk(KERN_EMERG HWC_x2); | 156 | printk(KERN_EMERG HWC_x2(KERN_EMERG)); |
157 | break; | 157 | break; |
158 | case (SEQSTAT_HWERRCAUSE_EXTERN_ADDR): /* External Memory Addressing Error */ | 158 | case (SEQSTAT_HWERRCAUSE_EXTERN_ADDR): /* External Memory Addressing Error */ |
159 | info.si_code = BUS_ADRERR; | 159 | info.si_code = BUS_ADRERR; |
160 | sig = SIGBUS; | 160 | sig = SIGBUS; |
161 | printk(KERN_EMERG HWC_x3); | 161 | printk(KERN_EMERG HWC_x3(KERN_EMERG)); |
162 | break; | 162 | break; |
163 | case (SEQSTAT_HWERRCAUSE_PERF_FLOW): /* Performance Monitor Overflow */ | 163 | case (SEQSTAT_HWERRCAUSE_PERF_FLOW): /* Performance Monitor Overflow */ |
164 | printk(KERN_EMERG HWC_x12); | 164 | printk(KERN_EMERG HWC_x12(KERN_EMERG)); |
165 | break; | 165 | break; |
166 | case (SEQSTAT_HWERRCAUSE_RAISE_5): /* RAISE 5 instruction */ | 166 | case (SEQSTAT_HWERRCAUSE_RAISE_5): /* RAISE 5 instruction */ |
167 | printk(KERN_EMERG HWC_x18); | 167 | printk(KERN_EMERG HWC_x18(KERN_EMERG)); |
168 | break; | 168 | break; |
169 | default: /* Reserved */ | 169 | default: /* Reserved */ |
170 | printk(KERN_EMERG HWC_default); | 170 | printk(KERN_EMERG HWC_default(KERN_EMERG)); |
171 | break; | 171 | break; |
172 | } | 172 | } |
173 | } | 173 | } |
174 | 174 | ||
175 | regs->ipend = bfin_read_IPEND(); | 175 | regs->ipend = bfin_read_IPEND(); |
176 | dump_bfin_regs(regs, (void *)regs->pc); | 176 | dump_bfin_process(regs); |
177 | dump_bfin_mem((void *)regs->pc); | ||
178 | show_regs(regs); | ||
177 | if (0 == (info.si_signo = sig) || 0 == user_mode(regs)) /* in kernelspace */ | 179 | if (0 == (info.si_signo = sig) || 0 == user_mode(regs)) /* in kernelspace */ |
178 | panic("Unhandled IRQ or exceptions!\n"); | 180 | panic("Unhandled IRQ or exceptions!\n"); |
179 | else { /* in userspace */ | 181 | else { /* in userspace */ |
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/blackfin_sram.c index b99ea883cd22..e41f0e8ecacb 100644 --- a/arch/blackfin/mm/blackfin_sram.c +++ b/arch/blackfin/mm/blackfin_sram.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/autoconf.h> | ||
31 | #include <linux/module.h> | 30 | #include <linux/module.h> |
32 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
33 | #include <linux/types.h> | 32 | #include <linux/types.h> |
diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index 880add120eb3..8a2a53b33616 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c | |||
@@ -565,7 +565,7 @@ void atari_kbd_leds(unsigned int leds) | |||
565 | 565 | ||
566 | static int atari_keyb_done = 0; | 566 | static int atari_keyb_done = 0; |
567 | 567 | ||
568 | int __init atari_keyb_init(void) | 568 | int atari_keyb_init(void) |
569 | { | 569 | { |
570 | if (atari_keyb_done) | 570 | if (atari_keyb_done) |
571 | return 0; | 571 | return 0; |
@@ -631,6 +631,7 @@ int __init atari_keyb_init(void) | |||
631 | atari_keyb_done = 1; | 631 | atari_keyb_done = 1; |
632 | return 0; | 632 | return 0; |
633 | } | 633 | } |
634 | EXPORT_SYMBOL_GPL(atari_keyb_init); | ||
634 | 635 | ||
635 | int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode) | 636 | int atari_kbd_translate(unsigned char keycode, unsigned char *keycodep, char raw_mode) |
636 | { | 637 | { |
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig index 2f2ce0c28bc0..455bd1f560aa 100644 --- a/arch/mips/Kconfig +++ b/arch/mips/Kconfig | |||
@@ -22,6 +22,7 @@ config MACH_ALCHEMY | |||
22 | config BASLER_EXCITE | 22 | config BASLER_EXCITE |
23 | bool "Basler eXcite smart camera" | 23 | bool "Basler eXcite smart camera" |
24 | select CEVT_R4K | 24 | select CEVT_R4K |
25 | select CSRC_R4K | ||
25 | select DMA_COHERENT | 26 | select DMA_COHERENT |
26 | select HW_HAS_PCI | 27 | select HW_HAS_PCI |
27 | select IRQ_CPU | 28 | select IRQ_CPU |
@@ -49,6 +50,7 @@ config BASLER_EXCITE_PROTOTYPE | |||
49 | config BCM47XX | 50 | config BCM47XX |
50 | bool "BCM47XX based boards" | 51 | bool "BCM47XX based boards" |
51 | select CEVT_R4K | 52 | select CEVT_R4K |
53 | select CSRC_R4K | ||
52 | select DMA_NONCOHERENT | 54 | select DMA_NONCOHERENT |
53 | select HW_HAS_PCI | 55 | select HW_HAS_PCI |
54 | select IRQ_CPU | 56 | select IRQ_CPU |
@@ -66,6 +68,7 @@ config BCM47XX | |||
66 | config MIPS_COBALT | 68 | config MIPS_COBALT |
67 | bool "Cobalt Server" | 69 | bool "Cobalt Server" |
68 | select CEVT_R4K | 70 | select CEVT_R4K |
71 | select CSRC_R4K | ||
69 | select CEVT_GT641XX | 72 | select CEVT_GT641XX |
70 | select DMA_NONCOHERENT | 73 | select DMA_NONCOHERENT |
71 | select HW_HAS_PCI | 74 | select HW_HAS_PCI |
@@ -85,6 +88,7 @@ config MACH_DECSTATION | |||
85 | bool "DECstations" | 88 | bool "DECstations" |
86 | select BOOT_ELF32 | 89 | select BOOT_ELF32 |
87 | select CEVT_R4K | 90 | select CEVT_R4K |
91 | select CSRC_R4K | ||
88 | select DMA_NONCOHERENT | 92 | select DMA_NONCOHERENT |
89 | select NO_IOPORT | 93 | select NO_IOPORT |
90 | select IRQ_CPU | 94 | select IRQ_CPU |
@@ -117,6 +121,7 @@ config MACH_JAZZ | |||
117 | select ARC32 | 121 | select ARC32 |
118 | select ARCH_MAY_HAVE_PC_FDC | 122 | select ARCH_MAY_HAVE_PC_FDC |
119 | select CEVT_R4K | 123 | select CEVT_R4K |
124 | select CSRC_R4K | ||
120 | select GENERIC_ISA_DMA | 125 | select GENERIC_ISA_DMA |
121 | select IRQ_CPU | 126 | select IRQ_CPU |
122 | select I8253 | 127 | select I8253 |
@@ -137,6 +142,7 @@ config MACH_JAZZ | |||
137 | config LASAT | 142 | config LASAT |
138 | bool "LASAT Networks platforms" | 143 | bool "LASAT Networks platforms" |
139 | select CEVT_R4K | 144 | select CEVT_R4K |
145 | select CSRC_R4K | ||
140 | select DMA_NONCOHERENT | 146 | select DMA_NONCOHERENT |
141 | select SYS_HAS_EARLY_PRINTK | 147 | select SYS_HAS_EARLY_PRINTK |
142 | select HW_HAS_PCI | 148 | select HW_HAS_PCI |
@@ -154,6 +160,7 @@ config LEMOTE_FULONG | |||
154 | bool "Lemote Fulong mini-PC" | 160 | bool "Lemote Fulong mini-PC" |
155 | select ARCH_SPARSEMEM_ENABLE | 161 | select ARCH_SPARSEMEM_ENABLE |
156 | select CEVT_R4K | 162 | select CEVT_R4K |
163 | select CSRC_R4K | ||
157 | select SYS_HAS_CPU_LOONGSON2 | 164 | select SYS_HAS_CPU_LOONGSON2 |
158 | select DMA_NONCOHERENT | 165 | select DMA_NONCOHERENT |
159 | select BOOT_ELF32 | 166 | select BOOT_ELF32 |
@@ -179,6 +186,7 @@ config MIPS_ATLAS | |||
179 | bool "MIPS Atlas board" | 186 | bool "MIPS Atlas board" |
180 | select BOOT_ELF32 | 187 | select BOOT_ELF32 |
181 | select CEVT_R4K | 188 | select CEVT_R4K |
189 | select CSRC_R4K | ||
182 | select DMA_NONCOHERENT | 190 | select DMA_NONCOHERENT |
183 | select SYS_HAS_EARLY_PRINTK | 191 | select SYS_HAS_EARLY_PRINTK |
184 | select IRQ_CPU | 192 | select IRQ_CPU |
@@ -210,6 +218,7 @@ config MIPS_MALTA | |||
210 | select ARCH_MAY_HAVE_PC_FDC | 218 | select ARCH_MAY_HAVE_PC_FDC |
211 | select BOOT_ELF32 | 219 | select BOOT_ELF32 |
212 | select CEVT_R4K | 220 | select CEVT_R4K |
221 | select CSRC_R4K | ||
213 | select DMA_NONCOHERENT | 222 | select DMA_NONCOHERENT |
214 | select GENERIC_ISA_DMA | 223 | select GENERIC_ISA_DMA |
215 | select IRQ_CPU | 224 | select IRQ_CPU |
@@ -241,6 +250,7 @@ config MIPS_MALTA | |||
241 | config MIPS_SEAD | 250 | config MIPS_SEAD |
242 | bool "MIPS SEAD board" | 251 | bool "MIPS SEAD board" |
243 | select CEVT_R4K | 252 | select CEVT_R4K |
253 | select CSRC_R4K | ||
244 | select IRQ_CPU | 254 | select IRQ_CPU |
245 | select DMA_NONCOHERENT | 255 | select DMA_NONCOHERENT |
246 | select SYS_HAS_EARLY_PRINTK | 256 | select SYS_HAS_EARLY_PRINTK |
@@ -260,6 +270,7 @@ config MIPS_SEAD | |||
260 | config MIPS_SIM | 270 | config MIPS_SIM |
261 | bool 'MIPS simulator (MIPSsim)' | 271 | bool 'MIPS simulator (MIPSsim)' |
262 | select CEVT_R4K | 272 | select CEVT_R4K |
273 | select CSRC_R4K | ||
263 | select DMA_NONCOHERENT | 274 | select DMA_NONCOHERENT |
264 | select SYS_HAS_EARLY_PRINTK | 275 | select SYS_HAS_EARLY_PRINTK |
265 | select IRQ_CPU | 276 | select IRQ_CPU |
@@ -278,6 +289,7 @@ config MIPS_SIM | |||
278 | config MARKEINS | 289 | config MARKEINS |
279 | bool "NEC EMMA2RH Mark-eins" | 290 | bool "NEC EMMA2RH Mark-eins" |
280 | select CEVT_R4K | 291 | select CEVT_R4K |
292 | select CSRC_R4K | ||
281 | select DMA_NONCOHERENT | 293 | select DMA_NONCOHERENT |
282 | select HW_HAS_PCI | 294 | select HW_HAS_PCI |
283 | select IRQ_CPU | 295 | select IRQ_CPU |
@@ -293,6 +305,7 @@ config MARKEINS | |||
293 | config MACH_VR41XX | 305 | config MACH_VR41XX |
294 | bool "NEC VR4100 series based machines" | 306 | bool "NEC VR4100 series based machines" |
295 | select CEVT_R4K | 307 | select CEVT_R4K |
308 | select CSRC_R4K | ||
296 | select SYS_HAS_CPU_VR41XX | 309 | select SYS_HAS_CPU_VR41XX |
297 | select GENERIC_HARDIRQS_NO__DO_IRQ | 310 | select GENERIC_HARDIRQS_NO__DO_IRQ |
298 | 311 | ||
@@ -330,6 +343,7 @@ config PMC_MSP | |||
330 | config PMC_YOSEMITE | 343 | config PMC_YOSEMITE |
331 | bool "PMC-Sierra Yosemite eval board" | 344 | bool "PMC-Sierra Yosemite eval board" |
332 | select CEVT_R4K | 345 | select CEVT_R4K |
346 | select CSRC_R4K | ||
333 | select DMA_COHERENT | 347 | select DMA_COHERENT |
334 | select HW_HAS_PCI | 348 | select HW_HAS_PCI |
335 | select IRQ_CPU | 349 | select IRQ_CPU |
@@ -351,6 +365,7 @@ config PMC_YOSEMITE | |||
351 | config QEMU | 365 | config QEMU |
352 | bool "Qemu" | 366 | bool "Qemu" |
353 | select CEVT_R4K | 367 | select CEVT_R4K |
368 | select CSRC_R4K | ||
354 | select DMA_COHERENT | 369 | select DMA_COHERENT |
355 | select GENERIC_ISA_DMA | 370 | select GENERIC_ISA_DMA |
356 | select HAVE_STD_PC_SERIAL_PORT | 371 | select HAVE_STD_PC_SERIAL_PORT |
@@ -382,9 +397,11 @@ config SGI_IP22 | |||
382 | select ARC32 | 397 | select ARC32 |
383 | select BOOT_ELF32 | 398 | select BOOT_ELF32 |
384 | select CEVT_R4K | 399 | select CEVT_R4K |
400 | select CSRC_R4K | ||
385 | select DMA_NONCOHERENT | 401 | select DMA_NONCOHERENT |
386 | select HW_HAS_EISA | 402 | select HW_HAS_EISA |
387 | select I8253 | 403 | select I8253 |
404 | select I8259 | ||
388 | select IP22_CPU_SCACHE | 405 | select IP22_CPU_SCACHE |
389 | select IRQ_CPU | 406 | select IRQ_CPU |
390 | select GENERIC_ISA_DMA_SUPPORT_BROKEN | 407 | select GENERIC_ISA_DMA_SUPPORT_BROKEN |
@@ -427,6 +444,7 @@ config SGI_IP32 | |||
427 | select ARC32 | 444 | select ARC32 |
428 | select BOOT_ELF32 | 445 | select BOOT_ELF32 |
429 | select CEVT_R4K | 446 | select CEVT_R4K |
447 | select CSRC_R4K | ||
430 | select DMA_NONCOHERENT | 448 | select DMA_NONCOHERENT |
431 | select HW_HAS_PCI | 449 | select HW_HAS_PCI |
432 | select IRQ_CPU | 450 | select IRQ_CPU |
@@ -498,6 +516,7 @@ config SIBYTE_SWARM | |||
498 | select SYS_SUPPORTS_HIGHMEM | 516 | select SYS_SUPPORTS_HIGHMEM |
499 | select SYS_SUPPORTS_KGDB | 517 | select SYS_SUPPORTS_KGDB |
500 | select SYS_SUPPORTS_LITTLE_ENDIAN | 518 | select SYS_SUPPORTS_LITTLE_ENDIAN |
519 | select ZONE_DMA32 if 64BIT | ||
501 | 520 | ||
502 | config SIBYTE_LITTLESUR | 521 | config SIBYTE_LITTLESUR |
503 | bool "Sibyte BCM91250C2-LittleSur" | 522 | bool "Sibyte BCM91250C2-LittleSur" |
@@ -548,6 +567,7 @@ config SIBYTE_BIGSUR | |||
548 | select SYS_SUPPORTS_BIG_ENDIAN | 567 | select SYS_SUPPORTS_BIG_ENDIAN |
549 | select SYS_SUPPORTS_HIGHMEM | 568 | select SYS_SUPPORTS_HIGHMEM |
550 | select SYS_SUPPORTS_LITTLE_ENDIAN | 569 | select SYS_SUPPORTS_LITTLE_ENDIAN |
570 | select ZONE_DMA32 if 64BIT | ||
551 | 571 | ||
552 | config SNI_RM | 572 | config SNI_RM |
553 | bool "SNI RM200/300/400" | 573 | bool "SNI RM200/300/400" |
@@ -556,6 +576,7 @@ config SNI_RM | |||
556 | select ARCH_MAY_HAVE_PC_FDC | 576 | select ARCH_MAY_HAVE_PC_FDC |
557 | select BOOT_ELF32 | 577 | select BOOT_ELF32 |
558 | select CEVT_R4K | 578 | select CEVT_R4K |
579 | select CSRC_R4K | ||
559 | select DMA_NONCOHERENT | 580 | select DMA_NONCOHERENT |
560 | select GENERIC_ISA_DMA | 581 | select GENERIC_ISA_DMA |
561 | select HW_HAS_EISA | 582 | select HW_HAS_EISA |
@@ -599,6 +620,7 @@ config TOSHIBA_JMR3927 | |||
599 | config TOSHIBA_RBTX4927 | 620 | config TOSHIBA_RBTX4927 |
600 | bool "Toshiba RBTX49[23]7 board" | 621 | bool "Toshiba RBTX49[23]7 board" |
601 | select CEVT_R4K | 622 | select CEVT_R4K |
623 | select CSRC_R4K | ||
602 | select CEVT_TXX9 | 624 | select CEVT_TXX9 |
603 | select DMA_NONCOHERENT | 625 | select DMA_NONCOHERENT |
604 | select HAS_TXX9_SERIAL | 626 | select HAS_TXX9_SERIAL |
@@ -621,6 +643,7 @@ config TOSHIBA_RBTX4927 | |||
621 | config TOSHIBA_RBTX4938 | 643 | config TOSHIBA_RBTX4938 |
622 | bool "Toshiba RBTX4938 board" | 644 | bool "Toshiba RBTX4938 board" |
623 | select CEVT_R4K | 645 | select CEVT_R4K |
646 | select CSRC_R4K | ||
624 | select CEVT_TXX9 | 647 | select CEVT_TXX9 |
625 | select DMA_NONCOHERENT | 648 | select DMA_NONCOHERENT |
626 | select HAS_TXX9_SERIAL | 649 | select HAS_TXX9_SERIAL |
@@ -642,6 +665,7 @@ config TOSHIBA_RBTX4938 | |||
642 | config WR_PPMC | 665 | config WR_PPMC |
643 | bool "Wind River PPMC board" | 666 | bool "Wind River PPMC board" |
644 | select CEVT_R4K | 667 | select CEVT_R4K |
668 | select CSRC_R4K | ||
645 | select IRQ_CPU | 669 | select IRQ_CPU |
646 | select BOOT_ELF32 | 670 | select BOOT_ELF32 |
647 | select DMA_NONCOHERENT | 671 | select DMA_NONCOHERENT |
@@ -752,6 +776,9 @@ config CEVT_TXX9 | |||
752 | config CSRC_BCM1480 | 776 | config CSRC_BCM1480 |
753 | bool | 777 | bool |
754 | 778 | ||
779 | config CSRC_R4K | ||
780 | bool | ||
781 | |||
755 | config CSRC_SB1250 | 782 | config CSRC_SB1250 |
756 | bool | 783 | bool |
757 | 784 | ||
@@ -1640,6 +1667,9 @@ config ARCH_DISCONTIGMEM_ENABLE | |||
1640 | or have huge holes in the physical address space for other reasons. | 1667 | or have huge holes in the physical address space for other reasons. |
1641 | See <file:Documentation/vm/numa> for more. | 1668 | See <file:Documentation/vm/numa> for more. |
1642 | 1669 | ||
1670 | config ARCH_POPULATES_NODE_MAP | ||
1671 | def_bool y | ||
1672 | |||
1643 | config ARCH_SPARSEMEM_ENABLE | 1673 | config ARCH_SPARSEMEM_ENABLE |
1644 | bool | 1674 | bool |
1645 | select SPARSEMEM_STATIC | 1675 | select SPARSEMEM_STATIC |
@@ -1945,6 +1975,9 @@ config I8253 | |||
1945 | config PCSPEAKER | 1975 | config PCSPEAKER |
1946 | bool | 1976 | bool |
1947 | 1977 | ||
1978 | config ZONE_DMA32 | ||
1979 | bool | ||
1980 | |||
1948 | source "drivers/pcmcia/Kconfig" | 1981 | source "drivers/pcmcia/Kconfig" |
1949 | 1982 | ||
1950 | source "drivers/pci/hotplug/Kconfig" | 1983 | source "drivers/pci/hotplug/Kconfig" |
diff --git a/arch/mips/au1000/Kconfig b/arch/mips/au1000/Kconfig index b36cec58a9a8..05d1354aad3a 100644 --- a/arch/mips/au1000/Kconfig +++ b/arch/mips/au1000/Kconfig | |||
@@ -138,6 +138,7 @@ config SOC_AU1X00 | |||
138 | bool | 138 | bool |
139 | select 64BIT_PHYS_ADDR | 139 | select 64BIT_PHYS_ADDR |
140 | select CEVT_R4K | 140 | select CEVT_R4K |
141 | select CSRC_R4K | ||
141 | select IRQ_CPU | 142 | select IRQ_CPU |
142 | select SYS_HAS_CPU_MIPS32_R1 | 143 | select SYS_HAS_CPU_MIPS32_R1 |
143 | select SYS_SUPPORTS_32BIT_KERNEL | 144 | select SYS_SUPPORTS_32BIT_KERNEL |
diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile index b551535b7e48..ffa08362de17 100644 --- a/arch/mips/kernel/Makefile +++ b/arch/mips/kernel/Makefile | |||
@@ -14,6 +14,7 @@ obj-$(CONFIG_CEVT_GT641XX) += cevt-gt641xx.o | |||
14 | obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o | 14 | obj-$(CONFIG_CEVT_SB1250) += cevt-sb1250.o |
15 | obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o | 15 | obj-$(CONFIG_CEVT_TXX9) += cevt-txx9.o |
16 | obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o | 16 | obj-$(CONFIG_CSRC_BCM1480) += csrc-bcm1480.o |
17 | obj-$(CONFIG_CSRC_R4K) += csrc-r4k.o | ||
17 | obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o | 18 | obj-$(CONFIG_CSRC_SB1250) += csrc-sb1250.o |
18 | 19 | ||
19 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ | 20 | binfmt_irix-objs := irixelf.o irixinv.o irixioctl.o irixsig.o \ |
@@ -43,6 +44,7 @@ obj-$(CONFIG_CPU_TX49XX) += r4k_fpu.o r4k_switch.o | |||
43 | obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o | 44 | obj-$(CONFIG_CPU_VR41XX) += r4k_fpu.o r4k_switch.o |
44 | 45 | ||
45 | obj-$(CONFIG_SMP) += smp.o | 46 | obj-$(CONFIG_SMP) += smp.o |
47 | obj-$(CONFIG_SMP_UP) += smp-up.o | ||
46 | 48 | ||
47 | obj-$(CONFIG_MIPS_MT) += mips-mt.o | 49 | obj-$(CONFIG_MIPS_MT) += mips-mt.o |
48 | obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o | 50 | obj-$(CONFIG_MIPS_MT_FPAFF) += mips-mt-fpaff.o |
diff --git a/arch/mips/kernel/cevt-r4k.c b/arch/mips/kernel/cevt-r4k.c index bab935a3d74b..24a2d907aa0d 100644 --- a/arch/mips/kernel/cevt-r4k.c +++ b/arch/mips/kernel/cevt-r4k.c | |||
@@ -219,7 +219,7 @@ static int c0_compare_int_usable(void) | |||
219 | return 1; | 219 | return 1; |
220 | } | 220 | } |
221 | 221 | ||
222 | void __cpuinit mips_clockevent_init(void) | 222 | int __cpuinit mips_clockevent_init(void) |
223 | { | 223 | { |
224 | uint64_t mips_freq = mips_hpt_frequency; | 224 | uint64_t mips_freq = mips_hpt_frequency; |
225 | unsigned int cpu = smp_processor_id(); | 225 | unsigned int cpu = smp_processor_id(); |
@@ -227,7 +227,7 @@ void __cpuinit mips_clockevent_init(void) | |||
227 | unsigned int irq; | 227 | unsigned int irq; |
228 | 228 | ||
229 | if (!cpu_has_counter || !mips_hpt_frequency) | 229 | if (!cpu_has_counter || !mips_hpt_frequency) |
230 | return; | 230 | return -ENXIO; |
231 | 231 | ||
232 | #ifdef CONFIG_MIPS_MT_SMTC | 232 | #ifdef CONFIG_MIPS_MT_SMTC |
233 | setup_smtc_dummy_clockevent_device(); | 233 | setup_smtc_dummy_clockevent_device(); |
@@ -237,11 +237,11 @@ void __cpuinit mips_clockevent_init(void) | |||
237 | * device. | 237 | * device. |
238 | */ | 238 | */ |
239 | if (cpu) | 239 | if (cpu) |
240 | return; | 240 | return 0; |
241 | #endif | 241 | #endif |
242 | 242 | ||
243 | if (!c0_compare_int_usable()) | 243 | if (!c0_compare_int_usable()) |
244 | return; | 244 | return -ENXIO; |
245 | 245 | ||
246 | /* | 246 | /* |
247 | * With vectored interrupts things are getting platform specific. | 247 | * With vectored interrupts things are getting platform specific. |
@@ -276,8 +276,8 @@ void __cpuinit mips_clockevent_init(void) | |||
276 | 276 | ||
277 | clockevents_register_device(cd); | 277 | clockevents_register_device(cd); |
278 | 278 | ||
279 | if (!cp0_timer_irq_installed) | 279 | if (cp0_timer_irq_installed) |
280 | return; | 280 | return 0; |
281 | 281 | ||
282 | cp0_timer_irq_installed = 1; | 282 | cp0_timer_irq_installed = 1; |
283 | 283 | ||
@@ -287,4 +287,6 @@ void __cpuinit mips_clockevent_init(void) | |||
287 | #else | 287 | #else |
288 | setup_irq(irq, &c0_compare_irqaction); | 288 | setup_irq(irq, &c0_compare_irqaction); |
289 | #endif | 289 | #endif |
290 | |||
291 | return 0; | ||
290 | } | 292 | } |
diff --git a/arch/mips/kernel/csrc-r4k.c b/arch/mips/kernel/csrc-r4k.c new file mode 100644 index 000000000000..74c5c62365a8 --- /dev/null +++ b/arch/mips/kernel/csrc-r4k.c | |||
@@ -0,0 +1,29 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2007 by Ralf Baechle | ||
7 | */ | ||
8 | |||
9 | static cycle_t c0_hpt_read(void) | ||
10 | { | ||
11 | return read_c0_count(); | ||
12 | } | ||
13 | |||
14 | static struct clocksource clocksource_mips = { | ||
15 | .name = "MIPS", | ||
16 | .read = c0_hpt_read, | ||
17 | .mask = CLOCKSOURCE_MASK(32), | ||
18 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
19 | }; | ||
20 | |||
21 | static void __init init_mips_clocksource(void) | ||
22 | { | ||
23 | /* Calclate a somewhat reasonable rating value */ | ||
24 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | ||
25 | |||
26 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); | ||
27 | |||
28 | clocksource_register(&clocksource_mips); | ||
29 | } | ||
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index a06a27d6cfcd..7f6ddcb5d485 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -269,7 +269,7 @@ static void __init bootmem_init(void) | |||
269 | 269 | ||
270 | static void __init bootmem_init(void) | 270 | static void __init bootmem_init(void) |
271 | { | 271 | { |
272 | unsigned long reserved_end; | 272 | unsigned long init_begin, reserved_end; |
273 | unsigned long mapstart = ~0UL; | 273 | unsigned long mapstart = ~0UL; |
274 | unsigned long bootmap_size; | 274 | unsigned long bootmap_size; |
275 | int i; | 275 | int i; |
@@ -342,6 +342,35 @@ static void __init bootmem_init(void) | |||
342 | */ | 342 | */ |
343 | bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart, | 343 | bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart, |
344 | min_low_pfn, max_low_pfn); | 344 | min_low_pfn, max_low_pfn); |
345 | |||
346 | |||
347 | init_begin = PFN_UP(__pa_symbol(&__init_begin)); | ||
348 | for (i = 0; i < boot_mem_map.nr_map; i++) { | ||
349 | unsigned long start, end; | ||
350 | |||
351 | start = PFN_UP(boot_mem_map.map[i].addr); | ||
352 | end = PFN_DOWN(boot_mem_map.map[i].addr | ||
353 | + boot_mem_map.map[i].size); | ||
354 | |||
355 | if (start <= init_begin) | ||
356 | start = init_begin; | ||
357 | if (start >= end) | ||
358 | continue; | ||
359 | |||
360 | #ifndef CONFIG_HIGHMEM | ||
361 | if (end > max_low_pfn) | ||
362 | end = max_low_pfn; | ||
363 | |||
364 | /* | ||
365 | * ... finally, is the area going away? | ||
366 | */ | ||
367 | if (end <= start) | ||
368 | continue; | ||
369 | #endif | ||
370 | |||
371 | add_active_range(0, start, end); | ||
372 | } | ||
373 | |||
345 | /* | 374 | /* |
346 | * Register fully available low RAM pages with the bootmem allocator. | 375 | * Register fully available low RAM pages with the bootmem allocator. |
347 | */ | 376 | */ |
diff --git a/arch/mips/kernel/smp-up.c b/arch/mips/kernel/smp-up.c new file mode 100644 index 000000000000..ead6c30eeb14 --- /dev/null +++ b/arch/mips/kernel/smp-up.c | |||
@@ -0,0 +1,67 @@ | |||
1 | /* | ||
2 | * This file is subject to the terms and conditions of the GNU General Public | ||
3 | * License. See the file "COPYING" in the main directory of this archive | ||
4 | * for more details. | ||
5 | * | ||
6 | * Copyright (C) 2006, 07 by Ralf Baechle (ralf@linux-mips.org) | ||
7 | * | ||
8 | * Symmetric Uniprocessor (TM) Support | ||
9 | */ | ||
10 | #include <linux/kernel.h> | ||
11 | #include <linux/sched.h> | ||
12 | |||
13 | /* | ||
14 | * Send inter-processor interrupt | ||
15 | */ | ||
16 | void up_send_ipi_single(int cpu, unsigned int action) | ||
17 | { | ||
18 | panic(KERN_ERR "%s called", __func__); | ||
19 | } | ||
20 | |||
21 | static inline void up_send_ipi_mask(cpumask_t mask, unsigned int action) | ||
22 | { | ||
23 | panic(KERN_ERR "%s called", __func__); | ||
24 | } | ||
25 | |||
26 | /* | ||
27 | * After we've done initial boot, this function is called to allow the | ||
28 | * board code to clean up state, if needed | ||
29 | */ | ||
30 | void __cpuinit up_init_secondary(void) | ||
31 | { | ||
32 | } | ||
33 | |||
34 | void __cpuinit up_smp_finish(void) | ||
35 | { | ||
36 | } | ||
37 | |||
38 | /* Hook for after all CPUs are online */ | ||
39 | void up_cpus_done(void) | ||
40 | { | ||
41 | } | ||
42 | |||
43 | /* | ||
44 | * Firmware CPU startup hook | ||
45 | */ | ||
46 | void __cpuinit up_boot_secondary(int cpu, struct task_struct *idle) | ||
47 | { | ||
48 | } | ||
49 | |||
50 | void __init up_smp_setup(void) | ||
51 | { | ||
52 | } | ||
53 | |||
54 | void __init up_prepare_cpus(unsigned int max_cpus) | ||
55 | { | ||
56 | } | ||
57 | |||
58 | struct plat_smp_ops up_smp_ops = { | ||
59 | .send_ipi_single = up_send_ipi_single, | ||
60 | .send_ipi_mask = up_send_ipi_mask, | ||
61 | .init_secondary = up_init_secondary, | ||
62 | .smp_finish = up_smp_finish, | ||
63 | .cpus_done = up_cpus_done, | ||
64 | .boot_secondary = up_boot_secondary, | ||
65 | .smp_setup = up_smp_setup, | ||
66 | .prepare_cpus = up_prepare_cpus, | ||
67 | }; | ||
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 3284b9b4ecac..52075426c373 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -50,14 +50,6 @@ int update_persistent_clock(struct timespec now) | |||
50 | return rtc_mips_set_mmss(now.tv_sec); | 50 | return rtc_mips_set_mmss(now.tv_sec); |
51 | } | 51 | } |
52 | 52 | ||
53 | /* | ||
54 | * High precision timer functions for a R4k-compatible timer. | ||
55 | */ | ||
56 | static cycle_t c0_hpt_read(void) | ||
57 | { | ||
58 | return read_c0_count(); | ||
59 | } | ||
60 | |||
61 | int (*mips_timer_state)(void); | 53 | int (*mips_timer_state)(void); |
62 | 54 | ||
63 | int null_perf_irq(void) | 55 | int null_perf_irq(void) |
@@ -84,55 +76,6 @@ EXPORT_SYMBOL(perf_irq); | |||
84 | 76 | ||
85 | unsigned int mips_hpt_frequency; | 77 | unsigned int mips_hpt_frequency; |
86 | 78 | ||
87 | static struct clocksource clocksource_mips = { | ||
88 | .name = "MIPS", | ||
89 | .read = c0_hpt_read, | ||
90 | .mask = CLOCKSOURCE_MASK(32), | ||
91 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | ||
92 | }; | ||
93 | |||
94 | static unsigned int __init calibrate_hpt(void) | ||
95 | { | ||
96 | cycle_t frequency, hpt_start, hpt_end, hpt_count, hz; | ||
97 | |||
98 | const int loops = HZ / 10; | ||
99 | int log_2_loops = 0; | ||
100 | int i; | ||
101 | |||
102 | /* | ||
103 | * We want to calibrate for 0.1s, but to avoid a 64-bit | ||
104 | * division we round the number of loops up to the nearest | ||
105 | * power of 2. | ||
106 | */ | ||
107 | while (loops > 1 << log_2_loops) | ||
108 | log_2_loops++; | ||
109 | i = 1 << log_2_loops; | ||
110 | |||
111 | /* | ||
112 | * Wait for a rising edge of the timer interrupt. | ||
113 | */ | ||
114 | while (mips_timer_state()); | ||
115 | while (!mips_timer_state()); | ||
116 | |||
117 | /* | ||
118 | * Now see how many high precision timer ticks happen | ||
119 | * during the calculated number of periods between timer | ||
120 | * interrupts. | ||
121 | */ | ||
122 | hpt_start = clocksource_mips.read(); | ||
123 | do { | ||
124 | while (mips_timer_state()); | ||
125 | while (!mips_timer_state()); | ||
126 | } while (--i); | ||
127 | hpt_end = clocksource_mips.read(); | ||
128 | |||
129 | hpt_count = (hpt_end - hpt_start) & clocksource_mips.mask; | ||
130 | hz = HZ; | ||
131 | frequency = hpt_count * hz; | ||
132 | |||
133 | return frequency >> log_2_loops; | ||
134 | } | ||
135 | |||
136 | void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) | 79 | void __init clocksource_set_clock(struct clocksource *cs, unsigned int clock) |
137 | { | 80 | { |
138 | u64 temp; | 81 | u64 temp; |
@@ -166,16 +109,6 @@ void __cpuinit clockevent_set_clock(struct clock_event_device *cd, | |||
166 | cd->mult = (u32) temp; | 109 | cd->mult = (u32) temp; |
167 | } | 110 | } |
168 | 111 | ||
169 | static void __init init_mips_clocksource(void) | ||
170 | { | ||
171 | /* Calclate a somewhat reasonable rating value */ | ||
172 | clocksource_mips.rating = 200 + mips_hpt_frequency / 10000000; | ||
173 | |||
174 | clocksource_set_clock(&clocksource_mips, mips_hpt_frequency); | ||
175 | |||
176 | clocksource_register(&clocksource_mips); | ||
177 | } | ||
178 | |||
179 | void __init __weak plat_time_init(void) | 112 | void __init __weak plat_time_init(void) |
180 | { | 113 | { |
181 | } | 114 | } |
@@ -194,21 +127,42 @@ void __init plat_timer_setup(void) | |||
194 | BUG(); | 127 | BUG(); |
195 | } | 128 | } |
196 | 129 | ||
130 | static __init int cpu_has_mfc0_count_bug(void) | ||
131 | { | ||
132 | switch (current_cpu_type()) { | ||
133 | case CPU_R4000PC: | ||
134 | case CPU_R4000SC: | ||
135 | case CPU_R4000MC: | ||
136 | /* | ||
137 | * V3.0 is documented as suffering from the mfc0 from count bug. | ||
138 | * Afaik this is the last version of the R4000. Later versions | ||
139 | * were marketed as R4400. | ||
140 | */ | ||
141 | return 1; | ||
142 | |||
143 | case CPU_R4400PC: | ||
144 | case CPU_R4400SC: | ||
145 | case CPU_R4400MC: | ||
146 | /* | ||
147 | * The published errata for the R4400 upto 3.0 say the CPU | ||
148 | * has the mfc0 from count bug. | ||
149 | */ | ||
150 | if ((current_cpu_data.processor_id & 0xff) <= 0x30) | ||
151 | return 1; | ||
152 | |||
153 | /* | ||
154 | * I don't have erratas for newer R4400 so be paranoid. | ||
155 | */ | ||
156 | return 1; | ||
157 | } | ||
158 | |||
159 | return 0; | ||
160 | } | ||
161 | |||
197 | void __init time_init(void) | 162 | void __init time_init(void) |
198 | { | 163 | { |
199 | plat_time_init(); | 164 | plat_time_init(); |
200 | 165 | ||
201 | if (cpu_has_counter && (mips_hpt_frequency || mips_timer_state)) { | 166 | if (mips_clockevent_init() || !cpu_has_mfc0_count_bug()) |
202 | /* We know counter frequency. Or we can get it. */ | ||
203 | if (!mips_hpt_frequency) | ||
204 | mips_hpt_frequency = calibrate_hpt(); | ||
205 | |||
206 | /* Report the high precision timer rate for a reference. */ | ||
207 | printk("Using %u.%03u MHz high precision timer.\n", | ||
208 | ((mips_hpt_frequency + 500) / 1000) / 1000, | ||
209 | ((mips_hpt_frequency + 500) / 1000) % 1000); | ||
210 | init_mips_clocksource(); | 167 | init_mips_clocksource(); |
211 | } | ||
212 | |||
213 | mips_clockevent_init(); | ||
214 | } | 168 | } |
diff --git a/arch/mips/kernel/vpe.c b/arch/mips/kernel/vpe.c index 38bd33fa2a23..c06eb812a95e 100644 --- a/arch/mips/kernel/vpe.c +++ b/arch/mips/kernel/vpe.c | |||
@@ -470,7 +470,7 @@ static int apply_r_mips_lo16(struct module *me, uint32_t *location, | |||
470 | */ | 470 | */ |
471 | if (v != l->value) { | 471 | if (v != l->value) { |
472 | printk(KERN_DEBUG "VPE loader: " | 472 | printk(KERN_DEBUG "VPE loader: " |
473 | "apply_r_mips_lo16/hi16: " | 473 | "apply_r_mips_lo16/hi16: \t" |
474 | "inconsistent value information\n"); | 474 | "inconsistent value information\n"); |
475 | return -ENOEXEC; | 475 | return -ENOEXEC; |
476 | } | 476 | } |
@@ -629,7 +629,7 @@ static void simplify_symbols(Elf_Shdr * sechdrs, | |||
629 | break; | 629 | break; |
630 | 630 | ||
631 | case SHN_MIPS_SCOMMON: | 631 | case SHN_MIPS_SCOMMON: |
632 | printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON" | 632 | printk(KERN_DEBUG "simplify_symbols: ignoring SHN_MIPS_SCOMMON " |
633 | "symbol <%s> st_shndx %d\n", strtab + sym[i].st_name, | 633 | "symbol <%s> st_shndx %d\n", strtab + sym[i].st_name, |
634 | sym[i].st_shndx); | 634 | sym[i].st_shndx); |
635 | // .sbss section | 635 | // .sbss section |
diff --git a/arch/mips/math-emu/ieee754.c b/arch/mips/math-emu/ieee754.c index 946aee331788..cb1b6822711a 100644 --- a/arch/mips/math-emu/ieee754.c +++ b/arch/mips/math-emu/ieee754.c | |||
@@ -108,6 +108,7 @@ int ieee754si_xcpt(int r, const char *op, ...) | |||
108 | ax.rv.si = r; | 108 | ax.rv.si = r; |
109 | va_start(ax.ap, op); | 109 | va_start(ax.ap, op); |
110 | ieee754_xcpt(&ax); | 110 | ieee754_xcpt(&ax); |
111 | va_end(ax.ap); | ||
111 | return ax.rv.si; | 112 | return ax.rv.si; |
112 | } | 113 | } |
113 | 114 | ||
@@ -122,5 +123,6 @@ s64 ieee754di_xcpt(s64 r, const char *op, ...) | |||
122 | ax.rv.di = r; | 123 | ax.rv.di = r; |
123 | va_start(ax.ap, op); | 124 | va_start(ax.ap, op); |
124 | ieee754_xcpt(&ax); | 125 | ieee754_xcpt(&ax); |
126 | va_end(ax.ap); | ||
125 | return ax.rv.di; | 127 | return ax.rv.di; |
126 | } | 128 | } |
diff --git a/arch/mips/math-emu/ieee754dp.c b/arch/mips/math-emu/ieee754dp.c index 3e214aac4b12..6d2d89f32472 100644 --- a/arch/mips/math-emu/ieee754dp.c +++ b/arch/mips/math-emu/ieee754dp.c | |||
@@ -57,6 +57,7 @@ ieee754dp ieee754dp_xcpt(ieee754dp r, const char *op, ...) | |||
57 | ax.rv.dp = r; | 57 | ax.rv.dp = r; |
58 | va_start(ax.ap, op); | 58 | va_start(ax.ap, op); |
59 | ieee754_xcpt(&ax); | 59 | ieee754_xcpt(&ax); |
60 | va_end(ax.ap); | ||
60 | return ax.rv.dp; | 61 | return ax.rv.dp; |
61 | } | 62 | } |
62 | 63 | ||
@@ -83,6 +84,7 @@ ieee754dp ieee754dp_nanxcpt(ieee754dp r, const char *op, ...) | |||
83 | ax.rv.dp = r; | 84 | ax.rv.dp = r; |
84 | va_start(ax.ap, op); | 85 | va_start(ax.ap, op); |
85 | ieee754_xcpt(&ax); | 86 | ieee754_xcpt(&ax); |
87 | va_end(ax.ap); | ||
86 | return ax.rv.dp; | 88 | return ax.rv.dp; |
87 | } | 89 | } |
88 | 90 | ||
diff --git a/arch/mips/math-emu/ieee754sp.c b/arch/mips/math-emu/ieee754sp.c index adda851cd04f..463534045ab6 100644 --- a/arch/mips/math-emu/ieee754sp.c +++ b/arch/mips/math-emu/ieee754sp.c | |||
@@ -58,6 +58,7 @@ ieee754sp ieee754sp_xcpt(ieee754sp r, const char *op, ...) | |||
58 | ax.rv.sp = r; | 58 | ax.rv.sp = r; |
59 | va_start(ax.ap, op); | 59 | va_start(ax.ap, op); |
60 | ieee754_xcpt(&ax); | 60 | ieee754_xcpt(&ax); |
61 | va_end(ax.ap); | ||
61 | return ax.rv.sp; | 62 | return ax.rv.sp; |
62 | } | 63 | } |
63 | 64 | ||
@@ -84,6 +85,7 @@ ieee754sp ieee754sp_nanxcpt(ieee754sp r, const char *op, ...) | |||
84 | ax.rv.sp = r; | 85 | ax.rv.sp = r; |
85 | va_start(ax.ap, op); | 86 | va_start(ax.ap, op); |
86 | ieee754_xcpt(&ax); | 87 | ieee754_xcpt(&ax); |
88 | va_end(ax.ap); | ||
87 | return ax.rv.sp; | 89 | return ax.rv.sp; |
88 | } | 90 | } |
89 | 91 | ||
diff --git a/arch/mips/mipssim/sim_time.c b/arch/mips/mipssim/sim_time.c index bfaafa38846f..e39bbe989da3 100644 --- a/arch/mips/mipssim/sim_time.c +++ b/arch/mips/mipssim/sim_time.c | |||
@@ -101,9 +101,7 @@ unsigned __init get_c0_compare_int(void) | |||
101 | 101 | ||
102 | void __init plat_time_init(void) | 102 | void __init plat_time_init(void) |
103 | { | 103 | { |
104 | unsigned int est_freq, flags; | 104 | unsigned int est_freq; |
105 | |||
106 | local_irq_save(flags); | ||
107 | 105 | ||
108 | /* Set Data mode - binary. */ | 106 | /* Set Data mode - binary. */ |
109 | CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); | 107 | CMOS_WRITE(CMOS_READ(RTC_CONTROL) | RTC_DM_BINARY, RTC_CONTROL); |
@@ -114,6 +112,4 @@ void __init plat_time_init(void) | |||
114 | (est_freq % 1000000) * 100 / 1000000); | 112 | (est_freq % 1000000) * 100 / 1000000); |
115 | 113 | ||
116 | cpu_khz = est_freq / 1000; | 114 | cpu_khz = est_freq / 1000; |
117 | |||
118 | local_irq_restore(flags); | ||
119 | } | 115 | } |
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 33519ce49540..ae76795685cc 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -40,16 +40,38 @@ static inline int cpu_is_noncoherent_r10000(struct device *dev) | |||
40 | current_cpu_type() == CPU_R12000); | 40 | current_cpu_type() == CPU_R12000); |
41 | } | 41 | } |
42 | 42 | ||
43 | static gfp_t massage_gfp_flags(const struct device *dev, gfp_t gfp) | ||
44 | { | ||
45 | /* ignore region specifiers */ | ||
46 | gfp &= ~(__GFP_DMA | __GFP_DMA32 | __GFP_HIGHMEM); | ||
47 | |||
48 | #ifdef CONFIG_ZONE_DMA32 | ||
49 | if (dev == NULL) | ||
50 | gfp |= __GFP_DMA; | ||
51 | else if (dev->coherent_dma_mask < DMA_BIT_MASK(24)) | ||
52 | gfp |= __GFP_DMA; | ||
53 | else | ||
54 | #endif | ||
55 | #ifdef CONFIG_ZONE_DMA32 | ||
56 | if (dev->coherent_dma_mask < DMA_BIT_MASK(32)) | ||
57 | gfp |= __GFP_DMA32; | ||
58 | else | ||
59 | #endif | ||
60 | ; | ||
61 | |||
62 | /* Don't invoke OOM killer */ | ||
63 | gfp |= __GFP_NORETRY; | ||
64 | |||
65 | return gfp; | ||
66 | } | ||
67 | |||
43 | void *dma_alloc_noncoherent(struct device *dev, size_t size, | 68 | void *dma_alloc_noncoherent(struct device *dev, size_t size, |
44 | dma_addr_t * dma_handle, gfp_t gfp) | 69 | dma_addr_t * dma_handle, gfp_t gfp) |
45 | { | 70 | { |
46 | void *ret; | 71 | void *ret; |
47 | 72 | ||
48 | /* ignore region specifiers */ | 73 | gfp = massage_gfp_flags(dev, gfp); |
49 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); | ||
50 | 74 | ||
51 | if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) | ||
52 | gfp |= GFP_DMA; | ||
53 | ret = (void *) __get_free_pages(gfp, get_order(size)); | 75 | ret = (void *) __get_free_pages(gfp, get_order(size)); |
54 | 76 | ||
55 | if (ret != NULL) { | 77 | if (ret != NULL) { |
@@ -67,11 +89,8 @@ void *dma_alloc_coherent(struct device *dev, size_t size, | |||
67 | { | 89 | { |
68 | void *ret; | 90 | void *ret; |
69 | 91 | ||
70 | /* ignore region specifiers */ | 92 | gfp = massage_gfp_flags(dev, gfp); |
71 | gfp &= ~(__GFP_DMA | __GFP_HIGHMEM); | ||
72 | 93 | ||
73 | if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff)) | ||
74 | gfp |= GFP_DMA; | ||
75 | ret = (void *) __get_free_pages(gfp, get_order(size)); | 94 | ret = (void *) __get_free_pages(gfp, get_order(size)); |
76 | 95 | ||
77 | if (ret) { | 96 | if (ret) { |
@@ -343,7 +362,7 @@ int dma_supported(struct device *dev, u64 mask) | |||
343 | * so we can't guarantee allocations that must be | 362 | * so we can't guarantee allocations that must be |
344 | * within a tighter range than GFP_DMA.. | 363 | * within a tighter range than GFP_DMA.. |
345 | */ | 364 | */ |
346 | if (mask < 0x00ffffff) | 365 | if (mask < DMA_BIT_MASK(24)) |
347 | return 0; | 366 | return 0; |
348 | 367 | ||
349 | return 1; | 368 | return 1; |
diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c index ec3b9e9f30f4..480dec04f552 100644 --- a/arch/mips/mm/init.c +++ b/arch/mips/mm/init.c | |||
@@ -347,11 +347,8 @@ static int __init page_is_ram(unsigned long pagenr) | |||
347 | 347 | ||
348 | void __init paging_init(void) | 348 | void __init paging_init(void) |
349 | { | 349 | { |
350 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | 350 | unsigned long max_zone_pfns[MAX_NR_ZONES]; |
351 | #ifndef CONFIG_FLATMEM | 351 | unsigned long lastpfn; |
352 | unsigned long zholes_size[MAX_NR_ZONES] = { 0, }; | ||
353 | unsigned long i, j, pfn; | ||
354 | #endif | ||
355 | 352 | ||
356 | pagetable_init(); | 353 | pagetable_init(); |
357 | 354 | ||
@@ -361,35 +358,27 @@ void __init paging_init(void) | |||
361 | kmap_coherent_init(); | 358 | kmap_coherent_init(); |
362 | 359 | ||
363 | #ifdef CONFIG_ZONE_DMA | 360 | #ifdef CONFIG_ZONE_DMA |
364 | if (min_low_pfn < MAX_DMA_PFN && MAX_DMA_PFN <= max_low_pfn) { | 361 | max_zone_pfns[ZONE_DMA] = MAX_DMA_PFN; |
365 | zones_size[ZONE_DMA] = MAX_DMA_PFN - min_low_pfn; | ||
366 | zones_size[ZONE_NORMAL] = max_low_pfn - MAX_DMA_PFN; | ||
367 | } else if (max_low_pfn < MAX_DMA_PFN) | ||
368 | zones_size[ZONE_DMA] = max_low_pfn - min_low_pfn; | ||
369 | else | ||
370 | #endif | 362 | #endif |
371 | zones_size[ZONE_NORMAL] = max_low_pfn - min_low_pfn; | 363 | #ifdef CONFIG_ZONE_DMA32 |
372 | 364 | max_zone_pfns[ZONE_DMA32] = MAX_DMA32_PFN; | |
365 | #endif | ||
366 | max_zone_pfns[ZONE_NORMAL] = max_low_pfn; | ||
367 | lastpfn = max_low_pfn; | ||
373 | #ifdef CONFIG_HIGHMEM | 368 | #ifdef CONFIG_HIGHMEM |
374 | zones_size[ZONE_HIGHMEM] = highend_pfn - highstart_pfn; | 369 | max_zone_pfns[ZONE_HIGHMEM] = highend_pfn; |
370 | lastpfn = highend_pfn; | ||
375 | 371 | ||
376 | if (cpu_has_dc_aliases && zones_size[ZONE_HIGHMEM]) { | 372 | if (cpu_has_dc_aliases && max_low_pfn != highend_pfn) { |
377 | printk(KERN_WARNING "This processor doesn't support highmem." | 373 | printk(KERN_WARNING "This processor doesn't support highmem." |
378 | " %ldk highmem ignored\n", zones_size[ZONE_HIGHMEM]); | 374 | " %ldk highmem ignored\n", |
379 | zones_size[ZONE_HIGHMEM] = 0; | 375 | (highend_pfn - max_low_pfn) << (PAGE_SHIFT - 10)); |
376 | max_zone_pfns[ZONE_HIGHMEM] = max_low_pfn; | ||
377 | lastpfn = max_low_pfn; | ||
380 | } | 378 | } |
381 | #endif | 379 | #endif |
382 | 380 | ||
383 | #ifdef CONFIG_FLATMEM | 381 | free_area_init_nodes(max_zone_pfns); |
384 | free_area_init(zones_size); | ||
385 | #else | ||
386 | pfn = min_low_pfn; | ||
387 | for (i = 0; i < MAX_NR_ZONES; i++) | ||
388 | for (j = 0; j < zones_size[i]; j++, pfn++) | ||
389 | if (!page_is_ram(pfn)) | ||
390 | zholes_size[i]++; | ||
391 | free_area_init_node(0, NODE_DATA(0), zones_size, 0, zholes_size); | ||
392 | #endif | ||
393 | } | 382 | } |
394 | 383 | ||
395 | static struct kcore_list kcore_mem, kcore_vmalloc; | 384 | static struct kcore_list kcore_mem, kcore_vmalloc; |
diff --git a/arch/mips/pmc-sierra/Kconfig b/arch/mips/pmc-sierra/Kconfig index 6b293ce0935f..90261b83db04 100644 --- a/arch/mips/pmc-sierra/Kconfig +++ b/arch/mips/pmc-sierra/Kconfig | |||
@@ -5,12 +5,14 @@ choice | |||
5 | config PMC_MSP4200_EVAL | 5 | config PMC_MSP4200_EVAL |
6 | bool "PMC-Sierra MSP4200 Eval Board" | 6 | bool "PMC-Sierra MSP4200 Eval Board" |
7 | select CEVT_R4K | 7 | select CEVT_R4K |
8 | select CSRC_R4K | ||
8 | select IRQ_MSP_SLP | 9 | select IRQ_MSP_SLP |
9 | select HW_HAS_PCI | 10 | select HW_HAS_PCI |
10 | 11 | ||
11 | config PMC_MSP4200_GW | 12 | config PMC_MSP4200_GW |
12 | bool "PMC-Sierra MSP4200 VoIP Gateway" | 13 | bool "PMC-Sierra MSP4200 VoIP Gateway" |
13 | select CEVT_R4K | 14 | select CEVT_R4K |
15 | select CSRC_R4K | ||
14 | select IRQ_MSP_SLP | 16 | select IRQ_MSP_SLP |
15 | select HW_HAS_PCI | 17 | select HW_HAS_PCI |
16 | 18 | ||
diff --git a/arch/mips/sgi-ip22/ip22-eisa.c b/arch/mips/sgi-ip22/ip22-eisa.c index 26854fb11e7c..1617241d2737 100644 --- a/arch/mips/sgi-ip22/ip22-eisa.c +++ b/arch/mips/sgi-ip22/ip22-eisa.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/sgi/ioc.h> | 36 | #include <asm/sgi/ioc.h> |
37 | #include <asm/sgi/mc.h> | 37 | #include <asm/sgi/mc.h> |
38 | #include <asm/sgi/ip22.h> | 38 | #include <asm/sgi/ip22.h> |
39 | #include <asm/i8259.h> | ||
39 | 40 | ||
40 | /* I2 has four EISA slots. */ | 41 | /* I2 has four EISA slots. */ |
41 | #define IP22_EISA_MAX_SLOTS 4 | 42 | #define IP22_EISA_MAX_SLOTS 4 |
@@ -93,126 +94,11 @@ static irqreturn_t ip22_eisa_intr(int irq, void *dev_id) | |||
93 | return IRQ_NONE; | 94 | return IRQ_NONE; |
94 | } | 95 | } |
95 | 96 | ||
96 | static void enable_eisa1_irq(unsigned int irq) | ||
97 | { | ||
98 | u8 mask; | ||
99 | |||
100 | mask = inb(EISA_INT1_MASK); | ||
101 | mask &= ~((u8) (1 << irq)); | ||
102 | outb(mask, EISA_INT1_MASK); | ||
103 | } | ||
104 | |||
105 | static unsigned int startup_eisa1_irq(unsigned int irq) | ||
106 | { | ||
107 | u8 edge; | ||
108 | |||
109 | /* Only use edge interrupts for EISA */ | ||
110 | |||
111 | edge = inb(EISA_INT1_EDGE_LEVEL); | ||
112 | edge &= ~((u8) (1 << irq)); | ||
113 | outb(edge, EISA_INT1_EDGE_LEVEL); | ||
114 | |||
115 | enable_eisa1_irq(irq); | ||
116 | return 0; | ||
117 | } | ||
118 | |||
119 | static void disable_eisa1_irq(unsigned int irq) | ||
120 | { | ||
121 | u8 mask; | ||
122 | |||
123 | mask = inb(EISA_INT1_MASK); | ||
124 | mask |= ((u8) (1 << irq)); | ||
125 | outb(mask, EISA_INT1_MASK); | ||
126 | } | ||
127 | |||
128 | static void mask_and_ack_eisa1_irq(unsigned int irq) | ||
129 | { | ||
130 | disable_eisa1_irq(irq); | ||
131 | |||
132 | outb(0x20, EISA_INT1_CTRL); | ||
133 | } | ||
134 | |||
135 | static void end_eisa1_irq(unsigned int irq) | ||
136 | { | ||
137 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | ||
138 | enable_eisa1_irq(irq); | ||
139 | } | ||
140 | |||
141 | static struct irq_chip ip22_eisa1_irq_type = { | ||
142 | .name = "IP22 EISA", | ||
143 | .startup = startup_eisa1_irq, | ||
144 | .ack = mask_and_ack_eisa1_irq, | ||
145 | .mask = disable_eisa1_irq, | ||
146 | .mask_ack = mask_and_ack_eisa1_irq, | ||
147 | .unmask = enable_eisa1_irq, | ||
148 | .end = end_eisa1_irq, | ||
149 | }; | ||
150 | |||
151 | static void enable_eisa2_irq(unsigned int irq) | ||
152 | { | ||
153 | u8 mask; | ||
154 | |||
155 | mask = inb(EISA_INT2_MASK); | ||
156 | mask &= ~((u8) (1 << (irq - 8))); | ||
157 | outb(mask, EISA_INT2_MASK); | ||
158 | } | ||
159 | |||
160 | static unsigned int startup_eisa2_irq(unsigned int irq) | ||
161 | { | ||
162 | u8 edge; | ||
163 | |||
164 | /* Only use edge interrupts for EISA */ | ||
165 | |||
166 | edge = inb(EISA_INT2_EDGE_LEVEL); | ||
167 | edge &= ~((u8) (1 << (irq - 8))); | ||
168 | outb(edge, EISA_INT2_EDGE_LEVEL); | ||
169 | |||
170 | enable_eisa2_irq(irq); | ||
171 | return 0; | ||
172 | } | ||
173 | |||
174 | static void disable_eisa2_irq(unsigned int irq) | ||
175 | { | ||
176 | u8 mask; | ||
177 | |||
178 | mask = inb(EISA_INT2_MASK); | ||
179 | mask |= ((u8) (1 << (irq - 8))); | ||
180 | outb(mask, EISA_INT2_MASK); | ||
181 | } | ||
182 | |||
183 | static void mask_and_ack_eisa2_irq(unsigned int irq) | ||
184 | { | ||
185 | disable_eisa2_irq(irq); | ||
186 | |||
187 | outb(0x20, EISA_INT2_CTRL); | ||
188 | } | ||
189 | |||
190 | static void end_eisa2_irq(unsigned int irq) | ||
191 | { | ||
192 | if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) | ||
193 | enable_eisa2_irq(irq); | ||
194 | } | ||
195 | |||
196 | static struct irq_chip ip22_eisa2_irq_type = { | ||
197 | .name = "IP22 EISA", | ||
198 | .startup = startup_eisa2_irq, | ||
199 | .ack = mask_and_ack_eisa2_irq, | ||
200 | .mask = disable_eisa2_irq, | ||
201 | .mask_ack = mask_and_ack_eisa2_irq, | ||
202 | .unmask = enable_eisa2_irq, | ||
203 | .end = end_eisa2_irq, | ||
204 | }; | ||
205 | |||
206 | static struct irqaction eisa_action = { | 97 | static struct irqaction eisa_action = { |
207 | .handler = ip22_eisa_intr, | 98 | .handler = ip22_eisa_intr, |
208 | .name = "EISA", | 99 | .name = "EISA", |
209 | }; | 100 | }; |
210 | 101 | ||
211 | static struct irqaction cascade_action = { | ||
212 | .handler = no_action, | ||
213 | .name = "EISA cascade", | ||
214 | }; | ||
215 | |||
216 | int __init ip22_eisa_init(void) | 102 | int __init ip22_eisa_init(void) |
217 | { | 103 | { |
218 | int i, c; | 104 | int i, c; |
@@ -248,29 +134,13 @@ int __init ip22_eisa_init(void) | |||
248 | outb(1, EISA_EXT_NMI_RESET_CTRL); | 134 | outb(1, EISA_EXT_NMI_RESET_CTRL); |
249 | udelay(50); /* Wait long enough for the dust to settle */ | 135 | udelay(50); /* Wait long enough for the dust to settle */ |
250 | outb(0, EISA_EXT_NMI_RESET_CTRL); | 136 | outb(0, EISA_EXT_NMI_RESET_CTRL); |
251 | outb(0x11, EISA_INT1_CTRL); | ||
252 | outb(0x11, EISA_INT2_CTRL); | ||
253 | outb(0, EISA_INT1_MASK); | ||
254 | outb(8, EISA_INT2_MASK); | ||
255 | outb(4, EISA_INT1_MASK); | ||
256 | outb(2, EISA_INT2_MASK); | ||
257 | outb(1, EISA_INT1_MASK); | ||
258 | outb(1, EISA_INT2_MASK); | ||
259 | outb(0xfb, EISA_INT1_MASK); | ||
260 | outb(0xff, EISA_INT2_MASK); | ||
261 | outb(0, EISA_DMA2_WRITE_SINGLE); | 137 | outb(0, EISA_DMA2_WRITE_SINGLE); |
262 | 138 | ||
263 | for (i = SGINT_EISA; i < (SGINT_EISA + EISA_MAX_IRQ); i++) { | 139 | init_i8259_irqs(); |
264 | if (i < (SGINT_EISA + 8)) | ||
265 | set_irq_chip(i, &ip22_eisa1_irq_type); | ||
266 | else | ||
267 | set_irq_chip(i, &ip22_eisa2_irq_type); | ||
268 | } | ||
269 | 140 | ||
270 | /* Cannot use request_irq because of kmalloc not being ready at such | 141 | /* Cannot use request_irq because of kmalloc not being ready at such |
271 | * an early stage. Yes, I've been bitten... */ | 142 | * an early stage. Yes, I've been bitten... */ |
272 | setup_irq(SGI_EISA_IRQ, &eisa_action); | 143 | setup_irq(SGI_EISA_IRQ, &eisa_action); |
273 | setup_irq(SGINT_EISA + 2, &cascade_action); | ||
274 | 144 | ||
275 | EISA_bus = 1; | 145 | EISA_bus = 1; |
276 | return 0; | 146 | return 0; |
diff --git a/arch/mips/sgi-ip22/ip22-nvram.c b/arch/mips/sgi-ip22/ip22-nvram.c index e19d60d5fcc1..0177566475d4 100644 --- a/arch/mips/sgi-ip22/ip22-nvram.c +++ b/arch/mips/sgi-ip22/ip22-nvram.c | |||
@@ -32,19 +32,19 @@ | |||
32 | for (x=0; x<100000; x++) __asm__ __volatile__(""); }) | 32 | for (x=0; x<100000; x++) __asm__ __volatile__(""); }) |
33 | 33 | ||
34 | #define eeprom_cs_on(ptr) ({ \ | 34 | #define eeprom_cs_on(ptr) ({ \ |
35 | *ptr &= ~EEPROM_DATO; \ | 35 | __raw_writel(__raw_readl(ptr) & ~EEPROM_DATO, ptr); \ |
36 | *ptr &= ~EEPROM_ECLK; \ | 36 | __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ |
37 | *ptr &= ~EEPROM_EPROT; \ | 37 | __raw_writel(__raw_readl(ptr) & ~EEPROM_EPROT, ptr); \ |
38 | delay(); \ | 38 | delay(); \ |
39 | *ptr |= EEPROM_CSEL; \ | 39 | __raw_writel(__raw_readl(ptr) | EEPROM_CSEL, ptr); \ |
40 | *ptr |= EEPROM_ECLK; }) | 40 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) |
41 | 41 | ||
42 | 42 | ||
43 | #define eeprom_cs_off(ptr) ({ \ | 43 | #define eeprom_cs_off(ptr) ({ \ |
44 | *ptr &= ~EEPROM_ECLK; \ | 44 | __raw_writel(__raw_readl(ptr) & ~EEPROM_ECLK, ptr); \ |
45 | *ptr &= ~EEPROM_CSEL; \ | 45 | __raw_writel(__raw_readl(ptr) & ~EEPROM_CSEL, ptr); \ |
46 | *ptr |= EEPROM_EPROT; \ | 46 | __raw_writel(__raw_readl(ptr) | EEPROM_EPROT, ptr); \ |
47 | *ptr |= EEPROM_ECLK; }) | 47 | __raw_writel(__raw_readl(ptr) | EEPROM_ECLK, ptr); }) |
48 | 48 | ||
49 | #define BITS_IN_COMMAND 11 | 49 | #define BITS_IN_COMMAND 11 |
50 | /* | 50 | /* |
@@ -60,15 +60,17 @@ static inline void eeprom_cmd(unsigned int *ctrl, unsigned cmd, unsigned reg) | |||
60 | ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND)); | 60 | ser_cmd = cmd | (reg << (16 - BITS_IN_COMMAND)); |
61 | for (i = 0; i < BITS_IN_COMMAND; i++) { | 61 | for (i = 0; i < BITS_IN_COMMAND; i++) { |
62 | if (ser_cmd & (1<<15)) /* if high order bit set */ | 62 | if (ser_cmd & (1<<15)) /* if high order bit set */ |
63 | writel(readl(ctrl) | EEPROM_DATO, ctrl); | 63 | __raw_writel(__raw_readl(ctrl) | EEPROM_DATO, ctrl); |
64 | else | 64 | else |
65 | writel(readl(ctrl) & ~EEPROM_DATO, ctrl); | 65 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl); |
66 | writel(readl(ctrl) & ~EEPROM_ECLK, ctrl); | 66 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl); |
67 | writel(readl(ctrl) | EEPROM_ECLK, ctrl); | 67 | delay(); |
68 | __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl); | ||
69 | delay(); | ||
68 | ser_cmd <<= 1; | 70 | ser_cmd <<= 1; |
69 | } | 71 | } |
70 | /* see data sheet timing diagram */ | 72 | /* see data sheet timing diagram */ |
71 | writel(readl(ctrl) & ~EEPROM_DATO, ctrl); | 73 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_DATO, ctrl); |
72 | } | 74 | } |
73 | 75 | ||
74 | unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) | 76 | unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) |
@@ -76,18 +78,18 @@ unsigned short ip22_eeprom_read(unsigned int *ctrl, int reg) | |||
76 | unsigned short res = 0; | 78 | unsigned short res = 0; |
77 | int i; | 79 | int i; |
78 | 80 | ||
79 | writel(readl(ctrl) & ~EEPROM_EPROT, ctrl); | 81 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_EPROT, ctrl); |
80 | eeprom_cs_on(ctrl); | 82 | eeprom_cs_on(ctrl); |
81 | eeprom_cmd(ctrl, EEPROM_READ, reg); | 83 | eeprom_cmd(ctrl, EEPROM_READ, reg); |
82 | 84 | ||
83 | /* clock the data ouf of serial mem */ | 85 | /* clock the data ouf of serial mem */ |
84 | for (i = 0; i < 16; i++) { | 86 | for (i = 0; i < 16; i++) { |
85 | writel(readl(ctrl) & ~EEPROM_ECLK, ctrl); | 87 | __raw_writel(__raw_readl(ctrl) & ~EEPROM_ECLK, ctrl); |
86 | delay(); | 88 | delay(); |
87 | writel(readl(ctrl) | EEPROM_ECLK, ctrl); | 89 | __raw_writel(__raw_readl(ctrl) | EEPROM_ECLK, ctrl); |
88 | delay(); | 90 | delay(); |
89 | res <<= 1; | 91 | res <<= 1; |
90 | if (readl(ctrl) & EEPROM_DATI) | 92 | if (__raw_readl(ctrl) & EEPROM_DATI) |
91 | res |= 1; | 93 | res |= 1; |
92 | } | 94 | } |
93 | 95 | ||
diff --git a/arch/mips/sgi-ip32/ip32-irq.c b/arch/mips/sgi-ip32/ip32-irq.c index aab17ddd2f30..cab7cc22ab67 100644 --- a/arch/mips/sgi-ip32/ip32-irq.c +++ b/arch/mips/sgi-ip32/ip32-irq.c | |||
@@ -209,18 +209,18 @@ static unsigned long macepci_mask; | |||
209 | 209 | ||
210 | static void enable_macepci_irq(unsigned int irq) | 210 | static void enable_macepci_irq(unsigned int irq) |
211 | { | 211 | { |
212 | macepci_mask |= MACEPCI_CONTROL_INT(irq - 9); | 212 | macepci_mask |= MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ); |
213 | mace->pci.control = macepci_mask; | 213 | mace->pci.control = macepci_mask; |
214 | crime_mask |= 1 << (irq - 1); | 214 | crime_mask |= 1 << (irq - CRIME_IRQ_BASE); |
215 | crime->imask = crime_mask; | 215 | crime->imask = crime_mask; |
216 | } | 216 | } |
217 | 217 | ||
218 | static void disable_macepci_irq(unsigned int irq) | 218 | static void disable_macepci_irq(unsigned int irq) |
219 | { | 219 | { |
220 | crime_mask &= ~(1 << (irq - 1)); | 220 | crime_mask &= ~(1 << (irq - CRIME_IRQ_BASE)); |
221 | crime->imask = crime_mask; | 221 | crime->imask = crime_mask; |
222 | flush_crime_bus(); | 222 | flush_crime_bus(); |
223 | macepci_mask &= ~MACEPCI_CONTROL_INT(irq - 9); | 223 | macepci_mask &= ~MACEPCI_CONTROL_INT(irq - MACEPCI_SCSI0_IRQ); |
224 | mace->pci.control = macepci_mask; | 224 | mace->pci.control = macepci_mask; |
225 | flush_mace_bus(); | 225 | flush_mace_bus(); |
226 | } | 226 | } |
@@ -299,7 +299,7 @@ static void enable_maceisa_irq(unsigned int irq) | |||
299 | pr_debug("crime_int %08x enabled\n", crime_int); | 299 | pr_debug("crime_int %08x enabled\n", crime_int); |
300 | crime_mask |= crime_int; | 300 | crime_mask |= crime_int; |
301 | crime->imask = crime_mask; | 301 | crime->imask = crime_mask; |
302 | maceisa_mask |= 1 << (irq - 33); | 302 | maceisa_mask |= 1 << (irq - MACEISA_AUDIO_SW_IRQ); |
303 | mace->perif.ctrl.imask = maceisa_mask; | 303 | mace->perif.ctrl.imask = maceisa_mask; |
304 | } | 304 | } |
305 | 305 | ||
@@ -307,7 +307,7 @@ static void disable_maceisa_irq(unsigned int irq) | |||
307 | { | 307 | { |
308 | unsigned int crime_int = 0; | 308 | unsigned int crime_int = 0; |
309 | 309 | ||
310 | maceisa_mask &= ~(1 << (irq - 33)); | 310 | maceisa_mask &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ)); |
311 | if (!(maceisa_mask & MACEISA_AUDIO_INT)) | 311 | if (!(maceisa_mask & MACEISA_AUDIO_INT)) |
312 | crime_int |= MACE_AUDIO_INT; | 312 | crime_int |= MACE_AUDIO_INT; |
313 | if (!(maceisa_mask & MACEISA_MISC_INT)) | 313 | if (!(maceisa_mask & MACEISA_MISC_INT)) |
@@ -331,7 +331,7 @@ static void mask_and_ack_maceisa_irq(unsigned int irq) | |||
331 | case MACEISA_SERIAL2_TDMAPR_IRQ: | 331 | case MACEISA_SERIAL2_TDMAPR_IRQ: |
332 | /* edge triggered */ | 332 | /* edge triggered */ |
333 | mace_int = mace->perif.ctrl.istat; | 333 | mace_int = mace->perif.ctrl.istat; |
334 | mace_int &= ~(1 << (irq - 33)); | 334 | mace_int &= ~(1 << (irq - MACEISA_AUDIO_SW_IRQ)); |
335 | mace->perif.ctrl.istat = mace_int; | 335 | mace->perif.ctrl.istat = mace_int; |
336 | break; | 336 | break; |
337 | } | 337 | } |
@@ -359,13 +359,17 @@ static struct irq_chip ip32_maceisa_interrupt = { | |||
359 | 359 | ||
360 | static void enable_mace_irq(unsigned int irq) | 360 | static void enable_mace_irq(unsigned int irq) |
361 | { | 361 | { |
362 | crime_mask |= 1 << (irq - 1); | 362 | unsigned int bit = irq - CRIME_IRQ_BASE; |
363 | |||
364 | crime_mask |= (1 << bit); | ||
363 | crime->imask = crime_mask; | 365 | crime->imask = crime_mask; |
364 | } | 366 | } |
365 | 367 | ||
366 | static void disable_mace_irq(unsigned int irq) | 368 | static void disable_mace_irq(unsigned int irq) |
367 | { | 369 | { |
368 | crime_mask &= ~(1 << (irq - 1)); | 370 | unsigned int bit = irq - CRIME_IRQ_BASE; |
371 | |||
372 | crime_mask &= ~(1 << bit); | ||
369 | crime->imask = crime_mask; | 373 | crime->imask = crime_mask; |
370 | flush_crime_bus(); | 374 | flush_crime_bus(); |
371 | } | 375 | } |
@@ -489,7 +493,7 @@ void __init arch_init_irq(void) | |||
489 | mace->perif.ctrl.imask = 0; | 493 | mace->perif.ctrl.imask = 0; |
490 | 494 | ||
491 | mips_cpu_irq_init(); | 495 | mips_cpu_irq_init(); |
492 | for (irq = MIPS_CPU_IRQ_BASE + 8; irq <= IP32_IRQ_MAX; irq++) { | 496 | for (irq = CRIME_IRQ_BASE; irq <= IP32_IRQ_MAX; irq++) { |
493 | switch (irq) { | 497 | switch (irq) { |
494 | case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ: | 498 | case MACE_VID_IN1_IRQ ... MACE_PCI_BRIDGE_IRQ: |
495 | set_irq_chip(irq, &ip32_mace_interrupt); | 499 | set_irq_chip(irq, &ip32_mace_interrupt); |
diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index eeb089f20c0d..559acc09c819 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig | |||
@@ -6,6 +6,7 @@ choice | |||
6 | config CASIO_E55 | 6 | config CASIO_E55 |
7 | bool "CASIO CASSIOPEIA E-10/15/55/65" | 7 | bool "CASIO CASSIOPEIA E-10/15/55/65" |
8 | select CEVT_R4K | 8 | select CEVT_R4K |
9 | select CSRC_R4K | ||
9 | select DMA_NONCOHERENT | 10 | select DMA_NONCOHERENT |
10 | select IRQ_CPU | 11 | select IRQ_CPU |
11 | select ISA | 12 | select ISA |
@@ -15,6 +16,7 @@ config CASIO_E55 | |||
15 | config IBM_WORKPAD | 16 | config IBM_WORKPAD |
16 | bool "IBM WorkPad z50" | 17 | bool "IBM WorkPad z50" |
17 | select CEVT_R4K | 18 | select CEVT_R4K |
19 | select CSRC_R4K | ||
18 | select DMA_NONCOHERENT | 20 | select DMA_NONCOHERENT |
19 | select IRQ_CPU | 21 | select IRQ_CPU |
20 | select ISA | 22 | select ISA |
@@ -24,6 +26,7 @@ config IBM_WORKPAD | |||
24 | config NEC_CMBVR4133 | 26 | config NEC_CMBVR4133 |
25 | bool "NEC CMB-VR4133" | 27 | bool "NEC CMB-VR4133" |
26 | select CEVT_R4K | 28 | select CEVT_R4K |
29 | select CSRC_R4K | ||
27 | select DMA_NONCOHERENT | 30 | select DMA_NONCOHERENT |
28 | select IRQ_CPU | 31 | select IRQ_CPU |
29 | select HW_HAS_PCI | 32 | select HW_HAS_PCI |
@@ -33,6 +36,7 @@ config NEC_CMBVR4133 | |||
33 | config TANBAC_TB022X | 36 | config TANBAC_TB022X |
34 | bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM" | 37 | bool "TANBAC VR4131 multichip module and TANBAC VR4131DIMM" |
35 | select CEVT_R4K | 38 | select CEVT_R4K |
39 | select CSRC_R4K | ||
36 | select DMA_NONCOHERENT | 40 | select DMA_NONCOHERENT |
37 | select IRQ_CPU | 41 | select IRQ_CPU |
38 | select HW_HAS_PCI | 42 | select HW_HAS_PCI |
@@ -48,6 +52,7 @@ config TANBAC_TB022X | |||
48 | config VICTOR_MPC30X | 52 | config VICTOR_MPC30X |
49 | bool "Victor MP-C303/304" | 53 | bool "Victor MP-C303/304" |
50 | select CEVT_R4K | 54 | select CEVT_R4K |
55 | select CSRC_R4K | ||
51 | select DMA_NONCOHERENT | 56 | select DMA_NONCOHERENT |
52 | select IRQ_CPU | 57 | select IRQ_CPU |
53 | select HW_HAS_PCI | 58 | select HW_HAS_PCI |
@@ -58,6 +63,7 @@ config VICTOR_MPC30X | |||
58 | config ZAO_CAPCELLA | 63 | config ZAO_CAPCELLA |
59 | bool "ZAO Networks Capcella" | 64 | bool "ZAO Networks Capcella" |
60 | select CEVT_R4K | 65 | select CEVT_R4K |
66 | select CSRC_R4K | ||
61 | select DMA_NONCOHERENT | 67 | select DMA_NONCOHERENT |
62 | select IRQ_CPU | 68 | select IRQ_CPU |
63 | select HW_HAS_PCI | 69 | select HW_HAS_PCI |
diff --git a/arch/powerpc/boot/dts/mpc832x_mds.dts b/arch/powerpc/boot/dts/mpc832x_mds.dts index fcd333c391ec..c64f3037a13b 100644 --- a/arch/powerpc/boot/dts/mpc832x_mds.dts +++ b/arch/powerpc/boot/dts/mpc832x_mds.dts | |||
@@ -57,12 +57,19 @@ | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | i2c@3000 { | 59 | i2c@3000 { |
60 | #address-cells = <1>; | ||
61 | #size-cells = <0>; | ||
60 | device_type = "i2c"; | 62 | device_type = "i2c"; |
61 | compatible = "fsl-i2c"; | 63 | compatible = "fsl-i2c"; |
62 | reg = <3000 100>; | 64 | reg = <3000 100>; |
63 | interrupts = <e 8>; | 65 | interrupts = <e 8>; |
64 | interrupt-parent = < &ipic >; | 66 | interrupt-parent = < &ipic >; |
65 | dfsrr; | 67 | dfsrr; |
68 | |||
69 | rtc@68 { | ||
70 | compatible = "dallas,ds1374"; | ||
71 | reg = <68>; | ||
72 | }; | ||
66 | }; | 73 | }; |
67 | 74 | ||
68 | serial@4500 { | 75 | serial@4500 { |
@@ -104,7 +111,7 @@ | |||
104 | reg = <700 100>; | 111 | reg = <700 100>; |
105 | device_type = "ipic"; | 112 | device_type = "ipic"; |
106 | }; | 113 | }; |
107 | 114 | ||
108 | par_io@1400 { | 115 | par_io@1400 { |
109 | reg = <1400 100>; | 116 | reg = <1400 100>; |
110 | device_type = "par_io"; | 117 | device_type = "par_io"; |
@@ -117,7 +124,6 @@ | |||
117 | 3 5 1 0 2 0 /* MDC */ | 124 | 3 5 1 0 2 0 /* MDC */ |
118 | 0 d 2 0 1 0 /* RX_CLK (CLK9) */ | 125 | 0 d 2 0 1 0 /* RX_CLK (CLK9) */ |
119 | 3 18 2 0 1 0 /* TX_CLK (CLK10) */ | 126 | 3 18 2 0 1 0 /* TX_CLK (CLK10) */ |
120 | 1 1 1 0 1 0 /* TxD1 */ | ||
121 | 1 0 1 0 1 0 /* TxD0 */ | 127 | 1 0 1 0 1 0 /* TxD0 */ |
122 | 1 1 1 0 1 0 /* TxD1 */ | 128 | 1 1 1 0 1 0 /* TxD1 */ |
123 | 1 2 1 0 1 0 /* TxD2 */ | 129 | 1 2 1 0 1 0 /* TxD2 */ |
@@ -165,11 +171,11 @@ | |||
165 | reg = <e0100000 480>; | 171 | reg = <e0100000 480>; |
166 | brg-frequency = <0>; | 172 | brg-frequency = <0>; |
167 | bus-frequency = <BCD3D80>; | 173 | bus-frequency = <BCD3D80>; |
168 | 174 | ||
169 | muram@10000 { | 175 | muram@10000 { |
170 | device_type = "muram"; | 176 | device_type = "muram"; |
171 | ranges = <0 00010000 00004000>; | 177 | ranges = <0 00010000 00004000>; |
172 | 178 | ||
173 | data-only@0 { | 179 | data-only@0 { |
174 | reg = <0 4000>; | 180 | reg = <0 4000>; |
175 | }; | 181 | }; |
@@ -228,7 +234,7 @@ | |||
228 | compatible = "ucc_geth"; | 234 | compatible = "ucc_geth"; |
229 | model = "UCC"; | 235 | model = "UCC"; |
230 | device-id = <4>; | 236 | device-id = <4>; |
231 | reg = <3000 200>; | 237 | reg = <3200 200>; |
232 | interrupts = <23>; | 238 | interrupts = <23>; |
233 | interrupt-parent = < &qeic >; | 239 | interrupt-parent = < &qeic >; |
234 | /* | 240 | /* |
diff --git a/arch/powerpc/boot/dts/mpc834x_mds.dts b/arch/powerpc/boot/dts/mpc834x_mds.dts index e5a84ef9f4b0..49363f89cb71 100644 --- a/arch/powerpc/boot/dts/mpc834x_mds.dts +++ b/arch/powerpc/boot/dts/mpc834x_mds.dts | |||
@@ -57,15 +57,24 @@ | |||
57 | }; | 57 | }; |
58 | 58 | ||
59 | i2c@3000 { | 59 | i2c@3000 { |
60 | #address-cells = <1>; | ||
61 | #size-cells = <0>; | ||
60 | device_type = "i2c"; | 62 | device_type = "i2c"; |
61 | compatible = "fsl-i2c"; | 63 | compatible = "fsl-i2c"; |
62 | reg = <3000 100>; | 64 | reg = <3000 100>; |
63 | interrupts = <e 8>; | 65 | interrupts = <e 8>; |
64 | interrupt-parent = < &ipic >; | 66 | interrupt-parent = < &ipic >; |
65 | dfsrr; | 67 | dfsrr; |
68 | |||
69 | rtc@68 { | ||
70 | compatible = "dallas,ds1374"; | ||
71 | reg = <68>; | ||
72 | }; | ||
66 | }; | 73 | }; |
67 | 74 | ||
68 | i2c@3100 { | 75 | i2c@3100 { |
76 | #address-cells = <1>; | ||
77 | #size-cells = <0>; | ||
69 | device_type = "i2c"; | 78 | device_type = "i2c"; |
70 | compatible = "fsl-i2c"; | 79 | compatible = "fsl-i2c"; |
71 | reg = <3100 100>; | 80 | reg = <3100 100>; |
diff --git a/arch/powerpc/boot/dts/mpc836x_mds.dts b/arch/powerpc/boot/dts/mpc836x_mds.dts index fbd1573c348b..0b2d2b588daa 100644 --- a/arch/powerpc/boot/dts/mpc836x_mds.dts +++ b/arch/powerpc/boot/dts/mpc836x_mds.dts | |||
@@ -62,15 +62,24 @@ | |||
62 | }; | 62 | }; |
63 | 63 | ||
64 | i2c@3000 { | 64 | i2c@3000 { |
65 | #address-cells = <1>; | ||
66 | #size-cells = <0>; | ||
65 | device_type = "i2c"; | 67 | device_type = "i2c"; |
66 | compatible = "fsl-i2c"; | 68 | compatible = "fsl-i2c"; |
67 | reg = <3000 100>; | 69 | reg = <3000 100>; |
68 | interrupts = <e 8>; | 70 | interrupts = <e 8>; |
69 | interrupt-parent = < &ipic >; | 71 | interrupt-parent = < &ipic >; |
70 | dfsrr; | 72 | dfsrr; |
73 | |||
74 | rtc@68 { | ||
75 | compatible = "dallas,ds1374"; | ||
76 | reg = <68>; | ||
77 | }; | ||
71 | }; | 78 | }; |
72 | 79 | ||
73 | i2c@3100 { | 80 | i2c@3100 { |
81 | #address-cells = <1>; | ||
82 | #size-cells = <0>; | ||
74 | device_type = "i2c"; | 83 | device_type = "i2c"; |
75 | compatible = "fsl-i2c"; | 84 | compatible = "fsl-i2c"; |
76 | reg = <3100 100>; | 85 | reg = <3100 100>; |
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/mpc8544ds.dts index 3f9d15cf13e0..6c608de1fc1b 100644 --- a/arch/powerpc/boot/dts/mpc8544ds.dts +++ b/arch/powerpc/boot/dts/mpc8544ds.dts | |||
@@ -272,24 +272,24 @@ | |||
272 | clock-frequency = <1fca055>; | 272 | clock-frequency = <1fca055>; |
273 | interrupt-parent = <&mpic>; | 273 | interrupt-parent = <&mpic>; |
274 | interrupts = <1b 2>; | 274 | interrupts = <1b 2>; |
275 | interrupt-map-mask = <fb00 0 0 0>; | 275 | interrupt-map-mask = <ff00 0 0 1>; |
276 | interrupt-map = < | 276 | interrupt-map = < |
277 | // IDSEL 0x1c USB | 277 | // IDSEL 0x1c USB |
278 | e000 0 0 0 &i8259 c 2 | 278 | e000 0 0 1 &i8259 c 2 |
279 | e100 0 0 0 &i8259 9 2 | 279 | e100 0 0 1 &i8259 9 2 |
280 | e200 0 0 0 &i8259 a 2 | 280 | e200 0 0 1 &i8259 a 2 |
281 | e300 0 0 0 &i8259 b 2 | 281 | e300 0 0 1 &i8259 b 2 |
282 | 282 | ||
283 | // IDSEL 0x1d Audio | 283 | // IDSEL 0x1d Audio |
284 | e800 0 0 0 &i8259 6 2 | 284 | e800 0 0 1 &i8259 6 2 |
285 | 285 | ||
286 | // IDSEL 0x1e Legacy | 286 | // IDSEL 0x1e Legacy |
287 | f000 0 0 0 &i8259 7 2 | 287 | f000 0 0 1 &i8259 7 2 |
288 | f100 0 0 0 &i8259 7 2 | 288 | f100 0 0 1 &i8259 7 2 |
289 | 289 | ||
290 | // IDSEL 0x1f IDE/SATA | 290 | // IDSEL 0x1f IDE/SATA |
291 | f800 0 0 0 &i8259 e 2 | 291 | f800 0 0 1 &i8259 e 2 |
292 | f900 0 0 0 &i8259 5 2 | 292 | f900 0 0 1 &i8259 5 2 |
293 | >; | 293 | >; |
294 | 294 | ||
295 | pcie@0 { | 295 | pcie@0 { |
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/mpc8572ds.dts index d638deec7652..0eb44fb9647d 100644 --- a/arch/powerpc/boot/dts/mpc8572ds.dts +++ b/arch/powerpc/boot/dts/mpc8572ds.dts | |||
@@ -219,36 +219,120 @@ | |||
219 | clock-frequency = <1fca055>; | 219 | clock-frequency = <1fca055>; |
220 | interrupt-parent = <&mpic>; | 220 | interrupt-parent = <&mpic>; |
221 | interrupts = <18 2>; | 221 | interrupts = <18 2>; |
222 | interrupt-map-mask = <fb00 0 0 0>; | 222 | interrupt-map-mask = <ff00 0 0 7>; |
223 | interrupt-map = < | 223 | interrupt-map = < |
224 | /* IDSEL 0x11 - PCI slot 1 */ | 224 | /* IDSEL 0x11 func 0 - PCI slot 1 */ |
225 | 8800 0 0 1 &mpic 2 1 | 225 | 8800 0 0 1 &mpic 2 1 |
226 | 8800 0 0 2 &mpic 3 1 | 226 | 8800 0 0 2 &mpic 3 1 |
227 | 8800 0 0 3 &mpic 4 1 | 227 | 8800 0 0 3 &mpic 4 1 |
228 | 8800 0 0 4 &mpic 1 1 | 228 | 8800 0 0 4 &mpic 1 1 |
229 | 229 | ||
230 | /* IDSEL 0x12 - PCI slot 2 */ | 230 | /* IDSEL 0x11 func 1 - PCI slot 1 */ |
231 | 8900 0 0 1 &mpic 2 1 | ||
232 | 8900 0 0 2 &mpic 3 1 | ||
233 | 8900 0 0 3 &mpic 4 1 | ||
234 | 8900 0 0 4 &mpic 1 1 | ||
235 | |||
236 | /* IDSEL 0x11 func 2 - PCI slot 1 */ | ||
237 | 8a00 0 0 1 &mpic 2 1 | ||
238 | 8a00 0 0 2 &mpic 3 1 | ||
239 | 8a00 0 0 3 &mpic 4 1 | ||
240 | 8a00 0 0 4 &mpic 1 1 | ||
241 | |||
242 | /* IDSEL 0x11 func 3 - PCI slot 1 */ | ||
243 | 8b00 0 0 1 &mpic 2 1 | ||
244 | 8b00 0 0 2 &mpic 3 1 | ||
245 | 8b00 0 0 3 &mpic 4 1 | ||
246 | 8b00 0 0 4 &mpic 1 1 | ||
247 | |||
248 | /* IDSEL 0x11 func 4 - PCI slot 1 */ | ||
249 | 8c00 0 0 1 &mpic 2 1 | ||
250 | 8c00 0 0 2 &mpic 3 1 | ||
251 | 8c00 0 0 3 &mpic 4 1 | ||
252 | 8c00 0 0 4 &mpic 1 1 | ||
253 | |||
254 | /* IDSEL 0x11 func 5 - PCI slot 1 */ | ||
255 | 8d00 0 0 1 &mpic 2 1 | ||
256 | 8d00 0 0 2 &mpic 3 1 | ||
257 | 8d00 0 0 3 &mpic 4 1 | ||
258 | 8d00 0 0 4 &mpic 1 1 | ||
259 | |||
260 | /* IDSEL 0x11 func 6 - PCI slot 1 */ | ||
261 | 8e00 0 0 1 &mpic 2 1 | ||
262 | 8e00 0 0 2 &mpic 3 1 | ||
263 | 8e00 0 0 3 &mpic 4 1 | ||
264 | 8e00 0 0 4 &mpic 1 1 | ||
265 | |||
266 | /* IDSEL 0x11 func 7 - PCI slot 1 */ | ||
267 | 8f00 0 0 1 &mpic 2 1 | ||
268 | 8f00 0 0 2 &mpic 3 1 | ||
269 | 8f00 0 0 3 &mpic 4 1 | ||
270 | 8f00 0 0 4 &mpic 1 1 | ||
271 | |||
272 | /* IDSEL 0x12 func 0 - PCI slot 2 */ | ||
231 | 9000 0 0 1 &mpic 3 1 | 273 | 9000 0 0 1 &mpic 3 1 |
232 | 9000 0 0 2 &mpic 4 1 | 274 | 9000 0 0 2 &mpic 4 1 |
233 | 9000 0 0 3 &mpic 1 1 | 275 | 9000 0 0 3 &mpic 1 1 |
234 | 9000 0 0 4 &mpic 2 1 | 276 | 9000 0 0 4 &mpic 2 1 |
235 | 277 | ||
278 | /* IDSEL 0x12 func 1 - PCI slot 2 */ | ||
279 | 9100 0 0 1 &mpic 3 1 | ||
280 | 9100 0 0 2 &mpic 4 1 | ||
281 | 9100 0 0 3 &mpic 1 1 | ||
282 | 9100 0 0 4 &mpic 2 1 | ||
283 | |||
284 | /* IDSEL 0x12 func 2 - PCI slot 2 */ | ||
285 | 9200 0 0 1 &mpic 3 1 | ||
286 | 9200 0 0 2 &mpic 4 1 | ||
287 | 9200 0 0 3 &mpic 1 1 | ||
288 | 9200 0 0 4 &mpic 2 1 | ||
289 | |||
290 | /* IDSEL 0x12 func 3 - PCI slot 2 */ | ||
291 | 9300 0 0 1 &mpic 3 1 | ||
292 | 9300 0 0 2 &mpic 4 1 | ||
293 | 9300 0 0 3 &mpic 1 1 | ||
294 | 9300 0 0 4 &mpic 2 1 | ||
295 | |||
296 | /* IDSEL 0x12 func 4 - PCI slot 2 */ | ||
297 | 9400 0 0 1 &mpic 3 1 | ||
298 | 9400 0 0 2 &mpic 4 1 | ||
299 | 9400 0 0 3 &mpic 1 1 | ||
300 | 9400 0 0 4 &mpic 2 1 | ||
301 | |||
302 | /* IDSEL 0x12 func 5 - PCI slot 2 */ | ||
303 | 9500 0 0 1 &mpic 3 1 | ||
304 | 9500 0 0 2 &mpic 4 1 | ||
305 | 9500 0 0 3 &mpic 1 1 | ||
306 | 9500 0 0 4 &mpic 2 1 | ||
307 | |||
308 | /* IDSEL 0x12 func 6 - PCI slot 2 */ | ||
309 | 9600 0 0 1 &mpic 3 1 | ||
310 | 9600 0 0 2 &mpic 4 1 | ||
311 | 9600 0 0 3 &mpic 1 1 | ||
312 | 9600 0 0 4 &mpic 2 1 | ||
313 | |||
314 | /* IDSEL 0x12 func 7 - PCI slot 2 */ | ||
315 | 9700 0 0 1 &mpic 3 1 | ||
316 | 9700 0 0 2 &mpic 4 1 | ||
317 | 9700 0 0 3 &mpic 1 1 | ||
318 | 9700 0 0 4 &mpic 2 1 | ||
319 | |||
236 | // IDSEL 0x1c USB | 320 | // IDSEL 0x1c USB |
237 | e000 0 0 0 &i8259 c 2 | 321 | e000 0 0 1 &i8259 c 2 |
238 | e100 0 0 0 &i8259 9 2 | 322 | e100 0 0 1 &i8259 9 2 |
239 | e200 0 0 0 &i8259 a 2 | 323 | e200 0 0 1 &i8259 a 2 |
240 | e300 0 0 0 &i8259 b 2 | 324 | e300 0 0 1 &i8259 b 2 |
241 | 325 | ||
242 | // IDSEL 0x1d Audio | 326 | // IDSEL 0x1d Audio |
243 | e800 0 0 0 &i8259 6 2 | 327 | e800 0 0 1 &i8259 6 2 |
244 | 328 | ||
245 | // IDSEL 0x1e Legacy | 329 | // IDSEL 0x1e Legacy |
246 | f000 0 0 0 &i8259 7 2 | 330 | f000 0 0 1 &i8259 7 2 |
247 | f100 0 0 0 &i8259 7 2 | 331 | f100 0 0 1 &i8259 7 2 |
248 | 332 | ||
249 | // IDSEL 0x1f IDE/SATA | 333 | // IDSEL 0x1f IDE/SATA |
250 | f800 0 0 0 &i8259 e 2 | 334 | f800 0 0 1 &i8259 e 2 |
251 | f900 0 0 0 &i8259 5 2 | 335 | f900 0 0 1 &i8259 5 2 |
252 | 336 | ||
253 | >; | 337 | >; |
254 | 338 | ||
diff --git a/arch/powerpc/boot/dts/mpc8641_hpcn.dts b/arch/powerpc/boot/dts/mpc8641_hpcn.dts index 367765937a06..abb26dc42558 100644 --- a/arch/powerpc/boot/dts/mpc8641_hpcn.dts +++ b/arch/powerpc/boot/dts/mpc8641_hpcn.dts | |||
@@ -235,36 +235,120 @@ | |||
235 | clock-frequency = <1fca055>; | 235 | clock-frequency = <1fca055>; |
236 | interrupt-parent = <&mpic>; | 236 | interrupt-parent = <&mpic>; |
237 | interrupts = <18 2>; | 237 | interrupts = <18 2>; |
238 | interrupt-map-mask = <fb00 0 0 0>; | 238 | interrupt-map-mask = <ff00 0 0 7>; |
239 | interrupt-map = < | 239 | interrupt-map = < |
240 | /* IDSEL 0x11 */ | 240 | /* IDSEL 0x11 func 0 - PCI slot 1 */ |
241 | 8800 0 0 1 &i8259 9 2 | 241 | 8800 0 0 1 &mpic 2 1 |
242 | 8800 0 0 2 &i8259 a 2 | 242 | 8800 0 0 2 &mpic 3 1 |
243 | 8800 0 0 3 &i8259 b 2 | 243 | 8800 0 0 3 &mpic 4 1 |
244 | 8800 0 0 4 &i8259 c 2 | 244 | 8800 0 0 4 &mpic 1 1 |
245 | 245 | ||
246 | /* IDSEL 0x12 */ | 246 | /* IDSEL 0x11 func 1 - PCI slot 1 */ |
247 | 9000 0 0 1 &i8259 a 2 | 247 | 8900 0 0 1 &mpic 2 1 |
248 | 9000 0 0 2 &i8259 b 2 | 248 | 8900 0 0 2 &mpic 3 1 |
249 | 9000 0 0 3 &i8259 c 2 | 249 | 8900 0 0 3 &mpic 4 1 |
250 | 9000 0 0 4 &i8259 9 2 | 250 | 8900 0 0 4 &mpic 1 1 |
251 | |||
252 | /* IDSEL 0x11 func 2 - PCI slot 1 */ | ||
253 | 8a00 0 0 1 &mpic 2 1 | ||
254 | 8a00 0 0 2 &mpic 3 1 | ||
255 | 8a00 0 0 3 &mpic 4 1 | ||
256 | 8a00 0 0 4 &mpic 1 1 | ||
257 | |||
258 | /* IDSEL 0x11 func 3 - PCI slot 1 */ | ||
259 | 8b00 0 0 1 &mpic 2 1 | ||
260 | 8b00 0 0 2 &mpic 3 1 | ||
261 | 8b00 0 0 3 &mpic 4 1 | ||
262 | 8b00 0 0 4 &mpic 1 1 | ||
263 | |||
264 | /* IDSEL 0x11 func 4 - PCI slot 1 */ | ||
265 | 8c00 0 0 1 &mpic 2 1 | ||
266 | 8c00 0 0 2 &mpic 3 1 | ||
267 | 8c00 0 0 3 &mpic 4 1 | ||
268 | 8c00 0 0 4 &mpic 1 1 | ||
269 | |||
270 | /* IDSEL 0x11 func 5 - PCI slot 1 */ | ||
271 | 8d00 0 0 1 &mpic 2 1 | ||
272 | 8d00 0 0 2 &mpic 3 1 | ||
273 | 8d00 0 0 3 &mpic 4 1 | ||
274 | 8d00 0 0 4 &mpic 1 1 | ||
275 | |||
276 | /* IDSEL 0x11 func 6 - PCI slot 1 */ | ||
277 | 8e00 0 0 1 &mpic 2 1 | ||
278 | 8e00 0 0 2 &mpic 3 1 | ||
279 | 8e00 0 0 3 &mpic 4 1 | ||
280 | 8e00 0 0 4 &mpic 1 1 | ||
281 | |||
282 | /* IDSEL 0x11 func 7 - PCI slot 1 */ | ||
283 | 8f00 0 0 1 &mpic 2 1 | ||
284 | 8f00 0 0 2 &mpic 3 1 | ||
285 | 8f00 0 0 3 &mpic 4 1 | ||
286 | 8f00 0 0 4 &mpic 1 1 | ||
287 | |||
288 | /* IDSEL 0x12 func 0 - PCI slot 2 */ | ||
289 | 9000 0 0 1 &mpic 3 1 | ||
290 | 9000 0 0 2 &mpic 4 1 | ||
291 | 9000 0 0 3 &mpic 1 1 | ||
292 | 9000 0 0 4 &mpic 2 1 | ||
293 | |||
294 | /* IDSEL 0x12 func 1 - PCI slot 2 */ | ||
295 | 9100 0 0 1 &mpic 3 1 | ||
296 | 9100 0 0 2 &mpic 4 1 | ||
297 | 9100 0 0 3 &mpic 1 1 | ||
298 | 9100 0 0 4 &mpic 2 1 | ||
299 | |||
300 | /* IDSEL 0x12 func 2 - PCI slot 2 */ | ||
301 | 9200 0 0 1 &mpic 3 1 | ||
302 | 9200 0 0 2 &mpic 4 1 | ||
303 | 9200 0 0 3 &mpic 1 1 | ||
304 | 9200 0 0 4 &mpic 2 1 | ||
305 | |||
306 | /* IDSEL 0x12 func 3 - PCI slot 2 */ | ||
307 | 9300 0 0 1 &mpic 3 1 | ||
308 | 9300 0 0 2 &mpic 4 1 | ||
309 | 9300 0 0 3 &mpic 1 1 | ||
310 | 9300 0 0 4 &mpic 2 1 | ||
311 | |||
312 | /* IDSEL 0x12 func 4 - PCI slot 2 */ | ||
313 | 9400 0 0 1 &mpic 3 1 | ||
314 | 9400 0 0 2 &mpic 4 1 | ||
315 | 9400 0 0 3 &mpic 1 1 | ||
316 | 9400 0 0 4 &mpic 2 1 | ||
317 | |||
318 | /* IDSEL 0x12 func 5 - PCI slot 2 */ | ||
319 | 9500 0 0 1 &mpic 3 1 | ||
320 | 9500 0 0 2 &mpic 4 1 | ||
321 | 9500 0 0 3 &mpic 1 1 | ||
322 | 9500 0 0 4 &mpic 2 1 | ||
323 | |||
324 | /* IDSEL 0x12 func 6 - PCI slot 2 */ | ||
325 | 9600 0 0 1 &mpic 3 1 | ||
326 | 9600 0 0 2 &mpic 4 1 | ||
327 | 9600 0 0 3 &mpic 1 1 | ||
328 | 9600 0 0 4 &mpic 2 1 | ||
329 | |||
330 | /* IDSEL 0x12 func 7 - PCI slot 2 */ | ||
331 | 9700 0 0 1 &mpic 3 1 | ||
332 | 9700 0 0 2 &mpic 4 1 | ||
333 | 9700 0 0 3 &mpic 1 1 | ||
334 | 9700 0 0 4 &mpic 2 1 | ||
251 | 335 | ||
252 | // IDSEL 0x1c USB | 336 | // IDSEL 0x1c USB |
253 | e000 0 0 0 &i8259 c 2 | 337 | e000 0 0 1 &i8259 c 2 |
254 | e100 0 0 0 &i8259 9 2 | 338 | e100 0 0 1 &i8259 9 2 |
255 | e200 0 0 0 &i8259 a 2 | 339 | e200 0 0 1 &i8259 a 2 |
256 | e300 0 0 0 &i8259 b 2 | 340 | e300 0 0 1 &i8259 b 2 |
257 | 341 | ||
258 | // IDSEL 0x1d Audio | 342 | // IDSEL 0x1d Audio |
259 | e800 0 0 0 &i8259 6 2 | 343 | e800 0 0 1 &i8259 6 2 |
260 | 344 | ||
261 | // IDSEL 0x1e Legacy | 345 | // IDSEL 0x1e Legacy |
262 | f000 0 0 0 &i8259 7 2 | 346 | f000 0 0 1 &i8259 7 2 |
263 | f100 0 0 0 &i8259 7 2 | 347 | f100 0 0 1 &i8259 7 2 |
264 | 348 | ||
265 | // IDSEL 0x1f IDE/SATA | 349 | // IDSEL 0x1f IDE/SATA |
266 | f800 0 0 0 &i8259 e 2 | 350 | f800 0 0 1 &i8259 e 2 |
267 | f900 0 0 0 &i8259 5 2 | 351 | f900 0 0 1 &i8259 5 2 |
268 | >; | 352 | >; |
269 | 353 | ||
270 | pcie@0 { | 354 | pcie@0 { |
diff --git a/arch/powerpc/configs/mpc832x_mds_defconfig b/arch/powerpc/configs/mpc832x_mds_defconfig index dd68d1818d6b..e069018276ca 100644 --- a/arch/powerpc/configs/mpc832x_mds_defconfig +++ b/arch/powerpc/configs/mpc832x_mds_defconfig | |||
@@ -774,7 +774,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
774 | # CONFIG_NEW_LEDS is not set | 774 | # CONFIG_NEW_LEDS is not set |
775 | # CONFIG_INFINIBAND is not set | 775 | # CONFIG_INFINIBAND is not set |
776 | # CONFIG_EDAC is not set | 776 | # CONFIG_EDAC is not set |
777 | # CONFIG_RTC_CLASS is not set | 777 | CONFIG_RTC_LIB=y |
778 | CONFIG_RTC_CLASS=y | ||
779 | CONFIG_RTC_HCTOSYS=y | ||
780 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
781 | # CONFIG_RTC_DEBUG is not set | ||
782 | |||
783 | # | ||
784 | # RTC interfaces | ||
785 | # | ||
786 | CONFIG_RTC_INTF_SYSFS=y | ||
787 | CONFIG_RTC_INTF_PROC=y | ||
788 | CONFIG_RTC_INTF_DEV=y | ||
789 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
790 | # CONFIG_RTC_DRV_TEST is not set | ||
791 | |||
792 | # | ||
793 | # I2C RTC drivers | ||
794 | # | ||
795 | # CONFIG_RTC_DRV_DS1307 is not set | ||
796 | CONFIG_RTC_DRV_DS1374=y | ||
797 | # CONFIG_RTC_DRV_DS1672 is not set | ||
798 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
799 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
800 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
801 | # CONFIG_RTC_DRV_X1205 is not set | ||
802 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
803 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
804 | # CONFIG_RTC_DRV_M41T80 is not set | ||
805 | |||
806 | # | ||
807 | # SPI RTC drivers | ||
808 | # | ||
809 | |||
810 | # | ||
811 | # Platform RTC drivers | ||
812 | # | ||
813 | # CONFIG_RTC_DRV_CMOS is not set | ||
814 | # CONFIG_RTC_DRV_DS1553 is not set | ||
815 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
816 | # CONFIG_RTC_DRV_DS1742 is not set | ||
817 | # CONFIG_RTC_DRV_M48T86 is not set | ||
818 | # CONFIG_RTC_DRV_M48T59 is not set | ||
819 | # CONFIG_RTC_DRV_V3020 is not set | ||
820 | |||
821 | # | ||
822 | # on-CPU RTC drivers | ||
823 | # | ||
778 | 824 | ||
779 | # | 825 | # |
780 | # DMA Engine support | 826 | # DMA Engine support |
diff --git a/arch/powerpc/configs/mpc832x_rdb_defconfig b/arch/powerpc/configs/mpc832x_rdb_defconfig index 4f391028c79c..7a5b13f4140f 100644 --- a/arch/powerpc/configs/mpc832x_rdb_defconfig +++ b/arch/powerpc/configs/mpc832x_rdb_defconfig | |||
@@ -685,8 +685,21 @@ CONFIG_I2C_MPC=y | |||
685 | # | 685 | # |
686 | # SPI support | 686 | # SPI support |
687 | # | 687 | # |
688 | # CONFIG_SPI is not set | 688 | CONFIG_SPI=y |
689 | # CONFIG_SPI_MASTER is not set | 689 | CONFIG_SPI_MASTER=y |
690 | |||
691 | # | ||
692 | # SPI Master Controller Drivers | ||
693 | # | ||
694 | CONFIG_SPI_BITBANG=y | ||
695 | CONFIG_SPI_MPC83xx=y | ||
696 | |||
697 | # | ||
698 | # SPI Protocol Masters | ||
699 | # | ||
700 | # CONFIG_SPI_AT25 is not set | ||
701 | # CONFIG_SPI_SPIDEV is not set | ||
702 | # CONFIG_SPI_TLE62X0 is not set | ||
690 | # CONFIG_W1 is not set | 703 | # CONFIG_W1 is not set |
691 | # CONFIG_POWER_SUPPLY is not set | 704 | # CONFIG_POWER_SUPPLY is not set |
692 | CONFIG_HWMON=y | 705 | CONFIG_HWMON=y |
@@ -710,6 +723,7 @@ CONFIG_HWMON=y | |||
710 | # CONFIG_SENSORS_GL520SM is not set | 723 | # CONFIG_SENSORS_GL520SM is not set |
711 | # CONFIG_SENSORS_IT87 is not set | 724 | # CONFIG_SENSORS_IT87 is not set |
712 | # CONFIG_SENSORS_LM63 is not set | 725 | # CONFIG_SENSORS_LM63 is not set |
726 | # CONFIG_SENSORS_LM70 is not set | ||
713 | # CONFIG_SENSORS_LM75 is not set | 727 | # CONFIG_SENSORS_LM75 is not set |
714 | # CONFIG_SENSORS_LM77 is not set | 728 | # CONFIG_SENSORS_LM77 is not set |
715 | # CONFIG_SENSORS_LM78 is not set | 729 | # CONFIG_SENSORS_LM78 is not set |
@@ -896,7 +910,24 @@ CONFIG_USB_MON=y | |||
896 | # USB Gadget Support | 910 | # USB Gadget Support |
897 | # | 911 | # |
898 | # CONFIG_USB_GADGET is not set | 912 | # CONFIG_USB_GADGET is not set |
899 | # CONFIG_MMC is not set | 913 | CONFIG_MMC=y |
914 | # CONFIG_MMC_DEBUG is not set | ||
915 | # CONFIG_MMC_UNSAFE_RESUME is not set | ||
916 | |||
917 | # | ||
918 | # MMC/SD Card Drivers | ||
919 | # | ||
920 | CONFIG_MMC_BLOCK=y | ||
921 | CONFIG_MMC_BLOCK_BOUNCE=y | ||
922 | # CONFIG_SDIO_UART is not set | ||
923 | |||
924 | # | ||
925 | # MMC/SD Host Controller Drivers | ||
926 | # | ||
927 | # CONFIG_MMC_SDHCI is not set | ||
928 | # CONFIG_MMC_WBSD is not set | ||
929 | # CONFIG_MMC_TIFM_SD is not set | ||
930 | CONFIG_MMC_SPI=y | ||
900 | # CONFIG_NEW_LEDS is not set | 931 | # CONFIG_NEW_LEDS is not set |
901 | # CONFIG_INFINIBAND is not set | 932 | # CONFIG_INFINIBAND is not set |
902 | # CONFIG_EDAC is not set | 933 | # CONFIG_EDAC is not set |
@@ -1101,9 +1132,9 @@ CONFIG_UCC=y | |||
1101 | CONFIG_BITREVERSE=y | 1132 | CONFIG_BITREVERSE=y |
1102 | # CONFIG_CRC_CCITT is not set | 1133 | # CONFIG_CRC_CCITT is not set |
1103 | # CONFIG_CRC16 is not set | 1134 | # CONFIG_CRC16 is not set |
1104 | # CONFIG_CRC_ITU_T is not set | 1135 | CONFIG_CRC_ITU_T=y |
1105 | CONFIG_CRC32=y | 1136 | CONFIG_CRC32=y |
1106 | # CONFIG_CRC7 is not set | 1137 | CONFIG_CRC7=y |
1107 | # CONFIG_LIBCRC32C is not set | 1138 | # CONFIG_LIBCRC32C is not set |
1108 | CONFIG_PLIST=y | 1139 | CONFIG_PLIST=y |
1109 | CONFIG_HAS_IOMEM=y | 1140 | CONFIG_HAS_IOMEM=y |
diff --git a/arch/powerpc/configs/mpc834x_itx_defconfig b/arch/powerpc/configs/mpc834x_itx_defconfig index eb28dd85cb2b..ba512d13f3a3 100644 --- a/arch/powerpc/configs/mpc834x_itx_defconfig +++ b/arch/powerpc/configs/mpc834x_itx_defconfig | |||
@@ -867,7 +867,7 @@ CONFIG_USB_EHCI_ROOT_HUB_TT=y | |||
867 | CONFIG_USB_EHCI_FSL=y | 867 | CONFIG_USB_EHCI_FSL=y |
868 | # CONFIG_USB_ISP116X_HCD is not set | 868 | # CONFIG_USB_ISP116X_HCD is not set |
869 | # CONFIG_USB_OHCI_HCD is not set | 869 | # CONFIG_USB_OHCI_HCD is not set |
870 | # CONFIG_USB_UHCI_HCD is not set | 870 | CONFIG_USB_UHCI_HCD=y |
871 | # CONFIG_USB_SL811_HCD is not set | 871 | # CONFIG_USB_SL811_HCD is not set |
872 | # CONFIG_USB_R8A66597_HCD is not set | 872 | # CONFIG_USB_R8A66597_HCD is not set |
873 | 873 | ||
diff --git a/arch/powerpc/configs/mpc834x_itxgp_defconfig b/arch/powerpc/configs/mpc834x_itxgp_defconfig index 22b95462c913..9faa948c22ad 100644 --- a/arch/powerpc/configs/mpc834x_itxgp_defconfig +++ b/arch/powerpc/configs/mpc834x_itxgp_defconfig | |||
@@ -760,15 +760,101 @@ CONFIG_USB_SUPPORT=y | |||
760 | CONFIG_USB_ARCH_HAS_HCD=y | 760 | CONFIG_USB_ARCH_HAS_HCD=y |
761 | CONFIG_USB_ARCH_HAS_OHCI=y | 761 | CONFIG_USB_ARCH_HAS_OHCI=y |
762 | CONFIG_USB_ARCH_HAS_EHCI=y | 762 | CONFIG_USB_ARCH_HAS_EHCI=y |
763 | # CONFIG_USB is not set | 763 | CONFIG_USB=y |
764 | # CONFIG_USB_DEBUG is not set | ||
765 | |||
766 | # | ||
767 | # Miscellaneous USB options | ||
768 | # | ||
769 | # CONFIG_USB_DEVICEFS is not set | ||
770 | CONFIG_USB_DEVICE_CLASS=y | ||
771 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
772 | # CONFIG_USB_OTG is not set | ||
773 | |||
774 | # | ||
775 | # USB Host Controller Drivers | ||
776 | # | ||
777 | CONFIG_USB_EHCI_HCD=y | ||
778 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
764 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | 779 | CONFIG_USB_EHCI_ROOT_HUB_TT=y |
780 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
765 | CONFIG_USB_EHCI_FSL=y | 781 | CONFIG_USB_EHCI_FSL=y |
782 | # CONFIG_USB_ISP116X_HCD is not set | ||
783 | # CONFIG_USB_OHCI_HCD is not set | ||
784 | CONFIG_USB_UHCI_HCD=y | ||
785 | # CONFIG_USB_SL811_HCD is not set | ||
786 | # CONFIG_USB_R8A66597_HCD is not set | ||
787 | |||
788 | # | ||
789 | # USB Device Class drivers | ||
790 | # | ||
791 | # CONFIG_USB_ACM is not set | ||
792 | # CONFIG_USB_PRINTER is not set | ||
766 | 793 | ||
767 | # | 794 | # |
768 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 795 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
769 | # | 796 | # |
770 | 797 | ||
771 | # | 798 | # |
799 | # may also be needed; see USB_STORAGE Help for more information | ||
800 | # | ||
801 | CONFIG_USB_STORAGE=y | ||
802 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
803 | # CONFIG_USB_STORAGE_DATAFAB is not set | ||
804 | # CONFIG_USB_STORAGE_FREECOM is not set | ||
805 | # CONFIG_USB_STORAGE_DPCM is not set | ||
806 | # CONFIG_USB_STORAGE_USBAT is not set | ||
807 | # CONFIG_USB_STORAGE_SDDR09 is not set | ||
808 | # CONFIG_USB_STORAGE_SDDR55 is not set | ||
809 | # CONFIG_USB_STORAGE_JUMPSHOT is not set | ||
810 | # CONFIG_USB_STORAGE_ALAUDA is not set | ||
811 | # CONFIG_USB_STORAGE_KARMA is not set | ||
812 | # CONFIG_USB_LIBUSUAL is not set | ||
813 | |||
814 | # | ||
815 | # USB Imaging devices | ||
816 | # | ||
817 | # CONFIG_USB_MDC800 is not set | ||
818 | # CONFIG_USB_MICROTEK is not set | ||
819 | CONFIG_USB_MON=y | ||
820 | |||
821 | # | ||
822 | # USB port drivers | ||
823 | # | ||
824 | |||
825 | # | ||
826 | # USB Serial Converter support | ||
827 | # | ||
828 | # CONFIG_USB_SERIAL is not set | ||
829 | |||
830 | # | ||
831 | # USB Miscellaneous drivers | ||
832 | # | ||
833 | # CONFIG_USB_EMI62 is not set | ||
834 | # CONFIG_USB_EMI26 is not set | ||
835 | # CONFIG_USB_ADUTUX is not set | ||
836 | # CONFIG_USB_AUERSWALD is not set | ||
837 | # CONFIG_USB_RIO500 is not set | ||
838 | # CONFIG_USB_LEGOTOWER is not set | ||
839 | # CONFIG_USB_LCD is not set | ||
840 | # CONFIG_USB_BERRY_CHARGE is not set | ||
841 | # CONFIG_USB_LED is not set | ||
842 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
843 | # CONFIG_USB_CYTHERM is not set | ||
844 | # CONFIG_USB_PHIDGET is not set | ||
845 | # CONFIG_USB_IDMOUSE is not set | ||
846 | # CONFIG_USB_FTDI_ELAN is not set | ||
847 | # CONFIG_USB_APPLEDISPLAY is not set | ||
848 | # CONFIG_USB_SISUSBVGA is not set | ||
849 | # CONFIG_USB_LD is not set | ||
850 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
851 | # CONFIG_USB_IOWARRIOR is not set | ||
852 | |||
853 | # | ||
854 | # USB DSL modem support | ||
855 | # | ||
856 | |||
857 | # | ||
772 | # USB Gadget Support | 858 | # USB Gadget Support |
773 | # | 859 | # |
774 | # CONFIG_USB_GADGET is not set | 860 | # CONFIG_USB_GADGET is not set |
diff --git a/arch/powerpc/configs/mpc834x_mds_defconfig b/arch/powerpc/configs/mpc834x_mds_defconfig index e59a88e95486..356f736a5d3d 100644 --- a/arch/powerpc/configs/mpc834x_mds_defconfig +++ b/arch/powerpc/configs/mpc834x_mds_defconfig | |||
@@ -721,7 +721,53 @@ CONFIG_USB_EHCI_FSL=y | |||
721 | # CONFIG_NEW_LEDS is not set | 721 | # CONFIG_NEW_LEDS is not set |
722 | # CONFIG_INFINIBAND is not set | 722 | # CONFIG_INFINIBAND is not set |
723 | # CONFIG_EDAC is not set | 723 | # CONFIG_EDAC is not set |
724 | # CONFIG_RTC_CLASS is not set | 724 | CONFIG_RTC_LIB=y |
725 | CONFIG_RTC_CLASS=y | ||
726 | CONFIG_RTC_HCTOSYS=y | ||
727 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
728 | # CONFIG_RTC_DEBUG is not set | ||
729 | |||
730 | # | ||
731 | # RTC interfaces | ||
732 | # | ||
733 | CONFIG_RTC_INTF_SYSFS=y | ||
734 | CONFIG_RTC_INTF_PROC=y | ||
735 | CONFIG_RTC_INTF_DEV=y | ||
736 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
737 | # CONFIG_RTC_DRV_TEST is not set | ||
738 | |||
739 | # | ||
740 | # I2C RTC drivers | ||
741 | # | ||
742 | # CONFIG_RTC_DRV_DS1307 is not set | ||
743 | CONFIG_RTC_DRV_DS1374=y | ||
744 | # CONFIG_RTC_DRV_DS1672 is not set | ||
745 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
746 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
747 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
748 | # CONFIG_RTC_DRV_X1205 is not set | ||
749 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
750 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
751 | # CONFIG_RTC_DRV_M41T80 is not set | ||
752 | |||
753 | # | ||
754 | # SPI RTC drivers | ||
755 | # | ||
756 | |||
757 | # | ||
758 | # Platform RTC drivers | ||
759 | # | ||
760 | # CONFIG_RTC_DRV_CMOS is not set | ||
761 | # CONFIG_RTC_DRV_DS1553 is not set | ||
762 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
763 | # CONFIG_RTC_DRV_DS1742 is not set | ||
764 | # CONFIG_RTC_DRV_M48T86 is not set | ||
765 | # CONFIG_RTC_DRV_M48T59 is not set | ||
766 | # CONFIG_RTC_DRV_V3020 is not set | ||
767 | |||
768 | # | ||
769 | # on-CPU RTC drivers | ||
770 | # | ||
725 | 771 | ||
726 | # | 772 | # |
727 | # DMA Engine support | 773 | # DMA Engine support |
diff --git a/arch/powerpc/configs/mpc836x_mds_defconfig b/arch/powerpc/configs/mpc836x_mds_defconfig index 75657528518e..1b4d37570eb1 100644 --- a/arch/powerpc/configs/mpc836x_mds_defconfig +++ b/arch/powerpc/configs/mpc836x_mds_defconfig | |||
@@ -773,7 +773,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
773 | # CONFIG_NEW_LEDS is not set | 773 | # CONFIG_NEW_LEDS is not set |
774 | # CONFIG_INFINIBAND is not set | 774 | # CONFIG_INFINIBAND is not set |
775 | # CONFIG_EDAC is not set | 775 | # CONFIG_EDAC is not set |
776 | # CONFIG_RTC_CLASS is not set | 776 | CONFIG_RTC_LIB=y |
777 | CONFIG_RTC_CLASS=y | ||
778 | CONFIG_RTC_HCTOSYS=y | ||
779 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
780 | # CONFIG_RTC_DEBUG is not set | ||
781 | |||
782 | # | ||
783 | # RTC interfaces | ||
784 | # | ||
785 | CONFIG_RTC_INTF_SYSFS=y | ||
786 | CONFIG_RTC_INTF_PROC=y | ||
787 | CONFIG_RTC_INTF_DEV=y | ||
788 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
789 | # CONFIG_RTC_DRV_TEST is not set | ||
790 | |||
791 | # | ||
792 | # I2C RTC drivers | ||
793 | # | ||
794 | # CONFIG_RTC_DRV_DS1307 is not set | ||
795 | CONFIG_RTC_DRV_DS1374=y | ||
796 | # CONFIG_RTC_DRV_DS1672 is not set | ||
797 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
798 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
799 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
800 | # CONFIG_RTC_DRV_X1205 is not set | ||
801 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
802 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
803 | # CONFIG_RTC_DRV_M41T80 is not set | ||
804 | |||
805 | # | ||
806 | # SPI RTC drivers | ||
807 | # | ||
808 | |||
809 | # | ||
810 | # Platform RTC drivers | ||
811 | # | ||
812 | # CONFIG_RTC_DRV_CMOS is not set | ||
813 | # CONFIG_RTC_DRV_DS1553 is not set | ||
814 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
815 | # CONFIG_RTC_DRV_DS1742 is not set | ||
816 | # CONFIG_RTC_DRV_M48T86 is not set | ||
817 | # CONFIG_RTC_DRV_M48T59 is not set | ||
818 | # CONFIG_RTC_DRV_V3020 is not set | ||
819 | |||
820 | # | ||
821 | # on-CPU RTC drivers | ||
822 | # | ||
777 | 823 | ||
778 | # | 824 | # |
779 | # DMA Engine support | 825 | # DMA Engine support |
diff --git a/arch/powerpc/configs/mpc8568mds_defconfig b/arch/powerpc/configs/mpc8568mds_defconfig index 883d8af9debd..d665e7a797c0 100644 --- a/arch/powerpc/configs/mpc8568mds_defconfig +++ b/arch/powerpc/configs/mpc8568mds_defconfig | |||
@@ -768,7 +768,53 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
768 | # CONFIG_NEW_LEDS is not set | 768 | # CONFIG_NEW_LEDS is not set |
769 | # CONFIG_INFINIBAND is not set | 769 | # CONFIG_INFINIBAND is not set |
770 | # CONFIG_EDAC is not set | 770 | # CONFIG_EDAC is not set |
771 | # CONFIG_RTC_CLASS is not set | 771 | CONFIG_RTC_LIB=y |
772 | CONFIG_RTC_CLASS=y | ||
773 | CONFIG_RTC_HCTOSYS=y | ||
774 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
775 | # CONFIG_RTC_DEBUG is not set | ||
776 | |||
777 | # | ||
778 | # RTC interfaces | ||
779 | # | ||
780 | CONFIG_RTC_INTF_SYSFS=y | ||
781 | CONFIG_RTC_INTF_PROC=y | ||
782 | CONFIG_RTC_INTF_DEV=y | ||
783 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
784 | # CONFIG_RTC_DRV_TEST is not set | ||
785 | |||
786 | # | ||
787 | # I2C RTC drivers | ||
788 | # | ||
789 | # CONFIG_RTC_DRV_DS1307 is not set | ||
790 | CONFIG_RTC_DRV_DS1374=y | ||
791 | # CONFIG_RTC_DRV_DS1672 is not set | ||
792 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
793 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
794 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
795 | # CONFIG_RTC_DRV_X1205 is not set | ||
796 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
797 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
798 | # CONFIG_RTC_DRV_M41T80 is not set | ||
799 | |||
800 | # | ||
801 | # SPI RTC drivers | ||
802 | # | ||
803 | |||
804 | # | ||
805 | # Platform RTC drivers | ||
806 | # | ||
807 | # CONFIG_RTC_DRV_CMOS is not set | ||
808 | # CONFIG_RTC_DRV_DS1553 is not set | ||
809 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
810 | # CONFIG_RTC_DRV_DS1742 is not set | ||
811 | # CONFIG_RTC_DRV_M48T86 is not set | ||
812 | # CONFIG_RTC_DRV_M48T59 is not set | ||
813 | # CONFIG_RTC_DRV_V3020 is not set | ||
814 | |||
815 | # | ||
816 | # on-CPU RTC drivers | ||
817 | # | ||
772 | 818 | ||
773 | # | 819 | # |
774 | # DMA Engine support | 820 | # DMA Engine support |
diff --git a/arch/powerpc/kernel/asm-offsets.c b/arch/powerpc/kernel/asm-offsets.c index 2c8e756d19a3..d67bcd84f329 100644 --- a/arch/powerpc/kernel/asm-offsets.c +++ b/arch/powerpc/kernel/asm-offsets.c | |||
@@ -284,6 +284,10 @@ int main(void) | |||
284 | DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32)); | 284 | DEFINE(CFG_SYSCALL_MAP32, offsetof(struct vdso_data, syscall_map_32)); |
285 | DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec)); | 285 | DEFINE(WTOM_CLOCK_SEC, offsetof(struct vdso_data, wtom_clock_sec)); |
286 | DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); | 286 | DEFINE(WTOM_CLOCK_NSEC, offsetof(struct vdso_data, wtom_clock_nsec)); |
287 | DEFINE(CFG_ICACHE_BLOCKSZ, offsetof(struct vdso_data, icache_block_size)); | ||
288 | DEFINE(CFG_DCACHE_BLOCKSZ, offsetof(struct vdso_data, dcache_block_size)); | ||
289 | DEFINE(CFG_ICACHE_LOGBLOCKSZ, offsetof(struct vdso_data, icache_log_block_size)); | ||
290 | DEFINE(CFG_DCACHE_LOGBLOCKSZ, offsetof(struct vdso_data, dcache_log_block_size)); | ||
287 | #ifdef CONFIG_PPC64 | 291 | #ifdef CONFIG_PPC64 |
288 | DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64)); | 292 | DEFINE(CFG_SYSCALL_MAP64, offsetof(struct vdso_data, syscall_map_64)); |
289 | DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); | 293 | DEFINE(TVAL64_TV_SEC, offsetof(struct timeval, tv_sec)); |
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c index 214780798289..053cac19f714 100644 --- a/arch/powerpc/kernel/rtas.c +++ b/arch/powerpc/kernel/rtas.c | |||
@@ -19,6 +19,9 @@ | |||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/capability.h> | 20 | #include <linux/capability.h> |
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/smp.h> | ||
23 | #include <linux/completion.h> | ||
24 | #include <linux/cpumask.h> | ||
22 | 25 | ||
23 | #include <asm/prom.h> | 26 | #include <asm/prom.h> |
24 | #include <asm/rtas.h> | 27 | #include <asm/rtas.h> |
@@ -34,6 +37,8 @@ | |||
34 | #include <asm/lmb.h> | 37 | #include <asm/lmb.h> |
35 | #include <asm/udbg.h> | 38 | #include <asm/udbg.h> |
36 | #include <asm/syscalls.h> | 39 | #include <asm/syscalls.h> |
40 | #include <asm/smp.h> | ||
41 | #include <asm/atomic.h> | ||
37 | 42 | ||
38 | struct rtas_t rtas = { | 43 | struct rtas_t rtas = { |
39 | .lock = SPIN_LOCK_UNLOCKED | 44 | .lock = SPIN_LOCK_UNLOCKED |
@@ -41,8 +46,10 @@ struct rtas_t rtas = { | |||
41 | EXPORT_SYMBOL(rtas); | 46 | EXPORT_SYMBOL(rtas); |
42 | 47 | ||
43 | struct rtas_suspend_me_data { | 48 | struct rtas_suspend_me_data { |
44 | long waiting; | 49 | atomic_t working; /* number of cpus accessing this struct */ |
45 | struct rtas_args *args; | 50 | int token; /* ibm,suspend-me */ |
51 | int error; | ||
52 | struct completion *complete; /* wait on this until working == 0 */ | ||
46 | }; | 53 | }; |
47 | 54 | ||
48 | DEFINE_SPINLOCK(rtas_data_buf_lock); | 55 | DEFINE_SPINLOCK(rtas_data_buf_lock); |
@@ -631,18 +638,18 @@ void rtas_halt(void) | |||
631 | /* Must be in the RMO region, so we place it here */ | 638 | /* Must be in the RMO region, so we place it here */ |
632 | static char rtas_os_term_buf[2048]; | 639 | static char rtas_os_term_buf[2048]; |
633 | 640 | ||
634 | void rtas_os_term(char *str) | 641 | void rtas_panic_msg(char *str) |
635 | { | 642 | { |
636 | int status; | 643 | snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); |
644 | } | ||
637 | 645 | ||
638 | if (panic_timeout) | 646 | void rtas_os_term(void) |
639 | return; | 647 | { |
648 | int status; | ||
640 | 649 | ||
641 | if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) | 650 | if (RTAS_UNKNOWN_SERVICE == rtas_token("ibm,os-term")) |
642 | return; | 651 | return; |
643 | 652 | ||
644 | snprintf(rtas_os_term_buf, 2048, "OS panic: %s", str); | ||
645 | |||
646 | do { | 653 | do { |
647 | status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, | 654 | status = rtas_call(rtas_token("ibm,os-term"), 1, 1, NULL, |
648 | __pa(rtas_os_term_buf)); | 655 | __pa(rtas_os_term_buf)); |
@@ -657,50 +664,62 @@ static int ibm_suspend_me_token = RTAS_UNKNOWN_SERVICE; | |||
657 | #ifdef CONFIG_PPC_PSERIES | 664 | #ifdef CONFIG_PPC_PSERIES |
658 | static void rtas_percpu_suspend_me(void *info) | 665 | static void rtas_percpu_suspend_me(void *info) |
659 | { | 666 | { |
660 | int i; | ||
661 | long rc; | 667 | long rc; |
662 | long flags; | 668 | unsigned long msr_save; |
669 | int cpu; | ||
663 | struct rtas_suspend_me_data *data = | 670 | struct rtas_suspend_me_data *data = |
664 | (struct rtas_suspend_me_data *)info; | 671 | (struct rtas_suspend_me_data *)info; |
665 | 672 | ||
666 | /* | 673 | atomic_inc(&data->working); |
667 | * We use "waiting" to indicate our state. As long | 674 | |
668 | * as it is >0, we are still trying to all join up. | 675 | /* really need to ensure MSR.EE is off for H_JOIN */ |
669 | * If it goes to 0, we have successfully joined up and | 676 | msr_save = mfmsr(); |
670 | * one thread got H_CONTINUE. If any error happens, | 677 | mtmsr(msr_save & ~(MSR_EE)); |
671 | * we set it to <0. | 678 | |
672 | */ | 679 | rc = plpar_hcall_norets(H_JOIN); |
673 | local_irq_save(flags); | ||
674 | do { | ||
675 | rc = plpar_hcall_norets(H_JOIN); | ||
676 | smp_rmb(); | ||
677 | } while (rc == H_SUCCESS && data->waiting > 0); | ||
678 | if (rc == H_SUCCESS) | ||
679 | goto out; | ||
680 | 680 | ||
681 | if (rc == H_CONTINUE) { | 681 | mtmsr(msr_save); |
682 | data->waiting = 0; | 682 | |
683 | data->args->args[data->args->nargs] = | 683 | if (rc == H_SUCCESS) { |
684 | rtas_call(ibm_suspend_me_token, 0, 1, NULL); | 684 | /* This cpu was prodded and the suspend is complete. */ |
685 | for_each_possible_cpu(i) | 685 | goto out; |
686 | plpar_hcall_norets(H_PROD,i); | 686 | } else if (rc == H_CONTINUE) { |
687 | /* All other cpus are in H_JOIN, this cpu does | ||
688 | * the suspend. | ||
689 | */ | ||
690 | printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n", | ||
691 | smp_processor_id()); | ||
692 | data->error = rtas_call(data->token, 0, 1, NULL); | ||
693 | |||
694 | if (data->error) | ||
695 | printk(KERN_DEBUG "ibm,suspend-me returned %d\n", | ||
696 | data->error); | ||
687 | } else { | 697 | } else { |
688 | data->waiting = -EBUSY; | 698 | printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n", |
689 | printk(KERN_ERR "Error on H_JOIN hypervisor call\n"); | 699 | smp_processor_id(), rc); |
700 | data->error = rc; | ||
690 | } | 701 | } |
691 | 702 | /* This cpu did the suspend or got an error; in either case, | |
703 | * we need to prod all other other cpus out of join state. | ||
704 | * Extra prods are harmless. | ||
705 | */ | ||
706 | for_each_online_cpu(cpu) | ||
707 | plpar_hcall_norets(H_PROD, get_hard_smp_processor_id(cpu)); | ||
692 | out: | 708 | out: |
693 | local_irq_restore(flags); | 709 | if (atomic_dec_return(&data->working) == 0) |
694 | return; | 710 | complete(data->complete); |
695 | } | 711 | } |
696 | 712 | ||
697 | static int rtas_ibm_suspend_me(struct rtas_args *args) | 713 | static int rtas_ibm_suspend_me(struct rtas_args *args) |
698 | { | 714 | { |
699 | int i; | ||
700 | long state; | 715 | long state; |
701 | long rc; | 716 | long rc; |
702 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; | 717 | unsigned long retbuf[PLPAR_HCALL_BUFSIZE]; |
703 | struct rtas_suspend_me_data data; | 718 | struct rtas_suspend_me_data data; |
719 | DECLARE_COMPLETION_ONSTACK(done); | ||
720 | |||
721 | if (!rtas_service_present("ibm,suspend-me")) | ||
722 | return -ENOSYS; | ||
704 | 723 | ||
705 | /* Make sure the state is valid */ | 724 | /* Make sure the state is valid */ |
706 | rc = plpar_hcall(H_VASI_STATE, retbuf, | 725 | rc = plpar_hcall(H_VASI_STATE, retbuf, |
@@ -721,25 +740,23 @@ static int rtas_ibm_suspend_me(struct rtas_args *args) | |||
721 | return 0; | 740 | return 0; |
722 | } | 741 | } |
723 | 742 | ||
724 | data.waiting = 1; | 743 | atomic_set(&data.working, 0); |
725 | data.args = args; | 744 | data.token = rtas_token("ibm,suspend-me"); |
745 | data.error = 0; | ||
746 | data.complete = &done; | ||
726 | 747 | ||
727 | /* Call function on all CPUs. One of us will make the | 748 | /* Call function on all CPUs. One of us will make the |
728 | * rtas call | 749 | * rtas call |
729 | */ | 750 | */ |
730 | if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0)) | 751 | if (on_each_cpu(rtas_percpu_suspend_me, &data, 1, 0)) |
731 | data.waiting = -EINVAL; | 752 | data.error = -EINVAL; |
732 | 753 | ||
733 | if (data.waiting != 0) | 754 | wait_for_completion(&done); |
734 | printk(KERN_ERR "Error doing global join\n"); | ||
735 | 755 | ||
736 | /* Prod each CPU. This won't hurt, and will wake | 756 | if (data.error != 0) |
737 | * anyone we successfully put to sleep with H_JOIN. | 757 | printk(KERN_ERR "Error doing global join\n"); |
738 | */ | ||
739 | for_each_possible_cpu(i) | ||
740 | plpar_hcall_norets(H_PROD, i); | ||
741 | 758 | ||
742 | return data.waiting; | 759 | return data.error; |
743 | } | 760 | } |
744 | #else /* CONFIG_PPC_PSERIES */ | 761 | #else /* CONFIG_PPC_PSERIES */ |
745 | static int rtas_ibm_suspend_me(struct rtas_args *args) | 762 | static int rtas_ibm_suspend_me(struct rtas_args *args) |
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c index c0d77723ba11..a925a8eae121 100644 --- a/arch/powerpc/kernel/time.c +++ b/arch/powerpc/kernel/time.c | |||
@@ -241,8 +241,9 @@ void account_system_vtime(struct task_struct *tsk) | |||
241 | /* deltascaled includes both user and system time. | 241 | /* deltascaled includes both user and system time. |
242 | * Hence scale it based on the purr ratio to estimate | 242 | * Hence scale it based on the purr ratio to estimate |
243 | * the system time */ | 243 | * the system time */ |
244 | deltascaled = deltascaled * get_paca()->system_time / | 244 | if (get_paca()->user_time) |
245 | (get_paca()->system_time + get_paca()->user_time); | 245 | deltascaled = deltascaled * get_paca()->system_time / |
246 | (get_paca()->system_time + get_paca()->user_time); | ||
246 | delta += get_paca()->system_time; | 247 | delta += get_paca()->system_time; |
247 | get_paca()->system_time = 0; | 248 | get_paca()->system_time = 0; |
248 | } | 249 | } |
diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index 2322ba5cce4c..3702df7dc567 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c | |||
@@ -699,11 +699,22 @@ static int __init vdso_init(void) | |||
699 | vdso_data->icache_size = ppc64_caches.isize; | 699 | vdso_data->icache_size = ppc64_caches.isize; |
700 | vdso_data->icache_line_size = ppc64_caches.iline_size; | 700 | vdso_data->icache_line_size = ppc64_caches.iline_size; |
701 | 701 | ||
702 | /* XXXOJN: Blocks should be added to ppc64_caches and used instead */ | ||
703 | vdso_data->dcache_block_size = ppc64_caches.dline_size; | ||
704 | vdso_data->icache_block_size = ppc64_caches.iline_size; | ||
705 | vdso_data->dcache_log_block_size = ppc64_caches.log_dline_size; | ||
706 | vdso_data->icache_log_block_size = ppc64_caches.log_iline_size; | ||
707 | |||
702 | /* | 708 | /* |
703 | * Calculate the size of the 64 bits vDSO | 709 | * Calculate the size of the 64 bits vDSO |
704 | */ | 710 | */ |
705 | vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; | 711 | vdso64_pages = (&vdso64_end - &vdso64_start) >> PAGE_SHIFT; |
706 | DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages); | 712 | DBG("vdso64_kbase: %p, 0x%x pages\n", vdso64_kbase, vdso64_pages); |
713 | #else | ||
714 | vdso_data->dcache_block_size = L1_CACHE_BYTES; | ||
715 | vdso_data->dcache_log_block_size = L1_CACHE_SHIFT; | ||
716 | vdso_data->icache_block_size = L1_CACHE_BYTES; | ||
717 | vdso_data->icache_log_block_size = L1_CACHE_SHIFT; | ||
707 | #endif /* CONFIG_PPC64 */ | 718 | #endif /* CONFIG_PPC64 */ |
708 | 719 | ||
709 | 720 | ||
diff --git a/arch/powerpc/kernel/vdso32/cacheflush.S b/arch/powerpc/kernel/vdso32/cacheflush.S index 9cb319992c38..1ba6feb71b31 100644 --- a/arch/powerpc/kernel/vdso32/cacheflush.S +++ b/arch/powerpc/kernel/vdso32/cacheflush.S | |||
@@ -23,29 +23,46 @@ | |||
23 | * | 23 | * |
24 | * Flushes the data cache & invalidate the instruction cache for the | 24 | * Flushes the data cache & invalidate the instruction cache for the |
25 | * provided range [start, end[ | 25 | * provided range [start, end[ |
26 | * | ||
27 | * Note: all CPUs supported by this kernel have a 128 bytes cache | ||
28 | * line size so we don't have to peek that info from the datapage | ||
29 | */ | 26 | */ |
30 | V_FUNCTION_BEGIN(__kernel_sync_dicache) | 27 | V_FUNCTION_BEGIN(__kernel_sync_dicache) |
31 | .cfi_startproc | 28 | .cfi_startproc |
32 | li r5,127 | 29 | mflr r12 |
33 | andc r6,r3,r5 /* round low to line bdy */ | 30 | .cfi_register lr,r12 |
31 | mr r11,r3 | ||
32 | bl __get_datapage@local | ||
33 | mtlr r12 | ||
34 | mr r10,r3 | ||
35 | |||
36 | lwz r7,CFG_DCACHE_BLOCKSZ(r10) | ||
37 | addi r5,r7,-1 | ||
38 | andc r6,r11,r5 /* round low to line bdy */ | ||
34 | subf r8,r6,r4 /* compute length */ | 39 | subf r8,r6,r4 /* compute length */ |
35 | add r8,r8,r5 /* ensure we get enough */ | 40 | add r8,r8,r5 /* ensure we get enough */ |
36 | srwi. r8,r8,7 /* compute line count */ | 41 | lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10) |
42 | srw. r8,r8,r9 /* compute line count */ | ||
37 | crclr cr0*4+so | 43 | crclr cr0*4+so |
38 | beqlr /* nothing to do? */ | 44 | beqlr /* nothing to do? */ |
39 | mtctr r8 | 45 | mtctr r8 |
40 | mr r3,r6 | 46 | 1: dcbst 0,r6 |
41 | 1: dcbst 0,r3 | 47 | add r6,r6,r7 |
42 | addi r3,r3,128 | ||
43 | bdnz 1b | 48 | bdnz 1b |
44 | sync | 49 | sync |
50 | |||
51 | /* Now invalidate the instruction cache */ | ||
52 | |||
53 | lwz r7,CFG_ICACHE_BLOCKSZ(r10) | ||
54 | addi r5,r7,-1 | ||
55 | andc r6,r11,r5 /* round low to line bdy */ | ||
56 | subf r8,r6,r4 /* compute length */ | ||
57 | add r8,r8,r5 | ||
58 | lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10) | ||
59 | srw. r8,r8,r9 /* compute line count */ | ||
60 | crclr cr0*4+so | ||
61 | beqlr /* nothing to do? */ | ||
45 | mtctr r8 | 62 | mtctr r8 |
46 | 1: icbi 0,r6 | 63 | 2: icbi 0,r6 |
47 | addi r6,r6,128 | 64 | add r6,r6,r7 |
48 | bdnz 1b | 65 | bdnz 2b |
49 | isync | 66 | isync |
50 | li r3,0 | 67 | li r3,0 |
51 | blr | 68 | blr |
diff --git a/arch/powerpc/kernel/vdso64/cacheflush.S b/arch/powerpc/kernel/vdso64/cacheflush.S index 66a36d3cc6ad..69c5af2b3c96 100644 --- a/arch/powerpc/kernel/vdso64/cacheflush.S +++ b/arch/powerpc/kernel/vdso64/cacheflush.S | |||
@@ -23,29 +23,46 @@ | |||
23 | * | 23 | * |
24 | * Flushes the data cache & invalidate the instruction cache for the | 24 | * Flushes the data cache & invalidate the instruction cache for the |
25 | * provided range [start, end[ | 25 | * provided range [start, end[ |
26 | * | ||
27 | * Note: all CPUs supported by this kernel have a 128 bytes cache | ||
28 | * line size so we don't have to peek that info from the datapage | ||
29 | */ | 26 | */ |
30 | V_FUNCTION_BEGIN(__kernel_sync_dicache) | 27 | V_FUNCTION_BEGIN(__kernel_sync_dicache) |
31 | .cfi_startproc | 28 | .cfi_startproc |
32 | li r5,127 | 29 | mflr r12 |
33 | andc r6,r3,r5 /* round low to line bdy */ | 30 | .cfi_register lr,r12 |
31 | mr r11,r3 | ||
32 | bl V_LOCAL_FUNC(__get_datapage) | ||
33 | mtlr r12 | ||
34 | mr r10,r3 | ||
35 | |||
36 | lwz r7,CFG_DCACHE_BLOCKSZ(r10) | ||
37 | addi r5,r7,-1 | ||
38 | andc r6,r11,r5 /* round low to line bdy */ | ||
34 | subf r8,r6,r4 /* compute length */ | 39 | subf r8,r6,r4 /* compute length */ |
35 | add r8,r8,r5 /* ensure we get enough */ | 40 | add r8,r8,r5 /* ensure we get enough */ |
36 | srwi. r8,r8,7 /* compute line count */ | 41 | lwz r9,CFG_DCACHE_LOGBLOCKSZ(r10) |
42 | srw. r8,r8,r9 /* compute line count */ | ||
37 | crclr cr0*4+so | 43 | crclr cr0*4+so |
38 | beqlr /* nothing to do? */ | 44 | beqlr /* nothing to do? */ |
39 | mtctr r8 | 45 | mtctr r8 |
40 | mr r3,r6 | 46 | 1: dcbst 0,r6 |
41 | 1: dcbst 0,r3 | 47 | add r6,r6,r7 |
42 | addi r3,r3,128 | ||
43 | bdnz 1b | 48 | bdnz 1b |
44 | sync | 49 | sync |
50 | |||
51 | /* Now invalidate the instruction cache */ | ||
52 | |||
53 | lwz r7,CFG_ICACHE_BLOCKSZ(r10) | ||
54 | addi r5,r7,-1 | ||
55 | andc r6,r11,r5 /* round low to line bdy */ | ||
56 | subf r8,r6,r4 /* compute length */ | ||
57 | add r8,r8,r5 | ||
58 | lwz r9,CFG_ICACHE_LOGBLOCKSZ(r10) | ||
59 | srw. r8,r8,r9 /* compute line count */ | ||
60 | crclr cr0*4+so | ||
61 | beqlr /* nothing to do? */ | ||
45 | mtctr r8 | 62 | mtctr r8 |
46 | 1: icbi 0,r6 | 63 | 2: icbi 0,r6 |
47 | addi r6,r6,128 | 64 | add r6,r6,r7 |
48 | bdnz 1b | 65 | bdnz 2b |
49 | isync | 66 | isync |
50 | li r3,0 | 67 | li r3,0 |
51 | blr | 68 | blr |
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 81eb96ec13b2..5402fb6b3aae 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c | |||
@@ -464,7 +464,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
464 | * we invalidate the TLB here, thus avoiding dcbst | 464 | * we invalidate the TLB here, thus avoiding dcbst |
465 | * misbehaviour. | 465 | * misbehaviour. |
466 | */ | 466 | */ |
467 | _tlbie(address); | 467 | _tlbie(address, 0 /* 8xx doesn't care about PID */); |
468 | #endif | 468 | #endif |
469 | if (!PageReserved(page) | 469 | if (!PageReserved(page) |
470 | && !test_bit(PG_arch_1, &page->flags)) { | 470 | && !test_bit(PG_arch_1, &page->flags)) { |
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h index eb3a732e91db..ebfd13dc9d19 100644 --- a/arch/powerpc/mm/mmu_decl.h +++ b/arch/powerpc/mm/mmu_decl.h | |||
@@ -56,7 +56,7 @@ extern unsigned long total_lowmem; | |||
56 | * architectures. -- Dan | 56 | * architectures. -- Dan |
57 | */ | 57 | */ |
58 | #if defined(CONFIG_8xx) | 58 | #if defined(CONFIG_8xx) |
59 | #define flush_HPTE(X, va, pg) _tlbie(va) | 59 | #define flush_HPTE(X, va, pg) _tlbie(va, 0 /* 8xx doesn't care about PID */) |
60 | #define MMU_init_hw() do { } while(0) | 60 | #define MMU_init_hw() do { } while(0) |
61 | #define mmu_mapin_ram() (0UL) | 61 | #define mmu_mapin_ram() (0UL) |
62 | 62 | ||
diff --git a/arch/powerpc/mm/stab.c b/arch/powerpc/mm/stab.c index 9e85bda76216..50448d5de9d2 100644 --- a/arch/powerpc/mm/stab.c +++ b/arch/powerpc/mm/stab.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <asm/lmb.h> | 20 | #include <asm/lmb.h> |
21 | #include <asm/abs_addr.h> | 21 | #include <asm/abs_addr.h> |
22 | #include <asm/firmware.h> | 22 | #include <asm/firmware.h> |
23 | #include <asm/iseries/hv_call.h> | ||
23 | 24 | ||
24 | struct stab_entry { | 25 | struct stab_entry { |
25 | unsigned long esid_data; | 26 | unsigned long esid_data; |
diff --git a/arch/powerpc/platforms/40x/walnut.c b/arch/powerpc/platforms/40x/walnut.c index eb0c136b1c44..ff6db2431798 100644 --- a/arch/powerpc/platforms/40x/walnut.c +++ b/arch/powerpc/platforms/40x/walnut.c | |||
@@ -17,12 +17,13 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/of_platform.h> | ||
21 | |||
20 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
21 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
22 | #include <asm/udbg.h> | 24 | #include <asm/udbg.h> |
23 | #include <asm/time.h> | 25 | #include <asm/time.h> |
24 | #include <asm/uic.h> | 26 | #include <asm/uic.h> |
25 | #include <asm/of_platform.h> | ||
26 | 27 | ||
27 | static struct of_device_id walnut_of_bus[] = { | 28 | static struct of_device_id walnut_of_bus[] = { |
28 | { .compatible = "ibm,plb3", }, | 29 | { .compatible = "ibm,plb3", }, |
diff --git a/arch/powerpc/platforms/44x/bamboo.c b/arch/powerpc/platforms/44x/bamboo.c index 470e1a3fd755..be23f112184f 100644 --- a/arch/powerpc/platforms/44x/bamboo.c +++ b/arch/powerpc/platforms/44x/bamboo.c | |||
@@ -14,12 +14,13 @@ | |||
14 | * option) any later version. | 14 | * option) any later version. |
15 | */ | 15 | */ |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/of_platform.h> | ||
18 | |||
17 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
18 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
19 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
20 | #include <asm/time.h> | 22 | #include <asm/time.h> |
21 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
22 | #include <asm/of_platform.h> | ||
23 | #include "44x.h" | 24 | #include "44x.h" |
24 | 25 | ||
25 | static struct of_device_id bamboo_of_bus[] = { | 26 | static struct of_device_id bamboo_of_bus[] = { |
diff --git a/arch/powerpc/platforms/44x/ebony.c b/arch/powerpc/platforms/44x/ebony.c index 40e18fcb666c..6cd3476767cc 100644 --- a/arch/powerpc/platforms/44x/ebony.c +++ b/arch/powerpc/platforms/44x/ebony.c | |||
@@ -17,12 +17,13 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <linux/init.h> | 19 | #include <linux/init.h> |
20 | #include <linux/of_platform.h> | ||
21 | |||
20 | #include <asm/machdep.h> | 22 | #include <asm/machdep.h> |
21 | #include <asm/prom.h> | 23 | #include <asm/prom.h> |
22 | #include <asm/udbg.h> | 24 | #include <asm/udbg.h> |
23 | #include <asm/time.h> | 25 | #include <asm/time.h> |
24 | #include <asm/uic.h> | 26 | #include <asm/uic.h> |
25 | #include <asm/of_platform.h> | ||
26 | 27 | ||
27 | #include "44x.h" | 28 | #include "44x.h" |
28 | 29 | ||
diff --git a/arch/powerpc/platforms/44x/sequoia.c b/arch/powerpc/platforms/44x/sequoia.c index 30700b31d43b..21a9dd14f297 100644 --- a/arch/powerpc/platforms/44x/sequoia.c +++ b/arch/powerpc/platforms/44x/sequoia.c | |||
@@ -14,12 +14,13 @@ | |||
14 | * option) any later version. | 14 | * option) any later version. |
15 | */ | 15 | */ |
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/of_platform.h> | ||
18 | |||
17 | #include <asm/machdep.h> | 19 | #include <asm/machdep.h> |
18 | #include <asm/prom.h> | 20 | #include <asm/prom.h> |
19 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
20 | #include <asm/time.h> | 22 | #include <asm/time.h> |
21 | #include <asm/uic.h> | 23 | #include <asm/uic.h> |
22 | #include <asm/of_platform.h> | ||
23 | #include "44x.h" | 24 | #include "44x.h" |
24 | 25 | ||
25 | static struct of_device_id sequoia_of_bus[] = { | 26 | static struct of_device_id sequoia_of_bus[] = { |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 972fa8528a8c..39ee7a13b25a 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -90,10 +90,11 @@ static void __init mpc832x_sys_setup_arch(void) | |||
90 | 90 | ||
91 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) | 91 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) |
92 | != NULL){ | 92 | != NULL){ |
93 | /* Reset the Ethernet PHY */ | 93 | /* Reset the Ethernet PHYs */ |
94 | bcsr_regs[9] &= ~0x20; | 94 | #define BCSR8_FETH_RST 0x50 |
95 | bcsr_regs[8] &= ~BCSR8_FETH_RST; | ||
95 | udelay(1000); | 96 | udelay(1000); |
96 | bcsr_regs[9] |= 0x20; | 97 | bcsr_regs[8] |= BCSR8_FETH_RST; |
97 | iounmap(bcsr_regs); | 98 | iounmap(bcsr_regs); |
98 | of_node_put(np); | 99 | of_node_put(np); |
99 | } | 100 | } |
@@ -145,30 +146,6 @@ static void __init mpc832x_sys_init_IRQ(void) | |||
145 | #endif /* CONFIG_QUICC_ENGINE */ | 146 | #endif /* CONFIG_QUICC_ENGINE */ |
146 | } | 147 | } |
147 | 148 | ||
148 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | ||
149 | extern ulong ds1374_get_rtc_time(void); | ||
150 | extern int ds1374_set_rtc_time(ulong); | ||
151 | |||
152 | static int __init mpc832x_rtc_hookup(void) | ||
153 | { | ||
154 | struct timespec tv; | ||
155 | |||
156 | if (!machine_is(mpc832x_mds)) | ||
157 | return 0; | ||
158 | |||
159 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | ||
160 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | ||
161 | |||
162 | tv.tv_nsec = 0; | ||
163 | tv.tv_sec = (ppc_md.get_rtc_time) (); | ||
164 | do_settimeofday(&tv); | ||
165 | |||
166 | return 0; | ||
167 | } | ||
168 | |||
169 | late_initcall(mpc832x_rtc_hookup); | ||
170 | #endif | ||
171 | |||
172 | /* | 149 | /* |
173 | * Called very early, MMU is off, device-tree isn't unflattened | 150 | * Called very early, MMU is off, device-tree isn't unflattened |
174 | */ | 151 | */ |
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index fbca336aa0ae..d4bd04001b99 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -15,7 +15,10 @@ | |||
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <linux/pci.h> | 17 | #include <linux/pci.h> |
18 | #include <linux/interrupt.h> | ||
18 | #include <linux/spi/spi.h> | 19 | #include <linux/spi/spi.h> |
20 | #include <linux/spi/mmc_spi.h> | ||
21 | #include <linux/mmc/host.h> | ||
19 | 22 | ||
20 | #include <asm/of_platform.h> | 23 | #include <asm/of_platform.h> |
21 | #include <asm/time.h> | 24 | #include <asm/time.h> |
@@ -46,15 +49,16 @@ static void mpc83xx_spi_deactivate_cs(u8 cs, u8 polarity) | |||
46 | par_io_data_set(3, 13, !polarity); | 49 | par_io_data_set(3, 13, !polarity); |
47 | } | 50 | } |
48 | 51 | ||
52 | static struct mmc_spi_platform_data mpc832x_mmc_pdata = { | ||
53 | .ocr_mask = MMC_VDD_33_34, | ||
54 | }; | ||
55 | |||
49 | static struct spi_board_info mpc832x_spi_boardinfo = { | 56 | static struct spi_board_info mpc832x_spi_boardinfo = { |
50 | .bus_num = 0x4c0, | 57 | .bus_num = 0x4c0, |
51 | .chip_select = 0, | 58 | .chip_select = 0, |
52 | .max_speed_hz = 50000000, | 59 | .max_speed_hz = 50000000, |
53 | /* | 60 | .modalias = "mmc_spi", |
54 | * XXX: This is spidev (spi in userspace) stub, should | 61 | .platform_data = &mpc832x_mmc_pdata, |
55 | * be replaced by "mmc_spi" when mmc_spi will hit mainline. | ||
56 | */ | ||
57 | .modalias = "spidev", | ||
58 | }; | 62 | }; |
59 | 63 | ||
60 | static int __init mpc832x_spi_init(void) | 64 | static int __init mpc832x_spi_init(void) |
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 00aed7c2269e..a81bb3ce6b94 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
@@ -106,30 +106,6 @@ static void __init mpc834x_mds_init_IRQ(void) | |||
106 | ipic_set_default_priority(); | 106 | ipic_set_default_priority(); |
107 | } | 107 | } |
108 | 108 | ||
109 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | ||
110 | extern ulong ds1374_get_rtc_time(void); | ||
111 | extern int ds1374_set_rtc_time(ulong); | ||
112 | |||
113 | static int __init mpc834x_rtc_hookup(void) | ||
114 | { | ||
115 | struct timespec tv; | ||
116 | |||
117 | if (!machine_is(mpc834x_mds)) | ||
118 | return 0; | ||
119 | |||
120 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | ||
121 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | ||
122 | |||
123 | tv.tv_nsec = 0; | ||
124 | tv.tv_sec = (ppc_md.get_rtc_time) (); | ||
125 | do_settimeofday(&tv); | ||
126 | |||
127 | return 0; | ||
128 | } | ||
129 | |||
130 | late_initcall(mpc834x_rtc_hookup); | ||
131 | #endif | ||
132 | |||
133 | /* | 109 | /* |
134 | * Called very early, MMU is off, device-tree isn't unflattened | 110 | * Called very early, MMU is off, device-tree isn't unflattened |
135 | */ | 111 | */ |
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index 0f3855c95ff5..e40012f8f488 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -96,14 +96,39 @@ static void __init mpc836x_mds_setup_arch(void) | |||
96 | 96 | ||
97 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) | 97 | if ((np = of_find_compatible_node(NULL, "network", "ucc_geth")) |
98 | != NULL){ | 98 | != NULL){ |
99 | uint svid; | ||
100 | |||
99 | /* Reset the Ethernet PHY */ | 101 | /* Reset the Ethernet PHY */ |
100 | bcsr_regs[9] &= ~0x20; | 102 | #define BCSR9_GETHRST 0x20 |
103 | clrbits8(&bcsr_regs[9], BCSR9_GETHRST); | ||
101 | udelay(1000); | 104 | udelay(1000); |
102 | bcsr_regs[9] |= 0x20; | 105 | setbits8(&bcsr_regs[9], BCSR9_GETHRST); |
106 | |||
107 | /* handle mpc8360ea rev.2.1 erratum 2: RGMII Timing */ | ||
108 | svid = mfspr(SPRN_SVR); | ||
109 | if (svid == 0x80480021) { | ||
110 | void __iomem *immap; | ||
111 | |||
112 | immap = ioremap(get_immrbase() + 0x14a8, 8); | ||
113 | |||
114 | /* | ||
115 | * IMMR + 0x14A8[4:5] = 11 (clk delay for UCC 2) | ||
116 | * IMMR + 0x14A8[18:19] = 11 (clk delay for UCC 1) | ||
117 | */ | ||
118 | setbits32(immap, 0x0c003000); | ||
119 | |||
120 | /* | ||
121 | * IMMR + 0x14AC[20:27] = 10101010 | ||
122 | * (data delay for both UCC's) | ||
123 | */ | ||
124 | clrsetbits_be32(immap + 4, 0xff0, 0xaa0); | ||
125 | |||
126 | iounmap(immap); | ||
127 | } | ||
128 | |||
103 | iounmap(bcsr_regs); | 129 | iounmap(bcsr_regs); |
104 | of_node_put(np); | 130 | of_node_put(np); |
105 | } | 131 | } |
106 | |||
107 | #endif /* CONFIG_QUICC_ENGINE */ | 132 | #endif /* CONFIG_QUICC_ENGINE */ |
108 | } | 133 | } |
109 | 134 | ||
@@ -152,30 +177,6 @@ static void __init mpc836x_mds_init_IRQ(void) | |||
152 | #endif /* CONFIG_QUICC_ENGINE */ | 177 | #endif /* CONFIG_QUICC_ENGINE */ |
153 | } | 178 | } |
154 | 179 | ||
155 | #if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374) | ||
156 | extern ulong ds1374_get_rtc_time(void); | ||
157 | extern int ds1374_set_rtc_time(ulong); | ||
158 | |||
159 | static int __init mpc8360_rtc_hookup(void) | ||
160 | { | ||
161 | struct timespec tv; | ||
162 | |||
163 | if (!machine_is(mpc836x_mds)) | ||
164 | return 0; | ||
165 | |||
166 | ppc_md.get_rtc_time = ds1374_get_rtc_time; | ||
167 | ppc_md.set_rtc_time = ds1374_set_rtc_time; | ||
168 | |||
169 | tv.tv_nsec = 0; | ||
170 | tv.tv_sec = (ppc_md.get_rtc_time) (); | ||
171 | do_settimeofday(&tv); | ||
172 | |||
173 | return 0; | ||
174 | } | ||
175 | |||
176 | late_initcall(mpc8360_rtc_hookup); | ||
177 | #endif | ||
178 | |||
179 | /* | 180 | /* |
180 | * Called very early, MMU is off, device-tree isn't unflattened | 181 | * Called very early, MMU is off, device-tree isn't unflattened |
181 | */ | 182 | */ |
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index eafe7605cdac..b45160f8d084 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c | |||
@@ -130,7 +130,7 @@ int mpc831x_usb_cfg(void) | |||
130 | out_be32(immap + MPC83XX_SCCR_OFFS, temp); | 130 | out_be32(immap + MPC83XX_SCCR_OFFS, temp); |
131 | 131 | ||
132 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ | 132 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ |
133 | if (!strcmp(prop, "ulpi")) { | 133 | if (prop && !strcmp(prop, "ulpi")) { |
134 | temp = in_be32(immap + MPC83XX_SICRL_OFFS); | 134 | temp = in_be32(immap + MPC83XX_SICRL_OFFS); |
135 | temp &= ~MPC831X_SICRL_USB_MASK; | 135 | temp &= ~MPC831X_SICRL_USB_MASK; |
136 | temp |= MPC831X_SICRL_USB_ULPI; | 136 | temp |= MPC831X_SICRL_USB_ULPI; |
@@ -153,13 +153,13 @@ int mpc831x_usb_cfg(void) | |||
153 | usb_regs = ioremap(res.start, res.end - res.start + 1); | 153 | usb_regs = ioremap(res.start, res.end - res.start + 1); |
154 | 154 | ||
155 | /* Using on-chip PHY */ | 155 | /* Using on-chip PHY */ |
156 | if (!strcmp(prop, "utmi_wide") || | 156 | if (prop && (!strcmp(prop, "utmi_wide") || |
157 | !strcmp(prop, "utmi")) { | 157 | !strcmp(prop, "utmi"))) { |
158 | /* Set UTMI_PHY_EN, REFSEL to 48MHZ */ | 158 | /* Set UTMI_PHY_EN, REFSEL to 48MHZ */ |
159 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, | 159 | out_be32(usb_regs + FSL_USB2_CONTROL_OFFS, |
160 | CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ); | 160 | CONTROL_UTMI_PHY_EN | CONTROL_REFSEL_48MHZ); |
161 | /* Using external UPLI PHY */ | 161 | /* Using external UPLI PHY */ |
162 | } else if (!strcmp(prop, "ulpi")) { | 162 | } else if (prop && !strcmp(prop, "ulpi")) { |
163 | /* Set PHY_CLK_SEL to ULPI */ | 163 | /* Set PHY_CLK_SEL to ULPI */ |
164 | temp = CONTROL_PHY_CLK_SEL_ULPI; | 164 | temp = CONTROL_PHY_CLK_SEL_ULPI; |
165 | #ifdef CONFIG_USB_OTG | 165 | #ifdef CONFIG_USB_OTG |
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 0966d093db43..c0e968a4c211 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c | |||
@@ -171,6 +171,7 @@ static int spufs_rmdir(struct inode *parent, struct dentry *dir) | |||
171 | { | 171 | { |
172 | /* remove all entries */ | 172 | /* remove all entries */ |
173 | spufs_prune_dir(dir); | 173 | spufs_prune_dir(dir); |
174 | d_drop(dir); | ||
174 | 175 | ||
175 | return simple_rmdir(parent, dir); | 176 | return simple_rmdir(parent, dir); |
176 | } | 177 | } |
diff --git a/arch/powerpc/platforms/embedded6xx/prpmc2800.c b/arch/powerpc/platforms/embedded6xx/prpmc2800.c index e484cac75095..653a5eb91c90 100644 --- a/arch/powerpc/platforms/embedded6xx/prpmc2800.c +++ b/arch/powerpc/platforms/embedded6xx/prpmc2800.c | |||
@@ -144,6 +144,7 @@ static int __init prpmc2800_probe(void) | |||
144 | strncpy(prpmc2800_platform_name, m, | 144 | strncpy(prpmc2800_platform_name, m, |
145 | min((int)len, PLATFORM_NAME_MAX - 1)); | 145 | min((int)len, PLATFORM_NAME_MAX - 1)); |
146 | 146 | ||
147 | _set_L2CR(_get_L2CR() | L2CR_L2E); | ||
147 | return 1; | 148 | return 1; |
148 | } | 149 | } |
149 | 150 | ||
diff --git a/arch/powerpc/platforms/pasemi/setup.c b/arch/powerpc/platforms/pasemi/setup.c index 3a5d112af5e0..3d62060498b4 100644 --- a/arch/powerpc/platforms/pasemi/setup.c +++ b/arch/powerpc/platforms/pasemi/setup.c | |||
@@ -214,7 +214,7 @@ static __init void pas_init_IRQ(void) | |||
214 | printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); | 214 | printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic_addr); |
215 | 215 | ||
216 | mpic = mpic_alloc(mpic_node, openpic_addr, | 216 | mpic = mpic_alloc(mpic_node, openpic_addr, |
217 | MPIC_PRIMARY|MPIC_LARGE_VECTORS|MPIC_WANTS_RESET, | 217 | MPIC_PRIMARY|MPIC_LARGE_VECTORS, |
218 | 0, 0, " PAS-OPIC "); | 218 | 0, 0, " PAS-OPIC "); |
219 | BUG_ON(!mpic); | 219 | BUG_ON(!mpic); |
220 | 220 | ||
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 16e4e401b820..306a9d07491d 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
@@ -21,7 +21,7 @@ config PPC_SPLPAR | |||
21 | 21 | ||
22 | config EEH | 22 | config EEH |
23 | bool "PCI Extended Error Handling (EEH)" if EMBEDDED | 23 | bool "PCI Extended Error Handling (EEH)" if EMBEDDED |
24 | depends on PPC_PSERIES | 24 | depends on PPC_PSERIES && PCI |
25 | default y if !EMBEDDED | 25 | default y if !EMBEDDED |
26 | 26 | ||
27 | config SCANLOG | 27 | config SCANLOG |
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c index fdb9b1c8f977..fdeefe54ea91 100644 --- a/arch/powerpc/platforms/pseries/setup.c +++ b/arch/powerpc/platforms/pseries/setup.c | |||
@@ -507,7 +507,8 @@ define_machine(pseries) { | |||
507 | .restart = rtas_restart, | 507 | .restart = rtas_restart, |
508 | .power_off = pSeries_power_off, | 508 | .power_off = pSeries_power_off, |
509 | .halt = rtas_halt, | 509 | .halt = rtas_halt, |
510 | .panic = rtas_os_term, | 510 | .panic = rtas_panic_msg, |
511 | .machine_shutdown = rtas_os_term, | ||
511 | .get_boot_time = rtas_get_boot_time, | 512 | .get_boot_time = rtas_get_boot_time, |
512 | .get_rtc_time = rtas_get_rtc_time, | 513 | .get_rtc_time = rtas_get_rtc_time, |
513 | .set_rtc_time = rtas_set_rtc_time, | 514 | .set_rtc_time = rtas_set_rtc_time, |
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c index 5149716c734d..847a5496b869 100644 --- a/arch/powerpc/sysdev/uic.c +++ b/arch/powerpc/sysdev/uic.c | |||
@@ -97,6 +97,22 @@ static void uic_ack_irq(unsigned int virq) | |||
97 | spin_unlock_irqrestore(&uic->lock, flags); | 97 | spin_unlock_irqrestore(&uic->lock, flags); |
98 | } | 98 | } |
99 | 99 | ||
100 | static void uic_mask_ack_irq(unsigned int virq) | ||
101 | { | ||
102 | struct uic *uic = get_irq_chip_data(virq); | ||
103 | unsigned int src = uic_irq_to_hw(virq); | ||
104 | unsigned long flags; | ||
105 | u32 er, sr; | ||
106 | |||
107 | sr = 1 << (31-src); | ||
108 | spin_lock_irqsave(&uic->lock, flags); | ||
109 | er = mfdcr(uic->dcrbase + UIC_ER); | ||
110 | er &= ~sr; | ||
111 | mtdcr(uic->dcrbase + UIC_ER, er); | ||
112 | mtdcr(uic->dcrbase + UIC_SR, sr); | ||
113 | spin_unlock_irqrestore(&uic->lock, flags); | ||
114 | } | ||
115 | |||
100 | static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) | 116 | static int uic_set_irq_type(unsigned int virq, unsigned int flow_type) |
101 | { | 117 | { |
102 | struct uic *uic = get_irq_chip_data(virq); | 118 | struct uic *uic = get_irq_chip_data(virq); |
@@ -152,7 +168,7 @@ static struct irq_chip uic_irq_chip = { | |||
152 | .typename = " UIC ", | 168 | .typename = " UIC ", |
153 | .unmask = uic_unmask_irq, | 169 | .unmask = uic_unmask_irq, |
154 | .mask = uic_mask_irq, | 170 | .mask = uic_mask_irq, |
155 | /* .mask_ack = uic_mask_irq_and_ack, */ | 171 | .mask_ack = uic_mask_ack_irq, |
156 | .ack = uic_ack_irq, | 172 | .ack = uic_ack_irq, |
157 | .set_type = uic_set_irq_type, | 173 | .set_type = uic_set_irq_type, |
158 | }; | 174 | }; |
diff --git a/arch/ppc/kernel/setup.c b/arch/ppc/kernel/setup.c index aac88c2f3db9..5255bd80aa6b 100644 --- a/arch/ppc/kernel/setup.c +++ b/arch/ppc/kernel/setup.c | |||
@@ -312,7 +312,14 @@ early_init(int r3, int r4, int r5) | |||
312 | * Identify the CPU type and fix up code sections | 312 | * Identify the CPU type and fix up code sections |
313 | * that depend on which cpu we have. | 313 | * that depend on which cpu we have. |
314 | */ | 314 | */ |
315 | #if defined(CONFIG_440EP) && defined(CONFIG_PPC_FPU) | ||
316 | /* We pass the virtual PVR here for 440EP as 440EP and 440GR have | ||
317 | * identical PVRs and there is no reliable way to check for the FPU | ||
318 | */ | ||
319 | spec = identify_cpu(offset, (mfspr(SPRN_PVR) | 0x8)); | ||
320 | #else | ||
315 | spec = identify_cpu(offset, mfspr(SPRN_PVR)); | 321 | spec = identify_cpu(offset, mfspr(SPRN_PVR)); |
322 | #endif | ||
316 | do_feature_fixups(spec->cpu_features, | 323 | do_feature_fixups(spec->cpu_features, |
317 | PTRRELOC(&__start___ftr_fixup), | 324 | PTRRELOC(&__start___ftr_fixup), |
318 | PTRRELOC(&__stop___ftr_fixup)); | 325 | PTRRELOC(&__stop___ftr_fixup)); |
diff --git a/arch/ppc/mm/init.c b/arch/ppc/mm/init.c index 390dd1995c2a..dd898d32480e 100644 --- a/arch/ppc/mm/init.c +++ b/arch/ppc/mm/init.c | |||
@@ -561,7 +561,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, | |||
561 | * That means the zeroed TLB has to be invalidated | 561 | * That means the zeroed TLB has to be invalidated |
562 | * whenever a page miss occurs. | 562 | * whenever a page miss occurs. |
563 | */ | 563 | */ |
564 | _tlbie(address); | 564 | _tlbie(address, 0 /* 8xx doesn't care about PID */); |
565 | #endif | 565 | #endif |
566 | if (!PageReserved(page) | 566 | if (!PageReserved(page) |
567 | && !test_bit(PG_arch_1, &page->flags)) { | 567 | && !test_bit(PG_arch_1, &page->flags)) { |
diff --git a/arch/ppc/mm/mmu_decl.h b/arch/ppc/mm/mmu_decl.h index f1d4f2109a99..b298b60c202f 100644 --- a/arch/ppc/mm/mmu_decl.h +++ b/arch/ppc/mm/mmu_decl.h | |||
@@ -49,7 +49,7 @@ extern unsigned int num_tlbcam_entries; | |||
49 | * architectures. -- Dan | 49 | * architectures. -- Dan |
50 | */ | 50 | */ |
51 | #if defined(CONFIG_8xx) | 51 | #if defined(CONFIG_8xx) |
52 | #define flush_HPTE(X, va, pg) _tlbie(va) | 52 | #define flush_HPTE(X, va, pg) _tlbie(va, 0 /* 8xx doesn't care about PID */) |
53 | #define MMU_init_hw() do { } while(0) | 53 | #define MMU_init_hw() do { } while(0) |
54 | #define mmu_mapin_ram() (0UL) | 54 | #define mmu_mapin_ram() (0UL) |
55 | 55 | ||
diff --git a/arch/ppc/platforms/4xx/yucca.c b/arch/ppc/platforms/4xx/yucca.c index a83b0baea011..66a44ff0d926 100644 --- a/arch/ppc/platforms/4xx/yucca.c +++ b/arch/ppc/platforms/4xx/yucca.c | |||
@@ -211,6 +211,7 @@ static void __init yucca_setup_pcie_fpga_rootpoint(int port) | |||
211 | break; | 211 | break; |
212 | 212 | ||
213 | default: | 213 | default: |
214 | iounmap(pcie_reg_fpga_base); | ||
214 | return; | 215 | return; |
215 | } | 216 | } |
216 | 217 | ||
diff --git a/arch/ppc/syslib/virtex_devices.c b/arch/ppc/syslib/virtex_devices.c index ace4ec08de51..f658ff3b3890 100644 --- a/arch/ppc/syslib/virtex_devices.c +++ b/arch/ppc/syslib/virtex_devices.c | |||
@@ -87,6 +87,29 @@ | |||
87 | }, \ | 87 | }, \ |
88 | } | 88 | } |
89 | 89 | ||
90 | #define XPAR_AC97_CONTROLLER_REFERENCE(num) { \ | ||
91 | .name = "ml403_ac97cr", \ | ||
92 | .id = num, \ | ||
93 | .num_resources = 3, \ | ||
94 | .resource = (struct resource[]) { \ | ||
95 | { \ | ||
96 | .start = XPAR_OPB_AC97_CONTROLLER_REF_##num##_BASEADDR, \ | ||
97 | .end = XPAR_OPB_AC97_CONTROLLER_REF_##num##_HIGHADDR, \ | ||
98 | .flags = IORESOURCE_MEM, \ | ||
99 | }, \ | ||
100 | { \ | ||
101 | .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \ | ||
102 | .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_PLAYBACK_INTERRUPT_INTR, \ | ||
103 | .flags = IORESOURCE_IRQ, \ | ||
104 | }, \ | ||
105 | { \ | ||
106 | .start = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \ | ||
107 | .end = XPAR_OPB_INTC_0_OPB_AC97_CONTROLLER_REF_##num##_RECORD_INTERRUPT_INTR, \ | ||
108 | .flags = IORESOURCE_IRQ, \ | ||
109 | }, \ | ||
110 | }, \ | ||
111 | } | ||
112 | |||
90 | /* UART 8250 driver platform data table */ | 113 | /* UART 8250 driver platform data table */ |
91 | struct plat_serial8250_port virtex_serial_platform_data[] = { | 114 | struct plat_serial8250_port virtex_serial_platform_data[] = { |
92 | #if defined(XPAR_UARTNS550_0_BASEADDR) | 115 | #if defined(XPAR_UARTNS550_0_BASEADDR) |
@@ -173,6 +196,14 @@ struct platform_device virtex_platform_devices[] = { | |||
173 | #if defined(XPAR_TFT_3_BASEADDR) | 196 | #if defined(XPAR_TFT_3_BASEADDR) |
174 | XPAR_TFT(3), | 197 | XPAR_TFT(3), |
175 | #endif | 198 | #endif |
199 | |||
200 | /* AC97 Controller Reference instances */ | ||
201 | #if defined(XPAR_OPB_AC97_CONTROLLER_REF_0_BASEADDR) | ||
202 | XPAR_AC97_CONTROLLER_REFERENCE(0), | ||
203 | #endif | ||
204 | #if defined(XPAR_OPB_AC97_CONTROLLER_REF_1_BASEADDR) | ||
205 | XPAR_AC97_CONTROLLER_REFERENCE(1), | ||
206 | #endif | ||
176 | }; | 207 | }; |
177 | 208 | ||
178 | /* Early serial support functions */ | 209 | /* Early serial support functions */ |
diff --git a/arch/s390/appldata/appldata.h b/arch/s390/appldata/appldata.h index 4069b81f7f1d..db3ae8505103 100644 --- a/arch/s390/appldata/appldata.h +++ b/arch/s390/appldata/appldata.h | |||
@@ -45,7 +45,6 @@ struct appldata_ops { | |||
45 | int active; /* monitoring status */ | 45 | int active; /* monitoring status */ |
46 | 46 | ||
47 | /* fill in from here */ | 47 | /* fill in from here */ |
48 | unsigned int ctl_nr; /* sysctl ID */ | ||
49 | char name[APPLDATA_PROC_NAME_LENGTH]; /* name of /proc fs node */ | 48 | char name[APPLDATA_PROC_NAME_LENGTH]; /* name of /proc fs node */ |
50 | unsigned char record_nr; /* Record Nr. for Product ID */ | 49 | unsigned char record_nr; /* Record Nr. for Product ID */ |
51 | void (*callback)(void *data); /* callback function */ | 50 | void (*callback)(void *data); /* callback function */ |
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index ac61cf43a7d9..655d52543e2d 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -53,29 +53,26 @@ static int appldata_interval_handler(ctl_table *ctl, int write, | |||
53 | static struct ctl_table_header *appldata_sysctl_header; | 53 | static struct ctl_table_header *appldata_sysctl_header; |
54 | static struct ctl_table appldata_table[] = { | 54 | static struct ctl_table appldata_table[] = { |
55 | { | 55 | { |
56 | .ctl_name = CTL_APPLDATA_TIMER, | ||
57 | .procname = "timer", | 56 | .procname = "timer", |
58 | .mode = S_IRUGO | S_IWUSR, | 57 | .mode = S_IRUGO | S_IWUSR, |
59 | .proc_handler = &appldata_timer_handler, | 58 | .proc_handler = &appldata_timer_handler, |
60 | }, | 59 | }, |
61 | { | 60 | { |
62 | .ctl_name = CTL_APPLDATA_INTERVAL, | ||
63 | .procname = "interval", | 61 | .procname = "interval", |
64 | .mode = S_IRUGO | S_IWUSR, | 62 | .mode = S_IRUGO | S_IWUSR, |
65 | .proc_handler = &appldata_interval_handler, | 63 | .proc_handler = &appldata_interval_handler, |
66 | }, | 64 | }, |
67 | { .ctl_name = 0 } | 65 | { }, |
68 | }; | 66 | }; |
69 | 67 | ||
70 | static struct ctl_table appldata_dir_table[] = { | 68 | static struct ctl_table appldata_dir_table[] = { |
71 | { | 69 | { |
72 | .ctl_name = CTL_APPLDATA, | ||
73 | .procname = appldata_proc_name, | 70 | .procname = appldata_proc_name, |
74 | .maxlen = 0, | 71 | .maxlen = 0, |
75 | .mode = S_IRUGO | S_IXUGO, | 72 | .mode = S_IRUGO | S_IXUGO, |
76 | .child = appldata_table, | 73 | .child = appldata_table, |
77 | }, | 74 | }, |
78 | { .ctl_name = 0 } | 75 | { }, |
79 | }; | 76 | }; |
80 | 77 | ||
81 | /* | 78 | /* |
@@ -441,75 +438,38 @@ out: | |||
441 | */ | 438 | */ |
442 | int appldata_register_ops(struct appldata_ops *ops) | 439 | int appldata_register_ops(struct appldata_ops *ops) |
443 | { | 440 | { |
444 | struct list_head *lh; | 441 | if ((ops->size > APPLDATA_MAX_REC_SIZE) || (ops->size < 0)) |
445 | struct appldata_ops *tmp_ops; | 442 | return -EINVAL; |
446 | int i; | ||
447 | |||
448 | i = 0; | ||
449 | 443 | ||
450 | if ((ops->size > APPLDATA_MAX_REC_SIZE) || | 444 | ops->ctl_table = kzalloc(4 * sizeof(struct ctl_table), GFP_KERNEL); |
451 | (ops->size < 0)){ | 445 | if (!ops->ctl_table) |
452 | P_ERROR("Invalid size of %s record = %i, maximum = %i!\n", | ||
453 | ops->name, ops->size, APPLDATA_MAX_REC_SIZE); | ||
454 | return -ENOMEM; | ||
455 | } | ||
456 | if ((ops->ctl_nr == CTL_APPLDATA) || | ||
457 | (ops->ctl_nr == CTL_APPLDATA_TIMER) || | ||
458 | (ops->ctl_nr == CTL_APPLDATA_INTERVAL)) { | ||
459 | P_ERROR("ctl_nr %i already in use!\n", ops->ctl_nr); | ||
460 | return -EBUSY; | ||
461 | } | ||
462 | ops->ctl_table = kzalloc(4*sizeof(struct ctl_table), GFP_KERNEL); | ||
463 | if (ops->ctl_table == NULL) { | ||
464 | P_ERROR("Not enough memory for %s ctl_table!\n", ops->name); | ||
465 | return -ENOMEM; | 446 | return -ENOMEM; |
466 | } | ||
467 | 447 | ||
468 | spin_lock(&appldata_ops_lock); | 448 | spin_lock(&appldata_ops_lock); |
469 | list_for_each(lh, &appldata_ops_list) { | ||
470 | tmp_ops = list_entry(lh, struct appldata_ops, list); | ||
471 | P_DEBUG("register_ops loop: %i) name = %s, ctl = %i\n", | ||
472 | ++i, tmp_ops->name, tmp_ops->ctl_nr); | ||
473 | P_DEBUG("Comparing %s (ctl %i) with %s (ctl %i)\n", | ||
474 | tmp_ops->name, tmp_ops->ctl_nr, ops->name, | ||
475 | ops->ctl_nr); | ||
476 | if (strncmp(tmp_ops->name, ops->name, | ||
477 | APPLDATA_PROC_NAME_LENGTH) == 0) { | ||
478 | P_ERROR("Name \"%s\" already registered!\n", ops->name); | ||
479 | kfree(ops->ctl_table); | ||
480 | spin_unlock(&appldata_ops_lock); | ||
481 | return -EBUSY; | ||
482 | } | ||
483 | if (tmp_ops->ctl_nr == ops->ctl_nr) { | ||
484 | P_ERROR("ctl_nr %i already registered!\n", ops->ctl_nr); | ||
485 | kfree(ops->ctl_table); | ||
486 | spin_unlock(&appldata_ops_lock); | ||
487 | return -EBUSY; | ||
488 | } | ||
489 | } | ||
490 | list_add(&ops->list, &appldata_ops_list); | 449 | list_add(&ops->list, &appldata_ops_list); |
491 | spin_unlock(&appldata_ops_lock); | 450 | spin_unlock(&appldata_ops_lock); |
492 | 451 | ||
493 | ops->ctl_table[0].ctl_name = CTL_APPLDATA; | ||
494 | ops->ctl_table[0].procname = appldata_proc_name; | 452 | ops->ctl_table[0].procname = appldata_proc_name; |
495 | ops->ctl_table[0].maxlen = 0; | 453 | ops->ctl_table[0].maxlen = 0; |
496 | ops->ctl_table[0].mode = S_IRUGO | S_IXUGO; | 454 | ops->ctl_table[0].mode = S_IRUGO | S_IXUGO; |
497 | ops->ctl_table[0].child = &ops->ctl_table[2]; | 455 | ops->ctl_table[0].child = &ops->ctl_table[2]; |
498 | 456 | ||
499 | ops->ctl_table[1].ctl_name = 0; | ||
500 | |||
501 | ops->ctl_table[2].ctl_name = ops->ctl_nr; | ||
502 | ops->ctl_table[2].procname = ops->name; | 457 | ops->ctl_table[2].procname = ops->name; |
503 | ops->ctl_table[2].mode = S_IRUGO | S_IWUSR; | 458 | ops->ctl_table[2].mode = S_IRUGO | S_IWUSR; |
504 | ops->ctl_table[2].proc_handler = appldata_generic_handler; | 459 | ops->ctl_table[2].proc_handler = appldata_generic_handler; |
505 | ops->ctl_table[2].data = ops; | 460 | ops->ctl_table[2].data = ops; |
506 | 461 | ||
507 | ops->ctl_table[3].ctl_name = 0; | ||
508 | |||
509 | ops->sysctl_header = register_sysctl_table(ops->ctl_table); | 462 | ops->sysctl_header = register_sysctl_table(ops->ctl_table); |
510 | 463 | if (!ops->sysctl_header) | |
464 | goto out; | ||
511 | P_INFO("%s-ops registered!\n", ops->name); | 465 | P_INFO("%s-ops registered!\n", ops->name); |
512 | return 0; | 466 | return 0; |
467 | out: | ||
468 | spin_lock(&appldata_ops_lock); | ||
469 | list_del(&ops->list); | ||
470 | spin_unlock(&appldata_ops_lock); | ||
471 | kfree(ops->ctl_table); | ||
472 | return -ENOMEM; | ||
513 | } | 473 | } |
514 | 474 | ||
515 | /* | 475 | /* |
@@ -519,15 +479,11 @@ int appldata_register_ops(struct appldata_ops *ops) | |||
519 | */ | 479 | */ |
520 | void appldata_unregister_ops(struct appldata_ops *ops) | 480 | void appldata_unregister_ops(struct appldata_ops *ops) |
521 | { | 481 | { |
522 | void *table; | ||
523 | spin_lock(&appldata_ops_lock); | 482 | spin_lock(&appldata_ops_lock); |
524 | list_del(&ops->list); | 483 | list_del(&ops->list); |
525 | /* at that point any incoming access will fail */ | ||
526 | table = ops->ctl_table; | ||
527 | ops->ctl_table = NULL; | ||
528 | spin_unlock(&appldata_ops_lock); | 484 | spin_unlock(&appldata_ops_lock); |
529 | unregister_sysctl_table(ops->sysctl_header); | 485 | unregister_sysctl_table(ops->sysctl_header); |
530 | kfree(table); | 486 | kfree(ops->ctl_table); |
531 | P_INFO("%s-ops unregistered!\n", ops->name); | 487 | P_INFO("%s-ops unregistered!\n", ops->name); |
532 | } | 488 | } |
533 | /********************** module-ops management <END> **************************/ | 489 | /********************** module-ops management <END> **************************/ |
diff --git a/arch/s390/appldata/appldata_mem.c b/arch/s390/appldata/appldata_mem.c index 697eb30a68a3..51181ccdb87b 100644 --- a/arch/s390/appldata/appldata_mem.c +++ b/arch/s390/appldata/appldata_mem.c | |||
@@ -147,7 +147,6 @@ static void appldata_get_mem_data(void *data) | |||
147 | 147 | ||
148 | 148 | ||
149 | static struct appldata_ops ops = { | 149 | static struct appldata_ops ops = { |
150 | .ctl_nr = CTL_APPLDATA_MEM, | ||
151 | .name = "mem", | 150 | .name = "mem", |
152 | .record_nr = APPLDATA_RECORD_MEM_ID, | 151 | .record_nr = APPLDATA_RECORD_MEM_ID, |
153 | .size = sizeof(struct appldata_mem_data), | 152 | .size = sizeof(struct appldata_mem_data), |
diff --git a/arch/s390/appldata/appldata_net_sum.c b/arch/s390/appldata/appldata_net_sum.c index 6c1815a47714..4d8344336001 100644 --- a/arch/s390/appldata/appldata_net_sum.c +++ b/arch/s390/appldata/appldata_net_sum.c | |||
@@ -142,7 +142,6 @@ static void appldata_get_net_sum_data(void *data) | |||
142 | 142 | ||
143 | 143 | ||
144 | static struct appldata_ops ops = { | 144 | static struct appldata_ops ops = { |
145 | .ctl_nr = CTL_APPLDATA_NET_SUM, | ||
146 | .name = "net_sum", | 145 | .name = "net_sum", |
147 | .record_nr = APPLDATA_RECORD_NET_SUM_ID, | 146 | .record_nr = APPLDATA_RECORD_NET_SUM_ID, |
148 | .size = sizeof(struct appldata_net_sum_data), | 147 | .size = sizeof(struct appldata_net_sum_data), |
diff --git a/arch/s390/appldata/appldata_os.c b/arch/s390/appldata/appldata_os.c index 76a15523ae9e..6b3eafe10453 100644 --- a/arch/s390/appldata/appldata_os.c +++ b/arch/s390/appldata/appldata_os.c | |||
@@ -82,7 +82,6 @@ struct appldata_os_data { | |||
82 | static struct appldata_os_data *appldata_os_data; | 82 | static struct appldata_os_data *appldata_os_data; |
83 | 83 | ||
84 | static struct appldata_ops ops = { | 84 | static struct appldata_ops ops = { |
85 | .ctl_nr = CTL_APPLDATA_OS, | ||
86 | .name = "os", | 85 | .name = "os", |
87 | .record_nr = APPLDATA_RECORD_OS_ID, | 86 | .record_nr = APPLDATA_RECORD_OS_ID, |
88 | .owner = THIS_MODULE, | 87 | .owner = THIS_MODULE, |
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 8bf4ae1150be..1b3af7dab816 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -200,7 +200,7 @@ static noinline __init void find_memory_chunks(unsigned long memsize) | |||
200 | cc = __tprot(addr); | 200 | cc = __tprot(addr); |
201 | while (cc == old_cc) { | 201 | while (cc == old_cc) { |
202 | addr += CHUNK_INCR; | 202 | addr += CHUNK_INCR; |
203 | if (addr >= memsize) | 203 | if (memsize && addr >= memsize) |
204 | break; | 204 | break; |
205 | #ifndef CONFIG_64BIT | 205 | #ifndef CONFIG_64BIT |
206 | if (addr == ADDR2G) | 206 | if (addr == ADDR2G) |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 139ca153d5cc..b2b2edc40eb1 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -69,13 +69,31 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
69 | basr %r14,%r1 | 69 | basr %r14,%r1 |
70 | .endm | 70 | .endm |
71 | 71 | ||
72 | .macro LOCKDEP_SYS_EXIT | 72 | .macro TRACE_IRQS_CHECK |
73 | l %r1,BASED(.Llockdep_sys_exit) | 73 | tm SP_PSW(%r15),0x03 # irqs enabled? |
74 | jz 0f | ||
75 | l %r1,BASED(.Ltrace_irq_on) | ||
74 | basr %r14,%r1 | 76 | basr %r14,%r1 |
77 | j 1f | ||
78 | 0: l %r1,BASED(.Ltrace_irq_off) | ||
79 | basr %r14,%r1 | ||
80 | 1: | ||
75 | .endm | 81 | .endm |
76 | #else | 82 | #else |
77 | #define TRACE_IRQS_ON | 83 | #define TRACE_IRQS_ON |
78 | #define TRACE_IRQS_OFF | 84 | #define TRACE_IRQS_OFF |
85 | #define TRACE_IRQS_CHECK | ||
86 | #endif | ||
87 | |||
88 | #ifdef CONFIG_LOCKDEP | ||
89 | .macro LOCKDEP_SYS_EXIT | ||
90 | tm SP_PSW+1(%r15),0x01 # returning to user ? | ||
91 | jz 0f | ||
92 | l %r1,BASED(.Llockdep_sys_exit) | ||
93 | basr %r14,%r1 | ||
94 | 0: | ||
95 | .endm | ||
96 | #else | ||
79 | #define LOCKDEP_SYS_EXIT | 97 | #define LOCKDEP_SYS_EXIT |
80 | #endif | 98 | #endif |
81 | 99 | ||
@@ -234,8 +252,6 @@ sysc_saveall: | |||
234 | lh %r7,0x8a # get svc number from lowcore | 252 | lh %r7,0x8a # get svc number from lowcore |
235 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 253 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
236 | sysc_vtime: | 254 | sysc_vtime: |
237 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | ||
238 | bz BASED(sysc_do_svc) | ||
239 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER | 255 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER |
240 | sysc_stime: | 256 | sysc_stime: |
241 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 257 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
@@ -263,19 +279,34 @@ sysc_do_restart: | |||
263 | 279 | ||
264 | sysc_return: | 280 | sysc_return: |
265 | tm SP_PSW+1(%r15),0x01 # returning to user ? | 281 | tm SP_PSW+1(%r15),0x01 # returning to user ? |
266 | bno BASED(sysc_leave) | 282 | bno BASED(sysc_restore) |
267 | tm __TI_flags+3(%r9),_TIF_WORK_SVC | 283 | tm __TI_flags+3(%r9),_TIF_WORK_SVC |
268 | bnz BASED(sysc_work) # there is work to do (signals etc.) | 284 | bnz BASED(sysc_work) # there is work to do (signals etc.) |
285 | sysc_restore: | ||
286 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
287 | la %r1,BASED(sysc_restore_trace_psw) | ||
288 | lpsw 0(%r1) | ||
289 | sysc_restore_trace: | ||
290 | TRACE_IRQS_CHECK | ||
269 | LOCKDEP_SYS_EXIT | 291 | LOCKDEP_SYS_EXIT |
292 | #endif | ||
270 | sysc_leave: | 293 | sysc_leave: |
271 | RESTORE_ALL __LC_RETURN_PSW,1 | 294 | RESTORE_ALL __LC_RETURN_PSW,1 |
295 | sysc_done: | ||
296 | |||
297 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
298 | .align 8 | ||
299 | .globl sysc_restore_trace_psw | ||
300 | sysc_restore_trace_psw: | ||
301 | .long 0, sysc_restore_trace + 0x80000000 | ||
302 | #endif | ||
272 | 303 | ||
273 | # | 304 | # |
274 | # recheck if there is more work to do | 305 | # recheck if there is more work to do |
275 | # | 306 | # |
276 | sysc_work_loop: | 307 | sysc_work_loop: |
277 | tm __TI_flags+3(%r9),_TIF_WORK_SVC | 308 | tm __TI_flags+3(%r9),_TIF_WORK_SVC |
278 | bz BASED(sysc_leave) # there is no work to do | 309 | bz BASED(sysc_restore) # there is no work to do |
279 | # | 310 | # |
280 | # One of the work bits is on. Find out which one. | 311 | # One of the work bits is on. Find out which one. |
281 | # | 312 | # |
@@ -290,8 +321,8 @@ sysc_work: | |||
290 | bo BASED(sysc_restart) | 321 | bo BASED(sysc_restart) |
291 | tm __TI_flags+3(%r9),_TIF_SINGLE_STEP | 322 | tm __TI_flags+3(%r9),_TIF_SINGLE_STEP |
292 | bo BASED(sysc_singlestep) | 323 | bo BASED(sysc_singlestep) |
293 | LOCKDEP_SYS_EXIT | 324 | b BASED(sysc_restore) |
294 | b BASED(sysc_leave) | 325 | sysc_work_done: |
295 | 326 | ||
296 | # | 327 | # |
297 | # _TIF_NEED_RESCHED is set, call schedule | 328 | # _TIF_NEED_RESCHED is set, call schedule |
@@ -458,6 +489,7 @@ pgm_check_handler: | |||
458 | pgm_no_vtime: | 489 | pgm_no_vtime: |
459 | #endif | 490 | #endif |
460 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 491 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
492 | TRACE_IRQS_OFF | ||
461 | l %r3,__LC_PGM_ILC # load program interruption code | 493 | l %r3,__LC_PGM_ILC # load program interruption code |
462 | la %r8,0x7f | 494 | la %r8,0x7f |
463 | nr %r8,%r3 | 495 | nr %r8,%r3 |
@@ -497,6 +529,7 @@ pgm_per_std: | |||
497 | pgm_no_vtime2: | 529 | pgm_no_vtime2: |
498 | #endif | 530 | #endif |
499 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 531 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
532 | TRACE_IRQS_OFF | ||
500 | l %r1,__TI_task(%r9) | 533 | l %r1,__TI_task(%r9) |
501 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID | 534 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID |
502 | mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS | 535 | mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS |
@@ -517,15 +550,13 @@ pgm_svcper: | |||
517 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 550 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
518 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 551 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
519 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 552 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
520 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | ||
521 | bz BASED(pgm_no_vtime3) | ||
522 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER | 553 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER |
523 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 554 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
524 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER | 555 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER |
525 | pgm_no_vtime3: | ||
526 | #endif | 556 | #endif |
527 | lh %r7,0x8a # get svc number from lowcore | 557 | lh %r7,0x8a # get svc number from lowcore |
528 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 558 | l %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
559 | TRACE_IRQS_OFF | ||
529 | l %r1,__TI_task(%r9) | 560 | l %r1,__TI_task(%r9) |
530 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID | 561 | mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID |
531 | mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS | 562 | mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS |
@@ -542,7 +573,7 @@ kernel_per: | |||
542 | mvi SP_TRAP+1(%r15),0x28 # set trap indication to pgm check | 573 | mvi SP_TRAP+1(%r15),0x28 # set trap indication to pgm check |
543 | la %r2,SP_PTREGS(%r15) # address of register-save area | 574 | la %r2,SP_PTREGS(%r15) # address of register-save area |
544 | l %r1,BASED(.Lhandle_per) # load adr. of per handler | 575 | l %r1,BASED(.Lhandle_per) # load adr. of per handler |
545 | la %r14,BASED(sysc_leave) # load adr. of system return | 576 | la %r14,BASED(sysc_restore)# load adr. of system return |
546 | br %r1 # branch to do_single_step | 577 | br %r1 # branch to do_single_step |
547 | 578 | ||
548 | /* | 579 | /* |
@@ -569,26 +600,38 @@ io_no_vtime: | |||
569 | l %r1,BASED(.Ldo_IRQ) # load address of do_IRQ | 600 | l %r1,BASED(.Ldo_IRQ) # load address of do_IRQ |
570 | la %r2,SP_PTREGS(%r15) # address of register-save area | 601 | la %r2,SP_PTREGS(%r15) # address of register-save area |
571 | basr %r14,%r1 # branch to standard irq handler | 602 | basr %r14,%r1 # branch to standard irq handler |
572 | TRACE_IRQS_ON | ||
573 | |||
574 | io_return: | 603 | io_return: |
575 | tm SP_PSW+1(%r15),0x01 # returning to user ? | 604 | tm SP_PSW+1(%r15),0x01 # returning to user ? |
576 | #ifdef CONFIG_PREEMPT | 605 | #ifdef CONFIG_PREEMPT |
577 | bno BASED(io_preempt) # no -> check for preemptive scheduling | 606 | bno BASED(io_preempt) # no -> check for preemptive scheduling |
578 | #else | 607 | #else |
579 | bno BASED(io_leave) # no-> skip resched & signal | 608 | bno BASED(io_restore) # no-> skip resched & signal |
580 | #endif | 609 | #endif |
581 | tm __TI_flags+3(%r9),_TIF_WORK_INT | 610 | tm __TI_flags+3(%r9),_TIF_WORK_INT |
582 | bnz BASED(io_work) # there is work to do (signals etc.) | 611 | bnz BASED(io_work) # there is work to do (signals etc.) |
612 | io_restore: | ||
613 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
614 | la %r1,BASED(io_restore_trace_psw) | ||
615 | lpsw 0(%r1) | ||
616 | io_restore_trace: | ||
617 | TRACE_IRQS_CHECK | ||
583 | LOCKDEP_SYS_EXIT | 618 | LOCKDEP_SYS_EXIT |
619 | #endif | ||
584 | io_leave: | 620 | io_leave: |
585 | RESTORE_ALL __LC_RETURN_PSW,0 | 621 | RESTORE_ALL __LC_RETURN_PSW,0 |
586 | io_done: | 622 | io_done: |
587 | 623 | ||
624 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
625 | .align 8 | ||
626 | .globl io_restore_trace_psw | ||
627 | io_restore_trace_psw: | ||
628 | .long 0, io_restore_trace + 0x80000000 | ||
629 | #endif | ||
630 | |||
588 | #ifdef CONFIG_PREEMPT | 631 | #ifdef CONFIG_PREEMPT |
589 | io_preempt: | 632 | io_preempt: |
590 | icm %r0,15,__TI_precount(%r9) | 633 | icm %r0,15,__TI_precount(%r9) |
591 | bnz BASED(io_leave) | 634 | bnz BASED(io_restore) |
592 | l %r1,SP_R15(%r15) | 635 | l %r1,SP_R15(%r15) |
593 | s %r1,BASED(.Lc_spsize) | 636 | s %r1,BASED(.Lc_spsize) |
594 | mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) | 637 | mvc SP_PTREGS(__PT_SIZE,%r1),SP_PTREGS(%r15) |
@@ -596,14 +639,10 @@ io_preempt: | |||
596 | lr %r15,%r1 | 639 | lr %r15,%r1 |
597 | io_resume_loop: | 640 | io_resume_loop: |
598 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED | 641 | tm __TI_flags+3(%r9),_TIF_NEED_RESCHED |
599 | bno BASED(io_leave) | 642 | bno BASED(io_restore) |
600 | mvc __TI_precount(4,%r9),BASED(.Lc_pactive) | 643 | l %r1,BASED(.Lpreempt_schedule_irq) |
601 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 644 | la %r14,BASED(io_resume_loop) |
602 | l %r1,BASED(.Lschedule) | 645 | br %r1 # call schedule |
603 | basr %r14,%r1 # call schedule | ||
604 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | ||
605 | xc __TI_precount(4,%r9),__TI_precount(%r9) | ||
606 | b BASED(io_resume_loop) | ||
607 | #endif | 646 | #endif |
608 | 647 | ||
609 | # | 648 | # |
@@ -627,40 +666,42 @@ io_work_loop: | |||
627 | bo BASED(io_reschedule) | 666 | bo BASED(io_reschedule) |
628 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 667 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
629 | bnz BASED(io_sigpending) | 668 | bnz BASED(io_sigpending) |
630 | LOCKDEP_SYS_EXIT | 669 | b BASED(io_restore) |
631 | b BASED(io_leave) | 670 | io_work_done: |
632 | 671 | ||
633 | # | 672 | # |
634 | # _TIF_MCCK_PENDING is set, call handler | 673 | # _TIF_MCCK_PENDING is set, call handler |
635 | # | 674 | # |
636 | io_mcck_pending: | 675 | io_mcck_pending: |
637 | TRACE_IRQS_OFF | ||
638 | l %r1,BASED(.Ls390_handle_mcck) | 676 | l %r1,BASED(.Ls390_handle_mcck) |
639 | basr %r14,%r1 # TIF bit will be cleared by handler | 677 | basr %r14,%r1 # TIF bit will be cleared by handler |
640 | TRACE_IRQS_ON | ||
641 | b BASED(io_work_loop) | 678 | b BASED(io_work_loop) |
642 | 679 | ||
643 | # | 680 | # |
644 | # _TIF_NEED_RESCHED is set, call schedule | 681 | # _TIF_NEED_RESCHED is set, call schedule |
645 | # | 682 | # |
646 | io_reschedule: | 683 | io_reschedule: |
684 | TRACE_IRQS_ON | ||
647 | l %r1,BASED(.Lschedule) | 685 | l %r1,BASED(.Lschedule) |
648 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 686 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
649 | basr %r14,%r1 # call scheduler | 687 | basr %r14,%r1 # call scheduler |
650 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | 688 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts |
689 | TRACE_IRQS_OFF | ||
651 | tm __TI_flags+3(%r9),_TIF_WORK_INT | 690 | tm __TI_flags+3(%r9),_TIF_WORK_INT |
652 | bz BASED(io_leave) # there is no work to do | 691 | bz BASED(io_restore) # there is no work to do |
653 | b BASED(io_work_loop) | 692 | b BASED(io_work_loop) |
654 | 693 | ||
655 | # | 694 | # |
656 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal | 695 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
657 | # | 696 | # |
658 | io_sigpending: | 697 | io_sigpending: |
698 | TRACE_IRQS_ON | ||
659 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 699 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
660 | la %r2,SP_PTREGS(%r15) # load pt_regs | 700 | la %r2,SP_PTREGS(%r15) # load pt_regs |
661 | l %r1,BASED(.Ldo_signal) | 701 | l %r1,BASED(.Ldo_signal) |
662 | basr %r14,%r1 # call do_signal | 702 | basr %r14,%r1 # call do_signal |
663 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | 703 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts |
704 | TRACE_IRQS_OFF | ||
664 | b BASED(io_work_loop) | 705 | b BASED(io_work_loop) |
665 | 706 | ||
666 | /* | 707 | /* |
@@ -688,7 +729,6 @@ ext_no_vtime: | |||
688 | lh %r3,__LC_EXT_INT_CODE # get interruption code | 729 | lh %r3,__LC_EXT_INT_CODE # get interruption code |
689 | l %r1,BASED(.Ldo_extint) | 730 | l %r1,BASED(.Ldo_extint) |
690 | basr %r14,%r1 | 731 | basr %r14,%r1 |
691 | TRACE_IRQS_ON | ||
692 | b BASED(io_return) | 732 | b BASED(io_return) |
693 | 733 | ||
694 | __critical_end: | 734 | __critical_end: |
@@ -853,15 +893,15 @@ cleanup_table_system_call: | |||
853 | cleanup_table_sysc_return: | 893 | cleanup_table_sysc_return: |
854 | .long sysc_return + 0x80000000, sysc_leave + 0x80000000 | 894 | .long sysc_return + 0x80000000, sysc_leave + 0x80000000 |
855 | cleanup_table_sysc_leave: | 895 | cleanup_table_sysc_leave: |
856 | .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 | 896 | .long sysc_leave + 0x80000000, sysc_done + 0x80000000 |
857 | cleanup_table_sysc_work_loop: | 897 | cleanup_table_sysc_work_loop: |
858 | .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 | 898 | .long sysc_work_loop + 0x80000000, sysc_work_done + 0x80000000 |
859 | cleanup_table_io_return: | 899 | cleanup_table_io_return: |
860 | .long io_return + 0x80000000, io_leave + 0x80000000 | 900 | .long io_return + 0x80000000, io_leave + 0x80000000 |
861 | cleanup_table_io_leave: | 901 | cleanup_table_io_leave: |
862 | .long io_leave + 0x80000000, io_done + 0x80000000 | 902 | .long io_leave + 0x80000000, io_done + 0x80000000 |
863 | cleanup_table_io_work_loop: | 903 | cleanup_table_io_work_loop: |
864 | .long io_work_loop + 0x80000000, io_mcck_pending + 0x80000000 | 904 | .long io_work_loop + 0x80000000, io_work_done + 0x80000000 |
865 | 905 | ||
866 | cleanup_critical: | 906 | cleanup_critical: |
867 | clc 4(4,%r12),BASED(cleanup_table_system_call) | 907 | clc 4(4,%r12),BASED(cleanup_table_system_call) |
@@ -930,8 +970,6 @@ cleanup_system_call: | |||
930 | cleanup_vtime: | 970 | cleanup_vtime: |
931 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+12) | 971 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+12) |
932 | bhe BASED(cleanup_stime) | 972 | bhe BASED(cleanup_stime) |
933 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | ||
934 | bz BASED(cleanup_novtime) | ||
935 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER | 973 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER |
936 | cleanup_stime: | 974 | cleanup_stime: |
937 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+16) | 975 | clc __LC_RETURN_PSW+4(4),BASED(cleanup_system_call_insn+16) |
@@ -939,7 +977,6 @@ cleanup_stime: | |||
939 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 977 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
940 | cleanup_update: | 978 | cleanup_update: |
941 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER | 979 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER |
942 | cleanup_novtime: | ||
943 | #endif | 980 | #endif |
944 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_system_call+4) | 981 | mvc __LC_RETURN_PSW+4(4),BASED(cleanup_table_system_call+4) |
945 | la %r12,__LC_RETURN_PSW | 982 | la %r12,__LC_RETURN_PSW |
@@ -978,10 +1015,10 @@ cleanup_sysc_leave: | |||
978 | 2: la %r12,__LC_RETURN_PSW | 1015 | 2: la %r12,__LC_RETURN_PSW |
979 | br %r14 | 1016 | br %r14 |
980 | cleanup_sysc_leave_insn: | 1017 | cleanup_sysc_leave_insn: |
1018 | .long sysc_done - 4 + 0x80000000 | ||
981 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 1019 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
982 | .long sysc_leave + 14 + 0x80000000 | 1020 | .long sysc_done - 8 + 0x80000000 |
983 | #endif | 1021 | #endif |
984 | .long sysc_leave + 10 + 0x80000000 | ||
985 | 1022 | ||
986 | cleanup_io_return: | 1023 | cleanup_io_return: |
987 | mvc __LC_RETURN_PSW(4),0(%r12) | 1024 | mvc __LC_RETURN_PSW(4),0(%r12) |
@@ -1008,10 +1045,10 @@ cleanup_io_leave: | |||
1008 | 2: la %r12,__LC_RETURN_PSW | 1045 | 2: la %r12,__LC_RETURN_PSW |
1009 | br %r14 | 1046 | br %r14 |
1010 | cleanup_io_leave_insn: | 1047 | cleanup_io_leave_insn: |
1048 | .long io_done - 4 + 0x80000000 | ||
1011 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 1049 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
1012 | .long io_leave + 18 + 0x80000000 | 1050 | .long io_done - 8 + 0x80000000 |
1013 | #endif | 1051 | #endif |
1014 | .long io_leave + 14 + 0x80000000 | ||
1015 | 1052 | ||
1016 | /* | 1053 | /* |
1017 | * Integer constants | 1054 | * Integer constants |
@@ -1019,7 +1056,6 @@ cleanup_io_leave_insn: | |||
1019 | .align 4 | 1056 | .align 4 |
1020 | .Lc_spsize: .long SP_SIZE | 1057 | .Lc_spsize: .long SP_SIZE |
1021 | .Lc_overhead: .long STACK_FRAME_OVERHEAD | 1058 | .Lc_overhead: .long STACK_FRAME_OVERHEAD |
1022 | .Lc_pactive: .long PREEMPT_ACTIVE | ||
1023 | .Lnr_syscalls: .long NR_syscalls | 1059 | .Lnr_syscalls: .long NR_syscalls |
1024 | .L0x018: .short 0x018 | 1060 | .L0x018: .short 0x018 |
1025 | .L0x020: .short 0x020 | 1061 | .L0x020: .short 0x020 |
@@ -1043,6 +1079,8 @@ cleanup_io_leave_insn: | |||
1043 | .Lexecve_tail: .long execve_tail | 1079 | .Lexecve_tail: .long execve_tail |
1044 | .Ljump_table: .long pgm_check_table | 1080 | .Ljump_table: .long pgm_check_table |
1045 | .Lschedule: .long schedule | 1081 | .Lschedule: .long schedule |
1082 | .Lpreempt_schedule_irq: | ||
1083 | .long preempt_schedule_irq | ||
1046 | .Ltrace: .long syscall_trace | 1084 | .Ltrace: .long syscall_trace |
1047 | .Lschedtail: .long schedule_tail | 1085 | .Lschedtail: .long schedule_tail |
1048 | .Lsysc_table: .long sys_call_table | 1086 | .Lsysc_table: .long sys_call_table |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 05e26d1fdf40..a3e47b893f07 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -67,12 +67,28 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | |||
67 | brasl %r14,trace_hardirqs_off | 67 | brasl %r14,trace_hardirqs_off |
68 | .endm | 68 | .endm |
69 | 69 | ||
70 | .macro LOCKDEP_SYS_EXIT | 70 | .macro TRACE_IRQS_CHECK |
71 | brasl %r14,lockdep_sys_exit | 71 | tm SP_PSW(%r15),0x03 # irqs enabled? |
72 | jz 0f | ||
73 | brasl %r14,trace_hardirqs_on | ||
74 | j 1f | ||
75 | 0: brasl %r14,trace_hardirqs_off | ||
76 | 1: | ||
72 | .endm | 77 | .endm |
73 | #else | 78 | #else |
74 | #define TRACE_IRQS_ON | 79 | #define TRACE_IRQS_ON |
75 | #define TRACE_IRQS_OFF | 80 | #define TRACE_IRQS_OFF |
81 | #define TRACE_IRQS_CHECK | ||
82 | #endif | ||
83 | |||
84 | #ifdef CONFIG_LOCKDEP | ||
85 | .macro LOCKDEP_SYS_EXIT | ||
86 | tm SP_PSW+1(%r15),0x01 # returning to user ? | ||
87 | jz 0f | ||
88 | brasl %r14,lockdep_sys_exit | ||
89 | 0: | ||
90 | .endm | ||
91 | #else | ||
76 | #define LOCKDEP_SYS_EXIT | 92 | #define LOCKDEP_SYS_EXIT |
77 | #endif | 93 | #endif |
78 | 94 | ||
@@ -222,8 +238,6 @@ sysc_saveall: | |||
222 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore | 238 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore |
223 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 239 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
224 | sysc_vtime: | 240 | sysc_vtime: |
225 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | ||
226 | jz sysc_do_svc | ||
227 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER | 241 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER |
228 | sysc_stime: | 242 | sysc_stime: |
229 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 243 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
@@ -257,19 +271,34 @@ sysc_noemu: | |||
257 | 271 | ||
258 | sysc_return: | 272 | sysc_return: |
259 | tm SP_PSW+1(%r15),0x01 # returning to user ? | 273 | tm SP_PSW+1(%r15),0x01 # returning to user ? |
260 | jno sysc_leave | 274 | jno sysc_restore |
261 | tm __TI_flags+7(%r9),_TIF_WORK_SVC | 275 | tm __TI_flags+7(%r9),_TIF_WORK_SVC |
262 | jnz sysc_work # there is work to do (signals etc.) | 276 | jnz sysc_work # there is work to do (signals etc.) |
277 | sysc_restore: | ||
278 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
279 | larl %r1,sysc_restore_trace_psw | ||
280 | lpswe 0(%r1) | ||
281 | sysc_restore_trace: | ||
282 | TRACE_IRQS_CHECK | ||
263 | LOCKDEP_SYS_EXIT | 283 | LOCKDEP_SYS_EXIT |
284 | #endif | ||
264 | sysc_leave: | 285 | sysc_leave: |
265 | RESTORE_ALL __LC_RETURN_PSW,1 | 286 | RESTORE_ALL __LC_RETURN_PSW,1 |
287 | sysc_done: | ||
288 | |||
289 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
290 | .align 8 | ||
291 | .globl sysc_restore_trace_psw | ||
292 | sysc_restore_trace_psw: | ||
293 | .quad 0, sysc_restore_trace | ||
294 | #endif | ||
266 | 295 | ||
267 | # | 296 | # |
268 | # recheck if there is more work to do | 297 | # recheck if there is more work to do |
269 | # | 298 | # |
270 | sysc_work_loop: | 299 | sysc_work_loop: |
271 | tm __TI_flags+7(%r9),_TIF_WORK_SVC | 300 | tm __TI_flags+7(%r9),_TIF_WORK_SVC |
272 | jz sysc_leave # there is no work to do | 301 | jz sysc_restore # there is no work to do |
273 | # | 302 | # |
274 | # One of the work bits is on. Find out which one. | 303 | # One of the work bits is on. Find out which one. |
275 | # | 304 | # |
@@ -284,8 +313,8 @@ sysc_work: | |||
284 | jo sysc_restart | 313 | jo sysc_restart |
285 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP | 314 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP |
286 | jo sysc_singlestep | 315 | jo sysc_singlestep |
287 | LOCKDEP_SYS_EXIT | 316 | j sysc_restore |
288 | j sysc_leave | 317 | sysc_work_done: |
289 | 318 | ||
290 | # | 319 | # |
291 | # _TIF_NEED_RESCHED is set, call schedule | 320 | # _TIF_NEED_RESCHED is set, call schedule |
@@ -445,6 +474,7 @@ pgm_check_handler: | |||
445 | pgm_no_vtime: | 474 | pgm_no_vtime: |
446 | #endif | 475 | #endif |
447 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 476 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
477 | TRACE_IRQS_OFF | ||
448 | lgf %r3,__LC_PGM_ILC # load program interruption code | 478 | lgf %r3,__LC_PGM_ILC # load program interruption code |
449 | lghi %r8,0x7f | 479 | lghi %r8,0x7f |
450 | ngr %r8,%r3 | 480 | ngr %r8,%r3 |
@@ -484,6 +514,7 @@ pgm_per_std: | |||
484 | pgm_no_vtime2: | 514 | pgm_no_vtime2: |
485 | #endif | 515 | #endif |
486 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 516 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
517 | TRACE_IRQS_OFF | ||
487 | lg %r1,__TI_task(%r9) | 518 | lg %r1,__TI_task(%r9) |
488 | tm SP_PSW+1(%r15),0x01 # kernel per event ? | 519 | tm SP_PSW+1(%r15),0x01 # kernel per event ? |
489 | jz kernel_per | 520 | jz kernel_per |
@@ -504,12 +535,9 @@ pgm_svcper: | |||
504 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 535 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
505 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 536 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
506 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 537 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
507 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | ||
508 | jz pgm_no_vtime3 | ||
509 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER | 538 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER |
510 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 539 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
511 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER | 540 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER |
512 | pgm_no_vtime3: | ||
513 | #endif | 541 | #endif |
514 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore | 542 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore |
515 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct | 543 | lg %r9,__LC_THREAD_INFO # load pointer to thread_info struct |
@@ -529,7 +557,7 @@ kernel_per: | |||
529 | lhi %r0,__LC_PGM_OLD_PSW | 557 | lhi %r0,__LC_PGM_OLD_PSW |
530 | sth %r0,SP_TRAP(%r15) # set trap indication to pgm check | 558 | sth %r0,SP_TRAP(%r15) # set trap indication to pgm check |
531 | la %r2,SP_PTREGS(%r15) # address of register-save area | 559 | la %r2,SP_PTREGS(%r15) # address of register-save area |
532 | larl %r14,sysc_leave # load adr. of system ret, no work | 560 | larl %r14,sysc_restore # load adr. of system ret, no work |
533 | jg do_single_step # branch to do_single_step | 561 | jg do_single_step # branch to do_single_step |
534 | 562 | ||
535 | /* | 563 | /* |
@@ -554,26 +582,38 @@ io_no_vtime: | |||
554 | TRACE_IRQS_OFF | 582 | TRACE_IRQS_OFF |
555 | la %r2,SP_PTREGS(%r15) # address of register-save area | 583 | la %r2,SP_PTREGS(%r15) # address of register-save area |
556 | brasl %r14,do_IRQ # call standard irq handler | 584 | brasl %r14,do_IRQ # call standard irq handler |
557 | TRACE_IRQS_ON | ||
558 | |||
559 | io_return: | 585 | io_return: |
560 | tm SP_PSW+1(%r15),0x01 # returning to user ? | 586 | tm SP_PSW+1(%r15),0x01 # returning to user ? |
561 | #ifdef CONFIG_PREEMPT | 587 | #ifdef CONFIG_PREEMPT |
562 | jno io_preempt # no -> check for preemptive scheduling | 588 | jno io_preempt # no -> check for preemptive scheduling |
563 | #else | 589 | #else |
564 | jno io_leave # no-> skip resched & signal | 590 | jno io_restore # no-> skip resched & signal |
565 | #endif | 591 | #endif |
566 | tm __TI_flags+7(%r9),_TIF_WORK_INT | 592 | tm __TI_flags+7(%r9),_TIF_WORK_INT |
567 | jnz io_work # there is work to do (signals etc.) | 593 | jnz io_work # there is work to do (signals etc.) |
594 | io_restore: | ||
595 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
596 | larl %r1,io_restore_trace_psw | ||
597 | lpswe 0(%r1) | ||
598 | io_restore_trace: | ||
599 | TRACE_IRQS_CHECK | ||
568 | LOCKDEP_SYS_EXIT | 600 | LOCKDEP_SYS_EXIT |
601 | #endif | ||
569 | io_leave: | 602 | io_leave: |
570 | RESTORE_ALL __LC_RETURN_PSW,0 | 603 | RESTORE_ALL __LC_RETURN_PSW,0 |
571 | io_done: | 604 | io_done: |
572 | 605 | ||
606 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
607 | .align 8 | ||
608 | .globl io_restore_trace_psw | ||
609 | io_restore_trace_psw: | ||
610 | .quad 0, io_restore_trace | ||
611 | #endif | ||
612 | |||
573 | #ifdef CONFIG_PREEMPT | 613 | #ifdef CONFIG_PREEMPT |
574 | io_preempt: | 614 | io_preempt: |
575 | icm %r0,15,__TI_precount(%r9) | 615 | icm %r0,15,__TI_precount(%r9) |
576 | jnz io_leave | 616 | jnz io_restore |
577 | # switch to kernel stack | 617 | # switch to kernel stack |
578 | lg %r1,SP_R15(%r15) | 618 | lg %r1,SP_R15(%r15) |
579 | aghi %r1,-SP_SIZE | 619 | aghi %r1,-SP_SIZE |
@@ -582,14 +622,9 @@ io_preempt: | |||
582 | lgr %r15,%r1 | 622 | lgr %r15,%r1 |
583 | io_resume_loop: | 623 | io_resume_loop: |
584 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED | 624 | tm __TI_flags+7(%r9),_TIF_NEED_RESCHED |
585 | jno io_leave | 625 | jno io_restore |
586 | larl %r1,.Lc_pactive | 626 | larl %r14,io_resume_loop |
587 | mvc __TI_precount(4,%r9),0(%r1) | 627 | jg preempt_schedule_irq |
588 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | ||
589 | brasl %r14,schedule # call schedule | ||
590 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | ||
591 | xc __TI_precount(4,%r9),__TI_precount(%r9) | ||
592 | j io_resume_loop | ||
593 | #endif | 628 | #endif |
594 | 629 | ||
595 | # | 630 | # |
@@ -613,37 +648,39 @@ io_work_loop: | |||
613 | jo io_reschedule | 648 | jo io_reschedule |
614 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 649 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
615 | jnz io_sigpending | 650 | jnz io_sigpending |
616 | LOCKDEP_SYS_EXIT | 651 | j io_restore |
617 | j io_leave | 652 | io_work_done: |
618 | 653 | ||
619 | # | 654 | # |
620 | # _TIF_MCCK_PENDING is set, call handler | 655 | # _TIF_MCCK_PENDING is set, call handler |
621 | # | 656 | # |
622 | io_mcck_pending: | 657 | io_mcck_pending: |
623 | TRACE_IRQS_OFF | ||
624 | brasl %r14,s390_handle_mcck # TIF bit will be cleared by handler | 658 | brasl %r14,s390_handle_mcck # TIF bit will be cleared by handler |
625 | TRACE_IRQS_ON | ||
626 | j io_work_loop | 659 | j io_work_loop |
627 | 660 | ||
628 | # | 661 | # |
629 | # _TIF_NEED_RESCHED is set, call schedule | 662 | # _TIF_NEED_RESCHED is set, call schedule |
630 | # | 663 | # |
631 | io_reschedule: | 664 | io_reschedule: |
665 | TRACE_IRQS_ON | ||
632 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 666 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
633 | brasl %r14,schedule # call scheduler | 667 | brasl %r14,schedule # call scheduler |
634 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | 668 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts |
669 | TRACE_IRQS_OFF | ||
635 | tm __TI_flags+7(%r9),_TIF_WORK_INT | 670 | tm __TI_flags+7(%r9),_TIF_WORK_INT |
636 | jz io_leave # there is no work to do | 671 | jz io_restore # there is no work to do |
637 | j io_work_loop | 672 | j io_work_loop |
638 | 673 | ||
639 | # | 674 | # |
640 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal | 675 | # _TIF_SIGPENDING or _TIF_RESTORE_SIGMASK is set, call do_signal |
641 | # | 676 | # |
642 | io_sigpending: | 677 | io_sigpending: |
678 | TRACE_IRQS_ON | ||
643 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts | 679 | stosm __SF_EMPTY(%r15),0x03 # reenable interrupts |
644 | la %r2,SP_PTREGS(%r15) # load pt_regs | 680 | la %r2,SP_PTREGS(%r15) # load pt_regs |
645 | brasl %r14,do_signal # call do_signal | 681 | brasl %r14,do_signal # call do_signal |
646 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts | 682 | stnsm __SF_EMPTY(%r15),0xfc # disable I/O and ext. interrupts |
683 | TRACE_IRQS_OFF | ||
647 | j io_work_loop | 684 | j io_work_loop |
648 | 685 | ||
649 | /* | 686 | /* |
@@ -669,7 +706,6 @@ ext_no_vtime: | |||
669 | la %r2,SP_PTREGS(%r15) # address of register-save area | 706 | la %r2,SP_PTREGS(%r15) # address of register-save area |
670 | llgh %r3,__LC_EXT_INT_CODE # get interruption code | 707 | llgh %r3,__LC_EXT_INT_CODE # get interruption code |
671 | brasl %r14,do_extint | 708 | brasl %r14,do_extint |
672 | TRACE_IRQS_ON | ||
673 | j io_return | 709 | j io_return |
674 | 710 | ||
675 | __critical_end: | 711 | __critical_end: |
@@ -824,15 +860,15 @@ cleanup_table_system_call: | |||
824 | cleanup_table_sysc_return: | 860 | cleanup_table_sysc_return: |
825 | .quad sysc_return, sysc_leave | 861 | .quad sysc_return, sysc_leave |
826 | cleanup_table_sysc_leave: | 862 | cleanup_table_sysc_leave: |
827 | .quad sysc_leave, sysc_work_loop | 863 | .quad sysc_leave, sysc_done |
828 | cleanup_table_sysc_work_loop: | 864 | cleanup_table_sysc_work_loop: |
829 | .quad sysc_work_loop, sysc_reschedule | 865 | .quad sysc_work_loop, sysc_work_done |
830 | cleanup_table_io_return: | 866 | cleanup_table_io_return: |
831 | .quad io_return, io_leave | 867 | .quad io_return, io_leave |
832 | cleanup_table_io_leave: | 868 | cleanup_table_io_leave: |
833 | .quad io_leave, io_done | 869 | .quad io_leave, io_done |
834 | cleanup_table_io_work_loop: | 870 | cleanup_table_io_work_loop: |
835 | .quad io_work_loop, io_mcck_pending | 871 | .quad io_work_loop, io_work_done |
836 | 872 | ||
837 | cleanup_critical: | 873 | cleanup_critical: |
838 | clc 8(8,%r12),BASED(cleanup_table_system_call) | 874 | clc 8(8,%r12),BASED(cleanup_table_system_call) |
@@ -901,8 +937,6 @@ cleanup_system_call: | |||
901 | cleanup_vtime: | 937 | cleanup_vtime: |
902 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+24) | 938 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+24) |
903 | jhe cleanup_stime | 939 | jhe cleanup_stime |
904 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | ||
905 | jz cleanup_novtime | ||
906 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER | 940 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_SYNC_ENTER_TIMER,__LC_USER_TIMER |
907 | cleanup_stime: | 941 | cleanup_stime: |
908 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+32) | 942 | clc __LC_RETURN_PSW+8(8),BASED(cleanup_system_call_insn+32) |
@@ -910,7 +944,6 @@ cleanup_stime: | |||
910 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 944 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
911 | cleanup_update: | 945 | cleanup_update: |
912 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER | 946 | mvc __LC_LAST_UPDATE_TIMER(8),__LC_SYNC_ENTER_TIMER |
913 | cleanup_novtime: | ||
914 | #endif | 947 | #endif |
915 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_system_call+8) | 948 | mvc __LC_RETURN_PSW+8(8),BASED(cleanup_table_system_call+8) |
916 | la %r12,__LC_RETURN_PSW | 949 | la %r12,__LC_RETURN_PSW |
@@ -949,10 +982,10 @@ cleanup_sysc_leave: | |||
949 | 2: la %r12,__LC_RETURN_PSW | 982 | 2: la %r12,__LC_RETURN_PSW |
950 | br %r14 | 983 | br %r14 |
951 | cleanup_sysc_leave_insn: | 984 | cleanup_sysc_leave_insn: |
985 | .quad sysc_done - 4 | ||
952 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 986 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
953 | .quad sysc_leave + 16 | 987 | .quad sysc_done - 8 |
954 | #endif | 988 | #endif |
955 | .quad sysc_leave + 12 | ||
956 | 989 | ||
957 | cleanup_io_return: | 990 | cleanup_io_return: |
958 | mvc __LC_RETURN_PSW(8),0(%r12) | 991 | mvc __LC_RETURN_PSW(8),0(%r12) |
@@ -979,17 +1012,16 @@ cleanup_io_leave: | |||
979 | 2: la %r12,__LC_RETURN_PSW | 1012 | 2: la %r12,__LC_RETURN_PSW |
980 | br %r14 | 1013 | br %r14 |
981 | cleanup_io_leave_insn: | 1014 | cleanup_io_leave_insn: |
1015 | .quad io_done - 4 | ||
982 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 1016 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
983 | .quad io_leave + 20 | 1017 | .quad io_done - 8 |
984 | #endif | 1018 | #endif |
985 | .quad io_leave + 16 | ||
986 | 1019 | ||
987 | /* | 1020 | /* |
988 | * Integer constants | 1021 | * Integer constants |
989 | */ | 1022 | */ |
990 | .align 4 | 1023 | .align 4 |
991 | .Lconst: | 1024 | .Lconst: |
992 | .Lc_pactive: .long PREEMPT_ACTIVE | ||
993 | .Lnr_syscalls: .long NR_syscalls | 1025 | .Lnr_syscalls: .long NR_syscalls |
994 | .L0x0130: .short 0x130 | 1026 | .L0x0130: .short 0x130 |
995 | .L0x0140: .short 0x140 | 1027 | .L0x0140: .short 0x140 |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index 7e1bfb984064..50f8f1e3760e 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -347,7 +347,7 @@ void (*_machine_power_off)(void) = do_machine_power_off_nonsmp; | |||
347 | 347 | ||
348 | void machine_restart(char *command) | 348 | void machine_restart(char *command) |
349 | { | 349 | { |
350 | if (!in_interrupt() || oops_in_progress) | 350 | if ((!in_interrupt() && !in_atomic()) || oops_in_progress) |
351 | /* | 351 | /* |
352 | * Only unblank the console if we are called in enabled | 352 | * Only unblank the console if we are called in enabled |
353 | * context or a bust_spinlocks cleared the way for us. | 353 | * context or a bust_spinlocks cleared the way for us. |
@@ -492,6 +492,10 @@ static void setup_addressing_mode(void) | |||
492 | printk("S390 address spaces switched, "); | 492 | printk("S390 address spaces switched, "); |
493 | set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY); | 493 | set_amode_and_uaccess(PSW_ASC_PRIMARY, PSW32_ASC_PRIMARY); |
494 | } | 494 | } |
495 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
496 | sysc_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK; | ||
497 | io_restore_trace_psw.mask = psw_kernel_bits & ~PSW_MASK_MCHECK; | ||
498 | #endif | ||
495 | } | 499 | } |
496 | 500 | ||
497 | static void __init | 501 | static void __init |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index b05ae8584258..264ea906db4c 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -193,72 +193,30 @@ int smp_call_function_single(int cpu, void (*func) (void *info), void *info, | |||
193 | } | 193 | } |
194 | EXPORT_SYMBOL(smp_call_function_single); | 194 | EXPORT_SYMBOL(smp_call_function_single); |
195 | 195 | ||
196 | static void do_send_stop(void) | 196 | void smp_send_stop(void) |
197 | { | 197 | { |
198 | int cpu, rc; | 198 | int cpu, rc; |
199 | 199 | ||
200 | /* stop all processors */ | 200 | /* Disable all interrupts/machine checks */ |
201 | for_each_online_cpu(cpu) { | 201 | __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK); |
202 | if (cpu == smp_processor_id()) | ||
203 | continue; | ||
204 | do { | ||
205 | rc = signal_processor(cpu, sigp_stop); | ||
206 | } while (rc == sigp_busy); | ||
207 | } | ||
208 | } | ||
209 | 202 | ||
210 | static void do_store_status(void) | 203 | /* write magic number to zero page (absolute 0) */ |
211 | { | 204 | lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC; |
212 | int cpu, rc; | ||
213 | 205 | ||
214 | /* store status of all processors in their lowcores (real 0) */ | 206 | /* stop all processors */ |
215 | for_each_online_cpu(cpu) { | 207 | for_each_online_cpu(cpu) { |
216 | if (cpu == smp_processor_id()) | 208 | if (cpu == smp_processor_id()) |
217 | continue; | 209 | continue; |
218 | do { | 210 | do { |
219 | rc = signal_processor_p( | 211 | rc = signal_processor(cpu, sigp_stop); |
220 | (__u32)(unsigned long) lowcore_ptr[cpu], cpu, | ||
221 | sigp_store_status_at_address); | ||
222 | } while (rc == sigp_busy); | 212 | } while (rc == sigp_busy); |
223 | } | ||
224 | } | ||
225 | 213 | ||
226 | static void do_wait_for_stop(void) | ||
227 | { | ||
228 | int cpu; | ||
229 | |||
230 | /* Wait for all other cpus to enter stopped state */ | ||
231 | for_each_online_cpu(cpu) { | ||
232 | if (cpu == smp_processor_id()) | ||
233 | continue; | ||
234 | while (!smp_cpu_not_running(cpu)) | 214 | while (!smp_cpu_not_running(cpu)) |
235 | cpu_relax(); | 215 | cpu_relax(); |
236 | } | 216 | } |
237 | } | 217 | } |
238 | 218 | ||
239 | /* | 219 | /* |
240 | * this function sends a 'stop' sigp to all other CPUs in the system. | ||
241 | * it goes straight through. | ||
242 | */ | ||
243 | void smp_send_stop(void) | ||
244 | { | ||
245 | /* Disable all interrupts/machine checks */ | ||
246 | __load_psw_mask(psw_kernel_bits & ~PSW_MASK_MCHECK); | ||
247 | |||
248 | /* write magic number to zero page (absolute 0) */ | ||
249 | lowcore_ptr[smp_processor_id()]->panic_magic = __PANIC_MAGIC; | ||
250 | |||
251 | /* stop other processors. */ | ||
252 | do_send_stop(); | ||
253 | |||
254 | /* wait until other processors are stopped */ | ||
255 | do_wait_for_stop(); | ||
256 | |||
257 | /* store status of other processors. */ | ||
258 | do_store_status(); | ||
259 | } | ||
260 | |||
261 | /* | ||
262 | * Reboot, halt and power_off routines for SMP. | 220 | * Reboot, halt and power_off routines for SMP. |
263 | */ | 221 | */ |
264 | void machine_restart_smp(char *__unused) | 222 | void machine_restart_smp(char *__unused) |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 8ec9def83ccb..8ed16a83fba7 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -260,6 +260,7 @@ void die(const char * str, struct pt_regs * regs, long err) | |||
260 | bust_spinlocks(1); | 260 | bust_spinlocks(1); |
261 | printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); | 261 | printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); |
262 | print_modules(); | 262 | print_modules(); |
263 | notify_die(DIE_OOPS, str, regs, err, current->thread.trap_no, SIGSEGV); | ||
263 | show_regs(regs); | 264 | show_regs(regs); |
264 | bust_spinlocks(0); | 265 | bust_spinlocks(0); |
265 | add_taint(TAINT_DIE); | 266 | add_taint(TAINT_DIE); |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index d4ed93dfb9c7..413c240cbca7 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -341,19 +341,16 @@ cmm_timeout_handler(ctl_table *ctl, int write, struct file *filp, | |||
341 | 341 | ||
342 | static struct ctl_table cmm_table[] = { | 342 | static struct ctl_table cmm_table[] = { |
343 | { | 343 | { |
344 | .ctl_name = VM_CMM_PAGES, | ||
345 | .procname = "cmm_pages", | 344 | .procname = "cmm_pages", |
346 | .mode = 0644, | 345 | .mode = 0644, |
347 | .proc_handler = &cmm_pages_handler, | 346 | .proc_handler = &cmm_pages_handler, |
348 | }, | 347 | }, |
349 | { | 348 | { |
350 | .ctl_name = VM_CMM_TIMED_PAGES, | ||
351 | .procname = "cmm_timed_pages", | 349 | .procname = "cmm_timed_pages", |
352 | .mode = 0644, | 350 | .mode = 0644, |
353 | .proc_handler = &cmm_pages_handler, | 351 | .proc_handler = &cmm_pages_handler, |
354 | }, | 352 | }, |
355 | { | 353 | { |
356 | .ctl_name = VM_CMM_TIMEOUT, | ||
357 | .procname = "cmm_timeout", | 354 | .procname = "cmm_timeout", |
358 | .mode = 0644, | 355 | .mode = 0644, |
359 | .proc_handler = &cmm_timeout_handler, | 356 | .proc_handler = &cmm_timeout_handler, |
diff --git a/arch/sh/boards/renesas/rts7751r2d/setup.c b/arch/sh/boards/renesas/rts7751r2d/setup.c index 37f2c0b447fe..8125d20fdbd8 100644 --- a/arch/sh/boards/renesas/rts7751r2d/setup.c +++ b/arch/sh/boards/renesas/rts7751r2d/setup.c | |||
@@ -53,10 +53,12 @@ static struct resource cf_ide_resources[] = { | |||
53 | .end = PA_AREA5_IO + 0x80c, | 53 | .end = PA_AREA5_IO + 0x80c, |
54 | .flags = IORESOURCE_MEM, | 54 | .flags = IORESOURCE_MEM, |
55 | }, | 55 | }, |
56 | #ifndef CONFIG_RTS7751R2D_1 /* For R2D-1 polling is preferred */ | ||
56 | [2] = { | 57 | [2] = { |
57 | .start = IRQ_CF_IDE, | 58 | .start = IRQ_CF_IDE, |
58 | .flags = IORESOURCE_IRQ, | 59 | .flags = IORESOURCE_IRQ, |
59 | }, | 60 | }, |
61 | #endif | ||
60 | }; | 62 | }; |
61 | 63 | ||
62 | static struct pata_platform_info pata_info = { | 64 | static struct pata_platform_info pata_info = { |
diff --git a/arch/sh/configs/r7780mp_defconfig b/arch/sh/configs/r7780mp_defconfig index ac4de4973b60..2ad804ec920a 100644 --- a/arch/sh/configs/r7780mp_defconfig +++ b/arch/sh/configs/r7780mp_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.22-rc4 | 3 | # Linux kernel version: 2.6.24-rc2 |
4 | # Mon Jun 11 10:24:57 2007 | 4 | # Tue Nov 13 20:32:39 2007 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -13,38 +13,39 @@ CONFIG_GENERIC_IRQ_PROBE=y | |||
13 | CONFIG_GENERIC_CALIBRATE_DELAY=y | 13 | CONFIG_GENERIC_CALIBRATE_DELAY=y |
14 | CONFIG_GENERIC_TIME=y | 14 | CONFIG_GENERIC_TIME=y |
15 | CONFIG_GENERIC_CLOCKEVENTS=y | 15 | CONFIG_GENERIC_CLOCKEVENTS=y |
16 | CONFIG_SYS_SUPPORTS_PCI=y | ||
16 | CONFIG_STACKTRACE_SUPPORT=y | 17 | CONFIG_STACKTRACE_SUPPORT=y |
17 | CONFIG_LOCKDEP_SUPPORT=y | 18 | CONFIG_LOCKDEP_SUPPORT=y |
18 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | 19 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set |
19 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | 20 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set |
21 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | ||
20 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 22 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
21 | 23 | ||
22 | # | 24 | # |
23 | # Code maturity level options | 25 | # General setup |
24 | # | 26 | # |
25 | CONFIG_EXPERIMENTAL=y | 27 | CONFIG_EXPERIMENTAL=y |
26 | CONFIG_BROKEN_ON_SMP=y | 28 | CONFIG_BROKEN_ON_SMP=y |
27 | CONFIG_LOCK_KERNEL=y | 29 | CONFIG_LOCK_KERNEL=y |
28 | CONFIG_INIT_ENV_ARG_LIMIT=32 | 30 | CONFIG_INIT_ENV_ARG_LIMIT=32 |
29 | |||
30 | # | ||
31 | # General setup | ||
32 | # | ||
33 | CONFIG_LOCALVERSION="" | 31 | CONFIG_LOCALVERSION="" |
34 | CONFIG_LOCALVERSION_AUTO=y | 32 | CONFIG_LOCALVERSION_AUTO=y |
35 | CONFIG_SWAP=y | 33 | CONFIG_SWAP=y |
36 | CONFIG_SYSVIPC=y | 34 | CONFIG_SYSVIPC=y |
37 | # CONFIG_IPC_NS is not set | ||
38 | CONFIG_SYSVIPC_SYSCTL=y | 35 | CONFIG_SYSVIPC_SYSCTL=y |
39 | # CONFIG_POSIX_MQUEUE is not set | 36 | # CONFIG_POSIX_MQUEUE is not set |
40 | CONFIG_BSD_PROCESS_ACCT=y | 37 | CONFIG_BSD_PROCESS_ACCT=y |
41 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | 38 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set |
42 | # CONFIG_TASKSTATS is not set | 39 | # CONFIG_TASKSTATS is not set |
43 | # CONFIG_UTS_NS is not set | 40 | # CONFIG_USER_NS is not set |
44 | # CONFIG_AUDIT is not set | 41 | # CONFIG_AUDIT is not set |
45 | CONFIG_IKCONFIG=y | 42 | CONFIG_IKCONFIG=y |
46 | CONFIG_IKCONFIG_PROC=y | 43 | CONFIG_IKCONFIG_PROC=y |
47 | CONFIG_LOG_BUF_SHIFT=14 | 44 | CONFIG_LOG_BUF_SHIFT=14 |
45 | # CONFIG_CGROUPS is not set | ||
46 | CONFIG_FAIR_GROUP_SCHED=y | ||
47 | CONFIG_FAIR_USER_SCHED=y | ||
48 | # CONFIG_FAIR_CGROUP_SCHED is not set | ||
48 | # CONFIG_SYSFS_DEPRECATED is not set | 49 | # CONFIG_SYSFS_DEPRECATED is not set |
49 | # CONFIG_RELAY is not set | 50 | # CONFIG_RELAY is not set |
50 | # CONFIG_BLK_DEV_INITRD is not set | 51 | # CONFIG_BLK_DEV_INITRD is not set |
@@ -65,7 +66,6 @@ CONFIG_BASE_FULL=y | |||
65 | CONFIG_ANON_INODES=y | 66 | CONFIG_ANON_INODES=y |
66 | # CONFIG_EPOLL is not set | 67 | # CONFIG_EPOLL is not set |
67 | CONFIG_SIGNALFD=y | 68 | CONFIG_SIGNALFD=y |
68 | CONFIG_TIMERFD=y | ||
69 | CONFIG_EVENTFD=y | 69 | CONFIG_EVENTFD=y |
70 | CONFIG_SHMEM=y | 70 | CONFIG_SHMEM=y |
71 | CONFIG_VM_EVENT_COUNTERS=y | 71 | CONFIG_VM_EVENT_COUNTERS=y |
@@ -74,24 +74,17 @@ CONFIG_SLAB=y | |||
74 | # CONFIG_SLOB is not set | 74 | # CONFIG_SLOB is not set |
75 | # CONFIG_TINY_SHMEM is not set | 75 | # CONFIG_TINY_SHMEM is not set |
76 | CONFIG_BASE_SMALL=0 | 76 | CONFIG_BASE_SMALL=0 |
77 | |||
78 | # | ||
79 | # Loadable module support | ||
80 | # | ||
81 | CONFIG_MODULES=y | 77 | CONFIG_MODULES=y |
82 | CONFIG_MODULE_UNLOAD=y | 78 | CONFIG_MODULE_UNLOAD=y |
83 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 79 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
84 | # CONFIG_MODVERSIONS is not set | 80 | # CONFIG_MODVERSIONS is not set |
85 | # CONFIG_MODULE_SRCVERSION_ALL is not set | 81 | # CONFIG_MODULE_SRCVERSION_ALL is not set |
86 | CONFIG_KMOD=y | 82 | CONFIG_KMOD=y |
87 | |||
88 | # | ||
89 | # Block layer | ||
90 | # | ||
91 | CONFIG_BLOCK=y | 83 | CONFIG_BLOCK=y |
92 | # CONFIG_LBD is not set | 84 | # CONFIG_LBD is not set |
93 | # CONFIG_BLK_DEV_IO_TRACE is not set | 85 | # CONFIG_BLK_DEV_IO_TRACE is not set |
94 | # CONFIG_LSF is not set | 86 | # CONFIG_LSF is not set |
87 | # CONFIG_BLK_DEV_BSG is not set | ||
95 | 88 | ||
96 | # | 89 | # |
97 | # IO Schedulers | 90 | # IO Schedulers |
@@ -113,7 +106,6 @@ CONFIG_CPU_SH4=y | |||
113 | CONFIG_CPU_SH4A=y | 106 | CONFIG_CPU_SH4A=y |
114 | # CONFIG_CPU_SUBTYPE_SH7619 is not set | 107 | # CONFIG_CPU_SUBTYPE_SH7619 is not set |
115 | # CONFIG_CPU_SUBTYPE_SH7206 is not set | 108 | # CONFIG_CPU_SUBTYPE_SH7206 is not set |
116 | # CONFIG_CPU_SUBTYPE_SH7300 is not set | ||
117 | # CONFIG_CPU_SUBTYPE_SH7705 is not set | 109 | # CONFIG_CPU_SUBTYPE_SH7705 is not set |
118 | # CONFIG_CPU_SUBTYPE_SH7706 is not set | 110 | # CONFIG_CPU_SUBTYPE_SH7706 is not set |
119 | # CONFIG_CPU_SUBTYPE_SH7707 is not set | 111 | # CONFIG_CPU_SUBTYPE_SH7707 is not set |
@@ -121,6 +113,7 @@ CONFIG_CPU_SH4A=y | |||
121 | # CONFIG_CPU_SUBTYPE_SH7709 is not set | 113 | # CONFIG_CPU_SUBTYPE_SH7709 is not set |
122 | # CONFIG_CPU_SUBTYPE_SH7710 is not set | 114 | # CONFIG_CPU_SUBTYPE_SH7710 is not set |
123 | # CONFIG_CPU_SUBTYPE_SH7712 is not set | 115 | # CONFIG_CPU_SUBTYPE_SH7712 is not set |
116 | # CONFIG_CPU_SUBTYPE_SH7720 is not set | ||
124 | # CONFIG_CPU_SUBTYPE_SH7750 is not set | 117 | # CONFIG_CPU_SUBTYPE_SH7750 is not set |
125 | # CONFIG_CPU_SUBTYPE_SH7091 is not set | 118 | # CONFIG_CPU_SUBTYPE_SH7091 is not set |
126 | # CONFIG_CPU_SUBTYPE_SH7750R is not set | 119 | # CONFIG_CPU_SUBTYPE_SH7750R is not set |
@@ -129,12 +122,10 @@ CONFIG_CPU_SH4A=y | |||
129 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | 122 | # CONFIG_CPU_SUBTYPE_SH7751R is not set |
130 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | 123 | # CONFIG_CPU_SUBTYPE_SH7760 is not set |
131 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | 124 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set |
132 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set | ||
133 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set | ||
134 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 125 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
135 | CONFIG_CPU_SUBTYPE_SH7780=y | 126 | CONFIG_CPU_SUBTYPE_SH7780=y |
136 | # CONFIG_CPU_SUBTYPE_SH7785 is not set | 127 | # CONFIG_CPU_SUBTYPE_SH7785 is not set |
137 | # CONFIG_CPU_SUBTYPE_SH73180 is not set | 128 | # CONFIG_CPU_SUBTYPE_SHX3 is not set |
138 | # CONFIG_CPU_SUBTYPE_SH7343 is not set | 129 | # CONFIG_CPU_SUBTYPE_SH7343 is not set |
139 | # CONFIG_CPU_SUBTYPE_SH7722 is not set | 130 | # CONFIG_CPU_SUBTYPE_SH7722 is not set |
140 | 131 | ||
@@ -169,6 +160,7 @@ CONFIG_FLATMEM_MANUAL=y | |||
169 | CONFIG_FLATMEM=y | 160 | CONFIG_FLATMEM=y |
170 | CONFIG_FLAT_NODE_MEM_MAP=y | 161 | CONFIG_FLAT_NODE_MEM_MAP=y |
171 | CONFIG_SPARSEMEM_STATIC=y | 162 | CONFIG_SPARSEMEM_STATIC=y |
163 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
172 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 164 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
173 | # CONFIG_RESOURCES_64BIT is not set | 165 | # CONFIG_RESOURCES_64BIT is not set |
174 | CONFIG_ZONE_DMA_FLAG=0 | 166 | CONFIG_ZONE_DMA_FLAG=0 |
@@ -178,8 +170,9 @@ CONFIG_NR_QUICK=2 | |||
178 | # Cache configuration | 170 | # Cache configuration |
179 | # | 171 | # |
180 | # CONFIG_SH_DIRECT_MAPPED is not set | 172 | # CONFIG_SH_DIRECT_MAPPED is not set |
181 | # CONFIG_SH_WRITETHROUGH is not set | 173 | CONFIG_CACHE_WRITEBACK=y |
182 | # CONFIG_SH_OCRAM is not set | 174 | # CONFIG_CACHE_WRITETHROUGH is not set |
175 | # CONFIG_CACHE_OFF is not set | ||
183 | 176 | ||
184 | # | 177 | # |
185 | # Processor features | 178 | # Processor features |
@@ -187,12 +180,11 @@ CONFIG_NR_QUICK=2 | |||
187 | CONFIG_CPU_LITTLE_ENDIAN=y | 180 | CONFIG_CPU_LITTLE_ENDIAN=y |
188 | # CONFIG_CPU_BIG_ENDIAN is not set | 181 | # CONFIG_CPU_BIG_ENDIAN is not set |
189 | CONFIG_SH_FPU=y | 182 | CONFIG_SH_FPU=y |
190 | # CONFIG_SH_DSP is not set | ||
191 | CONFIG_SH_STORE_QUEUES=y | 183 | CONFIG_SH_STORE_QUEUES=y |
192 | CONFIG_SPECULATIVE_EXECUTION=y | 184 | CONFIG_SPECULATIVE_EXECUTION=y |
193 | CONFIG_CPU_HAS_INTEVT=y | 185 | CONFIG_CPU_HAS_INTEVT=y |
194 | CONFIG_CPU_HAS_INTC_IRQ=y | ||
195 | CONFIG_CPU_HAS_SR_RB=y | 186 | CONFIG_CPU_HAS_SR_RB=y |
187 | CONFIG_CPU_HAS_FPU=y | ||
196 | 188 | ||
197 | # | 189 | # |
198 | # Board support | 190 | # Board support |
@@ -212,6 +204,7 @@ CONFIG_SH_PCLK_FREQ=32000000 | |||
212 | # CONFIG_TICK_ONESHOT is not set | 204 | # CONFIG_TICK_ONESHOT is not set |
213 | # CONFIG_NO_HZ is not set | 205 | # CONFIG_NO_HZ is not set |
214 | # CONFIG_HIGH_RES_TIMERS is not set | 206 | # CONFIG_HIGH_RES_TIMERS is not set |
207 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
215 | 208 | ||
216 | # | 209 | # |
217 | # CPU Frequency scaling | 210 | # CPU Frequency scaling |
@@ -226,7 +219,6 @@ CONFIG_SH_PCLK_FREQ=32000000 | |||
226 | # | 219 | # |
227 | # Companion Chips | 220 | # Companion Chips |
228 | # | 221 | # |
229 | # CONFIG_HD6446X_SERIES is not set | ||
230 | 222 | ||
231 | # | 223 | # |
232 | # Additional SuperH Device Drivers | 224 | # Additional SuperH Device Drivers |
@@ -244,18 +236,17 @@ CONFIG_HZ_250=y | |||
244 | CONFIG_HZ=250 | 236 | CONFIG_HZ=250 |
245 | CONFIG_KEXEC=y | 237 | CONFIG_KEXEC=y |
246 | # CONFIG_CRASH_DUMP is not set | 238 | # CONFIG_CRASH_DUMP is not set |
247 | # CONFIG_SMP is not set | ||
248 | # CONFIG_PREEMPT_NONE is not set | 239 | # CONFIG_PREEMPT_NONE is not set |
249 | # CONFIG_PREEMPT_VOLUNTARY is not set | 240 | # CONFIG_PREEMPT_VOLUNTARY is not set |
250 | CONFIG_PREEMPT=y | 241 | CONFIG_PREEMPT=y |
251 | CONFIG_PREEMPT_BKL=y | 242 | CONFIG_PREEMPT_BKL=y |
243 | CONFIG_GUSA=y | ||
252 | 244 | ||
253 | # | 245 | # |
254 | # Boot options | 246 | # Boot options |
255 | # | 247 | # |
256 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | 248 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 |
257 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | 249 | CONFIG_BOOT_LINK_OFFSET=0x00800000 |
258 | # CONFIG_UBC_WAKEUP is not set | ||
259 | CONFIG_CMDLINE_BOOL=y | 250 | CONFIG_CMDLINE_BOOL=y |
260 | CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" | 251 | CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" |
261 | 252 | ||
@@ -267,11 +258,8 @@ CONFIG_SH_PCIDMA_NONCOHERENT=y | |||
267 | CONFIG_PCI_AUTO=y | 258 | CONFIG_PCI_AUTO=y |
268 | CONFIG_PCI_AUTO_UPDATE_RESOURCES=y | 259 | CONFIG_PCI_AUTO_UPDATE_RESOURCES=y |
269 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 260 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
261 | CONFIG_PCI_LEGACY=y | ||
270 | # CONFIG_PCI_DEBUG is not set | 262 | # CONFIG_PCI_DEBUG is not set |
271 | |||
272 | # | ||
273 | # PCCARD (PCMCIA/CardBus) support | ||
274 | # | ||
275 | # CONFIG_PCCARD is not set | 263 | # CONFIG_PCCARD is not set |
276 | # CONFIG_HOTPLUG_PCI is not set | 264 | # CONFIG_HOTPLUG_PCI is not set |
277 | 265 | ||
@@ -282,11 +270,6 @@ CONFIG_BINFMT_ELF=y | |||
282 | # CONFIG_BINFMT_MISC is not set | 270 | # CONFIG_BINFMT_MISC is not set |
283 | 271 | ||
284 | # | 272 | # |
285 | # Power management options (EXPERIMENTAL) | ||
286 | # | ||
287 | # CONFIG_PM is not set | ||
288 | |||
289 | # | ||
290 | # Networking | 273 | # Networking |
291 | # | 274 | # |
292 | CONFIG_NET=y | 275 | CONFIG_NET=y |
@@ -327,6 +310,7 @@ CONFIG_IP_PNP_DHCP=y | |||
327 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | 310 | CONFIG_INET_XFRM_MODE_TRANSPORT=y |
328 | CONFIG_INET_XFRM_MODE_TUNNEL=y | 311 | CONFIG_INET_XFRM_MODE_TUNNEL=y |
329 | CONFIG_INET_XFRM_MODE_BEET=y | 312 | CONFIG_INET_XFRM_MODE_BEET=y |
313 | # CONFIG_INET_LRO is not set | ||
330 | CONFIG_INET_DIAG=y | 314 | CONFIG_INET_DIAG=y |
331 | CONFIG_INET_TCP_DIAG=y | 315 | CONFIG_INET_TCP_DIAG=y |
332 | # CONFIG_TCP_CONG_ADVANCED is not set | 316 | # CONFIG_TCP_CONG_ADVANCED is not set |
@@ -353,10 +337,6 @@ CONFIG_LLC=m | |||
353 | # CONFIG_LAPB is not set | 337 | # CONFIG_LAPB is not set |
354 | # CONFIG_ECONET is not set | 338 | # CONFIG_ECONET is not set |
355 | # CONFIG_WAN_ROUTER is not set | 339 | # CONFIG_WAN_ROUTER is not set |
356 | |||
357 | # | ||
358 | # QoS and/or fair queueing | ||
359 | # | ||
360 | # CONFIG_NET_SCHED is not set | 340 | # CONFIG_NET_SCHED is not set |
361 | 341 | ||
362 | # | 342 | # |
@@ -376,6 +356,7 @@ CONFIG_WIRELESS_EXT=y | |||
376 | # CONFIG_MAC80211 is not set | 356 | # CONFIG_MAC80211 is not set |
377 | # CONFIG_IEEE80211 is not set | 357 | # CONFIG_IEEE80211 is not set |
378 | # CONFIG_RFKILL is not set | 358 | # CONFIG_RFKILL is not set |
359 | # CONFIG_NET_9P is not set | ||
379 | 360 | ||
380 | # | 361 | # |
381 | # Device Drivers | 362 | # Device Drivers |
@@ -384,33 +365,17 @@ CONFIG_WIRELESS_EXT=y | |||
384 | # | 365 | # |
385 | # Generic Driver Options | 366 | # Generic Driver Options |
386 | # | 367 | # |
368 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
387 | CONFIG_STANDALONE=y | 369 | CONFIG_STANDALONE=y |
388 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 370 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
389 | CONFIG_FW_LOADER=m | 371 | CONFIG_FW_LOADER=m |
390 | # CONFIG_DEBUG_DRIVER is not set | 372 | # CONFIG_DEBUG_DRIVER is not set |
391 | # CONFIG_DEBUG_DEVRES is not set | 373 | # CONFIG_DEBUG_DEVRES is not set |
392 | # CONFIG_SYS_HYPERVISOR is not set | 374 | # CONFIG_SYS_HYPERVISOR is not set |
393 | |||
394 | # | ||
395 | # Connector - unified userspace <-> kernelspace linker | ||
396 | # | ||
397 | # CONFIG_CONNECTOR is not set | 375 | # CONFIG_CONNECTOR is not set |
398 | # CONFIG_MTD is not set | 376 | # CONFIG_MTD is not set |
399 | |||
400 | # | ||
401 | # Parallel port support | ||
402 | # | ||
403 | # CONFIG_PARPORT is not set | 377 | # CONFIG_PARPORT is not set |
404 | 378 | CONFIG_BLK_DEV=y | |
405 | # | ||
406 | # Plug and Play support | ||
407 | # | ||
408 | # CONFIG_PNPACPI is not set | ||
409 | |||
410 | # | ||
411 | # Block devices | ||
412 | # | ||
413 | # CONFIG_BLK_CPQ_DA is not set | ||
414 | # CONFIG_BLK_CPQ_CISS_DA is not set | 379 | # CONFIG_BLK_CPQ_CISS_DA is not set |
415 | # CONFIG_BLK_DEV_DAC960 is not set | 380 | # CONFIG_BLK_DEV_DAC960 is not set |
416 | # CONFIG_BLK_DEV_UMEM is not set | 381 | # CONFIG_BLK_DEV_UMEM is not set |
@@ -424,14 +389,11 @@ CONFIG_BLK_DEV_RAM_SIZE=4096 | |||
424 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | 389 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 |
425 | # CONFIG_CDROM_PKTCDVD is not set | 390 | # CONFIG_CDROM_PKTCDVD is not set |
426 | # CONFIG_ATA_OVER_ETH is not set | 391 | # CONFIG_ATA_OVER_ETH is not set |
427 | 392 | CONFIG_MISC_DEVICES=y | |
428 | # | ||
429 | # Misc devices | ||
430 | # | ||
431 | # CONFIG_PHANTOM is not set | 393 | # CONFIG_PHANTOM is not set |
394 | CONFIG_EEPROM_93CX6=y | ||
432 | # CONFIG_SGI_IOC4 is not set | 395 | # CONFIG_SGI_IOC4 is not set |
433 | # CONFIG_TIFM_CORE is not set | 396 | # CONFIG_TIFM_CORE is not set |
434 | # CONFIG_BLINK is not set | ||
435 | # CONFIG_IDE is not set | 397 | # CONFIG_IDE is not set |
436 | 398 | ||
437 | # | 399 | # |
@@ -439,6 +401,7 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | |||
439 | # | 401 | # |
440 | # CONFIG_RAID_ATTRS is not set | 402 | # CONFIG_RAID_ATTRS is not set |
441 | CONFIG_SCSI=y | 403 | CONFIG_SCSI=y |
404 | CONFIG_SCSI_DMA=y | ||
442 | # CONFIG_SCSI_TGT is not set | 405 | # CONFIG_SCSI_TGT is not set |
443 | # CONFIG_SCSI_NETLINK is not set | 406 | # CONFIG_SCSI_NETLINK is not set |
444 | CONFIG_SCSI_PROC_FS=y | 407 | CONFIG_SCSI_PROC_FS=y |
@@ -468,12 +431,9 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
468 | # CONFIG_SCSI_SPI_ATTRS is not set | 431 | # CONFIG_SCSI_SPI_ATTRS is not set |
469 | # CONFIG_SCSI_FC_ATTRS is not set | 432 | # CONFIG_SCSI_FC_ATTRS is not set |
470 | # CONFIG_SCSI_ISCSI_ATTRS is not set | 433 | # CONFIG_SCSI_ISCSI_ATTRS is not set |
471 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
472 | # CONFIG_SCSI_SAS_LIBSAS is not set | 434 | # CONFIG_SCSI_SAS_LIBSAS is not set |
473 | 435 | # CONFIG_SCSI_SRP_ATTRS is not set | |
474 | # | 436 | CONFIG_SCSI_LOWLEVEL=y |
475 | # SCSI low-level drivers | ||
476 | # | ||
477 | # CONFIG_ISCSI_TCP is not set | 437 | # CONFIG_ISCSI_TCP is not set |
478 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | 438 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set |
479 | # CONFIG_SCSI_3W_9XXX is not set | 439 | # CONFIG_SCSI_3W_9XXX is not set |
@@ -483,7 +443,6 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
483 | # CONFIG_SCSI_AIC7XXX_OLD is not set | 443 | # CONFIG_SCSI_AIC7XXX_OLD is not set |
484 | # CONFIG_SCSI_AIC79XX is not set | 444 | # CONFIG_SCSI_AIC79XX is not set |
485 | # CONFIG_SCSI_AIC94XX is not set | 445 | # CONFIG_SCSI_AIC94XX is not set |
486 | # CONFIG_SCSI_DPT_I2O is not set | ||
487 | # CONFIG_SCSI_ARCMSR is not set | 446 | # CONFIG_SCSI_ARCMSR is not set |
488 | # CONFIG_MEGARAID_NEWGEN is not set | 447 | # CONFIG_MEGARAID_NEWGEN is not set |
489 | # CONFIG_MEGARAID_LEGACY is not set | 448 | # CONFIG_MEGARAID_LEGACY is not set |
@@ -548,6 +507,7 @@ CONFIG_SATA_SIL=y | |||
548 | # CONFIG_PATA_OLDPIIX is not set | 507 | # CONFIG_PATA_OLDPIIX is not set |
549 | # CONFIG_PATA_NETCELL is not set | 508 | # CONFIG_PATA_NETCELL is not set |
550 | # CONFIG_PATA_NS87410 is not set | 509 | # CONFIG_PATA_NS87410 is not set |
510 | # CONFIG_PATA_NS87415 is not set | ||
551 | # CONFIG_PATA_OPTI is not set | 511 | # CONFIG_PATA_OPTI is not set |
552 | # CONFIG_PATA_OPTIDMA is not set | 512 | # CONFIG_PATA_OPTIDMA is not set |
553 | # CONFIG_PATA_PDC_OLD is not set | 513 | # CONFIG_PATA_PDC_OLD is not set |
@@ -561,59 +521,43 @@ CONFIG_SATA_SIL=y | |||
561 | # CONFIG_PATA_VIA is not set | 521 | # CONFIG_PATA_VIA is not set |
562 | # CONFIG_PATA_WINBOND is not set | 522 | # CONFIG_PATA_WINBOND is not set |
563 | CONFIG_PATA_PLATFORM=y | 523 | CONFIG_PATA_PLATFORM=y |
564 | |||
565 | # | ||
566 | # Multi-device support (RAID and LVM) | ||
567 | # | ||
568 | # CONFIG_MD is not set | 524 | # CONFIG_MD is not set |
569 | |||
570 | # | ||
571 | # Fusion MPT device support | ||
572 | # | ||
573 | # CONFIG_FUSION is not set | 525 | # CONFIG_FUSION is not set |
574 | # CONFIG_FUSION_SPI is not set | ||
575 | # CONFIG_FUSION_FC is not set | ||
576 | # CONFIG_FUSION_SAS is not set | ||
577 | 526 | ||
578 | # | 527 | # |
579 | # IEEE 1394 (FireWire) support | 528 | # IEEE 1394 (FireWire) support |
580 | # | 529 | # |
581 | # CONFIG_FIREWIRE is not set | 530 | # CONFIG_FIREWIRE is not set |
582 | # CONFIG_IEEE1394 is not set | 531 | # CONFIG_IEEE1394 is not set |
583 | |||
584 | # | ||
585 | # I2O device support | ||
586 | # | ||
587 | # CONFIG_I2O is not set | 532 | # CONFIG_I2O is not set |
588 | |||
589 | # | ||
590 | # Network device support | ||
591 | # | ||
592 | CONFIG_NETDEVICES=y | 533 | CONFIG_NETDEVICES=y |
534 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
593 | # CONFIG_DUMMY is not set | 535 | # CONFIG_DUMMY is not set |
594 | # CONFIG_BONDING is not set | 536 | # CONFIG_BONDING is not set |
537 | # CONFIG_MACVLAN is not set | ||
595 | # CONFIG_EQUALIZER is not set | 538 | # CONFIG_EQUALIZER is not set |
596 | # CONFIG_TUN is not set | 539 | # CONFIG_TUN is not set |
540 | # CONFIG_VETH is not set | ||
541 | # CONFIG_IP1000 is not set | ||
597 | # CONFIG_ARCNET is not set | 542 | # CONFIG_ARCNET is not set |
598 | # CONFIG_PHYLIB is not set | 543 | # CONFIG_PHYLIB is not set |
599 | |||
600 | # | ||
601 | # Ethernet (10 or 100Mbit) | ||
602 | # | ||
603 | CONFIG_NET_ETHERNET=y | 544 | CONFIG_NET_ETHERNET=y |
604 | CONFIG_MII=y | 545 | CONFIG_MII=y |
546 | CONFIG_AX88796=y | ||
547 | CONFIG_AX88796_93CX6=y | ||
605 | # CONFIG_STNIC is not set | 548 | # CONFIG_STNIC is not set |
606 | # CONFIG_HAPPYMEAL is not set | 549 | # CONFIG_HAPPYMEAL is not set |
607 | # CONFIG_SUNGEM is not set | 550 | # CONFIG_SUNGEM is not set |
608 | # CONFIG_CASSINI is not set | 551 | # CONFIG_CASSINI is not set |
609 | # CONFIG_NET_VENDOR_3COM is not set | 552 | # CONFIG_NET_VENDOR_3COM is not set |
610 | # CONFIG_SMC91X is not set | 553 | # CONFIG_SMC91X is not set |
611 | 554 | # CONFIG_SMC911X is not set | |
612 | # | ||
613 | # Tulip family network device support | ||
614 | # | ||
615 | # CONFIG_NET_TULIP is not set | 555 | # CONFIG_NET_TULIP is not set |
616 | # CONFIG_HP100 is not set | 556 | # CONFIG_HP100 is not set |
557 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
558 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
559 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
560 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
617 | CONFIG_NET_PCI=y | 561 | CONFIG_NET_PCI=y |
618 | CONFIG_PCNET32=m | 562 | CONFIG_PCNET32=m |
619 | # CONFIG_PCNET32_NAPI is not set | 563 | # CONFIG_PCNET32_NAPI is not set |
@@ -621,7 +565,6 @@ CONFIG_PCNET32=m | |||
621 | # CONFIG_ADAPTEC_STARFIRE is not set | 565 | # CONFIG_ADAPTEC_STARFIRE is not set |
622 | # CONFIG_B44 is not set | 566 | # CONFIG_B44 is not set |
623 | # CONFIG_FORCEDETH is not set | 567 | # CONFIG_FORCEDETH is not set |
624 | # CONFIG_DGRS is not set | ||
625 | # CONFIG_EEPRO100 is not set | 568 | # CONFIG_EEPRO100 is not set |
626 | # CONFIG_E100 is not set | 569 | # CONFIG_E100 is not set |
627 | # CONFIG_FEALNX is not set | 570 | # CONFIG_FEALNX is not set |
@@ -647,6 +590,7 @@ CONFIG_NETDEV_1000=y | |||
647 | CONFIG_E1000=m | 590 | CONFIG_E1000=m |
648 | # CONFIG_E1000_NAPI is not set | 591 | # CONFIG_E1000_NAPI is not set |
649 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | 592 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set |
593 | # CONFIG_E1000E is not set | ||
650 | # CONFIG_NS83820 is not set | 594 | # CONFIG_NS83820 is not set |
651 | # CONFIG_HAMACHI is not set | 595 | # CONFIG_HAMACHI is not set |
652 | # CONFIG_YELLOWFIN is not set | 596 | # CONFIG_YELLOWFIN is not set |
@@ -664,11 +608,14 @@ CONFIG_R8169=y | |||
664 | CONFIG_NETDEV_10000=y | 608 | CONFIG_NETDEV_10000=y |
665 | # CONFIG_CHELSIO_T1 is not set | 609 | # CONFIG_CHELSIO_T1 is not set |
666 | # CONFIG_CHELSIO_T3 is not set | 610 | # CONFIG_CHELSIO_T3 is not set |
611 | # CONFIG_IXGBE is not set | ||
667 | # CONFIG_IXGB is not set | 612 | # CONFIG_IXGB is not set |
668 | # CONFIG_S2IO is not set | 613 | # CONFIG_S2IO is not set |
669 | # CONFIG_MYRI10GE is not set | 614 | # CONFIG_MYRI10GE is not set |
670 | # CONFIG_NETXEN_NIC is not set | 615 | # CONFIG_NETXEN_NIC is not set |
616 | # CONFIG_NIU is not set | ||
671 | # CONFIG_MLX4_CORE is not set | 617 | # CONFIG_MLX4_CORE is not set |
618 | # CONFIG_TEHUTI is not set | ||
672 | # CONFIG_TR is not set | 619 | # CONFIG_TR is not set |
673 | 620 | ||
674 | # | 621 | # |
@@ -686,15 +633,7 @@ CONFIG_NETDEV_10000=y | |||
686 | # CONFIG_NETCONSOLE is not set | 633 | # CONFIG_NETCONSOLE is not set |
687 | # CONFIG_NETPOLL is not set | 634 | # CONFIG_NETPOLL is not set |
688 | # CONFIG_NET_POLL_CONTROLLER is not set | 635 | # CONFIG_NET_POLL_CONTROLLER is not set |
689 | |||
690 | # | ||
691 | # ISDN subsystem | ||
692 | # | ||
693 | # CONFIG_ISDN is not set | 636 | # CONFIG_ISDN is not set |
694 | |||
695 | # | ||
696 | # Telephony Support | ||
697 | # | ||
698 | # CONFIG_PHONE is not set | 637 | # CONFIG_PHONE is not set |
699 | 638 | ||
700 | # | 639 | # |
@@ -702,6 +641,7 @@ CONFIG_NETDEV_10000=y | |||
702 | # | 641 | # |
703 | CONFIG_INPUT=y | 642 | CONFIG_INPUT=y |
704 | # CONFIG_INPUT_FF_MEMLESS is not set | 643 | # CONFIG_INPUT_FF_MEMLESS is not set |
644 | # CONFIG_INPUT_POLLDEV is not set | ||
705 | 645 | ||
706 | # | 646 | # |
707 | # Userland interfaces | 647 | # Userland interfaces |
@@ -711,7 +651,6 @@ CONFIG_INPUT_MOUSEDEV=y | |||
711 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | 651 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 |
712 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | 652 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 |
713 | # CONFIG_INPUT_JOYDEV is not set | 653 | # CONFIG_INPUT_JOYDEV is not set |
714 | # CONFIG_INPUT_TSDEV is not set | ||
715 | # CONFIG_INPUT_EVDEV is not set | 654 | # CONFIG_INPUT_EVDEV is not set |
716 | # CONFIG_INPUT_EVBUG is not set | 655 | # CONFIG_INPUT_EVBUG is not set |
717 | 656 | ||
@@ -765,21 +704,11 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
765 | CONFIG_UNIX98_PTYS=y | 704 | CONFIG_UNIX98_PTYS=y |
766 | CONFIG_LEGACY_PTYS=y | 705 | CONFIG_LEGACY_PTYS=y |
767 | CONFIG_LEGACY_PTY_COUNT=256 | 706 | CONFIG_LEGACY_PTY_COUNT=256 |
768 | |||
769 | # | ||
770 | # IPMI | ||
771 | # | ||
772 | # CONFIG_IPMI_HANDLER is not set | 707 | # CONFIG_IPMI_HANDLER is not set |
773 | # CONFIG_WATCHDOG is not set | ||
774 | CONFIG_HW_RANDOM=y | 708 | CONFIG_HW_RANDOM=y |
775 | # CONFIG_R3964 is not set | 709 | # CONFIG_R3964 is not set |
776 | # CONFIG_APPLICOM is not set | 710 | # CONFIG_APPLICOM is not set |
777 | # CONFIG_DRM is not set | ||
778 | # CONFIG_RAW_DRIVER is not set | 711 | # CONFIG_RAW_DRIVER is not set |
779 | |||
780 | # | ||
781 | # TPM devices | ||
782 | # | ||
783 | # CONFIG_TCG_TPM is not set | 712 | # CONFIG_TCG_TPM is not set |
784 | CONFIG_DEVPORT=y | 713 | CONFIG_DEVPORT=y |
785 | # CONFIG_I2C is not set | 714 | # CONFIG_I2C is not set |
@@ -789,21 +718,31 @@ CONFIG_DEVPORT=y | |||
789 | # | 718 | # |
790 | # CONFIG_SPI is not set | 719 | # CONFIG_SPI is not set |
791 | # CONFIG_SPI_MASTER is not set | 720 | # CONFIG_SPI_MASTER is not set |
792 | |||
793 | # | ||
794 | # Dallas's 1-wire bus | ||
795 | # | ||
796 | # CONFIG_W1 is not set | 721 | # CONFIG_W1 is not set |
722 | # CONFIG_POWER_SUPPLY is not set | ||
797 | CONFIG_HWMON=y | 723 | CONFIG_HWMON=y |
798 | # CONFIG_HWMON_VID is not set | 724 | # CONFIG_HWMON_VID is not set |
799 | # CONFIG_SENSORS_ABITUGURU is not set | ||
800 | # CONFIG_SENSORS_F71805F is not set | 725 | # CONFIG_SENSORS_F71805F is not set |
726 | # CONFIG_SENSORS_F71882FG is not set | ||
727 | # CONFIG_SENSORS_IT87 is not set | ||
728 | # CONFIG_SENSORS_PC87360 is not set | ||
801 | # CONFIG_SENSORS_PC87427 is not set | 729 | # CONFIG_SENSORS_PC87427 is not set |
730 | # CONFIG_SENSORS_SIS5595 is not set | ||
802 | # CONFIG_SENSORS_SMSC47M1 is not set | 731 | # CONFIG_SENSORS_SMSC47M1 is not set |
803 | # CONFIG_SENSORS_SMSC47B397 is not set | 732 | # CONFIG_SENSORS_SMSC47B397 is not set |
733 | # CONFIG_SENSORS_VIA686A is not set | ||
804 | # CONFIG_SENSORS_VT1211 is not set | 734 | # CONFIG_SENSORS_VT1211 is not set |
735 | # CONFIG_SENSORS_VT8231 is not set | ||
805 | # CONFIG_SENSORS_W83627HF is not set | 736 | # CONFIG_SENSORS_W83627HF is not set |
737 | # CONFIG_SENSORS_W83627EHF is not set | ||
806 | # CONFIG_HWMON_DEBUG_CHIP is not set | 738 | # CONFIG_HWMON_DEBUG_CHIP is not set |
739 | # CONFIG_WATCHDOG is not set | ||
740 | |||
741 | # | ||
742 | # Sonics Silicon Backplane | ||
743 | # | ||
744 | CONFIG_SSB_POSSIBLE=y | ||
745 | # CONFIG_SSB is not set | ||
807 | 746 | ||
808 | # | 747 | # |
809 | # Multifunction device drivers | 748 | # Multifunction device drivers |
@@ -820,14 +759,16 @@ CONFIG_DAB=y | |||
820 | # | 759 | # |
821 | # Graphics support | 760 | # Graphics support |
822 | # | 761 | # |
762 | # CONFIG_DRM is not set | ||
763 | # CONFIG_VGASTATE is not set | ||
764 | # CONFIG_VIDEO_OUTPUT_CONTROL is not set | ||
765 | # CONFIG_FB is not set | ||
823 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | 766 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set |
824 | 767 | ||
825 | # | 768 | # |
826 | # Display device support | 769 | # Display device support |
827 | # | 770 | # |
828 | # CONFIG_DISPLAY_SUPPORT is not set | 771 | # CONFIG_DISPLAY_SUPPORT is not set |
829 | # CONFIG_VGASTATE is not set | ||
830 | # CONFIG_FB is not set | ||
831 | 772 | ||
832 | # | 773 | # |
833 | # Sound | 774 | # Sound |
@@ -843,20 +784,14 @@ CONFIG_SOUND=m | |||
843 | # Open Sound System | 784 | # Open Sound System |
844 | # | 785 | # |
845 | CONFIG_SOUND_PRIME=m | 786 | CONFIG_SOUND_PRIME=m |
846 | # CONFIG_OSS_OBSOLETE is not set | ||
847 | # CONFIG_SOUND_TRIDENT is not set | 787 | # CONFIG_SOUND_TRIDENT is not set |
848 | # CONFIG_SOUND_MSNDCLAS is not set | 788 | # CONFIG_SOUND_MSNDCLAS is not set |
849 | # CONFIG_SOUND_MSNDPIN is not set | 789 | # CONFIG_SOUND_MSNDPIN is not set |
850 | 790 | CONFIG_HID_SUPPORT=y | |
851 | # | ||
852 | # HID Devices | ||
853 | # | ||
854 | CONFIG_HID=y | 791 | CONFIG_HID=y |
855 | # CONFIG_HID_DEBUG is not set | 792 | # CONFIG_HID_DEBUG is not set |
856 | 793 | # CONFIG_HIDRAW is not set | |
857 | # | 794 | CONFIG_USB_SUPPORT=y |
858 | # USB support | ||
859 | # | ||
860 | CONFIG_USB_ARCH_HAS_HCD=y | 795 | CONFIG_USB_ARCH_HAS_HCD=y |
861 | CONFIG_USB_ARCH_HAS_OHCI=y | 796 | CONFIG_USB_ARCH_HAS_OHCI=y |
862 | CONFIG_USB_ARCH_HAS_EHCI=y | 797 | CONFIG_USB_ARCH_HAS_EHCI=y |
@@ -871,32 +806,8 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
871 | # | 806 | # |
872 | # CONFIG_USB_GADGET is not set | 807 | # CONFIG_USB_GADGET is not set |
873 | # CONFIG_MMC is not set | 808 | # CONFIG_MMC is not set |
874 | |||
875 | # | ||
876 | # LED devices | ||
877 | # | ||
878 | # CONFIG_NEW_LEDS is not set | 809 | # CONFIG_NEW_LEDS is not set |
879 | |||
880 | # | ||
881 | # LED drivers | ||
882 | # | ||
883 | |||
884 | # | ||
885 | # LED Triggers | ||
886 | # | ||
887 | |||
888 | # | ||
889 | # InfiniBand support | ||
890 | # | ||
891 | # CONFIG_INFINIBAND is not set | 810 | # CONFIG_INFINIBAND is not set |
892 | |||
893 | # | ||
894 | # EDAC - error detection and reporting (RAS) (EXPERIMENTAL) | ||
895 | # | ||
896 | |||
897 | # | ||
898 | # Real Time Clock | ||
899 | # | ||
900 | CONFIG_RTC_LIB=y | 811 | CONFIG_RTC_LIB=y |
901 | CONFIG_RTC_CLASS=y | 812 | CONFIG_RTC_CLASS=y |
902 | CONFIG_RTC_HCTOSYS=y | 813 | CONFIG_RTC_HCTOSYS=y |
@@ -913,10 +824,6 @@ CONFIG_RTC_INTF_DEV=y | |||
913 | # CONFIG_RTC_DRV_TEST is not set | 824 | # CONFIG_RTC_DRV_TEST is not set |
914 | 825 | ||
915 | # | 826 | # |
916 | # I2C RTC drivers | ||
917 | # | ||
918 | |||
919 | # | ||
920 | # SPI RTC drivers | 827 | # SPI RTC drivers |
921 | # | 828 | # |
922 | 829 | ||
@@ -924,8 +831,10 @@ CONFIG_RTC_INTF_DEV=y | |||
924 | # Platform RTC drivers | 831 | # Platform RTC drivers |
925 | # | 832 | # |
926 | # CONFIG_RTC_DRV_DS1553 is not set | 833 | # CONFIG_RTC_DRV_DS1553 is not set |
834 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
927 | # CONFIG_RTC_DRV_DS1742 is not set | 835 | # CONFIG_RTC_DRV_DS1742 is not set |
928 | # CONFIG_RTC_DRV_M48T86 is not set | 836 | # CONFIG_RTC_DRV_M48T86 is not set |
837 | # CONFIG_RTC_DRV_M48T59 is not set | ||
929 | # CONFIG_RTC_DRV_V3020 is not set | 838 | # CONFIG_RTC_DRV_V3020 is not set |
930 | 839 | ||
931 | # | 840 | # |
@@ -934,17 +843,9 @@ CONFIG_RTC_INTF_DEV=y | |||
934 | CONFIG_RTC_DRV_SH=y | 843 | CONFIG_RTC_DRV_SH=y |
935 | 844 | ||
936 | # | 845 | # |
937 | # DMA Engine support | 846 | # Userspace I/O |
938 | # | ||
939 | # CONFIG_DMA_ENGINE is not set | ||
940 | |||
941 | # | ||
942 | # DMA Clients | ||
943 | # | ||
944 | |||
945 | # | ||
946 | # DMA Devices | ||
947 | # | 847 | # |
848 | # CONFIG_UIO is not set | ||
948 | 849 | ||
949 | # | 850 | # |
950 | # File systems | 851 | # File systems |
@@ -1005,7 +906,6 @@ CONFIG_TMPFS=y | |||
1005 | # CONFIG_TMPFS_POSIX_ACL is not set | 906 | # CONFIG_TMPFS_POSIX_ACL is not set |
1006 | CONFIG_HUGETLBFS=y | 907 | CONFIG_HUGETLBFS=y |
1007 | CONFIG_HUGETLB_PAGE=y | 908 | CONFIG_HUGETLB_PAGE=y |
1008 | CONFIG_RAMFS=y | ||
1009 | CONFIG_CONFIGFS_FS=m | 909 | CONFIG_CONFIGFS_FS=m |
1010 | 910 | ||
1011 | # | 911 | # |
@@ -1024,10 +924,7 @@ CONFIG_CONFIGFS_FS=m | |||
1024 | # CONFIG_QNX4FS_FS is not set | 924 | # CONFIG_QNX4FS_FS is not set |
1025 | # CONFIG_SYSV_FS is not set | 925 | # CONFIG_SYSV_FS is not set |
1026 | # CONFIG_UFS_FS is not set | 926 | # CONFIG_UFS_FS is not set |
1027 | 927 | CONFIG_NETWORK_FILESYSTEMS=y | |
1028 | # | ||
1029 | # Network File Systems | ||
1030 | # | ||
1031 | CONFIG_NFS_FS=y | 928 | CONFIG_NFS_FS=y |
1032 | CONFIG_NFS_V3=y | 929 | CONFIG_NFS_V3=y |
1033 | # CONFIG_NFS_V3_ACL is not set | 930 | # CONFIG_NFS_V3_ACL is not set |
@@ -1053,17 +950,12 @@ CONFIG_RPCSEC_GSS_KRB5=y | |||
1053 | # CONFIG_NCP_FS is not set | 950 | # CONFIG_NCP_FS is not set |
1054 | # CONFIG_CODA_FS is not set | 951 | # CONFIG_CODA_FS is not set |
1055 | # CONFIG_AFS_FS is not set | 952 | # CONFIG_AFS_FS is not set |
1056 | # CONFIG_9P_FS is not set | ||
1057 | 953 | ||
1058 | # | 954 | # |
1059 | # Partition Types | 955 | # Partition Types |
1060 | # | 956 | # |
1061 | # CONFIG_PARTITION_ADVANCED is not set | 957 | # CONFIG_PARTITION_ADVANCED is not set |
1062 | CONFIG_MSDOS_PARTITION=y | 958 | CONFIG_MSDOS_PARTITION=y |
1063 | |||
1064 | # | ||
1065 | # Native Language Support | ||
1066 | # | ||
1067 | CONFIG_NLS=y | 959 | CONFIG_NLS=y |
1068 | CONFIG_NLS_DEFAULT="iso8859-1" | 960 | CONFIG_NLS_DEFAULT="iso8859-1" |
1069 | CONFIG_NLS_CODEPAGE_437=y | 961 | CONFIG_NLS_CODEPAGE_437=y |
@@ -1104,23 +996,18 @@ CONFIG_NLS_ISO8859_1=y | |||
1104 | # CONFIG_NLS_KOI8_R is not set | 996 | # CONFIG_NLS_KOI8_R is not set |
1105 | # CONFIG_NLS_KOI8_U is not set | 997 | # CONFIG_NLS_KOI8_U is not set |
1106 | # CONFIG_NLS_UTF8 is not set | 998 | # CONFIG_NLS_UTF8 is not set |
1107 | |||
1108 | # | ||
1109 | # Distributed Lock Manager | ||
1110 | # | ||
1111 | # CONFIG_DLM is not set | 999 | # CONFIG_DLM is not set |
1112 | 1000 | CONFIG_INSTRUMENTATION=y | |
1113 | # | ||
1114 | # Profiling support | ||
1115 | # | ||
1116 | CONFIG_PROFILING=y | 1001 | CONFIG_PROFILING=y |
1117 | CONFIG_OPROFILE=m | 1002 | CONFIG_OPROFILE=m |
1003 | # CONFIG_MARKERS is not set | ||
1118 | 1004 | ||
1119 | # | 1005 | # |
1120 | # Kernel hacking | 1006 | # Kernel hacking |
1121 | # | 1007 | # |
1122 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 1008 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
1123 | # CONFIG_PRINTK_TIME is not set | 1009 | # CONFIG_PRINTK_TIME is not set |
1010 | CONFIG_ENABLE_WARN_DEPRECATED=y | ||
1124 | CONFIG_ENABLE_MUST_CHECK=y | 1011 | CONFIG_ENABLE_MUST_CHECK=y |
1125 | CONFIG_MAGIC_SYSRQ=y | 1012 | CONFIG_MAGIC_SYSRQ=y |
1126 | # CONFIG_UNUSED_SYMBOLS is not set | 1013 | # CONFIG_UNUSED_SYMBOLS is not set |
@@ -1129,6 +1016,7 @@ CONFIG_DEBUG_FS=y | |||
1129 | CONFIG_DEBUG_KERNEL=y | 1016 | CONFIG_DEBUG_KERNEL=y |
1130 | # CONFIG_DEBUG_SHIRQ is not set | 1017 | # CONFIG_DEBUG_SHIRQ is not set |
1131 | CONFIG_DETECT_SOFTLOCKUP=y | 1018 | CONFIG_DETECT_SOFTLOCKUP=y |
1019 | CONFIG_SCHED_DEBUG=y | ||
1132 | # CONFIG_SCHEDSTATS is not set | 1020 | # CONFIG_SCHEDSTATS is not set |
1133 | # CONFIG_TIMER_STATS is not set | 1021 | # CONFIG_TIMER_STATS is not set |
1134 | # CONFIG_DEBUG_SLAB is not set | 1022 | # CONFIG_DEBUG_SLAB is not set |
@@ -1137,6 +1025,7 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1137 | # CONFIG_DEBUG_MUTEXES is not set | 1025 | # CONFIG_DEBUG_MUTEXES is not set |
1138 | # CONFIG_DEBUG_LOCK_ALLOC is not set | 1026 | # CONFIG_DEBUG_LOCK_ALLOC is not set |
1139 | # CONFIG_PROVE_LOCKING is not set | 1027 | # CONFIG_PROVE_LOCKING is not set |
1028 | # CONFIG_LOCK_STAT is not set | ||
1140 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | 1029 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set |
1141 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1030 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1142 | # CONFIG_DEBUG_KOBJECT is not set | 1031 | # CONFIG_DEBUG_KOBJECT is not set |
@@ -1144,10 +1033,13 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
1144 | CONFIG_DEBUG_INFO=y | 1033 | CONFIG_DEBUG_INFO=y |
1145 | # CONFIG_DEBUG_VM is not set | 1034 | # CONFIG_DEBUG_VM is not set |
1146 | # CONFIG_DEBUG_LIST is not set | 1035 | # CONFIG_DEBUG_LIST is not set |
1036 | # CONFIG_DEBUG_SG is not set | ||
1147 | # CONFIG_FRAME_POINTER is not set | 1037 | # CONFIG_FRAME_POINTER is not set |
1148 | CONFIG_FORCED_INLINING=y | 1038 | CONFIG_FORCED_INLINING=y |
1039 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1149 | # CONFIG_RCU_TORTURE_TEST is not set | 1040 | # CONFIG_RCU_TORTURE_TEST is not set |
1150 | # CONFIG_FAULT_INJECTION is not set | 1041 | # CONFIG_FAULT_INJECTION is not set |
1042 | # CONFIG_SAMPLES is not set | ||
1151 | CONFIG_SH_STANDARD_BIOS=y | 1043 | CONFIG_SH_STANDARD_BIOS=y |
1152 | # CONFIG_EARLY_SCIF_CONSOLE is not set | 1044 | # CONFIG_EARLY_SCIF_CONSOLE is not set |
1153 | CONFIG_EARLY_PRINTK=y | 1045 | CONFIG_EARLY_PRINTK=y |
@@ -1155,6 +1047,7 @@ CONFIG_EARLY_PRINTK=y | |||
1155 | CONFIG_DEBUG_STACKOVERFLOW=y | 1047 | CONFIG_DEBUG_STACKOVERFLOW=y |
1156 | # CONFIG_DEBUG_STACK_USAGE is not set | 1048 | # CONFIG_DEBUG_STACK_USAGE is not set |
1157 | # CONFIG_4KSTACKS is not set | 1049 | # CONFIG_4KSTACKS is not set |
1050 | # CONFIG_IRQSTACKS is not set | ||
1158 | # CONFIG_SH_KGDB is not set | 1051 | # CONFIG_SH_KGDB is not set |
1159 | 1052 | ||
1160 | # | 1053 | # |
@@ -1162,10 +1055,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y | |||
1162 | # | 1055 | # |
1163 | # CONFIG_KEYS is not set | 1056 | # CONFIG_KEYS is not set |
1164 | # CONFIG_SECURITY is not set | 1057 | # CONFIG_SECURITY is not set |
1165 | 1058 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | |
1166 | # | ||
1167 | # Cryptographic options | ||
1168 | # | ||
1169 | CONFIG_CRYPTO=y | 1059 | CONFIG_CRYPTO=y |
1170 | CONFIG_CRYPTO_ALGAPI=y | 1060 | CONFIG_CRYPTO_ALGAPI=y |
1171 | CONFIG_CRYPTO_BLKCIPHER=y | 1061 | CONFIG_CRYPTO_BLKCIPHER=y |
@@ -1186,6 +1076,7 @@ CONFIG_CRYPTO_ECB=m | |||
1186 | CONFIG_CRYPTO_CBC=y | 1076 | CONFIG_CRYPTO_CBC=y |
1187 | CONFIG_CRYPTO_PCBC=m | 1077 | CONFIG_CRYPTO_PCBC=m |
1188 | # CONFIG_CRYPTO_LRW is not set | 1078 | # CONFIG_CRYPTO_LRW is not set |
1079 | # CONFIG_CRYPTO_XTS is not set | ||
1189 | # CONFIG_CRYPTO_CRYPTD is not set | 1080 | # CONFIG_CRYPTO_CRYPTD is not set |
1190 | CONFIG_CRYPTO_DES=y | 1081 | CONFIG_CRYPTO_DES=y |
1191 | # CONFIG_CRYPTO_FCRYPT is not set | 1082 | # CONFIG_CRYPTO_FCRYPT is not set |
@@ -1199,15 +1090,14 @@ CONFIG_CRYPTO_DES=y | |||
1199 | # CONFIG_CRYPTO_ARC4 is not set | 1090 | # CONFIG_CRYPTO_ARC4 is not set |
1200 | # CONFIG_CRYPTO_KHAZAD is not set | 1091 | # CONFIG_CRYPTO_KHAZAD is not set |
1201 | # CONFIG_CRYPTO_ANUBIS is not set | 1092 | # CONFIG_CRYPTO_ANUBIS is not set |
1093 | # CONFIG_CRYPTO_SEED is not set | ||
1202 | # CONFIG_CRYPTO_DEFLATE is not set | 1094 | # CONFIG_CRYPTO_DEFLATE is not set |
1203 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | 1095 | # CONFIG_CRYPTO_MICHAEL_MIC is not set |
1204 | # CONFIG_CRYPTO_CRC32C is not set | 1096 | # CONFIG_CRYPTO_CRC32C is not set |
1205 | # CONFIG_CRYPTO_CAMELLIA is not set | 1097 | # CONFIG_CRYPTO_CAMELLIA is not set |
1206 | # CONFIG_CRYPTO_TEST is not set | 1098 | # CONFIG_CRYPTO_TEST is not set |
1207 | 1099 | # CONFIG_CRYPTO_AUTHENC is not set | |
1208 | # | 1100 | CONFIG_CRYPTO_HW=y |
1209 | # Hardware crypto devices | ||
1210 | # | ||
1211 | 1101 | ||
1212 | # | 1102 | # |
1213 | # Library routines | 1103 | # Library routines |
@@ -1217,6 +1107,7 @@ CONFIG_BITREVERSE=y | |||
1217 | # CONFIG_CRC16 is not set | 1107 | # CONFIG_CRC16 is not set |
1218 | # CONFIG_CRC_ITU_T is not set | 1108 | # CONFIG_CRC_ITU_T is not set |
1219 | CONFIG_CRC32=y | 1109 | CONFIG_CRC32=y |
1110 | # CONFIG_CRC7 is not set | ||
1220 | # CONFIG_LIBCRC32C is not set | 1111 | # CONFIG_LIBCRC32C is not set |
1221 | CONFIG_HAS_IOMEM=y | 1112 | CONFIG_HAS_IOMEM=y |
1222 | CONFIG_HAS_IOPORT=y | 1113 | CONFIG_HAS_IOPORT=y |
diff --git a/arch/sh/configs/r7785rp_defconfig b/arch/sh/configs/r7785rp_defconfig index 158e03f0b1ef..2e43a2a971a9 100644 --- a/arch/sh/configs/r7785rp_defconfig +++ b/arch/sh/configs/r7785rp_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-rc1 | 3 | # Linux kernel version: 2.6.24-rc2 |
4 | # Fri Nov 2 14:30:49 2007 | 4 | # Tue Nov 13 20:34:57 2007 |
5 | # | 5 | # |
6 | CONFIG_SUPERH=y | 6 | CONFIG_SUPERH=y |
7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y | 7 | CONFIG_RWSEM_GENERIC_SPINLOCK=y |
@@ -124,8 +124,6 @@ CONFIG_CPU_SHX2=y | |||
124 | # CONFIG_CPU_SUBTYPE_SH7751R is not set | 124 | # CONFIG_CPU_SUBTYPE_SH7751R is not set |
125 | # CONFIG_CPU_SUBTYPE_SH7760 is not set | 125 | # CONFIG_CPU_SUBTYPE_SH7760 is not set |
126 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set | 126 | # CONFIG_CPU_SUBTYPE_SH4_202 is not set |
127 | # CONFIG_CPU_SUBTYPE_ST40STB1 is not set | ||
128 | # CONFIG_CPU_SUBTYPE_ST40GX1 is not set | ||
129 | # CONFIG_CPU_SUBTYPE_SH7770 is not set | 127 | # CONFIG_CPU_SUBTYPE_SH7770 is not set |
130 | # CONFIG_CPU_SUBTYPE_SH7780 is not set | 128 | # CONFIG_CPU_SUBTYPE_SH7780 is not set |
131 | CONFIG_CPU_SUBTYPE_SH7785=y | 129 | CONFIG_CPU_SUBTYPE_SH7785=y |
@@ -254,7 +252,6 @@ CONFIG_GUSA=y | |||
254 | # | 252 | # |
255 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 | 253 | CONFIG_ZERO_PAGE_OFFSET=0x00001000 |
256 | CONFIG_BOOT_LINK_OFFSET=0x00800000 | 254 | CONFIG_BOOT_LINK_OFFSET=0x00800000 |
257 | # CONFIG_UBC_WAKEUP is not set | ||
258 | CONFIG_CMDLINE_BOOL=y | 255 | CONFIG_CMDLINE_BOOL=y |
259 | CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" | 256 | CONFIG_CMDLINE="console=ttySC0,115200 root=/dev/sda1" |
260 | 257 | ||
@@ -266,6 +263,7 @@ CONFIG_SH_PCIDMA_NONCOHERENT=y | |||
266 | CONFIG_PCI_AUTO=y | 263 | CONFIG_PCI_AUTO=y |
267 | CONFIG_PCI_AUTO_UPDATE_RESOURCES=y | 264 | CONFIG_PCI_AUTO_UPDATE_RESOURCES=y |
268 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 265 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
266 | CONFIG_PCI_LEGACY=y | ||
269 | # CONFIG_PCI_DEBUG is not set | 267 | # CONFIG_PCI_DEBUG is not set |
270 | # CONFIG_PCCARD is not set | 268 | # CONFIG_PCCARD is not set |
271 | # CONFIG_HOTPLUG_PCI is not set | 269 | # CONFIG_HOTPLUG_PCI is not set |
@@ -550,6 +548,8 @@ CONFIG_NETDEVICES=y | |||
550 | # CONFIG_PHYLIB is not set | 548 | # CONFIG_PHYLIB is not set |
551 | CONFIG_NET_ETHERNET=y | 549 | CONFIG_NET_ETHERNET=y |
552 | CONFIG_MII=y | 550 | CONFIG_MII=y |
551 | CONFIG_AX88796=y | ||
552 | CONFIG_AX88796_93CX6=y | ||
553 | # CONFIG_STNIC is not set | 553 | # CONFIG_STNIC is not set |
554 | # CONFIG_HAPPYMEAL is not set | 554 | # CONFIG_HAPPYMEAL is not set |
555 | # CONFIG_SUNGEM is not set | 555 | # CONFIG_SUNGEM is not set |
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index f33cedb353fc..60d74f793a1d 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -258,9 +258,6 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, | |||
258 | pmd_t *pmd; | 258 | pmd_t *pmd; |
259 | pte_t *pte; | 259 | pte_t *pte; |
260 | pte_t entry; | 260 | pte_t entry; |
261 | struct mm_struct *mm = current->mm; | ||
262 | spinlock_t *ptl = NULL; | ||
263 | int ret = 1; | ||
264 | 261 | ||
265 | #ifdef CONFIG_SH_KGDB | 262 | #ifdef CONFIG_SH_KGDB |
266 | if (kgdb_nofault && kgdb_bus_err_hook) | 263 | if (kgdb_nofault && kgdb_bus_err_hook) |
@@ -274,12 +271,11 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, | |||
274 | */ | 271 | */ |
275 | if (address >= P3SEG && address < P3_ADDR_MAX) { | 272 | if (address >= P3SEG && address < P3_ADDR_MAX) { |
276 | pgd = pgd_offset_k(address); | 273 | pgd = pgd_offset_k(address); |
277 | mm = NULL; | ||
278 | } else { | 274 | } else { |
279 | if (unlikely(address >= TASK_SIZE || !mm)) | 275 | if (unlikely(address >= TASK_SIZE || !current->mm)) |
280 | return 1; | 276 | return 1; |
281 | 277 | ||
282 | pgd = pgd_offset(mm, address); | 278 | pgd = pgd_offset(current->mm, address); |
283 | } | 279 | } |
284 | 280 | ||
285 | pud = pud_offset(pgd, address); | 281 | pud = pud_offset(pgd, address); |
@@ -289,34 +285,19 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs, | |||
289 | if (pmd_none_or_clear_bad(pmd)) | 285 | if (pmd_none_or_clear_bad(pmd)) |
290 | return 1; | 286 | return 1; |
291 | 287 | ||
292 | if (mm) | 288 | pte = pte_offset_kernel(pmd, address); |
293 | pte = pte_offset_map_lock(mm, pmd, address, &ptl); | ||
294 | else | ||
295 | pte = pte_offset_kernel(pmd, address); | ||
296 | |||
297 | entry = *pte; | 289 | entry = *pte; |
298 | if (unlikely(pte_none(entry) || pte_not_present(entry))) | 290 | if (unlikely(pte_none(entry) || pte_not_present(entry))) |
299 | goto unlock; | 291 | return 1; |
300 | if (unlikely(writeaccess && !pte_write(entry))) | 292 | if (unlikely(writeaccess && !pte_write(entry))) |
301 | goto unlock; | 293 | return 1; |
302 | 294 | ||
303 | if (writeaccess) | 295 | if (writeaccess) |
304 | entry = pte_mkdirty(entry); | 296 | entry = pte_mkdirty(entry); |
305 | entry = pte_mkyoung(entry); | 297 | entry = pte_mkyoung(entry); |
306 | 298 | ||
307 | #ifdef CONFIG_CPU_SH4 | ||
308 | /* | ||
309 | * ITLB is not affected by "ldtlb" instruction. | ||
310 | * So, we need to flush the entry by ourselves. | ||
311 | */ | ||
312 | local_flush_tlb_one(get_asid(), address & PAGE_MASK); | ||
313 | #endif | ||
314 | |||
315 | set_pte(pte, entry); | 299 | set_pte(pte, entry); |
316 | update_mmu_cache(NULL, address, entry); | 300 | update_mmu_cache(NULL, address, entry); |
317 | ret = 0; | 301 | |
318 | unlock: | 302 | return 0; |
319 | if (mm) | ||
320 | pte_unmap_unlock(pte, ptl); | ||
321 | return ret; | ||
322 | } | 303 | } |
diff --git a/arch/x86/kernel/acpi/processor.c b/arch/x86/kernel/acpi/processor.c index f63e5ff0aca1..a25db514c719 100644 --- a/arch/x86/kernel/acpi/processor.c +++ b/arch/x86/kernel/acpi/processor.c | |||
@@ -49,6 +49,9 @@ static void init_intel_pdc(struct acpi_processor *pr, struct cpuinfo_x86 *c) | |||
49 | if (cpu_has(c, X86_FEATURE_EST)) | 49 | if (cpu_has(c, X86_FEATURE_EST)) |
50 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP; | 50 | buf[2] |= ACPI_PDC_EST_CAPABILITY_SWSMP; |
51 | 51 | ||
52 | if (cpu_has(c, X86_FEATURE_ACPI)) | ||
53 | buf[2] |= ACPI_PDC_T_FFH; | ||
54 | |||
52 | obj->type = ACPI_TYPE_BUFFER; | 55 | obj->type = ACPI_TYPE_BUFFER; |
53 | obj->buffer.length = 12; | 56 | obj->buffer.length = 12; |
54 | obj->buffer.pointer = (u8 *) buf; | 57 | obj->buffer.pointer = (u8 *) buf; |
diff --git a/arch/x86/kernel/acpi/sleep_64.c b/arch/x86/kernel/acpi/sleep_64.c index 79475d237071..da42de261ba8 100644 --- a/arch/x86/kernel/acpi/sleep_64.c +++ b/arch/x86/kernel/acpi/sleep_64.c | |||
@@ -115,6 +115,3 @@ static int __init acpi_sleep_setup(char *str) | |||
115 | 115 | ||
116 | __setup("acpi_sleep=", acpi_sleep_setup); | 116 | __setup("acpi_sleep=", acpi_sleep_setup); |
117 | 117 | ||
118 | void acpi_pci_link_exit(void) | ||
119 | { | ||
120 | } | ||
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index fc4bbc1d1331..6cf27319a91c 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -962,7 +962,7 @@ static int EISA_ELCR(unsigned int irq) | |||
962 | #define default_MCA_trigger(idx) (1) | 962 | #define default_MCA_trigger(idx) (1) |
963 | #define default_MCA_polarity(idx) (0) | 963 | #define default_MCA_polarity(idx) (0) |
964 | 964 | ||
965 | static int __init MPBIOS_polarity(int idx) | 965 | static int MPBIOS_polarity(int idx) |
966 | { | 966 | { |
967 | int bus = mp_irqs[idx].mpc_srcbus; | 967 | int bus = mp_irqs[idx].mpc_srcbus; |
968 | int polarity; | 968 | int polarity; |
@@ -2838,6 +2838,25 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a | |||
2838 | return 0; | 2838 | return 0; |
2839 | } | 2839 | } |
2840 | 2840 | ||
2841 | int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | ||
2842 | { | ||
2843 | int i; | ||
2844 | |||
2845 | if (skip_ioapic_setup) | ||
2846 | return -1; | ||
2847 | |||
2848 | for (i = 0; i < mp_irq_entries; i++) | ||
2849 | if (mp_irqs[i].mpc_irqtype == mp_INT && | ||
2850 | mp_irqs[i].mpc_srcbusirq == bus_irq) | ||
2851 | break; | ||
2852 | if (i >= mp_irq_entries) | ||
2853 | return -1; | ||
2854 | |||
2855 | *trigger = irq_trigger(i); | ||
2856 | *polarity = irq_polarity(i); | ||
2857 | return 0; | ||
2858 | } | ||
2859 | |||
2841 | #endif /* CONFIG_ACPI */ | 2860 | #endif /* CONFIG_ACPI */ |
2842 | 2861 | ||
2843 | static int __init parse_disable_timer_pin_1(char *arg) | 2862 | static int __init parse_disable_timer_pin_1(char *arg) |
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 953328b55a30..435a8c9b55f8 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -546,7 +546,7 @@ int IO_APIC_get_PCI_irq_vector(int bus, int slot, int pin) | |||
546 | #define default_PCI_trigger(idx) (1) | 546 | #define default_PCI_trigger(idx) (1) |
547 | #define default_PCI_polarity(idx) (1) | 547 | #define default_PCI_polarity(idx) (1) |
548 | 548 | ||
549 | static int __init MPBIOS_polarity(int idx) | 549 | static int MPBIOS_polarity(int idx) |
550 | { | 550 | { |
551 | int bus = mp_irqs[idx].mpc_srcbus; | 551 | int bus = mp_irqs[idx].mpc_srcbus; |
552 | int polarity; | 552 | int polarity; |
@@ -2222,8 +2222,27 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int triggering, int p | |||
2222 | return 0; | 2222 | return 0; |
2223 | } | 2223 | } |
2224 | 2224 | ||
2225 | #endif /* CONFIG_ACPI */ | ||
2226 | 2225 | ||
2226 | int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity) | ||
2227 | { | ||
2228 | int i; | ||
2229 | |||
2230 | if (skip_ioapic_setup) | ||
2231 | return -1; | ||
2232 | |||
2233 | for (i = 0; i < mp_irq_entries; i++) | ||
2234 | if (mp_irqs[i].mpc_irqtype == mp_INT && | ||
2235 | mp_irqs[i].mpc_srcbusirq == bus_irq) | ||
2236 | break; | ||
2237 | if (i >= mp_irq_entries) | ||
2238 | return -1; | ||
2239 | |||
2240 | *trigger = irq_trigger(i); | ||
2241 | *polarity = irq_polarity(i); | ||
2242 | return 0; | ||
2243 | } | ||
2244 | |||
2245 | #endif /* CONFIG_ACPI */ | ||
2227 | 2246 | ||
2228 | /* | 2247 | /* |
2229 | * This function currently is only a helper for the i386 smp boot process where | 2248 | * This function currently is only a helper for the i386 smp boot process where |
@@ -2260,3 +2279,4 @@ void __init setup_ioapic_dest(void) | |||
2260 | } | 2279 | } |
2261 | } | 2280 | } |
2262 | #endif | 2281 | #endif |
2282 | |||
diff --git a/arch/x86/pci/acpi.c b/arch/x86/pci/acpi.c index 7e35078673a4..0234f2831bf3 100644 --- a/arch/x86/pci/acpi.c +++ b/arch/x86/pci/acpi.c | |||
@@ -13,7 +13,7 @@ static int __devinit can_skip_ioresource_align(const struct dmi_system_id *d) | |||
13 | return 0; | 13 | return 0; |
14 | } | 14 | } |
15 | 15 | ||
16 | static struct dmi_system_id acpi_pciprobe_dmi_table[] = { | 16 | static struct dmi_system_id acpi_pciprobe_dmi_table[] __devinitdata = { |
17 | /* | 17 | /* |
18 | * Systems where PCI IO resource ISA alignment can be skipped | 18 | * Systems where PCI IO resource ISA alignment can be skipped |
19 | * when the ISA enable bit in the bridge control is not set | 19 | * when the ISA enable bit in the bridge control is not set |
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 087a7028ae84..b9f923ef173d 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -50,7 +50,6 @@ config ACPI_SLEEP | |||
50 | config ACPI_PROCFS | 50 | config ACPI_PROCFS |
51 | bool "Deprecated /proc/acpi files" | 51 | bool "Deprecated /proc/acpi files" |
52 | depends on PROC_FS | 52 | depends on PROC_FS |
53 | default y | ||
54 | ---help--- | 53 | ---help--- |
55 | For backwards compatibility, this option allows | 54 | For backwards compatibility, this option allows |
56 | deprecated /proc/acpi/ files to exist, even when | 55 | deprecated /proc/acpi/ files to exist, even when |
@@ -61,7 +60,6 @@ config ACPI_PROCFS | |||
61 | /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version) | 60 | /proc/acpi/info (/sys/modules/acpi/parameters/acpica_version) |
62 | /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT) | 61 | /proc/acpi/dsdt (/sys/firmware/acpi/tables/DSDT) |
63 | /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP) | 62 | /proc/acpi/fadt (/sys/firmware/acpi/tables/FACP) |
64 | /proc/acpi/battery (/sys/class/power_supply) | ||
65 | /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer) | 63 | /proc/acpi/debug_layer (/sys/module/acpi/parameters/debug_layer) |
66 | /proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level) | 64 | /proc/acpi/debug_level (/sys/module/acpi/parameters/debug_level) |
67 | 65 | ||
@@ -69,7 +67,21 @@ config ACPI_PROCFS | |||
69 | and functions which do not yet exist in /sys. | 67 | and functions which do not yet exist in /sys. |
70 | 68 | ||
71 | Say N to delete /proc/acpi/ files that have moved to /sys/ | 69 | Say N to delete /proc/acpi/ files that have moved to /sys/ |
72 | 70 | config ACPI_PROCFS_POWER | |
71 | bool "Deprecated power /proc/acpi folders" | ||
72 | depends on PROC_FS | ||
73 | default y | ||
74 | ---help--- | ||
75 | For backwards compatibility, this option allows | ||
76 | deprecated power /proc/acpi/ folders to exist, even when | ||
77 | they have been replaced by functions in /sys. | ||
78 | The deprecated folders (and their replacements) include: | ||
79 | /proc/acpi/battery/* (/sys/class/power_supply/*) | ||
80 | /proc/acpi/ac_adapter/* (sys/class/power_supply/*) | ||
81 | This option has no effect on /proc/acpi/ folders | ||
82 | and functions, which do not yet exist in /sys | ||
83 | |||
84 | Say N to delete power /proc/acpi/ folders that have moved to /sys/ | ||
73 | config ACPI_PROC_EVENT | 85 | config ACPI_PROC_EVENT |
74 | bool "Deprecated /proc/acpi/event support" | 86 | bool "Deprecated /proc/acpi/event support" |
75 | depends on PROC_FS | 87 | depends on PROC_FS |
diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile index 54e3ab0e5fc0..456446f90077 100644 --- a/drivers/acpi/Makefile +++ b/drivers/acpi/Makefile | |||
@@ -58,6 +58,6 @@ obj-$(CONFIG_ACPI_NUMA) += numa.o | |||
58 | obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o | 58 | obj-$(CONFIG_ACPI_ASUS) += asus_acpi.o |
59 | obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o | 59 | obj-$(CONFIG_ACPI_TOSHIBA) += toshiba_acpi.o |
60 | obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o | 60 | obj-$(CONFIG_ACPI_HOTPLUG_MEMORY) += acpi_memhotplug.o |
61 | obj-y += cm_sbs.o | 61 | obj-$(CONFIG_ACPI_PROCFS_POWER) += cm_sbs.o |
62 | obj-$(CONFIG_ACPI_SBS) += sbs.o | 62 | obj-$(CONFIG_ACPI_SBS) += sbs.o |
63 | obj-$(CONFIG_ACPI_SBS) += sbshc.o | 63 | obj-$(CONFIG_ACPI_SBS) += sbshc.o |
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index 30238f6ff232..76ed4f52bebd 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/types.h> | 29 | #include <linux/types.h> |
30 | #ifdef CONFIG_ACPI_PROCFS | 30 | #ifdef CONFIG_ACPI_PROCFS_POWER |
31 | #include <linux/proc_fs.h> | 31 | #include <linux/proc_fs.h> |
32 | #include <linux/seq_file.h> | 32 | #include <linux/seq_file.h> |
33 | #endif | 33 | #endif |
@@ -51,7 +51,7 @@ MODULE_AUTHOR("Paul Diefenbaugh"); | |||
51 | MODULE_DESCRIPTION("ACPI AC Adapter Driver"); | 51 | MODULE_DESCRIPTION("ACPI AC Adapter Driver"); |
52 | MODULE_LICENSE("GPL"); | 52 | MODULE_LICENSE("GPL"); |
53 | 53 | ||
54 | #ifdef CONFIG_ACPI_PROCFS | 54 | #ifdef CONFIG_ACPI_PROCFS_POWER |
55 | extern struct proc_dir_entry *acpi_lock_ac_dir(void); | 55 | extern struct proc_dir_entry *acpi_lock_ac_dir(void); |
56 | extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir); | 56 | extern void *acpi_unlock_ac_dir(struct proc_dir_entry *acpi_ac_dir); |
57 | static int acpi_ac_open_fs(struct inode *inode, struct file *file); | 57 | static int acpi_ac_open_fs(struct inode *inode, struct file *file); |
@@ -86,7 +86,7 @@ struct acpi_ac { | |||
86 | 86 | ||
87 | #define to_acpi_ac(x) container_of(x, struct acpi_ac, charger); | 87 | #define to_acpi_ac(x) container_of(x, struct acpi_ac, charger); |
88 | 88 | ||
89 | #ifdef CONFIG_ACPI_PROCFS | 89 | #ifdef CONFIG_ACPI_PROCFS_POWER |
90 | static const struct file_operations acpi_ac_fops = { | 90 | static const struct file_operations acpi_ac_fops = { |
91 | .open = acpi_ac_open_fs, | 91 | .open = acpi_ac_open_fs, |
92 | .read = seq_read, | 92 | .read = seq_read, |
@@ -136,7 +136,7 @@ static int acpi_ac_get_state(struct acpi_ac *ac) | |||
136 | return 0; | 136 | return 0; |
137 | } | 137 | } |
138 | 138 | ||
139 | #ifdef CONFIG_ACPI_PROCFS | 139 | #ifdef CONFIG_ACPI_PROCFS_POWER |
140 | /* -------------------------------------------------------------------------- | 140 | /* -------------------------------------------------------------------------- |
141 | FS Interface (/proc) | 141 | FS Interface (/proc) |
142 | -------------------------------------------------------------------------- */ | 142 | -------------------------------------------------------------------------- */ |
@@ -275,7 +275,7 @@ static int acpi_ac_add(struct acpi_device *device) | |||
275 | if (result) | 275 | if (result) |
276 | goto end; | 276 | goto end; |
277 | 277 | ||
278 | #ifdef CONFIG_ACPI_PROCFS | 278 | #ifdef CONFIG_ACPI_PROCFS_POWER |
279 | result = acpi_ac_add_fs(device); | 279 | result = acpi_ac_add_fs(device); |
280 | #endif | 280 | #endif |
281 | if (result) | 281 | if (result) |
@@ -300,7 +300,7 @@ static int acpi_ac_add(struct acpi_device *device) | |||
300 | 300 | ||
301 | end: | 301 | end: |
302 | if (result) { | 302 | if (result) { |
303 | #ifdef CONFIG_ACPI_PROCFS | 303 | #ifdef CONFIG_ACPI_PROCFS_POWER |
304 | acpi_ac_remove_fs(device); | 304 | acpi_ac_remove_fs(device); |
305 | #endif | 305 | #endif |
306 | kfree(ac); | 306 | kfree(ac); |
@@ -339,7 +339,7 @@ static int acpi_ac_remove(struct acpi_device *device, int type) | |||
339 | ACPI_ALL_NOTIFY, acpi_ac_notify); | 339 | ACPI_ALL_NOTIFY, acpi_ac_notify); |
340 | if (ac->charger.dev) | 340 | if (ac->charger.dev) |
341 | power_supply_unregister(&ac->charger); | 341 | power_supply_unregister(&ac->charger); |
342 | #ifdef CONFIG_ACPI_PROCFS | 342 | #ifdef CONFIG_ACPI_PROCFS_POWER |
343 | acpi_ac_remove_fs(device); | 343 | acpi_ac_remove_fs(device); |
344 | #endif | 344 | #endif |
345 | 345 | ||
@@ -355,7 +355,7 @@ static int __init acpi_ac_init(void) | |||
355 | if (acpi_disabled) | 355 | if (acpi_disabled) |
356 | return -ENODEV; | 356 | return -ENODEV; |
357 | 357 | ||
358 | #ifdef CONFIG_ACPI_PROCFS | 358 | #ifdef CONFIG_ACPI_PROCFS_POWER |
359 | acpi_ac_dir = acpi_lock_ac_dir(); | 359 | acpi_ac_dir = acpi_lock_ac_dir(); |
360 | if (!acpi_ac_dir) | 360 | if (!acpi_ac_dir) |
361 | return -ENODEV; | 361 | return -ENODEV; |
@@ -363,7 +363,7 @@ static int __init acpi_ac_init(void) | |||
363 | 363 | ||
364 | result = acpi_bus_register_driver(&acpi_ac_driver); | 364 | result = acpi_bus_register_driver(&acpi_ac_driver); |
365 | if (result < 0) { | 365 | if (result < 0) { |
366 | #ifdef CONFIG_ACPI_PROCFS | 366 | #ifdef CONFIG_ACPI_PROCFS_POWER |
367 | acpi_unlock_ac_dir(acpi_ac_dir); | 367 | acpi_unlock_ac_dir(acpi_ac_dir); |
368 | #endif | 368 | #endif |
369 | return -ENODEV; | 369 | return -ENODEV; |
@@ -377,7 +377,7 @@ static void __exit acpi_ac_exit(void) | |||
377 | 377 | ||
378 | acpi_bus_unregister_driver(&acpi_ac_driver); | 378 | acpi_bus_unregister_driver(&acpi_ac_driver); |
379 | 379 | ||
380 | #ifdef CONFIG_ACPI_PROCFS | 380 | #ifdef CONFIG_ACPI_PROCFS_POWER |
381 | acpi_unlock_ac_dir(acpi_ac_dir); | 381 | acpi_unlock_ac_dir(acpi_ac_dir); |
382 | #endif | 382 | #endif |
383 | 383 | ||
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index 192c244f6190..7d6be23eff89 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
@@ -31,7 +31,7 @@ | |||
31 | #include <linux/types.h> | 31 | #include <linux/types.h> |
32 | #include <linux/jiffies.h> | 32 | #include <linux/jiffies.h> |
33 | 33 | ||
34 | #ifdef CONFIG_ACPI_PROCFS | 34 | #ifdef CONFIG_ACPI_PROCFS_POWER |
35 | #include <linux/proc_fs.h> | 35 | #include <linux/proc_fs.h> |
36 | #include <linux/seq_file.h> | 36 | #include <linux/seq_file.h> |
37 | #include <asm/uaccess.h> | 37 | #include <asm/uaccess.h> |
@@ -63,7 +63,7 @@ static unsigned int cache_time = 1000; | |||
63 | module_param(cache_time, uint, 0644); | 63 | module_param(cache_time, uint, 0644); |
64 | MODULE_PARM_DESC(cache_time, "cache time in milliseconds"); | 64 | MODULE_PARM_DESC(cache_time, "cache time in milliseconds"); |
65 | 65 | ||
66 | #ifdef CONFIG_ACPI_PROCFS | 66 | #ifdef CONFIG_ACPI_PROCFS_POWER |
67 | extern struct proc_dir_entry *acpi_lock_battery_dir(void); | 67 | extern struct proc_dir_entry *acpi_lock_battery_dir(void); |
68 | extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir); | 68 | extern void *acpi_unlock_battery_dir(struct proc_dir_entry *acpi_battery_dir); |
69 | 69 | ||
@@ -153,6 +153,8 @@ static int acpi_battery_get_property(struct power_supply *psy, | |||
153 | val->intval = POWER_SUPPLY_STATUS_CHARGING; | 153 | val->intval = POWER_SUPPLY_STATUS_CHARGING; |
154 | else if (battery->state == 0) | 154 | else if (battery->state == 0) |
155 | val->intval = POWER_SUPPLY_STATUS_FULL; | 155 | val->intval = POWER_SUPPLY_STATUS_FULL; |
156 | else | ||
157 | val->intval = POWER_SUPPLY_STATUS_UNKNOWN; | ||
156 | break; | 158 | break; |
157 | case POWER_SUPPLY_PROP_PRESENT: | 159 | case POWER_SUPPLY_PROP_PRESENT: |
158 | val->intval = acpi_battery_present(battery); | 160 | val->intval = acpi_battery_present(battery); |
@@ -221,7 +223,7 @@ static enum power_supply_property energy_battery_props[] = { | |||
221 | POWER_SUPPLY_PROP_MANUFACTURER, | 223 | POWER_SUPPLY_PROP_MANUFACTURER, |
222 | }; | 224 | }; |
223 | 225 | ||
224 | #ifdef CONFIG_ACPI_PROCFS | 226 | #ifdef CONFIG_ACPI_PROCFS_POWER |
225 | inline char *acpi_battery_units(struct acpi_battery *battery) | 227 | inline char *acpi_battery_units(struct acpi_battery *battery) |
226 | { | 228 | { |
227 | return (battery->power_unit)?"mA":"mW"; | 229 | return (battery->power_unit)?"mA":"mW"; |
@@ -479,7 +481,7 @@ static int acpi_battery_update(struct acpi_battery *battery) | |||
479 | FS Interface (/proc) | 481 | FS Interface (/proc) |
480 | -------------------------------------------------------------------------- */ | 482 | -------------------------------------------------------------------------- */ |
481 | 483 | ||
482 | #ifdef CONFIG_ACPI_PROCFS | 484 | #ifdef CONFIG_ACPI_PROCFS_POWER |
483 | static struct proc_dir_entry *acpi_battery_dir; | 485 | static struct proc_dir_entry *acpi_battery_dir; |
484 | 486 | ||
485 | static int acpi_battery_print_info(struct seq_file *seq, int result) | 487 | static int acpi_battery_print_info(struct seq_file *seq, int result) |
@@ -786,7 +788,7 @@ static int acpi_battery_add(struct acpi_device *device) | |||
786 | acpi_driver_data(device) = battery; | 788 | acpi_driver_data(device) = battery; |
787 | mutex_init(&battery->lock); | 789 | mutex_init(&battery->lock); |
788 | acpi_battery_update(battery); | 790 | acpi_battery_update(battery); |
789 | #ifdef CONFIG_ACPI_PROCFS | 791 | #ifdef CONFIG_ACPI_PROCFS_POWER |
790 | result = acpi_battery_add_fs(device); | 792 | result = acpi_battery_add_fs(device); |
791 | if (result) | 793 | if (result) |
792 | goto end; | 794 | goto end; |
@@ -804,7 +806,7 @@ static int acpi_battery_add(struct acpi_device *device) | |||
804 | device->status.battery_present ? "present" : "absent"); | 806 | device->status.battery_present ? "present" : "absent"); |
805 | end: | 807 | end: |
806 | if (result) { | 808 | if (result) { |
807 | #ifdef CONFIG_ACPI_PROCFS | 809 | #ifdef CONFIG_ACPI_PROCFS_POWER |
808 | acpi_battery_remove_fs(device); | 810 | acpi_battery_remove_fs(device); |
809 | #endif | 811 | #endif |
810 | kfree(battery); | 812 | kfree(battery); |
@@ -823,7 +825,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type) | |||
823 | status = acpi_remove_notify_handler(device->handle, | 825 | status = acpi_remove_notify_handler(device->handle, |
824 | ACPI_ALL_NOTIFY, | 826 | ACPI_ALL_NOTIFY, |
825 | acpi_battery_notify); | 827 | acpi_battery_notify); |
826 | #ifdef CONFIG_ACPI_PROCFS | 828 | #ifdef CONFIG_ACPI_PROCFS_POWER |
827 | acpi_battery_remove_fs(device); | 829 | acpi_battery_remove_fs(device); |
828 | #endif | 830 | #endif |
829 | sysfs_remove_battery(battery); | 831 | sysfs_remove_battery(battery); |
@@ -859,13 +861,13 @@ static int __init acpi_battery_init(void) | |||
859 | { | 861 | { |
860 | if (acpi_disabled) | 862 | if (acpi_disabled) |
861 | return -ENODEV; | 863 | return -ENODEV; |
862 | #ifdef CONFIG_ACPI_PROCFS | 864 | #ifdef CONFIG_ACPI_PROCFS_POWER |
863 | acpi_battery_dir = acpi_lock_battery_dir(); | 865 | acpi_battery_dir = acpi_lock_battery_dir(); |
864 | if (!acpi_battery_dir) | 866 | if (!acpi_battery_dir) |
865 | return -ENODEV; | 867 | return -ENODEV; |
866 | #endif | 868 | #endif |
867 | if (acpi_bus_register_driver(&acpi_battery_driver) < 0) { | 869 | if (acpi_bus_register_driver(&acpi_battery_driver) < 0) { |
868 | #ifdef CONFIG_ACPI_PROCFS | 870 | #ifdef CONFIG_ACPI_PROCFS_POWER |
869 | acpi_unlock_battery_dir(acpi_battery_dir); | 871 | acpi_unlock_battery_dir(acpi_battery_dir); |
870 | #endif | 872 | #endif |
871 | return -ENODEV; | 873 | return -ENODEV; |
@@ -876,7 +878,7 @@ static int __init acpi_battery_init(void) | |||
876 | static void __exit acpi_battery_exit(void) | 878 | static void __exit acpi_battery_exit(void) |
877 | { | 879 | { |
878 | acpi_bus_unregister_driver(&acpi_battery_driver); | 880 | acpi_bus_unregister_driver(&acpi_battery_driver); |
879 | #ifdef CONFIG_ACPI_PROCFS | 881 | #ifdef CONFIG_ACPI_PROCFS_POWER |
880 | acpi_unlock_battery_dir(acpi_battery_dir); | 882 | acpi_unlock_battery_dir(acpi_battery_dir); |
881 | #endif | 883 | #endif |
882 | } | 884 | } |
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 06b78e5e33a1..d411017f8c06 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -47,6 +47,9 @@ | |||
47 | #undef PREFIX | 47 | #undef PREFIX |
48 | #define PREFIX "ACPI: EC: " | 48 | #define PREFIX "ACPI: EC: " |
49 | 49 | ||
50 | /* Uncomment next line to get verbose print outs*/ | ||
51 | /* #define DEBUG */ | ||
52 | |||
50 | /* EC status register */ | 53 | /* EC status register */ |
51 | #define ACPI_EC_FLAG_OBF 0x01 /* Output buffer full */ | 54 | #define ACPI_EC_FLAG_OBF 0x01 /* Output buffer full */ |
52 | #define ACPI_EC_FLAG_IBF 0x02 /* Input buffer full */ | 55 | #define ACPI_EC_FLAG_IBF 0x02 /* Input buffer full */ |
@@ -75,7 +78,10 @@ enum { | |||
75 | EC_FLAGS_WAIT_GPE = 0, /* Don't check status until GPE arrives */ | 78 | EC_FLAGS_WAIT_GPE = 0, /* Don't check status until GPE arrives */ |
76 | EC_FLAGS_QUERY_PENDING, /* Query is pending */ | 79 | EC_FLAGS_QUERY_PENDING, /* Query is pending */ |
77 | EC_FLAGS_GPE_MODE, /* Expect GPE to be sent for status change */ | 80 | EC_FLAGS_GPE_MODE, /* Expect GPE to be sent for status change */ |
78 | EC_FLAGS_ONLY_IBF_GPE, /* Expect GPE only for IBF = 0 event */ | 81 | EC_FLAGS_NO_ADDRESS_GPE, /* Expect GPE only for non-address event */ |
82 | EC_FLAGS_ADDRESS, /* Address is being written */ | ||
83 | EC_FLAGS_NO_WDATA_GPE, /* Don't expect WDATA GPE event */ | ||
84 | EC_FLAGS_WDATA, /* Data is being written */ | ||
79 | }; | 85 | }; |
80 | 86 | ||
81 | static int acpi_ec_remove(struct acpi_device *device, int type); | 87 | static int acpi_ec_remove(struct acpi_device *device, int type); |
@@ -131,21 +137,27 @@ static struct acpi_ec { | |||
131 | 137 | ||
132 | static inline u8 acpi_ec_read_status(struct acpi_ec *ec) | 138 | static inline u8 acpi_ec_read_status(struct acpi_ec *ec) |
133 | { | 139 | { |
134 | return inb(ec->command_addr); | 140 | u8 x = inb(ec->command_addr); |
141 | pr_debug(PREFIX "---> status = 0x%2x\n", x); | ||
142 | return x; | ||
135 | } | 143 | } |
136 | 144 | ||
137 | static inline u8 acpi_ec_read_data(struct acpi_ec *ec) | 145 | static inline u8 acpi_ec_read_data(struct acpi_ec *ec) |
138 | { | 146 | { |
147 | u8 x = inb(ec->data_addr); | ||
148 | pr_debug(PREFIX "---> data = 0x%2x\n", x); | ||
139 | return inb(ec->data_addr); | 149 | return inb(ec->data_addr); |
140 | } | 150 | } |
141 | 151 | ||
142 | static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command) | 152 | static inline void acpi_ec_write_cmd(struct acpi_ec *ec, u8 command) |
143 | { | 153 | { |
154 | pr_debug(PREFIX "<--- command = 0x%2x\n", command); | ||
144 | outb(command, ec->command_addr); | 155 | outb(command, ec->command_addr); |
145 | } | 156 | } |
146 | 157 | ||
147 | static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data) | 158 | static inline void acpi_ec_write_data(struct acpi_ec *ec, u8 data) |
148 | { | 159 | { |
160 | pr_debug(PREFIX "<--- data = 0x%2x\n", data); | ||
149 | outb(data, ec->data_addr); | 161 | outb(data, ec->data_addr); |
150 | } | 162 | } |
151 | 163 | ||
@@ -166,38 +178,54 @@ static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event) | |||
166 | 178 | ||
167 | static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | 179 | static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) |
168 | { | 180 | { |
181 | int ret = 0; | ||
182 | if (unlikely(test_bit(EC_FLAGS_ADDRESS, &ec->flags) && | ||
183 | test_bit(EC_FLAGS_NO_ADDRESS_GPE, &ec->flags))) | ||
184 | force_poll = 1; | ||
185 | if (unlikely(test_bit(EC_FLAGS_WDATA, &ec->flags) && | ||
186 | test_bit(EC_FLAGS_NO_WDATA_GPE, &ec->flags))) | ||
187 | force_poll = 1; | ||
169 | if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) && | 188 | if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) && |
170 | likely(!force_poll)) { | 189 | likely(!force_poll)) { |
171 | if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec, event), | 190 | if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec, event), |
172 | msecs_to_jiffies(ACPI_EC_DELAY))) | 191 | msecs_to_jiffies(ACPI_EC_DELAY))) |
173 | return 0; | 192 | goto end; |
174 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 193 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
175 | if (acpi_ec_check_status(ec, event)) { | 194 | if (acpi_ec_check_status(ec, event)) { |
176 | if (event == ACPI_EC_EVENT_OBF_1) { | 195 | if (test_bit(EC_FLAGS_ADDRESS, &ec->flags)) { |
177 | /* miss OBF = 1 GPE, don't expect it anymore */ | 196 | /* miss address GPE, don't expect it anymore */ |
178 | printk(KERN_INFO PREFIX "missing OBF_1 confirmation," | 197 | pr_info(PREFIX "missing address confirmation, " |
179 | "switching to degraded mode.\n"); | 198 | "don't expect it any longer.\n"); |
180 | set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags); | 199 | set_bit(EC_FLAGS_NO_ADDRESS_GPE, &ec->flags); |
200 | } else if (test_bit(EC_FLAGS_WDATA, &ec->flags)) { | ||
201 | /* miss write data GPE, don't expect it */ | ||
202 | pr_info(PREFIX "missing write data confirmation, " | ||
203 | "don't expect it any longer.\n"); | ||
204 | set_bit(EC_FLAGS_NO_WDATA_GPE, &ec->flags); | ||
181 | } else { | 205 | } else { |
182 | /* missing GPEs, switch back to poll mode */ | 206 | /* missing GPEs, switch back to poll mode */ |
183 | printk(KERN_INFO PREFIX "missing IBF_1 confirmations," | 207 | if (printk_ratelimit()) |
184 | "switch off interrupt mode.\n"); | 208 | pr_info(PREFIX "missing confirmations, " |
209 | "switch off interrupt mode.\n"); | ||
185 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); | 210 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); |
186 | } | 211 | } |
187 | return 0; | 212 | goto end; |
188 | } | 213 | } |
189 | } else { | 214 | } else { |
190 | unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY); | 215 | unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY); |
191 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 216 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
192 | while (time_before(jiffies, delay)) { | 217 | while (time_before(jiffies, delay)) { |
193 | if (acpi_ec_check_status(ec, event)) | 218 | if (acpi_ec_check_status(ec, event)) |
194 | return 0; | 219 | goto end; |
195 | } | 220 | } |
196 | } | 221 | } |
197 | printk(KERN_ERR PREFIX "acpi_ec_wait timeout," | 222 | pr_err(PREFIX "acpi_ec_wait timeout," |
198 | " status = %d, expect_event = %d\n", | 223 | " status = %d, expect_event = %d\n", |
199 | acpi_ec_read_status(ec), event); | 224 | acpi_ec_read_status(ec), event); |
200 | return -ETIME; | 225 | ret = -ETIME; |
226 | end: | ||
227 | clear_bit(EC_FLAGS_ADDRESS, &ec->flags); | ||
228 | return ret; | ||
201 | } | 229 | } |
202 | 230 | ||
203 | static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, | 231 | static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, |
@@ -208,22 +236,26 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, | |||
208 | int result = 0; | 236 | int result = 0; |
209 | set_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 237 | set_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
210 | acpi_ec_write_cmd(ec, command); | 238 | acpi_ec_write_cmd(ec, command); |
211 | 239 | pr_debug(PREFIX "transaction start\n"); | |
212 | for (; wdata_len > 0; --wdata_len) { | 240 | for (; wdata_len > 0; --wdata_len) { |
213 | result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll); | 241 | result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll); |
214 | if (result) { | 242 | if (result) { |
215 | printk(KERN_ERR PREFIX | 243 | pr_err(PREFIX |
216 | "write_cmd timeout, command = %d\n", command); | 244 | "write_cmd timeout, command = %d\n", command); |
217 | goto end; | 245 | goto end; |
218 | } | 246 | } |
247 | /* mark the address byte written to EC */ | ||
248 | if (rdata_len + wdata_len > 1) | ||
249 | set_bit(EC_FLAGS_ADDRESS, &ec->flags); | ||
219 | set_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 250 | set_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
220 | acpi_ec_write_data(ec, *(wdata++)); | 251 | acpi_ec_write_data(ec, *(wdata++)); |
221 | } | 252 | } |
222 | 253 | ||
223 | if (!rdata_len) { | 254 | if (!rdata_len) { |
255 | set_bit(EC_FLAGS_WDATA, &ec->flags); | ||
224 | result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll); | 256 | result = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, force_poll); |
225 | if (result) { | 257 | if (result) { |
226 | printk(KERN_ERR PREFIX | 258 | pr_err(PREFIX |
227 | "finish-write timeout, command = %d\n", command); | 259 | "finish-write timeout, command = %d\n", command); |
228 | goto end; | 260 | goto end; |
229 | } | 261 | } |
@@ -231,12 +263,9 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, | |||
231 | clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); | 263 | clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); |
232 | 264 | ||
233 | for (; rdata_len > 0; --rdata_len) { | 265 | for (; rdata_len > 0; --rdata_len) { |
234 | if (test_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags)) | ||
235 | force_poll = 1; | ||
236 | result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll); | 266 | result = acpi_ec_wait(ec, ACPI_EC_EVENT_OBF_1, force_poll); |
237 | if (result) { | 267 | if (result) { |
238 | printk(KERN_ERR PREFIX "read timeout, command = %d\n", | 268 | pr_err(PREFIX "read timeout, command = %d\n", command); |
239 | command); | ||
240 | goto end; | 269 | goto end; |
241 | } | 270 | } |
242 | /* Don't expect GPE after last read */ | 271 | /* Don't expect GPE after last read */ |
@@ -245,6 +274,7 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, | |||
245 | *(rdata++) = acpi_ec_read_data(ec); | 274 | *(rdata++) = acpi_ec_read_data(ec); |
246 | } | 275 | } |
247 | end: | 276 | end: |
277 | pr_debug(PREFIX "transaction end\n"); | ||
248 | return result; | 278 | return result; |
249 | } | 279 | } |
250 | 280 | ||
@@ -273,8 +303,8 @@ static int acpi_ec_transaction(struct acpi_ec *ec, u8 command, | |||
273 | 303 | ||
274 | status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, 0); | 304 | status = acpi_ec_wait(ec, ACPI_EC_EVENT_IBF_0, 0); |
275 | if (status) { | 305 | if (status) { |
276 | printk(KERN_ERR PREFIX | 306 | pr_err(PREFIX "input buffer is not empty, " |
277 | "input buffer is not empty, aborting transaction\n"); | 307 | "aborting transaction\n"); |
278 | goto end; | 308 | goto end; |
279 | } | 309 | } |
280 | 310 | ||
@@ -488,6 +518,7 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
488 | acpi_status status = AE_OK; | 518 | acpi_status status = AE_OK; |
489 | struct acpi_ec *ec = data; | 519 | struct acpi_ec *ec = data; |
490 | 520 | ||
521 | pr_debug(PREFIX "~~~> interrupt\n"); | ||
491 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 522 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
492 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) | 523 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) |
493 | wake_up(&ec->wait); | 524 | wake_up(&ec->wait); |
@@ -498,8 +529,9 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
498 | acpi_ec_gpe_query, ec); | 529 | acpi_ec_gpe_query, ec); |
499 | } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) { | 530 | } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) { |
500 | /* this is non-query, must be confirmation */ | 531 | /* this is non-query, must be confirmation */ |
501 | printk(KERN_INFO PREFIX "non-query interrupt received," | 532 | if (printk_ratelimit()) |
502 | " switching to interrupt mode\n"); | 533 | pr_info(PREFIX "non-query interrupt received," |
534 | " switching to interrupt mode\n"); | ||
503 | set_bit(EC_FLAGS_GPE_MODE, &ec->flags); | 535 | set_bit(EC_FLAGS_GPE_MODE, &ec->flags); |
504 | } | 536 | } |
505 | 537 | ||
@@ -701,10 +733,10 @@ static void ec_remove_handlers(struct acpi_ec *ec) | |||
701 | { | 733 | { |
702 | if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle, | 734 | if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle, |
703 | ACPI_ADR_SPACE_EC, &acpi_ec_space_handler))) | 735 | ACPI_ADR_SPACE_EC, &acpi_ec_space_handler))) |
704 | printk(KERN_ERR PREFIX "failed to remove space handler\n"); | 736 | pr_err(PREFIX "failed to remove space handler\n"); |
705 | if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe, | 737 | if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe, |
706 | &acpi_ec_gpe_handler))) | 738 | &acpi_ec_gpe_handler))) |
707 | printk(KERN_ERR PREFIX "failed to remove gpe handler\n"); | 739 | pr_err(PREFIX "failed to remove gpe handler\n"); |
708 | ec->handlers_installed = 0; | 740 | ec->handlers_installed = 0; |
709 | } | 741 | } |
710 | 742 | ||
@@ -747,9 +779,9 @@ static int acpi_ec_add(struct acpi_device *device) | |||
747 | first_ec = ec; | 779 | first_ec = ec; |
748 | acpi_driver_data(device) = ec; | 780 | acpi_driver_data(device) = ec; |
749 | acpi_ec_add_fs(device); | 781 | acpi_ec_add_fs(device); |
750 | printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", | 782 | pr_info(PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", |
751 | ec->gpe, ec->command_addr, ec->data_addr); | 783 | ec->gpe, ec->command_addr, ec->data_addr); |
752 | printk(KERN_INFO PREFIX "driver started in %s mode\n", | 784 | pr_info(PREFIX "driver started in %s mode\n", |
753 | (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll"); | 785 | (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll"); |
754 | return 0; | 786 | return 0; |
755 | } | 787 | } |
@@ -875,18 +907,26 @@ int __init acpi_ec_ecdt_probe(void) | |||
875 | status = acpi_get_table(ACPI_SIG_ECDT, 1, | 907 | status = acpi_get_table(ACPI_SIG_ECDT, 1, |
876 | (struct acpi_table_header **)&ecdt_ptr); | 908 | (struct acpi_table_header **)&ecdt_ptr); |
877 | if (ACPI_SUCCESS(status)) { | 909 | if (ACPI_SUCCESS(status)) { |
878 | printk(KERN_INFO PREFIX "EC description table is found, configuring boot EC\n"); | 910 | pr_info(PREFIX "EC description table is found, configuring boot EC\n"); |
879 | boot_ec->command_addr = ecdt_ptr->control.address; | 911 | boot_ec->command_addr = ecdt_ptr->control.address; |
880 | boot_ec->data_addr = ecdt_ptr->data.address; | 912 | boot_ec->data_addr = ecdt_ptr->data.address; |
881 | boot_ec->gpe = ecdt_ptr->gpe; | 913 | boot_ec->gpe = ecdt_ptr->gpe; |
882 | boot_ec->handle = ACPI_ROOT_OBJECT; | 914 | boot_ec->handle = ACPI_ROOT_OBJECT; |
883 | } else { | 915 | } else { |
916 | /* This workaround is needed only on some broken machines, | ||
917 | * which require early EC, but fail to provide ECDT */ | ||
918 | acpi_handle x; | ||
884 | printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); | 919 | printk(KERN_DEBUG PREFIX "Look up EC in DSDT\n"); |
885 | status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, | 920 | status = acpi_get_devices(ec_device_ids[0].id, ec_parse_device, |
886 | boot_ec, NULL); | 921 | boot_ec, NULL); |
887 | /* Check that acpi_get_devices actually find something */ | 922 | /* Check that acpi_get_devices actually find something */ |
888 | if (ACPI_FAILURE(status) || !boot_ec->handle) | 923 | if (ACPI_FAILURE(status) || !boot_ec->handle) |
889 | goto error; | 924 | goto error; |
925 | /* We really need to limit this workaround, the only ASUS, | ||
926 | * which needs it, has fake EC._INI method, so use it as flag. | ||
927 | */ | ||
928 | if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) | ||
929 | goto error; | ||
890 | } | 930 | } |
891 | 931 | ||
892 | ret = ec_install_handlers(boot_ec); | 932 | ret = ec_install_handlers(boot_ec); |
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index aabc6ca4a81c..e3a673a00845 100644 --- a/drivers/acpi/osl.c +++ b/drivers/acpi/osl.c | |||
@@ -387,17 +387,14 @@ acpi_status acpi_os_read_port(acpi_io_address port, u32 * value, u32 width) | |||
387 | if (!value) | 387 | if (!value) |
388 | value = &dummy; | 388 | value = &dummy; |
389 | 389 | ||
390 | switch (width) { | 390 | *value = 0; |
391 | case 8: | 391 | if (width <= 8) { |
392 | *(u8 *) value = inb(port); | 392 | *(u8 *) value = inb(port); |
393 | break; | 393 | } else if (width <= 16) { |
394 | case 16: | ||
395 | *(u16 *) value = inw(port); | 394 | *(u16 *) value = inw(port); |
396 | break; | 395 | } else if (width <= 32) { |
397 | case 32: | ||
398 | *(u32 *) value = inl(port); | 396 | *(u32 *) value = inl(port); |
399 | break; | 397 | } else { |
400 | default: | ||
401 | BUG(); | 398 | BUG(); |
402 | } | 399 | } |
403 | 400 | ||
@@ -408,17 +405,13 @@ EXPORT_SYMBOL(acpi_os_read_port); | |||
408 | 405 | ||
409 | acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width) | 406 | acpi_status acpi_os_write_port(acpi_io_address port, u32 value, u32 width) |
410 | { | 407 | { |
411 | switch (width) { | 408 | if (width <= 8) { |
412 | case 8: | ||
413 | outb(value, port); | 409 | outb(value, port); |
414 | break; | 410 | } else if (width <= 16) { |
415 | case 16: | ||
416 | outw(value, port); | 411 | outw(value, port); |
417 | break; | 412 | } else if (width <= 32) { |
418 | case 32: | ||
419 | outl(value, port); | 413 | outl(value, port); |
420 | break; | 414 | } else { |
421 | default: | ||
422 | BUG(); | 415 | BUG(); |
423 | } | 416 | } |
424 | 417 | ||
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 235a51e328c3..015689d295c7 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -612,12 +612,6 @@ static int acpi_processor_get_info(struct acpi_processor *pr, unsigned has_uid) | |||
612 | request_region(pr->throttling.address, 6, "ACPI CPU throttle"); | 612 | request_region(pr->throttling.address, 6, "ACPI CPU throttle"); |
613 | } | 613 | } |
614 | 614 | ||
615 | #ifdef CONFIG_CPU_FREQ | ||
616 | acpi_processor_ppc_has_changed(pr); | ||
617 | #endif | ||
618 | acpi_processor_get_throttling_info(pr); | ||
619 | acpi_processor_get_limit_info(pr); | ||
620 | |||
621 | return 0; | 615 | return 0; |
622 | } | 616 | } |
623 | 617 | ||
@@ -647,7 +641,7 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) | |||
647 | */ | 641 | */ |
648 | if (processor_device_array[pr->id] != NULL && | 642 | if (processor_device_array[pr->id] != NULL && |
649 | processor_device_array[pr->id] != device) { | 643 | processor_device_array[pr->id] != device) { |
650 | printk(KERN_WARNING "BIOS reported wrong ACPI id" | 644 | printk(KERN_WARNING "BIOS reported wrong ACPI id " |
651 | "for the processor\n"); | 645 | "for the processor\n"); |
652 | return -ENODEV; | 646 | return -ENODEV; |
653 | } | 647 | } |
@@ -665,6 +659,12 @@ static int __cpuinit acpi_processor_start(struct acpi_device *device) | |||
665 | /* _PDC call should be done before doing anything else (if reqd.). */ | 659 | /* _PDC call should be done before doing anything else (if reqd.). */ |
666 | arch_acpi_processor_init_pdc(pr); | 660 | arch_acpi_processor_init_pdc(pr); |
667 | acpi_processor_set_pdc(pr); | 661 | acpi_processor_set_pdc(pr); |
662 | #ifdef CONFIG_CPU_FREQ | ||
663 | acpi_processor_ppc_has_changed(pr); | ||
664 | #endif | ||
665 | acpi_processor_get_throttling_info(pr); | ||
666 | acpi_processor_get_limit_info(pr); | ||
667 | |||
668 | 668 | ||
669 | acpi_processor_power_init(pr, device); | 669 | acpi_processor_power_init(pr, device); |
670 | 670 | ||
@@ -684,7 +684,7 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) | |||
684 | { | 684 | { |
685 | struct acpi_processor *pr = data; | 685 | struct acpi_processor *pr = data; |
686 | struct acpi_device *device = NULL; | 686 | struct acpi_device *device = NULL; |
687 | 687 | int saved; | |
688 | 688 | ||
689 | if (!pr) | 689 | if (!pr) |
690 | return; | 690 | return; |
@@ -694,7 +694,10 @@ static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) | |||
694 | 694 | ||
695 | switch (event) { | 695 | switch (event) { |
696 | case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: | 696 | case ACPI_PROCESSOR_NOTIFY_PERFORMANCE: |
697 | saved = pr->performance_platform_limit; | ||
697 | acpi_processor_ppc_has_changed(pr); | 698 | acpi_processor_ppc_has_changed(pr); |
699 | if (saved == pr->performance_platform_limit) | ||
700 | break; | ||
698 | acpi_bus_generate_proc_event(device, event, | 701 | acpi_bus_generate_proc_event(device, event, |
699 | pr->performance_platform_limit); | 702 | pr->performance_platform_limit); |
700 | acpi_bus_generate_netlink_event(device->pnp.device_class, | 703 | acpi_bus_generate_netlink_event(device->pnp.device_class, |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index b52109bd06d2..b1fbee3f7fe1 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -197,6 +197,19 @@ static inline u32 ticks_elapsed_in_us(u32 t1, u32 t2) | |||
197 | return PM_TIMER_TICKS_TO_US((0xFFFFFFFF - t1) + t2); | 197 | return PM_TIMER_TICKS_TO_US((0xFFFFFFFF - t1) + t2); |
198 | } | 198 | } |
199 | 199 | ||
200 | static void acpi_safe_halt(void) | ||
201 | { | ||
202 | current_thread_info()->status &= ~TS_POLLING; | ||
203 | /* | ||
204 | * TS_POLLING-cleared state must be visible before we | ||
205 | * test NEED_RESCHED: | ||
206 | */ | ||
207 | smp_mb(); | ||
208 | if (!need_resched()) | ||
209 | safe_halt(); | ||
210 | current_thread_info()->status |= TS_POLLING; | ||
211 | } | ||
212 | |||
200 | #ifndef CONFIG_CPU_IDLE | 213 | #ifndef CONFIG_CPU_IDLE |
201 | 214 | ||
202 | static void | 215 | static void |
@@ -239,19 +252,6 @@ acpi_processor_power_activate(struct acpi_processor *pr, | |||
239 | return; | 252 | return; |
240 | } | 253 | } |
241 | 254 | ||
242 | static void acpi_safe_halt(void) | ||
243 | { | ||
244 | current_thread_info()->status &= ~TS_POLLING; | ||
245 | /* | ||
246 | * TS_POLLING-cleared state must be visible before we | ||
247 | * test NEED_RESCHED: | ||
248 | */ | ||
249 | smp_mb(); | ||
250 | if (!need_resched()) | ||
251 | safe_halt(); | ||
252 | current_thread_info()->status |= TS_POLLING; | ||
253 | } | ||
254 | |||
255 | static atomic_t c3_cpu_count; | 255 | static atomic_t c3_cpu_count; |
256 | 256 | ||
257 | /* Common C-state entry for C2, C3, .. */ | 257 | /* Common C-state entry for C2, C3, .. */ |
@@ -1373,15 +1373,7 @@ static int acpi_idle_enter_c1(struct cpuidle_device *dev, | |||
1373 | if (pr->flags.bm_check) | 1373 | if (pr->flags.bm_check) |
1374 | acpi_idle_update_bm_rld(pr, cx); | 1374 | acpi_idle_update_bm_rld(pr, cx); |
1375 | 1375 | ||
1376 | current_thread_info()->status &= ~TS_POLLING; | 1376 | acpi_safe_halt(); |
1377 | /* | ||
1378 | * TS_POLLING-cleared state must be visible before we test | ||
1379 | * NEED_RESCHED: | ||
1380 | */ | ||
1381 | smp_mb(); | ||
1382 | if (!need_resched()) | ||
1383 | safe_halt(); | ||
1384 | current_thread_info()->status |= TS_POLLING; | ||
1385 | 1377 | ||
1386 | cx->usage++; | 1378 | cx->usage++; |
1387 | 1379 | ||
@@ -1399,6 +1391,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
1399 | struct acpi_processor *pr; | 1391 | struct acpi_processor *pr; |
1400 | struct acpi_processor_cx *cx = cpuidle_get_statedata(state); | 1392 | struct acpi_processor_cx *cx = cpuidle_get_statedata(state); |
1401 | u32 t1, t2; | 1393 | u32 t1, t2; |
1394 | int sleep_ticks = 0; | ||
1395 | |||
1402 | pr = processors[smp_processor_id()]; | 1396 | pr = processors[smp_processor_id()]; |
1403 | 1397 | ||
1404 | if (unlikely(!pr)) | 1398 | if (unlikely(!pr)) |
@@ -1428,6 +1422,8 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
1428 | ACPI_FLUSH_CPU_CACHE(); | 1422 | ACPI_FLUSH_CPU_CACHE(); |
1429 | 1423 | ||
1430 | t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); | 1424 | t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); |
1425 | /* Tell the scheduler that we are going deep-idle: */ | ||
1426 | sched_clock_idle_sleep_event(); | ||
1431 | acpi_state_timer_broadcast(pr, cx, 1); | 1427 | acpi_state_timer_broadcast(pr, cx, 1); |
1432 | acpi_idle_do_entry(cx); | 1428 | acpi_idle_do_entry(cx); |
1433 | t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); | 1429 | t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); |
@@ -1436,6 +1432,10 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
1436 | /* TSC could halt in idle, so notify users */ | 1432 | /* TSC could halt in idle, so notify users */ |
1437 | mark_tsc_unstable("TSC halts in idle");; | 1433 | mark_tsc_unstable("TSC halts in idle");; |
1438 | #endif | 1434 | #endif |
1435 | sleep_ticks = ticks_elapsed(t1, t2); | ||
1436 | |||
1437 | /* Tell the scheduler how much we idled: */ | ||
1438 | sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); | ||
1439 | 1439 | ||
1440 | local_irq_enable(); | 1440 | local_irq_enable(); |
1441 | current_thread_info()->status |= TS_POLLING; | 1441 | current_thread_info()->status |= TS_POLLING; |
@@ -1443,7 +1443,7 @@ static int acpi_idle_enter_simple(struct cpuidle_device *dev, | |||
1443 | cx->usage++; | 1443 | cx->usage++; |
1444 | 1444 | ||
1445 | acpi_state_timer_broadcast(pr, cx, 0); | 1445 | acpi_state_timer_broadcast(pr, cx, 0); |
1446 | cx->time += ticks_elapsed(t1, t2); | 1446 | cx->time += sleep_ticks; |
1447 | return ticks_elapsed_in_us(t1, t2); | 1447 | return ticks_elapsed_in_us(t1, t2); |
1448 | } | 1448 | } |
1449 | 1449 | ||
@@ -1463,6 +1463,8 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1463 | struct acpi_processor *pr; | 1463 | struct acpi_processor *pr; |
1464 | struct acpi_processor_cx *cx = cpuidle_get_statedata(state); | 1464 | struct acpi_processor_cx *cx = cpuidle_get_statedata(state); |
1465 | u32 t1, t2; | 1465 | u32 t1, t2; |
1466 | int sleep_ticks = 0; | ||
1467 | |||
1466 | pr = processors[smp_processor_id()]; | 1468 | pr = processors[smp_processor_id()]; |
1467 | 1469 | ||
1468 | if (unlikely(!pr)) | 1470 | if (unlikely(!pr)) |
@@ -1471,6 +1473,15 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1471 | if (acpi_idle_suspend) | 1473 | if (acpi_idle_suspend) |
1472 | return(acpi_idle_enter_c1(dev, state)); | 1474 | return(acpi_idle_enter_c1(dev, state)); |
1473 | 1475 | ||
1476 | if (acpi_idle_bm_check()) { | ||
1477 | if (dev->safe_state) { | ||
1478 | return dev->safe_state->enter(dev, dev->safe_state); | ||
1479 | } else { | ||
1480 | acpi_safe_halt(); | ||
1481 | return 0; | ||
1482 | } | ||
1483 | } | ||
1484 | |||
1474 | local_irq_disable(); | 1485 | local_irq_disable(); |
1475 | current_thread_info()->status &= ~TS_POLLING; | 1486 | current_thread_info()->status &= ~TS_POLLING; |
1476 | /* | 1487 | /* |
@@ -1485,38 +1496,45 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1485 | return 0; | 1496 | return 0; |
1486 | } | 1497 | } |
1487 | 1498 | ||
1499 | /* Tell the scheduler that we are going deep-idle: */ | ||
1500 | sched_clock_idle_sleep_event(); | ||
1488 | /* | 1501 | /* |
1489 | * Must be done before busmaster disable as we might need to | 1502 | * Must be done before busmaster disable as we might need to |
1490 | * access HPET ! | 1503 | * access HPET ! |
1491 | */ | 1504 | */ |
1492 | acpi_state_timer_broadcast(pr, cx, 1); | 1505 | acpi_state_timer_broadcast(pr, cx, 1); |
1493 | 1506 | ||
1494 | if (acpi_idle_bm_check()) { | 1507 | acpi_idle_update_bm_rld(pr, cx); |
1495 | cx = pr->power.bm_state; | ||
1496 | |||
1497 | acpi_idle_update_bm_rld(pr, cx); | ||
1498 | |||
1499 | t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); | ||
1500 | acpi_idle_do_entry(cx); | ||
1501 | t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); | ||
1502 | } else { | ||
1503 | acpi_idle_update_bm_rld(pr, cx); | ||
1504 | 1508 | ||
1509 | /* | ||
1510 | * disable bus master | ||
1511 | * bm_check implies we need ARB_DIS | ||
1512 | * !bm_check implies we need cache flush | ||
1513 | * bm_control implies whether we can do ARB_DIS | ||
1514 | * | ||
1515 | * That leaves a case where bm_check is set and bm_control is | ||
1516 | * not set. In that case we cannot do much, we enter C3 | ||
1517 | * without doing anything. | ||
1518 | */ | ||
1519 | if (pr->flags.bm_check && pr->flags.bm_control) { | ||
1505 | spin_lock(&c3_lock); | 1520 | spin_lock(&c3_lock); |
1506 | c3_cpu_count++; | 1521 | c3_cpu_count++; |
1507 | /* Disable bus master arbitration when all CPUs are in C3 */ | 1522 | /* Disable bus master arbitration when all CPUs are in C3 */ |
1508 | if (c3_cpu_count == num_online_cpus()) | 1523 | if (c3_cpu_count == num_online_cpus()) |
1509 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); | 1524 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 1); |
1510 | spin_unlock(&c3_lock); | 1525 | spin_unlock(&c3_lock); |
1526 | } else if (!pr->flags.bm_check) { | ||
1527 | ACPI_FLUSH_CPU_CACHE(); | ||
1528 | } | ||
1511 | 1529 | ||
1512 | t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); | 1530 | t1 = inl(acpi_gbl_FADT.xpm_timer_block.address); |
1513 | acpi_idle_do_entry(cx); | 1531 | acpi_idle_do_entry(cx); |
1514 | t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); | 1532 | t2 = inl(acpi_gbl_FADT.xpm_timer_block.address); |
1515 | 1533 | ||
1534 | /* Re-enable bus master arbitration */ | ||
1535 | if (pr->flags.bm_check && pr->flags.bm_control) { | ||
1516 | spin_lock(&c3_lock); | 1536 | spin_lock(&c3_lock); |
1517 | /* Re-enable bus master arbitration */ | 1537 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); |
1518 | if (c3_cpu_count == num_online_cpus()) | ||
1519 | acpi_set_register(ACPI_BITREG_ARB_DISABLE, 0); | ||
1520 | c3_cpu_count--; | 1538 | c3_cpu_count--; |
1521 | spin_unlock(&c3_lock); | 1539 | spin_unlock(&c3_lock); |
1522 | } | 1540 | } |
@@ -1525,6 +1543,9 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1525 | /* TSC could halt in idle, so notify users */ | 1543 | /* TSC could halt in idle, so notify users */ |
1526 | mark_tsc_unstable("TSC halts in idle"); | 1544 | mark_tsc_unstable("TSC halts in idle"); |
1527 | #endif | 1545 | #endif |
1546 | sleep_ticks = ticks_elapsed(t1, t2); | ||
1547 | /* Tell the scheduler how much we idled: */ | ||
1548 | sched_clock_idle_wakeup_event(sleep_ticks*PM_TIMER_TICK_NS); | ||
1528 | 1549 | ||
1529 | local_irq_enable(); | 1550 | local_irq_enable(); |
1530 | current_thread_info()->status |= TS_POLLING; | 1551 | current_thread_info()->status |= TS_POLLING; |
@@ -1532,7 +1553,7 @@ static int acpi_idle_enter_bm(struct cpuidle_device *dev, | |||
1532 | cx->usage++; | 1553 | cx->usage++; |
1533 | 1554 | ||
1534 | acpi_state_timer_broadcast(pr, cx, 0); | 1555 | acpi_state_timer_broadcast(pr, cx, 0); |
1535 | cx->time += ticks_elapsed(t1, t2); | 1556 | cx->time += sleep_ticks; |
1536 | return ticks_elapsed_in_us(t1, t2); | 1557 | return ticks_elapsed_in_us(t1, t2); |
1537 | } | 1558 | } |
1538 | 1559 | ||
@@ -1584,12 +1605,14 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1584 | case ACPI_STATE_C1: | 1605 | case ACPI_STATE_C1: |
1585 | state->flags |= CPUIDLE_FLAG_SHALLOW; | 1606 | state->flags |= CPUIDLE_FLAG_SHALLOW; |
1586 | state->enter = acpi_idle_enter_c1; | 1607 | state->enter = acpi_idle_enter_c1; |
1608 | dev->safe_state = state; | ||
1587 | break; | 1609 | break; |
1588 | 1610 | ||
1589 | case ACPI_STATE_C2: | 1611 | case ACPI_STATE_C2: |
1590 | state->flags |= CPUIDLE_FLAG_BALANCED; | 1612 | state->flags |= CPUIDLE_FLAG_BALANCED; |
1591 | state->flags |= CPUIDLE_FLAG_TIME_VALID; | 1613 | state->flags |= CPUIDLE_FLAG_TIME_VALID; |
1592 | state->enter = acpi_idle_enter_simple; | 1614 | state->enter = acpi_idle_enter_simple; |
1615 | dev->safe_state = state; | ||
1593 | break; | 1616 | break; |
1594 | 1617 | ||
1595 | case ACPI_STATE_C3: | 1618 | case ACPI_STATE_C3: |
@@ -1610,14 +1633,6 @@ static int acpi_processor_setup_cpuidle(struct acpi_processor *pr) | |||
1610 | if (!count) | 1633 | if (!count) |
1611 | return -EINVAL; | 1634 | return -EINVAL; |
1612 | 1635 | ||
1613 | /* find the deepest state that can handle active BM */ | ||
1614 | if (pr->flags.bm_check) { | ||
1615 | for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) | ||
1616 | if (pr->power.states[i].type == ACPI_STATE_C3) | ||
1617 | break; | ||
1618 | pr->power.bm_state = &pr->power.states[i-1]; | ||
1619 | } | ||
1620 | |||
1621 | return 0; | 1636 | return 0; |
1622 | } | 1637 | } |
1623 | 1638 | ||
diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 0b8204e7082a..c26c61fb36c3 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c | |||
@@ -70,7 +70,55 @@ static int acpi_processor_get_platform_limit(struct acpi_processor *pr) | |||
70 | 70 | ||
71 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr) | 71 | int acpi_processor_tstate_has_changed(struct acpi_processor *pr) |
72 | { | 72 | { |
73 | return acpi_processor_get_platform_limit(pr); | 73 | int result = 0; |
74 | int throttling_limit; | ||
75 | int current_state; | ||
76 | struct acpi_processor_limit *limit; | ||
77 | int target_state; | ||
78 | |||
79 | result = acpi_processor_get_platform_limit(pr); | ||
80 | if (result) { | ||
81 | /* Throttling Limit is unsupported */ | ||
82 | return result; | ||
83 | } | ||
84 | |||
85 | throttling_limit = pr->throttling_platform_limit; | ||
86 | if (throttling_limit >= pr->throttling.state_count) { | ||
87 | /* Uncorrect Throttling Limit */ | ||
88 | return -EINVAL; | ||
89 | } | ||
90 | |||
91 | current_state = pr->throttling.state; | ||
92 | if (current_state > throttling_limit) { | ||
93 | /* | ||
94 | * The current state can meet the requirement of | ||
95 | * _TPC limit. But it is reasonable that OSPM changes | ||
96 | * t-states from high to low for better performance. | ||
97 | * Of course the limit condition of thermal | ||
98 | * and user should be considered. | ||
99 | */ | ||
100 | limit = &pr->limit; | ||
101 | target_state = throttling_limit; | ||
102 | if (limit->thermal.tx > target_state) | ||
103 | target_state = limit->thermal.tx; | ||
104 | if (limit->user.tx > target_state) | ||
105 | target_state = limit->user.tx; | ||
106 | } else if (current_state == throttling_limit) { | ||
107 | /* | ||
108 | * Unnecessary to change the throttling state | ||
109 | */ | ||
110 | return 0; | ||
111 | } else { | ||
112 | /* | ||
113 | * If the current state is lower than the limit of _TPC, it | ||
114 | * will be forced to switch to the throttling state defined | ||
115 | * by throttling_platfor_limit. | ||
116 | * Because the previous state meets with the limit condition | ||
117 | * of thermal and user, it is unnecessary to check it again. | ||
118 | */ | ||
119 | target_state = throttling_limit; | ||
120 | } | ||
121 | return acpi_processor_set_throttling(pr, target_state); | ||
74 | } | 122 | } |
75 | 123 | ||
76 | /* | 124 | /* |
@@ -83,6 +131,7 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr) | |||
83 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 131 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
84 | union acpi_object *ptc = NULL; | 132 | union acpi_object *ptc = NULL; |
85 | union acpi_object obj = { 0 }; | 133 | union acpi_object obj = { 0 }; |
134 | struct acpi_processor_throttling *throttling; | ||
86 | 135 | ||
87 | status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer); | 136 | status = acpi_evaluate_object(pr->handle, "_PTC", NULL, &buffer); |
88 | if (ACPI_FAILURE(status)) { | 137 | if (ACPI_FAILURE(status)) { |
@@ -134,6 +183,22 @@ static int acpi_processor_get_throttling_control(struct acpi_processor *pr) | |||
134 | memcpy(&pr->throttling.status_register, obj.buffer.pointer, | 183 | memcpy(&pr->throttling.status_register, obj.buffer.pointer, |
135 | sizeof(struct acpi_ptc_register)); | 184 | sizeof(struct acpi_ptc_register)); |
136 | 185 | ||
186 | throttling = &pr->throttling; | ||
187 | |||
188 | if ((throttling->control_register.bit_width + | ||
189 | throttling->control_register.bit_offset) > 32) { | ||
190 | printk(KERN_ERR PREFIX "Invalid _PTC control register\n"); | ||
191 | result = -EFAULT; | ||
192 | goto end; | ||
193 | } | ||
194 | |||
195 | if ((throttling->status_register.bit_width + | ||
196 | throttling->status_register.bit_offset) > 32) { | ||
197 | printk(KERN_ERR PREFIX "Invalid _PTC status register\n"); | ||
198 | result = -EFAULT; | ||
199 | goto end; | ||
200 | } | ||
201 | |||
137 | end: | 202 | end: |
138 | kfree(buffer.pointer); | 203 | kfree(buffer.pointer); |
139 | 204 | ||
@@ -328,44 +393,132 @@ static int acpi_processor_get_throttling_fadt(struct acpi_processor *pr) | |||
328 | return 0; | 393 | return 0; |
329 | } | 394 | } |
330 | 395 | ||
331 | static int acpi_read_throttling_status(struct acpi_processor_throttling | 396 | #ifdef CONFIG_X86 |
332 | *throttling) | 397 | static int acpi_throttling_rdmsr(struct acpi_processor *pr, |
398 | acpi_integer * value) | ||
333 | { | 399 | { |
334 | int value = -1; | 400 | struct cpuinfo_x86 *c; |
401 | u64 msr_high, msr_low; | ||
402 | unsigned int cpu; | ||
403 | u64 msr = 0; | ||
404 | int ret = -1; | ||
405 | |||
406 | cpu = pr->id; | ||
407 | c = &cpu_data(cpu); | ||
408 | |||
409 | if ((c->x86_vendor != X86_VENDOR_INTEL) || | ||
410 | !cpu_has(c, X86_FEATURE_ACPI)) { | ||
411 | printk(KERN_ERR PREFIX | ||
412 | "HARDWARE addr space,NOT supported yet\n"); | ||
413 | } else { | ||
414 | msr_low = 0; | ||
415 | msr_high = 0; | ||
416 | rdmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, | ||
417 | (u32 *)&msr_low , (u32 *) &msr_high); | ||
418 | msr = (msr_high << 32) | msr_low; | ||
419 | *value = (acpi_integer) msr; | ||
420 | ret = 0; | ||
421 | } | ||
422 | return ret; | ||
423 | } | ||
424 | |||
425 | static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value) | ||
426 | { | ||
427 | struct cpuinfo_x86 *c; | ||
428 | unsigned int cpu; | ||
429 | int ret = -1; | ||
430 | u64 msr; | ||
431 | |||
432 | cpu = pr->id; | ||
433 | c = &cpu_data(cpu); | ||
434 | |||
435 | if ((c->x86_vendor != X86_VENDOR_INTEL) || | ||
436 | !cpu_has(c, X86_FEATURE_ACPI)) { | ||
437 | printk(KERN_ERR PREFIX | ||
438 | "HARDWARE addr space,NOT supported yet\n"); | ||
439 | } else { | ||
440 | msr = value; | ||
441 | wrmsr_on_cpu(cpu, MSR_IA32_THERM_CONTROL, | ||
442 | msr & 0xffffffff, msr >> 32); | ||
443 | ret = 0; | ||
444 | } | ||
445 | return ret; | ||
446 | } | ||
447 | #else | ||
448 | static int acpi_throttling_rdmsr(struct acpi_processor *pr, | ||
449 | acpi_integer * value) | ||
450 | { | ||
451 | printk(KERN_ERR PREFIX | ||
452 | "HARDWARE addr space,NOT supported yet\n"); | ||
453 | return -1; | ||
454 | } | ||
455 | |||
456 | static int acpi_throttling_wrmsr(struct acpi_processor *pr, acpi_integer value) | ||
457 | { | ||
458 | printk(KERN_ERR PREFIX | ||
459 | "HARDWARE addr space,NOT supported yet\n"); | ||
460 | return -1; | ||
461 | } | ||
462 | #endif | ||
463 | |||
464 | static int acpi_read_throttling_status(struct acpi_processor *pr, | ||
465 | acpi_integer *value) | ||
466 | { | ||
467 | u32 bit_width, bit_offset; | ||
468 | u64 ptc_value; | ||
469 | u64 ptc_mask; | ||
470 | struct acpi_processor_throttling *throttling; | ||
471 | int ret = -1; | ||
472 | |||
473 | throttling = &pr->throttling; | ||
335 | switch (throttling->status_register.space_id) { | 474 | switch (throttling->status_register.space_id) { |
336 | case ACPI_ADR_SPACE_SYSTEM_IO: | 475 | case ACPI_ADR_SPACE_SYSTEM_IO: |
476 | ptc_value = 0; | ||
477 | bit_width = throttling->status_register.bit_width; | ||
478 | bit_offset = throttling->status_register.bit_offset; | ||
479 | |||
337 | acpi_os_read_port((acpi_io_address) throttling->status_register. | 480 | acpi_os_read_port((acpi_io_address) throttling->status_register. |
338 | address, &value, | 481 | address, (u32 *) &ptc_value, |
339 | (u32) throttling->status_register.bit_width * | 482 | (u32) (bit_width + bit_offset)); |
340 | 8); | 483 | ptc_mask = (1 << bit_width) - 1; |
484 | *value = (acpi_integer) ((ptc_value >> bit_offset) & ptc_mask); | ||
485 | ret = 0; | ||
341 | break; | 486 | break; |
342 | case ACPI_ADR_SPACE_FIXED_HARDWARE: | 487 | case ACPI_ADR_SPACE_FIXED_HARDWARE: |
343 | printk(KERN_ERR PREFIX | 488 | ret = acpi_throttling_rdmsr(pr, value); |
344 | "HARDWARE addr space,NOT supported yet\n"); | ||
345 | break; | 489 | break; |
346 | default: | 490 | default: |
347 | printk(KERN_ERR PREFIX "Unknown addr space %d\n", | 491 | printk(KERN_ERR PREFIX "Unknown addr space %d\n", |
348 | (u32) (throttling->status_register.space_id)); | 492 | (u32) (throttling->status_register.space_id)); |
349 | } | 493 | } |
350 | return value; | 494 | return ret; |
351 | } | 495 | } |
352 | 496 | ||
353 | static int acpi_write_throttling_state(struct acpi_processor_throttling | 497 | static int acpi_write_throttling_state(struct acpi_processor *pr, |
354 | *throttling, int value) | 498 | acpi_integer value) |
355 | { | 499 | { |
500 | u32 bit_width, bit_offset; | ||
501 | u64 ptc_value; | ||
502 | u64 ptc_mask; | ||
503 | struct acpi_processor_throttling *throttling; | ||
356 | int ret = -1; | 504 | int ret = -1; |
357 | 505 | ||
506 | throttling = &pr->throttling; | ||
358 | switch (throttling->control_register.space_id) { | 507 | switch (throttling->control_register.space_id) { |
359 | case ACPI_ADR_SPACE_SYSTEM_IO: | 508 | case ACPI_ADR_SPACE_SYSTEM_IO: |
509 | bit_width = throttling->control_register.bit_width; | ||
510 | bit_offset = throttling->control_register.bit_offset; | ||
511 | ptc_mask = (1 << bit_width) - 1; | ||
512 | ptc_value = value & ptc_mask; | ||
513 | |||
360 | acpi_os_write_port((acpi_io_address) throttling-> | 514 | acpi_os_write_port((acpi_io_address) throttling-> |
361 | control_register.address, value, | 515 | control_register.address, |
362 | (u32) throttling->control_register. | 516 | (u32) (ptc_value << bit_offset), |
363 | bit_width * 8); | 517 | (u32) (bit_width + bit_offset)); |
364 | ret = 0; | 518 | ret = 0; |
365 | break; | 519 | break; |
366 | case ACPI_ADR_SPACE_FIXED_HARDWARE: | 520 | case ACPI_ADR_SPACE_FIXED_HARDWARE: |
367 | printk(KERN_ERR PREFIX | 521 | ret = acpi_throttling_wrmsr(pr, value); |
368 | "HARDWARE addr space,NOT supported yet\n"); | ||
369 | break; | 522 | break; |
370 | default: | 523 | default: |
371 | printk(KERN_ERR PREFIX "Unknown addr space %d\n", | 524 | printk(KERN_ERR PREFIX "Unknown addr space %d\n", |
@@ -374,7 +527,8 @@ static int acpi_write_throttling_state(struct acpi_processor_throttling | |||
374 | return ret; | 527 | return ret; |
375 | } | 528 | } |
376 | 529 | ||
377 | static int acpi_get_throttling_state(struct acpi_processor *pr, int value) | 530 | static int acpi_get_throttling_state(struct acpi_processor *pr, |
531 | acpi_integer value) | ||
378 | { | 532 | { |
379 | int i; | 533 | int i; |
380 | 534 | ||
@@ -390,22 +544,26 @@ static int acpi_get_throttling_state(struct acpi_processor *pr, int value) | |||
390 | return i; | 544 | return i; |
391 | } | 545 | } |
392 | 546 | ||
393 | static int acpi_get_throttling_value(struct acpi_processor *pr, int state) | 547 | static int acpi_get_throttling_value(struct acpi_processor *pr, |
548 | int state, acpi_integer *value) | ||
394 | { | 549 | { |
395 | int value = -1; | 550 | int ret = -1; |
551 | |||
396 | if (state >= 0 && state <= pr->throttling.state_count) { | 552 | if (state >= 0 && state <= pr->throttling.state_count) { |
397 | struct acpi_processor_tx_tss *tx = | 553 | struct acpi_processor_tx_tss *tx = |
398 | (struct acpi_processor_tx_tss *)&(pr->throttling. | 554 | (struct acpi_processor_tx_tss *)&(pr->throttling. |
399 | states_tss[state]); | 555 | states_tss[state]); |
400 | value = tx->control; | 556 | *value = tx->control; |
557 | ret = 0; | ||
401 | } | 558 | } |
402 | return value; | 559 | return ret; |
403 | } | 560 | } |
404 | 561 | ||
405 | static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) | 562 | static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) |
406 | { | 563 | { |
407 | int state = 0; | 564 | int state = 0; |
408 | u32 value = 0; | 565 | int ret; |
566 | acpi_integer value; | ||
409 | 567 | ||
410 | if (!pr) | 568 | if (!pr) |
411 | return -EINVAL; | 569 | return -EINVAL; |
@@ -415,8 +573,9 @@ static int acpi_processor_get_throttling_ptc(struct acpi_processor *pr) | |||
415 | 573 | ||
416 | pr->throttling.state = 0; | 574 | pr->throttling.state = 0; |
417 | local_irq_disable(); | 575 | local_irq_disable(); |
418 | value = acpi_read_throttling_status(&pr->throttling); | 576 | value = 0; |
419 | if (value >= 0) { | 577 | ret = acpi_read_throttling_status(pr, &value); |
578 | if (ret >= 0) { | ||
420 | state = acpi_get_throttling_state(pr, value); | 579 | state = acpi_get_throttling_state(pr, value); |
421 | pr->throttling.state = state; | 580 | pr->throttling.state = state; |
422 | } | 581 | } |
@@ -430,6 +589,40 @@ static int acpi_processor_get_throttling(struct acpi_processor *pr) | |||
430 | return pr->throttling.acpi_processor_get_throttling(pr); | 589 | return pr->throttling.acpi_processor_get_throttling(pr); |
431 | } | 590 | } |
432 | 591 | ||
592 | static int acpi_processor_get_fadt_info(struct acpi_processor *pr) | ||
593 | { | ||
594 | int i, step; | ||
595 | |||
596 | if (!pr->throttling.address) { | ||
597 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); | ||
598 | return -EINVAL; | ||
599 | } else if (!pr->throttling.duty_width) { | ||
600 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); | ||
601 | return -EINVAL; | ||
602 | } | ||
603 | /* TBD: Support duty_cycle values that span bit 4. */ | ||
604 | else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { | ||
605 | printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n"); | ||
606 | return -EINVAL; | ||
607 | } | ||
608 | |||
609 | pr->throttling.state_count = 1 << acpi_gbl_FADT.duty_width; | ||
610 | |||
611 | /* | ||
612 | * Compute state values. Note that throttling displays a linear power | ||
613 | * performance relationship (at 50% performance the CPU will consume | ||
614 | * 50% power). Values are in 1/10th of a percent to preserve accuracy. | ||
615 | */ | ||
616 | |||
617 | step = (1000 / pr->throttling.state_count); | ||
618 | |||
619 | for (i = 0; i < pr->throttling.state_count; i++) { | ||
620 | pr->throttling.states[i].performance = 1000 - step * i; | ||
621 | pr->throttling.states[i].power = 1000 - step * i; | ||
622 | } | ||
623 | return 0; | ||
624 | } | ||
625 | |||
433 | static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, | 626 | static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, |
434 | int state) | 627 | int state) |
435 | { | 628 | { |
@@ -506,7 +699,8 @@ static int acpi_processor_set_throttling_fadt(struct acpi_processor *pr, | |||
506 | static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, | 699 | static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, |
507 | int state) | 700 | int state) |
508 | { | 701 | { |
509 | u32 value = 0; | 702 | int ret; |
703 | acpi_integer value; | ||
510 | 704 | ||
511 | if (!pr) | 705 | if (!pr) |
512 | return -EINVAL; | 706 | return -EINVAL; |
@@ -524,10 +718,10 @@ static int acpi_processor_set_throttling_ptc(struct acpi_processor *pr, | |||
524 | return -EPERM; | 718 | return -EPERM; |
525 | 719 | ||
526 | local_irq_disable(); | 720 | local_irq_disable(); |
527 | 721 | value = 0; | |
528 | value = acpi_get_throttling_value(pr, state); | 722 | ret = acpi_get_throttling_value(pr, state, &value); |
529 | if (value >= 0) { | 723 | if (ret >= 0) { |
530 | acpi_write_throttling_state(&pr->throttling, value); | 724 | acpi_write_throttling_state(pr, value); |
531 | pr->throttling.state = state; | 725 | pr->throttling.state = state; |
532 | } | 726 | } |
533 | local_irq_enable(); | 727 | local_irq_enable(); |
@@ -543,8 +737,6 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int state) | |||
543 | int acpi_processor_get_throttling_info(struct acpi_processor *pr) | 737 | int acpi_processor_get_throttling_info(struct acpi_processor *pr) |
544 | { | 738 | { |
545 | int result = 0; | 739 | int result = 0; |
546 | int step = 0; | ||
547 | int i = 0; | ||
548 | 740 | ||
549 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, | 741 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, |
550 | "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", | 742 | "pblk_address[0x%08x] duty_offset[%d] duty_width[%d]\n", |
@@ -563,6 +755,8 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) | |||
563 | acpi_processor_get_throttling_states(pr) || | 755 | acpi_processor_get_throttling_states(pr) || |
564 | acpi_processor_get_platform_limit(pr)) | 756 | acpi_processor_get_platform_limit(pr)) |
565 | { | 757 | { |
758 | if (acpi_processor_get_fadt_info(pr)) | ||
759 | return 0; | ||
566 | pr->throttling.acpi_processor_get_throttling = | 760 | pr->throttling.acpi_processor_get_throttling = |
567 | &acpi_processor_get_throttling_fadt; | 761 | &acpi_processor_get_throttling_fadt; |
568 | pr->throttling.acpi_processor_set_throttling = | 762 | pr->throttling.acpi_processor_set_throttling = |
@@ -576,19 +770,6 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) | |||
576 | 770 | ||
577 | acpi_processor_get_tsd(pr); | 771 | acpi_processor_get_tsd(pr); |
578 | 772 | ||
579 | if (!pr->throttling.address) { | ||
580 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling register\n")); | ||
581 | return 0; | ||
582 | } else if (!pr->throttling.duty_width) { | ||
583 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No throttling states\n")); | ||
584 | return 0; | ||
585 | } | ||
586 | /* TBD: Support duty_cycle values that span bit 4. */ | ||
587 | else if ((pr->throttling.duty_offset + pr->throttling.duty_width) > 4) { | ||
588 | printk(KERN_WARNING PREFIX "duty_cycle spans bit 4\n"); | ||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | /* | 773 | /* |
593 | * PIIX4 Errata: We don't support throttling on the original PIIX4. | 774 | * PIIX4 Errata: We don't support throttling on the original PIIX4. |
594 | * This shouldn't be an issue as few (if any) mobile systems ever | 775 | * This shouldn't be an issue as few (if any) mobile systems ever |
@@ -600,21 +781,6 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) | |||
600 | return 0; | 781 | return 0; |
601 | } | 782 | } |
602 | 783 | ||
603 | pr->throttling.state_count = 1 << acpi_gbl_FADT.duty_width; | ||
604 | |||
605 | /* | ||
606 | * Compute state values. Note that throttling displays a linear power/ | ||
607 | * performance relationship (at 50% performance the CPU will consume | ||
608 | * 50% power). Values are in 1/10th of a percent to preserve accuracy. | ||
609 | */ | ||
610 | |||
611 | step = (1000 / pr->throttling.state_count); | ||
612 | |||
613 | for (i = 0; i < pr->throttling.state_count; i++) { | ||
614 | pr->throttling.states[i].performance = step * i; | ||
615 | pr->throttling.states[i].power = step * i; | ||
616 | } | ||
617 | |||
618 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n", | 784 | ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found %d throttling states\n", |
619 | pr->throttling.state_count)); | 785 | pr->throttling.state_count)); |
620 | 786 | ||
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index 90fd09c65f95..6045cdbe176b 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -29,7 +29,7 @@ | |||
29 | #include <linux/moduleparam.h> | 29 | #include <linux/moduleparam.h> |
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | 31 | ||
32 | #ifdef CONFIG_ACPI_PROCFS | 32 | #ifdef CONFIG_ACPI_PROCFS_POWER |
33 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
35 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
@@ -88,7 +88,7 @@ MODULE_DEVICE_TABLE(acpi, sbs_device_ids); | |||
88 | struct acpi_battery { | 88 | struct acpi_battery { |
89 | struct power_supply bat; | 89 | struct power_supply bat; |
90 | struct acpi_sbs *sbs; | 90 | struct acpi_sbs *sbs; |
91 | #ifdef CONFIG_ACPI_PROCFS | 91 | #ifdef CONFIG_ACPI_PROCFS_POWER |
92 | struct proc_dir_entry *proc_entry; | 92 | struct proc_dir_entry *proc_entry; |
93 | #endif | 93 | #endif |
94 | unsigned long update_time; | 94 | unsigned long update_time; |
@@ -113,6 +113,7 @@ struct acpi_battery { | |||
113 | u16 spec; | 113 | u16 spec; |
114 | u8 id; | 114 | u8 id; |
115 | u8 present:1; | 115 | u8 present:1; |
116 | u8 have_sysfs_alarm:1; | ||
116 | }; | 117 | }; |
117 | 118 | ||
118 | #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat); | 119 | #define to_acpi_battery(x) container_of(x, struct acpi_battery, bat); |
@@ -122,7 +123,7 @@ struct acpi_sbs { | |||
122 | struct acpi_device *device; | 123 | struct acpi_device *device; |
123 | struct acpi_smb_hc *hc; | 124 | struct acpi_smb_hc *hc; |
124 | struct mutex lock; | 125 | struct mutex lock; |
125 | #ifdef CONFIG_ACPI_PROCFS | 126 | #ifdef CONFIG_ACPI_PROCFS_POWER |
126 | struct proc_dir_entry *charger_entry; | 127 | struct proc_dir_entry *charger_entry; |
127 | #endif | 128 | #endif |
128 | struct acpi_battery battery[MAX_SBS_BAT]; | 129 | struct acpi_battery battery[MAX_SBS_BAT]; |
@@ -468,7 +469,7 @@ static struct device_attribute alarm_attr = { | |||
468 | FS Interface (/proc/acpi) | 469 | FS Interface (/proc/acpi) |
469 | -------------------------------------------------------------------------- */ | 470 | -------------------------------------------------------------------------- */ |
470 | 471 | ||
471 | #ifdef CONFIG_ACPI_PROCFS | 472 | #ifdef CONFIG_ACPI_PROCFS_POWER |
472 | /* Generic Routines */ | 473 | /* Generic Routines */ |
473 | static int | 474 | static int |
474 | acpi_sbs_add_fs(struct proc_dir_entry **dir, | 475 | acpi_sbs_add_fs(struct proc_dir_entry **dir, |
@@ -789,7 +790,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
789 | return result; | 790 | return result; |
790 | 791 | ||
791 | sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id); | 792 | sprintf(battery->name, ACPI_BATTERY_DIR_NAME, id); |
792 | #ifdef CONFIG_ACPI_PROCFS | 793 | #ifdef CONFIG_ACPI_PROCFS_POWER |
793 | acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir, | 794 | acpi_sbs_add_fs(&battery->proc_entry, acpi_battery_dir, |
794 | battery->name, &acpi_battery_info_fops, | 795 | battery->name, &acpi_battery_info_fops, |
795 | &acpi_battery_state_fops, &acpi_battery_alarm_fops, | 796 | &acpi_battery_state_fops, &acpi_battery_alarm_fops, |
@@ -808,7 +809,13 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
808 | } | 809 | } |
809 | battery->bat.get_property = acpi_sbs_battery_get_property; | 810 | battery->bat.get_property = acpi_sbs_battery_get_property; |
810 | result = power_supply_register(&sbs->device->dev, &battery->bat); | 811 | result = power_supply_register(&sbs->device->dev, &battery->bat); |
811 | device_create_file(battery->bat.dev, &alarm_attr); | 812 | if (result) |
813 | goto end; | ||
814 | result = device_create_file(battery->bat.dev, &alarm_attr); | ||
815 | if (result) | ||
816 | goto end; | ||
817 | battery->have_sysfs_alarm = 1; | ||
818 | end: | ||
812 | printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n", | 819 | printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n", |
813 | ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), | 820 | ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), |
814 | battery->name, sbs->battery->present ? "present" : "absent"); | 821 | battery->name, sbs->battery->present ? "present" : "absent"); |
@@ -817,14 +824,16 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id) | |||
817 | 824 | ||
818 | static void acpi_battery_remove(struct acpi_sbs *sbs, int id) | 825 | static void acpi_battery_remove(struct acpi_sbs *sbs, int id) |
819 | { | 826 | { |
820 | if (sbs->battery[id].bat.dev) | 827 | struct acpi_battery *battery = &sbs->battery[id]; |
821 | device_remove_file(sbs->battery[id].bat.dev, &alarm_attr); | 828 | |
822 | power_supply_unregister(&sbs->battery[id].bat); | 829 | if (battery->bat.dev) { |
823 | #ifdef CONFIG_ACPI_PROCFS | 830 | if (battery->have_sysfs_alarm) |
824 | if (sbs->battery[id].proc_entry) { | 831 | device_remove_file(battery->bat.dev, &alarm_attr); |
825 | acpi_sbs_remove_fs(&(sbs->battery[id].proc_entry), | 832 | power_supply_unregister(&battery->bat); |
826 | acpi_battery_dir); | ||
827 | } | 833 | } |
834 | #ifdef CONFIG_ACPI_PROCFS_POWER | ||
835 | if (battery->proc_entry) | ||
836 | acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir); | ||
828 | #endif | 837 | #endif |
829 | } | 838 | } |
830 | 839 | ||
@@ -835,7 +844,7 @@ static int acpi_charger_add(struct acpi_sbs *sbs) | |||
835 | result = acpi_ac_get_present(sbs); | 844 | result = acpi_ac_get_present(sbs); |
836 | if (result) | 845 | if (result) |
837 | goto end; | 846 | goto end; |
838 | #ifdef CONFIG_ACPI_PROCFS | 847 | #ifdef CONFIG_ACPI_PROCFS_POWER |
839 | result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir, | 848 | result = acpi_sbs_add_fs(&sbs->charger_entry, acpi_ac_dir, |
840 | ACPI_AC_DIR_NAME, NULL, | 849 | ACPI_AC_DIR_NAME, NULL, |
841 | &acpi_ac_state_fops, NULL, sbs); | 850 | &acpi_ac_state_fops, NULL, sbs); |
@@ -859,7 +868,7 @@ static void acpi_charger_remove(struct acpi_sbs *sbs) | |||
859 | { | 868 | { |
860 | if (sbs->charger.dev) | 869 | if (sbs->charger.dev) |
861 | power_supply_unregister(&sbs->charger); | 870 | power_supply_unregister(&sbs->charger); |
862 | #ifdef CONFIG_ACPI_PROCFS | 871 | #ifdef CONFIG_ACPI_PROCFS_POWER |
863 | if (sbs->charger_entry) | 872 | if (sbs->charger_entry) |
864 | acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir); | 873 | acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir); |
865 | #endif | 874 | #endif |
@@ -965,7 +974,7 @@ static int acpi_sbs_remove(struct acpi_device *device, int type) | |||
965 | 974 | ||
966 | static void acpi_sbs_rmdirs(void) | 975 | static void acpi_sbs_rmdirs(void) |
967 | { | 976 | { |
968 | #ifdef CONFIG_ACPI_PROCFS | 977 | #ifdef CONFIG_ACPI_PROCFS_POWER |
969 | if (acpi_ac_dir) { | 978 | if (acpi_ac_dir) { |
970 | acpi_unlock_ac_dir(acpi_ac_dir); | 979 | acpi_unlock_ac_dir(acpi_ac_dir); |
971 | acpi_ac_dir = NULL; | 980 | acpi_ac_dir = NULL; |
@@ -1004,7 +1013,7 @@ static int __init acpi_sbs_init(void) | |||
1004 | 1013 | ||
1005 | if (acpi_disabled) | 1014 | if (acpi_disabled) |
1006 | return -ENODEV; | 1015 | return -ENODEV; |
1007 | #ifdef CONFIG_ACPI_PROCFS | 1016 | #ifdef CONFIG_ACPI_PROCFS_POWER |
1008 | acpi_ac_dir = acpi_lock_ac_dir(); | 1017 | acpi_ac_dir = acpi_lock_ac_dir(); |
1009 | if (!acpi_ac_dir) | 1018 | if (!acpi_ac_dir) |
1010 | return -ENODEV; | 1019 | return -ENODEV; |
diff --git a/drivers/acpi/tables/tbutils.c b/drivers/acpi/tables/tbutils.c index 5f1d85f2ffe4..010f19652f80 100644 --- a/drivers/acpi/tables/tbutils.c +++ b/drivers/acpi/tables/tbutils.c | |||
@@ -449,7 +449,7 @@ acpi_tb_parse_root_table(acpi_physical_address rsdp_address, u8 flags) | |||
449 | /* XSDT has NULL entry, RSDT is used */ | 449 | /* XSDT has NULL entry, RSDT is used */ |
450 | address = rsdt_address; | 450 | address = rsdt_address; |
451 | table_entry_size = sizeof(u32); | 451 | table_entry_size = sizeof(u32); |
452 | ACPI_WARNING((AE_INFO, "BIOS XSDT has NULL entry," | 452 | ACPI_WARNING((AE_INFO, "BIOS XSDT has NULL entry, " |
453 | "using RSDT")); | 453 | "using RSDT")); |
454 | } | 454 | } |
455 | } | 455 | } |
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index bac956b30c57..44a0d9ba9bd6 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
30 | #include <linux/types.h> | 30 | #include <linux/types.h> |
31 | #include <linux/list.h> | 31 | #include <linux/list.h> |
32 | #include <linux/mutex.h> | ||
32 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
33 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
34 | #include <linux/input.h> | 35 | #include <linux/input.h> |
@@ -135,8 +136,8 @@ struct acpi_video_bus { | |||
135 | u8 attached_count; | 136 | u8 attached_count; |
136 | struct acpi_video_bus_cap cap; | 137 | struct acpi_video_bus_cap cap; |
137 | struct acpi_video_bus_flags flags; | 138 | struct acpi_video_bus_flags flags; |
138 | struct semaphore sem; | ||
139 | struct list_head video_device_list; | 139 | struct list_head video_device_list; |
140 | struct mutex device_list_lock; /* protects video_device_list */ | ||
140 | struct proc_dir_entry *dir; | 141 | struct proc_dir_entry *dir; |
141 | struct input_dev *input; | 142 | struct input_dev *input; |
142 | char phys[32]; /* for input device */ | 143 | char phys[32]; /* for input device */ |
@@ -896,7 +897,7 @@ acpi_video_device_write_brightness(struct file *file, | |||
896 | { | 897 | { |
897 | struct seq_file *m = file->private_data; | 898 | struct seq_file *m = file->private_data; |
898 | struct acpi_video_device *dev = m->private; | 899 | struct acpi_video_device *dev = m->private; |
899 | char str[4] = { 0 }; | 900 | char str[5] = { 0 }; |
900 | unsigned int level = 0; | 901 | unsigned int level = 0; |
901 | int i; | 902 | int i; |
902 | 903 | ||
@@ -1436,9 +1437,9 @@ acpi_video_bus_get_one_device(struct acpi_device *device, | |||
1436 | return -ENODEV; | 1437 | return -ENODEV; |
1437 | } | 1438 | } |
1438 | 1439 | ||
1439 | down(&video->sem); | 1440 | mutex_lock(&video->device_list_lock); |
1440 | list_add_tail(&data->entry, &video->video_device_list); | 1441 | list_add_tail(&data->entry, &video->video_device_list); |
1441 | up(&video->sem); | 1442 | mutex_unlock(&video->device_list_lock); |
1442 | 1443 | ||
1443 | acpi_video_device_add_fs(device); | 1444 | acpi_video_device_add_fs(device); |
1444 | 1445 | ||
@@ -1462,12 +1463,14 @@ acpi_video_bus_get_one_device(struct acpi_device *device, | |||
1462 | 1463 | ||
1463 | static void acpi_video_device_rebind(struct acpi_video_bus *video) | 1464 | static void acpi_video_device_rebind(struct acpi_video_bus *video) |
1464 | { | 1465 | { |
1465 | struct list_head *node, *next; | 1466 | struct acpi_video_device *dev; |
1466 | list_for_each_safe(node, next, &video->video_device_list) { | 1467 | |
1467 | struct acpi_video_device *dev = | 1468 | mutex_lock(&video->device_list_lock); |
1468 | container_of(node, struct acpi_video_device, entry); | 1469 | |
1470 | list_for_each_entry(dev, &video->video_device_list, entry) | ||
1469 | acpi_video_device_bind(video, dev); | 1471 | acpi_video_device_bind(video, dev); |
1470 | } | 1472 | |
1473 | mutex_unlock(&video->device_list_lock); | ||
1471 | } | 1474 | } |
1472 | 1475 | ||
1473 | /* | 1476 | /* |
@@ -1592,30 +1595,33 @@ static int acpi_video_device_enumerate(struct acpi_video_bus *video) | |||
1592 | 1595 | ||
1593 | static int acpi_video_switch_output(struct acpi_video_bus *video, int event) | 1596 | static int acpi_video_switch_output(struct acpi_video_bus *video, int event) |
1594 | { | 1597 | { |
1595 | struct list_head *node, *next; | 1598 | struct list_head *node; |
1596 | struct acpi_video_device *dev = NULL; | 1599 | struct acpi_video_device *dev = NULL; |
1597 | struct acpi_video_device *dev_next = NULL; | 1600 | struct acpi_video_device *dev_next = NULL; |
1598 | struct acpi_video_device *dev_prev = NULL; | 1601 | struct acpi_video_device *dev_prev = NULL; |
1599 | unsigned long state; | 1602 | unsigned long state; |
1600 | int status = 0; | 1603 | int status = 0; |
1601 | 1604 | ||
1605 | mutex_lock(&video->device_list_lock); | ||
1602 | 1606 | ||
1603 | list_for_each_safe(node, next, &video->video_device_list) { | 1607 | list_for_each(node, &video->video_device_list) { |
1604 | dev = container_of(node, struct acpi_video_device, entry); | 1608 | dev = container_of(node, struct acpi_video_device, entry); |
1605 | status = acpi_video_device_get_state(dev, &state); | 1609 | status = acpi_video_device_get_state(dev, &state); |
1606 | if (state & 0x2) { | 1610 | if (state & 0x2) { |
1607 | dev_next = | 1611 | dev_next = container_of(node->next, |
1608 | container_of(node->next, struct acpi_video_device, | 1612 | struct acpi_video_device, entry); |
1609 | entry); | 1613 | dev_prev = container_of(node->prev, |
1610 | dev_prev = | 1614 | struct acpi_video_device, entry); |
1611 | container_of(node->prev, struct acpi_video_device, | ||
1612 | entry); | ||
1613 | goto out; | 1615 | goto out; |
1614 | } | 1616 | } |
1615 | } | 1617 | } |
1618 | |||
1616 | dev_next = container_of(node->next, struct acpi_video_device, entry); | 1619 | dev_next = container_of(node->next, struct acpi_video_device, entry); |
1617 | dev_prev = container_of(node->prev, struct acpi_video_device, entry); | 1620 | dev_prev = container_of(node->prev, struct acpi_video_device, entry); |
1618 | out: | 1621 | |
1622 | out: | ||
1623 | mutex_unlock(&video->device_list_lock); | ||
1624 | |||
1619 | switch (event) { | 1625 | switch (event) { |
1620 | case ACPI_VIDEO_NOTIFY_CYCLE: | 1626 | case ACPI_VIDEO_NOTIFY_CYCLE: |
1621 | case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: | 1627 | case ACPI_VIDEO_NOTIFY_NEXT_OUTPUT: |
@@ -1691,24 +1697,17 @@ acpi_video_bus_get_devices(struct acpi_video_bus *video, | |||
1691 | struct acpi_device *device) | 1697 | struct acpi_device *device) |
1692 | { | 1698 | { |
1693 | int status = 0; | 1699 | int status = 0; |
1694 | struct list_head *node, *next; | 1700 | struct acpi_device *dev; |
1695 | |||
1696 | 1701 | ||
1697 | acpi_video_device_enumerate(video); | 1702 | acpi_video_device_enumerate(video); |
1698 | 1703 | ||
1699 | list_for_each_safe(node, next, &device->children) { | 1704 | list_for_each_entry(dev, &device->children, node) { |
1700 | struct acpi_device *dev = | ||
1701 | list_entry(node, struct acpi_device, node); | ||
1702 | |||
1703 | if (!dev) | ||
1704 | continue; | ||
1705 | 1705 | ||
1706 | status = acpi_video_bus_get_one_device(dev, video); | 1706 | status = acpi_video_bus_get_one_device(dev, video); |
1707 | if (ACPI_FAILURE(status)) { | 1707 | if (ACPI_FAILURE(status)) { |
1708 | ACPI_EXCEPTION((AE_INFO, status, "Cant attach device")); | 1708 | ACPI_EXCEPTION((AE_INFO, status, "Cant attach device")); |
1709 | continue; | 1709 | continue; |
1710 | } | 1710 | } |
1711 | |||
1712 | } | 1711 | } |
1713 | return status; | 1712 | return status; |
1714 | } | 1713 | } |
@@ -1724,9 +1723,6 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) | |||
1724 | 1723 | ||
1725 | video = device->video; | 1724 | video = device->video; |
1726 | 1725 | ||
1727 | down(&video->sem); | ||
1728 | list_del(&device->entry); | ||
1729 | up(&video->sem); | ||
1730 | acpi_video_device_remove_fs(device->dev); | 1726 | acpi_video_device_remove_fs(device->dev); |
1731 | 1727 | ||
1732 | status = acpi_remove_notify_handler(device->dev->handle, | 1728 | status = acpi_remove_notify_handler(device->dev->handle, |
@@ -1734,32 +1730,34 @@ static int acpi_video_bus_put_one_device(struct acpi_video_device *device) | |||
1734 | acpi_video_device_notify); | 1730 | acpi_video_device_notify); |
1735 | backlight_device_unregister(device->backlight); | 1731 | backlight_device_unregister(device->backlight); |
1736 | video_output_unregister(device->output_dev); | 1732 | video_output_unregister(device->output_dev); |
1733 | |||
1737 | return 0; | 1734 | return 0; |
1738 | } | 1735 | } |
1739 | 1736 | ||
1740 | static int acpi_video_bus_put_devices(struct acpi_video_bus *video) | 1737 | static int acpi_video_bus_put_devices(struct acpi_video_bus *video) |
1741 | { | 1738 | { |
1742 | int status; | 1739 | int status; |
1743 | struct list_head *node, *next; | 1740 | struct acpi_video_device *dev, *next; |
1744 | 1741 | ||
1742 | mutex_lock(&video->device_list_lock); | ||
1745 | 1743 | ||
1746 | list_for_each_safe(node, next, &video->video_device_list) { | 1744 | list_for_each_entry_safe(dev, next, &video->video_device_list, entry) { |
1747 | struct acpi_video_device *data = | ||
1748 | list_entry(node, struct acpi_video_device, entry); | ||
1749 | if (!data) | ||
1750 | continue; | ||
1751 | 1745 | ||
1752 | status = acpi_video_bus_put_one_device(data); | 1746 | status = acpi_video_bus_put_one_device(dev); |
1753 | if (ACPI_FAILURE(status)) | 1747 | if (ACPI_FAILURE(status)) |
1754 | printk(KERN_WARNING PREFIX | 1748 | printk(KERN_WARNING PREFIX |
1755 | "hhuuhhuu bug in acpi video driver.\n"); | 1749 | "hhuuhhuu bug in acpi video driver.\n"); |
1756 | 1750 | ||
1757 | if (data->brightness) | 1751 | if (dev->brightness) { |
1758 | kfree(data->brightness->levels); | 1752 | kfree(dev->brightness->levels); |
1759 | kfree(data->brightness); | 1753 | kfree(dev->brightness); |
1760 | kfree(data); | 1754 | } |
1755 | list_del(&dev->entry); | ||
1756 | kfree(dev); | ||
1761 | } | 1757 | } |
1762 | 1758 | ||
1759 | mutex_unlock(&video->device_list_lock); | ||
1760 | |||
1763 | return 0; | 1761 | return 0; |
1764 | } | 1762 | } |
1765 | 1763 | ||
@@ -1782,9 +1780,6 @@ static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) | |||
1782 | struct input_dev *input; | 1780 | struct input_dev *input; |
1783 | int keycode; | 1781 | int keycode; |
1784 | 1782 | ||
1785 | |||
1786 | printk("video bus notify\n"); | ||
1787 | |||
1788 | if (!video) | 1783 | if (!video) |
1789 | return; | 1784 | return; |
1790 | 1785 | ||
@@ -1897,14 +1892,10 @@ static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) | |||
1897 | static int instance; | 1892 | static int instance; |
1898 | static int acpi_video_bus_add(struct acpi_device *device) | 1893 | static int acpi_video_bus_add(struct acpi_device *device) |
1899 | { | 1894 | { |
1900 | int result = 0; | 1895 | acpi_status status; |
1901 | acpi_status status = 0; | 1896 | struct acpi_video_bus *video; |
1902 | struct acpi_video_bus *video = NULL; | ||
1903 | struct input_dev *input; | 1897 | struct input_dev *input; |
1904 | 1898 | int error; | |
1905 | |||
1906 | if (!device) | ||
1907 | return -EINVAL; | ||
1908 | 1899 | ||
1909 | video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); | 1900 | video = kzalloc(sizeof(struct acpi_video_bus), GFP_KERNEL); |
1910 | if (!video) | 1901 | if (!video) |
@@ -1923,15 +1914,15 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
1923 | acpi_driver_data(device) = video; | 1914 | acpi_driver_data(device) = video; |
1924 | 1915 | ||
1925 | acpi_video_bus_find_cap(video); | 1916 | acpi_video_bus_find_cap(video); |
1926 | result = acpi_video_bus_check(video); | 1917 | error = acpi_video_bus_check(video); |
1927 | if (result) | 1918 | if (error) |
1928 | goto end; | 1919 | goto err_free_video; |
1929 | 1920 | ||
1930 | result = acpi_video_bus_add_fs(device); | 1921 | error = acpi_video_bus_add_fs(device); |
1931 | if (result) | 1922 | if (error) |
1932 | goto end; | 1923 | goto err_free_video; |
1933 | 1924 | ||
1934 | init_MUTEX(&video->sem); | 1925 | mutex_init(&video->device_list_lock); |
1935 | INIT_LIST_HEAD(&video->video_device_list); | 1926 | INIT_LIST_HEAD(&video->video_device_list); |
1936 | 1927 | ||
1937 | acpi_video_bus_get_devices(video, device); | 1928 | acpi_video_bus_get_devices(video, device); |
@@ -1943,16 +1934,15 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
1943 | if (ACPI_FAILURE(status)) { | 1934 | if (ACPI_FAILURE(status)) { |
1944 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 1935 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
1945 | "Error installing notify handler\n")); | 1936 | "Error installing notify handler\n")); |
1946 | acpi_video_bus_stop_devices(video); | 1937 | error = -ENODEV; |
1947 | acpi_video_bus_put_devices(video); | 1938 | goto err_stop_video; |
1948 | kfree(video->attached_array); | ||
1949 | acpi_video_bus_remove_fs(device); | ||
1950 | result = -ENODEV; | ||
1951 | goto end; | ||
1952 | } | 1939 | } |
1953 | 1940 | ||
1954 | |||
1955 | video->input = input = input_allocate_device(); | 1941 | video->input = input = input_allocate_device(); |
1942 | if (!input) { | ||
1943 | error = -ENOMEM; | ||
1944 | goto err_uninstall_notify; | ||
1945 | } | ||
1956 | 1946 | ||
1957 | snprintf(video->phys, sizeof(video->phys), | 1947 | snprintf(video->phys, sizeof(video->phys), |
1958 | "%s/video/input0", acpi_device_hid(video->device)); | 1948 | "%s/video/input0", acpi_device_hid(video->device)); |
@@ -1961,6 +1951,7 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
1961 | input->phys = video->phys; | 1951 | input->phys = video->phys; |
1962 | input->id.bustype = BUS_HOST; | 1952 | input->id.bustype = BUS_HOST; |
1963 | input->id.product = 0x06; | 1953 | input->id.product = 0x06; |
1954 | input->dev.parent = &device->dev; | ||
1964 | input->evbit[0] = BIT(EV_KEY); | 1955 | input->evbit[0] = BIT(EV_KEY); |
1965 | set_bit(KEY_SWITCHVIDEOMODE, input->keybit); | 1956 | set_bit(KEY_SWITCHVIDEOMODE, input->keybit); |
1966 | set_bit(KEY_VIDEO_NEXT, input->keybit); | 1957 | set_bit(KEY_VIDEO_NEXT, input->keybit); |
@@ -1971,18 +1962,10 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
1971 | set_bit(KEY_BRIGHTNESS_ZERO, input->keybit); | 1962 | set_bit(KEY_BRIGHTNESS_ZERO, input->keybit); |
1972 | set_bit(KEY_DISPLAY_OFF, input->keybit); | 1963 | set_bit(KEY_DISPLAY_OFF, input->keybit); |
1973 | set_bit(KEY_UNKNOWN, input->keybit); | 1964 | set_bit(KEY_UNKNOWN, input->keybit); |
1974 | result = input_register_device(input); | ||
1975 | if (result) { | ||
1976 | acpi_remove_notify_handler(video->device->handle, | ||
1977 | ACPI_DEVICE_NOTIFY, | ||
1978 | acpi_video_bus_notify); | ||
1979 | acpi_video_bus_stop_devices(video); | ||
1980 | acpi_video_bus_put_devices(video); | ||
1981 | kfree(video->attached_array); | ||
1982 | acpi_video_bus_remove_fs(device); | ||
1983 | goto end; | ||
1984 | } | ||
1985 | 1965 | ||
1966 | error = input_register_device(input); | ||
1967 | if (error) | ||
1968 | goto err_free_input_dev; | ||
1986 | 1969 | ||
1987 | printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s rom: %s post: %s)\n", | 1970 | printk(KERN_INFO PREFIX "%s [%s] (multi-head: %s rom: %s post: %s)\n", |
1988 | ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device), | 1971 | ACPI_VIDEO_DEVICE_NAME, acpi_device_bid(device), |
@@ -1990,11 +1973,23 @@ static int acpi_video_bus_add(struct acpi_device *device) | |||
1990 | video->flags.rom ? "yes" : "no", | 1973 | video->flags.rom ? "yes" : "no", |
1991 | video->flags.post ? "yes" : "no"); | 1974 | video->flags.post ? "yes" : "no"); |
1992 | 1975 | ||
1993 | end: | 1976 | return 0; |
1994 | if (result) | 1977 | |
1995 | kfree(video); | 1978 | err_free_input_dev: |
1979 | input_free_device(input); | ||
1980 | err_uninstall_notify: | ||
1981 | acpi_remove_notify_handler(device->handle, ACPI_DEVICE_NOTIFY, | ||
1982 | acpi_video_bus_notify); | ||
1983 | err_stop_video: | ||
1984 | acpi_video_bus_stop_devices(video); | ||
1985 | acpi_video_bus_put_devices(video); | ||
1986 | kfree(video->attached_array); | ||
1987 | acpi_video_bus_remove_fs(device); | ||
1988 | err_free_video: | ||
1989 | kfree(video); | ||
1990 | acpi_driver_data(device) = NULL; | ||
1996 | 1991 | ||
1997 | return result; | 1992 | return error; |
1998 | } | 1993 | } |
1999 | 1994 | ||
2000 | static int acpi_video_bus_remove(struct acpi_device *device, int type) | 1995 | static int acpi_video_bus_remove(struct acpi_device *device, int type) |
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index 328ce8a08426..483269db2c7d 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c | |||
@@ -119,18 +119,19 @@ enum { | |||
119 | PIIX_80C_SEC = (1 << 7) | (1 << 6), | 119 | PIIX_80C_SEC = (1 << 7) | (1 << 6), |
120 | 120 | ||
121 | /* controller IDs */ | 121 | /* controller IDs */ |
122 | piix_pata_33 = 0, /* PIIX4 at 33Mhz */ | 122 | piix_pata_mwdma = 0, /* PIIX3 MWDMA only */ |
123 | ich_pata_33 = 1, /* ICH up to UDMA 33 only */ | 123 | piix_pata_33, /* PIIX4 at 33Mhz */ |
124 | ich_pata_66 = 2, /* ICH up to 66 Mhz */ | 124 | ich_pata_33, /* ICH up to UDMA 33 only */ |
125 | ich_pata_100 = 3, /* ICH up to UDMA 100 */ | 125 | ich_pata_66, /* ICH up to 66 Mhz */ |
126 | ich5_sata = 5, | 126 | ich_pata_100, /* ICH up to UDMA 100 */ |
127 | ich6_sata = 6, | 127 | ich5_sata, |
128 | ich6_sata_ahci = 7, | 128 | ich6_sata, |
129 | ich6m_sata_ahci = 8, | 129 | ich6_sata_ahci, |
130 | ich8_sata_ahci = 9, | 130 | ich6m_sata_ahci, |
131 | piix_pata_mwdma = 10, /* PIIX3 MWDMA only */ | 131 | ich8_sata_ahci, |
132 | tolapai_sata_ahci = 11, | 132 | ich8_2port_sata, |
133 | ich9_2port_sata = 12, | 133 | ich8m_apple_sata_ahci, /* locks up on second port enable */ |
134 | tolapai_sata_ahci, | ||
134 | 135 | ||
135 | /* constants for mapping table */ | 136 | /* constants for mapping table */ |
136 | P0 = 0, /* port 0 */ | 137 | P0 = 0, /* port 0 */ |
@@ -239,19 +240,21 @@ static const struct pci_device_id piix_pci_tbl[] = { | |||
239 | /* SATA Controller 1 IDE (ICH8) */ | 240 | /* SATA Controller 1 IDE (ICH8) */ |
240 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 241 | { 0x8086, 0x2820, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
241 | /* SATA Controller 2 IDE (ICH8) */ | 242 | /* SATA Controller 2 IDE (ICH8) */ |
242 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, | 243 | { 0x8086, 0x2825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
243 | /* Mobile SATA Controller IDE (ICH8M) */ | 244 | /* Mobile SATA Controller IDE (ICH8M) */ |
244 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 245 | { 0x8086, 0x2828, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
246 | /* Mobile SATA Controller IDE (ICH8M), Apple */ | ||
247 | { 0x8086, 0x2828, 0x106b, 0x00a0, 0, 0, ich8m_apple_sata_ahci }, | ||
245 | /* SATA Controller IDE (ICH9) */ | 248 | /* SATA Controller IDE (ICH9) */ |
246 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 249 | { 0x8086, 0x2920, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
247 | /* SATA Controller IDE (ICH9) */ | 250 | /* SATA Controller IDE (ICH9) */ |
248 | { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, | 251 | { 0x8086, 0x2921, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
249 | /* SATA Controller IDE (ICH9) */ | 252 | /* SATA Controller IDE (ICH9) */ |
250 | { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, | 253 | { 0x8086, 0x2926, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
251 | /* SATA Controller IDE (ICH9M) */ | 254 | /* SATA Controller IDE (ICH9M) */ |
252 | { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, | 255 | { 0x8086, 0x2928, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
253 | /* SATA Controller IDE (ICH9M) */ | 256 | /* SATA Controller IDE (ICH9M) */ |
254 | { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich9_2port_sata }, | 257 | { 0x8086, 0x292d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, |
255 | /* SATA Controller IDE (ICH9M) */ | 258 | /* SATA Controller IDE (ICH9M) */ |
256 | { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, | 259 | { 0x8086, 0x292e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_ahci }, |
257 | /* SATA Controller IDE (Tolapai) */ | 260 | /* SATA Controller IDE (Tolapai) */ |
@@ -427,7 +430,7 @@ static const struct piix_map_db ich6m_map_db = { | |||
427 | 430 | ||
428 | static const struct piix_map_db ich8_map_db = { | 431 | static const struct piix_map_db ich8_map_db = { |
429 | .mask = 0x3, | 432 | .mask = 0x3, |
430 | .port_enable = 0x3, | 433 | .port_enable = 0xf, |
431 | .map = { | 434 | .map = { |
432 | /* PM PS SM SS MAP */ | 435 | /* PM PS SM SS MAP */ |
433 | { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */ | 436 | { P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */ |
@@ -437,7 +440,7 @@ static const struct piix_map_db ich8_map_db = { | |||
437 | }, | 440 | }, |
438 | }; | 441 | }; |
439 | 442 | ||
440 | static const struct piix_map_db tolapai_map_db = { | 443 | static const struct piix_map_db ich8_2port_map_db = { |
441 | .mask = 0x3, | 444 | .mask = 0x3, |
442 | .port_enable = 0x3, | 445 | .port_enable = 0x3, |
443 | .map = { | 446 | .map = { |
@@ -449,7 +452,19 @@ static const struct piix_map_db tolapai_map_db = { | |||
449 | }, | 452 | }, |
450 | }; | 453 | }; |
451 | 454 | ||
452 | static const struct piix_map_db ich9_2port_map_db = { | 455 | static const struct piix_map_db ich8m_apple_map_db = { |
456 | .mask = 0x3, | ||
457 | .port_enable = 0x1, | ||
458 | .map = { | ||
459 | /* PM PS SM SS MAP */ | ||
460 | { P0, NA, NA, NA }, /* 00b */ | ||
461 | { RV, RV, RV, RV }, | ||
462 | { P0, P2, IDE, IDE }, /* 10b */ | ||
463 | { RV, RV, RV, RV }, | ||
464 | }, | ||
465 | }; | ||
466 | |||
467 | static const struct piix_map_db tolapai_map_db = { | ||
453 | .mask = 0x3, | 468 | .mask = 0x3, |
454 | .port_enable = 0x3, | 469 | .port_enable = 0x3, |
455 | .map = { | 470 | .map = { |
@@ -467,11 +482,21 @@ static const struct piix_map_db *piix_map_db_table[] = { | |||
467 | [ich6_sata_ahci] = &ich6_map_db, | 482 | [ich6_sata_ahci] = &ich6_map_db, |
468 | [ich6m_sata_ahci] = &ich6m_map_db, | 483 | [ich6m_sata_ahci] = &ich6m_map_db, |
469 | [ich8_sata_ahci] = &ich8_map_db, | 484 | [ich8_sata_ahci] = &ich8_map_db, |
485 | [ich8_2port_sata] = &ich8_2port_map_db, | ||
486 | [ich8m_apple_sata_ahci] = &ich8m_apple_map_db, | ||
470 | [tolapai_sata_ahci] = &tolapai_map_db, | 487 | [tolapai_sata_ahci] = &tolapai_map_db, |
471 | [ich9_2port_sata] = &ich9_2port_map_db, | ||
472 | }; | 488 | }; |
473 | 489 | ||
474 | static struct ata_port_info piix_port_info[] = { | 490 | static struct ata_port_info piix_port_info[] = { |
491 | [piix_pata_mwdma] = /* PIIX3 MWDMA only */ | ||
492 | { | ||
493 | .sht = &piix_sht, | ||
494 | .flags = PIIX_PATA_FLAGS, | ||
495 | .pio_mask = 0x1f, /* pio0-4 */ | ||
496 | .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ | ||
497 | .port_ops = &piix_pata_ops, | ||
498 | }, | ||
499 | |||
475 | [piix_pata_33] = /* PIIX4 at 33MHz */ | 500 | [piix_pata_33] = /* PIIX4 at 33MHz */ |
476 | { | 501 | { |
477 | .sht = &piix_sht, | 502 | .sht = &piix_sht, |
@@ -565,13 +590,15 @@ static struct ata_port_info piix_port_info[] = { | |||
565 | .port_ops = &piix_sata_ops, | 590 | .port_ops = &piix_sata_ops, |
566 | }, | 591 | }, |
567 | 592 | ||
568 | [piix_pata_mwdma] = /* PIIX3 MWDMA only */ | 593 | [ich8_2port_sata] = |
569 | { | 594 | { |
570 | .sht = &piix_sht, | 595 | .sht = &piix_sht, |
571 | .flags = PIIX_PATA_FLAGS, | 596 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | |
597 | PIIX_FLAG_AHCI, | ||
572 | .pio_mask = 0x1f, /* pio0-4 */ | 598 | .pio_mask = 0x1f, /* pio0-4 */ |
573 | .mwdma_mask = 0x06, /* mwdma1-2 ?? CHECK 0 should be ok but slow */ | 599 | .mwdma_mask = 0x07, /* mwdma0-2 */ |
574 | .port_ops = &piix_pata_ops, | 600 | .udma_mask = ATA_UDMA6, |
601 | .port_ops = &piix_sata_ops, | ||
575 | }, | 602 | }, |
576 | 603 | ||
577 | [tolapai_sata_ahci] = | 604 | [tolapai_sata_ahci] = |
@@ -585,7 +612,7 @@ static struct ata_port_info piix_port_info[] = { | |||
585 | .port_ops = &piix_sata_ops, | 612 | .port_ops = &piix_sata_ops, |
586 | }, | 613 | }, |
587 | 614 | ||
588 | [ich9_2port_sata] = | 615 | [ich8m_apple_sata_ahci] = |
589 | { | 616 | { |
590 | .sht = &piix_sht, | 617 | .sht = &piix_sht, |
591 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | | 618 | .flags = PIIX_SATA_FLAGS | PIIX_FLAG_SCR | |
@@ -595,6 +622,7 @@ static struct ata_port_info piix_port_info[] = { | |||
595 | .udma_mask = ATA_UDMA6, | 622 | .udma_mask = ATA_UDMA6, |
596 | .port_ops = &piix_sata_ops, | 623 | .port_ops = &piix_sata_ops, |
597 | }, | 624 | }, |
625 | |||
598 | }; | 626 | }; |
599 | 627 | ||
600 | static struct pci_bits piix_enable_bits[] = { | 628 | static struct pci_bits piix_enable_bits[] = { |
@@ -974,6 +1002,13 @@ static int piix_broken_suspend(void) | |||
974 | }, | 1002 | }, |
975 | }, | 1003 | }, |
976 | { | 1004 | { |
1005 | .ident = "SATELLITE U205", | ||
1006 | .matches = { | ||
1007 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | ||
1008 | DMI_MATCH(DMI_PRODUCT_NAME, "SATELLITE U205"), | ||
1009 | }, | ||
1010 | }, | ||
1011 | { | ||
977 | .ident = "Portege M500", | 1012 | .ident = "Portege M500", |
978 | .matches = { | 1013 | .matches = { |
979 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), | 1014 | DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"), |
@@ -1086,12 +1121,12 @@ static int piix_disable_ahci(struct pci_dev *pdev) | |||
1086 | if (!mmio) | 1121 | if (!mmio) |
1087 | return -ENOMEM; | 1122 | return -ENOMEM; |
1088 | 1123 | ||
1089 | tmp = readl(mmio + AHCI_GLOBAL_CTL); | 1124 | tmp = ioread32(mmio + AHCI_GLOBAL_CTL); |
1090 | if (tmp & AHCI_ENABLE) { | 1125 | if (tmp & AHCI_ENABLE) { |
1091 | tmp &= ~AHCI_ENABLE; | 1126 | tmp &= ~AHCI_ENABLE; |
1092 | writel(tmp, mmio + AHCI_GLOBAL_CTL); | 1127 | iowrite32(tmp, mmio + AHCI_GLOBAL_CTL); |
1093 | 1128 | ||
1094 | tmp = readl(mmio + AHCI_GLOBAL_CTL); | 1129 | tmp = ioread32(mmio + AHCI_GLOBAL_CTL); |
1095 | if (tmp & AHCI_ENABLE) | 1130 | if (tmp & AHCI_ENABLE) |
1096 | rc = -EIO; | 1131 | rc = -EIO; |
1097 | } | 1132 | } |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 81898036dbca..33f06277b3be 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -30,6 +30,14 @@ | |||
30 | * Hardware documentation available from http://www.t13.org/ and | 30 | * Hardware documentation available from http://www.t13.org/ and |
31 | * http://www.sata-io.org/ | 31 | * http://www.sata-io.org/ |
32 | * | 32 | * |
33 | * Standards documents from: | ||
34 | * http://www.t13.org (ATA standards, PCI DMA IDE spec) | ||
35 | * http://www.t10.org (SCSI MMC - for ATAPI MMC) | ||
36 | * http://www.sata-io.org (SATA) | ||
37 | * http://www.compactflash.org (CF) | ||
38 | * http://www.qic.org (QIC157 - Tape and DSC) | ||
39 | * http://www.ce-ata.org (CE-ATA: not supported) | ||
40 | * | ||
33 | */ | 41 | */ |
34 | 42 | ||
35 | #include <linux/kernel.h> | 43 | #include <linux/kernel.h> |
@@ -2307,8 +2315,10 @@ int ata_dev_configure(struct ata_device *dev) | |||
2307 | } | 2315 | } |
2308 | 2316 | ||
2309 | if ((dev->class == ATA_DEV_ATAPI) && | 2317 | if ((dev->class == ATA_DEV_ATAPI) && |
2310 | (atapi_command_packet_set(id) == TYPE_TAPE)) | 2318 | (atapi_command_packet_set(id) == TYPE_TAPE)) { |
2311 | dev->max_sectors = ATA_MAX_SECTORS_TAPE; | 2319 | dev->max_sectors = ATA_MAX_SECTORS_TAPE; |
2320 | dev->horkage |= ATA_HORKAGE_STUCK_ERR; | ||
2321 | } | ||
2312 | 2322 | ||
2313 | if (dev->horkage & ATA_HORKAGE_MAX_SEC_128) | 2323 | if (dev->horkage & ATA_HORKAGE_MAX_SEC_128) |
2314 | dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128, | 2324 | dev->max_sectors = min_t(unsigned int, ATA_MAX_SECTORS_128, |
@@ -2581,81 +2591,6 @@ void sata_print_link_status(struct ata_link *link) | |||
2581 | } | 2591 | } |
2582 | 2592 | ||
2583 | /** | 2593 | /** |
2584 | * __sata_phy_reset - Wake/reset a low-level SATA PHY | ||
2585 | * @ap: SATA port associated with target SATA PHY. | ||
2586 | * | ||
2587 | * This function issues commands to standard SATA Sxxx | ||
2588 | * PHY registers, to wake up the phy (and device), and | ||
2589 | * clear any reset condition. | ||
2590 | * | ||
2591 | * LOCKING: | ||
2592 | * PCI/etc. bus probe sem. | ||
2593 | * | ||
2594 | */ | ||
2595 | void __sata_phy_reset(struct ata_port *ap) | ||
2596 | { | ||
2597 | struct ata_link *link = &ap->link; | ||
2598 | unsigned long timeout = jiffies + (HZ * 5); | ||
2599 | u32 sstatus; | ||
2600 | |||
2601 | if (ap->flags & ATA_FLAG_SATA_RESET) { | ||
2602 | /* issue phy wake/reset */ | ||
2603 | sata_scr_write_flush(link, SCR_CONTROL, 0x301); | ||
2604 | /* Couldn't find anything in SATA I/II specs, but | ||
2605 | * AHCI-1.1 10.4.2 says at least 1 ms. */ | ||
2606 | mdelay(1); | ||
2607 | } | ||
2608 | /* phy wake/clear reset */ | ||
2609 | sata_scr_write_flush(link, SCR_CONTROL, 0x300); | ||
2610 | |||
2611 | /* wait for phy to become ready, if necessary */ | ||
2612 | do { | ||
2613 | msleep(200); | ||
2614 | sata_scr_read(link, SCR_STATUS, &sstatus); | ||
2615 | if ((sstatus & 0xf) != 1) | ||
2616 | break; | ||
2617 | } while (time_before(jiffies, timeout)); | ||
2618 | |||
2619 | /* print link status */ | ||
2620 | sata_print_link_status(link); | ||
2621 | |||
2622 | /* TODO: phy layer with polling, timeouts, etc. */ | ||
2623 | if (!ata_link_offline(link)) | ||
2624 | ata_port_probe(ap); | ||
2625 | else | ||
2626 | ata_port_disable(ap); | ||
2627 | |||
2628 | if (ap->flags & ATA_FLAG_DISABLED) | ||
2629 | return; | ||
2630 | |||
2631 | if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) { | ||
2632 | ata_port_disable(ap); | ||
2633 | return; | ||
2634 | } | ||
2635 | |||
2636 | ap->cbl = ATA_CBL_SATA; | ||
2637 | } | ||
2638 | |||
2639 | /** | ||
2640 | * sata_phy_reset - Reset SATA bus. | ||
2641 | * @ap: SATA port associated with target SATA PHY. | ||
2642 | * | ||
2643 | * This function resets the SATA bus, and then probes | ||
2644 | * the bus for devices. | ||
2645 | * | ||
2646 | * LOCKING: | ||
2647 | * PCI/etc. bus probe sem. | ||
2648 | * | ||
2649 | */ | ||
2650 | void sata_phy_reset(struct ata_port *ap) | ||
2651 | { | ||
2652 | __sata_phy_reset(ap); | ||
2653 | if (ap->flags & ATA_FLAG_DISABLED) | ||
2654 | return; | ||
2655 | ata_bus_reset(ap); | ||
2656 | } | ||
2657 | |||
2658 | /** | ||
2659 | * ata_dev_pair - return other device on cable | 2594 | * ata_dev_pair - return other device on cable |
2660 | * @adev: device | 2595 | * @adev: device |
2661 | * | 2596 | * |
@@ -5490,11 +5425,19 @@ fsm_start: | |||
5490 | * let the EH abort the command or reset the device. | 5425 | * let the EH abort the command or reset the device. |
5491 | */ | 5426 | */ |
5492 | if (unlikely(status & (ATA_ERR | ATA_DF))) { | 5427 | if (unlikely(status & (ATA_ERR | ATA_DF))) { |
5493 | ata_port_printk(ap, KERN_WARNING, "DRQ=1 with device " | 5428 | /* Some ATAPI tape drives forget to clear the ERR bit |
5494 | "error, dev_stat 0x%X\n", status); | 5429 | * when doing the next command (mostly request sense). |
5495 | qc->err_mask |= AC_ERR_HSM; | 5430 | * We ignore ERR here to workaround and proceed sending |
5496 | ap->hsm_task_state = HSM_ST_ERR; | 5431 | * the CDB. |
5497 | goto fsm_start; | 5432 | */ |
5433 | if (!(qc->dev->horkage & ATA_HORKAGE_STUCK_ERR)) { | ||
5434 | ata_port_printk(ap, KERN_WARNING, | ||
5435 | "DRQ=1 with device error, " | ||
5436 | "dev_stat 0x%X\n", status); | ||
5437 | qc->err_mask |= AC_ERR_HSM; | ||
5438 | ap->hsm_task_state = HSM_ST_ERR; | ||
5439 | goto fsm_start; | ||
5440 | } | ||
5498 | } | 5441 | } |
5499 | 5442 | ||
5500 | /* Send the CDB (atapi) or the first data block (ata pio out). | 5443 | /* Send the CDB (atapi) or the first data block (ata pio out). |
@@ -7653,8 +7596,6 @@ EXPORT_SYMBOL_GPL(ata_dev_disable); | |||
7653 | EXPORT_SYMBOL_GPL(sata_set_spd); | 7596 | EXPORT_SYMBOL_GPL(sata_set_spd); |
7654 | EXPORT_SYMBOL_GPL(sata_link_debounce); | 7597 | EXPORT_SYMBOL_GPL(sata_link_debounce); |
7655 | EXPORT_SYMBOL_GPL(sata_link_resume); | 7598 | EXPORT_SYMBOL_GPL(sata_link_resume); |
7656 | EXPORT_SYMBOL_GPL(sata_phy_reset); | ||
7657 | EXPORT_SYMBOL_GPL(__sata_phy_reset); | ||
7658 | EXPORT_SYMBOL_GPL(ata_bus_reset); | 7599 | EXPORT_SYMBOL_GPL(ata_bus_reset); |
7659 | EXPORT_SYMBOL_GPL(ata_std_prereset); | 7600 | EXPORT_SYMBOL_GPL(ata_std_prereset); |
7660 | EXPORT_SYMBOL_GPL(ata_std_softreset); | 7601 | EXPORT_SYMBOL_GPL(ata_std_softreset); |
@@ -7725,7 +7666,6 @@ EXPORT_SYMBOL_GPL(ata_port_desc); | |||
7725 | #ifdef CONFIG_PCI | 7666 | #ifdef CONFIG_PCI |
7726 | EXPORT_SYMBOL_GPL(ata_port_pbar_desc); | 7667 | EXPORT_SYMBOL_GPL(ata_port_pbar_desc); |
7727 | #endif /* CONFIG_PCI */ | 7668 | #endif /* CONFIG_PCI */ |
7728 | EXPORT_SYMBOL_GPL(ata_eng_timeout); | ||
7729 | EXPORT_SYMBOL_GPL(ata_port_schedule_eh); | 7669 | EXPORT_SYMBOL_GPL(ata_port_schedule_eh); |
7730 | EXPORT_SYMBOL_GPL(ata_link_abort); | 7670 | EXPORT_SYMBOL_GPL(ata_link_abort); |
7731 | EXPORT_SYMBOL_GPL(ata_port_abort); | 7671 | EXPORT_SYMBOL_GPL(ata_port_abort); |
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c index ed8813b222a0..0dac69db1fdf 100644 --- a/drivers/ata/libata-eh.c +++ b/drivers/ata/libata-eh.c | |||
@@ -559,101 +559,6 @@ void ata_port_wait_eh(struct ata_port *ap) | |||
559 | } | 559 | } |
560 | } | 560 | } |
561 | 561 | ||
562 | /** | ||
563 | * ata_qc_timeout - Handle timeout of queued command | ||
564 | * @qc: Command that timed out | ||
565 | * | ||
566 | * Some part of the kernel (currently, only the SCSI layer) | ||
567 | * has noticed that the active command on port @ap has not | ||
568 | * completed after a specified length of time. Handle this | ||
569 | * condition by disabling DMA (if necessary) and completing | ||
570 | * transactions, with error if necessary. | ||
571 | * | ||
572 | * This also handles the case of the "lost interrupt", where | ||
573 | * for some reason (possibly hardware bug, possibly driver bug) | ||
574 | * an interrupt was not delivered to the driver, even though the | ||
575 | * transaction completed successfully. | ||
576 | * | ||
577 | * TODO: kill this function once old EH is gone. | ||
578 | * | ||
579 | * LOCKING: | ||
580 | * Inherited from SCSI layer (none, can sleep) | ||
581 | */ | ||
582 | static void ata_qc_timeout(struct ata_queued_cmd *qc) | ||
583 | { | ||
584 | struct ata_port *ap = qc->ap; | ||
585 | u8 host_stat = 0, drv_stat; | ||
586 | unsigned long flags; | ||
587 | |||
588 | DPRINTK("ENTER\n"); | ||
589 | |||
590 | ap->hsm_task_state = HSM_ST_IDLE; | ||
591 | |||
592 | spin_lock_irqsave(ap->lock, flags); | ||
593 | |||
594 | switch (qc->tf.protocol) { | ||
595 | |||
596 | case ATA_PROT_DMA: | ||
597 | case ATA_PROT_ATAPI_DMA: | ||
598 | host_stat = ap->ops->bmdma_status(ap); | ||
599 | |||
600 | /* before we do anything else, clear DMA-Start bit */ | ||
601 | ap->ops->bmdma_stop(qc); | ||
602 | |||
603 | /* fall through */ | ||
604 | |||
605 | default: | ||
606 | ata_altstatus(ap); | ||
607 | drv_stat = ata_chk_status(ap); | ||
608 | |||
609 | /* ack bmdma irq events */ | ||
610 | ap->ops->irq_clear(ap); | ||
611 | |||
612 | ata_dev_printk(qc->dev, KERN_ERR, "command 0x%x timeout, " | ||
613 | "stat 0x%x host_stat 0x%x\n", | ||
614 | qc->tf.command, drv_stat, host_stat); | ||
615 | |||
616 | /* complete taskfile transaction */ | ||
617 | qc->err_mask |= AC_ERR_TIMEOUT; | ||
618 | break; | ||
619 | } | ||
620 | |||
621 | spin_unlock_irqrestore(ap->lock, flags); | ||
622 | |||
623 | ata_eh_qc_complete(qc); | ||
624 | |||
625 | DPRINTK("EXIT\n"); | ||
626 | } | ||
627 | |||
628 | /** | ||
629 | * ata_eng_timeout - Handle timeout of queued command | ||
630 | * @ap: Port on which timed-out command is active | ||
631 | * | ||
632 | * Some part of the kernel (currently, only the SCSI layer) | ||
633 | * has noticed that the active command on port @ap has not | ||
634 | * completed after a specified length of time. Handle this | ||
635 | * condition by disabling DMA (if necessary) and completing | ||
636 | * transactions, with error if necessary. | ||
637 | * | ||
638 | * This also handles the case of the "lost interrupt", where | ||
639 | * for some reason (possibly hardware bug, possibly driver bug) | ||
640 | * an interrupt was not delivered to the driver, even though the | ||
641 | * transaction completed successfully. | ||
642 | * | ||
643 | * TODO: kill this function once old EH is gone. | ||
644 | * | ||
645 | * LOCKING: | ||
646 | * Inherited from SCSI layer (none, can sleep) | ||
647 | */ | ||
648 | void ata_eng_timeout(struct ata_port *ap) | ||
649 | { | ||
650 | DPRINTK("ENTER\n"); | ||
651 | |||
652 | ata_qc_timeout(ata_qc_from_tag(ap, ap->link.active_tag)); | ||
653 | |||
654 | DPRINTK("EXIT\n"); | ||
655 | } | ||
656 | |||
657 | static int ata_eh_nr_in_flight(struct ata_port *ap) | 562 | static int ata_eh_nr_in_flight(struct ata_port *ap) |
658 | { | 563 | { |
659 | unsigned int tag; | 564 | unsigned int tag; |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 94144ed50a6b..a883bb03d4c7 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
@@ -2485,11 +2485,40 @@ static unsigned int atapi_xlat(struct ata_queued_cmd *qc) | |||
2485 | if (!using_pio && ata_check_atapi_dma(qc)) | 2485 | if (!using_pio && ata_check_atapi_dma(qc)) |
2486 | using_pio = 1; | 2486 | using_pio = 1; |
2487 | 2487 | ||
2488 | /* Some controller variants snoop this value for Packet transfers | 2488 | /* Some controller variants snoop this value for Packet |
2489 | to do state machine and FIFO management. Thus we want to set it | 2489 | * transfers to do state machine and FIFO management. Thus we |
2490 | properly, and for DMA where it is effectively meaningless */ | 2490 | * want to set it properly, and for DMA where it is |
2491 | * effectively meaningless. | ||
2492 | */ | ||
2491 | nbytes = min(qc->nbytes, (unsigned int)63 * 1024); | 2493 | nbytes = min(qc->nbytes, (unsigned int)63 * 1024); |
2492 | 2494 | ||
2495 | /* Most ATAPI devices which honor transfer chunk size don't | ||
2496 | * behave according to the spec when odd chunk size which | ||
2497 | * matches the transfer length is specified. If the number of | ||
2498 | * bytes to transfer is 2n+1. According to the spec, what | ||
2499 | * should happen is to indicate that 2n+1 is going to be | ||
2500 | * transferred and transfer 2n+2 bytes where the last byte is | ||
2501 | * padding. | ||
2502 | * | ||
2503 | * In practice, this doesn't happen. ATAPI devices first | ||
2504 | * indicate and transfer 2n bytes and then indicate and | ||
2505 | * transfer 2 bytes where the last byte is padding. | ||
2506 | * | ||
2507 | * This inconsistency confuses several controllers which | ||
2508 | * perform PIO using DMA such as Intel AHCIs and sil3124/32. | ||
2509 | * These controllers use actual number of transferred bytes to | ||
2510 | * update DMA poitner and transfer of 4n+2 bytes make those | ||
2511 | * controller push DMA pointer by 4n+4 bytes because SATA data | ||
2512 | * FISes are aligned to 4 bytes. This causes data corruption | ||
2513 | * and buffer overrun. | ||
2514 | * | ||
2515 | * Always setting nbytes to even number solves this problem | ||
2516 | * because then ATAPI devices don't have to split data at 2n | ||
2517 | * boundaries. | ||
2518 | */ | ||
2519 | if (nbytes & 0x1) | ||
2520 | nbytes++; | ||
2521 | |||
2493 | qc->tf.lbam = (nbytes & 0xFF); | 2522 | qc->tf.lbam = (nbytes & 0xFF); |
2494 | qc->tf.lbah = (nbytes >> 8); | 2523 | qc->tf.lbah = (nbytes >> 8); |
2495 | 2524 | ||
@@ -2869,7 +2898,8 @@ static inline int __ata_scsi_queuecmd(struct scsi_cmnd *scmd, | |||
2869 | xlat_func = NULL; | 2898 | xlat_func = NULL; |
2870 | if (likely((scsi_op != ATA_16) || !atapi_passthru16)) { | 2899 | if (likely((scsi_op != ATA_16) || !atapi_passthru16)) { |
2871 | /* relay SCSI command to ATAPI device */ | 2900 | /* relay SCSI command to ATAPI device */ |
2872 | if (unlikely(scmd->cmd_len > dev->cdb_len)) | 2901 | int len = COMMAND_SIZE(scsi_op); |
2902 | if (unlikely(len > scmd->cmd_len || len > dev->cdb_len)) | ||
2873 | goto bad_cdb_len; | 2903 | goto bad_cdb_len; |
2874 | 2904 | ||
2875 | xlat_func = atapi_xlat; | 2905 | xlat_func = atapi_xlat; |
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 364534e7aff4..8caf9afc8b90 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -63,6 +63,9 @@ static int ali_cable_override(struct pci_dev *pdev) | |||
63 | /* Fujitsu P2000 */ | 63 | /* Fujitsu P2000 */ |
64 | if (pdev->subsystem_vendor == 0x10CF && pdev->subsystem_device == 0x10AF) | 64 | if (pdev->subsystem_vendor == 0x10CF && pdev->subsystem_device == 0x10AF) |
65 | return 1; | 65 | return 1; |
66 | /* Mitac 8317 (Winbook-A) and relatives */ | ||
67 | if (pdev->subsystem_vendor == 0x1071 && pdev->subsystem_device == 0x8317) | ||
68 | return 1; | ||
66 | /* Systems by DMI */ | 69 | /* Systems by DMI */ |
67 | if (dmi_check_system(cable_dmi_table)) | 70 | if (dmi_check_system(cable_dmi_table)) |
68 | return 1; | 71 | return 1; |
@@ -282,6 +285,21 @@ static void ali_lock_sectors(struct ata_device *adev) | |||
282 | adev->max_sectors = 255; | 285 | adev->max_sectors = 255; |
283 | } | 286 | } |
284 | 287 | ||
288 | /** | ||
289 | * ali_check_atapi_dma - DMA check for most ALi controllers | ||
290 | * @adev: Device | ||
291 | * | ||
292 | * Called to decide whether commands should be sent by DMA or PIO | ||
293 | */ | ||
294 | |||
295 | static int ali_check_atapi_dma(struct ata_queued_cmd *qc) | ||
296 | { | ||
297 | /* If its not a media command, its not worth it */ | ||
298 | if (qc->nbytes < 2048) | ||
299 | return -EOPNOTSUPP; | ||
300 | return 0; | ||
301 | } | ||
302 | |||
285 | static struct scsi_host_template ali_sht = { | 303 | static struct scsi_host_template ali_sht = { |
286 | .module = THIS_MODULE, | 304 | .module = THIS_MODULE, |
287 | .name = DRV_NAME, | 305 | .name = DRV_NAME, |
@@ -378,6 +396,7 @@ static struct ata_port_operations ali_c2_port_ops = { | |||
378 | .mode_filter = ata_pci_default_filter, | 396 | .mode_filter = ata_pci_default_filter, |
379 | .tf_load = ata_tf_load, | 397 | .tf_load = ata_tf_load, |
380 | .tf_read = ata_tf_read, | 398 | .tf_read = ata_tf_read, |
399 | .check_atapi_dma = ali_check_atapi_dma, | ||
381 | .check_status = ata_check_status, | 400 | .check_status = ata_check_status, |
382 | .exec_command = ata_exec_command, | 401 | .exec_command = ata_exec_command, |
383 | .dev_select = ata_std_dev_select, | 402 | .dev_select = ata_std_dev_select, |
@@ -415,6 +434,7 @@ static struct ata_port_operations ali_c5_port_ops = { | |||
415 | .mode_filter = ata_pci_default_filter, | 434 | .mode_filter = ata_pci_default_filter, |
416 | .tf_load = ata_tf_load, | 435 | .tf_load = ata_tf_load, |
417 | .tf_read = ata_tf_read, | 436 | .tf_read = ata_tf_read, |
437 | .check_atapi_dma = ali_check_atapi_dma, | ||
418 | .check_status = ata_check_status, | 438 | .check_status = ata_check_status, |
419 | .exec_command = ata_exec_command, | 439 | .exec_command = ata_exec_command, |
420 | .dev_select = ata_std_dev_select, | 440 | .dev_select = ata_std_dev_select, |
diff --git a/drivers/ata/pata_bf54x.c b/drivers/ata/pata_bf54x.c index b5e38426b815..81db405a5445 100644 --- a/drivers/ata/pata_bf54x.c +++ b/drivers/ata/pata_bf54x.c | |||
@@ -1145,13 +1145,13 @@ static unsigned char bfin_bmdma_status(struct ata_port *ap) | |||
1145 | unsigned short int_status = ATAPI_GET_INT_STATUS(base); | 1145 | unsigned short int_status = ATAPI_GET_INT_STATUS(base); |
1146 | 1146 | ||
1147 | if (ATAPI_GET_STATUS(base) & (MULTI_XFER_ON|ULTRA_XFER_ON)) { | 1147 | if (ATAPI_GET_STATUS(base) & (MULTI_XFER_ON|ULTRA_XFER_ON)) { |
1148 | host_stat = ATA_DMA_ACTIVE; | 1148 | host_stat |= ATA_DMA_ACTIVE; |
1149 | } | 1149 | } |
1150 | if (int_status & (MULTI_DONE_INT|UDMAIN_DONE_INT|UDMAOUT_DONE_INT)) { | 1150 | if (int_status & (MULTI_DONE_INT|UDMAIN_DONE_INT|UDMAOUT_DONE_INT)) { |
1151 | host_stat = ATA_DMA_INTR; | 1151 | host_stat |= ATA_DMA_INTR; |
1152 | } | 1152 | } |
1153 | if (int_status & (MULTI_TERM_INT|UDMAIN_TERM_INT|UDMAOUT_TERM_INT)) { | 1153 | if (int_status & (MULTI_TERM_INT|UDMAIN_TERM_INT|UDMAOUT_TERM_INT)) { |
1154 | host_stat = ATA_DMA_ERR; | 1154 | host_stat |= ATA_DMA_ERR; |
1155 | } | 1155 | } |
1156 | 1156 | ||
1157 | return host_stat; | 1157 | return host_stat; |
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 3816b8605e0d..46dc70e0dee7 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c | |||
@@ -329,7 +329,7 @@ static int hpt37x_pre_reset(struct ata_link *link, unsigned long deadline) | |||
329 | /* Restore state */ | 329 | /* Restore state */ |
330 | pci_write_config_byte(pdev, 0x5B, scr2); | 330 | pci_write_config_byte(pdev, 0x5B, scr2); |
331 | 331 | ||
332 | if (ata66 & (1 << ap->port_no)) | 332 | if (ata66 & (2 >> ap->port_no)) |
333 | ap->cbl = ATA_CBL_PATA40; | 333 | ap->cbl = ATA_CBL_PATA40; |
334 | else | 334 | else |
335 | ap->cbl = ATA_CBL_PATA80; | 335 | ap->cbl = ATA_CBL_PATA80; |
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c index 88ab0e1d353f..4320e7986321 100644 --- a/drivers/ata/pata_isapnp.c +++ b/drivers/ata/pata_isapnp.c | |||
@@ -75,13 +75,16 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev | |||
75 | struct ata_host *host; | 75 | struct ata_host *host; |
76 | struct ata_port *ap; | 76 | struct ata_port *ap; |
77 | void __iomem *cmd_addr, *ctl_addr; | 77 | void __iomem *cmd_addr, *ctl_addr; |
78 | int irq = 0; | ||
79 | irq_handler_t handler = NULL; | ||
78 | 80 | ||
79 | if (pnp_port_valid(idev, 0) == 0) | 81 | if (pnp_port_valid(idev, 0) == 0) |
80 | return -ENODEV; | 82 | return -ENODEV; |
81 | 83 | ||
82 | /* FIXME: Should selected polled PIO here not fail */ | 84 | if (pnp_irq_valid(idev, 0)) { |
83 | if (pnp_irq_valid(idev, 0) == 0) | 85 | irq = pnp_irq(idev, 0); |
84 | return -ENODEV; | 86 | handler = ata_interrupt; |
87 | } | ||
85 | 88 | ||
86 | /* allocate host */ | 89 | /* allocate host */ |
87 | host = ata_host_alloc(&idev->dev, 1); | 90 | host = ata_host_alloc(&idev->dev, 1); |
@@ -115,7 +118,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev | |||
115 | (unsigned long long)pnp_port_start(idev, 1)); | 118 | (unsigned long long)pnp_port_start(idev, 1)); |
116 | 119 | ||
117 | /* activate */ | 120 | /* activate */ |
118 | return ata_host_activate(host, pnp_irq(idev, 0), ata_interrupt, 0, | 121 | return ata_host_activate(host, irq, handler, 0, |
119 | &isapnp_sht); | 122 | &isapnp_sht); |
120 | } | 123 | } |
121 | 124 | ||
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index 225a7223a726..5b8174d94067 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
@@ -80,11 +80,10 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline) | |||
80 | * actually do our cable checking etc. Thankfully we don't need | 80 | * actually do our cable checking etc. Thankfully we don't need |
81 | * to do the plumbing for other cases. | 81 | * to do the plumbing for other cases. |
82 | */ | 82 | */ |
83 | switch (port_map[port]) | 83 | switch (port_map[port]) { |
84 | { | ||
85 | case PORT_PATA0: | 84 | case PORT_PATA0: |
86 | if (control & (1 << 5)) | 85 | if ((control & (1 << 5)) == 0) |
87 | return 0; | 86 | return -ENOENT; |
88 | if (control & (1 << 3)) /* 40/80 pin primary */ | 87 | if (control & (1 << 3)) /* 40/80 pin primary */ |
89 | ap->cbl = ATA_CBL_PATA40; | 88 | ap->cbl = ATA_CBL_PATA40; |
90 | else | 89 | else |
@@ -93,7 +92,7 @@ static int jmicron_pre_reset(struct ata_link *link, unsigned long deadline) | |||
93 | case PORT_PATA1: | 92 | case PORT_PATA1: |
94 | /* Bit 21 is set if the port is enabled */ | 93 | /* Bit 21 is set if the port is enabled */ |
95 | if ((control5 & (1 << 21)) == 0) | 94 | if ((control5 & (1 << 21)) == 0) |
96 | return 0; | 95 | return -ENOENT; |
97 | if (control5 & (1 << 19)) /* 40/80 pin secondary */ | 96 | if (control5 & (1 << 19)) /* 40/80 pin secondary */ |
98 | ap->cbl = ATA_CBL_PATA40; | 97 | ap->cbl = ATA_CBL_PATA40; |
99 | else | 98 | else |
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index 5c1e9cb59ecb..503245a1eafa 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
@@ -33,7 +33,7 @@ | |||
33 | #include <linux/libata.h> | 33 | #include <linux/libata.h> |
34 | 34 | ||
35 | #define DRV_NAME "pata_sil680" | 35 | #define DRV_NAME "pata_sil680" |
36 | #define DRV_VERSION "0.4.7" | 36 | #define DRV_VERSION "0.4.8" |
37 | 37 | ||
38 | #define SIL680_MMIO_BAR 5 | 38 | #define SIL680_MMIO_BAR 5 |
39 | 39 | ||
@@ -94,34 +94,6 @@ static int sil680_cable_detect(struct ata_port *ap) { | |||
94 | } | 94 | } |
95 | 95 | ||
96 | /** | 96 | /** |
97 | * sil680_bus_reset - reset the SIL680 bus | ||
98 | * @link: ATA link to reset | ||
99 | * @deadline: deadline jiffies for the operation | ||
100 | * | ||
101 | * Perform the SIL680 housekeeping when doing an ATA bus reset | ||
102 | */ | ||
103 | |||
104 | static int sil680_bus_reset(struct ata_link *link, unsigned int *classes, | ||
105 | unsigned long deadline) | ||
106 | { | ||
107 | struct ata_port *ap = link->ap; | ||
108 | struct pci_dev *pdev = to_pci_dev(ap->host->dev); | ||
109 | unsigned long addr = sil680_selreg(ap, 0); | ||
110 | u8 reset; | ||
111 | |||
112 | pci_read_config_byte(pdev, addr, &reset); | ||
113 | pci_write_config_byte(pdev, addr, reset | 0x03); | ||
114 | udelay(25); | ||
115 | pci_write_config_byte(pdev, addr, reset); | ||
116 | return ata_std_softreset(link, classes, deadline); | ||
117 | } | ||
118 | |||
119 | static void sil680_error_handler(struct ata_port *ap) | ||
120 | { | ||
121 | ata_bmdma_drive_eh(ap, ata_std_prereset, sil680_bus_reset, NULL, ata_std_postreset); | ||
122 | } | ||
123 | |||
124 | /** | ||
125 | * sil680_set_piomode - set initial PIO mode data | 97 | * sil680_set_piomode - set initial PIO mode data |
126 | * @ap: ATA interface | 98 | * @ap: ATA interface |
127 | * @adev: ATA device | 99 | * @adev: ATA device |
@@ -249,7 +221,7 @@ static struct ata_port_operations sil680_port_ops = { | |||
249 | 221 | ||
250 | .freeze = ata_bmdma_freeze, | 222 | .freeze = ata_bmdma_freeze, |
251 | .thaw = ata_bmdma_thaw, | 223 | .thaw = ata_bmdma_thaw, |
252 | .error_handler = sil680_error_handler, | 224 | .error_handler = ata_bmdma_error_handler, |
253 | .post_internal_cmd = ata_bmdma_post_internal_cmd, | 225 | .post_internal_cmd = ata_bmdma_post_internal_cmd, |
254 | .cable_detect = sil680_cable_detect, | 226 | .cable_detect = sil680_cable_detect, |
255 | 227 | ||
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 3b5be77e861c..87546d9f1ca0 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -55,6 +55,7 @@ static const struct sis_laptop sis_laptop[] = { | |||
55 | /* devid, subvendor, subdev */ | 55 | /* devid, subvendor, subdev */ |
56 | { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ | 56 | { 0x5513, 0x1043, 0x1107 }, /* ASUS A6K */ |
57 | { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */ | 57 | { 0x5513, 0x1734, 0x105F }, /* FSC Amilo A1630 */ |
58 | { 0x5513, 0x1071, 0x8640 }, /* EasyNote K5305 */ | ||
58 | /* end marker */ | 59 | /* end marker */ |
59 | { 0, } | 60 | { 0, } |
60 | }; | 61 | }; |
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 187dcb02c681..96fd5260446d 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
@@ -63,6 +63,21 @@ enum { | |||
63 | SIL24_HOST_BAR = 0, | 63 | SIL24_HOST_BAR = 0, |
64 | SIL24_PORT_BAR = 2, | 64 | SIL24_PORT_BAR = 2, |
65 | 65 | ||
66 | /* sil24 fetches in chunks of 64bytes. The first block | ||
67 | * contains the PRB and two SGEs. From the second block, it's | ||
68 | * consisted of four SGEs and called SGT. Calculate the | ||
69 | * number of SGTs that fit into one page. | ||
70 | */ | ||
71 | SIL24_PRB_SZ = sizeof(struct sil24_prb) | ||
72 | + 2 * sizeof(struct sil24_sge), | ||
73 | SIL24_MAX_SGT = (PAGE_SIZE - SIL24_PRB_SZ) | ||
74 | / (4 * sizeof(struct sil24_sge)), | ||
75 | |||
76 | /* This will give us one unused SGEs for ATA. This extra SGE | ||
77 | * will be used to store CDB for ATAPI devices. | ||
78 | */ | ||
79 | SIL24_MAX_SGE = 4 * SIL24_MAX_SGT + 1, | ||
80 | |||
66 | /* | 81 | /* |
67 | * Global controller registers (128 bytes @ BAR0) | 82 | * Global controller registers (128 bytes @ BAR0) |
68 | */ | 83 | */ |
@@ -247,13 +262,13 @@ enum { | |||
247 | 262 | ||
248 | struct sil24_ata_block { | 263 | struct sil24_ata_block { |
249 | struct sil24_prb prb; | 264 | struct sil24_prb prb; |
250 | struct sil24_sge sge[LIBATA_MAX_PRD]; | 265 | struct sil24_sge sge[SIL24_MAX_SGE]; |
251 | }; | 266 | }; |
252 | 267 | ||
253 | struct sil24_atapi_block { | 268 | struct sil24_atapi_block { |
254 | struct sil24_prb prb; | 269 | struct sil24_prb prb; |
255 | u8 cdb[16]; | 270 | u8 cdb[16]; |
256 | struct sil24_sge sge[LIBATA_MAX_PRD - 1]; | 271 | struct sil24_sge sge[SIL24_MAX_SGE]; |
257 | }; | 272 | }; |
258 | 273 | ||
259 | union sil24_cmd_block { | 274 | union sil24_cmd_block { |
@@ -378,7 +393,7 @@ static struct scsi_host_template sil24_sht = { | |||
378 | .change_queue_depth = ata_scsi_change_queue_depth, | 393 | .change_queue_depth = ata_scsi_change_queue_depth, |
379 | .can_queue = SIL24_MAX_CMDS, | 394 | .can_queue = SIL24_MAX_CMDS, |
380 | .this_id = ATA_SHT_THIS_ID, | 395 | .this_id = ATA_SHT_THIS_ID, |
381 | .sg_tablesize = LIBATA_MAX_PRD, | 396 | .sg_tablesize = SIL24_MAX_SGE, |
382 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, | 397 | .cmd_per_lun = ATA_SHT_CMD_PER_LUN, |
383 | .emulated = ATA_SHT_EMULATED, | 398 | .emulated = ATA_SHT_EMULATED, |
384 | .use_clustering = ATA_SHT_USE_CLUSTERING, | 399 | .use_clustering = ATA_SHT_USE_CLUSTERING, |
@@ -1284,6 +1299,7 @@ static void sil24_init_controller(struct ata_host *host) | |||
1284 | 1299 | ||
1285 | static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 1300 | static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
1286 | { | 1301 | { |
1302 | extern int __MARKER__sil24_cmd_block_is_sized_wrongly; | ||
1287 | static int printed_version; | 1303 | static int printed_version; |
1288 | struct ata_port_info pi = sil24_port_info[ent->driver_data]; | 1304 | struct ata_port_info pi = sil24_port_info[ent->driver_data]; |
1289 | const struct ata_port_info *ppi[] = { &pi, NULL }; | 1305 | const struct ata_port_info *ppi[] = { &pi, NULL }; |
@@ -1292,6 +1308,10 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1292 | int i, rc; | 1308 | int i, rc; |
1293 | u32 tmp; | 1309 | u32 tmp; |
1294 | 1310 | ||
1311 | /* cause link error if sil24_cmd_block is sized wrongly */ | ||
1312 | if (sizeof(union sil24_cmd_block) != PAGE_SIZE) | ||
1313 | __MARKER__sil24_cmd_block_is_sized_wrongly = 1; | ||
1314 | |||
1295 | if (!printed_version++) | 1315 | if (!printed_version++) |
1296 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); | 1316 | dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); |
1297 | 1317 | ||
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 3cf7129d83e6..924ddd8bccd2 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c | |||
@@ -223,7 +223,7 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
223 | err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_CAPACITY, &cap); | 223 | err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_CAPACITY, &cap); |
224 | if (err) { | 224 | if (err) { |
225 | dev_err(&vdev->dev, "Bad/missing capacity in config\n"); | 225 | dev_err(&vdev->dev, "Bad/missing capacity in config\n"); |
226 | goto out_put_disk; | 226 | goto out_cleanup_queue; |
227 | } | 227 | } |
228 | 228 | ||
229 | /* If capacity is too big, truncate with warning. */ | 229 | /* If capacity is too big, truncate with warning. */ |
@@ -239,7 +239,7 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
239 | blk_queue_max_segment_size(vblk->disk->queue, v); | 239 | blk_queue_max_segment_size(vblk->disk->queue, v); |
240 | else if (err != -ENOENT) { | 240 | else if (err != -ENOENT) { |
241 | dev_err(&vdev->dev, "Bad SIZE_MAX in config\n"); | 241 | dev_err(&vdev->dev, "Bad SIZE_MAX in config\n"); |
242 | goto out_put_disk; | 242 | goto out_cleanup_queue; |
243 | } | 243 | } |
244 | 244 | ||
245 | err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_SEG_MAX, &v); | 245 | err = virtio_config_val(vdev, VIRTIO_CONFIG_BLK_F_SEG_MAX, &v); |
@@ -247,12 +247,14 @@ static int virtblk_probe(struct virtio_device *vdev) | |||
247 | blk_queue_max_hw_segments(vblk->disk->queue, v); | 247 | blk_queue_max_hw_segments(vblk->disk->queue, v); |
248 | else if (err != -ENOENT) { | 248 | else if (err != -ENOENT) { |
249 | dev_err(&vdev->dev, "Bad SEG_MAX in config\n"); | 249 | dev_err(&vdev->dev, "Bad SEG_MAX in config\n"); |
250 | goto out_put_disk; | 250 | goto out_cleanup_queue; |
251 | } | 251 | } |
252 | 252 | ||
253 | add_disk(vblk->disk); | 253 | add_disk(vblk->disk); |
254 | return 0; | 254 | return 0; |
255 | 255 | ||
256 | out_cleanup_queue: | ||
257 | blk_cleanup_queue(vblk->disk->queue); | ||
256 | out_put_disk: | 258 | out_put_disk: |
257 | put_disk(vblk->disk); | 259 | put_disk(vblk->disk); |
258 | out_unregister_blkdev: | 260 | out_unregister_blkdev: |
@@ -277,6 +279,8 @@ static void virtblk_remove(struct virtio_device *vdev) | |||
277 | put_disk(vblk->disk); | 279 | put_disk(vblk->disk); |
278 | unregister_blkdev(major, "virtblk"); | 280 | unregister_blkdev(major, "virtblk"); |
279 | mempool_destroy(vblk->pool); | 281 | mempool_destroy(vblk->pool); |
282 | /* There should be nothing in the queue now, so no need to shutdown */ | ||
283 | vdev->config->del_vq(vblk->vq); | ||
280 | kfree(vblk); | 284 | kfree(vblk); |
281 | } | 285 | } |
282 | 286 | ||
diff --git a/drivers/input/serio/Kconfig b/drivers/input/serio/Kconfig index 5ce632ca6815..b88569e21d60 100644 --- a/drivers/input/serio/Kconfig +++ b/drivers/input/serio/Kconfig | |||
@@ -21,7 +21,7 @@ if SERIO | |||
21 | config SERIO_I8042 | 21 | config SERIO_I8042 |
22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 | 22 | tristate "i8042 PC Keyboard controller" if EMBEDDED || !X86 |
23 | default y | 23 | default y |
24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BFIN | 24 | depends on !PARISC && (!ARM || ARCH_SHARK || FOOTBRIDGE_HOST) && !M68K && !BLACKFIN |
25 | ---help--- | 25 | ---help--- |
26 | i8042 is the chip over which the standard AT keyboard and PS/2 | 26 | i8042 is the chip over which the standard AT keyboard and PS/2 |
27 | mouse are connected to the computer. If you use these devices, | 27 | mouse are connected to the computer. If you use these devices, |
diff --git a/drivers/isdn/i4l/isdn_net.c b/drivers/isdn/i4l/isdn_net.c index b39d1f5b378e..ced83c202cac 100644 --- a/drivers/isdn/i4l/isdn_net.c +++ b/drivers/isdn/i4l/isdn_net.c | |||
@@ -2104,7 +2104,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) | |||
2104 | u_long flags; | 2104 | u_long flags; |
2105 | isdn_net_dev *p; | 2105 | isdn_net_dev *p; |
2106 | isdn_net_phone *n; | 2106 | isdn_net_phone *n; |
2107 | char nr[32]; | 2107 | char nr[ISDN_MSNLEN]; |
2108 | char *my_eaz; | 2108 | char *my_eaz; |
2109 | 2109 | ||
2110 | /* Search name in netdev-chain */ | 2110 | /* Search name in netdev-chain */ |
@@ -2113,7 +2113,7 @@ isdn_net_find_icall(int di, int ch, int idx, setup_parm *setup) | |||
2113 | nr[1] = '\0'; | 2113 | nr[1] = '\0'; |
2114 | printk(KERN_INFO "isdn_net: Incoming call without OAD, assuming '0'\n"); | 2114 | printk(KERN_INFO "isdn_net: Incoming call without OAD, assuming '0'\n"); |
2115 | } else | 2115 | } else |
2116 | strcpy(nr, setup->phone); | 2116 | strlcpy(nr, setup->phone, ISDN_MSNLEN); |
2117 | si1 = (int) setup->si1; | 2117 | si1 = (int) setup->si1; |
2118 | si2 = (int) setup->si2; | 2118 | si2 = (int) setup->si2; |
2119 | if (!setup->eazmsn[0]) { | 2119 | if (!setup->eazmsn[0]) { |
@@ -2789,7 +2789,7 @@ isdn_net_setcfg(isdn_net_ioctl_cfg * cfg) | |||
2789 | chidx = -1; | 2789 | chidx = -1; |
2790 | } | 2790 | } |
2791 | } | 2791 | } |
2792 | strcpy(lp->msn, cfg->eaz); | 2792 | strlcpy(lp->msn, cfg->eaz, sizeof(lp->msn)); |
2793 | lp->pre_device = drvidx; | 2793 | lp->pre_device = drvidx; |
2794 | lp->pre_channel = chidx; | 2794 | lp->pre_channel = chidx; |
2795 | lp->onhtime = cfg->onhtime; | 2795 | lp->onhtime = cfg->onhtime; |
@@ -2936,7 +2936,7 @@ isdn_net_addphone(isdn_net_ioctl_phone * phone) | |||
2936 | if (p) { | 2936 | if (p) { |
2937 | if (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL))) | 2937 | if (!(n = kmalloc(sizeof(isdn_net_phone), GFP_KERNEL))) |
2938 | return -ENOMEM; | 2938 | return -ENOMEM; |
2939 | strcpy(n->num, phone->phone); | 2939 | strlcpy(n->num, phone->phone, sizeof(n->num)); |
2940 | n->next = p->local->phone[phone->outgoing & 1]; | 2940 | n->next = p->local->phone[phone->outgoing & 1]; |
2941 | p->local->phone[phone->outgoing & 1] = n; | 2941 | p->local->phone[phone->outgoing & 1] = n; |
2942 | return 0; | 2942 | return 0; |
diff --git a/drivers/lguest/lguest_device.c b/drivers/lguest/lguest_device.c index 66f38722253a..e2eec38c83c2 100644 --- a/drivers/lguest/lguest_device.c +++ b/drivers/lguest/lguest_device.c | |||
@@ -247,6 +247,8 @@ static void lg_del_vq(struct virtqueue *vq) | |||
247 | { | 247 | { |
248 | struct lguest_vq_info *lvq = vq->priv; | 248 | struct lguest_vq_info *lvq = vq->priv; |
249 | 249 | ||
250 | /* Release the interrupt */ | ||
251 | free_irq(lvq->config.irq, vq); | ||
250 | /* Tell virtio_ring.c to free the virtqueue. */ | 252 | /* Tell virtio_ring.c to free the virtqueue. */ |
251 | vring_del_virtqueue(vq); | 253 | vring_del_virtqueue(vq); |
252 | /* Unmap the pages containing the ring. */ | 254 | /* Unmap the pages containing the ring. */ |
diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index e953276664a0..ab23a3221585 100644 --- a/drivers/misc/thinkpad_acpi.c +++ b/drivers/misc/thinkpad_acpi.c | |||
@@ -21,7 +21,7 @@ | |||
21 | * 02110-1301, USA. | 21 | * 02110-1301, USA. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | #define IBM_VERSION "0.16" | 24 | #define IBM_VERSION "0.17" |
25 | #define TPACPI_SYSFS_VERSION 0x020000 | 25 | #define TPACPI_SYSFS_VERSION 0x020000 |
26 | 26 | ||
27 | /* | 27 | /* |
@@ -964,15 +964,15 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
964 | KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */ | 964 | KEY_UNKNOWN, /* 0x0C: FN+BACKSPACE */ |
965 | KEY_UNKNOWN, /* 0x0D: FN+INSERT */ | 965 | KEY_UNKNOWN, /* 0x0D: FN+INSERT */ |
966 | KEY_UNKNOWN, /* 0x0E: FN+DELETE */ | 966 | KEY_UNKNOWN, /* 0x0E: FN+DELETE */ |
967 | KEY_BRIGHTNESSUP, /* 0x0F: FN+HOME (brightness up) */ | 967 | KEY_RESERVED, /* 0x0F: FN+HOME (brightness up) */ |
968 | /* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */ | 968 | /* Scan codes 0x10 to 0x1F: Extended ACPI HKEY hot keys */ |
969 | KEY_BRIGHTNESSDOWN, /* 0x10: FN+END (brightness down) */ | 969 | KEY_RESERVED, /* 0x10: FN+END (brightness down) */ |
970 | KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ | 970 | KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ |
971 | KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ | 971 | KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ |
972 | KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ | 972 | KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ |
973 | KEY_VOLUMEUP, /* 0x14: VOLUME UP */ | 973 | KEY_RESERVED, /* 0x14: VOLUME UP */ |
974 | KEY_VOLUMEDOWN, /* 0x15: VOLUME DOWN */ | 974 | KEY_RESERVED, /* 0x15: VOLUME DOWN */ |
975 | KEY_MUTE, /* 0x16: MUTE */ | 975 | KEY_RESERVED, /* 0x16: MUTE */ |
976 | KEY_VENDOR, /* 0x17: Thinkpad/AccessIBM/Lenovo */ | 976 | KEY_VENDOR, /* 0x17: Thinkpad/AccessIBM/Lenovo */ |
977 | /* (assignments unknown, please report if found) */ | 977 | /* (assignments unknown, please report if found) */ |
978 | KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, | 978 | KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, |
@@ -993,9 +993,9 @@ static int __init hotkey_init(struct ibm_init_struct *iibm) | |||
993 | KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ | 993 | KEY_RESERVED, /* 0x11: FN+PGUP (thinklight toggle) */ |
994 | KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ | 994 | KEY_UNKNOWN, /* 0x12: FN+PGDOWN */ |
995 | KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ | 995 | KEY_ZOOM, /* 0x13: FN+SPACE (zoom) */ |
996 | KEY_VOLUMEUP, /* 0x14: VOLUME UP */ | 996 | KEY_RESERVED, /* 0x14: VOLUME UP */ |
997 | KEY_VOLUMEDOWN, /* 0x15: VOLUME DOWN */ | 997 | KEY_RESERVED, /* 0x15: VOLUME DOWN */ |
998 | KEY_MUTE, /* 0x16: MUTE */ | 998 | KEY_RESERVED, /* 0x16: MUTE */ |
999 | KEY_VENDOR, /* 0x17: Thinkpad/AccessIBM/Lenovo */ | 999 | KEY_VENDOR, /* 0x17: Thinkpad/AccessIBM/Lenovo */ |
1000 | /* (assignments unknown, please report if found) */ | 1000 | /* (assignments unknown, please report if found) */ |
1001 | KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, | 1001 | KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, KEY_UNKNOWN, |
@@ -1342,9 +1342,8 @@ static int hotkey_read(char *p) | |||
1342 | return len; | 1342 | return len; |
1343 | } | 1343 | } |
1344 | 1344 | ||
1345 | res = mutex_lock_interruptible(&hotkey_mutex); | 1345 | if (mutex_lock_interruptible(&hotkey_mutex)) |
1346 | if (res < 0) | 1346 | return -ERESTARTSYS; |
1347 | return res; | ||
1348 | res = hotkey_get(&status, &mask); | 1347 | res = hotkey_get(&status, &mask); |
1349 | mutex_unlock(&hotkey_mutex); | 1348 | mutex_unlock(&hotkey_mutex); |
1350 | if (res) | 1349 | if (res) |
@@ -1373,9 +1372,8 @@ static int hotkey_write(char *buf) | |||
1373 | if (!tp_features.hotkey) | 1372 | if (!tp_features.hotkey) |
1374 | return -ENODEV; | 1373 | return -ENODEV; |
1375 | 1374 | ||
1376 | res = mutex_lock_interruptible(&hotkey_mutex); | 1375 | if (mutex_lock_interruptible(&hotkey_mutex)) |
1377 | if (res < 0) | 1376 | return -ERESTARTSYS; |
1378 | return res; | ||
1379 | 1377 | ||
1380 | res = hotkey_get(&status, &mask); | 1378 | res = hotkey_get(&status, &mask); |
1381 | if (res) | 1379 | if (res) |
@@ -3114,6 +3112,99 @@ static struct backlight_ops ibm_backlight_data = { | |||
3114 | 3112 | ||
3115 | static struct mutex brightness_mutex; | 3113 | static struct mutex brightness_mutex; |
3116 | 3114 | ||
3115 | static int __init tpacpi_query_bcll_levels(acpi_handle handle) | ||
3116 | { | ||
3117 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
3118 | union acpi_object *obj; | ||
3119 | int rc; | ||
3120 | |||
3121 | if (ACPI_SUCCESS(acpi_evaluate_object(handle, NULL, NULL, &buffer))) { | ||
3122 | obj = (union acpi_object *)buffer.pointer; | ||
3123 | if (!obj || (obj->type != ACPI_TYPE_PACKAGE)) { | ||
3124 | printk(IBM_ERR "Unknown BCLL data, " | ||
3125 | "please report this to %s\n", IBM_MAIL); | ||
3126 | rc = 0; | ||
3127 | } else { | ||
3128 | rc = obj->package.count; | ||
3129 | } | ||
3130 | } else { | ||
3131 | return 0; | ||
3132 | } | ||
3133 | |||
3134 | kfree(buffer.pointer); | ||
3135 | return rc; | ||
3136 | } | ||
3137 | |||
3138 | static acpi_status __init brightness_find_bcll(acpi_handle handle, u32 lvl, | ||
3139 | void *context, void **rv) | ||
3140 | { | ||
3141 | char name[ACPI_PATH_SEGMENT_LENGTH]; | ||
3142 | struct acpi_buffer buffer = { sizeof(name), &name }; | ||
3143 | |||
3144 | if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) && | ||
3145 | !strncmp("BCLL", name, sizeof(name) - 1)) { | ||
3146 | if (tpacpi_query_bcll_levels(handle) == 16) { | ||
3147 | *rv = handle; | ||
3148 | return AE_CTRL_TERMINATE; | ||
3149 | } else { | ||
3150 | return AE_OK; | ||
3151 | } | ||
3152 | } else { | ||
3153 | return AE_OK; | ||
3154 | } | ||
3155 | } | ||
3156 | |||
3157 | static int __init brightness_check_levels(void) | ||
3158 | { | ||
3159 | int status; | ||
3160 | void *found_node = NULL; | ||
3161 | |||
3162 | if (!vid_handle) { | ||
3163 | IBM_ACPIHANDLE_INIT(vid); | ||
3164 | } | ||
3165 | if (!vid_handle) | ||
3166 | return 0; | ||
3167 | |||
3168 | /* Search for a BCLL package with 16 levels */ | ||
3169 | status = acpi_walk_namespace(ACPI_TYPE_PACKAGE, vid_handle, 3, | ||
3170 | brightness_find_bcll, NULL, &found_node); | ||
3171 | |||
3172 | return (ACPI_SUCCESS(status) && found_node != NULL); | ||
3173 | } | ||
3174 | |||
3175 | static acpi_status __init brightness_find_bcl(acpi_handle handle, u32 lvl, | ||
3176 | void *context, void **rv) | ||
3177 | { | ||
3178 | char name[ACPI_PATH_SEGMENT_LENGTH]; | ||
3179 | struct acpi_buffer buffer = { sizeof(name), &name }; | ||
3180 | |||
3181 | if (ACPI_SUCCESS(acpi_get_name(handle, ACPI_SINGLE_NAME, &buffer)) && | ||
3182 | !strncmp("_BCL", name, sizeof(name) - 1)) { | ||
3183 | *rv = handle; | ||
3184 | return AE_CTRL_TERMINATE; | ||
3185 | } else { | ||
3186 | return AE_OK; | ||
3187 | } | ||
3188 | } | ||
3189 | |||
3190 | static int __init brightness_check_std_acpi_support(void) | ||
3191 | { | ||
3192 | int status; | ||
3193 | void *found_node = NULL; | ||
3194 | |||
3195 | if (!vid_handle) { | ||
3196 | IBM_ACPIHANDLE_INIT(vid); | ||
3197 | } | ||
3198 | if (!vid_handle) | ||
3199 | return 0; | ||
3200 | |||
3201 | /* Search for a _BCL method, but don't execute it */ | ||
3202 | status = acpi_walk_namespace(ACPI_TYPE_METHOD, vid_handle, 3, | ||
3203 | brightness_find_bcl, NULL, &found_node); | ||
3204 | |||
3205 | return (ACPI_SUCCESS(status) && found_node != NULL); | ||
3206 | } | ||
3207 | |||
3117 | static int __init brightness_init(struct ibm_init_struct *iibm) | 3208 | static int __init brightness_init(struct ibm_init_struct *iibm) |
3118 | { | 3209 | { |
3119 | int b; | 3210 | int b; |
@@ -3122,6 +3213,18 @@ static int __init brightness_init(struct ibm_init_struct *iibm) | |||
3122 | 3213 | ||
3123 | mutex_init(&brightness_mutex); | 3214 | mutex_init(&brightness_mutex); |
3124 | 3215 | ||
3216 | if (!brightness_enable) { | ||
3217 | dbg_printk(TPACPI_DBG_INIT, | ||
3218 | "brightness support disabled by module parameter\n"); | ||
3219 | return 1; | ||
3220 | } else if (brightness_enable > 1) { | ||
3221 | if (brightness_check_std_acpi_support()) { | ||
3222 | printk(IBM_NOTICE | ||
3223 | "standard ACPI backlight interface available, not loading native one...\n"); | ||
3224 | return 1; | ||
3225 | } | ||
3226 | } | ||
3227 | |||
3125 | if (!brightness_mode) { | 3228 | if (!brightness_mode) { |
3126 | if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) | 3229 | if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) |
3127 | brightness_mode = 2; | 3230 | brightness_mode = 2; |
@@ -3135,10 +3238,17 @@ static int __init brightness_init(struct ibm_init_struct *iibm) | |||
3135 | if (brightness_mode > 3) | 3238 | if (brightness_mode > 3) |
3136 | return -EINVAL; | 3239 | return -EINVAL; |
3137 | 3240 | ||
3241 | tp_features.bright_16levels = | ||
3242 | thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO && | ||
3243 | brightness_check_levels(); | ||
3244 | |||
3138 | b = brightness_get(NULL); | 3245 | b = brightness_get(NULL); |
3139 | if (b < 0) | 3246 | if (b < 0) |
3140 | return 1; | 3247 | return 1; |
3141 | 3248 | ||
3249 | if (tp_features.bright_16levels) | ||
3250 | printk(IBM_INFO "detected a 16-level brightness capable ThinkPad\n"); | ||
3251 | |||
3142 | ibm_backlight_device = backlight_device_register( | 3252 | ibm_backlight_device = backlight_device_register( |
3143 | TPACPI_BACKLIGHT_DEV_NAME, NULL, NULL, | 3253 | TPACPI_BACKLIGHT_DEV_NAME, NULL, NULL, |
3144 | &ibm_backlight_data); | 3254 | &ibm_backlight_data); |
@@ -3148,7 +3258,8 @@ static int __init brightness_init(struct ibm_init_struct *iibm) | |||
3148 | } | 3258 | } |
3149 | vdbg_printk(TPACPI_DBG_INIT, "brightness is supported\n"); | 3259 | vdbg_printk(TPACPI_DBG_INIT, "brightness is supported\n"); |
3150 | 3260 | ||
3151 | ibm_backlight_device->props.max_brightness = 7; | 3261 | ibm_backlight_device->props.max_brightness = |
3262 | (tp_features.bright_16levels)? 15 : 7; | ||
3152 | ibm_backlight_device->props.brightness = b; | 3263 | ibm_backlight_device->props.brightness = b; |
3153 | backlight_update_status(ibm_backlight_device); | 3264 | backlight_update_status(ibm_backlight_device); |
3154 | 3265 | ||
@@ -3167,6 +3278,8 @@ static void brightness_exit(void) | |||
3167 | 3278 | ||
3168 | static int brightness_update_status(struct backlight_device *bd) | 3279 | static int brightness_update_status(struct backlight_device *bd) |
3169 | { | 3280 | { |
3281 | /* it is the backlight class's job (caller) to handle | ||
3282 | * EINTR and other errors properly */ | ||
3170 | return brightness_set( | 3283 | return brightness_set( |
3171 | (bd->props.fb_blank == FB_BLANK_UNBLANK && | 3284 | (bd->props.fb_blank == FB_BLANK_UNBLANK && |
3172 | bd->props.power == FB_BLANK_UNBLANK) ? | 3285 | bd->props.power == FB_BLANK_UNBLANK) ? |
@@ -3184,13 +3297,14 @@ static int brightness_get(struct backlight_device *bd) | |||
3184 | if (brightness_mode & 1) { | 3297 | if (brightness_mode & 1) { |
3185 | if (!acpi_ec_read(brightness_offset, &lec)) | 3298 | if (!acpi_ec_read(brightness_offset, &lec)) |
3186 | return -EIO; | 3299 | return -EIO; |
3187 | lec &= 7; | 3300 | lec &= (tp_features.bright_16levels)? 0x0f : 0x07; |
3188 | level = lec; | 3301 | level = lec; |
3189 | }; | 3302 | }; |
3190 | if (brightness_mode & 2) { | 3303 | if (brightness_mode & 2) { |
3191 | lcmos = (nvram_read_byte(TP_NVRAM_ADDR_BRIGHTNESS) | 3304 | lcmos = (nvram_read_byte(TP_NVRAM_ADDR_BRIGHTNESS) |
3192 | & TP_NVRAM_MASK_LEVEL_BRIGHTNESS) | 3305 | & TP_NVRAM_MASK_LEVEL_BRIGHTNESS) |
3193 | >> TP_NVRAM_POS_LEVEL_BRIGHTNESS; | 3306 | >> TP_NVRAM_POS_LEVEL_BRIGHTNESS; |
3307 | lcmos &= (tp_features.bright_16levels)? 0x0f : 0x07; | ||
3194 | level = lcmos; | 3308 | level = lcmos; |
3195 | } | 3309 | } |
3196 | 3310 | ||
@@ -3206,12 +3320,13 @@ static int brightness_get(struct backlight_device *bd) | |||
3206 | return level; | 3320 | return level; |
3207 | } | 3321 | } |
3208 | 3322 | ||
3323 | /* May return EINTR which can always be mapped to ERESTARTSYS */ | ||
3209 | static int brightness_set(int value) | 3324 | static int brightness_set(int value) |
3210 | { | 3325 | { |
3211 | int cmos_cmd, inc, i, res; | 3326 | int cmos_cmd, inc, i, res; |
3212 | int current_value; | 3327 | int current_value; |
3213 | 3328 | ||
3214 | if (value > 7) | 3329 | if (value > ((tp_features.bright_16levels)? 15 : 7)) |
3215 | return -EINVAL; | 3330 | return -EINVAL; |
3216 | 3331 | ||
3217 | res = mutex_lock_interruptible(&brightness_mutex); | 3332 | res = mutex_lock_interruptible(&brightness_mutex); |
@@ -3227,7 +3342,7 @@ static int brightness_set(int value) | |||
3227 | cmos_cmd = value > current_value ? | 3342 | cmos_cmd = value > current_value ? |
3228 | TP_CMOS_BRIGHTNESS_UP : | 3343 | TP_CMOS_BRIGHTNESS_UP : |
3229 | TP_CMOS_BRIGHTNESS_DOWN; | 3344 | TP_CMOS_BRIGHTNESS_DOWN; |
3230 | inc = value > current_value ? 1 : -1; | 3345 | inc = (value > current_value)? 1 : -1; |
3231 | 3346 | ||
3232 | res = 0; | 3347 | res = 0; |
3233 | for (i = current_value; i != value; i += inc) { | 3348 | for (i = current_value; i != value; i += inc) { |
@@ -3256,10 +3371,11 @@ static int brightness_read(char *p) | |||
3256 | if ((level = brightness_get(NULL)) < 0) { | 3371 | if ((level = brightness_get(NULL)) < 0) { |
3257 | len += sprintf(p + len, "level:\t\tunreadable\n"); | 3372 | len += sprintf(p + len, "level:\t\tunreadable\n"); |
3258 | } else { | 3373 | } else { |
3259 | len += sprintf(p + len, "level:\t\t%d\n", level & 0x7); | 3374 | len += sprintf(p + len, "level:\t\t%d\n", level); |
3260 | len += sprintf(p + len, "commands:\tup, down\n"); | 3375 | len += sprintf(p + len, "commands:\tup, down\n"); |
3261 | len += sprintf(p + len, "commands:\tlevel <level>" | 3376 | len += sprintf(p + len, "commands:\tlevel <level>" |
3262 | " (<level> is 0-7)\n"); | 3377 | " (<level> is 0-%d)\n", |
3378 | (tp_features.bright_16levels) ? 15 : 7); | ||
3263 | } | 3379 | } |
3264 | 3380 | ||
3265 | return len; | 3381 | return len; |
@@ -3268,28 +3384,34 @@ static int brightness_read(char *p) | |||
3268 | static int brightness_write(char *buf) | 3384 | static int brightness_write(char *buf) |
3269 | { | 3385 | { |
3270 | int level; | 3386 | int level; |
3271 | int new_level; | 3387 | int rc; |
3272 | char *cmd; | 3388 | char *cmd; |
3389 | int max_level = (tp_features.bright_16levels) ? 15 : 7; | ||
3273 | 3390 | ||
3274 | while ((cmd = next_cmd(&buf))) { | 3391 | level = brightness_get(NULL); |
3275 | if ((level = brightness_get(NULL)) < 0) | 3392 | if (level < 0) |
3276 | return level; | 3393 | return level; |
3277 | level &= 7; | ||
3278 | 3394 | ||
3395 | while ((cmd = next_cmd(&buf))) { | ||
3279 | if (strlencmp(cmd, "up") == 0) { | 3396 | if (strlencmp(cmd, "up") == 0) { |
3280 | new_level = level == 7 ? 7 : level + 1; | 3397 | if (level < max_level) |
3398 | level++; | ||
3281 | } else if (strlencmp(cmd, "down") == 0) { | 3399 | } else if (strlencmp(cmd, "down") == 0) { |
3282 | new_level = level == 0 ? 0 : level - 1; | 3400 | if (level > 0) |
3283 | } else if (sscanf(cmd, "level %d", &new_level) == 1 && | 3401 | level--; |
3284 | new_level >= 0 && new_level <= 7) { | 3402 | } else if (sscanf(cmd, "level %d", &level) == 1 && |
3285 | /* new_level set */ | 3403 | level >= 0 && level <= max_level) { |
3404 | /* new level set */ | ||
3286 | } else | 3405 | } else |
3287 | return -EINVAL; | 3406 | return -EINVAL; |
3288 | |||
3289 | brightness_set(new_level); | ||
3290 | } | 3407 | } |
3291 | 3408 | ||
3292 | return 0; | 3409 | /* |
3410 | * Now we know what the final level should be, so we try to set it. | ||
3411 | * Doing it this way makes the syscall restartable in case of EINTR | ||
3412 | */ | ||
3413 | rc = brightness_set(level); | ||
3414 | return (rc == -EINTR)? ERESTARTSYS : rc; | ||
3293 | } | 3415 | } |
3294 | 3416 | ||
3295 | static struct ibm_struct brightness_driver_data = { | 3417 | static struct ibm_struct brightness_driver_data = { |
@@ -3652,9 +3774,8 @@ static ssize_t fan_pwm1_store(struct device *dev, | |||
3652 | /* scale down from 0-255 to 0-7 */ | 3774 | /* scale down from 0-255 to 0-7 */ |
3653 | newlevel = (s >> 5) & 0x07; | 3775 | newlevel = (s >> 5) & 0x07; |
3654 | 3776 | ||
3655 | rc = mutex_lock_interruptible(&fan_mutex); | 3777 | if (mutex_lock_interruptible(&fan_mutex)) |
3656 | if (rc < 0) | 3778 | return -ERESTARTSYS; |
3657 | return rc; | ||
3658 | 3779 | ||
3659 | rc = fan_get_status(&status); | 3780 | rc = fan_get_status(&status); |
3660 | if (!rc && (status & | 3781 | if (!rc && (status & |
@@ -3904,9 +4025,8 @@ static int fan_get_status_safe(u8 *status) | |||
3904 | int rc; | 4025 | int rc; |
3905 | u8 s; | 4026 | u8 s; |
3906 | 4027 | ||
3907 | rc = mutex_lock_interruptible(&fan_mutex); | 4028 | if (mutex_lock_interruptible(&fan_mutex)) |
3908 | if (rc < 0) | 4029 | return -ERESTARTSYS; |
3909 | return rc; | ||
3910 | rc = fan_get_status(&s); | 4030 | rc = fan_get_status(&s); |
3911 | if (!rc) | 4031 | if (!rc) |
3912 | fan_update_desired_level(s); | 4032 | fan_update_desired_level(s); |
@@ -4040,9 +4160,8 @@ static int fan_set_level_safe(int level) | |||
4040 | if (!fan_control_allowed) | 4160 | if (!fan_control_allowed) |
4041 | return -EPERM; | 4161 | return -EPERM; |
4042 | 4162 | ||
4043 | rc = mutex_lock_interruptible(&fan_mutex); | 4163 | if (mutex_lock_interruptible(&fan_mutex)) |
4044 | if (rc < 0) | 4164 | return -ERESTARTSYS; |
4045 | return rc; | ||
4046 | 4165 | ||
4047 | if (level == TPACPI_FAN_LAST_LEVEL) | 4166 | if (level == TPACPI_FAN_LAST_LEVEL) |
4048 | level = fan_control_desired_level; | 4167 | level = fan_control_desired_level; |
@@ -4063,9 +4182,8 @@ static int fan_set_enable(void) | |||
4063 | if (!fan_control_allowed) | 4182 | if (!fan_control_allowed) |
4064 | return -EPERM; | 4183 | return -EPERM; |
4065 | 4184 | ||
4066 | rc = mutex_lock_interruptible(&fan_mutex); | 4185 | if (mutex_lock_interruptible(&fan_mutex)) |
4067 | if (rc < 0) | 4186 | return -ERESTARTSYS; |
4068 | return rc; | ||
4069 | 4187 | ||
4070 | switch (fan_control_access_mode) { | 4188 | switch (fan_control_access_mode) { |
4071 | case TPACPI_FAN_WR_ACPI_FANS: | 4189 | case TPACPI_FAN_WR_ACPI_FANS: |
@@ -4119,9 +4237,8 @@ static int fan_set_disable(void) | |||
4119 | if (!fan_control_allowed) | 4237 | if (!fan_control_allowed) |
4120 | return -EPERM; | 4238 | return -EPERM; |
4121 | 4239 | ||
4122 | rc = mutex_lock_interruptible(&fan_mutex); | 4240 | if (mutex_lock_interruptible(&fan_mutex)) |
4123 | if (rc < 0) | 4241 | return -ERESTARTSYS; |
4124 | return rc; | ||
4125 | 4242 | ||
4126 | rc = 0; | 4243 | rc = 0; |
4127 | switch (fan_control_access_mode) { | 4244 | switch (fan_control_access_mode) { |
@@ -4158,9 +4275,8 @@ static int fan_set_speed(int speed) | |||
4158 | if (!fan_control_allowed) | 4275 | if (!fan_control_allowed) |
4159 | return -EPERM; | 4276 | return -EPERM; |
4160 | 4277 | ||
4161 | rc = mutex_lock_interruptible(&fan_mutex); | 4278 | if (mutex_lock_interruptible(&fan_mutex)) |
4162 | if (rc < 0) | 4279 | return -ERESTARTSYS; |
4163 | return rc; | ||
4164 | 4280 | ||
4165 | rc = 0; | 4281 | rc = 0; |
4166 | switch (fan_control_access_mode) { | 4282 | switch (fan_control_access_mode) { |
@@ -4701,9 +4817,15 @@ static int __init set_ibm_param(const char *val, struct kernel_param *kp) | |||
4701 | unsigned int i; | 4817 | unsigned int i; |
4702 | struct ibm_struct *ibm; | 4818 | struct ibm_struct *ibm; |
4703 | 4819 | ||
4820 | if (!kp || !kp->name || !val) | ||
4821 | return -EINVAL; | ||
4822 | |||
4704 | for (i = 0; i < ARRAY_SIZE(ibms_init); i++) { | 4823 | for (i = 0; i < ARRAY_SIZE(ibms_init); i++) { |
4705 | ibm = ibms_init[i].data; | 4824 | ibm = ibms_init[i].data; |
4706 | BUG_ON(ibm == NULL); | 4825 | WARN_ON(ibm == NULL); |
4826 | |||
4827 | if (!ibm || !ibm->name) | ||
4828 | continue; | ||
4707 | 4829 | ||
4708 | if (strcmp(ibm->name, kp->name) == 0 && ibm->write) { | 4830 | if (strcmp(ibm->name, kp->name) == 0 && ibm->write) { |
4709 | if (strlen(val) > sizeof(ibms_init[i].param) - 2) | 4831 | if (strlen(val) > sizeof(ibms_init[i].param) - 2) |
@@ -4732,6 +4854,9 @@ module_param_named(fan_control, fan_control_allowed, bool, 0); | |||
4732 | static int brightness_mode; | 4854 | static int brightness_mode; |
4733 | module_param_named(brightness_mode, brightness_mode, int, 0); | 4855 | module_param_named(brightness_mode, brightness_mode, int, 0); |
4734 | 4856 | ||
4857 | static unsigned int brightness_enable = 2; /* 2 = auto, 0 = no, 1 = yes */ | ||
4858 | module_param(brightness_enable, uint, 0); | ||
4859 | |||
4735 | static unsigned int hotkey_report_mode; | 4860 | static unsigned int hotkey_report_mode; |
4736 | module_param(hotkey_report_mode, uint, 0); | 4861 | module_param(hotkey_report_mode, uint, 0); |
4737 | 4862 | ||
diff --git a/drivers/misc/thinkpad_acpi.h b/drivers/misc/thinkpad_acpi.h index 3abcc8120634..8fba2bbe345e 100644 --- a/drivers/misc/thinkpad_acpi.h +++ b/drivers/misc/thinkpad_acpi.h | |||
@@ -84,7 +84,7 @@ | |||
84 | 84 | ||
85 | /* ThinkPad CMOS NVRAM constants */ | 85 | /* ThinkPad CMOS NVRAM constants */ |
86 | #define TP_NVRAM_ADDR_BRIGHTNESS 0x5e | 86 | #define TP_NVRAM_ADDR_BRIGHTNESS 0x5e |
87 | #define TP_NVRAM_MASK_LEVEL_BRIGHTNESS 0x07 | 87 | #define TP_NVRAM_MASK_LEVEL_BRIGHTNESS 0x0f |
88 | #define TP_NVRAM_POS_LEVEL_BRIGHTNESS 0 | 88 | #define TP_NVRAM_POS_LEVEL_BRIGHTNESS 0 |
89 | 89 | ||
90 | #define onoff(status,bit) ((status) & (1 << (bit)) ? "on" : "off") | 90 | #define onoff(status,bit) ((status) & (1 << (bit)) ? "on" : "off") |
@@ -246,6 +246,7 @@ static struct { | |||
246 | u32 hotkey_wlsw:1; | 246 | u32 hotkey_wlsw:1; |
247 | u32 light:1; | 247 | u32 light:1; |
248 | u32 light_status:1; | 248 | u32 light_status:1; |
249 | u32 bright_16levels:1; | ||
249 | u32 wan:1; | 250 | u32 wan:1; |
250 | u32 fan_ctrl_status_undef:1; | 251 | u32 fan_ctrl_status_undef:1; |
251 | u32 input_device_registered:1; | 252 | u32 input_device_registered:1; |
@@ -338,6 +339,7 @@ static int bluetooth_write(char *buf); | |||
338 | static struct backlight_device *ibm_backlight_device; | 339 | static struct backlight_device *ibm_backlight_device; |
339 | static int brightness_offset = 0x31; | 340 | static int brightness_offset = 0x31; |
340 | static int brightness_mode; | 341 | static int brightness_mode; |
342 | static unsigned int brightness_enable; /* 0 = no, 1 = yes, 2 = auto */ | ||
341 | 343 | ||
342 | static int brightness_init(struct ibm_init_struct *iibm); | 344 | static int brightness_init(struct ibm_init_struct *iibm); |
343 | static void brightness_exit(void); | 345 | static void brightness_exit(void); |
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c index e38d5a3b2a89..aeb32a93f6a0 100644 --- a/drivers/mmc/card/block.c +++ b/drivers/mmc/card/block.c | |||
@@ -44,6 +44,9 @@ | |||
44 | * max 8 partitions per card | 44 | * max 8 partitions per card |
45 | */ | 45 | */ |
46 | #define MMC_SHIFT 3 | 46 | #define MMC_SHIFT 3 |
47 | #define MMC_NUM_MINORS (256 >> MMC_SHIFT) | ||
48 | |||
49 | static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))]; | ||
47 | 50 | ||
48 | /* | 51 | /* |
49 | * There is one mmc_blk_data per slot. | 52 | * There is one mmc_blk_data per slot. |
@@ -80,6 +83,9 @@ static void mmc_blk_put(struct mmc_blk_data *md) | |||
80 | mutex_lock(&open_lock); | 83 | mutex_lock(&open_lock); |
81 | md->usage--; | 84 | md->usage--; |
82 | if (md->usage == 0) { | 85 | if (md->usage == 0) { |
86 | int devidx = md->disk->first_minor >> MMC_SHIFT; | ||
87 | __clear_bit(devidx, dev_use); | ||
88 | |||
83 | put_disk(md->disk); | 89 | put_disk(md->disk); |
84 | kfree(md); | 90 | kfree(md); |
85 | } | 91 | } |
@@ -321,7 +327,13 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
321 | req->rq_disk->disk_name, err); | 327 | req->rq_disk->disk_name, err); |
322 | goto cmd_err; | 328 | goto cmd_err; |
323 | } | 329 | } |
324 | } while (!(cmd.resp[0] & R1_READY_FOR_DATA)); | 330 | /* |
331 | * Some cards mishandle the status bits, | ||
332 | * so make sure to check both the busy | ||
333 | * indication and the card state. | ||
334 | */ | ||
335 | } while (!(cmd.resp[0] & R1_READY_FOR_DATA) || | ||
336 | (R1_CURRENT_STATE(cmd.resp[0]) == 7)); | ||
325 | 337 | ||
326 | #if 0 | 338 | #if 0 |
327 | if (cmd.resp[0] & ~0x00000900) | 339 | if (cmd.resp[0] & ~0x00000900) |
@@ -400,9 +412,6 @@ static int mmc_blk_issue_rq(struct mmc_queue *mq, struct request *req) | |||
400 | return 0; | 412 | return 0; |
401 | } | 413 | } |
402 | 414 | ||
403 | #define MMC_NUM_MINORS (256 >> MMC_SHIFT) | ||
404 | |||
405 | static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))]; | ||
406 | 415 | ||
407 | static inline int mmc_blk_readonly(struct mmc_card *card) | 416 | static inline int mmc_blk_readonly(struct mmc_card *card) |
408 | { | 417 | { |
@@ -568,17 +577,12 @@ static void mmc_blk_remove(struct mmc_card *card) | |||
568 | struct mmc_blk_data *md = mmc_get_drvdata(card); | 577 | struct mmc_blk_data *md = mmc_get_drvdata(card); |
569 | 578 | ||
570 | if (md) { | 579 | if (md) { |
571 | int devidx; | ||
572 | |||
573 | /* Stop new requests from getting into the queue */ | 580 | /* Stop new requests from getting into the queue */ |
574 | del_gendisk(md->disk); | 581 | del_gendisk(md->disk); |
575 | 582 | ||
576 | /* Then flush out any already in there */ | 583 | /* Then flush out any already in there */ |
577 | mmc_cleanup_queue(&md->queue); | 584 | mmc_cleanup_queue(&md->queue); |
578 | 585 | ||
579 | devidx = md->disk->first_minor >> MMC_SHIFT; | ||
580 | __clear_bit(devidx, dev_use); | ||
581 | |||
582 | mmc_blk_put(md); | 586 | mmc_blk_put(md); |
583 | } | 587 | } |
584 | mmc_set_drvdata(card, NULL); | 588 | mmc_set_drvdata(card, NULL); |
diff --git a/drivers/mmc/host/tifm_sd.c b/drivers/mmc/host/tifm_sd.c index c11a3d256051..20d5c7bd940a 100644 --- a/drivers/mmc/host/tifm_sd.c +++ b/drivers/mmc/host/tifm_sd.c | |||
@@ -16,7 +16,6 @@ | |||
16 | #include <linux/mmc/host.h> | 16 | #include <linux/mmc/host.h> |
17 | #include <linux/highmem.h> | 17 | #include <linux/highmem.h> |
18 | #include <linux/scatterlist.h> | 18 | #include <linux/scatterlist.h> |
19 | #include <linux/log2.h> | ||
20 | #include <asm/io.h> | 19 | #include <asm/io.h> |
21 | 20 | ||
22 | #define DRIVER_NAME "tifm_sd" | 21 | #define DRIVER_NAME "tifm_sd" |
@@ -638,17 +637,15 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
638 | goto err_out; | 637 | goto err_out; |
639 | } | 638 | } |
640 | 639 | ||
641 | if (mrq->data && !is_power_of_2(mrq->data->blksz)) { | ||
642 | printk(KERN_ERR "%s: Unsupported block size (%d bytes)\n", | ||
643 | sock->dev.bus_id, mrq->data->blksz); | ||
644 | mrq->cmd->error = -EINVAL; | ||
645 | goto err_out; | ||
646 | } | ||
647 | |||
648 | host->cmd_flags = 0; | 640 | host->cmd_flags = 0; |
649 | host->block_pos = 0; | 641 | host->block_pos = 0; |
650 | host->sg_pos = 0; | 642 | host->sg_pos = 0; |
651 | 643 | ||
644 | if (mrq->data && !is_power_of_2(mrq->data->blksz)) | ||
645 | host->no_dma = 1; | ||
646 | else | ||
647 | host->no_dma = no_dma ? 1 : 0; | ||
648 | |||
652 | if (r_data) { | 649 | if (r_data) { |
653 | tifm_sd_set_data_timeout(host, r_data); | 650 | tifm_sd_set_data_timeout(host, r_data); |
654 | 651 | ||
@@ -676,7 +673,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
676 | : PCI_DMA_FROMDEVICE)) { | 673 | : PCI_DMA_FROMDEVICE)) { |
677 | printk(KERN_ERR "%s : scatterlist map failed\n", | 674 | printk(KERN_ERR "%s : scatterlist map failed\n", |
678 | sock->dev.bus_id); | 675 | sock->dev.bus_id); |
679 | spin_unlock_irqrestore(&sock->lock, flags); | 676 | mrq->cmd->error = -ENOMEM; |
680 | goto err_out; | 677 | goto err_out; |
681 | } | 678 | } |
682 | host->sg_len = tifm_map_sg(sock, r_data->sg, | 679 | host->sg_len = tifm_map_sg(sock, r_data->sg, |
@@ -692,7 +689,7 @@ static void tifm_sd_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
692 | r_data->flags & MMC_DATA_WRITE | 689 | r_data->flags & MMC_DATA_WRITE |
693 | ? PCI_DMA_TODEVICE | 690 | ? PCI_DMA_TODEVICE |
694 | : PCI_DMA_FROMDEVICE); | 691 | : PCI_DMA_FROMDEVICE); |
695 | spin_unlock_irqrestore(&sock->lock, flags); | 692 | mrq->cmd->error = -ENOMEM; |
696 | goto err_out; | 693 | goto err_out; |
697 | } | 694 | } |
698 | 695 | ||
@@ -966,7 +963,6 @@ static int tifm_sd_probe(struct tifm_dev *sock) | |||
966 | return -ENOMEM; | 963 | return -ENOMEM; |
967 | 964 | ||
968 | host = mmc_priv(mmc); | 965 | host = mmc_priv(mmc); |
969 | host->no_dma = no_dma; | ||
970 | tifm_set_drvdata(sock, mmc); | 966 | tifm_set_drvdata(sock, mmc); |
971 | host->dev = sock; | 967 | host->dev = sock; |
972 | host->timeout_jiffies = msecs_to_jiffies(1000); | 968 | host->timeout_jiffies = msecs_to_jiffies(1000); |
diff --git a/drivers/net/bfin_mac.c b/drivers/net/bfin_mac.c index 084acfd6fc5f..0b99b5549295 100644 --- a/drivers/net/bfin_mac.c +++ b/drivers/net/bfin_mac.c | |||
@@ -924,7 +924,7 @@ static int __init bf537mac_probe(struct net_device *dev) | |||
924 | if (!is_valid_ether_addr(dev->dev_addr)) { | 924 | if (!is_valid_ether_addr(dev->dev_addr)) { |
925 | /* Grab the MAC from the board somehow - this is done in the | 925 | /* Grab the MAC from the board somehow - this is done in the |
926 | arch/blackfin/mach-bf537/boards/eth_mac.c */ | 926 | arch/blackfin/mach-bf537/boards/eth_mac.c */ |
927 | get_bf537_ether_addr(dev->dev_addr); | 927 | bfin_get_ether_addr(dev->dev_addr); |
928 | } | 928 | } |
929 | 929 | ||
930 | /* If still not valid, get a random one */ | 930 | /* If still not valid, get a random one */ |
diff --git a/drivers/net/bfin_mac.h b/drivers/net/bfin_mac.h index 3a107ad75381..5970ea7142cd 100644 --- a/drivers/net/bfin_mac.h +++ b/drivers/net/bfin_mac.h | |||
@@ -92,4 +92,4 @@ struct bf537mac_local { | |||
92 | struct mii_bus mii_bus; | 92 | struct mii_bus mii_bus; |
93 | }; | 93 | }; |
94 | 94 | ||
95 | extern void get_bf537_ether_addr(char *addr); | 95 | extern void bfin_get_ether_addr(char *addr); |
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index 5071fcd8a0bd..57c98669984d 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -663,7 +663,7 @@ plip_receive_packet(struct net_device *dev, struct net_local *nl, | |||
663 | case PLIP_PK_DONE: | 663 | case PLIP_PK_DONE: |
664 | /* Inform the upper layer for the arrival of a packet. */ | 664 | /* Inform the upper layer for the arrival of a packet. */ |
665 | rcv->skb->protocol=plip_type_trans(rcv->skb, dev); | 665 | rcv->skb->protocol=plip_type_trans(rcv->skb, dev); |
666 | netif_rx(rcv->skb); | 666 | netif_rx_ni(rcv->skb); |
667 | dev->last_rx = jiffies; | 667 | dev->last_rx = jiffies; |
668 | dev->stats.rx_bytes += rcv->length.h; | 668 | dev->stats.rx_bytes += rcv->length.h; |
669 | dev->stats.rx_packets++; | 669 | dev->stats.rx_packets++; |
@@ -1269,7 +1269,7 @@ static void plip_attach (struct parport *port) | |||
1269 | 1269 | ||
1270 | nl = netdev_priv(dev); | 1270 | nl = netdev_priv(dev); |
1271 | nl->dev = dev; | 1271 | nl->dev = dev; |
1272 | nl->pardev = parport_register_device(port, name, plip_preempt, | 1272 | nl->pardev = parport_register_device(port, dev->name, plip_preempt, |
1273 | plip_wakeup, plip_interrupt, | 1273 | plip_wakeup, plip_interrupt, |
1274 | 0, dev); | 1274 | 0, dev); |
1275 | 1275 | ||
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a75be57fb209..5413dbf3d4ac 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c | |||
@@ -198,8 +198,8 @@ again: | |||
198 | if (vi->num < vi->max / 2) | 198 | if (vi->num < vi->max / 2) |
199 | try_fill_recv(vi); | 199 | try_fill_recv(vi); |
200 | 200 | ||
201 | /* All done? */ | 201 | /* Out of packets? */ |
202 | if (!skb) { | 202 | if (received < budget) { |
203 | netif_rx_complete(vi->dev, napi); | 203 | netif_rx_complete(vi->dev, napi); |
204 | if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq)) | 204 | if (unlikely(!vi->rvq->vq_ops->restart(vi->rvq)) |
205 | && netif_rx_reschedule(vi->dev, napi)) | 205 | && netif_rx_reschedule(vi->dev, napi)) |
@@ -404,8 +404,12 @@ free: | |||
404 | 404 | ||
405 | static void virtnet_remove(struct virtio_device *vdev) | 405 | static void virtnet_remove(struct virtio_device *vdev) |
406 | { | 406 | { |
407 | unregister_netdev(vdev->priv); | 407 | struct virtnet_info *vi = vdev->priv; |
408 | free_netdev(vdev->priv); | 408 | |
409 | vdev->config->del_vq(vi->svq); | ||
410 | vdev->config->del_vq(vi->rvq); | ||
411 | unregister_netdev(vi->dev); | ||
412 | free_netdev(vi->dev); | ||
409 | } | 413 | } |
410 | 414 | ||
411 | static struct virtio_device_id id_table[] = { | 415 | static struct virtio_device_id id_table[] = { |
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c index cd0a204d96d1..11adab13f2b7 100644 --- a/drivers/pnp/pnpacpi/rsparser.c +++ b/drivers/pnp/pnpacpi/rsparser.c | |||
@@ -75,6 +75,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, | |||
75 | { | 75 | { |
76 | int i = 0; | 76 | int i = 0; |
77 | int irq; | 77 | int irq; |
78 | int p, t; | ||
78 | 79 | ||
79 | if (!valid_IRQ(gsi)) | 80 | if (!valid_IRQ(gsi)) |
80 | return; | 81 | return; |
@@ -85,15 +86,22 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res, | |||
85 | if (i >= PNP_MAX_IRQ) | 86 | if (i >= PNP_MAX_IRQ) |
86 | return; | 87 | return; |
87 | 88 | ||
88 | #ifdef CONFIG_X86 | 89 | /* |
89 | if (gsi < 16 && (triggering != ACPI_EDGE_SENSITIVE || | 90 | * in IO-APIC mode, use overrided attribute. Two reasons: |
90 | polarity != ACPI_ACTIVE_HIGH)) { | 91 | * 1. BIOS bug in DSDT |
91 | pnp_warn("BIOS BUG: legacy PNP IRQ %d should be edge trigger, " | 92 | * 2. BIOS uses IO-APIC mode Interrupt Source Override |
92 | "active high", gsi); | 93 | */ |
93 | triggering = ACPI_EDGE_SENSITIVE; | 94 | if (!acpi_get_override_irq(gsi, &t, &p)) { |
94 | polarity = ACPI_ACTIVE_HIGH; | 95 | t = t ? ACPI_LEVEL_SENSITIVE : ACPI_EDGE_SENSITIVE; |
96 | p = p ? ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH; | ||
97 | |||
98 | if (triggering != t || polarity != p) { | ||
99 | pnp_warn("IRQ %d override to %s, %s", | ||
100 | gsi, t ? "edge":"level", p ? "low":"high"); | ||
101 | triggering = t; | ||
102 | polarity = p; | ||
103 | } | ||
95 | } | 104 | } |
96 | #endif | ||
97 | 105 | ||
98 | res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag | 106 | res->irq_resource[i].flags = IORESOURCE_IRQ; // Also clears _UNSET flag |
99 | res->irq_resource[i].flags |= irq_flags(triggering, polarity); | 107 | res->irq_resource[i].flags |= irq_flags(triggering, polarity); |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index e5cdc0294aaa..1e6715ec51ef 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -447,7 +447,7 @@ config RTC_DRV_AT91RM9200 | |||
447 | 447 | ||
448 | config RTC_DRV_BFIN | 448 | config RTC_DRV_BFIN |
449 | tristate "Blackfin On-Chip RTC" | 449 | tristate "Blackfin On-Chip RTC" |
450 | depends on BFIN | 450 | depends on BLACKFIN |
451 | help | 451 | help |
452 | If you say yes here you will get support for the | 452 | If you say yes here you will get support for the |
453 | Blackfin On-Chip Real Time Clock. | 453 | Blackfin On-Chip Real Time Clock. |
diff --git a/drivers/s390/cio/css.c b/drivers/s390/cio/css.c index 838f7ac0dc32..6db31089d2d7 100644 --- a/drivers/s390/cio/css.c +++ b/drivers/s390/cio/css.c | |||
@@ -483,7 +483,7 @@ static DECLARE_WORK(css_reprobe_work, reprobe_all); | |||
483 | void css_schedule_reprobe(void) | 483 | void css_schedule_reprobe(void) |
484 | { | 484 | { |
485 | need_reprobe = 1; | 485 | need_reprobe = 1; |
486 | queue_work(ccw_device_work, &css_reprobe_work); | 486 | queue_work(slow_path_wq, &css_reprobe_work); |
487 | } | 487 | } |
488 | 488 | ||
489 | EXPORT_SYMBOL_GPL(css_schedule_reprobe); | 489 | EXPORT_SYMBOL_GPL(css_schedule_reprobe); |
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index 8867443b8060..bfad421cda66 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c | |||
@@ -1034,7 +1034,7 @@ device_trigger_reprobe(struct subchannel *sch) | |||
1034 | if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { | 1034 | if (sch->schib.pmcw.dev != cdev->private->dev_id.devno) { |
1035 | PREPARE_WORK(&cdev->private->kick_work, | 1035 | PREPARE_WORK(&cdev->private->kick_work, |
1036 | ccw_device_move_to_orphanage); | 1036 | ccw_device_move_to_orphanage); |
1037 | queue_work(ccw_device_work, &cdev->private->kick_work); | 1037 | queue_work(slow_path_wq, &cdev->private->kick_work); |
1038 | } else | 1038 | } else |
1039 | ccw_device_start_id(cdev, 0); | 1039 | ccw_device_start_id(cdev, 0); |
1040 | } | 1040 | } |
diff --git a/drivers/s390/cio/device_id.c b/drivers/s390/cio/device_id.c index f232832f2b22..2f6bf462425e 100644 --- a/drivers/s390/cio/device_id.c +++ b/drivers/s390/cio/device_id.c | |||
@@ -113,19 +113,10 @@ __ccw_device_sense_id_start(struct ccw_device *cdev) | |||
113 | { | 113 | { |
114 | struct subchannel *sch; | 114 | struct subchannel *sch; |
115 | struct ccw1 *ccw; | 115 | struct ccw1 *ccw; |
116 | int ret; | ||
117 | 116 | ||
118 | sch = to_subchannel(cdev->dev.parent); | 117 | sch = to_subchannel(cdev->dev.parent); |
119 | /* Setup sense channel program. */ | 118 | /* Setup sense channel program. */ |
120 | ccw = cdev->private->iccws; | 119 | ccw = cdev->private->iccws; |
121 | if (sch->schib.pmcw.pim != 0x80) { | ||
122 | /* more than one path installed. */ | ||
123 | ccw->cmd_code = CCW_CMD_SUSPEND_RECONN; | ||
124 | ccw->cda = 0; | ||
125 | ccw->count = 0; | ||
126 | ccw->flags = CCW_FLAG_SLI | CCW_FLAG_CC; | ||
127 | ccw++; | ||
128 | } | ||
129 | ccw->cmd_code = CCW_CMD_SENSE_ID; | 120 | ccw->cmd_code = CCW_CMD_SENSE_ID; |
130 | ccw->cda = (__u32) __pa (&cdev->private->senseid); | 121 | ccw->cda = (__u32) __pa (&cdev->private->senseid); |
131 | ccw->count = sizeof (struct senseid); | 122 | ccw->count = sizeof (struct senseid); |
@@ -133,25 +124,9 @@ __ccw_device_sense_id_start(struct ccw_device *cdev) | |||
133 | 124 | ||
134 | /* Reset device status. */ | 125 | /* Reset device status. */ |
135 | memset(&cdev->private->irb, 0, sizeof(struct irb)); | 126 | memset(&cdev->private->irb, 0, sizeof(struct irb)); |
127 | cdev->private->flags.intretry = 0; | ||
136 | 128 | ||
137 | /* Try on every path. */ | 129 | return cio_start(sch, ccw, LPM_ANYPATH); |
138 | ret = -ENODEV; | ||
139 | while (cdev->private->imask != 0) { | ||
140 | if ((sch->opm & cdev->private->imask) != 0 && | ||
141 | cdev->private->iretry > 0) { | ||
142 | cdev->private->iretry--; | ||
143 | /* Reset internal retry indication. */ | ||
144 | cdev->private->flags.intretry = 0; | ||
145 | ret = cio_start (sch, cdev->private->iccws, | ||
146 | cdev->private->imask); | ||
147 | /* ret is 0, -EBUSY, -EACCES or -ENODEV */ | ||
148 | if (ret != -EACCES) | ||
149 | return ret; | ||
150 | } | ||
151 | cdev->private->imask >>= 1; | ||
152 | cdev->private->iretry = 5; | ||
153 | } | ||
154 | return ret; | ||
155 | } | 130 | } |
156 | 131 | ||
157 | void | 132 | void |
@@ -161,8 +136,7 @@ ccw_device_sense_id_start(struct ccw_device *cdev) | |||
161 | 136 | ||
162 | memset (&cdev->private->senseid, 0, sizeof (struct senseid)); | 137 | memset (&cdev->private->senseid, 0, sizeof (struct senseid)); |
163 | cdev->private->senseid.cu_type = 0xFFFF; | 138 | cdev->private->senseid.cu_type = 0xFFFF; |
164 | cdev->private->imask = 0x80; | 139 | cdev->private->iretry = 3; |
165 | cdev->private->iretry = 5; | ||
166 | ret = __ccw_device_sense_id_start(cdev); | 140 | ret = __ccw_device_sense_id_start(cdev); |
167 | if (ret && ret != -EBUSY) | 141 | if (ret && ret != -EBUSY) |
168 | ccw_device_sense_id_done(cdev, ret); | 142 | ccw_device_sense_id_done(cdev, ret); |
@@ -278,14 +252,13 @@ ccw_device_sense_id_irq(struct ccw_device *cdev, enum dev_event dev_event) | |||
278 | ccw_device_sense_id_done(cdev, ret); | 252 | ccw_device_sense_id_done(cdev, ret); |
279 | break; | 253 | break; |
280 | case -EACCES: /* channel is not operational. */ | 254 | case -EACCES: /* channel is not operational. */ |
281 | sch->lpm &= ~cdev->private->imask; | ||
282 | cdev->private->imask >>= 1; | ||
283 | cdev->private->iretry = 5; | ||
284 | /* fall through. */ | ||
285 | case -EAGAIN: /* try again. */ | 255 | case -EAGAIN: /* try again. */ |
286 | ret = __ccw_device_sense_id_start(cdev); | 256 | cdev->private->iretry--; |
287 | if (ret == 0 || ret == -EBUSY) | 257 | if (cdev->private->iretry > 0) { |
288 | break; | 258 | ret = __ccw_device_sense_id_start(cdev); |
259 | if (ret == 0 || ret == -EBUSY) | ||
260 | break; | ||
261 | } | ||
289 | /* fall through. */ | 262 | /* fall through. */ |
290 | default: /* Sense ID failed. Try asking VM. */ | 263 | default: /* Sense ID failed. Try asking VM. */ |
291 | if (MACHINE_IS_VM) { | 264 | if (MACHINE_IS_VM) { |
diff --git a/drivers/serial/Kconfig b/drivers/serial/Kconfig index ed438bc7e98d..d7e1996e2fec 100644 --- a/drivers/serial/Kconfig +++ b/drivers/serial/Kconfig | |||
@@ -600,7 +600,7 @@ config SERIAL_SA1100_CONSOLE | |||
600 | 600 | ||
601 | config SERIAL_BFIN | 601 | config SERIAL_BFIN |
602 | tristate "Blackfin serial port support" | 602 | tristate "Blackfin serial port support" |
603 | depends on BFIN | 603 | depends on BLACKFIN |
604 | select SERIAL_CORE | 604 | select SERIAL_CORE |
605 | select SERIAL_BFIN_UART0 if (BF531 || BF532 || BF533 || BF561) | 605 | select SERIAL_BFIN_UART0 if (BF531 || BF532 || BF533 || BF561) |
606 | help | 606 | help |
diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig index a77ede598d34..abf05048c638 100644 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig | |||
@@ -61,7 +61,7 @@ config SPI_ATMEL | |||
61 | 61 | ||
62 | config SPI_BFIN | 62 | config SPI_BFIN |
63 | tristate "SPI controller driver for ADI Blackfin5xx" | 63 | tristate "SPI controller driver for ADI Blackfin5xx" |
64 | depends on SPI_MASTER && BFIN | 64 | depends on SPI_MASTER && BLACKFIN |
65 | help | 65 | help |
66 | This is the SPI controller master driver for Blackfin 5xx processor. | 66 | This is the SPI controller master driver for Blackfin 5xx processor. |
67 | 67 | ||
diff --git a/drivers/video/aty/radeon_base.c b/drivers/video/aty/radeon_base.c index 1e32b3d13f2e..62867cb63fef 100644 --- a/drivers/video/aty/radeon_base.c +++ b/drivers/video/aty/radeon_base.c | |||
@@ -202,6 +202,7 @@ static struct pci_device_id radeonfb_pci_table[] = { | |||
202 | CHIP_DEF(PCI_CHIP_RV380_3154, RV380, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), | 202 | CHIP_DEF(PCI_CHIP_RV380_3154, RV380, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), |
203 | CHIP_DEF(PCI_CHIP_RV370_5B60, RV380, CHIP_HAS_CRTC2), | 203 | CHIP_DEF(PCI_CHIP_RV370_5B60, RV380, CHIP_HAS_CRTC2), |
204 | CHIP_DEF(PCI_CHIP_RV370_5B62, RV380, CHIP_HAS_CRTC2), | 204 | CHIP_DEF(PCI_CHIP_RV370_5B62, RV380, CHIP_HAS_CRTC2), |
205 | CHIP_DEF(PCI_CHIP_RV370_5B63, RV380, CHIP_HAS_CRTC2), | ||
205 | CHIP_DEF(PCI_CHIP_RV370_5B64, RV380, CHIP_HAS_CRTC2), | 206 | CHIP_DEF(PCI_CHIP_RV370_5B64, RV380, CHIP_HAS_CRTC2), |
206 | CHIP_DEF(PCI_CHIP_RV370_5B65, RV380, CHIP_HAS_CRTC2), | 207 | CHIP_DEF(PCI_CHIP_RV370_5B65, RV380, CHIP_HAS_CRTC2), |
207 | CHIP_DEF(PCI_CHIP_RV370_5460, RV380, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), | 208 | CHIP_DEF(PCI_CHIP_RV370_5460, RV380, CHIP_HAS_CRTC2 | CHIP_IS_MOBILITY), |
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 267422f66255..b87ed37ac0c1 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig | |||
@@ -6,7 +6,7 @@ menu "Console display driver support" | |||
6 | 6 | ||
7 | config VGA_CONSOLE | 7 | config VGA_CONSOLE |
8 | bool "VGA text console" if EMBEDDED || !X86 | 8 | bool "VGA text console" if EMBEDDED || !X86 |
9 | depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH && !BFIN | 9 | depends on !ARCH_ACORN && !ARCH_EBSA110 && !4xx && !8xx && !SPARC && !M68K && !PARISC && !FRV && !ARCH_VERSATILE && !SUPERH && !BLACKFIN |
10 | default y | 10 | default y |
11 | help | 11 | help |
12 | Saying Y here will allow you to use Linux in text mode through a | 12 | Saying Y here will allow you to use Linux in text mode through a |
diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index 15d7787dea87..69d7ea02cd48 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c | |||
@@ -96,10 +96,23 @@ static int virtio_dev_probe(struct device *_d) | |||
96 | return err; | 96 | return err; |
97 | } | 97 | } |
98 | 98 | ||
99 | static int virtio_dev_remove(struct device *_d) | ||
100 | { | ||
101 | struct virtio_device *dev = container_of(_d,struct virtio_device,dev); | ||
102 | struct virtio_driver *drv = container_of(dev->dev.driver, | ||
103 | struct virtio_driver, driver); | ||
104 | |||
105 | dev->config->set_status(dev, dev->config->get_status(dev) | ||
106 | & ~VIRTIO_CONFIG_S_DRIVER); | ||
107 | drv->remove(dev); | ||
108 | return 0; | ||
109 | } | ||
110 | |||
99 | int register_virtio_driver(struct virtio_driver *driver) | 111 | int register_virtio_driver(struct virtio_driver *driver) |
100 | { | 112 | { |
101 | driver->driver.bus = &virtio_bus; | 113 | driver->driver.bus = &virtio_bus; |
102 | driver->driver.probe = virtio_dev_probe; | 114 | driver->driver.probe = virtio_dev_probe; |
115 | driver->driver.remove = virtio_dev_remove; | ||
103 | return driver_register(&driver->driver); | 116 | return driver_register(&driver->driver); |
104 | } | 117 | } |
105 | EXPORT_SYMBOL_GPL(register_virtio_driver); | 118 | EXPORT_SYMBOL_GPL(register_virtio_driver); |
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index 067c07be928c..e6c4390d8bd6 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c | |||
@@ -60,6 +60,20 @@ static int zorro_device_probe(struct device *dev) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | static int zorro_device_remove(struct device *dev) | ||
64 | { | ||
65 | struct zorro_dev *z = to_zorro_dev(dev); | ||
66 | struct zorro_driver *drv = to_zorro_driver(dev->driver); | ||
67 | |||
68 | if (drv) { | ||
69 | if (drv->remove) | ||
70 | drv->remove(z); | ||
71 | z->driver = NULL; | ||
72 | } | ||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | |||
63 | /** | 77 | /** |
64 | * zorro_register_driver - register a new Zorro driver | 78 | * zorro_register_driver - register a new Zorro driver |
65 | * @drv: the driver structure to register | 79 | * @drv: the driver structure to register |
@@ -128,6 +142,7 @@ struct bus_type zorro_bus_type = { | |||
128 | .name = "zorro", | 142 | .name = "zorro", |
129 | .match = zorro_bus_match, | 143 | .match = zorro_bus_match, |
130 | .probe = zorro_device_probe, | 144 | .probe = zorro_device_probe, |
145 | .remove = zorro_device_remove, | ||
131 | }; | 146 | }; |
132 | 147 | ||
133 | 148 | ||
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index 64dd22239b21..a609599287aa 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -1,6 +1,9 @@ | |||
1 | Version 1.52 | 1 | Version 1.52 |
2 | ------------ | 2 | ------------ |
3 | Fix oops on second mount to server when null auth is used. | 3 | Fix oops on second mount to server when null auth is used. |
4 | Enable experimental Kerberos support. Return writebehind errors on flush | ||
5 | and sync so that events like out of disk space get reported properly on | ||
6 | cached files. | ||
4 | 7 | ||
5 | Version 1.51 | 8 | Version 1.51 |
6 | ------------ | 9 | ------------ |
diff --git a/fs/cifs/README b/fs/cifs/README index b806b11b5560..bf11329ac784 100644 --- a/fs/cifs/README +++ b/fs/cifs/README | |||
@@ -225,12 +225,9 @@ If no password is provided, mount.cifs will prompt for password entry | |||
225 | 225 | ||
226 | Restrictions | 226 | Restrictions |
227 | ============ | 227 | ============ |
228 | Servers must support the NTLM SMB dialect (which is the most recent, supported | ||
229 | by Samba and Windows NT version 4, 2000 and XP and many other SMB/CIFS servers) | ||
230 | Servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC | 228 | Servers must support either "pure-TCP" (port 445 TCP/IP CIFS connections) or RFC |
231 | 1001/1002 support for "Netbios-Over-TCP/IP." Neither of these is likely to be a | 229 | 1001/1002 support for "Netbios-Over-TCP/IP." This is not likely to be a |
232 | problem as most servers support this. IPv6 support is planned for the future, | 230 | problem as most servers support this. |
233 | and is almost complete. | ||
234 | 231 | ||
235 | Valid filenames differ between Windows and Linux. Windows typically restricts | 232 | Valid filenames differ between Windows and Linux. Windows typically restricts |
236 | filenames which contain certain reserved characters (e.g.the character : | 233 | filenames which contain certain reserved characters (e.g.the character : |
@@ -458,6 +455,8 @@ A partial list of the supported mount options follows: | |||
458 | byte range locks). | 455 | byte range locks). |
459 | remount remount the share (often used to change from ro to rw mounts | 456 | remount remount the share (often used to change from ro to rw mounts |
460 | or vice versa) | 457 | or vice versa) |
458 | cifsacl Report mode bits (e.g. on stat) based on the Windows ACL for | ||
459 | the file. (EXPERIMENTAL) | ||
461 | servern Specify the server 's netbios name (RFC1001 name) to use | 460 | servern Specify the server 's netbios name (RFC1001 name) to use |
462 | when attempting to setup a session to the server. This is | 461 | when attempting to setup a session to the server. This is |
463 | This is needed for mounting to some older servers (such | 462 | This is needed for mounting to some older servers (such |
@@ -584,8 +583,8 @@ Experimental When set to 1 used to enable certain experimental | |||
584 | performance enhancement was disabled when | 583 | performance enhancement was disabled when |
585 | signing turned on in case buffer was modified | 584 | signing turned on in case buffer was modified |
586 | just before it was sent, also this flag will | 585 | just before it was sent, also this flag will |
587 | be used to use the new experimental sessionsetup | 586 | be used to use the new experimental directory change |
588 | code). | 587 | notification code). |
589 | 588 | ||
590 | These experimental features and tracing can be enabled by changing flags in | 589 | These experimental features and tracing can be enabled by changing flags in |
591 | /proc/fs/cifs (after the cifs module has been installed or built into the | 590 | /proc/fs/cifs (after the cifs module has been installed or built into the |
@@ -608,7 +607,8 @@ the start of smb requests and responses can be enabled via: | |||
608 | Two other experimental features are under development. To test these | 607 | Two other experimental features are under development. To test these |
609 | requires enabling CONFIG_CIFS_EXPERIMENTAL | 608 | requires enabling CONFIG_CIFS_EXPERIMENTAL |
610 | 609 | ||
611 | ipv6 enablement | 610 | cifsacl support needed to retrieve approximated mode bits based on |
611 | the contents on the CIFS ACL. | ||
612 | 612 | ||
613 | DNOTIFY fcntl: needed for support of directory change | 613 | DNOTIFY fcntl: needed for support of directory change |
614 | notification and perhaps later for file leases) | 614 | notification and perhaps later for file leases) |
@@ -625,10 +625,7 @@ that they represent all for that share, not just those for which the server | |||
625 | returned success. | 625 | returned success. |
626 | 626 | ||
627 | Also note that "cat /proc/fs/cifs/DebugData" will display information about | 627 | Also note that "cat /proc/fs/cifs/DebugData" will display information about |
628 | the active sessions and the shares that are mounted. Note: NTLMv2 enablement | 628 | the active sessions and the shares that are mounted. |
629 | will not work since its implementation is not quite complete yet. Do not alter | 629 | Enabling Kerberos (extended security) works when CONFIG_CIFS_EXPERIMENTAL is enabled |
630 | the ExtendedSecurity configuration value unless you are doing specific testing. | 630 | but requires a user space helper (from the Samba project). NTLM and NTLMv2 and |
631 | Enabling extended security works to Windows 2000 Workstations and XP but not to | 631 | LANMAN support do not require this helpr. |
632 | Windows 2000 server or Samba since it does not usually send "raw NTLMSSP" | ||
633 | (instead it sends NTLMSSP encapsulated in SPNEGO/GSSAPI, which support is not | ||
634 | complete in the CIFS VFS yet). | ||
diff --git a/fs/cifs/TODO b/fs/cifs/TODO index 29d4b2715254..a8852c200728 100644 --- a/fs/cifs/TODO +++ b/fs/cifs/TODO | |||
@@ -16,7 +16,7 @@ SecurityDescriptors | |||
16 | c) Better pam/winbind integration (e.g. to handle uid mapping | 16 | c) Better pam/winbind integration (e.g. to handle uid mapping |
17 | better) | 17 | better) |
18 | 18 | ||
19 | d) Kerberos/SPNEGO session setup support - (started) | 19 | d) Verify that Kerberos signing works |
20 | 20 | ||
21 | e) Cleanup now unneeded SessSetup code in | 21 | e) Cleanup now unneeded SessSetup code in |
22 | fs/cifs/connect.c and add back in NTLMSSP code if any servers | 22 | fs/cifs/connect.c and add back in NTLMSSP code if any servers |
diff --git a/fs/cifs/cifs_spnego.c b/fs/cifs/cifs_spnego.c index ad54a3a6e434..1529d2b12e9c 100644 --- a/fs/cifs/cifs_spnego.c +++ b/fs/cifs/cifs_spnego.c | |||
@@ -66,20 +66,26 @@ struct key_type cifs_spnego_key_type = { | |||
66 | .describe = user_describe, | 66 | .describe = user_describe, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | #define MAX_VER_STR_LEN 9 /* length of longest version string e.g. | ||
70 | strlen(";ver=0xFF") */ | ||
71 | #define MAX_MECH_STR_LEN 13 /* length of longest security mechanism name, eg | ||
72 | in future could have strlen(";sec=ntlmsspi") */ | ||
73 | #define MAX_IPV6_ADDR_LEN 42 /* eg FEDC:BA98:7654:3210:FEDC:BA98:7654:3210/60 */ | ||
69 | /* get a key struct with a SPNEGO security blob, suitable for session setup */ | 74 | /* get a key struct with a SPNEGO security blob, suitable for session setup */ |
70 | struct key * | 75 | struct key * |
71 | cifs_get_spnego_key(struct cifsSesInfo *sesInfo, const char *hostname) | 76 | cifs_get_spnego_key(struct cifsSesInfo *sesInfo) |
72 | { | 77 | { |
73 | struct TCP_Server_Info *server = sesInfo->server; | 78 | struct TCP_Server_Info *server = sesInfo->server; |
74 | char *description, *dp; | 79 | char *description, *dp; |
75 | size_t desc_len; | 80 | size_t desc_len; |
76 | struct key *spnego_key; | 81 | struct key *spnego_key; |
82 | const char *hostname = server->hostname; | ||
77 | 83 | ||
78 | 84 | /* BB: come up with better scheme for determining length */ | |
79 | /* version + ;ip{4|6}= + address + ;host=hostname + | 85 | /* length of fields (with semicolons): ver=0xyz ipv4= ipaddress host= |
80 | ;sec= + ;uid= + NULL */ | 86 | hostname sec=mechanism uid=0x uid */ |
81 | desc_len = 4 + 5 + 32 + 1 + 5 + strlen(hostname) + | 87 | desc_len = MAX_VER_STR_LEN + 5 + MAX_IPV6_ADDR_LEN + 1 + 6 + |
82 | strlen(";sec=krb5") + 7 + sizeof(uid_t)*2 + 1; | 88 | strlen(hostname) + MAX_MECH_STR_LEN + 8 + (sizeof(uid_t) * 2); |
83 | spnego_key = ERR_PTR(-ENOMEM); | 89 | spnego_key = ERR_PTR(-ENOMEM); |
84 | description = kzalloc(desc_len, GFP_KERNEL); | 90 | description = kzalloc(desc_len, GFP_KERNEL); |
85 | if (description == NULL) | 91 | if (description == NULL) |
@@ -88,7 +94,7 @@ cifs_get_spnego_key(struct cifsSesInfo *sesInfo, const char *hostname) | |||
88 | dp = description; | 94 | dp = description; |
89 | /* start with version and hostname portion of UNC string */ | 95 | /* start with version and hostname portion of UNC string */ |
90 | spnego_key = ERR_PTR(-EINVAL); | 96 | spnego_key = ERR_PTR(-EINVAL); |
91 | sprintf(dp, "0x%2.2x;host=%s;", CIFS_SPNEGO_UPCALL_VERSION, | 97 | sprintf(dp, "ver=0x%x;host=%s;", CIFS_SPNEGO_UPCALL_VERSION, |
92 | hostname); | 98 | hostname); |
93 | dp = description + strlen(description); | 99 | dp = description + strlen(description); |
94 | 100 | ||
diff --git a/fs/cifs/cifs_spnego.h b/fs/cifs/cifs_spnego.h index f443f3b35134..05a34b17a1ab 100644 --- a/fs/cifs/cifs_spnego.h +++ b/fs/cifs/cifs_spnego.h | |||
@@ -41,6 +41,7 @@ struct cifs_spnego_msg { | |||
41 | 41 | ||
42 | #ifdef __KERNEL__ | 42 | #ifdef __KERNEL__ |
43 | extern struct key_type cifs_spnego_key_type; | 43 | extern struct key_type cifs_spnego_key_type; |
44 | extern struct key *cifs_get_spnego_key(struct cifsSesInfo *sesInfo); | ||
44 | #endif /* KERNEL */ | 45 | #endif /* KERNEL */ |
45 | 46 | ||
46 | #endif /* _CIFS_SPNEGO_H */ | 47 | #endif /* _CIFS_SPNEGO_H */ |
diff --git a/fs/cifs/cifsacl.c b/fs/cifs/cifsacl.c index dabbce00712b..f02fdef463a7 100644 --- a/fs/cifs/cifsacl.c +++ b/fs/cifs/cifsacl.c | |||
@@ -269,6 +269,13 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl, | |||
269 | 269 | ||
270 | /* BB need to add parm so we can store the SID BB */ | 270 | /* BB need to add parm so we can store the SID BB */ |
271 | 271 | ||
272 | if (!pdacl) { | ||
273 | /* no DACL in the security descriptor, set | ||
274 | all the permissions for user/group/other */ | ||
275 | inode->i_mode |= S_IRWXUGO; | ||
276 | return; | ||
277 | } | ||
278 | |||
272 | /* validate that we do not go past end of acl */ | 279 | /* validate that we do not go past end of acl */ |
273 | if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) { | 280 | if (end_of_acl < (char *)pdacl + le16_to_cpu(pdacl->size)) { |
274 | cERROR(1, ("ACL too small to parse DACL")); | 281 | cERROR(1, ("ACL too small to parse DACL")); |
@@ -286,12 +293,6 @@ static void parse_dacl(struct cifs_acl *pdacl, char *end_of_acl, | |||
286 | user/group/other have no permissions */ | 293 | user/group/other have no permissions */ |
287 | inode->i_mode &= ~(S_IRWXUGO); | 294 | inode->i_mode &= ~(S_IRWXUGO); |
288 | 295 | ||
289 | if (!pdacl) { | ||
290 | /* no DACL in the security descriptor, set | ||
291 | all the permissions for user/group/other */ | ||
292 | inode->i_mode |= S_IRWXUGO; | ||
293 | return; | ||
294 | } | ||
295 | acl_base = (char *)pdacl; | 296 | acl_base = (char *)pdacl; |
296 | acl_size = sizeof(struct cifs_acl); | 297 | acl_size = sizeof(struct cifs_acl); |
297 | 298 | ||
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 416dc9fe8961..093beaa3900d 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -266,6 +266,7 @@ cifs_alloc_inode(struct super_block *sb) | |||
266 | cifs_inode->cifsAttrs = 0x20; /* default */ | 266 | cifs_inode->cifsAttrs = 0x20; /* default */ |
267 | atomic_set(&cifs_inode->inUse, 0); | 267 | atomic_set(&cifs_inode->inUse, 0); |
268 | cifs_inode->time = 0; | 268 | cifs_inode->time = 0; |
269 | cifs_inode->write_behind_rc = 0; | ||
269 | /* Until the file is open and we have gotten oplock | 270 | /* Until the file is open and we have gotten oplock |
270 | info back from the server, can not assume caching of | 271 | info back from the server, can not assume caching of |
271 | file data or metadata */ | 272 | file data or metadata */ |
@@ -852,7 +853,7 @@ static int cifs_oplock_thread(void *dummyarg) | |||
852 | struct cifsTconInfo *pTcon; | 853 | struct cifsTconInfo *pTcon; |
853 | struct inode *inode; | 854 | struct inode *inode; |
854 | __u16 netfid; | 855 | __u16 netfid; |
855 | int rc; | 856 | int rc, waitrc = 0; |
856 | 857 | ||
857 | set_freezable(); | 858 | set_freezable(); |
858 | do { | 859 | do { |
@@ -884,9 +885,11 @@ static int cifs_oplock_thread(void *dummyarg) | |||
884 | filemap_fdatawrite(inode->i_mapping); | 885 | filemap_fdatawrite(inode->i_mapping); |
885 | if (CIFS_I(inode)->clientCanCacheRead | 886 | if (CIFS_I(inode)->clientCanCacheRead |
886 | == 0) { | 887 | == 0) { |
887 | filemap_fdatawait(inode->i_mapping); | 888 | waitrc = filemap_fdatawait(inode->i_mapping); |
888 | invalidate_remote_inode(inode); | 889 | invalidate_remote_inode(inode); |
889 | } | 890 | } |
891 | if (rc == 0) | ||
892 | rc = waitrc; | ||
890 | } else | 893 | } else |
891 | rc = 0; | 894 | rc = 0; |
892 | /* mutex_unlock(&inode->i_mutex);*/ | 895 | /* mutex_unlock(&inode->i_mutex);*/ |
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h index 87f51f23276f..1fde2197ad76 100644 --- a/fs/cifs/cifsglob.h +++ b/fs/cifs/cifsglob.h | |||
@@ -110,6 +110,7 @@ struct mac_key { | |||
110 | unsigned int len; | 110 | unsigned int len; |
111 | union { | 111 | union { |
112 | char ntlm[CIFS_SESS_KEY_SIZE + 16]; | 112 | char ntlm[CIFS_SESS_KEY_SIZE + 16]; |
113 | char krb5[CIFS_SESS_KEY_SIZE + 16]; /* BB: length correct? */ | ||
113 | struct { | 114 | struct { |
114 | char key[16]; | 115 | char key[16]; |
115 | struct ntlmv2_resp resp; | 116 | struct ntlmv2_resp resp; |
@@ -139,6 +140,7 @@ struct TCP_Server_Info { | |||
139 | /* 15 character server name + 0x20 16th byte indicating type = srv */ | 140 | /* 15 character server name + 0x20 16th byte indicating type = srv */ |
140 | char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL]; | 141 | char server_RFC1001_name[SERVER_NAME_LEN_WITH_NULL]; |
141 | char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2]; | 142 | char unicode_server_Name[SERVER_NAME_LEN_WITH_NULL * 2]; |
143 | char *hostname; /* hostname portion of UNC string */ | ||
142 | struct socket *ssocket; | 144 | struct socket *ssocket; |
143 | union { | 145 | union { |
144 | struct sockaddr_in sockAddr; | 146 | struct sockaddr_in sockAddr; |
@@ -471,6 +473,17 @@ struct dir_notify_req { | |||
471 | #define CIFS_LARGE_BUFFER 2 | 473 | #define CIFS_LARGE_BUFFER 2 |
472 | #define CIFS_IOVEC 4 /* array of response buffers */ | 474 | #define CIFS_IOVEC 4 /* array of response buffers */ |
473 | 475 | ||
476 | /* Type of Request to SendReceive2 */ | ||
477 | #define CIFS_STD_OP 0 /* normal request timeout */ | ||
478 | #define CIFS_LONG_OP 1 /* long op (up to 45 sec, oplock time) */ | ||
479 | #define CIFS_VLONG_OP 2 /* sloow op - can take up to 180 seconds */ | ||
480 | #define CIFS_BLOCKING_OP 4 /* operation can block */ | ||
481 | #define CIFS_ASYNC_OP 8 /* do not wait for response */ | ||
482 | #define CIFS_TIMEOUT_MASK 0x00F /* only one of 5 above set in req */ | ||
483 | #define CIFS_LOG_ERROR 0x010 /* log NT STATUS if non-zero */ | ||
484 | #define CIFS_LARGE_BUF_OP 0x020 /* large request buffer */ | ||
485 | #define CIFS_NO_RESP 0x040 /* no response buffer required */ | ||
486 | |||
474 | /* Security Flags: indicate type of session setup needed */ | 487 | /* Security Flags: indicate type of session setup needed */ |
475 | #define CIFSSEC_MAY_SIGN 0x00001 | 488 | #define CIFSSEC_MAY_SIGN 0x00001 |
476 | #define CIFSSEC_MAY_NTLM 0x00002 | 489 | #define CIFSSEC_MAY_NTLM 0x00002 |
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index dd1d7c200ee6..8350eec49663 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
@@ -48,10 +48,11 @@ extern int SendReceive(const unsigned int /* xid */ , struct cifsSesInfo *, | |||
48 | struct smb_hdr * /* input */ , | 48 | struct smb_hdr * /* input */ , |
49 | struct smb_hdr * /* out */ , | 49 | struct smb_hdr * /* out */ , |
50 | int * /* bytes returned */ , const int long_op); | 50 | int * /* bytes returned */ , const int long_op); |
51 | extern int SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses, | ||
52 | struct smb_hdr *in_buf, int flags); | ||
51 | extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, | 53 | extern int SendReceive2(const unsigned int /* xid */ , struct cifsSesInfo *, |
52 | struct kvec *, int /* nvec to send */, | 54 | struct kvec *, int /* nvec to send */, |
53 | int * /* type of buf returned */ , const int long_op, | 55 | int * /* type of buf returned */ , const int flags); |
54 | const int logError /* whether to log status code*/ ); | ||
55 | extern int SendReceiveBlockingLock(const unsigned int /* xid */ , | 56 | extern int SendReceiveBlockingLock(const unsigned int /* xid */ , |
56 | struct cifsTconInfo *, | 57 | struct cifsTconInfo *, |
57 | struct smb_hdr * /* input */ , | 58 | struct smb_hdr * /* input */ , |
@@ -76,8 +77,6 @@ extern void header_assemble(struct smb_hdr *, char /* command */ , | |||
76 | extern int small_smb_init_no_tc(const int smb_cmd, const int wct, | 77 | extern int small_smb_init_no_tc(const int smb_cmd, const int wct, |
77 | struct cifsSesInfo *ses, | 78 | struct cifsSesInfo *ses, |
78 | void **request_buf); | 79 | void **request_buf); |
79 | extern struct key *cifs_get_spnego_key(struct cifsSesInfo *sesInfo, | ||
80 | const char *hostname); | ||
81 | extern int CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, | 80 | extern int CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, |
82 | const int stage, | 81 | const int stage, |
83 | const struct nls_table *nls_cp); | 82 | const struct nls_table *nls_cp); |
@@ -248,15 +247,15 @@ extern int CIFSSMBQueryReparseLinkInfo(const int xid, | |||
248 | extern int CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, | 247 | extern int CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, |
249 | const char *fileName, const int disposition, | 248 | const char *fileName, const int disposition, |
250 | const int access_flags, const int omode, | 249 | const int access_flags, const int omode, |
251 | __u16 * netfid, int *pOplock, FILE_ALL_INFO *, | 250 | __u16 *netfid, int *pOplock, FILE_ALL_INFO *, |
252 | const struct nls_table *nls_codepage, int remap); | 251 | const struct nls_table *nls_codepage, int remap); |
253 | extern int SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, | 252 | extern int SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, |
254 | const char *fileName, const int disposition, | 253 | const char *fileName, const int disposition, |
255 | const int access_flags, const int omode, | 254 | const int access_flags, const int omode, |
256 | __u16 * netfid, int *pOplock, FILE_ALL_INFO *, | 255 | __u16 *netfid, int *pOplock, FILE_ALL_INFO *, |
257 | const struct nls_table *nls_codepage, int remap); | 256 | const struct nls_table *nls_codepage, int remap); |
258 | extern int CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, | 257 | extern int CIFSPOSIXCreate(const int xid, struct cifsTconInfo *tcon, |
259 | u32 posix_flags, __u64 mode, __u16 * netfid, | 258 | u32 posix_flags, __u64 mode, __u16 *netfid, |
260 | FILE_UNIX_BASIC_INFO *pRetData, | 259 | FILE_UNIX_BASIC_INFO *pRetData, |
261 | __u32 *pOplock, const char *name, | 260 | __u32 *pOplock, const char *name, |
262 | const struct nls_table *nls_codepage, int remap); | 261 | const struct nls_table *nls_codepage, int remap); |
@@ -277,7 +276,7 @@ extern int CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, | |||
277 | const __u64 offset, unsigned int *nbytes, | 276 | const __u64 offset, unsigned int *nbytes, |
278 | struct kvec *iov, const int nvec, const int long_op); | 277 | struct kvec *iov, const int nvec, const int long_op); |
279 | extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, | 278 | extern int CIFSGetSrvInodeNumber(const int xid, struct cifsTconInfo *tcon, |
280 | const unsigned char *searchName, __u64 * inode_number, | 279 | const unsigned char *searchName, __u64 *inode_number, |
281 | const struct nls_table *nls_codepage, | 280 | const struct nls_table *nls_codepage, |
282 | int remap_special_chars); | 281 | int remap_special_chars); |
283 | extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, | 282 | extern int cifs_convertUCSpath(char *target, const __le16 *source, int maxlen, |
@@ -352,5 +351,5 @@ extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, | |||
352 | const char *local_acl, const int buflen, const int acl_type, | 351 | const char *local_acl, const int buflen, const int acl_type, |
353 | const struct nls_table *nls_codepage, int remap_special_chars); | 352 | const struct nls_table *nls_codepage, int remap_special_chars); |
354 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, | 353 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, |
355 | const int netfid, __u64 * pExtAttrBits, __u64 *pMask); | 354 | const int netfid, __u64 *pExtAttrBits, __u64 *pMask); |
356 | #endif /* _CIFSPROTO_H */ | 355 | #endif /* _CIFSPROTO_H */ |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 59d7b7c037ad..9e8a6bef029a 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -698,9 +698,7 @@ int | |||
698 | CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) | 698 | CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) |
699 | { | 699 | { |
700 | struct smb_hdr *smb_buffer; | 700 | struct smb_hdr *smb_buffer; |
701 | struct smb_hdr *smb_buffer_response; /* BB removeme BB */ | ||
702 | int rc = 0; | 701 | int rc = 0; |
703 | int length; | ||
704 | 702 | ||
705 | cFYI(1, ("In tree disconnect")); | 703 | cFYI(1, ("In tree disconnect")); |
706 | /* | 704 | /* |
@@ -737,16 +735,12 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) | |||
737 | if (rc) { | 735 | if (rc) { |
738 | up(&tcon->tconSem); | 736 | up(&tcon->tconSem); |
739 | return rc; | 737 | return rc; |
740 | } else { | ||
741 | smb_buffer_response = smb_buffer; /* BB removeme BB */ | ||
742 | } | 738 | } |
743 | rc = SendReceive(xid, tcon->ses, smb_buffer, smb_buffer_response, | 739 | |
744 | &length, 0); | 740 | rc = SendReceiveNoRsp(xid, tcon->ses, smb_buffer, 0); |
745 | if (rc) | 741 | if (rc) |
746 | cFYI(1, ("Tree disconnect failed %d", rc)); | 742 | cFYI(1, ("Tree disconnect failed %d", rc)); |
747 | 743 | ||
748 | if (smb_buffer) | ||
749 | cifs_small_buf_release(smb_buffer); | ||
750 | up(&tcon->tconSem); | 744 | up(&tcon->tconSem); |
751 | 745 | ||
752 | /* No need to return error on this operation if tid invalidated and | 746 | /* No need to return error on this operation if tid invalidated and |
@@ -760,10 +754,8 @@ CIFSSMBTDis(const int xid, struct cifsTconInfo *tcon) | |||
760 | int | 754 | int |
761 | CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) | 755 | CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) |
762 | { | 756 | { |
763 | struct smb_hdr *smb_buffer_response; | ||
764 | LOGOFF_ANDX_REQ *pSMB; | 757 | LOGOFF_ANDX_REQ *pSMB; |
765 | int rc = 0; | 758 | int rc = 0; |
766 | int length; | ||
767 | 759 | ||
768 | cFYI(1, ("In SMBLogoff for session disconnect")); | 760 | cFYI(1, ("In SMBLogoff for session disconnect")); |
769 | if (ses) | 761 | if (ses) |
@@ -782,8 +774,6 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) | |||
782 | return rc; | 774 | return rc; |
783 | } | 775 | } |
784 | 776 | ||
785 | smb_buffer_response = (struct smb_hdr *)pSMB; /* BB removeme BB */ | ||
786 | |||
787 | if (ses->server) { | 777 | if (ses->server) { |
788 | pSMB->hdr.Mid = GetNextMid(ses->server); | 778 | pSMB->hdr.Mid = GetNextMid(ses->server); |
789 | 779 | ||
@@ -795,8 +785,7 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) | |||
795 | pSMB->hdr.Uid = ses->Suid; | 785 | pSMB->hdr.Uid = ses->Suid; |
796 | 786 | ||
797 | pSMB->AndXCommand = 0xFF; | 787 | pSMB->AndXCommand = 0xFF; |
798 | rc = SendReceive(xid, ses, (struct smb_hdr *) pSMB, | 788 | rc = SendReceiveNoRsp(xid, ses, (struct smb_hdr *) pSMB, 0); |
799 | smb_buffer_response, &length, 0); | ||
800 | if (ses->server) { | 789 | if (ses->server) { |
801 | atomic_dec(&ses->server->socketUseCount); | 790 | atomic_dec(&ses->server->socketUseCount); |
802 | if (atomic_read(&ses->server->socketUseCount) == 0) { | 791 | if (atomic_read(&ses->server->socketUseCount) == 0) { |
@@ -807,7 +796,6 @@ CIFSSMBLogoff(const int xid, struct cifsSesInfo *ses) | |||
807 | } | 796 | } |
808 | } | 797 | } |
809 | up(&ses->sesSem); | 798 | up(&ses->sesSem); |
810 | cifs_small_buf_release(pSMB); | ||
811 | 799 | ||
812 | /* if session dead then we do not need to do ulogoff, | 800 | /* if session dead then we do not need to do ulogoff, |
813 | since server closed smb session, no sense reporting | 801 | since server closed smb session, no sense reporting |
@@ -1255,7 +1243,7 @@ OldOpenRetry: | |||
1255 | pSMB->ByteCount = cpu_to_le16(count); | 1243 | pSMB->ByteCount = cpu_to_le16(count); |
1256 | /* long_op set to 1 to allow for oplock break timeouts */ | 1244 | /* long_op set to 1 to allow for oplock break timeouts */ |
1257 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 1245 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
1258 | (struct smb_hdr *) pSMBr, &bytes_returned, 1); | 1246 | (struct smb_hdr *)pSMBr, &bytes_returned, CIFS_LONG_OP); |
1259 | cifs_stats_inc(&tcon->num_opens); | 1247 | cifs_stats_inc(&tcon->num_opens); |
1260 | if (rc) { | 1248 | if (rc) { |
1261 | cFYI(1, ("Error in Open = %d", rc)); | 1249 | cFYI(1, ("Error in Open = %d", rc)); |
@@ -1368,7 +1356,7 @@ openRetry: | |||
1368 | pSMB->ByteCount = cpu_to_le16(count); | 1356 | pSMB->ByteCount = cpu_to_le16(count); |
1369 | /* long_op set to 1 to allow for oplock break timeouts */ | 1357 | /* long_op set to 1 to allow for oplock break timeouts */ |
1370 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 1358 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
1371 | (struct smb_hdr *) pSMBr, &bytes_returned, 1); | 1359 | (struct smb_hdr *)pSMBr, &bytes_returned, CIFS_LONG_OP); |
1372 | cifs_stats_inc(&tcon->num_opens); | 1360 | cifs_stats_inc(&tcon->num_opens); |
1373 | if (rc) { | 1361 | if (rc) { |
1374 | cFYI(1, ("Error in Open = %d", rc)); | 1362 | cFYI(1, ("Error in Open = %d", rc)); |
@@ -1446,7 +1434,7 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, const int netfid, | |||
1446 | iov[0].iov_base = (char *)pSMB; | 1434 | iov[0].iov_base = (char *)pSMB; |
1447 | iov[0].iov_len = pSMB->hdr.smb_buf_length + 4; | 1435 | iov[0].iov_len = pSMB->hdr.smb_buf_length + 4; |
1448 | rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, | 1436 | rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, |
1449 | &resp_buf_type, 0 /* not long op */, 1 /* log err */ ); | 1437 | &resp_buf_type, CIFS_STD_OP | CIFS_LOG_ERROR); |
1450 | cifs_stats_inc(&tcon->num_reads); | 1438 | cifs_stats_inc(&tcon->num_reads); |
1451 | pSMBr = (READ_RSP *)iov[0].iov_base; | 1439 | pSMBr = (READ_RSP *)iov[0].iov_base; |
1452 | if (rc) { | 1440 | if (rc) { |
@@ -1665,7 +1653,7 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, | |||
1665 | 1653 | ||
1666 | 1654 | ||
1667 | rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, | 1655 | rc = SendReceive2(xid, tcon->ses, iov, n_vec + 1, &resp_buf_type, |
1668 | long_op, 0 /* do not log STATUS code */ ); | 1656 | long_op); |
1669 | cifs_stats_inc(&tcon->num_writes); | 1657 | cifs_stats_inc(&tcon->num_writes); |
1670 | if (rc) { | 1658 | if (rc) { |
1671 | cFYI(1, ("Send error Write2 = %d", rc)); | 1659 | cFYI(1, ("Send error Write2 = %d", rc)); |
@@ -1707,7 +1695,7 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1707 | int timeout = 0; | 1695 | int timeout = 0; |
1708 | __u16 count; | 1696 | __u16 count; |
1709 | 1697 | ||
1710 | cFYI(1, ("In CIFSSMBLock - timeout %d numLock %d", waitFlag, numLock)); | 1698 | cFYI(1, ("CIFSSMBLock timeout %d numLock %d", waitFlag, numLock)); |
1711 | rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); | 1699 | rc = small_smb_init(SMB_COM_LOCKING_ANDX, 8, tcon, (void **) &pSMB); |
1712 | 1700 | ||
1713 | if (rc) | 1701 | if (rc) |
@@ -1716,10 +1704,10 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1716 | pSMBr = (LOCK_RSP *)pSMB; /* BB removeme BB */ | 1704 | pSMBr = (LOCK_RSP *)pSMB; /* BB removeme BB */ |
1717 | 1705 | ||
1718 | if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) { | 1706 | if (lockType == LOCKING_ANDX_OPLOCK_RELEASE) { |
1719 | timeout = -1; /* no response expected */ | 1707 | timeout = CIFS_ASYNC_OP; /* no response expected */ |
1720 | pSMB->Timeout = 0; | 1708 | pSMB->Timeout = 0; |
1721 | } else if (waitFlag == TRUE) { | 1709 | } else if (waitFlag == TRUE) { |
1722 | timeout = 3; /* blocking operation, no timeout */ | 1710 | timeout = CIFS_BLOCKING_OP; /* blocking operation, no timeout */ |
1723 | pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */ | 1711 | pSMB->Timeout = cpu_to_le32(-1);/* blocking - do not time out */ |
1724 | } else { | 1712 | } else { |
1725 | pSMB->Timeout = 0; | 1713 | pSMB->Timeout = 0; |
@@ -1749,15 +1737,16 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, | |||
1749 | if (waitFlag) { | 1737 | if (waitFlag) { |
1750 | rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, | 1738 | rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, |
1751 | (struct smb_hdr *) pSMBr, &bytes_returned); | 1739 | (struct smb_hdr *) pSMBr, &bytes_returned); |
1740 | cifs_small_buf_release(pSMB); | ||
1752 | } else { | 1741 | } else { |
1753 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 1742 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *)pSMB, |
1754 | (struct smb_hdr *) pSMBr, &bytes_returned, timeout); | 1743 | timeout); |
1744 | /* SMB buffer freed by function above */ | ||
1755 | } | 1745 | } |
1756 | cifs_stats_inc(&tcon->num_locks); | 1746 | cifs_stats_inc(&tcon->num_locks); |
1757 | if (rc) { | 1747 | if (rc) { |
1758 | cFYI(1, ("Send error in Lock = %d", rc)); | 1748 | cFYI(1, ("Send error in Lock = %d", rc)); |
1759 | } | 1749 | } |
1760 | cifs_small_buf_release(pSMB); | ||
1761 | 1750 | ||
1762 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 1751 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
1763 | since file handle passed in no longer valid */ | 1752 | since file handle passed in no longer valid */ |
@@ -1776,7 +1765,9 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1776 | int rc = 0; | 1765 | int rc = 0; |
1777 | int timeout = 0; | 1766 | int timeout = 0; |
1778 | int bytes_returned = 0; | 1767 | int bytes_returned = 0; |
1768 | int resp_buf_type = 0; | ||
1779 | __u16 params, param_offset, offset, byte_count, count; | 1769 | __u16 params, param_offset, offset, byte_count, count; |
1770 | struct kvec iov[1]; | ||
1780 | 1771 | ||
1781 | cFYI(1, ("Posix Lock")); | 1772 | cFYI(1, ("Posix Lock")); |
1782 | 1773 | ||
@@ -1818,7 +1809,7 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1818 | 1809 | ||
1819 | parm_data->lock_type = cpu_to_le16(lock_type); | 1810 | parm_data->lock_type = cpu_to_le16(lock_type); |
1820 | if (waitFlag) { | 1811 | if (waitFlag) { |
1821 | timeout = 3; /* blocking operation, no timeout */ | 1812 | timeout = CIFS_BLOCKING_OP; /* blocking operation, no timeout */ |
1822 | parm_data->lock_flags = cpu_to_le16(1); | 1813 | parm_data->lock_flags = cpu_to_le16(1); |
1823 | pSMB->Timeout = cpu_to_le32(-1); | 1814 | pSMB->Timeout = cpu_to_le32(-1); |
1824 | } else | 1815 | } else |
@@ -1838,8 +1829,13 @@ CIFSSMBPosixLock(const int xid, struct cifsTconInfo *tcon, | |||
1838 | rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, | 1829 | rc = SendReceiveBlockingLock(xid, tcon, (struct smb_hdr *) pSMB, |
1839 | (struct smb_hdr *) pSMBr, &bytes_returned); | 1830 | (struct smb_hdr *) pSMBr, &bytes_returned); |
1840 | } else { | 1831 | } else { |
1841 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 1832 | iov[0].iov_base = (char *)pSMB; |
1842 | (struct smb_hdr *) pSMBr, &bytes_returned, timeout); | 1833 | iov[0].iov_len = pSMB->hdr.smb_buf_length + 4; |
1834 | rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovecs */, | ||
1835 | &resp_buf_type, timeout); | ||
1836 | pSMB = NULL; /* request buf already freed by SendReceive2. Do | ||
1837 | not try to free it twice below on exit */ | ||
1838 | pSMBr = (struct smb_com_transaction2_sfi_rsp *)iov[0].iov_base; | ||
1843 | } | 1839 | } |
1844 | 1840 | ||
1845 | if (rc) { | 1841 | if (rc) { |
@@ -1874,6 +1870,11 @@ plk_err_exit: | |||
1874 | if (pSMB) | 1870 | if (pSMB) |
1875 | cifs_small_buf_release(pSMB); | 1871 | cifs_small_buf_release(pSMB); |
1876 | 1872 | ||
1873 | if (resp_buf_type == CIFS_SMALL_BUFFER) | ||
1874 | cifs_small_buf_release(iov[0].iov_base); | ||
1875 | else if (resp_buf_type == CIFS_LARGE_BUFFER) | ||
1876 | cifs_buf_release(iov[0].iov_base); | ||
1877 | |||
1877 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 1878 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
1878 | since file handle passed in no longer valid */ | 1879 | since file handle passed in no longer valid */ |
1879 | 1880 | ||
@@ -1886,8 +1887,6 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) | |||
1886 | { | 1887 | { |
1887 | int rc = 0; | 1888 | int rc = 0; |
1888 | CLOSE_REQ *pSMB = NULL; | 1889 | CLOSE_REQ *pSMB = NULL; |
1889 | CLOSE_RSP *pSMBr = NULL; | ||
1890 | int bytes_returned; | ||
1891 | cFYI(1, ("In CIFSSMBClose")); | 1890 | cFYI(1, ("In CIFSSMBClose")); |
1892 | 1891 | ||
1893 | /* do not retry on dead session on close */ | 1892 | /* do not retry on dead session on close */ |
@@ -1897,13 +1896,10 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) | |||
1897 | if (rc) | 1896 | if (rc) |
1898 | return rc; | 1897 | return rc; |
1899 | 1898 | ||
1900 | pSMBr = (CLOSE_RSP *)pSMB; /* BB removeme BB */ | ||
1901 | |||
1902 | pSMB->FileID = (__u16) smb_file_id; | 1899 | pSMB->FileID = (__u16) smb_file_id; |
1903 | pSMB->LastWriteTime = 0xFFFFFFFF; | 1900 | pSMB->LastWriteTime = 0xFFFFFFFF; |
1904 | pSMB->ByteCount = 0; | 1901 | pSMB->ByteCount = 0; |
1905 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 1902 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
1906 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | ||
1907 | cifs_stats_inc(&tcon->num_closes); | 1903 | cifs_stats_inc(&tcon->num_closes); |
1908 | if (rc) { | 1904 | if (rc) { |
1909 | if (rc != -EINTR) { | 1905 | if (rc != -EINTR) { |
@@ -1912,8 +1908,6 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) | |||
1912 | } | 1908 | } |
1913 | } | 1909 | } |
1914 | 1910 | ||
1915 | cifs_small_buf_release(pSMB); | ||
1916 | |||
1917 | /* Since session is dead, file will be closed on server already */ | 1911 | /* Since session is dead, file will be closed on server already */ |
1918 | if (rc == -EAGAIN) | 1912 | if (rc == -EAGAIN) |
1919 | rc = 0; | 1913 | rc = 0; |
@@ -3102,7 +3096,7 @@ CIFSSMBGetCIFSACL(const int xid, struct cifsTconInfo *tcon, __u16 fid, | |||
3102 | iov[0].iov_len = pSMB->hdr.smb_buf_length + 4; | 3096 | iov[0].iov_len = pSMB->hdr.smb_buf_length + 4; |
3103 | 3097 | ||
3104 | rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, | 3098 | rc = SendReceive2(xid, tcon->ses, iov, 1 /* num iovec */, &buf_type, |
3105 | 0 /* not long op */, 0 /* do not log STATUS codes */ ); | 3099 | CIFS_STD_OP); |
3106 | cifs_stats_inc(&tcon->num_acl_get); | 3100 | cifs_stats_inc(&tcon->num_acl_get); |
3107 | if (rc) { | 3101 | if (rc) { |
3108 | cFYI(1, ("Send error in QuerySecDesc = %d", rc)); | 3102 | cFYI(1, ("Send error in QuerySecDesc = %d", rc)); |
@@ -3763,8 +3757,6 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, | |||
3763 | { | 3757 | { |
3764 | int rc = 0; | 3758 | int rc = 0; |
3765 | FINDCLOSE_REQ *pSMB = NULL; | 3759 | FINDCLOSE_REQ *pSMB = NULL; |
3766 | CLOSE_RSP *pSMBr = NULL; /* BB removeme BB */ | ||
3767 | int bytes_returned; | ||
3768 | 3760 | ||
3769 | cFYI(1, ("In CIFSSMBFindClose")); | 3761 | cFYI(1, ("In CIFSSMBFindClose")); |
3770 | rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); | 3762 | rc = small_smb_init(SMB_COM_FIND_CLOSE2, 1, tcon, (void **)&pSMB); |
@@ -3776,16 +3768,13 @@ CIFSFindClose(const int xid, struct cifsTconInfo *tcon, | |||
3776 | if (rc) | 3768 | if (rc) |
3777 | return rc; | 3769 | return rc; |
3778 | 3770 | ||
3779 | pSMBr = (CLOSE_RSP *)pSMB; /* BB removeme BB */ | ||
3780 | pSMB->FileID = searchHandle; | 3771 | pSMB->FileID = searchHandle; |
3781 | pSMB->ByteCount = 0; | 3772 | pSMB->ByteCount = 0; |
3782 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 3773 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
3783 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | ||
3784 | if (rc) { | 3774 | if (rc) { |
3785 | cERROR(1, ("Send error in FindClose = %d", rc)); | 3775 | cERROR(1, ("Send error in FindClose = %d", rc)); |
3786 | } | 3776 | } |
3787 | cifs_stats_inc(&tcon->num_fclose); | 3777 | cifs_stats_inc(&tcon->num_fclose); |
3788 | cifs_small_buf_release(pSMB); | ||
3789 | 3778 | ||
3790 | /* Since session is dead, search handle closed on server already */ | 3779 | /* Since session is dead, search handle closed on server already */ |
3791 | if (rc == -EAGAIN) | 3780 | if (rc == -EAGAIN) |
@@ -4707,11 +4696,9 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
4707 | __u16 fid, __u32 pid_of_opener, int SetAllocation) | 4696 | __u16 fid, __u32 pid_of_opener, int SetAllocation) |
4708 | { | 4697 | { |
4709 | struct smb_com_transaction2_sfi_req *pSMB = NULL; | 4698 | struct smb_com_transaction2_sfi_req *pSMB = NULL; |
4710 | struct smb_com_transaction2_sfi_rsp *pSMBr = NULL; | ||
4711 | char *data_offset; | 4699 | char *data_offset; |
4712 | struct file_end_of_file_info *parm_data; | 4700 | struct file_end_of_file_info *parm_data; |
4713 | int rc = 0; | 4701 | int rc = 0; |
4714 | int bytes_returned = 0; | ||
4715 | __u16 params, param_offset, offset, byte_count, count; | 4702 | __u16 params, param_offset, offset, byte_count, count; |
4716 | 4703 | ||
4717 | cFYI(1, ("SetFileSize (via SetFileInfo) %lld", | 4704 | cFYI(1, ("SetFileSize (via SetFileInfo) %lld", |
@@ -4721,8 +4708,6 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
4721 | if (rc) | 4708 | if (rc) |
4722 | return rc; | 4709 | return rc; |
4723 | 4710 | ||
4724 | pSMBr = (struct smb_com_transaction2_sfi_rsp *)pSMB; | ||
4725 | |||
4726 | pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); | 4711 | pSMB->hdr.Pid = cpu_to_le16((__u16)pid_of_opener); |
4727 | pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); | 4712 | pSMB->hdr.PidHigh = cpu_to_le16((__u16)(pid_of_opener >> 16)); |
4728 | 4713 | ||
@@ -4773,17 +4758,13 @@ CIFSSMBSetFileSize(const int xid, struct cifsTconInfo *tcon, __u64 size, | |||
4773 | pSMB->Reserved4 = 0; | 4758 | pSMB->Reserved4 = 0; |
4774 | pSMB->hdr.smb_buf_length += byte_count; | 4759 | pSMB->hdr.smb_buf_length += byte_count; |
4775 | pSMB->ByteCount = cpu_to_le16(byte_count); | 4760 | pSMB->ByteCount = cpu_to_le16(byte_count); |
4776 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4761 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
4777 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | ||
4778 | if (rc) { | 4762 | if (rc) { |
4779 | cFYI(1, | 4763 | cFYI(1, |
4780 | ("Send error in SetFileInfo (SetFileSize) = %d", | 4764 | ("Send error in SetFileInfo (SetFileSize) = %d", |
4781 | rc)); | 4765 | rc)); |
4782 | } | 4766 | } |
4783 | 4767 | ||
4784 | if (pSMB) | ||
4785 | cifs_small_buf_release(pSMB); | ||
4786 | |||
4787 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 4768 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
4788 | since file handle passed in no longer valid */ | 4769 | since file handle passed in no longer valid */ |
4789 | 4770 | ||
@@ -4801,10 +4782,8 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | |||
4801 | const FILE_BASIC_INFO *data, __u16 fid) | 4782 | const FILE_BASIC_INFO *data, __u16 fid) |
4802 | { | 4783 | { |
4803 | struct smb_com_transaction2_sfi_req *pSMB = NULL; | 4784 | struct smb_com_transaction2_sfi_req *pSMB = NULL; |
4804 | struct smb_com_transaction2_sfi_rsp *pSMBr = NULL; | ||
4805 | char *data_offset; | 4785 | char *data_offset; |
4806 | int rc = 0; | 4786 | int rc = 0; |
4807 | int bytes_returned = 0; | ||
4808 | __u16 params, param_offset, offset, byte_count, count; | 4787 | __u16 params, param_offset, offset, byte_count, count; |
4809 | 4788 | ||
4810 | cFYI(1, ("Set Times (via SetFileInfo)")); | 4789 | cFYI(1, ("Set Times (via SetFileInfo)")); |
@@ -4813,8 +4792,6 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | |||
4813 | if (rc) | 4792 | if (rc) |
4814 | return rc; | 4793 | return rc; |
4815 | 4794 | ||
4816 | pSMBr = (struct smb_com_transaction2_sfi_rsp *)pSMB; | ||
4817 | |||
4818 | /* At this point there is no need to override the current pid | 4795 | /* At this point there is no need to override the current pid |
4819 | with the pid of the opener, but that could change if we someday | 4796 | with the pid of the opener, but that could change if we someday |
4820 | use an existing handle (rather than opening one on the fly) */ | 4797 | use an existing handle (rather than opening one on the fly) */ |
@@ -4854,14 +4831,11 @@ CIFSSMBSetFileTimes(const int xid, struct cifsTconInfo *tcon, | |||
4854 | pSMB->hdr.smb_buf_length += byte_count; | 4831 | pSMB->hdr.smb_buf_length += byte_count; |
4855 | pSMB->ByteCount = cpu_to_le16(byte_count); | 4832 | pSMB->ByteCount = cpu_to_le16(byte_count); |
4856 | memcpy(data_offset, data, sizeof(FILE_BASIC_INFO)); | 4833 | memcpy(data_offset, data, sizeof(FILE_BASIC_INFO)); |
4857 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 4834 | rc = SendReceiveNoRsp(xid, tcon->ses, (struct smb_hdr *) pSMB, 0); |
4858 | (struct smb_hdr *) pSMBr, &bytes_returned, 0); | ||
4859 | if (rc) { | 4835 | if (rc) { |
4860 | cFYI(1, ("Send error in Set Time (SetFileInfo) = %d", rc)); | 4836 | cFYI(1, ("Send error in Set Time (SetFileInfo) = %d", rc)); |
4861 | } | 4837 | } |
4862 | 4838 | ||
4863 | cifs_small_buf_release(pSMB); | ||
4864 | |||
4865 | /* Note: On -EAGAIN error only caller can retry on handle based calls | 4839 | /* Note: On -EAGAIN error only caller can retry on handle based calls |
4866 | since file handle passed in no longer valid */ | 4840 | since file handle passed in no longer valid */ |
4867 | 4841 | ||
@@ -5152,7 +5126,8 @@ int CIFSSMBNotify(const int xid, struct cifsTconInfo *tcon, | |||
5152 | pSMB->ByteCount = 0; | 5126 | pSMB->ByteCount = 0; |
5153 | 5127 | ||
5154 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, | 5128 | rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, |
5155 | (struct smb_hdr *) pSMBr, &bytes_returned, -1); | 5129 | (struct smb_hdr *)pSMBr, &bytes_returned, |
5130 | CIFS_ASYNC_OP); | ||
5156 | if (rc) { | 5131 | if (rc) { |
5157 | cFYI(1, ("Error in Notify = %d", rc)); | 5132 | cFYI(1, ("Error in Notify = %d", rc)); |
5158 | } else { | 5133 | } else { |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index c52a76ff4bb9..fd9147cdb5a9 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -438,9 +438,9 @@ incomplete_rcv: | |||
438 | csocket = server->ssocket; | 438 | csocket = server->ssocket; |
439 | wake_up(&server->response_q); | 439 | wake_up(&server->response_q); |
440 | continue; | 440 | continue; |
441 | } else if (length < 4) { | 441 | } else if (length < pdu_length) { |
442 | cFYI(1, ("less than four bytes received (%d bytes)", | 442 | cFYI(1, ("requested %d bytes but only got %d bytes", |
443 | length)); | 443 | pdu_length, length)); |
444 | pdu_length -= length; | 444 | pdu_length -= length; |
445 | msleep(1); | 445 | msleep(1); |
446 | goto incomplete_rcv; | 446 | goto incomplete_rcv; |
@@ -752,6 +752,7 @@ multi_t2_fnd: | |||
752 | } | 752 | } |
753 | write_unlock(&GlobalSMBSeslock); | 753 | write_unlock(&GlobalSMBSeslock); |
754 | 754 | ||
755 | kfree(server->hostname); | ||
755 | kfree(server); | 756 | kfree(server); |
756 | if (length > 0) | 757 | if (length > 0) |
757 | mempool_resize(cifs_req_poolp, length + cifs_min_rcv, | 758 | mempool_resize(cifs_req_poolp, length + cifs_min_rcv, |
@@ -760,6 +761,34 @@ multi_t2_fnd: | |||
760 | return 0; | 761 | return 0; |
761 | } | 762 | } |
762 | 763 | ||
764 | /* extract the host portion of the UNC string */ | ||
765 | static char * | ||
766 | extract_hostname(const char *unc) | ||
767 | { | ||
768 | const char *src; | ||
769 | char *dst, *delim; | ||
770 | unsigned int len; | ||
771 | |||
772 | /* skip double chars at beginning of string */ | ||
773 | /* BB: check validity of these bytes? */ | ||
774 | src = unc + 2; | ||
775 | |||
776 | /* delimiter between hostname and sharename is always '\\' now */ | ||
777 | delim = strchr(src, '\\'); | ||
778 | if (!delim) | ||
779 | return ERR_PTR(-EINVAL); | ||
780 | |||
781 | len = delim - src; | ||
782 | dst = kmalloc((len + 1), GFP_KERNEL); | ||
783 | if (dst == NULL) | ||
784 | return ERR_PTR(-ENOMEM); | ||
785 | |||
786 | memcpy(dst, src, len); | ||
787 | dst[len] = '\0'; | ||
788 | |||
789 | return dst; | ||
790 | } | ||
791 | |||
763 | static int | 792 | static int |
764 | cifs_parse_mount_options(char *options, const char *devname, | 793 | cifs_parse_mount_options(char *options, const char *devname, |
765 | struct smb_vol *vol) | 794 | struct smb_vol *vol) |
@@ -1781,11 +1810,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1781 | 1810 | ||
1782 | memset(&volume_info, 0, sizeof(struct smb_vol)); | 1811 | memset(&volume_info, 0, sizeof(struct smb_vol)); |
1783 | if (cifs_parse_mount_options(mount_data, devname, &volume_info)) { | 1812 | if (cifs_parse_mount_options(mount_data, devname, &volume_info)) { |
1784 | kfree(volume_info.UNC); | 1813 | rc = -EINVAL; |
1785 | kfree(volume_info.password); | 1814 | goto out; |
1786 | kfree(volume_info.prepath); | ||
1787 | FreeXid(xid); | ||
1788 | return -EINVAL; | ||
1789 | } | 1815 | } |
1790 | 1816 | ||
1791 | if (volume_info.nullauth) { | 1817 | if (volume_info.nullauth) { |
@@ -1798,11 +1824,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1798 | cifserror("No username specified"); | 1824 | cifserror("No username specified"); |
1799 | /* In userspace mount helper we can get user name from alternate | 1825 | /* In userspace mount helper we can get user name from alternate |
1800 | locations such as env variables and files on disk */ | 1826 | locations such as env variables and files on disk */ |
1801 | kfree(volume_info.UNC); | 1827 | rc = -EINVAL; |
1802 | kfree(volume_info.password); | 1828 | goto out; |
1803 | kfree(volume_info.prepath); | ||
1804 | FreeXid(xid); | ||
1805 | return -EINVAL; | ||
1806 | } | 1829 | } |
1807 | 1830 | ||
1808 | if (volume_info.UNCip && volume_info.UNC) { | 1831 | if (volume_info.UNCip && volume_info.UNC) { |
@@ -1821,11 +1844,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1821 | 1844 | ||
1822 | if (rc <= 0) { | 1845 | if (rc <= 0) { |
1823 | /* we failed translating address */ | 1846 | /* we failed translating address */ |
1824 | kfree(volume_info.UNC); | 1847 | rc = -EINVAL; |
1825 | kfree(volume_info.password); | 1848 | goto out; |
1826 | kfree(volume_info.prepath); | ||
1827 | FreeXid(xid); | ||
1828 | return -EINVAL; | ||
1829 | } | 1849 | } |
1830 | 1850 | ||
1831 | cFYI(1, ("UNC: %s ip: %s", volume_info.UNC, volume_info.UNCip)); | 1851 | cFYI(1, ("UNC: %s ip: %s", volume_info.UNC, volume_info.UNCip)); |
@@ -1835,20 +1855,14 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1835 | /* BB using ip addr as server name to connect to the | 1855 | /* BB using ip addr as server name to connect to the |
1836 | DFS root below */ | 1856 | DFS root below */ |
1837 | cERROR(1, ("Connecting to DFS root not implemented yet")); | 1857 | cERROR(1, ("Connecting to DFS root not implemented yet")); |
1838 | kfree(volume_info.UNC); | 1858 | rc = -EINVAL; |
1839 | kfree(volume_info.password); | 1859 | goto out; |
1840 | kfree(volume_info.prepath); | ||
1841 | FreeXid(xid); | ||
1842 | return -EINVAL; | ||
1843 | } else /* which servers DFS root would we conect to */ { | 1860 | } else /* which servers DFS root would we conect to */ { |
1844 | cERROR(1, | 1861 | cERROR(1, |
1845 | ("CIFS mount error: No UNC path (e.g. -o " | 1862 | ("CIFS mount error: No UNC path (e.g. -o " |
1846 | "unc=//192.168.1.100/public) specified")); | 1863 | "unc=//192.168.1.100/public) specified")); |
1847 | kfree(volume_info.UNC); | 1864 | rc = -EINVAL; |
1848 | kfree(volume_info.password); | 1865 | goto out; |
1849 | kfree(volume_info.prepath); | ||
1850 | FreeXid(xid); | ||
1851 | return -EINVAL; | ||
1852 | } | 1866 | } |
1853 | 1867 | ||
1854 | /* this is needed for ASCII cp to Unicode converts */ | 1868 | /* this is needed for ASCII cp to Unicode converts */ |
@@ -1860,11 +1874,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1860 | if (cifs_sb->local_nls == NULL) { | 1874 | if (cifs_sb->local_nls == NULL) { |
1861 | cERROR(1, ("CIFS mount error: iocharset %s not found", | 1875 | cERROR(1, ("CIFS mount error: iocharset %s not found", |
1862 | volume_info.iocharset)); | 1876 | volume_info.iocharset)); |
1863 | kfree(volume_info.UNC); | 1877 | rc = -ELIBACC; |
1864 | kfree(volume_info.password); | 1878 | goto out; |
1865 | kfree(volume_info.prepath); | ||
1866 | FreeXid(xid); | ||
1867 | return -ELIBACC; | ||
1868 | } | 1879 | } |
1869 | } | 1880 | } |
1870 | 1881 | ||
@@ -1878,11 +1889,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1878 | &sin_server6.sin6_addr, | 1889 | &sin_server6.sin6_addr, |
1879 | volume_info.username, &srvTcp); | 1890 | volume_info.username, &srvTcp); |
1880 | } else { | 1891 | } else { |
1881 | kfree(volume_info.UNC); | 1892 | rc = -EINVAL; |
1882 | kfree(volume_info.password); | 1893 | goto out; |
1883 | kfree(volume_info.prepath); | ||
1884 | FreeXid(xid); | ||
1885 | return -EINVAL; | ||
1886 | } | 1894 | } |
1887 | 1895 | ||
1888 | if (srvTcp) { | 1896 | if (srvTcp) { |
@@ -1906,22 +1914,14 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1906 | "Aborting operation")); | 1914 | "Aborting operation")); |
1907 | if (csocket != NULL) | 1915 | if (csocket != NULL) |
1908 | sock_release(csocket); | 1916 | sock_release(csocket); |
1909 | kfree(volume_info.UNC); | 1917 | goto out; |
1910 | kfree(volume_info.password); | ||
1911 | kfree(volume_info.prepath); | ||
1912 | FreeXid(xid); | ||
1913 | return rc; | ||
1914 | } | 1918 | } |
1915 | 1919 | ||
1916 | srvTcp = kzalloc(sizeof(struct TCP_Server_Info), GFP_KERNEL); | 1920 | srvTcp = kzalloc(sizeof(struct TCP_Server_Info), GFP_KERNEL); |
1917 | if (!srvTcp) { | 1921 | if (!srvTcp) { |
1918 | rc = -ENOMEM; | 1922 | rc = -ENOMEM; |
1919 | sock_release(csocket); | 1923 | sock_release(csocket); |
1920 | kfree(volume_info.UNC); | 1924 | goto out; |
1921 | kfree(volume_info.password); | ||
1922 | kfree(volume_info.prepath); | ||
1923 | FreeXid(xid); | ||
1924 | return rc; | ||
1925 | } else { | 1925 | } else { |
1926 | memcpy(&srvTcp->addr.sockAddr, &sin_server, | 1926 | memcpy(&srvTcp->addr.sockAddr, &sin_server, |
1927 | sizeof(struct sockaddr_in)); | 1927 | sizeof(struct sockaddr_in)); |
@@ -1929,6 +1929,12 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1929 | /* BB Add code for ipv6 case too */ | 1929 | /* BB Add code for ipv6 case too */ |
1930 | srvTcp->ssocket = csocket; | 1930 | srvTcp->ssocket = csocket; |
1931 | srvTcp->protocolType = IPV4; | 1931 | srvTcp->protocolType = IPV4; |
1932 | srvTcp->hostname = extract_hostname(volume_info.UNC); | ||
1933 | if (IS_ERR(srvTcp->hostname)) { | ||
1934 | rc = PTR_ERR(srvTcp->hostname); | ||
1935 | sock_release(csocket); | ||
1936 | goto out; | ||
1937 | } | ||
1932 | init_waitqueue_head(&srvTcp->response_q); | 1938 | init_waitqueue_head(&srvTcp->response_q); |
1933 | init_waitqueue_head(&srvTcp->request_q); | 1939 | init_waitqueue_head(&srvTcp->request_q); |
1934 | INIT_LIST_HEAD(&srvTcp->pending_mid_q); | 1940 | INIT_LIST_HEAD(&srvTcp->pending_mid_q); |
@@ -1938,16 +1944,13 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1938 | srvTcp->tcpStatus = CifsNew; | 1944 | srvTcp->tcpStatus = CifsNew; |
1939 | init_MUTEX(&srvTcp->tcpSem); | 1945 | init_MUTEX(&srvTcp->tcpSem); |
1940 | srvTcp->tsk = kthread_run((void *)(void *)cifs_demultiplex_thread, srvTcp, "cifsd"); | 1946 | srvTcp->tsk = kthread_run((void *)(void *)cifs_demultiplex_thread, srvTcp, "cifsd"); |
1941 | if ( IS_ERR(srvTcp->tsk) ) { | 1947 | if (IS_ERR(srvTcp->tsk)) { |
1942 | rc = PTR_ERR(srvTcp->tsk); | 1948 | rc = PTR_ERR(srvTcp->tsk); |
1943 | cERROR(1, ("error %d create cifsd thread", rc)); | 1949 | cERROR(1, ("error %d create cifsd thread", rc)); |
1944 | srvTcp->tsk = NULL; | 1950 | srvTcp->tsk = NULL; |
1945 | sock_release(csocket); | 1951 | sock_release(csocket); |
1946 | kfree(volume_info.UNC); | 1952 | kfree(srvTcp->hostname); |
1947 | kfree(volume_info.password); | 1953 | goto out; |
1948 | kfree(volume_info.prepath); | ||
1949 | FreeXid(xid); | ||
1950 | return rc; | ||
1951 | } | 1954 | } |
1952 | wait_for_completion(&cifsd_complete); | 1955 | wait_for_completion(&cifsd_complete); |
1953 | rc = 0; | 1956 | rc = 0; |
@@ -1962,8 +1965,6 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1962 | if (existingCifsSes) { | 1965 | if (existingCifsSes) { |
1963 | pSesInfo = existingCifsSes; | 1966 | pSesInfo = existingCifsSes; |
1964 | cFYI(1, ("Existing smb sess found")); | 1967 | cFYI(1, ("Existing smb sess found")); |
1965 | kfree(volume_info.password); | ||
1966 | /* volume_info.UNC freed at end of function */ | ||
1967 | } else if (!rc) { | 1968 | } else if (!rc) { |
1968 | cFYI(1, ("Existing smb sess not found")); | 1969 | cFYI(1, ("Existing smb sess not found")); |
1969 | pSesInfo = sesInfoAlloc(); | 1970 | pSesInfo = sesInfoAlloc(); |
@@ -1977,8 +1978,11 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
1977 | 1978 | ||
1978 | if (!rc) { | 1979 | if (!rc) { |
1979 | /* volume_info.password freed at unmount */ | 1980 | /* volume_info.password freed at unmount */ |
1980 | if (volume_info.password) | 1981 | if (volume_info.password) { |
1981 | pSesInfo->password = volume_info.password; | 1982 | pSesInfo->password = volume_info.password; |
1983 | /* set to NULL to prevent freeing on exit */ | ||
1984 | volume_info.password = NULL; | ||
1985 | } | ||
1982 | if (volume_info.username) | 1986 | if (volume_info.username) |
1983 | strncpy(pSesInfo->userName, | 1987 | strncpy(pSesInfo->userName, |
1984 | volume_info.username, | 1988 | volume_info.username, |
@@ -2000,8 +2004,7 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2000 | up(&pSesInfo->sesSem); | 2004 | up(&pSesInfo->sesSem); |
2001 | if (!rc) | 2005 | if (!rc) |
2002 | atomic_inc(&srvTcp->socketUseCount); | 2006 | atomic_inc(&srvTcp->socketUseCount); |
2003 | } else | 2007 | } |
2004 | kfree(volume_info.password); | ||
2005 | } | 2008 | } |
2006 | 2009 | ||
2007 | /* search for existing tcon to this server share */ | 2010 | /* search for existing tcon to this server share */ |
@@ -2106,9 +2109,8 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2106 | "", cifs_sb->local_nls, | 2109 | "", cifs_sb->local_nls, |
2107 | cifs_sb->mnt_cifs_flags & | 2110 | cifs_sb->mnt_cifs_flags & |
2108 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 2111 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
2109 | kfree(volume_info.UNC); | 2112 | rc = -ENODEV; |
2110 | FreeXid(xid); | 2113 | goto out; |
2111 | return -ENODEV; | ||
2112 | } else { | 2114 | } else { |
2113 | /* BB Do we need to wrap sesSem around | 2115 | /* BB Do we need to wrap sesSem around |
2114 | * this TCon call and Unix SetFS as | 2116 | * this TCon call and Unix SetFS as |
@@ -2231,6 +2233,12 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb, | |||
2231 | (in which case it is not needed anymore) but when new sesion is created | 2233 | (in which case it is not needed anymore) but when new sesion is created |
2232 | the password ptr is put in the new session structure (in which case the | 2234 | the password ptr is put in the new session structure (in which case the |
2233 | password will be freed at unmount time) */ | 2235 | password will be freed at unmount time) */ |
2236 | out: | ||
2237 | /* zero out password before freeing */ | ||
2238 | if (volume_info.password != NULL) { | ||
2239 | memset(volume_info.password, 0, strlen(volume_info.password)); | ||
2240 | kfree(volume_info.password); | ||
2241 | } | ||
2234 | kfree(volume_info.UNC); | 2242 | kfree(volume_info.UNC); |
2235 | kfree(volume_info.prepath); | 2243 | kfree(volume_info.prepath); |
2236 | FreeXid(xid); | 2244 | FreeXid(xid); |
@@ -2374,7 +2382,7 @@ CIFSSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
2374 | pSMB->req_no_secext.ByteCount = cpu_to_le16(count); | 2382 | pSMB->req_no_secext.ByteCount = cpu_to_le16(count); |
2375 | 2383 | ||
2376 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, | 2384 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, |
2377 | &bytes_returned, 1); | 2385 | &bytes_returned, CIFS_LONG_OP); |
2378 | if (rc) { | 2386 | if (rc) { |
2379 | /* rc = map_smb_to_linux_error(smb_buffer_response); now done in SendReceive */ | 2387 | /* rc = map_smb_to_linux_error(smb_buffer_response); now done in SendReceive */ |
2380 | } else if ((smb_buffer_response->WordCount == 3) | 2388 | } else if ((smb_buffer_response->WordCount == 3) |
@@ -2678,7 +2686,7 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned int xid, | |||
2678 | pSMB->req.ByteCount = cpu_to_le16(count); | 2686 | pSMB->req.ByteCount = cpu_to_le16(count); |
2679 | 2687 | ||
2680 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, | 2688 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, |
2681 | &bytes_returned, 1); | 2689 | &bytes_returned, CIFS_LONG_OP); |
2682 | 2690 | ||
2683 | if (smb_buffer_response->Status.CifsError == | 2691 | if (smb_buffer_response->Status.CifsError == |
2684 | cpu_to_le32(NT_STATUS_MORE_PROCESSING_REQUIRED)) | 2692 | cpu_to_le32(NT_STATUS_MORE_PROCESSING_REQUIRED)) |
@@ -3105,7 +3113,7 @@ CIFSNTLMSSPAuthSessSetup(unsigned int xid, struct cifsSesInfo *ses, | |||
3105 | pSMB->req.ByteCount = cpu_to_le16(count); | 3113 | pSMB->req.ByteCount = cpu_to_le16(count); |
3106 | 3114 | ||
3107 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, | 3115 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, |
3108 | &bytes_returned, 1); | 3116 | &bytes_returned, CIFS_LONG_OP); |
3109 | if (rc) { | 3117 | if (rc) { |
3110 | /* rc = map_smb_to_linux_error(smb_buffer_response) done in SendReceive now */ | 3118 | /* rc = map_smb_to_linux_error(smb_buffer_response) done in SendReceive now */ |
3111 | } else if ((smb_buffer_response->WordCount == 3) || | 3119 | } else if ((smb_buffer_response->WordCount == 3) || |
@@ -3381,7 +3389,8 @@ CIFSTCon(unsigned int xid, struct cifsSesInfo *ses, | |||
3381 | pSMB->hdr.smb_buf_length += count; | 3389 | pSMB->hdr.smb_buf_length += count; |
3382 | pSMB->ByteCount = cpu_to_le16(count); | 3390 | pSMB->ByteCount = cpu_to_le16(count); |
3383 | 3391 | ||
3384 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, &length, 0); | 3392 | rc = SendReceive(xid, ses, smb_buffer, smb_buffer_response, &length, |
3393 | CIFS_STD_OP); | ||
3385 | 3394 | ||
3386 | /* if (rc) rc = map_smb_to_linux_error(smb_buffer_response); */ | 3395 | /* if (rc) rc = map_smb_to_linux_error(smb_buffer_response); */ |
3387 | /* above now done in SendReceive */ | 3396 | /* above now done in SendReceive */ |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 68ad4ca0cfa3..dd26e2759b17 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -130,7 +130,9 @@ static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | |||
130 | if (file->f_path.dentry->d_inode->i_mapping) { | 130 | if (file->f_path.dentry->d_inode->i_mapping) { |
131 | /* BB no need to lock inode until after invalidate | 131 | /* BB no need to lock inode until after invalidate |
132 | since namei code should already have it locked? */ | 132 | since namei code should already have it locked? */ |
133 | filemap_write_and_wait(file->f_path.dentry->d_inode->i_mapping); | 133 | rc = filemap_write_and_wait(file->f_path.dentry->d_inode->i_mapping); |
134 | if (rc != 0) | ||
135 | CIFS_I(file->f_path.dentry->d_inode)->write_behind_rc = rc; | ||
134 | } | 136 | } |
135 | cFYI(1, ("invalidating remote inode since open detected it " | 137 | cFYI(1, ("invalidating remote inode since open detected it " |
136 | "changed")); | 138 | "changed")); |
@@ -425,7 +427,9 @@ reopen_error_exit: | |||
425 | pCifsInode = CIFS_I(inode); | 427 | pCifsInode = CIFS_I(inode); |
426 | if (pCifsInode) { | 428 | if (pCifsInode) { |
427 | if (can_flush) { | 429 | if (can_flush) { |
428 | filemap_write_and_wait(inode->i_mapping); | 430 | rc = filemap_write_and_wait(inode->i_mapping); |
431 | if (rc != 0) | ||
432 | CIFS_I(inode)->write_behind_rc = rc; | ||
429 | /* temporarily disable caching while we | 433 | /* temporarily disable caching while we |
430 | go to server to get inode info */ | 434 | go to server to get inode info */ |
431 | pCifsInode->clientCanCacheAll = FALSE; | 435 | pCifsInode->clientCanCacheAll = FALSE; |
@@ -835,9 +839,9 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, | |||
835 | xid = GetXid(); | 839 | xid = GetXid(); |
836 | 840 | ||
837 | if (*poffset > file->f_path.dentry->d_inode->i_size) | 841 | if (*poffset > file->f_path.dentry->d_inode->i_size) |
838 | long_op = 2; /* writes past end of file can take a long time */ | 842 | long_op = CIFS_VLONG_OP; /* writes past EOF take long time */ |
839 | else | 843 | else |
840 | long_op = 1; | 844 | long_op = CIFS_LONG_OP; |
841 | 845 | ||
842 | for (total_written = 0; write_size > total_written; | 846 | for (total_written = 0; write_size > total_written; |
843 | total_written += bytes_written) { | 847 | total_written += bytes_written) { |
@@ -884,7 +888,7 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, | |||
884 | } | 888 | } |
885 | } else | 889 | } else |
886 | *poffset += bytes_written; | 890 | *poffset += bytes_written; |
887 | long_op = FALSE; /* subsequent writes fast - | 891 | long_op = CIFS_STD_OP; /* subsequent writes fast - |
888 | 15 seconds is plenty */ | 892 | 15 seconds is plenty */ |
889 | } | 893 | } |
890 | 894 | ||
@@ -934,9 +938,9 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
934 | xid = GetXid(); | 938 | xid = GetXid(); |
935 | 939 | ||
936 | if (*poffset > file->f_path.dentry->d_inode->i_size) | 940 | if (*poffset > file->f_path.dentry->d_inode->i_size) |
937 | long_op = 2; /* writes past end of file can take a long time */ | 941 | long_op = CIFS_VLONG_OP; /* writes past EOF can be slow */ |
938 | else | 942 | else |
939 | long_op = 1; | 943 | long_op = CIFS_LONG_OP; |
940 | 944 | ||
941 | for (total_written = 0; write_size > total_written; | 945 | for (total_written = 0; write_size > total_written; |
942 | total_written += bytes_written) { | 946 | total_written += bytes_written) { |
@@ -1002,7 +1006,7 @@ static ssize_t cifs_write(struct file *file, const char *write_data, | |||
1002 | } | 1006 | } |
1003 | } else | 1007 | } else |
1004 | *poffset += bytes_written; | 1008 | *poffset += bytes_written; |
1005 | long_op = FALSE; /* subsequent writes fast - | 1009 | long_op = CIFS_STD_OP; /* subsequent writes fast - |
1006 | 15 seconds is plenty */ | 1010 | 15 seconds is plenty */ |
1007 | } | 1011 | } |
1008 | 1012 | ||
@@ -1087,11 +1091,11 @@ refind_writable: | |||
1087 | read_unlock(&GlobalSMBSeslock); | 1091 | read_unlock(&GlobalSMBSeslock); |
1088 | return open_file; | 1092 | return open_file; |
1089 | } | 1093 | } |
1090 | 1094 | ||
1091 | read_unlock(&GlobalSMBSeslock); | 1095 | read_unlock(&GlobalSMBSeslock); |
1092 | /* Had to unlock since following call can block */ | 1096 | /* Had to unlock since following call can block */ |
1093 | rc = cifs_reopen_file(open_file->pfile, FALSE); | 1097 | rc = cifs_reopen_file(open_file->pfile, FALSE); |
1094 | if (!rc) { | 1098 | if (!rc) { |
1095 | if (!open_file->closePend) | 1099 | if (!open_file->closePend) |
1096 | return open_file; | 1100 | return open_file; |
1097 | else { /* start over in case this was deleted */ | 1101 | else { /* start over in case this was deleted */ |
@@ -1114,7 +1118,7 @@ refind_writable: | |||
1114 | /* can not use this handle, no write | 1118 | /* can not use this handle, no write |
1115 | pending on this one after all */ | 1119 | pending on this one after all */ |
1116 | atomic_dec(&open_file->wrtPending); | 1120 | atomic_dec(&open_file->wrtPending); |
1117 | 1121 | ||
1118 | if (open_file->closePend) /* list could have changed */ | 1122 | if (open_file->closePend) /* list could have changed */ |
1119 | goto refind_writable; | 1123 | goto refind_writable; |
1120 | /* else we simply continue to the next entry. Thus | 1124 | /* else we simply continue to the next entry. Thus |
@@ -1360,14 +1364,17 @@ retry: | |||
1360 | open_file->netfid, | 1364 | open_file->netfid, |
1361 | bytes_to_write, offset, | 1365 | bytes_to_write, offset, |
1362 | &bytes_written, iov, n_iov, | 1366 | &bytes_written, iov, n_iov, |
1363 | 1); | 1367 | CIFS_LONG_OP); |
1364 | atomic_dec(&open_file->wrtPending); | 1368 | atomic_dec(&open_file->wrtPending); |
1365 | if (rc || bytes_written < bytes_to_write) { | 1369 | if (rc || bytes_written < bytes_to_write) { |
1366 | cERROR(1, ("Write2 ret %d, wrote %d", | 1370 | cERROR(1, ("Write2 ret %d, wrote %d", |
1367 | rc, bytes_written)); | 1371 | rc, bytes_written)); |
1368 | /* BB what if continued retry is | 1372 | /* BB what if continued retry is |
1369 | requested via mount flags? */ | 1373 | requested via mount flags? */ |
1370 | set_bit(AS_EIO, &mapping->flags); | 1374 | if (rc == -ENOSPC) |
1375 | set_bit(AS_ENOSPC, &mapping->flags); | ||
1376 | else | ||
1377 | set_bit(AS_EIO, &mapping->flags); | ||
1371 | } else { | 1378 | } else { |
1372 | cifs_stats_bytes_written(cifs_sb->tcon, | 1379 | cifs_stats_bytes_written(cifs_sb->tcon, |
1373 | bytes_written); | 1380 | bytes_written); |
@@ -1499,9 +1506,11 @@ int cifs_fsync(struct file *file, struct dentry *dentry, int datasync) | |||
1499 | cFYI(1, ("Sync file - name: %s datasync: 0x%x", | 1506 | cFYI(1, ("Sync file - name: %s datasync: 0x%x", |
1500 | dentry->d_name.name, datasync)); | 1507 | dentry->d_name.name, datasync)); |
1501 | 1508 | ||
1502 | rc = filemap_fdatawrite(inode->i_mapping); | 1509 | rc = filemap_write_and_wait(inode->i_mapping); |
1503 | if (rc == 0) | 1510 | if (rc == 0) { |
1511 | rc = CIFS_I(inode)->write_behind_rc; | ||
1504 | CIFS_I(inode)->write_behind_rc = 0; | 1512 | CIFS_I(inode)->write_behind_rc = 0; |
1513 | } | ||
1505 | FreeXid(xid); | 1514 | FreeXid(xid); |
1506 | return rc; | 1515 | return rc; |
1507 | } | 1516 | } |
@@ -1553,8 +1562,11 @@ int cifs_flush(struct file *file, fl_owner_t id) | |||
1553 | filemapfdatawrite appears easier for the time being */ | 1562 | filemapfdatawrite appears easier for the time being */ |
1554 | 1563 | ||
1555 | rc = filemap_fdatawrite(inode->i_mapping); | 1564 | rc = filemap_fdatawrite(inode->i_mapping); |
1556 | if (!rc) /* reset wb rc if we were able to write out dirty pages */ | 1565 | /* reset wb rc if we were able to write out dirty pages */ |
1566 | if (!rc) { | ||
1567 | rc = CIFS_I(inode)->write_behind_rc; | ||
1557 | CIFS_I(inode)->write_behind_rc = 0; | 1568 | CIFS_I(inode)->write_behind_rc = 0; |
1569 | } | ||
1558 | 1570 | ||
1559 | cFYI(1, ("Flush inode %p file %p rc %d", inode, file, rc)); | 1571 | cFYI(1, ("Flush inode %p file %p rc %d", inode, file, rc)); |
1560 | 1572 | ||
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 7d907e84e032..e915eb1d2e66 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1233,7 +1233,7 @@ cifs_rename_exit: | |||
1233 | int cifs_revalidate(struct dentry *direntry) | 1233 | int cifs_revalidate(struct dentry *direntry) |
1234 | { | 1234 | { |
1235 | int xid; | 1235 | int xid; |
1236 | int rc = 0; | 1236 | int rc = 0, wbrc = 0; |
1237 | char *full_path; | 1237 | char *full_path; |
1238 | struct cifs_sb_info *cifs_sb; | 1238 | struct cifs_sb_info *cifs_sb; |
1239 | struct cifsInodeInfo *cifsInode; | 1239 | struct cifsInodeInfo *cifsInode; |
@@ -1333,7 +1333,9 @@ int cifs_revalidate(struct dentry *direntry) | |||
1333 | if (direntry->d_inode->i_mapping) { | 1333 | if (direntry->d_inode->i_mapping) { |
1334 | /* do we need to lock inode until after invalidate completes | 1334 | /* do we need to lock inode until after invalidate completes |
1335 | below? */ | 1335 | below? */ |
1336 | filemap_fdatawrite(direntry->d_inode->i_mapping); | 1336 | wbrc = filemap_fdatawrite(direntry->d_inode->i_mapping); |
1337 | if (wbrc) | ||
1338 | CIFS_I(direntry->d_inode)->write_behind_rc = wbrc; | ||
1337 | } | 1339 | } |
1338 | if (invalidate_inode) { | 1340 | if (invalidate_inode) { |
1339 | /* shrink_dcache not necessary now that cifs dentry ops | 1341 | /* shrink_dcache not necessary now that cifs dentry ops |
@@ -1342,7 +1344,9 @@ int cifs_revalidate(struct dentry *direntry) | |||
1342 | shrink_dcache_parent(direntry); */ | 1344 | shrink_dcache_parent(direntry); */ |
1343 | if (S_ISREG(direntry->d_inode->i_mode)) { | 1345 | if (S_ISREG(direntry->d_inode->i_mode)) { |
1344 | if (direntry->d_inode->i_mapping) | 1346 | if (direntry->d_inode->i_mapping) |
1345 | filemap_fdatawait(direntry->d_inode->i_mapping); | 1347 | wbrc = filemap_fdatawait(direntry->d_inode->i_mapping); |
1348 | if (wbrc) | ||
1349 | CIFS_I(direntry->d_inode)->write_behind_rc = wbrc; | ||
1346 | /* may eventually have to do this for open files too */ | 1350 | /* may eventually have to do this for open files too */ |
1347 | if (list_empty(&(cifsInode->openFileList))) { | 1351 | if (list_empty(&(cifsInode->openFileList))) { |
1348 | /* changed on server - flush read ahead pages */ | 1352 | /* changed on server - flush read ahead pages */ |
@@ -1485,10 +1489,20 @@ int cifs_setattr(struct dentry *direntry, struct iattr *attrs) | |||
1485 | 1489 | ||
1486 | /* BB check if we need to refresh inode from server now ? BB */ | 1490 | /* BB check if we need to refresh inode from server now ? BB */ |
1487 | 1491 | ||
1488 | /* need to flush data before changing file size on server */ | ||
1489 | filemap_write_and_wait(direntry->d_inode->i_mapping); | ||
1490 | |||
1491 | if (attrs->ia_valid & ATTR_SIZE) { | 1492 | if (attrs->ia_valid & ATTR_SIZE) { |
1493 | /* | ||
1494 | Flush data before changing file size on server. If the | ||
1495 | flush returns error, store it to report later and continue. | ||
1496 | BB: This should be smarter. Why bother flushing pages that | ||
1497 | will be truncated anyway? Also, should we error out here if | ||
1498 | the flush returns error? | ||
1499 | */ | ||
1500 | rc = filemap_write_and_wait(direntry->d_inode->i_mapping); | ||
1501 | if (rc != 0) { | ||
1502 | CIFS_I(direntry->d_inode)->write_behind_rc = rc; | ||
1503 | rc = 0; | ||
1504 | } | ||
1505 | |||
1492 | /* To avoid spurious oplock breaks from server, in the case of | 1506 | /* To avoid spurious oplock breaks from server, in the case of |
1493 | inodes that we already have open, avoid doing path based | 1507 | inodes that we already have open, avoid doing path based |
1494 | setting of file size if we can do it by handle. | 1508 | setting of file size if we can do it by handle. |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 899dc6078d9a..d0cb469daab7 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "ntlmssp.h" | 29 | #include "ntlmssp.h" |
30 | #include "nterr.h" | 30 | #include "nterr.h" |
31 | #include <linux/utsname.h> | 31 | #include <linux/utsname.h> |
32 | #include "cifs_spnego.h" | ||
32 | 33 | ||
33 | extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, | 34 | extern void SMBNTencrypt(unsigned char *passwd, unsigned char *c8, |
34 | unsigned char *p24); | 35 | unsigned char *p24); |
@@ -340,11 +341,12 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
340 | SESSION_SETUP_ANDX *pSMB; | 341 | SESSION_SETUP_ANDX *pSMB; |
341 | __u32 capabilities; | 342 | __u32 capabilities; |
342 | int count; | 343 | int count; |
343 | int resp_buf_type = 0; | 344 | int resp_buf_type; |
344 | struct kvec iov[2]; | 345 | struct kvec iov[3]; |
345 | enum securityEnum type; | 346 | enum securityEnum type; |
346 | __u16 action; | 347 | __u16 action; |
347 | int bytes_remaining; | 348 | int bytes_remaining; |
349 | struct key *spnego_key = NULL; | ||
348 | 350 | ||
349 | if (ses == NULL) | 351 | if (ses == NULL) |
350 | return -EINVAL; | 352 | return -EINVAL; |
@@ -377,24 +379,32 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
377 | 379 | ||
378 | capabilities = cifs_ssetup_hdr(ses, pSMB); | 380 | capabilities = cifs_ssetup_hdr(ses, pSMB); |
379 | 381 | ||
380 | /* we will send the SMB in two pieces, | 382 | /* we will send the SMB in three pieces: |
381 | a fixed length beginning part, and a | 383 | a fixed length beginning part, an optional |
382 | second part which will include the strings | 384 | SPNEGO blob (which can be zero length), and a |
383 | and rest of bcc area, in order to avoid having | 385 | last part which will include the strings |
384 | to do a large buffer 17K allocation */ | 386 | and rest of bcc area. This allows us to avoid |
387 | a large buffer 17K allocation */ | ||
385 | iov[0].iov_base = (char *)pSMB; | 388 | iov[0].iov_base = (char *)pSMB; |
386 | iov[0].iov_len = smb_buf->smb_buf_length + 4; | 389 | iov[0].iov_len = smb_buf->smb_buf_length + 4; |
387 | 390 | ||
391 | /* setting this here allows the code at the end of the function | ||
392 | to free the request buffer if there's an error */ | ||
393 | resp_buf_type = CIFS_SMALL_BUFFER; | ||
394 | |||
388 | /* 2000 big enough to fit max user, domain, NOS name etc. */ | 395 | /* 2000 big enough to fit max user, domain, NOS name etc. */ |
389 | str_area = kmalloc(2000, GFP_KERNEL); | 396 | str_area = kmalloc(2000, GFP_KERNEL); |
390 | if (str_area == NULL) { | 397 | if (str_area == NULL) { |
391 | cifs_small_buf_release(smb_buf); | 398 | rc = -ENOMEM; |
392 | return -ENOMEM; | 399 | goto ssetup_exit; |
393 | } | 400 | } |
394 | bcc_ptr = str_area; | 401 | bcc_ptr = str_area; |
395 | 402 | ||
396 | ses->flags &= ~CIFS_SES_LANMAN; | 403 | ses->flags &= ~CIFS_SES_LANMAN; |
397 | 404 | ||
405 | iov[1].iov_base = NULL; | ||
406 | iov[1].iov_len = 0; | ||
407 | |||
398 | if (type == LANMAN) { | 408 | if (type == LANMAN) { |
399 | #ifdef CONFIG_CIFS_WEAK_PW_HASH | 409 | #ifdef CONFIG_CIFS_WEAK_PW_HASH |
400 | char lnm_session_key[CIFS_SESS_KEY_SIZE]; | 410 | char lnm_session_key[CIFS_SESS_KEY_SIZE]; |
@@ -463,8 +473,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
463 | struct ntlmv2_resp */ | 473 | struct ntlmv2_resp */ |
464 | 474 | ||
465 | if (v2_sess_key == NULL) { | 475 | if (v2_sess_key == NULL) { |
466 | cifs_small_buf_release(smb_buf); | 476 | rc = -ENOMEM; |
467 | return -ENOMEM; | 477 | goto ssetup_exit; |
468 | } | 478 | } |
469 | 479 | ||
470 | pSMB->req_no_secext.Capabilities = cpu_to_le32(capabilities); | 480 | pSMB->req_no_secext.Capabilities = cpu_to_le32(capabilities); |
@@ -499,22 +509,67 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
499 | unicode_ssetup_strings(&bcc_ptr, ses, nls_cp); | 509 | unicode_ssetup_strings(&bcc_ptr, ses, nls_cp); |
500 | } else | 510 | } else |
501 | ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); | 511 | ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); |
502 | } else /* NTLMSSP or SPNEGO */ { | 512 | } else if (type == Kerberos) { |
513 | #ifdef CONFIG_CIFS_UPCALL | ||
514 | struct cifs_spnego_msg *msg; | ||
515 | spnego_key = cifs_get_spnego_key(ses); | ||
516 | if (IS_ERR(spnego_key)) { | ||
517 | rc = PTR_ERR(spnego_key); | ||
518 | spnego_key = NULL; | ||
519 | goto ssetup_exit; | ||
520 | } | ||
521 | |||
522 | msg = spnego_key->payload.data; | ||
523 | /* bail out if key is too long */ | ||
524 | if (msg->sesskey_len > | ||
525 | sizeof(ses->server->mac_signing_key.data.krb5)) { | ||
526 | cERROR(1, ("Kerberos signing key too long (%u bytes)", | ||
527 | msg->sesskey_len)); | ||
528 | rc = -EOVERFLOW; | ||
529 | goto ssetup_exit; | ||
530 | } | ||
531 | ses->server->mac_signing_key.len = msg->sesskey_len; | ||
532 | memcpy(ses->server->mac_signing_key.data.krb5, msg->data, | ||
533 | msg->sesskey_len); | ||
503 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; | 534 | pSMB->req.hdr.Flags2 |= SMBFLG2_EXT_SEC; |
504 | capabilities |= CAP_EXTENDED_SECURITY; | 535 | capabilities |= CAP_EXTENDED_SECURITY; |
505 | pSMB->req.Capabilities = cpu_to_le32(capabilities); | 536 | pSMB->req.Capabilities = cpu_to_le32(capabilities); |
506 | /* BB set password lengths */ | 537 | iov[1].iov_base = msg->data + msg->sesskey_len; |
538 | iov[1].iov_len = msg->secblob_len; | ||
539 | pSMB->req.SecurityBlobLength = cpu_to_le16(iov[1].iov_len); | ||
540 | |||
541 | if (ses->capabilities & CAP_UNICODE) { | ||
542 | /* unicode strings must be word aligned */ | ||
543 | if (iov[0].iov_len % 2) { | ||
544 | *bcc_ptr = 0; | ||
545 | bcc_ptr++; | ||
546 | } | ||
547 | unicode_oslm_strings(&bcc_ptr, nls_cp); | ||
548 | unicode_domain_string(&bcc_ptr, ses, nls_cp); | ||
549 | } else | ||
550 | /* BB: is this right? */ | ||
551 | ascii_ssetup_strings(&bcc_ptr, ses, nls_cp); | ||
552 | #else /* ! CONFIG_CIFS_UPCALL */ | ||
553 | cERROR(1, ("Kerberos negotiated but upcall support disabled!")); | ||
554 | rc = -ENOSYS; | ||
555 | goto ssetup_exit; | ||
556 | #endif /* CONFIG_CIFS_UPCALL */ | ||
557 | } else { | ||
558 | cERROR(1, ("secType %d not supported!", type)); | ||
559 | rc = -ENOSYS; | ||
560 | goto ssetup_exit; | ||
507 | } | 561 | } |
508 | 562 | ||
509 | count = (long) bcc_ptr - (long) str_area; | 563 | iov[2].iov_base = str_area; |
564 | iov[2].iov_len = (long) bcc_ptr - (long) str_area; | ||
565 | |||
566 | count = iov[1].iov_len + iov[2].iov_len; | ||
510 | smb_buf->smb_buf_length += count; | 567 | smb_buf->smb_buf_length += count; |
511 | 568 | ||
512 | BCC_LE(smb_buf) = cpu_to_le16(count); | 569 | BCC_LE(smb_buf) = cpu_to_le16(count); |
513 | 570 | ||
514 | iov[1].iov_base = str_area; | 571 | rc = SendReceive2(xid, ses, iov, 3 /* num_iovecs */, &resp_buf_type, |
515 | iov[1].iov_len = count; | 572 | CIFS_STD_OP /* not long */ | CIFS_LOG_ERROR); |
516 | rc = SendReceive2(xid, ses, iov, 2 /* num_iovecs */, &resp_buf_type, | ||
517 | 0 /* not long op */, 1 /* log NT STATUS if any */ ); | ||
518 | /* SMB request buf freed in SendReceive2 */ | 573 | /* SMB request buf freed in SendReceive2 */ |
519 | 574 | ||
520 | cFYI(1, ("ssetup rc from sendrecv2 is %d", rc)); | 575 | cFYI(1, ("ssetup rc from sendrecv2 is %d", rc)); |
@@ -560,6 +615,8 @@ CIFS_SessSetup(unsigned int xid, struct cifsSesInfo *ses, int first_time, | |||
560 | ses, nls_cp); | 615 | ses, nls_cp); |
561 | 616 | ||
562 | ssetup_exit: | 617 | ssetup_exit: |
618 | if (spnego_key) | ||
619 | key_put(spnego_key); | ||
563 | kfree(str_area); | 620 | kfree(str_area); |
564 | if (resp_buf_type == CIFS_SMALL_BUFFER) { | 621 | if (resp_buf_type == CIFS_SMALL_BUFFER) { |
565 | cFYI(1, ("ssetup freeing small buf %p", iov[0].iov_base)); | 622 | cFYI(1, ("ssetup freeing small buf %p", iov[0].iov_base)); |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 7ed32b3cb781..50b623ad9320 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -308,7 +308,7 @@ smb_send2(struct socket *ssocket, struct kvec *iov, int n_vec, | |||
308 | 308 | ||
309 | static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op) | 309 | static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op) |
310 | { | 310 | { |
311 | if (long_op == -1) { | 311 | if (long_op == CIFS_ASYNC_OP) { |
312 | /* oplock breaks must not be held up */ | 312 | /* oplock breaks must not be held up */ |
313 | atomic_inc(&ses->server->inFlight); | 313 | atomic_inc(&ses->server->inFlight); |
314 | } else { | 314 | } else { |
@@ -337,7 +337,7 @@ static int wait_for_free_request(struct cifsSesInfo *ses, const int long_op) | |||
337 | as they are allowed to block on server */ | 337 | as they are allowed to block on server */ |
338 | 338 | ||
339 | /* update # of requests on the wire to server */ | 339 | /* update # of requests on the wire to server */ |
340 | if (long_op < 3) | 340 | if (long_op != CIFS_BLOCKING_OP) |
341 | atomic_inc(&ses->server->inFlight); | 341 | atomic_inc(&ses->server->inFlight); |
342 | spin_unlock(&GlobalMid_Lock); | 342 | spin_unlock(&GlobalMid_Lock); |
343 | break; | 343 | break; |
@@ -415,17 +415,48 @@ static int wait_for_response(struct cifsSesInfo *ses, | |||
415 | } | 415 | } |
416 | } | 416 | } |
417 | 417 | ||
418 | |||
419 | /* | ||
420 | * | ||
421 | * Send an SMB Request. No response info (other than return code) | ||
422 | * needs to be parsed. | ||
423 | * | ||
424 | * flags indicate the type of request buffer and how long to wait | ||
425 | * and whether to log NT STATUS code (error) before mapping it to POSIX error | ||
426 | * | ||
427 | */ | ||
428 | int | ||
429 | SendReceiveNoRsp(const unsigned int xid, struct cifsSesInfo *ses, | ||
430 | struct smb_hdr *in_buf, int flags) | ||
431 | { | ||
432 | int rc; | ||
433 | struct kvec iov[1]; | ||
434 | int resp_buf_type; | ||
435 | |||
436 | iov[0].iov_base = (char *)in_buf; | ||
437 | iov[0].iov_len = in_buf->smb_buf_length + 4; | ||
438 | flags |= CIFS_NO_RESP; | ||
439 | rc = SendReceive2(xid, ses, iov, 1, &resp_buf_type, flags); | ||
440 | #ifdef CONFIG_CIFS_DEBUG2 | ||
441 | cFYI(1, ("SendRcvNoR flags %d rc %d", flags, rc)); | ||
442 | #endif | ||
443 | return rc; | ||
444 | } | ||
445 | |||
418 | int | 446 | int |
419 | SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | 447 | SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, |
420 | struct kvec *iov, int n_vec, int *pRespBufType /* ret */, | 448 | struct kvec *iov, int n_vec, int *pRespBufType /* ret */, |
421 | const int long_op, const int logError) | 449 | const int flags) |
422 | { | 450 | { |
423 | int rc = 0; | 451 | int rc = 0; |
452 | int long_op; | ||
424 | unsigned int receive_len; | 453 | unsigned int receive_len; |
425 | unsigned long timeout; | 454 | unsigned long timeout; |
426 | struct mid_q_entry *midQ; | 455 | struct mid_q_entry *midQ; |
427 | struct smb_hdr *in_buf = iov[0].iov_base; | 456 | struct smb_hdr *in_buf = iov[0].iov_base; |
428 | 457 | ||
458 | long_op = flags & CIFS_TIMEOUT_MASK; | ||
459 | |||
429 | *pRespBufType = CIFS_NO_BUFFER; /* no response buf yet */ | 460 | *pRespBufType = CIFS_NO_BUFFER; /* no response buf yet */ |
430 | 461 | ||
431 | if ((ses == NULL) || (ses->server == NULL)) { | 462 | if ((ses == NULL) || (ses->server == NULL)) { |
@@ -483,15 +514,22 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
483 | if (rc < 0) | 514 | if (rc < 0) |
484 | goto out; | 515 | goto out; |
485 | 516 | ||
486 | if (long_op == -1) | 517 | if (long_op == CIFS_STD_OP) |
487 | goto out; | 518 | timeout = 15 * HZ; |
488 | else if (long_op == 2) /* writes past end of file can take loong time */ | 519 | else if (long_op == CIFS_VLONG_OP) /* e.g. slow writes past EOF */ |
489 | timeout = 180 * HZ; | 520 | timeout = 180 * HZ; |
490 | else if (long_op == 1) | 521 | else if (long_op == CIFS_LONG_OP) |
491 | timeout = 45 * HZ; /* should be greater than | 522 | timeout = 45 * HZ; /* should be greater than |
492 | servers oplock break timeout (about 43 seconds) */ | 523 | servers oplock break timeout (about 43 seconds) */ |
493 | else | 524 | else if (long_op == CIFS_ASYNC_OP) |
494 | timeout = 15 * HZ; | 525 | goto out; |
526 | else if (long_op == CIFS_BLOCKING_OP) | ||
527 | timeout = 0x7FFFFFFF; /* large, but not so large as to wrap */ | ||
528 | else { | ||
529 | cERROR(1, ("unknown timeout flag %d", long_op)); | ||
530 | rc = -EIO; | ||
531 | goto out; | ||
532 | } | ||
495 | 533 | ||
496 | /* wait for 15 seconds or until woken up due to response arriving or | 534 | /* wait for 15 seconds or until woken up due to response arriving or |
497 | due to last connection to this server being unmounted */ | 535 | due to last connection to this server being unmounted */ |
@@ -566,7 +604,8 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
566 | } | 604 | } |
567 | 605 | ||
568 | /* BB special case reconnect tid and uid here? */ | 606 | /* BB special case reconnect tid and uid here? */ |
569 | rc = map_smb_to_linux_error(midQ->resp_buf, logError); | 607 | rc = map_smb_to_linux_error(midQ->resp_buf, |
608 | flags & CIFS_LOG_ERROR); | ||
570 | 609 | ||
571 | /* convert ByteCount if necessary */ | 610 | /* convert ByteCount if necessary */ |
572 | if (receive_len >= sizeof(struct smb_hdr) - 4 | 611 | if (receive_len >= sizeof(struct smb_hdr) - 4 |
@@ -574,8 +613,10 @@ SendReceive2(const unsigned int xid, struct cifsSesInfo *ses, | |||
574 | (2 * midQ->resp_buf->WordCount) + 2 /* bcc */ ) | 613 | (2 * midQ->resp_buf->WordCount) + 2 /* bcc */ ) |
575 | BCC(midQ->resp_buf) = | 614 | BCC(midQ->resp_buf) = |
576 | le16_to_cpu(BCC_LE(midQ->resp_buf)); | 615 | le16_to_cpu(BCC_LE(midQ->resp_buf)); |
577 | midQ->resp_buf = NULL; /* mark it so will not be freed | 616 | if ((flags & CIFS_NO_RESP) == 0) |
578 | by DeleteMidQEntry */ | 617 | midQ->resp_buf = NULL; /* mark it so buf will |
618 | not be freed by | ||
619 | DeleteMidQEntry */ | ||
579 | } else { | 620 | } else { |
580 | rc = -EIO; | 621 | rc = -EIO; |
581 | cFYI(1, ("Bad MID state?")); | 622 | cFYI(1, ("Bad MID state?")); |
@@ -663,17 +704,25 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, | |||
663 | if (rc < 0) | 704 | if (rc < 0) |
664 | goto out; | 705 | goto out; |
665 | 706 | ||
666 | if (long_op == -1) | 707 | if (long_op == CIFS_STD_OP) |
708 | timeout = 15 * HZ; | ||
709 | /* wait for 15 seconds or until woken up due to response arriving or | ||
710 | due to last connection to this server being unmounted */ | ||
711 | else if (long_op == CIFS_ASYNC_OP) | ||
667 | goto out; | 712 | goto out; |
668 | else if (long_op == 2) /* writes past end of file can take loong time */ | 713 | else if (long_op == CIFS_VLONG_OP) /* writes past EOF can be slow */ |
669 | timeout = 180 * HZ; | 714 | timeout = 180 * HZ; |
670 | else if (long_op == 1) | 715 | else if (long_op == CIFS_LONG_OP) |
671 | timeout = 45 * HZ; /* should be greater than | 716 | timeout = 45 * HZ; /* should be greater than |
672 | servers oplock break timeout (about 43 seconds) */ | 717 | servers oplock break timeout (about 43 seconds) */ |
673 | else | 718 | else if (long_op == CIFS_BLOCKING_OP) |
674 | timeout = 15 * HZ; | 719 | timeout = 0x7FFFFFFF; /* large but no so large as to wrap */ |
675 | /* wait for 15 seconds or until woken up due to response arriving or | 720 | else { |
676 | due to last connection to this server being unmounted */ | 721 | cERROR(1, ("unknown timeout flag %d", long_op)); |
722 | rc = -EIO; | ||
723 | goto out; | ||
724 | } | ||
725 | |||
677 | if (signal_pending(current)) { | 726 | if (signal_pending(current)) { |
678 | /* if signal pending do not hold up user for full smb timeout | 727 | /* if signal pending do not hold up user for full smb timeout |
679 | but we still give response a chance to complete */ | 728 | but we still give response a chance to complete */ |
@@ -812,7 +861,7 @@ send_lock_cancel(const unsigned int xid, struct cifsTconInfo *tcon, | |||
812 | pSMB->hdr.Mid = GetNextMid(ses->server); | 861 | pSMB->hdr.Mid = GetNextMid(ses->server); |
813 | 862 | ||
814 | return SendReceive(xid, ses, in_buf, out_buf, | 863 | return SendReceive(xid, ses, in_buf, out_buf, |
815 | &bytes_returned, 0); | 864 | &bytes_returned, CIFS_STD_OP); |
816 | } | 865 | } |
817 | 866 | ||
818 | int | 867 | int |
@@ -844,7 +893,7 @@ SendReceiveBlockingLock(const unsigned int xid, struct cifsTconInfo *tcon, | |||
844 | to the same server. We may make this configurable later or | 893 | to the same server. We may make this configurable later or |
845 | use ses->maxReq */ | 894 | use ses->maxReq */ |
846 | 895 | ||
847 | rc = wait_for_free_request(ses, 3); | 896 | rc = wait_for_free_request(ses, CIFS_BLOCKING_OP); |
848 | if (rc) | 897 | if (rc) |
849 | return rc; | 898 | return rc; |
850 | 899 | ||
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 26d79f6db8a0..76411b1fc4fd 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -78,7 +78,6 @@ struct acpi_processor_cx { | |||
78 | struct acpi_processor_power { | 78 | struct acpi_processor_power { |
79 | struct cpuidle_device dev; | 79 | struct cpuidle_device dev; |
80 | struct acpi_processor_cx *state; | 80 | struct acpi_processor_cx *state; |
81 | struct acpi_processor_cx *bm_state; | ||
82 | unsigned long bm_check_timestamp; | 81 | unsigned long bm_check_timestamp; |
83 | u32 default_state; | 82 | u32 default_state; |
84 | u32 bm_activity; | 83 | u32 bm_activity; |
diff --git a/include/asm-blackfin/bfin-global.h b/include/asm-blackfin/bfin-global.h index 0212e180b90e..39bdd86871cf 100644 --- a/include/asm-blackfin/bfin-global.h +++ b/include/asm-blackfin/bfin-global.h | |||
@@ -50,8 +50,8 @@ extern unsigned long get_sclk(void); | |||
50 | extern unsigned long sclk_to_usecs(unsigned long sclk); | 50 | extern unsigned long sclk_to_usecs(unsigned long sclk); |
51 | extern unsigned long usecs_to_sclk(unsigned long usecs); | 51 | extern unsigned long usecs_to_sclk(unsigned long usecs); |
52 | 52 | ||
53 | extern void dump_thread(struct pt_regs *regs, struct user *dump); | 53 | extern void dump_bfin_process(struct pt_regs *regs); |
54 | extern void dump_bfin_regs(struct pt_regs *fp, void *retaddr); | 54 | extern void dump_bfin_mem(void *retaddr); |
55 | extern void dump_bfin_trace_buffer(void); | 55 | extern void dump_bfin_trace_buffer(void); |
56 | 56 | ||
57 | extern int init_arch_irq(void); | 57 | extern int init_arch_irq(void); |
@@ -63,6 +63,7 @@ extern void bfin_dcache_init(void); | |||
63 | extern int read_iloc(void); | 63 | extern int read_iloc(void); |
64 | extern int bfin_console_init(void); | 64 | extern int bfin_console_init(void); |
65 | extern asmlinkage void lower_to_irq14(void); | 65 | extern asmlinkage void lower_to_irq14(void); |
66 | extern asmlinkage void bfin_return_from_exception(void); | ||
66 | extern void init_exception_vectors(void); | 67 | extern void init_exception_vectors(void); |
67 | extern void init_dma(void); | 68 | extern void init_dma(void); |
68 | extern void program_IAR(void); | 69 | extern void program_IAR(void); |
diff --git a/include/asm-blackfin/cplbinit.h b/include/asm-blackfin/cplbinit.h index bec6ecdf1bdb..c4d0596e8e9f 100644 --- a/include/asm-blackfin/cplbinit.h +++ b/include/asm-blackfin/cplbinit.h | |||
@@ -27,6 +27,9 @@ | |||
27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 27 | * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #ifndef __ASM_CPLBINIT_H__ | ||
31 | #define __ASM_CPLBINIT_H__ | ||
32 | |||
30 | #include <asm/blackfin.h> | 33 | #include <asm/blackfin.h> |
31 | #include <asm/cplb.h> | 34 | #include <asm/cplb.h> |
32 | 35 | ||
@@ -57,8 +60,8 @@ struct cplb_tab { | |||
57 | u16 size; | 60 | u16 size; |
58 | }; | 61 | }; |
59 | 62 | ||
60 | extern u_long icplb_table[MAX_CPLBS+1]; | 63 | extern u_long icplb_table[]; |
61 | extern u_long dcplb_table[MAX_CPLBS+1]; | 64 | extern u_long dcplb_table[]; |
62 | 65 | ||
63 | /* Till here we are discussing about the static memory management model. | 66 | /* Till here we are discussing about the static memory management model. |
64 | * However, the operating envoronments commonly define more CPLB | 67 | * However, the operating envoronments commonly define more CPLB |
@@ -69,28 +72,16 @@ extern u_long dcplb_table[MAX_CPLBS+1]; | |||
69 | * This is how Page descriptor Table is implemented in uClinux/Blackfin. | 72 | * This is how Page descriptor Table is implemented in uClinux/Blackfin. |
70 | */ | 73 | */ |
71 | 74 | ||
72 | #ifdef CONFIG_CPLB_SWITCH_TAB_L1 | 75 | extern u_long ipdt_table[]; |
73 | extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]__attribute__((l1_data)); | 76 | extern u_long dpdt_table[]; |
74 | extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]__attribute__((l1_data)); | ||
75 | |||
76 | #ifdef CONFIG_CPLB_INFO | ||
77 | extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]__attribute__((l1_data)); | ||
78 | extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]__attribute__((l1_data)); | ||
79 | #endif /* CONFIG_CPLB_INFO */ | ||
80 | |||
81 | #else | ||
82 | |||
83 | extern u_long ipdt_table[MAX_SWITCH_I_CPLBS+1]; | ||
84 | extern u_long dpdt_table[MAX_SWITCH_D_CPLBS+1]; | ||
85 | |||
86 | #ifdef CONFIG_CPLB_INFO | 77 | #ifdef CONFIG_CPLB_INFO |
87 | extern u_long ipdt_swapcount_table[MAX_SWITCH_I_CPLBS]; | 78 | extern u_long ipdt_swapcount_table[]; |
88 | extern u_long dpdt_swapcount_table[MAX_SWITCH_D_CPLBS]; | 79 | extern u_long dpdt_swapcount_table[]; |
89 | #endif /* CONFIG_CPLB_INFO */ | 80 | #endif |
90 | |||
91 | #endif /*CONFIG_CPLB_SWITCH_TAB_L1*/ | ||
92 | 81 | ||
93 | extern unsigned long reserved_mem_dcache_on; | 82 | extern unsigned long reserved_mem_dcache_on; |
94 | extern unsigned long reserved_mem_icache_on; | 83 | extern unsigned long reserved_mem_icache_on; |
95 | 84 | ||
96 | extern void generate_cpl_tables(void); | 85 | extern void generate_cpl_tables(void); |
86 | |||
87 | #endif | ||
diff --git a/include/asm-blackfin/delay.h b/include/asm-blackfin/delay.h index 52e7a10d7ff8..473a8113277f 100644 --- a/include/asm-blackfin/delay.h +++ b/include/asm-blackfin/delay.h | |||
@@ -1,29 +1,47 @@ | |||
1 | #ifndef _BLACKFIN_DELAY_H | ||
2 | #define _BLACKFIN_DELAY_H | ||
3 | |||
4 | static inline void __delay(unsigned long loops) | ||
5 | { | ||
6 | |||
7 | /* FIXME: Currently the assembler doesn't recognize Loop Register Clobbers, | ||
8 | uncomment this as soon those are implemented */ | ||
9 | /* | 1 | /* |
10 | __asm__ __volatile__ ( "\t LSETUP (1f,1f) LC0= %0\n\t" | 2 | * delay.h - delay functions |
11 | "1:\t NOP;\n\t" | 3 | * |
12 | : :"a" (loops) | 4 | * Copyright (c) 2004-2007 Analog Devices Inc. |
13 | : "LT0","LB0","LC0"); | 5 | * |
6 | * Licensed under the GPL-2 or later. | ||
7 | */ | ||
8 | |||
9 | #ifndef __ASM_DELAY_H__ | ||
10 | #define __ASM_DELAY_H__ | ||
14 | 11 | ||
15 | */ | 12 | #include <asm/mach/anomaly.h> |
16 | 13 | ||
17 | __asm__ __volatile__("[--SP] = LC0;\n\t" | 14 | static inline void __delay(unsigned long loops) |
18 | "[--SP] = LT0;\n\t" | 15 | { |
19 | "[--SP] = LB0;\n\t" | 16 | if (ANOMALY_05000312) { |
20 | "LSETUP (1f,1f) LC0 = %0;\n\t" | 17 | /* Interrupted loads to loop registers -> bad */ |
21 | "1:\t NOP;\n\t" | 18 | unsigned long tmp; |
22 | "LB0 = [SP++];\n\t" | 19 | __asm__ __volatile__( |
23 | "LT0 = [SP++];\n\t" | 20 | "[--SP] = LC0;" |
24 | "LC0 = [SP++];\n" | 21 | "[--SP] = LT0;" |
25 | : | 22 | "[--SP] = LB0;" |
26 | :"a" (loops)); | 23 | "LSETUP (1f,1f) LC0 = %1;" |
24 | "1: NOP;" | ||
25 | /* We take advantage of the fact that LC0 is 0 at | ||
26 | * the end of the loop. Otherwise we'd need some | ||
27 | * NOPs after the CLI here. | ||
28 | */ | ||
29 | "CLI %0;" | ||
30 | "LB0 = [SP++];" | ||
31 | "LT0 = [SP++];" | ||
32 | "LC0 = [SP++];" | ||
33 | "STI %0;" | ||
34 | : "=d" (tmp) | ||
35 | : "a" (loops) | ||
36 | ); | ||
37 | } else | ||
38 | __asm__ __volatile__ ( | ||
39 | "LSETUP(1f, 1f) LC0 = %0;" | ||
40 | "1: NOP;" | ||
41 | : | ||
42 | : "a" (loops) | ||
43 | : "LT0", "LB0", "LC0" | ||
44 | ); | ||
27 | } | 45 | } |
28 | 46 | ||
29 | #include <linux/param.h> /* needed for HZ */ | 47 | #include <linux/param.h> /* needed for HZ */ |
@@ -41,4 +59,4 @@ static inline void udelay(unsigned long usecs) | |||
41 | __delay(usecs * loops_per_jiffy / (1000000 / HZ)); | 59 | __delay(usecs * loops_per_jiffy / (1000000 / HZ)); |
42 | } | 60 | } |
43 | 61 | ||
44 | #endif /* defined(_BLACKFIN_DELAY_H) */ | 62 | #endif |
diff --git a/include/asm-blackfin/io.h b/include/asm-blackfin/io.h index d1d2e6be3b59..1601d62f39a5 100644 --- a/include/asm-blackfin/io.h +++ b/include/asm-blackfin/io.h | |||
@@ -122,6 +122,7 @@ extern void outsl(unsigned long port, const void *addr, unsigned long count); | |||
122 | extern void insb(unsigned long port, void *addr, unsigned long count); | 122 | extern void insb(unsigned long port, void *addr, unsigned long count); |
123 | extern void insw(unsigned long port, void *addr, unsigned long count); | 123 | extern void insw(unsigned long port, void *addr, unsigned long count); |
124 | extern void insl(unsigned long port, void *addr, unsigned long count); | 124 | extern void insl(unsigned long port, void *addr, unsigned long count); |
125 | extern void insl_16(unsigned long port, void *addr, unsigned long count); | ||
125 | 126 | ||
126 | extern void dma_outsb(unsigned long port, const void *addr, unsigned short count); | 127 | extern void dma_outsb(unsigned long port, const void *addr, unsigned short count); |
127 | extern void dma_outsw(unsigned long port, const void *addr, unsigned short count); | 128 | extern void dma_outsw(unsigned long port, const void *addr, unsigned short count); |
diff --git a/include/asm-blackfin/mach-bf527/irq.h b/include/asm-blackfin/mach-bf527/irq.h index 304f5bcfebe4..4e2b3f2020e5 100644 --- a/include/asm-blackfin/mach-bf527/irq.h +++ b/include/asm-blackfin/mach-bf527/irq.h | |||
@@ -176,11 +176,7 @@ | |||
176 | 176 | ||
177 | #define GPIO_IRQ_BASE IRQ_PF0 | 177 | #define GPIO_IRQ_BASE IRQ_PF0 |
178 | 178 | ||
179 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
180 | #define NR_IRQS (IRQ_PH15+1) | 179 | #define NR_IRQS (IRQ_PH15+1) |
181 | #else | ||
182 | #define NR_IRQS (SYS_IRQS+1) | ||
183 | #endif | ||
184 | 180 | ||
185 | #define IVG7 7 | 181 | #define IVG7 7 |
186 | #define IVG8 8 | 182 | #define IVG8 8 |
diff --git a/include/asm-blackfin/mach-bf527/mem_map.h b/include/asm-blackfin/mach-bf527/mem_map.h index c5aa20102b24..193082deaa4e 100644 --- a/include/asm-blackfin/mach-bf527/mem_map.h +++ b/include/asm-blackfin/mach-bf527/mem_map.h | |||
@@ -47,6 +47,7 @@ | |||
47 | /* Boot ROM Memory */ | 47 | /* Boot ROM Memory */ |
48 | 48 | ||
49 | #define BOOT_ROM_START 0xEF000000 | 49 | #define BOOT_ROM_START 0xEF000000 |
50 | #define BOOT_ROM_LENGTH 0x8000 | ||
50 | 51 | ||
51 | /* Level 1 Memory */ | 52 | /* Level 1 Memory */ |
52 | 53 | ||
@@ -90,9 +91,7 @@ | |||
90 | 91 | ||
91 | /* Scratch Pad Memory */ | 92 | /* Scratch Pad Memory */ |
92 | 93 | ||
93 | #if defined(CONFIG_BF527) || defined(CONFIG_BF536) || defined(CONFIG_BF534) | ||
94 | #define L1_SCRATCH_START 0xFFB00000 | 94 | #define L1_SCRATCH_START 0xFFB00000 |
95 | #define L1_SCRATCH_LENGTH 0x1000 | 95 | #define L1_SCRATCH_LENGTH 0x1000 |
96 | #endif | ||
97 | 96 | ||
98 | #endif /* _MEM_MAP_527_H_ */ | 97 | #endif /* _MEM_MAP_527_H_ */ |
diff --git a/include/asm-blackfin/mach-bf533/irq.h b/include/asm-blackfin/mach-bf533/irq.h index 452fb825d891..832e6f6122da 100644 --- a/include/asm-blackfin/mach-bf533/irq.h +++ b/include/asm-blackfin/mach-bf533/irq.h | |||
@@ -130,11 +130,7 @@ Core Emulation ** | |||
130 | 130 | ||
131 | #define GPIO_IRQ_BASE IRQ_PF0 | 131 | #define GPIO_IRQ_BASE IRQ_PF0 |
132 | 132 | ||
133 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
134 | #define NR_IRQS (IRQ_PF15+1) | 133 | #define NR_IRQS (IRQ_PF15+1) |
135 | #else | ||
136 | #define NR_IRQS SYS_IRQS | ||
137 | #endif | ||
138 | 134 | ||
139 | #define IVG7 7 | 135 | #define IVG7 7 |
140 | #define IVG8 8 | 136 | #define IVG8 8 |
diff --git a/include/asm-blackfin/mach-bf533/mem_map.h b/include/asm-blackfin/mach-bf533/mem_map.h index 94d8c4062eb7..bd30b6f3be00 100644 --- a/include/asm-blackfin/mach-bf533/mem_map.h +++ b/include/asm-blackfin/mach-bf533/mem_map.h | |||
@@ -1,4 +1,3 @@ | |||
1 | |||
2 | /* | 1 | /* |
3 | * File: include/asm-blackfin/mach-bf533/mem_map.h | 2 | * File: include/asm-blackfin/mach-bf533/mem_map.h |
4 | * Based on: | 3 | * Based on: |
@@ -48,6 +47,7 @@ | |||
48 | /* Boot ROM Memory */ | 47 | /* Boot ROM Memory */ |
49 | 48 | ||
50 | #define BOOT_ROM_START 0xEF000000 | 49 | #define BOOT_ROM_START 0xEF000000 |
50 | #define BOOT_ROM_LENGTH 0x400 | ||
51 | 51 | ||
52 | /* Level 1 Memory */ | 52 | /* Level 1 Memory */ |
53 | 53 | ||
@@ -160,9 +160,7 @@ | |||
160 | 160 | ||
161 | /* Scratch Pad Memory */ | 161 | /* Scratch Pad Memory */ |
162 | 162 | ||
163 | #if defined(CONFIG_BF533) || defined(CONFIG_BF532) || defined(CONFIG_BF531) | ||
164 | #define L1_SCRATCH_START 0xFFB00000 | 163 | #define L1_SCRATCH_START 0xFFB00000 |
165 | #define L1_SCRATCH_LENGTH 0x1000 | 164 | #define L1_SCRATCH_LENGTH 0x1000 |
166 | #endif | ||
167 | 165 | ||
168 | #endif /* _MEM_MAP_533_H_ */ | 166 | #endif /* _MEM_MAP_533_H_ */ |
diff --git a/include/asm-blackfin/mach-bf537/irq.h b/include/asm-blackfin/mach-bf537/irq.h index 36c44bc1a917..be6f2ff77f31 100644 --- a/include/asm-blackfin/mach-bf537/irq.h +++ b/include/asm-blackfin/mach-bf537/irq.h | |||
@@ -162,11 +162,7 @@ Core Emulation ** | |||
162 | 162 | ||
163 | #define GPIO_IRQ_BASE IRQ_PF0 | 163 | #define GPIO_IRQ_BASE IRQ_PF0 |
164 | 164 | ||
165 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
166 | #define NR_IRQS (IRQ_PH15+1) | 165 | #define NR_IRQS (IRQ_PH15+1) |
167 | #else | ||
168 | #define NR_IRQS (IRQ_UART1_ERROR+1) | ||
169 | #endif | ||
170 | 166 | ||
171 | #define IVG7 7 | 167 | #define IVG7 7 |
172 | #define IVG8 8 | 168 | #define IVG8 8 |
diff --git a/include/asm-blackfin/mach-bf537/mem_map.h b/include/asm-blackfin/mach-bf537/mem_map.h index 18759e38eaae..5c6726d6f3b1 100644 --- a/include/asm-blackfin/mach-bf537/mem_map.h +++ b/include/asm-blackfin/mach-bf537/mem_map.h | |||
@@ -47,6 +47,7 @@ | |||
47 | /* Boot ROM Memory */ | 47 | /* Boot ROM Memory */ |
48 | 48 | ||
49 | #define BOOT_ROM_START 0xEF000000 | 49 | #define BOOT_ROM_START 0xEF000000 |
50 | #define BOOT_ROM_LENGTH 0x800 | ||
50 | 51 | ||
51 | /* Level 1 Memory */ | 52 | /* Level 1 Memory */ |
52 | 53 | ||
@@ -167,9 +168,7 @@ | |||
167 | 168 | ||
168 | /* Scratch Pad Memory */ | 169 | /* Scratch Pad Memory */ |
169 | 170 | ||
170 | #if defined(CONFIG_BF537) || defined(CONFIG_BF536) || defined(CONFIG_BF534) | ||
171 | #define L1_SCRATCH_START 0xFFB00000 | 171 | #define L1_SCRATCH_START 0xFFB00000 |
172 | #define L1_SCRATCH_LENGTH 0x1000 | 172 | #define L1_SCRATCH_LENGTH 0x1000 |
173 | #endif | ||
174 | 173 | ||
175 | #endif /* _MEM_MAP_537_H_ */ | 174 | #endif /* _MEM_MAP_537_H_ */ |
diff --git a/include/asm-blackfin/mach-bf548/bf548.h b/include/asm-blackfin/mach-bf548/bf548.h index 7e6d349beb08..e748588e8930 100644 --- a/include/asm-blackfin/mach-bf548/bf548.h +++ b/include/asm-blackfin/mach-bf548/bf548.h | |||
@@ -106,24 +106,22 @@ | |||
106 | 106 | ||
107 | #define AMGCTLVAL (V_AMBEN | V_AMCKEN) | 107 | #define AMGCTLVAL (V_AMBEN | V_AMCKEN) |
108 | 108 | ||
109 | #ifdef CONFIG_BF542 | 109 | #if defined(CONFIG_BF542) |
110 | #define CPU "BF542" | 110 | # define CPU "BF542" |
111 | #define CPUID 0x027c8000 | 111 | # define CPUID 0x027c8000 |
112 | #endif | 112 | #elif defined(CONFIG_BF544) |
113 | #ifdef CONFIG_BF544 | 113 | # define CPU "BF544" |
114 | #define CPU "BF544" | 114 | # define CPUID 0x027c8000 |
115 | #define CPUID 0x027c8000 | 115 | #elif defined(CONFIG_BF547) |
116 | #endif | 116 | # define CPU "BF547" |
117 | #ifdef CONFIG_BF548 | 117 | #elif defined(CONFIG_BF548) |
118 | #define CPU "BF548" | 118 | # define CPU "BF548" |
119 | #define CPUID 0x027c6000 | 119 | # define CPUID 0x027c6000 |
120 | #endif | 120 | #elif defined(CONFIG_BF549) |
121 | #ifdef CONFIG_BF549 | 121 | # define CPU "BF549" |
122 | #define CPU "BF549" | 122 | #else |
123 | #endif | 123 | # define CPU "UNKNOWN" |
124 | #ifndef CPU | 124 | # define CPUID 0x0 |
125 | #define CPU "UNKNOWN" | ||
126 | #define CPUID 0x0 | ||
127 | #endif | 125 | #endif |
128 | 126 | ||
129 | #endif /* __MACH_BF48_H__ */ | 127 | #endif /* __MACH_BF48_H__ */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF544.h b/include/asm-blackfin/mach-bf548/defBF544.h index 760307e34b9e..b8b9870e2697 100644 --- a/include/asm-blackfin/mach-bf548/defBF544.h +++ b/include/asm-blackfin/mach-bf548/defBF544.h | |||
@@ -645,7 +645,7 @@ | |||
645 | 645 | ||
646 | /* Bit masks for HOST_STATUS */ | 646 | /* Bit masks for HOST_STATUS */ |
647 | 647 | ||
648 | #define READY 0x1 /* DMA Ready */ | 648 | #define DMA_READY 0x1 /* DMA Ready */ |
649 | #define FIFOFULL 0x2 /* FIFO Full */ | 649 | #define FIFOFULL 0x2 /* FIFO Full */ |
650 | #define FIFOEMPTY 0x4 /* FIFO Empty */ | 650 | #define FIFOEMPTY 0x4 /* FIFO Empty */ |
651 | #define COMPLETE 0x8 /* DMA Complete */ | 651 | #define COMPLETE 0x8 /* DMA Complete */ |
diff --git a/include/asm-blackfin/mach-bf548/defBF548.h b/include/asm-blackfin/mach-bf548/defBF548.h index 70af33c963b0..ecbca952985c 100644 --- a/include/asm-blackfin/mach-bf548/defBF548.h +++ b/include/asm-blackfin/mach-bf548/defBF548.h | |||
@@ -1007,7 +1007,7 @@ | |||
1007 | 1007 | ||
1008 | /* Bit masks for HOST_STATUS */ | 1008 | /* Bit masks for HOST_STATUS */ |
1009 | 1009 | ||
1010 | #define READY 0x1 /* DMA Ready */ | 1010 | #define DMA_READY 0x1 /* DMA Ready */ |
1011 | #define FIFOFULL 0x2 /* FIFO Full */ | 1011 | #define FIFOFULL 0x2 /* FIFO Full */ |
1012 | #define FIFOEMPTY 0x4 /* FIFO Empty */ | 1012 | #define FIFOEMPTY 0x4 /* FIFO Empty */ |
1013 | #define COMPLETE 0x8 /* DMA Complete */ | 1013 | #define COMPLETE 0x8 /* DMA Complete */ |
diff --git a/include/asm-blackfin/mach-bf548/irq.h b/include/asm-blackfin/mach-bf548/irq.h index 3b08cf9bd6f3..9fb7bc5399a8 100644 --- a/include/asm-blackfin/mach-bf548/irq.h +++ b/include/asm-blackfin/mach-bf548/irq.h | |||
@@ -338,11 +338,7 @@ Events (highest priority) EMU 0 | |||
338 | 338 | ||
339 | #define GPIO_IRQ_BASE IRQ_PA0 | 339 | #define GPIO_IRQ_BASE IRQ_PA0 |
340 | 340 | ||
341 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
342 | #define NR_IRQS (IRQ_PJ15+1) | 341 | #define NR_IRQS (IRQ_PJ15+1) |
343 | #else | ||
344 | #define NR_IRQS (SYS_IRQS+1) | ||
345 | #endif | ||
346 | 342 | ||
347 | /* For compatibility reasons with existing code */ | 343 | /* For compatibility reasons with existing code */ |
348 | 344 | ||
diff --git a/include/asm-blackfin/mach-bf548/mem_map.h b/include/asm-blackfin/mach-bf548/mem_map.h index ec1597e31831..f99f47bc3a07 100644 --- a/include/asm-blackfin/mach-bf548/mem_map.h +++ b/include/asm-blackfin/mach-bf548/mem_map.h | |||
@@ -47,6 +47,12 @@ | |||
47 | /* Boot ROM Memory */ | 47 | /* Boot ROM Memory */ |
48 | 48 | ||
49 | #define BOOT_ROM_START 0xEF000000 | 49 | #define BOOT_ROM_START 0xEF000000 |
50 | #define BOOT_ROM_LENGTH 0x1000 | ||
51 | |||
52 | /* L1 Instruction ROM */ | ||
53 | |||
54 | #define L1_ROM_START 0xFFA14000 | ||
55 | #define L1_ROM_LENGTH 0x10000 | ||
50 | 56 | ||
51 | /* Level 1 Memory */ | 57 | /* Level 1 Memory */ |
52 | 58 | ||
@@ -87,11 +93,19 @@ | |||
87 | #define BFIN_DSUPBANKS 0 | 93 | #define BFIN_DSUPBANKS 0 |
88 | #endif /*CONFIG_BFIN_DCACHE*/ | 94 | #endif /*CONFIG_BFIN_DCACHE*/ |
89 | 95 | ||
96 | /* Level 2 Memory */ | ||
97 | #if !defined(CONFIG_BF542) | ||
98 | # define L2_START 0xFEB00000 | ||
99 | # if defined(CONFIG_BF544) | ||
100 | # define L2_LENGTH 0x10000 | ||
101 | # else | ||
102 | # define L2_LENGTH 0x20000 | ||
103 | # endif | ||
104 | #endif | ||
105 | |||
90 | /* Scratch Pad Memory */ | 106 | /* Scratch Pad Memory */ |
91 | 107 | ||
92 | #if defined(CONFIG_BF54x) | ||
93 | #define L1_SCRATCH_START 0xFFB00000 | 108 | #define L1_SCRATCH_START 0xFFB00000 |
94 | #define L1_SCRATCH_LENGTH 0x1000 | 109 | #define L1_SCRATCH_LENGTH 0x1000 |
95 | #endif | ||
96 | 110 | ||
97 | #endif/* _MEM_MAP_548_H_ */ | 111 | #endif/* _MEM_MAP_548_H_ */ |
diff --git a/include/asm-blackfin/mach-bf561/bf561.h b/include/asm-blackfin/mach-bf561/bf561.h index 17e1d5dcef02..3ef9e5f36136 100644 --- a/include/asm-blackfin/mach-bf561/bf561.h +++ b/include/asm-blackfin/mach-bf561/bf561.h | |||
@@ -33,25 +33,6 @@ | |||
33 | #define SUPPORTED_REVID 0x3 | 33 | #define SUPPORTED_REVID 0x3 |
34 | 34 | ||
35 | #define OFFSET_(x) ((x) & 0x0000FFFF) | 35 | #define OFFSET_(x) ((x) & 0x0000FFFF) |
36 | #define L1_ISRAM 0xFFA00000 | ||
37 | #define L1_ISRAM_END 0xFFA04000 | ||
38 | #define DATA_BANKA_SRAM 0xFF800000 | ||
39 | #define DATA_BANKA_SRAM_END 0xFF804000 | ||
40 | #define DATA_BANKB_SRAM 0xFF900000 | ||
41 | #define DATA_BANKB_SRAM_END 0xFF904000 | ||
42 | #define L1_DSRAMA 0xFF800000 | ||
43 | #define L1_DSRAMA_END 0xFF804000 | ||
44 | #define L1_DSRAMB 0xFF900000 | ||
45 | #define L1_DSRAMB_END 0xFF904000 | ||
46 | #define L2_SRAM 0xFEB00000 | ||
47 | #define L2_SRAM_END 0xFEB20000 | ||
48 | #define AMB_FLASH 0x20000000 | ||
49 | #define AMB_FLASH_END 0x21000000 | ||
50 | #define AMB_FLASH_LENGTH 0x01000000 | ||
51 | #define L1_ISRAM_LENGTH 0x4000 | ||
52 | #define L1_DSRAMA_LENGTH 0x4000 | ||
53 | #define L1_DSRAMB_LENGTH 0x4000 | ||
54 | #define L2_SRAM_LENGTH 0x20000 | ||
55 | 36 | ||
56 | /*some misc defines*/ | 37 | /*some misc defines*/ |
57 | #define IMASK_IVG15 0x8000 | 38 | #define IMASK_IVG15 0x8000 |
diff --git a/include/asm-blackfin/mach-bf561/defBF561.h b/include/asm-blackfin/mach-bf561/defBF561.h index 7945e8a3a841..c3c0eb13c819 100644 --- a/include/asm-blackfin/mach-bf561/defBF561.h +++ b/include/asm-blackfin/mach-bf561/defBF561.h | |||
@@ -55,6 +55,7 @@ | |||
55 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ | 55 | /* For MMR's that are reserved on Core B, set up defines to better integrate with other ports */ |
56 | #define SWRST SICA_SWRST | 56 | #define SWRST SICA_SWRST |
57 | #define SYSCR SICA_SYSCR | 57 | #define SYSCR SICA_SYSCR |
58 | #define DOUBLE_FAULT (DOUBLE_FAULT_B|DOUBLE_FAULT_A) | ||
58 | #define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A) | 59 | #define RESET_DOUBLE (SWRST_DBL_FAULT_B|SWRST_DBL_FAULT_A) |
59 | #define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A) | 60 | #define RESET_WDOG (SWRST_WDT_B|SWRST_WDT_A) |
60 | #define RESET_SOFTWARE (SWRST_OCCURRED) | 61 | #define RESET_SOFTWARE (SWRST_OCCURRED) |
@@ -877,12 +878,14 @@ | |||
877 | #define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */ | 878 | #define PLL_LOCKED 0x0020 /* PLL_LOCKCNT Has Been Reached */ |
878 | 879 | ||
879 | /* SWRST Mask */ | 880 | /* SWRST Mask */ |
880 | #define SYSTEM_RESET 0x00000007 /* Initiates a system software reset */ | 881 | #define SYSTEM_RESET 0x0007 /* Initiates a system software reset */ |
881 | #define SWRST_DBL_FAULT_B 0x00000800 /* SWRST Core B Double Fault */ | 882 | #define DOUBLE_FAULT_A 0x0008 /* Core A Double Fault Causes Reset */ |
882 | #define SWRST_DBL_FAULT_A 0x00001000 /* SWRST Core A Double Fault */ | 883 | #define DOUBLE_FAULT_B 0x0010 /* Core B Double Fault Causes Reset */ |
883 | #define SWRST_WDT_B 0x00002000 /* SWRST Watchdog B */ | 884 | #define SWRST_DBL_FAULT_A 0x0800 /* SWRST Core A Double Fault */ |
884 | #define SWRST_WDT_A 0x00004000 /* SWRST Watchdog A */ | 885 | #define SWRST_DBL_FAULT_B 0x1000 /* SWRST Core B Double Fault */ |
885 | #define SWRST_OCCURRED 0x00008000 /* SWRST Status */ | 886 | #define SWRST_WDT_B 0x2000 /* SWRST Watchdog B */ |
887 | #define SWRST_WDT_A 0x4000 /* SWRST Watchdog A */ | ||
888 | #define SWRST_OCCURRED 0x8000 /* SWRST Status */ | ||
886 | 889 | ||
887 | /* ************* SYSTEM INTERRUPT CONTROLLER MASKS ***************** */ | 890 | /* ************* SYSTEM INTERRUPT CONTROLLER MASKS ***************** */ |
888 | 891 | ||
diff --git a/include/asm-blackfin/mach-bf561/irq.h b/include/asm-blackfin/mach-bf561/irq.h index 12789927db3d..83f0383957d2 100644 --- a/include/asm-blackfin/mach-bf561/irq.h +++ b/include/asm-blackfin/mach-bf561/irq.h | |||
@@ -291,11 +291,7 @@ | |||
291 | 291 | ||
292 | #define GPIO_IRQ_BASE IRQ_PF0 | 292 | #define GPIO_IRQ_BASE IRQ_PF0 |
293 | 293 | ||
294 | #ifdef CONFIG_IRQCHIP_DEMUX_GPIO | ||
295 | #define NR_IRQS (IRQ_PF47 + 1) | 294 | #define NR_IRQS (IRQ_PF47 + 1) |
296 | #else | ||
297 | #define NR_IRQS SYS_IRQS | ||
298 | #endif | ||
299 | 295 | ||
300 | #define IVG7 7 | 296 | #define IVG7 7 |
301 | #define IVG8 8 | 297 | #define IVG8 8 |
diff --git a/include/asm-blackfin/mach-bf561/mem_map.h b/include/asm-blackfin/mach-bf561/mem_map.h index f7ac09cf2c3d..c26d8486cc4b 100644 --- a/include/asm-blackfin/mach-bf561/mem_map.h +++ b/include/asm-blackfin/mach-bf561/mem_map.h | |||
@@ -19,6 +19,11 @@ | |||
19 | #define ASYNC_BANK0_BASE 0x20000000 /* Async Bank 0 */ | 19 | #define ASYNC_BANK0_BASE 0x20000000 /* Async Bank 0 */ |
20 | #define ASYNC_BANK0_SIZE 0x04000000 /* 64M */ | 20 | #define ASYNC_BANK0_SIZE 0x04000000 /* 64M */ |
21 | 21 | ||
22 | /* Boot ROM Memory */ | ||
23 | |||
24 | #define BOOT_ROM_START 0xEF000000 | ||
25 | #define BOOT_ROM_LENGTH 0x800 | ||
26 | |||
22 | /* Level 1 Memory */ | 27 | /* Level 1 Memory */ |
23 | 28 | ||
24 | #ifdef CONFIG_BFIN_ICACHE | 29 | #ifdef CONFIG_BFIN_ICACHE |
@@ -67,9 +72,7 @@ | |||
67 | 72 | ||
68 | /* Scratch Pad Memory */ | 73 | /* Scratch Pad Memory */ |
69 | 74 | ||
70 | #if defined(CONFIG_BF561) | ||
71 | #define L1_SCRATCH_START 0xFFB00000 | 75 | #define L1_SCRATCH_START 0xFFB00000 |
72 | #define L1_SCRATCH_LENGTH 0x1000 | 76 | #define L1_SCRATCH_LENGTH 0x1000 |
73 | #endif | ||
74 | 77 | ||
75 | #endif /* _MEM_MAP_533_H_ */ | 78 | #endif /* _MEM_MAP_533_H_ */ |
diff --git a/include/asm-blackfin/mach-common/def_LPBlackfin.h b/include/asm-blackfin/mach-common/def_LPBlackfin.h index c1d8c4a78fcf..e8967f6124f7 100644 --- a/include/asm-blackfin/mach-common/def_LPBlackfin.h +++ b/include/asm-blackfin/mach-common/def_LPBlackfin.h | |||
@@ -46,7 +46,7 @@ | |||
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | #define bfin_read8(addr) ({ \ | 48 | #define bfin_read8(addr) ({ \ |
49 | uint8_t __v; \ | 49 | uint32_t __v; \ |
50 | __asm__ __volatile__( \ | 50 | __asm__ __volatile__( \ |
51 | NOP_PAD_ANOMALY_05000198 \ | 51 | NOP_PAD_ANOMALY_05000198 \ |
52 | "%0 = b[%1] (z);" \ | 52 | "%0 = b[%1] (z);" \ |
@@ -56,7 +56,7 @@ | |||
56 | __v; }) | 56 | __v; }) |
57 | 57 | ||
58 | #define bfin_read16(addr) ({ \ | 58 | #define bfin_read16(addr) ({ \ |
59 | uint16_t __v; \ | 59 | uint32_t __v; \ |
60 | __asm__ __volatile__( \ | 60 | __asm__ __volatile__( \ |
61 | NOP_PAD_ANOMALY_05000198 \ | 61 | NOP_PAD_ANOMALY_05000198 \ |
62 | "%0 = w[%1] (z);" \ | 62 | "%0 = w[%1] (z);" \ |
@@ -80,7 +80,7 @@ | |||
80 | NOP_PAD_ANOMALY_05000198 \ | 80 | NOP_PAD_ANOMALY_05000198 \ |
81 | "b[%0] = %1;" \ | 81 | "b[%0] = %1;" \ |
82 | : \ | 82 | : \ |
83 | : "a" (addr), "d" (val) \ | 83 | : "a" (addr), "d" ((uint8_t)(val)) \ |
84 | : "memory" \ | 84 | : "memory" \ |
85 | ) | 85 | ) |
86 | 86 | ||
@@ -89,7 +89,7 @@ | |||
89 | NOP_PAD_ANOMALY_05000198 \ | 89 | NOP_PAD_ANOMALY_05000198 \ |
90 | "w[%0] = %1;" \ | 90 | "w[%0] = %1;" \ |
91 | : \ | 91 | : \ |
92 | : "a" (addr), "d" (val) \ | 92 | : "a" (addr), "d" ((uint16_t)(val)) \ |
93 | : "memory" \ | 93 | : "memory" \ |
94 | ) | 94 | ) |
95 | 95 | ||
diff --git a/include/asm-blackfin/page_offset.h b/include/asm-blackfin/page_offset.h index 3b671d5fd70d..cbaff24b4b25 100644 --- a/include/asm-blackfin/page_offset.h +++ b/include/asm-blackfin/page_offset.h | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | /* This handles the memory map.. */ | 2 | /* This handles the memory map.. */ |
3 | 3 | ||
4 | #ifdef CONFIG_BFIN | 4 | #ifdef CONFIG_BLACKFIN |
5 | #define PAGE_OFFSET_RAW 0x00000000 | 5 | #define PAGE_OFFSET_RAW 0x00000000 |
6 | #endif | 6 | #endif |
diff --git a/include/asm-blackfin/string.h b/include/asm-blackfin/string.h index e8ada91ab002..321f4d96e4ae 100644 --- a/include/asm-blackfin/string.h +++ b/include/asm-blackfin/string.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef _BLACKFIN_STRING_H_ | 1 | #ifndef _BLACKFIN_STRING_H_ |
2 | #define _BLACKFIN_STRING_H_ | 2 | #define _BLACKFIN_STRING_H_ |
3 | 3 | ||
4 | #include <linux/types.h> | ||
5 | |||
4 | #ifdef __KERNEL__ /* only set these up for kernel code */ | 6 | #ifdef __KERNEL__ /* only set these up for kernel code */ |
5 | 7 | ||
6 | #define __HAVE_ARCH_STRCPY | 8 | #define __HAVE_ARCH_STRCPY |
diff --git a/include/asm-blackfin/traps.h b/include/asm-blackfin/traps.h index fe365b1b7ca8..ee1cbf73a9ab 100644 --- a/include/asm-blackfin/traps.h +++ b/include/asm-blackfin/traps.h | |||
@@ -48,28 +48,80 @@ | |||
48 | 48 | ||
49 | #ifndef __ASSEMBLY__ | 49 | #ifndef __ASSEMBLY__ |
50 | 50 | ||
51 | #define HWC_x2 "System MMR Error\nAn error occurred due to an invalid access to an System MMR location\nPossible reason: a 32-bit register is accessed with a 16-bit instruction,\nor a 16-bit register is accessed with a 32-bit instruction.\n" | 51 | #define HWC_x2(level) \ |
52 | #define HWC_x3 "External Memory Addressing Error\n" | 52 | "System MMR Error\n" \ |
53 | #define HWC_x12 "Performance Monitor Overflow\n" | 53 | level " - An error occurred due to an invalid access to an System MMR location\n" \ |
54 | #define HWC_x18 "RAISE 5 instruction\n Software issued a RAISE 5 instruction to invoke the Hardware\n" | 54 | level " Possible reason: a 32-bit register is accessed with a 16-bit instruction\n" \ |
55 | #define HWC_default "Reserved\n" | 55 | level " or a 16-bit register is accessed with a 32-bit instruction.\n" |
56 | 56 | #define HWC_x3(level) \ | |
57 | #define EXC_0x03 "Application stack overflow\n - Please increase the stack size of the application using elf2flt -s option,\n and/or reduce the stack use of the application.\n" | 57 | "External Memory Addressing Error\n" |
58 | #define EXC_0x10 "Single step\n - When the processor is in single step mode, every instruction\n generates an exception. Primarily used for debugging.\n" | 58 | #define HWC_x12(level) \ |
59 | #define EXC_0x11 "Exception caused by a trace buffer full condition\n - The processor takes this exception when the trace\n buffer overflows (only when enabled by the Trace Unit Control register).\n" | 59 | "Performance Monitor Overflow\n" |
60 | #define EXC_0x21 "Undefined instruction\n - May be used to emulate instructions that are not defined for\n a particular processor implementation.\n" | 60 | #define HWC_x18(level) \ |
61 | #define EXC_0x22 "Illegal instruction combination\n - See section for multi-issue rules in the ADSP-BF53x Blackfin\n Processor Instruction Set Reference.\n" | 61 | "RAISE 5 instruction\n" \ |
62 | #define EXC_0x23 "Data access CPLB protection violation\n - Attempted read or write to Supervisor resource,\n or illegal data memory access. \n" | 62 | level " Software issued a RAISE 5 instruction to invoke the Hardware\n" |
63 | #define EXC_0x24 "Data access misaligned address violation\n - Attempted misaligned data memory or data cache access.\n" | 63 | #define HWC_default(level) \ |
64 | #define EXC_0x25 "Unrecoverable event\n - For example, an exception generated while processing a previous exception.\n" | 64 | "Reserved\n" |
65 | #define EXC_0x26 "Data access CPLB miss\n - Used by the MMU to signal a CPLB miss on a data access.\n" | 65 | #define EXC_0x03(level) \ |
66 | #define EXC_0x27 "Data access multiple CPLB hits\n - More than one CPLB entry matches data fetch address.\n" | 66 | "Application stack overflow\n" \ |
67 | #define EXC_0x28 "Program Sequencer Exception caused by an emulation watchpoint match\n - There is a watchpoint match, and one of the EMUSW\n bits in the Watchpoint Instruction Address Control register (WPIACTL) is set.\n" | 67 | level " - Please increase the stack size of the application using elf2flt -s option,\n" \ |
68 | #define EXC_0x2A "Instruction fetch misaligned address violation\n - Attempted misaligned instruction cache fetch. On a misaligned instruction fetch exception,\n the return address provided in RETX is the destination address which is misaligned, rather than the address of the offending instruction.\n" | 68 | level " and/or reduce the stack use of the application.\n" |
69 | #define EXC_0x2B "CPLB protection violation\n - Illegal instruction fetch access (memory protection violation).\n" | 69 | #define EXC_0x10(level) \ |
70 | #define EXC_0x2C "Instruction fetch CPLB miss\n - CPLB miss on an instruction fetch.\n" | 70 | "Single step\n" \ |
71 | #define EXC_0x2D "Instruction fetch multiple CPLB hits\n - More than one CPLB entry matches instruction fetch address.\n" | 71 | level " - When the processor is in single step mode, every instruction\n" \ |
72 | #define EXC_0x2E "Illegal use of supervisor resource\n - Attempted to use a Supervisor register or instruction from User mode.\n Supervisor resources are registers and instructions that are reserved\n for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n only instructions.\n" | 72 | level " generates an exception. Primarily used for debugging.\n" |
73 | #define EXC_0x11(level) \ | ||
74 | "Exception caused by a trace buffer full condition\n" \ | ||
75 | level " - The processor takes this exception when the trace\n" \ | ||
76 | level " buffer overflows (only when enabled by the Trace Unit Control register).\n" | ||
77 | #define EXC_0x21(level) \ | ||
78 | "Undefined instruction\n" \ | ||
79 | level " - May be used to emulate instructions that are not defined for\n" \ | ||
80 | level " a particular processor implementation.\n" | ||
81 | #define EXC_0x22(level) \ | ||
82 | "Illegal instruction combination\n" \ | ||
83 | level " - See section for multi-issue rules in the ADSP-BF53x Blackfin\n" \ | ||
84 | level " Processor Instruction Set Reference.\n" | ||
85 | #define EXC_0x23(level) \ | ||
86 | "Data access CPLB protection violation\n" \ | ||
87 | level " - Attempted read or write to Supervisor resource,\n" \ | ||
88 | level " or illegal data memory access. \n" | ||
89 | #define EXC_0x24(level) \ | ||
90 | "Data access misaligned address violation\n" \ | ||
91 | level " - Attempted misaligned data memory or data cache access.\n" | ||
92 | #define EXC_0x25(level) \ | ||
93 | "Unrecoverable event\n" \ | ||
94 | level " - For example, an exception generated while processing a previous exception.\n" | ||
95 | #define EXC_0x26(level) \ | ||
96 | "Data access CPLB miss\n" \ | ||
97 | level " - Used by the MMU to signal a CPLB miss on a data access.\n" | ||
98 | #define EXC_0x27(level) \ | ||
99 | "Data access multiple CPLB hits\n" \ | ||
100 | level " - More than one CPLB entry matches data fetch address.\n" | ||
101 | #define EXC_0x28(level) \ | ||
102 | "Program Sequencer Exception caused by an emulation watchpoint match\n" \ | ||
103 | level " - There is a watchpoint match, and one of the EMUSW\n" \ | ||
104 | level " bits in the Watchpoint Instruction Address Control register (WPIACTL) is set.\n" | ||
105 | #define EXC_0x2A(level) \ | ||
106 | "Instruction fetch misaligned address violation\n" \ | ||
107 | level " - Attempted misaligned instruction cache fetch. On a misaligned instruction fetch\n" \ | ||
108 | level " exception, the return address provided in RETX is the destination address which is\n" \ | ||
109 | level " misaligned, rather than the address of the offending instruction.\n" | ||
110 | #define EXC_0x2B(level) \ | ||
111 | "CPLB protection violation\n" \ | ||
112 | level " - Illegal instruction fetch access (memory protection violation).\n" | ||
113 | #define EXC_0x2C(level) \ | ||
114 | "Instruction fetch CPLB miss\n" \ | ||
115 | level " - CPLB miss on an instruction fetch.\n" | ||
116 | #define EXC_0x2D(level) \ | ||
117 | "Instruction fetch multiple CPLB hits\n" \ | ||
118 | level " - More than one CPLB entry matches instruction fetch address.\n" | ||
119 | #define EXC_0x2E(level) \ | ||
120 | "Illegal use of supervisor resource\n" \ | ||
121 | level " - Attempted to use a Supervisor register or instruction from User mode.\n" \ | ||
122 | level " Supervisor resources are registers and instructions that are reserved\n" \ | ||
123 | level " for Supervisor use: Supervisor only registers, all MMRs, and Supervisor\n" \ | ||
124 | level " only instructions.\n" | ||
73 | 125 | ||
74 | #endif /* __ASSEMBLY__ */ | 126 | #endif /* __ASSEMBLY__ */ |
75 | #endif /* _BFIN_TRAPS_H */ | 127 | #endif /* _BFIN_TRAPS_H */ |
diff --git a/include/asm-mips/8253pit.h b/include/asm-mips/8253pit.h deleted file mode 100644 index 285f78488ccb..000000000000 --- a/include/asm-mips/8253pit.h +++ /dev/null | |||
@@ -1,10 +0,0 @@ | |||
1 | /* | ||
2 | * 8253/8254 Programmable Interval Timer | ||
3 | */ | ||
4 | |||
5 | #ifndef _8253PIT_H | ||
6 | #define _8253PIT_H | ||
7 | |||
8 | #define PIT_TICK_RATE 1193182UL | ||
9 | |||
10 | #endif | ||
diff --git a/include/asm-mips/dma.h b/include/asm-mips/dma.h index 833437d31ef1..d6a6c21f16db 100644 --- a/include/asm-mips/dma.h +++ b/include/asm-mips/dma.h | |||
@@ -92,6 +92,7 @@ | |||
92 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000) | 92 | #define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x01000000) |
93 | #endif | 93 | #endif |
94 | #define MAX_DMA_PFN PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS)) | 94 | #define MAX_DMA_PFN PFN_DOWN(virt_to_phys((void *)MAX_DMA_ADDRESS)) |
95 | #define MAX_DMA32_PFN (1UL << (32 - PAGE_SHIFT)) | ||
95 | 96 | ||
96 | /* 8237 DMA controllers */ | 97 | /* 8237 DMA controllers */ |
97 | #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ | 98 | #define IO_DMA1_BASE 0x00 /* 8 bit slave DMA, channels 0..3 */ |
diff --git a/include/asm-mips/futex.h b/include/asm-mips/futex.h index 3e7e30d4f418..17f082cfea85 100644 --- a/include/asm-mips/futex.h +++ b/include/asm-mips/futex.h | |||
@@ -35,7 +35,7 @@ | |||
35 | " .set mips0 \n" \ | 35 | " .set mips0 \n" \ |
36 | " .section .fixup,\"ax\" \n" \ | 36 | " .section .fixup,\"ax\" \n" \ |
37 | "4: li %0, %6 \n" \ | 37 | "4: li %0, %6 \n" \ |
38 | " j 2b \n" \ | 38 | " j 3b \n" \ |
39 | " .previous \n" \ | 39 | " .previous \n" \ |
40 | " .section __ex_table,\"a\" \n" \ | 40 | " .section __ex_table,\"a\" \n" \ |
41 | " "__UA_ADDR "\t1b, 4b \n" \ | 41 | " "__UA_ADDR "\t1b, 4b \n" \ |
@@ -61,7 +61,7 @@ | |||
61 | " .set mips0 \n" \ | 61 | " .set mips0 \n" \ |
62 | " .section .fixup,\"ax\" \n" \ | 62 | " .section .fixup,\"ax\" \n" \ |
63 | "4: li %0, %6 \n" \ | 63 | "4: li %0, %6 \n" \ |
64 | " j 2b \n" \ | 64 | " j 3b \n" \ |
65 | " .previous \n" \ | 65 | " .previous \n" \ |
66 | " .section __ex_table,\"a\" \n" \ | 66 | " .section __ex_table,\"a\" \n" \ |
67 | " "__UA_ADDR "\t1b, 4b \n" \ | 67 | " "__UA_ADDR "\t1b, 4b \n" \ |
@@ -200,4 +200,4 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) | |||
200 | } | 200 | } |
201 | 201 | ||
202 | #endif | 202 | #endif |
203 | #endif | 203 | #endif /* _ASM_FUTEX_H */ |
diff --git a/include/asm-mips/i8253.h b/include/asm-mips/i8253.h index 032ca73f181b..5dabc870b322 100644 --- a/include/asm-mips/i8253.h +++ b/include/asm-mips/i8253.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #define PIT_CH0 0x40 | 12 | #define PIT_CH0 0x40 |
13 | #define PIT_CH2 0x42 | 13 | #define PIT_CH2 0x42 |
14 | 14 | ||
15 | #define PIT_TICK_RATE 1193182UL | ||
16 | |||
15 | extern spinlock_t i8253_lock; | 17 | extern spinlock_t i8253_lock; |
16 | 18 | ||
17 | extern void setup_pit_timer(void); | 19 | extern void setup_pit_timer(void); |
diff --git a/include/asm-mips/ip32/ip32_ints.h b/include/asm-mips/ip32/ip32_ints.h index ab5612f90f6f..85bc5302bce0 100644 --- a/include/asm-mips/ip32/ip32_ints.h +++ b/include/asm-mips/ip32/ip32_ints.h | |||
@@ -22,7 +22,7 @@ enum ip32_irq_no { | |||
22 | * CPU interrupts are 0 ... 7 | 22 | * CPU interrupts are 0 ... 7 |
23 | */ | 23 | */ |
24 | 24 | ||
25 | CRIME_IRQ_BASE = MIPS_CPU_IRQ_BASE, | 25 | CRIME_IRQ_BASE = MIPS_CPU_IRQ_BASE + 8, |
26 | 26 | ||
27 | /* | 27 | /* |
28 | * MACE | 28 | * MACE |
diff --git a/include/asm-mips/system.h b/include/asm-mips/system.h index 90e4b403f531..1030562d6ea6 100644 --- a/include/asm-mips/system.h +++ b/include/asm-mips/system.h | |||
@@ -68,11 +68,15 @@ do { \ | |||
68 | if (cpu_has_dsp) \ | 68 | if (cpu_has_dsp) \ |
69 | __save_dsp(prev); \ | 69 | __save_dsp(prev); \ |
70 | (last) = resume(prev, next, task_thread_info(next)); \ | 70 | (last) = resume(prev, next, task_thread_info(next)); \ |
71 | } while (0) | ||
72 | |||
73 | #define finish_arch_switch(prev) \ | ||
74 | do { \ | ||
71 | if (cpu_has_dsp) \ | 75 | if (cpu_has_dsp) \ |
72 | __restore_dsp(current); \ | 76 | __restore_dsp(current); \ |
73 | if (cpu_has_userlocal) \ | 77 | if (cpu_has_userlocal) \ |
74 | write_c0_userlocal(task_thread_info(current)->tp_value);\ | 78 | write_c0_userlocal(current_thread_info()->tp_value); \ |
75 | } while(0) | 79 | } while (0) |
76 | 80 | ||
77 | static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) | 81 | static inline unsigned long __xchg_u32(volatile int * m, unsigned int val) |
78 | { | 82 | { |
diff --git a/include/asm-mips/time.h b/include/asm-mips/time.h index ee1663e64da1..7717934f94c3 100644 --- a/include/asm-mips/time.h +++ b/include/asm-mips/time.h | |||
@@ -58,10 +58,22 @@ extern int (*perf_irq)(void); | |||
58 | * Initialize the calling CPU's compare interrupt as clockevent device | 58 | * Initialize the calling CPU's compare interrupt as clockevent device |
59 | */ | 59 | */ |
60 | #ifdef CONFIG_CEVT_R4K | 60 | #ifdef CONFIG_CEVT_R4K |
61 | extern void mips_clockevent_init(void); | 61 | extern int mips_clockevent_init(void); |
62 | extern unsigned int __weak get_c0_compare_int(void); | 62 | extern unsigned int __weak get_c0_compare_int(void); |
63 | #else | 63 | #else |
64 | static inline void mips_clockevent_init(void) | 64 | static inline int mips_clockevent_init(void) |
65 | { | ||
66 | return -ENXIO; | ||
67 | } | ||
68 | #endif | ||
69 | |||
70 | /* | ||
71 | * Initialize the count register as a clocksource | ||
72 | */ | ||
73 | #ifdef CONFIG_CEVT_R4K | ||
74 | extern void init_mips_clocksource(void); | ||
75 | #else | ||
76 | static inline void init_mips_clocksource(void) | ||
65 | { | 77 | { |
66 | } | 78 | } |
67 | #endif | 79 | #endif |
diff --git a/include/asm-powerpc/page_32.h b/include/asm-powerpc/page_32.h index 374d0db37e1c..17110aff26e7 100644 --- a/include/asm-powerpc/page_32.h +++ b/include/asm-powerpc/page_32.h | |||
@@ -6,6 +6,10 @@ | |||
6 | 6 | ||
7 | #define PPC_MEMSTART 0 | 7 | #define PPC_MEMSTART 0 |
8 | 8 | ||
9 | #ifdef CONFIG_NOT_COHERENT_CACHE | ||
10 | #define ARCH_KMALLOC_MINALIGN L1_CACHE_BYTES | ||
11 | #endif | ||
12 | |||
9 | #ifndef __ASSEMBLY__ | 13 | #ifndef __ASSEMBLY__ |
10 | /* | 14 | /* |
11 | * The basic type of a PTE - 64 bits for those CPUs with > 32 bit | 15 | * The basic type of a PTE - 64 bits for those CPUs with > 32 bit |
diff --git a/include/asm-powerpc/pci-bridge.h b/include/asm-powerpc/pci-bridge.h index dc318458b5fe..d8bdc79db12e 100644 --- a/include/asm-powerpc/pci-bridge.h +++ b/include/asm-powerpc/pci-bridge.h | |||
@@ -246,7 +246,6 @@ static inline struct pci_controller *pci_bus_to_host(struct pci_bus *bus) | |||
246 | return PCI_DN(busdn)->phb; | 246 | return PCI_DN(busdn)->phb; |
247 | } | 247 | } |
248 | 248 | ||
249 | extern void pcibios_free_controller(struct pci_controller *phb); | ||
250 | 249 | ||
251 | extern void isa_bridge_find_early(struct pci_controller *hose); | 250 | extern void isa_bridge_find_early(struct pci_controller *hose); |
252 | 251 | ||
@@ -282,9 +281,11 @@ extern void | |||
282 | pci_process_bridge_OF_ranges(struct pci_controller *hose, | 281 | pci_process_bridge_OF_ranges(struct pci_controller *hose, |
283 | struct device_node *dev, int primary); | 282 | struct device_node *dev, int primary); |
284 | 283 | ||
285 | /* Allocate a new PCI host bridge structure */ | 284 | /* Allocate & free a PCI host bridge structure */ |
286 | extern struct pci_controller * | 285 | extern struct pci_controller * |
287 | pcibios_alloc_controller(struct device_node *dev); | 286 | pcibios_alloc_controller(struct device_node *dev); |
287 | extern void pcibios_free_controller(struct pci_controller *phb); | ||
288 | |||
288 | #ifdef CONFIG_PCI | 289 | #ifdef CONFIG_PCI |
289 | extern unsigned long pci_address_to_pio(phys_addr_t address); | 290 | extern unsigned long pci_address_to_pio(phys_addr_t address); |
290 | extern int pcibios_vaddr_is_ioport(void __iomem *address); | 291 | extern int pcibios_vaddr_is_ioport(void __iomem *address); |
diff --git a/include/asm-powerpc/rtas.h b/include/asm-powerpc/rtas.h index 8eaa7b28d9d0..87db8728e82d 100644 --- a/include/asm-powerpc/rtas.h +++ b/include/asm-powerpc/rtas.h | |||
@@ -164,7 +164,8 @@ extern int rtas_call(int token, int, int, int *, ...); | |||
164 | extern void rtas_restart(char *cmd); | 164 | extern void rtas_restart(char *cmd); |
165 | extern void rtas_power_off(void); | 165 | extern void rtas_power_off(void); |
166 | extern void rtas_halt(void); | 166 | extern void rtas_halt(void); |
167 | extern void rtas_os_term(char *str); | 167 | extern void rtas_panic_msg(char *str); |
168 | extern void rtas_os_term(void); | ||
168 | extern int rtas_get_sensor(int sensor, int index, int *state); | 169 | extern int rtas_get_sensor(int sensor, int index, int *state); |
169 | extern int rtas_get_power_level(int powerdomain, int *level); | 170 | extern int rtas_get_power_level(int powerdomain, int *level); |
170 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); | 171 | extern int rtas_set_power_level(int powerdomain, int level, int *setlevel); |
diff --git a/include/asm-powerpc/vdso_datapage.h b/include/asm-powerpc/vdso_datapage.h index 8a94f0eba5e9..f01393224b52 100644 --- a/include/asm-powerpc/vdso_datapage.h +++ b/include/asm-powerpc/vdso_datapage.h | |||
@@ -77,6 +77,10 @@ struct vdso_data { | |||
77 | /* those additional ones don't have to be located anywhere | 77 | /* those additional ones don't have to be located anywhere |
78 | * special as they were not part of the original systemcfg | 78 | * special as they were not part of the original systemcfg |
79 | */ | 79 | */ |
80 | __u32 dcache_block_size; /* L1 d-cache block size */ | ||
81 | __u32 icache_block_size; /* L1 i-cache block size */ | ||
82 | __u32 dcache_log_block_size; /* L1 d-cache log block size */ | ||
83 | __u32 icache_log_block_size; /* L1 i-cache log block size */ | ||
80 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ | 84 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ |
81 | __s32 wtom_clock_nsec; | 85 | __s32 wtom_clock_nsec; |
82 | __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */ | 86 | __u32 syscall_map_64[SYSCALL_MAP_SIZE]; /* map of syscalls */ |
@@ -99,6 +103,10 @@ struct vdso_data { | |||
99 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ | 103 | __s32 wtom_clock_sec; /* Wall to monotonic clock */ |
100 | __s32 wtom_clock_nsec; | 104 | __s32 wtom_clock_nsec; |
101 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ | 105 | __u32 syscall_map_32[SYSCALL_MAP_SIZE]; /* map of syscalls */ |
106 | __u32 dcache_block_size; /* L1 d-cache block size */ | ||
107 | __u32 icache_block_size; /* L1 i-cache block size */ | ||
108 | __u32 dcache_log_block_size; /* L1 d-cache log block size */ | ||
109 | __u32 icache_log_block_size; /* L1 i-cache log block size */ | ||
102 | }; | 110 | }; |
103 | 111 | ||
104 | #endif /* CONFIG_PPC64 */ | 112 | #endif /* CONFIG_PPC64 */ |
diff --git a/include/asm-s390/system.h b/include/asm-s390/system.h index d866d3385556..44bda786eef7 100644 --- a/include/asm-s390/system.h +++ b/include/asm-s390/system.h | |||
@@ -388,6 +388,11 @@ extern void (*_machine_power_off)(void); | |||
388 | 388 | ||
389 | #define arch_align_stack(x) (x) | 389 | #define arch_align_stack(x) (x) |
390 | 390 | ||
391 | #ifdef CONFIG_TRACE_IRQFLAGS | ||
392 | extern psw_t sysc_restore_trace_psw; | ||
393 | extern psw_t io_restore_trace_psw; | ||
394 | #endif | ||
395 | |||
391 | #endif /* __KERNEL__ */ | 396 | #endif /* __KERNEL__ */ |
392 | 397 | ||
393 | #endif | 398 | #endif |
diff --git a/include/asm-sh/cacheflush.h b/include/asm-sh/cacheflush.h index b91246153b7e..9d528ada3c14 100644 --- a/include/asm-sh/cacheflush.h +++ b/include/asm-sh/cacheflush.h | |||
@@ -43,7 +43,7 @@ extern void __flush_purge_region(void *start, int size); | |||
43 | extern void __flush_invalidate_region(void *start, int size); | 43 | extern void __flush_invalidate_region(void *start, int size); |
44 | #endif | 44 | #endif |
45 | 45 | ||
46 | #ifdef CONFIG_CPU_SH4 | 46 | #if defined(CONFIG_CPU_SH4) && !defined(CONFIG_CACHE_OFF) |
47 | extern void copy_to_user_page(struct vm_area_struct *vma, | 47 | extern void copy_to_user_page(struct vm_area_struct *vma, |
48 | struct page *page, unsigned long vaddr, void *dst, const void *src, | 48 | struct page *page, unsigned long vaddr, void *dst, const void *src, |
49 | unsigned long len); | 49 | unsigned long len); |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 8ccedf7a0a5a..e3c16c981e46 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -132,6 +132,11 @@ extern unsigned long acpi_realmode_flags; | |||
132 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); | 132 | int acpi_register_gsi (u32 gsi, int triggering, int polarity); |
133 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); | 133 | int acpi_gsi_to_irq (u32 gsi, unsigned int *irq); |
134 | 134 | ||
135 | #ifdef CONFIG_X86_IO_APIC | ||
136 | extern int acpi_get_override_irq(int bus_irq, int *trigger, int *polarity); | ||
137 | #else | ||
138 | #define acpi_get_override_irq(bus, trigger, polarity) (-1) | ||
139 | #endif | ||
135 | /* | 140 | /* |
136 | * This function undoes the effect of one call to acpi_register_gsi(). | 141 | * This function undoes the effect of one call to acpi_register_gsi(). |
137 | * If this matches the last registration, any IRQ resources for gsi | 142 | * If this matches the last registration, any IRQ resources for gsi |
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h index 16a51546db44..c4e00161a247 100644 --- a/include/linux/cpuidle.h +++ b/include/linux/cpuidle.h | |||
@@ -92,6 +92,7 @@ struct cpuidle_device { | |||
92 | struct kobject kobj; | 92 | struct kobject kobj; |
93 | struct completion kobj_unregister; | 93 | struct completion kobj_unregister; |
94 | void *governor_data; | 94 | void *governor_data; |
95 | struct cpuidle_state *safe_state; | ||
95 | }; | 96 | }; |
96 | 97 | ||
97 | DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); | 98 | DECLARE_PER_CPU(struct cpuidle_device *, cpuidle_devices); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 56a5673aebad..ef52a07c43d8 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -340,6 +340,7 @@ enum { | |||
340 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ | 340 | ATA_HORKAGE_HPA_SIZE = (1 << 6), /* native size off by one */ |
341 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ | 341 | ATA_HORKAGE_IPM = (1 << 7), /* Link PM problems */ |
342 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ | 342 | ATA_HORKAGE_IVB = (1 << 8), /* cbl det validity bit bugs */ |
343 | ATA_HORKAGE_STUCK_ERR = (1 << 9), /* stuck ERR on next PACKET */ | ||
343 | 344 | ||
344 | /* DMA mask for user DMA control: User visible values; DO NOT | 345 | /* DMA mask for user DMA control: User visible values; DO NOT |
345 | renumber */ | 346 | renumber */ |
@@ -771,8 +772,6 @@ static inline int ata_port_is_dummy(struct ata_port *ap) | |||
771 | 772 | ||
772 | extern void sata_print_link_status(struct ata_link *link); | 773 | extern void sata_print_link_status(struct ata_link *link); |
773 | extern void ata_port_probe(struct ata_port *); | 774 | extern void ata_port_probe(struct ata_port *); |
774 | extern void __sata_phy_reset(struct ata_port *ap); | ||
775 | extern void sata_phy_reset(struct ata_port *ap); | ||
776 | extern void ata_bus_reset(struct ata_port *ap); | 775 | extern void ata_bus_reset(struct ata_port *ap); |
777 | extern int sata_set_spd(struct ata_link *link); | 776 | extern int sata_set_spd(struct ata_link *link); |
778 | extern int sata_link_debounce(struct ata_link *link, | 777 | extern int sata_link_debounce(struct ata_link *link, |
@@ -994,8 +993,6 @@ extern void sata_pmp_do_eh(struct ata_port *ap, | |||
994 | /* | 993 | /* |
995 | * EH | 994 | * EH |
996 | */ | 995 | */ |
997 | extern void ata_eng_timeout(struct ata_port *ap); | ||
998 | |||
999 | extern void ata_port_schedule_eh(struct ata_port *ap); | 996 | extern void ata_port_schedule_eh(struct ata_port *ap); |
1000 | extern int ata_link_abort(struct ata_link *link); | 997 | extern int ata_link_abort(struct ata_link *link); |
1001 | extern int ata_port_abort(struct ata_port *ap); | 998 | extern int ata_port_abort(struct ata_port *ap); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index e99171f01b4c..4f5047df8a9e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
@@ -70,7 +70,6 @@ enum | |||
70 | CTL_ABI=9, /* Binary emulation */ | 70 | CTL_ABI=9, /* Binary emulation */ |
71 | CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ | 71 | CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ |
72 | CTL_ARLAN=254, /* arlan wireless driver */ | 72 | CTL_ARLAN=254, /* arlan wireless driver */ |
73 | CTL_APPLDATA=2120, /* s390 appldata */ | ||
74 | CTL_S390DBF=5677, /* s390 debug */ | 73 | CTL_S390DBF=5677, /* s390 debug */ |
75 | CTL_SUNRPC=7249, /* sunrpc debug */ | 74 | CTL_SUNRPC=7249, /* sunrpc debug */ |
76 | CTL_PM=9899, /* frv power management */ | 75 | CTL_PM=9899, /* frv power management */ |
@@ -207,11 +206,6 @@ enum | |||
207 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ | 206 | VM_PANIC_ON_OOM=33, /* panic at out-of-memory */ |
208 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ | 207 | VM_VDSO_ENABLED=34, /* map VDSO into new processes? */ |
209 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ | 208 | VM_MIN_SLAB=35, /* Percent pages ignored by zone reclaim */ |
210 | |||
211 | /* s390 vm cmm sysctls */ | ||
212 | VM_CMM_PAGES=1111, | ||
213 | VM_CMM_TIMED_PAGES=1112, | ||
214 | VM_CMM_TIMEOUT=1113, | ||
215 | }; | 209 | }; |
216 | 210 | ||
217 | 211 | ||
diff --git a/include/sound/version.h b/include/sound/version.h index a2be8ad8894b..a9781eb0da09 100644 --- a/include/sound/version.h +++ b/include/sound/version.h | |||
@@ -1,3 +1,3 @@ | |||
1 | /* include/version.h. Generated by alsa/ksync script. */ | 1 | /* include/version.h. Generated by alsa/ksync script. */ |
2 | #define CONFIG_SND_VERSION "1.0.15" | 2 | #define CONFIG_SND_VERSION "1.0.15" |
3 | #define CONFIG_SND_DATE " (Tue Oct 23 06:09:18 2007 UTC)" | 3 | #define CONFIG_SND_DATE " (Tue Nov 20 19:16:42 2007 UTC)" |
diff --git a/init/Kconfig b/init/Kconfig index c5b354b1409e..d35e44f4dd6b 100644 --- a/init/Kconfig +++ b/init/Kconfig | |||
@@ -438,7 +438,7 @@ menuconfig EMBEDDED | |||
438 | 438 | ||
439 | config UID16 | 439 | config UID16 |
440 | bool "Enable 16-bit UID system calls" if EMBEDDED | 440 | bool "Enable 16-bit UID system calls" if EMBEDDED |
441 | depends on ARM || BFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION) | 441 | depends on ARM || BLACKFIN || CRIS || FRV || H8300 || X86_32 || M68K || (S390 && !64BIT) || SUPERH || SPARC32 || (SPARC64 && SPARC32_COMPAT) || UML || (X86_64 && IA32_EMULATION) |
442 | default y | 442 | default y |
443 | help | 443 | help |
444 | This enables the legacy 16-bit UID syscall wrappers. | 444 | This enables the legacy 16-bit UID syscall wrappers. |
diff --git a/kernel/module.c b/kernel/module.c index 3202c9950073..91fe6958b6e1 100644 --- a/kernel/module.c +++ b/kernel/module.c | |||
@@ -81,7 +81,8 @@ int unregister_module_notifier(struct notifier_block * nb) | |||
81 | } | 81 | } |
82 | EXPORT_SYMBOL(unregister_module_notifier); | 82 | EXPORT_SYMBOL(unregister_module_notifier); |
83 | 83 | ||
84 | /* We require a truly strong try_module_get() */ | 84 | /* We require a truly strong try_module_get(): 0 means failure due to |
85 | ongoing or failed initialization etc. */ | ||
85 | static inline int strong_try_module_get(struct module *mod) | 86 | static inline int strong_try_module_get(struct module *mod) |
86 | { | 87 | { |
87 | if (mod && mod->state == MODULE_STATE_COMING) | 88 | if (mod && mod->state == MODULE_STATE_COMING) |
@@ -952,7 +953,8 @@ static unsigned long resolve_symbol(Elf_Shdr *sechdrs, | |||
952 | ret = __find_symbol(name, &owner, &crc, | 953 | ret = __find_symbol(name, &owner, &crc, |
953 | !(mod->taints & TAINT_PROPRIETARY_MODULE)); | 954 | !(mod->taints & TAINT_PROPRIETARY_MODULE)); |
954 | if (ret) { | 955 | if (ret) { |
955 | /* use_module can fail due to OOM, or module unloading */ | 956 | /* use_module can fail due to OOM, |
957 | or module initialization or unloading */ | ||
956 | if (!check_version(sechdrs, versindex, name, mod, crc) || | 958 | if (!check_version(sechdrs, versindex, name, mod, crc) || |
957 | !use_module(mod, owner)) | 959 | !use_module(mod, owner)) |
958 | ret = 0; | 960 | ret = 0; |
@@ -1369,7 +1371,7 @@ dup: | |||
1369 | return ret; | 1371 | return ret; |
1370 | } | 1372 | } |
1371 | 1373 | ||
1372 | /* Change all symbols so that sh_value encodes the pointer directly. */ | 1374 | /* Change all symbols so that st_value encodes the pointer directly. */ |
1373 | static int simplify_symbols(Elf_Shdr *sechdrs, | 1375 | static int simplify_symbols(Elf_Shdr *sechdrs, |
1374 | unsigned int symindex, | 1376 | unsigned int symindex, |
1375 | const char *strtab, | 1377 | const char *strtab, |
diff --git a/kernel/sysctl_check.c b/kernel/sysctl_check.c index 4abc6d2306f4..8f5baac1eb08 100644 --- a/kernel/sysctl_check.c +++ b/kernel/sysctl_check.c | |||
@@ -140,9 +140,6 @@ static struct trans_ctl_table trans_vm_table[] = { | |||
140 | { VM_PANIC_ON_OOM, "panic_on_oom" }, | 140 | { VM_PANIC_ON_OOM, "panic_on_oom" }, |
141 | { VM_VDSO_ENABLED, "vdso_enabled" }, | 141 | { VM_VDSO_ENABLED, "vdso_enabled" }, |
142 | { VM_MIN_SLAB, "min_slab_ratio" }, | 142 | { VM_MIN_SLAB, "min_slab_ratio" }, |
143 | { VM_CMM_PAGES, "cmm_pages" }, | ||
144 | { VM_CMM_TIMED_PAGES, "cmm_timed_pages" }, | ||
145 | { VM_CMM_TIMEOUT, "cmm_timeout" }, | ||
146 | 143 | ||
147 | {} | 144 | {} |
148 | }; | 145 | }; |
@@ -1219,16 +1216,6 @@ static struct trans_ctl_table trans_arlan_table[] = { | |||
1219 | {} | 1216 | {} |
1220 | }; | 1217 | }; |
1221 | 1218 | ||
1222 | static struct trans_ctl_table trans_appldata_table[] = { | ||
1223 | { CTL_APPLDATA_TIMER, "timer" }, | ||
1224 | { CTL_APPLDATA_INTERVAL, "interval" }, | ||
1225 | { CTL_APPLDATA_OS, "os" }, | ||
1226 | { CTL_APPLDATA_NET_SUM, "net_sum" }, | ||
1227 | { CTL_APPLDATA_MEM, "mem" }, | ||
1228 | {} | ||
1229 | |||
1230 | }; | ||
1231 | |||
1232 | static struct trans_ctl_table trans_s390dbf_table[] = { | 1219 | static struct trans_ctl_table trans_s390dbf_table[] = { |
1233 | { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" }, | 1220 | { 5678 /* CTL_S390DBF_STOPPABLE */, "debug_stoppable" }, |
1234 | { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" }, | 1221 | { 5679 /* CTL_S390DBF_ACTIVE */, "debug_active" }, |
@@ -1273,7 +1260,6 @@ static struct trans_ctl_table trans_root_table[] = { | |||
1273 | { CTL_ABI, "abi" }, | 1260 | { CTL_ABI, "abi" }, |
1274 | /* CTL_CPU not used */ | 1261 | /* CTL_CPU not used */ |
1275 | { CTL_ARLAN, "arlan", trans_arlan_table }, | 1262 | { CTL_ARLAN, "arlan", trans_arlan_table }, |
1276 | { CTL_APPLDATA, "appldata", trans_appldata_table }, | ||
1277 | { CTL_S390DBF, "s390dbf", trans_s390dbf_table }, | 1263 | { CTL_S390DBF, "s390dbf", trans_s390dbf_table }, |
1278 | { CTL_SUNRPC, "sunrpc", trans_sunrpc_table }, | 1264 | { CTL_SUNRPC, "sunrpc", trans_sunrpc_table }, |
1279 | { CTL_PM, "pm", trans_pm_table }, | 1265 | { CTL_PM, "pm", trans_pm_table }, |
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug index 1e5f207b9074..a60109307d32 100644 --- a/lib/Kconfig.debug +++ b/lib/Kconfig.debug | |||
@@ -359,7 +359,7 @@ config DEBUG_HIGHMEM | |||
359 | config DEBUG_BUGVERBOSE | 359 | config DEBUG_BUGVERBOSE |
360 | bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED | 360 | bool "Verbose BUG() reporting (adds 70K)" if DEBUG_KERNEL && EMBEDDED |
361 | depends on BUG | 361 | depends on BUG |
362 | depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || FRV || SUPERH || GENERIC_BUG || BFIN | 362 | depends on ARM || AVR32 || M32R || M68K || SPARC32 || SPARC64 || FRV || SUPERH || GENERIC_BUG || BLACKFIN |
363 | default !EMBEDDED | 363 | default !EMBEDDED |
364 | help | 364 | help |
365 | Say Y here to make BUG() panics output the file name and line number | 365 | Say Y here to make BUG() panics output the file name and line number |
@@ -409,7 +409,7 @@ config DEBUG_SG | |||
409 | 409 | ||
410 | config FRAME_POINTER | 410 | config FRAME_POINTER |
411 | bool "Compile the kernel with frame pointers" | 411 | bool "Compile the kernel with frame pointers" |
412 | depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH || BFIN) | 412 | depends on DEBUG_KERNEL && (X86 || CRIS || M68K || M68KNOMMU || FRV || UML || S390 || AVR32 || SUPERH || BLACKFIN) |
413 | default y if DEBUG_INFO && UML | 413 | default y if DEBUG_INFO && UML |
414 | help | 414 | help |
415 | If you say Y here the resulting kernel image will be slightly larger | 415 | If you say Y here the resulting kernel image will be slightly larger |
@@ -471,11 +471,12 @@ int page_mkclean(struct page *page) | |||
471 | 471 | ||
472 | if (page_mapped(page)) { | 472 | if (page_mapped(page)) { |
473 | struct address_space *mapping = page_mapping(page); | 473 | struct address_space *mapping = page_mapping(page); |
474 | if (mapping) | 474 | if (mapping) { |
475 | ret = page_mkclean_file(mapping, page); | 475 | ret = page_mkclean_file(mapping, page); |
476 | if (page_test_dirty(page)) { | 476 | if (page_test_dirty(page)) { |
477 | page_clear_dirty(page); | 477 | page_clear_dirty(page); |
478 | ret = 1; | 478 | ret = 1; |
479 | } | ||
479 | } | 480 | } |
480 | } | 481 | } |
481 | 482 | ||
diff --git a/net/iucv/iucv.c b/net/iucv/iucv.c index a2f5a6ea3895..7698f6c459d6 100644 --- a/net/iucv/iucv.c +++ b/net/iucv/iucv.c | |||
@@ -97,7 +97,7 @@ struct iucv_irq_list { | |||
97 | struct iucv_irq_data data; | 97 | struct iucv_irq_data data; |
98 | }; | 98 | }; |
99 | 99 | ||
100 | static struct iucv_irq_data *iucv_irq_data; | 100 | static struct iucv_irq_data *iucv_irq_data[NR_CPUS]; |
101 | static cpumask_t iucv_buffer_cpumask = CPU_MASK_NONE; | 101 | static cpumask_t iucv_buffer_cpumask = CPU_MASK_NONE; |
102 | static cpumask_t iucv_irq_cpumask = CPU_MASK_NONE; | 102 | static cpumask_t iucv_irq_cpumask = CPU_MASK_NONE; |
103 | 103 | ||
@@ -277,7 +277,7 @@ union iucv_param { | |||
277 | /* | 277 | /* |
278 | * Anchor for per-cpu IUCV command parameter block. | 278 | * Anchor for per-cpu IUCV command parameter block. |
279 | */ | 279 | */ |
280 | static union iucv_param *iucv_param; | 280 | static union iucv_param *iucv_param[NR_CPUS]; |
281 | 281 | ||
282 | /** | 282 | /** |
283 | * iucv_call_b2f0 | 283 | * iucv_call_b2f0 |
@@ -356,7 +356,7 @@ static void iucv_allow_cpu(void *data) | |||
356 | * 0x10 - Flag to allow priority message completion interrupts | 356 | * 0x10 - Flag to allow priority message completion interrupts |
357 | * 0x08 - Flag to allow IUCV control interrupts | 357 | * 0x08 - Flag to allow IUCV control interrupts |
358 | */ | 358 | */ |
359 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 359 | parm = iucv_param[cpu]; |
360 | memset(parm, 0, sizeof(union iucv_param)); | 360 | memset(parm, 0, sizeof(union iucv_param)); |
361 | parm->set_mask.ipmask = 0xf8; | 361 | parm->set_mask.ipmask = 0xf8; |
362 | iucv_call_b2f0(IUCV_SETMASK, parm); | 362 | iucv_call_b2f0(IUCV_SETMASK, parm); |
@@ -377,7 +377,7 @@ static void iucv_block_cpu(void *data) | |||
377 | union iucv_param *parm; | 377 | union iucv_param *parm; |
378 | 378 | ||
379 | /* Disable all iucv interrupts. */ | 379 | /* Disable all iucv interrupts. */ |
380 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 380 | parm = iucv_param[cpu]; |
381 | memset(parm, 0, sizeof(union iucv_param)); | 381 | memset(parm, 0, sizeof(union iucv_param)); |
382 | iucv_call_b2f0(IUCV_SETMASK, parm); | 382 | iucv_call_b2f0(IUCV_SETMASK, parm); |
383 | 383 | ||
@@ -401,9 +401,9 @@ static void iucv_declare_cpu(void *data) | |||
401 | return; | 401 | return; |
402 | 402 | ||
403 | /* Declare interrupt buffer. */ | 403 | /* Declare interrupt buffer. */ |
404 | parm = percpu_ptr(iucv_param, cpu); | 404 | parm = iucv_param[cpu]; |
405 | memset(parm, 0, sizeof(union iucv_param)); | 405 | memset(parm, 0, sizeof(union iucv_param)); |
406 | parm->db.ipbfadr1 = virt_to_phys(percpu_ptr(iucv_irq_data, cpu)); | 406 | parm->db.ipbfadr1 = virt_to_phys(iucv_irq_data[cpu]); |
407 | rc = iucv_call_b2f0(IUCV_DECLARE_BUFFER, parm); | 407 | rc = iucv_call_b2f0(IUCV_DECLARE_BUFFER, parm); |
408 | if (rc) { | 408 | if (rc) { |
409 | char *err = "Unknown"; | 409 | char *err = "Unknown"; |
@@ -458,7 +458,7 @@ static void iucv_retrieve_cpu(void *data) | |||
458 | iucv_block_cpu(NULL); | 458 | iucv_block_cpu(NULL); |
459 | 459 | ||
460 | /* Retrieve interrupt buffer. */ | 460 | /* Retrieve interrupt buffer. */ |
461 | parm = percpu_ptr(iucv_param, cpu); | 461 | parm = iucv_param[cpu]; |
462 | iucv_call_b2f0(IUCV_RETRIEVE_BUFFER, parm); | 462 | iucv_call_b2f0(IUCV_RETRIEVE_BUFFER, parm); |
463 | 463 | ||
464 | /* Clear indication that an iucv buffer exists for this cpu. */ | 464 | /* Clear indication that an iucv buffer exists for this cpu. */ |
@@ -558,22 +558,23 @@ static int __cpuinit iucv_cpu_notify(struct notifier_block *self, | |||
558 | switch (action) { | 558 | switch (action) { |
559 | case CPU_UP_PREPARE: | 559 | case CPU_UP_PREPARE: |
560 | case CPU_UP_PREPARE_FROZEN: | 560 | case CPU_UP_PREPARE_FROZEN: |
561 | if (!percpu_populate(iucv_irq_data, | 561 | iucv_irq_data[cpu] = kmalloc_node(sizeof(struct iucv_irq_data), |
562 | sizeof(struct iucv_irq_data), | 562 | GFP_KERNEL|GFP_DMA, cpu_to_node(cpu)); |
563 | GFP_KERNEL|GFP_DMA, cpu)) | 563 | if (!iucv_irq_data[cpu]) |
564 | return NOTIFY_BAD; | 564 | return NOTIFY_BAD; |
565 | if (!percpu_populate(iucv_param, sizeof(union iucv_param), | 565 | iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param), |
566 | GFP_KERNEL|GFP_DMA, cpu)) { | 566 | GFP_KERNEL|GFP_DMA, cpu_to_node(cpu)); |
567 | percpu_depopulate(iucv_irq_data, cpu); | 567 | if (!iucv_param[cpu]) |
568 | return NOTIFY_BAD; | 568 | return NOTIFY_BAD; |
569 | } | ||
570 | break; | 569 | break; |
571 | case CPU_UP_CANCELED: | 570 | case CPU_UP_CANCELED: |
572 | case CPU_UP_CANCELED_FROZEN: | 571 | case CPU_UP_CANCELED_FROZEN: |
573 | case CPU_DEAD: | 572 | case CPU_DEAD: |
574 | case CPU_DEAD_FROZEN: | 573 | case CPU_DEAD_FROZEN: |
575 | percpu_depopulate(iucv_param, cpu); | 574 | kfree(iucv_param[cpu]); |
576 | percpu_depopulate(iucv_irq_data, cpu); | 575 | iucv_param[cpu] = NULL; |
576 | kfree(iucv_irq_data[cpu]); | ||
577 | iucv_irq_data[cpu] = NULL; | ||
577 | break; | 578 | break; |
578 | case CPU_ONLINE: | 579 | case CPU_ONLINE: |
579 | case CPU_ONLINE_FROZEN: | 580 | case CPU_ONLINE_FROZEN: |
@@ -612,7 +613,7 @@ static int iucv_sever_pathid(u16 pathid, u8 userdata[16]) | |||
612 | { | 613 | { |
613 | union iucv_param *parm; | 614 | union iucv_param *parm; |
614 | 615 | ||
615 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 616 | parm = iucv_param[smp_processor_id()]; |
616 | memset(parm, 0, sizeof(union iucv_param)); | 617 | memset(parm, 0, sizeof(union iucv_param)); |
617 | if (userdata) | 618 | if (userdata) |
618 | memcpy(parm->ctrl.ipuser, userdata, sizeof(parm->ctrl.ipuser)); | 619 | memcpy(parm->ctrl.ipuser, userdata, sizeof(parm->ctrl.ipuser)); |
@@ -755,7 +756,7 @@ int iucv_path_accept(struct iucv_path *path, struct iucv_handler *handler, | |||
755 | 756 | ||
756 | local_bh_disable(); | 757 | local_bh_disable(); |
757 | /* Prepare parameter block. */ | 758 | /* Prepare parameter block. */ |
758 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 759 | parm = iucv_param[smp_processor_id()]; |
759 | memset(parm, 0, sizeof(union iucv_param)); | 760 | memset(parm, 0, sizeof(union iucv_param)); |
760 | parm->ctrl.ippathid = path->pathid; | 761 | parm->ctrl.ippathid = path->pathid; |
761 | parm->ctrl.ipmsglim = path->msglim; | 762 | parm->ctrl.ipmsglim = path->msglim; |
@@ -799,7 +800,7 @@ int iucv_path_connect(struct iucv_path *path, struct iucv_handler *handler, | |||
799 | BUG_ON(in_atomic()); | 800 | BUG_ON(in_atomic()); |
800 | spin_lock_bh(&iucv_table_lock); | 801 | spin_lock_bh(&iucv_table_lock); |
801 | iucv_cleanup_queue(); | 802 | iucv_cleanup_queue(); |
802 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 803 | parm = iucv_param[smp_processor_id()]; |
803 | memset(parm, 0, sizeof(union iucv_param)); | 804 | memset(parm, 0, sizeof(union iucv_param)); |
804 | parm->ctrl.ipmsglim = path->msglim; | 805 | parm->ctrl.ipmsglim = path->msglim; |
805 | parm->ctrl.ipflags1 = path->flags; | 806 | parm->ctrl.ipflags1 = path->flags; |
@@ -854,7 +855,7 @@ int iucv_path_quiesce(struct iucv_path *path, u8 userdata[16]) | |||
854 | int rc; | 855 | int rc; |
855 | 856 | ||
856 | local_bh_disable(); | 857 | local_bh_disable(); |
857 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 858 | parm = iucv_param[smp_processor_id()]; |
858 | memset(parm, 0, sizeof(union iucv_param)); | 859 | memset(parm, 0, sizeof(union iucv_param)); |
859 | if (userdata) | 860 | if (userdata) |
860 | memcpy(parm->ctrl.ipuser, userdata, sizeof(parm->ctrl.ipuser)); | 861 | memcpy(parm->ctrl.ipuser, userdata, sizeof(parm->ctrl.ipuser)); |
@@ -881,7 +882,7 @@ int iucv_path_resume(struct iucv_path *path, u8 userdata[16]) | |||
881 | int rc; | 882 | int rc; |
882 | 883 | ||
883 | local_bh_disable(); | 884 | local_bh_disable(); |
884 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 885 | parm = iucv_param[smp_processor_id()]; |
885 | memset(parm, 0, sizeof(union iucv_param)); | 886 | memset(parm, 0, sizeof(union iucv_param)); |
886 | if (userdata) | 887 | if (userdata) |
887 | memcpy(parm->ctrl.ipuser, userdata, sizeof(parm->ctrl.ipuser)); | 888 | memcpy(parm->ctrl.ipuser, userdata, sizeof(parm->ctrl.ipuser)); |
@@ -936,7 +937,7 @@ int iucv_message_purge(struct iucv_path *path, struct iucv_message *msg, | |||
936 | int rc; | 937 | int rc; |
937 | 938 | ||
938 | local_bh_disable(); | 939 | local_bh_disable(); |
939 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 940 | parm = iucv_param[smp_processor_id()]; |
940 | memset(parm, 0, sizeof(union iucv_param)); | 941 | memset(parm, 0, sizeof(union iucv_param)); |
941 | parm->purge.ippathid = path->pathid; | 942 | parm->purge.ippathid = path->pathid; |
942 | parm->purge.ipmsgid = msg->id; | 943 | parm->purge.ipmsgid = msg->id; |
@@ -1003,7 +1004,7 @@ int iucv_message_receive(struct iucv_path *path, struct iucv_message *msg, | |||
1003 | } | 1004 | } |
1004 | 1005 | ||
1005 | local_bh_disable(); | 1006 | local_bh_disable(); |
1006 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 1007 | parm = iucv_param[smp_processor_id()]; |
1007 | memset(parm, 0, sizeof(union iucv_param)); | 1008 | memset(parm, 0, sizeof(union iucv_param)); |
1008 | parm->db.ipbfadr1 = (u32)(addr_t) buffer; | 1009 | parm->db.ipbfadr1 = (u32)(addr_t) buffer; |
1009 | parm->db.ipbfln1f = (u32) size; | 1010 | parm->db.ipbfln1f = (u32) size; |
@@ -1040,7 +1041,7 @@ int iucv_message_reject(struct iucv_path *path, struct iucv_message *msg) | |||
1040 | int rc; | 1041 | int rc; |
1041 | 1042 | ||
1042 | local_bh_disable(); | 1043 | local_bh_disable(); |
1043 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 1044 | parm = iucv_param[smp_processor_id()]; |
1044 | memset(parm, 0, sizeof(union iucv_param)); | 1045 | memset(parm, 0, sizeof(union iucv_param)); |
1045 | parm->db.ippathid = path->pathid; | 1046 | parm->db.ippathid = path->pathid; |
1046 | parm->db.ipmsgid = msg->id; | 1047 | parm->db.ipmsgid = msg->id; |
@@ -1074,7 +1075,7 @@ int iucv_message_reply(struct iucv_path *path, struct iucv_message *msg, | |||
1074 | int rc; | 1075 | int rc; |
1075 | 1076 | ||
1076 | local_bh_disable(); | 1077 | local_bh_disable(); |
1077 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 1078 | parm = iucv_param[smp_processor_id()]; |
1078 | memset(parm, 0, sizeof(union iucv_param)); | 1079 | memset(parm, 0, sizeof(union iucv_param)); |
1079 | if (flags & IUCV_IPRMDATA) { | 1080 | if (flags & IUCV_IPRMDATA) { |
1080 | parm->dpl.ippathid = path->pathid; | 1081 | parm->dpl.ippathid = path->pathid; |
@@ -1118,7 +1119,7 @@ int iucv_message_send(struct iucv_path *path, struct iucv_message *msg, | |||
1118 | int rc; | 1119 | int rc; |
1119 | 1120 | ||
1120 | local_bh_disable(); | 1121 | local_bh_disable(); |
1121 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 1122 | parm = iucv_param[smp_processor_id()]; |
1122 | memset(parm, 0, sizeof(union iucv_param)); | 1123 | memset(parm, 0, sizeof(union iucv_param)); |
1123 | if (flags & IUCV_IPRMDATA) { | 1124 | if (flags & IUCV_IPRMDATA) { |
1124 | /* Message of 8 bytes can be placed into the parameter list. */ | 1125 | /* Message of 8 bytes can be placed into the parameter list. */ |
@@ -1172,7 +1173,7 @@ int iucv_message_send2way(struct iucv_path *path, struct iucv_message *msg, | |||
1172 | int rc; | 1173 | int rc; |
1173 | 1174 | ||
1174 | local_bh_disable(); | 1175 | local_bh_disable(); |
1175 | parm = percpu_ptr(iucv_param, smp_processor_id()); | 1176 | parm = iucv_param[smp_processor_id()]; |
1176 | memset(parm, 0, sizeof(union iucv_param)); | 1177 | memset(parm, 0, sizeof(union iucv_param)); |
1177 | if (flags & IUCV_IPRMDATA) { | 1178 | if (flags & IUCV_IPRMDATA) { |
1178 | parm->dpl.ippathid = path->pathid; | 1179 | parm->dpl.ippathid = path->pathid; |
@@ -1559,7 +1560,7 @@ static void iucv_external_interrupt(u16 code) | |||
1559 | struct iucv_irq_data *p; | 1560 | struct iucv_irq_data *p; |
1560 | struct iucv_irq_list *work; | 1561 | struct iucv_irq_list *work; |
1561 | 1562 | ||
1562 | p = percpu_ptr(iucv_irq_data, smp_processor_id()); | 1563 | p = iucv_irq_data[smp_processor_id()]; |
1563 | if (p->ippathid >= iucv_max_pathid) { | 1564 | if (p->ippathid >= iucv_max_pathid) { |
1564 | printk(KERN_WARNING "iucv_do_int: Got interrupt with " | 1565 | printk(KERN_WARNING "iucv_do_int: Got interrupt with " |
1565 | "pathid %d > max_connections (%ld)\n", | 1566 | "pathid %d > max_connections (%ld)\n", |
@@ -1598,6 +1599,7 @@ static void iucv_external_interrupt(u16 code) | |||
1598 | static int __init iucv_init(void) | 1599 | static int __init iucv_init(void) |
1599 | { | 1600 | { |
1600 | int rc; | 1601 | int rc; |
1602 | int cpu; | ||
1601 | 1603 | ||
1602 | if (!MACHINE_IS_VM) { | 1604 | if (!MACHINE_IS_VM) { |
1603 | rc = -EPROTONOSUPPORT; | 1605 | rc = -EPROTONOSUPPORT; |
@@ -1617,19 +1619,23 @@ static int __init iucv_init(void) | |||
1617 | rc = PTR_ERR(iucv_root); | 1619 | rc = PTR_ERR(iucv_root); |
1618 | goto out_bus; | 1620 | goto out_bus; |
1619 | } | 1621 | } |
1620 | /* Note: GFP_DMA used to get memory below 2G */ | 1622 | |
1621 | iucv_irq_data = percpu_alloc(sizeof(struct iucv_irq_data), | 1623 | for_each_online_cpu(cpu) { |
1622 | GFP_KERNEL|GFP_DMA); | 1624 | /* Note: GFP_DMA used to get memory below 2G */ |
1623 | if (!iucv_irq_data) { | 1625 | iucv_irq_data[cpu] = kmalloc_node(sizeof(struct iucv_irq_data), |
1624 | rc = -ENOMEM; | 1626 | GFP_KERNEL|GFP_DMA, cpu_to_node(cpu)); |
1625 | goto out_root; | 1627 | if (!iucv_irq_data[cpu]) { |
1626 | } | 1628 | rc = -ENOMEM; |
1627 | /* Allocate parameter blocks. */ | 1629 | goto out_free; |
1628 | iucv_param = percpu_alloc(sizeof(union iucv_param), | 1630 | } |
1629 | GFP_KERNEL|GFP_DMA); | 1631 | |
1630 | if (!iucv_param) { | 1632 | /* Allocate parameter blocks. */ |
1631 | rc = -ENOMEM; | 1633 | iucv_param[cpu] = kmalloc_node(sizeof(union iucv_param), |
1632 | goto out_extint; | 1634 | GFP_KERNEL|GFP_DMA, cpu_to_node(cpu)); |
1635 | if (!iucv_param[cpu]) { | ||
1636 | rc = -ENOMEM; | ||
1637 | goto out_free; | ||
1638 | } | ||
1633 | } | 1639 | } |
1634 | register_hotcpu_notifier(&iucv_cpu_notifier); | 1640 | register_hotcpu_notifier(&iucv_cpu_notifier); |
1635 | ASCEBC(iucv_error_no_listener, 16); | 1641 | ASCEBC(iucv_error_no_listener, 16); |
@@ -1638,9 +1644,13 @@ static int __init iucv_init(void) | |||
1638 | iucv_available = 1; | 1644 | iucv_available = 1; |
1639 | return 0; | 1645 | return 0; |
1640 | 1646 | ||
1641 | out_extint: | 1647 | out_free: |
1642 | percpu_free(iucv_irq_data); | 1648 | for_each_possible_cpu(cpu) { |
1643 | out_root: | 1649 | kfree(iucv_param[cpu]); |
1650 | iucv_param[cpu] = NULL; | ||
1651 | kfree(iucv_irq_data[cpu]); | ||
1652 | iucv_irq_data[cpu] = NULL; | ||
1653 | } | ||
1644 | s390_root_dev_unregister(iucv_root); | 1654 | s390_root_dev_unregister(iucv_root); |
1645 | out_bus: | 1655 | out_bus: |
1646 | bus_unregister(&iucv_bus); | 1656 | bus_unregister(&iucv_bus); |
@@ -1658,6 +1668,7 @@ out: | |||
1658 | static void __exit iucv_exit(void) | 1668 | static void __exit iucv_exit(void) |
1659 | { | 1669 | { |
1660 | struct iucv_irq_list *p, *n; | 1670 | struct iucv_irq_list *p, *n; |
1671 | int cpu; | ||
1661 | 1672 | ||
1662 | spin_lock_irq(&iucv_queue_lock); | 1673 | spin_lock_irq(&iucv_queue_lock); |
1663 | list_for_each_entry_safe(p, n, &iucv_task_queue, list) | 1674 | list_for_each_entry_safe(p, n, &iucv_task_queue, list) |
@@ -1666,8 +1677,12 @@ static void __exit iucv_exit(void) | |||
1666 | kfree(p); | 1677 | kfree(p); |
1667 | spin_unlock_irq(&iucv_queue_lock); | 1678 | spin_unlock_irq(&iucv_queue_lock); |
1668 | unregister_hotcpu_notifier(&iucv_cpu_notifier); | 1679 | unregister_hotcpu_notifier(&iucv_cpu_notifier); |
1669 | percpu_free(iucv_param); | 1680 | for_each_possible_cpu(cpu) { |
1670 | percpu_free(iucv_irq_data); | 1681 | kfree(iucv_param[cpu]); |
1682 | iucv_param[cpu] = NULL; | ||
1683 | kfree(iucv_irq_data[cpu]); | ||
1684 | iucv_irq_data[cpu] = NULL; | ||
1685 | } | ||
1671 | s390_root_dev_unregister(iucv_root); | 1686 | s390_root_dev_unregister(iucv_root); |
1672 | bus_unregister(&iucv_bus); | 1687 | bus_unregister(&iucv_bus); |
1673 | unregister_external_interrupt(0x4000, iucv_external_interrupt); | 1688 | unregister_external_interrupt(0x4000, iucv_external_interrupt); |
diff --git a/sound/drivers/mpu401/mpu401_uart.c b/sound/drivers/mpu401/mpu401_uart.c index 3306ecd49243..b57f2d5a1c9d 100644 --- a/sound/drivers/mpu401/mpu401_uart.c +++ b/sound/drivers/mpu401/mpu401_uart.c | |||
@@ -97,23 +97,27 @@ static void snd_mpu401_uart_clear_rx(struct snd_mpu401 *mpu) | |||
97 | 97 | ||
98 | static void uart_interrupt_tx(struct snd_mpu401 *mpu) | 98 | static void uart_interrupt_tx(struct snd_mpu401 *mpu) |
99 | { | 99 | { |
100 | unsigned long flags; | ||
101 | |||
100 | if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) && | 102 | if (test_bit(MPU401_MODE_BIT_OUTPUT, &mpu->mode) && |
101 | test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) { | 103 | test_bit(MPU401_MODE_BIT_OUTPUT_TRIGGER, &mpu->mode)) { |
102 | spin_lock(&mpu->output_lock); | 104 | spin_lock_irqsave(&mpu->output_lock, flags); |
103 | snd_mpu401_uart_output_write(mpu); | 105 | snd_mpu401_uart_output_write(mpu); |
104 | spin_unlock(&mpu->output_lock); | 106 | spin_unlock_irqrestore(&mpu->output_lock, flags); |
105 | } | 107 | } |
106 | } | 108 | } |
107 | 109 | ||
108 | static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu) | 110 | static void _snd_mpu401_uart_interrupt(struct snd_mpu401 *mpu) |
109 | { | 111 | { |
112 | unsigned long flags; | ||
113 | |||
110 | if (mpu->info_flags & MPU401_INFO_INPUT) { | 114 | if (mpu->info_flags & MPU401_INFO_INPUT) { |
111 | spin_lock(&mpu->input_lock); | 115 | spin_lock_irqsave(&mpu->input_lock, flags); |
112 | if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) | 116 | if (test_bit(MPU401_MODE_BIT_INPUT, &mpu->mode)) |
113 | snd_mpu401_uart_input_read(mpu); | 117 | snd_mpu401_uart_input_read(mpu); |
114 | else | 118 | else |
115 | snd_mpu401_uart_clear_rx(mpu); | 119 | snd_mpu401_uart_clear_rx(mpu); |
116 | spin_unlock(&mpu->input_lock); | 120 | spin_unlock_irqrestore(&mpu->input_lock, flags); |
117 | } | 121 | } |
118 | if (! (mpu->info_flags & MPU401_INFO_TX_IRQ)) | 122 | if (! (mpu->info_flags & MPU401_INFO_TX_IRQ)) |
119 | /* ok. for better Tx performance try do some output | 123 | /* ok. for better Tx performance try do some output |
diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c index e065b2a6444a..1b832870cc84 100644 --- a/sound/drivers/portman2x4.c +++ b/sound/drivers/portman2x4.c | |||
@@ -668,7 +668,7 @@ static int __devinit snd_portman_probe_port(struct parport *p) | |||
668 | parport_release(pardev); | 668 | parport_release(pardev); |
669 | parport_unregister_device(pardev); | 669 | parport_unregister_device(pardev); |
670 | 670 | ||
671 | return res; | 671 | return res ? -EIO : 0; |
672 | } | 672 | } |
673 | 673 | ||
674 | static void __devinit snd_portman_attach(struct parport *p) | 674 | static void __devinit snd_portman_attach(struct parport *p) |
diff --git a/sound/pci/ca0106/ca0106_mixer.c b/sound/pci/ca0106/ca0106_mixer.c index be519a17dfa5..3f9b5c560036 100644 --- a/sound/pci/ca0106/ca0106_mixer.c +++ b/sound/pci/ca0106/ca0106_mixer.c | |||
@@ -86,7 +86,7 @@ static int snd_ca0106_shared_spdif_get(struct snd_kcontrol *kcontrol, | |||
86 | { | 86 | { |
87 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); | 87 | struct snd_ca0106 *emu = snd_kcontrol_chip(kcontrol); |
88 | 88 | ||
89 | ucontrol->value.enumerated.item[0] = emu->spdif_enable; | 89 | ucontrol->value.integer.value[0] = emu->spdif_enable; |
90 | return 0; | 90 | return 0; |
91 | } | 91 | } |
92 | 92 | ||
@@ -98,11 +98,11 @@ static int snd_ca0106_shared_spdif_put(struct snd_kcontrol *kcontrol, | |||
98 | int change = 0; | 98 | int change = 0; |
99 | u32 mask; | 99 | u32 mask; |
100 | 100 | ||
101 | val = ucontrol->value.enumerated.item[0] ; | 101 | val = !!ucontrol->value.integer.value[0]; |
102 | change = (emu->spdif_enable != val); | 102 | change = (emu->spdif_enable != val); |
103 | if (change) { | 103 | if (change) { |
104 | emu->spdif_enable = val; | 104 | emu->spdif_enable = val; |
105 | if (val == 1) { | 105 | if (val) { |
106 | /* Digital */ | 106 | /* Digital */ |
107 | snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf); | 107 | snd_ca0106_ptr_write(emu, SPDIF_SELECT1, 0, 0xf); |
108 | snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x0b000000); | 108 | snd_ca0106_ptr_write(emu, SPDIF_SELECT2, 0, 0x0b000000); |
@@ -159,6 +159,8 @@ static int snd_ca0106_capture_source_put(struct snd_kcontrol *kcontrol, | |||
159 | u32 source; | 159 | u32 source; |
160 | 160 | ||
161 | val = ucontrol->value.enumerated.item[0] ; | 161 | val = ucontrol->value.enumerated.item[0] ; |
162 | if (val >= 6) | ||
163 | return -EINVAL; | ||
162 | change = (emu->capture_source != val); | 164 | change = (emu->capture_source != val); |
163 | if (change) { | 165 | if (change) { |
164 | emu->capture_source = val; | 166 | emu->capture_source = val; |
@@ -207,6 +209,8 @@ static int snd_ca0106_i2c_capture_source_put(struct snd_kcontrol *kcontrol, | |||
207 | * for the particular source. | 209 | * for the particular source. |
208 | */ | 210 | */ |
209 | source_id = ucontrol->value.enumerated.item[0] ; | 211 | source_id = ucontrol->value.enumerated.item[0] ; |
212 | if (source_id >= 4) | ||
213 | return -EINVAL; | ||
210 | change = (emu->i2c_capture_source != source_id); | 214 | change = (emu->i2c_capture_source != source_id); |
211 | if (change) { | 215 | if (change) { |
212 | snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */ | 216 | snd_ca0106_i2c_write(emu, ADC_MUX, 0); /* Mute input */ |
@@ -271,6 +275,8 @@ static int snd_ca0106_capture_mic_line_in_put(struct snd_kcontrol *kcontrol, | |||
271 | u32 tmp; | 275 | u32 tmp; |
272 | 276 | ||
273 | val = ucontrol->value.enumerated.item[0] ; | 277 | val = ucontrol->value.enumerated.item[0] ; |
278 | if (val > 1) | ||
279 | return -EINVAL; | ||
274 | change = (emu->capture_mic_line_in != val); | 280 | change = (emu->capture_mic_line_in != val); |
275 | if (change) { | 281 | if (change) { |
276 | emu->capture_mic_line_in = val; | 282 | emu->capture_mic_line_in = val; |
@@ -443,7 +449,7 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
443 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ | 449 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ |
444 | ngain = ucontrol->value.integer.value[0]; | 450 | ngain = ucontrol->value.integer.value[0]; |
445 | if (ngain > 0xff) | 451 | if (ngain > 0xff) |
446 | return 0; | 452 | return -EINVAL; |
447 | if (ogain != ngain) { | 453 | if (ogain != ngain) { |
448 | if (emu->i2c_capture_source == source_id) | 454 | if (emu->i2c_capture_source == source_id) |
449 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); | 455 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); |
@@ -453,7 +459,7 @@ static int snd_ca0106_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
453 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ | 459 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ |
454 | ngain = ucontrol->value.integer.value[1]; | 460 | ngain = ucontrol->value.integer.value[1]; |
455 | if (ngain > 0xff) | 461 | if (ngain > 0xff) |
456 | return 0; | 462 | return -EINVAL; |
457 | if (ogain != ngain) { | 463 | if (ogain != ngain) { |
458 | if (emu->i2c_capture_source == source_id) | 464 | if (emu->i2c_capture_source == source_id) |
459 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); | 465 | snd_ca0106_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); |
@@ -497,7 +503,7 @@ static int spi_mute_put(struct snd_kcontrol *kcontrol, | |||
497 | } | 503 | } |
498 | 504 | ||
499 | ret = snd_ca0106_spi_write(emu, emu->spi_dac_reg[reg]); | 505 | ret = snd_ca0106_spi_write(emu, emu->spi_dac_reg[reg]); |
500 | return ret ? -1 : 1; | 506 | return ret ? -EINVAL : 1; |
501 | } | 507 | } |
502 | 508 | ||
503 | #define CA_VOLUME(xname,chid,reg) \ | 509 | #define CA_VOLUME(xname,chid,reg) \ |
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index ae80f51d8c4f..61f2718ae359 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c | |||
@@ -445,13 +445,11 @@ int __devinit snd_ca0106_proc_init(struct snd_ca0106 * emu) | |||
445 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); | 445 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read1); |
446 | entry->c.text.write = snd_ca0106_proc_reg_write; | 446 | entry->c.text.write = snd_ca0106_proc_reg_write; |
447 | entry->mode |= S_IWUSR; | 447 | entry->mode |= S_IWUSR; |
448 | // entry->private_data = emu; | ||
449 | } | 448 | } |
450 | if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { | 449 | if(! snd_card_proc_new(emu->card, "ca0106_i2c", &entry)) { |
451 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_i2c_write); | ||
452 | entry->c.text.write = snd_ca0106_proc_i2c_write; | 450 | entry->c.text.write = snd_ca0106_proc_i2c_write; |
451 | entry->private_data = emu; | ||
453 | entry->mode |= S_IWUSR; | 452 | entry->mode |= S_IWUSR; |
454 | // entry->private_data = emu; | ||
455 | } | 453 | } |
456 | if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) | 454 | if(! snd_card_proc_new(emu->card, "ca0106_regs2", &entry)) |
457 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); | 455 | snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); |
diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 6832649879ce..1fa5f004e858 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c | |||
@@ -246,10 +246,9 @@ MODULE_PARM_DESC(joystick_port, "Joystick port address."); | |||
246 | #define CM_MMODE_MASK 0x00000E00 /* model DAA interface mode */ | 246 | #define CM_MMODE_MASK 0x00000E00 /* model DAA interface mode */ |
247 | #define CM_SPDIF_SELECT2 0x00000100 /* for model > 039 ? */ | 247 | #define CM_SPDIF_SELECT2 0x00000100 /* for model > 039 ? */ |
248 | #define CM_ENCENTER 0x00000080 | 248 | #define CM_ENCENTER 0x00000080 |
249 | #define CM_FLINKON 0x00000080 /* force modem link detection on, model 037 */ | 249 | #define CM_FLINKON 0x00000040 /* force modem link detection on, model 037 */ |
250 | #define CM_MUTECH1 0x00000040 /* mute PCI ch1 to DAC */ | 250 | #define CM_MUTECH1 0x00000040 /* mute PCI ch1 to DAC */ |
251 | #define CM_FLINKOFF 0x00000040 /* force modem link detection off, model 037 */ | 251 | #define CM_FLINKOFF 0x00000020 /* force modem link detection off, model 037 */ |
252 | #define CM_UNKNOWN_18_5 0x00000020 /* ? */ | ||
253 | #define CM_MIDSMP 0x00000010 /* 1/2 interpolation at front end DAC */ | 252 | #define CM_MIDSMP 0x00000010 /* 1/2 interpolation at front end DAC */ |
254 | #define CM_UPDDMA_MASK 0x0000000C /* TDMA position update notification */ | 253 | #define CM_UPDDMA_MASK 0x0000000C /* TDMA position update notification */ |
255 | #define CM_UPDDMA_2048 0x00000000 | 254 | #define CM_UPDDMA_2048 0x00000000 |
diff --git a/sound/pci/emu10k1/emumixer.c b/sound/pci/emu10k1/emumixer.c index 54a2034d8edd..ccacd7b890e8 100644 --- a/sound/pci/emu10k1/emumixer.c +++ b/sound/pci/emu10k1/emumixer.c | |||
@@ -58,6 +58,9 @@ static int snd_emu10k1_spdif_get(struct snd_kcontrol *kcontrol, | |||
58 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); | 58 | unsigned int idx = snd_ctl_get_ioffidx(kcontrol, &ucontrol->id); |
59 | unsigned long flags; | 59 | unsigned long flags; |
60 | 60 | ||
61 | /* Limit: emu->spdif_bits */ | ||
62 | if (idx >= 3) | ||
63 | return -EINVAL; | ||
61 | spin_lock_irqsave(&emu->reg_lock, flags); | 64 | spin_lock_irqsave(&emu->reg_lock, flags); |
62 | ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff; | 65 | ucontrol->value.iec958.status[0] = (emu->spdif_bits[idx] >> 0) & 0xff; |
63 | ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff; | 66 | ucontrol->value.iec958.status[1] = (emu->spdif_bits[idx] >> 8) & 0xff; |
@@ -272,9 +275,12 @@ static int snd_emu1010_output_source_get(struct snd_kcontrol *kcontrol, | |||
272 | struct snd_ctl_elem_value *ucontrol) | 275 | struct snd_ctl_elem_value *ucontrol) |
273 | { | 276 | { |
274 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 277 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
275 | int channel; | 278 | unsigned int channel; |
276 | 279 | ||
277 | channel = (kcontrol->private_value) & 0xff; | 280 | channel = (kcontrol->private_value) & 0xff; |
281 | /* Limit: emu1010_output_dst, emu->emu1010.output_source */ | ||
282 | if (channel >= 24) | ||
283 | return -EINVAL; | ||
278 | ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel]; | 284 | ucontrol->value.enumerated.item[0] = emu->emu1010.output_source[channel]; |
279 | return 0; | 285 | return 0; |
280 | } | 286 | } |
@@ -285,11 +291,17 @@ static int snd_emu1010_output_source_put(struct snd_kcontrol *kcontrol, | |||
285 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 291 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
286 | int change = 0; | 292 | int change = 0; |
287 | unsigned int val; | 293 | unsigned int val; |
288 | int channel; | 294 | unsigned int channel; |
289 | 295 | ||
296 | val = ucontrol->value.enumerated.item[0]; | ||
297 | if (val >= 53) | ||
298 | return -EINVAL; | ||
290 | channel = (kcontrol->private_value) & 0xff; | 299 | channel = (kcontrol->private_value) & 0xff; |
291 | if (emu->emu1010.output_source[channel] != ucontrol->value.enumerated.item[0]) { | 300 | /* Limit: emu1010_output_dst, emu->emu1010.output_source */ |
292 | val = emu->emu1010.output_source[channel] = ucontrol->value.enumerated.item[0]; | 301 | if (channel >= 24) |
302 | return -EINVAL; | ||
303 | if (emu->emu1010.output_source[channel] != val) { | ||
304 | emu->emu1010.output_source[channel] = val; | ||
293 | change = 1; | 305 | change = 1; |
294 | snd_emu1010_fpga_link_dst_src_write(emu, | 306 | snd_emu1010_fpga_link_dst_src_write(emu, |
295 | emu1010_output_dst[channel], emu1010_src_regs[val]); | 307 | emu1010_output_dst[channel], emu1010_src_regs[val]); |
@@ -301,9 +313,12 @@ static int snd_emu1010_input_source_get(struct snd_kcontrol *kcontrol, | |||
301 | struct snd_ctl_elem_value *ucontrol) | 313 | struct snd_ctl_elem_value *ucontrol) |
302 | { | 314 | { |
303 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 315 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
304 | int channel; | 316 | unsigned int channel; |
305 | 317 | ||
306 | channel = (kcontrol->private_value) & 0xff; | 318 | channel = (kcontrol->private_value) & 0xff; |
319 | /* Limit: emu1010_input_dst, emu->emu1010.input_source */ | ||
320 | if (channel >= 22) | ||
321 | return -EINVAL; | ||
307 | ucontrol->value.enumerated.item[0] = emu->emu1010.input_source[channel]; | 322 | ucontrol->value.enumerated.item[0] = emu->emu1010.input_source[channel]; |
308 | return 0; | 323 | return 0; |
309 | } | 324 | } |
@@ -314,11 +329,17 @@ static int snd_emu1010_input_source_put(struct snd_kcontrol *kcontrol, | |||
314 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 329 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
315 | int change = 0; | 330 | int change = 0; |
316 | unsigned int val; | 331 | unsigned int val; |
317 | int channel; | 332 | unsigned int channel; |
318 | 333 | ||
334 | val = ucontrol->value.enumerated.item[0]; | ||
335 | if (val >= 53) | ||
336 | return -EINVAL; | ||
319 | channel = (kcontrol->private_value) & 0xff; | 337 | channel = (kcontrol->private_value) & 0xff; |
320 | if (emu->emu1010.input_source[channel] != ucontrol->value.enumerated.item[0]) { | 338 | /* Limit: emu1010_input_dst, emu->emu1010.input_source */ |
321 | val = emu->emu1010.input_source[channel] = ucontrol->value.enumerated.item[0]; | 339 | if (channel >= 22) |
340 | return -EINVAL; | ||
341 | if (emu->emu1010.input_source[channel] != val) { | ||
342 | emu->emu1010.input_source[channel] = val; | ||
322 | change = 1; | 343 | change = 1; |
323 | snd_emu1010_fpga_link_dst_src_write(emu, | 344 | snd_emu1010_fpga_link_dst_src_write(emu, |
324 | emu1010_input_dst[channel], emu1010_src_regs[val]); | 345 | emu1010_input_dst[channel], emu1010_src_regs[val]); |
@@ -533,6 +554,9 @@ static int snd_emu1010_internal_clock_put(struct snd_kcontrol *kcontrol, | |||
533 | int change = 0; | 554 | int change = 0; |
534 | 555 | ||
535 | val = ucontrol->value.enumerated.item[0] ; | 556 | val = ucontrol->value.enumerated.item[0] ; |
557 | /* Limit: uinfo->value.enumerated.items = 4; */ | ||
558 | if (val >= 4) | ||
559 | return -EINVAL; | ||
536 | change = (emu->emu1010.internal_clock != val); | 560 | change = (emu->emu1010.internal_clock != val); |
537 | if (change) { | 561 | if (change) { |
538 | emu->emu1010.internal_clock = val; | 562 | emu->emu1010.internal_clock = val; |
@@ -669,7 +693,11 @@ static int snd_audigy_i2c_capture_source_put(struct snd_kcontrol *kcontrol, | |||
669 | * update the capture volume from the cached value | 693 | * update the capture volume from the cached value |
670 | * for the particular source. | 694 | * for the particular source. |
671 | */ | 695 | */ |
672 | source_id = ucontrol->value.enumerated.item[0]; /* Use 2 and 3 */ | 696 | source_id = ucontrol->value.enumerated.item[0]; |
697 | /* Limit: uinfo->value.enumerated.items = 2; */ | ||
698 | /* emu->i2c_capture_volume */ | ||
699 | if (source_id >= 2) | ||
700 | return -EINVAL; | ||
673 | change = (emu->i2c_capture_source != source_id); | 701 | change = (emu->i2c_capture_source != source_id); |
674 | if (change) { | 702 | if (change) { |
675 | snd_emu10k1_i2c_write(emu, ADC_MUX, 0); /* Mute input */ | 703 | snd_emu10k1_i2c_write(emu, ADC_MUX, 0); /* Mute input */ |
@@ -720,9 +748,13 @@ static int snd_audigy_i2c_volume_get(struct snd_kcontrol *kcontrol, | |||
720 | struct snd_ctl_elem_value *ucontrol) | 748 | struct snd_ctl_elem_value *ucontrol) |
721 | { | 749 | { |
722 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 750 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
723 | int source_id; | 751 | unsigned int source_id; |
724 | 752 | ||
725 | source_id = kcontrol->private_value; | 753 | source_id = kcontrol->private_value; |
754 | /* Limit: emu->i2c_capture_volume */ | ||
755 | /* capture_source: uinfo->value.enumerated.items = 2 */ | ||
756 | if (source_id >= 2) | ||
757 | return -EINVAL; | ||
726 | 758 | ||
727 | ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0]; | 759 | ucontrol->value.integer.value[0] = emu->i2c_capture_volume[source_id][0]; |
728 | ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1]; | 760 | ucontrol->value.integer.value[1] = emu->i2c_capture_volume[source_id][1]; |
@@ -735,10 +767,14 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
735 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); | 767 | struct snd_emu10k1 *emu = snd_kcontrol_chip(kcontrol); |
736 | unsigned int ogain; | 768 | unsigned int ogain; |
737 | unsigned int ngain; | 769 | unsigned int ngain; |
738 | int source_id; | 770 | unsigned int source_id; |
739 | int change = 0; | 771 | int change = 0; |
740 | 772 | ||
741 | source_id = kcontrol->private_value; | 773 | source_id = kcontrol->private_value; |
774 | /* Limit: emu->i2c_capture_volume */ | ||
775 | /* capture_source: uinfo->value.enumerated.items = 2 */ | ||
776 | if (source_id >= 2) | ||
777 | return -EINVAL; | ||
742 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ | 778 | ogain = emu->i2c_capture_volume[source_id][0]; /* Left */ |
743 | ngain = ucontrol->value.integer.value[0]; | 779 | ngain = ucontrol->value.integer.value[0]; |
744 | if (ngain > 0xff) | 780 | if (ngain > 0xff) |
@@ -746,7 +782,7 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
746 | if (ogain != ngain) { | 782 | if (ogain != ngain) { |
747 | if (emu->i2c_capture_source == source_id) | 783 | if (emu->i2c_capture_source == source_id) |
748 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); | 784 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCL, ((ngain) & 0xff) ); |
749 | emu->i2c_capture_volume[source_id][0] = ucontrol->value.integer.value[0]; | 785 | emu->i2c_capture_volume[source_id][0] = ngain; |
750 | change = 1; | 786 | change = 1; |
751 | } | 787 | } |
752 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ | 788 | ogain = emu->i2c_capture_volume[source_id][1]; /* Right */ |
@@ -756,7 +792,7 @@ static int snd_audigy_i2c_volume_put(struct snd_kcontrol *kcontrol, | |||
756 | if (ogain != ngain) { | 792 | if (ogain != ngain) { |
757 | if (emu->i2c_capture_source == source_id) | 793 | if (emu->i2c_capture_source == source_id) |
758 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); | 794 | snd_emu10k1_i2c_write(emu, ADC_ATTEN_ADCR, ((ngain) & 0xff)); |
759 | emu->i2c_capture_volume[source_id][1] = ucontrol->value.integer.value[1]; | 795 | emu->i2c_capture_volume[source_id][1] = ngain; |
760 | change = 1; | 796 | change = 1; |
761 | } | 797 | } |
762 | 798 | ||
@@ -877,6 +913,9 @@ static int snd_emu10k1_spdif_put(struct snd_kcontrol *kcontrol, | |||
877 | unsigned int val; | 913 | unsigned int val; |
878 | unsigned long flags; | 914 | unsigned long flags; |
879 | 915 | ||
916 | /* Limit: emu->spdif_bits */ | ||
917 | if (idx >= 3) | ||
918 | return -EINVAL; | ||
880 | val = (ucontrol->value.iec958.status[0] << 0) | | 919 | val = (ucontrol->value.iec958.status[0] << 0) | |
881 | (ucontrol->value.iec958.status[1] << 8) | | 920 | (ucontrol->value.iec958.status[1] << 8) | |
882 | (ucontrol->value.iec958.status[2] << 16) | | 921 | (ucontrol->value.iec958.status[2] << 16) | |
diff --git a/sound/pci/emu10k1/p16v.c b/sound/pci/emu10k1/p16v.c index d619a3842cdd..9fd3135f3118 100644 --- a/sound/pci/emu10k1/p16v.c +++ b/sound/pci/emu10k1/p16v.c | |||
@@ -742,6 +742,8 @@ static int snd_p16v_capture_source_put(struct snd_kcontrol *kcontrol, | |||
742 | u32 source; | 742 | u32 source; |
743 | 743 | ||
744 | val = ucontrol->value.enumerated.item[0] ; | 744 | val = ucontrol->value.enumerated.item[0] ; |
745 | if (val > 7) | ||
746 | return -EINVAL; | ||
745 | change = (emu->p16v_capture_source != val); | 747 | change = (emu->p16v_capture_source != val); |
746 | if (change) { | 748 | if (change) { |
747 | emu->p16v_capture_source = val; | 749 | emu->p16v_capture_source = val; |
@@ -784,6 +786,8 @@ static int snd_p16v_capture_channel_put(struct snd_kcontrol *kcontrol, | |||
784 | u32 tmp; | 786 | u32 tmp; |
785 | 787 | ||
786 | val = ucontrol->value.enumerated.item[0] ; | 788 | val = ucontrol->value.enumerated.item[0] ; |
789 | if (val > 3) | ||
790 | return -EINVAL; | ||
787 | change = (emu->p16v_capture_channel != val); | 791 | change = (emu->p16v_capture_channel != val); |
788 | if (change) { | 792 | if (change) { |
789 | emu->p16v_capture_channel = val; | 793 | emu->p16v_capture_channel = val; |
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index ad4cb38109fc..8cbe3bf1e317 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c | |||
@@ -1625,19 +1625,26 @@ static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg, | |||
1625 | 1625 | ||
1626 | nid = codec->start_nid; | 1626 | nid = codec->start_nid; |
1627 | for (i = 0; i < codec->num_nodes; i++, nid++) { | 1627 | for (i = 0; i < codec->num_nodes; i++, nid++) { |
1628 | if (get_wcaps(codec, nid) & AC_WCAP_POWER) { | 1628 | unsigned int wcaps = get_wcaps(codec, nid); |
1629 | unsigned int pincap; | 1629 | if (wcaps & AC_WCAP_POWER) { |
1630 | /* | 1630 | unsigned int wid_type = (wcaps & AC_WCAP_TYPE) >> |
1631 | * don't power down the widget if it controls eapd | 1631 | AC_WCAP_TYPE_SHIFT; |
1632 | * and EAPD_BTLENABLE is set. | 1632 | if (wid_type == AC_WID_PIN) { |
1633 | */ | 1633 | unsigned int pincap; |
1634 | pincap = snd_hda_param_read(codec, nid, AC_PAR_PIN_CAP); | 1634 | /* |
1635 | if (pincap & AC_PINCAP_EAPD) { | 1635 | * don't power down the widget if it controls |
1636 | int eapd = snd_hda_codec_read(codec, nid, | 1636 | * eapd and EAPD_BTLENABLE is set. |
1637 | 0, AC_VERB_GET_EAPD_BTLENABLE, 0); | 1637 | */ |
1638 | eapd &= 0x02; | 1638 | pincap = snd_hda_param_read(codec, nid, |
1639 | if (power_state == AC_PWRST_D3 && eapd) | 1639 | AC_PAR_PIN_CAP); |
1640 | continue; | 1640 | if (pincap & AC_PINCAP_EAPD) { |
1641 | int eapd = snd_hda_codec_read(codec, | ||
1642 | nid, 0, | ||
1643 | AC_VERB_GET_EAPD_BTLENABLE, 0); | ||
1644 | eapd &= 0x02; | ||
1645 | if (power_state == AC_PWRST_D3 && eapd) | ||
1646 | continue; | ||
1647 | } | ||
1641 | } | 1648 | } |
1642 | snd_hda_codec_write(codec, nid, 0, | 1649 | snd_hda_codec_write(codec, nid, 0, |
1643 | AC_VERB_SET_POWER_STATE, | 1650 | AC_VERB_SET_POWER_STATE, |
@@ -2485,13 +2492,14 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, | |||
2485 | /* front */ | 2492 | /* front */ |
2486 | snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag, | 2493 | snd_hda_codec_setup_stream(codec, nids[HDA_FRONT], stream_tag, |
2487 | 0, format); | 2494 | 0, format); |
2488 | if (mout->hp_nid && mout->hp_nid != nids[HDA_FRONT]) | 2495 | if (!mout->no_share_stream && |
2496 | mout->hp_nid && mout->hp_nid != nids[HDA_FRONT]) | ||
2489 | /* headphone out will just decode front left/right (stereo) */ | 2497 | /* headphone out will just decode front left/right (stereo) */ |
2490 | snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, | 2498 | snd_hda_codec_setup_stream(codec, mout->hp_nid, stream_tag, |
2491 | 0, format); | 2499 | 0, format); |
2492 | /* extra outputs copied from front */ | 2500 | /* extra outputs copied from front */ |
2493 | for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) | 2501 | for (i = 0; i < ARRAY_SIZE(mout->extra_out_nid); i++) |
2494 | if (mout->extra_out_nid[i]) | 2502 | if (!mout->no_share_stream && mout->extra_out_nid[i]) |
2495 | snd_hda_codec_setup_stream(codec, | 2503 | snd_hda_codec_setup_stream(codec, |
2496 | mout->extra_out_nid[i], | 2504 | mout->extra_out_nid[i], |
2497 | stream_tag, 0, format); | 2505 | stream_tag, 0, format); |
@@ -2501,7 +2509,7 @@ int snd_hda_multi_out_analog_prepare(struct hda_codec *codec, | |||
2501 | if (chs >= (i + 1) * 2) /* independent out */ | 2509 | if (chs >= (i + 1) * 2) /* independent out */ |
2502 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, | 2510 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, |
2503 | i * 2, format); | 2511 | i * 2, format); |
2504 | else /* copy front */ | 2512 | else if (!mout->no_share_stream) /* copy front */ |
2505 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, | 2513 | snd_hda_codec_setup_stream(codec, nids[i], stream_tag, |
2506 | 0, format); | 2514 | 0, format); |
2507 | } | 2515 | } |
diff --git a/sound/pci/hda/hda_local.h b/sound/pci/hda/hda_local.h index 20c5e6250374..8c56c9cb0d09 100644 --- a/sound/pci/hda/hda_local.h +++ b/sound/pci/hda/hda_local.h | |||
@@ -220,6 +220,7 @@ struct hda_multi_out { | |||
220 | hda_nid_t dig_out_nid; /* digital out audio widget */ | 220 | hda_nid_t dig_out_nid; /* digital out audio widget */ |
221 | int max_channels; /* currently supported analog channels */ | 221 | int max_channels; /* currently supported analog channels */ |
222 | int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */ | 222 | int dig_out_used; /* current usage of digital out (HDA_DIG_XXX) */ |
223 | int no_share_stream; /* don't share a stream with multiple pins */ | ||
223 | }; | 224 | }; |
224 | 225 | ||
225 | int snd_hda_multi_out_dig_open(struct hda_codec *codec, | 226 | int snd_hda_multi_out_dig_open(struct hda_codec *codec, |
diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c index 0ee8ae4d4410..196ad3c9405d 100644 --- a/sound/pci/hda/patch_analog.c +++ b/sound/pci/hda/patch_analog.c | |||
@@ -957,6 +957,14 @@ static int patch_ad1986a(struct hda_codec *codec) | |||
957 | break; | 957 | break; |
958 | } | 958 | } |
959 | 959 | ||
960 | /* AD1986A has a hardware problem that it can't share a stream | ||
961 | * with multiple output pins. The copy of front to surrounds | ||
962 | * causes noisy or silent outputs at a certain timing, e.g. | ||
963 | * changing the volume. | ||
964 | * So, let's disable the shared stream. | ||
965 | */ | ||
966 | spec->multiout.no_share_stream = 1; | ||
967 | |||
960 | return 0; | 968 | return 0; |
961 | } | 969 | } |
962 | 970 | ||
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index f9b2c435a130..04012237096c 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -111,7 +111,6 @@ struct sigmatel_spec { | |||
111 | unsigned int alt_switch: 1; | 111 | unsigned int alt_switch: 1; |
112 | unsigned int hp_detect: 1; | 112 | unsigned int hp_detect: 1; |
113 | unsigned int gpio_mute: 1; | 113 | unsigned int gpio_mute: 1; |
114 | unsigned int no_vol_knob :1; | ||
115 | 114 | ||
116 | unsigned int gpio_mask, gpio_data; | 115 | unsigned int gpio_mask, gpio_data; |
117 | 116 | ||
@@ -342,42 +341,6 @@ static int stac92xx_aloopback_put(struct snd_kcontrol *kcontrol, | |||
342 | return 1; | 341 | return 1; |
343 | } | 342 | } |
344 | 343 | ||
345 | static int stac92xx_volknob_info(struct snd_kcontrol *kcontrol, | ||
346 | struct snd_ctl_elem_info *uinfo) | ||
347 | { | ||
348 | uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; | ||
349 | uinfo->count = 1; | ||
350 | uinfo->value.integer.min = 0; | ||
351 | uinfo->value.integer.max = 127; | ||
352 | return 0; | ||
353 | } | ||
354 | |||
355 | static int stac92xx_volknob_get(struct snd_kcontrol *kcontrol, | ||
356 | struct snd_ctl_elem_value *ucontrol) | ||
357 | { | ||
358 | ucontrol->value.integer.value[0] = kcontrol->private_value & 0xff; | ||
359 | return 0; | ||
360 | } | ||
361 | |||
362 | static int stac92xx_volknob_put(struct snd_kcontrol *kcontrol, | ||
363 | struct snd_ctl_elem_value *ucontrol) | ||
364 | { | ||
365 | struct hda_codec *codec = snd_kcontrol_chip(kcontrol); | ||
366 | unsigned int val = kcontrol->private_value & 0xff; | ||
367 | |||
368 | if (val == ucontrol->value.integer.value[0]) | ||
369 | return 0; | ||
370 | |||
371 | val = ucontrol->value.integer.value[0]; | ||
372 | kcontrol->private_value &= ~0xff; | ||
373 | kcontrol->private_value |= val; | ||
374 | |||
375 | snd_hda_codec_write_cache(codec, kcontrol->private_value >> 16, 0, | ||
376 | AC_VERB_SET_VOLUME_KNOB_CONTROL, val | 0x80); | ||
377 | return 1; | ||
378 | } | ||
379 | |||
380 | |||
381 | static struct hda_verb stac9200_core_init[] = { | 344 | static struct hda_verb stac9200_core_init[] = { |
382 | /* set dac0mux for dac converter */ | 345 | /* set dac0mux for dac converter */ |
383 | { 0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, | 346 | { 0x07, AC_VERB_SET_CONNECT_SEL, 0x00}, |
@@ -446,18 +409,6 @@ static struct hda_verb stac9205_core_init[] = { | |||
446 | .private_value = verb_read | (verb_write << 16), \ | 409 | .private_value = verb_read | (verb_write << 16), \ |
447 | } | 410 | } |
448 | 411 | ||
449 | #define STAC_VOLKNOB(knob_nid) \ | ||
450 | { \ | ||
451 | .iface = SNDRV_CTL_ELEM_IFACE_MIXER, \ | ||
452 | .name = "Master Playback Volume", \ | ||
453 | .count = 1, \ | ||
454 | .info = stac92xx_volknob_info, \ | ||
455 | .get = stac92xx_volknob_get, \ | ||
456 | .put = stac92xx_volknob_put, \ | ||
457 | .private_value = 127 | (knob_nid << 16), \ | ||
458 | } | ||
459 | |||
460 | |||
461 | static struct snd_kcontrol_new stac9200_mixer[] = { | 412 | static struct snd_kcontrol_new stac9200_mixer[] = { |
462 | HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), | 413 | HDA_CODEC_VOLUME("Master Playback Volume", 0xb, 0, HDA_OUTPUT), |
463 | HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), | 414 | HDA_CODEC_MUTE("Master Playback Switch", 0xb, 0, HDA_OUTPUT), |
@@ -487,7 +438,6 @@ static struct snd_kcontrol_new stac9205_mixer[] = { | |||
487 | }, | 438 | }, |
488 | STAC_INPUT_SOURCE(2), | 439 | STAC_INPUT_SOURCE(2), |
489 | STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0), | 440 | STAC_ANALOG_LOOPBACK(0xFE0, 0x7E0), |
490 | STAC_VOLKNOB(0x24), | ||
491 | 441 | ||
492 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT), | 442 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x1b, 0x0, HDA_INPUT), |
493 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT), | 443 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x1d, 0x0, HDA_OUTPUT), |
@@ -503,7 +453,6 @@ static struct snd_kcontrol_new stac9205_mixer[] = { | |||
503 | /* This needs to be generated dynamically based on sequence */ | 453 | /* This needs to be generated dynamically based on sequence */ |
504 | static struct snd_kcontrol_new stac922x_mixer[] = { | 454 | static struct snd_kcontrol_new stac922x_mixer[] = { |
505 | STAC_INPUT_SOURCE(2), | 455 | STAC_INPUT_SOURCE(2), |
506 | STAC_VOLKNOB(0x16), | ||
507 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_INPUT), | 456 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x17, 0x0, HDA_INPUT), |
508 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x17, 0x0, HDA_INPUT), | 457 | HDA_CODEC_MUTE_IDX("Capture Switch", 0x0, 0x17, 0x0, HDA_INPUT), |
509 | HDA_CODEC_VOLUME_IDX("Mux Capture Volume", 0x0, 0x12, 0x0, HDA_OUTPUT), | 458 | HDA_CODEC_VOLUME_IDX("Mux Capture Volume", 0x0, 0x12, 0x0, HDA_OUTPUT), |
@@ -517,7 +466,6 @@ static struct snd_kcontrol_new stac922x_mixer[] = { | |||
517 | 466 | ||
518 | static struct snd_kcontrol_new stac927x_mixer[] = { | 467 | static struct snd_kcontrol_new stac927x_mixer[] = { |
519 | STAC_INPUT_SOURCE(3), | 468 | STAC_INPUT_SOURCE(3), |
520 | STAC_VOLKNOB(0x24), | ||
521 | STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB), | 469 | STAC_ANALOG_LOOPBACK(0xFEB, 0x7EB), |
522 | 470 | ||
523 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x18, 0x0, HDA_INPUT), | 471 | HDA_CODEC_VOLUME_IDX("Capture Volume", 0x0, 0x18, 0x0, HDA_INPUT), |
@@ -1931,8 +1879,7 @@ static int stac92xx_auto_create_hp_ctls(struct hda_codec *codec, | |||
1931 | } | 1879 | } |
1932 | if (spec->multiout.hp_nid) { | 1880 | if (spec->multiout.hp_nid) { |
1933 | const char *pfx; | 1881 | const char *pfx; |
1934 | if (old_num_dacs == spec->multiout.num_dacs && | 1882 | if (old_num_dacs == spec->multiout.num_dacs) |
1935 | spec->no_vol_knob) | ||
1936 | pfx = "Master"; | 1883 | pfx = "Master"; |
1937 | else | 1884 | else |
1938 | pfx = "Headphone"; | 1885 | pfx = "Headphone"; |
@@ -2489,7 +2436,6 @@ static int patch_stac9200(struct hda_codec *codec) | |||
2489 | codec->spec = spec; | 2436 | codec->spec = spec; |
2490 | spec->num_pins = ARRAY_SIZE(stac9200_pin_nids); | 2437 | spec->num_pins = ARRAY_SIZE(stac9200_pin_nids); |
2491 | spec->pin_nids = stac9200_pin_nids; | 2438 | spec->pin_nids = stac9200_pin_nids; |
2492 | spec->no_vol_knob = 1; | ||
2493 | spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, | 2439 | spec->board_config = snd_hda_check_board_config(codec, STAC_9200_MODELS, |
2494 | stac9200_models, | 2440 | stac9200_models, |
2495 | stac9200_cfg_tbl); | 2441 | stac9200_cfg_tbl); |
@@ -2544,7 +2490,6 @@ static int patch_stac925x(struct hda_codec *codec) | |||
2544 | codec->spec = spec; | 2490 | codec->spec = spec; |
2545 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); | 2491 | spec->num_pins = ARRAY_SIZE(stac925x_pin_nids); |
2546 | spec->pin_nids = stac925x_pin_nids; | 2492 | spec->pin_nids = stac925x_pin_nids; |
2547 | spec->no_vol_knob = 1; | ||
2548 | spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, | 2493 | spec->board_config = snd_hda_check_board_config(codec, STAC_925x_MODELS, |
2549 | stac925x_models, | 2494 | stac925x_models, |
2550 | stac925x_cfg_tbl); | 2495 | stac925x_cfg_tbl); |
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c index 5d601ad6da70..abac62866da8 100644 --- a/sound/soc/codecs/cs4270.c +++ b/sound/soc/codecs/cs4270.c | |||
@@ -725,7 +725,8 @@ static int cs4270_probe(struct platform_device *pdev) | |||
725 | codec->owner = THIS_MODULE; | 725 | codec->owner = THIS_MODULE; |
726 | codec->dai = &cs4270_dai; | 726 | codec->dai = &cs4270_dai; |
727 | codec->num_dai = 1; | 727 | codec->num_dai = 1; |
728 | codec->private_data = codec + ALIGN(sizeof(struct snd_soc_codec), 4); | 728 | codec->private_data = (void *) codec + |
729 | ALIGN(sizeof(struct snd_soc_codec), 4); | ||
729 | 730 | ||
730 | socdev->codec = codec; | 731 | socdev->codec = codec; |
731 | 732 | ||
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c index 75acf7ef5528..758a2637e7ac 100644 --- a/sound/soc/s3c24xx/s3c2443-ac97.c +++ b/sound/soc/s3c24xx/s3c2443-ac97.c | |||
@@ -32,7 +32,7 @@ | |||
32 | 32 | ||
33 | #include <asm/hardware.h> | 33 | #include <asm/hardware.h> |
34 | #include <asm/io.h> | 34 | #include <asm/io.h> |
35 | #include <asm/arch/regs-ac97.h> | 35 | #include <asm/plat-s3c/regs-ac97.h> |
36 | #include <asm/arch/regs-gpio.h> | 36 | #include <asm/arch/regs-gpio.h> |
37 | #include <asm/arch/regs-clock.h> | 37 | #include <asm/arch/regs-clock.h> |
38 | #include <asm/arch/audio.h> | 38 | #include <asm/arch/audio.h> |