Re: [PATCH v4 4/7] staging:lustre: rename tcpip handling functions to lnet_* prefix

2015-06-03 Thread Sudip Mukherjee
On Wed, Jun 03, 2015 at 03:57:10PM -0400, James Simmons wrote:
> With all the TCPIP handling done in the lnet layer we should
> rename all the functions with the prefix lnet_*. One other
> change done was changing the remove argument of lnet_sock_getaddr
> from a int to a bool.
thats two different change.
and apart from this:
1) the function declarations were renamed and moved from
lustre/include/linux/libcfs/libcfs.h to 
drivers/staging/lustre/include/linux/lnet/lib-lnet.h

2) some functions you have changed the coding style. like:
- rc = libcfs_sock_getaddr(conn->ksnc_sock, 0,
-  >ksnc_myipaddr, NULL);
+ rc = lnet_sock_getaddr(conn->ksnc_sock, 0, >ksnc_myipaddr, NULL);

regards
sudip



> 
> Signed-off-by: James Simmons 
> ---
>  .../staging/lustre/include/linux/libcfs/libcfs.h   |   15 -
>  .../staging/lustre/include/linux/lnet/lib-lnet.h   |   16 +
>  .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c|2 +-
>  .../staging/lustre/lnet/klnds/socklnd/socklnd.c|   11 ++--
>  .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c |6 +-
>  .../lustre/lnet/klnds/socklnd/socklnd_lib-linux.c  |   15 ++---
>  .../lustre/lnet/klnds/socklnd/socklnd_proto.c  |   43 ++---
>  drivers/staging/lustre/lnet/lnet/acceptor.c|   43 ++---
>  drivers/staging/lustre/lnet/lnet/config.c  |   21 +++
>  drivers/staging/lustre/lnet/lnet/lib-socket.c  |   66 +--
>  10 files changed, 110 insertions(+), 128 deletions(-)
> 
> diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h 
> b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
> index 457ce9a..5dd9cdf 100644
> --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h
> +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h
> @@ -65,21 +65,6 @@ static inline int __is_po2(unsigned long long val)
>  int libcfs_arch_init(void);
>  void libcfs_arch_cleanup(void);
>  
> -/* libcfs tcpip */
> -int libcfs_ipif_query(char *name, int *up, __u32 *ip, __u32 *mask);
> -int libcfs_ipif_enumerate(char ***names);
> -void libcfs_ipif_free_enumeration(char **names, int n);
> -int libcfs_sock_listen(struct socket **sockp, __u32 ip, int port, int 
> backlog);
> -int libcfs_sock_accept(struct socket **newsockp, struct socket *sock);
> -int libcfs_sock_connect(struct socket **sockp, int *fatal,
> - __u32 local_ip, int local_port,
> - __u32 peer_ip, int peer_port);
> -int libcfs_sock_setbuf(struct socket *socket, int txbufsize, int rxbufsize);
> -int libcfs_sock_getbuf(struct socket *socket, int *txbufsize, int 
> *rxbufsize);
> -int libcfs_sock_getaddr(struct socket *socket, int remote, __u32 *ip, int 
> *port);
> -int libcfs_sock_write(struct socket *sock, void *buffer, int nob, int 
> timeout);
> -int libcfs_sock_read(struct socket *sock, void *buffer, int nob, int 
> timeout);
> -
>  /* need both kernel and user-land acceptor */
>  #define LNET_ACCEPTOR_MIN_RESERVED_PORT512
>  #define LNET_ACCEPTOR_MAX_RESERVED_PORT1023
> diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h 
> b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
> index d84aa9a..ff07703 100644
> --- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
> +++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h
> @@ -844,6 +844,22 @@ int lnet_acceptor_port(void);
>  int lnet_acceptor_start(void);
>  void lnet_acceptor_stop(void);
>  
> +int lnet_ipif_query(char *name, int *up, __u32 *ip, __u32 *mask);
> +int lnet_ipif_enumerate(char ***names);
> +void lnet_ipif_free_enumeration(char **names, int n);
> +int lnet_sock_setbuf(struct socket *socket, int txbufsize, int rxbufsize);
> +int lnet_sock_getbuf(struct socket *socket, int *txbufsize, int *rxbufsize);
> +int lnet_sock_getaddr(struct socket *socket, bool remote, __u32 *ip, int 
> *port);
> +int lnet_sock_write(struct socket *sock, void *buffer, int nob, int timeout);
> +int lnet_sock_read(struct socket *sock, void *buffer, int nob, int timeout);
> +
> +int lnet_sock_listen(struct socket **sockp, __u32 ip, int port, int backlog);
> +int lnet_sock_accept(struct socket **newsockp, struct socket *sock);
> +int lnet_sock_connect(struct socket **sockp, int *fatal,
> +   __u32 local_ip, int local_port,
> +   __u32 peer_ip, int peer_port);
> +void libcfs_sock_release(struct socket *sock);
> +
>  void lnet_get_tunables(void);
>  int lnet_peers_start_down(void);
>  int lnet_peer_buffer_credits(lnet_ni_t *ni);
> diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c 
> b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> index a57c5c3..060b739 100644
> --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
> @@ -2617,7 +2617,7 @@ static kib_dev_t *kiblnd_create_dev(char *ifname)
>   int up;
>   int rc;
>  
> - rc = libcfs_ipif_query(ifname, , , );
> + rc = 

Re: [PATCH v3 2/3] video: fbdev: vesafb: add missing mtrr_del() for added MTRR

2015-06-03 Thread Tomi Valkeinen


On 20/05/15 22:46, Luis R. Rodriguez wrote:
> On Wed, May 20, 2015 at 12:52:14PM +0300, Tomi Valkeinen wrote:

>> Hmm, this looks a bit odd... You're removing the pseudo_palette, and
>> using its memory for mtrr cookie?
> 
> You are totally right, sorry, will spin a v3.

Did you ever send a new version (v4 actually), or have I somehow missed it?

 Tomi



signature.asc
Description: OpenPGP digital signature


Re: [PATCH v4 3/7] selftests/kdbus: install kdbus-test

2015-06-03 Thread Greg Kroah-Hartman
On Wed, May 06, 2015 at 02:18:52PM -0600, Shuah Khan wrote:
> On 04/21/2015 04:50 PM, Tyler Baker wrote:
> > Set TEST_PROGS so that kdbus-test is installed.
> > 
> > Cc: Greg Kroah-Hartman 
> > Acked-by: Michael Ellerman 
> > Signed-off-by: Tyler Baker 
> > ---
> >  tools/testing/selftests/kdbus/Makefile | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/tools/testing/selftests/kdbus/Makefile 
> > b/tools/testing/selftests/kdbus/Makefile
> > index de8242f..94ea75b 100644
> > --- a/tools/testing/selftests/kdbus/Makefile
> > +++ b/tools/testing/selftests/kdbus/Makefile
> > @@ -41,6 +41,8 @@ include ../lib.mk
> >  kdbus-test: $(OBJS)
> > $(CC) $(CFLAGS) $^ $(LDLIBS) -o $@
> >  
> > +TEST_PROGS := kdbus-test
> > +
> >  run_tests:
> > ./kdbus-test --tap
> >  
> > 
> 
> Please hang on to this for a bit until kdbus makes it in.
> For now I can't apply this one.

I've applied it to my kdbus repo now.

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v2] kdbus: do not append the same connection to the queue twice

2015-06-03 Thread Greg KH
On Tue, Apr 14, 2015 at 10:24:53AM +0200, Lukasz Skalski wrote:
> As it was discussed on systemd ML [1], the same connection should be
> queued up only once for a given well-known name.
> 
> [1] http://lists.freedesktop.org/archives/systemd-devel/2015-April/030494.html
> 
> Signed-off-by: Lukasz Skalski 
> 
> diff --git a/ipc/kdbus/names.c b/ipc/kdbus/names.c
> index 657008e..df99e4d 100644
> --- a/ipc/kdbus/names.c
> +++ b/ipc/kdbus/names.c
> @@ -353,10 +353,24 @@ int kdbus_name_acquire(struct kdbus_name_registry *reg,
>   } else if (flags & KDBUS_NAME_QUEUE) {
>   /* add to waiting-queue of the name */
>  
> - ret = kdbus_name_pending_new(e, conn, flags);
> - if (ret >= 0)
> - /* tell the caller that we queued it */
> - rflags |= KDBUS_NAME_IN_QUEUE;
> + struct kdbus_name_pending *p;
> + bool in_queue = false;
> +
> + list_for_each_entry(p, >queue, name_entry) {
> + if (p->conn == conn) {
> + /* connection is already queued */
> + rflags |= KDBUS_NAME_IN_QUEUE;
> + in_queue = true;
> + break;
> + }
> + }
> +
> + if (!in_queue) {
> + ret = kdbus_name_pending_new(e, conn, flags);
> + if (ret >= 0)
> + /* tell the caller that we queued it */
> + rflags |= KDBUS_NAME_IN_QUEUE;
> + }
>   } else {
>   /* the name is busy, return a failure */
>   ret = -EEXIST;

David, did you miss this patch in your last round of kdbus updates?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH 07/11] staging: rtl8192e: Remove dead code: dig_t::dbg_mode

2015-06-03 Thread Mateusz Kulikowski
On 04.06.2015 07:18, Sudip Mukherjee wrote:
> On Wed, Jun 03, 2015 at 08:21:02PM +0200, Mateusz Kulikowski wrote:
>> On 03.06.2015 09:26, Sudip Mukherjee wrote:
>>> On Tue, Jun 02, 2015 at 10:48:11PM +0200, Mateusz Kulikowski wrote:
>>
>> No, I missed that - this one should also be removed - probably because of 
>> similar naming (DbgMode, dbg_mode).
>> Thanks for finding it - I'll fix that in v2.
>>
>> Apart from that - did you had time/courage to analyze rest of the patches 
>> (so I can send v2)?
> 
> at a first glance looked ok to me. I hope you have checked it on the
> hardware as well. but maybe Dan can find something.
> better send v2.

Of course I have checked it, although - as I wrote in past - this driver has 
not very good performance.

I'll post v2 soon.

Regards,
Mateusz
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [GIT PULL 0/6] perf/core improvements and fixes

2015-06-03 Thread Ingo Molnar

* Arnaldo Carvalho de Melo  wrote:

> Hi Ingo,
> 
>   Please consider applying.
> 
>   One of the next requests probably will have the eBPF work by Wang Nan,
> but I am still going thru it and want to test it thoroughly.
> 
>   BTW: Have you looked at it lately? It is at:
> 
> http://lkml.kernel.org/r/1433144296-74992-1-git-send-email-wangn...@huawei.com
> 
> Super summary from the above cover letter:
> 
> -
> It enables 'perf record' to filter events using eBPF programs like:
> 
>  # perf record --event bpf-file.o sleep 1
> 
> Events are selected and filtered according to definitions in bpf-file.o.

Looks useful, but I think the UI needs one more tweak: could you fix it to be 
able 
to filter based on the eBPF _source_ file, not just the object file?

People want to tweak such filters as they profile, so we should use the eBPF 
source code as the primary interface. We can compile it internally to the .o 
just 
fine. The .o file is a totally uninteresting intermediate product in itself.

I.e. we need to first think through such profiling workflows from beginning to 
end 
before allowing them upstream.

> -
> 
>   The first two patches from that series are in this pull req, as
> they just move stuff into tools/include/linux/ from tools/perf/include.
> 
> Regards,
> 
> - Arnaldo
> 
> The following changes since commit 5c9b9bc67c684e40b3a5e7e9facde0fb7200cd8c:
> 
>   Merge tag 'perf-core-for-mingo' of 
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core 
> (2015-05-29 20:19:02 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git 
> tags/perf-core-for-mingo
> 
> for you to fetch changes up to 1f121b03d058dd07199d8924373d3c52a207f63b:
> 
>   perf tools: Deal with kernel module names in '[]' correctly (2015-06-03 
> 10:02:38 -0300)
> 
> 
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fix 'perf probe' segfault when glob matching function without debuginfo 
> (Wang Nan)
> 
> - Remove newline char when reading event scale and unit (Madhavan Srinivasan)
> 
> - Deal with kernel module names in '[]' correctly (Wang Nan)
> 
> Infrastructure:
> 
> - Fix the search for the kernel DSO on the unified list (Arnaldo Carvalho de 
> Melo)
> 
> - Move tools/perf/util/include/linux/{kernel.h,list.h,poison.h} to 
> tools/include,
>   to be used in tools/lib/bpf/ (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo 
> 
> 
> Arnaldo Carvalho de Melo (1):
>   perf machine: Fix the search for the kernel DSO on the unified list
> 
> Madhavan Srinivasan (1):
>   perf tools: Remove newline char when reading event scale and unit
> 
> Wang Nan (4):
>   perf probe: Fix segfault when glob matching function without debuginfo
>   perf tools: Move linux/kernel.h to tools/include
>   tools: Move tools/perf/util/include/linux/{list.h,poison.h} to 
> tools/include
>   perf tools: Deal with kernel module names in '[]' correctly
> 
>  tools/{perf/util => }/include/linux/kernel.h |  4 +-
>  tools/{perf/util => }/include/linux/list.h   |  6 +--
>  tools/include/linux/poison.h |  1 +
>  tools/perf/MANIFEST  |  3 ++
>  tools/perf/tests/kmod-path.c | 72 
> 
>  tools/perf/util/dso.c| 47 --
>  tools/perf/util/dso.h|  2 +-
>  tools/perf/util/header.c |  8 ++--
>  tools/perf/util/include/linux/poison.h   |  1 -
>  tools/perf/util/machine.c| 22 -
>  tools/perf/util/pmu.c| 11 -
>  tools/perf/util/probe-event.c| 26 --
>  12 files changed, 179 insertions(+), 24 deletions(-)
>  rename tools/{perf/util => }/include/linux/kernel.h (97%)
>  rename tools/{perf/util => }/include/linux/list.h (90%)
>  create mode 100644 tools/include/linux/poison.h
>  delete mode 100644 tools/perf/util/include/linux/poison.h

Pulled, thanks a lot Arnaldo!

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] x86, setup: code clean of e820_reserve_setup_data()

2015-06-03 Thread Ingo Molnar

* Wei Yang  wrote:

> pa_data and found are highly related, so there is no need to set a found
> flag.
> 
> This patch removes the found and just return when pa_data is NULL.
> 
> Signed-off-by: Wei Yang 
> ---
>  arch/x86/kernel/setup.c |7 +++
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
> index 0a2421c..b95e653 100644
> --- a/arch/x86/kernel/setup.c
> +++ b/arch/x86/kernel/setup.c
> @@ -461,19 +461,18 @@ static void __init e820_reserve_setup_data(void)
>  {
>   struct setup_data *data;
>   u64 pa_data;
> - int found = 0;
>  
>   pa_data = boot_params.hdr.setup_data;
> + if (!pa_data)
> + return;
> +
>   while (pa_data) {
>   data = early_memremap(pa_data, sizeof(*data));
>   e820_update_range(pa_data, sizeof(*data)+data->len,
>E820_RAM, E820_RESERVED_KERN);
> - found = 1;
>   pa_data = data->next;
>   early_iounmap(data, sizeof(*data));
>   }
> - if (!found)
> - return;
>  
>   sanitize_e820_map(e820.map, ARRAY_SIZE(e820.map), _map);
>   memcpy(_saved, , sizeof(struct e820map));

This patch does not apply to Linus's latest tree.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4 1/7] staging:lustre: move tcpip abstraction

2015-06-03 Thread Sudip Mukherjee
On Wed, Jun 03, 2015 at 03:57:07PM -0400, James Simmons wrote:
> Rename libcfs/linux/linux-tcpip.c to lnet/lnet/lib-socket.c
looks like you have not just renamed the file, but there was also a change
in the #include which is not mentioned in the commit message.

--- drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.old  2015-06-04 
11:01:01.862374309 +0530
+++ drivers/staging/lustre/lnet/lnet/lib-socket.c   2015-06-04 
11:01:37.082375681 +0530
@@ -35,7 +35,8 @@
  */
 #define DEBUG_SUBSYSTEM S_LNET
 
-#include "../../../include/linux/libcfs/libcfs.h"
+#include "../../include/linux/libcfs/libcfs.h"
+#include "../../include/linux/lnet/lib-lnet.h"
 
 #include 
 #include 

regards
sudip
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 07/10] zsmalloc: introduce auto-compact support

2015-06-03 Thread Sergey Senozhatsky
On (06/04/15 13:57), Minchan Kim wrote:
> On Sat, May 30, 2015 at 12:05:25AM +0900, Sergey Senozhatsky wrote:
> > perform class compaction in zs_free(), if zs_free() has created
> > a ZS_ALMOST_EMPTY page. this is the most trivial `policy'.
> 
> Finally, I got realized your intention.
> 
> Actually, I had a plan to add /sys/block/zram0/compact_threshold_ratio
> which means to compact automatically when compr_data_size/mem_used_total
> is below than the threshold but I didn't try because it could be done
> by usertool.
> 
> Another reason I didn't try the approach is that it could scan all of
> zs_objects repeatedly withtout any freeing zspage in some corner cases,
> which could be big overhead we should prevent so we might add some
> heuristic. as an example, we could delay a few compaction trial when
> we found a few previous trials as all fails.

this is why I use zs_can_compact() -- to evict from zs_compact() as soon
as possible. so useless scans are minimized (well, at least expected). I'm
also thinking of a threshold-based solution -- do class auto-compaction
only if we can free X pages, for example.

the problem of compaction is that there is no compaction until you trigger
it.

and fragmented classes are not necessarily a win. if writes don't happen
to a fragmented class-X (and we basically can't tell if they will, nor we
can estimate; it's up to I/O and data patterns, compression algorithm, etc.)
then class-X stays fragmented w/o any use.


> It's simple design of mm/compaction.c to prevent pointless overhead
> but historically it made pains several times and required more
> complicated logics but it's still painful.
> 
> Other thing I found recently is that it's not always win zsmalloc
> for zram is not fragmented. The fragmented space could be used
> for storing upcoming compressed objects although it is wasted space
> at the moment but if we don't have any hole(ie, fragment space)
> via frequent compaction, zsmalloc should allocate a new zspage
> which could be allocated on movable pageblock by fallback of
> nonmovable pageblock request on highly memory pressure system
> so it accelerates fragment problem of the system memory.

yes, but compaction almost always leave classes fragmented. I think
it's a corner case, when the number of unused allocated objects was
exactly the same as the number of objects that we migrated and the
number of migrated objects was exactly N*maxobj_per_zspage, so we
left the class w/o any unused objects (OBJ_ALLOCATED == OBJ_USED).
classes have 'holes' after compaction.


> So, I want to pass the policy to userspace.
> If we found it's really trobule on userspace, then, we need more
> thinking.

well, it can be under config "aggressive compaction" or "automatic
compaction" option.

-ss

> Thanks.
> 
> > 
> > probably it would make zs_can_compact() to return an estimated number
> > of pages that potentially will be free and trigger auto-compaction
> > only when it's above some limit (e.g. at least 4 zs pages); or put it
> > under config option.
> > 
> > this also tweaks __zs_compact() -- we can't do reschedule
> > anymore, waiting for new pages in the current class. so we
> > compact as much as we can and return immediately if compaction
> > is not possible anymore.
> > 
> > auto-compaction is not a replacement of manual compaction.
> > 
> > compiled linux kernel with auto-compaction:
> > 
> > cat /sys/block/zram0/mm_stat
> > 2339885056 1601034235 16240762880 162407628819961 1106
> > 
> > performing additional manual compaction:
> > 
> > echo 1 > /sys/block/zram0/compact
> > cat /sys/block/zram0/mm_stat
> > 2339885056 1601034235 16240517120 162407628819961 1114
> > 
> > manual compaction was able to migrate additional 8 objects. so
> > auto-compaction is 'good enough'.
> > 
> > TEST
> > 
> > this test copies a 1.3G linux kernel tar to mounted zram disk,
> > and extracts it.
> > 
> > w/auto-compaction:
> > 
> > cat /sys/block/zram0/mm_stat
> >  11714562600686016086016327810
> > 
> > time tar xf linux-3.10.tar.gz -C linux
> > 
> > real0m16.970s
> > user0m15.247s
> > sys 0m8.477s
> > 
> > du -sh linux
> > 2.0Glinux
> > 
> > cat /sys/block/zram0/mm_stat
> > 3547353088 2993384270 30110883840 301108838424310  108
> > 
> > =
> > 
> > w/o auto compaction:
> > 
> > cat /sys/block/zram0/mm_stat
> >  11714562600081920081920327810
> > 
> > time tar xf linux-3.10.tar.gz -C linux
> > 
> > real0m16.983s
> > user0m15.267s
> > sys 0m8.417s
> > 
> > du -sh linux
> > 2.0Glinux
> > 
> > cat /sys/block/zram0/mm_stat
> > 3548917760 2993566924 30113177600 3011317760239280
> > 
> > =
> > 
> > iozone shows that auto-compacted code runs faster in several
> > tests, which is hardly trustworthy. 

Re: [Linaro-mm-sig] [RFCv3 2/2] dma-buf: add helpers for sharing attacher constraints with dma-parms

2015-06-03 Thread Sumit Semwal
On 3 June 2015 at 15:07, Hans Verkuil  wrote:
> On 06/03/15 10:41, Russell King - ARM Linux wrote:
>> On Wed, Jun 03, 2015 at 08:39:55AM +0200, Hans Verkuil wrote:
>>> Hi Sumit,
>>>
>>> On 05/05/2015 04:41 PM, Sumit Semwal wrote:
 Hi Russell, everyone,

 First up, sincere apologies for being awol for sometime; had some
 personal / medical things to take care of, and then I thought I'd wait
 for the merge window to get over before beginning to discuss this
 again.

 On 11 February 2015 at 21:53, Russell King - ARM Linux
  wrote:
> On Wed, Feb 11, 2015 at 01:20:24PM +0100, Marek Szyprowski wrote:
>> Hello,
>>
>> On 2015-02-11 12:12, Russell King - ARM Linux wrote:
>>> Which is a damn good reason to NAK it - by that admission, it's a 
>>> half-baked
>>> idea.
>>>
>>> If all we want to know is whether the importer can accept only 
>>> contiguous
>>> memory or not, make a flag to do that, and allow the exporter to test 
>>> this
>>> flag.  Don't over-engineer this to make it _seem_ like it can do 
>>> something
>>> that it actually totally fails with.
>>>
>>> As I've already pointed out, there's a major problem if you have already
>>> had a less restrictive attachment which has an active mapping, and a new
>>> more restrictive attachment comes along later.
>>>
>>> It seems from Rob's descriptions that we also need another flag in the
>>> importer to indicate whether it wants to have a valid struct page in the
>>> scatter list, or whether it (correctly) uses the DMA accessors on the
>>> scatter list - so that exporters can reject importers which are buggy.
>>
>> Okay, but flag-based approach also have limitations.
>
> Yes, the flag-based approach doesn't let you describe in detail what
> the importer can accept - which, given the issues that I've raised
> is a *good* thing.  We won't be misleading anyone into thinking that
> we can do something that's really half-baked, and which we have no
> present requirement for.
>
> This is precisely what Linus talks about when he says "don't over-
> engineer" - if we over-engineer this, we end up with something that
> sort-of works, and that's a bad thing.
>
> The Keep It Simple approach here makes total sense - what are our
> current requirements - to be able to say that an importer can only accept:
>   - contiguous memory rather than a scatterlist
>   - scatterlists with struct page pointers
>
> Does solving that need us to compare all the constraints of each and
> every importer, possibly ending up with constraints which can't be
> satisfied?  No.  Does the flag approach satisfy the requirements?  Yes.
>

 So, for basic constraint-sharing, we'll just go with the flag based
 approach, with a flag (best place for it is still dev->dma_params I
 suppose) for denoting contiguous or scatterlist. Is that agreed, then?
 Also, with this idea, of course, there won't be any helpers for trying
 to calculate constraints; it would be totally the exporter's
 responsibility to handle it via the attach() dma_buf_op if it wishes
 to.
>>>
>>> What's wrong with the proposed max_segment_count? Many media devices do
>>> have a limited max_segment_count and that should be taken into account.
>>
>> So what happens if you have a dma_buf exporter, and several dma_buf
>> importers.  One dma_buf importer attaches to the exporter, and asks
>> for the buffer, and starts making use of the buffer.  This export has
>> many scatterlist segments.
>>
>> Another dma_buf importer attaches to the same buffer, and now asks for
>> the buffer, but the number of scatterlist segments exceeds it
>> requirement.

So, in the midst of all the various directions this discussion has
taken, I seem to have missed to reiterate the base premise for this
suggestion [1] - that we can use this information to help implement a
deferred allocation logic - so that all the importers can attach
first, and the exporter can do the actual allocation on the first
map() call.
This is also inline with the prescribed usage of dma_buf_attach() /
dma_buf_map_attachment() sequence - ideally speaking, all
participating 'importers' of dma_buf should only attach first, and
then map() at a 'later' time, which is usually right before using the
buffer actually.
Note: at present, both DRI and V4L subsystems don't do that; while
proposing this RFC I had deliberately kept that separate, as it is a
related but orthogonal problem to solve. I guess I should address that
in parallel.
>>
>> You can't reallocate the buffer because it's in-use by another importer.
>> There is no way to revoke the buffer from the other importer.  So there
>> is no way to satisfy this importer's requirements.
>>
You're right; but in a deferred allocation mechanism, this
constraint-sharing can atleast help decide on the most 

Re: [PATCH 07/11] staging: rtl8192e: Remove dead code: dig_t::dbg_mode

2015-06-03 Thread Sudip Mukherjee
On Wed, Jun 03, 2015 at 08:21:02PM +0200, Mateusz Kulikowski wrote:
> On 03.06.2015 09:26, Sudip Mukherjee wrote:
> > On Tue, Jun 02, 2015 at 10:48:11PM +0200, Mateusz Kulikowski wrote:
> 
> No, I missed that - this one should also be removed - probably because of 
> similar naming (DbgMode, dbg_mode).
> Thanks for finding it - I'll fix that in v2.
> 
> Apart from that - did you had time/courage to analyze rest of the patches (so 
> I can send v2)?

at a first glance looked ok to me. I hope you have checked it on the
hardware as well. but maybe Dan can find something.
better send v2.

regards
sudip
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v4 3/3] dell-laptop: Use dell-rbtn instead i8042 filter when possible

2015-06-03 Thread Darren Hart
On Wed, Jun 03, 2015 at 10:15:09AM +0200, Pali Rohár wrote:
> On Tuesday 02 June 2015 20:55:05 Darren Hart wrote:
> > On Wed, May 27, 2015 at 07:52:13PM -0700, Darren Hart wrote:
> > > On Wed, May 27, 2015 at 11:28:25PM +0200, Pali Rohár wrote:
> > > > Until now module dell-laptop registered rfkill device which used i8042
> > > > filter function for receiving HW switch rfkill events (handling special
> > > > keycode).
> > > > 
> > > > But for some dell laptops there is native ACPI driver dell-rbtn which 
> > > > can
> > > > receive rfkill events (without i8042 hooks).
> > > > 
> > > > So this patch will combine best from both sides. It will use native ACPI
> > > > driver dell-rbtn for receiving events and dell-laptop SMBIOS interface 
> > > > for
> > > > enabling or disabling radio devices. If ACPI driver or device will not 
> > > > be
> > > > available fallback to i8042 filter function will be used.
> > > > 
> > > > Patch also changes module_init() to late_initcall() to ensure that init
> > > > function will be called after initializing dell-rbtn.c driver.
> > > > 
> > > > Signed-off-by: Pali Rohár 
> > > > Tested-by: Gabriele Mazzotta 
> > > > Signed-off-by: Darren Hart 
> > > 
> > > 
> > > Several basic checkpatch.pl errors in this one. Please always run 
> > > checkpatch.pl
> > > before submitting patches, these sorts of issues should be caught before 
> > > hitting
> > > the mailing list.
> > > 
> > > Please provide some details on the scenarios you have tested to verify 
> > > you have
> > > addressed the build and runtime issues reported.
> > > 
> > 
> > Checking in so this doesn't fall through the cracks. Do you have a v5 in the
> > works for the 4.2 merge window?
> > 
> > Thanks,
> > 
> 
> In last days I did not have time to look at it... When do you need to
> see v5 if it could go to 4.2?

No rush in general, I just wanted to make sure you weren't waiting on me while I
was waiting for you.

We're at the mercy of Linus' decision regarding how many RCs before he releases
4.1. I suspect we have another week, but it could be this weekend.

I like to have new functionality in linux-next for two weeks prior to sending a
pull to Linus. To meet that, you should really have it in this weekend. If Linus
releases 4.1 this weekend, that will just barely make two weeks before the end
of the merge window.

Thanks,

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: Question about HighPoint RocketRAID 642L SCSI driver conflict with Linux AHCI driver

2015-06-03 Thread Tejun Heo
Hello,

On Thu, Jun 04, 2015 at 01:05:49PM +0800, linux wrote:
> Dear Tejun Heo,
> 
>   This is HighPoint Linux Team. We found Linux AHCI driver since kernel 3.16
> has added ID (0x06421103) to support RocketRAID 642L which is not what we
> expected. If we want to load HighPoint RR642L RAID version Linux SCSI
> driver, it becomes conflict each other. This affects our customers who need
> to use our RAID version driver stack.
>
>   Hence,  this is to ask Linux how to solve this conflict with AHCI driver?
> and why Linux wants to add RR642L ID (0x06421103) into AHCI driver? Is there
> any way to prevent this in the future?

Hmmm... so, you're trying to load a proprietary driver but you're
having problem because in-kernel ahci attaches to the driver?

* If the driver is built-in, putting the proprietary driver before
  ahci in Makefile will make that driver probe before ahci.

* If module, ahci can be unbound by echoing the PCI bus ID to
  /sys/bus/pci/drivers/ahci/unbind and then bind that to the
  proprietary driver.

* Or you can tell pci-stub driver do grab the PCI ID so that ahci
  doesn't probe it at all.  Once the proprietary driver becomes
  available, the device can be rebound to the driver.

Thanks.

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC 07/24] x86/thinkpad_acpi: Use arch_nvram_ops methods instead of nvram_read_byte() and nvram_write_byte()

2015-06-03 Thread Darren Hart
On Wed, Jun 03, 2015 at 07:37:13AM -0300, Henrique de Moraes Holschuh wrote:
> On Wed, Jun 3, 2015, at 00:34, Darren Hart wrote:
> > On Tue, Jun 02, 2015 at 07:09:28AM -0300, Henrique de Moraes Holschuh
> > wrote:
> > > Test results were sent to me privately, and they are correct, so...
> > 
> > Finn, unless there is some compelling reason not to - like they are MBs
> > worth of
> > data, please submit these to the list in the future so we have them for
> > reference.
> 
> After I told him which exact bitmask to use on a T43 to test
> hotkey_source_mask, his test results can be summarized as "I could see
> no difference in behavior", which is *exactly* what I expected to
> happen.
> 
> If anything went wrong with the thinkpad-acpi NVRAM code, you'd notice a
> very large change in behavior (typical: hotkeys don't work, less
> typical: random hotkey keypresses, hotkey press bursts, low responsivity
> of hotkeys).

Perfect, thanks for the update so we have it recorded here on the list.

-- 
Darren Hart
Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Question about HighPoint RocketRAID 642L SCSI driver conflict with Linux AHCI driver

2015-06-03 Thread linux
Dear Tejun Heo,

  This is HighPoint Linux Team. We found Linux AHCI driver since kernel 3.16
has added ID (0x06421103) to support RocketRAID 642L which is not what we
expected. If we want to load HighPoint RR642L RAID version Linux SCSI
driver, it becomes conflict each other. This affects our customers who need
to use our RAID version driver stack.
  
  Hence,  this is to ask Linux how to solve this conflict with AHCI driver?
and why Linux wants to add RR642L ID (0x06421103) into AHCI driver? Is there
any way to prevent this in the future?

Best Regards,
HighPoint Linux Team

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 07/10] zsmalloc: introduce auto-compact support

2015-06-03 Thread Minchan Kim
On Sat, May 30, 2015 at 12:05:25AM +0900, Sergey Senozhatsky wrote:
> perform class compaction in zs_free(), if zs_free() has created
> a ZS_ALMOST_EMPTY page. this is the most trivial `policy'.

Finally, I got realized your intention.

Actually, I had a plan to add /sys/block/zram0/compact_threshold_ratio
which means to compact automatically when compr_data_size/mem_used_total
is below than the threshold but I didn't try because it could be done
by usertool.

Another reason I didn't try the approach is that it could scan all of
zs_objects repeatedly withtout any freeing zspage in some corner cases,
which could be big overhead we should prevent so we might add some
heuristic. as an example, we could delay a few compaction trial when
we found a few previous trials as all fails.
It's simple design of mm/compaction.c to prevent pointless overhead
but historically it made pains several times and required more
complicated logics but it's still painful.

Other thing I found recently is that it's not always win zsmalloc
for zram is not fragmented. The fragmented space could be used
for storing upcoming compressed objects although it is wasted space
at the moment but if we don't have any hole(ie, fragment space)
via frequent compaction, zsmalloc should allocate a new zspage
which could be allocated on movable pageblock by fallback of
nonmovable pageblock request on highly memory pressure system
so it accelerates fragment problem of the system memory.

So, I want to pass the policy to userspace.
If we found it's really trobule on userspace, then, we need more
thinking.

Thanks.

> 
> probably it would make zs_can_compact() to return an estimated number
> of pages that potentially will be free and trigger auto-compaction
> only when it's above some limit (e.g. at least 4 zs pages); or put it
> under config option.
> 
> this also tweaks __zs_compact() -- we can't do reschedule
> anymore, waiting for new pages in the current class. so we
> compact as much as we can and return immediately if compaction
> is not possible anymore.
> 
> auto-compaction is not a replacement of manual compaction.
> 
> compiled linux kernel with auto-compaction:
> 
> cat /sys/block/zram0/mm_stat
> 2339885056 1601034235 16240762880 162407628819961 1106
> 
> performing additional manual compaction:
> 
> echo 1 > /sys/block/zram0/compact
> cat /sys/block/zram0/mm_stat
> 2339885056 1601034235 16240517120 162407628819961 1114
> 
> manual compaction was able to migrate additional 8 objects. so
> auto-compaction is 'good enough'.
> 
> TEST
> 
> this test copies a 1.3G linux kernel tar to mounted zram disk,
> and extracts it.
> 
> w/auto-compaction:
> 
> cat /sys/block/zram0/mm_stat
>  11714562600686016086016327810
> 
> time tar xf linux-3.10.tar.gz -C linux
> 
> real0m16.970s
> user0m15.247s
> sys 0m8.477s
> 
> du -sh linux
> 2.0Glinux
> 
> cat /sys/block/zram0/mm_stat
> 3547353088 2993384270 30110883840 301108838424310  108
> 
> =
> 
> w/o auto compaction:
> 
> cat /sys/block/zram0/mm_stat
>  11714562600081920081920327810
> 
> time tar xf linux-3.10.tar.gz -C linux
> 
> real0m16.983s
> user0m15.267s
> sys 0m8.417s
> 
> du -sh linux
> 2.0Glinux
> 
> cat /sys/block/zram0/mm_stat
> 3548917760 2993566924 30113177600 3011317760239280
> 
> =
> 
> iozone shows that auto-compacted code runs faster in several
> tests, which is hardly trustworthy. anyway.
> 
> iozone -t 3 -R -r 16K -s 60M -I +Z
> 
>test   base   auto-compact (compacted 66123 objs)
>Initial write   1603682.25  1645112.38
>  Rewrite   2502243.31  2256570.31
> Read   7040860.00  7130575.00
>  Re-read   7036490.75  7066744.25
> Reverse Read   6617115.25  6155395.50
>  Stride read   6705085.50  6350030.38
>  Random read   6668497.75  6350129.38
>   Mixed workload   5494030.38  5091669.62
> Random write   2526834.44  2500977.81
>   Pwrite   1656874.00  1663796.94
>Pread   3322818.91  3359683.44
>   Fwrite   4090124.25  4099773.88
>Fread   10358916.25 10324409.75
> 
> Signed-off-by: Sergey Senozhatsky 
> ---
>  mm/zsmalloc.c | 25 +
>  1 file changed, 13 insertions(+), 12 deletions(-)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index c2a640a..70bf481 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1515,34 +1515,28 @@ static void __zs_compact(struct zs_pool *pool, struct 
> size_class *class)
>  
>   while ((dst_page = isolate_target_page(class))) {
>   cc.d_page = dst_page;
> - /*
> -  

[sched/preempt] BUG: kernel boot crashed

2015-06-03 Thread Fengguang Wu
Greetings,

0day kernel testing robot got the below dmesg and the first bad commit is

git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master

commit b30f0e3ffedfa52b1d67a302ae5860c49998e5e2
Author: Frederic Weisbecker 
AuthorDate: Tue May 12 16:41:49 2015 +0200
Commit: Ingo Molnar 
CommitDate: Tue May 19 08:39:12 2015 +0200

sched/preempt: Optimize preemption operations on __schedule() callers

__schedule() disables preemption and some of its callers
(the preempt_schedule*() family) also set PREEMPT_ACTIVE.

So we have two preempt_count() modifications that could be performed
at once.

Lets remove the preemption disablement from __schedule() and pull
this responsibility to its callers in order to optimize preempt_count()
operations in a single place.

Suggested-by: Linus Torvalds 
Signed-off-by: Frederic Weisbecker 
Signed-off-by: Peter Zijlstra (Intel) 
Cc: Peter Zijlstra 
Cc: Thomas Gleixner 
Link: 
http://lkml.kernel.org/r/1431441711-29753-5-git-send-email-fweis...@gmail.com
Signed-off-by: Ingo Molnar 

+++++
|| 90b62b5129 | b30f0e3ffe 
| f407a82586 |
+++++
| boot_successes | 195| 0  
| 0  |
| boot_failures  | 0  | 65 
| 100|
| BUG:kernel_boot_hang   | 0  | 58 
| 76 |
| BUG:kernel_boot_crashed| 0  | 4  
| 18 |
| BUG:unable_to_handle_kernel| 0  | 3  
| 6  |
| WARNING:at_lib/kobject.c:#kobject_add_internal()   | 0  | 2  
| 6  |
| Oops   | 0  | 1  
| 6  |
| Oops:#[##]PREEMPT_PREEMPT_x_x  | 0  | 1  
||
| EIP_is_at_sock_alloc   | 0  | 2  
||
| Kernel_panic-not_syncing:Fatal_exception   | 0  | 2  
| 6  |
| backtrace:platform_device_add  | 0  | 2  
| 6  |
| backtrace:regulator_dummy_init | 0  | 2  
| 6  |
| backtrace:regulator_init   | 0  | 2  
| 6  |
| backtrace:kernel_init_freeable | 0  | 2  
| 6  |
| backtrace:kset_create_and_add  | 0  | 2  
| 6  |
| backtrace:of_init  | 0  | 2  
| 6  |
| backtrace:__netlink_kernel_create  | 0  | 2  
||
| backtrace:rtnetlink_net_init   | 0  | 2  
||
| backtrace:ops_init | 0  | 2  
| 6  |
| backtrace:register_pernet_subsys   | 0  | 2  
| 6  |
| backtrace:rtnetlink_init   | 0  | 2  
||
| backtrace:netlink_proto_init   | 0  | 2  
| 6  |
| WARNING:at_kernel/trace/trace.c:#register_tracer() | 0  | 0  
| 1  |
| WARNING:at_fs/sysfs/dir.c:#sysfs_warn_dup()| 0  | 0  
| 6  |
| WARNING:at_fs/proc/generic.c:#__proc_create()  | 0  | 0  
| 6  |
| EIP_is_at_parameq  | 0  | 0  
| 6  |
| backtrace:__class_register | 0  | 0  
| 6  |
| backtrace:cpuidle_add_interface| 0  | 0  
| 6  |
| backtrace:cpuidle_init | 0  | 0  
| 6  |
| backtrace:proc_mkdir_data  | 0  | 0  
| 6  |
| backtrace:netfilter_net_init   | 0  | 0  
| 6  |
| backtrace:netfilter_init   | 0  | 0  
| 6  |
| backtrace:sock_init| 0  | 0  
| 6  |
| backtrace:proc_create_data | 0  | 0  
| 6  |
| backtrace:netlink_net_init | 0  | 0  
| 6  |
| backtrace:parse_args   | 0  | 0  
| 6  |
+++++

[0.132797] clocksource jiffies: mask: 0x max_cycles: 

[sched] WARNING: CPU: 0 PID: 10 at kernel/kthread.c:333 __kthread_bind_mask()

2015-06-03 Thread Fengguang Wu
Hi Peter,

0day kernel testing robot got the below dmesg and the first bad commit is

git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core

commit 645566620ce8feea0970122c4a23907aa217d7f0
Author: Peter Zijlstra 
AuthorDate: Fri May 15 17:43:34 2015 +0200
Commit: Peter Zijlstra 
CommitDate: Tue Jun 2 12:01:40 2015 +0200

sched: Fix a race between __kthread_bind() and sched_setaffinity()

Because sched_setscheduler() checks p->flags & PF_NO_SETAFFINITY
without locks, a caller might observe an old value and race with the
set_cpus_allowed_ptr() call from __kthread_bind() and effectively undo
it.

__kthread_bind()
  do_set_cpus_allowed()

  sched_setaffinity()
if (p->flags & 
PF_NO_SETAFFINITIY)
set_cpus_allowed_ptr()
  p->flags |= PF_NO_SETAFFINITY

Fix the issue by putting everything under the regular scheduler locks.

This also closes a hole in the serialization of
task_struct::{nr_,}cpus_allowed.

Cc: dedeki...@gmail.com
Cc: mgor...@suse.de
Cc: rost...@goodmis.org
Cc: juri.le...@arm.com
Cc: Oleg Nesterov 
Cc: mi...@kernel.org
Cc: r...@redhat.com
Acked-by: Tejun Heo 
Signed-off-by: Peter Zijlstra (Intel) 
Link: http://lkml.kernel.org/r/20150515154833.545640...@infradead.org

+++++
|| cfd0d66561 | 645566620c 
| 86da5c5884 |
+++++
| boot_successes | 150| 2  
| 9  |
| boot_failures  | 0  | 9  
| 3  |
| WARNING:at_kernel/kthread.c:#__kthread_bind_mask() | 0  | 9  
| 3  |
| backtrace:rescuer_thread   | 0  | 9  
| 3  |
+++++

[2.425398] tun: (C) 1999-2004 Max Krasnyansky 
[2.427338] pcnet32: pcnet32.c:v1.35 21.Apr.2008 tsbog...@alpha.franken.de
[2.442390] [ cut here ]
[2.443944] WARNING: CPU: 0 PID: 10 at kernel/kthread.c:333 
__kthread_bind_mask+0x34/0x6e()
[2.446978] Modules linked in:
[2.448359] CPU: 0 PID: 10 Comm: khelper Not tainted 
4.1.0-rc6-00314-g6455666 #4
[2.450990] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 
1.7.5-20140531_083030-gandalf 04/01/2014
[2.454132]  0009 88000f643d68 81a3df14 
0b02
[2.470295]   88000f643da8 810f308f 
0f643da8
[2.503291]  8110d116 88000f55d580 88000f5240c0 
88000f4936e0
[2.506510] Call Trace:
[2.520770]  [] dump_stack+0x4c/0x65
[2.522479]  [] warn_slowpath_common+0xa1/0xbb
[2.524334]  [] ? __kthread_bind_mask+0x34/0x6e
[2.526219]  [] warn_slowpath_null+0x1a/0x1c
[2.528069]  [] __kthread_bind_mask+0x34/0x6e
[2.529925]  [] kthread_bind_mask+0x13/0x15
[2.531738]  [] worker_attach_to_pool+0x39/0x7c
[2.546650]  [] rescuer_thread+0x130/0x318
[2.548484]  [] ? cancel_delayed_work_sync+0x15/0x15
[2.550411]  [] ? cancel_delayed_work_sync+0x15/0x15
[2.552207]  [] kthread+0xf8/0x100
[2.553864]  [] ? kthread_create_on_node+0x184/0x184
[2.555795]  [] ret_from_fork+0x42/0x70
[2.557538]  [] ? kthread_create_on_node+0x184/0x184
[2.572520] ---[ end trace 362b92c9255ab666 ]---
[2.574163] [ cut here ]

git bisect start 86da5c5884b34736ff50473372600c9324716df7 
8af660e3a2d0740108df598ef757eb6b61953b0e --
git bisect  bad 7629b214f83ecb8c4890ef4773492881b0fd8802  # 18:40 23- 
28  Merge branch 'sched/core'
git bisect good c4cf50ed13b30a929c5538040c9f2115672c6f45  # 18:45 50+  
1  Merge branch 'sched/urgent'
git bisect  bad b2731dabb650c8d2dd35c787ef94fc6e48a47415  # 18:57 22- 
15  Cleanup: preempt notifiers: disallow hlist_del within unsafe iteration
git bisect  bad 8c224cd2989fb7138d0bb5ce40fd0c6ebe16ae2f  # 19:10  5-  
5  revert 095bebf61a46 ("sched/numa: Do not move past the balance point if 
unbalanced")
git bisect  bad 645566620ce8feea0970122c4a23907aa217d7f0  # 19:10  0-  
9  sched: Fix a race between __kthread_bind() and sched_setaffinity()
git bisect good cfd0d66561af813f3595f2c53d433ea2fc11e619  # 19:13 50+  
0  Merge branch 'sched/urgent'
# first bad commit: [645566620ce8feea0970122c4a23907aa217d7f0] sched: Fix a 
race between __kthread_bind() and sched_setaffinity()
git bisect good cfd0d66561af813f3595f2c53d433ea2fc11e619  # 19:17150+  

Re: [PATCH 04/11] mtd: ofpart: do not fail probe when no partitions exist

2015-06-03 Thread Michal Suchanek
On 4 June 2015 at 00:58, Marek Vasut  wrote:
> On Wednesday, June 03, 2015 at 11:26:40 PM, Michal Suchanek wrote:
>> On Exynos it is necessary to set SPI controller parameters that apply to
>> a SPI slave in a DT subnode of the slave device. The ofpart code returns
>> an error when there are subnodes of the SPI flash but no partitions are
>> found. Change this condition to a warning so that flash without
>> partitions can be accessed on Exynos.
>
> I have to admit the rationale for this patch is not very clear to me, sorry.
> Can you please explain this a bit more ?

This is how the DT entry for SPI slave looks with s3c64xx:
flash: m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <4000>;
linux,max_tx_len = <65536>;
m25p,fast-read;
controller-data {
samsung,spi-feedback-delay = <0>;
};
};

this is example of flash partitions:
flash@0 {
#address-cells = <1>;
#size-cells = <1>;

partition@0 {
label = "u-boot";
reg = <0x000 0x10>;
read-only;
};

uimage@10 {
reg = <0x010 0x20>;
};
};

The parser ignores any flash without subnodes and returns 0 (no
partititon). When there is a subnode it assumes the flash is
partitioned and tries to parse the subnodes as partitions. When there
are subnodes and none parses as partition an error is returned. As
shown above it is valid to have subnodes on unpartitioned flash.

When an error is returned from a partition parser the mtdpart code
passes on this error to the flash probe function and the proble of the
flash fails.

Thanks

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFT v2 36/48] genirq, arm: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Krzysztof Kozlowski
On 04.06.2015 13:13, Jiang Liu wrote:
> Now most IRQ flow handlers make no use of the first parameter 'irq'.
> And for those who do make use of 'irq', we could easily get the irq
> number through irq_desc->irq_data->irq. So kill the first parameter
> 'irq' of irq_flow_handler_t.
> 
> To ease review, I have split the changes into several parts, though
> they should be merge as one to support bisecting.
> 
> Signed-off-by: Jiang Liu 
> Signed-off-by: Hans Ulli Kroll 
> ---
>  arch/arm/common/it8152.c   |2 +-
>  arch/arm/common/locomo.c   |2 +-
>  arch/arm/common/sa.c   |4 ++--
>  arch/arm/include/asm/hardware/it8152.h |2 +-
>  arch/arm/include/asm/mach/irq.h|4 ++--
>  arch/arm/mach-dove/irq.c   |4 ++--
>  arch/arm/mach-footbridge/isa-irq.c |4 ++--
>  arch/arm/mach-gemini/gpio.c|2 +-
>  arch/arm/mach-imx/3ds_debugboard.c |2 +-
>  arch/arm/mach-imx/mach-mx31ads.c   |2 +-
>  arch/arm/mach-iop13xx/msi.c|2 +-
>  arch/arm/mach-lpc32xx/irq.c|4 ++--
>  arch/arm/mach-netx/generic.c   |2 +-
>  arch/arm/mach-omap1/fpga.c |2 +-
>  arch/arm/mach-omap2/prm_common.c   |2 +-
>  arch/arm/mach-pxa/balloon3.c   |2 +-
>  arch/arm/mach-pxa/cm-x2xx-pci.c|4 ++--
>  arch/arm/mach-pxa/lpd270.c |2 +-
>  arch/arm/mach-pxa/pcm990-baseboard.c   |2 +-
>  arch/arm/mach-pxa/viper.c  |2 +-
>  arch/arm/mach-pxa/zeus.c   |2 +-
>  arch/arm/mach-rpc/ecard.c  |2 +-
>  arch/arm/mach-s3c24xx/bast-irq.c   |3 +--
>  arch/arm/mach-s3c64xx/common.c |8 

For s3c24xx/s3c64xx:
Acked-by: Krzysztof Kozlowski 

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFT v2 46/48] genirq, irqchip: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Krzysztof Kozlowski
On 04.06.2015 13:13, Jiang Liu wrote:
> Now most IRQ flow handlers make no use of the first parameter 'irq'.
> And for those who do make use of 'irq', we could easily get the irq
> number through irq_desc->irq_data->irq. So kill the first parameter
> 'irq' of irq_flow_handler_t.
> 
> To ease review, I have split the changes into several parts, though
> they should be merge as one to support bisecting.
> 
> Signed-off-by: Jiang Liu 
> Acked-by: Ralf Baechle 
> ---
>  drivers/irqchip/exynos-combiner.c|4 ++--

For exynos:
Acked-by: Krzysztof Kozlowski 

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the block tree with Linus' tree

2015-06-03 Thread Stephen Rothwell
Hi Jens,

Today's linux-next merge of the block tree got a conflict in
mm/backing-dev.c between commit aad653a0bc09 ("block: discard
bdi_unregister() in favour of bdi_destroy()") from Linus' tree and
various commits from the block tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required - though it may be worth while merging what you
had Linus merge and fixing up the conflicts yourself).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc mm/backing-dev.c
index 000e7b3b9896,887d72a85b5e..
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@@ -387,49 -744,91 +744,75 @@@ int bdi_init(struct backing_dev_info *b
bdi->min_ratio = 0;
bdi->max_ratio = 100;
bdi->max_prop_frac = FPROP_FRAC_BASE;
-   spin_lock_init(>wb_lock);
INIT_LIST_HEAD(>bdi_list);
-   INIT_LIST_HEAD(>work_list);
+   init_waitqueue_head(>wb_waitq);
  
-   bdi_wb_init(>wb, bdi);
+   err = wb_init(>wb, bdi, GFP_KERNEL);
+   if (err)
+   return err;
  
-   for (i = 0; i < NR_BDI_STAT_ITEMS; i++) {
-   err = percpu_counter_init(>bdi_stat[i], 0, GFP_KERNEL);
-   if (err)
-   goto err;
-   }
+   bdi->wb_congested.state = 0;
+   bdi->wb.congested = >wb_congested;
  
-   bdi->dirty_exceeded = 0;
+   cgwb_bdi_init(bdi);
+   return 0;
+ }
+ EXPORT_SYMBOL(bdi_init);
  
-   bdi->bw_time_stamp = jiffies;
-   bdi->written_stamp = 0;
+ int bdi_register(struct backing_dev_info *bdi, struct device *parent,
+   const char *fmt, ...)
+ {
+   va_list args;
+   struct device *dev;
  
-   bdi->balanced_dirty_ratelimit = INIT_BW;
-   bdi->dirty_ratelimit = INIT_BW;
-   bdi->write_bandwidth = INIT_BW;
-   bdi->avg_write_bandwidth = INIT_BW;
+   if (bdi->dev)   /* The driver needs to use separate queues per device */
+   return 0;
  
-   err = fprop_local_init_percpu(>completions, GFP_KERNEL);
+   va_start(args, fmt);
+   dev = device_create_vargs(bdi_class, parent, MKDEV(0, 0), bdi, fmt, 
args);
+   va_end(args);
+   if (IS_ERR(dev))
+   return PTR_ERR(dev);
  
-   if (err) {
- err:
-   while (i--)
-   percpu_counter_destroy(>bdi_stat[i]);
-   }
+   bdi->dev = dev;
  
-   return err;
+   bdi_debug_register(bdi, dev_name(dev));
+   set_bit(WB_registered, >wb.state);
+ 
+   spin_lock_bh(_lock);
+   list_add_tail_rcu(>bdi_list, _list);
+   spin_unlock_bh(_lock);
+ 
+   trace_writeback_bdi_register(bdi);
+   return 0;
  }
- EXPORT_SYMBOL(bdi_init);
+ EXPORT_SYMBOL(bdi_register);
  
- void bdi_destroy(struct backing_dev_info *bdi)
+ int bdi_register_dev(struct backing_dev_info *bdi, dev_t dev)
  {
-   int i;
+   return bdi_register(bdi, NULL, "%u:%u", MAJOR(dev), MINOR(dev));
+ }
+ EXPORT_SYMBOL(bdi_register_dev);
  
-   bdi_wb_shutdown(bdi);
-   bdi_set_min_ratio(bdi, 0);
+ /*
+  * Remove bdi from bdi_list, and ensure that it is no longer visible
+  */
+ static void bdi_remove_from_list(struct backing_dev_info *bdi)
+ {
+   spin_lock_bh(_lock);
+   list_del_rcu(>bdi_list);
+   spin_unlock_bh(_lock);
  
-   WARN_ON(!list_empty(>work_list));
-   WARN_ON(delayed_work_pending(>wb.dwork));
+   synchronize_rcu_expedited();
+ }
+ 
 -/*
 - * Called when the device behind @bdi has been removed or ejected.
 - *
 - * We can't really do much here except for reducing the dirty ratio at
 - * the moment.  In the future we should be able to set a flag so that
 - * the filesystem can handle errors at mark_inode_dirty time instead
 - * of only at writeback time.
 - */
 -void bdi_unregister(struct backing_dev_info *bdi)
 -{
 -  if (WARN_ON_ONCE(!bdi->dev))
 -  return;
 -
 -  bdi_set_min_ratio(bdi, 0);
 -}
 -EXPORT_SYMBOL(bdi_unregister);
 -
+ void bdi_destroy(struct backing_dev_info *bdi)
+ {
+   /* make sure nobody finds us on the bdi_list anymore */
+   bdi_remove_from_list(bdi);
+   wb_shutdown(>wb);
++  bdi_set_min_ratio(bdi, 0);
+   cgwb_bdi_destroy(bdi);
  
if (bdi->dev) {
bdi_debug_unregister(bdi);


pgpFKxwfALVHs.pgp
Description: OpenPGP digital signature


Re: [PATCH RESEND] sched: prefer an idle cpu vs an idle sibling for BALANCE_WAKE

2015-06-03 Thread Mike Galbraith
On Wed, 2015-06-03 at 16:34 -0400, Josef Bacik wrote:
> On 06/03/2015 01:43 PM, Mike Galbraith wrote:

> > There are also other loads like your server where waking to an idle cpu
> > dominates all else, pgbench is one of those.  In that case, you've got a
> > 1:N waker/wakee relationship, and what matters above ALL else is when
> > the mother of all work (the single server thread) wants a CPU, it had
> > better get it NOW, else the load stalls.  Likewise, 'mom' being
> > preempted hurts truckloads.  Perhaps your server has a similar thing
> > going on, keeping wakees the hell away from the waker rules all.
> >
> 
> Yeah our server has two waker threads (one per numa node) and then the N 
> number of wakee threads.  I'll run tbench and pgbench with the new 
> patches and see if there's a degredation.  Thanks,

If you look for wake_wide(), it could perhaps be used to select wider
search for only the right flavor load component when BALANCE_WAKE is
set.  That would let the cache lovers in your box continue to perform
while improving the 1:N component.  That wider search still needs to
become cheaper though, low hanging fruit being to stop searching when
you find load = 0.. but you may meet the energy efficient folks, who
iirc want to make it even more expensive.

wake_wide() inadvertently helped another sore spot btw - a gaggle of
pretty light tasks being awakened from an interrupt source tended to
cluster around that source, preventing such loads from being all they
can be in a very similar manner.  Xen (shudder;) showed that nicely in
older kernels, due to the way its weird dom0 gizmo works.

-Mike



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFT v2 10/48] irqchip: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Krzysztof Kozlowski
On 04.06.2015 13:13, Jiang Liu wrote:
> Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
> already have a pointer to corresponding irq_desc.
> 
> Signed-off-by: Jiang Liu 
> ---
>  drivers/irqchip/exynos-combiner.c   |4 ++--

For exynos:
Acked-by: Krzysztof Kozlowski 

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v3] fusion: remove dead MTRR code

2015-06-03 Thread Sreekanth Reddy
Hi Luis,

Sorry for delay in response. Actually I was looking for the history of
this section of code but I couldn't find it. Anyway this is dead code
and we are fine with removing this dead code.

James,

Please consider this patch as Acked-by: "Sreekanth Reddy"


Regards,
Sreekanth


On Wed, Apr 22, 2015 at 2:16 AM, Luis R. Rodriguez
 wrote:
> From: "Luis R. Rodriguez" 
>
> If and when this gets enabled the driver could should split
> up IO memory space properly and that is quite a bit of work.
> Just remove the uncommented dead MTRR code then.
>
> There are a few motivations for this:
>
> a) Take advantage of PAT when available
>
> b) Help bury MTRR code away, MTRR is architecture specific and on
>x86 its replaced by PAT
>
> c) Help with the goal of eventually using _PAGE_CACHE_UC over
>_PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
>de33c442e titled "x86 PAT: fix performance drop for glx,
>use UC minus for ioremap(), ioremap_nocache() and
>pci_mmap_page_range()")
>
> Cc: Toshi Kani 
> Cc: Christoph Hellwig 
> Cc: Nagalakshmi Nandigama 
> Cc: Praveen Krishnamoorthy 
> Cc: Sreekanth Reddy 
> Cc: Abhijit Mahajan 
> Cc: linux-s...@vger.kernel.org
> Cc: Andy Lutomirski 
> Cc: Suresh Siddha 
> Cc: Ingo Molnar 
> Cc: Thomas Gleixner 
> Cc: Juergen Gross 
> Cc: Daniel Vetter 
> Cc: Juergen Gross 
> Cc: Dave Airlie 
> Cc: Antonino Daplas 
> Cc: Tomi Valkeinen 
> Cc: Ville Syrjälä 
> Cc: Mel Gorman 
> Cc: Vlastimil Babka 
> Cc: Borislav Petkov 
> Cc: Davidlohr Bueso 
> Cc: Jean-Christophe Plagniol-Villard 
> Cc: mpt-fusionlinux@avagotech.com
> Cc: linux-s...@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Luis R. Rodriguez 
> ---
>  drivers/message/fusion/mptbase.c | 24 
>  drivers/message/fusion/mptbase.h |  1 -
>  2 files changed, 25 deletions(-)
>
> diff --git a/drivers/message/fusion/mptbase.c 
> b/drivers/message/fusion/mptbase.c
> index 187f836..5dcc031 100644
> --- a/drivers/message/fusion/mptbase.c
> +++ b/drivers/message/fusion/mptbase.c
> @@ -59,10 +59,6 @@
>  #include 
>  #include/* needed for in_interrupt() proto */
>  #include 
> -#include 
> -#ifdef CONFIG_MTRR
> -#include 
> -#endif
>  #include 
>  #include 
>
> @@ -2820,13 +2816,6 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
> pci_disable_device(ioc->pcidev);
> pci_release_selected_regions(ioc->pcidev, ioc->bars);
>
> -#if defined(CONFIG_MTRR) && 0
> -   if (ioc->mtrr_reg > 0) {
> -   mtrr_del(ioc->mtrr_reg, 0, 0);
> -   dprintk(ioc, printk(MYIOC_s_INFO_FMT "MTRR region 
> de-registered\n", ioc->name));
> -   }
> -#endif
> -
> /*  Zap the adapter lookup ptr!  */
> list_del(>list);
>
> @@ -4512,19 +4501,6 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
>
> ioc->req_frames_low_dma = (u32) (alloc_dma & 0x);
>
> -#if defined(CONFIG_MTRR) && 0
> -   /*
> -*  Enable Write Combining MTRR for IOC's memory region.
> -*  (at least as much as we can; "size and base must be
> -*  multiples of 4 kiB"
> -*/
> -   ioc->mtrr_reg = mtrr_add(ioc->req_frames_dma,
> -sz,
> -MTRR_TYPE_WRCOMB, 1);
> -   dprintk(ioc, printk(MYIOC_s_DEBUG_FMT "MTRR region registered 
> (base:size=%08x:%x)\n",
> -   ioc->name, ioc->req_frames_dma, sz));
> -#endif
> -
> for (i = 0; i < ioc->req_depth; i++) {
> alloc_dma += ioc->req_sz;
> mem += ioc->req_sz;
> diff --git a/drivers/message/fusion/mptbase.h 
> b/drivers/message/fusion/mptbase.h
> index 8f14090..813d463 100644
> --- a/drivers/message/fusion/mptbase.h
> +++ b/drivers/message/fusion/mptbase.h
> @@ -671,7 +671,6 @@ typedef struct _MPT_ADAPTER
> u8  *HostPageBuffer; /* SAS - host page buffer 
> support */
> u32 HostPageBuffer_sz;
> dma_addr_t  HostPageBuffer_dma;
> -   int  mtrr_reg;
> struct pci_dev  *pcidev;/* struct pci_dev pointer */
> int bars;   /* bitmask of BAR's that must 
> be configured */
> int msi_enable;
> --
> 2.3.2.209.gd67f9d5.dirty
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH v9 2/6] arm64: hi6220: Document devicetree bindings for Hisilicon hi6220 SoC

2015-06-03 Thread Rob Herring
On Fri, May 29, 2015 at 8:50 PM, Bintian Wang  wrote:
> This patch adds documentation for the devicetree bindings used by the
> DT files of Hisilicon hi6220 SoC mobile platform.
>
> Signed-off-by: Bintian Wang 
> Suggested-by: Arnd Bergmann 
> Acked-by: Haojian Zhuang 
> Acked-by: Stephen Boyd 

Acked-by: Rob Herring 

One minor comment below.

> ---
>  .../bindings/arm/hisilicon/hisilicon.txt   |   87 
> 
>  1 file changed, 87 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt 
> b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
> index 35b1bd4..f67d0f3 100644
> --- a/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
> +++ b/Documentation/devicetree/bindings/arm/hisilicon/hisilicon.txt
> @@ -1,5 +1,8 @@
>  Hisilicon Platforms Device Tree Bindings
>  
> +Hi6220 SoC
> +Required root node properties:
> +   - compatible = "hisilicon,hi6220";
>
>  Hi4511 Board
>  Required root node properties:
> @@ -13,6 +16,9 @@ HiP01 ca9x2 Board
>  Required root node properties:
> - compatible = "hisilicon,hip01-ca9x2";
>
> +HiKey Board
> +Required root node properties:
> +   - compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
>
>  Hisilicon system controller
>
> @@ -41,6 +47,87 @@ Example:
> };
>
>  ---
> +Hisilicon Hi6220 system controller
> +
> +Required properties:
> +- compatible : "hisilicon,hi6220-sysctrl"
> +- reg : Register address and size
> +- #clock-cells: should be set to 1, many clock registers are defined
> +  under this controller and this property must be present.
> +
> +Hisilicon designs this controller as one of the system controllers,
> +its main functions are the same as Hisilicon system controller, but
> +the register offset of some core modules are different.
> +
> +Example:
> +   /*for Hi6220*/
> +   sys_ctrl: sys_ctrl {

You should have the unit address in the name here. Same with the
follow examples.

> +   compatible = "hisilicon,hi6220-sysctrl", "syscon";
> +   reg = <0x0 0xf703 0x0 0x2000>;
> +   #clock-cells = <1>;
> +   };
> +
> +
> +Hisilicon Hi6220 Power Always ON domain controller
> +
> +Required properties:
> +- compatible : "hisilicon,hi6220-aoctrl"
> +- reg : Register address and size
> +- #clock-cells: should be set to 1, many clock registers are defined
> +  under this controller and this property must be present.
> +
> +Hisilicon designs this system controller to control the power always
> +on domain for mobile platform.
> +
> +Example:
> +   /*for Hi6220*/
> +   ao_ctrl: ao_ctrl {
> +   compatible = "hisilicon,hi6220-aoctrl", "syscon";
> +   reg = <0x0 0xf780 0x0 0x2000>;
> +   #clock-cells = <1>;
> +   };
> +
> +
> +Hisilicon Hi6220 Media domain controller
> +
> +Required properties:
> +- compatible : "hisilicon,hi6220-mediactrl"
> +- reg : Register address and size
> +- #clock-cells: should be set to 1, many clock registers are defined
> +  under this controller and this property must be present.
> +
> +Hisilicon designs this system controller to control the multimedia
> +domain(e.g. codec, G3D ...) for mobile platform.
> +
> +Example:
> +   /*for Hi6220*/
> +   media_ctrl: media_ctrl {
> +   compatible = "hisilicon,hi6220-mediactrl", "syscon";
> +   reg = <0x0 0xf441 0x0 0x1000>;
> +   #clock-cells = <1>;
> +   };
> +
> +
> +Hisilicon Hi6220 Power Management domain controller
> +
> +Required properties:
> +- compatible : "hisilicon,hi6220-pmctrl"
> +- reg : Register address and size
> +- #clock-cells: should be set to 1, some clock registers are define
> +  under this controller and this property must be present.
> +
> +Hisilicon designs this system controller to control the power management
> +domain for mobile platform.
> +
> +Example:
> +   /*for Hi6220*/
> +   pm_ctrl: pm_ctrl {
> +   compatible = "hisilicon,hi6220-pmctrl", "syscon";
> +   reg = <0x0 0xf7032000 0x0 0x1000>;
> +   #clock-cells = <1>;
> +   };
> +
> +---
>  Hisilicon HiP01 system controller
>
>  Required properties:
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the block tree with Linus' tree

2015-06-03 Thread Stephen Rothwell
Hi Jens,

Today's linux-next merge of the block tree got a conflict in
drivers/block/nvme-core.c between commit fec558b5f178 ("NVMe: fix type
warning on 32-bit") from Linus' tree and commit d29ec8241c10 ("nvme:
submit internal commands through the block layer") from the block tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/block/nvme-core.c
index 683dff272562,513908ff46c4..
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@@ -1745,12 -1714,10 +1714,11 @@@ static int nvme_submit_io(struct nvme_n
struct nvme_dev *dev = ns->dev;
struct nvme_user_io io;
struct nvme_command c;
-   unsigned length, meta_len, prp_len;
+   unsigned length, meta_len;
int status, write;
-   struct nvme_iod *iod;
dma_addr_t meta_dma = 0;
void *meta = NULL;
 +  void __user *metadata;
  
if (copy_from_user(, uio, sizeof(io)))
return -EFAULT;
@@@ -1778,18 -1731,21 +1732,23 @@@
return -EINVAL;
}
  
-   if (IS_ERR(iod))
-   return PTR_ERR(iod);
+   length = (io.nblocks + 1) << ns->lba_shift;
+   meta_len = (io.nblocks + 1) * ns->ms;
+   write = io.opcode & 1;
++  metadata = (void __user *)(unsigned long)io.metadata;
  
-   prp_len = nvme_setup_prps(dev, iod, length, GFP_KERNEL);
-   if (length != prp_len) {
-   status = -ENOMEM;
-   goto unmap;
-   }
if (meta_len) {
-   meta = dma_alloc_coherent(>pci_dev->dev, meta_len,
+   if (((io.metadata & 3) || !io.metadata) && !ns->ext)
+   return -EINVAL;
+ 
+   if (ns->ext) {
+   length += meta_len;
+   meta_len = 0;
+   }
+ 
+   meta = dma_alloc_coherent(dev->dev, meta_len,
_dma, GFP_KERNEL);
 +
if (!meta) {
status = -ENOMEM;
goto unmap;
@@@ -1813,19 -1770,18 +1772,17 @@@
c.rw.reftag = cpu_to_le32(io.reftag);
c.rw.apptag = cpu_to_le16(io.apptag);
c.rw.appmask = cpu_to_le16(io.appmask);
-   c.rw.prp1 = cpu_to_le64(sg_dma_address(iod->sg));
-   c.rw.prp2 = cpu_to_le64(iod->first_dma);
c.rw.metadata = cpu_to_le64(meta_dma);
-   status = nvme_submit_io_cmd(dev, ns, , NULL);
+ 
+   status = __nvme_submit_sync_cmd(ns->queue, , NULL,
+   (void __user *)io.addr, length, NULL, 0);
   unmap:
-   nvme_unmap_user_pages(dev, write, iod);
-   nvme_free_iod(dev, iod);
if (meta) {
if (status == NVME_SC_SUCCESS && !write) {
 -  if (copy_to_user((void __user *)io.metadata, meta,
 -  meta_len))
 +  if (copy_to_user(metadata, meta, meta_len))
status = -EFAULT;
}
-   dma_free_coherent(>pci_dev->dev, meta_len, meta, meta_dma);
+   dma_free_coherent(dev->dev, meta_len, meta, meta_dma);
}
return status;
  }


pgpf2avOsz4L4.pgp
Description: OpenPGP digital signature


Re: [PATCH 08/11] MTD: m25p80: Add option to limit SPI transfer size.

2015-06-03 Thread Michal Suchanek
On 4 June 2015 at 01:03, Marek Vasut  wrote:
> On Wednesday, June 03, 2015 at 11:26:41 PM, Michal Suchanek wrote:
>> On sunxi the SPI controller currently does not have DMA support and fails
>> any transfer larger than 63 bytes.
>>
>> On Exynos the pl330 DMA controller fails any transfer larger than 64kb
>> when using slower speed like 40MHz and any transfer larger than 128bytes
>> when running at 133MHz.
>
> This smells more like some corruption of the data on the bus or something
> even more obscure.

If the data was corrupted you would get corrupted data and not
transfer failure. AFAIK there is no checksum or anything. I actually
do get corrupted data when I use wrong feedback delay setting.

>
>> The best thing is that in both cases the controller can just lock up and
>> never finish potentially leaving the hardware in unusable state.
>>
>> So it is required that the m25p80 driver actively prevents doing
>> transfers that are too large for the current driver state on a
>> particular piece of hardware.
>>
>> Signed-off-by: Michal Suchanek 
>>
>> --
>>
>> Update commit message and documentation text.
>> ---
>>  .../devicetree/bindings/mtd/jedec,spi-nor.txt  |  6 ++
>>  drivers/mtd/devices/m25p80.c   | 24
>> -- 2 files changed, 28 insertions(+), 2 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
>> b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt index
>> 2bee681..4e63ae8 100644
>> --- a/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
>> +++ b/Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
>> @@ -19,6 +19,12 @@ Optional properties:
>> all chips and support for it can not be detected at
>> runtime. Refer to your chips' datasheet to check if this is supported by
>> your chip.
>> +- linux,max_tx_len : With some SPI controller drivers possible transfer
>> size is + limited. This may be hardware or driver bug.
>> + Transfer data in chunks no larger than this value. +
>> Using this option may severely degrade performance and
>> + possibly flash memory life when max_tx_len is
>> smaller than + flash page size (typically 256 bytes)
>
> Will we need similar patch for all other SPI slave drivers, like SPI NAND ?

Probably. Some SPI slave drivers already do have similar option. In
general it cannot be expected that you can reliably transfer
arbitrarily large data over SPI it seems. However, if the nand driver
transfers data a page at a time it should be fine.

Thanks

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 16/48] genirq: Introduce helper irq_desc_get_irq()

2015-06-03 Thread Jiang Liu
Introduce helper irq_desc_get_irq() to hide irq_desc implementation
details.

Signed-off-by: Jiang Liu 
---
 include/linux/irqdesc.h |5 +
 1 file changed, 5 insertions(+)

diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 8c84a2513665..a7aaef44a10e 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -100,6 +100,11 @@ static inline struct irq_desc *irq_data_to_desc(struct 
irq_data *data)
 #endif
 }
 
+static inline unsigned int irq_desc_get_irq(struct irq_desc *desc)
+{
+   return desc->irq_data.irq;
+}
+
 static inline struct irq_data *irq_desc_get_irq_data(struct irq_desc *desc)
 {
return >irq_data;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 20/48] genirq: Kill the parameter 'irq' of setup_affinity()

2015-06-03 Thread Jiang Liu
Simplify interrupt management interfaces by killing the parameter 'irq'
of setup_affinity().

Signed-off-by: Jiang Liu 
---
 kernel/irq/manage.c |   31 +--
 1 file changed, 17 insertions(+), 14 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index e478a0f25bd6..cce2b52c865d 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -115,6 +115,15 @@ EXPORT_SYMBOL(synchronize_irq);
 #ifdef CONFIG_SMP
 cpumask_var_t irq_default_affinity;
 
+static int __irq_can_set_affinity(struct irq_desc *desc)
+{
+   if (!desc || !irqd_can_balance(>irq_data) ||
+   !desc->irq_data.chip || !desc->irq_data.chip->irq_set_affinity)
+   return 0;
+
+   return 1;
+}
+
 /**
  * irq_can_set_affinity - Check if the affinity of a given irq can be set
  * @irq:   Interrupt to check
@@ -122,13 +131,7 @@ cpumask_var_t irq_default_affinity;
  */
 int irq_can_set_affinity(unsigned int irq)
 {
-   struct irq_desc *desc = irq_to_desc(irq);
-
-   if (!desc || !irqd_can_balance(>irq_data) ||
-   !desc->irq_data.chip || !desc->irq_data.chip->irq_set_affinity)
-   return 0;
-
-   return 1;
+   return __irq_can_set_affinity(irq_to_desc(irq));
 }
 
 /**
@@ -360,13 +363,13 @@ EXPORT_SYMBOL_GPL(irq_set_affinity_notifier);
  * Generic version of the affinity autoselector.
  */
 static int
-setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
+setup_affinity(struct irq_desc *desc, struct cpumask *mask)
 {
struct cpumask *set = irq_default_affinity;
int node = irq_desc_get_node(desc);
 
/* Excludes PER_CPU and NO_BALANCE interrupts */
-   if (!irq_can_set_affinity(irq))
+   if (!__irq_can_set_affinity(desc))
return 0;
 
/*
@@ -394,9 +397,9 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, 
struct cpumask *mask)
 }
 #else
 static inline int
-setup_affinity(unsigned int irq, struct irq_desc *d, struct cpumask *mask)
+setup_affinity(struct irq_desc *d, struct cpumask *mask)
 {
-   return irq_select_affinity(irq);
+   return irq_select_affinity(irq_desc_get_irq(d));
 }
 #endif
 
@@ -410,14 +413,14 @@ int irq_select_affinity_usr(unsigned int irq, struct 
cpumask *mask)
int ret;
 
raw_spin_lock_irqsave(>lock, flags);
-   ret = setup_affinity(irq, desc, mask);
+   ret = setup_affinity(desc, mask);
raw_spin_unlock_irqrestore(>lock, flags);
return ret;
 }
 
 #else
 static inline int
-setup_affinity(unsigned int irq, struct irq_desc *desc, struct cpumask *mask)
+setup_affinity(struct irq_desc *desc, struct cpumask *mask)
 {
return 0;
 }
@@ -1254,7 +1257,7 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, 
struct irqaction *new)
}
 
/* Set default affinity mask once everything is setup */
-   setup_affinity(irq, desc, mask);
+   setup_affinity(desc, mask);
 
} else if (new->flags & IRQF_TRIGGER_MASK) {
unsigned int nmsk = new->flags & IRQF_TRIGGER_MASK;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 19/48] genirq: Change prototypes of register_irq_proc() and friends

2015-06-03 Thread Jiang Liu
Change prototypes of register_irq_proc() and friends, so we either
passing 'irq' or 'irq_desc', but not both.

Signed-off-by: Jiang Liu 
---
 kernel/irq/internals.h |   18 ++
 kernel/irq/irqdesc.c   |2 +-
 kernel/irq/manage.c|8 
 kernel/irq/proc.c  |   16 
 4 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 3d274e2fe605..ed0388b754fa 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -94,16 +94,18 @@ bool irq_wait_for_poll(struct irq_desc *desc);
 void __irq_wake_thread(struct irq_desc *desc, struct irqaction *action);
 
 #ifdef CONFIG_PROC_FS
-extern void register_irq_proc(unsigned int irq, struct irq_desc *desc);
-extern void unregister_irq_proc(unsigned int irq, struct irq_desc *desc);
-extern void register_handler_proc(unsigned int irq, struct irqaction *action);
-extern void unregister_handler_proc(unsigned int irq, struct irqaction 
*action);
+extern void register_irq_proc(struct irq_desc *desc);
+extern void unregister_irq_proc(struct irq_desc *desc);
+extern void register_handler_proc(struct irq_desc *desc,
+ struct irqaction *action);
+extern void unregister_handler_proc(struct irq_desc *desc,
+   struct irqaction *action);
 #else
-static inline void register_irq_proc(unsigned int irq, struct irq_desc *desc) 
{ }
-static inline void unregister_irq_proc(unsigned int irq, struct irq_desc 
*desc) { }
-static inline void register_handler_proc(unsigned int irq,
+static inline void register_irq_proc(struct irq_desc *desc) { }
+static inline void unregister_irq_proc(struct irq_desc *desc) { }
+static inline void register_handler_proc(struct irq_desc *desc,
 struct irqaction *action) { }
-static inline void unregister_handler_proc(unsigned int irq,
+static inline void unregister_handler_proc(struct irq_desc *desc,
   struct irqaction *action) { }
 #endif
 
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 500e6fd11d78..969f7e252846 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -175,7 +175,7 @@ static void free_desc(unsigned int irq)
 {
struct irq_desc *desc = irq_to_desc(irq);
 
-   unregister_irq_proc(irq, desc);
+   unregister_irq_proc(desc);
 
/*
 * sparse_irq_lock protects also show_interrupts() and
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 32567d4d7031..e478a0f25bd6 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -1293,9 +1293,9 @@ __setup_irq(unsigned int irq, struct irq_desc *desc, 
struct irqaction *new)
if (new->thread)
wake_up_process(new->thread);
 
-   register_irq_proc(irq, desc);
+   register_irq_proc(desc);
new->dir = NULL;
-   register_handler_proc(irq, new);
+   register_handler_proc(desc, new);
free_cpumask_var(mask);
 
return 0;
@@ -1405,7 +1405,7 @@ static struct irqaction *__free_irq(unsigned int irq, 
void *dev_id)
 
raw_spin_unlock_irqrestore(>lock, flags);
 
-   unregister_handler_proc(irq, action);
+   unregister_handler_proc(desc, action);
 
/* Make sure it's not being used on another CPU: */
synchronize_irq(irq);
@@ -1712,7 +1712,7 @@ static struct irqaction *__free_percpu_irq(unsigned int 
irq, void __percpu *dev_
 
raw_spin_unlock_irqrestore(>lock, flags);
 
-   unregister_handler_proc(irq, action);
+   unregister_handler_proc(desc, action);
 
module_put(desc->owner);
return action;
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c
index e3a8c9577ba6..3e2514b47367 100644
--- a/kernel/irq/proc.c
+++ b/kernel/irq/proc.c
@@ -301,13 +301,12 @@ static int name_unique(unsigned int irq, struct irqaction 
*new_action)
return ret;
 }
 
-void register_handler_proc(unsigned int irq, struct irqaction *action)
+void register_handler_proc(struct irq_desc *desc, struct irqaction *action)
 {
char name [MAX_NAMELEN];
-   struct irq_desc *desc = irq_to_desc(irq);
 
if (!desc->dir || action->dir || !action->name ||
-   !name_unique(irq, action))
+   !name_unique(irq_desc_get_irq(desc), action))
return;
 
memset(name, 0, MAX_NAMELEN);
@@ -321,9 +320,10 @@ void register_handler_proc(unsigned int irq, struct 
irqaction *action)
 
 #define MAX_NAMELEN 10
 
-void register_irq_proc(unsigned int irq, struct irq_desc *desc)
+void register_irq_proc(struct irq_desc *desc)
 {
char name [MAX_NAMELEN];
+   unsigned int irq = irq_desc_get_irq(desc);
 
if (!root_irq_dir || (desc->irq_data.chip == _irq_chip) || desc->dir)
return;
@@ -357,7 +357,7 @@ void register_irq_proc(unsigned int irq, struct irq_desc 
*desc)
 _spurious_proc_fops, (void *)(long)irq);
 }

linux-next: manual merge of the block tree with the cris tree

2015-06-03 Thread Stephen Rothwell
Hi Jens,

Today's linux-next merge of the block tree got a conflict in
arch/cris/include/asm/Kbuild between commit 5527b7d955ac ("CRIS: UAPI:
use generic headers via Kbuild") from the cris tree and commit
c546d5db75b4 ("remove scatterlist.h generation from arch Kbuild files")
from the block tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc arch/cris/include/asm/Kbuild
index 2fc4331a69ca,d294f6aaff1d..
--- a/arch/cris/include/asm/Kbuild
+++ b/arch/cris/include/asm/Kbuild
@@@ -24,23 -18,11 +24,22 @@@ generic-y += linkage.
  generic-y += local.h
  generic-y += local64.h
  generic-y += mcs_spinlock.h
 +generic-y += mman.h
  generic-y += module.h
 +generic-y += msgbuf.h
  generic-y += percpu.h
 +generic-y += poll.h
  generic-y += preempt.h
 +generic-y += resource.h
- generic-y += scatterlist.h
  generic-y += sections.h
 +generic-y += sembuf.h
 +generic-y += shmbuf.h
 +generic-y += siginfo.h
 +generic-y += socket.h
 +generic-y += sockios.h
 +generic-y += statfs.h
  generic-y += topology.h
  generic-y += trace_clock.h
 +generic-y += types.h
  generic-y += vga.h
  generic-y += xor.h


pgpPOgZ3oN1pJ.pgp
Description: OpenPGP digital signature


[RFT v2 10/48] irqchip: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu 
---
 drivers/irqchip/exynos-combiner.c   |4 ++--
 drivers/irqchip/irq-armada-370-xp.c |2 +-
 drivers/irqchip/irq-dw-apb-ictl.c   |4 ++--
 drivers/irqchip/irq-gic.c   |4 ++--
 drivers/irqchip/irq-orion.c |2 +-
 drivers/irqchip/irq-sunxi-nmi.c |2 +-
 drivers/irqchip/spear-shirq.c   |2 +-
 7 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/irqchip/exynos-combiner.c 
b/drivers/irqchip/exynos-combiner.c
index 5945223b73fa..039ceb46fcc0 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -62,8 +62,8 @@ static void combiner_unmask_irq(struct irq_data *data)
 
 static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc 
*desc)
 {
-   struct combiner_chip_data *chip_data = irq_get_handler_data(irq);
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct combiner_chip_data *chip_data = irq_desc_get_handler_data(desc);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned int cascade_irq, combiner_irq;
unsigned long status;
 
diff --git a/drivers/irqchip/irq-armada-370-xp.c 
b/drivers/irqchip/irq-armada-370-xp.c
index daccc8bdbb42..40b5fe99a1d5 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -451,7 +451,7 @@ static void armada_370_xp_handle_msi_irq(struct pt_regs *r, 
bool b) {}
 static void armada_370_xp_mpic_handle_cascade_irq(unsigned int irq,
  struct irq_desc *desc)
 {
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned long irqmap, irqn, irqsrc, cpuid;
unsigned int cascade_irq;
 
diff --git a/drivers/irqchip/irq-dw-apb-ictl.c 
b/drivers/irqchip/irq-dw-apb-ictl.c
index 53bb7326a60a..cddcd3b75f00 100644
--- a/drivers/irqchip/irq-dw-apb-ictl.c
+++ b/drivers/irqchip/irq-dw-apb-ictl.c
@@ -28,8 +28,8 @@
 
 static void dw_apb_ictl_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct irq_chip *chip = irq_get_chip(irq);
-   struct irq_chip_generic *gc = irq_get_handler_data(irq);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
+   struct irq_chip_generic *gc = irq_desc_get_handler_data(desc);
struct irq_domain *d = gc->private;
u32 stat;
int n;
diff --git a/drivers/irqchip/irq-gic.c b/drivers/irqchip/irq-gic.c
index 01999d74bd3a..6c8a5a7fb4a0 100644
--- a/drivers/irqchip/irq-gic.c
+++ b/drivers/irqchip/irq-gic.c
@@ -288,8 +288,8 @@ static void __exception_irq_entry gic_handle_irq(struct 
pt_regs *regs)
 
 static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
 {
-   struct gic_chip_data *chip_data = irq_get_handler_data(irq);
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct gic_chip_data *chip_data = irq_desc_get_handler_data(desc);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned int cascade_irq, gic_irq;
unsigned long status;
 
diff --git a/drivers/irqchip/irq-orion.c b/drivers/irqchip/irq-orion.c
index ad0c0f6f1d65..58e034db0e7c 100644
--- a/drivers/irqchip/irq-orion.c
+++ b/drivers/irqchip/irq-orion.c
@@ -109,7 +109,7 @@ IRQCHIP_DECLARE(orion_intc, "marvell,orion-intc", 
orion_irq_init);
 
 static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct irq_domain *d = irq_get_handler_data(irq);
+   struct irq_domain *d = irq_desc_get_handler_data(desc);
 
struct irq_chip_generic *gc = irq_get_domain_generic_chip(d, 0);
u32 stat = readl_relaxed(gc->reg_base + ORION_BRIDGE_IRQ_CAUSE) &
diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 4a9ce5b50c5b..2eaa9d9df241 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -61,7 +61,7 @@ static inline u32 sunxi_sc_nmi_read(struct irq_chip_generic 
*gc, u32 off)
 static void sunxi_sc_nmi_handle_irq(unsigned int irq, struct irq_desc *desc)
 {
struct irq_domain *domain = irq_desc_get_handler_data(desc);
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned int virq = irq_find_mapping(domain, 0);
 
chained_irq_enter(chip, desc);
diff --git a/drivers/irqchip/spear-shirq.c b/drivers/irqchip/spear-shirq.c
index 9c145a7cb056..fb68ee9c0424 100644
--- a/drivers/irqchip/spear-shirq.c
+++ b/drivers/irqchip/spear-shirq.c
@@ -185,7 +185,7 @@ static struct spear_shirq *spear320_shirq_blocks[] = {
 
 static void shirq_handler(unsigned irq, struct irq_desc *desc)
 {
-   struct spear_shirq *shirq = irq_get_handler_data(irq);
+   struct spear_shirq *shirq = irq_desc_get_handler_data(desc);
u32 pend;
 
pend = readl(shirq->base + shirq->status_reg) & 

[RFT v2 47/48] genirq, mfd: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
Acked-by: Lee Jones 
---
 drivers/mfd/asic3.c|2 +-
 drivers/mfd/ezx-pcap.c |2 +-
 drivers/mfd/htc-egpio.c|2 +-
 drivers/mfd/jz4740-adc.c   |2 +-
 drivers/mfd/pm8921-core.c  |2 +-
 drivers/mfd/t7l66xb.c  |2 +-
 drivers/mfd/tc6393xb.c |2 +-
 drivers/mfd/ucb1x00-core.c |2 +-
 8 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c
index 977bd3a3eed0..6bf17842a3e4 100644
--- a/drivers/mfd/asic3.c
+++ b/drivers/mfd/asic3.c
@@ -138,7 +138,7 @@ static void asic3_irq_flip_edge(struct asic3 *asic,
spin_unlock_irqrestore(>lock, flags);
 }
 
-static void asic3_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void asic3_irq_demux(struct irq_desc *desc)
 {
struct asic3 *asic = irq_desc_get_handler_data(desc);
struct irq_data *data = irq_desc_get_irq_data(desc);
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index e5f4ffaa5414..ab83124d75f7 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -205,7 +205,7 @@ static void pcap_isr_work(struct work_struct *work)
} while (gpio_get_value(pdata->gpio));
 }
 
-static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void pcap_irq_handler(struct irq_desc *desc)
 {
struct pcap_chip *pcap = irq_desc_get_handler_data(desc);
 
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c
index 49f39feca784..8a3264e35403 100644
--- a/drivers/mfd/htc-egpio.c
+++ b/drivers/mfd/htc-egpio.c
@@ -98,7 +98,7 @@ static struct irq_chip egpio_muxed_chip = {
.irq_unmask = egpio_unmask,
 };
 
-static void egpio_handler(unsigned int irq, struct irq_desc *desc)
+static void egpio_handler(struct irq_desc *desc)
 {
struct egpio_info *ei = irq_desc_get_handler_data(desc);
int irqpin;
diff --git a/drivers/mfd/jz4740-adc.c b/drivers/mfd/jz4740-adc.c
index b31c54e4ecb2..ec1cd2297ea4 100644
--- a/drivers/mfd/jz4740-adc.c
+++ b/drivers/mfd/jz4740-adc.c
@@ -65,7 +65,7 @@ struct jz4740_adc {
spinlock_t lock;
 };
 
-static void jz4740_adc_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void jz4740_adc_irq_demux(struct irq_desc *desc)
 {
struct irq_chip_generic *gc = irq_desc_get_handler_data(desc);
uint8_t status;
diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c
index 5a92646a2ccb..87dd27e49a8b 100644
--- a/drivers/mfd/pm8921-core.c
+++ b/drivers/mfd/pm8921-core.c
@@ -156,7 +156,7 @@ static int pm8xxx_irq_master_handler(struct pm_irq_chip 
*chip, int master)
return ret;
 }
 
-static void pm8xxx_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void pm8xxx_irq_handler(struct irq_desc *desc)
 {
struct pm_irq_chip *chip = irq_desc_get_handler_data(desc);
struct irq_chip *irq_chip = irq_desc_get_chip(desc);
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index b752ca2be549..55ade59303b1 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -185,7 +185,7 @@ static struct mfd_cell t7l66xb_cells[] = {
 /*--*/
 
 /* Handle the T7L66XB interrupt mux */
-static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
+static void t7l66xb_irq(struct irq_desc *desc)
 {
struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc);
unsigned int isr;
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index d21253a51cff..e22722cd667c 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -523,7 +523,7 @@ static int tc6393xb_register_gpio(struct tc6393xb 
*tc6393xb, int gpio_base)
 /*--*/
 
 static void
-tc6393xb_irq(unsigned int irq, struct irq_desc *desc)
+tc6393xb_irq(struct irq_desc *desc)
 {
struct tc6393xb *tc6393xb = irq_desc_get_handler_data(desc);
unsigned int isr;
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 08ce1dad4167..2f8f922a34de 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -282,7 +282,7 @@ void ucb1x00_adc_disable(struct ucb1x00 *ucb)
  * SIBCLK to talk to the chip.  We leave the clock running until
  * we have finished processing all interrupts from the chip.
  */
-static void ucb1x00_irq(unsigned int irq, struct irq_desc *desc)
+static void ucb1x00_irq(struct irq_desc *desc)
 {
struct ucb1x00 *ucb = irq_desc_get_handler_data(desc);
unsigned int isr, i;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line 

[RFT v2 40/48] genirq, m68k: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 arch/m68k/amiga/amiints.c   |8 
 arch/m68k/coldfire/intc-5272.c  |4 ++--
 arch/m68k/include/asm/irq.h |3 +--
 arch/m68k/include/asm/mac_via.h |2 +-
 arch/m68k/mac/baboon.c  |2 +-
 arch/m68k/mac/oss.c |4 ++--
 arch/m68k/mac/psc.c |2 +-
 arch/m68k/mac/via.c |6 +++---
 8 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/arch/m68k/amiga/amiints.c b/arch/m68k/amiga/amiints.c
index 47b5f90002ab..7ff739e94896 100644
--- a/arch/m68k/amiga/amiints.c
+++ b/arch/m68k/amiga/amiints.c
@@ -46,7 +46,7 @@ static struct irq_chip amiga_irq_chip = {
  * The builtin Amiga hardware interrupt handlers.
  */
 
-static void ami_int1(unsigned int irq, struct irq_desc *desc)
+static void ami_int1(struct irq_desc *desc)
 {
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
 
@@ -69,7 +69,7 @@ static void ami_int1(unsigned int irq, struct irq_desc *desc)
}
 }
 
-static void ami_int3(unsigned int irq, struct irq_desc *desc)
+static void ami_int3(struct irq_desc *desc)
 {
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
 
@@ -92,7 +92,7 @@ static void ami_int3(unsigned int irq, struct irq_desc *desc)
}
 }
 
-static void ami_int4(unsigned int irq, struct irq_desc *desc)
+static void ami_int4(struct irq_desc *desc)
 {
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
 
@@ -121,7 +121,7 @@ static void ami_int4(unsigned int irq, struct irq_desc 
*desc)
}
 }
 
-static void ami_int5(unsigned int irq, struct irq_desc *desc)
+static void ami_int5(struct irq_desc *desc)
 {
unsigned short ints = amiga_custom.intreqr & amiga_custom.intenar;
 
diff --git a/arch/m68k/coldfire/intc-5272.c b/arch/m68k/coldfire/intc-5272.c
index d1e2fbad327c..b0a19e207a63 100644
--- a/arch/m68k/coldfire/intc-5272.c
+++ b/arch/m68k/coldfire/intc-5272.c
@@ -143,10 +143,10 @@ static int intc_irq_set_type(struct irq_data *d, unsigned 
int type)
  * We need to be careful with the masking/acking due to the side effects
  * of masking an interrupt.
  */
-static void intc_external_irq(unsigned int irq, struct irq_desc *desc)
+static void intc_external_irq(struct irq_desc *desc)
 {
irq_desc_get_chip(desc)->irq_ack(>irq_data);
-   handle_simple_irq(irq, desc);
+   handle_simple_irq(desc);
 }
 
 static struct irq_chip intc_irq_chip = {
diff --git a/arch/m68k/include/asm/irq.h b/arch/m68k/include/asm/irq.h
index 81ca118d58af..a644f4a53b94 100644
--- a/arch/m68k/include/asm/irq.h
+++ b/arch/m68k/include/asm/irq.h
@@ -64,8 +64,7 @@ extern void m68k_setup_auto_interrupt(void 
(*handler)(unsigned int,
  struct pt_regs *));
 extern void m68k_setup_user_interrupt(unsigned int vec, unsigned int cnt);
 extern void m68k_setup_irq_controller(struct irq_chip *,
- void (*handle)(unsigned int irq,
-struct irq_desc *desc),
+ void (*handle)(struct irq_desc *desc),
  unsigned int irq, unsigned int cnt);
 
 extern unsigned int irq_canonicalize(unsigned int irq);
diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h
index fe3fc9ae1b69..53c632c85b03 100644
--- a/arch/m68k/include/asm/mac_via.h
+++ b/arch/m68k/include/asm/mac_via.h
@@ -261,7 +261,7 @@ extern void via_irq_enable(int);
 extern void via_irq_disable(int);
 extern void via_nubus_irq_startup(int irq);
 extern void via_nubus_irq_shutdown(int irq);
-extern void via1_irq(unsigned int irq, struct irq_desc *desc);
+extern void via1_irq(struct irq_desc *desc);
 extern void via1_set_head(int);
 extern int via2_scsi_drq_pending(void);
 
diff --git a/arch/m68k/mac/baboon.c b/arch/m68k/mac/baboon.c
index 3fe0e43d44f6..f6f7d42713ec 100644
--- a/arch/m68k/mac/baboon.c
+++ b/arch/m68k/mac/baboon.c
@@ -45,7 +45,7 @@ void __init baboon_init(void)
  * Baboon interrupt handler. This works a lot like a VIA.
  */
 
-static void baboon_irq(unsigned int irq, struct irq_desc *desc)
+static void baboon_irq(struct irq_desc *desc)
 {
int irq_bit, irq_num;
unsigned char events;
diff --git a/arch/m68k/mac/oss.c b/arch/m68k/mac/oss.c
index bb11dceed7ed..1fe868166a9c 100644
--- a/arch/m68k/mac/oss.c
+++ b/arch/m68k/mac/oss.c
@@ -63,7 +63,7 @@ void __init oss_nubus_init(void)
  * Handle miscellaneous OSS interrupts.
  */
 
-static void oss_irq(unsigned int irq, struct irq_desc *desc)
+static void oss_irq(struct 

[RFT v2 44/48] genirq, pinctrl: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c |2 +-
 drivers/pinctrl/intel/pinctrl-baytrail.c  |2 +-
 drivers/pinctrl/intel/pinctrl-cherryview.c|2 +-
 drivers/pinctrl/intel/pinctrl-intel.c |2 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |2 +-
 drivers/pinctrl/nomadik/pinctrl-nomadik.c |4 ++--
 drivers/pinctrl/pinctrl-adi2.c|3 +--
 drivers/pinctrl/pinctrl-amd.c |4 ++--
 drivers/pinctrl/pinctrl-at91.c|2 +-
 drivers/pinctrl/pinctrl-coh901.c  |2 +-
 drivers/pinctrl/pinctrl-rockchip.c|2 +-
 drivers/pinctrl/pinctrl-single.c  |2 +-
 drivers/pinctrl/pinctrl-st.c  |4 ++--
 drivers/pinctrl/qcom/pinctrl-msm.c|4 ++--
 drivers/pinctrl/samsung/pinctrl-exynos.c  |4 ++--
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c |8 
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c |   10 +-
 drivers/pinctrl/sirf/pinctrl-sirf.c   |4 ++--
 drivers/pinctrl/spear/pinctrl-plgpio.c|2 +-
 drivers/pinctrl/sunxi/pinctrl-sunxi.c |2 +-
 20 files changed, 33 insertions(+), 34 deletions(-)

diff --git a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c 
b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
index 4ad5c1a996e3..df940687524f 100644
--- a/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
+++ b/drivers/pinctrl/bcm/pinctrl-cygnus-gpio.c
@@ -143,7 +143,7 @@ static inline bool cygnus_get_bit(struct cygnus_gpio *chip, 
unsigned int reg,
return !!(readl(chip->base + offset) & BIT(shift));
 }
 
-static void cygnus_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void cygnus_gpio_irq_handler(struct irq_desc *desc)
 {
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
struct cygnus_gpio *chip = to_cygnus_gpio(gc);
diff --git a/drivers/pinctrl/intel/pinctrl-baytrail.c 
b/drivers/pinctrl/intel/pinctrl-baytrail.c
index 2062c224e32f..94870cedb0ad 100644
--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -421,7 +421,7 @@ static void byt_gpio_dbg_show(struct seq_file *s, struct 
gpio_chip *chip)
spin_unlock_irqrestore(>lock, flags);
 }
 
-static void byt_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+static void byt_gpio_irq_handler(struct irq_desc *desc)
 {
struct irq_data *data = irq_desc_get_irq_data(desc);
struct byt_gpio *vg = to_byt_gpio(irq_desc_get_handler_data(desc));
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c 
b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 878e798bcb56..cfdc5f1c9cd6 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1364,7 +1364,7 @@ static struct irq_chip chv_gpio_irqchip = {
.flags = IRQCHIP_SKIP_SET_WAKE,
 };
 
-static void chv_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+static void chv_gpio_irq_handler(struct irq_desc *desc)
 {
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
struct chv_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c 
b/drivers/pinctrl/intel/pinctrl-intel.c
index a40681097402..a64ca4bd69cd 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -836,7 +836,7 @@ static void intel_gpio_community_irq_handler(struct 
gpio_chip *gc,
}
 }
 
-static void intel_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+static void intel_gpio_irq_handler(struct irq_desc *desc)
 {
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
struct intel_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c 
b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index fd05ca6125b0..9ec45d4875db 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1016,7 +1016,7 @@ mtk_eint_debounce_process(struct mtk_pinctrl *pctl, int 
index)
}
 }
 
-static void mtk_eint_irq_handler(unsigned irq, struct irq_desc *desc)
+static void mtk_eint_irq_handler(struct irq_desc *desc)
 {
struct irq_chip *chip = irq_desc_get_chip(desc);
struct mtk_pinctrl *pctl = irq_desc_get_handler_data(desc);
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c 
b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index 902f53b855bf..cd70a30f8d8e 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -871,7 +871,7 @@ static void 

[RFT v2 43/48] genirq, arch: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
Acked-by: Hans-Christian Egtvedt 
---
 arch/alpha/kernel/irq.c |2 +-
 arch/avr32/mach-at32ap/extint.c |2 +-
 arch/avr32/mach-at32ap/pio.c|2 +-
 arch/c6x/platforms/megamod-pic.c|2 +-
 arch/sparc/kernel/leon_kernel.c |2 +-
 arch/sparc/kernel/leon_pci_grpci1.c |2 +-
 arch/sparc/kernel/leon_pci_grpci2.c |2 +-
 arch/tile/kernel/pci_gx.c   |4 ++--
 arch/unicore32/kernel/irq.c |2 +-
 9 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/alpha/kernel/irq.c b/arch/alpha/kernel/irq.c
index bd8e47699cad..d2704d53aac8 100644
--- a/arch/alpha/kernel/irq.c
+++ b/arch/alpha/kernel/irq.c
@@ -118,6 +118,6 @@ handle_irq(int irq)
}
 
irq_enter();
-   generic_handle_irq_desc(irq, desc);
+   generic_handle_irq_desc(desc);
irq_exit();
 }
diff --git a/arch/avr32/mach-at32ap/extint.c b/arch/avr32/mach-at32ap/extint.c
index cfb298d66305..b83a974b7855 100644
--- a/arch/avr32/mach-at32ap/extint.c
+++ b/arch/avr32/mach-at32ap/extint.c
@@ -144,7 +144,7 @@ static struct irq_chip eic_chip = {
.irq_set_type   = eic_set_irq_type,
 };
 
-static void demux_eic_irq(unsigned int irq, struct irq_desc *desc)
+static void demux_eic_irq(struct irq_desc *desc)
 {
struct eic *eic = irq_desc_get_handler_data(desc);
unsigned long status, pending;
diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 2583e6cc44e9..85009bbc01e6 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -281,7 +281,7 @@ static struct irq_chip gpio_irqchip = {
.irq_set_type   = gpio_irq_type,
 };
 
-static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+static void gpio_irq_handler(struct irq_desc *desc)
 {
struct pio_device   *pio = irq_desc_get_chip_data(desc);
unsignedgpio_irq;
diff --git a/arch/c6x/platforms/megamod-pic.c b/arch/c6x/platforms/megamod-pic.c
index 2e303b75060a..3da895dac1cd 100644
--- a/arch/c6x/platforms/megamod-pic.c
+++ b/arch/c6x/platforms/megamod-pic.c
@@ -93,7 +93,7 @@ static struct irq_chip megamod_chip = {
.irq_unmask = unmask_megamod,
 };
 
-static void megamod_irq_cascade(unsigned int irq, struct irq_desc *desc)
+static void megamod_irq_cascade(struct irq_desc *desc)
 {
struct megamod_cascade_data *cascade;
struct megamod_pic *pic;
diff --git a/arch/sparc/kernel/leon_kernel.c b/arch/sparc/kernel/leon_kernel.c
index 0299f052a2ef..42efcf85f721 100644
--- a/arch/sparc/kernel/leon_kernel.c
+++ b/arch/sparc/kernel/leon_kernel.c
@@ -53,7 +53,7 @@ static inline unsigned int leon_eirq_get(int cpu)
 }
 
 /* Handle one or multiple IRQs from the extended interrupt controller */
-static void leon_handle_ext_irq(unsigned int irq, struct irq_desc *desc)
+static void leon_handle_ext_irq(struct irq_desc *desc)
 {
unsigned int eirq;
struct irq_bucket *p;
diff --git a/arch/sparc/kernel/leon_pci_grpci1.c 
b/arch/sparc/kernel/leon_pci_grpci1.c
index 3382f7b3eeef..1e77128a8f88 100644
--- a/arch/sparc/kernel/leon_pci_grpci1.c
+++ b/arch/sparc/kernel/leon_pci_grpci1.c
@@ -357,7 +357,7 @@ static struct irq_chip grpci1_irq = {
 };
 
 /* Handle one or multiple IRQs from the PCI core */
-static void grpci1_pci_flow_irq(unsigned int irq, struct irq_desc *desc)
+static void grpci1_pci_flow_irq(struct irq_desc *desc)
 {
struct grpci1_priv *priv = grpci1priv;
int i, ack = 0;
diff --git a/arch/sparc/kernel/leon_pci_grpci2.c 
b/arch/sparc/kernel/leon_pci_grpci2.c
index 94e392bdee7d..0398fc2c0e44 100644
--- a/arch/sparc/kernel/leon_pci_grpci2.c
+++ b/arch/sparc/kernel/leon_pci_grpci2.c
@@ -498,7 +498,7 @@ static struct irq_chip grpci2_irq = {
 };
 
 /* Handle one or multiple IRQs from the PCI core */
-static void grpci2_pci_flow_irq(unsigned int irq, struct irq_desc *desc)
+static void grpci2_pci_flow_irq(struct irq_desc *desc)
 {
struct grpci2_priv *priv = grpci2priv;
int i, ack = 0;
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index 65b701b3b5ed..4c017d0d2de8 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -304,7 +304,7 @@ static struct irq_chip tilegx_legacy_irq_chip = {
  * to Linux which just calls handle_level_irq() after clearing the
  * MAC INTx Assert status bit associated with this interrupt.
  */
-static void trio_handle_level_irq(unsigned int irq, struct irq_desc *desc)
+static void trio_handle_level_irq(struct irq_desc *desc)
 {
struct pci_controller *controller = irq_desc_get_handler_data(desc);

[RFT v2 46/48] genirq, irqchip: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
Acked-by: Ralf Baechle 
---
 drivers/irqchip/exynos-combiner.c|4 ++--
 drivers/irqchip/irq-armada-370-xp.c  |3 +--
 drivers/irqchip/irq-bcm7038-l1.c |2 +-
 drivers/irqchip/irq-bcm7120-l2.c |2 +-
 drivers/irqchip/irq-brcmstb-l2.c |4 ++--
 drivers/irqchip/irq-dw-apb-ictl.c|2 +-
 drivers/irqchip/irq-gic.c|2 +-
 drivers/irqchip/irq-imgpdc.c |4 ++--
 drivers/irqchip/irq-keystone.c   |2 +-
 drivers/irqchip/irq-metag-ext.c  |3 +--
 drivers/irqchip/irq-metag.c  |3 +--
 drivers/irqchip/irq-mips-gic.c   |2 +-
 drivers/irqchip/irq-mmp.c|2 +-
 drivers/irqchip/irq-orion.c  |2 +-
 drivers/irqchip/irq-s3c24xx.c|2 +-
 drivers/irqchip/irq-sunxi-nmi.c  |2 +-
 drivers/irqchip/irq-tb10x.c  |2 +-
 drivers/irqchip/irq-versatile-fpga.c |4 ++--
 drivers/irqchip/irq-vic.c|2 +-
 drivers/irqchip/spear-shirq.c|2 +-
 20 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/drivers/irqchip/exynos-combiner.c 
b/drivers/irqchip/exynos-combiner.c
index 039ceb46fcc0..2bf152307bac 100644
--- a/drivers/irqchip/exynos-combiner.c
+++ b/drivers/irqchip/exynos-combiner.c
@@ -60,7 +60,7 @@ static void combiner_unmask_irq(struct irq_data *data)
__raw_writel(mask, combiner_base(data) + COMBINER_ENABLE_SET);
 }
 
-static void combiner_handle_cascade_irq(unsigned int irq, struct irq_desc 
*desc)
+static void combiner_handle_cascade_irq(struct irq_desc *desc)
 {
struct combiner_chip_data *chip_data = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
@@ -81,7 +81,7 @@ static void combiner_handle_cascade_irq(unsigned int irq, 
struct irq_desc *desc)
cascade_irq = irq_find_mapping(combiner_irq_domain, combiner_irq);
 
if (unlikely(!cascade_irq))
-   handle_bad_irq(irq, desc);
+   handle_bad_irq(desc);
else
generic_handle_irq(cascade_irq);
 
diff --git a/drivers/irqchip/irq-armada-370-xp.c 
b/drivers/irqchip/irq-armada-370-xp.c
index 40b5fe99a1d5..fa26eb1b4f17 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -448,8 +448,7 @@ static void armada_370_xp_handle_msi_irq(struct pt_regs 
*regs, bool is_chained)
 static void armada_370_xp_handle_msi_irq(struct pt_regs *r, bool b) {}
 #endif
 
-static void armada_370_xp_mpic_handle_cascade_irq(unsigned int irq,
- struct irq_desc *desc)
+static void armada_370_xp_mpic_handle_cascade_irq(struct irq_desc *desc)
 {
struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned long irqmap, irqn, irqsrc, cpuid;
diff --git a/drivers/irqchip/irq-bcm7038-l1.c b/drivers/irqchip/irq-bcm7038-l1.c
index d3b8c8be15f6..9ad6540bd57e 100644
--- a/drivers/irqchip/irq-bcm7038-l1.c
+++ b/drivers/irqchip/irq-bcm7038-l1.c
@@ -116,7 +116,7 @@ static inline void l1_writel(u32 val, void __iomem *reg)
writel(val, reg);
 }
 
-static void bcm7038_l1_irq_handle(unsigned int irq, struct irq_desc *desc)
+static void bcm7038_l1_irq_handle(struct irq_desc *desc)
 {
struct bcm7038_l1_chip *intc = irq_desc_get_handler_data(desc);
struct bcm7038_l1_cpu *cpu;
diff --git a/drivers/irqchip/irq-bcm7120-l2.c b/drivers/irqchip/irq-bcm7120-l2.c
index 3ba5cc780fcb..4ee0d839009e 100644
--- a/drivers/irqchip/irq-bcm7120-l2.c
+++ b/drivers/irqchip/irq-bcm7120-l2.c
@@ -52,7 +52,7 @@ struct bcm7120_l2_intc_data {
const __be32 *map_mask_prop;
 };
 
-static void bcm7120_l2_intc_irq_handle(unsigned int irq, struct irq_desc *desc)
+static void bcm7120_l2_intc_irq_handle(struct irq_desc *desc)
 {
struct bcm7120_l2_intc_data *b = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c
index 994c01fdb4b5..ab3d0c52ea5a 100644
--- a/drivers/irqchip/irq-brcmstb-l2.c
+++ b/drivers/irqchip/irq-brcmstb-l2.c
@@ -51,7 +51,7 @@ struct brcmstb_l2_intc_data {
u32 saved_mask; /* for suspend/resume */
 };
 
-static void brcmstb_l2_intc_irq_handle(unsigned int __irq, struct irq_desc 
*desc)
+static void brcmstb_l2_intc_irq_handle(struct irq_desc *desc)
 {
struct brcmstb_l2_intc_data *b = irq_desc_get_handler_data(desc);
struct irq_chip_generic *gc = irq_get_domain_generic_chip(b->domain, 0);
@@ -65,7 +65,7 @@ static void brcmstb_l2_intc_irq_handle(unsigned int __irq, 
struct irq_desc *desc
 

Re: [PATCH 00/11] Enable access to SPI NOR flash on Samsung Snow board

2015-06-03 Thread Michal Suchanek
On 4 June 2015 at 00:53, Marek Vasut  wrote:
> On Wednesday, June 03, 2015 at 11:26:39 PM, Michal Suchanek wrote:
>> Hello,
>
> Hi,
>
>> this patch series makes it possible to access the SPI NOR flash in the
>> Samsung XE303 'Snow' Chromebook.
>>
>> Unfortunately not all issues are resolved. To work around an issue with the
>> pl330 dma engine I respun the patch for limiting transfer size in m25p80
>> driver.
>
> Looks like fixing a bug at the wrong place to me ...
>
>> As the flash does not contain any sane filesystem and is only likely to be
>> accessed with mtd_debug or similar tool the limit of the dma engine is
>> easily reached. Filesystems using shorter data transfers are less likely
>> to be affected.
>
> Sounds like the DMA engine driver should be fixed.

I looked at the pl330 datasheet and don't see anything obviusly wrong
with the pl330 driver in Linux.

Ideally it would be fixed but I have no idea what's wrong with it.

Thanks

Michal
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 48/48] genirq, drivers: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 drivers/dma/ipu/ipu_irq.c   |4 ++--
 drivers/gpu/ipu-v3/ipu-common.c |4 ++--
 drivers/pci/host/pci-keystone.c |5 ++---
 drivers/spmi/spmi-pmic-arb.c|2 +-
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 84083c93fe70..4791a7630f97 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -266,7 +266,7 @@ int ipu_irq_unmap(unsigned int source)
 }
 
 /* Chained IRQ handler for IPU error interrupt */
-static void ipu_irq_err(unsigned int __irq, struct irq_desc *desc)
+static void ipu_irq_err(struct irq_desc *desc)
 {
struct ipu *ipu = irq_desc_get_handler_data(desc);
u32 status;
@@ -308,7 +308,7 @@ static void ipu_irq_err(unsigned int __irq, struct irq_desc 
*desc)
 }
 
 /* Chained IRQ handler for IPU function interrupt */
-static void ipu_irq_fn(unsigned int __irq, struct irq_desc *desc)
+static void ipu_irq_fn(struct irq_desc *desc)
 {
struct ipu *ipu = irq_desc_get_handler_data(desc);
u32 status;
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 7022825b7a2c..1125b03c36af 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -912,7 +912,7 @@ static void ipu_irq_handle(struct ipu_soc *ipu, const int 
*regs, int num_regs)
}
 }
 
-static void ipu_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ipu_irq_handler(struct irq_desc *desc)
 {
struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
@@ -925,7 +925,7 @@ static void ipu_irq_handler(unsigned int irq, struct 
irq_desc *desc)
chained_irq_exit(chip, desc);
 }
 
-static void ipu_err_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ipu_err_irq_handler(struct irq_desc *desc)
 {
struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
index 98862768f1da..72eca81f2f67 100644
--- a/drivers/pci/host/pci-keystone.c
+++ b/drivers/pci/host/pci-keystone.c
@@ -112,7 +112,7 @@ static int ks_pcie_establish_link(struct keystone_pcie 
*ks_pcie)
return 0;
 }
 
-static void ks_pcie_msi_irq_handler(unsigned int __irq, struct irq_desc *desc)
+static void ks_pcie_msi_irq_handler(struct irq_desc *desc)
 {
unsigned int irq = irq_desc_get_irq(desc);
struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc);
@@ -134,13 +134,12 @@ static void ks_pcie_msi_irq_handler(unsigned int __irq, 
struct irq_desc *desc)
 
 /**
  * ks_pcie_legacy_irq_handler() - Handle legacy interrupt
- * @irq: IRQ line for legacy interrupts
  * @desc: Pointer to irq descriptor
  *
  * Traverse through pending legacy interrupts and invoke handler for each. Also
  * takes care of interrupt controller level mask/ack operation.
  */
-static void ks_pcie_legacy_irq_handler(unsigned int __irq, struct irq_desc 
*desc)
+static void ks_pcie_legacy_irq_handler(struct irq_desc *desc)
 {
unsigned int irq = irq_desc_get_irq(desc);
struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc);
diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index b32cb0a813cb..d7e7846917ae 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -451,7 +451,7 @@ static void periph_interrupt(struct spmi_pmic_arb_dev *pa, 
u8 apid)
}
 }
 
-static void pmic_arb_chained_irq(unsigned int irq, struct irq_desc *desc)
+static void pmic_arb_chained_irq(struct irq_desc *desc)
 {
struct spmi_pmic_arb_dev *pa = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 45/48] genirq, gpio: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 drivers/gpio/gpio-altera.c |6 ++
 drivers/gpio/gpio-bcm-kona.c   |2 +-
 drivers/gpio/gpio-davinci.c|2 +-
 drivers/gpio/gpio-dwapb.c  |2 +-
 drivers/gpio/gpio-ep93xx.c |4 ++--
 drivers/gpio/gpio-intel-mid.c  |2 +-
 drivers/gpio/gpio-lynxpoint.c  |2 +-
 drivers/gpio/gpio-mpc8xxx.c|2 +-
 drivers/gpio/gpio-msic.c   |2 +-
 drivers/gpio/gpio-msm-v2.c |2 +-
 drivers/gpio/gpio-mvebu.c  |2 +-
 drivers/gpio/gpio-mxc.c|4 ++--
 drivers/gpio/gpio-mxs.c|2 +-
 drivers/gpio/gpio-omap.c   |2 +-
 drivers/gpio/gpio-pl061.c  |2 +-
 drivers/gpio/gpio-pxa.c|2 +-
 drivers/gpio/gpio-sa1100.c |2 +-
 drivers/gpio/gpio-tegra.c  |2 +-
 drivers/gpio/gpio-timberdale.c |2 +-
 drivers/gpio/gpio-tz1090.c |4 ++--
 drivers/gpio/gpio-vf610.c  |2 +-
 drivers/gpio/gpio-zynq.c   |2 +-
 22 files changed, 26 insertions(+), 28 deletions(-)

diff --git a/drivers/gpio/gpio-altera.c b/drivers/gpio/gpio-altera.c
index 449fb46cb8a0..985c3bd9a03e 100644
--- a/drivers/gpio/gpio-altera.c
+++ b/drivers/gpio/gpio-altera.c
@@ -200,8 +200,7 @@ static int altera_gpio_direction_output(struct gpio_chip 
*gc,
return 0;
 }
 
-static void altera_gpio_irq_edge_handler(unsigned int irq,
-   struct irq_desc *desc)
+static void altera_gpio_irq_edge_handler(struct irq_desc *desc)
 {
struct altera_gpio_chip *altera_gc;
struct irq_chip *chip;
@@ -230,8 +229,7 @@ static void altera_gpio_irq_edge_handler(unsigned int irq,
 }
 
 
-static void altera_gpio_irq_leveL_high_handler(unsigned int irq,
- struct irq_desc *desc)
+static void altera_gpio_irq_leveL_high_handler(struct irq_desc *desc)
 {
struct altera_gpio_chip *altera_gc;
struct irq_chip *chip;
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index 2e7a8c66fe57..6471892f4f83 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -427,7 +427,7 @@ static int bcm_kona_gpio_irq_set_type(struct irq_data *d, 
unsigned int type)
return 0;
 }
 
-static void bcm_kona_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void bcm_kona_gpio_irq_handler(struct irq_desc *desc)
 {
void __iomem *reg_base;
int bit, bank_id;
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 9a738f5d409b..a2bd82f61822 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -327,7 +327,7 @@ static struct irq_chip gpio_irqchip = {
 };
 
 static void
-gpio_irq_handler(unsigned __irq, struct irq_desc *desc)
+gpio_irq_handler(struct irq_desc *desc)
 {
unsigned int irq = irq_desc_get_irq(desc);
struct davinci_gpio_regs __iomem *g;
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 649be07a845d..bf7cb1be756d 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -147,7 +147,7 @@ static u32 dwapb_do_irq(struct dwapb_gpio *gpio)
return ret;
 }
 
-static void dwapb_irq_handler(u32 irq, struct irq_desc *desc)
+static void dwapb_irq_handler(struct irq_desc *desc)
 {
struct dwapb_gpio *gpio = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index e507baa6e3a2..03648a8a6f8e 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -78,7 +78,7 @@ static void ep93xx_gpio_int_debounce(unsigned int irq, bool 
enable)
EP93XX_GPIO_REG(int_debounce_register_offset[port]));
 }
 
-static void ep93xx_gpio_ab_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ep93xx_gpio_ab_irq_handler(struct irq_desc *desc)
 {
unsigned char status;
int i;
@@ -100,7 +100,7 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, 
struct irq_desc *desc)
}
 }
 
-static void ep93xx_gpio_f_irq_handler(unsigned int __irq, struct irq_desc 
*desc)
+static void ep93xx_gpio_f_irq_handler(struct irq_desc *desc)
 {
/*
 * map discontiguous hw irq range to continuous sw irq range:
diff --git a/drivers/gpio/gpio-intel-mid.c b/drivers/gpio/gpio-intel-mid.c
index aa28c65eb6b4..70097472b02c 100644
--- a/drivers/gpio/gpio-intel-mid.c
+++ b/drivers/gpio/gpio-intel-mid.c
@@ -301,7 +301,7 @@ static const struct pci_device_id intel_gpio_ids[] = {
 };
 MODULE_DEVICE_TABLE(pci, intel_gpio_ids);
 
-static void intel_mid_irq_handler(unsigned irq, 

[RFT v2 39/48] genirq, mips: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
Acked-by: Ralf Baechle 
---
 arch/mips/alchemy/common/irq.c  |4 ++--
 arch/mips/alchemy/devboards/bcsr.c  |2 +-
 arch/mips/ath25/ar2315.c|2 +-
 arch/mips/ath25/ar5312.c|2 +-
 arch/mips/ath79/irq.c   |8 
 arch/mips/cavium-octeon/octeon-irq.c|8 
 arch/mips/include/asm/netlogic/common.h |4 ++--
 arch/mips/jz4740/gpio.c |2 +-
 arch/mips/netlogic/common/smp.c |4 ++--
 arch/mips/pci/pci-ar2315.c  |2 +-
 arch/mips/pci/pci-ar71xx.c  |2 +-
 arch/mips/pci/pci-ar724x.c  |2 +-
 arch/mips/pci/pci-rt3883.c  |2 +-
 arch/mips/ralink/irq.c  |2 +-
 14 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/arch/mips/alchemy/common/irq.c b/arch/mips/alchemy/common/irq.c
index 026c4eed37d5..08b3e52adf1d 100644
--- a/arch/mips/alchemy/common/irq.c
+++ b/arch/mips/alchemy/common/irq.c
@@ -851,7 +851,7 @@ static struct syscore_ops alchemy_gpic_pmops = {
 
 /* create chained handlers for the 4 IC requests to the MIPS IRQ ctrl */
 #define DISP(name, base, addr)   \
-static void au1000_##name##_dispatch(unsigned int irq, struct irq_desc *d)\
+static void au1000_##name##_dispatch(struct irq_desc *d) \
 {\
unsigned long r = __raw_readl((void __iomem *)KSEG1ADDR(addr));   \
if (likely(r))\
@@ -865,7 +865,7 @@ DISP(ic0r1, AU1000_INTC0_INT_BASE, AU1000_IC0_PHYS_ADDR + 
IC_REQ1INT)
 DISP(ic1r0, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ0INT)
 DISP(ic1r1, AU1000_INTC1_INT_BASE, AU1000_IC1_PHYS_ADDR + IC_REQ1INT)
 
-static void alchemy_gpic_dispatch(unsigned int irq, struct irq_desc *d)
+static void alchemy_gpic_dispatch(struct irq_desc *d)
 {
int i = __raw_readl(AU1300_GPIC_ADDR + AU1300_GPIC_PRIENC);
generic_handle_irq(ALCHEMY_GPIC_INT_BASE + i);
diff --git a/arch/mips/alchemy/devboards/bcsr.c 
b/arch/mips/alchemy/devboards/bcsr.c
index 8d6ea369bde4..0f725ceccffc 100644
--- a/arch/mips/alchemy/devboards/bcsr.c
+++ b/arch/mips/alchemy/devboards/bcsr.c
@@ -85,7 +85,7 @@ EXPORT_SYMBOL_GPL(bcsr_mod);
 /*
  * DB1200/PB1200 CPLD IRQ muxer
  */
-static void bcsr_csc_handler(unsigned int __irq, struct irq_desc *d)
+static void bcsr_csc_handler(struct irq_desc *d)
 {
unsigned int irq = irq_desc_get_irq(d);
unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT);
diff --git a/arch/mips/ath25/ar2315.c b/arch/mips/ath25/ar2315.c
index 8742e1cee492..b48128e64488 100644
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -69,7 +69,7 @@ static struct irqaction ar2315_ahb_err_interrupt  = {
.name   = "ar2315-ahb-error",
 };
 
-static void ar2315_misc_irq_handler(unsigned irq, struct irq_desc *desc)
+static void ar2315_misc_irq_handler(struct irq_desc *desc)
 {
u32 pending = ar2315_rst_reg_read(AR2315_ISR) &
  ar2315_rst_reg_read(AR2315_IMR);
diff --git a/arch/mips/ath25/ar5312.c b/arch/mips/ath25/ar5312.c
index 094b938fd603..db3c7b435e0c 100644
--- a/arch/mips/ath25/ar5312.c
+++ b/arch/mips/ath25/ar5312.c
@@ -73,7 +73,7 @@ static struct irqaction ar5312_ahb_err_interrupt  = {
.name= "ar5312-ahb-error",
 };
 
-static void ar5312_misc_irq_handler(unsigned irq, struct irq_desc *desc)
+static void ar5312_misc_irq_handler(struct irq_desc *desc)
 {
u32 pending = ar5312_rst_reg_read(AR5312_ISR) &
  ar5312_rst_reg_read(AR5312_IMR);
diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c
index 1b6620b0c057..6d31fefce756 100644
--- a/arch/mips/ath79/irq.c
+++ b/arch/mips/ath79/irq.c
@@ -27,7 +27,7 @@
 static void (*ath79_ip2_handler)(void);
 static void (*ath79_ip3_handler)(void);
 
-static void ath79_misc_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ath79_misc_irq_handler(struct irq_desc *desc)
 {
void __iomem *base = ath79_reset_base;
u32 pending;
@@ -120,7 +120,7 @@ static void __init ath79_misc_irq_init(void)
irq_set_chained_handler(ATH79_CPU_IRQ(6), ath79_misc_irq_handler);
 }
 
-static void ar934x_ip2_irq_dispatch(unsigned int __irq, struct irq_desc *desc)
+static void ar934x_ip2_irq_dispatch(struct irq_desc *desc)
 {
unsigned int irq = irq_desc_get_irq(desc);
u32 status;
@@ -154,7 +154,7 @@ static void ar934x_ip2_irq_init(void)
  

[RFT v2 38/48] genirq, powerpc: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 arch/powerpc/include/asm/qe_ic.h|   23 +--
 arch/powerpc/include/asm/tsi108_pci.h   |2 +-
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c  |2 +-
 arch/powerpc/platforms/52xx/media5200.c |2 +-
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c   |2 +-
 arch/powerpc/platforms/82xx/pq2ads-pci-pic.c|2 +-
 arch/powerpc/platforms/85xx/common.c|2 +-
 arch/powerpc/platforms/85xx/mpc85xx_cds.c   |5 ++---
 arch/powerpc/platforms/85xx/mpc85xx_ds.c|2 +-
 arch/powerpc/platforms/85xx/socrates_fpga_pic.c |2 +-
 arch/powerpc/platforms/86xx/pic.c   |2 +-
 arch/powerpc/platforms/8xx/m8xx_setup.c |2 +-
 arch/powerpc/platforms/cell/axon_msi.c  |2 +-
 arch/powerpc/platforms/cell/interrupt.c |2 +-
 arch/powerpc/platforms/cell/spider-pic.c|2 +-
 arch/powerpc/platforms/chrp/setup.c |2 +-
 arch/powerpc/platforms/embedded6xx/hlwd-pic.c   |3 +--
 arch/powerpc/platforms/embedded6xx/mvme5100.c   |2 +-
 arch/powerpc/platforms/pseries/setup.c  |2 +-
 arch/powerpc/sysdev/ge/ge_pic.c |2 +-
 arch/powerpc/sysdev/ge/ge_pic.h |2 +-
 arch/powerpc/sysdev/mpic.c  |2 +-
 arch/powerpc/sysdev/qe_lib/qe_ic.c  |4 ++--
 arch/powerpc/sysdev/tsi108_pci.c|2 +-
 arch/powerpc/sysdev/uic.c   |2 +-
 arch/powerpc/sysdev/xilinx_intc.c   |2 +-
 26 files changed, 36 insertions(+), 43 deletions(-)

diff --git a/arch/powerpc/include/asm/qe_ic.h b/arch/powerpc/include/asm/qe_ic.h
index 25784cc959a0..1e155ca6d33c 100644
--- a/arch/powerpc/include/asm/qe_ic.h
+++ b/arch/powerpc/include/asm/qe_ic.h
@@ -59,14 +59,14 @@ enum qe_ic_grp_id {
 
 #ifdef CONFIG_QUICC_ENGINE
 void qe_ic_init(struct device_node *node, unsigned int flags,
-   void (*low_handler)(unsigned int irq, struct irq_desc *desc),
-   void (*high_handler)(unsigned int irq, struct irq_desc *desc));
+   void (*low_handler)(struct irq_desc *desc),
+   void (*high_handler)(struct irq_desc *desc));
 unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic);
 unsigned int qe_ic_get_high_irq(struct qe_ic *qe_ic);
 #else
 static inline void qe_ic_init(struct device_node *node, unsigned int flags,
-   void (*low_handler)(unsigned int irq, struct irq_desc *desc),
-   void (*high_handler)(unsigned int irq, struct irq_desc *desc))
+   void (*low_handler)(struct irq_desc *desc),
+   void (*high_handler)(struct irq_desc *desc))
 {}
 static inline unsigned int qe_ic_get_low_irq(struct qe_ic *qe_ic)
 { return 0; }
@@ -78,8 +78,7 @@ void qe_ic_set_highest_priority(unsigned int virq, int high);
 int qe_ic_set_priority(unsigned int virq, unsigned int priority);
 int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int 
high);
 
-static inline void qe_ic_cascade_low_ipic(unsigned int irq,
- struct irq_desc *desc)
+static inline void qe_ic_cascade_low_ipic(struct irq_desc *desc)
 {
struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
@@ -88,8 +87,7 @@ static inline void qe_ic_cascade_low_ipic(unsigned int irq,
generic_handle_irq(cascade_irq);
 }
 
-static inline void qe_ic_cascade_high_ipic(unsigned int irq,
-  struct irq_desc *desc)
+static inline void qe_ic_cascade_high_ipic(struct irq_desc *desc)
 {
struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
unsigned int cascade_irq = qe_ic_get_high_irq(qe_ic);
@@ -98,8 +96,7 @@ static inline void qe_ic_cascade_high_ipic(unsigned int irq,
generic_handle_irq(cascade_irq);
 }
 
-static inline void qe_ic_cascade_low_mpic(unsigned int irq,
- struct irq_desc *desc)
+static inline void qe_ic_cascade_low_mpic(struct irq_desc *desc)
 {
struct qe_ic *qe_ic = irq_desc_get_handler_data(desc);
unsigned int cascade_irq = qe_ic_get_low_irq(qe_ic);
@@ -111,8 +108,7 @@ static inline void qe_ic_cascade_low_mpic(unsigned int irq,
chip->irq_eoi(>irq_data);
 }
 
-static inline void qe_ic_cascade_high_mpic(unsigned int irq,
-  struct irq_desc *desc)
+static inline void qe_ic_cascade_high_mpic(struct irq_desc *desc)
 {
struct qe_ic *qe_ic = 

[RFT v2 33/48] PCI/keystone: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 drivers/pci/host/pci-keystone.c |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c
index 75333b0c4f0a..98862768f1da 100644
--- a/drivers/pci/host/pci-keystone.c
+++ b/drivers/pci/host/pci-keystone.c
@@ -112,8 +112,9 @@ static int ks_pcie_establish_link(struct keystone_pcie 
*ks_pcie)
return 0;
 }
 
-static void ks_pcie_msi_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ks_pcie_msi_irq_handler(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc);
u32 offset = irq - ks_pcie->msi_host_irqs[0];
struct pcie_port *pp = _pcie->pp;
@@ -139,8 +140,9 @@ static void ks_pcie_msi_irq_handler(unsigned int irq, 
struct irq_desc *desc)
  * Traverse through pending legacy interrupts and invoke handler for each. Also
  * takes care of interrupt controller level mask/ack operation.
  */
-static void ks_pcie_legacy_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ks_pcie_legacy_irq_handler(unsigned int __irq, struct irq_desc 
*desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct keystone_pcie *ks_pcie = irq_desc_get_handler_data(desc);
struct pcie_port *pp = _pcie->pp;
u32 irq_offset = irq - ks_pcie->legacy_host_irqs[0];
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 27/48] sh, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handlers to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 arch/sh/boards/mach-se/7722/irq.c |2 +-
 arch/sh/boards/mach-se/7724/irq.c |2 +-
 drivers/sh/intc/virq.c|2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/sh/boards/mach-se/7722/irq.c 
b/arch/sh/boards/mach-se/7722/irq.c
index 00e699232621..60aebd14ccf8 100644
--- a/arch/sh/boards/mach-se/7722/irq.c
+++ b/arch/sh/boards/mach-se/7722/irq.c
@@ -30,7 +30,7 @@ struct irq_domain *se7722_irq_domain;
 
 static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
 {
-   struct irq_data *data = irq_get_irq_data(irq);
+   struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
unsigned long mask;
int bit;
diff --git a/arch/sh/boards/mach-se/7724/irq.c 
b/arch/sh/boards/mach-se/7724/irq.c
index 5d1d3ec9a6cd..5feb246f642d 100644
--- a/arch/sh/boards/mach-se/7724/irq.c
+++ b/arch/sh/boards/mach-se/7724/irq.c
@@ -94,7 +94,7 @@ static struct irq_chip se7724_irq_chip __read_mostly = {
 
 static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc)
 {
-   struct fpga_irq set = get_fpga_irq(irq);
+   struct fpga_irq set = get_fpga_irq(irq_desc_get_irq(desc));
unsigned short intv = __raw_readw(set.sraddr);
unsigned int ext_irq = set.base;
 
diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c
index bb7e745d4266..8704873e8186 100644
--- a/drivers/sh/intc/virq.c
+++ b/drivers/sh/intc/virq.c
@@ -114,7 +114,7 @@ static void intc_virq_handler(unsigned int irq, struct 
irq_desc *desc)
struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
struct intc_virq_list *entry, *vlist = 
irq_data_get_irq_handler_data(data);
-   struct intc_desc_int *d = get_intc_desc(irq);
+   struct intc_desc_int *d = get_intc_desc(irq_desc_get_irq(desc));
 
chip->irq_mask_ack(data);
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function

2015-06-03 Thread Sergey Senozhatsky
On (06/04/15 12:50), Minchan Kim wrote:
> > On (06/04/15 12:30), Minchan Kim wrote:
> > > 
> > > What scenario do you have a cocern?
> > > Could you describe this example more clear?
> > 
> > you mean "how is this even possible"?
> 
> No I meant. I couldn't understand your terms. Sorry.
> 
> What free-objs class capacity is?
> page1 is zspage?
> 
> Let's use consistent terms between us.
> 
> For example, maxobj-per-zspage is 4.
> A is allocated and used. X is allocated but not used.
> so we can draw a zspage below.
> 
> AAXX
> 
> So we can draw several zspages linked list as below
> 
> AAXX - AXXX - AAAX
> 
> Could you describe your problem again?
> 
> Sorry.

My apologies.

yes, so:
-- free-objs class capacity -- how may unused allocated objects
we have in this class (in total).
-- page1..pageN -- zspages.

And I think that my example is utterly wrong and incorrect. My mistake.
Sorry for the noise.

-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 41/48] genirq, x86: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 arch/x86/kernel/irq_32.c |   13 ++---
 arch/x86/kernel/irq_64.c |2 +-
 arch/x86/lguest/boot.c   |2 +-
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c
index cd74f5978ab9..9bf5cccefebd 100644
--- a/arch/x86/kernel/irq_32.c
+++ b/arch/x86/kernel/irq_32.c
@@ -69,10 +69,10 @@ static inline void *current_stack(void)
 }
 
 static inline int
-execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq)
+execute_on_irq_stack(int overflow, struct irq_desc *desc)
 {
struct irq_stack *curstk, *irqstk;
-   u32 *isp, *prev_esp, arg1, arg2;
+   u32 *isp, *prev_esp, arg1;
 
curstk = (struct irq_stack *) current_stack();
irqstk = __this_cpu_read(hardirq_stack);
@@ -98,9 +98,8 @@ execute_on_irq_stack(int overflow, struct irq_desc *desc, int 
irq)
asm volatile("xchgl %%ebx,%%esp \n"
 "call  *%%edi  \n"
 "movl  %%ebx,%%esp \n"
-: "=a" (arg1), "=d" (arg2), "=b" (isp)
-:  "0" (irq),   "1" (desc),  "2" (isp),
-   "D" (desc->handle_irq)
+: "=a" (arg1), "=b" (isp)
+:  "0" (desc), "1" (isp), "D" (desc->handle_irq)
 : "memory", "cc", "ecx");
return 1;
 }
@@ -159,10 +158,10 @@ bool handle_irq(unsigned irq, struct pt_regs *regs)
if (unlikely(!desc))
return false;
 
-   if (user_mode(regs) || !execute_on_irq_stack(overflow, desc, irq)) {
+   if (user_mode(regs) || !execute_on_irq_stack(overflow, desc)) {
if (unlikely(overflow))
print_stack_overflow();
-   desc->handle_irq(irq, desc);
+   desc->handle_irq(desc);
}
 
return true;
diff --git a/arch/x86/kernel/irq_64.c b/arch/x86/kernel/irq_64.c
index bc4604e500a3..eca6d5e3ad25 100644
--- a/arch/x86/kernel/irq_64.c
+++ b/arch/x86/kernel/irq_64.c
@@ -78,6 +78,6 @@ bool handle_irq(unsigned irq, struct pt_regs *regs)
if (unlikely(!desc))
return false;
 
-   generic_handle_irq_desc(irq, desc);
+   generic_handle_irq_desc(desc);
return true;
 }
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c
index cab9aaa7802c..24efba1c1f3d 100644
--- a/arch/x86/lguest/boot.c
+++ b/arch/x86/lguest/boot.c
@@ -1021,7 +1021,7 @@ static struct clock_event_device lguest_clockevent = {
  * This is the Guest timer interrupt handler (hardware interrupt 0).  We just
  * call the clockevent infrastructure and it does whatever needs doing.
  */
-static void lguest_time_irq(unsigned int irq, struct irq_desc *desc)
+static void lguest_time_irq(struct irq_desc *desc)
 {
unsigned long flags;
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 30/48] gpio: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handlers to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 drivers/gpio/gpio-davinci.c |3 ++-
 drivers/gpio/gpio-ep93xx.c  |3 ++-
 drivers/gpio/gpio-sa1100.c  |5 +++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c
index 477d5b8616ab..9a738f5d409b 100644
--- a/drivers/gpio/gpio-davinci.c
+++ b/drivers/gpio/gpio-davinci.c
@@ -327,8 +327,9 @@ static struct irq_chip gpio_irqchip = {
 };
 
 static void
-gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+gpio_irq_handler(unsigned __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct davinci_gpio_regs __iomem *g;
u32 mask = 0x;
struct davinci_gpio_controller *d;
diff --git a/drivers/gpio/gpio-ep93xx.c b/drivers/gpio/gpio-ep93xx.c
index 45684f36ddb1..e507baa6e3a2 100644
--- a/drivers/gpio/gpio-ep93xx.c
+++ b/drivers/gpio/gpio-ep93xx.c
@@ -100,13 +100,14 @@ static void ep93xx_gpio_ab_irq_handler(unsigned int irq, 
struct irq_desc *desc)
}
 }
 
-static void ep93xx_gpio_f_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void ep93xx_gpio_f_irq_handler(unsigned int __irq, struct irq_desc 
*desc)
 {
/*
 * map discontiguous hw irq range to continuous sw irq range:
 *
 *  IRQ_EP93XX_GPIO{0..7}MUX -> gpio_to_irq(EP93XX_GPIO_LINE_F({0..7})
 */
+   unsigned int irq = irq_desc_get_irq(desc);
int port_f_idx = ((irq + 1) & 7) ^ 4; /* {19..22,47..50} -> {0..7} */
int gpio_irq = gpio_to_irq(EP93XX_GPIO_LINE_F(0)) + port_f_idx;
 
diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index bec397a60204..b8c59635fb55 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -173,19 +173,20 @@ static struct irq_domain *sa1100_gpio_irqdomain;
  * and call the handler.
  */
 static void
-sa1100_gpio_handler(unsigned int irq, struct irq_desc *desc)
+sa1100_gpio_handler(unsigned int __irq, struct irq_desc *desc)
 {
unsigned int mask;
 
mask = GEDR;
do {
+   unsigned int irq = IRQ_GPIO0;
+
/*
 * clear down all currently active IRQ sources.
 * We will be processing them all.
 */
GEDR = mask;
 
-   irq = IRQ_GPIO0;
do {
if (mask & 1)
generic_handle_irq(irq);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 29/48] ipu: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 drivers/dma/ipu/ipu_irq.c |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 0e12af37fe2f..84083c93fe70 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -266,7 +266,7 @@ int ipu_irq_unmap(unsigned int source)
 }
 
 /* Chained IRQ handler for IPU error interrupt */
-static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
+static void ipu_irq_err(unsigned int __irq, struct irq_desc *desc)
 {
struct ipu *ipu = irq_desc_get_handler_data(desc);
u32 status;
@@ -286,6 +286,7 @@ static void ipu_irq_err(unsigned int irq, struct irq_desc 
*desc)
raw_spin_unlock(_lock);
while ((line = ffs(status))) {
struct ipu_irq_map *map;
+   unsigned int irq;
 
line--;
status &= ~(1UL << line);
@@ -307,7 +308,7 @@ static void ipu_irq_err(unsigned int irq, struct irq_desc 
*desc)
 }
 
 /* Chained IRQ handler for IPU function interrupt */
-static void ipu_irq_fn(unsigned int irq, struct irq_desc *desc)
+static void ipu_irq_fn(unsigned int __irq, struct irq_desc *desc)
 {
struct ipu *ipu = irq_desc_get_handler_data(desc);
u32 status;
@@ -323,6 +324,7 @@ static void ipu_irq_fn(unsigned int irq, struct irq_desc 
*desc)
raw_spin_unlock(_lock);
while ((line = ffs(status))) {
struct ipu_irq_map *map;
+   unsigned int irq;
 
line--;
status &= ~(1UL << line);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 42/48] genirq, sh: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 arch/sh/boards/mach-se/7343/irq.c  |2 +-
 arch/sh/boards/mach-se/7722/irq.c  |2 +-
 arch/sh/boards/mach-se/7724/irq.c  |2 +-
 arch/sh/boards/mach-x3proto/gpio.c |2 +-
 arch/sh/cchips/hd6446x/hd64461.c   |2 +-
 drivers/sh/intc/core.c |2 +-
 drivers/sh/intc/virq.c |4 ++--
 7 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/sh/boards/mach-se/7343/irq.c 
b/arch/sh/boards/mach-se/7343/irq.c
index 6f97a8f0d0d6..6129aef6db76 100644
--- a/arch/sh/boards/mach-se/7343/irq.c
+++ b/arch/sh/boards/mach-se/7343/irq.c
@@ -29,7 +29,7 @@
 static void __iomem *se7343_irq_regs;
 struct irq_domain *se7343_irq_domain;
 
-static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void se7343_irq_demux(struct irq_desc *desc)
 {
struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
diff --git a/arch/sh/boards/mach-se/7722/irq.c 
b/arch/sh/boards/mach-se/7722/irq.c
index 60aebd14ccf8..24c74a88290c 100644
--- a/arch/sh/boards/mach-se/7722/irq.c
+++ b/arch/sh/boards/mach-se/7722/irq.c
@@ -28,7 +28,7 @@
 static void __iomem *se7722_irq_regs;
 struct irq_domain *se7722_irq_domain;
 
-static void se7722_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void se7722_irq_demux(struct irq_desc *desc)
 {
struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
diff --git a/arch/sh/boards/mach-se/7724/irq.c 
b/arch/sh/boards/mach-se/7724/irq.c
index 5feb246f642d..d5f05af72d68 100644
--- a/arch/sh/boards/mach-se/7724/irq.c
+++ b/arch/sh/boards/mach-se/7724/irq.c
@@ -92,7 +92,7 @@ static struct irq_chip se7724_irq_chip __read_mostly = {
.irq_unmask = enable_se7724_irq,
 };
 
-static void se7724_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void se7724_irq_demux(struct irq_desc *desc)
 {
struct fpga_irq set = get_fpga_irq(irq_desc_get_irq(desc));
unsigned short intv = __raw_readw(set.sraddr);
diff --git a/arch/sh/boards/mach-x3proto/gpio.c 
b/arch/sh/boards/mach-x3proto/gpio.c
index 24555c364d5b..1fb2cbee25f2 100644
--- a/arch/sh/boards/mach-x3proto/gpio.c
+++ b/arch/sh/boards/mach-x3proto/gpio.c
@@ -60,7 +60,7 @@ static int x3proto_gpio_to_irq(struct gpio_chip *chip, 
unsigned gpio)
return virq;
 }
 
-static void x3proto_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void x3proto_gpio_irq_handler(struct irq_desc *desc)
 {
struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
diff --git a/arch/sh/cchips/hd6446x/hd64461.c b/arch/sh/cchips/hd6446x/hd64461.c
index e9735616bdc8..8180092502f7 100644
--- a/arch/sh/cchips/hd6446x/hd64461.c
+++ b/arch/sh/cchips/hd6446x/hd64461.c
@@ -56,7 +56,7 @@ static struct irq_chip hd64461_irq_chip = {
.irq_unmask = hd64461_unmask_irq,
 };
 
-static void hd64461_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void hd64461_irq_demux(struct irq_desc *desc)
 {
unsigned short intv = __raw_readw(HD64461_NIRR);
unsigned int ext_irq = HD64461_IRQBASE;
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index 6dc0361aeeeb..2fd4c163dd85 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -65,7 +65,7 @@ void intc_set_prio_level(unsigned int irq, unsigned int level)
raw_spin_unlock_irqrestore(_big_lock, flags);
 }
 
-static void intc_redirect_irq(unsigned int irq, struct irq_desc *desc)
+static void intc_redirect_irq(struct irq_desc *desc)
 {
generic_handle_irq((unsigned int)irq_desc_get_handler_data(desc));
 }
diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c
index 8704873e8186..d50169cb4af1 100644
--- a/drivers/sh/intc/virq.c
+++ b/drivers/sh/intc/virq.c
@@ -109,7 +109,7 @@ static int add_virq_to_pirq(unsigned int irq, unsigned int 
virq)
return 0;
 }
 
-static void intc_virq_handler(unsigned int irq, struct irq_desc *desc)
+static void intc_virq_handler(struct irq_desc *desc)
 {
struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
@@ -126,7 +126,7 @@ static void intc_virq_handler(unsigned int irq, struct 
irq_desc *desc)
handle = (unsigned 
long)irq_desc_get_handler_data(vdesc);
addr = INTC_REG(d, _INTC_ADDR_E(handle), 0);
if (intc_reg_fns[_INTC_FN(handle)](addr, handle, 0))
-   generic_handle_irq_desc(entry->irq, vdesc);

Re: [PATCH TRIVIAL] scripts/kconfig/Makefile: Cosmetic fixes

2015-06-03 Thread Diego Viola
Thanks, I can't see my change on the repository though?

https://git.kernel.org/cgit/linux/kernel/git/mmarek/kbuild.git/

Diego

On Wed, Jun 3, 2015 at 5:58 AM, Michal Marek  wrote:
> On 2015-05-31 19:35, Diego Viola wrote:
>> Signed-off-by: Diego Viola 
>> ---
>>  scripts/kconfig/Makefile | 10 +-
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> Applied to kbuild.git#kconfig.
>
> Michal
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 32/48] mfd: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 drivers/mfd/ucb1x00-core.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c
index 58ea9fdd3a15..08ce1dad4167 100644
--- a/drivers/mfd/ucb1x00-core.c
+++ b/drivers/mfd/ucb1x00-core.c
@@ -292,7 +292,7 @@ static void ucb1x00_irq(unsigned int irq, struct irq_desc 
*desc)
ucb1x00_reg_write(ucb, UCB_IE_CLEAR, isr);
ucb1x00_reg_write(ucb, UCB_IE_CLEAR, 0);
 
-   for (i = 0; i < 16 && isr; i++, isr >>= 1, irq++)
+   for (i = 0; i < 16 && isr; i++, isr >>= 1)
if (isr & 1)
generic_handle_irq(ucb->irq_base + i);
ucb1x00_disable(ucb);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 26/48] powerpc, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c  |4 +++-
 arch/powerpc/platforms/85xx/socrates_fpga_pic.c |2 +-
 arch/powerpc/platforms/cell/interrupt.c |3 ++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c 
b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
index ca3a062ed1b9..4411ed51803e 100644
--- a/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
+++ b/arch/powerpc/platforms/512x/mpc5121_ads_cpld.c
@@ -105,8 +105,10 @@ cpld_pic_get_irq(int offset, u8 ignore, u8 __iomem 
*statusp,
 }
 
 static void
-cpld_pic_cascade(unsigned int irq, struct irq_desc *desc)
+cpld_pic_cascade(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq;
+
irq = cpld_pic_get_irq(0, PCI_IGNORE, _regs->pci_status,
_regs->pci_mask);
if (irq != NO_IRQ) {
diff --git a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c 
b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
index 55a9682b9529..5153e58654f7 100644
--- a/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
+++ b/arch/powerpc/platforms/85xx/socrates_fpga_pic.c
@@ -100,7 +100,7 @@ void socrates_fpga_pic_cascade(unsigned int irq, struct 
irq_desc *desc)
 * See if we actually have an interrupt, call generic handling code if
 * we do.
 */
-   cascade_irq = socrates_fpga_pic_get_irq(irq);
+   cascade_irq = socrates_fpga_pic_get_irq(irq_desc_get_irq(desc));
 
if (cascade_irq != NO_IRQ)
generic_handle_irq(cascade_irq);
diff --git a/arch/powerpc/platforms/cell/interrupt.c 
b/arch/powerpc/platforms/cell/interrupt.c
index 3af8324c122e..e2dd6c9d3a78 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -99,8 +99,9 @@ static void iic_ioexc_eoi(struct irq_data *d)
 {
 }
 
-static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc)
+static void iic_ioexc_cascade(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
struct cbe_iic_regs __iomem *node_iic =
(void __iomem *)irq_desc_get_handler_data(desc);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 35/48] genirq: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 include/linux/irq.h|   16 
 include/linux/irqdesc.h|4 ++--
 include/linux/irqhandler.h |2 +-
 kernel/irq/chip.c  |   22 --
 kernel/irq/handle.c|4 ++--
 kernel/irq/irqdesc.c   |2 +-
 6 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index ab6dca4ad968..3caa4e91cfe5 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -461,14 +461,14 @@ static inline int irq_set_parent(int irq, int parent_irq)
  * Built-in IRQ handlers for various IRQ types,
  * callable via desc->handle_irq()
  */
-extern void handle_level_irq(unsigned int irq, struct irq_desc *desc);
-extern void handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc);
-extern void handle_edge_irq(unsigned int irq, struct irq_desc *desc);
-extern void handle_edge_eoi_irq(unsigned int irq, struct irq_desc *desc);
-extern void handle_simple_irq(unsigned int irq, struct irq_desc *desc);
-extern void handle_percpu_irq(unsigned int irq, struct irq_desc *desc);
-extern void handle_percpu_devid_irq(unsigned int irq, struct irq_desc *desc);
-extern void handle_bad_irq(unsigned int irq, struct irq_desc *desc);
+extern void handle_level_irq(struct irq_desc *desc);
+extern void handle_fasteoi_irq(struct irq_desc *desc);
+extern void handle_edge_irq(struct irq_desc *desc);
+extern void handle_edge_eoi_irq(struct irq_desc *desc);
+extern void handle_simple_irq(struct irq_desc *desc);
+extern void handle_percpu_irq(struct irq_desc *desc);
+extern void handle_percpu_devid_irq(struct irq_desc *desc);
+extern void handle_bad_irq(struct irq_desc *desc);
 extern void handle_nested_irq(unsigned int irq);
 
 extern int irq_chip_compose_msi_msg(struct irq_data *data, struct msi_msg 
*msg);
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index a7aaef44a10e..2d8463121f07 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -136,9 +136,9 @@ static inline struct msi_desc *irq_desc_get_msi_desc(struct 
irq_desc *desc)
  * irqchip-style controller then we call the ->handle_irq() handler,
  * and it calls __do_IRQ() if it's attached to an irqtype-style controller.
  */
-static inline void generic_handle_irq_desc(unsigned int irq, struct irq_desc 
*desc)
+static inline void generic_handle_irq_desc(struct irq_desc *desc)
 {
-   desc->handle_irq(irq, desc);
+   desc->handle_irq(desc);
 }
 
 int generic_handle_irq(unsigned int irq);
diff --git a/include/linux/irqhandler.h b/include/linux/irqhandler.h
index 62d543004197..661bed0ed1f3 100644
--- a/include/linux/irqhandler.h
+++ b/include/linux/irqhandler.h
@@ -8,7 +8,7 @@
 
 struct irq_desc;
 struct irq_data;
-typedefvoid (*irq_flow_handler_t)(unsigned int irq, struct irq_desc 
*desc);
+typedefvoid (*irq_flow_handler_t)(struct irq_desc *desc);
 typedefvoid (*irq_preflow_handler_t)(struct irq_data *data);
 
 #endif
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 048698045dad..3c51483ce9d8 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -372,7 +372,6 @@ static bool irq_may_run(struct irq_desc *desc)
 
 /**
  * handle_simple_irq - Simple and software-decoded IRQs.
- * @irq:   the interrupt number
  * @desc:  the interrupt description structure for this irq
  *
  * Simple interrupts are either sent from a demultiplexing interrupt
@@ -383,7 +382,7 @@ static bool irq_may_run(struct irq_desc *desc)
  * unmask issues if necessary.
  */
 void
-handle_simple_irq(unsigned int irq, struct irq_desc *desc)
+handle_simple_irq(struct irq_desc *desc)
 {
raw_spin_lock(>lock);
 
@@ -425,7 +424,6 @@ static void cond_unmask_irq(struct irq_desc *desc)
 
 /**
  * handle_level_irq - Level type irq handler
- * @irq:   the interrupt number
  * @desc:  the interrupt description structure for this irq
  *
  * Level type interrupts are active as long as the hardware line has
@@ -434,7 +432,7 @@ static void cond_unmask_irq(struct irq_desc *desc)
  * interrupt line is back to inactive.
  */
 void
-handle_level_irq(unsigned int irq, struct irq_desc *desc)
+handle_level_irq(struct irq_desc *desc)
 {
raw_spin_lock(>lock);
mask_ack_irq(desc);
@@ -496,7 +494,6 @@ static void cond_unmask_eoi_irq(struct irq_desc *desc, 
struct irq_chip *chip)
 
 /**
  * handle_fasteoi_irq - irq handler for transparent controllers
- * @irq:   the interrupt number
  * @desc:  the interrupt description structure for this irq
  *
  * Only a single callback will be issued to the chip: an ->eoi()
@@ -505,7 

[RFT v2 31/48] irqchip: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 drivers/irqchip/irq-brcmstb-l2.c |7 ---
 drivers/irqchip/irq-imgpdc.c |3 ++-
 drivers/irqchip/irq-keystone.c   |4 ++--
 drivers/irqchip/irq-mmp.c|3 ++-
 drivers/irqchip/irq-s3c24xx.c|4 ++--
 drivers/irqchip/irq-tb10x.c  |2 +-
 drivers/irqchip/irq-versatile-fpga.c |6 +++---
 7 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/drivers/irqchip/irq-brcmstb-l2.c b/drivers/irqchip/irq-brcmstb-l2.c
index d6bcc6be0777..994c01fdb4b5 100644
--- a/drivers/irqchip/irq-brcmstb-l2.c
+++ b/drivers/irqchip/irq-brcmstb-l2.c
@@ -51,7 +51,7 @@ struct brcmstb_l2_intc_data {
u32 saved_mask; /* for suspend/resume */
 };
 
-static void brcmstb_l2_intc_irq_handle(unsigned int irq, struct irq_desc *desc)
+static void brcmstb_l2_intc_irq_handle(unsigned int __irq, struct irq_desc 
*desc)
 {
struct brcmstb_l2_intc_data *b = irq_desc_get_handler_data(desc);
struct irq_chip_generic *gc = irq_get_domain_generic_chip(b->domain, 0);
@@ -65,13 +65,14 @@ static void brcmstb_l2_intc_irq_handle(unsigned int irq, 
struct irq_desc *desc)
 
if (status == 0) {
raw_spin_lock(>lock);
-   handle_bad_irq(irq, desc);
+   handle_bad_irq(__irq, desc);
raw_spin_unlock(>lock);
goto out;
}
 
do {
-   irq = ffs(status) - 1;
+   unsigned int irq = ffs(status) - 1;
+
/* ack at our level */
irq_reg_writel(gc, 1 << irq, CPU_CLEAR);
status &= ~(1 << irq);
diff --git a/drivers/irqchip/irq-imgpdc.c b/drivers/irqchip/irq-imgpdc.c
index 8071c2eb0248..d94eb43f252a 100644
--- a/drivers/irqchip/irq-imgpdc.c
+++ b/drivers/irqchip/irq-imgpdc.c
@@ -218,8 +218,9 @@ static int pdc_irq_set_wake(struct irq_data *data, unsigned 
int on)
return 0;
 }
 
-static void pdc_intc_perip_isr(unsigned int irq, struct irq_desc *desc)
+static void pdc_intc_perip_isr(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct pdc_intc_priv *priv;
unsigned int i, irq_no;
 
diff --git a/drivers/irqchip/irq-keystone.c b/drivers/irqchip/irq-keystone.c
index 78e8b3ce5252..8b05603d3be0 100644
--- a/drivers/irqchip/irq-keystone.c
+++ b/drivers/irqchip/irq-keystone.c
@@ -90,7 +90,7 @@ static void keystone_irq_handler(unsigned irq, struct 
irq_desc *desc)
unsigned long pending;
int src, virq;
 
-   dev_dbg(kirq->dev, "start irq %d\n", irq);
+   dev_dbg(kirq->dev, "start irq %d\n", irq_desc_get_irq(desc));
 
chained_irq_enter(irq_desc_get_chip(desc), desc);
 
@@ -117,7 +117,7 @@ static void keystone_irq_handler(unsigned irq, struct 
irq_desc *desc)
 
chained_irq_exit(irq_desc_get_chip(desc), desc);
 
-   dev_dbg(kirq->dev, "end irq %d\n", irq);
+   dev_dbg(kirq->dev, "end irq %d\n", irq_desc_get_irq(desc));
 }
 
 static int keystone_irq_map(struct irq_domain *h, unsigned int virq,
diff --git a/drivers/irqchip/irq-mmp.c b/drivers/irqchip/irq-mmp.c
index c0da57bdb89d..44febf10be2f 100644
--- a/drivers/irqchip/irq-mmp.c
+++ b/drivers/irqchip/irq-mmp.c
@@ -130,8 +130,9 @@ struct irq_chip icu_irq_chip = {
.irq_unmask = icu_unmask_irq,
 };
 
-static void icu_mux_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void icu_mux_irq_demux(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct irq_domain *domain;
struct icu_chip_data *data;
int i;
diff --git a/drivers/irqchip/irq-s3c24xx.c b/drivers/irqchip/irq-s3c24xx.c
index c8d373fcd823..efca6390aa87 100644
--- a/drivers/irqchip/irq-s3c24xx.c
+++ b/drivers/irqchip/irq-s3c24xx.c
@@ -327,8 +327,8 @@ static void s3c_irq_demux(unsigned int irq, struct irq_desc 
*desc)
while (src) {
n = __ffs(src);
src &= ~(1 << n);
-   irq = irq_find_mapping(sub_intc->domain, offset + n);
-   generic_handle_irq(irq);
+   generic_handle_irq(irq_find_mapping(sub_intc->domain,
+   offset + n));
}
 
chained_irq_exit(chip, desc);
diff --git a/drivers/irqchip/irq-tb10x.c b/drivers/irqchip/irq-tb10x.c
index accc20036a3c..117cf25c6cfe 100644
--- a/drivers/irqchip/irq-tb10x.c
+++ b/drivers/irqchip/irq-tb10x.c
@@ -101,7 +101,7 @@ static void tb10x_irq_cascade(unsigned int irq, struct 
irq_desc *desc)
 {
struct irq_domain *domain = irq_desc_get_handler_data(desc);
 
-   generic_handle_irq(irq_find_mapping(domain, irq));
+   generic_handle_irq(irq_find_mapping(domain, irq_desc_get_irq(desc)));
 }
 
 static int __init of_tb10x_init_irq(struct device_node *ictl,
diff --git a/drivers/irqchip/irq-versatile-fpga.c 

[RFT v2 37/48] genirq, blackfin: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
---
 arch/blackfin/include/asm/irq_handler.h   |4 ++--
 arch/blackfin/kernel/ipipe.c  |2 +-
 arch/blackfin/mach-bf537/ints-priority.c  |8 +++-
 arch/blackfin/mach-common/ints-priority.c |6 ++
 4 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/arch/blackfin/include/asm/irq_handler.h 
b/arch/blackfin/include/asm/irq_handler.h
index 4b2a992794d7..d2f90c72378e 100644
--- a/arch/blackfin/include/asm/irq_handler.h
+++ b/arch/blackfin/include/asm/irq_handler.h
@@ -60,7 +60,7 @@ extern void bfin_internal_mask_irq(unsigned int irq);
 extern void bfin_internal_unmask_irq(unsigned int irq);
 
 struct irq_desc;
-extern void bfin_demux_mac_status_irq(unsigned int, struct irq_desc *);
-extern void bfin_demux_gpio_irq(unsigned int, struct irq_desc *);
+extern void bfin_demux_mac_status_irq(struct irq_desc *);
+extern void bfin_demux_gpio_irq(struct irq_desc *);
 
 #endif
diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c
index 6007a1375c5b..8daca4d56992 100644
--- a/arch/blackfin/kernel/ipipe.c
+++ b/arch/blackfin/kernel/ipipe.c
@@ -54,7 +54,7 @@ atomic_t __ipipe_irq_lvdepth[IVG15 + 1];
 unsigned long __ipipe_irq_lvmask = bfin_no_irqs;
 EXPORT_SYMBOL(__ipipe_irq_lvmask);
 
-static void __ipipe_ack_irq(unsigned irq, struct irq_desc *desc)
+static void __ipipe_ack_irq(struct irq_desc *desc)
 {
desc->ipipe_ack(irq_desc_get_irq(desc), desc);
 }
diff --git a/arch/blackfin/mach-bf537/ints-priority.c 
b/arch/blackfin/mach-bf537/ints-priority.c
index 2137a209a22b..a48baae4384d 100644
--- a/arch/blackfin/mach-bf537/ints-priority.c
+++ b/arch/blackfin/mach-bf537/ints-priority.c
@@ -89,8 +89,7 @@ static struct irq_chip bf537_generic_error_irqchip = {
.irq_unmask = bf537_generic_error_unmask_irq,
 };
 
-static void bf537_demux_error_irq(unsigned int int_err_irq,
- struct irq_desc *inta_desc)
+static void bf537_demux_error_irq(struct irq_desc *inta_desc)
 {
int irq = 0;
 
@@ -182,13 +181,12 @@ static struct irq_chip bf537_mac_rx_irqchip = {
.irq_unmask = bf537_mac_rx_unmask_irq,
 };
 
-static void bf537_demux_mac_rx_irq(unsigned int int_irq,
-  struct irq_desc *desc)
+static void bf537_demux_mac_rx_irq(struct irq_desc *desc)
 {
if (bfin_read_DMA1_IRQ_STATUS() & (DMA_DONE | DMA_ERR))
bfin_handle_irq(IRQ_MAC_RX);
else
-   bfin_demux_gpio_irq(int_irq, desc);
+   bfin_demux_gpio_irq(desc);
 }
 #endif
 
diff --git a/arch/blackfin/mach-common/ints-priority.c 
b/arch/blackfin/mach-common/ints-priority.c
index 4e3155e5aa20..e7d6d65e0946 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -656,8 +656,7 @@ static struct irq_chip bfin_mac_status_irqchip = {
.irq_set_wake = bfin_mac_status_set_wake,
 };
 
-void bfin_demux_mac_status_irq(unsigned int int_err_irq,
-  struct irq_desc *inta_desc)
+void bfin_demux_mac_status_irq(struct irq_desc *inta_desc)
 {
int i, irq = 0;
u32 status = bfin_read_EMAC_SYSTAT();
@@ -825,8 +824,7 @@ static void bfin_demux_gpio_block(unsigned int irq)
}
 }
 
-void bfin_demux_gpio_irq(unsigned int inta_irq,
-   struct irq_desc *desc)
+void bfin_demux_gpio_irq(struct irq_desc *desc)
 {
unsigned int irq;
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 36/48] genirq, arm: Kill the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Now most IRQ flow handlers make no use of the first parameter 'irq'.
And for those who do make use of 'irq', we could easily get the irq
number through irq_desc->irq_data->irq. So kill the first parameter
'irq' of irq_flow_handler_t.

To ease review, I have split the changes into several parts, though
they should be merge as one to support bisecting.

Signed-off-by: Jiang Liu 
Signed-off-by: Hans Ulli Kroll 
---
 arch/arm/common/it8152.c   |2 +-
 arch/arm/common/locomo.c   |2 +-
 arch/arm/common/sa.c   |4 ++--
 arch/arm/include/asm/hardware/it8152.h |2 +-
 arch/arm/include/asm/mach/irq.h|4 ++--
 arch/arm/mach-dove/irq.c   |4 ++--
 arch/arm/mach-footbridge/isa-irq.c |4 ++--
 arch/arm/mach-gemini/gpio.c|2 +-
 arch/arm/mach-imx/3ds_debugboard.c |2 +-
 arch/arm/mach-imx/mach-mx31ads.c   |2 +-
 arch/arm/mach-iop13xx/msi.c|2 +-
 arch/arm/mach-lpc32xx/irq.c|4 ++--
 arch/arm/mach-netx/generic.c   |2 +-
 arch/arm/mach-omap1/fpga.c |2 +-
 arch/arm/mach-omap2/prm_common.c   |2 +-
 arch/arm/mach-pxa/balloon3.c   |2 +-
 arch/arm/mach-pxa/cm-x2xx-pci.c|4 ++--
 arch/arm/mach-pxa/lpd270.c |2 +-
 arch/arm/mach-pxa/pcm990-baseboard.c   |2 +-
 arch/arm/mach-pxa/viper.c  |2 +-
 arch/arm/mach-pxa/zeus.c   |2 +-
 arch/arm/mach-rpc/ecard.c  |2 +-
 arch/arm/mach-s3c24xx/bast-irq.c   |3 +--
 arch/arm/mach-s3c64xx/common.c |8 
 arch/arm/mach-sa1100/neponset.c|2 +-
 arch/arm/plat-orion/gpio.c |2 +-
 26 files changed, 35 insertions(+), 36 deletions(-)

diff --git a/arch/arm/common/it8152.c b/arch/arm/common/it8152.c
index 5114b68e99d5..aaa206181f92 100644
--- a/arch/arm/common/it8152.c
+++ b/arch/arm/common/it8152.c
@@ -95,7 +95,7 @@ void it8152_init_irq(void)
}
 }
 
-void it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
+void it8152_irq_demux(struct irq_desc *desc)
 {
int bits_pd, bits_lp, bits_ld;
int i;
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index d4a62ff39576..43e18e8b0277 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -138,7 +138,7 @@ static struct locomo_dev_info locomo_devices[] = {
},
 };
 
-static void locomo_handler(unsigned int irq, struct irq_desc *desc)
+static void locomo_handler(struct irq_desc *desc)
 {
struct locomo *lchip = irq_desc_get_chip_data(desc);
int req, i;
diff --git a/arch/arm/common/sa.c b/arch/arm/common/sa.c
index 0d0844fa54c2..762dfe7081f0 100644
--- a/arch/arm/common/sa.c
+++ b/arch/arm/common/sa.c
@@ -197,7 +197,7 @@ static struct sa_dev_info sa_devices[] = {
  * will call us again if there are more interrupts to process.
  */
 static void
-sa_irq_handler(unsigned int irq, struct irq_desc *desc)
+sa_irq_handler(struct irq_desc *desc)
 {
unsigned int stat0, stat1, i;
struct sa *sachip = irq_desc_get_handler_data(desc);
@@ -213,7 +213,7 @@ sa_irq_handler(unsigned int irq, struct irq_desc *desc)
sa_writel(stat1, mapbase + SA_INTSTATCLR1);
 
if (stat0 == 0 && stat1 == 0) {
-   do_bad_IRQ(irq, desc);
+   do_bad_IRQ(desc);
return;
}
 
diff --git a/arch/arm/include/asm/hardware/it8152.h 
b/arch/arm/include/asm/hardware/it8152.h
index d36a73d7c0e8..076777ff3daa 100644
--- a/arch/arm/include/asm/hardware/it8152.h
+++ b/arch/arm/include/asm/hardware/it8152.h
@@ -106,7 +106,7 @@ extern void __iomem *it8152_base_address;
 struct pci_dev;
 struct pci_sys_data;
 
-extern void it8152_irq_demux(unsigned int irq, struct irq_desc *desc);
+extern void it8152_irq_demux(struct irq_desc *desc);
 extern void it8152_init_irq(void);
 extern int it8152_pci_map_irq(const struct pci_dev *dev, u8 slot, u8 pin);
 extern int it8152_pci_setup(int nr, struct pci_sys_data *sys);
diff --git a/arch/arm/include/asm/mach/irq.h b/arch/arm/include/asm/mach/irq.h
index 2092ee1e1300..4703e00283db 100644
--- a/arch/arm/include/asm/mach/irq.h
+++ b/arch/arm/include/asm/mach/irq.h
@@ -23,10 +23,10 @@ extern int show_fiq_list(struct seq_file *, int);
 /*
  * This is for easy migration, but should be changed in the source
  */
-#define do_bad_IRQ(irq,desc)   \
+#define do_bad_IRQ(desc)   \
 do {   \
raw_spin_lock(>lock); \
-   handle_bad_irq(irq, desc);  \
+   handle_bad_irq(desc);   \
raw_spin_unlock(>lock);   \
 } while(0)
 
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 6d0f0b12f95a..30140cbdb249 100644
--- a/arch/arm/mach-dove/irq.c
+++ 

[RFT v2 23/48] c6x, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 arch/c6x/platforms/megamod-pic.c |7 ++-
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/arch/c6x/platforms/megamod-pic.c b/arch/c6x/platforms/megamod-pic.c
index 74e3371eb824..2e303b75060a 100644
--- a/arch/c6x/platforms/megamod-pic.c
+++ b/arch/c6x/platforms/megamod-pic.c
@@ -107,12 +107,9 @@ static void megamod_irq_cascade(unsigned int irq, struct 
irq_desc *desc)
 
while ((events = soc_readl(>regs->mevtflag[idx])) != 0) {
n = __ffs(events);
-
-   irq = irq_linear_revmap(pic->irqhost, idx * 32 + n);
-
soc_writel(1 << n, >regs->evtclr[idx]);
-
-   generic_handle_irq(irq);
+   generic_handle_irq(irq_linear_revmap(pic->irqhost,
+idx * 32 + n));
}
 }
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 24/48] m68k, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 arch/m68k/mac/psc.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/m68k/mac/psc.c b/arch/m68k/mac/psc.c
index 835fa04511c8..ea7651a7908b 100644
--- a/arch/m68k/mac/psc.c
+++ b/arch/m68k/mac/psc.c
@@ -113,8 +113,9 @@ void __init psc_init(void)
  * PSC interrupt handler. It's a lot like the VIA interrupt handler.
  */
 
-static void psc_irq(unsigned int irq, struct irq_desc *desc)
+static void psc_irq(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
unsigned int offset = (unsigned int)irq_desc_get_handler_data(desc);
int pIFR= pIFRbase + offset;
int pIER= pIERbase + offset;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 28/48] unicore32, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 arch/unicore32/kernel/irq.c |5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/unicore32/kernel/irq.c b/arch/unicore32/kernel/irq.c
index 0be5ccd7ccd2..56fdd4dd2740 100644
--- a/arch/unicore32/kernel/irq.c
+++ b/arch/unicore32/kernel/irq.c
@@ -113,19 +113,20 @@ static struct irq_chip puv3_low_gpio_chip = {
  * and call the handler.
  */
 static void
-puv3_gpio_handler(unsigned int irq, struct irq_desc *desc)
+puv3_gpio_handler(unsigned int __irq, struct irq_desc *desc)
 {
unsigned int mask;
 
mask = readl(GPIO_GEDR);
do {
+   unsigned int irq = IRQ_GPIO0;
+
/*
 * clear down all currently active IRQ sources.
 * We will be processing them all.
 */
writel(mask, GPIO_GEDR);
 
-   irq = IRQ_GPIO0;
do {
if (mask & 1)
generic_handle_irq(irq);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 34/48] pinctrl: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 drivers/pinctrl/pinctrl-amd.c |6 --
 drivers/pinctrl/pinctrl-coh901.c  |3 ++-
 drivers/pinctrl/pinctrl-rockchip.c|4 ++--
 drivers/pinctrl/sirf/pinctrl-sirf.c   |3 ++-
 drivers/pinctrl/sunxi/pinctrl-sunxi.c |3 ++-
 5 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 639cd77c1fbb..31e206613814 100644
--- a/drivers/pinctrl/pinctrl-amd.c
+++ b/drivers/pinctrl/pinctrl-amd.c
@@ -492,7 +492,7 @@ static struct irq_chip amd_gpio_irqchip = {
.irq_set_type = amd_gpio_irq_set_type,
 };
 
-static void amd_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void amd_gpio_irq_handler(unsigned int __irq, struct irq_desc *desc)
 {
u32 i;
u32 off;
@@ -527,6 +527,8 @@ static void amd_gpio_irq_handler(unsigned int irq, struct 
irq_desc *desc)
(off * 4 + i) * 4);
if ((pin_reg & BIT(INTERRUPT_STS_OFF)) ||
(pin_reg & BIT(WAKE_STS_OFF))) {
+   unsigned int irq;
+
irq = irq_find_mapping(gc->irqdomain,
off * 4 + i);
generic_handle_irq(irq);
@@ -540,7 +542,7 @@ static void amd_gpio_irq_handler(unsigned int irq, struct 
irq_desc *desc)
}
 
if (handled == 0)
-   handle_bad_irq(irq, desc);
+   handle_bad_irq(__irq, desc);
 
spin_lock_irqsave(_dev->lock, flags);
reg = readl(gpio_dev->base + WAKE_INT_MASTER_REG);
diff --git a/drivers/pinctrl/pinctrl-coh901.c b/drivers/pinctrl/pinctrl-coh901.c
index 9579442a221d..3731cc67a88b 100644
--- a/drivers/pinctrl/pinctrl-coh901.c
+++ b/drivers/pinctrl/pinctrl-coh901.c
@@ -519,8 +519,9 @@ static struct irq_chip u300_gpio_irqchip = {
.irq_set_type   = u300_gpio_irq_type,
 };
 
-static void u300_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
+static void u300_gpio_irq_handler(unsigned __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct irq_chip *parent_chip = irq_desc_get_chip(desc);
struct gpio_chip *chip = irq_desc_get_handler_data(desc);
struct u300_gpio *gpio = to_u300_gpio(chip);
diff --git a/drivers/pinctrl/pinctrl-rockchip.c 
b/drivers/pinctrl/pinctrl-rockchip.c
index 97a4a3dddb30..1fff71221d83 100644
--- a/drivers/pinctrl/pinctrl-rockchip.c
+++ b/drivers/pinctrl/pinctrl-rockchip.c
@@ -1394,7 +1394,7 @@ static const struct gpio_chip rockchip_gpiolib_chip = {
  * Interrupt handling
  */
 
-static void rockchip_irq_demux(unsigned int irq, struct irq_desc *desc)
+static void rockchip_irq_demux(unsigned int __irq, struct irq_desc *desc)
 {
struct irq_chip *chip = irq_desc_get_chip(desc);
struct rockchip_pin_bank *bank = irq_desc_get_handler_data(desc);
@@ -1407,7 +1407,7 @@ static void rockchip_irq_demux(unsigned int irq, struct 
irq_desc *desc)
pend = readl_relaxed(bank->reg_base + GPIO_INT_STATUS);
 
while (pend) {
-   unsigned int virq;
+   unsigned int virq, irq;
 
irq = __ffs(pend);
pend &= ~BIT(irq);
diff --git a/drivers/pinctrl/sirf/pinctrl-sirf.c 
b/drivers/pinctrl/sirf/pinctrl-sirf.c
index 46cafde08ebf..89792e12d744 100644
--- a/drivers/pinctrl/sirf/pinctrl-sirf.c
+++ b/drivers/pinctrl/sirf/pinctrl-sirf.c
@@ -545,8 +545,9 @@ static struct irq_chip sirfsoc_irq_chip = {
.irq_set_type = sirfsoc_gpio_irq_type,
 };
 
-static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc)
+static void sirfsoc_gpio_handle_irq(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
struct sirfsoc_gpio_chip *sgpio = to_sirfsoc_gpio(gc);
struct sirfsoc_gpio_bank *bank;
diff --git a/drivers/pinctrl/sunxi/pinctrl-sunxi.c 
b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
index 563cec6dc24e..ace032681d82 100644
--- a/drivers/pinctrl/sunxi/pinctrl-sunxi.c
+++ b/drivers/pinctrl/sunxi/pinctrl-sunxi.c
@@ -709,8 +709,9 @@ static struct irq_chip sunxi_pinctrl_level_irq_chip = {
  IRQCHIP_EOI_IF_HANDLED,
 };
 
-static void sunxi_pinctrl_irq_handler(unsigned irq, struct irq_desc *desc)
+static void sunxi_pinctrl_irq_handler(unsigned __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
struct sunxi_pinctrl *pctl = irq_desc_get_handler_data(desc);
unsigned long bank, reg, val;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe 

[RFT v2 18/48] genirq: Kill the parameter 'irq' of note_interrupt()

2015-06-03 Thread Jiang Liu
Simplify interrupt management interfaces by killing the parameter 'irq'
of note_interrupt().

Signed-off-by: Jiang Liu 
---
 include/linux/irq.h|3 +--
 kernel/irq/chip.c  |4 ++--
 kernel/irq/handle.c|2 +-
 kernel/irq/internals.h |7 +++
 kernel/irq/manage.c|   25 +
 kernel/irq/pm.c|   12 ++--
 kernel/irq/spurious.c  |   33 -
 7 files changed, 42 insertions(+), 44 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index 2de650d61a4e..ab6dca4ad968 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -487,8 +487,7 @@ extern int irq_chip_set_vcpu_affinity_parent(struct 
irq_data *data,
 #endif
 
 /* Handling of unhandled and spurious interrupts: */
-extern void note_interrupt(unsigned int irq, struct irq_desc *desc,
-  irqreturn_t action_ret);
+extern void note_interrupt(struct irq_desc *desc, irqreturn_t action_ret);
 
 
 /* Enable/disable irq debugging output: */
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 7fe80d2fcc6c..048698045dad 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -63,7 +63,7 @@ int irq_set_irq_type(unsigned int irq, unsigned int type)
return -EINVAL;
 
type &= IRQ_TYPE_SENSE_MASK;
-   ret = __irq_set_trigger(desc, irq, type);
+   ret = __irq_set_trigger(desc, type);
irq_put_desc_busunlock(desc, flags);
return ret;
 }
@@ -328,7 +328,7 @@ void handle_nested_irq(unsigned int irq)
 
action_ret = action->thread_fn(action->irq, action->dev_id);
if (!noirqdebug)
-   note_interrupt(irq, desc, action_ret);
+   note_interrupt(desc, action_ret);
 
raw_spin_lock_irq(>lock);
irqd_clear(>irq_data, IRQD_IRQ_INPROGRESS);
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 4d37b96343e9..b6eeea8a80c5 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -176,7 +176,7 @@ handle_irq_event_percpu(struct irq_desc *desc, struct 
irqaction *action)
add_interrupt_randomness(irq, flags);
 
if (!noirqdebug)
-   note_interrupt(irq, desc, retval);
+   note_interrupt(desc, retval);
return retval;
 }
 
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index ca2ca5531be6..3d274e2fe605 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -59,10 +59,9 @@ enum {
 #include "debug.h"
 #include "settings.h"
 
-extern int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
-   unsigned long flags);
-extern void __disable_irq(struct irq_desc *desc, unsigned int irq);
-extern void __enable_irq(struct irq_desc *desc, unsigned int irq);
+extern int __irq_set_trigger(struct irq_desc *desc, unsigned long flags);
+extern void __disable_irq(struct irq_desc *desc);
+extern void __enable_irq(struct irq_desc *desc);
 
 extern int irq_startup(struct irq_desc *desc, bool resend);
 extern void irq_shutdown(struct irq_desc *desc);
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 379a1d60c4f4..32567d4d7031 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -423,7 +423,7 @@ setup_affinity(unsigned int irq, struct irq_desc *desc, 
struct cpumask *mask)
 }
 #endif
 
-void __disable_irq(struct irq_desc *desc, unsigned int irq)
+void __disable_irq(struct irq_desc *desc)
 {
if (!desc->depth++)
irq_disable(desc);
@@ -436,7 +436,7 @@ static int __disable_irq_nosync(unsigned int irq)
 
if (!desc)
return -EINVAL;
-   __disable_irq(desc, irq);
+   __disable_irq(desc);
irq_put_desc_busunlock(desc, flags);
return 0;
 }
@@ -503,12 +503,13 @@ bool disable_hardirq(unsigned int irq)
 }
 EXPORT_SYMBOL_GPL(disable_hardirq);
 
-void __enable_irq(struct irq_desc *desc, unsigned int irq)
+void __enable_irq(struct irq_desc *desc)
 {
switch (desc->depth) {
case 0:
  err_out:
-   WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n", irq);
+   WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n",
+irq_desc_get_irq(desc));
break;
case 1: {
if (desc->istate & IRQS_SUSPENDED)
@@ -546,7 +547,7 @@ void enable_irq(unsigned int irq)
 KERN_ERR "enable_irq before setup/request_irq: irq %u\n", irq))
goto out;
 
-   __enable_irq(desc, irq);
+   __enable_irq(desc);
 out:
irq_put_desc_busunlock(desc, flags);
 }
@@ -637,8 +638,7 @@ int can_request_irq(unsigned int irq, unsigned long 
irqflags)
return canrequest;
 }
 
-int __irq_set_trigger(struct irq_desc *desc, unsigned int irq,
- unsigned long flags)
+int __irq_set_trigger(struct irq_desc *desc, unsigned long flags)
 {
struct irq_chip *chip = desc->irq_data.chip;
int ret, unmask = 0;
@@ -648,7 +648,8 @@ int __irq_set_trigger(struct irq_desc *desc, unsigned int 

[RFT v2 25/48] mips, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handlers to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 arch/mips/alchemy/devboards/bcsr.c |3 ++-
 arch/mips/ath79/irq.c  |9 ++---
 arch/mips/pci/pci-rt3883.c |4 +---
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/arch/mips/alchemy/devboards/bcsr.c 
b/arch/mips/alchemy/devboards/bcsr.c
index c98c9ea3372c..8d6ea369bde4 100644
--- a/arch/mips/alchemy/devboards/bcsr.c
+++ b/arch/mips/alchemy/devboards/bcsr.c
@@ -85,8 +85,9 @@ EXPORT_SYMBOL_GPL(bcsr_mod);
 /*
  * DB1200/PB1200 CPLD IRQ muxer
  */
-static void bcsr_csc_handler(unsigned int irq, struct irq_desc *d)
+static void bcsr_csc_handler(unsigned int __irq, struct irq_desc *d)
 {
+   unsigned int irq = irq_desc_get_irq(d);
unsigned short bisr = __raw_readw(bcsr_virt + BCSR_REG_INTSTAT);
 
disable_irq_nosync(irq);
diff --git a/arch/mips/ath79/irq.c b/arch/mips/ath79/irq.c
index 6adae366f11a..1b6620b0c057 100644
--- a/arch/mips/ath79/irq.c
+++ b/arch/mips/ath79/irq.c
@@ -120,8 +120,9 @@ static void __init ath79_misc_irq_init(void)
irq_set_chained_handler(ATH79_CPU_IRQ(6), ath79_misc_irq_handler);
 }
 
-static void ar934x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc)
+static void ar934x_ip2_irq_dispatch(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
u32 status;
 
disable_irq_nosync(irq);
@@ -153,8 +154,9 @@ static void ar934x_ip2_irq_init(void)
irq_set_chained_handler(ATH79_CPU_IRQ(2), ar934x_ip2_irq_dispatch);
 }
 
-static void qca955x_ip2_irq_dispatch(unsigned int irq, struct irq_desc *desc)
+static void qca955x_ip2_irq_dispatch(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
u32 status;
 
disable_irq_nosync(irq);
@@ -181,8 +183,9 @@ enable:
enable_irq(irq);
 }
 
-static void qca955x_ip3_irq_dispatch(unsigned int irq, struct irq_desc *desc)
+static void qca955x_ip3_irq_dispatch(unsigned int __irq, struct irq_desc *desc)
 {
+   unsigned int irq = irq_desc_get_irq(desc);
u32 status;
 
disable_irq_nosync(irq);
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c
index 80fafe646e74..67d483206d6c 100644
--- a/arch/mips/pci/pci-rt3883.c
+++ b/arch/mips/pci/pci-rt3883.c
@@ -147,9 +147,7 @@ static void rt3883_pci_irq_handler(unsigned int irq, struct 
irq_desc *desc)
while (pending) {
unsigned bit = __ffs(pending);
 
-   irq = irq_find_mapping(rpc->irq_domain, bit);
-   generic_handle_irq(irq);
-
+   generic_handle_irq(irq_find_mapping(rpc->irq_domain, bit));
pending &= ~BIT(bit);
}
 }
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 22/48] blackfin, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handler to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Seems ipipe.c is never used at all, and it may fail to compile if it's
used.

Signed-off-by: Jiang Liu 
---
 arch/blackfin/kernel/ipipe.c  |2 +-
 arch/blackfin/mach-common/ints-priority.c |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/blackfin/kernel/ipipe.c b/arch/blackfin/kernel/ipipe.c
index f657b38163e3..6007a1375c5b 100644
--- a/arch/blackfin/kernel/ipipe.c
+++ b/arch/blackfin/kernel/ipipe.c
@@ -56,7 +56,7 @@ EXPORT_SYMBOL(__ipipe_irq_lvmask);
 
 static void __ipipe_ack_irq(unsigned irq, struct irq_desc *desc)
 {
-   desc->ipipe_ack(irq, desc);
+   desc->ipipe_ack(irq_desc_get_irq(desc), desc);
 }
 
 /*
diff --git a/arch/blackfin/mach-common/ints-priority.c 
b/arch/blackfin/mach-common/ints-priority.c
index 332a434b4669..4e3155e5aa20 100644
--- a/arch/blackfin/mach-common/ints-priority.c
+++ b/arch/blackfin/mach-common/ints-priority.c
@@ -830,7 +830,7 @@ void bfin_demux_gpio_irq(unsigned int inta_irq,
 {
unsigned int irq;
 
-   switch (inta_irq) {
+   switch (irq_desc_get_irq(desc)) {
 #if defined(BF537_FAMILY)
case IRQ_PF_INTA_PG_INTA:
bfin_demux_gpio_block(IRQ_PF0);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 21/48] ARM, irq: Prepare for killing the first parameter 'irq' of irq_flow_handler_t

2015-06-03 Thread Jiang Liu
Change irq flow handlers to prepare for killing the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 arch/arm/common/locomo.c |9 +++--
 arch/arm/mach-dove/irq.c |5 +++--
 arch/arm/mach-pxa/balloon3.c |3 +--
 arch/arm/mach-pxa/lpd270.c   |4 +---
 arch/arm/mach-pxa/pcm990-baseboard.c |3 +--
 arch/arm/mach-pxa/viper.c|6 ++
 arch/arm/mach-pxa/zeus.c |6 ++
 7 files changed, 13 insertions(+), 23 deletions(-)

diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 02af4a07ceca..d4a62ff39576 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -151,12 +151,9 @@ static void locomo_handler(unsigned int irq, struct 
irq_desc *desc)
 
if (req) {
/* generate the next interrupt(s) */
-   irq = lchip->irq_base;
-   for (i = 0; i <= 3; i++, irq++) {
-   if (req & (0x0100 << i)) {
-   generic_handle_irq(irq);
-   }
-
+   for (i = 0; i <= 3; i++) {
+   if (req & (0x0100 << i))
+   generic_handle_irq(lchip->irq_base + i);
}
}
 }
diff --git a/arch/arm/mach-dove/irq.c b/arch/arm/mach-dove/irq.c
index 4a5a7aedcb76..6d0f0b12f95a 100644
--- a/arch/arm/mach-dove/irq.c
+++ b/arch/arm/mach-dove/irq.c
@@ -69,13 +69,14 @@ static struct irq_chip pmu_irq_chip = {
.irq_ack= pmu_irq_ack,
 };
 
-static void pmu_irq_handler(unsigned int irq, struct irq_desc *desc)
+static void pmu_irq_handler(unsigned int __irq, struct irq_desc *desc)
 {
unsigned long cause = readl(PMU_INTERRUPT_CAUSE);
+   unsigned int irq;
 
cause &= readl(PMU_INTERRUPT_MASK);
if (cause == 0) {
-   do_bad_IRQ(irq, desc);
+   do_bad_IRQ(__irq, desc);
return;
}
 
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index d897292712eb..6897095b4f11 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -510,8 +510,7 @@ static void balloon3_irq_handler(unsigned int irq, struct 
irq_desc *desc)
}
 
while (pending) {
-   irq = BALLOON3_IRQ(0) + __ffs(pending);
-   generic_handle_irq(irq);
+   generic_handle_irq(BALLOON3_IRQ(0) + __ffs(pending));
pending &= pending - 1;
}
pending = __raw_readl(BALLOON3_INT_CONTROL_REG) &
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index eaee2c20b189..6f7baa0bcb09 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -129,9 +129,7 @@ static void lpd270_irq_handler(unsigned int irq, struct 
irq_desc *desc)
/* clear useless edge notification */
desc->irq_data.chip->irq_ack(>irq_data);
if (likely(pending)) {
-   irq = LPD270_IRQ(0) + __ffs(pending);
-   generic_handle_irq(irq);
-
+   generic_handle_irq(LPD270_IRQ(0) + __ffs(pending));
pending = __raw_readw(LPD270_INT_STATUS) &
lpd270_irq_enabled;
}
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c 
b/arch/arm/mach-pxa/pcm990-baseboard.c
index 2897da2a5df6..c0eb6732ca10 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -295,8 +295,7 @@ static void pcm990_irq_handler(unsigned int irq, struct 
irq_desc *desc)
/* clear our parent IRQ */
desc->irq_data.chip->irq_ack(>irq_data);
if (likely(pending)) {
-   irq = PCM027_IRQ(0) + __ffs(pending);
-   generic_handle_irq(irq);
+   generic_handle_irq(PCM027_IRQ(0) + __ffs(pending));
}
pending = ~pcm990_cpld_readb(PCM990_CTRL_INTSETCLR);
pending &= pcm990_irq_enabled;
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index de3b08073fe7..0632e089b0a5 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -286,10 +286,8 @@ static void viper_irq_handler(unsigned int irq, struct 
irq_desc *desc)
 * so ack the interrupt by hand */
desc->irq_data.chip->irq_ack(>irq_data);
 
-   if (likely(pending)) {
-   irq = viper_bit_to_irq(__ffs(pending));
-   generic_handle_irq(irq);
-   }
+   if (likely(pending))
+   generic_handle_irq(viper_bit_to_irq(__ffs(pending)));
pending = viper_irq_pending();
} while (pending);
 }
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index ac2ae5c71ab4..e5338ea857a4 

[RFT v2 15/48] genirq: Kill the parameter 'irq' of kstat_incr_irqs_this_cpu()

2015-06-03 Thread Jiang Liu
The first parameter 'irq' is never used by kstat_incr_irqs_this_cpu(),
so kill it. So one step further to kill the first parameter 'irq'
of irq_flow_handler_t.

Signed-off-by: Jiang Liu 
---
 kernel/irq/chip.c  |   16 
 kernel/irq/handle.c|2 +-
 kernel/irq/internals.h |2 +-
 kernel/irq/irqdesc.c   |2 +-
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index da14c388b579..fc7545ca6bf7 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -315,7 +315,7 @@ void handle_nested_irq(unsigned int irq)
raw_spin_lock_irq(>lock);
 
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
action = desc->action;
if (unlikely(!action || irqd_irq_disabled(>irq_data))) {
@@ -391,7 +391,7 @@ handle_simple_irq(unsigned int irq, struct irq_desc *desc)
goto out_unlock;
 
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
if (unlikely(!desc->action || irqd_irq_disabled(>irq_data))) {
desc->istate |= IRQS_PENDING;
@@ -443,7 +443,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
goto out_unlock;
 
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
/*
 * If its disabled or no action available
@@ -515,7 +515,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
goto out;
 
desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
/*
 * If its disabled or no action available
@@ -583,7 +583,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
goto out_unlock;
}
 
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
/* Start handling the irq */
desc->irq_data.chip->irq_ack(>irq_data);
@@ -646,7 +646,7 @@ void handle_edge_eoi_irq(unsigned int irq, struct irq_desc 
*desc)
goto out_eoi;
}
 
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
do {
if (unlikely(!desc->action))
@@ -675,7 +675,7 @@ handle_percpu_irq(unsigned int irq, struct irq_desc *desc)
 {
struct irq_chip *chip = irq_desc_get_chip(desc);
 
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
if (chip->irq_ack)
chip->irq_ack(>irq_data);
@@ -705,7 +705,7 @@ void handle_percpu_devid_irq(unsigned int irq, struct 
irq_desc *desc)
void *dev_id = raw_cpu_ptr(action->percpu_dev_id);
irqreturn_t res;
 
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
 
if (chip->irq_ack)
chip->irq_ack(>irq_data);
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 635480270858..4d37b96343e9 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -30,7 +30,7 @@
 void handle_bad_irq(unsigned int irq, struct irq_desc *desc)
 {
print_irq_desc(irq, desc);
-   kstat_incr_irqs_this_cpu(irq, desc);
+   kstat_incr_irqs_this_cpu(desc);
ack_bad_irq(irq);
 }
 
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index b117e4c243d8..d6f65336650c 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -191,7 +191,7 @@ static inline bool irqd_has_set(struct irq_data *d, 
unsigned int mask)
return __irqd_to_state(d) & mask;
 }
 
-static inline void kstat_incr_irqs_this_cpu(unsigned int irq, struct irq_desc 
*desc)
+static inline void kstat_incr_irqs_this_cpu(struct irq_desc *desc)
 {
__this_cpu_inc(*desc->kstat_irqs);
__this_cpu_inc(kstat.irqs_sum);
diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 358f620c035a..500e6fd11d78 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -586,7 +586,7 @@ int irq_set_percpu_devid(unsigned int irq)
 
 void kstat_incr_irq_this_cpu(unsigned int irq)
 {
-   kstat_incr_irqs_this_cpu(irq, irq_to_desc(irq));
+   kstat_incr_irqs_this_cpu(irq_to_desc(irq));
 }
 
 /**
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 17/48] genirq: Kill the parameter 'irq' of check_irq_resend()

2015-06-03 Thread Jiang Liu
Simplify interrupt management interfaces by killing the parameter 'irq'
of check_irq_resend().

Signed-off-by: Jiang Liu 
---
 kernel/irq/chip.c  |2 +-
 kernel/irq/internals.h |2 +-
 kernel/irq/manage.c|2 +-
 kernel/irq/resend.c|4 +++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index fc7545ca6bf7..7fe80d2fcc6c 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -187,7 +187,7 @@ int irq_startup(struct irq_desc *desc, bool resend)
irq_enable(desc);
}
if (resend)
-   check_irq_resend(desc, desc->irq_data.irq);
+   check_irq_resend(desc);
return ret;
 }
 
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index d6f65336650c..ca2ca5531be6 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -90,7 +90,7 @@ irqreturn_t handle_irq_event_percpu(struct irq_desc *desc, 
struct irqaction *act
 irqreturn_t handle_irq_event(struct irq_desc *desc);
 
 /* Resending of interrupts :*/
-void check_irq_resend(struct irq_desc *desc, unsigned int irq);
+void check_irq_resend(struct irq_desc *desc);
 bool irq_wait_for_poll(struct irq_desc *desc);
 void __irq_wake_thread(struct irq_desc *desc, struct irqaction *action);
 
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index e7688140bfb6..379a1d60c4f4 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -516,7 +516,7 @@ void __enable_irq(struct irq_desc *desc, unsigned int irq)
/* Prevent probing on this irq: */
irq_settings_set_noprobe(desc);
irq_enable(desc);
-   check_irq_resend(desc, irq);
+   check_irq_resend(desc);
/* fall-through */
}
default:
diff --git a/kernel/irq/resend.c b/kernel/irq/resend.c
index 9065107f083e..32fc47c2c622 100644
--- a/kernel/irq/resend.c
+++ b/kernel/irq/resend.c
@@ -53,7 +53,7 @@ static DECLARE_TASKLET(resend_tasklet, resend_irqs, 0);
  *
  * Is called with interrupts disabled and desc->lock held.
  */
-void check_irq_resend(struct irq_desc *desc, unsigned int irq)
+void check_irq_resend(struct irq_desc *desc)
 {
/*
 * We do not resend level type interrupts. Level type
@@ -74,6 +74,8 @@ void check_irq_resend(struct irq_desc *desc, unsigned int irq)
if (!desc->irq_data.chip->irq_retrigger ||
!desc->irq_data.chip->irq_retrigger(>irq_data)) {
 #ifdef CONFIG_HARDIRQS_SW_RESEND
+   unsigned int irq = irq_desc_get_irq(desc);
+
/*
 * If the interrupt has a parent irq and runs
 * in the thread context of the parent irq,
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 13/48] keystone, irq: Use irq_data_get_xxx() to avoid redundant lookup of irq_data

2015-06-03 Thread Jiang Liu
Use irq_data_get_xxx() to avoid redundant lookup of irq_data while we
already have a pointer to corresponding irq_data.

Signed-off-by: Jiang Liu 
---
 drivers/pci/host/pci-keystone-dw.c |   15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/host/pci-keystone-dw.c 
b/drivers/pci/host/pci-keystone-dw.c
index f34892e0edb4..e42d077039d3 100644
--- a/drivers/pci/host/pci-keystone-dw.c
+++ b/drivers/pci/host/pci-keystone-dw.c
@@ -104,14 +104,13 @@ static void ks_dw_pcie_msi_irq_ack(struct irq_data *d)
 {
u32 offset, reg_offset, bit_pos;
struct keystone_pcie *ks_pcie;
-   unsigned int irq = d->irq;
struct msi_desc *msi;
struct pcie_port *pp;
 
-   msi = irq_get_msi_desc(irq);
+   msi = irq_data_get_msi_desc(d);
pp = sys_to_pcie(msi->dev->bus->sysdata);
ks_pcie = to_keystone_pcie(pp);
-   offset = irq - irq_linear_revmap(pp->irq_domain, 0);
+   offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
update_reg_offset_bit_pos(offset, _offset, _pos);
 
writel(BIT(bit_pos),
@@ -142,15 +141,14 @@ void ks_dw_pcie_msi_clear_irq(struct pcie_port *pp, int 
irq)
 static void ks_dw_pcie_msi_irq_mask(struct irq_data *d)
 {
struct keystone_pcie *ks_pcie;
-   unsigned int irq = d->irq;
struct msi_desc *msi;
struct pcie_port *pp;
u32 offset;
 
-   msi = irq_get_msi_desc(irq);
+   msi = irq_data_get_msi_desc(d);
pp = sys_to_pcie(msi->dev->bus->sysdata);
ks_pcie = to_keystone_pcie(pp);
-   offset = irq - irq_linear_revmap(pp->irq_domain, 0);
+   offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
 
/* Mask the end point if PVM implemented */
if (IS_ENABLED(CONFIG_PCI_MSI)) {
@@ -164,15 +162,14 @@ static void ks_dw_pcie_msi_irq_mask(struct irq_data *d)
 static void ks_dw_pcie_msi_irq_unmask(struct irq_data *d)
 {
struct keystone_pcie *ks_pcie;
-   unsigned int irq = d->irq;
struct msi_desc *msi;
struct pcie_port *pp;
u32 offset;
 
-   msi = irq_get_msi_desc(irq);
+   msi = irq_data_get_msi_desc(d);
pp = sys_to_pcie(msi->dev->bus->sysdata);
ks_pcie = to_keystone_pcie(pp);
-   offset = irq - irq_linear_revmap(pp->irq_domain, 0);
+   offset = d->irq - irq_linear_revmap(pp->irq_domain, 0);
 
/* Mask the end point if PVM implemented */
if (IS_ENABLED(CONFIG_PCI_MSI)) {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 12/48] sh: intc: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Also replace generic_handle_irq with generic_handle_irq_desc() to avoid
looking up irq_desc again.

Signed-off-by: Jiang Liu 
---
 arch/sh/boards/mach-se/7343/irq.c  |2 +-
 arch/sh/boards/mach-x3proto/gpio.c |2 +-
 drivers/sh/intc/core.c |2 +-
 drivers/sh/intc/virq.c |   14 --
 4 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/arch/sh/boards/mach-se/7343/irq.c 
b/arch/sh/boards/mach-se/7343/irq.c
index 1087dba9b015..6f97a8f0d0d6 100644
--- a/arch/sh/boards/mach-se/7343/irq.c
+++ b/arch/sh/boards/mach-se/7343/irq.c
@@ -31,7 +31,7 @@ struct irq_domain *se7343_irq_domain;
 
 static void se7343_irq_demux(unsigned int irq, struct irq_desc *desc)
 {
-   struct irq_data *data = irq_get_irq_data(irq);
+   struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
unsigned long mask;
int bit;
diff --git a/arch/sh/boards/mach-x3proto/gpio.c 
b/arch/sh/boards/mach-x3proto/gpio.c
index f035a7ac6456..24555c364d5b 100644
--- a/arch/sh/boards/mach-x3proto/gpio.c
+++ b/arch/sh/boards/mach-x3proto/gpio.c
@@ -62,7 +62,7 @@ static int x3proto_gpio_to_irq(struct gpio_chip *chip, 
unsigned gpio)
 
 static void x3proto_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct irq_data *data = irq_get_irq_data(irq);
+   struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
unsigned long mask;
int pin;
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index 81f22980b2de..6dc0361aeeeb 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -67,7 +67,7 @@ void intc_set_prio_level(unsigned int irq, unsigned int level)
 
 static void intc_redirect_irq(unsigned int irq, struct irq_desc *desc)
 {
-   generic_handle_irq((unsigned int)irq_get_handler_data(irq));
+   generic_handle_irq((unsigned int)irq_desc_get_handler_data(desc));
 }
 
 static void __init intc_register_irq(struct intc_desc *desc,
diff --git a/drivers/sh/intc/virq.c b/drivers/sh/intc/virq.c
index bc0601cf0f8f..bb7e745d4266 100644
--- a/drivers/sh/intc/virq.c
+++ b/drivers/sh/intc/virq.c
@@ -111,7 +111,7 @@ static int add_virq_to_pirq(unsigned int irq, unsigned int 
virq)
 
 static void intc_virq_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct irq_data *data = irq_get_irq_data(irq);
+   struct irq_data *data = irq_desc_get_irq_data(desc);
struct irq_chip *chip = irq_data_get_irq_chip(data);
struct intc_virq_list *entry, *vlist = 
irq_data_get_irq_handler_data(data);
struct intc_desc_int *d = get_intc_desc(irq);
@@ -120,12 +120,14 @@ static void intc_virq_handler(unsigned int irq, struct 
irq_desc *desc)
 
for_each_virq(entry, vlist) {
unsigned long addr, handle;
+   struct irq_desc *vdesc = irq_to_desc(entry->irq);
 
-   handle = (unsigned long)irq_get_handler_data(entry->irq);
-   addr = INTC_REG(d, _INTC_ADDR_E(handle), 0);
-
-   if (intc_reg_fns[_INTC_FN(handle)](addr, handle, 0))
-   generic_handle_irq(entry->irq);
+   if (vdesc) {
+   handle = (unsigned 
long)irq_desc_get_handler_data(vdesc);
+   addr = INTC_REG(d, _INTC_ADDR_E(handle), 0);
+   if (intc_reg_fns[_INTC_FN(handle)](addr, handle, 0))
+   generic_handle_irq_desc(entry->irq, vdesc);
+   }
}
 
chip->irq_unmask(data);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 14/48] spmi: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu 
---
 drivers/spmi/spmi-pmic-arb.c |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spmi/spmi-pmic-arb.c b/drivers/spmi/spmi-pmic-arb.c
index d7119db49cfe..b32cb0a813cb 100644
--- a/drivers/spmi/spmi-pmic-arb.c
+++ b/drivers/spmi/spmi-pmic-arb.c
@@ -453,8 +453,8 @@ static void periph_interrupt(struct spmi_pmic_arb_dev *pa, 
u8 apid)
 
 static void pmic_arb_chained_irq(unsigned int irq, struct irq_desc *desc)
 {
-   struct spmi_pmic_arb_dev *pa = irq_get_handler_data(irq);
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct spmi_pmic_arb_dev *pa = irq_desc_get_handler_data(desc);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
void __iomem *intr = pa->intr;
int first = pa->min_apid >> 5;
int last = pa->max_apid >> 5;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 05/48] gpio: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu 
Acked-by: Linus Walleij 
---
 drivers/gpio/gpio-bcm-kona.c   |2 +-
 drivers/gpio/gpio-dwapb.c  |2 +-
 drivers/gpio/gpio-mvebu.c  |2 +-
 drivers/gpio/gpio-mxc.c|6 +++---
 drivers/gpio/gpio-mxs.c|2 +-
 drivers/gpio/gpio-omap.c   |2 +-
 drivers/gpio/gpio-tegra.c  |4 +---
 drivers/gpio/gpio-timberdale.c |5 +++--
 drivers/gpio/gpio-vf610.c  |2 +-
 drivers/gpio/gpio-zynq.c   |2 +-
 10 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index b164ce837b43..2e7a8c66fe57 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -432,7 +432,7 @@ static void bcm_kona_gpio_irq_handler(unsigned int irq, 
struct irq_desc *desc)
void __iomem *reg_base;
int bit, bank_id;
unsigned long sta;
-   struct bcm_kona_gpio_bank *bank = irq_get_handler_data(irq);
+   struct bcm_kona_gpio_bank *bank = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
 
chained_irq_enter(chip, desc);
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index 58faf04fce5d..649be07a845d 100644
--- a/drivers/gpio/gpio-dwapb.c
+++ b/drivers/gpio/gpio-dwapb.c
@@ -149,7 +149,7 @@ static u32 dwapb_do_irq(struct dwapb_gpio *gpio)
 
 static void dwapb_irq_handler(u32 irq, struct irq_desc *desc)
 {
-   struct dwapb_gpio *gpio = irq_get_handler_data(irq);
+   struct dwapb_gpio *gpio = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
 
dwapb_do_irq(gpio);
diff --git a/drivers/gpio/gpio-mvebu.c b/drivers/gpio/gpio-mvebu.c
index 1a54205860f5..a8c302ef7bc4 100644
--- a/drivers/gpio/gpio-mvebu.c
+++ b/drivers/gpio/gpio-mvebu.c
@@ -460,7 +460,7 @@ static int mvebu_gpio_irq_set_type(struct irq_data *d, 
unsigned int type)
 
 static void mvebu_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct mvebu_gpio_chip *mvchip = irq_get_handler_data(irq);
+   struct mvebu_gpio_chip *mvchip = irq_desc_get_handler_data(desc);
struct irq_chip *chip = irq_desc_get_chip(desc);
u32 cause, type;
int i;
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 9f7446a7ac64..f10948c04f7c 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -275,8 +275,8 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port 
*port, u32 irq_stat)
 static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc)
 {
u32 irq_stat;
-   struct mxc_gpio_port *port = irq_get_handler_data(irq);
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct mxc_gpio_port *port = irq_desc_get_handler_data(desc);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
 
chained_irq_enter(chip, desc);
 
@@ -292,7 +292,7 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc 
*desc)
 {
u32 irq_msk, irq_stat;
struct mxc_gpio_port *port;
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
 
chained_irq_enter(chip, desc);
 
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 84cbda6acdda..039c7d50e64f 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -157,7 +157,7 @@ static void mxs_flip_edge(struct mxs_gpio_port *port, u32 
gpio)
 static void mxs_gpio_irq_handler(u32 irq, struct irq_desc *desc)
 {
u32 irq_stat;
-   struct mxs_gpio_port *port = irq_get_handler_data(irq);
+   struct mxs_gpio_port *port = irq_desc_get_handler_data(desc);
 
desc->irq_data.chip->irq_ack(>irq_data);
 
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c
index b232397ad7ec..acbf3feff1e2 100644
--- a/drivers/gpio/gpio-omap.c
+++ b/drivers/gpio/gpio-omap.c
@@ -719,7 +719,7 @@ static void omap_gpio_irq_handler(unsigned int irq, struct 
irq_desc *desc)
struct gpio_bank *bank;
int unmasked = 0;
struct irq_chip *irqchip = irq_desc_get_chip(desc);
-   struct gpio_chip *chip = irq_get_handler_data(irq);
+   struct gpio_chip *chip = irq_desc_get_handler_data(desc);
 
chained_irq_enter(irqchip, desc);
 
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c
index 1741981d53c8..89ed8a56eb0b 100644
--- a/drivers/gpio/gpio-tegra.c
+++ b/drivers/gpio/gpio-tegra.c
@@ -268,16 +268,14 @@ static void tegra_gpio_irq_shutdown(struct irq_data *d)
 
 static void tegra_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct tegra_gpio_bank *bank;
int port;
int pin;
int unmasked = 0;
struct irq_chip *chip = irq_desc_get_chip(desc);
+   struct tegra_gpio_bank *bank = irq_desc_get_handler_data(desc);
 
chained_irq_enter(chip, 

[RFT v2 11/48] ipu: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Do the same thing to avoid pattern "irq_get_chip_data(data->irq)".

Signed-off-by: Jiang Liu 
---
 drivers/dma/ipu/ipu_irq.c   |2 +-
 drivers/gpu/ipu-v3/ipu-common.c |4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 2e284a4438bc..0e12af37fe2f 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -268,7 +268,7 @@ int ipu_irq_unmap(unsigned int source)
 /* Chained IRQ handler for IPU error interrupt */
 static void ipu_irq_err(unsigned int irq, struct irq_desc *desc)
 {
-   struct ipu *ipu = irq_get_handler_data(irq);
+   struct ipu *ipu = irq_desc_get_handler_data(desc);
u32 status;
int i, line;
 
diff --git a/drivers/gpu/ipu-v3/ipu-common.c b/drivers/gpu/ipu-v3/ipu-common.c
index 67bab5c36056..7022825b7a2c 100644
--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -915,8 +915,8 @@ static void ipu_irq_handle(struct ipu_soc *ipu, const int 
*regs, int num_regs)
 static void ipu_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
const int int_reg[] = { 0, 1, 2, 3, 10, 11, 12, 13, 14};
-   struct irq_chip *chip = irq_get_chip(irq);
 
chained_irq_enter(chip, desc);
 
@@ -928,8 +928,8 @@ static void ipu_irq_handler(unsigned int irq, struct 
irq_desc *desc)
 static void ipu_err_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
struct ipu_soc *ipu = irq_desc_get_handler_data(desc);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
const int int_reg[] = { 4, 5, 8, 9};
-   struct irq_chip *chip = irq_get_chip(irq);
 
chained_irq_enter(chip, desc);
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 06/48] pinctrl: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu 
Acked-by: Linus Walleij 
---
 drivers/pinctrl/intel/pinctrl-cherryview.c|2 +-
 drivers/pinctrl/intel/pinctrl-intel.c |2 +-
 drivers/pinctrl/mediatek/pinctrl-mtk-common.c |4 ++--
 drivers/pinctrl/nomadik/pinctrl-nomadik.c |   12 +---
 drivers/pinctrl/pinctrl-amd.c |2 +-
 drivers/pinctrl/pinctrl-at91.c|2 +-
 drivers/pinctrl/pinctrl-coh901.c  |4 ++--
 drivers/pinctrl/pinctrl-rockchip.c|4 ++--
 drivers/pinctrl/pinctrl-single.c  |2 +-
 drivers/pinctrl/pinctrl-st.c  |6 +++---
 drivers/pinctrl/qcom/pinctrl-msm.c|2 +-
 drivers/pinctrl/samsung/pinctrl-exynos.c  |8 
 drivers/pinctrl/samsung/pinctrl-s3c24xx.c |   18 +-
 drivers/pinctrl/samsung/pinctrl-s3c64xx.c |   22 ++
 drivers/pinctrl/sirf/pinctrl-sirf.c   |2 +-
 drivers/pinctrl/sunxi/pinctrl-sunxi.c |4 ++--
 16 files changed, 46 insertions(+), 50 deletions(-)

diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c 
b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 82f691c4..878e798bcb56 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1368,7 +1368,7 @@ static void chv_gpio_irq_handler(unsigned irq, struct 
irq_desc *desc)
 {
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
struct chv_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
unsigned long pending;
u32 intr_line;
 
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c 
b/drivers/pinctrl/intel/pinctrl-intel.c
index 00768e53deec..a40681097402 100644
--- a/drivers/pinctrl/intel/pinctrl-intel.c
+++ b/drivers/pinctrl/intel/pinctrl-intel.c
@@ -840,7 +840,7 @@ static void intel_gpio_irq_handler(unsigned irq, struct 
irq_desc *desc)
 {
struct gpio_chip *gc = irq_desc_get_handler_data(desc);
struct intel_pinctrl *pctrl = gpiochip_to_pinctrl(gc);
-   struct irq_chip *chip = irq_get_chip(irq);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
int i;
 
chained_irq_enter(chip, desc);
diff --git a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c 
b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
index 474812e2b0cb..fd05ca6125b0 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mtk-common.c
@@ -1018,8 +1018,8 @@ mtk_eint_debounce_process(struct mtk_pinctrl *pctl, int 
index)
 
 static void mtk_eint_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-   struct irq_chip *chip = irq_get_chip(irq);
-   struct mtk_pinctrl *pctl = irq_get_handler_data(irq);
+   struct irq_chip *chip = irq_desc_get_chip(desc);
+   struct mtk_pinctrl *pctl = irq_desc_get_handler_data(desc);
unsigned int status, eint_num;
int offset, index, virq;
const struct mtk_eint_offsets *eint_offsets =
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c 
b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
index a6a22054c0ba..902f53b855bf 100644
--- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c
+++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c
@@ -854,10 +854,9 @@ static struct irq_chip nmk_gpio_irq_chip = {
.flags  = IRQCHIP_MASK_ON_SUSPEND,
 };
 
-static void __nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc,
-  u32 status)
+static void __nmk_gpio_irq_handler(struct irq_desc *desc, u32 status)
 {
-   struct irq_chip *host_chip = irq_get_chip(irq);
+   struct irq_chip *host_chip = irq_desc_get_chip(desc);
struct gpio_chip *chip = irq_desc_get_handler_data(desc);
 
chained_irq_enter(host_chip, desc);
@@ -882,17 +881,16 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct 
irq_desc *desc)
status = readl(nmk_chip->addr + NMK_GPIO_IS);
clk_disable(nmk_chip->clk);
 
-   __nmk_gpio_irq_handler(irq, desc, status);
+   __nmk_gpio_irq_handler(desc, status);
 }
 
-static void nmk_gpio_latent_irq_handler(unsigned int irq,
-  struct irq_desc *desc)
+static void nmk_gpio_latent_irq_handler(unsigned int irq, struct irq_desc 
*desc)
 {
struct gpio_chip *chip = irq_desc_get_handler_data(desc);
struct nmk_gpio_chip *nmk_chip = container_of(chip, struct 
nmk_gpio_chip, chip);
u32 status = nmk_chip->get_latent_status(nmk_chip->bank);
 
-   __nmk_gpio_irq_handler(irq, desc, status);
+   __nmk_gpio_irq_handler(desc, status);
 }
 
 /* I/O Functions */
diff --git a/drivers/pinctrl/pinctrl-amd.c b/drivers/pinctrl/pinctrl-amd.c
index 7de3b64bf142..639cd77c1fbb 100644
--- 

[RFT v2 08/48] mfd: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Do the same thing to avoid pattern "irq_get_chip_data(data->irq)".

Signed-off-by: Jiang Liu 
Acked-by: Lee Jones 
---
 drivers/mfd/ezx-pcap.c|2 +-
 drivers/mfd/max8997-irq.c |8 
 drivers/mfd/mt6397-core.c |8 
 drivers/mfd/t7l66xb.c |2 +-
 drivers/mfd/tc6393xb.c|2 +-
 drivers/mfd/twl6030-irq.c |2 +-
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c
index 5991faddd3c6..e5f4ffaa5414 100644
--- a/drivers/mfd/ezx-pcap.c
+++ b/drivers/mfd/ezx-pcap.c
@@ -207,7 +207,7 @@ static void pcap_isr_work(struct work_struct *work)
 
 static void pcap_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct pcap_chip *pcap = irq_get_handler_data(irq);
+   struct pcap_chip *pcap = irq_desc_get_handler_data(desc);
 
desc->irq_data.chip->irq_ack(>irq_data);
queue_work(pcap->workqueue, >isr_work);
diff --git a/drivers/mfd/max8997-irq.c b/drivers/mfd/max8997-irq.c
index 43fa61413e93..381738b477f8 100644
--- a/drivers/mfd/max8997-irq.c
+++ b/drivers/mfd/max8997-irq.c
@@ -113,14 +113,14 @@ static const struct max8997_irq_data max8997_irqs[] = {
 
 static void max8997_irq_lock(struct irq_data *data)
 {
-   struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+   struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
 
mutex_lock(>irqlock);
 }
 
 static void max8997_irq_sync_unlock(struct irq_data *data)
 {
-   struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+   struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
int i;
 
for (i = 0; i < MAX8997_IRQ_GROUP_NR; i++) {
@@ -148,7 +148,7 @@ irq_to_max8997_irq(struct max8997_dev *max8997, int irq)
 
 static void max8997_irq_mask(struct irq_data *data)
 {
-   struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+   struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
data->irq);
 
@@ -157,7 +157,7 @@ static void max8997_irq_mask(struct irq_data *data)
 
 static void max8997_irq_unmask(struct irq_data *data)
 {
-   struct max8997_dev *max8997 = irq_get_chip_data(data->irq);
+   struct max8997_dev *max8997 = irq_data_get_irq_chip_data(data);
const struct max8997_irq_data *irq_data = irq_to_max8997_irq(max8997,
data->irq);
 
diff --git a/drivers/mfd/mt6397-core.c b/drivers/mfd/mt6397-core.c
index 09bc7804952a..dab325b9d0df 100644
--- a/drivers/mfd/mt6397-core.c
+++ b/drivers/mfd/mt6397-core.c
@@ -39,14 +39,14 @@ static const struct mfd_cell mt6397_devs[] = {
 
 static void mt6397_irq_lock(struct irq_data *data)
 {
-   struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+   struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 
mutex_lock(>irqlock);
 }
 
 static void mt6397_irq_sync_unlock(struct irq_data *data)
 {
-   struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+   struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
 
regmap_write(mt6397->regmap, MT6397_INT_CON0, mt6397->irq_masks_cur[0]);
regmap_write(mt6397->regmap, MT6397_INT_CON1, mt6397->irq_masks_cur[1]);
@@ -56,7 +56,7 @@ static void mt6397_irq_sync_unlock(struct irq_data *data)
 
 static void mt6397_irq_disable(struct irq_data *data)
 {
-   struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+   struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
int shift = data->hwirq & 0xf;
int reg = data->hwirq >> 4;
 
@@ -65,7 +65,7 @@ static void mt6397_irq_disable(struct irq_data *data)
 
 static void mt6397_irq_enable(struct irq_data *data)
 {
-   struct mt6397_chip *mt6397 = irq_get_chip_data(data->irq);
+   struct mt6397_chip *mt6397 = irq_data_get_irq_chip_data(data);
int shift = data->hwirq & 0xf;
int reg = data->hwirq >> 4;
 
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c
index c09fb5dccd50..b752ca2be549 100644
--- a/drivers/mfd/t7l66xb.c
+++ b/drivers/mfd/t7l66xb.c
@@ -187,7 +187,7 @@ static struct mfd_cell t7l66xb_cells[] = {
 /* Handle the T7L66XB interrupt mux */
 static void t7l66xb_irq(unsigned int irq, struct irq_desc *desc)
 {
-   struct t7l66xb *t7l66xb = irq_get_handler_data(irq);
+   struct t7l66xb *t7l66xb = irq_desc_get_handler_data(desc);
unsigned int isr;
unsigned int i, irq_base;
 
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c
index 63458b39a97d..d21253a51cff 100644
--- a/drivers/mfd/tc6393xb.c
+++ b/drivers/mfd/tc6393xb.c
@@ -525,7 +525,7 @@ static int tc6393xb_register_gpio(struct tc6393xb 
*tc6393xb, int gpio_base)
 static void
 

[RFT v2 07/48] avr32, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu 
Acked-by: Hans-Christian Egtvedt 
---
 arch/avr32/mach-at32ap/pio.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/avr32/mach-at32ap/pio.c b/arch/avr32/mach-at32ap/pio.c
index 903c7d81d0d5..2583e6cc44e9 100644
--- a/arch/avr32/mach-at32ap/pio.c
+++ b/arch/avr32/mach-at32ap/pio.c
@@ -286,7 +286,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc 
*desc)
struct pio_device   *pio = irq_desc_get_chip_data(desc);
unsignedgpio_irq;
 
-   gpio_irq = (unsigned) irq_get_handler_data(irq);
+   gpio_irq = (unsigned) irq_desc_get_handler_data(desc);
for (;;) {
u32 isr;
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 09/48] ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Signed-off-by: Jiang Liu 
Acked-by: Russell King 
---
 arch/arm/common/locomo.c   |2 +-
 arch/arm/common/sa.c   |2 +-
 arch/arm/plat-orion/gpio.c |2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index b55c3625d7ee..02af4a07ceca 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -140,7 +140,7 @@ static struct locomo_dev_info locomo_devices[] = {
 
 static void locomo_handler(unsigned int irq, struct irq_desc *desc)
 {
-   struct locomo *lchip = irq_get_chip_data(irq);
+   struct locomo *lchip = irq_desc_get_chip_data(desc);
int req, i;
 
/* Acknowledge the parent IRQ */
diff --git a/arch/arm/common/sa.c b/arch/arm/common/sa.c
index 5cc779c8e9c6..0d0844fa54c2 100644
--- a/arch/arm/common/sa.c
+++ b/arch/arm/common/sa.c
@@ -200,7 +200,7 @@ static void
 sa_irq_handler(unsigned int irq, struct irq_desc *desc)
 {
unsigned int stat0, stat1, i;
-   struct sa *sachip = irq_get_handler_data(irq);
+   struct sa *sachip = irq_desc_get_handler_data(desc);
void __iomem *mapbase = sachip->base + SA_INTC;
 
stat0 = sa_readl(mapbase + SA_INTSTATCLR0);
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c
index 5168a52a17f9..caba04340619 100644
--- a/arch/arm/plat-orion/gpio.c
+++ b/arch/arm/plat-orion/gpio.c
@@ -409,7 +409,7 @@ static int gpio_irq_set_type(struct irq_data *d, u32 type)
 
 static void gpio_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-   struct orion_gpio_chip *ochip = irq_get_handler_data(irq);
+   struct orion_gpio_chip *ochip = irq_desc_get_handler_data(desc);
u32 cause, type;
int i;
 
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 04/48] powerpc, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Note: this patch has been queued for 4.2 by Michael Ellerman 


Signed-off-by: Jiang Liu 
---
 arch/powerpc/platforms/52xx/mpc52xx_gpt.c |2 +-
 arch/powerpc/platforms/cell/axon_msi.c|2 +-
 arch/powerpc/platforms/embedded6xx/hlwd-pic.c |2 +-
 arch/powerpc/sysdev/uic.c |2 +-
 arch/powerpc/sysdev/xics/xics-common.c|2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c 
b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index c949ca055712..63016621aff8 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -193,7 +193,7 @@ static struct irq_chip mpc52xx_gpt_irq_chip = {
 
 void mpc52xx_gpt_irq_cascade(unsigned int virq, struct irq_desc *desc)
 {
-   struct mpc52xx_gpt_priv *gpt = irq_get_handler_data(virq);
+   struct mpc52xx_gpt_priv *gpt = irq_desc_get_handler_data(desc);
int sub_virq;
u32 status;
 
diff --git a/arch/powerpc/platforms/cell/axon_msi.c 
b/arch/powerpc/platforms/cell/axon_msi.c
index 623bd961465a..817d0e6747ea 100644
--- a/arch/powerpc/platforms/cell/axon_msi.c
+++ b/arch/powerpc/platforms/cell/axon_msi.c
@@ -95,7 +95,7 @@ static void msic_dcr_write(struct axon_msic *msic, unsigned 
int dcr_n, u32 val)
 static void axon_msi_cascade(unsigned int irq, struct irq_desc *desc)
 {
struct irq_chip *chip = irq_desc_get_chip(desc);
-   struct axon_msic *msic = irq_get_handler_data(irq);
+   struct axon_msic *msic = irq_desc_get_handler_data(desc);
u32 write_offset, msi;
int idx;
int retry = 0;
diff --git a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c 
b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
index c269caee58f9..9dd154d6f89a 100644
--- a/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
+++ b/arch/powerpc/platforms/embedded6xx/hlwd-pic.c
@@ -124,7 +124,7 @@ static void hlwd_pic_irq_cascade(unsigned int cascade_virq,
  struct irq_desc *desc)
 {
struct irq_chip *chip = irq_desc_get_chip(desc);
-   struct irq_domain *irq_domain = irq_get_handler_data(cascade_virq);
+   struct irq_domain *irq_domain = irq_desc_get_handler_data(desc);
unsigned int virq;
 
raw_spin_lock(>lock);
diff --git a/arch/powerpc/sysdev/uic.c b/arch/powerpc/sysdev/uic.c
index 7c37157d4c24..e763fe215cf5 100644
--- a/arch/powerpc/sysdev/uic.c
+++ b/arch/powerpc/sysdev/uic.c
@@ -198,7 +198,7 @@ void uic_irq_cascade(unsigned int virq, struct irq_desc 
*desc)
 {
struct irq_chip *chip = irq_desc_get_chip(desc);
struct irq_data *idata = irq_desc_get_irq_data(desc);
-   struct uic *uic = irq_get_handler_data(virq);
+   struct uic *uic = irq_desc_get_handler_data(desc);
u32 msr;
int src;
int subvirq;
diff --git a/arch/powerpc/sysdev/xics/xics-common.c 
b/arch/powerpc/sysdev/xics/xics-common.c
index 878a54036a25..76be7b00dd80 100644
--- a/arch/powerpc/sysdev/xics/xics-common.c
+++ b/arch/powerpc/sysdev/xics/xics-common.c
@@ -227,7 +227,7 @@ void xics_migrate_irqs_away(void)
 
/* Locate interrupt server */
server = -1;
-   ics = irq_get_chip_data(virq);
+   ics = irq_desc_get_chip_data(desc);
if (ics)
server = ics->get_server(ics, irq);
if (server < 0) {
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 01/48] genirq: Clean up outdated comments related to include/linux/irqdesc.h

2015-06-03 Thread Jiang Liu
Seems we have little chance to move irqdesc.h from include/linux/ into
kernel/irq/, so kill the outdated comments.

Signed-off-by: Jiang Liu 
---
 include/linux/irq.h |1 -
 include/linux/irqdesc.h |3 ---
 2 files changed, 4 deletions(-)

diff --git a/include/linux/irq.h b/include/linux/irq.h
index a38610520b33..2de650d61a4e 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -409,7 +409,6 @@ enum {
IRQCHIP_EOI_THREADED= (1 <<  6),
 };
 
-/* This include will go away once we isolated irq_desc usage to core code */
 #include 
 
 /*
diff --git a/include/linux/irqdesc.h b/include/linux/irqdesc.h
index 749755bffbc1..8c84a2513665 100644
--- a/include/linux/irqdesc.h
+++ b/include/linux/irqdesc.h
@@ -3,9 +3,6 @@
 
 /*
  * Core internal functions to deal with irq descriptors
- *
- * This include will move to kernel/irq once we cleaned up the tree.
- * For now it's included from 
  */
 
 struct irq_affinity_notify;
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 03/48] MIPS, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc

2015-06-03 Thread Jiang Liu
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.

Note: this patch has been queued by Ralf Baechle .

Signed-off-by: Jiang Liu 
---
 arch/mips/ath25/ar2315.c |2 +-
 arch/mips/ath25/ar5312.c |2 +-
 arch/mips/cavium-octeon/octeon-irq.c |4 +++-
 arch/mips/pci/pci-ar2315.c   |2 +-
 arch/mips/pci/pci-ar71xx.c   |2 +-
 arch/mips/pci/pci-ar724x.c   |2 +-
 arch/mips/pci/pci-rt3883.c   |2 +-
 arch/mips/ralink/irq.c   |2 +-
 8 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/arch/mips/ath25/ar2315.c b/arch/mips/ath25/ar2315.c
index 2befa7d766a6..8742e1cee492 100644
--- a/arch/mips/ath25/ar2315.c
+++ b/arch/mips/ath25/ar2315.c
@@ -76,7 +76,7 @@ static void ar2315_misc_irq_handler(unsigned irq, struct 
irq_desc *desc)
unsigned nr, misc_irq = 0;
 
if (pending) {
-   struct irq_domain *domain = irq_get_handler_data(irq);
+   struct irq_domain *domain = irq_desc_get_handler_data(desc);
 
nr = __ffs(pending);
misc_irq = irq_find_mapping(domain, nr);
diff --git a/arch/mips/ath25/ar5312.c b/arch/mips/ath25/ar5312.c
index b6887f75144c..094b938fd603 100644
--- a/arch/mips/ath25/ar5312.c
+++ b/arch/mips/ath25/ar5312.c
@@ -80,7 +80,7 @@ static void ar5312_misc_irq_handler(unsigned irq, struct 
irq_desc *desc)
unsigned nr, misc_irq = 0;
 
if (pending) {
-   struct irq_domain *domain = irq_get_handler_data(irq);
+   struct irq_domain *domain = irq_desc_get_handler_data(desc);
 
nr = __ffs(pending);
misc_irq = irq_find_mapping(domain, nr);
diff --git a/arch/mips/cavium-octeon/octeon-irq.c 
b/arch/mips/cavium-octeon/octeon-irq.c
index 0643ae614284..18bf3dcb9d1b 100644
--- a/arch/mips/cavium-octeon/octeon-irq.c
+++ b/arch/mips/cavium-octeon/octeon-irq.c
@@ -699,7 +699,9 @@ static void octeon_irq_ciu_gpio_ack(struct irq_data *data)
 
 static void octeon_irq_handle_trigger(unsigned int irq, struct irq_desc *desc)
 {
-   if (irq_get_trigger_type(irq) & IRQ_TYPE_EDGE_BOTH)
+   struct irq_data *data = irq_desc_get_irq_data(desc);
+
+   if (irqd_get_trigger_type(data) & IRQ_TYPE_EDGE_BOTH)
handle_edge_irq(irq, desc);
else
handle_level_irq(irq, desc);
diff --git a/arch/mips/pci/pci-ar2315.c b/arch/mips/pci/pci-ar2315.c
index 07a18228e63a..dadb30306a0a 100644
--- a/arch/mips/pci/pci-ar2315.c
+++ b/arch/mips/pci/pci-ar2315.c
@@ -320,7 +320,7 @@ static int ar2315_pci_host_setup(struct ar2315_pci_ctrl 
*apc)
 
 static void ar2315_pci_irq_handler(unsigned irq, struct irq_desc *desc)
 {
-   struct ar2315_pci_ctrl *apc = irq_get_handler_data(irq);
+   struct ar2315_pci_ctrl *apc = irq_desc_get_handler_data(desc);
u32 pending = ar2315_pci_reg_read(apc, AR2315_PCI_ISR) &
  ar2315_pci_reg_read(apc, AR2315_PCI_IMR);
unsigned pci_irq = 0;
diff --git a/arch/mips/pci/pci-ar71xx.c b/arch/mips/pci/pci-ar71xx.c
index 9e62ad31d4b5..dac6a07c45bf 100644
--- a/arch/mips/pci/pci-ar71xx.c
+++ b/arch/mips/pci/pci-ar71xx.c
@@ -232,7 +232,7 @@ static void ar71xx_pci_irq_handler(unsigned int irq, struct 
irq_desc *desc)
void __iomem *base = ath79_reset_base;
u32 pending;
 
-   apc = irq_get_handler_data(irq);
+   apc = irq_desc_get_handler_data(desc);
 
pending = __raw_readl(base + AR71XX_RESET_REG_PCI_INT_STATUS) &
  __raw_readl(base + AR71XX_RESET_REG_PCI_INT_ENABLE);
diff --git a/arch/mips/pci/pci-ar724x.c b/arch/mips/pci/pci-ar724x.c
index a1b7d2a1b0d5..0af362b5af92 100644
--- a/arch/mips/pci/pci-ar724x.c
+++ b/arch/mips/pci/pci-ar724x.c
@@ -231,7 +231,7 @@ static void ar724x_pci_irq_handler(unsigned int irq, struct 
irq_desc *desc)
void __iomem *base;
u32 pending;
 
-   apc = irq_get_handler_data(irq);
+   apc = irq_desc_get_handler_data(desc);
base = apc->ctrl_base;
 
pending = __raw_readl(base + AR724X_PCI_REG_INT_STATUS) &
diff --git a/arch/mips/pci/pci-rt3883.c b/arch/mips/pci/pci-rt3883.c
index ec9be8ca4ada..80fafe646e74 100644
--- a/arch/mips/pci/pci-rt3883.c
+++ b/arch/mips/pci/pci-rt3883.c
@@ -134,7 +134,7 @@ static void rt3883_pci_irq_handler(unsigned int irq, struct 
irq_desc *desc)
struct rt3883_pci_controller *rpc;
u32 pending;
 
-   rpc = irq_get_handler_data(irq);
+   rpc = irq_desc_get_handler_data(desc);
 
pending = rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIINT) &
  rt3883_pci_r32(rpc, RT3883_PCI_REG_PCIENA);
diff --git a/arch/mips/ralink/irq.c b/arch/mips/ralink/irq.c
index 7cf91b92e9d1..da301e0a2f1f 100644
--- a/arch/mips/ralink/irq.c
+++ b/arch/mips/ralink/irq.c
@@ -100,7 +100,7 @@ static void ralink_intc_irq_handler(unsigned int irq, 
struct irq_desc *desc)
u32 pending = 

[RFT v2 02/48] genirq: Kill never used irq_node()

2015-06-03 Thread Jiang Liu
Macro irq_node() is never used, so kill it.

Signed-off-by: Jiang Liu 
---
 include/linux/irqnr.h |6 --
 1 file changed, 6 deletions(-)

diff --git a/include/linux/irqnr.h b/include/linux/irqnr.h
index fdd5cc16c9c4..9669bf9d4f48 100644
--- a/include/linux/irqnr.h
+++ b/include/linux/irqnr.h
@@ -23,12 +23,6 @@ unsigned int irq_get_next_irq(unsigned int offset);
;   \
else
 
-#ifdef CONFIG_SMP
-#define irq_node(irq)  (irq_get_irq_data(irq)->node)
-#else
-#define irq_node(irq)  0
-#endif
-
 # define for_each_active_irq(irq)  \
for (irq = irq_get_next_irq(0); irq < nr_irqs;  \
 irq = irq_get_next_irq(irq + 1))
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[RFT v2 00/48] Refine irq interfaces to reduce number of parameters

2015-06-03 Thread Jiang Liu
Many irq core interfaces pass both 'struct irq_desc *desc' and 'int irq'
to identify an irq. But that's a little overhead, either 'irq_desc' or
'irq' could identify an irq. We could get 'irq_desc' from 'irq' by
irq_to_desc() and get 'irq' from 'irq_desc' through irq_desc->irq_data.irq.
So this patch set aims to reduce number of parameters of irq related
interfaces by passing in either 'irq' or 'irq_desc" but not both.
Hope this helps to simplify interfaces and improve performance.

This patch set is based the patch set to refine struct irq_data, which
has been posted at:

The patch set could be split into five parts:
1) Patch 1-2 is following-on cleanup work for 
2) Patch 3-14 optimize irq handlers by avoiding redundant calling of 
   irq_to_desc() when we already have a pointer to corresponding irq_desc.
3) Patch 15-20 reduce number of parameters of irq core functions.
4) Patch 21-34 prepare for killing the first parameter 'irq' of
   irq_flow_handler_t
5) Patch 35-48 kill the first parameter 'irq' of irq_flow_handler_t.
   All these patches should be combined as one big patch to support
   bisecting, they have been split for easy review only.

With all these patches applied, a tree-wide 'grep -R "struct irq_desc" *'
shows that there are only four functions left who take both 'irq' and
'irq_desc' as parameters:
kernel/irq/manage.c:__setup_irq(unsigned int irq, struct irq_desc *desc, struct 
irqaction *new)
kernel/irq/debug.h:static inline void print_irq_desc(unsigned int irq, struct 
irq_desc *desc)
kernel/irq/irqdesc.c:static void desc_set_defaults(unsigned int irq, struct 
irq_desc *desc, int node,
kernel/irq/irqdesc.c:static void irq_insert_desc(unsigned int irq, struct 
irq_desc *desc)

They are all pretty safe, it's a good sign that we have done a clean
conversion. Thomas suggested to use coci scripts verify conversion result,
it's a little hard for me and will ask for help from Julia later.

You may get the patch set from:
The patch set passes Fengguang's 0day test suites as below. And tests
with other platforms and configurations will be appreciated:)
--
configs tested: 95

alpha   defconfig
pariscallnoconfig
parisc b180_defconfig
pariscc3000_defconfig
parisc  defconfig
i386   randconfig-a0-06031710
i386   randconfig-a1-06031710
x86_64 acpi-redef
x86_64   allyesdebian
x86_64nfsroot
x86_64allnoconfig
x86_64   rhel
shallnoconfig
sh  rsk7269_defconfig
sh  sh7785lcr_32bit_defconfig
shtitan_defconfig
ia64 alldefconfig
ia64  allnoconfig
ia64defconfig
powerpc   allnoconfig
powerpc defconfig
powerpc   ppc64_defconfig
i386 alldefconfig
i386 allmodconfig
i386  allnoconfig
i386defconfig
mips  allnoconfig
mips  fuloong2e_defconfig
mips   jz4740
mips txx9
x86_64 randconfig-i0-0603
x86_64 randconfig-i1-0603
sparc   defconfig
sparc64   allnoconfig
sparc64 defconfig
microblaze  mmu_defconfig
microblazenommu_defconfig
i386   randconfig-i0-0603
i386   randconfig-i1-0603
i386 allyesconfig
blackfinBF526-EZBRD_defconfig
blackfinBF533-EZKIT_defconfig
blackfinBF561-EZKIT-SMP_defconfig
blackfin  TCM-BF537_defconfig
cris etrax-100lx_v2_defconfig
i386   randconfig-n0-0603
i386   randconfig-n1-0603
x86_64lkp
arm   allnoconfig
arm at91_dt_defconfig
arm  at_hdmac
armep93xx
arm   imx_v6_v7_defconfig
arm  iop-adma
arm  marzen_defconfig
arm  prima2_defconfig
armsa1100
arm   samsung
armsh
arm   spear13xx_defconfig
m68k  amiga_defconfig
m68k  

RE: [PATCH 3/5] drivers:usb:fsl: Replace macros with enumerated type

2015-06-03 Thread Badola Nikhil
> -Original Message-
> From: Badola Nikhil-B46172
> Sent: Monday, June 01, 2015 11:50 AM
> To: 'Greg KH'
> Cc: linux-kernel@vger.kernel.org; st...@rowland.harvard.edu; linux-
> u...@vger.kernel.org; Joe Perches
> Subject: RE: [PATCH 3/5] drivers:usb:fsl: Replace macros with enumerated
> type
> 
> > -Original Message-
> > From: Greg KH [mailto:gre...@linuxfoundation.org]
> > Sent: Monday, June 01, 2015 2:32 AM
> > To: Joe Perches
> > Cc: Badola Nikhil-B46172; linux-kernel@vger.kernel.org;
> > st...@rowland.harvard.edu; linux-...@vger.kernel.org
> > Subject: Re: [PATCH 3/5] drivers:usb:fsl: Replace macros with
> > enumerated type
> >
> > On Sun, May 31, 2015 at 12:11:18AM -0700, Joe Perches wrote:
> > > On Sun, 2015-05-31 at 15:50 +0900, Greg KH wrote:
> > > > On Tue, May 26, 2015 at 05:15:48PM +0530, Nikhil Badola wrote:
> > > > > Replace macros with enumerated type to represent usb ip
> > > > > controller version
> > > > >
> > > > > Signed-off-by: Nikhil Badola 
> > > > > ---
> > > > >  include/linux/fsl_devices.h | 13 -
> > > > >  1 file changed, 8 insertions(+), 5 deletions(-)
> > > > >
> > > > > diff --git a/include/linux/fsl_devices.h
> > > > > b/include/linux/fsl_devices.h
> > > []
> > > > > +enum fsl_usb2_controller_ver {
> > > > > + FSL_USB_VER_OLD = 0,
> > > > > + FSL_USB_VER_1_6,
> > > > > + FSL_USB_VER_2_2,
> > > > > + FSL_USB_VER_2_4,
> > > > > + FSL_USB_VER_2_5,
> > > > > +};
> > > >
> > > > Don't you want to change that function that uses these to return
> > > > the enumerated type and not an integer?
> > > >
> 
> I missed that. I will do this change in the next patch version.
> 
> > > > Also, I don't think the C standard forces the non-numbered values
> > > > to be sequential,
> > >
> > > Then you haven't read the standard in awhile and you likely forgot.
> > >
> > > 6.7.2.2
> > > If the first enumerator has no =, the value of its enumeration
> > > constant is 0. Each subsequent enumerator with no = defines its
> > > enumeration constant as the value of the constant expression
> > > obtained by adding 1 to the value of the previous enumeration constant.
> >
> > Ah, you are right, I did forget.
> >
> > But if you are wanting to use the "numerical" value of these, please
> > be explicit when defining it.  Otherwise someone might think it was
> > just fine to put a new entry in the middle of the list.
> >
> We are only relying on the controller version to be less (or greater) than a
> specific version and we are not using exact "numerical" value. Refer
> drivers/usb/host/ehci-fsl.c .
> In addition, the enum entries defined are specific to controller version i.e 
> 1.6,
> 2.2, 2.4 and 2.5.
> In future if anyone needs to add an entry; supposedly 2.6; he would do so as
> per the sequence maintained.

Is it fine by above explanation to keep value for only first entry as done in 
this patch?

Should I move ahead with next patch version changing the return type to enum for
function which is returning usb controller version?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: build failure after merge of the sound-asoc tree

2015-06-03 Thread Stephen Rothwell
Hi all,

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

In file included from sound/soc/soc-dapm.c:43:0:
include/sound/soc.h:30:32: fatal error: sound/soc-topology.h: No such file or 
directory
 #include 
^

Several more of these ...

Caused by commit b2eef86fedbf ("ASoC: topology: Add topology core").
Looks like a file was missed.

I have used the sound-asoc tree from next-20150603 for today.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgphZ5vsvYVSf.pgp
Description: OpenPGP digital signature


Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function

2015-06-03 Thread Minchan Kim
On Thu, Jun 04, 2015 at 12:42:30PM +0900, Sergey Senozhatsky wrote:
> On (06/04/15 12:30), Minchan Kim wrote:
> > > -- free objects in class: 5 (free-objs class capacity)
> > > -- page1: inuse 2
> > > -- page2: inuse 2
> > > -- page3: inuse 3
> > > -- page4: inuse 2
> > 
> > What scenario do you have a cocern?
> > Could you describe this example more clear?
> 
> you mean "how is this even possible"?

No I meant. I couldn't understand your terms. Sorry.

What free-objs class capacity is?
page1 is zspage?

Let's use consistent terms between us.

For example, maxobj-per-zspage is 4.
A is allocated and used. X is allocated but not used.
so we can draw a zspage below.

AAXX

So we can draw several zspages linked list as below

AAXX - AXXX - AAAX

Could you describe your problem again?

Sorry.


> 
> well, for example,
> 
> make -jX
> make clean
> 
> can introduce a significant fragmentation. no new objects, just random
> objs removal. assuming that we keep some of the objects, allocated during
> compilation.
> 
> e.g.
> 
> ...
> 
> page1
>   allocate baz.so
>   allocate foo.o
> page2
>   allocate bar.o
>   allocate foo.so
> ...
> pageN
> 
> 
> 
> now `make clean`
> 
> page1:
>   allocated baz.so
>   empty
> 
> page2
>   empty
>   allocated foo.so
> 
> ...
> 
> pageN
> 
> in the worst case, every page can turn out to be ALMOST_EMPTY.
> 
>   -ss

-- 
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function

2015-06-03 Thread Sergey Senozhatsky
On (06/04/15 12:30), Minchan Kim wrote:
> > -- free objects in class: 5 (free-objs class capacity)
> > -- page1: inuse 2
> > -- page2: inuse 2
> > -- page3: inuse 3
> > -- page4: inuse 2
> 
> What scenario do you have a cocern?
> Could you describe this example more clear?

you mean "how is this even possible"?

well, for example,

make -jX
make clean

can introduce a significant fragmentation. no new objects, just random
objs removal. assuming that we keep some of the objects, allocated during
compilation.

e.g.

...

page1
  allocate baz.so
  allocate foo.o
page2
  allocate bar.o
  allocate foo.so
...
pageN



now `make clean`

page1:
  allocated baz.so
  empty

page2
  empty
  allocated foo.so

...

pageN

in the worst case, every page can turn out to be ALMOST_EMPTY.

-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function

2015-06-03 Thread Sergey Senozhatsky
On (06/04/15 12:15), Sergey Senozhatsky wrote:
> I'm still thinking how good it should be.
> 
> for automatic compaction we don't want to uselessly move objects between
> pages and I tend to think that it's better to compact less, than to waste
> more cpu cycless.
> 
> 
> on the other hand, this policy will miss cases like:
> 
> -- free objects in class: 5 (free-objs class capacity)
> -- page1: inuse 2
> -- page2: inuse 2
> -- page3: inuse 3
> -- page4: inuse 2
> 
> so total "insuse" is greater than free-objs class capacity. but, it's
> surely possible to compact this class. partial inuse summ <= free-objs class
> capacity (a partial summ is a ->inuse summ of any two of class pages:
> page1 + page2, page2 + page3, etc.).
> 
> otoh, these partial sums will badly affect performance. may be for automatic
> compaction (the one that happens w/o user interaction) we can do 
> zs_can_compact()
> and for manual compaction (the one that has been triggered by a user) we can
> old "full-scan".
> 
> anyway, zs_can_compact() looks like something that we can optimize
> independently later.
> 

so what I'm thinking of right now, is:

-- first do "if we have enough free objects to free at least one page"
check. compact if true.

  -- if false, then we can do on a per-page basis
 "if page->inuse <= class free-objs capacity" then compact it,
 else select next almost_empty page.

 here would be helpful to have pages ordered by ->inuse. but this
 is far to expensive.


I have a patch that I will post later that introduces weak/partial
page ordering within fullness_list (really inexpensive: just one int
compare to add a page with a higher ->inuse to list head instead of
list tail).

-ss
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function

2015-06-03 Thread Minchan Kim
On Thu, Jun 04, 2015 at 12:15:14PM +0900, Sergey Senozhatsky wrote:
> On (06/04/15 11:55), Minchan Kim wrote:
> > > [ 3303.108960] class-3072 objs:24652 inuse:24628 objs-per-page:4 
> > > pages-tofree:6
> > 
> >maxobjs-per-zspage?
> > 
> 
> yeah, I shortened it to be more of less "80 chars" friendly.
> 
> 
> [..]
> 
> > > +  * calculate how many unused allocated objects we
> > 
> >c should be captital.
> > 
> > I hope you will fix all of english grammer in next spin
> > because someone(like me) who is not a native will learn the
> > wrong english. :)
> 
> sure, will fix. yeah, I'm a native broken english speaker :-)
> 
> > > +  * have and see if we can free any zspages. otherwise,
> > > +  * compaction can just move objects back and forth w/o
> > > +  * any memory gain.
> > > +  */
> > > + unsigned long ret = zs_stat_get(class, OBJ_ALLOCATED) -
> > > + zs_stat_get(class, OBJ_USED);
> > > +
> > 
> > I prefer obj_wasted to "ret".
> 
> ok.
> 
> I'm still thinking how good it should be.
> 
> for automatic compaction we don't want to uselessly move objects between
> pages and I tend to think that it's better to compact less, than to waste
> more cpu cycless.
> 
> 
> on the other hand, this policy will miss cases like:
> 
> -- free objects in class: 5 (free-objs class capacity)
> -- page1: inuse 2
> -- page2: inuse 2
> -- page3: inuse 3
> -- page4: inuse 2

What scenario do you have a cocern?
Could you describe this example more clear?

Thanks.
> 
> so total "insuse" is greater than free-objs class capacity. but, it's
> surely possible to compact this class. partial inuse summ <= free-objs class
> capacity (a partial summ is a ->inuse summ of any two of class pages:
> page1 + page2, page2 + page3, etc.).
> 
> otoh, these partial sums will badly affect performance. may be for automatic
> compaction (the one that happens w/o user interaction) we can do 
> zs_can_compact()
> and for manual compaction (the one that has been triggered by a user) we can
> old "full-scan".
> 
> anyway, zs_can_compact() looks like something that we can optimize
> independently later.
> 
>   -ss
> 
> > > + ret /= get_maxobj_per_zspage(class->size,
> > > + class->pages_per_zspage);
> > > + return ret > 0;
> > > +}
> > > +
> > >  static unsigned long __zs_compact(struct zs_pool *pool,
> > >   struct size_class *class)
> > >  {
> > > @@ -1686,6 +1708,9 @@ static unsigned long __zs_compact(struct zs_pool 
> > > *pool,
> > >  
> > >   BUG_ON(!is_first_page(src_page));
> > >  
> > > + if (!zs_can_compact(class))
> > > + break;
> > > +
> > >   cc.index = 0;
> > >   cc.s_page = src_page;
> > >  
> > > -- 
> > > 2.4.2.337.gfae46aa
> > > 
> > 
> > -- 
> > Kind regards,
> > Minchan Kim
> > 

-- 
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] net: tulip: rearrange order of searching for substrings

2015-06-03 Thread David Miller
From: Rasmus Villemoes 
Date: Wed,  3 Jun 2015 13:44:03 +0200

> Currently, two of the branches are dead code, since an earlier smaller
> substring would have been found ("TP" in the "TP_NW" case and either
> of "BNC" and "AUI" in the "BNC_AUI" case). Rearrange the strstr()
> calls so that the longer strings are searched for first.
> 
> Signed-off-by: Rasmus Villemoes 

Applied to net-next, thank you.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] modules: CONFIG_MODULE_COMPRESS: add hint that userspace support may easily be missing.

2015-06-03 Thread Stephen Rothwell
Hi Rusty,

On Thu, 04 Jun 2015 11:00:41 +0930 Rusty Russell  wrote:
>
> Lucas De Marchi  writes:
> > On Mon, Jun 1, 2015 at 3:26 AM, Rusty Russell  wrote:
> >> Andreas Mohr  writes:
> >>>
> >>> I just had a not so nice experience
> >>> when finally upgrading to a new 4.1-rc5
> >>> with CONFIG_MODULE_COMPRESS newly enabled -
> >>> userspace binary parts (kmod 18 or 20 in my case)
> >>> did not have compression enabled
> >>> (at least on Debian 8pre, vs. encountering it enabled on FC21)
> >>> since it does not seem to be
> >>> the default build configuration of kmod (yet?).
> >>
> >> Sure.  Let's get the maintainers to insert the actual version required
> >> in the help text though.
> >
> > kmod supports gz since the first version and xz since version 3.  So both
> > of them can be safely fall into "it's supported since the beginning of
> > kmod IMO".
> 
> Thanks, that's what I needed.
> 
> But disappointing that Debian doesn't configure with it, and there's no
> easy way to check it.  Looks like Ubuntu vivid is the same.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=772628

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpHQk5cHtxue.pgp
Description: OpenPGP digital signature


Re: randconfig build error with next-20150603, in fs/xfs/xfs_inode.c

2015-06-03 Thread Paul Gortmaker
[Re: randconfig build error with next-20150603, in fs/xfs/xfs_inode.c] On 
04/06/2015 (Thu 13:01) Dave Chinner wrote:

> On Wed, Jun 03, 2015 at 10:36:54PM -0400, Paul Gortmaker wrote:
> > On Wed, Jun 3, 2015 at 12:31 PM, Jim Davis  wrote:
> > > Building with the attached random configuration file,
> > >
> > > fs/built-in.o: In function `xfs_ifree_cluster':
> > > /home/jim/linux/fs/xfs/xfs_inode.c:2268: undefined reference to 
> > > `__umoddi3'
> > 
> > I don't think this is specific to a particular randconfig.
> > 
> > On ARM allmodconfig, I saw:
> > 
> > ERROR: "__aeabi_uldivmod" [fs/xfs/xfs.ko] undefined!
> > 
> > On powerpc with an older gcc-4.5 toolchain, I saw:
> > 
> > /bin/sh: line 1: 23453 Segmentation fault  powerpc-linux-ld -EB -m
> > elf64ppc -r -T /home/paul/git/linux-head/scripts/module-common.lds
> > arch/powerpc/lib/crtsavres.o --build-id -o fs/xfs/xfs.ko fs/xfs/xfs.o
> > fs/xfs/xfs.mod.o
> > make[2]: *** [fs/xfs/xfs.ko] Error 139
> > 
> > I have not investigated further than that.
> 
> A fix is already pending. Probably be in tomorrow's linux-next
> build.

Thanks Dave -- sounds good.  After all, the whole point of linux-next is
to spot these and vet out arch/merge issues before they get merged.

No matter what level of arch and config coverage I try to do, it seems
linux-next still finds a corner case that I somehow missed.

Hopefully we don't lose sight of that underlying goal and we don't
inadvertently intimidate folks from requesting their changes to be added
to linux-next.

Paul.
--

> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> da...@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function

2015-06-03 Thread Sergey Senozhatsky
On (06/04/15 11:55), Minchan Kim wrote:
> > [ 3303.108960] class-3072 objs:24652 inuse:24628 objs-per-page:4 
> > pages-tofree:6
> 
>maxobjs-per-zspage?
> 

yeah, I shortened it to be more of less "80 chars" friendly.


[..]

> > +* calculate how many unused allocated objects we
> 
>c should be captital.
> 
> I hope you will fix all of english grammer in next spin
> because someone(like me) who is not a native will learn the
> wrong english. :)

sure, will fix. yeah, I'm a native broken english speaker :-)

> > +* have and see if we can free any zspages. otherwise,
> > +* compaction can just move objects back and forth w/o
> > +* any memory gain.
> > +*/
> > +   unsigned long ret = zs_stat_get(class, OBJ_ALLOCATED) -
> > +   zs_stat_get(class, OBJ_USED);
> > +
> 
> I prefer obj_wasted to "ret".

ok.

I'm still thinking how good it should be.

for automatic compaction we don't want to uselessly move objects between
pages and I tend to think that it's better to compact less, than to waste
more cpu cycless.


on the other hand, this policy will miss cases like:

-- free objects in class: 5 (free-objs class capacity)
-- page1: inuse 2
-- page2: inuse 2
-- page3: inuse 3
-- page4: inuse 2

so total "insuse" is greater than free-objs class capacity. but, it's
surely possible to compact this class. partial inuse summ <= free-objs class
capacity (a partial summ is a ->inuse summ of any two of class pages:
page1 + page2, page2 + page3, etc.).

otoh, these partial sums will badly affect performance. may be for automatic
compaction (the one that happens w/o user interaction) we can do 
zs_can_compact()
and for manual compaction (the one that has been triggered by a user) we can
old "full-scan".

anyway, zs_can_compact() looks like something that we can optimize
independently later.

-ss

> > +   ret /= get_maxobj_per_zspage(class->size,
> > +   class->pages_per_zspage);
> > +   return ret > 0;
> > +}
> > +
> >  static unsigned long __zs_compact(struct zs_pool *pool,
> > struct size_class *class)
> >  {
> > @@ -1686,6 +1708,9 @@ static unsigned long __zs_compact(struct zs_pool 
> > *pool,
> >  
> > BUG_ON(!is_first_page(src_page));
> >  
> > +   if (!zs_can_compact(class))
> > +   break;
> > +
> > cc.index = 0;
> > cc.s_page = src_page;
> >  
> > -- 
> > 2.4.2.337.gfae46aa
> > 
> 
> -- 
> Kind regards,
> Minchan Kim
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 04/10] zsmalloc: cosmetic compaction code adjustments

2015-06-03 Thread Minchan Kim
On Sat, May 30, 2015 at 12:05:22AM +0900, Sergey Senozhatsky wrote:
> change zs_object_copy() argument order to be (DST, SRC) rather
> than (SRC, DST). copy/move functions usually have (to, from)
> arguments order.

Yeb,

> 
> rename alloc_target_page() to isolate_target_page(). this
> function doesn't allocate anything, it isolates target page,
> pretty much like isolate_source_page().

The reason I named it as alloc_target_page is I had a plan to
alloc new page which might be helpful sometime but I cannot
think of any benefit now so I follow your your patch.

> 
> tweak __zs_compact() comment.
> 
> Signed-off-by: Sergey Senozhatsky 
Acked-by: Minchan Kim 

> ---
>  mm/zsmalloc.c | 12 ++--
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 9ef6f15..fa72a81 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1469,7 +1469,7 @@ void zs_free(struct zs_pool *pool, unsigned long handle)
>  }
>  EXPORT_SYMBOL_GPL(zs_free);
>  
> -static void zs_object_copy(unsigned long src, unsigned long dst,
> +static void zs_object_copy(unsigned long dst, unsigned long src,
>   struct size_class *class)
>  {
>   struct page *s_page, *d_page;
> @@ -1610,7 +1610,7 @@ static int migrate_zspage(struct zs_pool *pool, struct 
> size_class *class,
>  
>   used_obj = handle_to_obj(handle);
>   free_obj = obj_malloc(d_page, class, handle);
> - zs_object_copy(used_obj, free_obj, class);
> + zs_object_copy(free_obj, used_obj, class);
>   index++;
>   record_obj(handle, free_obj);
>   unpin_tag(handle);
> @@ -1626,7 +1626,7 @@ static int migrate_zspage(struct zs_pool *pool, struct 
> size_class *class,
>   return ret;
>  }
>  
> -static struct page *alloc_target_page(struct size_class *class)
> +static struct page *isolate_target_page(struct size_class *class)
>  {
>   int i;
>   struct page *page;
> @@ -1714,11 +1714,11 @@ static unsigned long __zs_compact(struct zs_pool 
> *pool,
>   cc.index = 0;
>   cc.s_page = src_page;
>  
> - while ((dst_page = alloc_target_page(class))) {
> + while ((dst_page = isolate_target_page(class))) {
>   cc.d_page = dst_page;
>   /*
> -  * If there is no more space in dst_page, try to
> -  * allocate another zspage.
> +  * If there is no more space in dst_page, resched
> +  * and see if anyone had allocated another zspage.
>*/
>   if (!migrate_zspage(pool, class, ))
>   break;
> -- 
> 2.4.2.337.gfae46aa
> 

-- 
Kind regards,
Minchan Kim
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: randconfig build error with next-20150603, in fs/xfs/xfs_inode.c

2015-06-03 Thread Dave Chinner
On Wed, Jun 03, 2015 at 10:36:54PM -0400, Paul Gortmaker wrote:
> On Wed, Jun 3, 2015 at 12:31 PM, Jim Davis  wrote:
> > Building with the attached random configuration file,
> >
> > fs/built-in.o: In function `xfs_ifree_cluster':
> > /home/jim/linux/fs/xfs/xfs_inode.c:2268: undefined reference to `__umoddi3'
> 
> I don't think this is specific to a particular randconfig.
> 
> On ARM allmodconfig, I saw:
> 
> ERROR: "__aeabi_uldivmod" [fs/xfs/xfs.ko] undefined!
> 
> On powerpc with an older gcc-4.5 toolchain, I saw:
> 
> /bin/sh: line 1: 23453 Segmentation fault  powerpc-linux-ld -EB -m
> elf64ppc -r -T /home/paul/git/linux-head/scripts/module-common.lds
> arch/powerpc/lib/crtsavres.o --build-id -o fs/xfs/xfs.ko fs/xfs/xfs.o
> fs/xfs/xfs.mod.o
> make[2]: *** [fs/xfs/xfs.ko] Error 139
> 
> I have not investigated further than that.

A fix is already pending. Probably be in tomorrow's linux-next
build.

Cheers,

Dave.
-- 
Dave Chinner
da...@fromorbit.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] modules: CONFIG_MODULE_COMPRESS: add hint that userspace support may easily be missing.

2015-06-03 Thread Marco d'Itri
On Jun 04, Rusty Russell  wrote:

> But disappointing that Debian doesn't configure with it, and there's no
> easy way to check it.  Looks like Ubuntu vivid is the same.
> 
> Might be time to change the default in kmod?
Changing the default will not make me enable compression support, 
but providing interesting use cases maybe will.

Also, I see no point in enabling support for both gz and xz in kmod.

-- 
ciao,
Marco


pgpL7WJ6OWa_E.pgp
Description: PGP signature


Re: [RFC][PATCH 03/10] zsmalloc: introduce zs_can_compact() function

2015-06-03 Thread Minchan Kim
On Sat, May 30, 2015 at 12:05:21AM +0900, Sergey Senozhatsky wrote:
> this function checks if class compaction will free any pages.
> rephrasing, do we have enough unused objects to form at least one
> ZS_EMPTY page and free it. it aborts compaction if class compaction
> will not result into any (further) savings.
> 
> EXAMPLE (this debug output is not part of this patch set):
> 
> -- class size
> -- number of allocated objects
> -- number of used objects,
> -- estimated number of pages that will be freed
> 
> [..]
> [ 3303.108960] class-3072 objs:24652 inuse:24628 objs-per-page:4 
> pages-tofree:6

   maxobjs-per-zspage?

> [ 3303.108965] class-3072 objs:24648 inuse:24628 objs-per-page:4 
> pages-tofree:5
> [ 3303.108970] class-3072 objs:24644 inuse:24628 objs-per-page:4 
> pages-tofree:4
> [ 3303.108973] class-3072 objs:24640 inuse:24628 objs-per-page:4 
> pages-tofree:3
> [ 3303.108978] class-3072 objs:24636 inuse:24628 objs-per-page:4 
> pages-tofree:2
> [ 3303.108982] class-3072 objs:24632 inuse:24628 objs-per-page:4 
> pages-tofree:1
> [ 3303.108993] class-2720 objs:17970 inuse:17966 objs-per-page:3 
> pages-tofree:1
> [ 3303.108997] class-2720 objs:17967 inuse:17966 objs-per-page:3 
> pages-tofree:0
> [ 3303.108998] class-2720: Compaction is useless
> [ 3303.109000] class-2448 objs:7680 inuse:7674 objs-per-page:5 pages-tofree:1
> [ 3303.109005] class-2336 objs:13510 inuse:13500 objs-per-page:7 
> pages-tofree:1
> [ 3303.109010] class-2336 objs:13503 inuse:13500 objs-per-page:7 
> pages-tofree:0
> [ 3303.109011] class-2336: Compaction is useless
> [ 3303.109013] class-1808 objs:1161 inuse:1154 objs-per-page:9 pages-tofree:0
> [ 3303.109014] class-1808: Compaction is useless
> [ 3303.109016] class-1744 objs:2135 inuse:2131 objs-per-page:7 pages-tofree:0
> [ 3303.109017] class-1744: Compaction is useless
> [ 3303.109019] class-1536 objs:1328 inuse:1323 objs-per-page:8 pages-tofree:0
> [ 3303.109020] class-1536: Compaction is useless
> [ 3303.109022] class-1488 objs:8855 inuse:8847 objs-per-page:11 pages-tofree:0
> [ 3303.109023] class-1488: Compaction is useless
> [ 3303.109025] class-1360 objs:14880 inuse:14878 objs-per-page:3 
> pages-tofree:0
> [ 3303.109026] class-1360: Compaction is useless
> [ 3303.109028] class-1248 objs:3588 inuse:3577 objs-per-page:13 pages-tofree:0
> [ 3303.109029] class-1248: Compaction is useless
> [ 3303.109031] class-1216 objs:3380 inuse:3372 objs-per-page:10 pages-tofree:0
> [ 3303.109032] class-1216: Compaction is useless
> [ 3303.109033] class-1168 objs:3416 inuse:3401 objs-per-page:7 pages-tofree:2
> [ 3303.109037] class-1168 objs:3409 inuse:3401 objs-per-page:7 pages-tofree:1
> [ 3303.109042] class-1104 objs:605 inuse:599 objs-per-page:11 pages-tofree:0
> [ 3303.109043] class-1104: Compaction is useless
> [..]
> 
> every "Compaction is useless" indicates that we saved some CPU cycles.
> 
> for example, class-1104 has
> 
>   605 object allocated
>   599 objects used
>   11  objects per-page
> 
> even if we have ALMOST_EMPTY page, we still don't have enough room to move
> all of its objects and free this page; so compaction will not make a lot of
> sense here, it's better to just leave it as is.

Fair enough.

> 
> Signed-off-by: Sergey Senozhatsky 
> ---
>  mm/zsmalloc.c | 25 +
>  1 file changed, 25 insertions(+)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 778b8db..9ef6f15 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -1673,6 +1673,28 @@ static struct page *isolate_source_page(struct 
> size_class *class)
>   return page;
>  }
>  
> +/*
> + * Make sure that we actually can compact this class,
> + * IOW if migration will empty at least one page.
> + *
> + * should be called under class->lock
> + */
> +static bool zs_can_compact(struct size_class *class)
> +{
> + /*
> +  * calculate how many unused allocated objects we

   c should be captital.

I hope you will fix all of english grammer in next spin
because someone(like me) who is not a native will learn the
wrong english. :)
   
> +  * have and see if we can free any zspages. otherwise,
> +  * compaction can just move objects back and forth w/o
> +  * any memory gain.
> +  */
> + unsigned long ret = zs_stat_get(class, OBJ_ALLOCATED) -
> + zs_stat_get(class, OBJ_USED);
> +

I prefer obj_wasted to "ret".

> + ret /= get_maxobj_per_zspage(class->size,
> + class->pages_per_zspage);
> + return ret > 0;
> +}
> +
>  static unsigned long __zs_compact(struct zs_pool *pool,
>   struct size_class *class)
>  {
> @@ -1686,6 +1708,9 @@ static unsigned long __zs_compact(struct zs_pool *pool,
>  
>   BUG_ON(!is_first_page(src_page));
>  
> + if (!zs_can_compact(class))
> + break;
> +
>   cc.index = 0;
>   cc.s_page = src_page;
>  
> -- 

Re: [PATCH] ethernet: micrel: use time_after_eq

2015-06-03 Thread David Miller
From: Antonio Murdaca 
Date: Tue,  2 Jun 2015 14:35:52 +0200

> use the time_after_eq macro for jiffies comparison operation
> 
> Signed-off-by: Antonio Murdaca 

Applied to net-next, thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: randconfig build error with next-20150603, in fs/xfs/xfs_inode.c

2015-06-03 Thread Paul Gortmaker
On Wed, Jun 3, 2015 at 12:31 PM, Jim Davis  wrote:
> Building with the attached random configuration file,
>
> fs/built-in.o: In function `xfs_ifree_cluster':
> /home/jim/linux/fs/xfs/xfs_inode.c:2268: undefined reference to `__umoddi3'

I don't think this is specific to a particular randconfig.

On ARM allmodconfig, I saw:

ERROR: "__aeabi_uldivmod" [fs/xfs/xfs.ko] undefined!

On powerpc with an older gcc-4.5 toolchain, I saw:

/bin/sh: line 1: 23453 Segmentation fault  powerpc-linux-ld -EB -m
elf64ppc -r -T /home/paul/git/linux-head/scripts/module-common.lds
arch/powerpc/lib/crtsavres.o --build-id -o fs/xfs/xfs.ko fs/xfs/xfs.o
fs/xfs/xfs.mod.o
make[2]: *** [fs/xfs/xfs.ko] Error 139

I have not investigated further than that.

Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [tip:sched/core] sched/core: Validate rq_clock*() serialization

2015-06-03 Thread Wanpeng Li


On 5/30/15 9:03 AM, Sasha Levin wrote:

On 01/14/2015 09:03 AM, tip-bot for Peter Zijlstra wrote:

Commit-ID:  cebde6d681aa45f96111cfcffc1544cf2a0454ff
Gitweb: http://git.kernel.org/tip/cebde6d681aa45f96111cfcffc1544cf2a0454ff
Author: Peter Zijlstra 
AuthorDate: Mon, 5 Jan 2015 11:18:10 +0100
Committer:  Ingo Molnar 
CommitDate: Wed, 14 Jan 2015 13:34:19 +0100

sched/core: Validate rq_clock*() serialization

rq->clock{,_task} are serialized by rq->lock, verify this.

One immediate fail is the usage in scale_rt_capability, so 'annotate'
that for now, there's more 'funny' there. Maybe change rq->lock into a
raw_seqlock_t?

(Only 32-bit is affected)

Signed-off-by: Peter Zijlstra (Intel) 
Link: http://lkml.kernel.org/r/20150105103554.361872...@infradead.org
Cc: Linus Torvalds 
Cc: umgwanakikb...@gmail.com
Signed-off-by: Ingo Molnar 
---

Hey Peter,

I'm seeing the following in the latest -next:


How to reproduce? I didn't see it w/ just boot test.

Regards,
Wanpeng Li



[ 2706.857941] [ cut here ]
[ 2706.857963] WARNING: CPU: 6 PID: 14780 at kernel/sched/sched.h:728 
update_curr+0x3db/0x550()
[ 2706.857971] Modules linked in:
[ 2706.857982] CPU: 6 PID: 14780 Comm: trinity-c2 Not tainted 
4.1.0-rc5-next-20150529-sasha-00039-g7fd455d-dirty #2262
[ 2706.858000]  a6a1426a c9f98986 8802b6807b98 
a6a1426a
[ 2706.858015]    8802b6807be8 
9d1e50c6
[ 2706.858029]  9d1e52f5 9d28a2fb 8800c3d0b068 
88050c1c3068
[ 2706.858033] Call Trace:
[ 2706.858054]  ? dump_stack (lib/dump_stack.c:52)
[ 2706.858064] dump_stack (lib/dump_stack.c:52)
[ 2706.858077] warn_slowpath_common (kernel/panic.c:448)
[ 2706.858085] ? warn_slowpath_null (kernel/panic.c:479)
[ 2706.858092] ? update_curr (kernel/sched/sched.h:728 kernel/sched/fair.c:698)
[ 2706.858102] warn_slowpath_null (kernel/panic.c:482)
[ 2706.858110] update_curr (kernel/sched/sched.h:728 kernel/sched/fair.c:698)
[ 2706.858116] ? update_curr (kernel/sched/fair.c:697)
[ 2706.858128] task_tick_fair (include/linux/sched.h:3049 
kernel/sched/fair.c:397 kernel/sched/fair.c:2795 kernel/sched/fair.c:3372 
kernel/sched/fair.c:8000)
[ 2706.858141] ? sched_clock_cpu (kernel/sched/clock.c:315)
[ 2706.858151] ? task_tick_fair (kernel/sched/fair.c:7994)
[ 2706.858162] scheduler_tick (kernel/sched/core.c:2523)
[ 2706.858177] update_process_times (kernel/time/timer.c:1399)
[ 2706.858188] tick_sched_handle.isra.12 (kernel/time/tick-sched.c:152)
[ 2706.858196] ? tick_sched_handle.isra.12 (kernel/time/tick-sched.c:134)
[ 2706.858206] tick_sched_timer (kernel/time/tick-sched.c:1075)
[ 2706.858217] __hrtimer_run_queues (kernel/time/hrtimer.c:1138 
kernel/time/hrtimer.c:1194)
[ 2706.858228] ? ftrace_call (arch/x86/kernel/mcount_64.S:158)
[ 2706.858237] ? tick_sched_do_timer (kernel/time/tick-sched.c:1059)
[ 2706.858246] ? hrtimer_fixup_init (kernel/time/hrtimer.c:1161)
[ 2706.858256] ? __hrtimer_run_queues (kernel/time/hrtimer.c:1161)
[ 2706.858267] hrtimer_interrupt (kernel/time/hrtimer.c:1231)
[ 2706.858281] ? preempt_schedule_context (kernel/sched/core.c:2941 
(discriminator 1) include/linux/jump_label.h:125 (discriminator 1) 
include/linux/context_tracking_state.h:29 (discriminator 1) 
include/linux/context_tracking.h:34 (discriminator 1) kernel/sched/core.c:2947 
(discriminator 1))
[ 2706.858293] local_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:891)
[ 2706.858301] ? local_apic_timer_interrupt (arch/x86/kernel/apic/apic.c:863)
[ 2706.858311] smp_apic_timer_interrupt (./arch/x86/include/asm/apic.h:655 
arch/x86/kernel/apic/apic.c:915)
[ 2706.858323] apic_timer_interrupt (arch/x86/kernel/entry_64.S:911)
[ 2706.858332]  
[ 2706.858333] ---[ end trace b7e04749c55c3d4e ]---


Thanks,
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [RFC][PATCH 02/10] zsmalloc: always keep per-class stats

2015-06-03 Thread Sergey Senozhatsky
On (06/04/15 11:18), Minchan Kim wrote:
> On Sat, May 30, 2015 at 12:05:20AM +0900, Sergey Senozhatsky wrote:
> > always account per-class `zs_size_stat' stats. this data will
> > help us make better decisions during compaction. we are especially
> > interested in OBJ_ALLOCATED and OBJ_USED, which can tell us if
> > class compaction will result in any memory gain.
> > 
> > for instance, we know the number of allocated objects in the class,
> > the number of objects being used (so we also know how many objects
> > are not used) and the number of objects per-page. so we can estimate
> > how many pages compaction can free (pages that will turn into
> > ZS_EMPTY during compaction).
> 
> Fair enough but I need to read further patches to see if we need
> really this at the moment.
> 
> I hope it would be better to write down more detail in cover-letter
> so when I read just [0/0] I realize your goal and approach without
> looking into detail in each patch.
> 

sure, will do later today.
I caught a cold, so I'm a bit slow.

-ss

> > 
> > Signed-off-by: Sergey Senozhatsky 
> > ---
> >  mm/zsmalloc.c | 49 -
> >  1 file changed, 12 insertions(+), 37 deletions(-)
> > 
> > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> > index e615b31..778b8db 100644
> > --- a/mm/zsmalloc.c
> > +++ b/mm/zsmalloc.c
> > @@ -169,14 +169,12 @@ enum zs_stat_type {
> > NR_ZS_STAT_TYPE,
> >  };
> >  
> > -#ifdef CONFIG_ZSMALLOC_STAT
> > -
> > -static struct dentry *zs_stat_root;
> > -
> >  struct zs_size_stat {
> > unsigned long objs[NR_ZS_STAT_TYPE];
> >  };
> >  
> > +#ifdef CONFIG_ZSMALLOC_STAT
> > +static struct dentry *zs_stat_root;
> >  #endif
> >  
> >  /*
> > @@ -201,25 +199,21 @@ static int zs_size_classes;
> >  static const int fullness_threshold_frac = 4;
> >  
> >  struct size_class {
> > +   spinlock_t  lock;
> > +   struct page *fullness_list[_ZS_NR_FULLNESS_GROUPS];
> > /*
> >  * Size of objects stored in this class. Must be multiple
> >  * of ZS_ALIGN.
> >  */
> > -   int size;
> > -   unsigned int index;
> > +   int size;
> > +   unsigned intindex;
> >  
> > /* Number of PAGE_SIZE sized pages to combine to form a 'zspage' */
> > -   int pages_per_zspage;
> > -   /* huge object: pages_per_zspage == 1 && maxobj_per_zspage == 1 */
> > -   bool huge;
> > -
> > -#ifdef CONFIG_ZSMALLOC_STAT
> > -   struct zs_size_stat stats;
> > -#endif
> > -
> > -   spinlock_t lock;
> > +   int pages_per_zspage;
> > +   struct zs_size_stat stats;
> >  
> > -   struct page *fullness_list[_ZS_NR_FULLNESS_GROUPS];
> > +   /* huge object: pages_per_zspage == 1 && maxobj_per_zspage == 1 */
> > +   boolhuge;
> >  };
> >  
> >  /*
> > @@ -439,8 +433,6 @@ static int get_size_class_index(int size)
> > return min(zs_size_classes - 1, idx);
> >  }
> >  
> > -#ifdef CONFIG_ZSMALLOC_STAT
> > -
> >  static inline void zs_stat_inc(struct size_class *class,
> > enum zs_stat_type type, unsigned long cnt)
> >  {
> > @@ -459,6 +451,8 @@ static inline unsigned long zs_stat_get(struct 
> > size_class *class,
> > return class->stats.objs[type];
> >  }
> >  
> > +#ifdef CONFIG_ZSMALLOC_STAT
> > +
> >  static int __init zs_stat_init(void)
> >  {
> > if (!debugfs_initialized())
> > @@ -574,23 +568,6 @@ static void zs_pool_stat_destroy(struct zs_pool *pool)
> >  }
> >  
> >  #else /* CONFIG_ZSMALLOC_STAT */
> > -
> > -static inline void zs_stat_inc(struct size_class *class,
> > -   enum zs_stat_type type, unsigned long cnt)
> > -{
> > -}
> > -
> > -static inline void zs_stat_dec(struct size_class *class,
> > -   enum zs_stat_type type, unsigned long cnt)
> > -{
> > -}
> > -
> > -static inline unsigned long zs_stat_get(struct size_class *class,
> > -   enum zs_stat_type type)
> > -{
> > -   return 0;
> > -}
> > -
> >  static int __init zs_stat_init(void)
> >  {
> > return 0;
> > @@ -608,7 +585,6 @@ static inline int zs_pool_stat_create(char *name, 
> > struct zs_pool *pool)
> >  static inline void zs_pool_stat_destroy(struct zs_pool *pool)
> >  {
> >  }
> > -
> >  #endif
> >  
> >  
> > @@ -1682,7 +1658,6 @@ static void putback_zspage(struct zs_pool *pool, 
> > struct size_class *class,
> > class->size, class->pages_per_zspage));
> > atomic_long_sub(class->pages_per_zspage,
> > >pages_allocated);
> > -
> > free_zspage(first_page);
> > }
> >  }
> > -- 
> > 2.4.2.337.gfae46aa
> > 
> 
> -- 
> Kind regards,
> Minchan Kim
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH] drivers/cpufreq: include for modular exynos-cpufreq.c code

2015-06-03 Thread Viresh Kumar
On 03-06-15, 17:18, Paul Gortmaker wrote:
> This file is built off of a tristate Kconfig option ("ARM_EXYNOS_CPUFREQ")
> and also contains modular function calls so it should explicitly include
> module.h to avoid compile breakage during pending header shuffles.
> 
> Cc: "Rafael J. Wysocki" 
> Cc: Viresh Kumar 
> Cc: Kukjin Kim 
> Cc: Krzysztof Kozlowski 
> Cc: linux...@vger.kernel.org
> Cc: linux-arm-ker...@lists.infradead.org
> Cc: linux-samsung-...@vger.kernel.org
> Signed-off-by: Paul Gortmaker 
> ---
> 
> [ patch will be appended to the implicit include fixup series, see:
>   
> https://lkml.kernel.org/r/1430444867-22342-1-git-send-email-paul.gortma...@windriver.com
>   for the original series posting.]
> 
>  drivers/cpufreq/exynos-cpufreq.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/cpufreq/exynos-cpufreq.c 
> b/drivers/cpufreq/exynos-cpufreq.c
> index 82d2fbb20f7e..4c157302365f 100644
> --- a/drivers/cpufreq/exynos-cpufreq.c
> +++ b/drivers/cpufreq/exynos-cpufreq.c
> @@ -10,6 +10,7 @@
>  */
>  
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 

Acked-by: Viresh Kumar 

-- 
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


  1   2   3   4   5   6   7   8   9   10   >