OSDN Git Service

Merge android-4.4-p.200 (903fbe7) into msm-4.4
authorSrinivasarao P <spathi@codeaurora.org>
Mon, 11 Nov 2019 08:06:21 +0000 (13:36 +0530)
committerSrinivasarao P <spathi@codeaurora.org>
Wed, 13 Nov 2019 05:11:54 +0000 (10:41 +0530)
* refs/heads/tmp-903fbe7
  Linux 4.4.200
  alarmtimer: Change remaining ENOTSUPP to EOPNOTSUPP
  ARM: fix the cockup in the previous patch
  ARM: ensure that processor vtables is not lost after boot
  ARM: spectre-v2: per-CPU vtables to work around big.Little systems
  ARM: add PROC_VTABLE and PROC_TABLE macros
  ARM: clean up per-processor check_bugs method call
  ARM: split out processor lookup
  ARM: make lookup_processor_type() non-__init
  ARM: 8810/1: vfp: Fix wrong assignement to ufp_exc
  ARM: 8796/1: spectre-v1,v1.1: provide helpers for address sanitization
  ARM: 8795/1: spectre-v1.1: use put_user() for __put_user()
  ARM: 8794/1: uaccess: Prevent speculative use of the current addr_limit
  ARM: 8793/1: signal: replace __put_user_error with __put_user
  ARM: 8792/1: oabi-compat: copy oabi events using __copy_to_user()
  ARM: 8791/1: vfp: use __copy_to_user() when saving VFP state
  ARM: 8789/1: signal: copy registers using __copy_to_user()
  ARM: spectre-v1: mitigate user accesses
  ARM: spectre-v1: use get_user() for __get_user()
  ARM: use __inttype() in get_user()
  ARM: oabi-compat: copy semops using __copy_from_user()
  ARM: vfp: use __copy_from_user() when restoring VFP state
  ARM: signal: copy registers using __copy_from_user()
  ARM: spectre-v1: fix syscall entry
  ARM: spectre-v1: add array_index_mask_nospec() implementation
  ARM: spectre-v1: add speculation barrier (csdb) macros
  ARM: spectre-v2: warn about incorrect context switching functions
  ARM: spectre-v2: add firmware based hardening
  ARM: spectre-v2: harden user aborts in kernel space
  ARM: spectre-v2: add Cortex A8 and A15 validation of the IBE bit
  ARM: spectre-v2: harden branch predictor on context switches
  ARM: spectre: add Kconfig symbol for CPUs vulnerable to Spectre
  ARM: bugs: add support for per-processor bug checking
  ARM: bugs: hook processor bug checking into SMP and suspend paths
  ARM: bugs: prepare processor bug infrastructure
  ARM: add more CPU part numbers for Cortex and Brahma B15 CPUs
  arm/arm64: smccc-1.1: Handle function result as parameters
  arm/arm64: smccc-1.1: Make return values unsigned long
  arm/arm64: smccc: Add SMCCC-specific return codes
  arm/arm64: smccc: Implement SMCCC v1.1 inline primitive
  arm/arm64: smccc: Make function identifiers an unsigned quantity
  firmware/psci: Expose SMCCC version through psci_ops
  firmware/psci: Expose PSCI conduit
  arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support
  arm/arm64: KVM: Advertise SMCCC v1.1
  ARM: Move system register accessors to asm/cp15.h
  ARM: uaccess: remove put_user() code duplication
  ARM: 8481/2: drivers: psci: replace psci firmware calls
  ARM: 8480/2: arm64: add implementation for arm-smccc
  ARM: 8479/2: add implementation for arm-smccc
  ARM: 8478/2: arm/arm64: add arm-smccc
  ARM: 8051/1: put_user: fix possible data corruption in put_user
  dmaengine: qcom: bam_dma: Fix resource leak
  net/flow_dissector: switch to siphash
  inet: stop leaking jiffies on the wire
  net/mlx4_core: Dynamically set guaranteed amount of counters per VF
  vxlan: check tun_info options_len properly
  net: add READ_ONCE() annotation in __skb_wait_for_more_packets()
  net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()
  net: hisilicon: Fix ping latency when deal with high throughput
  net: fix sk_page_frag() recursion from memory reclaim
  dccp: do not leak jiffies on the wire
  cifs: Fix cifsInodeInfo lock_sem deadlock when reconnect occurs
  MIPS: bmips: mark exception vectors as char arrays
  of: unittest: fix memory leak in unittest_data_add
  scsi: target: core: Do not overwrite CDB byte 1
  perf kmem: Fix memory leak in compact_gfp_flags()
  scsi: fix kconfig dependency warning related to 53C700_LE_ON_BE
  scsi: sni_53c710: fix compilation error
  ARM: mm: fix alignment handler faults under memory pressure
  ARM: dts: logicpd-torpedo-som: Remove twl_keypad
  ASoc: rockchip: i2s: Fix RPM imbalance
  regulator: pfuze100-regulator: Variable "val" in pfuze100_regulator_probe() could be uninitialized
  regulator: ti-abb: Fix timeout in ti_abb_wait_txdone/ti_abb_clear_all_txdone
  kbuild: add -fcf-protection=none when using retpoline flags
  UPSTREAM: HID: steam: fix deadlock with input devices.
  UPSTREAM: HID: steam: fix boot loop with bluetooth firmware
  UPSTREAM: HID: steam: remove input device when a hid client is running.
  UPSTREAM: HID: steam: use hid_device.driver_data instead of hid_set_drvdata()
  UPSTREAM: HID: steam: add missing fields in client initialization
  UPSTREAM: HID: steam: add battery device.
  UPSTREAM: HID: add driver for Valve Steam Controller
  UPSTREAM: HID: sony: Fix memory corruption issue on cleanup.
  UPSTREAM: HID: sony: Fix race condition between rumble and device remove.
  UPSTREAM: HID: sony: remove redundant check for -ve err
  UPSTREAM: HID: sony: Make sure to unregister sensors on failure
  UPSTREAM: HID: sony: Make DS4 bt poll interval adjustable
  UPSTREAM: HID: sony: Set proper bit flags on DS4 output report
  UPSTREAM: HID: sony: DS4 use brighter LED colors
  UPSTREAM: HID: sony: Improve navigation controller axis/button mapping
  UPSTREAM: HID: sony: Use DS3 MAC address as unique identifier on USB
  UPSTREAM: HID: sony: Perform duplicate device check earlier on
  UPSTREAM: HID: sony: Expose DS3 motion sensors through separate device
  UPSTREAM: HID: sony: Print error on failure to active DS3 / Navigation controllers
  UPSTREAM: HID: sony: DS3 comply to Linux gamepad spec
  UPSTREAM: HID: sony: Mark DS4 touchpad device as a pointer
  UPSTREAM: HID: sony: Support motion sensor calibration on dongle
  UPSTREAM: HID: sony: Make work handling more generic
  UPSTREAM: HID: sony: Treat the ds4 dongle as a separate device
  UPSTREAM: HID: sony: Remove report descriptor fixup for DS4
  UPSTREAM: HID: sony: Report hardware timestamp for DS4 sensor values
  UPSTREAM: HID: sony: Calibrate DS4 motion sensors
  UPSTREAM: HID: sony: Report DS4 motion sensors through a separate device
  UPSTREAM: HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT
  UPSTREAM: HID: sony: Use LED_CORE_SUSPENDRESUME
  UPSTREAM: HID: sony: Ignore DS4 dongle reports when no device is connected
  UPSTREAM: HID: sony: Use DS4 MAC address as unique identifier on USB
  UPSTREAM: HID: sony: Fix error handling bug when touchpad registration fails
  UPSTREAM: HID: sony: Comply to Linux gamepad spec for DS4
  UPSTREAM: HID: sony: Make the DS4 touchpad a separate device
  UPSTREAM: HID: sony: Fix memory issue when connecting device using both Bluetooth and USB
  UPSTREAM: HID: sony: Adjust value range for motion sensors
  UPSTREAM: HID: sony: Handle multiple touch events input record
  UPSTREAM: HID: sony: Send ds4 output reports on output end-point
  UPSTREAM: HID: sony: Perform CRC check on bluetooth input packets
  UPSTREAM: HID: sony: Adjust HID report size name definitions
  UPSTREAM: HID: sony: Fix race condition in sony_probe
  UPSTREAM: HID: sony: Update copyright and add Dualshock 4 rate control note
  UPSTREAM: HID: sony: Defer the initial USB Sixaxis output report
  UPSTREAM: HID: sony: Relax duplicate checking for USB-only devices
  UPSTREAM: HID: sony: underscores are unnecessary for u8, u16, s32
  UPSTREAM: HID: sony: fix some warnings from scripts/checkpatch.pl
  UPSTREAM: HID: sony: fix errors from scripts/checkpatch.pl
  UPSTREAM: HID: sony: fix a typo in descriptors comments s/Joystik/Joystick/
  UPSTREAM: HID: sony: Fixup output reports for the nyko core controller
  UPSTREAM: HID: sony: Remove the size check for the Dualshock 4 HID Descriptor
  UPSTREAM: HID: sony: Save and restore the controller state on suspend and resume
  UPSTREAM: HID: sony: Refactor the output report sending functions

After resolving conflicts there is no effective change from this patch
  fs/dcache: move security_d_instantiate() behind attaching dentry to inode

Conflicts:
fs/dcache.c
include/linux/arm-smccc.h
include/linux/psci.h

Change-Id: I092fea3b6c69f56639fdb9e511e011cbb326e2c7
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
20 files changed:
1  2 
Makefile
arch/arm/include/asm/system_misc.h
arch/arm/include/asm/thread_info.h
arch/arm/kernel/entry-common.S
arch/arm/kernel/setup.c
arch/arm/kernel/signal.c
arch/arm/kernel/smp.c
arch/arm/mm/proc-macros.S
drivers/firmware/psci.c
drivers/hid/hid-core.c
fs/cifs/file.c
include/linux/arm-smccc.h
include/linux/gfp.h
include/linux/hid.h
include/linux/psci.h
include/net/sock.h
include/uapi/linux/input.h
kernel/time/alarmtimer.c
net/core/flow_dissector.c
net/ipv4/tcp_ipv4.c

diff --cc Makefile
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -111,17 -111,13 +111,22 @@@ unsigned int elf_hwcap2 __read_mostly
  EXPORT_SYMBOL(elf_hwcap2);
  
  
 +char* (*arch_read_hardware_id)(void);
 +EXPORT_SYMBOL(arch_read_hardware_id);
 +
 +unsigned int boot_reason;
 +EXPORT_SYMBOL(boot_reason);
 +
 +unsigned int cold_boot;
 +EXPORT_SYMBOL(cold_boot);
 +
  #ifdef MULTI_CPU
  struct processor processor __read_mostly;
