All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH 2/2] ACPICA: support Generic Address Structure bit_offset in acpi_read/write
From: Luck, Tony @ 2011-12-01  1:03 UTC (permalink / raw)
  To: Huang, Ying
  Cc: Rafael J. Wysocki, Russell King, Bjorn Helgaas, Thomas Renninger,
	Len Brown, Moore, Robert, linux-acpi@vger.kernel.org,
	bondd@us.ibm.com, Myron Stowe
In-Reply-To: <1322701065.4849.69.camel@yhuang-dev>

> In the original acpi_read/write, we just call ioremap blindly, so the
> code in the below patch will not introduce new issue for ia64.  Do you
> agree?

See arch/ia64/mm/ioremap.c ... ioremap() on ia64 is smart and looks
at attributes and makes new mapping match existing ones

That doesn't deal with long-lived mappings and changes that I just
mentioned in last e-mail - but it does mean that callers of ioremap()
don't need to worry ... they can call "blindly".

-Tony

^ permalink raw reply

* linux-next: build failure after merge of the v9fs tree
From: Stephen Rothwell @ 2011-12-01  1:02 UTC (permalink / raw)
  To: Eric Van Hensbergen; +Cc: linux-next, linux-kernel, Joe Perches

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

Hi Eric,

After merging the v9fs tree, today's linux-next build (x86_64
allmodconfig) failed like this:

ERROR: "_p9_debug" [net/9p/9pnet_virtio.ko] undefined!
ERROR: "_p9_debug" [net/9p/9pnet_rdma.ko] undefined!
ERROR: "_p9_debug" [net/9p/9pnet.ko] undefined!

Caused by commit be9e4aa9e783 ("9p: Reduce object size with
CONFIG_NET_9P_DEBUG").

I have used the v9fs tree from next-20111130 for today.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [patch 3/6] sched, nohz: sched group, domain aware nohz idle load balancing
From: Suresh Siddha @ 2011-12-01  1:03 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Ingo Molnar, Venki Pallipadi, Srivatsa Vaddagiri, Mike Galbraith,
	linux-kernel, Tim Chen, Shi, Alex
In-Reply-To: <1322559859.2921.190.camel@twins>

On Tue, 2011-11-29 at 01:44 -0800, Peter Zijlstra wrote:
> On Mon, 2011-11-28 at 15:51 -0800, Suresh Siddha wrote:
> > On Thu, 2011-11-24 at 03:47 -0800, Peter Zijlstra wrote:
> > > On Fri, 2011-11-18 at 15:03 -0800, Suresh Siddha wrote:
> > > > +       for_each_domain(cpu, sd) {
> > > > +               struct sched_group *sg = sd->groups;
> > > > +               struct sched_group_power *sgp = sg->sgp;
> > > > +               int nr_busy = atomic_read(&sgp->nr_busy_cpus);
> > > > +
> > > > +               if (nr_busy > 1 && (nr_busy * SCHED_LOAD_SCALE > sgp->power))
> > > > +                       goto need_kick;
> > > 
> > > This looks wrong, its basically always true for a box with HT.
> > 
> > In the presence of two busy HT siblings, we need to do the idle load
> > balance to figure out if the load from the busy core can be migrated to
> > any other idle core/sibling in the platform. And at this point, we
> > already know there are idle cpu's in the platform.
> 
> might have to, this nr_busy doesn't mean its actually busy, just that
> its not nohz, it might very well be idle.

correct. But we can change that.

We can track nr_busy_cpus separately and can be updated when ever the rq
goes into idle and during the first busy tick after idle. Whereas the
nohz.idle_cpus_mask can be updated only during tickless entry.

> > I will modify the above check to:
> > 
> > if (sd->flags & SD_SHARE_PKG_RESOURCES && nr_busy > 1)
> > 	goto need_kick;
> > 
> > This way, if there is a SMT/MC domain with more than one busy cpu in the
> > group, then we will request for the idle load balancing.
> 
> Potentially 1 more than 1 busy, right? And we do the balancing just in
> case there are indeed busy cpus.
> 
> I think its useful to mention that somewhere near, that this nr_busy
> measure we use is an upper bound on actual busy.

The above should cover this.

I will send the updated version shortly.

thanks,
suresh


^ permalink raw reply

* Re: nat drop the icmp redirect packet
From: Gao feng @ 2011-12-01  0:59 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel, pablo
In-Reply-To: <4ED67BB1.8020808@trash.net>

于 2011年12月01日 02:53, Patrick McHardy 写道:
> On 11/28/2011 02:12 AM, Gao feng wrote:
>> Hi
>>
>> In func nf_nat_icmp_reply_translation,the icmp packet will be droped when the nat is not finished.
>> pc A(whose gateway is C) send a icmp request to pc B.
>> When gw C receive this packet,it may return a icmp redirect packet to A.
>> BUT now,the icmp request packet has not go to POSTROUTING,So the nat is not finished.
>> Finally,the icmp redirect packet will be droped no matter the conn has nat or not.
>>
>> of course,the icmp redirect packet will be correct handled when nat is finished.
>>
>> Can somebody will give me some suggestion,
>> or should I just add a sysctl to let the user decide drop or receive this icmp redirect packet when nat is not finished?
> 
> It doesn't matter whether the ICMP packet has gone through
> POST_ROUTING, the conntrack associated with the packet is
> that of the original packet causing the ICMP REDIRECT (or
> any other kind of ICMP error).
> 
> Basically, we don't want hosts talking directly to each other
> *if* NAT has been set up since that would obviously break
> things. In the case you describe (only destination NAT setup
> completed, but null mapping) instead of dropping the packet,
> we could set up a null source mapping and let the packet
> through under the assumption that the hosts will then start
> communicating directly.
> 
> This will break if the host receiving the ICMP REDIRECT ignores
> it though. What is the specific problem you're trying to solve?
> 

Thanks Patrick!

As I said,in my case,the *first* ICMP REDIRECT packet will be dropped even
the system has no nat rules,because this REDIRECT packet is triggered
by the original packet in FORWARD chain(ip_forward),and when this REDIRECT
packet goto POSTROUTING chian(nf_nat_fn->nf_nat_icmp_reply_translation),the
original packet is still in FORWARD chain.So the original packet's conntrack
ONLY has IPS_DST_NAT_DONE.

I understand your mean,we should not let REDIRECT to take effect when this conntrack
has nat rule.

I just want to know is there some idea to avoid the first ICMP_REDIRECT packet being dropped?

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" 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

* [PATCH] IRQ: Validate irq_ack function pointer before calling it
From: Yang, Fei @ 2011-12-01  0:58 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org; +Cc: Alan Cox, Gross, Mark, tglx@linutronix.de

handle_edge_irq doesn't validate function pointer irq_ack
before calling it. We need to check the pointer for NULL or the
drivers have to implement irq_ack even an empty one. I think the
former is better in case driver doesn't really need irq_ack.

Signed-off-by: Fei Yang <fei.yang@intel.com>
Acked-by: Alan Cox <alan@linux.intel.com>
---
kernel/irq/chip.c |    3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index dc5114b..12f9550 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -448,7 +448,8 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
    kstat_incr_irqs_this_cpu(irq, desc);

     /* Start handling the irq */
-    desc->irq_data.chip->irq_ack(&desc->irq_data);
+    if (desc->irq_data.chip->irq_ack)
+          desc->irq_data.chip->irq_ack(&desc->irq_data);

     do {
          if (unlikely(!desc->action)) {
-- 
1.7.0.4


^ permalink raw reply related

* RE: [PATCH 2/2] ACPICA: support Generic Address Structure bit_offset in acpi_read/write
From: Huang Ying @ 2011-12-01  0:57 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Rafael J. Wysocki, Russell King, Bjorn Helgaas, Thomas Renninger,
	Len Brown, Moore, Robert, linux-acpi@vger.kernel.org,
	bondd@us.ibm.com, Myron Stowe
In-Reply-To: <0207C53569FE594381A4F2EB66570B2A018ED45DA7@orsmsx508.amr.corp.intel.com>

On Thu, 2011-12-01 at 08:53 +0800, Luck, Tony wrote:
> > Is it possible to use the page_is_ram() and kamp() path in the patch to avoid the situation you mentioned?
> 
> Maybe - it could certainly check the current attributes and match them.
> 
> Not sure whether there might be a gap if the acpi mapping is long-lived,
> and the other kernel mappings change ... though this is very rare to
> switch attributes

In the original acpi_read/write, we just call ioremap blindly, so the
code in the below patch will not introduce new issue for ia64.  Do you
agree?

https://lkml.org/lkml/2011/11/7/567

Best Regards,
Huang Ying


^ permalink raw reply

* Re: [PATCH 1/4] iommu: Add iommu_device_group callback and iommu_group sysfs entry
From: David Gibson @ 2011-12-01  0:57 UTC (permalink / raw)
  To: Chris Wright
  Cc: Alex Williamson, Benjamin Herrenschmidt, joerg.roedel, dwmw2,
	iommu, linux-kernel, agraf, scottwood, B08248
In-Reply-To: <20111201005220.GG29071@x200.localdomain>

On Wed, Nov 30, 2011 at 04:52:20PM -0800, Chris Wright wrote:
> * David Gibson (dwg@au1.ibm.com) wrote:
> > On Tue, Nov 29, 2011 at 10:25:51PM -0700, Alex Williamson wrote:
> > > On Wed, 2011-11-30 at 15:51 +1100, Benjamin Herrenschmidt wrote:
> > > > On Wed, 2011-11-30 at 13:42 +1100, David Gibson wrote:
> > > > 
> > > > > > +static ssize_t show_iommu_group(struct device *dev,
> > > > > > +				struct device_attribute *attr, char *buf)
> > > > > > +{
> > > > > > +	unsigned int groupid;
> > > > > > +
> > > > > > +	if (iommu_device_group(dev, &groupid))
> > > > > > +		return 0;
> > > > > > +
> > > > > > +	return sprintf(buf, "%u", groupid);
> > > > > > +}
> > > > > > +static DEVICE_ATTR(iommu_group, S_IRUGO, show_iommu_group, NULL);
> > > > > 
> > > > > Hrm.  Assuming the group is is an unsigned int seems dangerous to me.
> > > > > More seriously, we really want these to be unique across the whole
> > > > > system, but they're allocated by the iommu driver which can't
> > > > > guarantee that if it's not the only one present.  Seems to me it would
> > > > > be safer to have an actual iommu_group structure allocated for each
> > > > > group, and use the pointer to it as the ID to hand around (with NULL
> > > > > meaning "no iommu" / untranslated).  The structure could contain a
> > > > > more human readable - or more relevant to platform documentation - ID
> > > > > where appropriate.
> > > 
> > > Note that iommu drivers are registered per bus_type, so the unique pair
> > > is {bus_type, groupid}, which seems sufficient for vfio.
> > 
> > Hrm.  That's.. far from obvious.  And still breaks down if we have two
> > separate iommus on the same bus type (e.g. two independent PCI host
> > bridges with inbuilt IOMMUs).
> 
> Happens to still work for Intel IOMMU on x86 the way Alex wrote the
> Intel VT-d patch in this series, as well as AMD IOMMU.  The caveat for
> AMD IOMMU is that the groupid generation would break (as-is) once
> there's support for multiple PCI segments.  This is not an inherent
> shortcoming of the groupid mechanism though, just a current limitation
> of AMD IOMMU's implementation.  Alex overloaded B:D.F for those which is
> a convenient id since that maps to the device (or in the case of devices
> behind a PCIe-to-PCI bridge, the requestor ID of all devices behind the
> bridge, or "the group").

"Happens to still work" is not exactly a ringing endorsement.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson


^ permalink raw reply

* Re: [HELP] Adding git awareness to the darning patch management system.
From: Peter Williams @ 2011-12-01  0:56 UTC (permalink / raw)
  To: Jeff King; +Cc: git
In-Reply-To: <20111130072248.GG5317@sigill.intra.peff.net>

On 30/11/11 17:22, Jeff King wrote:
> On Wed, Nov 30, 2011 at 12:17:22PM +1000, Peter Williams wrote:
>
>> 1. presenting the file tree of the sources being patched in a way
>> that makes sense to the user including the current status of files
>> from the point of view of the underlying SCM (in this case, git), and
>
> I'm not exactly sure what this means.

If you look at the screenshots at sourceforge (which were produced on 
top of a Mercurial repo) you'll notice that file names in the left most 
tree have letters in front of them and appear in different foreground 
colours.  These letters are the same as those returned by Mercurial's 
status command and, hence, give a Mercurial user an easy to understand 
snapshot of the status of the files in the playground.  The colour 
coding is (relatively) arbitrary (and chosen by me) and is intended to 
make it easier to detect the different file statuses.

My main problem is that I can't find a git file status command (and 
there are a lot of them to choose from) that gives a snapshot of the 
statuses of all files in a directory (including those not tracked or 
ignored).  A secondary problem is that, if I could cobble together 
statuses from various commands, mapping git statuses to the Mercurial 
ones for display would not be a good solution as they would not 
necessarily make sense to a git user.  (It's fairly clear to me from my 
inability to make sense of git's CLI that git users think differently to 
me, a Mercurial user, and it's unlikely that I can, without help, make a 
file tree display that makes sense to a git user.)

>
>> 2. detecting files with uncommitted changes (from the SCM's point of
>> view) when the user adds them to a patch (or pushes a patch that
>> contains them) so that they may be alerted to the fact and offered
>> the choice of absorbing the uncommitted changes into the patch (or
>> not).
>
> For this, you probably want "git diff-files --name-only", which will
> show files with differences in the working tree. Keep in mind that git
> has an "index" or "staging area", which means that you have three states
> of content for a given path:
>
>    1. the state of the prior commit (i.e., HEAD)
>
>    2. the state that is marked to be committed when "git commit" is run
>       (i.e., the index)
>
>    3. the state in the working tree

This is a prime example of the different mindset of the git user to the 
hg user.

>
> You can compare the first two with "git diff-index", and the latter two
> with "git diff-files". You can also use "git status --porcelain" to get
> a machine-readable output that shows how the three states match up, with
> one line per file.

This is an example of why I'm confused.  There are too many ways to do 
(similar) things and it's hard to know which to use.

>
>> I've already implemented this interface for Mercurial (with which I
>> am familiar) and looked at doing the same with git but had difficulty
>> discovering the definitive mechanisms for obtaining the necessary
>> data.  So I'm soliciting your help in overcoming these problems.
>
> I hope the above helps you some. If not, just ask. It might be easier to
> understand what you are looking for if you can give concrete examples.

Maybe an example of why I think the feature is useful might help.  Say 
that you start editing a file and then decide that you want to put this 
change into a patch rather than committing it.  If you were using quilt 
you would have to do this manually by any of a number or ways such as:

$ <git diff command> file > temp.patch
$ <git revert command> file
$ quilt new one.patch
$ quilt add file
$ patch -p1 file < temp.patch
$ rm temp.patch

In darning, you just do:

$ darn new one.patch
$ darn add --absorb file

If you're using the GUI (the primary interface), it will report that the 
file has uncommitted changes and offer the choice of absorbing the 
changes into the new patch, forcing the new patch to consider the 
current file state as its starting point or (of course) cancel the 
addition.  The CLI command will fail if an attempt to add a file which 
has uncommitted changes is made unless either the --absorb or --force 
(which uses the file's current content as the starting point from the 
patches point of view) options are used.  (So, whichever interface is in 
use, you have to explicitly state how you want uncommitted changes to be 
treated.

The interface to the SCM to support this is two functions:

1: get_files_with_uncommitted_changes() which called with no arguments 
returns a list of the paths of all files with uncommitted changes or 
when given a list of file paths (the more common case) returns the 
subset of that list which have uncommitted changes; and

2. copy_clean_version_to(filepath, target_path) which makes a copy of 
the file as recorded in the prior commit and places it at the 
target_path (usually where darning stores the "original" for reference 
when creating diffs).

A similar mechanism is in place for the case where a file is added to a 
patch and the file is in an underlying patch with unrefreshed changes 
but this requires no help from the underlying SCM.

Both of these mechanisms also come into play when a patch is 
pushed/applied so that the user has (relatively painless) control over 
which changes end up in which patch.

With MQ and the above example, the file would be automatically added to 
the current patch (or a new patch if you created one) absorbing the 
changes whether you wanted it to or not.  I.e. there is no way of 
creating MQ patches that don't automatically absorb all uncommitted changes.

Thanks for your reply,
Peter
PS Darning can be used on top of git repository without "git awareness" 
but is not as useful as it would be with it.

^ permalink raw reply

* [PATCH 1/1] trace-cmd: Update to 1.2 (includes kernelshark)
From: Darren Hart @ 2011-12-01  0:48 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1322700459.git.darren@dvhart.com>

From: Darren Hart <dvhart@linux.intel.com>

Update the trace-cmd and kernelshark recipes to version 1.2. Rename the recipes
to the more descriptive trace-cmd_1.2.bb and kernelshark_1.2.bb respectively.

Update addldflags.patch for 1.2 and current Upstream-Status.

Add make-docs-optional.patch to avoid building the new doc target which
requires asciidocs. We should add asciidocs and properly package the
docs, but for now it's more important to get the sources current.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 .../{kernelshark_git.bb => kernelshark_1.2.bb}     |    9 +++--
 .../trace-cmd/trace-cmd/addldflags.patch           |   28 ++++++++++-----
 .../trace-cmd/trace-cmd/make-docs-optional.patch   |   36 ++++++++++++++++++++
 .../{trace-cmd_git.bb => trace-cmd_1.2.bb}         |    9 +++--
 4 files changed, 64 insertions(+), 18 deletions(-)
 rename meta/recipes-kernel/trace-cmd/{kernelshark_git.bb => kernelshark_1.2.bb} (81%)
 create mode 100644 meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch
 rename meta/recipes-kernel/trace-cmd/{trace-cmd_git.bb => trace-cmd_1.2.bb} (76%)

diff --git a/meta/recipes-kernel/trace-cmd/kernelshark_git.bb b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
similarity index 81%
rename from meta/recipes-kernel/trace-cmd/kernelshark_git.bb
rename to meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
index 733bddc..aa070a9 100644
--- a/meta/recipes-kernel/trace-cmd/kernelshark_git.bb
+++ b/meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
@@ -3,9 +3,9 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                     file://kernel-shark.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e"
 
-SRCREV = "6c696cec3f264a9399241b6e648f58bc97117d49"
-PR = r1
-PV = "1.0.5+git${SRCPV}"
+SRCREV = "7055ffd37beeb44714e86a4abc703f7e175a0db5"
+PR = "r0"
+PV = "1.2+git${SRCPV}"
 
 DEPENDS = "gtk+"
 RDEPENDS_${PN} = "trace-cmd"
@@ -13,7 +13,8 @@ RDEPENDS_${PN} = "trace-cmd"
 inherit pkgconfig
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git \
-           file://addldflags.patch"
+           file://addldflags.patch \
+           file://make-docs-optional.patch"
 S = "${WORKDIR}/git"
 
 EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui"
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch
index 8e8f578..68a5ed4 100644
--- a/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd/addldflags.patch
@@ -1,29 +1,37 @@
-Upstream-Status: Pending
+trace-cmd: Cross-compile fixes for LDFLAGS and include path
 
 Add ability for the Makefile to respect LDFLAGS.
-
 Also remove hardcoded /usr/local/include include path.
 
-RP 7/5/2011
+Upstream-Status: Submitted [LKML]
+
+Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+
+---
+ Makefile |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
 
 Index: git/Makefile
 ===================================================================
---- git.orig/Makefile	2011-07-05 11:58:11.699910550 +0100
-+++ git/Makefile	2011-07-05 23:30:12.319920617 +0100
-@@ -189,10 +189,11 @@
+--- git.orig/Makefile
++++ git/Makefile
+@@ -202,12 +202,13 @@ export Q VERBOSE
  TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION)
  KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION)
  
 -INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES)
 +INCLUDES = -I. $(CONFIG_INCLUDES)
  
+ include features.mk
+ 
  # Set compile option CFLAGS if not set elsewhere
  CFLAGS ?= -g -Wall
 +LDFLAGS ?=
  
- # Append required CFLAGS
- override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ)
-@@ -225,7 +226,7 @@
+ ifndef NO_PTRACE
+ ifneq ($(call try-cc,$(SOURCE_PTRACE),),y)
+@@ -251,7 +252,7 @@ do_fpic_compile =					\
  
  do_app_build =						\
  	($(print_app_build)				\
@@ -32,7 +40,7 @@ Index: git/Makefile
  
  do_compile_shared_library =			\
  	($(print_shared_lib_compile)		\
-@@ -237,7 +238,7 @@
+@@ -263,7 +264,7 @@ do_compile_plugin_obj =				\
  
  do_plugin_build =				\
  	($(print_plugin_build)			\
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch
new file mode 100644
index 0000000..8402426
--- /dev/null
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch
@@ -0,0 +1,36 @@
+Disable building docs until we have asciidocs available as a recipe.
+
+Upstream-Status: Inappropriate [Account for missing dependency, the lazy way]
+
+Signed-off-by: Darren Hart <dvhart@linux.intel.com>
+
+---
+ Makefile |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+Index: git/Makefile
+===================================================================
+--- git.orig/Makefile
++++ git/Makefile
+@@ -327,7 +327,9 @@ TARGETS = $(CMD_TARGETS) $(GUI_TARGETS)
+ #    If you want kernelshark, then do:  make gui
+ ###
+ 
+-all: all_cmd doc show_gui_make
++# Make doc optional
++#all: all_cmd doc show_gui_make
++all: all_cmd show_gui_make
+ 
+ all_cmd: $(CMD_TARGETS)
+ 
+@@ -503,7 +505,9 @@ install_python: $(PYTHON_SO_INSTALL) $(P
+ install_cmd: all_cmd install_plugins install_python
+ 	$(Q)$(call do_install,trace-cmd,$(bindir_SQ))
+ 
+-install: install_cmd install_doc
++# Make doc optional
++#install: install_cmd install_doc
++install: install_cmd
+ 	@echo "Note: to install the gui, type \"make install_gui\""
+ 
+ install_gui: install_cmd gui
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb b/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb
similarity index 76%
rename from meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
rename to meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb
index 1278dc7..1b9231b 100644
--- a/meta/recipes-kernel/trace-cmd/trace-cmd_git.bb
+++ b/meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb
@@ -3,14 +3,15 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                     file://trace-cmd.c;beginline=6;endline=8;md5=2c22c965a649ddd7973d7913c5634a5e"
 
-SRCREV = "6c696cec3f264a9399241b6e648f58bc97117d49"
-PR = "r2"
-PV = "1.0.5+git${SRCPV}"
+SRCREV = "7055ffd37beeb44714e86a4abc703f7e175a0db5"
+PR = "r0"
+PV = "1.2+git${SRCPV}"
 
 inherit pkgconfig
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git;protocol=git \
-           file://addldflags.patch"
+           file://addldflags.patch \
+           file://make-docs-optional.patch"
 S = "${WORKDIR}/git"
 
 EXTRA_OEMAKE = "'prefix=${prefix}'"
-- 
1.7.6.4




^ permalink raw reply related

* [PATCH 0/1] trace-cmd: Update to version 1.2
From: Darren Hart @ 2011-12-01  0:48 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit f4efaa0f472b4bf0ba0a0297cc9ecc8b5a671f72:

  squashfs-tools: fix PR, those should start with 'r' (2011-11-30 23:37:40 +0000)

are available in the git repository at:
  git://git.yoctoproject.org/user-contrib/dvhart/oe-core updates
  http://git.yoctoproject.org/cgit.cgi/user-contrib/dvhart/oe-core/log/?h=updates

Darren Hart (1):
  trace-cmd: Update to 1.2 (includes kernelshark)

 .../{kernelshark_git.bb => kernelshark_1.2.bb}     |    9 +++--
 .../trace-cmd/trace-cmd/addldflags.patch           |   28 ++++++++++-----
 .../trace-cmd/trace-cmd/make-docs-optional.patch   |   36 ++++++++++++++++++++
 .../{trace-cmd_git.bb => trace-cmd_1.2.bb}         |    9 +++--
 4 files changed, 64 insertions(+), 18 deletions(-)
 rename meta/recipes-kernel/trace-cmd/{kernelshark_git.bb => kernelshark_1.2.bb} (81%)
 create mode 100644 meta/recipes-kernel/trace-cmd/trace-cmd/make-docs-optional.patch
 rename meta/recipes-kernel/trace-cmd/{trace-cmd_git.bb => trace-cmd_1.2.bb} (76%)

-- 
1.7.6.4




^ permalink raw reply

* Re: [RGC PATCH 0/2] split file2alias using elf sections
From: Alessandro Rubini @ 2011-12-01  0:53 UTC (permalink / raw)
  To: rusty; +Cc: greg, linux-kernel, siglesia, manohar.vanga
In-Reply-To: <87k46itcvg.fsf@rustcorp.com.au>

Hello Rusty, thankyou for your feedback.
I plan to make V2 tomorrow (it was planned much earlier).

> The table driven loop is nice and simple, though the E() macro is a bit
> contrived.

Yes, but we have long names and I wanted to avoid splitting lines.
I can make it ENTRY().
 
> The separation into separate files just to avoid merge issues is
> overkill and useless churn.  The conflicts are simple, and you've just
> moved themto conflicts in the Makefile.

Yes and no. Actually, I expect several new buses to appear over time,
and being separate files they can even be conditionally compiled based
on config. 

> We'd be better off putting the table in alphabetical order and stopping
> there.  Easy code, no tricks.

I see. I'm submitting two patches anyways, but you can pick one only.

Thanks
/alessandro

^ permalink raw reply

* RE: [PATCH 2/2] ACPICA: support Generic Address Structure bit_offset in acpi_read/write
From: Luck, Tony @ 2011-12-01  0:53 UTC (permalink / raw)
  To: Huang, Ying
  Cc: Rafael J. Wysocki, Russell King, Bjorn Helgaas, Thomas Renninger,
	Len Brown, Moore, Robert, linux-acpi@vger.kernel.org,
	bondd@us.ibm.com, Myron Stowe
In-Reply-To: <1322700551.4849.66.camel@yhuang-dev>

> Is it possible to use the page_is_ram() and kamp() path in the patch to avoid the situation you mentioned?

Maybe - it could certainly check the current attributes and match them.

Not sure whether there might be a gap if the acpi mapping is long-lived,
and the other kernel mappings change ... though this is very rare to
switch attributes

-Tony

^ permalink raw reply

* Re: [PATCH 1/4] iommu: Add iommu_device_group callback and iommu_group sysfs entry
From: Chris Wright @ 2011-12-01  0:52 UTC (permalink / raw)
  To: David Gibson, Alex Williamson, Benjamin Herrenschmidt,
	joerg.roedel, dwmw2, iommu, linux-kernel, chrisw, agraf,
	scottwood, B08248
In-Reply-To: <20111201000337.GA5427@truffala.fritz.box>

* David Gibson (dwg@au1.ibm.com) wrote:
> On Tue, Nov 29, 2011 at 10:25:51PM -0700, Alex Williamson wrote:
> > On Wed, 2011-11-30 at 15:51 +1100, Benjamin Herrenschmidt wrote:
> > > On Wed, 2011-11-30 at 13:42 +1100, David Gibson wrote:
> > > 
> > > > > +static ssize_t show_iommu_group(struct device *dev,
> > > > > +				struct device_attribute *attr, char *buf)
> > > > > +{
> > > > > +	unsigned int groupid;
> > > > > +
> > > > > +	if (iommu_device_group(dev, &groupid))
> > > > > +		return 0;
> > > > > +
> > > > > +	return sprintf(buf, "%u", groupid);
> > > > > +}
> > > > > +static DEVICE_ATTR(iommu_group, S_IRUGO, show_iommu_group, NULL);
> > > > 
> > > > Hrm.  Assuming the group is is an unsigned int seems dangerous to me.
> > > > More seriously, we really want these to be unique across the whole
> > > > system, but they're allocated by the iommu driver which can't
> > > > guarantee that if it's not the only one present.  Seems to me it would
> > > > be safer to have an actual iommu_group structure allocated for each
> > > > group, and use the pointer to it as the ID to hand around (with NULL
> > > > meaning "no iommu" / untranslated).  The structure could contain a
> > > > more human readable - or more relevant to platform documentation - ID
> > > > where appropriate.
> > 
> > Note that iommu drivers are registered per bus_type, so the unique pair
> > is {bus_type, groupid}, which seems sufficient for vfio.
> 
> Hrm.  That's.. far from obvious.  And still breaks down if we have two
> separate iommus on the same bus type (e.g. two independent PCI host
> bridges with inbuilt IOMMUs).

Happens to still work for Intel IOMMU on x86 the way Alex wrote the
Intel VT-d patch in this series, as well as AMD IOMMU.  The caveat for
AMD IOMMU is that the groupid generation would break (as-is) once
there's support for multiple PCI segments.  This is not an inherent
shortcoming of the groupid mechanism though, just a current limitation
of AMD IOMMU's implementation.  Alex overloaded B:D.F for those which is
a convenient id since that maps to the device (or in the case of devices
behind a PCIe-to-PCI bridge, the requestor ID of all devices behind the
bridge, or "the group").

thanks,
-chris

^ permalink raw reply

* Re: [v4 PATCH 1/2] NETFILTER module xt_hmark, new target for HASH based fwmark
From: Hans Schillstrom @ 2011-12-01  0:52 UTC (permalink / raw)
  To: Pablo Neira Ayuso
  Cc: Patrick McHardy, jengelh, netfilter-devel, netdev,
	hans.schillstrom
In-Reply-To: <20111130182815.GC20336@1984>


On Wednesday, November 30, 2011 19:28:15 Pablo Neira Ayuso wrote:
> On Wed, Nov 30, 2011 at 04:27:26PM +0100, Patrick McHardy wrote:
> > On 11/28/2011 10:36 AM, Hans Schillstrom wrote:
> > >>If you don't want to use conntrack in your setup and you want to handle
> > >>fragments, then you have to configure HMARK to calculate the hashing
> > >>based on the network addresses. If you want to fully support fragments,
> > >>then enable conntrack and you can configure HMARK to calculate the
> > >>hashing based on network address + transport bits.
> > >>
> > >>Fix this by removing the fragmentation handling, then assume that
> > >>people can select between two hashing configuration for HMARK. One
> > >>based for network address which is fragment-safe, one that uses the
> > >>transport layer information, that requires conntrack. Otherwise, I
> > >>don't see a sane way to handle this situation.
> > >Correct me if I'm wrong here,
> > >If conntrack is enabled hmark don't see the packet until it is reassembled and
> > >in that case the fragmentation header is removed.
> > >
> > >So, with conntrack HMARK will operate on full packets not fragments
> > >without conntrack ports will not be used on any fragment
> > 
> > Correct.
> 
> To complete what Patrick said. They are collected but not linearized.
> That's why you have to use skb_header_pointer.
OK, thanks
I'll will do that.

> 
> > You don't necessarily need conntrack for defragmentation though,
> > we've moved defragmentation to a seperate module for TPROXY. You
> > can depend on that and get defragmentation without full
> > connection tracking.
> 
> Indeed, I missed this. That way you can skip conntrack but solving the
> broken fragments handling.

In a cluster with inputs on many different blades (with a Virtual IP address) you can
receive the fragments on different blades and in that case there should not be any
defrag in that node. HMARK will just produce the same fw-mark for all fragments.

In our case defrag will happens in next hop i.e. before going into IPVS.

As mention earlier, this needs to be documented better.
I will add this to the man page.

Thanks
Hans

^ permalink raw reply

* RE: [PATCH 2/2] ACPICA: support Generic Address Structure bit_offset in acpi_read/write
From: Huang Ying @ 2011-12-01  0:49 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Rafael J. Wysocki, Russell King, Bjorn Helgaas, Thomas Renninger,
	Len Brown, Moore, Robert, linux-acpi@vger.kernel.org,
	bondd@us.ibm.com, Myron Stowe
In-Reply-To: <0207C53569FE594381A4F2EB66570B2A018ED45AA8@orsmsx508.amr.corp.intel.com>

On Thu, 2011-12-01 at 05:54 +0800, Luck, Tony wrote:
> > But as this code may be used in general acpi_read/write path too in the
> > future, can you verify whether it is harmless on ia64?
> 
> This might be a problem on ia64 - it is s/w responsibility to make sure
> that we don't map the same underlying physical address using different
> cache attributes - e.g. we must not map memory both cacheable and uncacheable
> at the same time.  Accessing such a mis-attributed page will result in a
> machine check.
> 
> So I'd worry that if the memory in question was being used as uncacheable,
> this code might result in a cached access, which would crash the machine.

+static void __iomem *acpi_map(phys_addr_t pg_off, unsigned long pg_sz)
+{
+	unsigned long pfn;
+
+	pfn = pg_off >> PAGE_SHIFT;
+	if (page_is_ram(pfn)) {
+		if (pg_sz > PAGE_SIZE)
+			return NULL;
+		return (void __iomem __force *)kmap(pfn_to_page(pfn));
+	} else
+		return ioremap(pg_off, pg_sz);
+}

Is it possible to use the page_is_ram() and kamp() path in the patch to avoid the situation you mentioned?

Best Regards,
Huang Ying



^ permalink raw reply

* [PATCH] ASoC: Add device tree binding for WM8903
From: Stephen Warren @ 2011-12-01  0:47 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Rob Herring, alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ, John Bonesio,
	Grant Likely, Stephen Warren

From: John Bonesio <bones-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>

This patch makes it so the wm8903 is initialized from it's device tree node.

v2: (swarren) Significantly reworked based on review feedback.
v1: (swarren) Applied the following modifications relative to John's code:
* Cleaned up DT parsing code
* Documented DT binding
* Set up wm8903->gpio_chip.of_node, extracted from another patch by John.

Signed-off-by: John Bonesio <bones-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Signed-off-by: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 Documentation/devicetree/bindings/sound/wm8903.txt |   44 ++++++++
 sound/soc/codecs/wm8903.c                          |  113 ++++++++++++++++----
 2 files changed, 136 insertions(+), 21 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/wm8903.txt

diff --git a/Documentation/devicetree/bindings/sound/wm8903.txt b/Documentation/devicetree/bindings/sound/wm8903.txt
new file mode 100644
index 0000000..ef3332a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/wm8903.txt
@@ -0,0 +1,44 @@
+WM89033 audio CODEC
+
+This device supports I2C only.
+
+Required properties:
+
+  - compatible : "wlf,wm8903"
+
+  - reg : the I2C address of the device.
+
+  - gpio-controller : Indicates this device is a GPIO controller.
+
+  - #gpio-cells : Should be two. The first cell is the pin number and the
+    second cell is used to specify optional parameters (currently unused).
+
+Optional properties:
+
+  - interrupts : The interrupt line the codec is connected to.
+
+  - micdet-cfg : Default register value for R6 (Mic Bias). If absent, the
+    default is 0.
+
+  - micdet-delay : The debounce delay for microphone detection in mS. If
+    absent, the default is 100.
+
+  - gpio-cfg : A list of GPIO pin mux register values. The list must be 5
+    entries long. If absent, no configuration of these registers is
+    performed. If any entry has the value 0xffffffff, that GPIO's
+    configuration will not be modified.
+
+Example:
+
+codec: wm8903@1a {
+	compatible = "wlf,wm8903";
+	reg = <0x1a>;
+	interrupts = < 347 >;
+
+	gpio-controller;
+	#gpio-cells = <2>;
+
+	micdet-cfg = <0>;
+	micdet-delay = <100>;
+	gpio-cfg = < 0xffffffff 0xffffffff 0 0xffffffff 0xffffffff >;
+};
diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c
index 70a2268..6e380b3 100644
--- a/sound/soc/codecs/wm8903.c
+++ b/sound/soc/codecs/wm8903.c
@@ -24,6 +24,7 @@
 #include <linux/pm.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
+#include <linux/irq.h>
 #include <sound/core.h>
 #include <sound/jack.h>
 #include <sound/pcm.h>
@@ -1863,20 +1864,20 @@ static struct gpio_chip wm8903_template_chip = {
 	.can_sleep		= 1,
 };
 
-static void wm8903_init_gpio(struct snd_soc_codec *codec)
+static void wm8903_init_gpio(struct snd_soc_codec *codec,
+			     int gpio_base)
 {
 	struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec);
-	struct wm8903_platform_data *pdata = dev_get_platdata(codec->dev);
 	int ret;
 
 	wm8903->gpio_chip = wm8903_template_chip;
 	wm8903->gpio_chip.ngpio = WM8903_NUM_GPIO;
 	wm8903->gpio_chip.dev = codec->dev;
+	wm8903->gpio_chip.base = gpio_base;
 
-	if (pdata && pdata->gpio_base)
-		wm8903->gpio_chip.base = pdata->gpio_base;
-	else
-		wm8903->gpio_chip.base = -1;
+#ifdef CONFIG_OF_GPIO
+	wm8903->gpio_chip.of_node = codec->dev->of_node;
+#endif
 
 	ret = gpiochip_add(&wm8903->gpio_chip);
 	if (ret != 0)
@@ -1893,7 +1894,7 @@ static void wm8903_free_gpio(struct snd_soc_codec *codec)
 		dev_err(codec->dev, "Failed to remove GPIOs: %d\n", ret);
 }
 #else
-static void wm8903_init_gpio(struct snd_soc_codec *codec)
+static void wm8903_init_gpio(struct snd_soc_codec *codec, int gpio_base)
 {
 }
 
@@ -1909,6 +1910,16 @@ static int wm8903_probe(struct snd_soc_codec *codec)
 	int ret, i;
 	int trigger, irq_pol;
 	u16 val;
+	u32 val32;
+	bool have_pdata = false;
+	int gpio_base = -1;
+	bool irq_active_low = false;
+	int micdet_cfg = 0;
+	bool mic_gpio = false;
+	u32 gpio_cfg_storage[WM8903_NUM_GPIO];
+	u32 *gpio_cfg = NULL;
+	const struct device_node *np;
+	struct irq_data *irq_data;
 
 	wm8903->codec = codec;
 
@@ -1931,18 +1942,65 @@ static int wm8903_probe(struct snd_soc_codec *codec)
 
 	wm8903_reset(codec);
 
-	/* Set up GPIOs and microphone detection */
+	/* Get configuration from platform data, or device tree */
 	if (pdata) {
-		bool mic_gpio = false;
+		have_pdata = true;
+		gpio_base = pdata->gpio_base;
+		irq_active_low = pdata->irq_active_low;
+		micdet_cfg = pdata->micdet_cfg;
+		wm8903->mic_delay = pdata->micdet_delay;
+		gpio_cfg = &pdata->gpio_cfg[0];
+	} else if (codec->dev->of_node) {
+		have_pdata = true;
+
+		np = codec->dev->of_node;
+
+		if (wm8903->irq) {
+			irq_data = irq_get_irq_data(wm8903->irq);
+			if (!irq_data) {
+				dev_err(codec->dev, "Invalid IRQ: %d\n",
+					wm8903->irq);
+				return -EINVAL;
+			}
+			trigger = irqd_get_trigger_type(irq_data);
+			switch (trigger) {
+			case IRQ_TYPE_NONE:
+			case IRQ_TYPE_LEVEL_HIGH:
+				irq_active_low = false;
+				break;
+			case IRQ_TYPE_LEVEL_LOW:
+				irq_active_low = true;
+				break;
+			default:
+				dev_err(codec->dev,
+					"Unsupported IRQ trigger: %x\n",
+					trigger);
+				return -EINVAL;
+			}
+		}
+
+		if (of_property_read_u32(np, "micdet-cfg", &val32) >= 0)
+			micdet_cfg = val32;
+
+		if (of_property_read_u32(np, "micdet-delay", &val32) >= 0)
+			wm8903->mic_delay = val32;
 
-		for (i = 0; i < ARRAY_SIZE(pdata->gpio_cfg); i++) {
-			if (pdata->gpio_cfg[i] == WM8903_GPIO_NO_CONFIG)
+		if (of_property_read_u32_array(np, "gpio-cfg", gpio_cfg_storage,
+					       WM8903_NUM_GPIO) >= 0) {
+			gpio_cfg = &gpio_cfg_storage[0];
+		}
+	}
+
+	/* Set up GPIOs */
+	if (gpio_cfg) {
+		for (i = 0; i < WM8903_NUM_GPIO; i++) {
+			if (gpio_cfg[i] > 0x7fff)
 				continue;
 
 			snd_soc_write(codec, WM8903_GPIO_CONTROL_1 + i,
-				      pdata->gpio_cfg[i] & 0xffff);
+				      gpio_cfg[i] & 0x7fff);
 
-			val = (pdata->gpio_cfg[i] & WM8903_GP1_FN_MASK)
+			val = (gpio_cfg[i] & WM8903_GP1_FN_MASK)
 				>> WM8903_GP1_FN_SHIFT;
 
 			switch (val) {
@@ -1954,12 +2012,15 @@ static int wm8903_probe(struct snd_soc_codec *codec)
 				break;
 			}
 		}
+	}
 
+	/* Set up microphone detection */
+	if (have_pdata) {
 		snd_soc_write(codec, WM8903_MIC_BIAS_CONTROL_0,
-			      pdata->micdet_cfg);
+			      micdet_cfg);
 
 		/* Microphone detection needs the WSEQ clock */
-		if (pdata->micdet_cfg)
+		if (micdet_cfg)
 			snd_soc_update_bits(codec, WM8903_WRITE_SEQUENCER_0,
 					    WM8903_WSEQ_ENA, WM8903_WSEQ_ENA);
 
@@ -1969,13 +2030,11 @@ static int wm8903_probe(struct snd_soc_codec *codec)
 		 * IRQs as the IRQs are clear on read.  The detection
 		 * will be enabled when the machine driver configures.
 		 */
-		WARN_ON(!mic_gpio && (pdata->micdet_cfg & WM8903_MICDET_ENA));
-
-		wm8903->mic_delay = pdata->micdet_delay;
+		WARN_ON(!mic_gpio && (micdet_cfg & WM8903_MICDET_ENA));
 	}
-	
+
 	if (wm8903->irq) {
-		if (pdata && pdata->irq_active_low) {
+		if (irq_active_low) {
 			trigger = IRQF_TRIGGER_LOW;
 			irq_pol = WM8903_IRQ_POL;
 		} else {
@@ -2037,7 +2096,7 @@ static int wm8903_probe(struct snd_soc_codec *codec)
 	snd_soc_add_controls(codec, wm8903_snd_controls,
 				ARRAY_SIZE(wm8903_snd_controls));
 
-	wm8903_init_gpio(codec);
+	wm8903_init_gpio(codec, gpio_base);
 
 	return ret;
 }
@@ -2100,6 +2159,17 @@ static __devexit int wm8903_i2c_remove(struct i2c_client *client)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+/* Match table for of_platform binding */
+static const struct of_device_id wm8903_of_match[] __devinitconst = {
+	{ .compatible = "wlf,wm8903", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, wm8903_of_match);
+#else
+#define wm8903_of_match NULL
+#endif
+
 static const struct i2c_device_id wm8903_i2c_id[] = {
 	{ "wm8903", 0 },
 	{ }
@@ -2110,6 +2180,7 @@ static struct i2c_driver wm8903_i2c_driver = {
 	.driver = {
 		.name = "wm8903",
 		.owner = THIS_MODULE,
+		.of_match_table = wm8903_of_match,
 	},
 	.probe =    wm8903_i2c_probe,
 	.remove =   __devexit_p(wm8903_i2c_remove),
-- 
1.7.0.4

^ permalink raw reply related

* Re: [PATCH 1/1] fix d_revalidate oopsen on NFS exports
From: Chris Dunlop @ 2011-12-01  0:47 UTC (permalink / raw)
  To: David Howells
  Cc: Al Viro, Myklebust, Trond, linux-fsdevel, linux-kernel,
	Eric Van Hensbergen, Ron Minnich, Latchesar Ionkov, Jan Harkes,
	maintainer:CODA FILE SYSTEM, Dave Kleikamp, Petr Vandrovec,
	Greg Kroah-Hartman, v9fs-developer, linux-afs, codalist,
	jfs-discussion, linux-nfs
In-Reply-To: <24960.1322643283@redhat.com>

On Wed, Nov 30, 2011 at 08:54:43AM +0000, David Howells wrote:
> Chris Dunlop <chris@onthe.net.au> wrote:
> 
>> To avoid other people further wasting their and your time on
>> exactly the same thing future, how something like the following
>> patch, based on your comment in:
>> 
>> http://article.gmane.org/gmane.linux.nfs/40370
>> 
>> ...and, if that's acceptable, is it worthwhile doing for the
>> other file systems which are likewise currently vulnerable when
>> abused by broken layered file systems?
> 
> Also, this may get fixed by Al's atomic open patches - but obviously it hasn't
> been yet...
> 
>> Don't oops when abused by broken layered file systems
>> 
>> Signed-off-by: Chris Dunlop <chris@onthe.net.au>
> 
> Acked-by: David Howells <dhowells@redhat.com>
> 
> It's also worth printing a message - this *is* a kernel bug of some description
> if it happens.

Like the below?  This covers the d_revalidate for 9p, afs, coda,
hfs, ncpfs, proc, sysfs.

Note:  jfs isn't susceptible to this problem, but the resolution
doesn't look like the other file systems, and from the comment
I'm not sure if the problem was really understood and if it's
doing the right thing:

static int jfs_ci_revalidate(struct dentry *dentry, struct nameidata *nd)
{
        ...
        /*
         * This may be nfsd (or something), anyway, we can't see the
         * intent of this. So, since this can be for creation, drop it.
         */
        if (!nd)
                return 0;

        /*
         * Drop the negative dentry, in order to make sure to use the
         * case sensitive name which is specified by user if this is
         * for creation.
         */
        if (nd->flags & (LOOKUP_CREATE | LOOKUP_RENAME_TARGET))
                return 0;
        ...
}

Chris.

----------------------------------------------------------------------
Don't oops when abused by broken layered file systems

Signed-off-by: Chris Dunlop <chris@onthe.net.au>
---
 fs/9p/vfs_dentry.c    |    6 ++++++
 fs/afs/dir.c          |    6 ++++++
 fs/coda/dir.c         |    6 ++++++
 fs/hfs/sysdep.c       |    6 ++++++
 fs/ncpfs/dir.c        |    6 ++++++
 fs/nfs/dir.c          |   12 ++++++++++++
 fs/proc/proc_sysctl.c |    5 +++++
 fs/sysfs/dir.c        |    6 ++++++
 8 files changed, 53 insertions(+), 0 deletions(-)

diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index e022890..3b082dc 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -106,6 +106,12 @@ static int v9fs_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
 	struct inode *inode;
 	struct v9fs_inode *v9inode;
 
+	if (!nd) {
+		printk(KERN_ERR "v9fs_lookup_revalidate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 1b0b195..4003d76 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -607,6 +607,12 @@ static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
 	void *dir_version;
 	int ret;
 
+	if (!nd) {
+		printk(KERN_ERR "afs_d_revalidate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index 0239433..ede8e77 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -544,6 +544,12 @@ static int coda_dentry_revalidate(struct dentry *de, struct nameidata *nd)
 	struct inode *inode;
 	struct coda_inode_info *cii;
 
+	if (!nd) {
+		printk(KERN_ERR "coda_dentry_revalidate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
diff --git a/fs/hfs/sysdep.c b/fs/hfs/sysdep.c
index 19cf291..b130d91 100644
--- a/fs/hfs/sysdep.c
+++ b/fs/hfs/sysdep.c
@@ -18,6 +18,12 @@ static int hfs_revalidate_dentry(struct dentry *dentry, struct nameidata *nd)
 	struct inode *inode;
 	int diff;
 
+	if (!nd) {
+		printk(KERN_ERR "hfs_revalidate_dentry:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
diff --git a/fs/ncpfs/dir.c b/fs/ncpfs/dir.c
index 9c51f62..6580d1d 100644
--- a/fs/ncpfs/dir.c
+++ b/fs/ncpfs/dir.c
@@ -302,6 +302,12 @@ ncp_lookup_validate(struct dentry *dentry, struct nameidata *nd)
 	if (dentry == dentry->d_sb->s_root)
 		return 1;
 
+	if (!nd) {
+		printk(KERN_ERR "ncp_lookup_validate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index b238d95..51b3d54 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1103,6 +1103,12 @@ static int nfs_lookup_revalidate(struct dentry *dentry, struct nameidata *nd)
 	struct nfs_fattr *fattr = NULL;
 	int error;
 
+	if (!nd) {
+		printk(KERN_ERR "nfs_lookup_revalidate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
@@ -1508,6 +1514,12 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd)
 	struct nfs_open_context *ctx;
 	int openflags, ret = 0;
 
+	if (!nd) {
+		printk(KERN_ERR "nfs_open_revalidate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c
index 1a77dbe..20ef3ab 100644
--- a/fs/proc/proc_sysctl.c
+++ b/fs/proc/proc_sysctl.c
@@ -389,6 +389,11 @@ static const struct inode_operations proc_sys_dir_operations = {
 
 static int proc_sys_revalidate(struct dentry *dentry, struct nameidata *nd)
 {
+	if (!nd) {
+		printk(KERN_ERR "proc_sys_revalidate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 	return !PROC_I(dentry->d_inode)->sysctl->unregistering;
diff --git a/fs/sysfs/dir.c b/fs/sysfs/dir.c
index ea9120a..6373450 100644
--- a/fs/sysfs/dir.c
+++ b/fs/sysfs/dir.c
@@ -242,6 +242,12 @@ static int sysfs_dentry_revalidate(struct dentry *dentry, struct nameidata *nd)
 	struct sysfs_dirent *sd;
 	int is_dir;
 
+	if (!nd) {
+		printk(KERN_ERR "sysfs_dentry_revalidate:"
+		       " called from layered filesystem without intents\n");
+		return -EIO;
+	}
+
 	if (nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 
-- 
1.7.0.4

----------------------------------------------------------------------

^ permalink raw reply related

* Debug output
From: damateem @ 2011-12-01  0:46 UTC (permalink / raw)
  To: linux-media list

There are a fair number of debug print statements in the V4L2 code. How
do I turn those on?

For instance, I'd like the following code to print

if ((vfd->debug & V4L2_DEBUG_IOCTL) &&
                !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
        v4l_print_ioctl(vfd->name, cmd);
        printk(KERN_CONT "\n");
    }

so I can trace the IOCTL calls.

Thanks,
David

^ permalink raw reply

* [PATCH 2/2] gpio/tegra: Dynamically allocate IRQ base, and support DT
From: Stephen Warren @ 2011-12-01  0:45 UTC (permalink / raw)
  To: linux-arm-kernel
In-Reply-To: <1322700336-26866-1-git-send-email-swarren@nvidia.com>

Enhance  the driver to dynamically allocate the base IRQ number, and
create an IRQ domain for itself. The use of an IRQ domain ensures that
any device tree node interrupts properties are correctly parsed.

Fix the DT binding documentation to describe interrupt-related properties,
and the contents of "child" node interrupts property.

Update tegra20.dtsi to specify the required interrupt-related properties.

Finally, remove the definition of TEGRA_GPIO_TO_IRQ; this macro no longer
gives correct results since the IRQ numbers for GPIOs are dynamically
allocated.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 .../devicetree/bindings/gpio/gpio_nvidia.txt       |   10 ++++++
 arch/arm/boot/dts/tegra20.dtsi                     |    2 +
 arch/arm/mach-tegra/include/mach/gpio-tegra.h      |    2 -
 drivers/gpio/gpio-tegra.c                          |   32 +++++++++++++++----
 4 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
index eb4b530..20b991d 100644
--- a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
@@ -6,3 +6,13 @@ Required properties:
   second cell is used to specify optional parameters:
   - bit 0 specifies polarity (0 for normal, 1 for inverted)
 - gpio-controller : Marks the device node as a GPIO controller.
+- #interrupt-cells : Should be 2.
+  The first cell is the GPIO number.
+  The second cell is used to specify flags:
+    bits[3:0] trigger type and level flags:
+      1 = low-to-high edge triggered.
+      2 = high-to-low edge triggered.
+      4 = active high level-sensitive.
+      8 = active low level-sensitive.
+      Valid combinations are 1, 2, 3, 4, 8.
+- interrupt-controller : Marks the device node as an interrupt controller.
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index db6f562..e25f4a6 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -79,6 +79,8 @@
 			       0 55 0x04
 			       0 87 0x04
 			       0 89 0x04 >;
+		interrupt-controller;
+		#interrupt-cells = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
index 87d37fd..6140820 100644
--- a/arch/arm/mach-tegra/include/mach/gpio-tegra.h
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -25,8 +25,6 @@
 
 #define TEGRA_NR_GPIOS		INT_GPIO_NR
 
-#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-
 struct tegra_gpio_table {
 	int	gpio;	/* GPIO number */
 	bool	enable;	/* Enable for GPIO at init? */
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 61044c8..9fa5783 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -25,6 +25,7 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/module.h>
+#include <linux/irqdomain.h>
 
 #include <asm/mach/irq.h>
 
@@ -74,7 +75,8 @@ struct tegra_gpio_bank {
 #endif
 };
 
-
+static struct irq_domain irq_domain;
+static struct irq_domain_ops irq_domain_ops;
 static void __iomem *regs;
 static struct tegra_gpio_bank tegra_gpio_banks[7];
 
@@ -139,7 +141,7 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
 
 static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
 {
-	return TEGRA_GPIO_TO_IRQ(offset);
+	return irq_domain_to_irq(&irq_domain, offset);
 }
 
 static struct gpio_chip tegra_gpio_chip = {
@@ -155,28 +157,28 @@ static struct gpio_chip tegra_gpio_chip = {
 
 static void tegra_gpio_irq_ack(struct irq_data *d)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 
 	tegra_gpio_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio));
 }
 
 static void tegra_gpio_irq_mask(struct irq_data *d)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 
 	tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 0);
 }
 
 static void tegra_gpio_irq_unmask(struct irq_data *d)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 
 	tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 1);
 }
 
 static int tegra_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 	struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
 	int port = GPIO_PORT(gpio);
 	int lvl_type;
@@ -343,6 +345,22 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
 	int i;
 	int j;
 
+	irq_domain.irq_base = irq_alloc_descs(-1, 0, TEGRA_NR_GPIOS, 0);
+	if (irq_domain.irq_base < 0) {
+		dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n");
+		return -ENODEV;
+	}
+	irq_domain.nr_irq = TEGRA_NR_GPIOS;
+	irq_domain.ops = &irq_domain_ops;
+#ifdef CONFIG_OF
+	if (pdev->dev.of_node) {
+		irq_domain.of_node = pdev->dev.of_node;
+		irq_domain_ops.dt_translate =
+			irq_domain_simple_ops.dt_translate;
+	}
+#endif
+	irq_domain_add(&irq_domain);
+
 	for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) {
 		res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
 		if (!res) {
@@ -388,7 +406,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
 	gpiochip_add(&tegra_gpio_chip);
 
 	for (gpio = 0; gpio < TEGRA_NR_GPIOS; gpio++) {
-		int irq = TEGRA_GPIO_TO_IRQ(gpio);
+		int irq = irq_domain_to_irq(&irq_domain, gpio);
 		/* No validity check; all Tegra GPIOs are valid IRQs */
 
 		bank = &tegra_gpio_banks[GPIO_BANK(gpio)];
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH 2/2] gpio/tegra: Dynamically allocate IRQ base, and support DT
From: Stephen Warren @ 2011-12-01  0:45 UTC (permalink / raw)
  To: Olof Johansson, Colin Cross
  Cc: Peter De Schrijver, Rob Herring, Grant Likely,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren
In-Reply-To: <1322700336-26866-1-git-send-email-swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Enhance  the driver to dynamically allocate the base IRQ number, and
create an IRQ domain for itself. The use of an IRQ domain ensures that
any device tree node interrupts properties are correctly parsed.

Fix the DT binding documentation to describe interrupt-related properties,
and the contents of "child" node interrupts property.

Update tegra20.dtsi to specify the required interrupt-related properties.

Finally, remove the definition of TEGRA_GPIO_TO_IRQ; this macro no longer
gives correct results since the IRQ numbers for GPIOs are dynamically
allocated.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 .../devicetree/bindings/gpio/gpio_nvidia.txt       |   10 ++++++
 arch/arm/boot/dts/tegra20.dtsi                     |    2 +
 arch/arm/mach-tegra/include/mach/gpio-tegra.h      |    2 -
 drivers/gpio/gpio-tegra.c                          |   32 +++++++++++++++----
 4 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
index eb4b530..20b991d 100644
--- a/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
+++ b/Documentation/devicetree/bindings/gpio/gpio_nvidia.txt
@@ -6,3 +6,13 @@ Required properties:
   second cell is used to specify optional parameters:
   - bit 0 specifies polarity (0 for normal, 1 for inverted)
 - gpio-controller : Marks the device node as a GPIO controller.
+- #interrupt-cells : Should be 2.
+  The first cell is the GPIO number.
+  The second cell is used to specify flags:
+    bits[3:0] trigger type and level flags:
+      1 = low-to-high edge triggered.
+      2 = high-to-low edge triggered.
+      4 = active high level-sensitive.
+      8 = active low level-sensitive.
+      Valid combinations are 1, 2, 3, 4, 8.
+- interrupt-controller : Marks the device node as an interrupt controller.
diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
index db6f562..e25f4a6 100644
--- a/arch/arm/boot/dts/tegra20.dtsi
+++ b/arch/arm/boot/dts/tegra20.dtsi
@@ -79,6 +79,8 @@
 			       0 55 0x04
 			       0 87 0x04
 			       0 89 0x04 >;
+		interrupt-controller;
+		#interrupt-cells = <2>;
 		#gpio-cells = <2>;
 		gpio-controller;
 	};
diff --git a/arch/arm/mach-tegra/include/mach/gpio-tegra.h b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
index 87d37fd..6140820 100644
--- a/arch/arm/mach-tegra/include/mach/gpio-tegra.h
+++ b/arch/arm/mach-tegra/include/mach/gpio-tegra.h
@@ -25,8 +25,6 @@
 
 #define TEGRA_NR_GPIOS		INT_GPIO_NR
 
-#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-
 struct tegra_gpio_table {
 	int	gpio;	/* GPIO number */
 	bool	enable;	/* Enable for GPIO at init? */
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 61044c8..9fa5783 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -25,6 +25,7 @@
 #include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/module.h>
+#include <linux/irqdomain.h>
 
 #include <asm/mach/irq.h>
 
@@ -74,7 +75,8 @@ struct tegra_gpio_bank {
 #endif
 };
 
-
+static struct irq_domain irq_domain;
+static struct irq_domain_ops irq_domain_ops;
 static void __iomem *regs;
 static struct tegra_gpio_bank tegra_gpio_banks[7];
 
@@ -139,7 +141,7 @@ static int tegra_gpio_direction_output(struct gpio_chip *chip, unsigned offset,
 
 static int tegra_gpio_to_irq(struct gpio_chip *chip, unsigned offset)
 {
-	return TEGRA_GPIO_TO_IRQ(offset);
+	return irq_domain_to_irq(&irq_domain, offset);
 }
 
 static struct gpio_chip tegra_gpio_chip = {
@@ -155,28 +157,28 @@ static struct gpio_chip tegra_gpio_chip = {
 
 static void tegra_gpio_irq_ack(struct irq_data *d)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 
 	tegra_gpio_writel(1 << GPIO_BIT(gpio), GPIO_INT_CLR(gpio));
 }
 
 static void tegra_gpio_irq_mask(struct irq_data *d)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 
 	tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 0);
 }
 
 static void tegra_gpio_irq_unmask(struct irq_data *d)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 
 	tegra_gpio_mask_write(GPIO_MSK_INT_ENB(gpio), gpio, 1);
 }
 
 static int tegra_gpio_irq_set_type(struct irq_data *d, unsigned int type)
 {
-	int gpio = d->irq - INT_GPIO_BASE;
+	int gpio = d->hwirq;
 	struct tegra_gpio_bank *bank = irq_data_get_irq_chip_data(d);
 	int port = GPIO_PORT(gpio);
 	int lvl_type;
@@ -343,6 +345,22 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
 	int i;
 	int j;
 
+	irq_domain.irq_base = irq_alloc_descs(-1, 0, TEGRA_NR_GPIOS, 0);
+	if (irq_domain.irq_base < 0) {
+		dev_err(&pdev->dev, "Couldn't allocate IRQ numbers\n");
+		return -ENODEV;
+	}
+	irq_domain.nr_irq = TEGRA_NR_GPIOS;
+	irq_domain.ops = &irq_domain_ops;
+#ifdef CONFIG_OF
+	if (pdev->dev.of_node) {
+		irq_domain.of_node = pdev->dev.of_node;
+		irq_domain_ops.dt_translate =
+			irq_domain_simple_ops.dt_translate;
+	}
+#endif
+	irq_domain_add(&irq_domain);
+
 	for (i = 0; i < ARRAY_SIZE(tegra_gpio_banks); i++) {
 		res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
 		if (!res) {
@@ -388,7 +406,7 @@ static int __devinit tegra_gpio_probe(struct platform_device *pdev)
 	gpiochip_add(&tegra_gpio_chip);
 
 	for (gpio = 0; gpio < TEGRA_NR_GPIOS; gpio++) {
-		int irq = TEGRA_GPIO_TO_IRQ(gpio);
+		int irq = irq_domain_to_irq(&irq_domain, gpio);
 		/* No validity check; all Tegra GPIOs are valid IRQs */
 
 		bank = &tegra_gpio_banks[GPIO_BANK(gpio)];
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH 1/2] arm/tegra: Remove use of TEGRA_GPIO_TO_IRQ
From: Stephen Warren @ 2011-12-01  0:45 UTC (permalink / raw)
  To: linux-arm-kernel

Replace compile-time usage of TEGRA_GPIO_TO_IRQ with run-time calls to
gpio_to_irq(). This will allow the base IRQ number for the Tegra GPIO
driver to be dynamically allocated in a later patch.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
 arch/arm/mach-tegra/board-harmony.c  |    2 +-
 arch/arm/mach-tegra/board-seaboard.c |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 70ee674..60afd08 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -101,7 +101,6 @@ static struct wm8903_platform_data harmony_wm8903_pdata = {
 static struct i2c_board_info __initdata wm8903_board_info = {
 	I2C_BOARD_INFO("wm8903", 0x1a),
 	.platform_data = &harmony_wm8903_pdata,
-	.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
 };
 
 static void __init harmony_i2c_init(void)
@@ -111,6 +110,7 @@ static void __init harmony_i2c_init(void)
 	platform_device_register(&tegra_i2c_device3);
 	platform_device_register(&tegra_i2c_device4);
 
+	wm8903_board_info.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ);
 	i2c_register_board_info(0, &wm8903_board_info, 1);
 }
 
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index c1599eb..ce3c9a2 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -159,7 +159,6 @@ static struct platform_device *seaboard_devices[] __initdata = {
 
 static struct i2c_board_info __initdata isl29018_device = {
 	I2C_BOARD_INFO("isl29018", 0x44),
-	.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ),
 };
 
 static struct i2c_board_info __initdata adt7461_device = {
@@ -183,7 +182,6 @@ static struct wm8903_platform_data wm8903_pdata = {
 static struct i2c_board_info __initdata wm8903_device = {
 	I2C_BOARD_INFO("wm8903", 0x1a),
 	.platform_data = &wm8903_pdata,
-	.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
 };
 
 static int seaboard_ehci_init(void)
@@ -214,7 +212,10 @@ static void __init seaboard_i2c_init(void)
 	gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018");
 	gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ);
 
+	isl29018_device.irq = gpio_to_irq(TEGRA_GPIO_ISL29018_IRQ);
 	i2c_register_board_info(0, &isl29018_device, 1);
+
+	wm8903_device.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ);
 	i2c_register_board_info(0, &wm8903_device, 1);
 
 	i2c_register_board_info(3, &adt7461_device, 1);
-- 
1.7.0.4

^ permalink raw reply related

* [PATCH 1/2] arm/tegra: Remove use of TEGRA_GPIO_TO_IRQ
From: Stephen Warren @ 2011-12-01  0:45 UTC (permalink / raw)
  To: Olof Johansson, Colin Cross
  Cc: Peter De Schrijver, Rob Herring, Grant Likely,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren

Replace compile-time usage of TEGRA_GPIO_TO_IRQ with run-time calls to
gpio_to_irq(). This will allow the base IRQ number for the Tegra GPIO
driver to be dynamically allocated in a later patch.

Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 arch/arm/mach-tegra/board-harmony.c  |    2 +-
 arch/arm/mach-tegra/board-seaboard.c |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-tegra/board-harmony.c b/arch/arm/mach-tegra/board-harmony.c
index 70ee674..60afd08 100644
--- a/arch/arm/mach-tegra/board-harmony.c
+++ b/arch/arm/mach-tegra/board-harmony.c
@@ -101,7 +101,6 @@ static struct wm8903_platform_data harmony_wm8903_pdata = {
 static struct i2c_board_info __initdata wm8903_board_info = {
 	I2C_BOARD_INFO("wm8903", 0x1a),
 	.platform_data = &harmony_wm8903_pdata,
-	.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
 };
 
 static void __init harmony_i2c_init(void)
@@ -111,6 +110,7 @@ static void __init harmony_i2c_init(void)
 	platform_device_register(&tegra_i2c_device3);
 	platform_device_register(&tegra_i2c_device4);
 
+	wm8903_board_info.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ);
 	i2c_register_board_info(0, &wm8903_board_info, 1);
 }
 
diff --git a/arch/arm/mach-tegra/board-seaboard.c b/arch/arm/mach-tegra/board-seaboard.c
index c1599eb..ce3c9a2 100644
--- a/arch/arm/mach-tegra/board-seaboard.c
+++ b/arch/arm/mach-tegra/board-seaboard.c
@@ -159,7 +159,6 @@ static struct platform_device *seaboard_devices[] __initdata = {
 
 static struct i2c_board_info __initdata isl29018_device = {
 	I2C_BOARD_INFO("isl29018", 0x44),
-	.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_ISL29018_IRQ),
 };
 
 static struct i2c_board_info __initdata adt7461_device = {
@@ -183,7 +182,6 @@ static struct wm8903_platform_data wm8903_pdata = {
 static struct i2c_board_info __initdata wm8903_device = {
 	I2C_BOARD_INFO("wm8903", 0x1a),
 	.platform_data = &wm8903_pdata,
-	.irq = TEGRA_GPIO_TO_IRQ(TEGRA_GPIO_CDC_IRQ),
 };
 
 static int seaboard_ehci_init(void)
@@ -214,7 +212,10 @@ static void __init seaboard_i2c_init(void)
 	gpio_request(TEGRA_GPIO_ISL29018_IRQ, "isl29018");
 	gpio_direction_input(TEGRA_GPIO_ISL29018_IRQ);
 
+	isl29018_device.irq = gpio_to_irq(TEGRA_GPIO_ISL29018_IRQ);
 	i2c_register_board_info(0, &isl29018_device, 1);
+
+	wm8903_device.irq = gpio_to_irq(TEGRA_GPIO_CDC_IRQ);
 	i2c_register_board_info(0, &wm8903_device, 1);
 
 	i2c_register_board_info(3, &adt7461_device, 1);
-- 
1.7.0.4

^ permalink raw reply related

* Agevolazioni nuovi Imprenditori
From: Informa Aziende @ 2011-12-01  0:44 UTC (permalink / raw)
  To: spi-devel-general

Agevolazioni per i nuovi Imprenditori.
Tassazione al 5% per giovani imprenditori e
 finanziamento per l'apertura di una nuova azienda

Dal 1° gennaio per i giovani che non hanno superato i 35 anni di età 
e iniziano una nuova attività, è prevista   una   tassazione agevolata  al 5%. 

Puoi accedere anche a delle agevolazioni finanziarie per iniziare l'attività
Per informazioni clicca qui

Per non ricevere in futuro news clicca qui

------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d

^ permalink raw reply

* linux-yocto: consolidated pull request
From: Bruce Ashfield @ 2011-12-01  0:36 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Tom, Darren Hart, openembedded-core, saul.wold

Richard/Saul,

FYI: I can't get git-send email to work over the hotel wifi, so
I can't chain the patches to this email. If you want me to send
the patches separately, let me know. But for now, this is the
best I can do.

This pull request represents a collection of changes that were
part of yocto M1 work, and that set the stage for more updates
that will follow in the not too distant future.

I've bumped the 3.0 kernel to the 3.0.10 baseline (3.0.11 is
out, but not in this merge request) and updated our -rt patches
to the latest upstream -rt series.

This also drops the 2.6.34 recipe and leaves it to be supported
in previous releases. If there's somewhere else I should be
putting it, let me know and I'll put it there.

The kernel revision updates have been built and boot tested by
Tom and myself. And we have't seen any problems.

Also included in this are some changes to kernel tools that
prepare to move the kernel tools into the kernel tree itself.
They also move us to doing configuration auditing using the
merge_config script that Darren and John Stultz have been
working on.

And finally there's a small tweak to install the kernel tools
via Makefile in the package itself, something that I recall
Richard mentioning to me over 2 years ago a meeting .. so I thought
I'd finally get to it.
						
Cheers,

Brucedvhart@linux.intel.com

cc: Tom Zanussi <tom.zanussi@intel.com>
cc: Darren Hart <dvhart@linux.intel.com>

The following changes since commit d7cd934376ae1edaf7055ec635eb3c85fdbf58b3:

   squashfs-tools: fix PR, those should start with 'r' (2011-11-30 
23:37:44 +0000)

are available in the git repository at:
   git://git.pokylinux.org/poky-contrib zedd/kernel
   http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=zedd/kernel

Bruce Ashfield (7):
   kern-tools: add pre_config and merge_config.sh to the list of tools
   kernel-yocto: support allnoconfig base configuration
   linux-yocto: remove 2.6.34 recipes
   linux-yocto: v3.0.9 + enhancements
   linux-yocto: v3.0.10 + rt27
   linux-yocto: prefer in-tree tools to external ones
   kern-tools: use Makefile provided install rules

  meta/classes/kernel-yocto.bbclass                  |   24 +++++++++-
  .../kern-tools/kern-tools-native_git.bb            |   15 ++----
  meta/recipes-kernel/linux/linux-yocto-rt_2.6.34.bb |   38 ---------------
  meta/recipes-kernel/linux/linux-yocto-rt_3.0.bb    |    8 ++--
  meta/recipes-kernel/linux/linux-yocto_2.6.34.bb    |   49 
--------------------
  meta/recipes-kernel/linux/linux-yocto_3.0.bb       |   18 ++++----
  6 files changed, 39 insertions(+), 113 deletions(-)
  delete mode 100644 meta/recipes-kernel/linux/linux-yocto-rt_2.6.34.bb
  delete mode 100644 meta/recipes-kernel/linux/linux-yocto_2.6.34.bb



^ permalink raw reply

* Re: [oe-commits] Koen Kooi : pixman: update to 0.24.0
From: Martin Jansa @ 2011-12-01  0:35 UTC (permalink / raw)
  To: openembedded-devel
In-Reply-To: <CA+chaQctkMN+3h6zjmjXxYMvH_bqqL8UXc7akAE=cx7hnxH+kg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3162 bytes --]

On Thu, Dec 01, 2011 at 12:18:54AM +0100, Martin Jansa wrote:
> On Wed, Nov 30, 2011 at 3:32 PM,  <git@git.openembedded.org> wrote:
> > Module: meta-openembedded.git
> > Branch: master
> > Commit: 80e3a0c42db89fa2716b0a839b8ef71d6d6349db
> > URL:    http://git.openembedded.org/?p=meta-openembedded.git&a=commit;h=80e3a0c42db89fa2716b0a839b8ef71d6d6349db
> >
> > Author: Koen Kooi <koen@dominion.thruhere.net>
> > Date:   Wed Nov 30 15:27:26 2011 +0100
> >
> > pixman: update to 0.24.0
> >
> > * All patches that went upstream are removed
> >
> > Tested on beagleboard/angstrom
> >
> > Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
> >
> 
> FYI: this break my armv5t build, I'll try to test pixman-0.24.0 from
> oe-core or debug it tomorrow.
> 
> | arm-oe-linux-gnueabi-libtool: link: arm-oe-linux-gnueabi-gcc
> -march=armv5te -mthumb -mthumb-interwork -mtune=xscale
> --sysroot=/OE/shr-core/tmp-eglibc/sysroo
> ts/spitz -O2 -pipe -g -feliminate-unused-debug-types -Wall
> -fno-strict-aliasing -fvisibility=hidden -Wl,-O1 -Wl,--hash-style=gnu
> -Wl,--as-needed -o .libs/pdf-op-test pdf-op-test.o  ./.libs/libutils.a
> ../pixman/.libs/libpixman-1.so
> /OE/shr-core/tmp-eglibc/sysroots/spitz/usr/lib/libpng12.so
> /OE/shr-core/tmp-eglibc/sysroots/spitz/usr/lib/libz.so -lm
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wslldi'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wor'
> | ../pixman/.libs/libpixman-1.so: undefined reference to
> `__builtin_arm_wunpckilb'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wsrldi'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_waddbus'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_waddhus'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wsrlhi'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wxor'
> | ../pixman/.libs/libpixman-1.so: undefined reference to
> `__builtin_arm_wpackhus'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wand'
> | ../pixman/.libs/libpixman-1.so: undefined reference to
> `__builtin_arm_wunpckihb'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wzero'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_walign'
> | ../pixman/.libs/libpixman-1.so: undefined reference to `__builtin_arm_wmulul'
> | collect2: ld returned 1 exit status
> | make[2]: *** [a1-trap-test] Error 1
> 
> The same for region-test and pdf-op-test.

Failed the same also for armv4t.. so for now I've added --disable-arm-iwmmxt and replaced .bb 
with smaller .bbappend:

FILESEXTRAPATHS_prepend := "${THISDIR}/${P}:"

DEPENDS += "perl-native"
BBCLASSEXTEND = "native"

PRINC = "6"

SRC_URI += " file://0008-Generic-C-implementation-of-pixman_blt-with-overlapp.patch"

NEON = " --disable-arm-neon "
NEON_armv7a = " "
NEON_armv7a-vfp-neon = " "

IWMMXT = " --disable-arm-iwmmxt "

EXTRA_OECONF += "${NEON} ${IWMMXT}"

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply


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.