diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/clk/msm-clock-generic.h | 3 | ||||
| -rw-r--r-- | include/linux/clocksource.h | 2 | ||||
| -rw-r--r-- | include/linux/diagchar.h | 2 | ||||
| -rw-r--r-- | include/linux/sysfs.h | 2 | ||||
| -rw-r--r-- | include/linux/usb.h | 2 | ||||
| -rw-r--r-- | include/linux/usb/hcd.h | 5 | ||||
| -rw-r--r-- | include/net/cfg80211.h | 12 | ||||
| -rw-r--r-- | include/net/inet_timewait_sock.h | 1 | ||||
| -rw-r--r-- | include/net/mac80211.h | 14 | ||||
| -rw-r--r-- | include/net/nexthop.h | 2 | ||||
| -rw-r--r-- | include/uapi/linux/goldfish/goldfish_dma.h | 83 |
11 files changed, 108 insertions, 20 deletions
diff --git a/include/linux/clk/msm-clock-generic.h b/include/linux/clk/msm-clock-generic.h index fe019d366d0b..cb2d8787b84f 100644 --- a/include/linux/clk/msm-clock-generic.h +++ b/include/linux/clk/msm-clock-generic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -311,6 +311,7 @@ extern struct clk_ops clk_ops_mux_div_clk; struct virtclk_front { int id; struct clk c; + u32 flag; }; extern struct clk_ops virtclk_front_ops; diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 39c7de8c3048..d282307214ac 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h @@ -110,7 +110,7 @@ struct clocksource { #define CLOCK_SOURCE_RESELECT 0x100 /* simplify initialization of mask field */ -#define CLOCKSOURCE_MASK(bits) (cycle_t)((bits) < 64 ? ((1ULL<<(bits))-1) : -1) +#define CLOCKSOURCE_MASK(bits) GENMASK_ULL((bits) - 1, 0) /** * clocksource_khz2mult - calculates mult from khz and shift diff --git a/include/linux/diagchar.h b/include/linux/diagchar.h index 16e41b4ce437..2cd41e0cd394 100644 --- a/include/linux/diagchar.h +++ b/include/linux/diagchar.h @@ -881,7 +881,7 @@ static const uint32_t msg_bld_masks_25[] = { /* LOG CODES */ static const uint32_t log_code_last_tbl[] = { 0x0, /* EQUIP ID 0 */ - 0x1C68, /* EQUIP ID 1 */ + 0x1C6A, /* EQUIP ID 1 */ 0x0, /* EQUIP ID 2 */ 0x0, /* EQUIP ID 3 */ 0x4910, /* EQUIP ID 4 */ diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index 00a1f330f93a..9c452f6db438 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -518,7 +518,7 @@ static inline void sysfs_notify_dirent(struct kernfs_node *kn) } static inline struct kernfs_node *sysfs_get_dirent(struct kernfs_node *parent, - const unsigned char *name) + const char *name) { return kernfs_find_and_get(parent, name); } diff --git a/include/linux/usb.h b/include/linux/usb.h index 1821d34c24a5..d88c31c8e6a4 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -753,9 +753,9 @@ extern int usb_sec_event_ring_cleanup(struct usb_device *dev, extern dma_addr_t usb_get_sec_event_ring_dma_addr(struct usb_device *dev, unsigned intr_num); +extern dma_addr_t usb_get_dcba_dma_addr(struct usb_device *dev); extern dma_addr_t usb_get_xfer_ring_dma_addr(struct usb_device *dev, struct usb_host_endpoint *ep); -extern int usb_get_controller_id(struct usb_device *dev); /* Sets up a group of bulk endpoints to support multiple stream IDs. */ extern int usb_alloc_streams(struct usb_interface *interface, diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 8cbf59e6406b..dff7adbc60bb 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h @@ -403,7 +403,8 @@ struct hc_driver { unsigned intr_num); dma_addr_t (*get_xfer_ring_dma_addr)(struct usb_hcd *hcd, struct usb_device *udev, struct usb_host_endpoint *ep); - int (*get_core_id)(struct usb_hcd *hcd); + dma_addr_t (*get_dcba_dma_addr)(struct usb_hcd *hcd, + struct usb_device *udev); }; static inline int hcd_giveback_urb_in_bh(struct usb_hcd *hcd) @@ -449,10 +450,10 @@ extern int usb_hcd_sec_event_ring_cleanup(struct usb_device *udev, extern dma_addr_t usb_hcd_get_sec_event_ring_dma_addr(struct usb_device *udev, unsigned intr_num); +extern dma_addr_t usb_hcd_get_dcba_dma_addr(struct usb_device *udev); extern dma_addr_t usb_hcd_get_xfer_ring_dma_addr(struct usb_device *udev, struct usb_host_endpoint *ep); -extern int usb_hcd_get_controller_id(struct usb_device *udev); extern struct usb_hcd *usb_create_hcd(const struct hc_driver *driver, struct device *dev, const char *bus_name); diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 881c5d46a66c..705364a8e9c6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -82,8 +82,8 @@ struct wiphy; /* Indicate support for including KEK length in rekey data */ #define CFG80211_REKEY_DATA_KEK_LEN 1 -/* Indicate support for regulatory update sync event */ -#define CFG80211_REG_UPDATE_SYNC_EVENT 1 +/* Indicate backport support for processing user cell base hint */ +#define CFG80211_USER_HINT_CELL_BASE_SELF_MANAGED 1 /* * wireless hardware capability structures @@ -5774,14 +5774,6 @@ void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info); */ void cfg80211_ap_stopped(struct net_device *netdev, gfp_t gfp); -/** - * cfg80211_send_reg_change_event - notify user-space of regulatory change - * @request: regulatory request - * @wiphy: the wiphy to use - */ -void cfg80211_send_reg_change_event(struct regulatory_request *request, - struct wiphy *wiphy); - /* Logging, debugging and troubleshooting/diagnostic helpers. */ /* wiphy_printk helpers, similar to dev_printk */ diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h index c9b3eb70f340..567017b5fc9e 100644 --- a/include/net/inet_timewait_sock.h +++ b/include/net/inet_timewait_sock.h @@ -55,6 +55,7 @@ struct inet_timewait_sock { #define tw_family __tw_common.skc_family #define tw_state __tw_common.skc_state #define tw_reuse __tw_common.skc_reuse +#define tw_reuseport __tw_common.skc_reuseport #define tw_ipv6only __tw_common.skc_ipv6only #define tw_bound_dev_if __tw_common.skc_bound_dev_if #define tw_node __tw_common.skc_nulls_node diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b63712b00047..4ca1c04a6f1f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -975,7 +975,7 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) * @RX_FLAG_DECRYPTED: This frame was decrypted in hardware. * @RX_FLAG_MMIC_STRIPPED: the Michael MIC is stripped off this frame, * verification has been done by the hardware. - * @RX_FLAG_IV_STRIPPED: The IV/ICV are stripped from this frame. + * @RX_FLAG_IV_STRIPPED: The IV and ICV are stripped from this frame. * If this flag is set, the stack cannot do any replay detection * hence the driver or hardware will have to do that. * @RX_FLAG_PN_VALIDATED: Currently only valid for CCMP/GCMP frames, this @@ -1013,6 +1013,8 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) * on this subframe * @RX_FLAG_AMPDU_DELIM_CRC_KNOWN: The delimiter CRC field is known (the CRC * is stored in the @ampdu_delimiter_crc field) + * @RX_FLAG_MIC_STRIPPED: The mic was stripped of this packet. Decryption was + * done by the hardware * @RX_FLAG_LDPC: LDPC was used * @RX_FLAG_ONLY_MONITOR: Report frame only to monitor interfaces without * processing it in any regular way. @@ -1037,6 +1039,11 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) * @RX_FLAG_RADIOTAP_VENDOR_DATA: This frame contains vendor-specific * radiotap data in the skb->data (before the frame) as described by * the &struct ieee80211_vendor_radiotap. + * @RX_FLAG_ALLOW_SAME_PN: Allow the same PN as same packet before. + * This is used for AMSDU subframes which can have the same PN as + * the first subframe. + * @RX_FLAG_ICV_STRIPPED: The ICV is stripped from this frame. CRC checking must + * be done in the hardware. */ enum mac80211_rx_flags { RX_FLAG_MMIC_ERROR = BIT(0), @@ -1069,6 +1076,9 @@ enum mac80211_rx_flags { RX_FLAG_5MHZ = BIT(29), RX_FLAG_AMSDU_MORE = BIT(30), RX_FLAG_RADIOTAP_VENDOR_DATA = BIT(31), + RX_FLAG_MIC_STRIPPED = BIT_ULL(32), + RX_FLAG_ALLOW_SAME_PN = BIT_ULL(33), + RX_FLAG_ICV_STRIPPED = BIT_ULL(34), }; #define RX_FLAG_STBC_SHIFT 26 @@ -1124,7 +1134,7 @@ struct ieee80211_rx_status { u64 mactime; u32 device_timestamp; u32 ampdu_reference; - u32 flag; + u64 flag; u16 freq; u8 vht_flag; u8 rate_idx; diff --git a/include/net/nexthop.h b/include/net/nexthop.h index 3334dbfa5aa4..7fc78663ec9d 100644 --- a/include/net/nexthop.h +++ b/include/net/nexthop.h @@ -6,7 +6,7 @@ static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining) { - return remaining >= sizeof(*rtnh) && + return remaining >= (int)sizeof(*rtnh) && rtnh->rtnh_len >= sizeof(*rtnh) && rtnh->rtnh_len <= remaining; } diff --git a/include/uapi/linux/goldfish/goldfish_dma.h b/include/uapi/linux/goldfish/goldfish_dma.h new file mode 100644 index 000000000000..3d6376255c96 --- /dev/null +++ b/include/uapi/linux/goldfish/goldfish_dma.h @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2018 Google, Inc. + * + * This software is licensed under the terms of the GNU General Public + * License version 2, as published by the Free Software Foundation, and + * may be copied, distributed, and modified under those terms. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + */ + +#ifndef UAPI_GOLDFISH_DMA_H +#define UAPI_GOLDFISH_DMA_H + +#include <linux/types.h> + +/* GOLDFISH DMA + * + * Goldfish DMA is an extension to the pipe device + * and is designed to facilitate high-speed RAM->RAM + * transfers from guest to host. + * + * Interface (guest side): + * + * The guest user calls goldfish_dma_alloc (ioctls) + * and then mmap() on a goldfish pipe fd, + * which means that it wants high-speed access to + * host-visible memory. + * + * The guest can then write into the pointer + * returned by mmap(), and these writes + * become immediately visible on the host without BQL + * or otherweise context switching. + * + * dma_alloc_coherent() is used to obtain contiguous + * physical memory regions, and we allocate and interact + * with this region on both guest and host through + * the following ioctls: + * + * - LOCK: lock the region for data access. + * - UNLOCK: unlock the region. This may also be done from the host + * through the WAKE_ON_UNLOCK_DMA procedure. + * - CREATE_REGION: initialize size info for a dma region. + * - GETOFF: send physical address to guest drivers. + * - (UN)MAPHOST: uses goldfish_pipe_cmd to tell the host to + * (un)map to the guest physical address associated + * with the current dma context. This makes the physically + * contiguous memory (in)visible to the host. + * + * Guest userspace obtains a pointer to the DMA memory + * through mmap(), which also lazily allocates the memory + * with dma_alloc_coherent. (On last pipe close(), the region is freed). + * The mmaped() region can handle very high bandwidth + * transfers, and pipe operations can be used at the same + * time to handle synchronization and command communication. + */ + +#define GOLDFISH_DMA_BUFFER_SIZE (32 * 1024 * 1024) + +struct goldfish_dma_ioctl_info { + __u64 phys_begin; + __u64 size; +}; + +/* There is an ioctl associated with goldfish dma driver. + * Make it conflict with ioctls that are not likely to be used + * in the emulator. + * 'G' 00-3F drivers/misc/sgi-gru/grulib.h conflict! + * 'G' 00-0F linux/gigaset_dev.h conflict! + */ +#define GOLDFISH_DMA_IOC_MAGIC 'G' +#define GOLDFISH_DMA_IOC_OP(OP) _IOWR(GOLDFISH_DMA_IOC_MAGIC, OP, \ + struct goldfish_dma_ioctl_info) + +#define GOLDFISH_DMA_IOC_LOCK GOLDFISH_DMA_IOC_OP(0) +#define GOLDFISH_DMA_IOC_UNLOCK GOLDFISH_DMA_IOC_OP(1) +#define GOLDFISH_DMA_IOC_GETOFF GOLDFISH_DMA_IOC_OP(2) +#define GOLDFISH_DMA_IOC_CREATE_REGION GOLDFISH_DMA_IOC_OP(3) + +#endif /* UAPI_GOLDFISH_DMA_H */ |
