* Re: [PATCHv5] OMAP3: Devkit8000: Change lcd power pin
From: Thomas Weber @ 2011-02-01 21:24 UTC (permalink / raw)
To: Tony Lindgren
Cc: linux-omap, Russell King, open list:ARM PORT, open list,
Daniel Morsing, charu, sshtylyov, manjugk
In-Reply-To: <1295538108-26451-1-git-send-email-weber@corscience.de>
On Thu, Jan 20, 2011 at 4:41 PM, Thomas Weber <weber@corscience.de> wrote:
> This patch fixes a wrongly used lcd enable pin.
>
> The Devkit8000 uses twl4030_ledA configured as output gpio only for
> the lcd enable line. twl4030_gpio.1 is used through the generic
> gpio functions while ledA is used via low level twl4030 calls.
>
> This patch removes the low level calls and use the generic gpio functions
> for initialization and use of ledA. This patch also fixes a bug where the
> lcd would not power down when blanking.
>
> Further this patch fixes an indentation issue. The comment line uses
> eight whitespace and is replaced with a hard tab.
>
> gpio_request + gpio_direction_output are replaced with gpio_request_one.
> The return value of gpio_request_one is used to set the value of the
> gpio to -EINVAL when unsuccessful, so that gpio_is_valid can detect the
> unsuccessful request. But already successful requested gpios are not freed.
>
> Reported-by: Daniel Morsing <daniel.morsing@gmail.com>
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
> Changes from v4:
> Merge of two patches
> Use of gpio_request_one instead of gpio_request + gpio_direction_output
> Changes from v3:
> Use return value of gpio_request
> Changes from v2:
> Fix indention => indentation
> Better comment for removing low level functions used for twl4030 gpio
> Changes from v1:
> Pull the indentation fix into this patch
> Change the pin for lcd pwren
>
> arch/arm/mach-omap2/board-devkit8000.c | 27 ++++++++++++++++-----------
> 1 files changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
> index a5eb955..e4c12fe 100644
> --- a/arch/arm/mach-omap2/board-devkit8000.c
> +++ b/arch/arm/mach-omap2/board-devkit8000.c
> @@ -115,9 +115,6 @@ static struct omap2_hsmmc_info mmc[] = {
>
> static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
> {
> - twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1);
> - twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0);
> -
> if (gpio_is_valid(dssdev->reset_gpio))
> gpio_set_value_cansleep(dssdev->reset_gpio, 1);
> return 0;
> @@ -247,6 +244,8 @@ static struct gpio_led gpio_leds[];
> static int devkit8000_twl_gpio_setup(struct device *dev,
> unsigned gpio, unsigned ngpio)
> {
> + int ret;
> +
> omap_mux_init_gpio(29, OMAP_PIN_INPUT);
> /* gpio + 0 is "mmc0_cd" (input/IRQ) */
> mmc[0].gpio_cd = gpio + 0;
> @@ -255,17 +254,23 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
> /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
> gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
>
> - /* gpio + 1 is "LCD_PWREN" (out, active high) */
> - devkit8000_lcd_device.reset_gpio = gpio + 1;
> - gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN");
> - /* Disable until needed */
> - gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0);
> + /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
> + devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0;
> + ret = gpio_request_one(devkit8000_lcd_device.reset_gpio,
> + GPIOF_DIR_OUT | GPIOF_INIT_LOW, "LCD_PWREN");
> + if (ret < 0) {
> + devkit8000_lcd_device.reset_gpio = -EINVAL;
> + printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n");
> + }
>
> /* gpio + 7 is "DVI_PD" (out, active low) */
> devkit8000_dvi_device.reset_gpio = gpio + 7;
> - gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown");
> - /* Disable until needed */
> - gpio_direction_output(devkit8000_dvi_device.reset_gpio, 0);
> + ret = gpio_request_one(devkit8000_dvi_device.reset_gpio,
> + GPIOF_DIR_OUT | GPIOF_INIT_LOW, "DVI PowerDown");
> + if (ret < 0) {
> + devkit8000_dvi_device.reset_gpio = -EINVAL;
> + printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n");
> + }
>
> return 0;
> }
> --
> 1.7.4.rc2
>
> --
Hello Tony,
can you apply this patch?
Thomas
^ permalink raw reply
* [PATCHv5] OMAP3: Devkit8000: Change lcd power pin
From: Thomas Weber @ 2011-02-01 21:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1295538108-26451-1-git-send-email-weber@corscience.de>
On Thu, Jan 20, 2011 at 4:41 PM, Thomas Weber <weber@corscience.de> wrote:
> This patch fixes a wrongly used lcd enable pin.
>
> The Devkit8000 uses twl4030_ledA configured as output gpio only for
> the lcd enable line. twl4030_gpio.1 is used through the generic
> gpio functions while ledA is used via low level twl4030 calls.
>
> This patch removes the low level calls and use the generic gpio functions
> for initialization and use of ledA. This patch also fixes a bug where the
> lcd would not power down when blanking.
>
> Further this patch fixes an indentation issue. The comment line uses
> eight whitespace and is replaced with a hard tab.
>
> gpio_request + gpio_direction_output are replaced with gpio_request_one.
> The return value of gpio_request_one is used to set the value of the
> gpio to -EINVAL when unsuccessful, so that gpio_is_valid can detect the
> unsuccessful request. But already successful requested gpios are not freed.
>
> Reported-by: Daniel Morsing <daniel.morsing@gmail.com>
> Signed-off-by: Thomas Weber <weber@corscience.de>
> ---
> Changes from v4:
> ? ? ? ?Merge of two patches
> ? ? ? ?Use of gpio_request_one instead of gpio_request + gpio_direction_output
> Changes from v3:
> ? ? ? ?Use return value of gpio_request
> Changes from v2:
> ? ? ? ?Fix indention => indentation
> ? ? ? ?Better comment for removing low level functions used for twl4030 gpio
> Changes from v1:
> ? ? ? ?Pull the indentation fix into this patch
> ? ? ? ?Change the pin for lcd pwren
>
> ?arch/arm/mach-omap2/board-devkit8000.c | ? 27 ++++++++++++++++-----------
> ?1 files changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
> index a5eb955..e4c12fe 100644
> --- a/arch/arm/mach-omap2/board-devkit8000.c
> +++ b/arch/arm/mach-omap2/board-devkit8000.c
> @@ -115,9 +115,6 @@ static struct omap2_hsmmc_info mmc[] = {
>
> ?static int devkit8000_panel_enable_lcd(struct omap_dss_device *dssdev)
> ?{
> - ? ? ? twl_i2c_write_u8(TWL4030_MODULE_GPIO, 0x80, REG_GPIODATADIR1);
> - ? ? ? twl_i2c_write_u8(TWL4030_MODULE_LED, 0x0, 0x0);
> -
> ? ? ? ?if (gpio_is_valid(dssdev->reset_gpio))
> ? ? ? ? ? ? ? ?gpio_set_value_cansleep(dssdev->reset_gpio, 1);
> ? ? ? ?return 0;
> @@ -247,6 +244,8 @@ static struct gpio_led gpio_leds[];
> ?static int devkit8000_twl_gpio_setup(struct device *dev,
> ? ? ? ? ? ? ? ?unsigned gpio, unsigned ngpio)
> ?{
> + ? ? ? int ret;
> +
> ? ? ? ?omap_mux_init_gpio(29, OMAP_PIN_INPUT);
> ? ? ? ?/* gpio + 0 is "mmc0_cd" (input/IRQ) */
> ? ? ? ?mmc[0].gpio_cd = gpio + 0;
> @@ -255,17 +254,23 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
> ? ? ? ?/* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
> ? ? ? ?gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
>
> - ? ? ? ?/* gpio + 1 is "LCD_PWREN" (out, active high) */
> - ? ? ? devkit8000_lcd_device.reset_gpio = gpio + 1;
> - ? ? ? gpio_request(devkit8000_lcd_device.reset_gpio, "LCD_PWREN");
> - ? ? ? /* Disable until needed */
> - ? ? ? gpio_direction_output(devkit8000_lcd_device.reset_gpio, 0);
> + ? ? ? /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
> + ? ? ? devkit8000_lcd_device.reset_gpio = gpio + TWL4030_GPIO_MAX + 0;
> + ? ? ? ret = gpio_request_one(devkit8000_lcd_device.reset_gpio,
> + ? ? ? ? ? ? ? ? ? ? ? GPIOF_DIR_OUT | GPIOF_INIT_LOW, "LCD_PWREN");
> + ? ? ? if (ret < 0) {
> + ? ? ? ? ? ? ? devkit8000_lcd_device.reset_gpio = -EINVAL;
> + ? ? ? ? ? ? ? printk(KERN_ERR "Failed to request GPIO for LCD_PWRN\n");
> + ? ? ? }
>
> ? ? ? ?/* gpio + 7 is "DVI_PD" (out, active low) */
> ? ? ? ?devkit8000_dvi_device.reset_gpio = gpio + 7;
> - ? ? ? gpio_request(devkit8000_dvi_device.reset_gpio, "DVI PowerDown");
> - ? ? ? /* Disable until needed */
> - ? ? ? gpio_direction_output(devkit8000_dvi_device.reset_gpio, 0);
> + ? ? ? ret = gpio_request_one(devkit8000_dvi_device.reset_gpio,
> + ? ? ? ? ? ? ? ? ? ? ? GPIOF_DIR_OUT | GPIOF_INIT_LOW, "DVI PowerDown");
> + ? ? ? if (ret < 0) {
> + ? ? ? ? ? ? ? devkit8000_dvi_device.reset_gpio = -EINVAL;
> + ? ? ? ? ? ? ? printk(KERN_ERR "Failed to request GPIO for DVI PowerDown\n");
> + ? ? ? }
>
> ? ? ? ?return 0;
> ?}
> --
> 1.7.4.rc2
>
> --
Hello Tony,
can you apply this patch?
Thomas
^ permalink raw reply
* Re: [PATCH 03/18] wl1251: fix scan behaviour while not associated
From: Kalle Valo @ 2011-02-01 21:24 UTC (permalink / raw)
To: David Gnedt
Cc: John W. Linville, linux-wireless, Grazvydas Ignotas,
Denis 'GNUtoo' Carikli
In-Reply-To: <4D45B7BA.9080402@davizone.at>
David Gnedt <david.gnedt@davizone.at> writes:
> With a dissacociated card I often encoutered very long scan delays.
>
> My guess is that it has something to do with the cards DTIM handling and
> another firmware bug mentioned in the TI WLAN driver, which is described as
> the card may never end scanning if the channel is overloaded because it
> can't send probe requests. I think the firmware somehow also tries to
> receive DTIM messages when the BSSID is not set. Therefore most of the time
> it waits for DTIM messages and can't do scanning work.
>
> Anyway we can workaround this misbehaviour by setting the HIGH_PRIORITY
> bit for scans in disassociated state.
Now that's a weird problem. I wonder this wasn't reported with the
fremantle kernels. How often did you see the problem?
> --- a/drivers/net/wireless/wl1251/cmd.c
> +++ b/drivers/net/wireless/wl1251/cmd.c
> @@ -419,7 +419,10 @@ int wl1251_cmd_scan(struct wl1251 *wl, u8 *ssid, size_t ssid_len,
> struct wl1251_cmd_scan *cmd;
> int i, ret = 0;
>
> - wl1251_debug(DEBUG_CMD, "cmd scan");
> + wl1251_debug(DEBUG_CMD, "cmd scan channels %d ssid(%d) '%s'",
> + n_channels, ssid_len, ssid);
ssid is not a valid string and hence you cannot print it with %s.
> + /*
> + * Use high priority scan when not associated to prevent fw issue
> + * causing never-ending scans (sometimes 20+ minutes).
> + * Note: This bug may be caused by the fw's DTIM handling.
> + */
> + if (is_zero_ether_addr(wl->bssid))
> + cmd->params.scan_options |= WL1251_SCAN_OPT_PRIORITY_HIGH;
Can you resend the patch with just this part and the accompanying
defines, please? It's better to have debug messages improvements in a
separate patch.
--
Kalle Valo
^ permalink raw reply
* [Qemu-devel] [PATCH v2 09/24] kvm: Drop redundant kvm_enabled from kvm_cpu_thread_fn
From: Jan Kiszka @ 2011-02-01 21:15 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: qemu-devel, kvm
In-Reply-To: <cover.1296594961.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
cpus.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/cpus.c b/cpus.c
index 5dfc54e..312c7a2 100644
--- a/cpus.c
+++ b/cpus.c
@@ -607,8 +607,8 @@ static void *kvm_cpu_thread_fn(void *arg)
qemu_mutex_lock(&qemu_global_mutex);
qemu_thread_self(env->thread);
- if (kvm_enabled())
- kvm_init_vcpu(env);
+
+ kvm_init_vcpu(env);
kvm_init_ipi(env);
--
1.7.1
^ permalink raw reply related
* Re: [patch 18/28] posix-timers: Convert timer_delete() to clockid_to_kclock()
From: john stultz @ 2011-02-01 21:24 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, Richard Cochran, Ingo Molnar, Peter Zijlstra
In-Reply-To: <20110201134419.198999420@linutronix.de>
On Tue, 2011-02-01 at 13:52 +0000, Thomas Gleixner wrote:
> plain text document attachment (posix-timers-convert-timer-del.patch)
> Set the common function for CLOCK_MONOTONIC and CLOCK_REALTIME kclocks
> and use the new decoding function. No need to check for the return
> value of it. If we have data corruption in the timer, we explode
> somewhere else anyway. Also all kclocks which implement timer_create()
> need to provide timer_delete() as well.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Richard Cochran <richard.cochran@omicron.at>
> ---
[snip]
> @@ -852,7 +854,9 @@ static inline int common_timer_del(struc
>
> static inline int timer_delete_hook(struct k_itimer *timer)
> {
> - return CLOCK_DISPATCH(timer->it_clock, timer_del, (timer));
> + struct k_clock *kc = clockid_to_kclock(timer->it_clock);
> +
> + return kc->timer_del(timer);
> }
Again, kc == NULL check.
thanks
-john
^ permalink raw reply
* Re: Network performance with small packets
From: Michael S. Tsirkin @ 2011-02-01 21:24 UTC (permalink / raw)
To: Shirley Ma
Cc: Sridhar Samudrala, Steve Dobbelstein, David Miller, kvm, mashirle,
netdev
In-Reply-To: <1296594585.26937.817.camel@localhost.localdomain>
On Tue, Feb 01, 2011 at 01:09:45PM -0800, Shirley Ma wrote:
> On Mon, 2011-01-31 at 17:30 -0800, Sridhar Samudrala wrote:
> > Yes. It definitely should be 'out'. 'in' should be 0 in the tx path.
> >
> > I tried a simpler version of this patch without any tunables by
> > delaying the signaling until we come out of the for loop.
> > It definitely reduced the number of vmexits significantly for small
> > message
> > guest to host stream test and the throughput went up a little.
> >
> > diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c
> > index 9b3ca10..5f9fae9 100644
> > --- a/drivers/vhost/net.c
> > +++ b/drivers/vhost/net.c
> > @@ -197,7 +197,7 @@ static void handle_tx(struct vhost_net *net)
> > if (err != len)
> > pr_debug("Truncated TX packet: "
> > " len %d != %zd\n", err, len);
> > - vhost_add_used_and_signal(&net->dev, vq, head, 0);
> > + vhost_add_used(vq, head, 0);
> > total_len += len;
> > if (unlikely(total_len >= VHOST_NET_WEIGHT)) {
> > vhost_poll_queue(&vq->poll);
> > @@ -205,6 +205,8 @@ static void handle_tx(struct vhost_net *net)
> > }
> > }
> >
> > + if (total_len > 0)
> > + vhost_signal(&net->dev, vq);
> > mutex_unlock(&vq->mutex);
> > }
>
> Reducing the signaling will reduce the CPU utilization by reducing VM
> exits.
>
> The small message BW is a problem we have seen faster guest/slow vhost,
> even I increased VHOST_NET_WEIGHT times, it didn't help that much for
> BW. For large message size, vhost is able to process all packets on
> time. I played around with guest/host codes, I only see huge BW
> improvement by dropping packets on guest side so far.
>
> Thanks
> Shirley
My theory is that the issue is not signalling.
Rather, our queue fills up, then host handles
one packet and sends an interrupt, and we
immediately wake the queue. So the vq
once it gets full, stays full.
If you try my patch with bufs threshold set to e.g.
half the vq, what we will do is send interrupt after we have processed
half the vq. So host has half the vq to go, and guest has half the vq
to fill.
See?
--
MST
^ permalink raw reply
* Re: xfsprogs: Polish translation update
From: Christoph Hellwig @ 2011-02-01 21:27 UTC (permalink / raw)
To: Jakub Bogusz; +Cc: xfs
In-Reply-To: <20110128164045.GC10335@stranger.qboosh.pl>
Thanks, applied.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply
* [Qemu-devel] [PATCH v2 24/24] Fix a few coding style violations in cpus.c
From: Jan Kiszka @ 2011-02-01 21:16 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: qemu-devel, kvm
In-Reply-To: <cover.1296594961.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
No functional changes.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
cpus.c | 97 ++++++++++++++++++++++++++++++++++++++-------------------------
1 files changed, 58 insertions(+), 39 deletions(-)
diff --git a/cpus.c b/cpus.c
index 0d11a20..dd24fe8 100644
--- a/cpus.c
+++ b/cpus.c
@@ -138,25 +138,26 @@ static void do_vm_stop(int reason)
static int cpu_can_run(CPUState *env)
{
- if (env->stop)
+ if (env->stop) {
return 0;
- if (env->stopped || !vm_running)
+ }
+ if (env->stopped || !vm_running) {
return 0;
+ }
return 1;
}
static int cpu_has_work(CPUState *env)
{
- if (env->stop)
+ if (env->stop || env->queued_work_first) {
return 1;
- if (env->queued_work_first)
- return 1;
- if (env->stopped || !vm_running)
+ }
+ if (env->stopped || !vm_running) {
return 0;
- if (!env->halted)
- return 1;
- if (qemu_cpu_has_work(env))
+ }
+ if (!env->halted || qemu_cpu_has_work(env)) {
return 1;
+ }
return 0;
}
@@ -164,9 +165,11 @@ static int any_cpu_has_work(void)
{
CPUState *env;
- for (env = first_cpu; env != NULL; env = env->next_cpu)
- if (cpu_has_work(env))
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
+ if (cpu_has_work(env)) {
return 1;
+ }
+ }
return 0;
}
@@ -232,9 +235,9 @@ static void qemu_event_increment(void)
static const uint64_t val = 1;
ssize_t ret;
- if (io_thread_fd == -1)
+ if (io_thread_fd == -1) {
return;
-
+ }
do {
ret = write(io_thread_fd, &val, sizeof(val));
} while (ret < 0 && errno == EINTR);
@@ -265,17 +268,17 @@ static int qemu_event_init(void)
int fds[2];
err = qemu_eventfd(fds);
- if (err == -1)
+ if (err == -1) {
return -errno;
-
+ }
err = fcntl_setfl(fds[0], O_NONBLOCK);
- if (err < 0)
+ if (err < 0) {
goto fail;
-
+ }
err = fcntl_setfl(fds[1], O_NONBLOCK);
- if (err < 0)
+ if (err < 0) {
goto fail;
-
+ }
qemu_set_fd_handler2(fds[0], NULL, qemu_event_read, NULL,
(void *)(unsigned long)fds[0]);
@@ -534,7 +537,6 @@ void pause_all_vcpus(void)
void qemu_cpu_kick(void *env)
{
- return;
}
void qemu_cpu_kick_self(void)
@@ -663,13 +665,15 @@ int qemu_init_main_loop(void)
blocked_signals = block_io_signals();
ret = qemu_signalfd_init(blocked_signals);
- if (ret)
+ if (ret) {
return ret;
+ }
/* Note eventfd must be drained before signalfd handlers run */
ret = qemu_event_init();
- if (ret)
+ if (ret) {
return ret;
+ }
qemu_cond_init(&qemu_pause_cond);
qemu_cond_init(&qemu_system_cond);
@@ -699,10 +703,11 @@ void run_on_cpu(CPUState *env, void (*func)(void *data), void *data)
wi.func = func;
wi.data = data;
- if (!env->queued_work_first)
+ if (!env->queued_work_first) {
env->queued_work_first = &wi;
- else
+ } else {
env->queued_work_last->next = &wi;
+ }
env->queued_work_last = &wi;
wi.next = NULL;
wi.done = false;
@@ -720,8 +725,9 @@ static void flush_queued_work(CPUState *env)
{
struct qemu_work_item *wi;
- if (!env->queued_work_first)
+ if (!env->queued_work_first) {
return;
+ }
while ((wi = env->queued_work_first)) {
env->queued_work_first = wi->next;
@@ -747,8 +753,9 @@ static void qemu_tcg_wait_io_event(void)
{
CPUState *env;
- while (!any_cpu_has_work())
+ while (!any_cpu_has_work()) {
qemu_cond_timedwait(tcg_halt_cond, &qemu_global_mutex, 1000);
+ }
qemu_mutex_unlock(&qemu_global_mutex);
@@ -769,9 +776,9 @@ static void qemu_tcg_wait_io_event(void)
static void qemu_kvm_wait_io_event(CPUState *env)
{
- while (!cpu_has_work(env))
+ while (!cpu_has_work(env)) {
qemu_cond_timedwait(env->halt_cond, &qemu_global_mutex, 1000);
-
+ }
qemu_kvm_eat_signals(env);
qemu_wait_io_event_common(env);
}
@@ -799,12 +806,14 @@ static void *qemu_kvm_cpu_thread_fn(void *arg)
qemu_cond_signal(&qemu_cpu_cond);
/* and wait for machine initialization */
- while (!qemu_system_ready)
+ while (!qemu_system_ready) {
qemu_cond_timedwait(&qemu_system_cond, &qemu_global_mutex, 100);
+ }
while (1) {
- if (cpu_can_run(env))
+ if (cpu_can_run(env)) {
qemu_cpu_exec(env);
+ }
qemu_kvm_wait_io_event(env);
}
@@ -820,13 +829,15 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
/* signal CPU creation */
qemu_mutex_lock(&qemu_global_mutex);
- for (env = first_cpu; env != NULL; env = env->next_cpu)
+ for (env = first_cpu; env != NULL; env = env->next_cpu) {
env->created = 1;
+ }
qemu_cond_signal(&qemu_cpu_cond);
/* and wait for machine initialization */
- while (!qemu_system_ready)
+ while (!qemu_system_ready) {
qemu_cond_timedwait(&qemu_system_cond, &qemu_global_mutex, 100);
+ }
while (1) {
cpu_exec_all();
@@ -839,6 +850,7 @@ static void *qemu_tcg_cpu_thread_fn(void *arg)
void qemu_cpu_kick(void *_env)
{
CPUState *env = _env;
+
qemu_cond_broadcast(env->halt_cond);
if (!env->thread_kicked) {
qemu_thread_signal(env->thread, SIG_IPI);
@@ -890,8 +902,9 @@ static int all_vcpus_paused(void)
CPUState *penv = first_cpu;
while (penv) {
- if (!penv->stopped)
+ if (!penv->stopped) {
return 0;
+ }
penv = (CPUState *)penv->next_cpu;
}
@@ -933,14 +946,16 @@ void resume_all_vcpus(void)
static void qemu_tcg_init_vcpu(void *_env)
{
CPUState *env = _env;
+
/* share a single thread for all cpus with TCG */
if (!tcg_cpu_thread) {
env->thread = qemu_mallocz(sizeof(QemuThread));
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
qemu_thread_create(env->thread, qemu_tcg_cpu_thread_fn, env);
- while (env->created == 0)
+ while (env->created == 0) {
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
+ }
tcg_cpu_thread = env->thread;
tcg_halt_cond = env->halt_cond;
} else {
@@ -955,8 +970,9 @@ static void qemu_kvm_start_vcpu(CPUState *env)
env->halt_cond = qemu_mallocz(sizeof(QemuCond));
qemu_cond_init(env->halt_cond);
qemu_thread_create(env->thread, qemu_kvm_cpu_thread_fn, env);
- while (env->created == 0)
+ while (env->created == 0) {
qemu_cond_timedwait(&qemu_cpu_cond, &qemu_global_mutex, 100);
+ }
}
void qemu_init_vcpu(void *_env)
@@ -965,10 +981,11 @@ void qemu_init_vcpu(void *_env)
env->nr_cores = smp_cores;
env->nr_threads = smp_threads;
- if (kvm_enabled())
+ if (kvm_enabled()) {
qemu_kvm_start_vcpu(env);
- else
+ } else {
qemu_tcg_init_vcpu(env);
+ }
}
void qemu_notify_event(void)
@@ -1043,16 +1060,18 @@ bool cpu_exec_all(void)
{
int r;
- if (next_cpu == NULL)
+ if (next_cpu == NULL) {
next_cpu = first_cpu;
+ }
for (; next_cpu != NULL && !exit_request; next_cpu = next_cpu->next_cpu) {
CPUState *env = next_cpu;
qemu_clock_enable(vm_clock,
(env->singlestep_enabled & SSTEP_NOTIMER) == 0);
- if (qemu_alarm_pending())
+ if (qemu_alarm_pending()) {
break;
+ }
if (cpu_can_run(env)) {
r = qemu_cpu_exec(env);
if (kvm_enabled()) {
--
1.7.1
^ permalink raw reply related
* Re: Locking in the clk API, part 2: clk_prepare/clk_unprepare
From: Russell King - ARM Linux @ 2011-02-01 21:24 UTC (permalink / raw)
To: Stephen Boyd
Cc: Uwe Kleine-König, Nicolas Pitre, Lorenzo Pieralisi,
Saravana Kannan, linux-sh, Ben Herrenschmidt, Sascha Hauer,
Paul Mundt, linux-kernel, Dima Zavin, Ben Dooks, Vincent Guittot,
Jeremy Kerr, linux-arm-kernel
In-Reply-To: <4D48741F.8060006@codeaurora.org>
On Tue, Feb 01, 2011 at 12:59:11PM -0800, Stephen Boyd wrote:
> On 02/01/2011 07:24 AM, Russell King - ARM Linux wrote:
> > I'd also be tempted at this stage to build-in a no-op dummy clock,
> > that being the NULL clk:
> >
> > int clk_prepare(struct clk *clk)
> > {
> > int ret = 0;
> >
> > if (clk) {
> > mutex_lock(&clk->mutex);
> > if (clk->prepared == 0)
> > ret = clk->ops->prepare(clk);
> > if (ret == 0)
> > clk->prepared++;
> > mutex_unlock(&clk->mutex);
> > }
> >
> > return ret;
> > }
>
> I'm afraid this will hide enable/disable imbalances on some targets and
> then expose them on others. Maybe its not a big problem though since
> this also elegantly handles the root(s) of the tree.
You can't catch enable/disable imbalances in the prepare code, and you
can't really catch them in the unprepare code either.
Consider two drivers sharing the same struct clk. When the second driver
prepares the clock, the enable count could well be non-zero, caused by
the first driver. Ditto for when the second driver is removed, and it
calls unprepare - the enable count may well be non-zero.
The only thing you can check is that when the prepare count is zero,
the enable count is also zero. You can also check in clk_enable() and
clk_disable() that the prepare count is non-zero.
If you want tigher checking than that, you need to somehow identify and
match up the clk_prepare/clk_enable/clk_disable/clk_unprepare calls from
a particular driver instance. Addresses of the functions don't work as
you can't be certain that driver code will be co-located within a certain
range. Adding an additional argument to these functions which is driver
instance specific seems to be horrible too.
^ permalink raw reply
* [Qemu-devel] [PATCH v2 15/24] kvm: Call qemu_kvm_eat_signals also under !CONFIG_IOTHREAD
From: Jan Kiszka @ 2011-02-01 21:15 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: qemu-devel, kvm
In-Reply-To: <cover.1296594961.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
Move qemu_kvm_eat_signals around and call it also when the IO-thread is
not used. Do not yet process SIGBUS, will be armed in a separate step.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
cpus.c | 90 +++++++++++++++++++++++++++++++++++++---------------------------
1 files changed, 52 insertions(+), 38 deletions(-)
diff --git a/cpus.c b/cpus.c
index 04138ba..861e270 100644
--- a/cpus.c
+++ b/cpus.c
@@ -235,6 +235,47 @@ static void dummy_signal(int sig)
{
}
+static void sigbus_reraise(void);
+
+static void qemu_kvm_eat_signals(CPUState *env)
+{
+ struct timespec ts = { 0, 0 };
+ siginfo_t siginfo;
+ sigset_t waitset;
+ sigset_t chkset;
+ int r;
+
+ sigemptyset(&waitset);
+ sigaddset(&waitset, SIG_IPI);
+ sigaddset(&waitset, SIGBUS);
+
+ do {
+ r = sigtimedwait(&waitset, &siginfo, &ts);
+ if (r == -1 && !(errno == EAGAIN || errno == EINTR)) {
+ perror("sigtimedwait");
+ exit(1);
+ }
+
+ switch (r) {
+#ifdef CONFIG_IOTHREAD
+ case SIGBUS:
+ if (kvm_on_sigbus_vcpu(env, siginfo.si_code, siginfo.si_addr)) {
+ sigbus_reraise();
+ }
+ break;
+#endif
+ default:
+ break;
+ }
+
+ r = sigpending(&chkset);
+ if (r == -1) {
+ perror("sigpending");
+ exit(1);
+ }
+ } while (sigismember(&chkset, SIG_IPI) || sigismember(&chkset, SIGBUS));
+}
+
#else /* _WIN32 */
HANDLE qemu_event_handle;
@@ -262,6 +303,10 @@ static void qemu_event_increment(void)
exit (1);
}
}
+
+static void qemu_kvm_eat_signals(CPUState *env)
+{
+}
#endif /* _WIN32 */
#ifndef CONFIG_IOTHREAD
@@ -648,43 +693,6 @@ static void sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo,
}
}
-static void qemu_kvm_eat_signals(CPUState *env)
-{
- struct timespec ts = { 0, 0 };
- siginfo_t siginfo;
- sigset_t waitset;
- sigset_t chkset;
- int r;
-
- sigemptyset(&waitset);
- sigaddset(&waitset, SIG_IPI);
- sigaddset(&waitset, SIGBUS);
-
- do {
- r = sigtimedwait(&waitset, &siginfo, &ts);
- if (r == -1 && !(errno == EAGAIN || errno == EINTR)) {
- perror("sigtimedwait");
- exit(1);
- }
-
- switch (r) {
- case SIGBUS:
- if (kvm_on_sigbus_vcpu(env, siginfo.si_code, siginfo.si_addr)) {
- sigbus_reraise();
- }
- break;
- default:
- break;
- }
-
- r = sigpending(&chkset);
- if (r == -1) {
- perror("sigpending");
- exit(1);
- }
- } while (sigismember(&chkset, SIG_IPI) || sigismember(&chkset, SIGBUS));
-}
-
static void qemu_kvm_wait_io_event(CPUState *env)
{
while (!cpu_has_work(env))
@@ -949,6 +957,8 @@ static int qemu_cpu_exec(CPUState *env)
bool cpu_exec_all(void)
{
+ int r;
+
if (next_cpu == NULL)
next_cpu = first_cpu;
for (; next_cpu != NULL && !exit_request; next_cpu = next_cpu->next_cpu) {
@@ -960,7 +970,11 @@ bool cpu_exec_all(void)
if (qemu_alarm_pending())
break;
if (cpu_can_run(env)) {
- if (qemu_cpu_exec(env) == EXCP_DEBUG) {
+ r = qemu_cpu_exec(env);
+ if (kvm_enabled()) {
+ qemu_kvm_eat_signals(env);
+ }
+ if (r == EXCP_DEBUG) {
break;
}
} else if (env->stop) {
--
1.7.1
^ permalink raw reply related
* Re: ASoC updates for 2.6.38
From: Takashi Iwai @ 2011-02-01 21:25 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Liam Girdwood
In-Reply-To: <20110201145631.GA7680@opensource.wolfsonmicro.com>
At Tue, 1 Feb 2011 14:56:31 +0000,
Mark Brown wrote:
>
> The following changes since commit a3adfa00e8089aa72826c6ba04bcb18cfceaf0a9:
>
> ASoC: correct link specifications for corgi, poodle and spitz (2011-01-25 15:18:42 +0000)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git for-2.6.38
>
> Nothing exciting here except for Stephen's mask/val_mask fix which fixes
> a fairly wide breakage.
Pulled now. Thanks.
Takashi
> Janusz Krzysztofik (2):
> ASoC: Amstrad Delta: fix const related build error
> ASoC: CX20442: fix NULL pointer dereference
>
> Jarkko Nikula (1):
> ASoC: Fix module refcount for auxiliary devices
>
> Manjunathappa, Prakash (1):
> ASoC: DaVinci: fix kernel panic due to uninitialized platform_data
>
> Stephen Warren (1):
> ASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()
>
> sound/soc/codecs/cq93vc.c | 2 +-
> sound/soc/codecs/cx20442.c | 3 +++
> sound/soc/omap/ams-delta.c | 2 --
> sound/soc/soc-core.c | 3 ---
> sound/soc/soc-dapm.c | 6 +++---
> 5 files changed, 7 insertions(+), 9 deletions(-)
>
^ permalink raw reply
* Re: XFS internal error xfs_iformat(realtime) even after xfs_repair.
From: Christoph Hellwig @ 2011-02-01 21:28 UTC (permalink / raw)
To: Dave Chinner; +Cc: Ajeet Yadav, xfs
In-Reply-To: <20110201041202.GL11040@dastard>
> It will be in the next release, whenever we make that.
>
> I've got to finish of the sync of the userspace/kernel code, there's
> a few fixes already in the -dev branch as well, we need to pick up
> the FIEMAP changes to xfs_io, and so on. We probably should get t???is
> all done and plan for a new release in the next few weeks...
I'm a bit concerned about the coverage of the libxfs resync. My
preference would be to get out a minor release focusses at the repair
fixes, then merge the resync to master directly after release and make
sure it gets into all the test setups for a while before it gets
released.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply
* Re: [patch 19/28] posix-timers: Remove CLOCK_DISPATCH leftovers
From: john stultz @ 2011-02-01 21:25 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, Richard Cochran, Ingo Molnar, Peter Zijlstra
In-Reply-To: <20110201134419.294620613@linutronix.de>
On Tue, 2011-02-01 at 13:52 +0000, Thomas Gleixner wrote:
> plain text document attachment
> (posix-timers-remove-clock-dispatch-leftovers.patch)
> All users gone. Remove the cruft.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Richard Cochran <richard.cochran@omicron.at>
> ---
> kernel/posix-timers.c | 22 ----------------------
> 1 file changed, 22 deletions(-)
>
> Index: linux-2.6-tip/kernel/posix-timers.c
> ===================================================================
> --- linux-2.6-tip.orig/kernel/posix-timers.c
> +++ linux-2.6-tip/kernel/posix-timers.c
> @@ -167,28 +167,6 @@ static inline void unlock_timer(struct k
> spin_unlock_irqrestore(&timr->it_lock, flags);
> }
>
> -/*
> - * Call the k_clock hook function if non-null, or the default function.
> - */
> -#define CLOCK_DISPATCH(clock, call, arglist) \
> - ((clock) < 0 ? posix_cpu_##call arglist : \
> - (posix_clocks[clock].call != NULL \
> - ? (*posix_clocks[clock].call) arglist : common_##call arglist))
> -
Big thanks to Richard and Thomas for killing this bit of ugliness!
Acked-by: John Stultz <johnstul@us.ibm.com>
^ permalink raw reply
* [Qemu-devel] [PATCH v2 03/24] Stop current VCPU on synchronous reset requests
From: Jan Kiszka @ 2011-02-01 21:15 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: qemu-devel, kvm
In-Reply-To: <cover.1296594961.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
If some I/O operation ends up calling qemu_system_reset_request in VCPU
context, we record this and inform the io-thread, but we do not
terminate the VCPU loop. This can lead to fairly unexpected behavior if
the triggering reset operation is supposed to work synchronously.
Fix this for TCG (when run in deterministic I/O mode) by setting the
VCPU on stop and issuing a cpu_exit. KVM requires some more work on its
VCPU loop.
[ ported from qemu-kvm ]
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
cpus.c | 13 +++++++++----
cpus.h | 1 +
vl.c | 1 +
3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/cpus.c b/cpus.c
index ab6e40e..ceb3a83 100644
--- a/cpus.c
+++ b/cpus.c
@@ -99,6 +99,14 @@ void cpu_synchronize_all_post_init(void)
}
}
+void cpu_stop_current(void)
+{
+ if (cpu_single_env) {
+ cpu_single_env->stopped = 1;
+ cpu_exit(cpu_single_env);
+ }
+}
+
int cpu_is_stopped(CPUState *env)
{
return !vm_running || env->stopped;
@@ -863,10 +871,7 @@ void vm_stop(int reason)
* FIXME: should not return to device code in case
* vm_stop() has been requested.
*/
- if (cpu_single_env) {
- cpu_exit(cpu_single_env);
- cpu_single_env->stop = 1;
- }
+ cpu_stop_current();
return;
}
do_vm_stop(reason);
diff --git a/cpus.h b/cpus.h
index bf4d9bb..4cadb64 100644
--- a/cpus.h
+++ b/cpus.h
@@ -6,6 +6,7 @@ int qemu_init_main_loop(void);
void qemu_main_loop_start(void);
void resume_all_vcpus(void);
void pause_all_vcpus(void);
+void cpu_stop_current(void);
/* vl.c */
extern int smp_cores;
diff --git a/vl.c b/vl.c
index 33f844f..db24a05 100644
--- a/vl.c
+++ b/vl.c
@@ -1278,6 +1278,7 @@ void qemu_system_reset_request(void)
} else {
reset_requested = 1;
}
+ cpu_stop_current();
qemu_notify_event();
}
--
1.7.1
^ permalink raw reply related
* Re: [PATCH] System Wide Capability Bounding Set
From: Serge E. Hallyn @ 2011-02-01 21:26 UTC (permalink / raw)
To: Eric Paris
Cc: Serge E. Hallyn, Steve Grubb, Andrew G. Morgan, Serge E. Hallyn,
linux-kernel, linux-security-module
In-Reply-To: <1296584221.3145.12.camel@localhost.localdomain>
Quoting Eric Paris (eparis@redhat.com):
> What are we thinking? Any suggestions how to do what we need other than
>
> global bounding such that pP' = gbset & (fI | pI)
That should be sufficient for what you want.
I would however like to hear whether Andrew has had any other ideas
given the broader picture.
> Or an interface in which I can force things out of the bset and pI of
> other tasks? Possibly the interface could be specific to the "khelper"
> thread?
No no no no no :)
thanks,
-serge
^ permalink raw reply
* Re: ASoC updates for 2.6.39.
From: Takashi Iwai @ 2011-02-01 21:26 UTC (permalink / raw)
To: Mark Brown; +Cc: alsa-devel, Liam Girdwood
In-Reply-To: <20110201153017.GB7680@opensource.wolfsonmicro.com>
At Tue, 1 Feb 2011 15:30:17 +0000,
Mark Brown wrote:
>
> The following changes since commit a211701eb1e4a41bbee22d61f35dba8e55925db4:
>
> ASoC: sst_platform porting sst dsp driver interface as per latest in Greg's staging tree (2011-01-19 11:28:11 +0000)
>
> are available in the git repository at:
> git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound-2.6.git for-2.6.39
Pulled now.
thanks,
Takashi
> Alexander Sverdlin (3):
> ASoC: CS4271 codec support
> ASoC: EDB93xx machine sound driver with CS4271
> ASoC: cs4271.c: improve error handling
>
> Dimitris Papastamos (5):
> ASoC: WM8995: Fix incorrect use of snd_soc_update_bits()
> ASoC: soc-cache: Introduce the cache_bypass option
> ASoC: soc-cache: Apply the cache_bypass option
> ASoC: soc-cache: Add trace event for snd_soc_cache_sync()
> ASoC: soc-core: Ensure codec_reg has fixed length fields
>
> Dmitry Eremin-Solenikov (1):
> ASoC: correct link specifications for corgi, poodle and spitz
>
> H Hartley Sweeten (1):
> ASoC: neo1973_wm8753 audio support does not require scoop
>
> Harsha Priya (3):
> ASoC: sn95031: add capture support
> ASoC: sst_platform: add support for capture stream on headset dai
> ASoC: mid-x86: Add support for capture in machine driver
>
> Janusz Krzysztofik (2):
> ASoC: Amstrad Delta: fix const related build error
> ASoC: CX20442: fix NULL pointer dereference
>
> Jarkko Nikula (4):
> ASoC: Fix module refcount for auxiliary devices
> ASoC: omap: rx51: Add stereo output support to audio jack
> ASoC: soc-core: Increment codec and platform driver refcounts before probing
> ASoC: omap: rx51: Add earphone support
>
> Kuninori Morimoto (7):
> ASoC: ak4642: add SND_SOC_DAIFMT_FORMAT support
> ASoC: sh: fsi: Add fsi_get_priv_frm_dai function
> ASoC: sh: fsi: Add snd_soc_dai_set_fmt support
> ASoC: sh: fsi-hdmi: Add FSI port and HDMI selection
> ASoC: sh: fsi: move chan_num from fsi_stream to fsi_priv
> ASoC: sh: fsi: free from NULL pointer of struct sh_fsi_platform_info
> ASoC: sh: fsi: modify selection method of I2S/PCM/SPDIF format
>
> Lars-Peter Clausen (2):
> ASoC: Fix codec device id format used by some dai_links
> ASoC: Samsung: Fix outdated cpu_dai_name for s3c24xx i2s
>
> Manjunathappa, Prakash (1):
> ASoC: DaVinci: fix kernel panic due to uninitialized platform_data
>
> Mark Brown (25):
> ASoC: Explicitly say if we're powering up or down
> ASoC: Add support for sequencing within
> ASoC: Provide per widget type callback when executing DAPM sequences
> Merge branch 'for-2.6.38' into for-2.6.39
> ASoC: Staticise twl6040_hs_jack_report()
> ASoC: Handle low measured DC offsets for wm_hubs devices
> Merge branch 'for-2.6.38' into for-2.6.39
> ASoC: Fix type for snd_soc_volatile_register()
> ASoC: Remove controls from sequenced PGA arguments
> Merge branch 'for-2.6.38' into for-2.6.39
> Merge branch 'tegra-arch' into for-2.6.39
> ASoC: Staticise non-exported symbols in cs4271
> ASoC: Use card rather than soc-audio device to card PM functions
> ASoC: Replace pdev with card in machine driver probe and remove
> ASoC: Export card PM callbacks for use in direct registered cards
> ASoC: Make cache status available via debugfs
> ASoC: Add subsequence information to seq_notify callbacks
> Merge branch 'for-2.6.38' into for-2.6.39
> ASoC: Add card driver data
> Merge branch 'for-2.6.38' into for-2.6.39
> ASoC: Accept any logical value for WM8962 GPIO set()
> ASoC: Accept any logical value WM8903 GPIO set()
> Merge branches 'for-2.6.38' and 'tegra-arch' into for-2.6.39
> ASoC: Use snd_pcm_format_width() in snd_soc_params_to_frame_size()
> Merge branch 'for-2.6.39' of git://git.kernel.org/.../lrg/asoc-2.6 into for-2.6.39
>
> Qiao Zhou (1):
> ASoC: WM8994: fix wrong value in tristate function
>
> Rajashekhara, Sudhakar (1):
> ASoC: da8xx/omap-l1xx: match codec_name with i2c ids
>
> Stephen Warren (12):
> ASoC: wm8903: Expose GPIOs through gpiolib
> ARM: tegra: Add Harmony sound platform data type
> ASoC: Fix mask/val_mask confusion snd_soc_dapm_put_volsw()
> ASoC: Move card list initialization to snd_soc_register_card
> ASoC: Tegra: Harmony: Don't use soc-audio platform device
> ASoC: Tegra: Harmony: Support the internal speaker
> ASoC: Tegra: Harmony: Fix indentation issue.
> ASoC: Tegra: Harmony: Use dev_err not pr_err
> ASoC: Tegra: utils: Don't use global variables
> ASoC: Tegra: I2S: Use dev_err not pr_err
> ASoC: Tegra: Harmony: Remove redundant !!
> ARM: tegra: Add to struct harmony_audio_platform_data
>
> arch/arm/mach-shmobile/board-ag5evm.c | 10 -
> arch/arm/mach-shmobile/board-ap4evb.c | 13 +-
> arch/arm/mach-shmobile/board-mackerel.c | 13 +-
> arch/arm/mach-tegra/include/mach/harmony_audio.h | 22 +
> arch/sh/boards/mach-ecovec24/setup.c | 6 +-
> arch/sh/boards/mach-se/7724/setup.c | 6 +-
> include/sound/cs4271.h | 25 +
> include/sound/sh_fsi.h | 76 +--
> include/sound/soc-dapm.h | 16 +
> include/sound/soc.h | 41 +-
> include/sound/wm8903.h | 20 +-
> include/trace/events/asoc.h | 25 +
> sound/soc/atmel/snd-soc-afeb9260.c | 2 +-
> sound/soc/blackfin/bf5xx-ssm2602.c | 2 +-
> sound/soc/codecs/Kconfig | 4 +
> sound/soc/codecs/Makefile | 2 +
> sound/soc/codecs/ak4642.c | 24 +
> sound/soc/codecs/cq93vc.c | 2 +-
> sound/soc/codecs/cs4271.c | 659 ++++++++++++++++++++++
> sound/soc/codecs/cx20442.c | 3 +
> sound/soc/codecs/sn95031.c | 281 +++++++++
> sound/soc/codecs/twl6040.c | 4 +-
> sound/soc/codecs/wm8903.c | 127 ++++-
> sound/soc/codecs/wm8962.c | 2 +-
> sound/soc/codecs/wm8994.c | 2 +-
> sound/soc/codecs/wm8995.c | 2 +-
> sound/soc/codecs/wm_hubs.c | 15 +-
> sound/soc/davinci/davinci-evm.c | 2 +-
> sound/soc/ep93xx/Kconfig | 9 +
> sound/soc/ep93xx/Makefile | 2 +
> sound/soc/ep93xx/edb93xx.c | 142 +++++
> sound/soc/fsl/mpc8610_hpcd.c | 6 +-
> sound/soc/fsl/p1022_ds.c | 6 +-
> sound/soc/mid-x86/mfld_machine.c | 3 +
> sound/soc/mid-x86/sst_platform.c | 6 +
> sound/soc/omap/Kconfig | 1 +
> sound/soc/omap/ams-delta.c | 2 -
> sound/soc/omap/rx51.c | 93 +++-
> sound/soc/pxa/corgi.c | 4 +-
> sound/soc/pxa/poodle.c | 2 +-
> sound/soc/pxa/raumfeld.c | 4 +-
> sound/soc/pxa/spitz.c | 4 +-
> sound/soc/pxa/tosa.c | 4 +-
> sound/soc/pxa/zylonite.c | 9 +-
> sound/soc/samsung/neo1973_gta02_wm8753.c | 6 +-
> sound/soc/samsung/neo1973_wm8753.c | 7 +-
> sound/soc/samsung/s3c24xx_simtec_hermes.c | 4 +-
> sound/soc/samsung/s3c24xx_simtec_tlv320aic23.c | 4 +-
> sound/soc/samsung/s3c24xx_uda134x.c | 2 +-
> sound/soc/sh/fsi-ak4642.c | 13 +-
> sound/soc/sh/fsi-da7210.c | 13 +-
> sound/soc/sh/fsi-hdmi.c | 77 +++-
> sound/soc/sh/fsi.c | 203 ++++---
> sound/soc/soc-cache.c | 50 ++-
> sound/soc/soc-core.c | 114 +++--
> sound/soc/soc-dapm.c | 71 ++-
> sound/soc/soc-utils.c | 23 +-
> sound/soc/tegra/harmony.c | 170 +++++--
> sound/soc/tegra/tegra_asoc_utils.c | 91 ++--
> sound/soc/tegra/tegra_asoc_utils.h | 20 +-
> sound/soc/tegra/tegra_i2s.c | 2 +-
> 61 files changed, 2136 insertions(+), 437 deletions(-)
> create mode 100644 arch/arm/mach-tegra/include/mach/harmony_audio.h
> create mode 100644 include/sound/cs4271.h
> create mode 100644 sound/soc/codecs/cs4271.c
> create mode 100644 sound/soc/ep93xx/edb93xx.c
>
^ permalink raw reply
* Re: [PATCH v2 00/13] OMAP: McBSP: hwmod adaptation and runtime conversion
From: Mark Brown @ 2011-02-01 21:27 UTC (permalink / raw)
To: Jarkko Nikula
Cc: alsa-devel, b-cousson, khilman, paul, Kishon Vijay Abraham I,
p-basak2, lrg, linux-omap, shubhrajyoti, charu
In-Reply-To: <20110201195326.b3c9f5f5.jhnikula@gmail.com>
On Tue, Feb 01, 2011 at 07:53:26PM +0200, Jarkko Nikula wrote:
> Mark, Liam: is it ok if the 12/13 goes together with rest of the set
> via linux-omap when ready?
I already acked it.
^ permalink raw reply
* [Qemu-devel] [PATCH v2 12/24] Refactor signal setup functions in cpus.c
From: Jan Kiszka @ 2011-02-01 21:15 UTC (permalink / raw)
To: Avi Kivity, Marcelo Tosatti; +Cc: qemu-devel, kvm
In-Reply-To: <cover.1296594961.git.jan.kiszka@web.de>
From: Jan Kiszka <jan.kiszka@siemens.com>
Move {tcg,kvm}_init_ipi and block_io_signals to avoid prototypes, rename
the former two to clarify that they deal with more than SIG_IPI. No
functional changes - except for the tiny fixup of strerror usage.
The forward declaration of sigbus_handler is just temporarily, it will
be moved in a succeeding patch. dummy_signal is moved into the !_WIN32
block as we will soon need it also for !CONFIG_IOTHREAD.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
cpus.c | 162 +++++++++++++++++++++++++++++++++-------------------------------
1 files changed, 83 insertions(+), 79 deletions(-)
diff --git a/cpus.c b/cpus.c
index 3a32828..42717ba 100644
--- a/cpus.c
+++ b/cpus.c
@@ -230,7 +230,15 @@ fail:
close(fds[1]);
return err;
}
-#else
+
+#ifdef CONFIG_IOTHREAD
+static void dummy_signal(int sig)
+{
+}
+#endif
+
+#else /* _WIN32 */
+
HANDLE qemu_event_handle;
static void dummy_event_handler(void *opaque)
@@ -256,7 +264,7 @@ static void qemu_event_increment(void)
exit (1);
}
}
-#endif
+#endif /* _WIN32 */
#ifndef CONFIG_IOTHREAD
int qemu_init_main_loop(void)
@@ -352,10 +360,6 @@ static QemuCond qemu_system_cond;
static QemuCond qemu_pause_cond;
static QemuCond qemu_work_cond;
-static void tcg_init_ipi(void);
-static void kvm_init_ipi(CPUState *env);
-static sigset_t block_io_signals(void);
-
/* If we have signalfd, we mask out the signals we want to handle and then
* use signalfd to listen for them. We rely on whatever the current signal
* handler is to dispatch the signals when we receive them.
@@ -391,6 +395,77 @@ static void sigfd_handler(void *opaque)
}
}
+static void cpu_signal(int sig)
+{
+ if (cpu_single_env) {
+ cpu_exit(cpu_single_env);
+ }
+ exit_request = 1;
+}
+
+static void qemu_kvm_init_cpu_signals(CPUState *env)
+{
+ int r;
+ sigset_t set;
+ struct sigaction sigact;
+
+ memset(&sigact, 0, sizeof(sigact));
+ sigact.sa_handler = dummy_signal;
+ sigaction(SIG_IPI, &sigact, NULL);
+
+ pthread_sigmask(SIG_BLOCK, NULL, &set);
+ sigdelset(&set, SIG_IPI);
+ sigdelset(&set, SIGBUS);
+ r = kvm_set_signal_mask(env, &set);
+ if (r) {
+ fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(-r));
+ exit(1);
+ }
+}
+
+static void qemu_tcg_init_cpu_signals(void)
+{
+ sigset_t set;
+ struct sigaction sigact;
+
+ memset(&sigact, 0, sizeof(sigact));
+ sigact.sa_handler = cpu_signal;
+ sigaction(SIG_IPI, &sigact, NULL);
+
+ sigemptyset(&set);
+ sigaddset(&set, SIG_IPI);
+ pthread_sigmask(SIG_UNBLOCK, &set, NULL);
+}
+
+static void sigbus_handler(int n, struct qemu_signalfd_siginfo *siginfo,
+ void *ctx);
+
+static sigset_t block_io_signals(void)
+{
+ sigset_t set;
+ struct sigaction action;
+
+ /* SIGUSR2 used by posix-aio-compat.c */
+ sigemptyset(&set);
+ sigaddset(&set, SIGUSR2);
+ pthread_sigmask(SIG_UNBLOCK, &set, NULL);
+
+ sigemptyset(&set);
+ sigaddset(&set, SIGIO);
+ sigaddset(&set, SIGALRM);
+ sigaddset(&set, SIG_IPI);
+ sigaddset(&set, SIGBUS);
+ pthread_sigmask(SIG_BLOCK, &set, NULL);
+
+ memset(&action, 0, sizeof(action));
+ action.sa_flags = SA_SIGINFO;
+ action.sa_sigaction = (void (*)(int, siginfo_t*, void*))sigbus_handler;
+ sigaction(SIGBUS, &action, NULL);
+ prctl(PR_MCE_KILL, 1, 1, 0, 0);
+
+ return set;
+}
+
static int qemu_signalfd_init(sigset_t mask)
{
int sigfd;
@@ -619,7 +694,7 @@ static void *kvm_cpu_thread_fn(void *arg)
exit(1);
}
- kvm_init_ipi(env);
+ qemu_kvm_init_cpu_signals(env);
/* signal CPU creation */
env->created = 1;
@@ -642,7 +717,7 @@ static void *tcg_cpu_thread_fn(void *arg)
{
CPUState *env = arg;
- tcg_init_ipi();
+ qemu_tcg_init_cpu_signals();
qemu_thread_self(env->thread);
/* signal CPU creation */
@@ -683,77 +758,6 @@ int qemu_cpu_self(void *_env)
return qemu_thread_equal(&this, env->thread);
}
-static void cpu_signal(int sig)
-{
- if (cpu_single_env)
- cpu_exit(cpu_single_env);
- exit_request = 1;
-}
-
-static void tcg_init_ipi(void)
-{
- sigset_t set;
- struct sigaction sigact;
-
- memset(&sigact, 0, sizeof(sigact));
- sigact.sa_handler = cpu_signal;
- sigaction(SIG_IPI, &sigact, NULL);
-
- sigemptyset(&set);
- sigaddset(&set, SIG_IPI);
- pthread_sigmask(SIG_UNBLOCK, &set, NULL);
-}
-
-static void dummy_signal(int sig)
-{
-}
-
-static void kvm_init_ipi(CPUState *env)
-{
- int r;
- sigset_t set;
- struct sigaction sigact;
-
- memset(&sigact, 0, sizeof(sigact));
- sigact.sa_handler = dummy_signal;
- sigaction(SIG_IPI, &sigact, NULL);
-
- pthread_sigmask(SIG_BLOCK, NULL, &set);
- sigdelset(&set, SIG_IPI);
- sigdelset(&set, SIGBUS);
- r = kvm_set_signal_mask(env, &set);
- if (r) {
- fprintf(stderr, "kvm_set_signal_mask: %s\n", strerror(r));
- exit(1);
- }
-}
-
-static sigset_t block_io_signals(void)
-{
- sigset_t set;
- struct sigaction action;
-
- /* SIGUSR2 used by posix-aio-compat.c */
- sigemptyset(&set);
- sigaddset(&set, SIGUSR2);
- pthread_sigmask(SIG_UNBLOCK, &set, NULL);
-
- sigemptyset(&set);
- sigaddset(&set, SIGIO);
- sigaddset(&set, SIGALRM);
- sigaddset(&set, SIG_IPI);
- sigaddset(&set, SIGBUS);
- pthread_sigmask(SIG_BLOCK, &set, NULL);
-
- memset(&action, 0, sizeof(action));
- action.sa_flags = SA_SIGINFO;
- action.sa_sigaction = (void (*)(int, siginfo_t*, void*))sigbus_handler;
- sigaction(SIGBUS, &action, NULL);
- prctl(PR_MCE_KILL, 1, 1, 0, 0);
-
- return set;
-}
-
void qemu_mutex_lock_iothread(void)
{
if (kvm_enabled()) {
--
1.7.1
^ permalink raw reply related
* Re: [1.8.0] Change branch --set-uptream to take an argument
From: Jay Soffian @ 2011-02-01 21:27 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
In-Reply-To: <7v7hdj1mo7.fsf@alter.siamese.dyndns.org>
On Tue, Feb 1, 2011 at 4:15 PM, Junio C Hamano <gitster@pobox.com> wrote:
> IOW, I don't think
>
>> (master)$ git branch --set-upstream origin/master
>> Branch origin/master set up to track local branch master.
>
> is a sane behaviour from day one, and is simply a bug. Changing this
> behaviour would merely be a bugfix, not a flag-day event that changes an
> established behaviour.
Okay, our emails criss-crossed. I agree with that, but my other email
proposes adding -u <name> with correct behavior and just deprecating
--set-upstream. I suppose we could instead (or in addition) just fix
--set-upstream.
I guess please reply to the other email so we don't keep criss-crossing. :-)
j.
^ permalink raw reply
* Re: Features from GitSurvey 2010
From: Junio C Hamano @ 2011-02-01 21:27 UTC (permalink / raw)
To: Nguyen Thai Ngoc Duy
Cc: Shawn Pearce, Jakub Narebski, Jonathan Nieder, Dmitry S. Kravtsov,
git
In-Reply-To: <AANLkTi=oTL2_ObcyKRb7bf7ZMPZoa1BU7uNH5pJRQtVC@mail.gmail.com>
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> On Tue, Feb 1, 2011 at 11:27 PM, Shawn Pearce <spearce@spearce.org> wrote:
> ...
>> I think Junio has already started thinking about this one.
>
> I need to get nd/pathspec right and implement negative pathspecs
> before returning to this feature.
I don't think we need negative pathspecs before going forward.
I wanted a unified "We have a path; is it inside this set of pathspecs?"
(and its sibling, "We have a leading path and a name_entry taken from that
tree; is it inside this set of pathspecs?"), and with that we can run:
$ git clone git://k.org/pub/scm/git/git.git -- Documentation '*.sh'
that would limit the clone (not just checkout) to the given parts of the
tree. By recording the pathspecs in the repository (and initially making
it frozen---we can design extending the scope in later rounds), we can
limit "fsck", "unpack-trees", "log", etc. all using the unified pathspec
API.
We may later want to add negative or imaginary pathspecs to the mix, but
as long as the unified pathspec API understands that, the narrow-clone
part should be able to be unaware of that.
So I think that is (or at least _should be_ if the pathspec API is done
right) pretty much orthogonal.
^ permalink raw reply
* Re: [PATCH 02/13] IP set core support
From: Jozsef Kadlecsik @ 2011-02-01 21:28 UTC (permalink / raw)
To: Patrick McHardy; +Cc: netfilter-devel, Pablo Neira Ayuso
In-Reply-To: <alpine.DEB.2.00.1102012154130.24580@blackhole.kfki.hu>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 3442 bytes --]
On Tue, 1 Feb 2011, Jozsef Kadlecsik wrote:
> On Tue, 1 Feb 2011, Jozsef Kadlecsik wrote:
>
> > On Tue, 1 Feb 2011, Patrick McHardy wrote:
> >
> > > Am 31.01.2011 23:52, schrieb Jozsef Kadlecsik:
> > > > +static int
> > > > +call_ad(struct sk_buff *skb, struct ip_set *set,
> > > > + struct nlattr *tb[], enum ipset_adt adt,
> > > > + u32 flags, bool use_lineno)
> > > > +{
> > > > + int ret, retried = 0;
> > > > + u32 lineno = 0;
> > > > + bool eexist = flags & IPSET_FLAG_EXIST;
> > > > +
> > > > + do {
> > > > + write_lock_bh(&set->lock);
> > > > + ret = set->variant->uadt(set, tb, adt, &lineno, flags);
> > > > + write_unlock_bh(&set->lock);
> > > > + } while (ret == -EAGAIN &&
> > > > + set->variant->resize &&
> > > > + (ret = set->variant->resize(set, retried++)) == 0);
> > > > +
> > > > + if (!ret || (ret == -IPSET_ERR_EXIST && eexist))
> > > > + return 0;
> > > > + if (lineno && use_lineno) {
> > > > + /* Error in restore/batch mode: send back lineno */
> > > > + struct nlmsghdr *nlh = nlmsg_hdr(skb);
> > > > + int min_len = NLMSG_SPACE(sizeof(struct nfgenmsg));
> > > > + struct nlattr *cda[IPSET_ATTR_CMD_MAX+1];
> > > > + struct nlattr *cmdattr = (void *)nlh + min_len;
> > > > + u32 *errline;
> > > > +
> > > > + nla_parse(cda, IPSET_ATTR_CMD_MAX,
> > > > + cmdattr, nlh->nlmsg_len - min_len,
> > > > + ip_set_adt_policy);
> > > > +
> > > > + errline = nla_data(cda[IPSET_ATTR_LINENO]);
> > > > +
> > > > + *errline = lineno;
> > >
> > > This is still not correct. I didn't mean to remove the const attributes
> > > (the message is still considered const by the higher layers, the netlink
> > > functions just cast this away). You're modifying the received message,
> > > I don't see how this can be useful to userspace.
> >
> > I can't find where the message is considered const in netlink/nfnetlink.
> > It seems to be freely writable via skb.
> >
> > > I guess you're relying on that the original message is appended to a
> > > nlmsgerr message. That doesn't seem right though, if you want to return
> > > something to userspace, you should construct a new message.
> >
> > The message we are processing here carried multiple commands (each having
> > an attribute with the line number of the given command) and one failed
> > from some reason. We have to notify the userspace which command, at what
> > line failed. For this reason the multi-command messages have got an
> > attribute, which can be filled out with the line number - that happens
> > here. The attribute is already there, the message is not enlarged, just
> > the empty value is overwritten with the proper value.
> >
> > The line number reporting works this way, tested in the testsuite too.
> >
> > If I had to construct a completely new message and sent it, that'd be more
> > or less the duplication of netlink_ack. Additionally I had to suppress
> > netlink from sending an errmsg/ack too.
>
> Hm, if I lie -EINTR to netlink, then I can construct and send the error
> message manually and keep NLM_F_ACK at the same time. What do you think?
> Please have a look at the attached patch.
Oops, mistypeing fixed, here follow the hopefully good version.
Best regards,
Jozsef
-
E-mail : kadlec@blackhole.kfki.hu, kadlec@mail.kfki.hu
PGP key : http://www.kfki.hu/~kadlec/pgp_public_key.txt
Address : KFKI Research Institute for Particle and Nuclear Physics
H-1525 Budapest 114, POB. 49, Hungary
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: errline2.patch --]
[-- Type: TEXT/x-diff; name=errline.patch, Size: 3177 bytes --]
diff --git a/kernel/ip_set_core.c b/kernel/ip_set_core.c
index 19158bf..b9ecb97 100644
--- a/kernel/ip_set_core.c
+++ b/kernel/ip_set_core.c
@@ -1103,7 +1103,7 @@ static const struct nla_policy ip_set_adt_policy[IPSET_ATTR_CMD_MAX + 1] = {
};
static int
-call_ad(struct sk_buff *skb, struct ip_set *set,
+call_ad(struct sock *ctnl, struct sk_buff *skb, struct ip_set *set,
struct nlattr *tb[], enum ipset_adt adt,
u32 flags, bool use_lineno)
{
@@ -1123,12 +1123,25 @@ call_ad(struct sk_buff *skb, struct ip_set *set,
return 0;
if (lineno && use_lineno) {
/* Error in restore/batch mode: send back lineno */
- struct nlmsghdr *nlh = nlmsg_hdr(skb);
+ struct nlmsghdr *rep, *nlh = nlmsg_hdr(skb);
+ struct sk_buff *skb2;
+ struct nlmsgerr *errmsg;
+ size_t payload = sizeof(*errmsg) + nlmsg_len(nlh);
int min_len = NLMSG_SPACE(sizeof(struct nfgenmsg));
struct nlattr *cda[IPSET_ATTR_CMD_MAX+1];
- struct nlattr *cmdattr = (void *)nlh + min_len;
+ struct nlattr *cmdattr;
u32 *errline;
+ skb2 = nlmsg_new(payload, GFP_KERNEL);
+ if (skb2 == NULL)
+ return -ENOMEM;
+ rep = __nlmsg_put(skb2, NETLINK_CB(skb).pid,
+ nlh->nlmsg_seq, NLMSG_ERROR, payload, 0);
+ errmsg = nlmsg_data(rep);
+ errmsg->error = ret;
+ memcpy(&errmsg->msg, nlh, nlh->nlmsg_len);
+ cmdattr = (void *)&errmsg->msg + min_len;
+
nla_parse(cda, IPSET_ATTR_CMD_MAX,
cmdattr, nlh->nlmsg_len - min_len,
ip_set_adt_policy);
@@ -1136,6 +1149,9 @@ call_ad(struct sk_buff *skb, struct ip_set *set,
errline = nla_data(cda[IPSET_ATTR_LINENO]);
*errline = lineno;
+
+ netlink_unicast(ctnl, skb2, NETLINK_CB(skb).pid, MSG_DONTWAIT);
+ return -EINTR;
}
return ret;
@@ -1174,7 +1190,8 @@ ip_set_uadd(struct sock *ctnl, struct sk_buff *skb,
attr[IPSET_ATTR_DATA],
set->type->adt_policy))
return -IPSET_ERR_PROTOCOL;
- ret = call_ad(skb, set, tb, IPSET_ADD, flags, use_lineno);
+ ret = call_ad(ctnl, skb, set, tb, IPSET_ADD, flags,
+ use_lineno);
} else {
int nla_rem;
@@ -1185,7 +1202,7 @@ ip_set_uadd(struct sock *ctnl, struct sk_buff *skb,
nla_parse_nested(tb, IPSET_ATTR_ADT_MAX, nla,
set->type->adt_policy))
return -IPSET_ERR_PROTOCOL;
- ret = call_ad(skb, set, tb, IPSET_ADD,
+ ret = call_ad(ctnl, skb, set, tb, IPSET_ADD,
flags, use_lineno);
if (ret < 0)
return ret;
@@ -1227,7 +1244,8 @@ ip_set_udel(struct sock *ctnl, struct sk_buff *skb,
attr[IPSET_ATTR_DATA],
set->type->adt_policy))
return -IPSET_ERR_PROTOCOL;
- ret = call_ad(skb, set, tb, IPSET_DEL, flags, use_lineno);
+ ret = call_ad(ctnl, skb, set, tb, IPSET_DEL, flags,
+ use_lineno);
} else {
int nla_rem;
@@ -1238,7 +1256,7 @@ ip_set_udel(struct sock *ctnl, struct sk_buff *skb,
nla_parse_nested(tb, IPSET_ATTR_ADT_MAX, nla,
set->type->adt_policy))
return -IPSET_ERR_PROTOCOL;
- ret = call_ad(skb, set, tb, IPSET_DEL,
+ ret = call_ad(ctnl, skb, set, tb, IPSET_DEL,
flags, use_lineno);
if (ret < 0)
return ret;
^ permalink raw reply related
* Re: [patch 20/28] posix-timers: Make posix-cpu-timers functions static
From: John Stultz @ 2011-02-01 21:28 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, Richard Cochran, Ingo Molnar, Peter Zijlstra
In-Reply-To: <20110201134419.389755466@linutronix.de>
On Tue, 2011-02-01 at 13:52 +0000, Thomas Gleixner wrote:
> plain text document attachment
> (posix-timer-make-posix-cpu-timer-functions-static.patch)
> All functions are accessed via clock_posix_cpu now. So make them static.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: John Stultz <john.stultz@linaro.org>
> Cc: Richard Cochran <richard.cochran@omicron.at>
This patch seems to have more then just making functions static in it.
> @@ -1481,68 +1483,67 @@ static int do_cpu_nanosleep(const clocki
> return error;
> }
>
> -int posix_cpu_nsleep(const clockid_t which_clock, int flags,
> - struct timespec *rqtp, struct timespec __user *rmtp)
> +static long posix_cpu_nsleep_restart(struct restart_block *restart_block)
> {
> - struct restart_block *restart_block =
> - ¤t_thread_info()->restart_block;
> + clockid_t which_clock = restart_block->nanosleep.index;
> + struct timespec t;
> struct itimerspec it;
> int error;
>
> - /*
> - * Diagnose required errors first.
> - */
> - if (CPUCLOCK_PERTHREAD(which_clock) &&
> - (CPUCLOCK_PID(which_clock) == 0 ||
> - CPUCLOCK_PID(which_clock) == current->pid))
> - return -EINVAL;
> + t = ns_to_timespec(restart_block->nanosleep.expires);
>
> - error = do_cpu_nanosleep(which_clock, flags, rqtp, &it);
> + error = do_cpu_nanosleep(which_clock, TIMER_ABSTIME, &t, &it);
>
> if (error == -ERESTART_RESTARTBLOCK) {
> -
> - if (flags & TIMER_ABSTIME)
> - return -ERESTARTNOHAND;
> + struct timespec __user *rmtp = restart_block->nanosleep.rmtp;
> /*
> * Report back to the user the time still remaining.
> */
> if (rmtp && copy_to_user(rmtp, &it.it_value, sizeof *rmtp))
> return -EFAULT;
>
> - restart_block->fn = posix_cpu_nsleep_restart;
> - restart_block->nanosleep.index = which_clock;
> - restart_block->nanosleep.rmtp = rmtp;
> - restart_block->nanosleep.expires = timespec_to_ns(rqtp);
> + restart_block->nanosleep.expires = timespec_to_ns(&t);
> }
> return error;
> +
> }
>
> -long posix_cpu_nsleep_restart(struct restart_block *restart_block)
> +static int posix_cpu_nsleep(const clockid_t which_clock, int flags,
> + struct timespec *rqtp, struct timespec __user *rmtp)
> {
> - clockid_t which_clock = restart_block->nanosleep.index;
> - struct timespec t;
> + struct restart_block *restart_block =
> + ¤t_thread_info()->restart_block;
> struct itimerspec it;
> int error;
>
> - t = ns_to_timespec(restart_block->nanosleep.expires);
> + /*
> + * Diagnose required errors first.
> + */
> + if (CPUCLOCK_PERTHREAD(which_clock) &&
> + (CPUCLOCK_PID(which_clock) == 0 ||
> + CPUCLOCK_PID(which_clock) == current->pid))
> + return -EINVAL;
>
> - error = do_cpu_nanosleep(which_clock, TIMER_ABSTIME, &t, &it);
> + error = do_cpu_nanosleep(which_clock, flags, rqtp, &it);
>
> if (error == -ERESTART_RESTARTBLOCK) {
> - struct timespec __user *rmtp = restart_block->nanosleep.rmtp;
> +
> + if (flags & TIMER_ABSTIME)
> + return -ERESTARTNOHAND;
> /*
> * Report back to the user the time still remaining.
> */
> if (rmtp && copy_to_user(rmtp, &it.it_value, sizeof *rmtp))
> return -EFAULT;
>
> - restart_block->nanosleep.expires = timespec_to_ns(&t);
> + restart_block->fn = posix_cpu_nsleep_restart;
> + restart_block->nanosleep.index = which_clock;
> + restart_block->nanosleep.rmtp = rmtp;
> + restart_block->nanosleep.expires = timespec_to_ns(rqtp);
> }
> return error;
> -
> }
Maybe split that out?
thanks
-john
^ permalink raw reply
* Re: Network performance with small packets
From: Shirley Ma @ 2011-02-01 21:28 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: David Miller, steved, netdev, kvm
In-Reply-To: <20110201212110.GC30770@redhat.com>
On Tue, 2011-02-01 at 23:21 +0200, Michael S. Tsirkin wrote:
> Confused. We compare capacity to skb frags, no?
> That's sg I think ...
Current guest kernel use indirect buffers, num_free returns how many
available descriptors not skb frags. So it's wrong here.
Shirley
^ permalink raw reply
* Re: Can't find the revelant commit with git-log
From: Junio C Hamano @ 2011-02-01 21:28 UTC (permalink / raw)
To: René Scharfe; +Cc: Junio C Hamano, Francis Moreau, git, Johannes Sixt
In-Reply-To: <4D4477E4.6020006@lsrfire.ath.cx>
René Scharfe <rene.scharfe@lsrfire.ath.cx> writes:
> Subject: revision: let --full-history keep half-interesting merges
>
> Don't simplify merges away that have at least one parent with changes in
> the interesting subset of files if --full-history has been specified.
> The previous behaviour hid merges with one uninteresting parent, which
> could lead to history that removed code to become undetectable.
I think this patch makes a lot more sense than what I've seen in this
thread (including mine).
> E.g., this command run against the Linux kernel repo only found one
> merge that brought the specified function in (and the regular commit
> which added it in the first place), but missed the 92 merges that
> removed it, as well as 67 other merges that added it back:
>
> $ git log -m --full-history -Sblacklist_iommu \
> v2.6.26..v2.6.29 -- drivers/pci/intel-iommu.c
>
> Reported-by: Francis Moreau <francis.moro@gmail.com>
> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Thanks.
> ---
> revision.c | 2 ++
> t/t6016-rev-list-graph-simplify-history.sh | 1 +
> 2 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/revision.c b/revision.c
> index 7b9eaef..84c231b 100644
> --- a/revision.c
> +++ b/revision.c
> @@ -434,6 +434,8 @@ static void try_to_simplify_commit(struct rev_info *revs, struct commit *commit)
> case REV_TREE_OLD:
> case REV_TREE_DIFFERENT:
> tree_changed = 1;
> + if (!revs->simplify_history)
> + return;
> pp = &parent->next;
> continue;
> }
> diff --git a/t/t6016-rev-list-graph-simplify-history.sh b/t/t6016-rev-list-graph-simplify-history.sh
> index f7181d1..50ffcf4 100755
> --- a/t/t6016-rev-list-graph-simplify-history.sh
> +++ b/t/t6016-rev-list-graph-simplify-history.sh
> @@ -168,6 +168,7 @@ test_expect_success '--graph --full-history --simplify-merges -- bar.txt' '
> echo "|\\ " >> expected &&
> echo "| * $C4" >> expected &&
> echo "* | $A5" >> expected &&
> + echo "* | $A4" >> expected &&
> echo "* | $A3" >> expected &&
> echo "|/ " >> expected &&
> echo "* $A2" >> expected &&
> --
> 1.7.3.4
^ permalink raw reply
* Re: [patch 21/28] posix-timer: Update comment
From: john stultz @ 2011-02-01 21:28 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: LKML, Richard Cochran, Ingo Molnar, Peter Zijlstra
In-Reply-To: <20110201134419.487708516@linutronix.de>
On Tue, 2011-02-01 at 13:52 +0000, Thomas Gleixner wrote:
> plain text document attachment (posix-timer-update-comment.patch)
> From: Richard Cochran <richardcochran@gmail.com>
>
> Pick the cleanup to the comment in posix-timers.c from Richards all in
> one conversion patch.
>
> Originally-from: Richard Cochran <richardcochran@gmail.com>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: John Stultz <john.stultz@linaro.org>
Acked-by: John Stultz <johnstul@us.ibm.com>
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.