* [PATCH] spi/pl022: Enable clock in probe an use runtime_idle
From: Grant Likely @ 2011-10-24 12:03 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319206124-17549-1-git-send-email-ulf.hansson@stericsson.com>
On Fri, Oct 21, 2011 at 04:08:44PM +0200, Ulf Hansson wrote:
> Since we are always runtime resumed when leaving probe
> the clock must be enabled. To accomplish that we are able
> to be runtime suspended after probe in the case when no
> request is going to be recieved, a runtime_idle function
> has been implemented.
>
> Change-Id: I6cb86f2cad30ecaab16f512daf4674b039b18213
> Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34447
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Since it depends on Russell's tree, I'm okay with it going in that way.
g.
> ---
> drivers/spi/spi-pl022.c | 18 +++++++++++++++++-
> 1 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index f103e47..ad48fba 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -2184,6 +2184,12 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
> goto err_clk_prep;
> }
>
> + status = clk_enable(pl022->clk);
> + if (status) {
> + dev_err(&adev->dev, "could not enable SSP/SPI bus clock\n");
> + goto err_no_clk_en;
> + }
> +
> /* Disable SSP */
> writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
> SSP_CR1(pl022->virtbase));
> @@ -2237,6 +2243,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
>
> free_irq(adev->irq[0], pl022);
> err_no_irq:
> + clk_disable(pl022->clk);
> + err_no_clk_en:
> clk_unprepare(pl022->clk);
> err_clk_prep:
> clk_put(pl022->clk);
> @@ -2342,11 +2350,19 @@ static int pl022_runtime_resume(struct device *dev)
>
> return 0;
> }
> +
> +static int pl022_runtime_idle(struct device *dev)
> +{
> + pm_runtime_suspend(dev);
> + return 0;
> +}
> #endif
>
> static const struct dev_pm_ops pl022_dev_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(pl022_suspend, pl022_resume)
> - SET_RUNTIME_PM_OPS(pl022_runtime_suspend, pl022_runtime_resume, NULL)
> + SET_RUNTIME_PM_OPS(pl022_runtime_suspend,
> + pl022_runtime_resume,
> + pl022_runtime_idle)
> };
>
> static struct vendor_data vendor_arm = {
> --
> 1.7.5.4
>
^ permalink raw reply
* Re: [PATCH] spi/pl022: Enable clock in probe an use runtime_idle
From: Grant Likely @ 2011-10-24 12:03 UTC (permalink / raw)
To: Ulf Hansson; +Cc: spi-devel-general, Lee Jones, linux-arm-kernel
In-Reply-To: <1319206124-17549-1-git-send-email-ulf.hansson@stericsson.com>
On Fri, Oct 21, 2011 at 04:08:44PM +0200, Ulf Hansson wrote:
> Since we are always runtime resumed when leaving probe
> the clock must be enabled. To accomplish that we are able
> to be runtime suspended after probe in the case when no
> request is going to be recieved, a runtime_idle function
> has been implemented.
>
> Change-Id: I6cb86f2cad30ecaab16f512daf4674b039b18213
> Signed-off-by: Ulf Hansson <ulf.hansson@stericsson.com>
> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/34447
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Since it depends on Russell's tree, I'm okay with it going in that way.
g.
> ---
> drivers/spi/spi-pl022.c | 18 +++++++++++++++++-
> 1 files changed, 17 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
> index f103e47..ad48fba 100644
> --- a/drivers/spi/spi-pl022.c
> +++ b/drivers/spi/spi-pl022.c
> @@ -2184,6 +2184,12 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
> goto err_clk_prep;
> }
>
> + status = clk_enable(pl022->clk);
> + if (status) {
> + dev_err(&adev->dev, "could not enable SSP/SPI bus clock\n");
> + goto err_no_clk_en;
> + }
> +
> /* Disable SSP */
> writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
> SSP_CR1(pl022->virtbase));
> @@ -2237,6 +2243,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
>
> free_irq(adev->irq[0], pl022);
> err_no_irq:
> + clk_disable(pl022->clk);
> + err_no_clk_en:
> clk_unprepare(pl022->clk);
> err_clk_prep:
> clk_put(pl022->clk);
> @@ -2342,11 +2350,19 @@ static int pl022_runtime_resume(struct device *dev)
>
> return 0;
> }
> +
> +static int pl022_runtime_idle(struct device *dev)
> +{
> + pm_runtime_suspend(dev);
> + return 0;
> +}
> #endif
>
> static const struct dev_pm_ops pl022_dev_pm_ops = {
> SET_SYSTEM_SLEEP_PM_OPS(pl022_suspend, pl022_resume)
> - SET_RUNTIME_PM_OPS(pl022_runtime_suspend, pl022_runtime_resume, NULL)
> + SET_RUNTIME_PM_OPS(pl022_runtime_suspend,
> + pl022_runtime_resume,
> + pl022_runtime_idle)
> };
>
> static struct vendor_data vendor_arm = {
> --
> 1.7.5.4
>
^ permalink raw reply
* Re: [PATCH tip/core/rcu 22/55] rcu: Add grace-period, quiescent-state, and call_rcu trace events
From: Paul E. McKenney @ 2011-10-24 12:02 UTC (permalink / raw)
To: Josh Triplett
Cc: linux-kernel, mingo, laijs, dipankar, akpm, mathieu.desnoyers,
niv, tglx, peterz, rostedt, Valdis.Kletnieks, dhowells,
eric.dumazet, darren, patches, Paul E. McKenney
In-Reply-To: <20111017013352.GB19421@leaf>
On Sun, Oct 16, 2011 at 06:33:53PM -0700, Josh Triplett wrote:
> On Tue, Sep 06, 2011 at 11:00:16AM -0700, Paul E. McKenney wrote:
> > From: Paul E. McKenney <paul.mckenney@linaro.org>
> >
> > Add trace events to record grace-period start and end, quiescent states,
> > CPUs noticing grace-period start and end, grace-period initialization,
> > call_rcu() invocation, tasks blocking in RCU read-side critical sections,
> > tasks exiting those same critical sections, force_quiescent_state()
> > detection of dyntick-idle and offline CPUs, CPUs entering and leaving
> > dyntick-idle mode (except from NMIs), CPUs coming online and going
> > offline, and CPUs being kicked for staying in dyntick-idle mode for too
> > long (as in many weeks, even on 32-bit systems).
> >
> > Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> >
> > rcu: Add the rcu flavor to callback trace events
> >
> > The earlier trace events for registering RCU callbacks and for invoking
> > them did not include the RCU flavor (rcu_bh, rcu_preempt, or rcu_sched).
> > This commit adds the RCU flavor to those trace events.
> >
> > Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
>
> Did you intend for this commit message to contain two full commit
> messages, and three signoffs from you?
No, messed up a rebase. <red face>
> Also, the subject doesn't seem to cover the second half of the commit
> message.
This is indeed the first set of trace events where the name of the RCU
flavor was important.
Thanx, Paul
^ permalink raw reply
* Re: [Qemu-devel] KVM call agenda for October 25
From: Peter Maydell @ 2011-10-24 12:02 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, kvm
In-Reply-To: <j83ihr$ec5$1@dough.gmane.org>
On 24 October 2011 12:35, Paolo Bonzini <pbonzini@redhat.com> wrote:
> On 10/24/2011 01:04 PM, Juan Quintela wrote:
>> Please send in any agenda items you are interested in covering.
>
> - What's left to merge for 1.0.
Things on my list, FWIW:
* current target-arm pullreq
* PL041 support (needs another patch round to fix a minor bug
Andrzej spotted)
* cpu_single_env must be thread-local
I also think that it's somewhat unfortunate that we now will
compile on ARM hosts so that we always abort on startup (due
to the reliance on a working makecontext()) but I'm not really
sure how to deal with that one.
-- PMM
^ permalink raw reply
* Re: [PATCH] gpiolib: Provide a definition of struct gpio for the stub gpiolib
From: Grant Likely @ 2011-10-24 12:01 UTC (permalink / raw)
To: Mark Brown; +Cc: Grant Likely, linux-kernel
In-Reply-To: <1319455649-4916-1-git-send-email-broonie@opensource.wolfsonmicro.com>
On Mon, Oct 24, 2011 at 01:27:29PM +0200, Mark Brown wrote:
> This makes the stub gpio_request_array() much more usable as drivers can
> declare struct gpio variables.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Shouldn't this patch remove the definition from
include/asm-generic/gpio.h at the same time?
g.
> ---
> include/linux/gpio.h | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/gpio.h b/include/linux/gpio.h
> index 17b5a0d..e885103 100644
> --- a/include/linux/gpio.h
> +++ b/include/linux/gpio.h
> @@ -24,7 +24,6 @@
> #include <linux/errno.h>
>
> struct device;
> -struct gpio;
> struct gpio_chip;
>
> /*
> @@ -36,6 +35,12 @@ struct gpio_chip;
> * warning when something is wrongly called.
> */
>
> +struct gpio {
> + unsigned gpio;
> + unsigned long flags;
> + const char *label;
> +};
> +
> static inline bool gpio_is_valid(int number)
> {
> return false;
> --
> 1.7.6.3
>
^ permalink raw reply
* Re: [Xenomai-core] some problems with interrupts
From: Gilles Chanteperdrix @ 2011-10-24 12:01 UTC (permalink / raw)
To: Roberto Bielli; +Cc: xenomai
In-Reply-To: <4EA53A99.1050305@domain.hid>
On 10/24/2011 12:14 PM, Roberto Bielli wrote:
> Hi,
>
> i installed the patch 'adeos-ipipe-2.6.31-arm-1.16-02.patch' on a kernel
> 2.6.31 for imx257 processor.
> I have a xenomai complex application that read touchscreen events with
> tslib when pressed.
> In the kernel log i try these lines: ( the read job is made in a
> not-realtime thread )
>
> ------------[ cut here ]------------
> WARNING: at drivers/input/touchscreen/mxc_tsc.c:599
> mxc_tsc_interrupt+0x19c/0x30c [mxc_tsc]()
> (...)
>
> Do you know the meaning in xenomai of this error (so i can modify
> something to resolve the problem )?
This looks more like a warning than an error. At first glance, it has
nothing to do with xenomai. Besides, you seem not to be using a mainline
version of the kernel, because in the versions I have, there is no
drivers/input/touchscreen/mxc_tsc.c, so, it is hard for me to debug this
issue.
What has file drivers/input/touchscreen/mxc_tsc.c on line 599?
You may want to try a more recent version, as linux 2.6.31 starts being
seriously outdated.
--
Gilles.
^ permalink raw reply
* Re: [RFC] mac80211: Fix STA supported rate configuration with dummy entry
From: Arik Nemtsov @ 2011-10-24 11:59 UTC (permalink / raw)
To: Jouni Malinen; +Cc: Johannes Berg, Felix Fietkau, linux-wireless
In-Reply-To: <20111023194059.GA18385@jm.kir.nu>
On Sun, Oct 23, 2011 at 21:40, Jouni Malinen <j@w1.fi> wrote:
>
> Are all rate control algorithms fine with the second
> rate_control_rate_init() call? That is needed in the TDLS use case where
> the supported rate set is known only after the STA entry has been
Note that the sta-rates are not really required before second addition
(which also sets them). Initially the STA is not authorized for direct
Tx (as determined by the WLAN_STA_TDLS_PEER_AUTH bit).
We don't expect direct frames during link setup.
> added. I guess it would be possible to delay addition of the STA entry
> for TDLS until the supported rates are known, but I did not look at the
> details on what exactly that would require.
The STA is added to let us know we should drop all non-setup packets
between TDLS peers currently in link setup. We could have used a
different indication, but the STA entry is make the most sense here
since it is automatically cleaned up when we are disconnected from the
AP (as all TDLS state should be).
How about this one instead (tested hwsim with it):
>From d8b7acc16073e50f4fda3365d98ad01b21e2c631 Mon Sep 17 00:00:00 2001
From: Arik Nemtsov <arik@wizery.com>
Date: Mon, 24 Oct 2011 13:44:07 +0200
Subject: [RFC] mac80211: init rate-control for TDLS sta when supp-rates are
known
Initialize rate control algorithms only when supported rates are known
for a TDLS peer sta. Direct Tx between peers is not allowed before the
link is enabled. In turn, this only occurs after a change_station()
call that sets supported rates.
---
net/mac80211/cfg.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 1309bb9..9f05416d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -829,7 +829,12 @@ static int ieee80211_add_station(struct wiphy
*wiphy, struct net_device *dev,
sdata->vif.type == NL80211_IFTYPE_STATION))
return -ENOTSUPP;
- rate_control_rate_init(sta);
+ /*
+ * for TDLS, rate control should be initialized only when supported
+ * rates are known.
+ */
+ if (!test_sta_flag(sta, WLAN_STA_TDLS_PEER))
+ rate_control_rate_init(sta);
layer2_update = sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
sdata->vif.type == NL80211_IFTYPE_AP;
@@ -913,6 +918,9 @@ static int ieee80211_change_station(struct wiphy *wiphy,
sta_apply_parameters(local, sta, params);
+ if (test_sta_flag(sta, WLAN_STA_TDLS_PEER) && params->supported_rates)
+ rate_control_rate_init(sta);
+
rcu_read_unlock();
if (sdata->vif.type == NL80211_IFTYPE_STATION &&
--
1.7.5.4
^ permalink raw reply related
* Re: match a few ecn-ip-ect in one rule
From: Sergey Naumov @ 2011-10-24 11:59 UTC (permalink / raw)
To: Jan Engelhardt; +Cc: netfilter
In-Reply-To: <alpine.LNX.2.01.1110241344010.21849@frira.zrqbmnf.qr>
> Since rules are generally combined in ORed, it only makes sense for
> matches to be ANDed (and submatch parts to be ORed at times).
Yes, I understand, but because of logic of project that I develop it
is better to use 1 rule than to search places where I have to add
workarounds to generate 2 iptables rules from 1 user specified rule.
When I use multiple -m molude inclusions, are specified parameters
combined as OR, as AND or overrided?
^ permalink raw reply
* Re: [PATCH] staging:iio:events: Make sure userspace buffer is large enough
From: Lars-Peter Clausen @ 2011-10-24 11:59 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Michael Hennerich, linux-iio, device-drivers-devel, drivers
In-Reply-To: <4EA5521D.90403@cam.ac.uk>
On 10/24/2011 01:55 PM, Jonathan Cameron wrote:
> On 10/24/11 12:52, Lars-Peter Clausen wrote:
>> Make sure that the userspace buffer is large enough to hold a iio_event_data
>> struct before writing to it.
>>
> Good catch. Shall I tack this on the end of the two fixes sets I sent earlier?
Fine with me. Thanks.
>> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
> Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
>> ---
>> drivers/staging/iio/industrialio-core.c | 6 ++++--
>> 1 files changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
>> index 74904f1..733e83a 100644
>> --- a/drivers/staging/iio/industrialio-core.c
>> +++ b/drivers/staging/iio/industrialio-core.c
>> @@ -169,8 +169,11 @@ static ssize_t iio_event_chrdev_read(struct file *filep,
>> {
>> struct iio_event_interface *ev_int = filep->private_data;
>> struct iio_detected_event_list *el;
>> + size_t len = sizeof(el->ev);
>> int ret;
>> - size_t len;
>> +
>> + if (count < len)
>> + return -EINVAL;
>>
>> mutex_lock(&ev_int->event_list_lock);
>> if (list_empty(&ev_int->det_events)) {
>> @@ -192,7 +195,6 @@ static ssize_t iio_event_chrdev_read(struct file *filep,
>> el = list_first_entry(&ev_int->det_events,
>> struct iio_detected_event_list,
>> list);
>> - len = sizeof el->ev;
>> if (copy_to_user(buf, &(el->ev), len)) {
>> ret = -EFAULT;
>> goto error_mutex_unlock;
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH 12/12] is_refname_available(): reimplement using do_for_each_ref_in_array()
From: Michael Haggerty @ 2011-10-24 11:58 UTC (permalink / raw)
To: Junio C Hamano
Cc: git, Jeff King, Drew Northup, Jakub Narebski, Heiko Voigt,
Johan Herland, Julian Phillips
In-Reply-To: <4E9FD1C3.3090302@alum.mit.edu>
On 10/20/2011 09:46 AM, Michael Haggerty wrote:
> On 10/20/2011 03:40 AM, Junio C Hamano wrote:
>> Hmm, why is this patch and only this one in the series full of whitespace
>> violations? Did you use a different settings or something?
>
> This happens rarely; I don't know why. Maybe I copy-pasted snippets
> from a view in an application that expanded the tabs. [...]
Now I think I know how this happened. When "git diff"'s output goes to
a TTY, it passes its output through the pager. The default pager, less,
seems to convert tabs into spaces. I probably copy-pasted some output
of diff into my editor then removed the first column of '+' characters.
Just another reason why tabs are evil...
:-)
Michael
--
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/
^ permalink raw reply
* [GIT PATCHES FOR 3.2] add poll_requested_events() function
From: Hans Verkuil @ 2011-10-24 11:57 UTC (permalink / raw)
To: linux-media
Cc: Andrew Morton, Jonathan Corbet, viro, linux-fsdevel, linux-kernel
Since there have been no more comment on RFCv4 of this patch series
(http://comments.gmane.org/gmane.linux.kernel/1196926), I'm posting this
pull request for v3.2.
I never received any acks or comments from Al Viro (or anyone else from
linux-fsdevel for that matter), so I'm following Andrew's suggestion and I just
go ahead with this.
This series should be pulled in via the media git repository since the media
drivers are the primary users of the new poll_requested_events() function.
Regards,
Hans
The following changes since commit a63366b935456dd0984f237642f6d4001dcf8017:
[media] mxl111sf: update demod_ops.info.name to "MaxLinear MxL111SF DVB-T demodulator" (2011-10-24
03:20:09 +0200)
are available in the git repository at:
ssh://linuxtv.org/git/hverkuil/media_tree.git pollv3
Hans Verkuil (6):
poll: add poll_requested_events() function
ivtv: only start streaming in poll() if polling for input.
videobuf2: only start streaming in poll() if so requested by the poll mask.
videobuf: only start streaming in poll() if so requested by the poll mask.
videobuf2-core: also test for pending events.
vivi: let vb2_poll handle events.
drivers/media/video/ivtv/ivtv-fileops.c | 6 ++-
drivers/media/video/videobuf-core.c | 3 +-
drivers/media/video/videobuf2-core.c | 48 +++++++++++++++++++++---------
drivers/media/video/vivi.c | 9 +-----
fs/eventpoll.c | 18 +++++++++--
fs/select.c | 38 +++++++++++-------------
include/linux/poll.h | 13 ++++++++-
7 files changed, 84 insertions(+), 51 deletions(-)
^ permalink raw reply
* Re: [RFC 4/4] watchdog: imx2: simplify resource allocation
From: Grant Likely @ 2011-10-24 11:56 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-kernel, linux-arm-kernel, Greg KH, Tejun Heo
In-Reply-To: <1319445729-14841-5-git-send-email-w.sang@pengutronix.de>
On Mon, Oct 24, 2011 at 10:42:09AM +0200, Wolfram Sang wrote:
> Use the new devm_resource_to_mapped_ptr function to simplify the code
> and standardize the error-handling. Silently fixes a wrong type for the
> resource_size variable as well.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> drivers/watchdog/imx2_wdt.c | 22 +++-------------------
> 1 files changed, 3 insertions(+), 19 deletions(-)
w00t! I can see a lot of drivers simplified by using this.
g.
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index b8ef2c6..1fc6714 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -247,28 +247,12 @@ static struct miscdevice imx2_wdt_miscdev = {
> static int __init imx2_wdt_probe(struct platform_device *pdev)
> {
> int ret;
> - int res_size;
> struct resource *res;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res) {
> - dev_err(&pdev->dev, "can't get device resources\n");
> - return -ENODEV;
> - }
> -
> - res_size = resource_size(res);
> - if (!devm_request_mem_region(&pdev->dev, res->start, res_size,
> - res->name)) {
> - dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n",
> - res_size, res->start);
> - return -ENOMEM;
> - }
> -
> - imx2_wdt.base = devm_ioremap_nocache(&pdev->dev, res->start, res_size);
> - if (!imx2_wdt.base) {
> - dev_err(&pdev->dev, "ioremap failed\n");
> - return -ENOMEM;
> - }
> + ret = devm_resource_to_mapped_ptr(&pdev->dev, res, &imx2_wdt.base);
> + if (ret)
> + return ret;
>
> imx2_wdt.clk = clk_get(&pdev->dev, NULL);
> if (IS_ERR(imx2_wdt.clk)) {
> --
> 1.7.6.3
>
^ permalink raw reply
* Re: [PATCH] staging:iio:iio_utils.h: Add missing include
From: Jonathan Cameron @ 2011-10-24 11:57 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Michael Hennerich, linux-iio, device-drivers-devel, drivers
In-Reply-To: <1319457376-16397-1-git-send-email-lars@metafoo.de>
On 10/24/11 12:56, Lars-Peter Clausen wrote:
> iio_utils.h uses opendir and friends which need dirent.h
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
> drivers/staging/iio/Documentation/iio_utils.h | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h
> index 75938b2..dbbad8a 100644
> --- a/drivers/staging/iio/Documentation/iio_utils.h
> +++ b/drivers/staging/iio/Documentation/iio_utils.h
> @@ -13,6 +13,7 @@
> #include <ctype.h>
> #include <stdio.h>
> #include <stdint.h>
> +#include <dirent.h>
>
> #define IIO_MAX_NAME_LENGTH 30
>
^ permalink raw reply
* [RFC 4/4] watchdog: imx2: simplify resource allocation
From: Grant Likely @ 2011-10-24 11:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319445729-14841-5-git-send-email-w.sang@pengutronix.de>
On Mon, Oct 24, 2011 at 10:42:09AM +0200, Wolfram Sang wrote:
> Use the new devm_resource_to_mapped_ptr function to simplify the code
> and standardize the error-handling. Silently fixes a wrong type for the
> resource_size variable as well.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> drivers/watchdog/imx2_wdt.c | 22 +++-------------------
> 1 files changed, 3 insertions(+), 19 deletions(-)
w00t! I can see a lot of drivers simplified by using this.
g.
>
> diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c
> index b8ef2c6..1fc6714 100644
> --- a/drivers/watchdog/imx2_wdt.c
> +++ b/drivers/watchdog/imx2_wdt.c
> @@ -247,28 +247,12 @@ static struct miscdevice imx2_wdt_miscdev = {
> static int __init imx2_wdt_probe(struct platform_device *pdev)
> {
> int ret;
> - int res_size;
> struct resource *res;
>
> res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!res) {
> - dev_err(&pdev->dev, "can't get device resources\n");
> - return -ENODEV;
> - }
> -
> - res_size = resource_size(res);
> - if (!devm_request_mem_region(&pdev->dev, res->start, res_size,
> - res->name)) {
> - dev_err(&pdev->dev, "can't allocate %d bytes at %d address\n",
> - res_size, res->start);
> - return -ENOMEM;
> - }
> -
> - imx2_wdt.base = devm_ioremap_nocache(&pdev->dev, res->start, res_size);
> - if (!imx2_wdt.base) {
> - dev_err(&pdev->dev, "ioremap failed\n");
> - return -ENOMEM;
> - }
> + ret = devm_resource_to_mapped_ptr(&pdev->dev, res, &imx2_wdt.base);
> + if (ret)
> + return ret;
>
> imx2_wdt.clk = clk_get(&pdev->dev, NULL);
> if (IS_ERR(imx2_wdt.clk)) {
> --
> 1.7.6.3
>
^ permalink raw reply
* Re: [PATCH] sparse, llvm: Fix 'void *' pointer code generation
From: Pekka Enberg @ 2011-10-24 11:56 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Pekka Enberg, linux-sparse, Christopher Li, Jeff Garzik
In-Reply-To: <CA+55aFx1=9C_QDE2CfqLp1zg_t=x+VjKUPZgj2karJsS1FAZaA@mail.gmail.com>
On Mon, Oct 24, 2011 at 1:43 PM, Pekka Enberg <penberg@kernel.org> wrote:
>> Fix the issue by switching to LLVMIntType(bits_per_pointer) in
>> sym_basetype_type().
On Mon, 24 Oct 2011, Linus Torvalds wrote:
> Why bits_per_pointer? Isn't this the "base type" of void *? A more
> logical choice would seem to be to make it equivalent to "char *", and
> just make it fall through to the "case 8" case?
Indeed. Updated patch below.
Pekka
From f90242c21b21d91cfed57aa050b4726b6060dfdd Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@kernel.org>
Date: Mon, 24 Oct 2011 14:11:13 +0300
Subject: [PATCH] sparse, llvm: Fix 'void *' pointer code generation
Sparse front-end generates SYM_PTR with SYM_BASETYPE with bit_size set to -1
for "void *" pointers. We currently map that to LLVMVoidType() but that no
longer works with LLVM Subversion trunk:
$ ./sparse-llvm validation/backend/struct.c
sparse-llvm: Type.cpp:676: static llvm::PointerType* llvm::PointerType::get(llvm::Type*, unsigned int): Assertion `isValidElementType(EltTy) && "Invalid type for pointer element!"' failed.
Aborted
Fix the issue by switching to LLVMIntType(bits_per_pointer) in
sym_basetype_type().
Cc: Christopher Li <sparse@chrisli.org>
Cc: Jeff Garzik <jgarzik@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
---
sparse-llvm.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/sparse-llvm.c b/sparse-llvm.c
index a85dfea..fc0c2e9 100644
--- a/sparse-llvm.c
+++ b/sparse-llvm.c
@@ -79,9 +79,7 @@ static LLVMTypeRef sym_basetype_type(struct symbol *sym)
}
} else {
switch (sym->bit_size) {
- case -1:
- ret = LLVMVoidType();
- break;
+ case -1: /* 'void *' is treated like 'char *' */
case 8:
ret = LLVMInt8Type();
break;
--
1.7.6.4
^ permalink raw reply related
* Re: [RFC] [PATCH -rt 5/5] cpufreq: get rid of get_online_cpus()/put_online_cpus()
From: Yong Zhang @ 2011-10-24 11:56 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: linux-kernel, linux-rt-users
In-Reply-To: <alpine.LFD.2.02.1110241343130.2633@ionos>
On Mon, Oct 24, 2011 at 01:45:16PM +0200, Thomas Gleixner wrote:
> On Mon, 24 Oct 2011, Yong Zhang wrote:
> > On Mon, Oct 24, 2011 at 11:24:51AM +0200, Thomas Gleixner wrote:
> > > > No sure whether it's big issue or not.
> > > > Mind showing more about your concern?
> > >
> > > This is probably not the only place which will run into that issue and
> > > I have not much interest to patch all those sites.
> >
> > If so, I think that kind of violation has been caught in mainline,
> > because mainline has had CPU_DOWN_PREPARE called under
> > cpu_hotplug.lock, right?
> >
> > Or am I missing something?
>
> Hmm, no. I obviously forgot that I moved it in RT :(
>
> So yes, it should be safe. Though the question is why cpufreq does not
> suffer from that that problem in mainline.
By this one: peter_zijlstra-fix-cpufreq.patch
Thanks,
Yong
^ permalink raw reply
* Re: [RFC 3/4] lib: devres: add convenience function to remap a resource
From: Grant Likely @ 2011-10-24 11:56 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-kernel, linux-arm-kernel, Greg KH, Tejun Heo
In-Reply-To: <1319445729-14841-4-git-send-email-w.sang@pengutronix.de>
On Mon, Oct 24, 2011 at 10:42:08AM +0200, Wolfram Sang wrote:
> Almost every platform_driver does the three steps get_resource,
> request_mem_region, ioremap. This does not only lead to a lot of code
> duplication, but also a number of similar error strings and inconsistent
> error codes on failure. So, introduce a helper function which simplifies
> remapping a resource and make it hard to do something wrong.
>
> A few notes on design choices:
>
> * not 100% sure on ENOENT when the resource is invalid. Seems to be frequently
> used currently and fits "somehow"
>
> * the remapped pointer is a function argument and not a return value. This is to
> save users from forgetting to use IS_ERR/PTR_ERR.
>
> * the usage of IORESOURCE_CACHEABLE enforces calling the correct ioremap-variant.
> A number of drivers miss to call the _nocache-version, although they should do.
>
> * the new function is not named 'devm_ioremap_resource' because it does more than
> just ioremap, namely request_mem_region. I didn't want to create implicit
> knowledge here.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> Documentation/driver-model/devres.txt | 1 +
> include/linux/device.h | 3 ++
> lib/devres.c | 52 +++++++++++++++++++++++++++++++++
> 3 files changed, 56 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
> index badd964..3aeb4f4 100644
> --- a/Documentation/driver-model/devres.txt
> +++ b/Documentation/driver-model/devres.txt
> @@ -266,6 +266,7 @@ IOMAP
> devm_ioremap()
> devm_ioremap_nocache()
> devm_iounmap()
> + devm_resource_to_mapped_ptr() : checks resource, requests region, ioremaps
> pcim_iomap()
> pcim_iounmap()
> pcim_iomap_table() : array of mapped addresses indexed by BAR
> diff --git a/include/linux/device.h b/include/linux/device.h
> index c20dfbf..82a621c 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -481,6 +481,9 @@ extern int devres_release_group(struct device *dev, void *id);
> extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp);
> extern void devm_kfree(struct device *dev, void *p);
>
> +int __must_check devm_resource_to_mapped_ptr(struct device *dev,
> + struct resource *res, void __iomem **dest);
> +
> struct device_dma_parameters {
> /*
> * a low level driver may set these to teach IOMMU code about
> diff --git a/lib/devres.c b/lib/devres.c
> index 78777ae..970588b 100644
> --- a/lib/devres.c
> +++ b/lib/devres.c
> @@ -85,6 +85,58 @@ void devm_iounmap(struct device *dev, void __iomem *addr)
> }
> EXPORT_SYMBOL(devm_iounmap);
>
> +/**
> + * devm_resource_to_mapped_ptr - Check, request region, and ioremap resource
Kernel doc format should have '()' for functions is:
/*
* devm_resource_to_mapped_ptr() - Check, request region, and ioremap resource
> + * @dev: Generic device to handle the resource for
> + * @res: resource to be handled
> + * @dest: Pointer to pointer which carries the remapped address
> + *
> + * Takes all necessary steps to ioremap a mem resource. Uses managed device, so
> + * everything is undone on driver detach. Checks arguments, so you can feed
> + * it the result from e.g. platform_get_resource() directly:
> + *
> + * res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + * err = devm_resource_to_mapped_ptr(&pdev->dev, res, &priv->regs);
> + * if (err)
> + * return err;
> + */
> +int __must_check devm_resource_to_mapped_ptr(struct device *dev,
> + struct resource *res, void __iomem **dest)
I'm not happy with the API. I understand trying to avoid losing the
error code, but passing back the value in a passed in pointer is
rather horrible to use (as I discovered with the
of_property_read_u32() patches) and it becomes too easy to improperly
use it.
I'd argue that the users of this probably really won't care about the
actual error code. If this function fails, then things are rather
horribly wrong, and it would be entirely appropriate to do rely on the
dev_err() to inform the user of the actual error code.
So, just return the mapped (void __iomem *) value after requesting and
mapping the region, and make exceptional situations exceptional. :-)
Otherwise, I'm quite happy to see this helper. Good work!
g.
> +{
> + resource_size_t size;
> + const char *name;
> +
> + BUG_ON(!dev || !dest);
> +
> + *dest = NULL;
> +
> + if (!res || resource_type(res) != IORESOURCE_MEM) {
> + dev_err(dev, "invalid resource\n");
> + return -ENOENT;
> + }
> +
> + size = resource_size(res);
> + name = res->name ?: dev_name(dev);
> +
> + if (!devm_request_mem_region(dev, res->start, size, name)) {
> + dev_err(dev, "can't request region for resource %pR\n", res);
> + return -EBUSY;
> + }
> +
> + if (res->flags & IORESOURCE_CACHEABLE)
> + *dest = devm_ioremap(dev, res->start, size);
> + else
> + *dest = devm_ioremap_nocache(dev, res->start, size);
> +
> + if (!*dest) {
> + dev_err(dev, "ioremap failed for resource %pR\n", res);
> + return -ENOMEM;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(devm_resource_to_mapped_ptr);
> +
> #ifdef CONFIG_HAS_IOPORT
> /*
> * Generic iomap devres
> --
> 1.7.6.3
>
^ permalink raw reply
* [PATCH] staging:iio:iio_utils.h: Add missing include
From: Lars-Peter Clausen @ 2011-10-24 11:56 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Michael Hennerich, linux-iio, device-drivers-devel, drivers,
Lars-Peter Clausen
iio_utils.h uses opendir and friends which need dirent.h
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/staging/iio/Documentation/iio_utils.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h
index 75938b2..dbbad8a 100644
--- a/drivers/staging/iio/Documentation/iio_utils.h
+++ b/drivers/staging/iio/Documentation/iio_utils.h
@@ -13,6 +13,7 @@
#include <ctype.h>
#include <stdio.h>
#include <stdint.h>
+#include <dirent.h>
#define IIO_MAX_NAME_LENGTH 30
--
1.7.7
^ permalink raw reply related
* [RFC 3/4] lib: devres: add convenience function to remap a resource
From: Grant Likely @ 2011-10-24 11:56 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1319445729-14841-4-git-send-email-w.sang@pengutronix.de>
On Mon, Oct 24, 2011 at 10:42:08AM +0200, Wolfram Sang wrote:
> Almost every platform_driver does the three steps get_resource,
> request_mem_region, ioremap. This does not only lead to a lot of code
> duplication, but also a number of similar error strings and inconsistent
> error codes on failure. So, introduce a helper function which simplifies
> remapping a resource and make it hard to do something wrong.
>
> A few notes on design choices:
>
> * not 100% sure on ENOENT when the resource is invalid. Seems to be frequently
> used currently and fits "somehow"
>
> * the remapped pointer is a function argument and not a return value. This is to
> save users from forgetting to use IS_ERR/PTR_ERR.
>
> * the usage of IORESOURCE_CACHEABLE enforces calling the correct ioremap-variant.
> A number of drivers miss to call the _nocache-version, although they should do.
>
> * the new function is not named 'devm_ioremap_resource' because it does more than
> just ioremap, namely request_mem_region. I didn't want to create implicit
> knowledge here.
>
> Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
> ---
> Documentation/driver-model/devres.txt | 1 +
> include/linux/device.h | 3 ++
> lib/devres.c | 52 +++++++++++++++++++++++++++++++++
> 3 files changed, 56 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
> index badd964..3aeb4f4 100644
> --- a/Documentation/driver-model/devres.txt
> +++ b/Documentation/driver-model/devres.txt
> @@ -266,6 +266,7 @@ IOMAP
> devm_ioremap()
> devm_ioremap_nocache()
> devm_iounmap()
> + devm_resource_to_mapped_ptr() : checks resource, requests region, ioremaps
> pcim_iomap()
> pcim_iounmap()
> pcim_iomap_table() : array of mapped addresses indexed by BAR
> diff --git a/include/linux/device.h b/include/linux/device.h
> index c20dfbf..82a621c 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -481,6 +481,9 @@ extern int devres_release_group(struct device *dev, void *id);
> extern void *devm_kzalloc(struct device *dev, size_t size, gfp_t gfp);
> extern void devm_kfree(struct device *dev, void *p);
>
> +int __must_check devm_resource_to_mapped_ptr(struct device *dev,
> + struct resource *res, void __iomem **dest);
> +
> struct device_dma_parameters {
> /*
> * a low level driver may set these to teach IOMMU code about
> diff --git a/lib/devres.c b/lib/devres.c
> index 78777ae..970588b 100644
> --- a/lib/devres.c
> +++ b/lib/devres.c
> @@ -85,6 +85,58 @@ void devm_iounmap(struct device *dev, void __iomem *addr)
> }
> EXPORT_SYMBOL(devm_iounmap);
>
> +/**
> + * devm_resource_to_mapped_ptr - Check, request region, and ioremap resource
Kernel doc format should have '()' for functions is:
/*
* devm_resource_to_mapped_ptr() - Check, request region, and ioremap resource
> + * @dev: Generic device to handle the resource for
> + * @res: resource to be handled
> + * @dest: Pointer to pointer which carries the remapped address
> + *
> + * Takes all necessary steps to ioremap a mem resource. Uses managed device, so
> + * everything is undone on driver detach. Checks arguments, so you can feed
> + * it the result from e.g. platform_get_resource() directly:
> + *
> + * res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + * err = devm_resource_to_mapped_ptr(&pdev->dev, res, &priv->regs);
> + * if (err)
> + * return err;
> + */
> +int __must_check devm_resource_to_mapped_ptr(struct device *dev,
> + struct resource *res, void __iomem **dest)
I'm not happy with the API. I understand trying to avoid losing the
error code, but passing back the value in a passed in pointer is
rather horrible to use (as I discovered with the
of_property_read_u32() patches) and it becomes too easy to improperly
use it.
I'd argue that the users of this probably really won't care about the
actual error code. If this function fails, then things are rather
horribly wrong, and it would be entirely appropriate to do rely on the
dev_err() to inform the user of the actual error code.
So, just return the mapped (void __iomem *) value after requesting and
mapping the region, and make exceptional situations exceptional. :-)
Otherwise, I'm quite happy to see this helper. Good work!
g.
> +{
> + resource_size_t size;
> + const char *name;
> +
> + BUG_ON(!dev || !dest);
> +
> + *dest = NULL;
> +
> + if (!res || resource_type(res) != IORESOURCE_MEM) {
> + dev_err(dev, "invalid resource\n");
> + return -ENOENT;
> + }
> +
> + size = resource_size(res);
> + name = res->name ?: dev_name(dev);
> +
> + if (!devm_request_mem_region(dev, res->start, size, name)) {
> + dev_err(dev, "can't request region for resource %pR\n", res);
> + return -EBUSY;
> + }
> +
> + if (res->flags & IORESOURCE_CACHEABLE)
> + *dest = devm_ioremap(dev, res->start, size);
> + else
> + *dest = devm_ioremap_nocache(dev, res->start, size);
> +
> + if (!*dest) {
> + dev_err(dev, "ioremap failed for resource %pR\n", res);
> + return -ENOMEM;
> + }
> +
> + return 0;
> +}
> +EXPORT_SYMBOL(devm_resource_to_mapped_ptr);
> +
> #ifdef CONFIG_HAS_IOPORT
> /*
> * Generic iomap devres
> --
> 1.7.6.3
>
^ permalink raw reply
* Re: [PATCH] staging:iio:events: Make sure userspace buffer is large enough
From: Jonathan Cameron @ 2011-10-24 11:55 UTC (permalink / raw)
To: Lars-Peter Clausen
Cc: Michael Hennerich, linux-iio, device-drivers-devel, drivers
In-Reply-To: <1319457163-15889-1-git-send-email-lars@metafoo.de>
On 10/24/11 12:52, Lars-Peter Clausen wrote:
> Make sure that the userspace buffer is large enough to hold a iio_event_data
> struct before writing to it.
>
Good catch. Shall I tack this on the end of the two fixes sets I sent earlier?
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
> ---
> drivers/staging/iio/industrialio-core.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
> index 74904f1..733e83a 100644
> --- a/drivers/staging/iio/industrialio-core.c
> +++ b/drivers/staging/iio/industrialio-core.c
> @@ -169,8 +169,11 @@ static ssize_t iio_event_chrdev_read(struct file *filep,
> {
> struct iio_event_interface *ev_int = filep->private_data;
> struct iio_detected_event_list *el;
> + size_t len = sizeof(el->ev);
> int ret;
> - size_t len;
> +
> + if (count < len)
> + return -EINVAL;
>
> mutex_lock(&ev_int->event_list_lock);
> if (list_empty(&ev_int->det_events)) {
> @@ -192,7 +195,6 @@ static ssize_t iio_event_chrdev_read(struct file *filep,
> el = list_first_entry(&ev_int->det_events,
> struct iio_detected_event_list,
> list);
> - len = sizeof el->ev;
> if (copy_to_user(buf, &(el->ev), len)) {
> ret = -EFAULT;
> goto error_mutex_unlock;
^ permalink raw reply
* Re: [PATCH] sparse, llvm: Fix 'void *' pointer code generation
From: Linus Torvalds @ 2011-10-24 11:52 UTC (permalink / raw)
To: Pekka Enberg; +Cc: linux-sparse, Christopher Li, Jeff Garzik
In-Reply-To: <1319456619-11546-1-git-send-email-penberg@kernel.org>
On Mon, Oct 24, 2011 at 1:43 PM, Pekka Enberg <penberg@kernel.org> wrote:
>
> Fix the issue by switching to LLVMIntType(bits_per_pointer) in
> sym_basetype_type().
Why bits_per_pointer? Isn't this the "base type" of void *? A more
logical choice would seem to be to make it equivalent to "char *", and
just make it fall through to the "case 8" case?
Linus
^ permalink raw reply
* [U-Boot] ====Attn: business assistance is needed in Asia very urgent====
From: TINA SAMSON @ 2011-10-24 11:52 UTC (permalink / raw)
To: u-boot
--
Firstly,i will like to introduce my self to you.I am Mrs.Tina Samson,I'm
from United Kingdom (England). I'm current working as the procurement
manager to OAK VET LTD, I need the correspondence of a reliable Business
partner. A trust worthy person that can handle business for me in Asia.
Your urgent responds is of great kind.
Regards
Mrs.Tina Samson
^ permalink raw reply
* [PATCH] staging:iio:events: Make sure userspace buffer is large enough
From: Lars-Peter Clausen @ 2011-10-24 11:52 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Michael Hennerich, linux-iio, device-drivers-devel, drivers,
Lars-Peter Clausen
Make sure that the userspace buffer is large enough to hold a iio_event_data
struct before writing to it.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/staging/iio/industrialio-core.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/iio/industrialio-core.c b/drivers/staging/iio/industrialio-core.c
index 74904f1..733e83a 100644
--- a/drivers/staging/iio/industrialio-core.c
+++ b/drivers/staging/iio/industrialio-core.c
@@ -169,8 +169,11 @@ static ssize_t iio_event_chrdev_read(struct file *filep,
{
struct iio_event_interface *ev_int = filep->private_data;
struct iio_detected_event_list *el;
+ size_t len = sizeof(el->ev);
int ret;
- size_t len;
+
+ if (count < len)
+ return -EINVAL;
mutex_lock(&ev_int->event_list_lock);
if (list_empty(&ev_int->det_events)) {
@@ -192,7 +195,6 @@ static ssize_t iio_event_chrdev_read(struct file *filep,
el = list_first_entry(&ev_int->det_events,
struct iio_detected_event_list,
list);
- len = sizeof el->ev;
if (copy_to_user(buf, &(el->ev), len)) {
ret = -EFAULT;
goto error_mutex_unlock;
--
1.7.7
^ permalink raw reply related
* [U-Boot] [RFC] [PATCH 00/39] Rework of the debug() macro
From: Detlev Zundel @ 2011-10-24 11:52 UTC (permalink / raw)
To: u-boot
In-Reply-To: <201110241216.43763.marek.vasut@gmail.com>
Hi Marek,
[...]
> I certainly see your point. Btw. do you feel like help reviewing the PPC portion
> of the patches? That'd be greatly appreciated as I'm not a PPC expert. I wanted
> to avoid resubmission, so I only pushed the new set to git://git.denx.de/u-boot-
> marex.git / debug branch. There is over 50 patches now.
I fear that we have the possibility to loose efforts in communicating
our distrubuted efforts here. If want to ack only a subset of the
patches only available on a git tree, I don't know how to give my
"Acked-By" through the patchwork magic and _not_ add even more work on
your shoulders. On the other hand, the majority of fixes are printf
fixes, so if the compiler does not complain on a MAKEALL any more, I
don't see what other aspect I can evaluate on a "dry review".
Effectively I was hoping that your large patch set stabilizes and
produces no more warnings on a MAKEALL - in this case you have my
Acked-by: Detlev Zundel <dzu@denx.de>
Let me know if you have any better ideas...
Cheers
Detlev
--
Referee's report: This paper contains much that is new and much that
is true. Unfortunately, that which is true is not new and that which
is new is not true.
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de
^ permalink raw reply
* Re: Kernel BUG unable to handle kernel NULL pointer dereference
From: David Sterba @ 2011-10-24 11:51 UTC (permalink / raw)
To: Leonidas Spyropoulos; +Cc: dsterba, Mitch Harder, linux-btrfs
In-Reply-To: <CAAeznTpSsKSMe7udHH1kZmFNg6ROf4czxriNpPh_Trb_PHbtzg@mail.gmail.com>
On Mon, Oct 24, 2011 at 12:33:05PM +0100, Leonidas Spyropoulos wrote:
> Here is it, it's big and contains usless information..
>
> http://paste.pocoo.org/show/497299/
not all that useless ... I saw another BUG earlier than the one you've
reported:
[31653.267742] ------------[ cut here ]------------
[31653.267764] kernel BUG at fs/btrfs/extent-tree.c:5510!
[31653.267773] invalid opcode: 0000 [#1] PREEMPT SMP
[31653.267785] CPU 1
[31653.267790] Modules linked in: vboxdrv ipv6 loop fuse adt7475 hwmon_vid nouveau evdev uvcvideo hid_apple ttm videodev drm_kms_helper media v4l2_compat_ioctl32 drm snd_emu10k1 i2c_algo_bit mxm_wmi wmi pcspkr snd_rawmidi snd_seq_device firewire_ohci emu10k1_gp edac_core psmouse snd_util_mem edac_mce_amd k8temp firewire_core gameport snd_hwdep video serio_raw crc_itu_t sg snd_intel8x0 snd_ac97_codec usbhid ac97_bus snd_pcm snd_timer hid snd floppy i2c_nforce2 thermal processor fan button soundcore i2c_core snd_page_alloc forcedeth btrfs zlib_deflate crc32c libcrc32c ext4 jbd2 crc16 ext3 jbd mbcache ohci_hcd ehci_hcd usbcore sr_mod sd_mod cdrom sata_nv pata_amd libata scsi_mod
[31653.267989]
[31653.267995] Pid: 726, comm: btrfs-transacti Not tainted 3.0-ARCH #1 /LP UT NF4 Expert
[31653.268011] RIP: 0010:[<ffffffffa01a6263>] [<ffffffffa01a6263>] run_clustered_refs+0x813/0x830 [btrfs]
[31653.268045] RSP: 0018:ffff88013469bc70 EFLAGS: 00010286
[31653.268286] RAX: 00000000ffffffe4 RBX: ffff88012e406900 RCX: ffff8801378a6100
[31653.268296] RDX: ffff88011513a0f0 RSI: 0000000000000000 RDI: 0000000000000000
[31653.268306] RBP: ffff88013469bd50 R08: ffffffffffffffff R09: 0000000000000000
[31653.268315] R10: ffff8801346f9800 R11: ffff88013735d3f0 R12: ffff8800a9bc7f00
[31653.268325] R13: ffff88007b1d7e40 R14: ffff88011bd1e4b0 R15: 0000000000000000
[31653.268341] FS: 00007f8dcc527880(0000) GS:ffff88013fd00000(0000) knlGS:00000000f67567f0
[31653.268367] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[31653.268380] CR2: 00007f9059631550 CR3: 00000000a499c000 CR4: 00000000000006e0
[31653.268394] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[31653.268409] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[31653.268424] Process btrfs-transacti (pid: 726, threadinfo ffff88013469a000, task ffff880136c140b0)
[31653.268443] Stack:
[31653.268449] 0000000000000000 0000000000000000 ffff880100000001 0000000000000000
[31653.268473] 0000000000000c2e 00000000a01dc529 0000000000000000 0000000000000002
[31653.268495] 0000000000000b9f 0000000000000c04 0000000000000000 ffff88013469bd90
[31653.268515] Call Trace:
[31653.268531] [<ffffffffa01a6348>] btrfs_run_delayed_refs+0xc8/0x220 [btrfs]
[31653.268549] [<ffffffffa019421a>] ? btrfs_free_path+0x2a/0x40 [btrfs]
[31653.268568] [<ffffffffa01b86c3>] btrfs_commit_transaction+0x3c3/0x8a0 [btrfs]
[31653.268581] [<ffffffff8107f790>] ? abort_exclusive_wait+0xb0/0xb0
[31653.268598] [<ffffffffa01b13ed>] transaction_kthread+0x26d/0x290 [btrfs]
[31653.268617] [<ffffffffa01b1180>] ? btrfs_congested_fn+0xd0/0xd0 [btrfs]
[31653.268627] [<ffffffff8107ee3c>] kthread+0x8c/0xa0
[31653.268638] [<ffffffff813f5d64>] kernel_thread_helper+0x4/0x10
[31653.268647] [<ffffffff8107edb0>] ? kthread_worker_fn+0x190/0x190
[31653.268657] [<ffffffff813f5d60>] ? gs_change+0x13/0x13
[31653.268673] Code: e0 e9 12 f9 ff ff 0f 0b 80 fa b2 0f 84 bc f9 ff ff 0f 0b be 95 00 00 00 48 c7 c7 37 d0 20 a0 e8 54 65 eb e0 e9 04 f9 ff ff 0f 0b <0f> 0b 0f 0b 0f 0b 0f 0b 0f 0b 0f 0b 0f 0b 66 66 66 66 66 66 2e
[31653.268928] RIP [<ffffffffa01a6263>] run_clustered_refs+0x813/0x830 [btrfs]
[31653.268956] RSP <ffff88013469bc70>
[31653.284196] ---[ end trace d5d8ee7634d1c36e ]---
and it looks related to the print_leaf bug later (eg. mentiones same functions
in the stacktrace and happens during commit).
And judging from the rest of BUG's in the paste, the filesystem is in a bad
shape. Some BUG_ON's seem to be triggered by ENOSPC (RAX containing 0xfff..e4).
david
^ 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.