Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211457
b: refs/heads/master
c: 5887767
h: refs/heads/master
i:
  211455: 08ff593
v: v3
  • Loading branch information
Zachary Amsden authored and Avi Kivity committed Oct 11, 2010
1 parent d644a24 commit 74b2af7
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 114 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7c5347733dcc4ba0bac0baf86d99fae0561f33b7
refs/heads/master: 58877679fd393d3ef71aa383031ac7817561463d
10 changes: 1 addition & 9 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -5030,12 +5030,6 @@ F: drivers/media/common/saa7146*
F: drivers/media/video/*7146*
F: include/media/*7146*

SAMSUNG AUDIO (ASoC) DRIVERS
M: Jassi Brar <jassi.brar@samsung.com>
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
S: Supported
F: sound/soc/s3c24xx

TLG2300 VIDEO4LINUX-2 DRIVER
M: Huang Shijie <shijie8@gmail.com>
M: Kang Yong <kangyong@telegent.com>
Expand Down Expand Up @@ -6478,10 +6472,8 @@ F: include/linux/wm97xx.h
WOLFSON MICROELECTRONICS DRIVERS
M: Mark Brown <broonie@opensource.wolfsonmicro.com>
M: Ian Lartey <ian@opensource.wolfsonmicro.com>
M: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc
T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
W: http://opensource.wolfsonmicro.com/node/8
S: Supported
F: Documentation/hwmon/wm83??
F: drivers/leds/leds-wm83*.c
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,7 @@ static void init_vmcb(struct vcpu_svm *svm)

control->iopm_base_pa = iopm_base;
control->msrpm_base_pa = __pa(svm->msrpm);
control->tsc_offset = 0;
control->tsc_offset = 0-native_read_tsc();
control->int_ctl = V_INTR_MASKING_MASK;

init_seg(&save->es);
Expand Down
4 changes: 1 addition & 3 deletions trunk/drivers/input/tablet/wacom_wac.c
Original file line number Diff line number Diff line change
Expand Up @@ -442,10 +442,8 @@ static void wacom_intuos_general(struct wacom_wac *wacom)
/* general pen packet */
if ((data[1] & 0xb8) == 0xa0) {
t = (data[6] << 2) | ((data[7] >> 6) & 3);
if ((features->type >= INTUOS4S && features->type <= INTUOS4L) ||
features->type == WACOM_21UX2) {
if (features->type >= INTUOS4S && features->type <= INTUOS4L)
t = (t << 1) | (data[1] & 1);
}
input_report_abs(input, ABS_PRESSURE, t);
input_report_abs(input, ABS_TILT_X,
((data[7] << 1) & 0x7e) | (data[8] >> 7));
Expand Down
122 changes: 32 additions & 90 deletions trunk/drivers/platform/x86/intel_ips.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
* TODO:
* - handle CPU hotplug
* - provide turbo enable/disable api
* - make sure we can write turbo enable/disable reg based on MISC_EN
*
* Related documents:
* - CDI 403777, 403778 - Auburndale EDS vol 1 & 2
Expand Down Expand Up @@ -229,7 +230,7 @@
#define THM_TC2 0xac
#define THM_DTV 0xb0
#define THM_ITV 0xd8
#define ITV_ME_SEQNO_MASK 0x00ff0000 /* ME should update every ~200ms */
#define ITV_ME_SEQNO_MASK 0x000f0000 /* ME should update every ~200ms */
#define ITV_ME_SEQNO_SHIFT (16)
#define ITV_MCH_TEMP_MASK 0x0000ff00
#define ITV_MCH_TEMP_SHIFT (8)
Expand Down Expand Up @@ -324,7 +325,6 @@ struct ips_driver {
bool gpu_preferred;
bool poll_turbo_status;
bool second_cpu;
bool turbo_toggle_allowed;
struct ips_mcp_limits *limits;

/* Optional MCH interfaces for if i915 is in use */
Expand Down Expand Up @@ -415,7 +415,7 @@ static void ips_cpu_lower(struct ips_driver *ips)
new_limit = cur_limit - 8; /* 1W decrease */

/* Clamp to SKU TDP limit */
if (new_limit < (ips->orig_turbo_limit & TURBO_TDP_MASK))
if (((new_limit * 10) / 8) < (ips->orig_turbo_limit & TURBO_TDP_MASK))
new_limit = ips->orig_turbo_limit & TURBO_TDP_MASK;

thm_writew(THM_MPCPC, (new_limit * 10) / 8);
Expand Down Expand Up @@ -461,8 +461,7 @@ static void ips_enable_cpu_turbo(struct ips_driver *ips)
if (ips->__cpu_turbo_on)
return;

if (ips->turbo_toggle_allowed)
on_each_cpu(do_enable_cpu_turbo, ips, 1);
on_each_cpu(do_enable_cpu_turbo, ips, 1);

ips->__cpu_turbo_on = true;
}
Expand Down Expand Up @@ -499,8 +498,7 @@ static void ips_disable_cpu_turbo(struct ips_driver *ips)
if (!ips->__cpu_turbo_on)
return;

if (ips->turbo_toggle_allowed)
on_each_cpu(do_disable_cpu_turbo, ips, 1);
on_each_cpu(do_disable_cpu_turbo, ips, 1);

ips->__cpu_turbo_on = false;
}
Expand Down Expand Up @@ -600,30 +598,18 @@ static bool mcp_exceeded(struct ips_driver *ips)
{
unsigned long flags;
bool ret = false;
u32 temp_limit;
u32 avg_power;
const char *msg = "MCP limit exceeded: ";

spin_lock_irqsave(&ips->turbo_status_lock, flags);

temp_limit = ips->mcp_temp_limit * 100;
if (ips->mcp_avg_temp > temp_limit) {
dev_info(&ips->dev->dev,
"%sAvg temp %u, limit %u\n", msg, ips->mcp_avg_temp,
temp_limit);
if (ips->mcp_avg_temp > (ips->mcp_temp_limit * 100))
ret = true;
}

avg_power = ips->cpu_avg_power + ips->mch_avg_power;
if (avg_power > ips->mcp_power_limit) {
dev_info(&ips->dev->dev,
"%sAvg power %u, limit %u\n", msg, avg_power,
ips->mcp_power_limit);
if (ips->cpu_avg_power + ips->mch_avg_power > ips->mcp_power_limit)
ret = true;
}

spin_unlock_irqrestore(&ips->turbo_status_lock, flags);

if (ret)
dev_info(&ips->dev->dev,
"MCP power or thermal limit exceeded\n");

return ret;
}

Expand Down Expand Up @@ -676,27 +662,6 @@ static bool mch_exceeded(struct ips_driver *ips)
return ret;
}

/**
* verify_limits - verify BIOS provided limits
* @ips: IPS structure
*
* BIOS can optionally provide non-default limits for power and temp. Check
* them here and use the defaults if the BIOS values are not provided or
* are otherwise unusable.
*/
static void verify_limits(struct ips_driver *ips)
{
if (ips->mcp_power_limit < ips->limits->mcp_power_limit ||
ips->mcp_power_limit > 35000)
ips->mcp_power_limit = ips->limits->mcp_power_limit;

if (ips->mcp_temp_limit < ips->limits->core_temp_limit ||
ips->mcp_temp_limit < ips->limits->mch_temp_limit ||
ips->mcp_temp_limit > 150)
ips->mcp_temp_limit = min(ips->limits->core_temp_limit,
ips->limits->mch_temp_limit);
}

/**
* update_turbo_limits - get various limits & settings from regs
* @ips: IPS driver struct
Expand All @@ -715,21 +680,12 @@ static void update_turbo_limits(struct ips_driver *ips)
u32 hts = thm_readl(THM_HTS);

ips->cpu_turbo_enabled = !(hts & HTS_PCTD_DIS);
/*
* Disable turbo for now, until we can figure out why the power figures
* are wrong
*/
ips->cpu_turbo_enabled = false;

if (ips->gpu_busy)
ips->gpu_turbo_enabled = !(hts & HTS_GTD_DIS);

ips->gpu_turbo_enabled = !(hts & HTS_GTD_DIS);
ips->core_power_limit = thm_readw(THM_MPCPC);
ips->mch_power_limit = thm_readw(THM_MMGPC);
ips->mcp_temp_limit = thm_readw(THM_PTL);
ips->mcp_power_limit = thm_readw(THM_MPPC);

verify_limits(ips);
/* Ignore BIOS CPU vs GPU pref */
}

Expand Down Expand Up @@ -902,7 +858,7 @@ static u32 get_cpu_power(struct ips_driver *ips, u32 *last, int period)
ret = (ret * 1000) / 65535;
*last = val;

return 0;
return ret;
}

static const u16 temp_decay_factor = 2;
Expand Down Expand Up @@ -984,14 +940,15 @@ static int ips_monitor(void *data)
kfree(mch_samples);
kfree(cpu_samples);
kfree(mchp_samples);
kthread_stop(ips->adjust);
return -ENOMEM;
}

last_seqno = (thm_readl(THM_ITV) & ITV_ME_SEQNO_MASK) >>
ITV_ME_SEQNO_SHIFT;
seqno_timestamp = get_jiffies_64();

old_cpu_power = thm_readl(THM_CEC);
old_cpu_power = thm_readl(THM_CEC) / 65535;
schedule_timeout_interruptible(msecs_to_jiffies(IPS_SAMPLE_PERIOD));

/* Collect an initial average */
Expand Down Expand Up @@ -1193,18 +1150,11 @@ static irqreturn_t ips_irq_handler(int irq, void *arg)
STS_GPL_SHIFT;
/* ignore EC CPU vs GPU pref */
ips->cpu_turbo_enabled = !(sts & STS_PCTD_DIS);
/*
* Disable turbo for now, until we can figure
* out why the power figures are wrong
*/
ips->cpu_turbo_enabled = false;
if (ips->gpu_busy)
ips->gpu_turbo_enabled = !(sts & STS_GTD_DIS);
ips->gpu_turbo_enabled = !(sts & STS_GTD_DIS);
ips->mcp_temp_limit = (sts & STS_PTL_MASK) >>
STS_PTL_SHIFT;
ips->mcp_power_limit = (tc1 & STS_PPL_MASK) >>
STS_PPL_SHIFT;
verify_limits(ips);
spin_unlock(&ips->turbo_status_lock);

thm_writeb(THM_SEC, SEC_ACK);
Expand Down Expand Up @@ -1383,10 +1333,8 @@ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips)
* turbo manually or we'll get an illegal MSR access, even though
* turbo will still be available.
*/
if (misc_en & IA32_MISC_TURBO_EN)
ips->turbo_toggle_allowed = true;
else
ips->turbo_toggle_allowed = false;
if (!(misc_en & IA32_MISC_TURBO_EN))
; /* add turbo MSR write allowed flag if necessary */

if (strstr(boot_cpu_data.x86_model_id, "CPU M"))
limits = &ips_sv_limits;
Expand All @@ -1403,10 +1351,9 @@ static struct ips_mcp_limits *ips_detect_cpu(struct ips_driver *ips)
tdp = turbo_power & TURBO_TDP_MASK;

/* Sanity check TDP against CPU */
if (limits->core_power_limit != (tdp / 8) * 1000) {
dev_info(&ips->dev->dev, "CPU TDP doesn't match expected value (found %d, expected %d)\n",
tdp / 8, limits->core_power_limit / 1000);
limits->core_power_limit = (tdp / 8) * 1000;
if (limits->mcp_power_limit != (tdp / 8) * 1000) {
dev_warn(&ips->dev->dev, "Warning: CPU TDP doesn't match expected value (found %d, expected %d)\n",
tdp / 8, limits->mcp_power_limit / 1000);
}

out:
Expand Down Expand Up @@ -1443,7 +1390,7 @@ static bool ips_get_i915_syms(struct ips_driver *ips)
return true;

out_put_busy:
symbol_put(i915_gpu_busy);
symbol_put(i915_gpu_turbo_disable);
out_put_lower:
symbol_put(i915_gpu_lower);
out_put_raise:
Expand Down Expand Up @@ -1585,27 +1532,22 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
/* Save turbo limits & ratios */
rdmsrl(TURBO_POWER_CURRENT_LIMIT, ips->orig_turbo_limit);

ips_disable_cpu_turbo(ips);
ips->cpu_turbo_enabled = false;
ips_enable_cpu_turbo(ips);
ips->cpu_turbo_enabled = true;

/* Create thermal adjust thread */
ips->adjust = kthread_create(ips_adjust, ips, "ips-adjust");
if (IS_ERR(ips->adjust)) {
/* Set up the work queue and monitor/adjust threads */
ips->monitor = kthread_run(ips_monitor, ips, "ips-monitor");
if (IS_ERR(ips->monitor)) {
dev_err(&dev->dev,
"failed to create thermal adjust thread, aborting\n");
"failed to create thermal monitor thread, aborting\n");
ret = -ENOMEM;
goto error_free_irq;

}

/*
* Set up the work queue and monitor thread. The monitor thread
* will wake up ips_adjust thread.
*/
ips->monitor = kthread_run(ips_monitor, ips, "ips-monitor");
if (IS_ERR(ips->monitor)) {
ips->adjust = kthread_create(ips_adjust, ips, "ips-adjust");
if (IS_ERR(ips->adjust)) {
dev_err(&dev->dev,
"failed to create thermal monitor thread, aborting\n");
"failed to create thermal adjust thread, aborting\n");
ret = -ENOMEM;
goto error_thread_cleanup;
}
Expand All @@ -1624,7 +1566,7 @@ static int ips_probe(struct pci_dev *dev, const struct pci_device_id *id)
return ret;

error_thread_cleanup:
kthread_stop(ips->adjust);
kthread_stop(ips->monitor);
error_free_irq:
free_irq(ips->dev->irq, ips);
error_unmap:
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/notify/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ config FSNOTIFY

source "fs/notify/dnotify/Kconfig"
source "fs/notify/inotify/Kconfig"
#source "fs/notify/fanotify/Kconfig"
source "fs/notify/fanotify/Kconfig"
1 change: 1 addition & 0 deletions trunk/include/linux/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ header-y += eventpoll.h
header-y += ext2_fs.h
header-y += fadvise.h
header-y += falloc.h
header-y += fanotify.h
header-y += fb.h
header-y += fcntl.h
header-y += fd.h
Expand Down
2 changes: 1 addition & 1 deletion trunk/scripts/kconfig/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ static void check_conf(struct menu *menu)
if (sym->name && !sym_is_choice_value(sym)) {
printf("CONFIG_%s\n", sym->name);
}
} else if (input_mode != oldnoconfig) {
} else {
if (!conf_cnt++)
printf(_("*\n* Restart config...\n*\n"));
rootEntry = menu_get_parent_menu(menu);
Expand Down
1 change: 1 addition & 0 deletions trunk/scripts/kconfig/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ struct menu {
struct symbol *sym;
struct property *prompt;
struct expr *dep;
struct expr *dir_dep;
unsigned int flags;
char *help;
struct file *file;
Expand Down
7 changes: 5 additions & 2 deletions trunk/scripts/kconfig/menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ static struct expr *menu_check_dep(struct expr *e)
void menu_add_dep(struct expr *dep)
{
current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep));
current_entry->dir_dep = current_entry->dep;
}

void menu_set_type(int type)
Expand Down Expand Up @@ -290,6 +291,10 @@ void menu_finalize(struct menu *parent)
for (menu = parent->list; menu; menu = menu->next)
menu_finalize(menu);
} else if (sym) {
/* ignore inherited dependencies for dir_dep */
sym->dir_dep.expr = expr_transform(expr_copy(parent->dir_dep));
sym->dir_dep.expr = expr_eliminate_dups(sym->dir_dep.expr);

basedep = parent->prompt ? parent->prompt->visible.expr : NULL;
basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no);
basedep = expr_eliminate_dups(expr_transform(basedep));
Expand Down Expand Up @@ -320,8 +325,6 @@ void menu_finalize(struct menu *parent)
parent->next = last_menu->next;
last_menu->next = NULL;
}

sym->dir_dep.expr = parent->dep;
}
for (menu = parent->list; menu; menu = menu->next) {
if (sym && sym_is_choice(sym) &&
Expand Down
2 changes: 0 additions & 2 deletions trunk/scripts/kconfig/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ void sym_calc_value(struct symbol *sym)
}
}
calc_newval:
#if 0
if (sym->dir_dep.tri == no && sym->rev_dep.tri != no) {
fprintf(stderr, "warning: (");
expr_fprint(sym->rev_dep.expr, stderr);
Expand All @@ -359,7 +358,6 @@ void sym_calc_value(struct symbol *sym)
expr_fprint(sym->dir_dep.expr, stderr);
fprintf(stderr, ")\n");
}
#endif
newval.tri = EXPR_OR(newval.tri, sym->rev_dep.tri);
}
if (newval.tri == mod && sym_get_type(sym) == S_BOOLEAN)
Expand Down
Loading

0 comments on commit 74b2af7

Please sign in to comment.