/****************************************************************************** * usbatm.h - Generic USB xDSL driver core * * Copyright (C) 2001, Alcatel * Copyright (C) 2003, Duncan Sands, SolNegro, Josep Comas * Copyright (C) 2004, David Woodhouse * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 59 * Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ******************************************************************************/ #ifndef _USBATM_H_ #define _USBATM_H_ #include #include #include #include #include #include #include #include #include #include #include /* #define VERBOSE_DEBUG */ #define usb_err(instance, format, arg...) \ dev_err(&(instance)->usb_intf->dev , format , ## arg) #define usb_info(instance, format, arg...) \ dev_info(&(instance)->usb_intf->dev , format , ## arg) #define usb_warn(instance, format, arg...) \ dev_warn(&(instance)->usb_intf->dev , format , ## arg) #define usb_dbg(instance, format, arg...) \ dev_dbg(&(instance)->usb_intf->dev , format , ## arg) /* FIXME: move to dev_* once ATM is driver model aware */ #define atm_printk(level, instance, format, arg...) \ printk(level "ATM dev %d: " format , \ (instance)->atm_dev->number , ## arg) #define atm_err(instance, format, arg...) \ atm_printk(KERN_ERR, instance , format , ## arg) #define atm_info(instance, format, arg...) \ atm_printk(KERN_INFO, instance , format , ## arg) #define atm_warn(instance, format, arg...) \ atm_printk(KERN_WARNING, instance , format , ## arg) #define atm_dbg(instance, format, ...) \ pr_debug("ATM dev %d: " format, \ (instance)->atm_dev->number, ##__VA_ARGS__) #define atm_rldbg(instance, format, ...) \ pr_debug_ratelimited("ATM dev %d: " format, \ (instance)->atm_dev->number, ##__VA_ARGS__) /* flags, set by mini-driver in bind() */ #define UDSL_SKIP_HEAVY_INIT (1<<0) #define UDSL_USE_ISOC (1<<1) #define UDSL_IGNORE_EILSEQ (1<<2) /* mini driver */ struct usbatm_data; /* * Assuming all methods exist and succeed, they are called in this order: * * bind, heavy_init, atm_start, ..., atm_stop, unbind */ struct usbatm_driver { const char *driver_name; /* init device ... can sleep, or cause probe() failure */ int (*bind) (struct usbatm_data *, struct usb_interface *, const struct usb_device_id *id); /* additional device initialization that is too slow to be done in probe() */ int (*heavy_init) (struct usbatm_data *, struct usb_interface *); /* cleanup device ... can sleep, but can't fail */ void (*unbind) (struct usbatm_data *, struct usb_interface *); /* init ATM device ... can sleep, or cause ATM initialization failure */ int (*atm_start) (struct usbatm_data *, struct atm_dev *); /* cleanup ATM device ... can sleep, but can't fail */ void (*atm_stop) (struct usbatm_data *, struct atm_dev *); int bulk_in; /* bulk rx endpoint */ int isoc_in; /* isochronous rx endpoint */ int bulk_out; /* bulk tx endpoint */ unsigned rx_padding; unsigned tx_padding; }; extern int usbatm_usb_probe(struct usb_interface *intf, const struct usb_device_id *id, struct usbatm_driver *driver); extern void usbatm_usb_disconnect(struct usb_interface *intf); struct usbatm_channel { int endpoint; /* usb pipe */ unsigned int stride; /* ATM cell size + padding */ unsigned int buf_size; /* urb buffer size */ unsigned int packet_size; /* endpoint maxpacket */ spinlock_t lock; struct list_head list; struct tasklet_struct tasklet; struct timer_list delay; struct usbatm_data *usbatm; }; /* main driver data */ struct usbatm_data { /****************** * public fields * ******************/ /* mini driver */ struct usbatm_driver *driver; void *driver_data; char driver_name[16]; unsigned int flags; /* set by mini-driver in bind() */ /* USB device */ struct usb_device *usb_dev; struct usb_interface *usb_intf; char description[64]; /* ATM device */ struct atm_dev *atm_dev; /******************************** * private fields - do not use * ********************************/ struct kref refcount; struct mutex serialize; int disconnected; /* heavy init */ struct task_struct *thread; struct completion thread_started; struct completion thread_exited; /* ATM device */ struct list_head vcc_list; struct usbatm_channel rx_channel; struct usbatm_channel tx_channel; struct sk_buff_head sndqueue; struct sk_buff *current_skb; /* being emptied */ struct usbatm_vcc_data *cached_vcc; int cached_vci; short cached_vpi; unsigned char *cell_buf; /* holds partial rx cell */ unsigned int buf_usage; struct urb *urbs[0]; }; static inline void *to_usbatm_driver_data(struct usb_interface *intf) { struct usbatm_data *usbatm_instance; if (intf == NULL) return NULL; usbatm_instance = usb_get_intfdata(intf); if (usbatm_instance == NULL) /* set NULL before unbind() */ return NULL; return usbatm_instance->driver_data; /* set NULL after unbind() */ } #endif /* _USBATM_H_ */ 86/sandybridge/pipeline.json?id=6e978b22efa1db9f6e71b24440b5f1d93e968ee3'>6e978b22efa1db9f6e71b24440b5f1d93e968ee3 (patch) treec666f7a26b860674848949e39a610222b0723f89 /tools/perf/pmu-events/arch/x86/sandybridge/pipeline.json parent3c223c19aea85d3dda1416c187915f4a30b04b1f (diff)
cpufreq: intel_pstate: Disable energy efficiency optimization
Some Kabylake desktop processors may not reach max turbo when running in HWP mode, even if running under sustained 100% utilization. This occurs when the HWP.EPP (Energy Performance Preference) is set to "balance_power" (0x80) -- the default on most systems. It occurs because the platform BIOS may erroneously enable an energy-efficiency setting -- MSR_IA32_POWER_CTL BIT-EE, which is not recommended to be enabled on this SKU. On the failing systems, this BIOS issue was not discovered when the desktop motherboard was tested with Windows, because the BIOS also neglects to provide the ACPI/CPPC table, that Windows requires to enable HWP, and so Windows runs in legacy P-state mode, where this setting has no effect. Linux' intel_pstate driver does not require ACPI/CPPC to enable HWP, and so it runs in HWP mode, exposing this incorrect BIOS configuration. There are several ways to address this problem. First, Linux can also run in legacy P-state mode on this system. As intel_pstate is how Linux enables HWP, booting with "intel_pstate=disable" will run in acpi-cpufreq/ondemand legacy p-state mode. Or second, the "performance" governor can be used with intel_pstate, which will modify HWP.EPP to 0. Or third, starting in 4.10, the /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference attribute in can be updated from "balance_power" to "performance". Or fourth, apply this patch, which fixes the erroneous setting of MSR_IA32_POWER_CTL BIT_EE on this model, allowing the default configuration to function as designed. Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Len Brown <len.brown@intel.com> Cc: 4.6+ <stable@vger.kernel.org> # 4.6+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/perf/pmu-events/arch/x86/sandybridge/pipeline.json')