Re: [PATCH v2] Make hard_irq_disable() actually hard-disable interrupts

2012-06-15 Thread Benjamin Herrenschmidt
On Fri, 2012-06-15 at 14:51 +1000, Paul Mackerras wrote:
 At present, hard_irq_disable() does nothing on powerpc because of
 this code in include/linux/interrupt.h:
 
 #ifndef hard_irq_disable
 #define hard_irq_disable()  do { } while(0)
 #endif
 
 So we need to make our hard_irq_disable be a macro.
 
 Acked-by: Benjamin Herrenschmidt b...@kernel.crashing.org
 Signed-off-by: Paul Mackerras pau...@samba.org

Add:

CC: sta...@kernel.org [v3.4]

Before sending to Linus so it hits stable automagically.

Cheers,
Ben.

 --
  arch/powerpc/include/asm/hw_irq.h |3 +++
  1 file changed, 3 insertions(+)
 
 diff --git a/arch/powerpc/include/asm/hw_irq.h 
 b/arch/powerpc/include/asm/hw_irq.h
 index c9aac24..32b394f 100644
 --- a/arch/powerpc/include/asm/hw_irq.h
 +++ b/arch/powerpc/include/asm/hw_irq.h
 @@ -100,6 +100,9 @@ static inline void hard_irq_disable(void)
   get_paca()-irq_happened |= PACA_IRQ_HARD_DIS;
  }
  
 +/* include/linux/interrupt.h needs hard_irq_disable to be a macro */
 +#define hard_irq_disable hard_irq_disable
 +
  /*
   * This is called by asynchronous interrupts to conditionally
   * re-enable hard interrupts when soft-disabled after having


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH] common: dma-mapping: add support for generic dma_mmap_* calls

2012-06-15 Thread Marek Szyprowski
Commit 9adc5374 ('common: dma-mapping: introduce mmap method') added a
generic method for implementing mmap user call to dma_map_ops structure.

This patch converts ARM and PowerPC architectures (the only providers of
dma_mmap_coherent/dma_mmap_writecombine calls) to use this generic
dma_map_ops based call and adds a generic cross architecture
definition for dma_mmap_attrs, dma_mmap_coherent, dma_mmap_writecombine
functions.

The generic mmap virt_to_page-based fallback implementation is provided for
architectures which don't provide their own implementation for mmap method.

Signed-off-by: Marek Szyprowski m.szyprow...@samsung.com
Reviewed-by: Kyungmin Park kyungmin.p...@samsung.com
---
Hello,

This patch is a continuation of my works on dma-mapping cleanup and
unification. Previous works (commit 58bca4a8fa ('Merge branch
'for-linus' of git://git.linaro.org/people/mszyprowski/linux-dma-mapping')
has been merged to v3.4-rc2. Now I've focuses on providing implementation 
for all architectures so the drivers and some cross-architecture common 
helpers (like for example videobuf2) can start using this new api.

I'm not 100% sure if the PowerPC changes are correct. The cases of
dma_iommu_ops and vio_dma_mapping_ops are a bit suspicious for me, but I
have no way to test and check if my changes works for that hardware.

Best regards
Marek Szyprowski
Samsung Poland RD Center

---
 arch/arm/include/asm/dma-mapping.h   |   19 ---
 arch/powerpc/include/asm/dma-mapping.h   |8 +++---
 arch/powerpc/kernel/dma-iommu.c  |1 +
 arch/powerpc/kernel/dma-swiotlb.c|1 +
 arch/powerpc/kernel/dma.c|   36 +++-
 arch/powerpc/kernel/vio.c|1 +
 drivers/base/dma-mapping.c   |   31 +
 include/asm-generic/dma-coherent.h   |1 +
 include/asm-generic/dma-mapping-common.h |   37 ++
 9 files changed, 95 insertions(+), 40 deletions(-)

diff --git a/arch/arm/include/asm/dma-mapping.h 
b/arch/arm/include/asm/dma-mapping.h
index bbef15d..8645088 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -186,17 +186,6 @@ extern int arm_dma_mmap(struct device *dev, struct 
vm_area_struct *vma,
void *cpu_addr, dma_addr_t dma_addr, size_t size,
struct dma_attrs *attrs);
 
-#define dma_mmap_coherent(d, v, c, h, s) dma_mmap_attrs(d, v, c, h, s, NULL)
-
-static inline int dma_mmap_attrs(struct device *dev, struct vm_area_struct 
*vma,
- void *cpu_addr, dma_addr_t dma_addr,
- size_t size, struct dma_attrs *attrs)
-{
-   struct dma_map_ops *ops = get_dma_ops(dev);
-   BUG_ON(!ops);
-   return ops-mmap(dev, vma, cpu_addr, dma_addr, size, attrs);
-}
-
 static inline void *dma_alloc_writecombine(struct device *dev, size_t size,
   dma_addr_t *dma_handle, gfp_t flag)
 {
@@ -213,14 +202,6 @@ static inline void dma_free_writecombine(struct device 
*dev, size_t size,
return dma_free_attrs(dev, size, cpu_addr, dma_handle, attrs);
 }
 
-static inline int dma_mmap_writecombine(struct device *dev, struct 
vm_area_struct *vma,
- void *cpu_addr, dma_addr_t dma_addr, size_t size)
-{
-   DEFINE_DMA_ATTRS(attrs);
-   dma_set_attr(DMA_ATTR_WRITE_COMBINE, attrs);
-   return dma_mmap_attrs(dev, vma, cpu_addr, dma_addr, size, attrs);
-}
-
 /*
  * This can be called during boot to increase the size of the consistent
  * DMA region above it's default value of 2MB. It must be called before the
diff --git a/arch/powerpc/include/asm/dma-mapping.h 
b/arch/powerpc/include/asm/dma-mapping.h
index 62678e3..7816087 100644
--- a/arch/powerpc/include/asm/dma-mapping.h
+++ b/arch/powerpc/include/asm/dma-mapping.h
@@ -27,7 +27,10 @@ extern void *dma_direct_alloc_coherent(struct device *dev, 
size_t size,
 extern void dma_direct_free_coherent(struct device *dev, size_t size,
 void *vaddr, dma_addr_t dma_handle,
 struct dma_attrs *attrs);
-
+extern int dma_direct_mmap_coherent(struct device *dev,
+   struct vm_area_struct *vma,
+   void *cpu_addr, dma_addr_t handle,
+   size_t size, struct dma_attrs *attrs);
 
 #ifdef CONFIG_NOT_COHERENT_CACHE
 /*
@@ -207,11 +210,8 @@ static inline phys_addr_t dma_to_phys(struct device *dev, 
dma_addr_t daddr)
 #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
 #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
 
-extern int dma_mmap_coherent(struct device *, struct vm_area_struct *,
-void *, dma_addr_t, size_t);
 #define ARCH_HAS_DMA_MMAP_COHERENT
 
-
 static inline void dma_cache_sync(struct device *dev, void *vaddr, 

[GIT PULL] Please pull a powerpc fix

2012-06-15 Thread Paul Mackerras
Linus,

The following changes since commit cfaf025112d3856637ff34a767ef785ef5cf2ca9:

  Linux 3.5-rc2 (2012-06-08 18:40:09 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc.git 
tags/for-linus

for you to fetch changes up to f948501b36c6b3d9352ce212a197098a7e958971:

  Make hard_irq_disable() actually hard-disable interrupts (2012-06-15 15:27:41 
+1000)


PowerPC fix for Linus

Just one commit, and a one-liner at that, but an important one;
without it hard_irq_disable() does nothing on powerpc.


Paul Mackerras (1):
  Make hard_irq_disable() actually hard-disable interrupts

 arch/powerpc/include/asm/hw_irq.h |3 +++
 1 file changed, 3 insertions(+)
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[MPC5200] using GPT's for interrupts

2012-06-15 Thread Albrecht Dre�
Hi all,

I currently try to use a MPC5200B GPT as interrupt source, which according to 
the comment at the start of arch/powerpc/platforms/52xx/mpc52xx_gpt.c is 
possible if the interrupt-controller and #interrupt-cells =  1  
properties are added to the device tree node.

Apparently, /some/ work is done during startup, as I can see in the boot log:

[0.438623] gpiochip_find_base: found new base at 251
[0.444202] mpc52xx-gpt f650.timer: mpc52xx_gpt_irq_setup() complete. 
virq=78

In my driver, I identify the GPT node, call irq_of_parse_and_map() to get the 
irq number (which succeeds, with the same number as above), but unfortunately 
request_irq() or devm_request_irq() for this irq fail with error -22.  I 
tracked the failed call down to request_threaded_irq() which ejects because 
irq_settings_can_request(desc) returns false.

Before digging deeper into the code, maybe someone can tell me what I missed... 
 I'm using kernel 3.2.16.

Thanks in advance,
Albrecht.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 1/7][TRIVIAL][resend] powerpc: cleanup kernel-doc warning

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

Warning(arch/powerpc/kernel/pci_of_scan.c:210): Excess function parameter 
'node' description in 'of_scan_pci_bridge'
Warning(arch/powerpc/kernel/vio.c:636): No description found for parameter 
'desired'
Warning(arch/powerpc/kernel/vio.c:636): Excess function parameter 'new_desired' 
description in 'vio_cmo_set_dev_desired'
Warning(arch/powerpc/kernel/vio.c:1270): No description found for parameter 
'viodrv'
Warning(arch/powerpc/kernel/vio.c:1270): Excess function parameter 'drv' 
description in '__vio_register_driver'
Warning(arch/powerpc/kernel/vio.c:1289): No description found for parameter 
'viodrv'
Warning(arch/powerpc/kernel/vio.c:1289): Excess function parameter 'driver' 
description in 'vio_unregister_driver'


Signed-off-by: Wanpeng Li liwp.li...@gmail.com
---
 arch/powerpc/kernel/pci_of_scan.c |1 -
 arch/powerpc/kernel/vio.c |6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/pci_of_scan.c 
b/arch/powerpc/kernel/pci_of_scan.c
index 89dde17..d7dd42b 100644
--- a/arch/powerpc/kernel/pci_of_scan.c
+++ b/arch/powerpc/kernel/pci_of_scan.c
@@ -198,7 +198,6 @@ EXPORT_SYMBOL(of_create_pci_dev);
 
 /**
  * of_scan_pci_bridge - Set up a PCI bridge and scan for child nodes
- * @node: device tree node of bridge
  * @dev: pci_dev structure for the bridge
  *
  * of_scan_bus() calls this routine for each PCI bridge that it finds, and
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index cb87301..06cbc30 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -625,7 +625,7 @@ struct dma_map_ops vio_dma_mapping_ops = {
  * vio_cmo_set_dev_desired - Set desired entitlement for a device
  *
  * @viodev: struct vio_dev for device to alter
- * @new_desired: new desired entitlement level in bytes
+ * @desired: new desired entitlement level in bytes
  *
  * For use by devices to request a change to their entitlement at runtime or
  * through sysfs.  The desired entitlement level is changed and a balancing
@@ -1262,7 +1262,7 @@ static int vio_bus_remove(struct device *dev)
 
 /**
  * vio_register_driver: - Register a new vio driver
- * @drv:   The vio_driver structure to be registered.
+ * @viodrv:The vio_driver structure to be registered.
  */
 int __vio_register_driver(struct vio_driver *viodrv, struct module *owner,
  const char *mod_name)
@@ -1282,7 +1282,7 @@ EXPORT_SYMBOL(__vio_register_driver);
 
 /**
  * vio_unregister_driver - Remove registration of vio driver.
- * @driver:The vio_driver struct to be removed form registration
+ * @viodrv:The vio_driver struct to be removed form registration
  */
 void vio_unregister_driver(struct vio_driver *viodrv)
 {
-- 
1.7.9.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 2/7][TRIVIAL][resend] x86/kernel: cleanup some kernel-doc warnings

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

Warning(arch/x86/kernel/kgdb.c:465): No description found for parameter 
'e_vector'
Warning(arch/x86/kernel/kgdb.c:465): No description found for parameter 
'remcomInBuffer'
Warning(arch/x86/kernel/kgdb.c:465): No description found for parameter 
'remcomOutBuffer'
Warning(arch/x86/kernel/kgdb.c:465): No description found for parameter 
'linux_regs'
Warning(arch/x86/kernel/kgdb.c:465): Excess function parameter 'vector' 
description in 'kgdb_arch_handle_exception'
Warning(arch/x86/kernel/kgdb.c:465): Excess function parameter 
'remcom_in_buffer' description in 'kgdb_arch_handle_exception'
Warning(arch/x86/kernel/kgdb.c:465): Excess function parameter 
'remcom_out_buffer' description in 'kgdb_arch_handle_exception'
Warning(arch/x86/kernel/kgdb.c:465): Excess function parameter 'regs' 
description in 'kgdb_arch_handle_exception'
Warning(arch/x86/kernel/uprobes.c:416): No description found for parameter 
'auprobe'
Warning(arch/x86/kernel/uprobes.c:416): Excess function parameter 'arch_uprobe' 
description in 'arch_uprobe_analyze_insn'
Warning(arch/x86/lib/csum-wrappers_64.c:125): No description found for 
parameter 'sum'
Warning(arch/x86/lib/csum-wrappers_64.c:125): Excess function parameter 'isum' 
description in 'csum_partial_copy_nocheck'

