aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2010-10-07 09:08:52 -0400
committerDavid Howells <dhowells@redhat.com>2010-10-07 09:08:52 -0400
commit3b139cdb373282dfa72316aa56887371e97cafe8 (patch)
treec8755b136c0787011409d6f8116d5493406d0b55 /arch/blackfin/kernel
parent5c74874bc9a838b185fe463153e63f7d895ebb77 (diff)
Blackfin: Rename IRQ flags handling functions
Rename h/w IRQ flags handling functions to be in line with what is expected for the irq renaming patch. This renames local_*_hw() to hard_local_*() using the following perl command: perl -pi -e 's/local_irq_(restore|enable|disable)_hw/hard_local_irq_\1/ or s/local_irq_save_hw([_a-z]*)[(]flags[)]/flags = hard_local_irq_save\1()/' `find arch/blackfin/ -name "*.[ch]"` and then fixing up asm/irqflags.h manually. Additionally, arch/hard_local_save_flags() and arch/hard_local_irq_save() both return the flags rather than passing it through the argument list. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'arch/blackfin/kernel')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c102
-rw-r--r--arch/blackfin/kernel/cplb-mpu/cplbmgr.c8
-rw-r--r--arch/blackfin/kernel/ipipe.c38
-rw-r--r--arch/blackfin/kernel/process.c4
4 files changed, 76 insertions, 76 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index dc07ed08b37..ca1c1f9debd 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -349,13 +349,13 @@ inline void portmux_setup(unsigned short per)
349void set_gpio_ ## name(unsigned gpio, unsigned short arg) \ 349void set_gpio_ ## name(unsigned gpio, unsigned short arg) \
350{ \ 350{ \
351 unsigned long flags; \ 351 unsigned long flags; \
352 local_irq_save_hw(flags); \ 352 flags = hard_local_irq_save(); \
353 if (arg) \ 353 if (arg) \
354 gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \ 354 gpio_array[gpio_bank(gpio)]->name |= gpio_bit(gpio); \
355 else \ 355 else \
356 gpio_array[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \ 356 gpio_array[gpio_bank(gpio)]->name &= ~gpio_bit(gpio); \
357 AWA_DUMMY_READ(name); \ 357 AWA_DUMMY_READ(name); \
358 local_irq_restore_hw(flags); \ 358 hard_local_irq_restore(flags); \
359} \ 359} \
360EXPORT_SYMBOL(set_gpio_ ## name); 360EXPORT_SYMBOL(set_gpio_ ## name);
361 361
@@ -371,14 +371,14 @@ void set_gpio_ ## name(unsigned gpio, unsigned short arg) \
371{ \ 371{ \
372 unsigned long flags; \ 372 unsigned long flags; \
373 if (ANOMALY_05000311 || ANOMALY_05000323) \ 373 if (ANOMALY_05000311 || ANOMALY_05000323) \
374 local_irq_save_hw(flags); \ 374 flags = hard_local_irq_save(); \
375 if (arg) \ 375 if (arg) \
376 gpio_array[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \ 376 gpio_array[gpio_bank(gpio)]->name ## _set = gpio_bit(gpio); \
377 else \ 377 else \
378 gpio_array[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \ 378 gpio_array[gpio_bank(gpio)]->name ## _clear = gpio_bit(gpio); \
379 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 379 if (ANOMALY_05000311 || ANOMALY_05000323) { \
380 AWA_DUMMY_READ(name); \ 380 AWA_DUMMY_READ(name); \
381 local_irq_restore_hw(flags); \ 381 hard_local_irq_restore(flags); \
382 } \ 382 } \
383} \ 383} \
384EXPORT_SYMBOL(set_gpio_ ## name); 384EXPORT_SYMBOL(set_gpio_ ## name);
@@ -391,11 +391,11 @@ void set_gpio_toggle(unsigned gpio)
391{ 391{
392 unsigned long flags; 392 unsigned long flags;
393 if (ANOMALY_05000311 || ANOMALY_05000323) 393 if (ANOMALY_05000311 || ANOMALY_05000323)
394 local_irq_save_hw(flags); 394 flags = hard_local_irq_save();
395 gpio_array[gpio_bank(gpio)]->toggle = gpio_bit(gpio); 395 gpio_array[gpio_bank(gpio)]->toggle = gpio_bit(gpio);
396 if (ANOMALY_05000311 || ANOMALY_05000323) { 396 if (ANOMALY_05000311 || ANOMALY_05000323) {
397 AWA_DUMMY_READ(toggle); 397 AWA_DUMMY_READ(toggle);
398 local_irq_restore_hw(flags); 398 hard_local_irq_restore(flags);
399 } 399 }
400} 400}
401EXPORT_SYMBOL(set_gpio_toggle); 401EXPORT_SYMBOL(set_gpio_toggle);
@@ -408,11 +408,11 @@ void set_gpiop_ ## name(unsigned gpio, unsigned short arg) \
408{ \ 408{ \
409 unsigned long flags; \ 409 unsigned long flags; \
410 if (ANOMALY_05000311 || ANOMALY_05000323) \ 410 if (ANOMALY_05000311 || ANOMALY_05000323) \
411 local_irq_save_hw(flags); \ 411 flags = hard_local_irq_save(); \
412 gpio_array[gpio_bank(gpio)]->name = arg; \ 412 gpio_array[gpio_bank(gpio)]->name = arg; \
413 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 413 if (ANOMALY_05000311 || ANOMALY_05000323) { \
414 AWA_DUMMY_READ(name); \ 414 AWA_DUMMY_READ(name); \
415 local_irq_restore_hw(flags); \ 415 hard_local_irq_restore(flags); \
416 } \ 416 } \
417} \ 417} \
418EXPORT_SYMBOL(set_gpiop_ ## name); 418EXPORT_SYMBOL(set_gpiop_ ## name);
@@ -433,11 +433,11 @@ unsigned short get_gpio_ ## name(unsigned gpio) \
433 unsigned long flags; \ 433 unsigned long flags; \
434 unsigned short ret; \ 434 unsigned short ret; \
435 if (ANOMALY_05000311 || ANOMALY_05000323) \ 435 if (ANOMALY_05000311 || ANOMALY_05000323) \
436 local_irq_save_hw(flags); \ 436 flags = hard_local_irq_save(); \
437 ret = 0x01 & (gpio_array[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \ 437 ret = 0x01 & (gpio_array[gpio_bank(gpio)]->name >> gpio_sub_n(gpio)); \
438 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 438 if (ANOMALY_05000311 || ANOMALY_05000323) { \
439 AWA_DUMMY_READ(name); \ 439 AWA_DUMMY_READ(name); \
440 local_irq_restore_hw(flags); \ 440 hard_local_irq_restore(flags); \
441 } \ 441 } \
442 return ret; \ 442 return ret; \
443} \ 443} \
@@ -460,11 +460,11 @@ unsigned short get_gpiop_ ## name(unsigned gpio) \
460 unsigned long flags; \ 460 unsigned long flags; \
461 unsigned short ret; \ 461 unsigned short ret; \
462 if (ANOMALY_05000311 || ANOMALY_05000323) \ 462 if (ANOMALY_05000311 || ANOMALY_05000323) \
463 local_irq_save_hw(flags); \ 463 flags = hard_local_irq_save(); \
464 ret = (gpio_array[gpio_bank(gpio)]->name); \ 464 ret = (gpio_array[gpio_bank(gpio)]->name); \
465 if (ANOMALY_05000311 || ANOMALY_05000323) { \ 465 if (ANOMALY_05000311 || ANOMALY_05000323) { \
466 AWA_DUMMY_READ(name); \ 466 AWA_DUMMY_READ(name); \
467 local_irq_restore_hw(flags); \ 467 hard_local_irq_restore(flags); \
468 } \ 468 } \
469 return ret; \ 469 return ret; \
470} \ 470} \
@@ -525,14 +525,14 @@ int gpio_pm_wakeup_ctrl(unsigned gpio, unsigned ctrl)
525 if (check_gpio(gpio) < 0) 525 if (check_gpio(gpio) < 0)
526 return -EINVAL; 526 return -EINVAL;
527 527
528 local_irq_save_hw(flags); 528 flags = hard_local_irq_save();
529 if (ctrl) 529 if (ctrl)
530 reserve(wakeup, gpio); 530 reserve(wakeup, gpio);
531 else 531 else
532 unreserve(wakeup, gpio); 532 unreserve(wakeup, gpio);
533 533
534 set_gpio_maskb(gpio, ctrl); 534 set_gpio_maskb(gpio, ctrl);
535 local_irq_restore_hw(flags); 535 hard_local_irq_restore(flags);
536 536
537 return 0; 537 return 0;
538} 538}
@@ -690,7 +690,7 @@ int peripheral_request(unsigned short per, const char *label)
690 690
691 BUG_ON(ident >= MAX_RESOURCES); 691 BUG_ON(ident >= MAX_RESOURCES);
692 692
693 local_irq_save_hw(flags); 693 flags = hard_local_irq_save();
694 694
695 /* If a pin can be muxed as either GPIO or peripheral, make 695 /* If a pin can be muxed as either GPIO or peripheral, make
696 * sure it is not already a GPIO pin when we request it. 696 * sure it is not already a GPIO pin when we request it.
@@ -701,7 +701,7 @@ int peripheral_request(unsigned short per, const char *label)
701 printk(KERN_ERR 701 printk(KERN_ERR
702 "%s: Peripheral %d is already reserved as GPIO by %s !\n", 702 "%s: Peripheral %d is already reserved as GPIO by %s !\n",
703 __func__, ident, get_label(ident)); 703 __func__, ident, get_label(ident));
704 local_irq_restore_hw(flags); 704 hard_local_irq_restore(flags);
705 return -EBUSY; 705 return -EBUSY;
706 } 706 }
707 707
@@ -730,7 +730,7 @@ int peripheral_request(unsigned short per, const char *label)
730 printk(KERN_ERR 730 printk(KERN_ERR
731 "%s: Peripheral %d function %d is already reserved by %s !\n", 731 "%s: Peripheral %d function %d is already reserved by %s !\n",
732 __func__, ident, P_FUNCT2MUX(per), get_label(ident)); 732 __func__, ident, P_FUNCT2MUX(per), get_label(ident));
733 local_irq_restore_hw(flags); 733 hard_local_irq_restore(flags);
734 return -EBUSY; 734 return -EBUSY;
735 } 735 }
736 } 736 }
@@ -741,7 +741,7 @@ int peripheral_request(unsigned short per, const char *label)
741 portmux_setup(per); 741 portmux_setup(per);
742 port_setup(ident, PERIPHERAL_USAGE); 742 port_setup(ident, PERIPHERAL_USAGE);
743 743
744 local_irq_restore_hw(flags); 744 hard_local_irq_restore(flags);
745 set_label(ident, label); 745 set_label(ident, label);
746 746
747 return 0; 747 return 0;
@@ -780,10 +780,10 @@ void peripheral_free(unsigned short per)
780 if (!(per & P_DEFINED)) 780 if (!(per & P_DEFINED))
781 return; 781 return;
782 782
783 local_irq_save_hw(flags); 783 flags = hard_local_irq_save();
784 784
785 if (unlikely(!is_reserved(peri, ident, 0))) { 785 if (unlikely(!is_reserved(peri, ident, 0))) {
786 local_irq_restore_hw(flags); 786 hard_local_irq_restore(flags);
787 return; 787 return;
788 } 788 }
789 789
@@ -794,7 +794,7 @@ void peripheral_free(unsigned short per)
794 794
795 set_label(ident, "free"); 795 set_label(ident, "free");
796 796
797 local_irq_restore_hw(flags); 797 hard_local_irq_restore(flags);
798} 798}
799EXPORT_SYMBOL(peripheral_free); 799EXPORT_SYMBOL(peripheral_free);
800 800
@@ -828,7 +828,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
828 if (check_gpio(gpio) < 0) 828 if (check_gpio(gpio) < 0)
829 return -EINVAL; 829 return -EINVAL;
830 830
831 local_irq_save_hw(flags); 831 flags = hard_local_irq_save();
832 832
833 /* 833 /*
834 * Allow that the identical GPIO can 834 * Allow that the identical GPIO can
@@ -837,7 +837,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
837 */ 837 */
838 838
839 if (cmp_label(gpio, label) == 0) { 839 if (cmp_label(gpio, label) == 0) {
840 local_irq_restore_hw(flags); 840 hard_local_irq_restore(flags);
841 return 0; 841 return 0;
842 } 842 }
843 843
@@ -846,7 +846,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
846 dump_stack(); 846 dump_stack();
847 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", 847 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
848 gpio, get_label(gpio)); 848 gpio, get_label(gpio));
849 local_irq_restore_hw(flags); 849 hard_local_irq_restore(flags);
850 return -EBUSY; 850 return -EBUSY;
851 } 851 }
852 if (unlikely(is_reserved(peri, gpio, 1))) { 852 if (unlikely(is_reserved(peri, gpio, 1))) {
@@ -855,7 +855,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
855 printk(KERN_ERR 855 printk(KERN_ERR
856 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 856 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
857 gpio, get_label(gpio)); 857 gpio, get_label(gpio));
858 local_irq_restore_hw(flags); 858 hard_local_irq_restore(flags);
859 return -EBUSY; 859 return -EBUSY;
860 } 860 }
861 if (unlikely(is_reserved(gpio_irq, gpio, 1))) { 861 if (unlikely(is_reserved(gpio_irq, gpio, 1))) {
@@ -871,7 +871,7 @@ int bfin_gpio_request(unsigned gpio, const char *label)
871 reserve(gpio, gpio); 871 reserve(gpio, gpio);
872 set_label(gpio, label); 872 set_label(gpio, label);
873 873
874 local_irq_restore_hw(flags); 874 hard_local_irq_restore(flags);
875 875
876 port_setup(gpio, GPIO_USAGE); 876 port_setup(gpio, GPIO_USAGE);
877 877
@@ -888,13 +888,13 @@ void bfin_gpio_free(unsigned gpio)
888 888
889 might_sleep(); 889 might_sleep();
890 890
891 local_irq_save_hw(flags); 891 flags = hard_local_irq_save();
892 892
893 if (unlikely(!is_reserved(gpio, gpio, 0))) { 893 if (unlikely(!is_reserved(gpio, gpio, 0))) {
894 if (system_state == SYSTEM_BOOTING) 894 if (system_state == SYSTEM_BOOTING)
895 dump_stack(); 895 dump_stack();
896 gpio_error(gpio); 896 gpio_error(gpio);
897 local_irq_restore_hw(flags); 897 hard_local_irq_restore(flags);
898 return; 898 return;
899 } 899 }
900 900
@@ -902,7 +902,7 @@ void bfin_gpio_free(unsigned gpio)
902 902
903 set_label(gpio, "free"); 903 set_label(gpio, "free");
904 904
905 local_irq_restore_hw(flags); 905 hard_local_irq_restore(flags);
906} 906}
907EXPORT_SYMBOL(bfin_gpio_free); 907EXPORT_SYMBOL(bfin_gpio_free);
908 908
@@ -913,7 +913,7 @@ int bfin_special_gpio_request(unsigned gpio, const char *label)
913{ 913{
914 unsigned long flags; 914 unsigned long flags;
915 915
916 local_irq_save_hw(flags); 916 flags = hard_local_irq_save();
917 917
918 /* 918 /*
919 * Allow that the identical GPIO can 919 * Allow that the identical GPIO can
@@ -922,19 +922,19 @@ int bfin_special_gpio_request(unsigned gpio, const char *label)
922 */ 922 */
923 923
924 if (cmp_label(gpio, label) == 0) { 924 if (cmp_label(gpio, label) == 0) {
925 local_irq_restore_hw(flags); 925 hard_local_irq_restore(flags);
926 return 0; 926 return 0;
927 } 927 }
928 928
929 if (unlikely(is_reserved(special_gpio, gpio, 1))) { 929 if (unlikely(is_reserved(special_gpio, gpio, 1))) {
930 local_irq_restore_hw(flags); 930 hard_local_irq_restore(flags);
931 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n", 931 printk(KERN_ERR "bfin-gpio: GPIO %d is already reserved by %s !\n",
932 gpio, get_label(gpio)); 932 gpio, get_label(gpio));
933 933
934 return -EBUSY; 934 return -EBUSY;
935 } 935 }
936 if (unlikely(is_reserved(peri, gpio, 1))) { 936 if (unlikely(is_reserved(peri, gpio, 1))) {
937 local_irq_restore_hw(flags); 937 hard_local_irq_restore(flags);
938 printk(KERN_ERR 938 printk(KERN_ERR
939 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 939 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
940 gpio, get_label(gpio)); 940 gpio, get_label(gpio));
@@ -946,7 +946,7 @@ int bfin_special_gpio_request(unsigned gpio, const char *label)
946 reserve(peri, gpio); 946 reserve(peri, gpio);
947 947
948 set_label(gpio, label); 948 set_label(gpio, label);
949 local_irq_restore_hw(flags); 949 hard_local_irq_restore(flags);
950 port_setup(gpio, GPIO_USAGE); 950 port_setup(gpio, GPIO_USAGE);
951 951
952 return 0; 952 return 0;
@@ -959,18 +959,18 @@ void bfin_special_gpio_free(unsigned gpio)
959 959
960 might_sleep(); 960 might_sleep();
961 961
962 local_irq_save_hw(flags); 962 flags = hard_local_irq_save();
963 963
964 if (unlikely(!is_reserved(special_gpio, gpio, 0))) { 964 if (unlikely(!is_reserved(special_gpio, gpio, 0))) {
965 gpio_error(gpio); 965 gpio_error(gpio);
966 local_irq_restore_hw(flags); 966 hard_local_irq_restore(flags);
967 return; 967 return;
968 } 968 }
969 969
970 unreserve(special_gpio, gpio); 970 unreserve(special_gpio, gpio);
971 unreserve(peri, gpio); 971 unreserve(peri, gpio);
972 set_label(gpio, "free"); 972 set_label(gpio, "free");
973 local_irq_restore_hw(flags); 973 hard_local_irq_restore(flags);
974} 974}
975EXPORT_SYMBOL(bfin_special_gpio_free); 975EXPORT_SYMBOL(bfin_special_gpio_free);
976#endif 976#endif
@@ -983,7 +983,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
983 if (check_gpio(gpio) < 0) 983 if (check_gpio(gpio) < 0)
984 return -EINVAL; 984 return -EINVAL;
985 985
986 local_irq_save_hw(flags); 986 flags = hard_local_irq_save();
987 987
988 if (unlikely(is_reserved(peri, gpio, 1))) { 988 if (unlikely(is_reserved(peri, gpio, 1))) {
989 if (system_state == SYSTEM_BOOTING) 989 if (system_state == SYSTEM_BOOTING)
@@ -991,7 +991,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
991 printk(KERN_ERR 991 printk(KERN_ERR
992 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n", 992 "bfin-gpio: GPIO %d is already reserved as Peripheral by %s !\n",
993 gpio, get_label(gpio)); 993 gpio, get_label(gpio));
994 local_irq_restore_hw(flags); 994 hard_local_irq_restore(flags);
995 return -EBUSY; 995 return -EBUSY;
996 } 996 }
997 if (unlikely(is_reserved(gpio, gpio, 1))) 997 if (unlikely(is_reserved(gpio, gpio, 1)))
@@ -1002,7 +1002,7 @@ int bfin_gpio_irq_request(unsigned gpio, const char *label)
1002 reserve(gpio_irq, gpio); 1002 reserve(gpio_irq, gpio);
1003 set_label(gpio, label); 1003 set_label(gpio, label);
1004 1004
1005 local_irq_restore_hw(flags); 1005 hard_local_irq_restore(flags);
1006 1006
1007 port_setup(gpio, GPIO_USAGE); 1007 port_setup(gpio, GPIO_USAGE);
1008 1008
@@ -1016,13 +1016,13 @@ void bfin_gpio_irq_free(unsigned gpio)
1016 if (check_gpio(gpio) < 0) 1016 if (check_gpio(gpio) < 0)
1017 return; 1017 return;
1018 1018
1019 local_irq_save_hw(flags); 1019 flags = hard_local_irq_save();
1020 1020
1021 if (unlikely(!is_reserved(gpio_irq, gpio, 0))) { 1021 if (unlikely(!is_reserved(gpio_irq, gpio, 0))) {
1022 if (system_state == SYSTEM_BOOTING) 1022 if (system_state == SYSTEM_BOOTING)
1023 dump_stack(); 1023 dump_stack();
1024 gpio_error(gpio); 1024 gpio_error(gpio);
1025 local_irq_restore_hw(flags); 1025 hard_local_irq_restore(flags);
1026 return; 1026 return;
1027 } 1027 }
1028 1028
@@ -1030,7 +1030,7 @@ void bfin_gpio_irq_free(unsigned gpio)
1030 1030
1031 set_label(gpio, "free"); 1031 set_label(gpio, "free");
1032 1032
1033 local_irq_restore_hw(flags); 1033 hard_local_irq_restore(flags);
1034} 1034}
1035 1035
1036static inline void __bfin_gpio_direction_input(unsigned gpio) 1036static inline void __bfin_gpio_direction_input(unsigned gpio)
@@ -1052,10 +1052,10 @@ int bfin_gpio_direction_input(unsigned gpio)
1052 return -EINVAL; 1052 return -EINVAL;
1053 } 1053 }
1054 1054
1055 local_irq_save_hw(flags); 1055 flags = hard_local_irq_save();
1056 __bfin_gpio_direction_input(gpio); 1056 __bfin_gpio_direction_input(gpio);
1057 AWA_DUMMY_READ(inen); 1057 AWA_DUMMY_READ(inen);
1058 local_irq_restore_hw(flags); 1058 hard_local_irq_restore(flags);
1059 1059
1060 return 0; 1060 return 0;
1061} 1061}
@@ -1070,9 +1070,9 @@ void bfin_gpio_irq_prepare(unsigned gpio)
1070 port_setup(gpio, GPIO_USAGE); 1070 port_setup(gpio, GPIO_USAGE);
1071 1071
1072#ifdef CONFIG_BF54x 1072#ifdef CONFIG_BF54x
1073 local_irq_save_hw(flags); 1073 flags = hard_local_irq_save();
1074 __bfin_gpio_direction_input(gpio); 1074 __bfin_gpio_direction_input(gpio);
1075 local_irq_restore_hw(flags); 1075 hard_local_irq_restore(flags);
1076#endif 1076#endif
1077} 1077}
1078 1078
@@ -1094,7 +1094,7 @@ int bfin_gpio_direction_output(unsigned gpio, int value)
1094 return -EINVAL; 1094 return -EINVAL;
1095 } 1095 }
1096 1096
1097 local_irq_save_hw(flags); 1097 flags = hard_local_irq_save();
1098 1098
1099 gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio); 1099 gpio_array[gpio_bank(gpio)]->inen &= ~gpio_bit(gpio);
1100 gpio_set_value(gpio, value); 1100 gpio_set_value(gpio, value);
@@ -1105,7 +1105,7 @@ int bfin_gpio_direction_output(unsigned gpio, int value)
1105#endif 1105#endif
1106 1106
1107 AWA_DUMMY_READ(dir); 1107 AWA_DUMMY_READ(dir);
1108 local_irq_restore_hw(flags); 1108 hard_local_irq_restore(flags);
1109 1109
1110 return 0; 1110 return 0;
1111} 1111}
@@ -1120,11 +1120,11 @@ int bfin_gpio_get_value(unsigned gpio)
1120 1120
1121 if (unlikely(get_gpio_edge(gpio))) { 1121 if (unlikely(get_gpio_edge(gpio))) {
1122 int ret; 1122 int ret;
1123 local_irq_save_hw(flags); 1123 flags = hard_local_irq_save();
1124 set_gpio_edge(gpio, 0); 1124 set_gpio_edge(gpio, 0);
1125 ret = get_gpio_data(gpio); 1125 ret = get_gpio_data(gpio);
1126 set_gpio_edge(gpio, 1); 1126 set_gpio_edge(gpio, 1);
1127 local_irq_restore_hw(flags); 1127 hard_local_irq_restore(flags);
1128 return ret; 1128 return ret;
1129 } else 1129 } else
1130 return get_gpio_data(gpio); 1130 return get_gpio_data(gpio);
diff --git a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
index 87b25b1b30e..8de92299b3e 100644
--- a/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
+++ b/arch/blackfin/kernel/cplb-mpu/cplbmgr.c
@@ -318,7 +318,7 @@ void flush_switched_cplbs(unsigned int cpu)
318 318
319 nr_cplb_flush[cpu]++; 319 nr_cplb_flush[cpu]++;
320 320
321 local_irq_save_hw(flags); 321 flags = hard_local_irq_save();
322 _disable_icplb(); 322 _disable_icplb();
323 for (i = first_switched_icplb; i < MAX_CPLBS; i++) { 323 for (i = first_switched_icplb; i < MAX_CPLBS; i++) {
324 icplb_tbl[cpu][i].data = 0; 324 icplb_tbl[cpu][i].data = 0;
@@ -332,7 +332,7 @@ void flush_switched_cplbs(unsigned int cpu)
332 bfin_write32(DCPLB_DATA0 + i * 4, 0); 332 bfin_write32(DCPLB_DATA0 + i * 4, 0);
333 } 333 }
334 _enable_dcplb(); 334 _enable_dcplb();
335 local_irq_restore_hw(flags); 335 hard_local_irq_restore(flags);
336 336
337} 337}
338 338
@@ -348,7 +348,7 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu)
348 return; 348 return;
349 } 349 }
350 350
351 local_irq_save_hw(flags); 351 flags = hard_local_irq_save();
352 current_rwx_mask[cpu] = masks; 352 current_rwx_mask[cpu] = masks;
353 353
354 if (L2_LENGTH && addr >= L2_START && addr < L2_START + L2_LENGTH) { 354 if (L2_LENGTH && addr >= L2_START && addr < L2_START + L2_LENGTH) {
@@ -373,5 +373,5 @@ void set_mask_dcplbs(unsigned long *masks, unsigned int cpu)
373 addr += PAGE_SIZE; 373 addr += PAGE_SIZE;
374 } 374 }
375 _enable_dcplb(); 375 _enable_dcplb();
376 local_irq_restore_hw(flags); 376 hard_local_irq_restore(flags);
377} 377}
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c
index 1a496cd71ba..3b1da4aff2a 100644
--- a/arch/blackfin/kernel/ipipe.c
+++ b/arch/blackfin/kernel/ipipe.c
@@ -219,10 +219,10 @@ int __ipipe_syscall_root(struct pt_regs *regs)
219 219
220 ret = __ipipe_dispatch_event(IPIPE_EVENT_SYSCALL, regs); 220 ret = __ipipe_dispatch_event(IPIPE_EVENT_SYSCALL, regs);
221 221
222 local_irq_save_hw(flags); 222 flags = hard_local_irq_save();
223 223
224 if (!__ipipe_root_domain_p) { 224 if (!__ipipe_root_domain_p) {
225 local_irq_restore_hw(flags); 225 hard_local_irq_restore(flags);
226 return 1; 226 return 1;
227 } 227 }
228 228
@@ -230,7 +230,7 @@ int __ipipe_syscall_root(struct pt_regs *regs)
230 if ((p->irqpend_himask & IPIPE_IRQMASK_VIRT) != 0) 230 if ((p->irqpend_himask & IPIPE_IRQMASK_VIRT) != 0)
231 __ipipe_sync_pipeline(IPIPE_IRQMASK_VIRT); 231 __ipipe_sync_pipeline(IPIPE_IRQMASK_VIRT);
232 232
233 local_irq_restore_hw(flags); 233 hard_local_irq_restore(flags);
234 234
235 return -ret; 235 return -ret;
236} 236}
@@ -239,14 +239,14 @@ unsigned long ipipe_critical_enter(void (*syncfn) (void))
239{ 239{
240 unsigned long flags; 240 unsigned long flags;
241 241
242 local_irq_save_hw(flags); 242 flags = hard_local_irq_save();
243 243
244 return flags; 244 return flags;
245} 245}
246 246
247void ipipe_critical_exit(unsigned long flags) 247void ipipe_critical_exit(unsigned long flags)
248{ 248{
249 local_irq_restore_hw(flags); 249 hard_local_irq_restore(flags);
250} 250}
251 251
252static void __ipipe_no_irqtail(void) 252static void __ipipe_no_irqtail(void)
@@ -279,9 +279,9 @@ int ipipe_trigger_irq(unsigned irq)
279 return -EINVAL; 279 return -EINVAL;
280#endif 280#endif
281 281
282 local_irq_save_hw(flags); 282 flags = hard_local_irq_save();
283 __ipipe_handle_irq(irq, NULL); 283 __ipipe_handle_irq(irq, NULL);
284 local_irq_restore_hw(flags); 284 hard_local_irq_restore(flags);
285 285
286 return 1; 286 return 1;
287} 287}
@@ -293,7 +293,7 @@ asmlinkage void __ipipe_sync_root(void)
293 293
294 BUG_ON(irqs_disabled()); 294 BUG_ON(irqs_disabled());
295 295
296 local_irq_save_hw(flags); 296 flags = hard_local_irq_save();
297 297
298 if (irq_tail_hook) 298 if (irq_tail_hook)
299 irq_tail_hook(); 299 irq_tail_hook();
@@ -303,7 +303,7 @@ asmlinkage void __ipipe_sync_root(void)
303 if (ipipe_root_cpudom_var(irqpend_himask) != 0) 303 if (ipipe_root_cpudom_var(irqpend_himask) != 0)
304 __ipipe_sync_pipeline(IPIPE_IRQMASK_ANY); 304 __ipipe_sync_pipeline(IPIPE_IRQMASK_ANY);
305 305
306 local_irq_restore_hw(flags); 306 hard_local_irq_restore(flags);
307} 307}
308 308
309void ___ipipe_sync_pipeline(unsigned long syncmask) 309void ___ipipe_sync_pipeline(unsigned long syncmask)
@@ -344,10 +344,10 @@ void __ipipe_stall_root(void)
344{ 344{
345 unsigned long *p, flags; 345 unsigned long *p, flags;
346 346
347 local_irq_save_hw(flags); 347 flags = hard_local_irq_save();
348 p = &__ipipe_root_status; 348 p = &__ipipe_root_status;
349 __set_bit(IPIPE_STALL_FLAG, p); 349 __set_bit(IPIPE_STALL_FLAG, p);
350 local_irq_restore_hw(flags); 350 hard_local_irq_restore(flags);
351} 351}
352EXPORT_SYMBOL(__ipipe_stall_root); 352EXPORT_SYMBOL(__ipipe_stall_root);
353 353
@@ -356,10 +356,10 @@ unsigned long __ipipe_test_and_stall_root(void)
356 unsigned long *p, flags; 356 unsigned long *p, flags;
357 int x; 357 int x;
358 358
359 local_irq_save_hw(flags); 359 flags = hard_local_irq_save();
360 p = &__ipipe_root_status; 360 p = &__ipipe_root_status;
361 x = __test_and_set_bit(IPIPE_STALL_FLAG, p); 361 x = __test_and_set_bit(IPIPE_STALL_FLAG, p);
362 local_irq_restore_hw(flags); 362 hard_local_irq_restore(flags);
363 363
364 return x; 364 return x;
365} 365}
@@ -371,10 +371,10 @@ unsigned long __ipipe_test_root(void)
371 unsigned long flags; 371 unsigned long flags;
372 int x; 372 int x;
373 373
374 local_irq_save_hw_smp(flags); 374 flags = hard_local_irq_save_smp();
375 p = &__ipipe_root_status; 375 p = &__ipipe_root_status;
376 x = test_bit(IPIPE_STALL_FLAG, p); 376 x = test_bit(IPIPE_STALL_FLAG, p);
377 local_irq_restore_hw_smp(flags); 377 hard_local_irq_restore_smp(flags);
378 378
379 return x; 379 return x;
380} 380}
@@ -384,10 +384,10 @@ void __ipipe_lock_root(void)
384{ 384{
385 unsigned long *p, flags; 385 unsigned long *p, flags;
386 386
387 local_irq_save_hw(flags); 387 flags = hard_local_irq_save();
388 p = &__ipipe_root_status; 388 p = &__ipipe_root_status;
389 __set_bit(IPIPE_SYNCDEFER_FLAG, p); 389 __set_bit(IPIPE_SYNCDEFER_FLAG, p);
390 local_irq_restore_hw(flags); 390 hard_local_irq_restore(flags);
391} 391}
392EXPORT_SYMBOL(__ipipe_lock_root); 392EXPORT_SYMBOL(__ipipe_lock_root);
393 393
@@ -395,9 +395,9 @@ void __ipipe_unlock_root(void)
395{ 395{
396 unsigned long *p, flags; 396 unsigned long *p, flags;
397 397
398 local_irq_save_hw(flags); 398 flags = hard_local_irq_save();
399 p = &__ipipe_root_status; 399 p = &__ipipe_root_status;
400 __clear_bit(IPIPE_SYNCDEFER_FLAG, p); 400 __clear_bit(IPIPE_SYNCDEFER_FLAG, p);
401 local_irq_restore_hw(flags); 401 hard_local_irq_restore(flags);
402} 402}
403EXPORT_SYMBOL(__ipipe_unlock_root); 403EXPORT_SYMBOL(__ipipe_unlock_root);
diff --git a/arch/blackfin/kernel/process.c b/arch/blackfin/kernel/process.c
index 01f98cb964d..c86a3ed5f48 100644
--- a/arch/blackfin/kernel/process.c
+++ b/arch/blackfin/kernel/process.c
@@ -65,11 +65,11 @@ static void default_idle(void)
65#ifdef CONFIG_IPIPE 65#ifdef CONFIG_IPIPE
66 ipipe_suspend_domain(); 66 ipipe_suspend_domain();
67#endif 67#endif
68 local_irq_disable_hw(); 68 hard_local_irq_disable();
69 if (!need_resched()) 69 if (!need_resched())
70 idle_with_irq_disabled(); 70 idle_with_irq_disabled();
71 71
72 local_irq_enable_hw(); 72 hard_local_irq_enable();
73} 73}
74 74
75/* 75/*