+ #if defined(CONFIG_BIG_LITTLE) && defined(CONFIG_HARDEN_BRANCH_PREDICTOR)
+ struct processor *cpu_vtable[NR_CPUS] = {
+       [0] = &processor,
+ };
+ #endif
  #endif
  #ifdef MULTI_TLB
  struct cpu_tlb_fns cpu_tlb __read_mostly;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/cifs/file.c
Simple merge
@@@ -101,25 -125,161 +125,182 @@@ asmlinkage void arm_smccc_hvc(unsigned 
                        unsigned long a5, unsigned long a6, unsigned long a7,
                        struct arm_smccc_res *res);
  
 +
 +static inline unsigned long __invoke_psci_fn_hvc(unsigned long function_id,
 +                      unsigned long arg0, unsigned long arg1,
 +                      unsigned long arg2)
 +{
 +      struct arm_smccc_res res;
 +
 +      arm_smccc_hvc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
 +      return res.a0;
 +}
 +
 +static inline unsigned long __invoke_psci_fn_smc(unsigned long function_id,
 +                      unsigned long arg0, unsigned long arg1,
 +                      unsigned long arg2)
 +{
 +      struct arm_smccc_res res;
 +
 +      arm_smccc_smc(function_id, arg0, arg1, arg2, 0, 0, 0, 0, &res);
 +      return res.a0;
 +}
 +
+ /* SMCCC v1.1 implementation madness follows */
+ #ifdef CONFIG_ARM64
+ #define SMCCC_SMC_INST        "smc    #0"
+ #define SMCCC_HVC_INST        "hvc    #0"
+ #elif defined(CONFIG_ARM)
+ #include <asm/opcodes-sec.h>
+ #include <asm/opcodes-virt.h>
+ #define SMCCC_SMC_INST        __SMC(0)
+ #define SMCCC_HVC_INST        __HVC(0)
+ #endif
+ #define ___count_args(_0, _1, _2, _3, _4, _5, _6, _7, _8, x, ...) x
+ #define __count_args(...)                                             \
+       ___count_args(__VA_ARGS__, 7, 6, 5, 4, 3, 2, 1, 0)
+ #define __constraint_write_0                                          \
+       "+r" (r0), "=&r" (r1), "=&r" (r2), "=&r" (r3)
+ #define __constraint_write_1                                          \
+       "+r" (r0), "+r" (r1), "=&r" (r2), "=&r" (r3)
+ #define __constraint_write_2                                          \
+       "+r" (r0), "+r" (r1), "+r" (r2), "=&r" (r3)
+ #define __constraint_write_3                                          \
+       "+r" (r0), "+r" (r1), "+r" (r2), "+r" (r3)
+ #define __constraint_write_4  __constraint_write_3
+ #define __constraint_write_5  __constraint_write_4
+ #define __constraint_write_6  __constraint_write_5
+ #define __constraint_write_7  __constraint_write_6
+ #define __constraint_read_0
+ #define __constraint_read_1
+ #define __constraint_read_2
+ #define __constraint_read_3
+ #define __constraint_read_4   "r" (r4)
+ #define __constraint_read_5   __constraint_read_4, "r" (r5)
+ #define __constraint_read_6   __constraint_read_5, "r" (r6)
+ #define __constraint_read_7   __constraint_read_6, "r" (r7)
+ #define __declare_arg_0(a0, res)                                      \
+       struct arm_smccc_res   *___res = res;                           \
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
+       register unsigned long r1 asm("r1");                            \
+       register unsigned long r2 asm("r2");                            \
+       register unsigned long r3 asm("r3")
+ #define __declare_arg_1(a0, a1, res)                                  \
+       typeof(a1) __a1 = a1;                                           \
+       struct arm_smccc_res   *___res = res;                           \
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
+       register unsigned long r1 asm("r1") = __a1;                     \
+       register unsigned long r2 asm("r2");                            \
+       register unsigned long r3 asm("r3")
+ #define __declare_arg_2(a0, a1, a2, res)                              \
+       typeof(a1) __a1 = a1;                                           \
+       typeof(a2) __a2 = a2;                                           \
+       struct arm_smccc_res   *___res = res;                           \
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
+       register unsigned long r1 asm("r1") = __a1;                     \
+       register unsigned long r2 asm("r2") = __a2;                     \
+       register unsigned long r3 asm("r3")
+ #define __declare_arg_3(a0, a1, a2, a3, res)                          \
+       typeof(a1) __a1 = a1;                                           \
+       typeof(a2) __a2 = a2;                                           \
+       typeof(a3) __a3 = a3;                                           \
+       struct arm_smccc_res   *___res = res;                           \
+       register unsigned long r0 asm("r0") = (u32)a0;                  \
+       register unsigned long r1 asm("r1") = __a1;                     \
+       register unsigned long r2 asm("r2") = __a2;                     \
+       register unsigned long r3 asm("r3") = __a3
+ #define __declare_arg_4(a0, a1, a2, a3, a4, res)                      \
+       typeof(a4) __a4 = a4;                                           \
+       __declare_arg_3(a0, a1, a2, a3, res);                           \
+       register unsigned long r4 asm("r4") = __a4
+ #define __declare_arg_5(a0, a1, a2, a3, a4, a5, res)                  \
+       typeof(a5) __a5 = a5;                                           \
+       __declare_arg_4(a0, a1, a2, a3, a4, res);                       \
+       register unsigned long r5 asm("r5") = __a5
+ #define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res)              \
+       typeof(a6) __a6 = a6;                                           \
+       __declare_arg_5(a0, a1, a2, a3, a4, a5, res);                   \
+       register unsigned long r6 asm("r6") = __a6
+ #define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res)          \
+       typeof(a7) __a7 = a7;                                           \
+       __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res);               \
+       register unsigned long r7 asm("r7") = __a7
+ #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__)
+ #define __declare_args(count, ...)  ___declare_args(count, __VA_ARGS__)
+ #define ___constraints(count)                                         \
+       : __constraint_write_ ## count                                  \
+       : __constraint_read_ ## count                                   \
+       : "memory"
+ #define __constraints(count)  ___constraints(count)
+ /*
+  * We have an output list that is not necessarily used, and GCC feels
+  * entitled to optimise the whole sequence away. "volatile" is what
+  * makes it stick.
+  */
+ #define __arm_smccc_1_1(inst, ...)                                    \
+       do {                                                            \
+               __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \
+               asm volatile(inst "\n"                                  \
+                            __constraints(__count_args(__VA_ARGS__))); \
+               if (___res)                                             \
+                       *___res = (typeof(*___res)){r0, r1, r2, r3};    \
+       } while (0)
+ /*
+  * arm_smccc_1_1_smc() - make an SMCCC v1.1 compliant SMC call
+  *
+  * This is a variadic macro taking one to eight source arguments, and
+  * an optional return structure.
+  *
+  * @a0-a7: arguments passed in registers 0 to 7
+  * @res: result values from registers 0 to 3
+  *
+  * This macro is used to make SMC calls following SMC Calling Convention v1.1.
+  * The content of the supplied param are copied to registers 0 to 7 prior
+  * to the SMC instruction. The return values are updated with the content
+  * from register 0 to 3 on return from the SMC instruction if not NULL.
+  */
+ #define arm_smccc_1_1_smc(...)        __arm_smccc_1_1(SMCCC_SMC_INST, __VA_ARGS__)
+ /*
+  * arm_smccc_1_1_hvc() - make an SMCCC v1.1 compliant HVC call
+  *
+  * This is a variadic macro taking one to eight source arguments, and
+  * an optional return structure.
+  *
+  * @a0-a7: arguments passed in registers 0 to 7
+  * @res: result values from registers 0 to 3
+  *
+  * This macro is used to make HVC calls following SMC Calling Convention v1.1.
+  * The content of the supplied param are copied to registers 0 to 7 prior
+  * to the HVC instruction. The return values are updated with the content
+  * from register 0 to 3 on return from the HVC instruction if not NULL.
+  */
+ #define arm_smccc_1_1_hvc(...)        __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__)
+ /* Return codes defined in ARM DEN 0070A */
+ #define SMCCC_RET_SUCCESS                     0
+ #define SMCCC_RET_NOT_SUPPORTED                       -1
+ #define SMCCC_RET_NOT_REQUIRED                        -2
+ #endif /*__ASSEMBLY__*/
  #endif /*__LINUX_ARM_SMCCC_H*/