Signed-off-by: Wanpeng Li liwp.li...@gmail.com

---
 arch/x86/kernel/kgdb.c|8 
 arch/x86/kernel/uprobes.c |2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/kgdb.c b/arch/x86/kernel/kgdb.c
index 8bfb614..3f61904 100644
--- a/arch/x86/kernel/kgdb.c
+++ b/arch/x86/kernel/kgdb.c
@@ -444,12 +444,12 @@ void kgdb_roundup_cpus(unsigned long flags)
 
 /**
  * kgdb_arch_handle_exception - Handle architecture specific GDB packets.
- * @vector: The error vector of the exception that happened.
+ * @e_vector: The error vector of the exception that happened.
  * @signo: The signal number of the exception that happened.
  * @err_code: The error code of the exception that happened.
- * @remcom_in_buffer: The buffer of the packet we have read.
- * @remcom_out_buffer: The buffer of %BUFMAX bytes to write a packet into.
- * @regs: The struct pt_regs of the current process.
+ * @remcomInBuffer: The buffer of the packet we have read.
+ * @remcomOutBuffer: The buffer of %BUFMAX bytes to write a packet into.
+ * @linux_regs: The struct pt_regs of the current process.
  *
  * This function MUST handle the 'c' and 's' command packets,
  * as well packets to set / remove a hardware breakpoint, if used.
diff --git a/arch/x86/kernel/uprobes.c b/arch/x86/kernel/uprobes.c
index dc4e910..f785a06 100644
--- a/arch/x86/kernel/uprobes.c
+++ b/arch/x86/kernel/uprobes.c
@@ -408,7 +408,7 @@ static int validate_insn_bits(struct arch_uprobe *auprobe, 
struct mm_struct *mm,
 /**
  * arch_uprobe_analyze_insn - instruction analysis including validity and 
fixups.
  * @mm: the probed address space.
- * @arch_uprobe: the probepoint information.
+ * @auprobe: the probepoint information.
  * Return 0 on success or a -ve number on error.
  */
 int arch_uprobe_analyze_insn(struct arch_uprobe *auprobe, struct mm_struct *mm)
-- 
1.7.9.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 3/7][TRIVIAL][resend] drivers/pci: cleanup kernel-doc warning

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

Warning(drivers/pci/setup-bus.c:277): No description found for parameter 
'fail_head'
Warning(drivers/pci/setup-bus.c:277): Excess function parameter 'failed_list' 
description in 'assign_requested_resources_sorted'

Signed-off-by: Wanpeng Li liwp.li...@gmail.com
---
 drivers/pci/setup-bus.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 8fa2d4b..9165d25 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -265,7 +265,7 @@ out:
  * assign_requested_resources_sorted() - satisfy resource requests
  *
  * @head : head of the list tracking requests for resources
- * @failed_list : head of the list tracking requests that could
+ * @fail_head : head of the list tracking requests that could
  * not be allocated
  *
  * Satisfy resource requests of each element in the list. Add
-- 
1.7.9.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 4/7][TRIVIAL][resend] mm: cleanup on the comments of zone_reclaim_stat

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

Signed-off-by: Wanpeng Li liwp.li...@gmail.com
Acked-by: Minchan Kim minc...@kernel.org

---
 include/linux/mmzone.h |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 2427706..d6a5f83 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -188,7 +188,7 @@ static inline int is_unevictable_lru(enum lru_list lru)
 struct zone_reclaim_stat {
/*
 * The pageout code in vmscan.c keeps track of how many of the
-* mem/swap backed and file backed pages are refeferenced.
+* mem/swap backed and file backed pages are referenced.
 * The higher the rotated/scanned ratio, the more valuable
 * that cache is.
 *
-- 
1.7.9.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 5/7][TRIVIAL][resend] mm: cleanup kernel-doc warnings

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

fix kernel-doc warnings just like this one:

Warning(../mm/page_cgroup.c:432): No description found for parameter 'id'
Warning(../mm/page_cgroup.c:432): Excess function parameter 'mem' description 
in 'swap_cgroup_record'

Signed-off-by: Wanpeng Li liwp.li...@gmail.com

---
 mm/memblock.c|   12 ++--
 mm/memcontrol.c  |4 ++--
 mm/oom_kill.c|2 +-
 mm/page_cgroup.c |4 ++--
 mm/pagewalk.c|1 -
 mm/percpu-vm.c   |1 -
 6 files changed, 11 insertions(+), 13 deletions(-)

diff --git a/mm/memblock.c b/mm/memblock.c
index 952123e..b84f258 100644
--- a/mm/memblock.c
+++ b/mm/memblock.c
@@ -540,9 +540,9 @@ int __init_memblock memblock_reserve(phys_addr_t base, 
phys_addr_t size)
  * __next_free_mem_range - next function for for_each_free_mem_range()
  * @idx: pointer to u64 loop variable
  * @nid: nid: node selector, %MAX_NUMNODES for all nodes
- * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
- * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
- * @p_nid: ptr to int for nid of the range, can be %NULL
+ * @out_start: ptr to phys_addr_t for start address of the range, can be %NULL
+ * @out_end: ptr to phys_addr_t for end address of the range, can be %NULL
+ * @out_nid: ptr to int for nid of the range, can be %NULL
  *
  * Find the first free area from *@idx which matches @nid, fill the out
  * parameters, and update *@idx for the next iteration.  The lower 32bit of
@@ -616,9 +616,9 @@ void __init_memblock __next_free_mem_range(u64 *idx, int 
nid,
  * __next_free_mem_range_rev - next function for 
for_each_free_mem_range_reverse()
  * @idx: pointer to u64 loop variable
  * @nid: nid: node selector, %MAX_NUMNODES for all nodes
- * @p_start: ptr to phys_addr_t for start address of the range, can be %NULL
- * @p_end: ptr to phys_addr_t for end address of the range, can be %NULL
- * @p_nid: ptr to int for nid of the range, can be %NULL
+ * @out_start: ptr to phys_addr_t for start address of the range, can be %NULL
+ * @out_end: ptr to phys_addr_t for end address of the range, can be %NULL
+ * @out_nid: ptr to int for nid of the range, can be %NULL
  *
  * Reverse of __next_free_mem_range().
  */
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index ac35bcc..a9c3d01 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -1234,7 +1234,7 @@ int mem_cgroup_inactive_file_is_low(struct lruvec *lruvec)
 
 /**
  * mem_cgroup_margin - calculate chargeable space of a memory cgroup
- * @mem: the memory cgroup
+ * @memcg: the memory cgroup
  *
  * Returns the maximum amount of memory @mem can be charged with, in
  * pages.
@@ -1508,7 +1508,7 @@ static unsigned long mem_cgroup_reclaim(struct mem_cgroup 
*memcg,
 
 /**
  * test_mem_cgroup_node_reclaimable
- * @mem: the target memcg
+ * @memcg: the target memcg
  * @nid: the node ID to be checked.
  * @noswap : specify true here if the user wants flle only information.
  *
diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 416637f..c1956f1 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -366,7 +366,7 @@ static struct task_struct *select_bad_process(unsigned int 
*ppoints,
 
 /**
  * dump_tasks - dump current memory state of all system tasks
- * @mem: current's memory controller, if constrained
+ * @memcg: current's memory controller, if constrained
  * @nodemask: nodemask passed to page allocator for mempolicy ooms
  *
  * Dumps the current memory state of all eligible tasks.  Tasks not in the same
diff --git a/mm/page_cgroup.c b/mm/page_cgroup.c
index 1ccbd71..eb750f8 100644
--- a/mm/page_cgroup.c
+++ b/mm/page_cgroup.c
@@ -392,7 +392,7 @@ static struct swap_cgroup *lookup_swap_cgroup(swp_entry_t 
ent,
 
 /**
  * swap_cgroup_cmpxchg - cmpxchg mem_cgroup's id for this swp_entry.
- * @end: swap entry to be cmpxchged
+ * @ent: swap entry to be cmpxchged
  * @old: old id
  * @new: new id
  *
@@ -422,7 +422,7 @@ unsigned short swap_cgroup_cmpxchg(swp_entry_t ent,
 /**
  * swap_cgroup_record - record mem_cgroup for this swp_entry.
  * @ent: swap entry to be recorded into
- * @mem: mem_cgroup to be recorded
+ * @id: mem_cgroup to be recorded
  *
  * Returns old value at success, 0 at failure.
  * (Of course, old value can be 0.)
diff --git a/mm/pagewalk.c b/mm/pagewalk.c
index aa9701e..6c118d0 100644
--- a/mm/pagewalk.c
+++ b/mm/pagewalk.c
@@ -162,7 +162,6 @@ static int walk_hugetlb_range(struct vm_area_struct *vma,
 
 /**
  * walk_page_range - walk a memory map's page tables with a callback
- * @mm: memory map to walk
  * @addr: starting address
  * @end: ending address
  * @walk: set of callbacks to invoke for each level of the tree
diff --git a/mm/percpu-vm.c b/mm/percpu-vm.c
index 405d331..3707c71 100644
--- a/mm/percpu-vm.c
+++ b/mm/percpu-vm.c
@@ -360,7 +360,6 @@ err_free:
  * @chunk: chunk to depopulate
  * @off: offset to the area to depopulate
  * @size: size of the area to depopulate in bytes
- * @flush: whether to flush cache and tlb or not
  *
  * For 

[PATCH 6/7][TRIVIAL][resend] mm: cleanup page reclaim comment error

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

Since there are five lists in LRU cache, the array nr in get_scan_count
should be:

nr[0] = anon inactive pages to scan; nr[1] = anon active pages to scan
nr[2] = file inactive pages to scan; nr[3] = file active pages to scan

Signed-off-by: Wanpeng Li liwp.li...@gmail.com
Acked-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com
Acked-by: Minchan Kim minc...@kernel.org
Reviewed-by: Rik van Riel r...@redhat.com

---
 mm/vmscan.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index eeb3bc9..ed823df 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1567,7 +1567,8 @@ static int vmscan_swappiness(struct scan_control *sc)
  * by looking at the fraction of the pages scanned we did rotate back
  * onto the active list instead of evict.
  *
- * nr[0] = anon pages to scan; nr[1] = file pages to scan
+ * nr[0] = anon inactive pages to scan; nr[1] = anon active pages to scan
+ * nr[2] = file inactive pages to scan; nr[3] = file active pages to scan
  */
 static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc,
   unsigned long *nr)
-- 
1.7.9.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 7/7] mm/memory.c : cleanup the coding style issue

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

Signed-off-by: Wanpeng Li liwp.li...@gmail.com

---
 mm/memory.c |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/memory.c b/mm/memory.c
index 1b7dc66..195d6e1 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2447,7 +2447,8 @@ static inline int pte_unmap_same(struct mm_struct *mm, 
pmd_t *pmd,
return same;
 }
 
-static inline void cow_user_page(struct page *dst, struct page *src, unsigned 
long va, struct vm_area_struct *vma)
+static inline void cow_user_page(struct page *dst, struct page *src,
+   unsigned long va, struct vm_area_struct *vma)
 {
/*
 * If the source page was a PFN mapping, we don't have
-- 
1.7.9.5

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 0/7][TRIVIAL][resend] trivial patches

2012-06-15 Thread Wanpeng Li
From: Wanpeng Li l...@linux.vnet.ibm.com

Since these patches has already send more than one week and 
doesn't get any response, I collect them and send out a patch set.

Wanpeng Li (7)

powerpc: cleanup some kernel doc warning 
x86/kernel: cleanup some kernel doc warning  
drivers/pci: cleanup some kernel doc warning
mm: cleanup on the comments of zone_reclaim_stat
mm: cleanup some kernel doc warning
mm: cleanup page relaim comment error
mm/memory.c: cleanup coding style issue

Signed-off-by: Wanpeng Li liwp.li...@gmail.com
--
 arch/powerpc/kernel/pci_of_scan.c |1 -
 arch/powerpc/kernel/vio.c |6 +++---
 arch/x86/kernel/kgdb.c|8 
 arch/x86/kernel/uprobes.c |2 +-
 drivers/pci/setup-bus.c   |2 +-
 include/linux/mmzone.h|2 +-
 mm/memblock.c |   12 ++--
 mm/memcontrol.c   |4 ++--
 mm/memory.c   |3 ++-
 mm/oom_kill.c |2 +-
 mm/page_cgroup.c  |4 ++--
 mm/pagewalk.c |1 -
 mm/percpu-vm.c|1 -
 mm/vmscan.c   |3 ++-
 14 files changed, 25 insertions(+), 26 deletions(-)

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Questions on Hugetlb for bookE and PHYS_64BIT

2012-06-15 Thread telenn barz
Hi all,

CONFIG_PHYS_64BIT enables kernel support for larger than 32-bit physical
addresses. Is it this configuration option we have to enable for the
support of 36-bit real memory (as are capable the Freescale e500v2 or
e500mc cores family) ?

The Hugetlb patch for BookE (
https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-June/091315.html)
seems to be surbordinated to CONFIG_PHYS_64BIT. Is there any good reason
why it is not supported when CONFIG_PHYS_64BIT is disabled ?

Thanks,
Telenn
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH 6/7][TRIVIAL][resend] mm: cleanup page reclaim comment error

2012-06-15 Thread Johannes Weiner
On Fri, Jun 15, 2012 at 09:19:45PM +0800, Wanpeng Li wrote:
 From: Wanpeng Li l...@linux.vnet.ibm.com
 
 Since there are five lists in LRU cache, the array nr in get_scan_count
 should be:
 
 nr[0] = anon inactive pages to scan; nr[1] = anon active pages to scan
 nr[2] = file inactive pages to scan; nr[3] = file active pages to scan
 
 Signed-off-by: Wanpeng Li liwp.li...@gmail.com
 Acked-by: KOSAKI Motohiro kosaki.motoh...@jp.fujitsu.com
 Acked-by: Minchan Kim minc...@kernel.org
 Reviewed-by: Rik van Riel r...@redhat.com
 
 ---
  mm/vmscan.c |3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
 
 diff --git a/mm/vmscan.c b/mm/vmscan.c
 index eeb3bc9..ed823df 100644
 --- a/mm/vmscan.c
 +++ b/mm/vmscan.c
 @@ -1567,7 +1567,8 @@ static int vmscan_swappiness(struct scan_control *sc)
   * by looking at the fraction of the pages scanned we did rotate back
   * onto the active list instead of evict.
   *
 - * nr[0] = anon pages to scan; nr[1] = file pages to scan
 + * nr[0] = anon inactive pages to scan; nr[1] = anon active pages to scan
 + * nr[2] = file inactive pages to scan; nr[3] = file active pages to scan
   */

Does including this in the comment have any merit in the first place?
We never access nr[0] or nr[1] etc. anywhere with magic numbers.  It's
a local function with one callsite, the passed array is declared and
accessed exclusively by what is defined in enum lru_list, where is the
point in repeating the enum items?.  I'd rather the next change to
this comment would be its removal.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/2] powerpc/e6500: TLB miss handler with hardware tablewalk support

2012-06-15 Thread Scott Wood
On 06/14/2012 08:05 PM, Benjamin Herrenschmidt wrote:
  - It has threads, but no tlbsrx. -- so we need a spinlock and
a normal tlbsx.  Because we need this lock, hardware tablewalk
is mandatory on e6500 unless we want to add spinlock+tlbsx to
the normal bolted TLB miss handler.
 
 Isn't this a violation of the architecture ? (Isn't tlbsrx. mandatory ?
 in 2.06 MAV2 ?).

I don't think so -- not only does it have a category name, there's a
MAV2-specific bit in MMUCSR indicating whether the category is present.

I still don't understand why Freescale omitted it from a chip that has
threads, though.

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: Questions on Hugetlb for bookE and PHYS_64BIT

2012-06-15 Thread Scott Wood
On 06/15/2012 09:43 AM, telenn barz wrote:
 Hi all,
 
 CONFIG_PHYS_64BIT enables kernel support for larger than 32-bit physical
 addresses. Is it this configuration option we have to enable for the
 support of 36-bit real memory (as are capable the Freescale e500v2 or
 e500mc cores family) ?

Yes.

 The Hugetlb patch for BookE
 (https://lists.ozlabs.org/pipermail/linuxppc-dev/2011-June/091315.html)
 seems to be surbordinated to CONFIG_PHYS_64BIT. Is there any good reason
 why it is not supported when CONFIG_PHYS_64BIT is disabled ?

Because it would be extra work to support that configuration, and
nobody's felt enough of a need for it to put in that work.

-Scott

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 7/7] mm/memory.c : cleanup the coding style issue

2012-06-15 Thread KOSAKI Motohiro
 diff --git a/mm/memory.c b/mm/memory.c
 index 1b7dc66..195d6e1 100644
 --- a/mm/memory.c
 +++ b/mm/memory.c
 @@ -2447,7 +2447,8 @@ static inline int pte_unmap_same(struct mm_struct *mm, 
 pmd_t *pmd,
   return same;
  }
  
 -static inline void cow_user_page(struct page *dst, struct page *src, 
 unsigned long va, struct vm_area_struct *vma)
 +static inline void cow_user_page(struct page *dst, struct page *src,
 + unsigned long va, struct vm_area_struct *vma)
  {
   /*
* If the source page was a PFN mapping, we don't have

Nowadays, many developers prefer to declare a function in one line. and we 
don't think
this is incorrect anymore. so, I think this is intentional.
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [PATCH 2/2] powerpc/e6500: TLB miss handler with hardware tablewalk support

2012-06-15 Thread Benjamin Herrenschmidt
On Fri, 2012-06-15 at 11:50 -0500, Scott Wood wrote:
 On 06/14/2012 08:05 PM, Benjamin Herrenschmidt wrote:
   - It has threads, but no tlbsrx. -- so we need a spinlock and
 a normal tlbsx.  Because we need this lock, hardware tablewalk
 is mandatory on e6500 unless we want to add spinlock+tlbsx to
 the normal bolted TLB miss handler.
  
  Isn't this a violation of the architecture ? (Isn't tlbsrx. mandatory ?
  in 2.06 MAV2 ?).
 
 I don't think so -- not only does it have a category name, there's a
 MAV2-specific bit in MMUCSR indicating whether the category is present.
 
 I still don't understand why Freescale omitted it from a chip that has
 threads, though.

Right, especially since from memory, the idea for it came from FSL (Mike
maybe) during a meeting between the IBM and FSL folks (I was there) :-)

Oh well  probably a case of HW folks with no clue that didn't
understand why it would be needed. Did you whack a few heads with a
cluebat ?

Cheers,
Ben.


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


FW: [PATCH 0/3] powerpc/mpic: Enhancements for FSL MPIC.

2012-06-15 Thread Sethi Varun-B16395
Hi Kumar,
If possible could you please review this patch set.

Regards
Varun

 -Original Message-
 From: Sethi Varun-B16395
 Sent: Sunday, June 03, 2012 1:11 PM
 To: linuxppc-dev@lists.ozlabs.org
 Cc: Sethi Varun-B16395
 Subject: [PATCH 0/3] powerpc/mpic: Enhancements for FSL MPIC.
 
 This patchset adds/fixes the following functionality specific to the FSL
 MPIC:
 1. Fix support for timer group B interrupts. Previously these were not
 getting initialized.
 
 2. Use the MPIC_LARGE_VECTORS flag while intializing FSL MPIC.
 This prevents us from eating in to hardware vector number space (MSIs)
 while setting up internal sources.
 
 3.Cascaded handling for the MPIC error interrupt. This is possible with
 FSL MPIC version = 4.1.
 
 The patches are based on next branch of Benjamin Herrenschmidt's
 powerpc linux tree.
 
 Varun Sethi (3):
   Support time group b on freescale chips.
   Use MPIC_LARGE_VECTORS flag for Freescale MPIC.
   Add support for cascaded error interrupt handling.
 
  arch/powerpc/include/asm/mpic.h  |   22 
  arch/powerpc/sysdev/Makefile |2 +-
  arch/powerpc/sysdev/fsl_mpic_err.c   |  157
 ++
  arch/powerpc/sysdev/mpic.c   |   95 +++
  arch/powerpc/sysdev/mpic.h   |   22 
  6 files changed, 338 insertions(+), 19 deletions(-)  create mode 100644
 arch/powerpc/sysdev/fsl_mpic_err.c
 
 --
 1.7.2.2


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [driver-core:driver-core-linus 6/6] drivers/firmware/iscsi_ibft_find.o: In function `kmsg_dump_rewind': (.text+0x18): multiple definition of `kmsg_dump_rewind'

2012-06-15 Thread Stephen Rothwell
Hi,

On Sat, 16 Jun 2012 08:02:55 +0800 w...@linux.intel.com wrote:

 Kernel build failed on
 
 tree:   git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
 driver-core-linus
 head:   e2ae715d66bf4becfb85eb84b7150e23cf27df30
 commit: e2ae715d66bf4becfb85eb84b7150e23cf27df30 [6/6] kmsg - kmsg_dump() use 
 iterator to receive log buffer content
 config: i386-randconfig-usb1 (attached as .config)

Please have a good look at what you are sending out.  I don't understand
why this report has come to linuxppc-dev (the patch touches an
arch/powerpc file, but none of the problems reported are in that file).
You should put the .config on a web site somewhere and include the URL and
you should not include the whole patch (these were all quite large) -
people can find them given a tree and commit (like above).

And you sent out 7 reports for the same patch!

I approved this bunch, but will not (unless pressured) approve any more.
This scatter gun automated approach is like the boy crying wolf.

I appreciate the effort, but please tone down the reports considerably.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpve5H8xskT2.pgp
Description: PGP signature
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [driver-core:driver-core-linus 6/6] drivers/firmware/iscsi_ibft_find.o: In function `kmsg_dump_rewind': (.text+0x18): multiple definition of `kmsg_dump_rewind'

2012-06-15 Thread Greg Kroah-Hartman
On Sat, Jun 16, 2012 at 09:16:46AM +0800, Fengguang Wu wrote:
 Hi list,
 
 I'm sorry if this pile of build errors disturbed you too much. If
 the error notification is too permissive, I can limit it in two ways:
 
 1) only notify build errors on the first kconfig. There may be a few
new error messages show up in the other kconfig builds, however
mostly are just irritating duplications.

Duplicates should be suppressed, they are just annoying.

 2) only notify the mailing list directly associated with the git tree.
In this particular case, to only CC de...@driverdev.osuosl.org, and
to avoid the linux-mtd and linuxppc-dev lists.

Yes, that would be the best thing to do to start with, then let the
developers take it from there.

thanks,

greg k-h
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


Re: [driver-core:driver-core-linus 6/6] drivers/firmware/iscsi_ibft_find.o: In function `kmsg_dump_rewind': (.text+0x18): multiple definition of `kmsg_dump_rewind'

2012-06-15 Thread Fengguang Wu
Hi Stephen,

On Sat, Jun 16, 2012 at 11:15:50AM +1000, Stephen Rothwell wrote:
 Hi,
 
 On Sat, 16 Jun 2012 08:02:55 +0800 w...@linux.intel.com wrote:
 
  Kernel build failed on
  
  tree:   
  git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git 
  driver-core-linus
  head:   e2ae715d66bf4becfb85eb84b7150e23cf27df30
  commit: e2ae715d66bf4becfb85eb84b7150e23cf27df30 [6/6] kmsg - kmsg_dump() 
  use iterator to receive log buffer content
  config: i386-randconfig-usb1 (attached as .config)
 
 Please have a good look at what you are sending out.  I don't understand
 why this report has come to linuxppc-dev (the patch touches an
 arch/powerpc file, but none of the problems reported are in that file).

Because I blindly used the lists reported by scripts/get_maintainer.pl ...

I'll build a mailing list = git tree mapping based on MAINTAINERS
and use that to build CC list, rather than depending on the source files
that the patch randomly touch.

 You should put the .config on a web site somewhere and include the URL and
 you should not include the whole patch (these were all quite large) -
 people can find them given a tree and commit (like above).

That's a valid option. Unfortunately I don't have a website to run
this for now. Anyway, I'm still on the way improving the kernel
testing backend based on your and others' feedback :)

 And you sent out 7 reports for the same patch!

That's where a website could help. Different kconfigs may trigger
different errors for the same commit. So it's a hard decision whether
to send emails for all broken kconfigs and risk being a noise, or to
limit it to the first broken kconfig and risk lose of information.

For now, I can send the patch author all the emails, but CC others
only on the first one (with an statement that there are actually more
errors in other kconfigs). So that the author that is responsive for
fixing the bug get the full information, while the others still can
keep track of the error situation.

 I approved this bunch, but will not (unless pressured) approve any more.
 This scatter gun automated approach is like the boy crying wolf.
 I appreciate the effort, but please tone down the reports considerably.

Heh, thanks! We should be able to reach a polished automated system
that's fast and accurate in the end :-)

Thanks,
Fengguang
___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev