~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/sysdev/xive/xive-internal.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  * Copyright 2016,2017 IBM Corporation.
  4  */
  5 #ifndef __XIVE_INTERNAL_H
  6 #define __XIVE_INTERNAL_H
  7 
  8 /*
  9  * A "disabled" interrupt should never fire, to catch problems
 10  * we set its logical number to this
 11  */
 12 #define XIVE_BAD_IRQ            0x7fffffff
 13 #define XIVE_MAX_IRQ            (XIVE_BAD_IRQ - 1)
 14 
 15 /* Each CPU carry one of these with various per-CPU state */
 16 struct xive_cpu {
 17 #ifdef CONFIG_SMP
 18         /* HW irq number and data of IPI */
 19         u32 hw_ipi;
 20         struct xive_irq_data ipi_data;
 21 #endif /* CONFIG_SMP */
 22 
 23         int chip_id;
 24 
 25         /* Queue datas. Only one is populated */
 26 #define XIVE_MAX_QUEUES 8
 27         struct xive_q queue[XIVE_MAX_QUEUES];
 28 
 29         /*
 30          * Pending mask. Each bit corresponds to a priority that
 31          * potentially has pending interrupts.
 32          */
 33         u8 pending_prio;
 34 
 35         /* Cache of HW CPPR */
 36         u8 cppr;
 37 };
 38 
 39 /* Backend ops */
 40 struct xive_ops {
 41         int     (*populate_irq_data)(u32 hw_irq, struct xive_irq_data *data);
 42         int     (*configure_irq)(u32 hw_irq, u32 target, u8 prio, u32 sw_irq);
 43         int     (*get_irq_config)(u32 hw_irq, u32 *target, u8 *prio,
 44                                   u32 *sw_irq);
 45         int     (*setup_queue)(unsigned int cpu, struct xive_cpu *xc, u8 prio);
 46         void    (*cleanup_queue)(unsigned int cpu, struct xive_cpu *xc, u8 prio);
 47         void    (*prepare_cpu)(unsigned int cpu, struct xive_cpu *xc);
 48         void    (*setup_cpu)(unsigned int cpu, struct xive_cpu *xc);
 49         void    (*teardown_cpu)(unsigned int cpu, struct xive_cpu *xc);
 50         bool    (*match)(struct device_node *np);
 51         void    (*shutdown)(void);
 52 
 53         void    (*update_pending)(struct xive_cpu *xc);
 54         void    (*sync_source)(u32 hw_irq);
 55         u64     (*esb_rw)(u32 hw_irq, u32 offset, u64 data, bool write);
 56 #ifdef CONFIG_SMP
 57         int     (*get_ipi)(unsigned int cpu, struct xive_cpu *xc);
 58         void    (*put_ipi)(unsigned int cpu, struct xive_cpu *xc);
 59 #endif
 60         int     (*debug_show)(struct seq_file *m, void *private);
 61         int     (*debug_create)(struct dentry *xive_dir);
 62         const char *name;
 63 };
 64 
 65 bool xive_core_init(struct device_node *np, const struct xive_ops *ops,
 66                     void __iomem *area, u32 offset, u8 max_prio);
 67 __be32 *xive_queue_page_alloc(unsigned int cpu, u32 queue_shift);
 68 int xive_core_debug_init(void);
 69 
 70 static inline u32 xive_alloc_order(u32 queue_shift)
 71 {
 72         return (queue_shift > PAGE_SHIFT) ? (queue_shift - PAGE_SHIFT) : 0;
 73 }
 74 
 75 extern bool xive_cmdline_disabled;
 76 extern bool xive_has_save_restore;
 77 
 78 #endif /*  __XIVE_INTERNAL_H */
 79 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php