Module: xenomai-forge Branch: master Commit: 3840bf00aafc11fb7d53b05601a26823e266f644 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=3840bf00aafc11fb7d53b05601a26823e266f644
Author: Philippe Gerum <[email protected]> Date: Wed Dec 14 10:48:39 2011 +0100 powerpc: upgrade I-pipe support to 3.0.13-powerpc-2.13-06, ipipe-3.1.5-powerpc-2.13-06 --- ...ch => adeos-ipipe-3.0.13-powerpc-2.13-06.patch} | 135 +++++++++++--------- ...tch => adeos-ipipe-3.1.5-powerpc-2.13-06.patch} | 80 +++++++----- 2 files changed, 126 insertions(+), 89 deletions(-) diff --git a/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.0.8-powerpc-2.13-04.patch b/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.0.13-powerpc-2.13-06.patch similarity index 99% rename from kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.0.8-powerpc-2.13-04.patch rename to kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.0.13-powerpc-2.13-06.patch index d28173e..277581f 100644 --- a/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.0.8-powerpc-2.13-04.patch +++ b/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.0.13-powerpc-2.13-06.patch @@ -265,7 +265,7 @@ index bb712c9..8885e9b 100644 * or should we not care like we do now ? --BenH. diff --git a/arch/powerpc/include/asm/ipipe.h b/arch/powerpc/include/asm/ipipe.h new file mode 100644 -index 0000000..97c12ea +index 0000000..416688f --- /dev/null +++ b/arch/powerpc/include/asm/ipipe.h @@ -0,0 +1,278 @@ @@ -317,10 +317,10 @@ index 0000000..97c12ea +#include <asm/paca.h> +#endif + -+#define IPIPE_ARCH_STRING "2.13-04" ++#define IPIPE_ARCH_STRING "2.13-06" +#define IPIPE_MAJOR_NUMBER 2 +#define IPIPE_MINOR_NUMBER 13 -+#define IPIPE_PATCH_NUMBER 4 ++#define IPIPE_PATCH_NUMBER 6 + +#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH + @@ -3345,7 +3345,7 @@ index 9f82f49..dfa0441 100644 NM="$1" OBJ="$2" diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/setup_32.c -index 620d792..e6dc326 100644 +index c7e7b8c..a5a47c8 100644 --- a/arch/powerpc/kernel/setup_32.c +++ b/arch/powerpc/kernel/setup_32.c @@ -52,6 +52,9 @@ int __initdata boot_cpu_count; @@ -3359,7 +3359,7 @@ index 620d792..e6dc326 100644 unsigned long ISA_DMA_THRESHOLD; unsigned int DMA_MODE_READ; diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c -index a88bf27..ac5a3c3 100644 +index 7867fd1..f4ff1eb 100644 --- a/arch/powerpc/kernel/setup_64.c +++ b/arch/powerpc/kernel/setup_64.c @@ -222,8 +222,10 @@ void __init early_setup(unsigned long dt_ptr) @@ -3386,7 +3386,7 @@ index a88bf27..ac5a3c3 100644 DBG(" -> setup_system()\n"); /* Apply the CPUs-specific and firmware specific fixups to kernel -@@ -456,6 +464,7 @@ static u64 safe_stack_limit(void) +@@ -457,6 +465,7 @@ static u64 safe_stack_limit(void) #endif } @@ -3394,7 +3394,7 @@ index a88bf27..ac5a3c3 100644 static void __init irqstack_early_init(void) { u64 limit = safe_stack_limit(); -@@ -474,6 +483,9 @@ static void __init irqstack_early_init(void) +@@ -475,6 +484,9 @@ static void __init irqstack_early_init(void) THREAD_SIZE, limit)); } } @@ -3404,7 +3404,7 @@ index a88bf27..ac5a3c3 100644 #ifdef CONFIG_PPC_BOOK3E static void __init exc_lvl_early_init(void) -@@ -661,6 +673,10 @@ void __init setup_per_cpu_areas(void) +@@ -662,6 +674,10 @@ void __init setup_per_cpu_areas(void) __per_cpu_offset[cpu] = delta + pcpu_unit_offsets[cpu]; paca[cpu].data_offset = __per_cpu_offset[cpu]; } @@ -3797,10 +3797,10 @@ index 7c975d4..0c163f2 100644 { unsigned long target; diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c -index 0d08d01..2c6e946 100644 +index 7a8a748..8f13a2f 100644 --- a/arch/powerpc/lib/feature-fixups.c +++ b/arch/powerpc/lib/feature-fixups.c -@@ -29,6 +29,7 @@ struct fixup_entry { +@@ -31,6 +31,7 @@ struct fixup_entry { long alt_end_off; }; @@ -3808,7 +3808,7 @@ index 0d08d01..2c6e946 100644 static unsigned int *calc_addr(struct fixup_entry *fcur, long offset) { /* -@@ -39,6 +40,7 @@ static unsigned int *calc_addr(struct fixup_entry *fcur, long offset) +@@ -41,6 +42,7 @@ static unsigned int *calc_addr(struct fixup_entry *fcur, long offset) return (unsigned int *)((unsigned long)fcur + offset); } @@ -3816,7 +3816,7 @@ index 0d08d01..2c6e946 100644 static int patch_alt_instruction(unsigned int *src, unsigned int *dest, unsigned int *alt_start, unsigned int *alt_end) { -@@ -62,6 +64,7 @@ static int patch_alt_instruction(unsigned int *src, unsigned int *dest, +@@ -64,6 +66,7 @@ static int patch_alt_instruction(unsigned int *src, unsigned int *dest, return 0; } @@ -3824,7 +3824,7 @@ index 0d08d01..2c6e946 100644 static int patch_feature_section(unsigned long value, struct fixup_entry *fcur) { unsigned int *start, *end, *alt_start, *alt_end, *src, *dest; -@@ -91,6 +94,7 @@ static int patch_feature_section(unsigned long value, struct fixup_entry *fcur) +@@ -93,6 +96,7 @@ static int patch_feature_section(unsigned long value, struct fixup_entry *fcur) return 0; } @@ -3832,7 +3832,7 @@ index 0d08d01..2c6e946 100644 void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) { struct fixup_entry *fcur, *fend; -@@ -111,6 +115,7 @@ void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) +@@ -113,6 +117,7 @@ void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) } } @@ -4084,7 +4084,7 @@ index dfd7648..ba65af8 100644 native_lock_hpte(hptep); hpte_v = hptep->v; diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c -index 26b2872..d356f51 100644 +index 07f9e9f..7708e7f 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -114,7 +114,7 @@ int mmu_ci_restrictions; @@ -4302,10 +4302,18 @@ index 27b863c..398bde3 100644 unsigned long end) { diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c -index 8ccf9ed..a285f05 100644 +index 8ccf9ed..ea6098a 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c -@@ -25,7 +25,7 @@ +@@ -18,6 +18,7 @@ + #include <linux/types.h> + #include <linux/bootmem.h> + #include <linux/slab.h> ++#include <linux/ipipe.h> + + #include <asm/io.h> + #include <asm/prom.h> +@@ -25,7 +26,7 @@ #include "pq2.h" @@ -4314,7 +4322,7 @@ index 8ccf9ed..a285f05 100644 struct pq2ads_pci_pic { struct device_node *node; -@@ -43,13 +43,14 @@ static void pq2ads_pci_mask_irq(struct irq_data *d) +@@ -43,13 +44,14 @@ static void pq2ads_pci_mask_irq(struct irq_data *d) { struct pq2ads_pci_pic *priv = irq_data_get_irq_chip_data(d); int irq = NUM_IRQS - irqd_to_hwirq(d) - 1; @@ -4330,7 +4338,7 @@ index 8ccf9ed..a285f05 100644 raw_spin_unlock_irqrestore(&pci_pic_lock, flags); } -@@ -59,12 +60,13 @@ static void pq2ads_pci_unmask_irq(struct irq_data *d) +@@ -59,12 +61,13 @@ static void pq2ads_pci_unmask_irq(struct irq_data *d) { struct pq2ads_pci_pic *priv = irq_data_get_irq_chip_data(d); int irq = NUM_IRQS - irqd_to_hwirq(d) - 1; @@ -4345,7 +4353,7 @@ index 8ccf9ed..a285f05 100644 raw_spin_unlock_irqrestore(&pci_pic_lock, flags); } } -@@ -97,7 +99,7 @@ static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) +@@ -97,7 +100,7 @@ static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) for (bit = 0; pend != 0; ++bit, pend <<= 1) { if (pend & 0x80000000) { int virq = irq_linear_revmap(priv->host, bit); @@ -4530,7 +4538,7 @@ index 3124cf7..aac4f2e 100644 static long ps3_hpte_insert(unsigned long hpte_group, unsigned long va, unsigned long pa, unsigned long rflags, unsigned long vflags, diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c -index 600ed2c..35a8eb9 100644 +index 1aa478b..b45f80e 100644 --- a/arch/powerpc/platforms/ps3/interrupt.c +++ b/arch/powerpc/platforms/ps3/interrupt.c @@ -74,7 +74,7 @@ struct ps3_bmp { @@ -4675,10 +4683,10 @@ index bcab50e..cf3d440 100644 .irq_set_type = cpm2_set_irq_type, .flags = IRQCHIP_EOI_IF_HANDLED, diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c -index 92e7833..9b65fee 100644 +index 92e7833..2767756 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c -@@ -181,6 +181,63 @@ out_free: +@@ -181,6 +181,65 @@ out_free: return rc; } @@ -4686,6 +4694,8 @@ index 92e7833..9b65fee 100644 + +static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) +{ ++ struct irq_chip *chip = irq_desc_get_chip(desc); ++ struct irq_data *idata = irq_desc_get_irq_data(desc); + unsigned int cascade_irq; + struct fsl_msi *msi_data; + int msir_index = -1; @@ -4694,18 +4704,18 @@ index 92e7833..9b65fee 100644 + u32 have_shift = 0; + struct fsl_msi_cascade_data *cascade_data; + -+ cascade_data = (struct fsl_msi_cascade_data *)get_irq_data(irq); ++ cascade_data = irq_get_handler_data(irq); + msi_data = cascade_data->msi_data; + + if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) { -+ if (desc->chip->mask_ack) -+ desc->chip->mask_ack(irq); ++ if (chip->irq_mask_ack) ++ chip->irq_mask_ack(idata); + else { -+ desc->chip->mask(irq); -+ desc->chip->ack(irq); ++ chip->irq_mask(idata); ++ chip->irq_ack(idata); + } + } else -+ desc->chip->eoi(irq); ++ chip->irq_eoi(idata); + + msir_index = cascade_data->index; + @@ -4734,7 +4744,7 @@ index 92e7833..9b65fee 100644 + msir_value = msir_value >> (intr_index + 1); + } + -+ desc->chip->unmask(irq); ++ chip->irq_unmask(idata); +} + +#else /* !CONFIG_IPIPE */ @@ -4742,7 +4752,7 @@ index 92e7833..9b65fee 100644 static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) { struct irq_chip *chip = irq_desc_get_chip(desc); -@@ -251,6 +308,8 @@ unlock: +@@ -251,6 +310,8 @@ unlock: raw_spin_unlock(&desc->lock); } @@ -4873,10 +4883,18 @@ index 20924f2..9db0037 100644 .irq_set_type = mpc8xx_set_irq_type, }; diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c -index 58d7a53..bdb2288 100644 +index 58d7a53..990b49f 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c -@@ -50,7 +50,7 @@ +@@ -30,6 +30,7 @@ + #include <linux/slab.h> + #include <linux/syscore_ops.h> + #include <linux/ratelimit.h> ++#include <linux/ipipe.h> + + #include <asm/ptrace.h> + #include <asm/signal.h> +@@ -50,7 +51,7 @@ static struct mpic *mpics; static struct mpic *mpic_primary; @@ -4885,7 +4903,7 @@ index 58d7a53..bdb2288 100644 #ifdef CONFIG_PPC32 /* XXX for now */ #ifdef CONFIG_IRQ_ALL_CPUS -@@ -702,7 +702,7 @@ static inline void mpic_eoi(struct mpic *mpic) +@@ -702,7 +703,7 @@ static inline void mpic_eoi(struct mpic *mpic) */ @@ -4894,7 +4912,7 @@ index 58d7a53..bdb2288 100644 { unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq_data(d); -@@ -723,7 +723,17 @@ void mpic_unmask_irq(struct irq_data *d) +@@ -723,7 +724,17 @@ void mpic_unmask_irq(struct irq_data *d) } while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK); } @@ -4913,7 +4931,7 @@ index 58d7a53..bdb2288 100644 { unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq_data(d); -@@ -745,9 +755,20 @@ void mpic_mask_irq(struct irq_data *d) +@@ -745,9 +756,20 @@ void mpic_mask_irq(struct irq_data *d) } while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK)); } @@ -4934,7 +4952,7 @@ index 58d7a53..bdb2288 100644 #ifdef DEBUG_IRQ DBG("%s: end_irq: %d\n", mpic->name, d->irq); -@@ -757,6 +778,13 @@ void mpic_end_irq(struct irq_data *d) +@@ -757,6 +779,13 @@ void mpic_end_irq(struct irq_data *d) * latched another edge interrupt coming in anyway */ @@ -4948,7 +4966,7 @@ index 58d7a53..bdb2288 100644 mpic_eoi(mpic); } -@@ -767,7 +795,7 @@ static void mpic_unmask_ht_irq(struct irq_data *d) +@@ -767,7 +796,7 @@ static void mpic_unmask_ht_irq(struct irq_data *d) struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); @@ -4957,7 +4975,7 @@ index 58d7a53..bdb2288 100644 if (irqd_is_level_type(d)) mpic_ht_end_irq(mpic, src); -@@ -778,7 +806,7 @@ static unsigned int mpic_startup_ht_irq(struct irq_data *d) +@@ -778,7 +807,7 @@ static unsigned int mpic_startup_ht_irq(struct irq_data *d) struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); @@ -4966,7 +4984,7 @@ index 58d7a53..bdb2288 100644 mpic_startup_ht_interrupt(mpic, src, irqd_is_level_type(d)); return 0; -@@ -797,9 +825,17 @@ static void mpic_end_ht_irq(struct irq_data *d) +@@ -797,9 +826,17 @@ static void mpic_end_ht_irq(struct irq_data *d) { struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); @@ -4985,7 +5003,7 @@ index 58d7a53..bdb2288 100644 #endif /* We always EOI on end_irq() even for edge interrupts since that * should only lower the priority, the MPIC should have properly -@@ -818,9 +854,12 @@ static void mpic_unmask_ipi(struct irq_data *d) +@@ -818,9 +855,12 @@ static void mpic_unmask_ipi(struct irq_data *d) { struct mpic *mpic = mpic_from_ipi(d); unsigned int src = virq_to_hw(d->irq) - mpic->ipi_vecs[0]; @@ -4999,7 +5017,7 @@ index 58d7a53..bdb2288 100644 } static void mpic_mask_ipi(struct irq_data *d) -@@ -911,6 +950,7 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) +@@ -911,6 +951,7 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); unsigned int vecpri, vold, vnew; @@ -5007,7 +5025,7 @@ index 58d7a53..bdb2288 100644 DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n", mpic, d->irq, src, flow_type); -@@ -932,6 +972,8 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) +@@ -932,6 +973,8 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) else vecpri = mpic_type_to_vecpri(mpic, flow_type); @@ -5016,7 +5034,7 @@ index 58d7a53..bdb2288 100644 vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) | MPIC_INFO(VECPRI_SENSE_MASK)); -@@ -1709,6 +1751,7 @@ unsigned int mpic_get_mcirq(void) +@@ -1709,6 +1752,7 @@ unsigned int mpic_get_mcirq(void) } #ifdef CONFIG_SMP @@ -11326,7 +11344,7 @@ index 0000000..f013ef4 +#endif /* CONFIG_IPIPE_TRACE_MCOUNT */ +} diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c -index dc5114b..4a264a1 100644 +index dc5114b..4e1cb4c 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -15,6 +15,7 @@ @@ -11347,13 +11365,14 @@ index dc5114b..4a264a1 100644 if (unlikely(irqd_irq_inprogress(&desc->irq_data))) if (!irq_check_poll(desc)) -@@ -399,8 +402,14 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) +@@ -399,8 +402,15 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc) preflow_handler(desc); handle_irq_event(desc); +#ifdef CONFIG_IPIPE + /* XXX: IRQCHIP_EOI_IF_HANDLED is ignored. */ -+ desc->irq_data.chip->irq_unmask(&desc->irq_data); ++ if (!irqd_irq_masked(&desc->irq_data)) ++ desc->irq_data.chip->irq_unmask(&desc->irq_data); +out_eoi: +#else out_eoi: @@ -11362,7 +11381,7 @@ index dc5114b..4a264a1 100644 out_unlock: raw_spin_unlock(&desc->lock); return; -@@ -448,7 +457,9 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) +@@ -448,7 +458,9 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc) kstat_incr_irqs_this_cpu(irq, desc); /* Start handling the irq */ @@ -11372,7 +11391,7 @@ index dc5114b..4a264a1 100644 do { if (unlikely(!desc->action)) { -@@ -535,6 +546,10 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) +@@ -535,6 +547,10 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) kstat_incr_irqs_this_cpu(irq, desc); @@ -11383,7 +11402,7 @@ index dc5114b..4a264a1 100644 if (chip->irq_ack) chip->irq_ack(&desc->irq_data); -@@ -542,8 +557,135 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) +@@ -542,8 +558,135 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc) if (chip->irq_eoi) chip->irq_eoi(&desc->irq_data); @@ -11394,8 +11413,8 @@ index dc5114b..4a264a1 100644 + +void __ipipe_ack_simple_irq(unsigned irq, struct irq_desc *desc) +{ - } - ++} ++ +void __ipipe_end_simple_irq(unsigned irq, struct irq_desc *desc) +{ +} @@ -11459,8 +11478,8 @@ index dc5114b..4a264a1 100644 + +void __ipipe_noack_irq(unsigned irq, struct irq_desc *desc) +{ -+} -+ + } + +void __ipipe_noend_irq(unsigned irq, struct irq_desc *desc) +{ +} @@ -11519,7 +11538,7 @@ index dc5114b..4a264a1 100644 void __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, const char *name) -@@ -561,6 +703,8 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, +@@ -561,6 +704,8 @@ __irq_set_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, goto out; } @@ -11992,7 +12011,7 @@ index 063d7a4..b3565fa 100644 + +#endif /* CONFIG_IPIPE */ diff --git a/kernel/signal.c b/kernel/signal.c -index 415d85d..57fc40c 100644 +index 43fee1c..836b02a 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -636,6 +636,7 @@ void signal_wake_up(struct task_struct *t, int resume) @@ -12222,7 +12241,7 @@ index 4689cb0..3d12764 100644 /* diff --git a/mm/memory.c b/mm/memory.c -index d961e19..95d1f02 100644 +index 95a7799..3c50fcd 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -845,6 +845,32 @@ out: @@ -12549,7 +12568,7 @@ index 5a688a2..3f234b3 100644 if (vma_wants_writenotify(vma)) { vma->vm_page_prot = vm_get_page_prot(newflags & ~VM_SHARED); diff --git a/mm/vmalloc.c b/mm/vmalloc.c -index 45ece89..e326595 100644 +index 65d5fd2..e4cd778 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -171,6 +171,8 @@ static int vmap_page_range_noflush(unsigned long start, unsigned long end, diff --git a/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.1.5-powerpc-2.13-05.patch b/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.1.5-powerpc-2.13-06.patch similarity index 99% rename from kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.1.5-powerpc-2.13-05.patch rename to kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.1.5-powerpc-2.13-06.patch index a32cb40..eb4e27f 100644 --- a/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.1.5-powerpc-2.13-05.patch +++ b/kernel/cobalt/arch/powerpc/patches/adeos-ipipe-3.1.5-powerpc-2.13-06.patch @@ -296,7 +296,7 @@ index bb712c9..8885e9b 100644 * or should we not care like we do now ? --BenH. diff --git a/arch/powerpc/include/asm/ipipe.h b/arch/powerpc/include/asm/ipipe.h new file mode 100644 -index 0000000..97f319c +index 0000000..977028d --- /dev/null +++ b/arch/powerpc/include/asm/ipipe.h @@ -0,0 +1,280 @@ @@ -348,10 +348,10 @@ index 0000000..97f319c +#include <asm/paca.h> +#endif + -+#define IPIPE_ARCH_STRING "2.13-05" ++#define IPIPE_ARCH_STRING "2.13-06" +#define IPIPE_MAJOR_NUMBER 2 +#define IPIPE_MINOR_NUMBER 13 -+#define IPIPE_PATCH_NUMBER 5 ++#define IPIPE_PATCH_NUMBER 6 + +#ifdef CONFIG_IPIPE_WANT_PREEMPTIBLE_SWITCH + @@ -4335,10 +4335,18 @@ index 9a445f6..2537128 100644 unsigned long end) { diff --git a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c -index 8ccf9ed..a285f05 100644 +index 8ccf9ed..ea6098a 100644 --- a/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +++ b/arch/powerpc/platforms/82xx/pq2ads-pci-pic.c -@@ -25,7 +25,7 @@ +@@ -18,6 +18,7 @@ + #include <linux/types.h> + #include <linux/bootmem.h> + #include <linux/slab.h> ++#include <linux/ipipe.h> + + #include <asm/io.h> + #include <asm/prom.h> +@@ -25,7 +26,7 @@ #include "pq2.h" @@ -4347,7 +4355,7 @@ index 8ccf9ed..a285f05 100644 struct pq2ads_pci_pic { struct device_node *node; -@@ -43,13 +43,14 @@ static void pq2ads_pci_mask_irq(struct irq_data *d) +@@ -43,13 +44,14 @@ static void pq2ads_pci_mask_irq(struct irq_data *d) { struct pq2ads_pci_pic *priv = irq_data_get_irq_chip_data(d); int irq = NUM_IRQS - irqd_to_hwirq(d) - 1; @@ -4363,7 +4371,7 @@ index 8ccf9ed..a285f05 100644 raw_spin_unlock_irqrestore(&pci_pic_lock, flags); } -@@ -59,12 +60,13 @@ static void pq2ads_pci_unmask_irq(struct irq_data *d) +@@ -59,12 +61,13 @@ static void pq2ads_pci_unmask_irq(struct irq_data *d) { struct pq2ads_pci_pic *priv = irq_data_get_irq_chip_data(d); int irq = NUM_IRQS - irqd_to_hwirq(d) - 1; @@ -4378,7 +4386,7 @@ index 8ccf9ed..a285f05 100644 raw_spin_unlock_irqrestore(&pci_pic_lock, flags); } } -@@ -97,7 +99,7 @@ static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) +@@ -97,7 +100,7 @@ static void pq2ads_pci_irq_demux(unsigned int irq, struct irq_desc *desc) for (bit = 0; pend != 0; ++bit, pend <<= 1) { if (pend & 0x80000000) { int virq = irq_linear_revmap(priv->host, bit); @@ -4708,10 +4716,10 @@ index bcab50e..cf3d440 100644 .irq_set_type = cpm2_set_irq_type, .flags = IRQCHIP_EOI_IF_HANDLED, diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c -index 419a772..243bd2d 100644 +index 419a772..51b24b8 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c -@@ -181,6 +181,63 @@ out_free: +@@ -181,6 +181,65 @@ out_free: return rc; } @@ -4719,6 +4727,8 @@ index 419a772..243bd2d 100644 + +static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) +{ ++ struct irq_chip *chip = irq_desc_get_chip(desc); ++ struct irq_data *idata = irq_desc_get_irq_data(desc); + unsigned int cascade_irq; + struct fsl_msi *msi_data; + int msir_index = -1; @@ -4727,18 +4737,18 @@ index 419a772..243bd2d 100644 + u32 have_shift = 0; + struct fsl_msi_cascade_data *cascade_data; + -+ cascade_data = (struct fsl_msi_cascade_data *)get_irq_data(irq); ++ cascade_data = irq_get_handler_data(irq); + msi_data = cascade_data->msi_data; + + if ((msi_data->feature & FSL_PIC_IP_MASK) == FSL_PIC_IP_IPIC) { -+ if (desc->chip->mask_ack) -+ desc->chip->mask_ack(irq); ++ if (chip->irq_mask_ack) ++ chip->irq_mask_ack(idata); + else { -+ desc->chip->mask(irq); -+ desc->chip->ack(irq); ++ chip->irq_mask(idata); ++ chip->irq_ack(idata); + } + } else -+ desc->chip->eoi(irq); ++ chip->irq_eoi(idata); + + msir_index = cascade_data->index; + @@ -4767,7 +4777,7 @@ index 419a772..243bd2d 100644 + msir_value = msir_value >> (intr_index + 1); + } + -+ desc->chip->unmask(irq); ++ chip->irq_unmask(idata); +} + +#else /* !CONFIG_IPIPE */ @@ -4775,7 +4785,7 @@ index 419a772..243bd2d 100644 static void fsl_msi_cascade(unsigned int irq, struct irq_desc *desc) { struct irq_chip *chip = irq_desc_get_chip(desc); -@@ -251,6 +308,8 @@ unlock: +@@ -251,6 +310,8 @@ unlock: raw_spin_unlock(&desc->lock); } @@ -4906,10 +4916,18 @@ index 22e48e2..4135184 100644 .irq_set_type = mpc8xx_set_irq_type, }; diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c -index d5d3ff3..3922171 100644 +index d5d3ff3..ac3a91f 100644 --- a/arch/powerpc/sysdev/mpic.c +++ b/arch/powerpc/sysdev/mpic.c -@@ -50,7 +50,7 @@ +@@ -30,6 +30,7 @@ + #include <linux/slab.h> + #include <linux/syscore_ops.h> + #include <linux/ratelimit.h> ++#include <linux/ipipe.h> + + #include <asm/ptrace.h> + #include <asm/signal.h> +@@ -50,7 +51,7 @@ static struct mpic *mpics; static struct mpic *mpic_primary; @@ -4918,7 +4936,7 @@ index d5d3ff3..3922171 100644 #ifdef CONFIG_PPC32 /* XXX for now */ #ifdef CONFIG_IRQ_ALL_CPUS -@@ -666,7 +666,7 @@ static inline void mpic_eoi(struct mpic *mpic) +@@ -666,7 +667,7 @@ static inline void mpic_eoi(struct mpic *mpic) */ @@ -4927,7 +4945,7 @@ index d5d3ff3..3922171 100644 { unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq_data(d); -@@ -687,7 +687,17 @@ void mpic_unmask_irq(struct irq_data *d) +@@ -687,7 +688,17 @@ void mpic_unmask_irq(struct irq_data *d) } while(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK); } @@ -4946,7 +4964,7 @@ index d5d3ff3..3922171 100644 { unsigned int loops = 100000; struct mpic *mpic = mpic_from_irq_data(d); -@@ -709,9 +719,20 @@ void mpic_mask_irq(struct irq_data *d) +@@ -709,9 +720,20 @@ void mpic_mask_irq(struct irq_data *d) } while(!(mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)) & MPIC_VECPRI_MASK)); } @@ -4967,7 +4985,7 @@ index d5d3ff3..3922171 100644 #ifdef DEBUG_IRQ DBG("%s: end_irq: %d\n", mpic->name, d->irq); -@@ -721,6 +742,13 @@ void mpic_end_irq(struct irq_data *d) +@@ -721,6 +743,13 @@ void mpic_end_irq(struct irq_data *d) * latched another edge interrupt coming in anyway */ @@ -4981,7 +4999,7 @@ index d5d3ff3..3922171 100644 mpic_eoi(mpic); } -@@ -731,7 +759,7 @@ static void mpic_unmask_ht_irq(struct irq_data *d) +@@ -731,7 +760,7 @@ static void mpic_unmask_ht_irq(struct irq_data *d) struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); @@ -4990,7 +5008,7 @@ index d5d3ff3..3922171 100644 if (irqd_is_level_type(d)) mpic_ht_end_irq(mpic, src); -@@ -742,7 +770,7 @@ static unsigned int mpic_startup_ht_irq(struct irq_data *d) +@@ -742,7 +771,7 @@ static unsigned int mpic_startup_ht_irq(struct irq_data *d) struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); @@ -4999,7 +5017,7 @@ index d5d3ff3..3922171 100644 mpic_startup_ht_interrupt(mpic, src, irqd_is_level_type(d)); return 0; -@@ -761,9 +789,17 @@ static void mpic_end_ht_irq(struct irq_data *d) +@@ -761,9 +790,17 @@ static void mpic_end_ht_irq(struct irq_data *d) { struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); @@ -5018,7 +5036,7 @@ index d5d3ff3..3922171 100644 #endif /* We always EOI on end_irq() even for edge interrupts since that * should only lower the priority, the MPIC should have properly -@@ -782,9 +818,12 @@ static void mpic_unmask_ipi(struct irq_data *d) +@@ -782,9 +819,12 @@ static void mpic_unmask_ipi(struct irq_data *d) { struct mpic *mpic = mpic_from_ipi(d); unsigned int src = virq_to_hw(d->irq) - mpic->ipi_vecs[0]; @@ -5032,7 +5050,7 @@ index d5d3ff3..3922171 100644 } static void mpic_mask_ipi(struct irq_data *d) -@@ -875,6 +914,7 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) +@@ -875,6 +915,7 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) struct mpic *mpic = mpic_from_irq_data(d); unsigned int src = irqd_to_hwirq(d); unsigned int vecpri, vold, vnew; @@ -5040,7 +5058,7 @@ index d5d3ff3..3922171 100644 DBG("mpic: set_irq_type(mpic:@%p,virq:%d,src:0x%x,type:0x%x)\n", mpic, d->irq, src, flow_type); -@@ -896,6 +936,8 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) +@@ -896,6 +937,8 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type) else vecpri = mpic_type_to_vecpri(mpic, flow_type); @@ -5049,7 +5067,7 @@ index d5d3ff3..3922171 100644 vold = mpic_irq_read(src, MPIC_INFO(IRQ_VECTOR_PRI)); vnew = vold & ~(MPIC_INFO(VECPRI_POLARITY_MASK) | MPIC_INFO(VECPRI_SENSE_MASK)); -@@ -1673,6 +1715,7 @@ unsigned int mpic_get_mcirq(void) +@@ -1673,6 +1716,7 @@ unsigned int mpic_get_mcirq(void) } #ifdef CONFIG_SMP _______________________________________________ Xenomai-git mailing list [email protected] https://mail.gna.org/listinfo/xenomai-git
