Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6a010c0abd | |||
| 81440341db | |||
| d0a2a8df99 | |||
| 46c266ff84 | |||
| a621d2c97a | |||
| 754bad2c5c | |||
| c7bd5d27d2 | |||
| b675101824 | |||
| 55c9e52cf3 | |||
| 0432ca1ad0 | |||
| 12709f95fd | |||
| 51fbd77c17 |
4
Makefile
4
Makefile
@ -1,8 +1,8 @@
|
||||
VERSION = 4
|
||||
PATCHLEVEL = 1
|
||||
SUBLEVEL = 0
|
||||
SUBLEVEL = 1
|
||||
EXTRAVERSION =
|
||||
NAME = Hurr durr I'ma sheep
|
||||
NAME = Series 4800
|
||||
|
||||
# *DOCUMENTATION*
|
||||
# To see a list of typical targets execute "make help"
|
||||
|
||||
@ -270,11 +270,7 @@ msr_fail:
|
||||
|
||||
static void hw_perf_event_destroy(struct perf_event *event)
|
||||
{
|
||||
if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
|
||||
release_pmc_hardware();
|
||||
release_ds_buffers();
|
||||
mutex_unlock(&pmc_reserve_mutex);
|
||||
}
|
||||
x86_release_hardware();
|
||||
}
|
||||
|
||||
void hw_perf_lbr_event_destroy(struct perf_event *event)
|
||||
@ -324,6 +320,35 @@ set_ext_hw_attr(struct hw_perf_event *hwc, struct perf_event *event)
|
||||
return x86_pmu_extra_regs(val, event);
|
||||
}
|
||||
|
||||
int x86_reserve_hardware(void)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
if (!atomic_inc_not_zero(&active_events)) {
|
||||
mutex_lock(&pmc_reserve_mutex);
|
||||
if (atomic_read(&active_events) == 0) {
|
||||
if (!reserve_pmc_hardware())
|
||||
err = -EBUSY;
|
||||
else
|
||||
reserve_ds_buffers();
|
||||
}
|
||||
if (!err)
|
||||
atomic_inc(&active_events);
|
||||
mutex_unlock(&pmc_reserve_mutex);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
void x86_release_hardware(void)
|
||||
{
|
||||
if (atomic_dec_and_mutex_lock(&active_events, &pmc_reserve_mutex)) {
|
||||
release_pmc_hardware();
|
||||
release_ds_buffers();
|
||||
mutex_unlock(&pmc_reserve_mutex);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Check if we can create event of a certain type (that no conflicting events
|
||||
* are present).
|
||||
@ -336,9 +361,10 @@ int x86_add_exclusive(unsigned int what)
|
||||
return 0;
|
||||
|
||||
mutex_lock(&pmc_reserve_mutex);
|
||||
for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(x86_pmu.lbr_exclusive); i++) {
|
||||
if (i != what && atomic_read(&x86_pmu.lbr_exclusive[i]))
|
||||
goto out;
|
||||
}
|
||||
|
||||
atomic_inc(&x86_pmu.lbr_exclusive[what]);
|
||||
ret = 0;
|
||||
@ -527,19 +553,7 @@ static int __x86_pmu_event_init(struct perf_event *event)
|
||||
if (!x86_pmu_initialized())
|
||||
return -ENODEV;
|
||||
|
||||
err = 0;
|
||||
if (!atomic_inc_not_zero(&active_events)) {
|
||||
mutex_lock(&pmc_reserve_mutex);
|
||||
if (atomic_read(&active_events) == 0) {
|
||||
if (!reserve_pmc_hardware())
|
||||
err = -EBUSY;
|
||||
else
|
||||
reserve_ds_buffers();
|
||||
}
|
||||
if (!err)
|
||||
atomic_inc(&active_events);
|
||||
mutex_unlock(&pmc_reserve_mutex);
|
||||
}
|
||||
err = x86_reserve_hardware();
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
|
||||
@ -703,6 +703,10 @@ int x86_add_exclusive(unsigned int what);
|
||||
|
||||
void x86_del_exclusive(unsigned int what);
|
||||
|
||||
int x86_reserve_hardware(void);
|
||||
|
||||
void x86_release_hardware(void);
|
||||
|
||||
void hw_perf_lbr_event_destroy(struct perf_event *event);
|
||||
|
||||
int x86_setup_perfctr(struct perf_event *event);
|
||||
|
||||
@ -3253,6 +3253,8 @@ __init int intel_pmu_init(void)
|
||||
|
||||
case 61: /* 14nm Broadwell Core-M */
|
||||
case 86: /* 14nm Broadwell Xeon D */
|
||||
case 71: /* 14nm Broadwell + GT3e (Intel Iris Pro graphics) */
|
||||
case 79: /* 14nm Broadwell Server */
|
||||
x86_pmu.late_ack = true;
|
||||
memcpy(hw_cache_event_ids, hsw_hw_cache_event_ids, sizeof(hw_cache_event_ids));
|
||||
memcpy(hw_cache_extra_regs, hsw_hw_cache_extra_regs, sizeof(hw_cache_extra_regs));
|
||||
@ -3322,13 +3324,13 @@ __init int intel_pmu_init(void)
|
||||
* counter, so do not extend mask to generic counters
|
||||
*/
|
||||
for_each_event_constraint(c, x86_pmu.event_constraints) {
|
||||
if (c->cmask != FIXED_EVENT_FLAGS
|
||||
|| c->idxmsk64 == INTEL_PMC_MSK_FIXED_REF_CYCLES) {
|
||||
continue;
|
||||
if (c->cmask == FIXED_EVENT_FLAGS
|
||||
&& c->idxmsk64 != INTEL_PMC_MSK_FIXED_REF_CYCLES) {
|
||||
c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
|
||||
}
|
||||
|
||||
c->idxmsk64 |= (1ULL << x86_pmu.num_counters) - 1;
|
||||
c->weight += x86_pmu.num_counters;
|
||||
c->idxmsk64 &=
|
||||
~(~0UL << (INTEL_PMC_IDX_FIXED + x86_pmu.num_counters_fixed));
|
||||
c->weight = hweight64(c->idxmsk64);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -483,17 +483,26 @@ static int bts_event_add(struct perf_event *event, int mode)
|
||||
|
||||
static void bts_event_destroy(struct perf_event *event)
|
||||
{
|
||||
x86_release_hardware();
|
||||
x86_del_exclusive(x86_lbr_exclusive_bts);
|
||||
}
|
||||
|
||||
static int bts_event_init(struct perf_event *event)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if (event->attr.type != bts_pmu.type)
|
||||
return -ENOENT;
|
||||
|
||||
if (x86_add_exclusive(x86_lbr_exclusive_bts))
|
||||
return -EBUSY;
|
||||
|
||||
ret = x86_reserve_hardware();
|
||||
if (ret) {
|
||||
x86_del_exclusive(x86_lbr_exclusive_bts);
|
||||
return ret;
|
||||
}
|
||||
|
||||
event->destroy = bts_event_destroy;
|
||||
|
||||
return 0;
|
||||
|
||||
@ -62,9 +62,16 @@
|
||||
#define PAGE_TABLE_SIZE(pages) ((pages) / PTRS_PER_PGD)
|
||||
#endif
|
||||
|
||||
/* Number of possible pages in the lowmem region */
|
||||
LOWMEM_PAGES = (((1<<32) - __PAGE_OFFSET) >> PAGE_SHIFT)
|
||||
|
||||
/*
|
||||
* Number of possible pages in the lowmem region.
|
||||
*
|
||||
* We shift 2 by 31 instead of 1 by 32 to the left in order to avoid a
|
||||
* gas warning about overflowing shift count when gas has been compiled
|
||||
* with only a host target support using a 32-bit type for internal
|
||||
* representation.
|
||||
*/
|
||||
LOWMEM_PAGES = (((2<<31) - __PAGE_OFFSET) >> PAGE_SHIFT)
|
||||
|
||||
/* Enough space to fit pagetables for the low memory linear map */
|
||||
MAPPING_BEYOND_END = PAGE_TABLE_SIZE(LOWMEM_PAGES) << PAGE_SHIFT
|
||||
|
||||
|
||||
@ -80,6 +80,7 @@ static const struct usb_device_id ath3k_table[] = {
|
||||
{ USB_DEVICE(0x0489, 0xe057) },
|
||||
{ USB_DEVICE(0x0489, 0xe056) },
|
||||
{ USB_DEVICE(0x0489, 0xe05f) },
|
||||
{ USB_DEVICE(0x0489, 0xe076) },
|
||||
{ USB_DEVICE(0x0489, 0xe078) },
|
||||
{ USB_DEVICE(0x04c5, 0x1330) },
|
||||
{ USB_DEVICE(0x04CA, 0x3004) },
|
||||
@ -88,6 +89,7 @@ static const struct usb_device_id ath3k_table[] = {
|
||||
{ USB_DEVICE(0x04CA, 0x3007) },
|
||||
{ USB_DEVICE(0x04CA, 0x3008) },
|
||||
{ USB_DEVICE(0x04CA, 0x300b) },
|
||||
{ USB_DEVICE(0x04CA, 0x300d) },
|
||||
{ USB_DEVICE(0x04CA, 0x300f) },
|
||||
{ USB_DEVICE(0x04CA, 0x3010) },
|
||||
{ USB_DEVICE(0x0930, 0x0219) },
|
||||
@ -113,6 +115,7 @@ static const struct usb_device_id ath3k_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3408) },
|
||||
{ USB_DEVICE(0x13d3, 0x3423) },
|
||||
{ USB_DEVICE(0x13d3, 0x3432) },
|
||||
{ USB_DEVICE(0x13d3, 0x3474) },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE02C) },
|
||||
@ -137,6 +140,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||
{ USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
|
||||
@ -145,6 +149,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||
{ USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
|
||||
@ -170,6 +175,7 @@ static const struct usb_device_id ath3k_blist_tbl[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU22 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xE036), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
@ -178,6 +178,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x0489, 0xe056), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe057), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe05f), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe076), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0489, 0xe078), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04c5, 0x1330), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
|
||||
@ -186,6 +187,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x300b), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x300d), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x300f), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x04ca, 0x3010), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x0930, 0x0219), .driver_info = BTUSB_ATH3012 },
|
||||
@ -211,6 +213,7 @@ static const struct usb_device_id blacklist_table[] = {
|
||||
{ USB_DEVICE(0x13d3, 0x3408), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3423), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3432), .driver_info = BTUSB_ATH3012 },
|
||||
{ USB_DEVICE(0x13d3, 0x3474), .driver_info = BTUSB_ATH3012 },
|
||||
|
||||
/* Atheros AR5BBU12 with sflash firmware */
|
||||
{ USB_DEVICE(0x0489, 0xe02c), .driver_info = BTUSB_IGNORE },
|
||||
|
||||
@ -5365,6 +5365,10 @@ static void b43_supported_bands(struct b43_wldev *dev, bool *have_2ghz_phy,
|
||||
*have_5ghz_phy = true;
|
||||
return;
|
||||
case 0x4321: /* BCM4306 */
|
||||
/* There are 14e4:4321 PCI devs with 2.4 GHz BCM4321 (N-PHY) */
|
||||
if (dev->phy.type != B43_PHYTYPE_G)
|
||||
break;
|
||||
/* fall through */
|
||||
case 0x4313: /* BCM4311 */
|
||||
case 0x431a: /* BCM4318 */
|
||||
case 0x432a: /* BCM4321 */
|
||||
|
||||
@ -1477,6 +1477,11 @@ skip_countries:
|
||||
goto alloc_fail8;
|
||||
}
|
||||
|
||||
if (quirks & CLEAR_HALT_CONDITIONS) {
|
||||
usb_clear_halt(usb_dev, usb_rcvbulkpipe(usb_dev, epread->bEndpointAddress));
|
||||
usb_clear_halt(usb_dev, usb_sndbulkpipe(usb_dev, epwrite->bEndpointAddress));
|
||||
}
|
||||
|
||||
return 0;
|
||||
alloc_fail8:
|
||||
if (acm->country_codes) {
|
||||
@ -1756,6 +1761,10 @@ static const struct usb_device_id acm_ids[] = {
|
||||
.driver_info = NO_UNION_NORMAL, /* reports zero length descriptor */
|
||||
},
|
||||
|
||||
{ USB_DEVICE(0x2912, 0x0001), /* ATOL FPrint */
|
||||
.driver_info = CLEAR_HALT_CONDITIONS,
|
||||
},
|
||||
|
||||
/* Nokia S60 phones expose two ACM channels. The first is
|
||||
* a modem and is picked up by the standard AT-command
|
||||
* information below. The second is 'vendor-specific' but
|
||||
|
||||
@ -133,3 +133,4 @@ struct acm {
|
||||
#define NO_DATA_INTERFACE BIT(4)
|
||||
#define IGNORE_DEVICE BIT(5)
|
||||
#define QUIRK_CONTROL_LINE_STATE BIT(6)
|
||||
#define CLEAR_HALT_CONDITIONS BIT(7)
|
||||
|
||||
@ -4331,20 +4331,20 @@ static void ring_buffer_attach(struct perf_event *event,
|
||||
WARN_ON_ONCE(event->rcu_pending);
|
||||
|
||||
old_rb = event->rb;
|
||||
event->rcu_batches = get_state_synchronize_rcu();
|
||||
event->rcu_pending = 1;
|
||||
|
||||
spin_lock_irqsave(&old_rb->event_lock, flags);
|
||||
list_del_rcu(&event->rb_entry);
|
||||
spin_unlock_irqrestore(&old_rb->event_lock, flags);
|
||||
}
|
||||
|
||||
if (event->rcu_pending && rb) {
|
||||
cond_synchronize_rcu(event->rcu_batches);
|
||||
event->rcu_pending = 0;
|
||||
event->rcu_batches = get_state_synchronize_rcu();
|
||||
event->rcu_pending = 1;
|
||||
}
|
||||
|
||||
if (rb) {
|
||||
if (event->rcu_pending) {
|
||||
cond_synchronize_rcu(event->rcu_batches);
|
||||
event->rcu_pending = 0;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&rb->event_lock, flags);
|
||||
list_add_rcu(&event->rb_entry, &rb->event_list);
|
||||
spin_unlock_irqrestore(&rb->event_lock, flags);
|
||||
|
||||
@ -94,12 +94,12 @@ obj-y := $(patsubst %/, %/$(obj)-in.o, $(obj-y))
|
||||
subdir-obj-y := $(filter %/$(obj)-in.o, $(obj-y))
|
||||
|
||||
# '$(OUTPUT)/dir' prefix to all objects
|
||||
prefix := $(subst ./,,$(OUTPUT)$(dir)/)
|
||||
obj-y := $(addprefix $(prefix),$(obj-y))
|
||||
subdir-obj-y := $(addprefix $(prefix),$(subdir-obj-y))
|
||||
objprefix := $(subst ./,,$(OUTPUT)$(dir)/)
|
||||
obj-y := $(addprefix $(objprefix),$(obj-y))
|
||||
subdir-obj-y := $(addprefix $(objprefix),$(subdir-obj-y))
|
||||
|
||||
# Final '$(obj)-in.o' object
|
||||
in-target := $(prefix)$(obj)-in.o
|
||||
in-target := $(objprefix)$(obj)-in.o
|
||||
|
||||
PHONY += $(subdir-y)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user