This is the 4.9.135 stable release
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAlvK3oUACgkQONu9yGCS aT5B6g/+PWLmbE2+6OEFwQ95zE/F1pLIqhrcgX3Vj4uJJoAnFP6US2WUzbO3T1CU EHQG3pllgLvKtNM/txNdNRdr4RI7qv6NJ8XSdl+64PPClMGbIiSVwKtnwut82tdR LAJoscg9ckZ3voxkSHScd+OAqFvxaR5Wu12Fzknordd0CygSov8jk32QdK1lsDPm xFQcH0UaU7HUGGXfZVryYaoG6cF7E9AKy+NQI3lIOmYZrUNPdP/XnW+kc3BqfZiL E4ARYS2zvUwXPL/tXFEd/Eph5+6cb6XZl02Pp70FCcsZwNiHktEvmBOSUPI44Ax0 OSyQrnYZUc0NT6lz9bNQKvtMnpK+cyqS7XycWlU267o30vGR9JVfwgTL3nfL34Tv dTteUTowWzGOgDYSqhCEBhNl42YNGqIyVRBB/vLY0NKoZchvxrk3ehADB6pc5vQM bvBCdT1VO7YTQFcVzRVzs8Z2hqswEfdo6Jf+ga7HPHmo7Z2CnQXHAehtBq4mxw8r RZ0ZytFY8WctwlwJ8SmRJSuZqbDXiFXDHvJDRI42Dw0Eamso/yNwW6XwzaKK3I8A 1uzQ1zL3wymDIvbTIs91b+8FY0MkjA/inQ0ihZwM7lWDfweZvkrNk1v7q74w/6iK RURTqu3H7+JRUPcrG/4irpea0AQjIkFhZbA0QRTHoJCDbJhBYcM= =hBl5 -----END PGP SIGNATURE----- Merge 4.9.135 into android-4.9 Changes in 4.9.135 media: af9035: prevent buffer overflow on write batman-adv: Fix segfault when writing to throughput_override batman-adv: Fix segfault when writing to sysfs elp_interval batman-adv: Prevent duplicated nc_node entry batman-adv: Prevent duplicated softif_vlan entry batman-adv: Prevent duplicated global TT entry batman-adv: Prevent duplicated tvlv handler batman-adv: fix backbone_gw refcount on queue_work() failure batman-adv: fix hardif_neigh refcount on queue_work() failure clocksource/drivers/ti-32k: Add CLOCK_SOURCE_SUSPEND_NONSTOP flag for non-am43 SoCs scsi: ibmvscsis: Fix a stringop-overflow warning scsi: ibmvscsis: Ensure partition name is properly NUL terminated Input: atakbd - fix Atari keymap Input: atakbd - fix Atari CapsLock behaviour ravb: do not write 1 to reserved bits drm: mali-dp: Call drm_crtc_vblank_reset on device init scsi: sd: don't crash the host on invalid commands net/mlx4: Use cpumask_available for eq->affinity_mask powerpc/tm: Fix userspace r13 corruption powerpc/tm: Avoid possible userspace r1 corruption on reclaim iommu/amd: Return devid as alias for ACPI HID devices mremap: properly flush TLB before releasing the page mm: Preserve _PAGE_DEVMAP across mprotect() calls netfilter: check for seqadj ext existence before adding it in nf_nat_setup_info ARC: build: Get rid of toolchain check ARC: build: Don't set CROSS_COMPILE in arch's Makefile HID: quirks: fix support for Apple Magic Keyboards usb: gadget: serial: fix oops when data rx'd after close sched/cputime: Convert kcpustat to nsecs macintosh/rack-meter: Convert cputime64_t use to u64 sched/cputime: Increment kcpustat directly on irqtime account sched/cputime: Fix ksoftirqd cputime accounting regression ext4: avoid running out of journal credits when appending to an inline file HV: properly delay KVP packets when negotiation is in progress Linux 4.9.135 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
commit
03fcc2fe71
42 changed files with 295 additions and 322 deletions
2
Makefile
2
Makefile
|
|
@ -1,6 +1,6 @@
|
|||
VERSION = 4
|
||||
PATCHLEVEL = 9
|
||||
SUBLEVEL = 134
|
||||
SUBLEVEL = 135
|
||||
EXTRAVERSION =
|
||||
NAME = Roaring Lionus
|
||||
|
||||
|
|
|
|||
|
|
@ -8,34 +8,12 @@
|
|||
|
||||
UTS_MACHINE := arc
|
||||
|
||||
ifeq ($(CROSS_COMPILE),)
|
||||
ifndef CONFIG_CPU_BIG_ENDIAN
|
||||
CROSS_COMPILE := arc-linux-
|
||||
else
|
||||
CROSS_COMPILE := arceb-linux-
|
||||
endif
|
||||
endif
|
||||
|
||||
KBUILD_DEFCONFIG := nsim_700_defconfig
|
||||
|
||||
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
|
||||
cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
|
||||
cflags-$(CONFIG_ISA_ARCV2) += -mcpu=archs
|
||||
|
||||
is_700 = $(shell $(CC) -dM -E - < /dev/null | grep -q "ARC700" && echo 1 || echo 0)
|
||||
|
||||
ifdef CONFIG_ISA_ARCOMPACT
|
||||
ifeq ($(is_700), 0)
|
||||
$(error Toolchain not configured for ARCompact builds)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_ISA_ARCV2
|
||||
ifeq ($(is_700), 1)
|
||||
$(error Toolchain not configured for ARCv2 builds)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_ARC_CURR_IN_REG
|
||||
# For a global register defintion, make sure it gets passed to every file
|
||||
# We had a customer reported bug where some code built in kernel was NOT using
|
||||
|
|
@ -89,7 +67,7 @@ ldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
|
|||
# --build-id w/o "-marclinux". Default arc-elf32-ld is OK
|
||||
ldflags-$(upto_gcc44) += -marclinux
|
||||
|
||||
LIBGCC := $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
|
||||
LIBGCC = $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
|
||||
|
||||
# Modules with short calls might break for calls into builtin-kernel
|
||||
KBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode
|
||||
|
|
|
|||
|
|
@ -166,13 +166,27 @@ _GLOBAL(tm_reclaim)
|
|||
std r1, PACATMSCRATCH(r13)
|
||||
ld r1, PACAR1(r13)
|
||||
|
||||
/* Store the PPR in r11 and reset to decent value */
|
||||
std r11, GPR11(r1) /* Temporary stash */
|
||||
|
||||
/*
|
||||
* Move the saved user r1 to the kernel stack in case PACATMSCRATCH is
|
||||
* clobbered by an exception once we turn on MSR_RI below.
|
||||
*/
|
||||
ld r11, PACATMSCRATCH(r13)
|
||||
std r11, GPR1(r1)
|
||||
|
||||
/*
|
||||
* Store r13 away so we can free up the scratch SPR for the SLB fault
|
||||
* handler (needed once we start accessing the thread_struct).
|
||||
*/
|
||||
GET_SCRATCH0(r11)
|
||||
std r11, GPR13(r1)
|
||||
|
||||
/* Reset MSR RI so we can take SLB faults again */
|
||||
li r11, MSR_RI
|
||||
mtmsrd r11, 1
|
||||
|
||||
/* Store the PPR in r11 and reset to decent value */
|
||||
mfspr r11, SPRN_PPR
|
||||
HMT_MEDIUM
|
||||
|
||||
|
|
@ -197,11 +211,11 @@ _GLOBAL(tm_reclaim)
|
|||
SAVE_GPR(8, r7) /* user r8 */
|
||||
SAVE_GPR(9, r7) /* user r9 */
|
||||
SAVE_GPR(10, r7) /* user r10 */
|
||||
ld r3, PACATMSCRATCH(r13) /* user r1 */
|
||||
ld r3, GPR1(r1) /* user r1 */
|
||||
ld r4, GPR7(r1) /* user r7 */
|
||||
ld r5, GPR11(r1) /* user r11 */
|
||||
ld r6, GPR12(r1) /* user r12 */
|
||||
GET_SCRATCH0(8) /* user r13 */
|
||||
ld r8, GPR13(r1) /* user r13 */
|
||||
std r3, GPR1(r7)
|
||||
std r4, GPR7(r7)
|
||||
std r5, GPR11(r7)
|
||||
|
|
|
|||
|
|
@ -113,21 +113,21 @@ static void appldata_get_os_data(void *data)
|
|||
j = 0;
|
||||
for_each_online_cpu(i) {
|
||||
os_data->os_cpu[j].per_cpu_user =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_USER]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_USER]);
|
||||
os_data->os_cpu[j].per_cpu_nice =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_NICE]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_NICE]);
|
||||
os_data->os_cpu[j].per_cpu_system =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_SYSTEM]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_SYSTEM]);
|
||||
os_data->os_cpu[j].per_cpu_idle =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_IDLE]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_IDLE]);
|
||||
os_data->os_cpu[j].per_cpu_irq =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_IRQ]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_IRQ]);
|
||||
os_data->os_cpu[j].per_cpu_softirq =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_SOFTIRQ]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_SOFTIRQ]);
|
||||
os_data->os_cpu[j].per_cpu_iowait =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_IOWAIT]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_IOWAIT]);
|
||||
os_data->os_cpu[j].per_cpu_steal =
|
||||
cputime_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_STEAL]);
|
||||
nsecs_to_jiffies(kcpustat_cpu(i).cpustat[CPUTIME_STEAL]);
|
||||
os_data->os_cpu[j].cpu_id = i;
|
||||
j++;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@
|
|||
*/
|
||||
#define _PAGE_CHG_MASK (PTE_PFN_MASK | _PAGE_PCD | _PAGE_PWT | \
|
||||
_PAGE_SPECIAL | _PAGE_ACCESSED | _PAGE_DIRTY | \
|
||||
_PAGE_SOFT_DIRTY)
|
||||
_PAGE_SOFT_DIRTY | _PAGE_DEVMAP)
|
||||
#define _HPAGE_CHG_MASK (_PAGE_CHG_MASK | _PAGE_PSE)
|
||||
|
||||
/* The ASID is the lower 12 bits of CR3 */
|
||||
|
|
|
|||
|
|
@ -98,6 +98,9 @@ static int __init ti_32k_timer_init(struct device_node *np)
|
|||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (!of_machine_is_compatible("ti,am43"))
|
||||
ti_32k_timer.cs.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP;
|
||||
|
||||
ti_32k_timer.counter = ti_32k_timer.base;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall)
|
|||
u64 cur_wall_time;
|
||||
u64 busy_time;
|
||||
|
||||
cur_wall_time = jiffies64_to_cputime64(get_jiffies_64());
|
||||
cur_wall_time = jiffies64_to_nsecs(get_jiffies_64());
|
||||
|
||||
busy_time = kcpustat_cpu(cpu).cpustat[CPUTIME_USER];
|
||||
busy_time += kcpustat_cpu(cpu).cpustat[CPUTIME_SYSTEM];
|
||||
|
|
@ -153,9 +153,9 @@ static inline u64 get_cpu_idle_time_jiffy(unsigned int cpu, u64 *wall)
|
|||
|
||||
idle_time = cur_wall_time - busy_time;
|
||||
if (wall)
|
||||
*wall = cputime_to_usecs(cur_wall_time);
|
||||
*wall = div_u64(cur_wall_time, NSEC_PER_USEC);
|
||||
|
||||
return cputime_to_usecs(idle_time);
|
||||
return div_u64(idle_time, NSEC_PER_USEC);
|
||||
}
|
||||
|
||||
u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy)
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ unsigned int dbs_update(struct cpufreq_policy *policy)
|
|||
if (ignore_nice) {
|
||||
u64 cur_nice = kcpustat_cpu(j).cpustat[CPUTIME_NICE];
|
||||
|
||||
idle_time += cputime_to_usecs(cur_nice - j_cdbs->prev_cpu_nice);
|
||||
idle_time += div_u64(cur_nice - j_cdbs->prev_cpu_nice, NSEC_PER_USEC);
|
||||
j_cdbs->prev_cpu_nice = cur_nice;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <linux/cpufreq.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/cputime.h>
|
||||
|
||||
static DEFINE_SPINLOCK(cpufreq_stats_lock);
|
||||
|
||||
|
|
|
|||
|
|
@ -378,6 +378,7 @@ static int malidp_bind(struct device *dev)
|
|||
goto irq_init_fail;
|
||||
|
||||
ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
|
||||
drm_crtc_vblank_reset(&malidp->crtc);
|
||||
if (ret < 0) {
|
||||
DRM_ERROR("failed to initialise vblank\n");
|
||||
goto vblank_fail;
|
||||
|
|
|
|||
|
|
@ -1853,6 +1853,9 @@ static const struct hid_device_id hid_have_special_driver[] = {
|
|||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_ISO) },
|
||||
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2011_JIS) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) },
|
||||
{ HID_BLUETOOTH_DEVICE(BT_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MAGIC_KEYBOARD_NUMPAD_ANSI) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
|
||||
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
|
||||
{ HID_I2C_DEVICE(USB_VENDOR_ID_ASUSTEK, USB_DEVICE_ID_ASUSTEK_NOTEBOOK_KEYBOARD) },
|
||||
|
|
|
|||
|
|
@ -616,21 +616,22 @@ void hv_kvp_onchannelcallback(void *context)
|
|||
NEGO_IN_PROGRESS,
|
||||
NEGO_FINISHED} host_negotiatied = NEGO_NOT_STARTED;
|
||||
|
||||
if (host_negotiatied == NEGO_NOT_STARTED &&
|
||||
kvp_transaction.state < HVUTIL_READY) {
|
||||
if (kvp_transaction.state < HVUTIL_READY) {
|
||||
/*
|
||||
* If userspace daemon is not connected and host is asking
|
||||
* us to negotiate we need to delay to not lose messages.
|
||||
* This is important for Failover IP setting.
|
||||
*/
|
||||
host_negotiatied = NEGO_IN_PROGRESS;
|
||||
schedule_delayed_work(&kvp_host_handshake_work,
|
||||
if (host_negotiatied == NEGO_NOT_STARTED) {
|
||||
host_negotiatied = NEGO_IN_PROGRESS;
|
||||
schedule_delayed_work(&kvp_host_handshake_work,
|
||||
HV_UTIL_NEGO_TIMEOUT * HZ);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (kvp_transaction.state > HVUTIL_READY)
|
||||
return;
|
||||
|
||||
recheck:
|
||||
vmbus_recvpacket(channel, recv_buffer, PAGE_SIZE * 4, &recvlen,
|
||||
&requestid);
|
||||
|
||||
|
|
@ -707,6 +708,8 @@ void hv_kvp_onchannelcallback(void *context)
|
|||
VM_PKT_DATA_INBAND, 0);
|
||||
|
||||
host_negotiatied = NEGO_FINISHED;
|
||||
|
||||
goto recheck;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ MODULE_LICENSE("GPL");
|
|||
*/
|
||||
|
||||
|
||||
static unsigned char atakbd_keycode[0x72] = { /* American layout */
|
||||
[0] = KEY_GRAVE,
|
||||
static unsigned char atakbd_keycode[0x73] = { /* American layout */
|
||||
[1] = KEY_ESC,
|
||||
[2] = KEY_1,
|
||||
[3] = KEY_2,
|
||||
|
|
@ -121,9 +120,9 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */
|
|||
[38] = KEY_L,
|
||||
[39] = KEY_SEMICOLON,
|
||||
[40] = KEY_APOSTROPHE,
|
||||
[41] = KEY_BACKSLASH, /* FIXME, '#' */
|
||||
[41] = KEY_GRAVE,
|
||||
[42] = KEY_LEFTSHIFT,
|
||||
[43] = KEY_GRAVE, /* FIXME: '~' */
|
||||
[43] = KEY_BACKSLASH,
|
||||
[44] = KEY_Z,
|
||||
[45] = KEY_X,
|
||||
[46] = KEY_C,
|
||||
|
|
@ -149,45 +148,34 @@ static unsigned char atakbd_keycode[0x72] = { /* American layout */
|
|||
[66] = KEY_F8,
|
||||
[67] = KEY_F9,
|
||||
[68] = KEY_F10,
|
||||
[69] = KEY_ESC,
|
||||
[70] = KEY_DELETE,
|
||||
[71] = KEY_KP7,
|
||||
[72] = KEY_KP8,
|
||||
[73] = KEY_KP9,
|
||||
[71] = KEY_HOME,
|
||||
[72] = KEY_UP,
|
||||
[74] = KEY_KPMINUS,
|
||||
[75] = KEY_KP4,
|
||||
[76] = KEY_KP5,
|
||||
[77] = KEY_KP6,
|
||||
[75] = KEY_LEFT,
|
||||
[77] = KEY_RIGHT,
|
||||
[78] = KEY_KPPLUS,
|
||||
[79] = KEY_KP1,
|
||||
[80] = KEY_KP2,
|
||||
[81] = KEY_KP3,
|
||||
[82] = KEY_KP0,
|
||||
[83] = KEY_KPDOT,
|
||||
[90] = KEY_KPLEFTPAREN,
|
||||
[91] = KEY_KPRIGHTPAREN,
|
||||
[92] = KEY_KPASTERISK, /* FIXME */
|
||||
[93] = KEY_KPASTERISK,
|
||||
[94] = KEY_KPPLUS,
|
||||
[95] = KEY_HELP,
|
||||
[80] = KEY_DOWN,
|
||||
[82] = KEY_INSERT,
|
||||
[83] = KEY_DELETE,
|
||||
[96] = KEY_102ND,
|
||||
[97] = KEY_KPASTERISK, /* FIXME */
|
||||
[98] = KEY_KPSLASH,
|
||||
[97] = KEY_UNDO,
|
||||
[98] = KEY_HELP,
|
||||
[99] = KEY_KPLEFTPAREN,
|
||||
[100] = KEY_KPRIGHTPAREN,
|
||||
[101] = KEY_KPSLASH,
|
||||
[102] = KEY_KPASTERISK,
|
||||
[103] = KEY_UP,
|
||||
[104] = KEY_KPASTERISK, /* FIXME */
|
||||
[105] = KEY_LEFT,
|
||||
[106] = KEY_RIGHT,
|
||||
[107] = KEY_KPASTERISK, /* FIXME */
|
||||
[108] = KEY_DOWN,
|
||||
[109] = KEY_KPASTERISK, /* FIXME */
|
||||
[110] = KEY_KPASTERISK, /* FIXME */
|
||||
[111] = KEY_KPASTERISK, /* FIXME */
|
||||
[112] = KEY_KPASTERISK, /* FIXME */
|
||||
[113] = KEY_KPASTERISK /* FIXME */
|
||||
[103] = KEY_KP7,
|
||||
[104] = KEY_KP8,
|
||||
[105] = KEY_KP9,
|
||||
[106] = KEY_KP4,
|
||||
[107] = KEY_KP5,
|
||||
[108] = KEY_KP6,
|
||||
[109] = KEY_KP1,
|
||||
[110] = KEY_KP2,
|
||||
[111] = KEY_KP3,
|
||||
[112] = KEY_KP0,
|
||||
[113] = KEY_KPDOT,
|
||||
[114] = KEY_KPENTER,
|
||||
};
|
||||
|
||||
static struct input_dev *atakbd_dev;
|
||||
|
|
@ -195,21 +183,15 @@ static struct input_dev *atakbd_dev;
|
|||
static void atakbd_interrupt(unsigned char scancode, char down)
|
||||
{
|
||||
|
||||
if (scancode < 0x72) { /* scancodes < 0xf2 are keys */
|
||||
if (scancode < 0x73) { /* scancodes < 0xf3 are keys */
|
||||
|
||||
// report raw events here?
|
||||
|
||||
scancode = atakbd_keycode[scancode];
|
||||
|
||||
if (scancode == KEY_CAPSLOCK) { /* CapsLock is a toggle switch key on Amiga */
|
||||
input_report_key(atakbd_dev, scancode, 1);
|
||||
input_report_key(atakbd_dev, scancode, 0);
|
||||
input_sync(atakbd_dev);
|
||||
} else {
|
||||
input_report_key(atakbd_dev, scancode, down);
|
||||
input_sync(atakbd_dev);
|
||||
}
|
||||
} else /* scancodes >= 0xf2 are mouse data, most likely */
|
||||
input_report_key(atakbd_dev, scancode, down);
|
||||
input_sync(atakbd_dev);
|
||||
} else /* scancodes >= 0xf3 are mouse data, most likely */
|
||||
printk(KERN_INFO "atakbd: unhandled scancode %x\n", scancode);
|
||||
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -288,7 +288,13 @@ static u16 get_alias(struct device *dev)
|
|||
|
||||
/* The callers make sure that get_device_id() does not fail here */
|
||||
devid = get_device_id(dev);
|
||||
|
||||
/* For ACPI HID devices, we simply return the devid as such */
|
||||
if (!dev_is_pci(dev))
|
||||
return devid;
|
||||
|
||||
ivrs_alias = amd_iommu_alias_table[devid];
|
||||
|
||||
pci_for_each_dma_alias(pdev, __last_alias, &pci_alias);
|
||||
|
||||
if (ivrs_alias == pci_alias)
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ struct rackmeter_dma {
|
|||
struct rackmeter_cpu {
|
||||
struct delayed_work sniffer;
|
||||
struct rackmeter *rm;
|
||||
cputime64_t prev_wall;
|
||||
cputime64_t prev_idle;
|
||||
u64 prev_wall;
|
||||
u64 prev_idle;
|
||||
int zero;
|
||||
} ____cacheline_aligned;
|
||||
|
||||
|
|
@ -81,7 +81,7 @@ static int rackmeter_ignore_nice;
|
|||
/* This is copied from cpufreq_ondemand, maybe we should put it in
|
||||
* a common header somewhere
|
||||
*/
|
||||
static inline cputime64_t get_cpu_idle_time(unsigned int cpu)
|
||||
static inline u64 get_cpu_idle_time(unsigned int cpu)
|
||||
{
|
||||
u64 retval;
|
||||
|
||||
|
|
@ -217,23 +217,23 @@ static void rackmeter_do_timer(struct work_struct *work)
|
|||
container_of(work, struct rackmeter_cpu, sniffer.work);
|
||||
struct rackmeter *rm = rcpu->rm;
|
||||
unsigned int cpu = smp_processor_id();
|
||||
cputime64_t cur_jiffies, total_idle_ticks;
|
||||
unsigned int total_ticks, idle_ticks;
|
||||
u64 cur_nsecs, total_idle_nsecs;
|
||||
u64 total_nsecs, idle_nsecs;
|
||||
int i, offset, load, cumm, pause;
|
||||
|
||||
cur_jiffies = jiffies64_to_cputime64(get_jiffies_64());
|
||||
total_ticks = (unsigned int) (cur_jiffies - rcpu->prev_wall);
|
||||
rcpu->prev_wall = cur_jiffies;
|
||||
cur_nsecs = jiffies64_to_nsecs(get_jiffies_64());
|
||||
total_nsecs = cur_nsecs - rcpu->prev_wall;
|
||||
rcpu->prev_wall = cur_nsecs;
|
||||
|
||||
total_idle_ticks = get_cpu_idle_time(cpu);
|
||||
idle_ticks = (unsigned int) (total_idle_ticks - rcpu->prev_idle);
|
||||
idle_ticks = min(idle_ticks, total_ticks);
|
||||
rcpu->prev_idle = total_idle_ticks;
|
||||
total_idle_nsecs = get_cpu_idle_time(cpu);
|
||||
idle_nsecs = total_idle_nsecs - rcpu->prev_idle;
|
||||
idle_nsecs = min(idle_nsecs, total_nsecs);
|
||||
rcpu->prev_idle = total_idle_nsecs;
|
||||
|
||||
/* We do a very dumb calculation to update the LEDs for now,
|
||||
* we'll do better once we have actual PWM implemented
|
||||
*/
|
||||
load = (9 * (total_ticks - idle_ticks)) / total_ticks;
|
||||
load = div64_u64(9 * (total_nsecs - idle_nsecs), total_nsecs);
|
||||
|
||||
offset = cpu << 3;
|
||||
cumm = 0;
|
||||
|
|
@ -278,7 +278,7 @@ static void rackmeter_init_cpu_sniffer(struct rackmeter *rm)
|
|||
continue;
|
||||
rcpu = &rm->cpu[cpu];
|
||||
rcpu->prev_idle = get_cpu_idle_time(cpu);
|
||||
rcpu->prev_wall = jiffies64_to_cputime64(get_jiffies_64());
|
||||
rcpu->prev_wall = jiffies64_to_nsecs(get_jiffies_64());
|
||||
schedule_delayed_work_on(cpu, &rm->cpu[cpu].sniffer,
|
||||
msecs_to_jiffies(CPU_SAMPLING_RATE));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -406,8 +406,10 @@ static int af9035_i2c_master_xfer(struct i2c_adapter *adap,
|
|||
msg[0].addr == (state->af9033_i2c_addr[1] >> 1))
|
||||
reg |= 0x100000;
|
||||
|
||||
ret = af9035_wr_regs(d, reg, &msg[0].buf[3],
|
||||
msg[0].len - 3);
|
||||
ret = (msg[0].len >= 3) ? af9035_wr_regs(d, reg,
|
||||
&msg[0].buf[3],
|
||||
msg[0].len - 3)
|
||||
: -EOPNOTSUPP;
|
||||
} else {
|
||||
/* I2C write */
|
||||
u8 buf[MAX_XFER_SIZE];
|
||||
|
|
|
|||
|
|
@ -240,7 +240,8 @@ static void mlx4_set_eq_affinity_hint(struct mlx4_priv *priv, int vec)
|
|||
struct mlx4_dev *dev = &priv->dev;
|
||||
struct mlx4_eq *eq = &priv->eq_table.eq[vec];
|
||||
|
||||
if (!eq->affinity_mask || cpumask_empty(eq->affinity_mask))
|
||||
if (!cpumask_available(eq->affinity_mask) ||
|
||||
cpumask_empty(eq->affinity_mask))
|
||||
return;
|
||||
|
||||
hint_err = irq_set_affinity_hint(eq->irq, eq->affinity_mask);
|
||||
|
|
|
|||
|
|
@ -421,6 +421,7 @@ enum EIS_BIT {
|
|||
EIS_CULF1 = 0x00000080,
|
||||
EIS_TFFF = 0x00000100,
|
||||
EIS_QFS = 0x00010000,
|
||||
EIS_RESERVED = (GENMASK(31, 17) | GENMASK(15, 11)),
|
||||
};
|
||||
|
||||
/* RIC0 */
|
||||
|
|
@ -465,6 +466,7 @@ enum RIS0_BIT {
|
|||
RIS0_FRF15 = 0x00008000,
|
||||
RIS0_FRF16 = 0x00010000,
|
||||
RIS0_FRF17 = 0x00020000,
|
||||
RIS0_RESERVED = GENMASK(31, 18),
|
||||
};
|
||||
|
||||
/* RIC1 */
|
||||
|
|
@ -521,6 +523,7 @@ enum RIS2_BIT {
|
|||
RIS2_QFF16 = 0x00010000,
|
||||
RIS2_QFF17 = 0x00020000,
|
||||
RIS2_RFFF = 0x80000000,
|
||||
RIS2_RESERVED = GENMASK(30, 18),
|
||||
};
|
||||
|
||||
/* TIC */
|
||||
|
|
@ -537,6 +540,7 @@ enum TIS_BIT {
|
|||
TIS_FTF1 = 0x00000002, /* Undocumented? */
|
||||
TIS_TFUF = 0x00000100,
|
||||
TIS_TFWF = 0x00000200,
|
||||
TIS_RESERVED = (GENMASK(31, 20) | GENMASK(15, 12) | GENMASK(7, 4))
|
||||
};
|
||||
|
||||
/* ISS */
|
||||
|
|
@ -610,6 +614,7 @@ enum GIC_BIT {
|
|||
enum GIS_BIT {
|
||||
GIS_PTCF = 0x00000001, /* Undocumented? */
|
||||
GIS_PTMF = 0x00000004,
|
||||
GIS_RESERVED = GENMASK(15, 10),
|
||||
};
|
||||
|
||||
/* GIE (R-Car Gen3 only) */
|
||||
|
|
|
|||
|
|
@ -717,10 +717,11 @@ static void ravb_error_interrupt(struct net_device *ndev)
|
|||
u32 eis, ris2;
|
||||
|
||||
eis = ravb_read(ndev, EIS);
|
||||
ravb_write(ndev, ~EIS_QFS, EIS);
|
||||
ravb_write(ndev, ~(EIS_QFS | EIS_RESERVED), EIS);
|
||||
if (eis & EIS_QFS) {
|
||||
ris2 = ravb_read(ndev, RIS2);
|
||||
ravb_write(ndev, ~(RIS2_QFF0 | RIS2_RFFF), RIS2);
|
||||
ravb_write(ndev, ~(RIS2_QFF0 | RIS2_RFFF | RIS2_RESERVED),
|
||||
RIS2);
|
||||
|
||||
/* Receive Descriptor Empty int */
|
||||
if (ris2 & RIS2_QFF0)
|
||||
|
|
@ -773,7 +774,7 @@ static bool ravb_timestamp_interrupt(struct net_device *ndev)
|
|||
u32 tis = ravb_read(ndev, TIS);
|
||||
|
||||
if (tis & TIS_TFUF) {
|
||||
ravb_write(ndev, ~TIS_TFUF, TIS);
|
||||
ravb_write(ndev, ~(TIS_TFUF | TIS_RESERVED), TIS);
|
||||
ravb_get_tx_tstamp(ndev);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -908,7 +909,7 @@ static int ravb_poll(struct napi_struct *napi, int budget)
|
|||
/* Processing RX Descriptor Ring */
|
||||
if (ris0 & mask) {
|
||||
/* Clear RX interrupt */
|
||||
ravb_write(ndev, ~mask, RIS0);
|
||||
ravb_write(ndev, ~(mask | RIS0_RESERVED), RIS0);
|
||||
if (ravb_rx(ndev, "a, q))
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -916,7 +917,7 @@ static int ravb_poll(struct napi_struct *napi, int budget)
|
|||
if (tis & mask) {
|
||||
spin_lock_irqsave(&priv->lock, flags);
|
||||
/* Clear TX interrupt */
|
||||
ravb_write(ndev, ~mask, TIS);
|
||||
ravb_write(ndev, ~(mask | TIS_RESERVED), TIS);
|
||||
ravb_tx_free(ndev, q, true);
|
||||
netif_wake_subqueue(ndev, q);
|
||||
mmiowb();
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@ void ravb_ptp_interrupt(struct net_device *ndev)
|
|||
}
|
||||
}
|
||||
|
||||
ravb_write(ndev, ~gis, GIS);
|
||||
ravb_write(ndev, ~(gis | GIS_RESERVED), GIS);
|
||||
}
|
||||
|
||||
void ravb_ptp_init(struct net_device *ndev, struct platform_device *pdev)
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue