mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
direct commit: fix KBI for pci_dev
Move all the new elemenets to the end of the structure for 13. We allocate this inside the linuxkpi code, so the size isn't enccoded in client modules. However, the offsets to the different fields are encoded. Tihs modifies04456f7118,40a215e38a, and3a606aadf2and will likely create merge conflicts there (and that's a good thing since the elements need to be moved to the end of the structure when merging). Tweak irq_ent to be binary compatible. Since this is inlined into the clients, all clients have to agree on the irq_ent offsets. Restore visibility to linux_kmem_cache_free_rcu linux_kmem_cache_free_rcu was made static in10235ad056, however client drivers depended on calling it directly. Make it visible again to restore the 13.0-Release KBI for linuxkpi. Bump FreeBSD_version to 1300515 for restoration of 13.0 KBI. Since this commmit changes the linuxkpi KBI (this time back to 13.0 release to restore the status quo of), you'll need to recompile everything that uses it (you needed to earlier as well, but those were silent recompilation events). The plus side is that our packages (built using 13.0) for drm-kmod 5.4 work again on -stable systems. Reviewed by: bz, wulf Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31363
This commit is contained in:
parent
5d8f8ab1eb
commit
0437d10e35
5 changed files with 20 additions and 12 deletions
|
|
@ -52,9 +52,11 @@ struct irq_ent {
|
|||
struct resource *res;
|
||||
void *arg;
|
||||
irqreturn_t (*handler)(int, void *);
|
||||
irqreturn_t (*thread_handler)(int, void *);
|
||||
void *tag;
|
||||
unsigned int irq;
|
||||
|
||||
/* XXX All new entries must be after this in stable/13 */
|
||||
irqreturn_t (*thread_handler)(int, void *);
|
||||
};
|
||||
|
||||
void linux_irq_handler(void *);
|
||||
|
|
|
|||
|
|
@ -237,7 +237,6 @@ struct pci_dev {
|
|||
struct list_head links;
|
||||
struct pci_driver *pdrv;
|
||||
struct pci_bus *bus;
|
||||
struct pci_dev *root;
|
||||
uint16_t device;
|
||||
uint16_t vendor;
|
||||
uint16_t subsystem_vendor;
|
||||
|
|
@ -246,16 +245,21 @@ struct pci_dev {
|
|||
unsigned int devfn;
|
||||
uint32_t class;
|
||||
uint8_t revision;
|
||||
bool managed; /* devres "pcim_*(). */
|
||||
bool want_iomap_res;
|
||||
bool msi_enabled;
|
||||
bool msix_enabled;
|
||||
phys_addr_t rom;
|
||||
size_t romlen;
|
||||
|
||||
TAILQ_HEAD(, pci_mmio_region) mmio;
|
||||
|
||||
/* Add all new items at the end of the list in 13 */
|
||||
struct pci_dev *root;
|
||||
phys_addr_t rom;
|
||||
size_t romlen;
|
||||
bool managed; /* devres "pcim_*(). */
|
||||
bool want_iomap_res;
|
||||
bool msix_enabled;
|
||||
};
|
||||
|
||||
/* XXX add kassert here on the mmio offset */
|
||||
|
||||
/* We need some meta-struct to keep track of these for devres. */
|
||||
struct pci_devres {
|
||||
bool enable_io;
|
||||
|
|
|
|||
|
|
@ -210,5 +210,7 @@ extern void *lkpi_kmem_cache_zalloc(struct linux_kmem_cache *, gfp_t);
|
|||
extern void lkpi_kmem_cache_free(struct linux_kmem_cache *, void *);
|
||||
extern void linux_kmem_cache_destroy(struct linux_kmem_cache *);
|
||||
void linux_kfree_async(void *);
|
||||
void linux_kmem_cache_free_rcu_callback(struct rcu_head *head);
|
||||
void linux_kmem_cache_free_rcu(struct linux_kmem_cache *, void *);
|
||||
|
||||
#endif /* _LINUX_SLAB_H_ */
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ linux_kmem_ctor(void *mem, int size, void *arg, int flags)
|
|||
return (0);
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
linux_kmem_cache_free_rcu_callback(struct rcu_head *head)
|
||||
{
|
||||
struct linux_kmem_rcu *rcu =
|
||||
|
|
@ -145,8 +145,8 @@ linux_kmem_cache_create(const char *name, size_t size, size_t align,
|
|||
return (c);
|
||||
}
|
||||
|
||||
static inline void
|
||||
lkpi_kmem_cache_free_rcu(struct linux_kmem_cache *c, void *m)
|
||||
void
|
||||
linux_kmem_cache_free_rcu(struct linux_kmem_cache *c, void *m)
|
||||
{
|
||||
struct linux_kmem_rcu *rcu = LINUX_KMEM_TO_RCU(c, m);
|
||||
|
||||
|
|
@ -183,7 +183,7 @@ void
|
|||
lkpi_kmem_cache_free(struct linux_kmem_cache *c, void *m)
|
||||
{
|
||||
if (unlikely(c->cache_flags & SLAB_TYPESAFE_BY_RCU))
|
||||
lkpi_kmem_cache_free_rcu(c, m);
|
||||
linux_kmem_cache_free_rcu(c, m);
|
||||
else if (unlikely(curthread->td_critnest != 0))
|
||||
lkpi_kmem_cache_free_async(c, m);
|
||||
else
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
* in the range 5 to 9.
|
||||
*/
|
||||
#undef __FreeBSD_version
|
||||
#define __FreeBSD_version 1300514 /* Master, propagated to newvers */
|
||||
#define __FreeBSD_version 1300515 /* Master, propagated to newvers */
|
||||
|
||||
/*
|
||||
* __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD,
|
||||
|
|
|
|||
Loading…
Reference in a new issue