irq.c (3eb66e91a25497065c5322b1268cbc3953642227) irq.c (c8e409a33cf8df5060064a70df3e1350841371e1)
1/*
2 * Derived from arch/i386/kernel/irq.c
3 * Copyright (C) 1992 Linus Torvalds
4 * Adapted from arch/i386 by Gary Thomas
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Updated and modified by Cort Dougan <cort@fsmlabs.com>
7 * Copyright (C) 1996-2001 Cort Dougan
8 * Adapted for Power Macintosh by Paul Mackerras

--- 711 unchanged lines hidden (view full) ---

720#else
721#ifdef CONFIG_SMP
722 cpu_nr = get_hard_smp_processor_id(i);
723#else
724 cpu_nr = 0;
725#endif
726#endif
727
1/*
2 * Derived from arch/i386/kernel/irq.c
3 * Copyright (C) 1992 Linus Torvalds
4 * Adapted from arch/i386 by Gary Thomas
5 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
6 * Updated and modified by Cort Dougan <cort@fsmlabs.com>
7 * Copyright (C) 1996-2001 Cort Dougan
8 * Adapted for Power Macintosh by Paul Mackerras

--- 711 unchanged lines hidden (view full) ---

720#else
721#ifdef CONFIG_SMP
722 cpu_nr = get_hard_smp_processor_id(i);
723#else
724 cpu_nr = 0;
725#endif
726#endif
727
728 memset((void *)critirq_ctx[cpu_nr], 0, THREAD_SIZE);
729 tp = critirq_ctx[cpu_nr];
730 tp->cpu = cpu_nr;
731 tp->preempt_count = 0;
732
733#ifdef CONFIG_BOOKE
728 tp = critirq_ctx[cpu_nr];
729 tp->cpu = cpu_nr;
730 tp->preempt_count = 0;
731
732#ifdef CONFIG_BOOKE
734 memset((void *)dbgirq_ctx[cpu_nr], 0, THREAD_SIZE);
735 tp = dbgirq_ctx[cpu_nr];
736 tp->cpu = cpu_nr;
737 tp->preempt_count = 0;
738
733 tp = dbgirq_ctx[cpu_nr];
734 tp->cpu = cpu_nr;
735 tp->preempt_count = 0;
736
739 memset((void *)mcheckirq_ctx[cpu_nr], 0, THREAD_SIZE);
740 tp = mcheckirq_ctx[cpu_nr];
741 tp->cpu = cpu_nr;
742 tp->preempt_count = HARDIRQ_OFFSET;
743#endif
744 }
745}
746#endif
747
748struct thread_info *softirq_ctx[NR_CPUS] __read_mostly;
749struct thread_info *hardirq_ctx[NR_CPUS] __read_mostly;
750
751void irq_ctx_init(void)
752{
753 struct thread_info *tp;
754 int i;
755
756 for_each_possible_cpu(i) {
737 tp = mcheckirq_ctx[cpu_nr];
738 tp->cpu = cpu_nr;
739 tp->preempt_count = HARDIRQ_OFFSET;
740#endif
741 }
742}
743#endif
744
745struct thread_info *softirq_ctx[NR_CPUS] __read_mostly;
746struct thread_info *hardirq_ctx[NR_CPUS] __read_mostly;
747
748void irq_ctx_init(void)
749{
750 struct thread_info *tp;
751 int i;
752
753 for_each_possible_cpu(i) {
757 memset((void *)softirq_ctx[i], 0, THREAD_SIZE);
758 tp = softirq_ctx[i];
759 tp->cpu = i;
760 klp_init_thread_info(tp);
761
754 tp = softirq_ctx[i];
755 tp->cpu = i;
756 klp_init_thread_info(tp);
757
762 memset((void *)hardirq_ctx[i], 0, THREAD_SIZE);
763 tp = hardirq_ctx[i];
764 tp->cpu = i;
765 klp_init_thread_info(tp);
766 }
767}
768
769void do_softirq_own_stack(void)
770{

--- 51 unchanged lines hidden (view full) ---

822}
823#else
824int irq_choose_cpu(const struct cpumask *mask)
825{
826 return hard_smp_processor_id();
827}
828#endif
829
758 tp = hardirq_ctx[i];
759 tp->cpu = i;
760 klp_init_thread_info(tp);
761 }
762}
763
764void do_softirq_own_stack(void)
765{

--- 51 unchanged lines hidden (view full) ---

817}
818#else
819int irq_choose_cpu(const struct cpumask *mask)
820{
821 return hard_smp_processor_id();
822}
823#endif
824
830int arch_early_irq_init(void)
831{
832 return 0;
833}
834
835#ifdef CONFIG_PPC64
836static int __init setup_noirqdistrib(char *str)
837{
838 distribute_irqs = 0;
839 return 1;
840}
841
842__setup("noirqdistrib", setup_noirqdistrib);
843#endif /* CONFIG_PPC64 */
825#ifdef CONFIG_PPC64
826static int __init setup_noirqdistrib(char *str)
827{
828 distribute_irqs = 0;
829 return 1;
830}
831
832__setup("noirqdistrib", setup_noirqdistrib);
833#endif /* CONFIG_PPC64 */