Merge branch 'master' into rawhide/user/myoung/xendom0

Conflicts:
	kernel.spec
This commit is contained in:
Michael Young 2011-01-25 00:05:34 +00:00
commit d8422afbce
6 changed files with 301 additions and 78 deletions

View File

@ -1,17 +0,0 @@
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 878f6d6..8d6867d 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -1329,7 +1330,11 @@ static int tty_reopen(struct tty_struct *tty)
tty->driver = driver; /* N.B. why do this every time?? */
mutex_lock(&tty->ldisc_mutex);
- WARN_ON(!test_bit(TTY_LDISC, &tty->flags));
+ if (!test_bit(TTY_LDISC, &tty->flags)) {
+ printk("%s: !test_bit(TTY_LDISC, &tty->flags) dev=%s ldisc=%s flags=%x\n",
+ __func__, tty->name, tty->ldisc ? tty->ldisc->ops ? tty->ldisc->ops->name : NULL : NULL, tty->flags);
+ WARN_ON(1);
+ }
mutex_unlock(&tty->ldisc_mutex);
return 0;

View File

@ -52,7 +52,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be prepended with "0.", so
# for example a 3 here will become 0.3
#
%global baserelease 1
%global baserelease 3
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -85,7 +85,7 @@ Summary: The Linux kernel
# The rc snapshot level
%define rcrev 2
# The git snapshot level
%define gitrev 0
%define gitrev 1
# Set rpm version accordingly
%define rpmversion 2.6.%{upstream_sublevel}
%endif
@ -710,6 +710,8 @@ Patch2918: flexcop-fix-xlate_proc_name-warning.patch
# patches headed upstream
Patch12001: perf-gcc460-build-fixes.patch
Patch12010: add-appleir-usb-driver.patch
Patch12016: disable-i8042-check-on-apple-mac.patch
@ -718,8 +720,6 @@ Patch12017: prevent-runtime-conntrack-changes.patch
Patch12018: neuter_intel_microcode_load.patch
Patch12030: tpm-fix-stall-on-boot.patch
Patch12101: apple_backlight.patch
Patch12102: efifb_update.patch
Patch12200: acpi_reboot.patch
@ -733,8 +733,6 @@ Patch12205: runtime_pm_fixups.patch
Patch12303: dmar-disable-when-ricoh-multifunction.patch
Patch12401: debug-tty-print-dev-name.patch
Patch12421: fs-call-security_d_instantiate-in-d_obtain_alias.patch
# Xen patches
@ -1329,15 +1327,14 @@ ApplyOptionalPatch linux-2.6-v4l-dvb-experimental.patch
ApplyPatch flexcop-fix-xlate_proc_name-warning.patch
# Patches headed upstream
ApplyPatch perf-gcc460-build-fixes.patch
ApplyPatch disable-i8042-check-on-apple-mac.patch
ApplyPatch add-appleir-usb-driver.patch
ApplyPatch neuter_intel_microcode_load.patch
# try to fix stalls during boot (#530393)
ApplyPatch tpm-fix-stall-on-boot.patch
# various fixes for Apple and EFI
ApplyPatch apple_backlight.patch
ApplyPatch efifb_update.patch
@ -1346,16 +1343,14 @@ ApplyPatch efi_default_physical.patch
# Runtime PM
ApplyPatch linux-2.6-ehci-check-port-status.patch
ApplyPatch linux-2.6-usb-pci-autosuspend.patch
#ApplyPatch linux-2.6-enable-more-pci-autosuspend.patch
#ApplyPatch linux-2.6-usb-pci-autosuspend.patch
### Broken by implicit notify support & ACPICA rebase
###ApplyPatch linux-2.6-enable-more-pci-autosuspend.patch
#ApplyPatch runtime_pm_fixups.patch
# rhbz#605888
ApplyPatch dmar-disable-when-ricoh-multifunction.patch
# rhbz#630464
ApplyPatch debug-tty-print-dev-name.patch
# rhbz#662344,600690
ApplyPatch fs-call-security_d_instantiate-in-d_obtain_alias.patch
@ -1977,6 +1972,23 @@ fi
# ||----w |
# || ||
%changelog
* Mon Jan 24 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc2.git1.3
- Disable usb/pci/acpi autosuspend goo until it can be checked.
* Mon Jan 24 2011 Kyle McMartin <kmcmartin@redhat.com>
- debug-tty-print-dev-name.patch: drop, haven't seen any warnings recently.
- runtime_pm_fixups.patch: rebase and re-enable, make acpi_power_transition
in pci_bind actually do the right thing instead of (likely) always
trying to transition to D0.
* Mon Jan 24 2011 Kyle McMartin <kmcmartin@redhat.com> 2.6.38-0.rc2.git1.1
- Linux 2.6.38-rc2-git1
- [e5cce6c1] tpm: fix panic caused by "tpm: Autodetect itpm devices"
may fix some boot issues people were having.
- tpm-fix-stall-on-boot.patch: upstream.
- perf-gcc460-build-fixes.patch: fix build issues with warn-unused-but-set
in gcc 4.6.0
* Mon Jan 24 2011 Michael Young <m.a.young@durham.ac.uk>
- update to 2.6.38-rc
- Strip out upstream or conflicting patches from xen.next-2.6.37.patch

View File

@ -0,0 +1,227 @@
From linux-kernel-owner@vger.kernel.org Mon Jan 24 11:13:12 2011
Date: Mon, 24 Jan 2011 11:13:04 -0500
From: Kyle McMartin <kyle@mcmartin.ca>
To: mingo@redhat.com
Cc: linux-kernel@vger.kernel.org, acme@redhat.com
Subject: [PATCH] perf: fix gcc 4.6.0 issues with tools/perf
Message-ID: <20110124161304.GK27353@bombadil.infradead.org>
Hi Ingo,
GCC 4.6.0 in Fedora rawhide turned up some compile errors in tools/perf
due to the -Werror=unused-but-set-variable flag.
I've gone through and annotated some of the assignments that had side
effects (ie: return value from a function) with the __used annotation,
and in some cases, just removed unused code.
In a few cases, we were assigning something useful, but not using it in
later parts of the function.
regards, Kyle
kyle@dreadnought:~/src% gcc --version
gcc (GCC) 4.6.0 20110122 (Red Hat 4.6.0-0.3)
---
bench/sched-pipe.c | 2 +-
builtin-sched.c | 12 +++---------
builtin-top.c | 5 +----
util/header.c | 2 +-
util/hist.c | 3 ---
util/scripting-engines/trace-event-python.c | 3 +--
util/symbol.c | 4 ++--
util/trace-event-parse.c | 2 +-
util/ui/browsers/map.c | 2 +-
9 files changed, 11 insertions(+), 24 deletions(-)
diff --git a/tools/perf/bench/sched-pipe.c b/tools/perf/bench/sched-pipe.c
index d9ab3ce..0c7454f 100644
--- a/tools/perf/bench/sched-pipe.c
+++ b/tools/perf/bench/sched-pipe.c
@@ -55,7 +55,7 @@ int bench_sched_pipe(int argc, const char **argv,
* discarding returned value of read(), write()
* causes error in building environment for perf
*/
- int ret, wait_stat;
+ int __used ret, wait_stat;
pid_t pid, retpid;
argc = parse_options(argc, argv, options,
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 29e7ffd..f9e304f 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -369,11 +369,6 @@ static void
process_sched_event(struct task_desc *this_task __used, struct sched_atom *atom)
{
int ret = 0;
- u64 now;
- long long delta;
-
- now = get_nsecs();
- delta = start_time + atom->timestamp - now;
switch (atom->type) {
case SCHED_EVENT_RUN:
@@ -562,7 +557,7 @@ static void wait_for_tasks(void)
static void run_one_test(void)
{
- u64 T0, T1, delta, avg_delta, fluct, std_dev;
+ u64 T0, T1, delta, avg_delta, fluct;
T0 = get_nsecs();
wait_for_tasks();
@@ -578,7 +573,6 @@ static void run_one_test(void)
else
fluct = delta - avg_delta;
sum_fluct += fluct;
- std_dev = sum_fluct / nr_runs / sqrt(nr_runs);
if (!run_avg)
run_avg = delta;
run_avg = (run_avg*9 + delta)/10;
@@ -799,7 +793,7 @@ replay_switch_event(struct trace_switch_event *switch_event,
u64 timestamp,
struct thread *thread __used)
{
- struct task_desc *prev, *next;
+ struct task_desc *prev, __used *next;
u64 timestamp0;
s64 delta;
@@ -1404,7 +1398,7 @@ map_switch_event(struct trace_switch_event *switch_event,
u64 timestamp,
struct thread *thread __used)
{
- struct thread *sched_out, *sched_in;
+ struct thread *sched_out __used, *sched_in;
int new_shortname;
u64 timestamp0;
s64 delta;
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index 05344c6..373cfc0 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -182,7 +182,6 @@ static int parse_source(struct sym_entry *syme)
FILE *file;
char command[PATH_MAX*2];
const char *path;
- u64 len;
if (!syme)
return -1;
@@ -211,8 +210,6 @@ static int parse_source(struct sym_entry *syme)
}
path = map->dso->long_name;
- len = sym->end - sym->start;
-
sprintf(command,
"objdump --start-address=%#0*Lx --stop-address=%#0*Lx -dS %s",
BITS_PER_LONG / 4, map__rip_2objdump(map, sym->start),
@@ -1295,7 +1292,7 @@ static int __cmd_top(void)
{
pthread_t thread;
struct perf_evsel *counter;
- int i, ret;
+ int i, ret __used;
/*
* FIXME: perf_session__new should allow passing a O_MMAP, so that all this
* mmap reading, etc is encapsulated in it. Use O_WRONLY for now.
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
index 989fa2d..c0e5019 100644
--- a/tools/perf/util/header.c
+++ b/tools/perf/util/header.c
@@ -1139,7 +1139,7 @@ int event__synthesize_tracing_data(int fd, struct list_head *pattrs,
{
event_t ev;
ssize_t size = 0, aligned_size = 0, padding;
- int err = 0;
+ int err __used = 0;
memset(&ev, 0, sizeof(ev));
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c
index c749ba6..a01a33d 100644
--- a/tools/perf/util/hist.c
+++ b/tools/perf/util/hist.c
@@ -1091,7 +1091,6 @@ int hist_entry__annotate(struct hist_entry *self, struct list_head *head,
char command[PATH_MAX * 2];
FILE *file;
int err = 0;
- u64 len;
char symfs_filename[PATH_MAX];
if (filename) {
@@ -1136,8 +1135,6 @@ fallback:
filename, sym->name, map->unmap_ip(map, sym->start),
map->unmap_ip(map, sym->end));
- len = sym->end - sym->start;
-
pr_debug("annotating [%p] %30s : [%p] %30s\n",
dso, dso->long_name, sym, sym->name);
diff --git a/tools/perf/util/scripting-engines/trace-event-python.c b/tools/perf/util/scripting-engines/trace-event-python.c
index c6d9933..2040b85 100644
--- a/tools/perf/util/scripting-engines/trace-event-python.c
+++ b/tools/perf/util/scripting-engines/trace-event-python.c
@@ -248,8 +248,7 @@ static void python_process_event(int cpu, void *data,
context = PyCObject_FromVoidPtr(scripting_context, NULL);
PyTuple_SetItem(t, n++, PyString_FromString(handler_name));
- PyTuple_SetItem(t, n++,
- PyCObject_FromVoidPtr(scripting_context, NULL));
+ PyTuple_SetItem(t, n++, context);
if (handler) {
PyTuple_SetItem(t, n++, PyInt_FromLong(cpu));
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 15ccfba..52e82cf 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1517,8 +1517,8 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
symbol_conf.symfs, self->long_name);
break;
case DSO__ORIG_GUEST_KMODULE:
- if (map->groups && map->groups->machine)
- root_dir = map->groups->machine->root_dir;
+ if (map->groups && machine)
+ root_dir = machine->root_dir;
else
root_dir = "";
snprintf(name, size, "%s%s%s", symbol_conf.symfs,
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index 73a0222..d8e622d 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -153,7 +153,7 @@ void parse_proc_kallsyms(char *file, unsigned int size __unused)
char *next = NULL;
char *addr_str;
char ch;
- int ret;
+ int ret __used;
int i;
line = strtok_r(file, "\n", &next);
diff --git a/tools/perf/util/ui/browsers/map.c b/tools/perf/util/ui/browsers/map.c
index e35437d..3788cad 100644
--- a/tools/perf/util/ui/browsers/map.c
+++ b/tools/perf/util/ui/browsers/map.c
@@ -40,7 +40,7 @@ static int ui_entry__read(const char *title, char *bf, size_t size, int width)
out_free_form:
newtPopWindow();
newtFormDestroy(form);
- return 0;
+ return err;
}
struct map_browser {
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

View File

@ -1,14 +1,26 @@
Experimental fixes for the interactions between runtime PM and ACPI power
resources. Needs some work with upstream.
From 141d0d01ab292d4ea3a6d5e96b4048e10e68c1d3 Mon Sep 17 00:00:00 2001
From: Kyle McMartin <kyle@mcmartin.ca>
Date: Mon, 24 Jan 2011 13:01:57 -0500
Subject: [PATCH] runtime_pm_fixups
---
drivers/acpi/bus.c | 3 ++-
drivers/acpi/pci_bind.c | 6 ++++++
drivers/acpi/power.c | 5 ++++-
drivers/acpi/sleep.c | 2 +-
drivers/acpi/wakeup.c | 2 +-
drivers/pci/pci-acpi.c | 2 +-
include/acpi/acpi_bus.h | 2 +-
7 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 310e3b9..371debe 100644
index 7ced61f..e4e0114 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -329,7 +329,8 @@ int acpi_bus_set_power(acpi_handle handle, int state)
goto end;
}
}
@@ -256,7 +256,8 @@ static int __acpi_bus_set_power(struct acpi_device *device, int state)
* a lower-powered state.
*/
if (state < device->power.state) {
- if (device->power.flags.power_resources) {
+ if (device->power.flags.power_resources &&
+ !device->wakeup.run_wake_count) {
@ -16,10 +28,10 @@ index 310e3b9..371debe 100644
if (result)
goto end;
diff --git a/drivers/acpi/pci_bind.c b/drivers/acpi/pci_bind.c
index 8b3cc6a..b013174 100644
index 2ef0409..4b0bb68 100644
--- a/drivers/acpi/pci_bind.c
+++ b/drivers/acpi/pci_bind.c
@@ -33,6 +33,8 @@
@@ -32,6 +32,8 @@
#include <acpi/acpi_bus.h>
#include <acpi/acpi_drivers.h>
@ -28,20 +40,29 @@ index 8b3cc6a..b013174 100644
#define _COMPONENT ACPI_PCI_COMPONENT
ACPI_MODULE_NAME("pci_bind");
@@ -173,6 +175,8 @@ static int acpi_pci_bind(struct acpi_device *device)
@@ -65,6 +67,7 @@ static int acpi_pci_bind(struct acpi_device *device)
acpi_handle handle;
struct pci_bus *bus;
struct pci_dev *dev;
+ int state;
dev = acpi_get_pci_dev(device->handle);
if (!dev)
@@ -87,6 +90,9 @@ static int acpi_pci_bind(struct acpi_device *device)
device->ops.unbind = acpi_pci_unbind;
}
+ acpi_power_transition(device, acpi_power_get_inferred_state(device));
+ acpi_power_get_inferred_state(device, &state);
+ acpi_power_transition(device, state);
+
/*
* Evaluate and parse _PRT, if exists. This code allows parsing of
* _PRT objects within the scope of non-bridge devices. Note that
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 844c155..8a42ddf 100644
index 9ac2a9f..cd6a8df 100644
--- a/drivers/acpi/power.c
+++ b/drivers/acpi/power.c
@@ -394,7 +394,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state)
@@ -412,7 +412,7 @@ int acpi_enable_wakeup_device_power(struct acpi_device *dev, int sleep_state)
* State Wake) for the device, if present
* 2. Shutdown down the power resources
*/
@ -50,7 +71,7 @@ index 844c155..8a42ddf 100644
{
int i, err = 0;
@@ -417,6 +417,9 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev)
@@ -435,6 +435,9 @@ int acpi_disable_wakeup_device_power(struct acpi_device *dev)
if (err)
goto out;
@ -59,12 +80,12 @@ index 844c155..8a42ddf 100644
+
/* Close power resource */
for (i = 0; i < dev->wakeup.resources.count; i++) {
int ret = acpi_power_off_device(
int ret = acpi_power_off(dev->wakeup.resources.handles[i]);
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 2c5cd02..6bf016b 100644
index d6a8cd1..5d68dc0 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -670,7 +670,7 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
@@ -697,7 +697,7 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
error = enable ?
acpi_enable_wakeup_device_power(adev, acpi_target_sleep_state) :
@ -74,20 +95,20 @@ index 2c5cd02..6bf016b 100644
dev_info(dev, "wake-up capability %s by ACPI\n",
enable ? "enabled" : "disabled");
diff --git a/drivers/acpi/wakeup.c b/drivers/acpi/wakeup.c
index f62a50c..ff48a54 100644
index ed65014..a0cabc3 100644
--- a/drivers/acpi/wakeup.c
+++ b/drivers/acpi/wakeup.c
@@ -71,7 +71,7 @@ void acpi_disable_wakeup_devices(u8 sleep_state)
@@ -73,7 +73,7 @@ void acpi_disable_wakeup_devices(u8 sleep_state)
ACPI_GPE_DISABLE);
if (dev->wakeup.state.enabled)
if (device_may_wakeup(&dev->dev))
- acpi_disable_wakeup_device_power(dev);
+ acpi_disable_wakeup_device_power(dev, sleep_state);
}
}
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 24e19c5..cd99494 100644
index 6fe0772..819fa7a 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -302,7 +302,7 @@ static int acpi_dev_run_wake(struct device *phys_dev, bool enable)
@ -100,10 +121,10 @@ index 24e19c5..cd99494 100644
} else {
error = -EALREADY;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 4de84ce..284f43c 100644
index 78ca429..92d6e86 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -387,7 +387,7 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
@@ -379,7 +379,7 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle);
#define DEVICE_ACPI_HANDLE(dev) ((acpi_handle)((dev)->archdata.acpi_handle))
int acpi_enable_wakeup_device_power(struct acpi_device *dev, int state);
@ -112,3 +133,6 @@ index 4de84ce..284f43c 100644
#ifdef CONFIG_PM_OPS
int acpi_pm_device_sleep_state(struct device *, int *);
--
1.7.3.5

View File

@ -1,2 +1,3 @@
c8ee37b4fdccdb651e0603d35350b434 linux-2.6.37.tar.bz2
4651b1512e2fba1735713aca8f1007fc patch-2.6.38-rc2.bz2
1edbfed39a74c24b542747f2b97f1e32 patch-2.6.38-rc2-git1.bz2

View File

@ -1,24 +0,0 @@
Fix TPM timeouts on boot (#530393)
--- a/drivers/char/tpm/tpm.c
+++ a/drivers/char/tpm/tpm.c
@@ -354,12 +354,14 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip,
tpm_protected_ordinal_duration[ordinal &
TPM_PROTECTED_ORDINAL_MASK];
- if (duration_idx != TPM_UNDEFINED)
+ if (duration_idx != TPM_UNDEFINED) {
duration = chip->vendor.duration[duration_idx];
- if (duration <= 0)
+ /* if duration is 0, it's because chip->vendor.duration wasn't */
+ /* filled yet, so we set the lowest timeout just to give enough */
+ /* time to tpm_get_timeouts() succeed */
+ return (duration <= 0 ? HZ : duration);
+ } else
return 2 * 60 * HZ;
- else
- return duration;
}
EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);