Simple merge
@@@ -343,14 -343,9 +343,15 @@@ struct hid_item 
  #define HID_GROUP_RMI                         0x0100
  #define HID_GROUP_WACOM                               0x0101
  #define HID_GROUP_LOGITECH_DJ_DEVICE          0x0102
+ #define HID_GROUP_STEAM                               0x0103
  
  /*
 + * HID protocol status
 + */
 +#define HID_REPORT_PROTOCOL   1
 +#define HID_BOOT_PROTOCOL     0
 +
 +/*
   * This is the global environment of the parser. This information is
   * persistent for main-items. The global environment can be saved and
   * restored with PUSH/POP statements.
@@@ -24,11 -24,18 +24,22 @@@ bool psci_tos_resident_on(int cpu)
  bool psci_power_state_loses_context(u32 state);
  bool psci_power_state_is_valid(u32 state);
  
 +int psci_cpu_init_idle(unsigned int cpu);
 +int psci_cpu_suspend_enter(unsigned long index);
 +
+ enum psci_conduit {
+       PSCI_CONDUIT_NONE,
+       PSCI_CONDUIT_SMC,
+       PSCI_CONDUIT_HVC,
+ };
+ enum smccc_version {
+       SMCCC_VERSION_1_0,
+       SMCCC_VERSION_1_1,
+ };
  struct psci_operations {
 +      u32 (*get_version)(void);
        int (*cpu_suspend)(u32 state, unsigned long entry_point);
        int (*cpu_off)(u32 state);
        int (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge