ANDROID: GKI: USB: XHCI: add Android ABI padding to lots of xhci structures

Given that the xhci driver seems to be one of the more "modified" by
vendors, and that the xhci core is going to be built into the kernel in
the GKI 2 Android kernel, the xhci "platform" api is now a stable
boundry.

Try to handle any future changes in this api by adding some kabi padding
fields to allow for room to grow and change over the next 5+ years as
needed.

Bug: 151154716
Bug: 182336717
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I55c8cad8c8c51330fc2d72df41a1f04229a22e98
This commit is contained in:
Greg Kroah-Hartman 2021-03-18 18:23:32 +01:00 committed by Carlos Llamas
parent 807752459e
commit bf55b78067

View File

@ -17,6 +17,7 @@
#include <linux/kernel.h>
#include <linux/usb/hcd.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/android_kabi.h>
/* Code sharing between pci-quirks and xhci hcd */
#include "xhci-ext-caps.h"
@ -815,6 +816,9 @@ struct xhci_command {
struct completion *completion;
union xhci_trb *command_trb;
struct list_head cmd_list;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
};
/* drop context bitmasks */
@ -1548,6 +1552,8 @@ struct xhci_segment {
void *bounce_buf;
unsigned int bounce_offs;
unsigned int bounce_len;
ANDROID_KABI_RESERVE(1);
};
enum xhci_cancelled_td_status {
@ -1636,6 +1642,9 @@ struct xhci_ring {
enum xhci_ring_type type;
bool last_td_was_short;
struct radix_tree_root *trb_address_map;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
};
struct xhci_erst_entry {
@ -1653,6 +1662,8 @@ struct xhci_erst {
dma_addr_t erst_dma_addr;
/* Num entries the ERST can contain */
unsigned int erst_size;
ANDROID_KABI_RESERVE(1);
};
struct xhci_scratchpad {
@ -1929,6 +1940,12 @@ struct xhci_hcd {
struct list_head regset_list;
void *dbc;
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);
/* platform-specific data -- must come last */
unsigned long priv[] __aligned(sizeof(s64));
};