Merge 739a986440
on remote branch
Change-Id: Idd84f971e07f65aa635d7d499dde696b84b217b6
This commit is contained in:
commit
feb565e67f
325 changed files with 9070 additions and 4987 deletions
|
@ -1,138 +0,0 @@
|
|||
Copyright (C) 1999, 2000 Bruce Tenison
|
||||
Portions Copyright (C) 1999, 2000 David Nelson
|
||||
Thanks to David Nelson for guidance and the usage of the scanner.txt
|
||||
and scanner.c files to model our driver and this informative file.
|
||||
|
||||
Mar. 2, 2000
|
||||
|
||||
CHANGES
|
||||
|
||||
- Initial Revision
|
||||
|
||||
|
||||
OVERVIEW
|
||||
|
||||
This README will address issues regarding how to configure the kernel
|
||||
to access a RIO 500 mp3 player.
|
||||
Before I explain how to use this to access the Rio500 please be warned:
|
||||
|
||||
W A R N I N G:
|
||||
--------------
|
||||
|
||||
Please note that this software is still under development. The authors
|
||||
are in no way responsible for any damage that may occur, no matter how
|
||||
inconsequential.
|
||||
|
||||
It seems that the Rio has a problem when sending .mp3 with low batteries.
|
||||
I suggest when the batteries are low and you want to transfer stuff that you
|
||||
replace it with a fresh one. In my case, what happened is I lost two 16kb
|
||||
blocks (they are no longer usable to store information to it). But I don't
|
||||
know if that's normal or not; it could simply be a problem with the flash
|
||||
memory.
|
||||
|
||||
In an extreme case, I left my Rio playing overnight and the batteries wore
|
||||
down to nothing and appear to have corrupted the flash memory. My RIO
|
||||
needed to be replaced as a result. Diamond tech support is aware of the
|
||||
problem. Do NOT allow your batteries to wear down to nothing before
|
||||
changing them. It appears RIO 500 firmware does not handle low battery
|
||||
power well at all.
|
||||
|
||||
On systems with OHCI controllers, the kernel OHCI code appears to have
|
||||
power on problems with some chipsets. If you are having problems
|
||||
connecting to your RIO 500, try turning it on first and then plugging it
|
||||
into the USB cable.
|
||||
|
||||
Contact information:
|
||||
--------------------
|
||||
|
||||
The main page for the project is hosted at sourceforge.net in the following
|
||||
URL: <http://rio500.sourceforge.net>. You can also go to the project's
|
||||
sourceforge home page at: <http://sourceforge.net/projects/rio500/>.
|
||||
There is also a mailing list: rio500-users@lists.sourceforge.net
|
||||
|
||||
Authors:
|
||||
-------
|
||||
|
||||
Most of the code was written by Cesar Miquel <miquel@df.uba.ar>. Keith
|
||||
Clayton <kclayton@jps.net> is incharge of the PPC port and making sure
|
||||
things work there. Bruce Tenison <btenison@dibbs.net> is adding support
|
||||
for .fon files and also does testing. The program will mostly sure be
|
||||
re-written and Pete Ikusz along with the rest will re-design it. I would
|
||||
also like to thank Tri Nguyen <tmn_3022000@hotmail.com> who provided use
|
||||
with some important information regarding the communication with the Rio.
|
||||
|
||||
ADDITIONAL INFORMATION and Userspace tools
|
||||
|
||||
http://rio500.sourceforge.net/
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
A host with a USB port. Ideally, either a UHCI (Intel) or OHCI
|
||||
(Compaq and others) hardware port should work.
|
||||
|
||||
A Linux development kernel (2.3.x) with USB support enabled or a
|
||||
backported version to linux-2.2.x. See http://www.linux-usb.org for
|
||||
more information on accomplishing this.
|
||||
|
||||
A Linux kernel with RIO 500 support enabled.
|
||||
|
||||
'lspci' which is only needed to determine the type of USB hardware
|
||||
available in your machine.
|
||||
|
||||
CONFIGURATION
|
||||
|
||||
Using `lspci -v`, determine the type of USB hardware available.
|
||||
|
||||
If you see something like:
|
||||
|
||||
USB Controller: ......
|
||||
Flags: .....
|
||||
I/O ports at ....
|
||||
|
||||
Then you have a UHCI based controller.
|
||||
|
||||
If you see something like:
|
||||
|
||||
USB Controller: .....
|
||||
Flags: ....
|
||||
Memory at .....
|
||||
|
||||
Then you have a OHCI based controller.
|
||||
|
||||
Using `make menuconfig` or your preferred method for configuring the
|
||||
kernel, select 'Support for USB', 'OHCI/UHCI' depending on your
|
||||
hardware (determined from the steps above), 'USB Diamond Rio500 support', and
|
||||
'Preliminary USB device filesystem'. Compile and install the modules
|
||||
(you may need to execute `depmod -a` to update the module
|
||||
dependencies).
|
||||
|
||||
Add a device for the USB rio500:
|
||||
`mknod /dev/usb/rio500 c 180 64`
|
||||
|
||||
Set appropriate permissions for /dev/usb/rio500 (don't forget about
|
||||
group and world permissions). Both read and write permissions are
|
||||
required for proper operation.
|
||||
|
||||
Load the appropriate modules (if compiled as modules):
|
||||
|
||||
OHCI:
|
||||
modprobe usbcore
|
||||
modprobe usb-ohci
|
||||
modprobe rio500
|
||||
|
||||
UHCI:
|
||||
modprobe usbcore
|
||||
modprobe usb-uhci (or uhci)
|
||||
modprobe rio500
|
||||
|
||||
That's it. The Rio500 Utils at: http://rio500.sourceforge.net should
|
||||
be able to access the rio500.
|
||||
|
||||
BUGS
|
||||
|
||||
If you encounter any problems feel free to drop me an email.
|
||||
|
||||
Bruce Tenison
|
||||
btenison@dibbs.net
|
||||
|
|
@ -11186,13 +11186,6 @@ W: http://www.linux-usb.org/usbnet
|
|||
S: Maintained
|
||||
F: drivers/net/usb/dm9601.c
|
||||
|
||||
USB DIAMOND RIO500 DRIVER
|
||||
M: Cesar Miquel <miquel@df.uba.ar>
|
||||
L: rio500-users@lists.sourceforge.net
|
||||
W: http://rio500.sourceforge.net
|
||||
S: Maintained
|
||||
F: drivers/usb/misc/rio500*
|
||||
|
||||
USB EHCI DRIVER
|
||||
M: Alan Stern <stern@rowland.harvard.edu>
|
||||
L: linux-usb@vger.kernel.org
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 194
|
||||
SUBLEVEL = 198
|
||||
EXTRAVERSION =
|
||||
NAME = Blurry Fish Butt
|
||||
|
||||
|
|
|
@ -1002,6 +1002,8 @@
|
|||
ti,hwmods = "dss_dispc";
|
||||
clocks = <&disp_clk>;
|
||||
clock-names = "fck";
|
||||
|
||||
max-memory-bandwidth = <230000000>;
|
||||
};
|
||||
|
||||
rfbi: rfbi@4832a800 {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2015-2016, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2015-2016, 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
|
||||
|
@ -251,16 +251,3 @@
|
|||
"gcc_mmss_bimc_gfx_clk", "gcc_bimc_gfx_clk";
|
||||
#clock-cells = <1>;
|
||||
};
|
||||
|
||||
&soc {
|
||||
iommu_test_device {
|
||||
compatible = "iommu-debug-test";
|
||||
/*
|
||||
* 42 shouldn't be used by anyone on the cpp_fd_smmu. We just
|
||||
* need _something_ here to get this node recognized by the
|
||||
* SMMU driver. Our test uses ATOS, which doesn't use SIDs
|
||||
* anyways, so using a dummy value is ok.
|
||||
*/
|
||||
iommus = <&cpp_fd_smmu 42>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -97,7 +97,6 @@ CONFIG_USB_SERIAL_PL2303=m
|
|||
CONFIG_USB_SERIAL_CYBERJACK=m
|
||||
CONFIG_USB_SERIAL_XIRCOM=m
|
||||
CONFIG_USB_SERIAL_OMNINET=m
|
||||
CONFIG_USB_RIO500=m
|
||||
CONFIG_EXT2_FS=m
|
||||
CONFIG_EXT3_FS=m
|
||||
CONFIG_MSDOS_FS=y
|
||||
|
|
|
@ -207,7 +207,6 @@ CONFIG_USB_SERIAL_XIRCOM=m
|
|||
CONFIG_USB_SERIAL_OMNINET=m
|
||||
CONFIG_USB_EMI62=m
|
||||
CONFIG_USB_EMI26=m
|
||||
CONFIG_USB_RIO500=m
|
||||
CONFIG_USB_LEGOTOWER=m
|
||||
CONFIG_USB_LCD=m
|
||||
CONFIG_USB_LED=m
|
||||
|
|
|
@ -354,7 +354,6 @@ CONFIG_USB_EMI62=m
|
|||
CONFIG_USB_EMI26=m
|
||||
CONFIG_USB_ADUTUX=m
|
||||
CONFIG_USB_SEVSEG=m
|
||||
CONFIG_USB_RIO500=m
|
||||
CONFIG_USB_LEGOTOWER=m
|
||||
CONFIG_USB_LCD=m
|
||||
CONFIG_USB_LED=m
|
||||
|
|
|
@ -202,7 +202,6 @@ CONFIG_USB_SERIAL_XIRCOM=m
|
|||
CONFIG_USB_SERIAL_OMNINET=m
|
||||
CONFIG_USB_EMI62=m
|
||||
CONFIG_USB_EMI26=m
|
||||
CONFIG_USB_RIO500=m
|
||||
CONFIG_USB_LEGOTOWER=m
|
||||
CONFIG_USB_LCD=m
|
||||
CONFIG_USB_LED=m
|
||||
|
|
|
@ -1020,7 +1020,8 @@ static struct omap_hwmod_class_sysconfig am33xx_timer_sysc = {
|
|||
.rev_offs = 0x0000,
|
||||
.sysc_offs = 0x0010,
|
||||
.syss_offs = 0x0014,
|
||||
.sysc_flags = (SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET),
|
||||
.sysc_flags = SYSC_HAS_SIDLEMODE | SYSC_HAS_SOFTRESET |
|
||||
SYSC_HAS_RESET_STATUS,
|
||||
.idlemodes = (SIDLE_FORCE | SIDLE_NO | SIDLE_SMART |
|
||||
SIDLE_SMART_WKUP),
|
||||
.sysc_fields = &omap_hwmod_sysc_type2,
|
||||
|
|
|
@ -65,7 +65,7 @@ int zynq_cpun_start(u32 address, int cpu)
|
|||
* 0x4: Jump by mov instruction
|
||||
* 0x8: Jumping address
|
||||
*/
|
||||
memcpy((__force void *)zero, &zynq_secondary_trampoline,
|
||||
memcpy_toio(zero, &zynq_secondary_trampoline,
|
||||
trampoline_size);
|
||||
writel(address, zero + trampoline_size);
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ static inline bool access_error(unsigned int fsr, struct vm_area_struct *vma)
|
|||
{
|
||||
unsigned int mask = VM_READ | VM_WRITE | VM_EXEC;
|
||||
|
||||
if (fsr & FSR_WRITE)
|
||||
if ((fsr & FSR_WRITE) && !(fsr & FSR_CM))
|
||||
mask = VM_WRITE;
|
||||
if (fsr & FSR_LNX_PF)
|
||||
mask = VM_EXEC;
|
||||
|
@ -281,7 +281,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
|||
|
||||
if (user_mode(regs))
|
||||
flags |= FAULT_FLAG_USER;
|
||||
if (fsr & FSR_WRITE)
|
||||
if ((fsr & FSR_WRITE) && !(fsr & FSR_CM))
|
||||
flags |= FAULT_FLAG_WRITE;
|
||||
|
||||
/*
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
* Fault status register encodings. We steal bit 31 for our own purposes.
|
||||
*/
|
||||
#define FSR_LNX_PF (1 << 31)
|
||||
#define FSR_CM (1 << 13)
|
||||
#define FSR_WRITE (1 << 11)
|
||||
#define FSR_FS4 (1 << 10)
|
||||
#define FSR_FS3_0 (15)
|
||||
|
|
|
@ -78,7 +78,6 @@ CONFIG_INET=y
|
|||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_MULTIPLE_TABLES=y
|
||||
CONFIG_NET_IPGRE_DEMUX=y
|
||||
CONFIG_NET_IPVTI=y
|
||||
CONFIG_INET_ESP=y
|
||||
# CONFIG_INET_XFRM_MODE_BEET is not set
|
||||
|
@ -170,7 +169,6 @@ CONFIG_IP6_NF_FILTER=y
|
|||
CONFIG_IP6_NF_TARGET_REJECT=y
|
||||
CONFIG_IP6_NF_MANGLE=y
|
||||
CONFIG_IP6_NF_RAW=y
|
||||
CONFIG_L2TP=y
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_NET_SCH_HTB=y
|
||||
CONFIG_NET_CLS_U32=y
|
||||
|
@ -216,8 +214,8 @@ CONFIG_PPP=y
|
|||
CONFIG_PPP_BSDCOMP=y
|
||||
CONFIG_PPP_DEFLATE=y
|
||||
CONFIG_PPP_MPPE=y
|
||||
CONFIG_PPTP=y
|
||||
CONFIG_PPPOL2TP=y
|
||||
CONFIG_PPPOLAC=y
|
||||
CONFIG_PPPOPNS=y
|
||||
CONFIG_USB_USBNET=y
|
||||
# CONFIG_USB_NET_AX8817X is not set
|
||||
# CONFIG_USB_NET_AX88179_178A is not set
|
||||
|
@ -414,6 +412,5 @@ CONFIG_HARDENED_USERCOPY=y
|
|||
CONFIG_SECURITY_SELINUX=y
|
||||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_LZ4=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
CONFIG_XZ_DEC=y
|
||||
|
|
|
@ -329,6 +329,7 @@ CONFIG_SENSORS_BMG_FIFO=y
|
|||
# CONFIG_LEGACY_PTYS is not set
|
||||
# CONFIG_DEVMEM is not set
|
||||
# CONFIG_DEVKMEM is not set
|
||||
CONFIG_SERIAL_MSM=y
|
||||
CONFIG_SERIAL_MSM_HS=y
|
||||
CONFIG_SERIAL_MSM_SMD=y
|
||||
CONFIG_DIAG_CHAR=y
|
||||
|
|
|
@ -49,6 +49,8 @@ CONFIG_ARCH_QCOM=y
|
|||
CONFIG_ARCH_MSM8996=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MSM=y
|
||||
CONFIG_ENABLE_FP_SIMD_SETTINGS=y
|
||||
CONFIG_MSM_APP_SETTINGS=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_PREEMPT=y
|
||||
|
|
|
@ -46,6 +46,8 @@ CONFIG_ARCH_QCOM=y
|
|||
CONFIG_ARCH_MSM8996=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_MSM=y
|
||||
CONFIG_ENABLE_FP_SIMD_SETTINGS=y
|
||||
CONFIG_MSM_APP_SETTINGS=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_PREEMPT=y
|
||||
|
|
|
@ -96,9 +96,10 @@ struct arm64_cpu_capabilities {
|
|||
|
||||
struct { /* Feature register checking */
|
||||
u32 sys_reg;
|
||||
int field_pos;
|
||||
int min_field_value;
|
||||
int hwcap_type;
|
||||
u8 field_pos;
|
||||
u8 min_field_value;
|
||||
u8 hwcap_type;
|
||||
bool sign;
|
||||
unsigned long hwcap;
|
||||
};
|
||||
};
|
||||
|
@ -128,15 +129,15 @@ static inline void cpus_set_cap(unsigned int num)
|
|||
}
|
||||
|
||||
static inline int __attribute_const__
|
||||
cpuid_feature_extract_field_width(u64 features, int field, int width)
|
||||
cpuid_feature_extract_signed_field_width(u64 features, int field, int width)
|
||||
{
|
||||
return (s64)(features << (64 - width - field)) >> (64 - width);
|
||||
}
|
||||
|
||||
static inline int __attribute_const__
|
||||
cpuid_feature_extract_field(u64 features, int field)
|
||||
cpuid_feature_extract_signed_field(u64 features, int field)
|
||||
{
|
||||
return cpuid_feature_extract_field_width(features, field, 4);
|
||||
return cpuid_feature_extract_signed_field_width(features, field, 4);
|
||||
}
|
||||
|
||||
static inline unsigned int __attribute_const__
|
||||
|
@ -156,17 +157,23 @@ static inline u64 arm64_ftr_mask(struct arm64_ftr_bits *ftrp)
|
|||
return (u64)GENMASK(ftrp->shift + ftrp->width - 1, ftrp->shift);
|
||||
}
|
||||
|
||||
static inline int __attribute_const__
|
||||
cpuid_feature_extract_field(u64 features, int field, bool sign)
|
||||
{
|
||||
return (sign) ?
|
||||
cpuid_feature_extract_signed_field(features, field) :
|
||||
cpuid_feature_extract_unsigned_field(features, field);
|
||||
}
|
||||
|
||||
static inline s64 arm64_ftr_value(struct arm64_ftr_bits *ftrp, u64 val)
|
||||
{
|
||||
return ftrp->sign ?
|
||||
cpuid_feature_extract_field_width(val, ftrp->shift, ftrp->width) :
|
||||
cpuid_feature_extract_unsigned_field_width(val, ftrp->shift, ftrp->width);
|
||||
return (s64)cpuid_feature_extract_field(val, ftrp->shift, ftrp->sign);
|
||||
}
|
||||
|
||||
static inline bool id_aa64mmfr0_mixed_endian_el0(u64 mmfr0)
|
||||
{
|
||||
return cpuid_feature_extract_field(mmfr0, ID_AA64MMFR0_BIGENDEL_SHIFT) == 0x1 ||
|
||||
cpuid_feature_extract_field(mmfr0, ID_AA64MMFR0_BIGENDEL0_SHIFT) == 0x1;
|
||||
return cpuid_feature_extract_unsigned_field(mmfr0, ID_AA64MMFR0_BIGENDEL_SHIFT) == 0x1 ||
|
||||
cpuid_feature_extract_unsigned_field(mmfr0, ID_AA64MMFR0_BIGENDEL0_SHIFT) == 0x1;
|
||||
}
|
||||
|
||||
void __init setup_cpu_features(void);
|
||||
|
|
|
@ -617,7 +617,7 @@ u64 read_system_reg(u32 id)
|
|||
static bool
|
||||
feature_matches(u64 reg, const struct arm64_cpu_capabilities *entry)
|
||||
{
|
||||
int val = cpuid_feature_extract_field(reg, entry->field_pos);
|
||||
int val = cpuid_feature_extract_field(reg, entry->field_pos, entry->sign);
|
||||
|
||||
return val >= entry->min_field_value;
|
||||
}
|
||||
|
@ -703,6 +703,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
|||
.matches = has_useable_gicv3_cpuif,
|
||||
.sys_reg = SYS_ID_AA64PFR0_EL1,
|
||||
.field_pos = ID_AA64PFR0_GIC_SHIFT,
|
||||
.sign = FTR_UNSIGNED,
|
||||
.min_field_value = 1,
|
||||
},
|
||||
#ifdef CONFIG_ARM64_PAN
|
||||
|
@ -712,6 +713,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
|||
.matches = has_cpuid_feature,
|
||||
.sys_reg = SYS_ID_AA64MMFR1_EL1,
|
||||
.field_pos = ID_AA64MMFR1_PAN_SHIFT,
|
||||
.sign = FTR_UNSIGNED,
|
||||
.min_field_value = 1,
|
||||
.enable = cpu_enable_pan,
|
||||
},
|
||||
|
@ -723,6 +725,7 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
|||
.matches = has_cpuid_feature,
|
||||
.sys_reg = SYS_ID_AA64ISAR0_EL1,
|
||||
.field_pos = ID_AA64ISAR0_ATOMICS_SHIFT,
|
||||
.sign = FTR_UNSIGNED,
|
||||
.min_field_value = 2,
|
||||
},
|
||||
#endif /* CONFIG_AS_LSE && CONFIG_ARM64_LSE_ATOMICS */
|
||||
|
@ -765,37 +768,39 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
|
|||
.matches = has_cpuid_feature,
|
||||
.sys_reg = SYS_ID_AA64PFR0_EL1,
|
||||
.field_pos = ID_AA64PFR0_EL0_SHIFT,
|
||||
.sign = FTR_UNSIGNED,
|
||||
.min_field_value = ID_AA64PFR0_EL0_32BIT_64BIT,
|
||||
},
|
||||
{},
|
||||
};
|
||||
|
||||
#define HWCAP_CAP(reg, field, min_value, type, cap) \
|
||||
#define HWCAP_CAP(reg, field, s, min_value, type, cap) \
|
||||
{ \
|
||||
.desc = #cap, \
|
||||
.matches = has_cpuid_feature, \
|
||||
.sys_reg = reg, \
|
||||
.field_pos = field, \
|
||||
.sign = s, \
|
||||
.min_field_value = min_value, \
|
||||
.hwcap_type = type, \
|
||||
.hwcap = cap, \
|
||||
}
|
||||
|
||||
static const struct arm64_cpu_capabilities arm64_hwcaps[] = {
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, 2, CAP_HWCAP, HWCAP_PMULL),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, 1, CAP_HWCAP, HWCAP_AES),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_SHA1_SHIFT, 1, CAP_HWCAP, HWCAP_SHA1),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_SHA2_SHIFT, 1, CAP_HWCAP, HWCAP_SHA2),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_CRC32_SHIFT, 1, CAP_HWCAP, HWCAP_CRC32),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_ATOMICS_SHIFT, 2, CAP_HWCAP, HWCAP_ATOMICS),
|
||||
HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_FP_SHIFT, 0, CAP_HWCAP, HWCAP_FP),
|
||||
HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, 0, CAP_HWCAP, HWCAP_ASIMD),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, FTR_UNSIGNED, 2, CAP_HWCAP, HWCAP_PMULL),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_AES_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_AES),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_SHA1_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_SHA1),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_SHA2_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_SHA2),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_CRC32_SHIFT, FTR_UNSIGNED, 1, CAP_HWCAP, HWCAP_CRC32),
|
||||
HWCAP_CAP(SYS_ID_AA64ISAR0_EL1, ID_AA64ISAR0_ATOMICS_SHIFT, FTR_UNSIGNED, 2, CAP_HWCAP, HWCAP_ATOMICS),
|
||||
HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_FP_SHIFT, FTR_SIGNED, 0, CAP_HWCAP, HWCAP_FP),
|
||||
HWCAP_CAP(SYS_ID_AA64PFR0_EL1, ID_AA64PFR0_ASIMD_SHIFT, FTR_SIGNED, 0, CAP_HWCAP, HWCAP_ASIMD),
|
||||
#ifdef CONFIG_COMPAT
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, 2, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_PMULL),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_AES),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_SHA1_SHIFT, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_SHA1),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_SHA2_SHIFT, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_SHA2),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_CRC32_SHIFT, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_CRC32),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, FTR_UNSIGNED, 2, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_PMULL),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_AES_SHIFT, FTR_UNSIGNED, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_AES),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_SHA1_SHIFT, FTR_UNSIGNED, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_SHA1),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_SHA2_SHIFT, FTR_UNSIGNED, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_SHA2),
|
||||
HWCAP_CAP(SYS_ID_ISAR5_EL1, ID_ISAR5_CRC32_SHIFT, FTR_UNSIGNED, 1, CAP_COMPAT_HWCAP2, COMPAT_HWCAP2_CRC32),
|
||||
#endif
|
||||
{},
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
/* Determine debug architecture. */
|
||||
u8 debug_monitors_arch(void)
|
||||
{
|
||||
return cpuid_feature_extract_field(read_system_reg(SYS_ID_AA64DFR0_EL1),
|
||||
return cpuid_feature_extract_unsigned_field(read_system_reg(SYS_ID_AA64DFR0_EL1),
|
||||
ID_AA64DFR0_DEBUGVER_SHIFT);
|
||||
}
|
||||
|
||||
|
|
|
@ -688,7 +688,7 @@ static bool trap_dbgidr(struct kvm_vcpu *vcpu,
|
|||
} else {
|
||||
u64 dfr = read_system_reg(SYS_ID_AA64DFR0_EL1);
|
||||
u64 pfr = read_system_reg(SYS_ID_AA64PFR0_EL1);
|
||||
u32 el3 = !!cpuid_feature_extract_field(pfr, ID_AA64PFR0_EL3_SHIFT);
|
||||
u32 el3 = !!cpuid_feature_extract_unsigned_field(pfr, ID_AA64PFR0_EL3_SHIFT);
|
||||
|
||||
p->regval = ((((dfr >> ID_AA64DFR0_WRPS_SHIFT) & 0xf) << 28) |
|
||||
(((dfr >> ID_AA64DFR0_BRPS_SHIFT) & 0xf) << 24) |
|
||||
|
|
|
@ -213,7 +213,8 @@ asmlinkage void post_ttbr_update_workaround(void)
|
|||
|
||||
static int asids_init(void)
|
||||
{
|
||||
int fld = cpuid_feature_extract_field(read_cpuid(SYS_ID_AA64MMFR0_EL1), 4);
|
||||
int fld = cpuid_feature_extract_unsigned_field(read_cpuid(SYS_ID_AA64MMFR0_EL1),
|
||||
ID_AA64MMFR0_ASID_SHIFT);
|
||||
|
||||
switch (fld) {
|
||||
default:
|
||||
|
|
|
@ -505,7 +505,7 @@ static int __init map_entry_trampoline(void)
|
|||
{
|
||||
extern char __entry_tramp_text_start[];
|
||||
|
||||
pgprot_t prot = PAGE_KERNEL_EXEC;
|
||||
pgprot_t prot = PAGE_KERNEL_ROX;
|
||||
phys_addr_t pa_start = __pa_symbol(__entry_tramp_text_start);
|
||||
|
||||
/* The trampoline is always mapped and can therefore be global */
|
||||
|
|
|
@ -912,8 +912,12 @@ module_finalize (const Elf_Ehdr *hdr, const Elf_Shdr *sechdrs, struct module *mo
|
|||
void
|
||||
module_arch_cleanup (struct module *mod)
|
||||
{
|
||||
if (mod->arch.init_unw_table)
|
||||
if (mod->arch.init_unw_table) {
|
||||
unw_remove_unwind_table(mod->arch.init_unw_table);
|
||||
if (mod->arch.core_unw_table)
|
||||
mod->arch.init_unw_table = NULL;
|
||||
}
|
||||
if (mod->arch.core_unw_table) {
|
||||
unw_remove_unwind_table(mod->arch.core_unw_table);
|
||||
mod->arch.core_unw_table = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -638,7 +638,6 @@ CONFIG_USB_SERIAL_OMNINET=m
|
|||
CONFIG_USB_EMI62=m
|
||||
CONFIG_USB_EMI26=m
|
||||
CONFIG_USB_ADUTUX=m
|
||||
CONFIG_USB_RIO500=m
|
||||
CONFIG_USB_LEGOTOWER=m
|
||||
CONFIG_USB_LCD=m
|
||||
CONFIG_USB_LED=m
|
||||
|
|
|
@ -351,7 +351,6 @@ CONFIG_USB_SERIAL_SAFE_PADDED=y
|
|||
CONFIG_USB_SERIAL_CYBERJACK=m
|
||||
CONFIG_USB_SERIAL_XIRCOM=m
|
||||
CONFIG_USB_SERIAL_OMNINET=m
|
||||
CONFIG_USB_RIO500=m
|
||||
CONFIG_USB_LEGOTOWER=m
|
||||
CONFIG_USB_LCD=m
|
||||
CONFIG_USB_LED=m
|
||||
|
|
|
@ -110,7 +110,7 @@ static int __init serial_init(void)
|
|||
}
|
||||
module_init(serial_init);
|
||||
|
||||
static void __init serial_exit(void)
|
||||
static void __exit serial_exit(void)
|
||||
{
|
||||
platform_device_unregister(&uart8250_device);
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* arch/parisc/mm/ioremap.c
|
||||
*
|
||||
* (C) Copyright 1995 1996 Linus Torvalds
|
||||
* (C) Copyright 2001-2006 Helge Deller <deller@gmx.de>
|
||||
* (C) Copyright 2001-2019 Helge Deller <deller@gmx.de>
|
||||
* (C) Copyright 2005 Kyle McMartin <kyle@parisc-linux.org>
|
||||
*/
|
||||
|
||||
|
@ -83,7 +83,7 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
|
|||
addr = (void __iomem *) area->addr;
|
||||
if (ioremap_page_range((unsigned long)addr, (unsigned long)addr + size,
|
||||
phys_addr, pgprot)) {
|
||||
vfree(addr);
|
||||
vunmap(addr);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -91,9 +91,11 @@ void __iomem * __ioremap(unsigned long phys_addr, unsigned long size, unsigned l
|
|||
}
|
||||
EXPORT_SYMBOL(__ioremap);
|
||||
|
||||
void iounmap(const volatile void __iomem *addr)
|
||||
void iounmap(const volatile void __iomem *io_addr)
|
||||
{
|
||||
if (addr > high_memory)
|
||||
return vfree((void *) (PAGE_MASK & (unsigned long __force) addr));
|
||||
unsigned long addr = (unsigned long)io_addr & PAGE_MASK;
|
||||
|
||||
if (is_vmalloc_addr((void *)addr))
|
||||
vunmap((void *)addr);
|
||||
}
|
||||
EXPORT_SYMBOL(iounmap);
|
||||
|
|
|
@ -60,8 +60,7 @@ static inline int arch_futex_atomic_op_inuser(int op, int oparg, int *oval,
|
|||
|
||||
pagefault_enable();
|
||||
|
||||
if (!ret)
|
||||
*oval = oldval;
|
||||
*oval = oldval;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -1465,6 +1465,10 @@ machine_check_handle_early:
|
|||
RFI_TO_USER_OR_KERNEL
|
||||
9:
|
||||
/* Deliver the machine check to host kernel in V mode. */
|
||||
BEGIN_FTR_SECTION
|
||||
ld r10,ORIG_GPR3(r1)
|
||||
mtspr SPRN_CFAR,r10
|
||||
END_FTR_SECTION_IFSET(CPU_FTR_CFAR)
|
||||
MACHINE_CHECK_HANDLER_WINDUP
|
||||
b machine_check_pSeries
|
||||
|
||||
|
|
|
@ -857,15 +857,17 @@ static int rtas_cpu_state_change_mask(enum rtas_cpu_state state,
|
|||
return 0;
|
||||
|
||||
for_each_cpu(cpu, cpus) {
|
||||
struct device *dev = get_cpu_device(cpu);
|
||||
|
||||
switch (state) {
|
||||
case DOWN:
|
||||
cpuret = cpu_down(cpu);
|
||||
cpuret = device_offline(dev);
|
||||
break;
|
||||
case UP:
|
||||
cpuret = cpu_up(cpu);
|
||||
cpuret = device_online(dev);
|
||||
break;
|
||||
}
|
||||
if (cpuret) {
|
||||
if (cpuret < 0) {
|
||||
pr_debug("%s: cpu_%s for cpu#%d returned %d.\n",
|
||||
__func__,
|
||||
((state == UP) ? "up" : "down"),
|
||||
|
@ -954,6 +956,8 @@ int rtas_ibm_suspend_me(u64 handle)
|
|||
data.token = rtas_token("ibm,suspend-me");
|
||||
data.complete = &done;
|
||||
|
||||
lock_device_hotplug();
|
||||
|
||||
/* All present CPUs must be online */
|
||||
cpumask_andnot(offline_mask, cpu_present_mask, cpu_online_mask);
|
||||
cpuret = rtas_online_cpus_mask(offline_mask);
|
||||
|
@ -985,6 +989,7 @@ int rtas_ibm_suspend_me(u64 handle)
|
|||
__func__);
|
||||
|
||||
out:
|
||||
unlock_device_hotplug();
|
||||
free_cpumask_var(offline_mask);
|
||||
return atomic_read(&data.error);
|
||||
}
|
||||
|
|
|
@ -580,7 +580,10 @@ static ssize_t symbol_map_read(struct file *fp, struct kobject *kobj,
|
|||
bin_attr->size);
|
||||
}
|
||||
|
||||
static BIN_ATTR_RO(symbol_map, 0);
|
||||
static struct bin_attribute symbol_map_attr = {
|
||||
.attr = {.name = "symbol_map", .mode = 0400},
|
||||
.read = symbol_map_read
|
||||
};
|
||||
|
||||
static void opal_export_symmap(void)
|
||||
{
|
||||
|
@ -597,10 +600,10 @@ static void opal_export_symmap(void)
|
|||
return;
|
||||
|
||||
/* Setup attributes */
|
||||
bin_attr_symbol_map.private = __va(be64_to_cpu(syms[0]));
|
||||
bin_attr_symbol_map.size = be64_to_cpu(syms[1]);
|
||||
symbol_map_attr.private = __va(be64_to_cpu(syms[0]));
|
||||
symbol_map_attr.size = be64_to_cpu(syms[1]);
|
||||
|
||||
rc = sysfs_create_bin_file(opal_kobj, &bin_attr_symbol_map);
|
||||
rc = sysfs_create_bin_file(opal_kobj, &symbol_map_attr);
|
||||
if (rc)
|
||||
pr_warn("Error %d creating OPAL symbols file\n", rc);
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/kobject.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/stat.h>
|
||||
#include <linux/completion.h>
|
||||
|
@ -206,7 +207,11 @@ static int update_dt_node(__be32 phandle, s32 scope)
|
|||
|
||||
prop_data += vd;
|
||||
}
|
||||
|
||||
cond_resched();
|
||||
}
|
||||
|
||||
cond_resched();
|
||||
} while (rtas_rc == 1);
|
||||
|
||||
of_node_put(dn);
|
||||
|
@ -282,8 +287,12 @@ int pseries_devicetree_update(s32 scope)
|
|||
add_dt_node(phandle, drc_index);
|
||||
break;
|
||||
}
|
||||
|
||||
cond_resched();
|
||||
}
|
||||
}
|
||||
|
||||
cond_resched();
|
||||
} while (rc == 1);
|
||||
|
||||
kfree(rtas_buf);
|
||||
|
|
|
@ -369,6 +369,9 @@ static void pseries_lpar_idle(void)
|
|||
* low power mode by cedeing processor to hypervisor
|
||||
*/
|
||||
|
||||
if (!prep_irq_for_idle())
|
||||
return;
|
||||
|
||||
/* Indicate to hypervisor that we are idle. */
|
||||
get_lppaca()->idle = 1;
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ static int hypfs_show_options(struct seq_file *s, struct dentry *root)
|
|||
static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
|
||||
{
|
||||
struct inode *root_inode;
|
||||
struct dentry *root_dentry;
|
||||
struct dentry *root_dentry, *update_file;
|
||||
int rc = 0;
|
||||
struct hypfs_sb_info *sbi;
|
||||
|
||||
|
@ -298,9 +298,10 @@ static int hypfs_fill_super(struct super_block *sb, void *data, int silent)
|
|||
rc = hypfs_diag_create_files(root_dentry);
|
||||
if (rc)
|
||||
return rc;
|
||||
sbi->update_file = hypfs_create_update_file(root_dentry);
|
||||
if (IS_ERR(sbi->update_file))
|
||||
return PTR_ERR(sbi->update_file);
|
||||
update_file = hypfs_create_update_file(root_dentry);
|
||||
if (IS_ERR(update_file))
|
||||
return PTR_ERR(update_file);
|
||||
sbi->update_file = update_file;
|
||||
hypfs_update_update(sb);
|
||||
pr_info("Hypervisor filesystem mounted\n");
|
||||
return 0;
|
||||
|
|
|
@ -291,7 +291,8 @@ int arch_update_cpu_topology(void)
|
|||
topology_update_polarization_simple();
|
||||
for_each_online_cpu(cpu) {
|
||||
dev = get_cpu_device(cpu);
|
||||
kobject_uevent(&dev->kobj, KOBJ_CHANGE);
|
||||
if (dev)
|
||||
kobject_uevent(&dev->kobj, KOBJ_CHANGE);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -2471,7 +2471,7 @@ static long kvm_s390_guest_mem_op(struct kvm_vcpu *vcpu,
|
|||
const u64 supported_flags = KVM_S390_MEMOP_F_INJECT_EXCEPTION
|
||||
| KVM_S390_MEMOP_F_CHECK_ONLY;
|
||||
|
||||
if (mop->flags & ~supported_flags)
|
||||
if (mop->flags & ~supported_flags || mop->ar >= NUM_ACRS || !mop->size)
|
||||
return -EINVAL;
|
||||
|
||||
if (mop->size > MEM_OP_MAX_SIZE)
|
||||
|
|
|
@ -13,10 +13,13 @@ CONFIG_IKCONFIG_PROC=y
|
|||
CONFIG_CGROUPS=y
|
||||
CONFIG_CGROUP_DEBUG=y
|
||||
CONFIG_CGROUP_FREEZER=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_SCHEDTUNE=y
|
||||
CONFIG_CGROUP_SCHED=y
|
||||
CONFIG_RT_GROUP_SCHED=y
|
||||
CONFIG_NAMESPACES=y
|
||||
CONFIG_SCHED_TUNE=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
# CONFIG_RD_LZ4 is not set
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
|
@ -462,6 +465,7 @@ CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
|
|||
CONFIG_CRYPTO_SHA512=y
|
||||
CONFIG_CRYPTO_LZ4=y
|
||||
CONFIG_CRYPTO_ZSTD=y
|
||||
CONFIG_CRYPTO_AES_NI_INTEL=y
|
||||
CONFIG_ASYMMETRIC_KEY_TYPE=y
|
||||
CONFIG_ASYMMETRIC_PUBLIC_KEY_SUBTYPE=y
|
||||
CONFIG_X509_CERTIFICATE_PARSER=y
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#define MWAIT_ECX_INTERRUPT_BREAK 0x1
|
||||
#define MWAITX_ECX_TIMER_ENABLE BIT(1)
|
||||
#define MWAITX_MAX_LOOPS ((u32)-1)
|
||||
#define MWAITX_DISABLE_CSTATES 0xf
|
||||
#define MWAITX_DISABLE_CSTATES 0xf0
|
||||
|
||||
static inline void __monitor(const void *eax, unsigned long ecx,
|
||||
unsigned long edx)
|
||||
|
|
|
@ -1265,6 +1265,14 @@ void setup_local_APIC(void)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* If this comes from kexec/kcrash the APIC might be enabled in
|
||||
* SPIV. Soft disable it before doing further initialization.
|
||||
*/
|
||||
value = apic_read(APIC_SPIV);
|
||||
value &= ~APIC_SPIV_APIC_ENABLED;
|
||||
apic_write(APIC_SPIV, value);
|
||||
|
||||
#ifdef CONFIG_X86_32
|
||||
/* Pound the ESR really hard over the head with a big hammer - mbligh */
|
||||
if (lapic_is_integrated() && apic->disable_esr) {
|
||||
|
|
|
@ -176,6 +176,12 @@ asmlinkage __visible void smp_reboot_interrupt(void)
|
|||
irq_exit();
|
||||
}
|
||||
|
||||
static int register_stop_handler(void)
|
||||
{
|
||||
return register_nmi_handler(NMI_LOCAL, smp_stop_nmi_callback,
|
||||
NMI_FLAG_FIRST, "smp_stop");
|
||||
}
|
||||
|
||||
static void native_stop_other_cpus(int wait)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
@ -209,39 +215,41 @@ static void native_stop_other_cpus(int wait)
|
|||
apic->send_IPI_allbutself(REBOOT_VECTOR);
|
||||
|
||||
/*
|
||||
* Don't wait longer than a second if the caller
|
||||
* didn't ask us to wait.
|
||||
* Don't wait longer than a second for IPI completion. The
|
||||
* wait request is not checked here because that would
|
||||
* prevent an NMI shutdown attempt in case that not all
|
||||
* CPUs reach shutdown state.
|
||||
*/
|
||||
timeout = USEC_PER_SEC;
|
||||
while (num_online_cpus() > 1 && (wait || timeout--))
|
||||
while (num_online_cpus() > 1 && timeout--)
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
|
||||
/* if the REBOOT_VECTOR didn't work, try with the NMI */
|
||||
if ((num_online_cpus() > 1) && (!smp_no_nmi_ipi)) {
|
||||
if (register_nmi_handler(NMI_LOCAL, smp_stop_nmi_callback,
|
||||
NMI_FLAG_FIRST, "smp_stop"))
|
||||
/* Note: we ignore failures here */
|
||||
/* Hope the REBOOT_IRQ is good enough */
|
||||
goto finish;
|
||||
|
||||
/* sync above data before sending IRQ */
|
||||
wmb();
|
||||
|
||||
pr_emerg("Shutting down cpus with NMI\n");
|
||||
|
||||
apic->send_IPI_allbutself(NMI_VECTOR);
|
||||
|
||||
if (num_online_cpus() > 1) {
|
||||
/*
|
||||
* Don't wait longer than a 10 ms if the caller
|
||||
* didn't ask us to wait.
|
||||
* If NMI IPI is enabled, try to register the stop handler
|
||||
* and send the IPI. In any case try to wait for the other
|
||||
* CPUs to stop.
|
||||
*/
|
||||
if (!smp_no_nmi_ipi && !register_stop_handler()) {
|
||||
/* Sync above data before sending IRQ */
|
||||
wmb();
|
||||
|
||||
pr_emerg("Shutting down cpus with NMI\n");
|
||||
|
||||
apic->send_IPI_allbutself(NMI_VECTOR);
|
||||
}
|
||||
/*
|
||||
* Don't wait longer than 10 ms if the caller didn't
|
||||
* reqeust it. If wait is true, the machine hangs here if
|
||||
* one or more CPUs do not reach shutdown state.
|
||||
*/
|
||||
timeout = USEC_PER_MSEC * 10;
|
||||
while (num_online_cpus() > 1 && (wait || timeout--))
|
||||
udelay(1);
|
||||
}
|
||||
|
||||
finish:
|
||||
local_irq_save(flags);
|
||||
disable_local_APIC();
|
||||
mcheck_cpu_clear(this_cpu_ptr(&cpu_info));
|
||||
|
|
|
@ -5245,6 +5245,8 @@ done_prefixes:
|
|||
ctxt->memopp->addr.mem.ea + ctxt->_eip);
|
||||
|
||||
done:
|
||||
if (rc == X86EMUL_PROPAGATE_FAULT)
|
||||
ctxt->have_exception = true;
|
||||
return (rc != X86EMUL_CONTINUE) ? EMULATION_FAILED : EMULATION_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -7276,7 +7276,7 @@ static int handle_vmread(struct kvm_vcpu *vcpu)
|
|||
/* _system ok, as nested_vmx_check_permission verified cpl=0 */
|
||||
if (kvm_write_guest_virt_system(vcpu, gva, &field_value,
|
||||
(is_long_mode(vcpu) ? 8 : 4),
|
||||
NULL))
|
||||
&e))
|
||||
kvm_inject_page_fault(vcpu, &e);
|
||||
}
|
||||
|
||||
|
|
|
@ -523,8 +523,14 @@ static int kvm_read_nested_guest_page(struct kvm_vcpu *vcpu, gfn_t gfn,
|
|||
data, offset, len, access);
|
||||
}
|
||||
|
||||
static inline u64 pdptr_rsvd_bits(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
return rsvd_bits(cpuid_maxphyaddr(vcpu), 63) | rsvd_bits(5, 8) |
|
||||
rsvd_bits(1, 2);
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the pae pdptrs. Return true is they are all valid.
|
||||
* Load the pae pdptrs. Return 1 if they are all valid, 0 otherwise.
|
||||
*/
|
||||
int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3)
|
||||
{
|
||||
|
@ -543,8 +549,7 @@ int load_pdptrs(struct kvm_vcpu *vcpu, struct kvm_mmu *mmu, unsigned long cr3)
|
|||
}
|
||||
for (i = 0; i < ARRAY_SIZE(pdpte); ++i) {
|
||||
if (is_present_gpte(pdpte[i]) &&
|
||||
(pdpte[i] &
|
||||
vcpu->arch.mmu.guest_rsvd_check.rsvd_bits_mask[0][2])) {
|
||||
(pdpte[i] & pdptr_rsvd_bits(vcpu))) {
|
||||
ret = 0;
|
||||
goto out;
|
||||
}
|
||||
|
@ -5486,8 +5491,16 @@ int x86_emulate_instruction(struct kvm_vcpu *vcpu,
|
|||
if (reexecute_instruction(vcpu, cr2, write_fault_to_spt,
|
||||
emulation_type))
|
||||
return EMULATE_DONE;
|
||||
if (ctxt->have_exception && inject_emulated_exception(vcpu))
|
||||
if (ctxt->have_exception) {
|
||||
/*
|
||||
* #UD should result in just EMULATION_FAILED, and trap-like
|
||||
* exception should not be encountered during decode.
|
||||
*/
|
||||
WARN_ON_ONCE(ctxt->exception.vector == UD_VECTOR ||
|
||||
exception_type(ctxt->exception.vector) == EXCPT_TRAP);
|
||||
inject_emulated_exception(vcpu);
|
||||
return EMULATE_DONE;
|
||||
}
|
||||
if (emulation_type & EMULTYPE_SKIP)
|
||||
return EMULATE_FAIL;
|
||||
return handle_emulation_failure(vcpu);
|
||||
|
|
|
@ -112,8 +112,8 @@ static void delay_mwaitx(unsigned long __loops)
|
|||
__monitorx(this_cpu_ptr(&cpu_tss), 0, 0);
|
||||
|
||||
/*
|
||||
* AMD, like Intel, supports the EAX hint and EAX=0xf
|
||||
* means, do not enter any deep C-state and we use it
|
||||
* AMD, like Intel's MWAIT version, supports the EAX hint and
|
||||
* EAX=0xf0 means, do not enter any deep C-state and we use it
|
||||
* here in delay() to minimize wakeup latency.
|
||||
*/
|
||||
__mwaitx(MWAITX_DISABLE_CSTATES, delay, MWAITX_ECX_TIMER_ENABLE);
|
||||
|
|
|
@ -116,13 +116,6 @@ EXPORT_SYMBOL(__invalidate_icache_range);
|
|||
// FIXME EXPORT_SYMBOL(screen_info);
|
||||
#endif
|
||||
|
||||
EXPORT_SYMBOL(outsb);
|
||||
EXPORT_SYMBOL(outsw);
|
||||
EXPORT_SYMBOL(outsl);
|
||||
EXPORT_SYMBOL(insb);
|
||||
EXPORT_SYMBOL(insw);
|
||||
EXPORT_SYMBOL(insl);
|
||||
|
||||
extern long common_exception_return;
|
||||
EXPORT_SYMBOL(common_exception_return);
|
||||
|
||||
|
|
11
build.config.aarch64
Normal file
11
build.config.aarch64
Normal file
|
@ -0,0 +1,11 @@
|
|||
ARCH=arm64
|
||||
|
||||
CLANG_TRIPLE=aarch64-linux-gnu-
|
||||
CROSS_COMPILE=aarch64-linux-androidkernel-
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
|
||||
|
||||
FILES="
|
||||
arch/arm64/boot/Image.gz
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
9
build.config.common
Normal file
9
build.config.common
Normal file
|
@ -0,0 +1,9 @@
|
|||
BRANCH=android-4.4-p
|
||||
KERNEL_DIR=common
|
||||
|
||||
CC=clang
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r365631c/bin
|
||||
BUILDTOOLS_PREBUILT_BIN=build/build-tools/path/linux-x86
|
||||
|
||||
EXTRA_CMDS=''
|
||||
STOP_SHIP_TRACEPRINTK=1
|
|
@ -1,16 +1,5 @@
|
|||
ARCH=arm64
|
||||
BRANCH=android-4.4
|
||||
CLANG_TRIPLE=aarch64-linux-gnu-
|
||||
CROSS_COMPILE=aarch64-linux-androidkernel-
|
||||
. ${ROOT_DIR}/common/build.config.common
|
||||
. ${ROOT_DIR}/common/build.config.aarch64
|
||||
|
||||
DEFCONFIG=cuttlefish_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=common
|
||||
POST_DEFCONFIG_CMDS="check_defconfig"
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r353983c/bin
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin
|
||||
FILES="
|
||||
arch/arm64/boot/Image.gz
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
STOP_SHIP_TRACEPRINTK=1
|
||||
|
|
|
@ -1,16 +1,5 @@
|
|||
ARCH=x86_64
|
||||
BRANCH=android-4.4
|
||||
CLANG_TRIPLE=x86_64-linux-gnu-
|
||||
CROSS_COMPILE=x86_64-linux-androidkernel-
|
||||
. ${ROOT_DIR}/common/build.config.common
|
||||
. ${ROOT_DIR}/common/build.config.x86_64
|
||||
|
||||
DEFCONFIG=x86_64_cuttlefish_defconfig
|
||||
EXTRA_CMDS=''
|
||||
KERNEL_DIR=common
|
||||
POST_DEFCONFIG_CMDS="check_defconfig"
|
||||
CLANG_PREBUILT_BIN=prebuilts-master/clang/host/linux-x86/clang-r353983c/bin
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
|
||||
FILES="
|
||||
arch/x86/boot/bzImage
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
||||
STOP_SHIP_TRACEPRINTK=1
|
||||
|
|
11
build.config.x86_64
Normal file
11
build.config.x86_64
Normal file
|
@ -0,0 +1,11 @@
|
|||
ARCH=x86_64
|
||||
|
||||
CLANG_TRIPLE=x86_64-linux-gnu-
|
||||
CROSS_COMPILE=x86_64-linux-androidkernel-
|
||||
LINUX_GCC_CROSS_COMPILE_PREBUILTS_BIN=prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin
|
||||
|
||||
FILES="
|
||||
arch/x86/boot/bzImage
|
||||
vmlinux
|
||||
System.map
|
||||
"
|
|
@ -137,8 +137,10 @@ static int acpi_get_psd(struct cpc_desc *cpc_ptr, acpi_handle handle)
|
|||
union acpi_object *psd = NULL;
|
||||
struct acpi_psd_package *pdomain;
|
||||
|
||||
status = acpi_evaluate_object_typed(handle, "_PSD", NULL, &buffer,
|
||||
ACPI_TYPE_PACKAGE);
|
||||
status = acpi_evaluate_object_typed(handle, "_PSD", NULL,
|
||||
&buffer, ACPI_TYPE_PACKAGE);
|
||||
if (status == AE_NOT_FOUND) /* _PSD is optional */
|
||||
return 0;
|
||||
if (ACPI_FAILURE(status))
|
||||
return -ENODEV;
|
||||
|
||||
|
|
|
@ -48,8 +48,10 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
|
|||
if ((*ppos > max_size) ||
|
||||
(*ppos + count > max_size) ||
|
||||
(*ppos + count < count) ||
|
||||
(count > uncopied_bytes))
|
||||
(count > uncopied_bytes)) {
|
||||
kfree(buf);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (copy_from_user(buf + (*ppos), user_buf, count)) {
|
||||
kfree(buf);
|
||||
|
@ -69,6 +71,7 @@ static ssize_t cm_write(struct file *file, const char __user * user_buf,
|
|||
add_taint(TAINT_OVERRIDDEN_ACPI_TABLE, LOCKDEP_NOW_UNRELIABLE);
|
||||
}
|
||||
|
||||
kfree(buf);
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
@ -528,7 +528,8 @@ struct binder_priority {
|
|||
* @requested_threads_started: number binder threads started
|
||||
* (protected by @inner_lock)
|
||||
* @tmp_ref: temporary reference to indicate proc is in use
|
||||
* (protected by @inner_lock)
|
||||
* (atomic since @proc->inner_lock cannot
|
||||
* always be acquired)
|
||||
* @default_priority: default scheduler priority
|
||||
* (invariant after initialized)
|
||||
* @debugfs_entry: debugfs node
|
||||
|
@ -562,7 +563,7 @@ struct binder_proc {
|
|||
int max_threads;
|
||||
int requested_threads;
|
||||
int requested_threads_started;
|
||||
int tmp_ref;
|
||||
atomic_t tmp_ref;
|
||||
struct binder_priority default_priority;
|
||||
struct dentry *debugfs_entry;
|
||||
struct binder_alloc alloc;
|
||||
|
@ -2053,9 +2054,9 @@ static void binder_thread_dec_tmpref(struct binder_thread *thread)
|
|||
static void binder_proc_dec_tmpref(struct binder_proc *proc)
|
||||
{
|
||||
binder_inner_proc_lock(proc);
|
||||
proc->tmp_ref--;
|
||||
atomic_dec(&proc->tmp_ref);
|
||||
if (proc->is_dead && RB_EMPTY_ROOT(&proc->threads) &&
|
||||
!proc->tmp_ref) {
|
||||
!atomic_read(&proc->tmp_ref)) {
|
||||
binder_inner_proc_unlock(proc);
|
||||
binder_free_proc(proc);
|
||||
return;
|
||||
|
@ -2117,8 +2118,26 @@ static struct binder_thread *binder_get_txn_from_and_acq_inner(
|
|||
|
||||
static void binder_free_transaction(struct binder_transaction *t)
|
||||
{
|
||||
if (t->buffer)
|
||||
t->buffer->transaction = NULL;
|
||||
struct binder_proc *target_proc;
|
||||
|
||||
spin_lock(&t->lock);
|
||||
target_proc = t->to_proc;
|
||||
if (target_proc) {
|
||||
atomic_inc(&target_proc->tmp_ref);
|
||||
spin_unlock(&t->lock);
|
||||
|
||||
binder_inner_proc_lock(target_proc);
|
||||
if (t->buffer)
|
||||
t->buffer->transaction = NULL;
|
||||
binder_inner_proc_unlock(target_proc);
|
||||
binder_proc_dec_tmpref(target_proc);
|
||||
} else {
|
||||
/*
|
||||
* If the transaction has no target_proc, then
|
||||
* t->buffer->transaction * has already been cleared.
|
||||
*/
|
||||
spin_unlock(&t->lock);
|
||||
}
|
||||
kfree(t);
|
||||
binder_stats_deleted(BINDER_STAT_TRANSACTION);
|
||||
}
|
||||
|
@ -2871,7 +2890,7 @@ static struct binder_node *binder_get_node_refs_for_txn(
|
|||
target_node = node;
|
||||
binder_inc_node_nilocked(node, 1, 0, NULL);
|
||||
binder_inc_node_tmpref_ilocked(node);
|
||||
node->proc->tmp_ref++;
|
||||
atomic_inc(&node->proc->tmp_ref);
|
||||
*procp = node->proc;
|
||||
} else
|
||||
*error = BR_DEAD_REPLY;
|
||||
|
@ -2967,7 +2986,7 @@ static void binder_transaction(struct binder_proc *proc,
|
|||
goto err_dead_binder;
|
||||
}
|
||||
target_proc = target_thread->proc;
|
||||
target_proc->tmp_ref++;
|
||||
atomic_inc(&target_proc->tmp_ref);
|
||||
binder_inner_proc_unlock(target_thread->proc);
|
||||
} else {
|
||||
if (tr->target.handle) {
|
||||
|
@ -3700,10 +3719,12 @@ static int binder_thread_write(struct binder_proc *proc,
|
|||
buffer->debug_id,
|
||||
buffer->transaction ? "active" : "finished");
|
||||
|
||||
binder_inner_proc_lock(proc);
|
||||
if (buffer->transaction) {
|
||||
buffer->transaction->buffer = NULL;
|
||||
buffer->transaction = NULL;
|
||||
}
|
||||
binder_inner_proc_unlock(proc);
|
||||
if (buffer->async_transaction && buffer->target_node) {
|
||||
struct binder_node *buf_node;
|
||||
struct binder_work *w;
|
||||
|
@ -4565,7 +4586,7 @@ static int binder_thread_release(struct binder_proc *proc,
|
|||
* The corresponding dec is when we actually
|
||||
* free the thread in binder_free_thread()
|
||||
*/
|
||||
proc->tmp_ref++;
|
||||
atomic_inc(&proc->tmp_ref);
|
||||
/*
|
||||
* take a ref on this thread to ensure it
|
||||
* survives while we are releasing it
|
||||
|
@ -5060,6 +5081,7 @@ static int binder_open(struct inode *nodp, struct file *filp)
|
|||
return -ENOMEM;
|
||||
spin_lock_init(&proc->inner_lock);
|
||||
spin_lock_init(&proc->outer_lock);
|
||||
atomic_set(&proc->tmp_ref, 0);
|
||||
get_task_struct(current->group_leader);
|
||||
proc->tsk = current->group_leader;
|
||||
mutex_init(&proc->files_lock);
|
||||
|
@ -5239,7 +5261,7 @@ static void binder_deferred_release(struct binder_proc *proc)
|
|||
* Make sure proc stays alive after we
|
||||
* remove all the threads
|
||||
*/
|
||||
proc->tmp_ref++;
|
||||
atomic_inc(&proc->tmp_ref);
|
||||
|
||||
proc->is_dead = true;
|
||||
threads = 0;
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*
|
||||
*/
|
||||
|
||||
#include <linux/cpufreq.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/fwnode.h>
|
||||
|
@ -2129,6 +2130,8 @@ void device_shutdown(void)
|
|||
{
|
||||
struct device *dev, *parent;
|
||||
|
||||
cpufreq_suspend();
|
||||
|
||||
spin_lock(&devices_kset->list_lock);
|
||||
/*
|
||||
* Walk the devices list backward, shutting down each in turn.
|
||||
|
|
|
@ -146,6 +146,7 @@ out2:
|
|||
out1:
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(soc_device_register);
|
||||
|
||||
/* Ensure soc_dev->attr is freed prior to calling soc_device_unregister. */
|
||||
void soc_device_unregister(struct soc_device *soc_dev)
|
||||
|
@ -154,6 +155,7 @@ void soc_device_unregister(struct soc_device *soc_dev)
|
|||
|
||||
device_unregister(&soc_dev->dev);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(soc_device_unregister);
|
||||
|
||||
static int __init soc_bus_register(void)
|
||||
{
|
||||
|
|
|
@ -1614,6 +1614,7 @@ static int lo_compat_ioctl(struct block_device *bdev, fmode_t mode,
|
|||
case LOOP_SET_FD:
|
||||
case LOOP_CHANGE_FD:
|
||||
case LOOP_SET_BLOCK_SIZE:
|
||||
case LOOP_SET_DIRECT_IO:
|
||||
err = lo_ioctl(bdev, mode, cmd, arg);
|
||||
break;
|
||||
default:
|
||||
|
|
|
@ -353,6 +353,9 @@ static const struct usb_device_id blacklist_table[] = {
|
|||
/* Additional Realtek 8822BE Bluetooth devices */
|
||||
{ USB_DEVICE(0x0b05, 0x185c), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Additional Realtek 8822CE Bluetooth devices */
|
||||
{ USB_DEVICE(0x04ca, 0x4005), .driver_info = BTUSB_REALTEK },
|
||||
|
||||
/* Silicon Wave based devices */
|
||||
{ USB_DEVICE(0x0c10, 0x0000), .driver_info = BTUSB_SWAVE },
|
||||
|
||||
|
|
|
@ -633,8 +633,8 @@ config MSM_RDBG
|
|||
for a debugger running on a host PC to communicate with a remote
|
||||
stub running on peripheral subsystems such as the ADSP, MODEM etc.
|
||||
|
||||
config QCOM_SDIO_CLIENT
|
||||
bool "QCOM_SDIO_CLIENT support"
|
||||
config QTI_SDIO_CLIENT
|
||||
bool "QTI_SDIO_CLIENT support"
|
||||
depends on SDIO_QCN
|
||||
default y
|
||||
help
|
||||
|
|
|
@ -67,4 +67,4 @@ ifdef CONFIG_COMPAT
|
|||
obj-$(CONFIG_MSM_ADSPRPC) += adsprpc_compat.o
|
||||
endif
|
||||
obj-$(CONFIG_MSM_RDBG) += rdbg.o
|
||||
obj-$(CONFIG_QCOM_SDIO_CLIENT) += qti_sdio_client.o
|
||||
obj-$(CONFIG_QTI_SDIO_CLIENT) += qti_sdio_client.o
|
||||
|
|
|
@ -25,7 +25,7 @@ endmenu
|
|||
menu "HSIC/SMUX support for DIAG"
|
||||
|
||||
config DIAGFWD_BRIDGE_CODE
|
||||
depends on USB_QCOM_DIAG_BRIDGE || MSM_MHI || QCOM_SDIO_CLIENT
|
||||
depends on USB_QCOM_DIAG_BRIDGE || MSM_MHI || QTI_SDIO_CLIENT
|
||||
default y
|
||||
bool "Enable QSC/9K DIAG traffic over SMUX/HSIC"
|
||||
help
|
||||
|
|
|
@ -3,6 +3,6 @@ obj-$(CONFIG_DIAGFWD_BRIDGE_CODE) += diagfwd_bridge.o
|
|||
|
||||
obj-$(CONFIG_USB_QCOM_DIAG_BRIDGE) += diagfwd_hsic.o
|
||||
obj-$(CONFIG_MSM_MHI) += diagfwd_mhi.o
|
||||
obj-$(CONFIG_QCOM_SDIO_CLIENT) += diagfwd_sdio.o
|
||||
obj-$(CONFIG_QTI_SDIO_CLIENT) += diagfwd_sdio.o
|
||||
|
||||
diagchar-objs := diagchar_core.o diagchar_hdlc.o diagfwd.o diagfwd_glink.o diagfwd_peripheral.o diagfwd_smd.o diagfwd_socket.o diag_mux.o diag_memorydevice.o diag_usb.o diagmem.o diagfwd_cntl.o diag_dci.o diag_masks.o diag_debugfs.o
|
||||
|
|
|
@ -998,6 +998,7 @@ void extract_dci_pkt_rsp(unsigned char *buf, int len, int data_source,
|
|||
unsigned char *temp = buf;
|
||||
int save_req_uid = 0;
|
||||
struct diag_dci_pkt_rsp_header_t pkt_rsp_header;
|
||||
int header_len = sizeof(struct diag_dci_pkt_rsp_header_t);
|
||||
|
||||
if (!buf || len <= 0) {
|
||||
pr_err("diag: Invalid pointer in %s\n", __func__);
|
||||
|
@ -1066,23 +1067,24 @@ void extract_dci_pkt_rsp(unsigned char *buf, int len, int data_source,
|
|||
mutex_lock(&rsp_buf->data_mutex);
|
||||
/*
|
||||
* Check if we can fit the data in the rsp buffer. The total length of
|
||||
* the rsp is the rsp length (write_len) + DCI_PKT_RSP_TYPE header (int)
|
||||
* + field for length (int) + delete_flag (uint8_t)
|
||||
* the rsp is the rsp length (write_len) + dci response packet header
|
||||
* length (sizeof(struct diag_dci_pkt_rsp_header_t))
|
||||
*/
|
||||
if ((rsp_buf->data_len + 9 + rsp_len) > rsp_buf->capacity) {
|
||||
if ((rsp_buf->data_len + header_len + rsp_len) > rsp_buf->capacity) {
|
||||
pr_alert("diag: create capacity for pkt rsp\n");
|
||||
rsp_buf->capacity += 9 + rsp_len;
|
||||
temp_buf = krealloc(rsp_buf->data, rsp_buf->capacity,
|
||||
GFP_KERNEL);
|
||||
temp_buf = vzalloc(rsp_buf->capacity + header_len + rsp_len);
|
||||
if (!temp_buf) {
|
||||
pr_err("diag: DCI realloc failed\n");
|
||||
mutex_unlock(&rsp_buf->data_mutex);
|
||||
mutex_unlock(&entry->buffers[data_source].buf_mutex);
|
||||
mutex_unlock(&driver->dci_mutex);
|
||||
return;
|
||||
} else {
|
||||
rsp_buf->data = temp_buf;
|
||||
}
|
||||
rsp_buf->capacity += header_len + rsp_len;
|
||||
if (rsp_buf->capacity > rsp_buf->data_len)
|
||||
memcpy(temp_buf, rsp_buf->data, rsp_buf->data_len);
|
||||
vfree(rsp_buf->data);
|
||||
rsp_buf->data = temp_buf;
|
||||
}
|
||||
|
||||
/* Fill in packet response header information */
|
||||
|
@ -1091,9 +1093,8 @@ void extract_dci_pkt_rsp(unsigned char *buf, int len, int data_source,
|
|||
pkt_rsp_header.length = rsp_len + sizeof(int);
|
||||
pkt_rsp_header.delete_flag = delete_flag;
|
||||
pkt_rsp_header.uid = save_req_uid;
|
||||
memcpy(rsp_buf->data + rsp_buf->data_len, &pkt_rsp_header,
|
||||
sizeof(struct diag_dci_pkt_rsp_header_t));
|
||||
rsp_buf->data_len += sizeof(struct diag_dci_pkt_rsp_header_t);
|
||||
memcpy(rsp_buf->data + rsp_buf->data_len, &pkt_rsp_header, header_len);
|
||||
rsp_buf->data_len += header_len;
|
||||
memcpy(rsp_buf->data + rsp_buf->data_len, temp, rsp_len);
|
||||
rsp_buf->data_len += rsp_len;
|
||||
rsp_buf->data_source = data_source;
|
||||
|
|
|
@ -901,7 +901,8 @@ static int diag_cmd_set_msg_mask(unsigned char *src_buf, int src_len,
|
|||
goto end;
|
||||
if (mask_size + write_len > dest_len)
|
||||
mask_size = dest_len - write_len;
|
||||
memcpy(dest_buf + write_len, src_buf + header_len, mask_size);
|
||||
if (mask_size && src_len >= header_len + mask_size)
|
||||
memcpy(dest_buf + write_len, src_buf + header_len, mask_size);
|
||||
write_len += mask_size;
|
||||
for (i = 0; i < NUM_PERIPHERALS; i++) {
|
||||
if (!diag_check_update(i, pid))
|
||||
|
|
|
@ -43,7 +43,7 @@ static int diag_mhi_init(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_QCOM_SDIO_CLIENT
|
||||
#ifndef CONFIG_QTI_SDIO_CLIENT
|
||||
static int diag_sdio_init(void)
|
||||
{
|
||||
return -EINVAL;
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#ifndef DIAGFWD_SDIO_H
|
||||
#define DIAGFWD_SDIO_H
|
||||
|
||||
#ifdef CONFIG_QCOM_SDIO_CLIENT
|
||||
#ifdef CONFIG_QTI_SDIO_CLIENT
|
||||
|
||||
#ifdef CONFIG_DIAG_OVER_USB
|
||||
#include <linux/usb/usbdiag.h>
|
||||
|
@ -52,4 +52,4 @@ int diag_sdio_init(void);
|
|||
void diag_sdio_exit(void);
|
||||
|
||||
#endif
|
||||
#endif /*CONFIG_QCOM_SDIO_CLIENT*/
|
||||
#endif /*CONFIG_QTI_SDIO_CLIENT*/
|
||||
|
|
|
@ -88,7 +88,7 @@ static void add_early_randomness(struct hwrng *rng)
|
|||
size_t size = min_t(size_t, 16, rng_buffer_size());
|
||||
|
||||
mutex_lock(&reading_mutex);
|
||||
bytes_read = rng_get_data(rng, rng_buffer, size, 1);
|
||||
bytes_read = rng_get_data(rng, rng_buffer, size, 0);
|
||||
mutex_unlock(&reading_mutex);
|
||||
if (bytes_read > 0)
|
||||
add_device_randomness(rng_buffer, bytes_read);
|
||||
|
|
|
@ -281,6 +281,9 @@ struct smi_info {
|
|||
*/
|
||||
bool irq_enable_broken;
|
||||
|
||||
/* Is the driver in maintenance mode? */
|
||||
bool in_maintenance_mode;
|
||||
|
||||
/*
|
||||
* Did we get an attention that we did not handle?
|
||||
*/
|
||||
|
@ -1091,11 +1094,20 @@ static int ipmi_thread(void *data)
|
|||
spin_unlock_irqrestore(&(smi_info->si_lock), flags);
|
||||
busy_wait = ipmi_thread_busy_wait(smi_result, smi_info,
|
||||
&busy_until);
|
||||
if (smi_result == SI_SM_CALL_WITHOUT_DELAY)
|
||||
if (smi_result == SI_SM_CALL_WITHOUT_DELAY) {
|
||||
; /* do nothing */
|
||||
else if (smi_result == SI_SM_CALL_WITH_DELAY && busy_wait)
|
||||
schedule();
|
||||
else if (smi_result == SI_SM_IDLE) {
|
||||
} else if (smi_result == SI_SM_CALL_WITH_DELAY && busy_wait) {
|
||||
/*
|
||||
* In maintenance mode we run as fast as
|
||||
* possible to allow firmware updates to
|
||||
* complete as fast as possible, but normally
|
||||
* don't bang on the scheduler.
|
||||
*/
|
||||
if (smi_info->in_maintenance_mode)
|
||||
schedule();
|
||||
else
|
||||
usleep_range(100, 200);
|
||||
} else if (smi_result == SI_SM_IDLE) {
|
||||
if (atomic_read(&smi_info->need_watch)) {
|
||||
schedule_timeout_interruptible(100);
|
||||
} else {
|
||||
|
@ -1103,8 +1115,9 @@ static int ipmi_thread(void *data)
|
|||
__set_current_state(TASK_INTERRUPTIBLE);
|
||||
schedule();
|
||||
}
|
||||
} else
|
||||
} else {
|
||||
schedule_timeout_interruptible(1);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -1283,6 +1296,7 @@ static void set_maintenance_mode(void *send_info, bool enable)
|
|||
|
||||
if (!enable)
|
||||
atomic_set(&smi_info->req_events, 0);
|
||||
smi_info->in_maintenance_mode = enable;
|
||||
}
|
||||
|
||||
static const struct ipmi_smi_handlers handlers = {
|
||||
|
|
|
@ -95,6 +95,13 @@ void __weak unxlate_dev_mem_ptr(phys_addr_t phys, void *addr)
|
|||
}
|
||||
#endif
|
||||
|
||||
static inline bool should_stop_iteration(void)
|
||||
{
|
||||
if (need_resched())
|
||||
cond_resched();
|
||||
return fatal_signal_pending(current);
|
||||
}
|
||||
|
||||
/*
|
||||
* This funcion reads the *physical* memory. The f_pos points directly to the
|
||||
* memory location.
|
||||
|
@ -161,6 +168,8 @@ static ssize_t read_mem(struct file *file, char __user *buf,
|
|||
p += sz;
|
||||
count -= sz;
|
||||
read += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
|
||||
*ppos += read;
|
||||
|
@ -232,6 +241,8 @@ static ssize_t write_mem(struct file *file, const char __user *buf,
|
|||
p += sz;
|
||||
count -= sz;
|
||||
written += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
|
||||
*ppos += written;
|
||||
|
@ -443,6 +454,10 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
|
|||
read += sz;
|
||||
low_count -= sz;
|
||||
count -= sz;
|
||||
if (should_stop_iteration()) {
|
||||
count = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -467,6 +482,8 @@ static ssize_t read_kmem(struct file *file, char __user *buf,
|
|||
buf += sz;
|
||||
read += sz;
|
||||
p += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
free_page((unsigned long)kbuf);
|
||||
}
|
||||
|
@ -517,6 +534,8 @@ static ssize_t do_write_kmem(unsigned long p, const char __user *buf,
|
|||
p += sz;
|
||||
count -= sz;
|
||||
written += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
|
||||
*ppos += written;
|
||||
|
@ -568,6 +587,8 @@ static ssize_t write_kmem(struct file *file, const char __user *buf,
|
|||
buf += sz;
|
||||
virtr += sz;
|
||||
p += sz;
|
||||
if (should_stop_iteration())
|
||||
break;
|
||||
}
|
||||
free_page((unsigned long)kbuf);
|
||||
}
|
||||
|
|
|
@ -540,7 +540,7 @@ static const struct clockgen_chipinfo chipinfo[] = {
|
|||
.guts_compat = "fsl,qoriq-device-config-1.0",
|
||||
.init_periph = p5020_init_periph,
|
||||
.cmux_groups = {
|
||||
&p2041_cmux_grp1, &p2041_cmux_grp2
|
||||
&p5020_cmux_grp1, &p5020_cmux_grp2
|
||||
},
|
||||
.cmux_to_group = {
|
||||
0, 1, -1
|
||||
|
|
|
@ -298,9 +298,10 @@ static u8 dmn_clk_get_parent(struct clk_hw *hw)
|
|||
{
|
||||
struct clk_dmn *clk = to_dmnclk(hw);
|
||||
u32 cfg = clkc_readl(clk->regofs);
|
||||
const char *name = clk_hw_get_name(hw);
|
||||
|
||||
/* parent of io domain can only be pll3 */
|
||||
if (strcmp(hw->init->name, "io") == 0)
|
||||
if (strcmp(name, "io") == 0)
|
||||
return 4;
|
||||
|
||||
WARN_ON((cfg & (BIT(3) - 1)) > 4);
|
||||
|
@ -312,9 +313,10 @@ static int dmn_clk_set_parent(struct clk_hw *hw, u8 parent)
|
|||
{
|
||||
struct clk_dmn *clk = to_dmnclk(hw);
|
||||
u32 cfg = clkc_readl(clk->regofs);
|
||||
const char *name = clk_hw_get_name(hw);
|
||||
|
||||
/* parent of io domain can only be pll3 */
|
||||
if (strcmp(hw->init->name, "io") == 0)
|
||||
if (strcmp(name, "io") == 0)
|
||||
return -EINVAL;
|
||||
|
||||
cfg &= ~(BIT(3) - 1);
|
||||
|
@ -354,7 +356,8 @@ static long dmn_clk_round_rate(struct clk_hw *hw, unsigned long rate,
|
|||
{
|
||||
unsigned long fin;
|
||||
unsigned ratio, wait, hold;
|
||||
unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4;
|
||||
const char *name = clk_hw_get_name(hw);
|
||||
unsigned bits = (strcmp(name, "mem") == 0) ? 3 : 4;
|
||||
|
||||
fin = *parent_rate;
|
||||
ratio = fin / rate;
|
||||
|
@ -376,7 +379,8 @@ static int dmn_clk_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
struct clk_dmn *clk = to_dmnclk(hw);
|
||||
unsigned long fin;
|
||||
unsigned ratio, wait, hold, reg;
|
||||
unsigned bits = (strcmp(hw->init->name, "mem") == 0) ? 3 : 4;
|
||||
const char *name = clk_hw_get_name(hw);
|
||||
unsigned bits = (strcmp(name, "mem") == 0) ? 3 : 4;
|
||||
|
||||
fin = parent_rate;
|
||||
ratio = fin / rate;
|
||||
|
|
|
@ -2631,14 +2631,6 @@ int cpufreq_unregister_driver(struct cpufreq_driver *driver)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(cpufreq_unregister_driver);
|
||||
|
||||
/*
|
||||
* Stop cpufreq at shutdown to make sure it isn't holding any locks
|
||||
* or mutexes when secondary CPUs are halted.
|
||||
*/
|
||||
static struct syscore_ops cpufreq_syscore_ops = {
|
||||
.shutdown = cpufreq_suspend,
|
||||
};
|
||||
|
||||
struct kobject *cpufreq_global_kobject;
|
||||
EXPORT_SYMBOL(cpufreq_global_kobject);
|
||||
|
||||
|
@ -2650,8 +2642,6 @@ static int __init cpufreq_core_init(void)
|
|||
cpufreq_global_kobject = kobject_create_and_add("cpufreq", &cpu_subsys.dev_root->kobj);
|
||||
BUG_ON(!cpufreq_global_kobject);
|
||||
|
||||
register_syscore_ops(&cpufreq_syscore_ops);
|
||||
|
||||
return 0;
|
||||
}
|
||||
core_initcall(cpufreq_core_init);
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
#define DESC_AEAD_BASE (4 * CAAM_CMD_SZ)
|
||||
#define DESC_AEAD_ENC_LEN (DESC_AEAD_BASE + 11 * CAAM_CMD_SZ)
|
||||
#define DESC_AEAD_DEC_LEN (DESC_AEAD_BASE + 15 * CAAM_CMD_SZ)
|
||||
#define DESC_AEAD_GIVENC_LEN (DESC_AEAD_ENC_LEN + 9 * CAAM_CMD_SZ)
|
||||
#define DESC_AEAD_GIVENC_LEN (DESC_AEAD_ENC_LEN + 10 * CAAM_CMD_SZ)
|
||||
|
||||
/* Note: Nonce is counted in enckeylen */
|
||||
#define DESC_AEAD_CTR_RFC3686_LEN (4 * CAAM_CMD_SZ)
|
||||
|
@ -437,6 +437,7 @@ static int aead_set_sh_desc(struct crypto_aead *aead)
|
|||
u32 geniv, moveiv;
|
||||
u32 ctx1_iv_off = 0;
|
||||
u32 *desc;
|
||||
u32 *wait_cmd;
|
||||
const bool ctr_mode = ((ctx->class1_alg_type & OP_ALG_AAI_MASK) ==
|
||||
OP_ALG_AAI_CTR_MOD128);
|
||||
const bool is_rfc3686 = alg->caam.rfc3686;
|
||||
|
@ -702,6 +703,14 @@ copy_iv:
|
|||
|
||||
/* Will read cryptlen */
|
||||
append_math_add(desc, VARSEQINLEN, SEQINLEN, REG0, CAAM_CMD_SZ);
|
||||
|
||||
/*
|
||||
* Wait for IV transfer (ofifo -> class2) to finish before starting
|
||||
* ciphertext transfer (ofifo -> external memory).
|
||||
*/
|
||||
wait_cmd = append_jump(desc, JUMP_JSL | JUMP_TEST_ALL | JUMP_COND_NIFP);
|
||||
set_jump_tgt_here(desc, wait_cmd);
|
||||
|
||||
append_seq_fifo_load(desc, 0, FIFOLD_CLASS_BOTH | KEY_VLF |
|
||||
FIFOLD_TYPE_MSG1OUT2 | FIFOLD_TYPE_LASTBOTH);
|
||||
append_seq_fifo_store(desc, 0, FIFOST_TYPE_MESSAGE_DATA | KEY_VLF);
|
||||
|
|
|
@ -95,7 +95,7 @@ struct service_hndl {
|
|||
|
||||
static inline int get_current_node(void)
|
||||
{
|
||||
return topology_physical_package_id(smp_processor_id());
|
||||
return topology_physical_package_id(raw_smp_processor_id());
|
||||
}
|
||||
|
||||
int adf_service_register(struct service_hndl *service);
|
||||
|
|
|
@ -2730,6 +2730,7 @@ static int talitos_remove(struct platform_device *ofdev)
|
|||
break;
|
||||
case CRYPTO_ALG_TYPE_AEAD:
|
||||
crypto_unregister_aead(&t_alg->algt.alg.aead);
|
||||
break;
|
||||
case CRYPTO_ALG_TYPE_AHASH:
|
||||
crypto_unregister_ahash(&t_alg->algt.alg.hash);
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2010-2017, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2010-2017, 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
|
||||
|
@ -150,6 +150,8 @@ void compute_work_load(struct devfreq_dev_status *stats,
|
|||
struct devfreq_msm_adreno_tz_data *priv,
|
||||
struct devfreq *devfreq)
|
||||
{
|
||||
u64 busy;
|
||||
|
||||
spin_lock(&sample_lock);
|
||||
/*
|
||||
* Keep collecting the stats till the client
|
||||
|
@ -157,8 +159,10 @@ void compute_work_load(struct devfreq_dev_status *stats,
|
|||
* is done when the entry is read
|
||||
*/
|
||||
acc_total += stats->total_time;
|
||||
acc_relative_busy += (stats->busy_time * stats->current_frequency) /
|
||||
devfreq->profile->freq_table[0];
|
||||
busy = (u64)stats->busy_time * stats->current_frequency;
|
||||
do_div(busy, devfreq->profile->freq_table[0]);
|
||||
acc_relative_busy += busy;
|
||||
|
||||
spin_unlock(&sample_lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -595,8 +595,10 @@ static int bcm2835_dma_probe(struct platform_device *pdev)
|
|||
pdev->dev.dma_mask = &pdev->dev.coherent_dma_mask;
|
||||
|
||||
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
|
||||
if (rc)
|
||||
if (rc) {
|
||||
dev_err(&pdev->dev, "Unable to set DMA mask\n");
|
||||
return rc;
|
||||
}
|
||||
|
||||
od = devm_kzalloc(&pdev->dev, sizeof(*od), GFP_KERNEL);
|
||||
if (!od)
|
||||
|
|
|
@ -2218,9 +2218,6 @@ static int edma_probe(struct platform_device *pdev)
|
|||
|
||||
ecc->default_queue = info->default_queue;
|
||||
|
||||
for (i = 0; i < ecc->num_slots; i++)
|
||||
edma_write_slot(ecc, i, &dummy_paramset);
|
||||
|
||||
if (info->rsv) {
|
||||
/* Set the reserved slots in inuse list */
|
||||
rsv_slots = info->rsv->rsv_slots;
|
||||
|
@ -2233,6 +2230,12 @@ static int edma_probe(struct platform_device *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ecc->num_slots; i++) {
|
||||
/* Reset only unused - not reserved - paRAM slots */
|
||||
if (!test_bit(i, ecc->slot_inuse))
|
||||
edma_write_slot(ecc, i, &dummy_paramset);
|
||||
}
|
||||
|
||||
/* Clear the xbar mapped channels in unused list */
|
||||
xbar_chans = info->xbar_chans;
|
||||
if (xbar_chans) {
|
||||
|
|
|
@ -126,9 +126,9 @@ static void __iop_adma_slot_cleanup(struct iop_adma_chan *iop_chan)
|
|||
list_for_each_entry_safe(iter, _iter, &iop_chan->chain,
|
||||
chain_node) {
|
||||
pr_debug("\tcookie: %d slot: %d busy: %d "
|
||||
"this_desc: %#x next_desc: %#x ack: %d\n",
|
||||
"this_desc: %#x next_desc: %#llx ack: %d\n",
|
||||
iter->async_tx.cookie, iter->idx, busy,
|
||||
iter->async_tx.phys, iop_desc_get_next_desc(iter),
|
||||
iter->async_tx.phys, (u64)iop_desc_get_next_desc(iter),
|
||||
async_tx_test_ack(&iter->async_tx));
|
||||
prefetch(_iter);
|
||||
prefetch(&_iter->async_tx);
|
||||
|
@ -316,9 +316,9 @@ retry:
|
|||
int i;
|
||||
dev_dbg(iop_chan->device->common.dev,
|
||||
"allocated slot: %d "
|
||||
"(desc %p phys: %#x) slots_per_op %d\n",
|
||||
"(desc %p phys: %#llx) slots_per_op %d\n",
|
||||
iter->idx, iter->hw_desc,
|
||||
iter->async_tx.phys, slots_per_op);
|
||||
(u64)iter->async_tx.phys, slots_per_op);
|
||||
|
||||
/* pre-ack all but the last descriptor */
|
||||
if (num_slots != slots_per_op)
|
||||
|
@ -526,7 +526,7 @@ iop_adma_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dma_dest,
|
|||
return NULL;
|
||||
BUG_ON(len > IOP_ADMA_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev, "%s len: %u\n",
|
||||
dev_dbg(iop_chan->device->common.dev, "%s len: %zu\n",
|
||||
__func__, len);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
|
@ -559,7 +559,7 @@ iop_adma_prep_dma_xor(struct dma_chan *chan, dma_addr_t dma_dest,
|
|||
BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev,
|
||||
"%s src_cnt: %d len: %u flags: %lx\n",
|
||||
"%s src_cnt: %d len: %zu flags: %lx\n",
|
||||
__func__, src_cnt, len, flags);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
|
@ -592,7 +592,7 @@ iop_adma_prep_dma_xor_val(struct dma_chan *chan, dma_addr_t *dma_src,
|
|||
if (unlikely(!len))
|
||||
return NULL;
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n",
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n",
|
||||
__func__, src_cnt, len);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
|
@ -630,7 +630,7 @@ iop_adma_prep_dma_pq(struct dma_chan *chan, dma_addr_t *dst, dma_addr_t *src,
|
|||
BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev,
|
||||
"%s src_cnt: %d len: %u flags: %lx\n",
|
||||
"%s src_cnt: %d len: %zu flags: %lx\n",
|
||||
__func__, src_cnt, len, flags);
|
||||
|
||||
if (dmaf_p_disabled_continue(flags))
|
||||
|
@ -693,7 +693,7 @@ iop_adma_prep_dma_pq_val(struct dma_chan *chan, dma_addr_t *pq, dma_addr_t *src,
|
|||
return NULL;
|
||||
BUG_ON(len > IOP_ADMA_XOR_MAX_BYTE_COUNT);
|
||||
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %u\n",
|
||||
dev_dbg(iop_chan->device->common.dev, "%s src_cnt: %d len: %zu\n",
|
||||
__func__, src_cnt, len);
|
||||
|
||||
spin_lock_bh(&iop_chan->lock);
|
||||
|
|
|
@ -384,6 +384,21 @@ static void cper_print_pcie(const char *pfx, const struct cper_sec_pcie *pcie,
|
|||
printk(
|
||||
"%s""bridge: secondary_status: 0x%04x, control: 0x%04x\n",
|
||||
pfx, pcie->bridge.secondary_status, pcie->bridge.control);
|
||||
|
||||
/* Fatal errors call __ghes_panic() before AER handler prints this */
|
||||
if ((pcie->validation_bits & CPER_PCIE_VALID_AER_INFO) &&
|
||||
(gdata->error_severity & CPER_SEV_FATAL)) {
|
||||
struct aer_capability_regs *aer;
|
||||
|
||||
aer = (struct aer_capability_regs *)pcie->aer_info;
|
||||
printk("%saer_uncor_status: 0x%08x, aer_uncor_mask: 0x%08x\n",
|
||||
pfx, aer->uncor_status, aer->uncor_mask);
|
||||
printk("%saer_uncor_severity: 0x%08x\n",
|
||||
pfx, aer->uncor_severity);
|
||||
printk("%sTLP Header: %08x %08x %08x %08x\n", pfx,
|
||||
aer->header_log.dw0, aer->header_log.dw1,
|
||||
aer->header_log.dw2, aer->header_log.dw3);
|
||||
}
|
||||
}
|
||||
|
||||
static void cper_estatus_print_section(
|
||||
|
|
|
@ -406,6 +406,9 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
|
|||
if (sh_num == AMDGPU_INFO_MMR_SH_INDEX_MASK)
|
||||
sh_num = 0xffffffff;
|
||||
|
||||
if (info->read_mmr_reg.count > 128)
|
||||
return -EINVAL;
|
||||
|
||||
regs = kmalloc_array(info->read_mmr_reg.count, sizeof(*regs), GFP_KERNEL);
|
||||
if (!regs)
|
||||
return -ENOMEM;
|
||||
|
|
|
@ -158,6 +158,9 @@ static struct edid_quirk {
|
|||
/* Medion MD 30217 PG */
|
||||
{ "MED", 0x7b8, EDID_QUIRK_PREFER_LARGE_75 },
|
||||
|
||||
/* Lenovo G50 */
|
||||
{ "SDC", 18514, EDID_QUIRK_FORCE_6BPC },
|
||||
|
||||
/* Panel in Samsung NP700G7A-S01PL notebook reports 6bpc */
|
||||
{ "SEC", 0xd033, EDID_QUIRK_FORCE_8BPC },
|
||||
|
||||
|
|
|
@ -326,6 +326,9 @@ static void output_poll_execute(struct work_struct *work)
|
|||
enum drm_connector_status old_status;
|
||||
bool repoll = false, changed;
|
||||
|
||||
if (!dev->mode_config.poll_enabled)
|
||||
return;
|
||||
|
||||
/* Pick up any changes detected by the probe functions. */
|
||||
changed = dev->mode_config.delayed_event;
|
||||
dev->mode_config.delayed_event = false;
|
||||
|
@ -489,7 +492,11 @@ EXPORT_SYMBOL(drm_kms_helper_poll_init);
|
|||
*/
|
||||
void drm_kms_helper_poll_fini(struct drm_device *dev)
|
||||
{
|
||||
drm_kms_helper_poll_disable(dev);
|
||||
if (!dev->mode_config.poll_enabled)
|
||||
return;
|
||||
|
||||
dev->mode_config.poll_enabled = false;
|
||||
cancel_delayed_work_sync(&dev->mode_config.output_poll_work);
|
||||
}
|
||||
EXPORT_SYMBOL(drm_kms_helper_poll_fini);
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@
|
|||
#include "msm_mmu.h"
|
||||
#include "edrm_kms.h"
|
||||
|
||||
static struct completion wait_display_completion;
|
||||
static bool msm_edrm_probed;
|
||||
|
||||
static int msm_edrm_unload(struct drm_device *dev)
|
||||
{
|
||||
struct msm_drm_private *priv = dev->dev_private;
|
||||
|
@ -331,8 +328,6 @@ static int msm_pdev_edrm_probe(struct platform_device *pdev)
|
|||
struct msm_drm_private *master_priv;
|
||||
struct msm_kms *master_kms;
|
||||
|
||||
msm_edrm_probed = true;
|
||||
|
||||
/* main DRM's minor ID is zero */
|
||||
minor = drm_minor_acquire(0);
|
||||
if (IS_ERR(minor)) {
|
||||
|
@ -372,7 +367,6 @@ static int msm_pdev_edrm_probe(struct platform_device *pdev)
|
|||
if (ret)
|
||||
DRM_ERROR("drm_platform_init failed: %d\n", ret);
|
||||
|
||||
complete(&wait_display_completion);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -414,20 +408,6 @@ static const struct of_device_id dt_match[] = {
|
|||
};
|
||||
MODULE_DEVICE_TABLE(of, dt_match);
|
||||
|
||||
static int find_match(struct device *dev, void *data)
|
||||
{
|
||||
struct device_driver *drv = data;
|
||||
|
||||
return drv->bus->match(dev, drv);
|
||||
}
|
||||
|
||||
static bool find_device(struct platform_driver *pdrv)
|
||||
{
|
||||
struct device_driver *drv = &pdrv->driver;
|
||||
|
||||
return bus_for_each_dev(drv->bus, NULL, drv, find_match);
|
||||
}
|
||||
|
||||
static struct platform_driver msm_platform_driver = {
|
||||
.probe = msm_pdev_edrm_probe,
|
||||
.remove = msm_pdev_edrm_remove,
|
||||
|
@ -443,7 +423,6 @@ static struct platform_driver msm_platform_driver = {
|
|||
static int __init msm_edrm_register(void)
|
||||
{
|
||||
DBG("init");
|
||||
init_completion(&wait_display_completion);
|
||||
return platform_driver_register(&msm_platform_driver);
|
||||
}
|
||||
|
||||
|
@ -453,22 +432,8 @@ static void __exit msm_edrm_unregister(void)
|
|||
platform_driver_unregister(&msm_platform_driver);
|
||||
}
|
||||
|
||||
static int __init msm_edrm_late_register(void)
|
||||
{
|
||||
struct platform_driver *pdrv;
|
||||
|
||||
pdrv = &msm_platform_driver;
|
||||
if (msm_edrm_probed || find_device(pdrv)) {
|
||||
pr_debug("wait for eDRM display probe completion\n");
|
||||
wait_for_completion(&wait_display_completion);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
module_init(msm_edrm_register);
|
||||
module_exit(msm_edrm_unregister);
|
||||
/* init level 7 */
|
||||
late_initcall(msm_edrm_late_register);
|
||||
|
||||
MODULE_DESCRIPTION("MSM EARLY DRM Driver");
|
||||
MODULE_LICENSE("GPL v2");
|
||||
|
|
|
@ -78,7 +78,12 @@ static ssize_t _sde_hdmi_debugfs_dump_info_read(struct file *file,
|
|||
if (!buf)
|
||||
return -ENOMEM;
|
||||
|
||||
len += snprintf(buf, SZ_4K, "name = %s\n", display->name);
|
||||
len += snprintf(buf, SZ_1K, "name = %s\n", display->name);
|
||||
|
||||
if (len > count) {
|
||||
kfree(buf);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
if (copy_to_user(buff, buf, len)) {
|
||||
kfree(buf);
|
||||
|
|
|
@ -758,7 +758,7 @@ static int radeon_connector_set_property(struct drm_connector *connector, struct
|
|||
|
||||
radeon_encoder->output_csc = val;
|
||||
|
||||
if (connector->encoder->crtc) {
|
||||
if (connector->encoder && connector->encoder->crtc) {
|
||||
struct drm_crtc *crtc = connector->encoder->crtc;
|
||||
const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
|
||||
struct radeon_crtc *radeon_crtc = to_radeon_crtc(crtc);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2013-2018, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2013-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
|
||||
|
@ -1405,6 +1405,22 @@ int adreno_dispatcher_queue_cmds(struct kgsl_device_private *dev_priv,
|
|||
|
||||
user_ts = *timestamp;
|
||||
|
||||
/*
|
||||
* If there is only one drawobj in the array and it is of
|
||||
* type SYNCOBJ_TYPE, skip comparing user_ts as it can be 0
|
||||
*/
|
||||
if (!(count == 1 && drawobj[0]->type == SYNCOBJ_TYPE) &&
|
||||
(drawctxt->base.flags & KGSL_CONTEXT_USER_GENERATED_TS)) {
|
||||
/*
|
||||
* User specified timestamps need to be greater than the last
|
||||
* issued timestamp in the context
|
||||
*/
|
||||
if (timestamp_cmp(drawctxt->timestamp, user_ts) >= 0) {
|
||||
spin_unlock(&drawctxt->lock);
|
||||
return -ERANGE;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < count; i++) {
|
||||
|
||||
switch (drawobj[i]->type) {
|
||||
|
|
|
@ -55,7 +55,6 @@ MODULE_PARM_DESC(swap_opt_cmd, "Swap the Option (\"Alt\") and Command (\"Flag\")
|
|||
struct apple_sc {
|
||||
unsigned long quirks;
|
||||
unsigned int fn_on;
|
||||
DECLARE_BITMAP(pressed_fn, KEY_CNT);
|
||||
DECLARE_BITMAP(pressed_numlock, KEY_CNT);
|
||||
};
|
||||
|
||||
|
@ -182,6 +181,8 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
|||
{
|
||||
struct apple_sc *asc = hid_get_drvdata(hid);
|
||||
const struct apple_key_translation *trans, *table;
|
||||
bool do_translate;
|
||||
u16 code = 0;
|
||||
|
||||
if (usage->code == KEY_FN) {
|
||||
asc->fn_on = !!value;
|
||||
|
@ -190,8 +191,6 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
|||
}
|
||||
|
||||
if (fnmode) {
|
||||
int do_translate;
|
||||
|
||||
if (hid->product >= USB_DEVICE_ID_APPLE_WELLSPRING4_ANSI &&
|
||||
hid->product <= USB_DEVICE_ID_APPLE_WELLSPRING4A_JIS)
|
||||
table = macbookair_fn_keys;
|
||||
|
@ -203,25 +202,33 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input,
|
|||
trans = apple_find_translation (table, usage->code);
|
||||
|
||||
if (trans) {
|
||||
if (test_bit(usage->code, asc->pressed_fn))
|
||||
do_translate = 1;
|
||||
else if (trans->flags & APPLE_FLAG_FKEY)
|
||||
do_translate = (fnmode == 2 && asc->fn_on) ||
|
||||
(fnmode == 1 && !asc->fn_on);
|
||||
else
|
||||
do_translate = asc->fn_on;
|
||||
if (test_bit(trans->from, input->key))
|
||||
code = trans->from;
|
||||
else if (test_bit(trans->to, input->key))
|
||||
code = trans->to;
|
||||
|
||||
if (do_translate) {
|
||||
if (value)
|
||||
set_bit(usage->code, asc->pressed_fn);
|
||||
else
|
||||
clear_bit(usage->code, asc->pressed_fn);
|
||||
if (!code) {
|
||||
if (trans->flags & APPLE_FLAG_FKEY) {
|
||||
switch (fnmode) {
|
||||
case 1:
|
||||
do_translate = !asc->fn_on;
|
||||
break;
|
||||
case 2:
|
||||
do_translate = asc->fn_on;
|
||||
break;
|
||||
default:
|
||||
/* should never happen */
|
||||
do_translate = false;
|
||||
}
|
||||
} else {
|
||||
do_translate = asc->fn_on;
|
||||
}
|
||||
|
||||
input_event(input, usage->type, trans->to,
|
||||
value);
|
||||
|
||||
return 1;
|
||||
code = do_translate ? trans->to : trans->from;
|
||||
}
|
||||
|
||||
input_event(input, usage->type, code, value);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (asc->quirks & APPLE_NUMLOCK_EMULATION &&
|
||||
|
|
|
@ -200,13 +200,22 @@ static unsigned hid_lookup_collection(struct hid_parser *parser, unsigned type)
|
|||
* Add a usage to the temporary parser table.
|
||||
*/
|
||||
|
||||
static int hid_add_usage(struct hid_parser *parser, unsigned usage)
|
||||
static int hid_add_usage(struct hid_parser *parser, unsigned usage, u8 size)
|
||||
{
|
||||
if (parser->local.usage_index >= HID_MAX_USAGES) {
|
||||
hid_err(parser->device, "usage index exceeded\n");
|
||||
return -1;
|
||||
}
|
||||
parser->local.usage[parser->local.usage_index] = usage;
|
||||
if (!parser->local.usage_index && parser->global.usage_page)
|
||||
parser->local.usage_page_preceding = 1;
|
||||
if (parser->local.usage_page_preceding == 2)
|
||||
parser->local.usage_page_preceding = 3;
|
||||
if (size <= 2 && parser->global.usage_page)
|
||||
parser->local.usage[parser->local.usage_index] =
|
||||
(usage & 0xffff) + (parser->global.usage_page << 16);
|
||||
else
|
||||
parser->local.usage[parser->local.usage_index] = usage;
|
||||
parser->local.usage_size[parser->local.usage_index] = size;
|
||||
parser->local.collection_index[parser->local.usage_index] =
|
||||
parser->collection_stack_ptr ?
|
||||
parser->collection_stack[parser->collection_stack_ptr - 1] : 0;
|
||||
|
@ -345,6 +354,8 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)
|
|||
|
||||
case HID_GLOBAL_ITEM_TAG_USAGE_PAGE:
|
||||
parser->global.usage_page = item_udata(item);
|
||||
if (parser->local.usage_page_preceding == 1)
|
||||
parser->local.usage_page_preceding = 2;
|
||||
return 0;
|
||||
|
||||
case HID_GLOBAL_ITEM_TAG_LOGICAL_MINIMUM:
|
||||
|
@ -463,10 +474,7 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (item->size <= 2)
|
||||
data = (parser->global.usage_page << 16) + data;
|
||||
|
||||
return hid_add_usage(parser, data);
|
||||
return hid_add_usage(parser, data, item->size);
|
||||
|
||||
case HID_LOCAL_ITEM_TAG_USAGE_MINIMUM:
|
||||
|
||||
|
@ -475,9 +483,6 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (item->size <= 2)
|
||||
data = (parser->global.usage_page << 16) + data;
|
||||
|
||||
parser->local.usage_minimum = data;
|
||||
return 0;
|
||||
|
||||
|
@ -488,9 +493,6 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (item->size <= 2)
|
||||
data = (parser->global.usage_page << 16) + data;
|
||||
|
||||
count = data - parser->local.usage_minimum;
|
||||
if (count + parser->local.usage_index >= HID_MAX_USAGES) {
|
||||
/*
|
||||
|
@ -510,7 +512,7 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
|
|||
}
|
||||
|
||||
for (n = parser->local.usage_minimum; n <= data; n++)
|
||||
if (hid_add_usage(parser, n)) {
|
||||
if (hid_add_usage(parser, n, item->size)) {
|
||||
dbg_hid("hid_add_usage failed\n");
|
||||
return -1;
|
||||
}
|
||||
|
@ -524,6 +526,29 @@ static int hid_parser_local(struct hid_parser *parser, struct hid_item *item)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Concatenate Usage Pages into Usages where relevant:
|
||||
* As per specification, 6.2.2.8: "When the parser encounters a main item it
|
||||
* concatenates the last declared Usage Page with a Usage to form a complete
|
||||
* usage value."
|
||||
*/
|
||||
|
||||
static void hid_concatenate_usage_page(struct hid_parser *parser)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (parser->local.usage_page_preceding == 3) {
|
||||
dbg_hid("Using preceding usage page for final usage\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < parser->local.usage_index; i++)
|
||||
if (parser->local.usage_size[i] <= 2)
|
||||
parser->local.usage[i] =
|
||||
(parser->global.usage_page << 16)
|
||||
+ (parser->local.usage[i] & 0xffff);
|
||||
}
|
||||
|
||||
/*
|
||||
* Process a main item.
|
||||
*/
|
||||
|
@ -533,6 +558,8 @@ static int hid_parser_main(struct hid_parser *parser, struct hid_item *item)
|
|||
__u32 data;
|
||||
int ret;
|
||||
|
||||
hid_concatenate_usage_page(parser);
|
||||
|
||||
data = item_udata(item);
|
||||
|
||||
switch (item->tag) {
|
||||
|
@ -746,6 +773,8 @@ static int hid_scan_main(struct hid_parser *parser, struct hid_item *item)
|
|||
__u32 data;
|
||||
int i;
|
||||
|
||||
hid_concatenate_usage_page(parser);
|
||||
|
||||
data = item_udata(item);
|
||||
|
||||
switch (item->tag) {
|
||||
|
|
|
@ -701,11 +701,16 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
|||
|
||||
/* Setup wireless link with Logitech Wii wheel */
|
||||
if (hdev->product == USB_DEVICE_ID_LOGITECH_WII_WHEEL) {
|
||||
unsigned char buf[] = { 0x00, 0xAF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
const unsigned char cbuf[] = { 0x00, 0xAF, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
u8 *buf = kmemdup(cbuf, sizeof(cbuf), GFP_KERNEL);
|
||||
|
||||
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
|
||||
if (!buf) {
|
||||
ret = -ENOMEM;
|
||||
goto err_stop;
|
||||
}
|
||||
|
||||
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(cbuf),
|
||||
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
|
||||
|
||||
if (ret >= 0) {
|
||||
/* insert a little delay of 10 jiffies ~ 40ms */
|
||||
wait_queue_head_t wait;
|
||||
|
@ -717,9 +722,10 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
|||
buf[1] = 0xB2;
|
||||
get_random_bytes(&buf[2], 2);
|
||||
|
||||
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(buf),
|
||||
ret = hid_hw_raw_request(hdev, buf[0], buf, sizeof(cbuf),
|
||||
HID_FEATURE_REPORT, HID_REQ_SET_REPORT);
|
||||
}
|
||||
kfree(buf);
|
||||
}
|
||||
|
||||
if (drv_data->quirks & LG_FF)
|
||||
|
@ -732,9 +738,12 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
|||
ret = lg4ff_init(hdev);
|
||||
|
||||
if (ret)
|
||||
goto err_free;
|
||||
goto err_stop;
|
||||
|
||||
return 0;
|
||||
|
||||
err_stop:
|
||||
hid_hw_stop(hdev);
|
||||
err_free:
|
||||
kfree(drv_data);
|
||||
return ret;
|
||||
|
@ -745,8 +754,7 @@ static void lg_remove(struct hid_device *hdev)
|
|||
struct lg_drv_data *drv_data = hid_get_drvdata(hdev);
|
||||
if (drv_data->quirks & LG_FF4)
|
||||
lg4ff_deinit(hdev);
|
||||
else
|
||||
hid_hw_stop(hdev);
|
||||
hid_hw_stop(hdev);
|
||||
kfree(drv_data);
|
||||
}
|
||||
|
||||
|
|
|
@ -1378,7 +1378,6 @@ int lg4ff_deinit(struct hid_device *hid)
|
|||
}
|
||||
}
|
||||
#endif
|
||||
hid_hw_stop(hid);
|
||||
drv_data->device_props = NULL;
|
||||
|
||||
kfree(entry);
|
||||
|
|
|
@ -556,10 +556,14 @@ static void pcmidi_setup_extra_keys(
|
|||
|
||||
static int pcmidi_set_operational(struct pcmidi_snd *pm)
|
||||
{
|
||||
int rc;
|
||||
|
||||
if (pm->ifnum != 1)
|
||||
return 0; /* only set up ONCE for interace 1 */
|
||||
|
||||
pcmidi_get_output_report(pm);
|
||||
rc = pcmidi_get_output_report(pm);
|
||||
if (rc < 0)
|
||||
return rc;
|
||||
pcmidi_submit_output_report(pm, 0xc1);
|
||||
return 0;
|
||||
}
|
||||
|
@ -688,7 +692,11 @@ static int pcmidi_snd_initialise(struct pcmidi_snd *pm)
|
|||
spin_lock_init(&pm->rawmidi_in_lock);
|
||||
|
||||
init_sustain_timers(pm);
|
||||
pcmidi_set_operational(pm);
|
||||
err = pcmidi_set_operational(pm);
|
||||
if (err < 0) {
|
||||
pk_error("failed to find output report\n");
|
||||
goto fail_register;
|
||||
}
|
||||
|
||||
/* register it */
|
||||
err = snd_card_register(card);
|
||||
|
|
|
@ -383,7 +383,7 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd,
|
|||
|
||||
mutex_lock(&minors_lock);
|
||||
dev = hidraw_table[minor];
|
||||
if (!dev) {
|
||||
if (!dev || !dev->exist) {
|
||||
ret = -ENODEV;
|
||||
goto out;
|
||||
}
|
||||
|
|
|
@ -693,8 +693,8 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
|
|||
|
||||
if (resource->caps.flags & POWER_METER_CAN_CAP) {
|
||||
if (!can_cap_in_hardware()) {
|
||||
dev_err(&resource->acpi_dev->dev,
|
||||
"Ignoring unsafe software power cap!\n");
|
||||
dev_warn(&resource->acpi_dev->dev,
|
||||
"Ignoring unsafe software power cap!\n");
|
||||
goto skip_unsafe_cap;
|
||||
}
|
||||
|
||||
|
|
|
@ -212,6 +212,7 @@ static irqreturn_t riic_tend_isr(int irq, void *data)
|
|||
if (readb(riic->base + RIIC_ICSR2) & ICSR2_NACKF) {
|
||||
/* We got a NACKIE */
|
||||
readb(riic->base + RIIC_ICDRR); /* dummy read */
|
||||
riic_clear_set_bit(riic, ICSR2_NACKF, 0, RIIC_ICSR2);
|
||||
riic->err = -ENXIO;
|
||||
} else if (riic->bytes_left) {
|
||||
return IRQ_NONE;
|
||||
|
|
|
@ -822,10 +822,10 @@ static int ad799x_probe(struct i2c_client *client,
|
|||
|
||||
ret = ad799x_write_config(st, st->chip_config->default_config);
|
||||
if (ret < 0)
|
||||
goto error_disable_reg;
|
||||
goto error_disable_vref;
|
||||
ret = ad799x_read_config(st);
|
||||
if (ret < 0)
|
||||
goto error_disable_reg;
|
||||
goto error_disable_vref;
|
||||
st->config = ret;
|
||||
|
||||
ret = iio_triggered_buffer_setup(indio_dev, NULL,
|
||||
|
|
|
@ -646,6 +646,7 @@ static irqreturn_t opt3001_irq(int irq, void *_iio)
|
|||
struct iio_dev *iio = _iio;
|
||||
struct opt3001 *opt = iio_priv(iio);
|
||||
int ret;
|
||||
bool wake_result_ready_queue = false;
|
||||
|
||||
if (!opt->ok_to_ignore_lock)
|
||||
mutex_lock(&opt->lock);
|
||||
|
@ -680,13 +681,16 @@ static irqreturn_t opt3001_irq(int irq, void *_iio)
|
|||
}
|
||||
opt->result = ret;
|
||||
opt->result_ready = true;
|
||||
wake_up(&opt->result_ready_queue);
|
||||
wake_result_ready_queue = true;
|
||||
}
|
||||
|
||||
out:
|
||||
if (!opt->ok_to_ignore_lock)
|
||||
mutex_unlock(&opt->lock);
|
||||
|
||||
if (wake_result_ready_queue)
|
||||
wake_up(&opt->result_ready_queue);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
@ -254,13 +254,17 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
|
|||
u64 len, u8 page_size, u32 pbl_size, u32 pbl_addr)
|
||||
{
|
||||
int err;
|
||||
struct fw_ri_tpte tpt;
|
||||
struct fw_ri_tpte *tpt;
|
||||
u32 stag_idx;
|
||||
static atomic_t key;
|
||||
|
||||
if (c4iw_fatal_error(rdev))
|
||||
return -EIO;
|
||||
|
||||
tpt = kmalloc(sizeof(*tpt), GFP_KERNEL);
|
||||
if (!tpt)
|
||||
return -ENOMEM;
|
||||
|
||||
stag_state = stag_state > 0;
|
||||
stag_idx = (*stag) >> 8;
|
||||
|
||||
|
@ -270,6 +274,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
|
|||
mutex_lock(&rdev->stats.lock);
|
||||
rdev->stats.stag.fail++;
|
||||
mutex_unlock(&rdev->stats.lock);
|
||||
kfree(tpt);
|
||||
return -ENOMEM;
|
||||
}
|
||||
mutex_lock(&rdev->stats.lock);
|
||||
|
@ -284,28 +289,28 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
|
|||
|
||||
/* write TPT entry */
|
||||
if (reset_tpt_entry)
|
||||
memset(&tpt, 0, sizeof(tpt));
|
||||
memset(tpt, 0, sizeof(*tpt));
|
||||
else {
|
||||
tpt.valid_to_pdid = cpu_to_be32(FW_RI_TPTE_VALID_F |
|
||||
tpt->valid_to_pdid = cpu_to_be32(FW_RI_TPTE_VALID_F |
|
||||
FW_RI_TPTE_STAGKEY_V((*stag & FW_RI_TPTE_STAGKEY_M)) |
|
||||
FW_RI_TPTE_STAGSTATE_V(stag_state) |
|
||||
FW_RI_TPTE_STAGTYPE_V(type) | FW_RI_TPTE_PDID_V(pdid));
|
||||
tpt.locread_to_qpid = cpu_to_be32(FW_RI_TPTE_PERM_V(perm) |
|
||||
tpt->locread_to_qpid = cpu_to_be32(FW_RI_TPTE_PERM_V(perm) |
|
||||
(bind_enabled ? FW_RI_TPTE_MWBINDEN_F : 0) |
|
||||
FW_RI_TPTE_ADDRTYPE_V((zbva ? FW_RI_ZERO_BASED_TO :
|
||||
FW_RI_VA_BASED_TO))|
|
||||
FW_RI_TPTE_PS_V(page_size));
|
||||
tpt.nosnoop_pbladdr = !pbl_size ? 0 : cpu_to_be32(
|
||||
tpt->nosnoop_pbladdr = !pbl_size ? 0 : cpu_to_be32(
|
||||
FW_RI_TPTE_PBLADDR_V(PBL_OFF(rdev, pbl_addr)>>3));
|
||||
tpt.len_lo = cpu_to_be32((u32)(len & 0xffffffffUL));
|
||||
tpt.va_hi = cpu_to_be32((u32)(to >> 32));
|
||||
tpt.va_lo_fbo = cpu_to_be32((u32)(to & 0xffffffffUL));
|
||||
tpt.dca_mwbcnt_pstag = cpu_to_be32(0);
|
||||
tpt.len_hi = cpu_to_be32((u32)(len >> 32));
|
||||
tpt->len_lo = cpu_to_be32((u32)(len & 0xffffffffUL));
|
||||
tpt->va_hi = cpu_to_be32((u32)(to >> 32));
|
||||
tpt->va_lo_fbo = cpu_to_be32((u32)(to & 0xffffffffUL));
|
||||
tpt->dca_mwbcnt_pstag = cpu_to_be32(0);
|
||||
tpt->len_hi = cpu_to_be32((u32)(len >> 32));
|
||||
}
|
||||
err = write_adapter_mem(rdev, stag_idx +
|
||||
(rdev->lldi.vr->stag.start >> 5),
|
||||
sizeof(tpt), &tpt);
|
||||
sizeof(*tpt), tpt);
|
||||
|
||||
if (reset_tpt_entry) {
|
||||
c4iw_put_resource(&rdev->resource.tpt_table, stag_idx);
|
||||
|
@ -313,6 +318,7 @@ static int write_tpt_entry(struct c4iw_rdev *rdev, u32 reset_tpt_entry,
|
|||
rdev->stats.stag.cur -= 32;
|
||||
mutex_unlock(&rdev->stats.lock);
|
||||
}
|
||||
kfree(tpt);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -1372,14 +1372,13 @@ static void its_irq_domain_free(struct irq_domain *domain, unsigned int virq,
|
|||
struct its_device *its_dev = irq_data_get_irq_chip_data(d);
|
||||
int i;
|
||||
|
||||
bitmap_release_region(its_dev->event_map.lpi_map,
|
||||
its_get_event_id(irq_domain_get_irq_data(domain, virq)),
|
||||
get_count_order(nr_irqs));
|
||||
|
||||
for (i = 0; i < nr_irqs; i++) {
|
||||
struct irq_data *data = irq_domain_get_irq_data(domain,
|
||||
virq + i);
|
||||
u32 event = its_get_event_id(data);
|
||||
|
||||
/* Mark interrupt index as unused */
|
||||
clear_bit(event, its_dev->event_map.lpi_map);
|
||||
|
||||
/* Nuke the entry in the domain */
|
||||
irq_domain_reset_irq_data(data);
|
||||
}
|
||||
|
|
|
@ -763,6 +763,8 @@ base_sock_create(struct net *net, struct socket *sock, int protocol, int kern)
|
|||
|
||||
if (sock->type != SOCK_RAW)
|
||||
return -ESOCKTNOSUPPORT;
|
||||
if (!capable(CAP_NET_RAW))
|
||||
return -EPERM;
|
||||
|
||||
sk = sk_alloc(net, PF_ISDN, GFP_KERNEL, &mISDN_proto, kern);
|
||||
if (!sk)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue