Sunday, February 28, 2010

linux.kernel - 26 new messages in 17 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* linux-next requirements - 3 messages, 3 authors
http://groups.google.com/group/linux.kernel/t/68d372e561eb8d5e?hl=en
* gpio: introduce it8761e_gpio driver for IT8761E Super I/O chip - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/d2a40e6665d0d6c5?hl=en
* rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU - 3 messages,
2 authors
http://groups.google.com/group/linux.kernel/t/c78d0afc145c64ac?hl=en
* percpu: Add __percpu sparse annotations to hw_breakpoint - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/be0a31f08dd6f4d9?hl=en
* perf lock: Fix and add misc documentally things - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/d907e7c6d5011cd0?hl=en
* x86: fix out of order of gsi -- partial - 3 messages, 1 author
http://groups.google.com/group/linux.kernel/t/58949e2872365c61?hl=en
* mdadm software raid + ext4, capped at ~350MiB/s limitation/bug? - 1 messages,
1 author
http://groups.google.com/group/linux.kernel/t/08d2c4b721624c43?hl=en
* EXT4 is ~2X as slow as XFS (593MB/s vs 304MB/s) for writes? - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/e7b189bcaa2c1cb4?hl=en
* compiler: prevent dead store elimination - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/1182a2565515906c?hl=en
* udf: use ext2_find_next_bit - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/1a0fadd4ce5dc099?hl=en
* Related build errors (was: use ext2_find_next_bit) - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/537eaff4dcd8c586?hl=en
* syscalls: add new COMPAT_SYSCALL_DEFINE#N() macro - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/fde3099d2d4e3ee9?hl=en
* sound/usb/caiaq/midi.h: Checkpatch cleanup - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/e0ce05b42ac96287?hl=en
* sparc: use __ratelimit - 3 messages, 1 author
http://groups.google.com/group/linux.kernel/t/130d5d8c57b1ec23?hl=en
* alpha: use __ratelimit - 2 messages, 1 author
http://groups.google.com/group/linux.kernel/t/3b9a6cd3be193207?hl=en
* x86, fs: add sys_compat_write for net/socket.c - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/7166ff5b26dc771b?hl=en
* btrfs: use memparse - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/1a770cea2e03a5fb?hl=en

==============================================================================
TOPIC: linux-next requirements
http://groups.google.com/group/linux.kernel/t/68d372e561eb8d5e?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Feb 28 2010 12:30 am
From: Al Viro


On Sun, Feb 28, 2010 at 08:51:05AM +0100, Ingo Molnar wrote:

> ( Alas, ARM doesnt tend to be a big problem, at least as far as the facilities
> i'm concerned about go: it has implemented most of the core kernel
> infrastructures so there's few if any 'self inflicted' breakages that i can
> remember. )

FWIW, it might make sense to run cross-builds for many targets and post
the things that crop up + analysis to linux-arch... Any takers?

I haven't run a lot of cross-builds lately, but IME most of the breakage
tends to be less dramatic - somebody relying on indirect includes in
driver *or* forgetting to add "depends on" to Kconfig used to be the
most frequent case.

"let other targets rot" attitude has a very nasty effect - it snowballs.
At some point people *can't* check that their patches don't break things,
even if they want to. And that, IMO, sucks. At that point architecture
needs to be either removed or brought to the state when it builds in
mainline.

Note that we have filesystems that are built only on some architectures.
I don't know about you, but I *do* care about not leaving half-converted
interfaces in that area. For entirely rational reasons - people tend
to copy b0rken code from random places in the tree. Playing whack-a-mole
gets old pretty soon.
--
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/


== 2 of 3 ==
Date: Sun, Feb 28 2010 1:00 am
From: Ingo Molnar

* Al Viro <viro@ZenIV.linux.org.uk> wrote:

> On Sun, Feb 28, 2010 at 08:51:05AM +0100, Ingo Molnar wrote:
>
> > ( Alas, ARM doesnt tend to be a big problem, at least as far as the facilities
> > i'm concerned about go: it has implemented most of the core kernel
> > infrastructures so there's few if any 'self inflicted' breakages that i can
> > remember. )
>
> FWIW, it might make sense to run cross-builds for many targets and post the
> things that crop up + analysis to linux-arch... Any takers?
>
> I haven't run a lot of cross-builds lately, but IME most of the breakage
> tends to be less dramatic - somebody relying on indirect includes in driver
> *or* forgetting to add "depends on" to Kconfig used to be the most frequent
> case.
>
> "let other targets rot" attitude has a very nasty effect - it snowballs. At
> some point people *can't* check that their patches don't break things, even
> if they want to. And that, IMO, sucks. At that point architecture needs to
> be either removed or brought to the state when it builds in mainline.

What is happening right now is that our combined _costs_ snowball: generic
changes are burdened with the overhead of a thousand cuts ...

IMO either there's enough interest in keeping an architecture going, rooted in
_that_ architecture's importance (or the enthusiasm/clue of their developers),
or, after a few years of inactivity it really shouldnt be upstream.

Right now we are socializing all the costs, sometimes even pretending that all
architectures are equal. None of the costs really looks particularly large in
isolation, but the sum of them does exist and adds up in certain places of the
kernel.

Thanks,

Ingo
--
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/


== 3 of 3 ==
Date: Sun, Feb 28 2010 2:30 am
From: Stephen Rothwell


Hi Al,

On Sun, 28 Feb 2010 08:19:22 +0000 Al Viro <viro@ZenIV.linux.org.uk> wrote:
>
> FWIW, it might make sense to run cross-builds for many targets and post
> the things that crop up + analysis to linux-arch... Any takers?

See http://kisskb.ellerman.id.au/kisskb/branch/9/ ... we just need
someone to read it regularly and post about them. There is a set of
builds of Linus' tree there as well (look under "Branches").

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

==============================================================================
TOPIC: gpio: introduce it8761e_gpio driver for IT8761E Super I/O chip
http://groups.google.com/group/linux.kernel/t/d2a40e6665d0d6c5?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Feb 28 2010 1:00 am
From: Denis Turischev


Signed-off-by: Denis Turischev <denis@compulab.co.il>
---
drivers/gpio/Kconfig | 6 +
drivers/gpio/Makefile | 1 +
drivers/gpio/it8761e_gpio.c | 231 +++++++++++++++++++++++++++++++++++++++++++
3 files changed, 238 insertions(+), 0 deletions(-)
create mode 100644 drivers/gpio/it8761e_gpio.c

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 1730068..3c9e5ed 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -101,6 +101,12 @@ config GPIO_SCH
This driver can also be built as a module. If so, the module
will be called sch-gpio.

+config GPIO_IT8761E
+ tristate "IT8761E GPIO support"
+ depends on GPIOLIB
+ help
+ Say yes here to support GPIO functionality of IT8761E super I/O chip.
+
comment "I2C GPIO expanders:"

config GPIO_MAX732X
diff --git a/drivers/gpio/Makefile b/drivers/gpio/Makefile
index aa1d06e..4adf128 100644
--- a/drivers/gpio/Makefile
+++ b/drivers/gpio/Makefile
@@ -23,3 +23,4 @@ obj-$(CONFIG_GPIO_BT8XX) += bt8xxgpio.o
obj-$(CONFIG_GPIO_VR41XX) += vr41xx_giu.o
obj-$(CONFIG_GPIO_WM831X) += wm831x-gpio.o
obj-$(CONFIG_GPIO_SCH) += sch_gpio.o
+obj-$(CONFIG_GPIO_IT8761E) += it8761e_gpio.o
diff --git a/drivers/gpio/it8761e_gpio.c b/drivers/gpio/it8761e_gpio.c
new file mode 100644
index 0000000..753219c
--- /dev/null
+++ b/drivers/gpio/it8761e_gpio.c
@@ -0,0 +1,231 @@
+/*
+ * it8761_gpio.c - GPIO interface for IT8761E Super I/O chip
+ *
+ * Author: Denis Turischev <denis@compulab.co.il>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License 2 as published
+ * by the Free Software Foundation.
+ *
+ * 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; see the file COPYING. If not, write to
+ * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/io.h>
+#include <linux/errno.h>
+#include <linux/ioport.h>
+
+#include <linux/gpio.h>
+
+#define SIO_CHIP_ID 0x8761
+#define CHIP_ID_HIGH_BYTE 0x20
+#define CHIP_ID_LOW_BYTE 0x21
+
+static u8 ports[2] = { 0x2e, 0x4e };
+static u8 port;
+
+static DEFINE_SPINLOCK(sio_lock);
+
+#define GPIO_NAME "it8761-gpio"
+#define GPIO_BA_HIGH_BYTE 0x60
+#define GPIO_BA_LOW_BYTE 0x61
+#define GPIO_IOSIZE 4
+#define GPIO1X_IO 0xf0
+#define GPIO2X_IO 0xf1
+
+static u16 gpio_ba;
+
+static u8 read_reg(u8 addr, u8 port)
+{
+ outb(addr, port);
+ return inb(port + 1);
+}
+
+static void write_reg(u8 data, u8 addr, u8 port)
+{
+ outb(addr, port);
+ outb(data, port + 1);
+}
+
+static void enter_conf_mode(u8 port)
+{
+ outb(0x87, port);
+ outb(0x61, port);
+ outb(0x55, port);
+ outb((port == 0x2e) ? 0x55 : 0xaa, port);
+}
+
+static void exit_conf_mode(u8 port)
+{
+ outb(0x2, port);
+ outb(0x2, port + 1);
+}
+
+static void enter_gpio_mode(u8 port)
+{
+ write_reg(0x2, 0x7, port);
+}
+
+static int it8761e_gpio_get(struct gpio_chip *gc, unsigned gpio_num)
+{
+ u16 reg;
+ u8 bit;
+
+ bit = gpio_num % 7;
+ reg = (gpio_num >= 7) ? gpio_ba + 1 : gpio_ba;
+
+ return !!(inb(reg) & (1 << bit));
+}
+
+static int it8761e_gpio_direction_in(struct gpio_chip *gc, unsigned gpio_num)
+{
+ u8 curr_dirs;
+ u8 io_reg, bit;
+
+ bit = gpio_num % 7;
+ io_reg = (gpio_num >= 7) ? GPIO2X_IO : GPIO1X_IO;
+
+ spin_lock(&sio_lock);
+
+ enter_conf_mode(port);
+ enter_gpio_mode(port);
+
+ curr_dirs = read_reg(io_reg, port);
+
+ if (curr_dirs & (1 << bit))
+ write_reg(curr_dirs & ~(1 << bit), io_reg, port);
+
+ exit_conf_mode(port);
+
+ spin_unlock(&sio_lock);
+ return 0;
+}
+
+static void it8761e_gpio_set(struct gpio_chip *gc,
+ unsigned gpio_num, int val)
+{
+ u8 curr_vals, bit;
+ u16 reg;
+
+ bit = gpio_num % 7;
+ reg = (gpio_num >= 7) ? gpio_ba + 1 : gpio_ba;
+
+ spin_lock(&sio_lock);
+
+ curr_vals = inb(reg);
+ if (val)
+ outb(curr_vals | (1 << bit) , reg);
+ else
+ outb(curr_vals & ~(1 << bit), reg);
+
+ spin_unlock(&sio_lock);
+}
+
+static int it8761e_gpio_direction_out(struct gpio_chip *gc,
+ unsigned gpio_num, int val)
+{
+ u8 curr_dirs, io_reg, bit;
+
+ bit = gpio_num % 7;
+ io_reg = (gpio_num >= 7) ? GPIO2X_IO : GPIO1X_IO;
+
+ it8761e_gpio_set(gc, gpio_num, val);
+
+ spin_lock(&sio_lock);
+
+ enter_conf_mode(port);
+ enter_gpio_mode(port);
+
+ curr_dirs = read_reg(io_reg, port);
+
+ if (!(curr_dirs & (1 << bit)))
+ write_reg(curr_dirs | (1 << bit), io_reg, port);
+
+ exit_conf_mode(port);
+
+ spin_unlock(&sio_lock);
+ return 0;
+}
+
+static struct gpio_chip it8761e_gpio_chip = {
+ .label = GPIO_NAME,
+ .owner = THIS_MODULE,
+ .get = it8761e_gpio_get,
+ .direction_input = it8761e_gpio_direction_in,
+ .set = it8761e_gpio_set,
+ .direction_output = it8761e_gpio_direction_out,
+};
+
+static int __init it8761e_gpio_init(void)
+{
+ int i, id, err;
+
+ /* chip and port detection */
+ for (i = 0; i < ARRAY_SIZE(ports); i++) {
+ spin_lock(&sio_lock);
+ enter_conf_mode(ports[i]);
+
+ id = (read_reg(CHIP_ID_HIGH_BYTE, ports[i]) << 8) +
+ read_reg(CHIP_ID_LOW_BYTE, ports[i]);
+
+ exit_conf_mode(ports[i]);
+ spin_unlock(&sio_lock);
+
+ if (id == SIO_CHIP_ID) {
+ port = ports[i];
+ break;
+ }
+ }
+
+ if (!port)
+ return -ENODEV;
+
+ /* fetch GPIO base address */
+ enter_conf_mode(port);
+ enter_gpio_mode(port);
+ gpio_ba = (read_reg(GPIO_BA_HIGH_BYTE, port) << 8) +
+ read_reg(GPIO_BA_LOW_BYTE, port);
+ exit_conf_mode(port);
+
+ if (!request_region(gpio_ba, GPIO_IOSIZE, GPIO_NAME))
+ return -EBUSY;
+
+ it8761e_gpio_chip.base = -1;
+ it8761e_gpio_chip.ngpio = 14;
+
+ err = gpiochip_add(&it8761e_gpio_chip);
+ if (err < 0)
+ goto gpiochip_add_err;
+
+ return 0;
+
+gpiochip_add_err:
+ release_region(gpio_ba, GPIO_IOSIZE);
+ gpio_ba = 0;
+ return err;
+}
+
+static void __exit it8761e_gpio_exit(void)
+{
+ if (gpio_ba) {
+ gpiochip_remove(&it8761e_gpio_chip);
+
+ release_region(gpio_ba, GPIO_IOSIZE);
+ gpio_ba = 0;
+ }
+}
+module_init(it8761e_gpio_init);
+module_exit(it8761e_gpio_exit);
+
+MODULE_AUTHOR("Denis Turischev <denis@compulab.co.il>");
+MODULE_DESCRIPTION("GPIO interface for IT8761E Super I/O chip");
+MODULE_LICENSE("GPL");
--
1.6.3.3
--
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/

==============================================================================
TOPIC: rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU
http://groups.google.com/group/linux.kernel/t/c78d0afc145c64ac?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Feb 28 2010 1:00 am
From: "tip-bot for Paul E. McKenney"


Commit-ID: 622ea685f1fafdf84d612440535c84341f0860b8
Gitweb: http://git.kernel.org/tip/622ea685f1fafdf84d612440535c84341f0860b8
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
AuthorDate: Sat, 27 Feb 2010 14:53:07 -0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 28 Feb 2010 09:17:42 +0100

rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU

Make the holdoff only happen when the full number of attempts
have been made.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1267311188-16603-1-git-send-email-paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/rcutree_plugin.h | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h
index 464ad2c..79b53bd 100644
--- a/kernel/rcutree_plugin.h
+++ b/kernel/rcutree_plugin.h
@@ -1010,6 +1010,10 @@ int rcu_needs_cpu(int cpu)
int c = 0;
int thatcpu;

+ /* Check for being in the holdoff period. */
+ if (per_cpu(rcu_dyntick_holdoff, cpu) == jiffies)
+ return rcu_needs_cpu_quick_check(cpu);
+
/* Don't bother unless we are the last non-dyntick-idle CPU. */
for_each_cpu_not(thatcpu, nohz_cpu_mask)
if (thatcpu != cpu) {
@@ -1041,10 +1045,8 @@ int rcu_needs_cpu(int cpu)
}

/* If RCU callbacks are still pending, RCU still needs this CPU. */
- if (c) {
+ if (c)
raise_softirq(RCU_SOFTIRQ);
- per_cpu(rcu_dyntick_holdoff, cpu) = jiffies;
- }
return c;
}

--
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/


== 2 of 3 ==
Date: Sun, Feb 28 2010 1:00 am
From: Ingo Molnar

* Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:

> Hello!
>
> This series (1) makes RCU_FAST_NO_HZ actually do the full number of
> iterations specified instead of just one and (2) fixes an RCU lockdep
> splat.

Thanks, applied.

This one is pretty stubborn, it still triggers:

[ 0.000000] soft-irq read-recursion/321: ok |
[ 0.000000] -------------------------------------------------------
[ 0.000000] Good, all 218 testcases passed! |
[ 0.000000] ---------------------------------
[ 0.000000] allocated 10485760 bytes of page_cgroup
[ 0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[ 0.000000]
[ 0.000000] ===================================================
[ 0.000000] [ INFO: suspicious rcu_dereference_check() usage. ]
[ 0.000000] ---------------------------------------------------
[ 0.000000] kernel/sched_fair.c:3479 invoked rcu_dereference_check() without protection!
[ 0.000000]
[ 0.000000] other info that might help us debug this:
[ 0.000000]
[ 0.000000] no locks held by swapper/0.
[ 0.000000]
[ 0.000000] stack backtrace:
[ 0.000000] Pid: 0, comm: swapper Not tainted 2.6.33-tip-01015-g97e7da3-dirty #10753
[ 0.000000] Call Trace:
[ 0.000000] <IRQ> [<ffffffff8107f5d1>] lockdep_rcu_dereference+0xa1/0xb0
[ 0.000000] [<ffffffff8104afd1>] scheduler_tick+0x221/0x2c0
[ 0.000000] [<ffffffff8105f6d5>] update_process_times+0x55/0x70
[ 0.000000] [<ffffffff8107ac27>] tick_periodic+0x27/0x70
[ 0.000000] [<ffffffff8107ac8f>] tick_handle_periodic+0x1f/0x90
[ 0.000000] [<ffffffff8100e29a>] timer_interrupt+0x1a/0x30
[ 0.000000] [<ffffffff810a28aa>] handle_IRQ_event+0x3a/0xe0
[ 0.000000] [<ffffffff810a53ab>] handle_level_irq+0x8b/0x130
[ 0.000000] [<ffffffff8100da94>] handle_irq+0x44/0x70
[ 0.000000] [<ffffffff8100cfde>] do_IRQ+0x6e/0xf0
[ 0.000000] [<ffffffff817eea13>] ret_from_intr+0x0/0x16
[ 0.000000] <EOI> [<ffffffff8102dfe6>] ? native_restore_fl+0x6/0x10
[ 0.000000] [<ffffffff817ee3df>] _raw_spin_unlock_irqrestore+0x6f/0x80
[ 0.000000] [<ffffffff810a37f3>] __setup_irq+0x1b3/0x3b0
[ 0.000000] [<ffffffff810a3a18>] setup_irq+0x28/0x40
[ 0.000000] [<ffffffff81ef2914>] setup_default_timer_irq+0x12/0x14
[ 0.000000] [<ffffffff81ef292d>] hpet_time_init+0x17/0x19
[ 0.000000] [<ffffffff81ef28fb>] x86_late_time_init+0xa/0x11
[ 0.000000] [<ffffffff81eefcf4>] start_kernel+0x25f/0x2e6
[ 0.000000] [<ffffffff81eef30b>] x86_64_start_reservations+0xf6/0xfa
[ 0.000000] [<ffffffff81eef409>] x86_64_start_kernel+0xfa/0x109
[ 0.000000] Fast TSC calibration using PIT
[ 0.000000] Detected 2002.507 MHz processor.
[ 0.004004] Calibrating delay loop (skipped), value calculated using timer frequency.. 4005.01 BogoMIPS (lpj=2002507)

Ingo


== 3 of 3 ==
Date: Sun, Feb 28 2010 1:10 am
From: "tip-bot for Paul E. McKenney"


Commit-ID: 1883c79a57a5fe25309007590cccb1b2782c41b2
Gitweb: http://git.kernel.org/tip/1883c79a57a5fe25309007590cccb1b2782c41b2
Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
AuthorDate: Sat, 27 Feb 2010 14:53:08 -0800
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 28 Feb 2010 09:17:42 +0100

rcu: Make task_subsys_state() RCU-lockdep checks handle boot-time use

It is apparently legal to invoke task_subsys_state() without RCU
protection during early boot time. After all, there are no
concurrent tasks, so there can be no grace periods completing
concurrently.

But this does need an Acked-by from the cgroups folks.

Located-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1267311188-16603-2-git-send-email-paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
include/linux/cgroup.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index c9bbcb2..a73e1ce 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -489,6 +489,7 @@ static inline struct cgroup_subsys_state *task_subsys_state(
{
return rcu_dereference_check(task->cgroups->subsys[subsys_id],
rcu_read_lock_held() ||
+ !rcu_scheduler_active ||
cgroup_lock_is_held());
}

--
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/

==============================================================================
TOPIC: percpu: Add __percpu sparse annotations to hw_breakpoint
http://groups.google.com/group/linux.kernel/t/be0a31f08dd6f4d9?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Feb 28 2010 1:00 am
From: tip-bot for Tejun Heo


Commit-ID: 44ee63587dce85593c22497140db16f4e5027860
Gitweb: http://git.kernel.org/tip/44ee63587dce85593c22497140db16f4e5027860
Author: Tejun Heo <tj@kernel.org>
AuthorDate: Wed, 17 Feb 2010 10:50:50 +0900
Committer: Frederic Weisbecker <fweisbec@gmail.com>
CommitDate: Sat, 27 Feb 2010 16:23:39 +0100

percpu: Add __percpu sparse annotations to hw_breakpoint

Add __percpu sparse annotations to hw_breakpoint.

These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors. This patch doesn't affect normal builds.

In kernel/hw_breakpoint.c, per_cpu(nr_task_bp_pinned, cpu)'s will
trigger spurious noderef related warnings from sparse. Changing it to
&per_cpu(nr_task_bp_pinned[0], cpu) will work around the problem but
deemed to ugly by the maintainer. Leave it alone until better
solution can be found.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
LKML-Reference: <4B7B4B7A.9050902@kernel.org>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
include/linux/hw_breakpoint.h | 8 ++++----
kernel/hw_breakpoint.c | 10 +++++-----
samples/hw_breakpoint/data_breakpoint.c | 6 +++---
3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/include/linux/hw_breakpoint.h b/include/linux/hw_breakpoint.h
index 5977b72..c70d27a 100644
--- a/include/linux/hw_breakpoint.h
+++ b/include/linux/hw_breakpoint.h
@@ -66,14 +66,14 @@ register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
perf_overflow_handler_t triggered,
int cpu);

-extern struct perf_event **
+extern struct perf_event * __percpu *
register_wide_hw_breakpoint(struct perf_event_attr *attr,
perf_overflow_handler_t triggered);

extern int register_perf_hw_breakpoint(struct perf_event *bp);
extern int __register_perf_hw_breakpoint(struct perf_event *bp);
extern void unregister_hw_breakpoint(struct perf_event *bp);
-extern void unregister_wide_hw_breakpoint(struct perf_event **cpu_events);
+extern void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events);

extern int dbg_reserve_bp_slot(struct perf_event *bp);
extern int dbg_release_bp_slot(struct perf_event *bp);
@@ -100,7 +100,7 @@ static inline struct perf_event *
register_wide_hw_breakpoint_cpu(struct perf_event_attr *attr,
perf_overflow_handler_t triggered,
int cpu) { return NULL; }
-static inline struct perf_event **
+static inline struct perf_event * __percpu *
register_wide_hw_breakpoint(struct perf_event_attr *attr,
perf_overflow_handler_t triggered) { return NULL; }
static inline int
@@ -109,7 +109,7 @@ static inline int
__register_perf_hw_breakpoint(struct perf_event *bp) { return -ENOSYS; }
static inline void unregister_hw_breakpoint(struct perf_event *bp) { }
static inline void
-unregister_wide_hw_breakpoint(struct perf_event **cpu_events) { }
+unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events) { }
static inline int
reserve_bp_slot(struct perf_event *bp) {return -ENOSYS; }
static inline void release_bp_slot(struct perf_event *bp) { }
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c
index 967e661..6542eac 100644
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -413,17 +413,17 @@ EXPORT_SYMBOL_GPL(unregister_hw_breakpoint);
*
* @return a set of per_cpu pointers to perf events
*/
-struct perf_event **
+struct perf_event * __percpu *
register_wide_hw_breakpoint(struct perf_event_attr *attr,
perf_overflow_handler_t triggered)
{
- struct perf_event **cpu_events, **pevent, *bp;
+ struct perf_event * __percpu *cpu_events, **pevent, *bp;
long err;
int cpu;

cpu_events = alloc_percpu(typeof(*cpu_events));
if (!cpu_events)
- return ERR_PTR(-ENOMEM);
+ return (void __percpu __force *)ERR_PTR(-ENOMEM);

get_online_cpus();
for_each_online_cpu(cpu) {
@@ -451,7 +451,7 @@ fail:
put_online_cpus();

free_percpu(cpu_events);
- return ERR_PTR(err);
+ return (void __percpu __force *)ERR_PTR(err);
}
EXPORT_SYMBOL_GPL(register_wide_hw_breakpoint);

@@ -459,7 +459,7 @@ EXPORT_SYMBOL_GPL(register_wide_hw_breakpoint);
* unregister_wide_hw_breakpoint - unregister a wide breakpoint in the kernel
* @cpu_events: the per cpu set of events to unregister
*/
-void unregister_wide_hw_breakpoint(struct perf_event **cpu_events)
+void unregister_wide_hw_breakpoint(struct perf_event * __percpu *cpu_events)
{
int cpu;
struct perf_event **pevent;
diff --git a/samples/hw_breakpoint/data_breakpoint.c b/samples/hw_breakpoint/data_breakpoint.c
index c69cbe9..bd0f337 100644
--- a/samples/hw_breakpoint/data_breakpoint.c
+++ b/samples/hw_breakpoint/data_breakpoint.c
@@ -34,7 +34,7 @@
#include <linux/perf_event.h>
#include <linux/hw_breakpoint.h>

-struct perf_event **sample_hbp;
+struct perf_event * __percpu *sample_hbp;

static char ksym_name[KSYM_NAME_LEN] = "pid_max";
module_param_string(ksym, ksym_name, KSYM_NAME_LEN, S_IRUGO);
@@ -61,8 +61,8 @@ static int __init hw_break_module_init(void)
attr.bp_type = HW_BREAKPOINT_W | HW_BREAKPOINT_R;

sample_hbp = register_wide_hw_breakpoint(&attr, sample_hbp_handler);
- if (IS_ERR(sample_hbp)) {
- ret = PTR_ERR(sample_hbp);
+ if (IS_ERR((void __force *)sample_hbp)) {
+ ret = PTR_ERR((void __force *)sample_hbp);
goto fail;
}

--
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/

==============================================================================
TOPIC: perf lock: Fix and add misc documentally things
http://groups.google.com/group/linux.kernel/t/d907e7c6d5011cd0?hl=en
==============================================================================

== 1 of 1 ==
Date: Sun, Feb 28 2010 1:00 am
From: tip-bot for Hitoshi Mitake


Commit-ID: 84c6f88fc8265d7a712d7d6ed8fc1a878dfc84d1
Gitweb: http://git.kernel.org/tip/84c6f88fc8265d7a712d7d6ed8fc1a878dfc84d1
Author: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
AuthorDate: Thu, 4 Feb 2010 16:08:15 +0900
Committer: Frederic Weisbecker <fweisbec@gmail.com>
CommitDate: Sat, 27 Feb 2010 17:05:22 +0100

perf lock: Fix and add misc documentally things

I've forgot to add 'perf lock' line to command-list.txt,
so users of perf could not find perf lock when they type 'perf'.

Fixing command-list.txt requires document
(tools/perf/Documentation/perf-lock.txt).
But perf lock is too much "under construction" to write a
stable document, so this is something like pseudo document for now.

And I wrote description of perf lock at help section of
CONFIG_LOCK_STAT, this will navigate users of lock trace events.

Signed-off-by: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
LKML-Reference: <1265267295-8388-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
---
lib/Kconfig.debug | 6 ++++++
tools/perf/Documentation/perf-lock.txt | 29 +++++++++++++++++++++++++++++
tools/perf/command-list.txt | 1 +
3 files changed, 36 insertions(+), 0 deletions(-)

diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 25c3ed5..65f964e 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -520,6 +520,12 @@ config LOCK_STAT

For more details, see Documentation/lockstat.txt

+ You can analyze lock events with "perf lock", subcommand of perf.
+ If you want to use "perf lock", you need to turn on CONFIG_EVENT_TRACING.
+
+ CONFIG_LOCK_STAT defines "contended" and "acquired" lock events.
+ (CONFIG_LOCKDEP defines "acquire" and "release" events.)
+
config DEBUG_LOCKDEP
bool "Lock dependency engine debugging"
depends on DEBUG_KERNEL && LOCKDEP
diff --git a/tools/perf/Documentation/perf-lock.txt b/tools/perf/Documentation/perf-lock.txt
new file mode 100644
index 0000000..b317102
--- /dev/null
+++ b/tools/perf/Documentation/perf-lock.txt
@@ -0,0 +1,29 @@
+perf-lock(1)
+============
+
+NAME
+----
+perf-lock - Analyze lock events
+
+SYNOPSIS
+--------
+[verse]
+'perf lock' {record|report|trace}
+
+DESCRIPTION
+-----------
+You can analyze various lock behaviours
+and statistics with this 'perf lock' command.
+
+ 'perf lock record <command>' records lock events
+ between start and end <command>. And this command
+ produces the file "perf.data" which contains tracing
+ results of lock events.
+
+ 'perf lock trace' shows raw lock events.
+
+ 'perf lock report' reports statistical data.
+
+SEE ALSO
+--------
+linkperf:perf[1]
diff --git a/tools/perf/command-list.txt b/tools/perf/command-list.txt
index 9afcff2..db6ee94 100644
--- a/tools/perf/command-list.txt
+++ b/tools/perf/command-list.txt
@@ -18,3 +18,4 @@ perf-top mainporcelain common
perf-trace mainporcelain common
perf-probe mainporcelain common
perf-kmem mainporcelain common
+perf-lock mainporcelain common
--
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/

==============================================================================
TOPIC: x86: fix out of order of gsi -- partial
http://groups.google.com/group/linux.kernel/t/58949e2872365c61?hl=en
==============================================================================

== 1 of 3 ==
Date: Sun, Feb 28 2010 1:10 am
From: Yinghai Lu


On 02/28/2010 12:09 AM, Ingo Molnar wrote:
>
> * Yinghai Lu <yinghai@kernel.org> wrote:
>
>> From: Eric W. Biederman <ebiederm@xmission.com>
>>
>> found IBM x3950 will have problem after
>>
>> |commit b9c61b70075c87a8612624736faf4a2de5b1ed30
>
> Have you seen the commit notifications i sent for the v8 patches:
>
> Commit-ID: ca8c764cb39bf6cade71933b38e8c830eb8b73c6
> Commit-ID: 519d637a93116ffbcd50e9e3f2591f41584f372c
>
> Those include a much improved changelogs - please adopt those. (and preferably
> send deltas against tip:tmp.x86/apic.)

please drop those two.

will send v12 to you.

Thanks

Yinghai
--
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/


== 2 of 3 ==
Date: Sun, Feb 28 2010 1:10 am
From: Yinghai Lu


Iranna D Ankad reported that IBM x3950 systems have boot problems
after this commit:

|
| commit b9c61b70075c87a8612624736faf4a2de5b1ed30
|
| x86/pci: update pirq_enable_irq() to setup io apic routing
|

As explained in the previous patch ("x86: Fix out of order gsi - partial)
try to remap those gsis

This patch adds boot_ioapic_idx and gsi_to_irq/irq_to_gsi

Reported-by: Iranna D Ankad <iranna.ankad@in.ibm.com>
Bisected-by: Iranna D Ankad <iranna.ankad@in.ibm.com>
Tested-by: Gary Hade <garyhade@us.ibm.com>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: len.brown@intel.com


---
arch/x86/include/asm/io_apic.h | 2
arch/x86/include/asm/mpspec.h | 3 +
arch/x86/kernel/acpi/boot.c | 28 +++++++----
arch/x86/kernel/apic/io_apic.c | 104 +++++++++++++++++++++++++++++++++--------
drivers/pnp/pnpacpi/rsparser.c | 8 +++
5 files changed, 114 insertions(+), 31 deletions(-)

Index: linux-2.6/arch/x86/include/asm/io_apic.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/io_apic.h
+++ linux-2.6/arch/x86/include/asm/io_apic.h
@@ -160,7 +160,7 @@ extern int io_apic_get_redir_entries(int
struct io_apic_irq_attr;
extern int io_apic_set_pci_routing(struct device *dev, int irq,
struct io_apic_irq_attr *irq_attr);
-void setup_IO_APIC_irq_extra(u32 gsi);
+void setup_IO_APIC_irq_extra(u32 gsi, unsigned int *irq);
extern int (*ioapic_renumber_irq)(int ioapic, int irq);
extern void ioapic_init_mappings(void);
extern void ioapic_insert_resources(void);
Index: linux-2.6/arch/x86/include/asm/mpspec.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/mpspec.h
+++ linux-2.6/arch/x86/include/asm/mpspec.h
@@ -97,6 +97,9 @@ static inline void early_reserve_e820_mp

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate