summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2019-09-09 22:46:52 -0700
committerLinux Build Service Account <lnxbuild@localhost>2019-09-09 22:46:52 -0700
commitf7783089abe5f745d30c3c8455ef759737e0a7a0 (patch)
treed2a11fd8d7eb8ebe38e507961b8197386ad466da /include/linux
parenta7e8a977f049e7dbf96dc58523c31c5731e1dfc5 (diff)
parent9c59fb632e3585fe24af1eb2420bafc5884c010d (diff)
Merge 9c59fb632e3585fe24af1eb2420bafc5884c010d on remote branch
Change-Id: I976bf04f83cc72048f5584ca0980c1bed83c54de
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/acpi.h5
-rw-r--r--include/linux/coda.h3
-rw-r--r--include/linux/coda_psdev.h11
-rw-r--r--include/linux/compiler.h16
-rw-r--r--include/linux/cred.h7
-rw-r--r--include/linux/elevator.h2
-rw-r--r--include/linux/fs.h3
-rw-r--r--include/linux/if_pppox.h3
-rw-r--r--include/linux/module.h4
-rw-r--r--include/linux/qcn_sdio_al.h296
-rw-r--r--include/linux/qdsp6v2/apr.h2
-rw-r--r--include/linux/qdsp6v2/rtac.h2
-rw-r--r--include/linux/rcupdate.h2
-rw-r--r--include/linux/sched.h4
14 files changed, 349 insertions, 11 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 3672893b275e..6a30f1e03aa9 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -226,7 +226,10 @@ void acpi_set_irq_model(enum acpi_irq_model_id model,
#ifdef CONFIG_X86_IO_APIC
extern int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity);
#else
-#define acpi_get_override_irq(gsi, trigger, polarity) (-1)
+static inline int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
+{
+ return -1;
+}
#endif
/*
* This function undoes the effect of one call to acpi_register_gsi().
diff --git a/include/linux/coda.h b/include/linux/coda.h
index d30209b9cef8..0ca0c83fdb1c 100644
--- a/include/linux/coda.h
+++ b/include/linux/coda.h
@@ -58,8 +58,7 @@ Mellon the rights to redistribute these changes without encumbrance.
#ifndef _CODA_HEADER_
#define _CODA_HEADER_
-#if defined(__linux__)
typedef unsigned long long u_quad_t;
-#endif
+
#include <uapi/linux/coda.h>
#endif
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h
index 5b8721efa948..fe1466daf291 100644
--- a/include/linux/coda_psdev.h
+++ b/include/linux/coda_psdev.h
@@ -19,6 +19,17 @@ struct venus_comm {
struct mutex vc_mutex;
};
+/* messages between coda filesystem in kernel and Venus */
+struct upc_req {
+ struct list_head uc_chain;
+ caddr_t uc_data;
+ u_short uc_flags;
+ u_short uc_inSize; /* Size is at most 5000 bytes */
+ u_short uc_outSize;
+ u_short uc_opcode; /* copied from data to save lookup */
+ int uc_unique;
+ wait_queue_head_t uc_sleep; /* process' wait queue */
+};
static inline struct venus_comm *coda_vcp(struct super_block *sb)
{
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index ed772311ec1f..5508011cc0c7 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -52,6 +52,22 @@ extern void __chk_io_ptr(const volatile void __iomem *);
#ifdef __KERNEL__
+/*
+ * Minimal backport of compiler_attributes.h to add support for __copy
+ * to v4.9.y so that we can use it in init/exit_module to avoid
+ * -Werror=missing-attributes errors on GCC 9.
+ */
+#ifndef __has_attribute
+# define __has_attribute(x) __GCC4_has_attribute_##x
+# define __GCC4_has_attribute___copy__ 0
+#endif
+
+#if __has_attribute(__copy__)
+# define __copy(symbol) __attribute__((__copy__(symbol)))
+#else
+# define __copy(symbol)
+#endif
+
#ifdef __GNUC__
#include <linux/compiler-gcc.h>
#endif
diff --git a/include/linux/cred.h b/include/linux/cred.h
index 9e120c92551b..d2db1da3036c 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -153,7 +153,11 @@ struct cred {
struct user_struct *user; /* real user ID subscription */
struct user_namespace *user_ns; /* user_ns the caps and keyrings are relative to. */
struct group_info *group_info; /* supplementary groups for euid/fsgid */
- struct rcu_head rcu; /* RCU deletion hook */
+ /* RCU deletion */
+ union {
+ int non_rcu; /* Can we skip RCU deletion? */
+ struct rcu_head rcu; /* RCU deletion hook */
+ };
};
extern void __put_cred(struct cred *);
@@ -251,6 +255,7 @@ static inline const struct cred *get_cred(const struct cred *cred)
{
struct cred *nonconst_cred = (struct cred *) cred;
validate_creds(cred);
+ nonconst_cred->non_rcu = 0;
return get_new_cred(nonconst_cred);
}
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index 638b324f0291..92ad08a29884 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -97,7 +97,7 @@ struct elevator_type
struct module *elevator_owner;
/* managed by elevator core */
- char icq_cache_name[ELV_NAME_MAX + 5]; /* elvname + "_io_cq" */
+ char icq_cache_name[ELV_NAME_MAX + 6]; /* elvname + "_io_cq" */
struct list_head list;
};
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7493e807f073..66360a2f97bc 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3141,4 +3141,7 @@ static inline bool dir_relax(struct inode *inode)
extern bool path_noexec(const struct path *path);
extern void inode_nohighmem(struct inode *inode);
+int vfs_ioc_setflags_prepare(struct inode *inode, unsigned int oldflags,
+ unsigned int flags);
+
#endif /* _LINUX_FS_H */
diff --git a/include/linux/if_pppox.h b/include/linux/if_pppox.h
index 63828a5870f1..e578f38480e5 100644
--- a/include/linux/if_pppox.h
+++ b/include/linux/if_pppox.h
@@ -105,6 +105,9 @@ extern int register_pppox_proto(int proto_num, const struct pppox_proto *pp);
extern void unregister_pppox_proto(int proto_num);
extern void pppox_unbind_sock(struct sock *sk);/* delete ppp-channel binding */
extern int pppox_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
+extern int pppox_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg);
+
+#define PPPOEIOCSFWD32 _IOW(0xB1 ,0, compat_size_t)
/* PPPoX socket states */
enum {
diff --git a/include/linux/module.h b/include/linux/module.h
index dfe5c2e25ba1..d237d0574179 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -127,13 +127,13 @@ extern void cleanup_module(void);
#define module_init(initfn) \
static inline initcall_t __maybe_unused __inittest(void) \
{ return initfn; } \
- int init_module(void) __attribute__((alias(#initfn)));
+ int init_module(void) __copy(initfn) __attribute__((alias(#initfn)));
/* This is only required if you want to be unloadable. */
#define module_exit(exitfn) \
static inline exitcall_t __maybe_unused __exittest(void) \
{ return exitfn; } \
- void cleanup_module(void) __attribute__((alias(#exitfn)));
+ void cleanup_module(void) __copy(exitfn) __attribute__((alias(#exitfn)));
#endif
diff --git a/include/linux/qcn_sdio_al.h b/include/linux/qcn_sdio_al.h
new file mode 100644
index 000000000000..bee020b0ccb4
--- /dev/null
+++ b/include/linux/qcn_sdio_al.h
@@ -0,0 +1,296 @@
+/* Copyright (c) 2019 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
+ * only version 2 as published by the Free Software Foundation.
+ *
+ * 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 _QCN_SDIO_AL_
+#define _QCN_SDIO_AL_
+
+
+/**
+ * ------------------------------------
+ * ------- SDIO AL Interface ----------
+ * ------------------------------------
+ *
+ * This file contains the proposed SDIO AL (Abstraction Layer) interface.
+ * Terminologies:
+ * SDIO AL : SDIO host function-1 driver
+ * SDIO AL client: Clients of SDIO host function-1 driver.
+ * WLAN, QMI, DIAG etc. are possible clients.
+ * Remote SDIO client: SDIO client on device side which implements ADMA
+ * functionality as function-1
+ */
+
+enum sdio_al_dma_direction {
+ SDIO_AL_TX,
+ SDIO_AL_RX,
+};
+
+/**
+ * struct sdio_al_client_handle - unique handler to identify
+ * each SDIO AL (Abstraction Layer) client
+ *
+ * @id: unique id for each client
+ * @block_size: block size
+ * @func: pointer to sdio_func data structure, some clients may need this.
+ * @client_priv: This is client priv that can used by client driver.
+ */
+struct sdio_al_client_handle {
+ int id;
+ struct sdio_al_client_data *client_data;
+ unsigned int block_size;
+ struct sdio_func *func;
+ void *client_priv;
+};
+
+/**
+ * struct sdio_al_xfer_result - Completed buffer information
+ *
+ * @buf_addr: Address of data buffer
+ *
+ * @xfer_len: Transfer data length in bytes
+ *
+ * @xfer_status: status of transfer, 0 if successful,
+ * negative in case of error
+ */
+struct sdio_al_xfer_result {
+ void *buf_addr;
+ size_t xfer_len;
+ int xfer_status;
+};
+
+enum sdio_al_lpm_event {
+ LPM_ENTER, /* SDIO client will be put to LPM mode soon */
+ LPM_EXIT, /* SDIO client has exited LPM mode */
+};
+
+/**
+ * sdio_al_client_data - client data of sdio_al
+ *
+ * @name: client name, could be one of the following:
+ * "SDIO_AL_CLIENT_WLAN",
+ * "SDIO_AL_CLIENT_QMI",
+ * "SDIO_AL_CLIENT_DIAG",
+ * "SDIO_AL_CLIENT_TTY"
+ *
+ * @probe: This probe function is called by SDIO AL driver when it is ready for
+ * SDIO traffic. SDIO AL client must wait for this callback before
+ * initiating any transfer over SDIO transport layer.
+ *
+ * @remove: This remove function is called by SDIO AL driver when it isn't ready
+ * for SDIO traffic. SDIO AL client must stop issuing any transfers
+ * after getting this callback, ongoing transfers would be errored out
+ * by SDIO AL.
+ *
+ * @lpm_notify_cb: callback to notify SDIO AL clients about Low Power modes.
+ *
+ */
+struct sdio_al_client_data {
+ const char *name;
+
+ int id;
+
+ int mode;
+
+ int (*probe)(struct sdio_al_client_handle *);
+
+ int (*remove)(struct sdio_al_client_handle *);
+
+ void (*lpm_notify_cb)(struct sdio_al_client_handle *,
+ enum sdio_al_lpm_event event);
+};
+
+/**
+ * sdio_al_channel_handle - channel handle of sdio_al
+ *
+ * @id: Channel id unique at the AL layer
+ *
+ * @client_data: Client to which this channel belongs
+ *
+ */
+struct sdio_al_channel_handle {
+ unsigned int channel_id;
+
+ struct sdio_al_channel_data *channel_data;
+ void *priv;
+};
+
+/**
+ * sdio_al_channel_data - channel data of sdio_al
+ *
+ * @name: channel name, could be one of the following:
+ * "SDIO_AL_WLAN_CH0",
+ * "SDIO_AL_WLAN_CH1",
+ * "SDIO_AL_QMI_CH0",
+ * "SDIO_AL_DIAG_CH0",
+ * "SDIO_AL_TTY_CH0"
+ *
+ * @client_data: The client driver by which this channel is being claimed
+ *
+ * @ul_xfer_cb: UL/TX data transfer callback.
+ * SDIO AL client can queue request using sdio_al_queue_transfer()
+ * asynchronous API, once request is transported over SDIO
+ * transport, SDIO AL calls "ul_xfer_cb" to notify the transfer
+ complete.
+ *
+ * @dl_xfer_cb: DL/RX data transfer callback
+ * Once SDIO AL receives requested data from remote SDIO client
+ * then SDIO AL invokes "dl_xfer_cb" callback to notify the SDIO
+ * AL client.
+ *
+ * @dl_data_avail_cb: callback to notify SDIO AL client that it can read
+ * specified bytes of data from remote SDIO client, SDIO AL client
+ * is then expected call sdio_al_queue_transfer() to read the data.
+ * This is optional and if client doesn't provide this callback
+ * then SDIO AL would allocate the buffer and SDIO AL
+ * client would have to memcpy the buffer in dl_xfer_cb().
+ *
+ */
+struct sdio_al_channel_data {
+ const char *name;
+
+ struct sdio_al_client_data *client_data;
+
+ void (*ul_xfer_cb)(struct sdio_al_channel_handle *,
+ struct sdio_al_xfer_result *, void *ctxt);
+
+ void (*dl_xfer_cb)(struct sdio_al_channel_handle *,
+ struct sdio_al_xfer_result *, void *ctxt);
+
+ void (*dl_data_avail_cb)(struct sdio_al_channel_handle *,
+ unsigned int len);
+
+ void (*dl_meta_data_cb)(struct sdio_al_channel_handle *,
+ unsigned int data);
+};
+
+/**
+ * sdio_al_is_ready - API Check to know whether the al driver is ready
+ * This API can be used to deffer the probe incase of early execution.
+ *
+ * @return zero on success and negative value on error.
+ *
+ */
+int sdio_al_is_ready(void);
+
+/**
+ * sdio_al_register_client - register as client of sdio AL (function-1 driver)
+ * SDIO AL driver would allocate the unique instance of
+ * "struct sdio_al_client_handle" and returns to client.
+ *
+ * @client_data: pointer to SDIO AL client data (struct sdio_al_client_data)
+ *
+ * @return valid sdio_al_client_handler ptr on success, negative value on error.
+ *
+ */
+struct sdio_al_client_handle *sdio_al_register_client(
+ struct sdio_al_client_data *client_data);
+
+/**
+ * sdio_al_deregister_client - deregisters client from SDIO AL
+ * (function-1 driver)
+ *
+ * @handle: sdio_al client handler
+ *
+ */
+void sdio_al_deregister_client(struct sdio_al_client_handle *handle);
+
+/**
+ * sdio_al_register_channel - register a channel for a client of SDIO AL
+ * SDIO AL driver would allocate a unique instance of the "struct
+ * sdio_al_channel_handle" and returns to the client.
+ *
+ * @client_handle: The client to which the channel shall belong
+ *
+ * @channel_data: The channel data which contains the details of the channel
+ *
+ * @return valid channel handle in success error on success, error pointer on
+ * failure
+ */
+struct sdio_al_channel_handle *sdio_al_register_channel(
+ struct sdio_al_client_handle *client_handle,
+ struct sdio_al_channel_data *client_data);
+
+/**
+ * sdio_al_deregister_channel - deregister a channel for a client of SDIO AL
+ *
+ * @ch_handle: The channel handle which needs to deregistered
+ *
+ * @return none
+ */
+void sdio_al_deregister_channel(struct sdio_al_channel_handle *ch_handle);
+
+
+/**
+ * sdio_al_queue_transfer_async - Queue asynchronous data transfer request
+ * All transfers are asynchronous transfers, SDIO AL will call
+ * ul_xfer_cb or dl_xfer_cb callback to nofity completion to SDIO AL client.
+ *
+ * @ch_handle: sdio_al channel handle
+ *
+ * @dir: Data direction (DMA_TO_DEVICE for TX, DMA_FROM_DEVICE for RX)
+ *
+ * @buf: Data buffer
+ *
+ * @len: Size in bytes
+ *
+ * @priority: set any non-zero value for higher priority, 0 for normal priority
+ * All SDIO AL clients except WLAN client is expected to use normal
+ * priority.
+ *
+ * @return 0 on success, non-zero in case of error
+ */
+int sdio_al_queue_transfer_async(struct sdio_al_channel_handle *handle,
+ enum sdio_al_dma_direction dir,
+ void *buf, size_t len, int priority, void *ctxt);
+
+/**
+ * sdio_al_queue_transfer - Queue synchronous data transfer request
+ * In constrast to asynchronous transfer API sdio_al_queue_transfer(), this
+ * API will completely the request synchronously. If there is no outstanding
+ * request at SDIO AL Layer, request will be immediately initiated on SDIO bus.
+ *
+ * @ch_handle: sdio_al channel handle
+ *
+ * @dir: Data direction (DMA_TO_DEVICE for TX, DMA_FROM_DEVICE for RX)
+ *
+ * @buf: Data buffer
+ *
+ * @len: Size in bytes
+ *
+ * @priority: set any non-zero value for higher priority, 0 for normal priority
+ * All SDIO AL clients except WLAN client is expected to use normal
+ * priority.
+ *
+ * @return 0 on success, non-zero in case of error
+ */
+int sdio_al_queue_transfer(struct sdio_al_channel_handle *ch_handle,
+ enum sdio_al_dma_direction dir,
+ void *buf, size_t len, int priority);
+
+
+/**
+ * sdio_al_meta_transfer - Queue synchronous data transfer request
+ * In constrast to asynchronous transfer API sdio_al_queue_transfer(), this
+ * API will completely the request synchronously. If there is no outstanding
+ * request at SDIO AL Layer, request will be immediately initiated on SDIO bus.
+ *
+ * @ch_handle: sdio_al channel handle
+ *
+ * @data: Meta data to be transferred
+ *
+ * @return 0 on success, non-zero in case of error
+ */
+int sdio_al_meta_transfer(struct sdio_al_channel_handle *ch_handle,
+ unsigned int data, unsigned int trans);
+
+extern void qcn_sdio_client_probe_complete(int id);
+int qcn_sdio_card_state(bool enable);
+#endif /* _QCN_SDIO_AL_ */
diff --git a/include/linux/qdsp6v2/apr.h b/include/linux/qdsp6v2/apr.h
index e7e2a53a70d7..d80320e74661 100644
--- a/include/linux/qdsp6v2/apr.h
+++ b/include/linux/qdsp6v2/apr.h
@@ -210,4 +210,6 @@ static inline int apr_end_rx_rt(void *handle)
int apr_start_rx_rt(void *handle);
int apr_end_rx_rt(void *handle);
#endif
+int apr_dummy_init(void);
+void apr_dummy_exit(void);
#endif
diff --git a/include/linux/qdsp6v2/rtac.h b/include/linux/qdsp6v2/rtac.h
index eeea0eb0a837..5bd0923fd72b 100644
--- a/include/linux/qdsp6v2/rtac.h
+++ b/include/linux/qdsp6v2/rtac.h
@@ -22,7 +22,7 @@
#define RTAC_CVS 1
#define RTAC_VOICE_MODES 2
-#define RTAC_MAX_ACTIVE_DEVICES 4
+#define RTAC_MAX_ACTIVE_DEVICES 6
#define RTAC_MAX_ACTIVE_POPP 8
#define DEFAULT_APP_TYPE 0x00011130
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index addd03641e1a..0a93e9d1708e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -852,7 +852,7 @@ static inline void rcu_preempt_sleep_check(void)
* read-side critical sections may be preempted and they may also block, but
* only when acquiring spinlocks that are subject to priority inheritance.
*/
-static inline void rcu_read_lock(void)
+static __always_inline void rcu_read_lock(void)
{
__rcu_read_lock();
__acquire(RCU);
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 2378cbf2612d..a05e1e82ecf3 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2149,7 +2149,7 @@ extern int arch_task_struct_size __read_mostly;
extern void task_numa_fault(int last_node, int node, int pages, int flags);
extern pid_t task_numa_group_id(struct task_struct *p);
extern void set_numabalancing_state(bool enabled);
-extern void task_numa_free(struct task_struct *p);
+extern void task_numa_free(struct task_struct *p, bool final);
extern bool should_numa_migrate_memory(struct task_struct *p, struct page *page,
int src_nid, int dst_cpu);
#else
@@ -2164,7 +2164,7 @@ static inline pid_t task_numa_group_id(struct task_struct *p)
static inline void set_numabalancing_state(bool enabled)
{
}
-static inline void task_numa_free(struct task_struct *p)
+static inline void task_numa_free(struct task_struct *p, bool final)
{
}
static inline bool should_numa_migrate_memory(struct task_struct *p,