* Re: [PATCH 05/14] IA64: adapt for dma_map_ops changes
From: Tony Luck @ 2012-03-27 21:20 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-mips, linux-ia64, linux-sh, linux-mm, sparclinux,
linux-arch, Stephen Rothwell, Jonathan Corbet, x86, Arnd Bergmann,
microblaze-uclinux, linaro-mm-sig, Andrzej Pietrasiewicz,
Thomas Gleixner, linux-arm-kernel, discuss, linux-kernel,
Kyungmin Park, linux-alpha, Andrew Morton, linuxppc-dev
In-Reply-To: <1324643253-3024-6-git-send-email-m.szyprowski@samsung.com>
On Fri, Dec 23, 2011 at 4:27 AM, Marek Szyprowski
<m.szyprowski@samsung.com> wrote:
> From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
>
> Adapt core IA64 architecture code for dma_map_ops changes: replace
> alloc/free_coherent with generic alloc/free methods.
>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> =A0arch/ia64/hp/common/sba_iommu.c =A0 =A0 | =A0 11 ++++++-----
> =A0arch/ia64/include/asm/dma-mapping.h | =A0 18 ++++++++++++------
> =A0arch/ia64/kernel/pci-swiotlb.c =A0 =A0 =A0| =A0 =A09 +++++----
> =A0arch/ia64/sn/pci/pci_dma.c =A0 =A0 =A0 =A0 =A0| =A0 =A09 +++++----
> =A04 files changed, 28 insertions(+), 19 deletions(-)
The series breaks bisection from part 2 (when the x86 part changes
lib/swiotlb.c)
until part 5 (when ia64 sees the changes to match). You could either merge=
part
5 into part 2 (to make a combined x86+ia64 piece) ... or try to pull
the libswiotlb
changes into their own piece (which would have some of the ia64 and x86 bit=
s).
Or at the very least minimize the breakage window by putting ia64
right after x86
in the patch sequence.
Otherwise seems OK
Acked-by: Tony Luck <tony.luck@intel.com>
^ permalink raw reply
* RE: [PATCH 05/14] IA64: adapt for dma_map_ops changes
From: Luck, Tony @ 2012-03-27 21:53 UTC (permalink / raw)
To: Luck, Tony, Marek Szyprowski
Cc: linux-mips@linux-mips.org, linux-ia64@vger.kernel.org,
linux-sh@vger.kernel.org, linux-mm@kvack.org,
sparclinux@vger.kernel.org, linux-arch@vger.kernel.org,
Stephen Rothwell, Jonathan Corbet, x86@kernel.org, Arnd Bergmann,
microblaze-uclinux@itee.uq.edu.au, linaro-mm-sig@lists.linaro.org,
Andrzej Pietrasiewicz, Thomas Gleixner,
linux-arm-kernel@lists.infradead.org, discuss@x86-64.org,
linux-kernel@vger.kernel.org, Kyungmin Park,
linux-alpha@vger.kernel.org, Andrew Morton,
linuxppc-dev@lists.ozlabs.org
In-Reply-To: <CA+8MBbLAafFbVwviFmkjD0DNz5RsCbB_TNLL67wEi2k-hyXkXA@mail.gmail.com>
> until part 5 (when ia64 sees the changes to match). You could either mer=
ge part
> 5 into part 2 (to make a combined x86+ia64 piece
Doh! I see that you already did this in the re-post you did a few hours
ago (which my mail client had filed away in my linux-arch folder).
-Tony
=20
^ permalink raw reply
* Re: [PATCH v2.1 01/10] cpu: Introduce clear_tasks_mm_cpumask() helper
From: Benjamin Herrenschmidt @ 2012-03-28 0:01 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Mike Frysinger, Peter Zijlstra, user-mode-linux-devel, linux-sh,
Richard Weinberger, linux-kernel, Russell King, linux-mm,
Anton Vorontsov, Paul Mundt, John Stultz, KOSAKI Motohiro,
uclinux-dist-devel, Andrew Morton, linuxppc-dev, linux-arm-kernel
In-Reply-To: <20120325174210.GA23605@redhat.com>
On Sun, 2012-03-25 at 19:42 +0200, Oleg Nesterov wrote:
> > Also, Per Peter Zijlstra's idea, now we don't grab tasklist_lock in
> > the new helper, instead we take the rcu read lock. We can do this
> > because the function is called after the cpu is taken down and
> marked
> > offline, so no new tasks will get this cpu set in their mm mask.
>
> And only powerpc needs rcu_read_lock() and task_lock().
>
> OTOH, I do not understand why powepc does this on CPU_DEAD...
> And probably CPU_UP_CANCELED doesn't need to clear mm_cpumask().
>
> That said, personally I think these patches are fine, the common
> helper makes sense.
Not strictly speaking a problem with this patch, but I was wondering...
Do we know for sure that the mmu context has been fully flushed out
before the unplug ? idle_task_exit() will do a context switch but in our
case that may not be enough.
Once the CPU is offline, tlb flushes won't hit it any more so it can get
out of sync (in some cases the offlining process is just some kind of
deep sleep loop that doesn't involve a TLB state loss).
Should we add a flush_tlb_mm of all those bits in that loop ? that would
be a tad expensive... we don't have a flush_tlb_all() as a generic kind
of accessors, but we could add something like that as a requirement for
ppc_md.cpu_die ?
Cheers,
Ben.
^ permalink raw reply
* [git pull] Please pull powerpc.git next branch
From: Benjamin Herrenschmidt @ 2012-03-28 3:31 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev list, Andrew Morton, Linux Kernel list
Hi Linus !
Here's a few more things for powerpc this time around:
- Anton's did some recent improvements to EPOW event reporting
on pSeries (power supply failures and such). The patches are self
contained enough and replace really nasty code so I felt it should
still go in
- I did the vio driver registration change Greg requested, I
don't see the point of leaving that til the next merge window
- The remaining EEH changes I said were still pending to get
rid of the EEH references from the generic struct device_node
- A few more iSeries removal bits
- A perf bug fix on 970
Cheers,
Ben.
The following changes since commit e22057c8599373e5caef0bc42bdb95d2a361ab0d:
Merge tag 'stable/for-linus-3.4-tag-two' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen (2012-03-24 12:20:25 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git next
for you to fetch changes up to 1ce447b90f3e71c81ae59e0062bc305ef267668b:
powerpc/perf: Fix instruction address sampling on 970 and Power4 (2012-03-28 11:33:24 +1100)
----------------------------------------------------------------
Anton Blanchard (6):
powerpc: Make function that parses RTAS error logs global
powerpc/pseries: Parse and handle EPOW interrupts
powerpc/pseries: Use rtas_get_sensor in RAS code
powerpc/pseries: Remove RTAS_POWERMGM_EVENTS
powerpc/pseries: Clean up ras_error_interrupt code
powerpc/pseries: Cut down on enthusiastic use of defines in RAS code
Benjamin Herrenschmidt (2):
powerpc+sparc/vio: Modernize driver registration
powerpc/perf: Fix instruction address sampling on 970 and Power4
Gavin Shan (3):
powerpc/eeh: Remove eeh device from OF node
powerpc/eeh: Remove eeh information from pci_dn
powerpc/eeh: Retrieve PHB from global list
Stephen Rothwell (2):
powerpc: Remove NO_IRQ_IGNORE
powerpc: Random little legacy iSeries removal tidy ups
arch/powerpc/boot/.gitignore | 1 -
arch/powerpc/include/asm/iommu.h | 1 -
arch/powerpc/include/asm/irq.h | 6 -
arch/powerpc/include/asm/machdep.h | 4 +-
arch/powerpc/include/asm/mmu-hash64.h | 12 --
arch/powerpc/include/asm/pci-bridge.h | 16 +-
arch/powerpc/include/asm/perf_event_server.h | 2 +
arch/powerpc/include/asm/rtas.h | 34 ++++-
arch/powerpc/include/asm/smp.h | 1 -
arch/powerpc/include/asm/udbg.h | 1 -
arch/powerpc/include/asm/vio.h | 10 +-
arch/powerpc/kernel/irq.c | 8 +-
arch/powerpc/kernel/prom_init.c | 2 +-
arch/powerpc/kernel/rtas.c | 34 +++++
arch/powerpc/kernel/udbg.c | 3 -
arch/powerpc/kernel/vdso.c | 4 +-
arch/powerpc/kernel/vio.c | 12 +-
arch/powerpc/perf/core-book3s.c | 46 +++++-
arch/powerpc/perf/power4-pmu.c | 1 +
arch/powerpc/perf/ppc970-pmu.c | 1 +
arch/powerpc/platforms/cell/beat_htab.c | 2 -
arch/powerpc/platforms/pseries/eeh.c | 19 +--
arch/powerpc/platforms/pseries/eeh_dev.c | 2 +-
arch/powerpc/platforms/pseries/io_event_irq.c | 68 +---------
arch/powerpc/platforms/pseries/iommu.c | 29 ++--
arch/powerpc/platforms/pseries/ras.c | 195 ++++++++++++++++---------
arch/sparc/include/asm/vio.h | 9 +-
arch/sparc/kernel/ds.c | 5 +-
arch/sparc/kernel/vio.c | 8 +-
drivers/block/sunvdc.c | 5 +-
drivers/net/ethernet/ibm/ibmveth.c | 7 +-
drivers/net/ethernet/sun/sunvnet.c | 5 +-
drivers/scsi/ibmvscsi/ibmvfc.c | 7 +-
drivers/scsi/ibmvscsi/ibmvscsi.c | 7 +-
drivers/scsi/ibmvscsi/ibmvstgt.c | 5 +-
drivers/tty/hvc/hvc_vio.c | 7 +-
drivers/tty/hvc/hvcs.c | 5 +-
include/linux/of.h | 10 --
38 files changed, 321 insertions(+), 273 deletions(-)
^ permalink raw reply
* Re: [PATCHv2 09/14] Unicore32: adapt for dma_map_ops changes
From: Guan Xuetao @ 2012-03-28 2:22 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-mips, Kevin Cernekee, linux-ia64, linux-sh, linux-mm,
sparclinux, linux-arch, Stephen Rothwell, Jonathan Corbet, x86,
Matt Turner, Dezhong Diao, Fenghua Yu, Arnd Bergmann,
microblaze-uclinux, linaro-mm-sig, Ivan Kokshaysky,
Andrzej Pietrasiewicz, Thomas Gleixner, linux-arm-kernel,
Richard Henderson, discuss, Michal Simek, Tony Luck, linux-kernel,
Richard Kuo, FUJITA Tomonori, Kyungmin Park, Paul Mundt,
linux-alpha, Andrew Morton, linuxppc-dev, David S. Miller
In-Reply-To: <1332855768-32583-10-git-send-email-m.szyprowski@samsung.com>
On 03/27/2012 09:42 PM, Marek Szyprowski wrote:
> diff --git a/arch/unicore32/mm/dma-swiotlb.c b/arch/unicore32/mm/dma-swiotlb.c
> index bfa9fbb..4cf5f0c 100644
> --- a/arch/unicore32/mm/dma-swiotlb.c
> +++ b/arch/unicore32/mm/dma-swiotlb.c
> @@ -17,9 +17,23 @@
>
> #include<asm/dma.h>
>
> +static void *unicore_swiotlb_alloc_coherent(struct device *dev, size_t size,
> + dma_addr_t *dma_handle, gfp_t flags,
> + struct dma_attrs *attrs)
> +{
> + return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
> +}
> +
> +static void unicode_swiotlb_free_coherent(struct device *dev, size_t size,
The bit is ok for me. Only a typo here, please change unicode to unicore.
Thanks and Regards.
Guan Xuetao
^ permalink raw reply
* Re: [PATCHv2 04/14] PowerPC: adapt for dma_map_ops changes
From: Benjamin Herrenschmidt @ 2012-03-28 3:56 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-mips, Kevin Cernekee, linux-ia64, linux-sh, linux-mm,
sparclinux, Guan Xuetao, linux-arch, Stephen Rothwell,
Jonathan Corbet, x86, Matt Turner, Dezhong Diao, Fenghua Yu,
Arnd Bergmann, microblaze-uclinux, linaro-mm-sig, Ivan Kokshaysky,
Andrzej Pietrasiewicz, Thomas Gleixner, linux-arm-kernel,
Richard Henderson, discuss, Michal Simek, Tony Luck, linux-kernel,
Richard Kuo, FUJITA Tomonori, Kyungmin Park, Paul Mundt,
linux-alpha, Andrew Morton, linuxppc-dev, David S. Miller
In-Reply-To: <1332855768-32583-5-git-send-email-m.szyprowski@samsung.com>
On Tue, 2012-03-27 at 15:42 +0200, Marek Szyprowski wrote:
> From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
>
> Adapt core PowerPC architecture code for dma_map_ops changes: replace
> alloc/free_coherent with generic alloc/free methods.
>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> [added missing changes to arch/powerpc/kernel/vio.c]
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
> ---
FYI. David and Arnd reviews are good enough for me ppc-side.
Cheers,
Ben.
^ permalink raw reply
* Re: [PATCHv2 07/14] SH: adapt for dma_map_ops changes
From: Paul Mundt @ 2012-03-28 4:15 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-mips, Kevin Cernekee, linux-ia64, linux-sh, linux-mm,
sparclinux, Guan Xuetao, linux-arch, Stephen Rothwell,
Jonathan Corbet, x86, Matt Turner, Dezhong Diao, Fenghua Yu,
Arnd Bergmann, microblaze-uclinux, linaro-mm-sig, Ivan Kokshaysky,
Andrzej Pietrasiewicz, Thomas Gleixner, linux-arm-kernel,
Richard Henderson, discuss, Michal Simek, Tony Luck, linux-kernel,
Richard Kuo, FUJITA Tomonori, Kyungmin Park, linux-alpha,
Andrew Morton, linuxppc-dev, David S. Miller
In-Reply-To: <1332855768-32583-8-git-send-email-m.szyprowski@samsung.com>
On Tue, Mar 27, 2012 at 03:42:41PM +0200, Marek Szyprowski wrote:
> From: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
>
> Adapt core SH architecture code for dma_map_ops changes: replace
> alloc/free_coherent with generic alloc/free methods.
>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Paul Mundt <lethal@linux-sh.org>
^ permalink raw reply
* Re: [PATCH] powerpc/85xx: don't call of_platform_bus_probe() twice
From: Grant Likely @ 2012-03-28 5:01 UTC (permalink / raw)
To: Timur Tabi; +Cc: Scott Wood, Dmitry Eremin-Solenikov, linuxppc-dev list
In-Reply-To: <4F720462.5020400@freescale.com>
On Tue, 27 Mar 2012 13:18:10 -0500, Timur Tabi <timur@freescale.com> wrote:
> Grant, do you have a moment to consider my question? Like I said, I'm
> anxious to get a fix into 3.3.
I've been out of town for the past week, so email processing volume
has been low. Answer below.
> Timur Tabi wrote:
> > Timur Tabi wrote:
> >> They only problem I see with this is that I am thinking about modifying
> >> the drivers/dma driver to probe on "fsl,eloplus-dma-channel" channels
> >> directly. If I do that, then who should call of_platform_populate()?
> >
> > Grant, could you tell me if there's anything actually work with my patch?
> > All I'm doing is adding a couple more commonly used entries to
> > mpc85xx_common_ids[]. After all, they're common IDs, so don't they belong
> > into an array called common_ids?
That's between you and Kumar. I don't have any problem with it since
it's all contained within the mpc85xx code.
If those nodes really do make sense to represent as independent
platform devices, then adding them to the match list for bus types
isn't a problem.
g.
^ permalink raw reply
* RE: [PATCHv2 09/14] Unicore32: adapt for dma_map_ops changes
From: Marek Szyprowski @ 2012-03-28 6:10 UTC (permalink / raw)
To: 'Guan Xuetao'
Cc: linux-mips, 'Kevin Cernekee', linux-ia64, linux-sh,
linux-mm, sparclinux, linux-arch, 'Stephen Rothwell',
'Jonathan Corbet', x86, 'Matt Turner',
'Dezhong Diao', 'Fenghua Yu',
'Arnd Bergmann', microblaze-uclinux, linaro-mm-sig,
'Ivan Kokshaysky', Andrzej Pietrasiewicz,
'Thomas Gleixner', linux-arm-kernel,
'Richard Henderson', discuss, 'Michal Simek',
'Tony Luck', linux-kernel, 'Richard Kuo',
'FUJITA Tomonori', 'Kyungmin Park',
'Paul Mundt', linux-alpha, 'Andrew Morton',
linuxppc-dev, 'David S. Miller'
In-Reply-To: <4F7275FE.8000100@mprc.pku.edu.cn>
Hello,
On Wednesday, March 28, 2012 4:23 AM Guan Xuetao wrote:
> On 03/27/2012 09:42 PM, Marek Szyprowski wrote:
> > diff --git a/arch/unicore32/mm/dma-swiotlb.c b/arch/unicore32/mm/dma-swiotlb.c
> > index bfa9fbb..4cf5f0c 100644
> > --- a/arch/unicore32/mm/dma-swiotlb.c
> > +++ b/arch/unicore32/mm/dma-swiotlb.c
> > @@ -17,9 +17,23 @@
> >
> > #include<asm/dma.h>
> >
> > +static void *unicore_swiotlb_alloc_coherent(struct device *dev, size_t size,
> > + dma_addr_t *dma_handle, gfp_t flags,
> > + struct dma_attrs *attrs)
> > +{
> > + return swiotlb_alloc_coherent(dev, size, dma_handle, flags);
> > +}
> > +
> > +static void unicode_swiotlb_free_coherent(struct device *dev, size_t size,
> The bit is ok for me. Only a typo here, please change unicode to unicore.
Ups, I'm sorry for that typo. I've fixed it on my git tree:
http://git.linaro.org/gitweb?p=people/mszyprowski/linux-dma-mapping.git;a=commitdiff;h=bbe43c05b0653
9c09f89e07bcaf61ea0fca8d67f
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply
* Re: [PATCH 10/10] oom: Make find_lock_task_mm() sparse-aware
From: David Rientjes @ 2012-03-28 7:20 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Mike Frysinger, user-mode-linux-devel, linux-sh, linuxppc-dev,
Oleg Nesterov, linux-kernel, linux-mm, Anton Vorontsov,
Paul Mundt, John Stultz, KOSAKI Motohiro, Richard Weinberger,
Russell King, Andrew Morton, uclinux-dist-devel, linux-arm-kernel
In-Reply-To: <1332593574.16159.31.camel@twins>
On Sat, 24 Mar 2012, Peter Zijlstra wrote:
> Yeah, so Nacked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
>
> Also, why didn't lockdep catch it?
>
> Fix sparse already instead of smearing ugly all over.
>
Fully agreed, please don't add this to the oom killer.
^ permalink raw reply
* Re: [PATCHv2 01/14] common: dma-mapping: introduce alloc_attrs and free_attrs methods
From: Sergei Shtylyov @ 2012-03-28 11:29 UTC (permalink / raw)
To: Marek Szyprowski
Cc: linux-mips, Kevin Cernekee, linux-ia64, linux-sh, linux-mm,
sparclinux, Guan Xuetao, linux-arch, Stephen Rothwell,
Jonathan Corbet, x86, Matt Turner, Dezhong Diao, Fenghua Yu,
Arnd Bergmann, microblaze-uclinux, linaro-mm-sig, Ivan Kokshaysky,
Andrzej Pietrasiewicz, Thomas Gleixner, linux-arm-kernel,
Richard Henderson, discuss, Michal Simek, Tony Luck, linux-kernel,
Richard Kuo, FUJITA Tomonori, Kyungmin Park, Paul Mundt,
linux-alpha, Andrew Morton, linuxppc-dev, David S. Miller
In-Reply-To: <1332855768-32583-2-git-send-email-m.szyprowski@samsung.com>
Hello.
On 27-03-2012 17:42, Marek Szyprowski wrote:
> Introduce new generic alloc and free methods with attributes argument.
The method names don't match the ones in the subject.
> Existing alloc_coherent and free_coherent can be implemented on top of the
> new calls with NULL attributes argument. Later also dma_alloc_non_coherent
> can be implemented using DMA_ATTR_NONCOHERENT attribute as well as
> dma_alloc_writecombine with separate DMA_ATTR_WRITECOMBINE attribute.
> This way the drivers will get more generic, platform independent way of
> allocating dma buffers with specific parameters.
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> Reviewed-by: David Gibson <david@gibson.dropbear.ud.au>
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
WBR, Sergei
^ permalink raw reply
* Re: [PATCH 4/4] powerpc/mpic: FSL MPIC error interrupt support.
From: Kumar Gala @ 2012-03-28 14:35 UTC (permalink / raw)
To: Scott Wood; +Cc: Varun Sethi, Linuxppc-dev
In-Reply-To: <4F720FE3.7080101@freescale.com>
On Mar 27, 2012, at 2:07 PM, Scott Wood wrote:
> On 03/27/2012 08:59 AM, Kumar Gala wrote:
>>=20
>> On Mar 27, 2012, at 7:17 AM, Varun Sethi wrote:
>>=20
>>> All SOC device error interrupts are muxed and delivered to the core =
as a single
>>> MPIC error interrupt. Currently all the device drivers requiring =
access to device
>>> errors have to register for the MPIC error interrupt as a shared =
interrupt.
>>>=20
>>> With this patch we add interrupt demuxing capability in the mpic =
driver, allowing
>>> device drivers to register for their individual error interrupts. =
This is achieved
>>> by handling error interrupts in a cascaded fashion.
>>>=20
>>> MPIC error interrupt is handled by the "error_int_handler", which =
subsequently demuxes
>>> it using the EISR and delivers it to the respective drivers.=20
>>>=20
>>> The error interrupt capability is dependent on the MPIC EIMR =
register, which was
>>> introduced in FSL MPIC version 4.1 (P4080 rev2). So, error interrupt =
demuxing capability
>>> is dependent on the MPIC version and can be used for versions >=3D =
4.1.
>>>=20
>>> Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com>
>>> ---
>>=20
>> This isn't quite right. Doing the 'request_irq' on behalf of the =
driver isn't treating the error interrupts as a real cascade, in =
addition to how you are hooking things up.
>=20
> Define "real cascade". If you mean the chained handler stuff that's =
how
> Varun initially did it and I asked him to change it, because it gets a
> lot trickier to get things right, and I didn't see what it was buying =
us.
>=20
> The request_irq() isn't on behalf of the individual drivers, it's
> requesting the cascade itself (not a shared interrupt).
I missed the bit related to err_int_config_done, need to re-look at it. =
Was thinking request_irq() was getting called for every error interrupt.
>> I think you need to add proper irq_domain_ops, etc. Thus when we map =
the virq the proper thing can happen
>=20
> What proper thing is not happening?
>=20
> Maybe it would be cleaner from an interrupt number management
> perspective to keep things more separate, but do you have a functional
> issue in mind?
>=20
>> I'd also suggest maybe thinking about pulling this code into an =
mpic_fsl.c
>>=20
>>> arch/powerpc/include/asm/mpic.h | 18 +++++
>>> arch/powerpc/sysdev/mpic.c | 155 =
++++++++++++++++++++++++++++++++++++++-
>>> 2 files changed, 171 insertions(+), 2 deletions(-)
>>>=20
>>> diff --git a/arch/powerpc/include/asm/mpic.h =
b/arch/powerpc/include/asm/mpic.h
>>> index 3929b4b..db51015 100644
>>> --- a/arch/powerpc/include/asm/mpic.h
>>> +++ b/arch/powerpc/include/asm/mpic.h
>>> @@ -114,12 +114,21 @@
>>> #define MPIC_FSL_BRR1 0x00000
>>> #define MPIC_FSL_BRR1_VER 0x0000ffff
>>>=20
>>> +/*
>>> + * Error interrupt registers
>>> + */
>>> +
>>> +#define MPIC_ERR_INT_BASE 0x3900
>>> +#define MPIC_ERR_INT_EISR 0x0000
>>> +#define MPIC_ERR_INT_EIMR 0x0010
>>> +
>>> #define MPIC_MAX_IRQ_SOURCES 2048
>>> #define MPIC_MAX_CPUS 32
>>> #define MPIC_MAX_ISU 32
>>>=20
>>> #define MPIC_MAX_TIMER 8
>>> #define MPIC_MAX_IPI 4
>>> +#define MPIC_MAX_ERR 32
>>=20
>> Should probably be 64
>=20
> This patch supports MPIC 4.1 and EISR0. When support is added for =
EISR1
> (didn't realize this was coming until your comment prompted me to
> check...), this should be updated, but this change alone would not =
make
> it work.
Would prefer we handle this now rather than later (T4240 is going to =
need EISR1 support).
>>> +static void mpic_mask_err(struct irq_data *d)
>>> +{
>>> + u32 eimr;
>>> + struct mpic *mpic =3D mpic_from_irq_data(d);
>>> + unsigned int src =3D virq_to_hw(d->irq) - mpic->err_int_vecs[0];
>>> + unsigned int err_reg_offset =3D MPIC_INFO(ERR_INT_EIMR);
>>> +
>>> + eimr =3D mpic_err_read(err_reg_offset);
>>> + eimr |=3D (0x80000000 >> src);
>>=20
>> This seems funny, add a comment about src # and bit # being opposite.
>=20
> People in PPC-land should be used to this craziness by now. :-P
:), as I said a comment would be helpful.
>> Maybe do:
>>=20
>> eimr |=3D (1 << (31 - src));
>=20
> I'm not sure it's really any clearer that way...
>=20
>>> +static irqreturn_t error_int_handler(int irq, void *data)
>>> +{
>>> + struct mpic *mpic =3D (struct mpic *) data;
>>> + unsigned int eisr_offset =3D MPIC_INFO(ERR_INT_EISR);
>>> + unsigned int eimr_offset =3D MPIC_INFO(ERR_INT_EIMR);
>>> + u32 eisr, eimr;
>>> + int errint;
>>> + unsigned int cascade_irq;
>>> +
>>> + eisr =3D mpic_err_read(eisr_offset);
>>> + eimr =3D mpic_err_read(eimr_offset);
>>> +
>>> + if (!(eisr & ~eimr))
>>> + return IRQ_NONE;
>>> +
>>> + while (eisr) {
>>> + errint =3D __ffs(eisr);
>>> + cascade_irq =3D irq_linear_revmap(mpic->irqhost,
>>> + mpic->err_int_vecs[31 - errint]);
>>=20
>> Should 31, be replaced w/MPIC_MAX_ERR - 1 ?
>=20
> No, the 31 here is due to the backwards bit numbering within the
> register. It'd be better to say "errint =3D 31 - __ffs(eisr)" -- or
> perhaps "errint =3D __builtin_clz(eisr)".
gotcha
- k=
^ permalink raw reply
* RE: [PATCHv2 01/14] common: dma-mapping: introduce alloc_attrs and free_attrs methods
From: Marek Szyprowski @ 2012-03-28 14:38 UTC (permalink / raw)
To: 'Sergei Shtylyov'
Cc: linux-mips, 'Kevin Cernekee', linux-ia64, linux-sh,
linux-mm, sparclinux, 'Guan Xuetao', linux-arch,
'Stephen Rothwell', 'Jonathan Corbet', x86,
'Matt Turner', 'Dezhong Diao',
'Fenghua Yu', 'Arnd Bergmann', microblaze-uclinux,
linaro-mm-sig, 'Ivan Kokshaysky', Andrzej Pietrasiewicz,
'Thomas Gleixner', linux-arm-kernel,
'Richard Henderson', discuss, 'Michal Simek',
'Tony Luck', linux-kernel, 'Richard Kuo',
'FUJITA Tomonori', 'Kyungmin Park',
'Paul Mundt', linux-alpha, 'Andrew Morton',
linuxppc-dev, 'David S. Miller'
In-Reply-To: <4F72F603.2000803@mvista.com>
Hi Sergei,
On Wednesday, March 28, 2012 1:29 PM Sergei Shtylyov wrote:
> On 27-03-2012 17:42, Marek Szyprowski wrote:
>
> > Introduce new generic alloc and free methods with attributes argument.
>
> The method names don't match the ones in the subject.
Right, I will reword the subject to "common: dma-mapping: introduce generic alloc()
and free() methods".
> > Existing alloc_coherent and free_coherent can be implemented on top of the
> > new calls with NULL attributes argument. Later also dma_alloc_non_coherent
> > can be implemented using DMA_ATTR_NONCOHERENT attribute as well as
> > dma_alloc_writecombine with separate DMA_ATTR_WRITECOMBINE attribute.
>
> > This way the drivers will get more generic, platform independent way of
> > allocating dma buffers with specific parameters.
>
> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
> > Reviewed-by: David Gibson <david@gibson.dropbear.ud.au>
> > Reviewed-by: Arnd Bergmann <arnd@arndb.de>
>
Best regards
--
Marek Szyprowski
Samsung Poland R&D Center
^ permalink raw reply
* Re: [PATCH 2/4] powerpc/mpic: Use the MPIC_LARGE_VECTORS flag for FSL MPIC.
From: Kumar Gala @ 2012-03-28 14:52 UTC (permalink / raw)
To: Scott Wood; +Cc: Varun Sethi, Linuxppc-dev, Stuart Yoder
In-Reply-To: <4F721209.5030706@freescale.com>
On Mar 27, 2012, at 2:16 PM, Scott Wood wrote:
> On 03/27/2012 01:44 PM, Scott Wood wrote:
>> On 03/27/2012 10:21 AM, Stuart Yoder wrote:
>>> On Tue, Mar 27, 2012 at 8:30 AM, Kumar Gala =
<galak@kernel.crashing.org> wrote:
>>>>=20
>>>> On Mar 27, 2012, at 7:15 AM, Varun Sethi wrote:
>>>>=20
>>>>> FSL MPIC supports 16 bit vectors so our vector number space isn't
>>>>> restricted to 256 vectors. We should use the MPIC_LARG_VECTORS =
flag
>>>>> while intializing the MPIC. This also prevents us from eating in =
to
>>>>> hardware vector number space (MSIs) while setting up internal =
sources.
>>>>=20
>>>> What is driving this change?
>>>=20
>>> Whats driving the change is proper handling of error interrupts. =
Right
>>> now error interrupts (muxed on int 16) are treated as a shared
>>> interrupt source. We want each to be handled as a individual =
interrupt
>>> source...thus the desire to support more than 256 interrupts.
>>=20
>> We don't actually need more than 256 interrupts for this (the =
individual
>> error interrupts are not counted against this). But unless we change
>> how vectors are allocated, we need vectors >=3D 256, since we have =
MSIs
>> close enough to 256 that under the current scheme the IPIs, timers, =
and
>> such collide with the third MSI bank.
>=20
> Note that this is the case today even without the error interrupt =
stuff
> -- the highest vector used by MSIs on MPIC 4.1 is 0xf7, and we have 13
> special vectors (4 IPIs, 8 timers, and spurious).
This all makes sense, what I ask is that the commit message be updated =
to convey this.
- k=
^ permalink raw reply
* Help initialize phy-less ethernet in 2.6.38
From: Fabio @ 2012-03-28 16:13 UTC (permalink / raw)
To: linuxppc-dev
Hi all,
I am a newbie trying to get the FCC1 ethernet interface to work on a
custom board.
The hardware used is based on mpc8270 which is connected via FCC1 to a
phy-less interface linked to another microcontroller.
FCC1 should be recognized as eth0 by the linux kernel and it should
receive data when set up in promiscuous mode.
Currently during the boot it seems that the device initialization goes
ok but I can't understand why I can't receive data when I put the
interface in promiscuous mode.
Going into details I can see that the fs_enet probe function gets called.
I customized it to setup the fs_platform_info structure using the
values taken from the old kernel driver for now.
The only fields I cannot setup are the bus_id,phy_irq,phy_addr because
they are not part of the fs_platform_info data structure anymore.
I can't see any errors during the initialization, but I can't receive
data on the interface.
I think the problem can be in an interrupt misconfiguration but I
haven't figured out how to configure the ethernet dts part in the
right way or how to handle the phy-less situation correctly.
--- dts snippet ---
eth0: ethernet@11300 {
device_type = "network";
compatible = "fsl,cpm2-fcc-enet";
reg = <0x11300 0x20 0x8400 0x100 0x11390 0x1>;
local-mac-address = [ 00 01 02 03 04 05 ];
interrupts = <32 8>;
interrupt-parent = <&PIC>;
linux,network-index = <0>;
fsl,cpm-command = <0x12000300>;
};
---
Thanks in advance,
--
Fabio Pozzi
^ permalink raw reply
* [patch 2/2] arch/powerpc/platforms/pseries/eeh_event.c: slightly fix set_current_state() wart
From: akpm @ 2012-03-28 22:20 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev, akpm, paulus
From: Andrew Morton <akpm@linux-foundation.org>
Subject: arch/powerpc/platforms/pseries/eeh_event.c: slightly fix set_current_state() wart
That set_current_state() won't work very well: the subsequent mutex_lock()
might flip the task back into TASK_RUNNING.
Attempt to put it somewhere where it might have been meant to be, and
attempt to describe why it might have been added.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/platforms/pseries/eeh_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/powerpc/platforms/pseries/eeh_event.c~arch-powerpc-platforms-pseries-eeh_eventc-slightly-fix-set_current_state-wart arch/powerpc/platforms/pseries/eeh_event.c
--- a/arch/powerpc/platforms/pseries/eeh_event.c~arch-powerpc-platforms-pseries-eeh_eventc-slightly-fix-set_current_state-wart
+++ a/arch/powerpc/platforms/pseries/eeh_event.c
@@ -60,7 +60,6 @@ static int eeh_event_handler(void * dumm
struct eeh_dev *edev;
set_task_comm(current, "eehd");
- set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&eeh_eventlist_lock, flags);
event = NULL;
@@ -83,6 +82,7 @@ static int eeh_event_handler(void * dumm
printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n",
eeh_pci_name(edev->pdev));
+ set_current_state(TASK_INTERRUPTIBLE); /* Don't add to load average */
edev = handle_eeh_events(event);
eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING);
_
^ permalink raw reply
* [patch 1/2] powerpc/eeh: remove eeh_event_handler()->daemonize()
From: akpm @ 2012-03-28 22:20 UTC (permalink / raw)
To: benh; +Cc: matt.fleming, oleg, linuxppc-dev, tj, akpm, linasvepstas
From: Oleg Nesterov <oleg@redhat.com>
Subject: powerpc/eeh: remove eeh_event_handler()->daemonize()
daemonize() is only needed when a user-space task does kernel_thread().
eeh_event_handler() thread is created by the worker kthread, and thus it
doesn't need the soon-to-be-deprecated daemonize().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Linas Vepstas <linasvepstas@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
arch/powerpc/platforms/pseries/eeh_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize arch/powerpc/platforms/pseries/eeh_event.c
--- a/arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize
+++ a/arch/powerpc/platforms/pseries/eeh_event.c
@@ -59,7 +59,7 @@ static int eeh_event_handler(void * dumm
struct eeh_event *event;
struct eeh_dev *edev;
- daemonize("eehd");
+ set_task_comm(current, "eehd");
set_current_state(TASK_INTERRUPTIBLE);
spin_lock_irqsave(&eeh_eventlist_lock, flags);
_
^ permalink raw reply
* Re: [patch 1/2] powerpc/eeh: remove eeh_event_handler()->daemonize()
From: Benjamin Herrenschmidt @ 2012-03-28 23:22 UTC (permalink / raw)
To: akpm; +Cc: tj, linuxppc-dev, linasvepstas, matt.fleming, oleg
In-Reply-To: <20120328222057.B749EA0363@akpm.mtv.corp.google.com>
On Wed, 2012-03-28 at 15:20 -0700, akpm@linux-foundation.org wrote:
> From: Oleg Nesterov <oleg@redhat.com>
> Subject: powerpc/eeh: remove eeh_event_handler()->daemonize()
>
> daemonize() is only needed when a user-space task does kernel_thread().
>
> eeh_event_handler() thread is created by the worker kthread, and thus it
> doesn't need the soon-to-be-deprecated daemonize().
For some reason I thought you were sending that directly to Linus, but
looking at your CC list that's obviously not the case :-) I'll send
them myself.
Cheers,
Ben.
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> Acked-by: Linas Vepstas <linasvepstas@gmail.com>
> Acked-by: Tejun Heo <tj@kernel.org>
> Acked-by: Matt Fleming <matt.fleming@intel.com>
> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
> arch/powerpc/platforms/pseries/eeh_event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff -puN arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize arch/powerpc/platforms/pseries/eeh_event.c
> --- a/arch/powerpc/platforms/pseries/eeh_event.c~powerpc-eeh-remove-eeh_event_handler-daemonize
> +++ a/arch/powerpc/platforms/pseries/eeh_event.c
> @@ -59,7 +59,7 @@ static int eeh_event_handler(void * dumm
> struct eeh_event *event;
> struct eeh_dev *edev;
>
> - daemonize("eehd");
> + set_task_comm(current, "eehd");
> set_current_state(TASK_INTERRUPTIBLE);
>
> spin_lock_irqsave(&eeh_eventlist_lock, flags);
> _
^ permalink raw reply
* bpf_slow_path: sibling call to `skb_copy_bits' not allowed multiple TOCs (ppc)
From: Paul Gortmaker @ 2012-03-29 0:54 UTC (permalink / raw)
To: netdev; +Cc: linuxppc-dev, linux-next
Hi all,
Wondering if anyone has researched this, before I waste more time on it.
The linux-next build of powerpc-allyesconfig has for quite some time shown this:
LD .tmp_vmlinux1
powerpc-linux-ld: arch/powerpc/net/built-in.o: In function `bpf_slow_path_word':
(.text+0x90): sibling call optimization to `skb_copy_bits' does not
allow automatic
multiple TOCs; recompile with -mminimal-toc or -fno-optimize-sibling-calls, or
make `skb_copy_bits' extern
We get the same error for s/word/half/ and s/word/byte/ and s/word/msh/
Visually "bisecting" the linux-next builds shows the following:
good: Dec 7th, 2011: http://kisskb.ellerman.id.au/kisskb/buildresult/5059024/
bad: Dec 8th, 2011: http://kisskb.ellerman.id.au/kisskb/buildresult/5062069/
I wouldn't be surprised if this was some kind of size thing that doesn't matter
in the real world, as the powerpc-allyesconfig is really only of value for build
coverage. Even in the absence of the skb error, it still fails to link with:
"powerpc-linux-ld: TOC section size exceeds 64k"
i.e. it never links into anything a person could actually try and boot anyway.
So, just knowing "yes that is bogus because you've got a giant kernel
with multiple TOC" would be useful information here.
Thanks,
Paul.
^ permalink raw reply
* Re: bpf_slow_path: sibling call to `skb_copy_bits' not allowed multiple TOCs (ppc)
From: Stephen Rothwell @ 2012-03-29 3:30 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: netdev, linux-next, linuxppc-dev
In-Reply-To: <CAP=VYLqwbjNDQ-TTbs_6cH4X2MMzy=MAFy4=R116zGL8a6qUag@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 814 bytes --]
Hi Paul,
On Wed, 28 Mar 2012 20:54:56 -0400 Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
>
> coverage. Even in the absence of the skb error, it still fails to link with:
>
> "powerpc-linux-ld: TOC section size exceeds 64k"
>
> i.e. it never links into anything a person could actually try and boot anyway.
>
> So, just knowing "yes that is bogus because you've got a giant kernel
> with multiple TOC" would be useful information here.
This last message has been known for a long time and would require us to
change the way we link the kernel to fix. I had a go at it a year or so
ago, but ran into binutils bugs :-(
The other message may be a result of the TOC section size problem, but I
am not sure.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Stephen Rothwell @ 2012-03-29 4:15 UTC (permalink / raw)
To: Linus
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <20120329135555.06593144b65bf81cc9191f8a@canb.auug.org.au>
[-- Attachment #1: Type: text/plain, Size: 2677 bytes --]
Hi all,
On Thu, 29 Mar 2012 13:55:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> On Thu, 29 Mar 2012 13:50:44 +1100 Michael Neuling <mikey@neuling.org> wrote:
> >
> > > Here are a bunch of patches to disintegrate asm/system.h into a set of separate
> > > bits to relieve the problem of circular inclusion dependencies.
> > >
> > > The following changes since commit 437538267b672f9320833907f1b5acbb2605f4be:
> > >
> > > Merge tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/linux-2.6 (2012-03-22 20:43:40 -0700)
> > >
> > > are available in the git repository at:
> > >
> > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_system.git split-asm-system_h
> >
> > It would have been nice to have this in linux-next for a day or two to
> > sort out the merge issues, hence....
>
> Um, what can I say but "yeah, it would have been nice" :-(
The following patch fixes (as much as possible) a powerpc allyesconfig build.
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Mar 2012 14:58:10 +1100
Subject: [PATCH] powerpc: fix fallout from system.h split up
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/fadump.c | 2 ++
arch/powerpc/kernel/kgdb.c | 1 +
kernel/irq/irqdomain.c | 3 +++
3 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index cfe7a38..18bdf74 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -40,6 +40,8 @@
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/fadump.h>
+#include <asm/debug.h>
+#include <asm/setup.h>
static struct fw_dump fw_dump;
static struct fadump_mem_struct fdm;
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 76a6e40..782bd0a 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -24,6 +24,7 @@
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/machdep.h>
+#include <asm/debug.h>
/*
* This table contains the mapping between PowerPC hardware trap types, and
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af48e59..1f94ddf 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -12,6 +12,9 @@
#include <linux/slab.h>
#include <linux/smp.h>
#include <linux/fs.h>
+#ifdef CONFIG_VIRQ_DEBUG
+#include <asm/debug.h>
+#endif
#define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
* ie. legacy 8259, gets irqs 1..15 */
--
1.7.9.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Michael Neuling @ 2012-03-29 4:21 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, arnd, ppc-dev, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, Linus
In-Reply-To: <20120329151544.ef2117821dfb459e8b52af48@canb.auug.org.au>
In message <20120329151544.ef2117821dfb459e8b52af48@canb.auug.org.au> you wrote
:
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq
> Content-Type: text/plain; charset=US-ASCII
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> Hi all,
>
> On Thu, 29 Mar 2012 13:55:55 +1100 Stephen Rothwell <sfr@canb.auug.org.au> =
> wrote:
> >
> > On Thu, 29 Mar 2012 13:50:44 +1100 Michael Neuling <mikey@neuling.org> wr=
> ote:
> > >
> > > > Here are a bunch of patches to disintegrate asm/system.h into a set o=
> f separate
> > > > bits to relieve the problem of circular inclusion dependencies.
> > > >=20
> > > > The following changes since commit 437538267b672f9320833907f1b5acbb26=
> 05f4be:
> > > >=20
> > > > Merge tag 'fbdev-updates-for-3.4' of git://github.com/schandinat/li=
> nux-2.6 (2012-03-22 20:43:40 -0700)
> > > >=20
> > > > are available in the git repository at:
> > > >=20
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-asm_sy=
> stem.git split-asm-system_h
> > >=20
> > > It would have been nice to have this in linux-next for a day or two to
> > > sort out the merge issues, hence....
> >=20
> > Um, what can I say but "yeah, it would have been nice" :-(
>
> The following patch fixes (as much as possible) a powerpc allyesconfig build.
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 29 Mar 2012 14:58:10 +1100
> Subject: [PATCH] powerpc: fix fallout from system.h split up
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Michael Neuling <mikey@neuling.org>
Thanks, this is much better than my crappy fix.
Mikey
> ---
> arch/powerpc/kernel/fadump.c | 2 ++
> arch/powerpc/kernel/kgdb.c | 1 +
> kernel/irq/irqdomain.c | 3 +++
> 3 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index cfe7a38..18bdf74 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -40,6 +40,8 @@
> #include <asm/prom.h>
> #include <asm/rtas.h>
> #include <asm/fadump.h>
> +#include <asm/debug.h>
> +#include <asm/setup.h>
> =20
> static struct fw_dump fw_dump;
> static struct fadump_mem_struct fdm;
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 76a6e40..782bd0a 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -24,6 +24,7 @@
> #include <asm/current.h>
> #include <asm/processor.h>
> #include <asm/machdep.h>
> +#include <asm/debug.h>
> =20
> /*
> * This table contains the mapping between PowerPC hardware trap types, and
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..1f94ddf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -12,6 +12,9 @@
> #include <linux/slab.h>
> #include <linux/smp.h>
> #include <linux/fs.h>
> +#ifdef CONFIG_VIRQ_DEBUG
> +#include <asm/debug.h>
> +#endif
> =20
> #define IRQ_DOMAIN_MAP_LEGACY 0 /* driver allocated fixed range of irqs.
> * ie. legacy 8259, gets irqs 1..15 */
> --=20
> 1.7.9.1
>
> --=20
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq
> Content-Type: application/pgp-signature
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iQIcBAEBCAAGBQJPc+HwAAoJEECxmPOUX5FET2oP/2slayQM3wN4DhXAE/v+JeBU
> bEmqlZE5DgrAK6Pu65YrlZlYVvfvOsivTwu/tfQ+FLlJHGiPHbVu7zKv/em+cRtz
> dTMQSuYolSyRzAyk+QBD4lUN+SZ8OFfs9XbVxhyTCBe+1qdUUdyul4ajrvo9vMiw
> +0eHw1WlozwGOdWcYy/9BdHXPVUiJGjWksmGmAQz0aTbTY5DVfKjiEsHIRS+lJ0f
> nsrKfWOk5z+4yT2AjteEYcPScxxO2F73VZEr/xBEn5R3siuEgZF6P1n96gTxe/3l
> jdKQG6R2QHfKBpx8kphL3qAom5ehese2YaYkufDn4u+/QXtrDoYE/F2a646I7dc3
> LN2SCiLLiaba11uW06cfdiwpkrlF05nHJR3CnEUt8dSQbS/vEjxlRHa9V3cl7Y9/
> c2rK6z3YQwZXL53LTO4YMv5yaYDathWPKwanGJSocWICq6gbtWl4XevoLRwmkRo1
> TuMAj1jy69mxFdiQQA5LO+JRkQN4POo2+vBUb+0RncNrR/tIpp5xB9np30bwIdNI
> +VS0I2IQD4VntQp+CF/O/y8SEfyqo/7BWPpZhneRy6LMKC9aOe1RpSgKDa4ZvWYh
> BW60vTDNnc5CNSjOtfOtW55m+JH/eY2/Hidy/Yt7PjLXGi+6KKy0eY7Kl6G0PuS1
> 3/KLLW8Vu3GxBLUWiXZv
> =1Nhy
> -----END PGP SIGNATURE-----
>
> --Signature=_Thu__29_Mar_2012_15_15_44_+1100_WbAuFOESkuBxVlHq--
>
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Linus Torvalds @ 2012-03-29 4:24 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <20120329151544.ef2117821dfb459e8b52af48@canb.auug.org.au>
On Wed, Mar 28, 2012 at 9:15 PM, Stephen Rothwell <sfr@canb.auug.org.au> wr=
ote:
>
> The following patch fixes (as much as possible) a powerpc allyesconfig bu=
ild.
Ugh:
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..1f94ddf 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -12,6 +12,9 @@
> =A0#include <linux/slab.h>
> =A0#include <linux/smp.h>
> =A0#include <linux/fs.h>
> +#ifdef CONFIG_VIRQ_DEBUG
> +#include <asm/debug.h>
> +#endif
Can we please move that abortion into arch/powerpc/? Instead of making
generic code even uglier..
Linus
^ permalink raw reply
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Stephen Rothwell @ 2012-03-29 4:42 UTC (permalink / raw)
To: Linus Torvalds
Cc: linux-arch, Michael Neuling, arnd, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, ppc-dev
In-Reply-To: <CA+55aFzn=bsH76hPDUgS-FBP=RVu51gwmRdqjkw5RJO=Q_cRfA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 6352 bytes --]
Hi Linus,
On Wed, 28 Mar 2012 21:24:41 -0700 Linus Torvalds <torvalds@linux-foundation.org> wrote:
>
> On Wed, Mar 28, 2012 at 9:15 PM, Stephen Rothwell <sfr@canb.auug.org.au> wrote:
> >
> > The following patch fixes (as much as possible) a powerpc allyesconfig build.
>
> Ugh:
>
> > diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> > index af48e59..1f94ddf 100644
> > --- a/kernel/irq/irqdomain.c
> > +++ b/kernel/irq/irqdomain.c
> > @@ -12,6 +12,9 @@
> > #include <linux/slab.h>
> > #include <linux/smp.h>
> > #include <linux/fs.h>
> > +#ifdef CONFIG_VIRQ_DEBUG
> > +#include <asm/debug.h>
> > +#endif
>
> Can we please move that abortion into arch/powerpc/? Instead of making
> generic code even uglier..
How about this (build tested on powerpc allyesconfig):
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 29 Mar 2012 14:58:10 +1100
Subject: [PATCH] powerpc: fix fallout from system.h split up
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/powerpc/kernel/fadump.c | 2 +
arch/powerpc/kernel/irq.c | 72 ++++++++++++++++++++++++++++++++++++++++++
arch/powerpc/kernel/kgdb.c | 1 +
kernel/irq/irqdomain.c | 72 ------------------------------------------
4 files changed, 75 insertions(+), 72 deletions(-)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index cfe7a38..18bdf74 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -40,6 +40,8 @@
#include <asm/prom.h>
#include <asm/rtas.h>
#include <asm/fadump.h>
+#include <asm/debug.h>
+#include <asm/setup.h>
static struct fw_dump fw_dump;
static struct fadump_mem_struct fdm;
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 243dbab..ff165f5 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -623,3 +623,75 @@ static int __init setup_noirqdistrib(char *str)
__setup("noirqdistrib", setup_noirqdistrib);
#endif /* CONFIG_PPC64 */
+
+#ifdef CONFIG_VIRQ_DEBUG
+static int virq_debug_show(struct seq_file *m, void *private)
+{
+ unsigned long flags;
+ struct irq_desc *desc;
+ const char *p;
+ static const char none[] = "none";
+ void *data;
+ int i;
+
+ seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
+ "chip name", "chip data", "domain name");
+
+ for (i = 1; i < nr_irqs; i++) {
+ desc = irq_to_desc(i);
+ if (!desc)
+ continue;
+
+ raw_spin_lock_irqsave(&desc->lock, flags);
+
+ if (desc->action && desc->action->handler) {
+ struct irq_chip *chip;
+
+ seq_printf(m, "%5d ", i);
+ seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
+
+ chip = irq_desc_get_chip(desc);
+ if (chip && chip->name)
+ p = chip->name;
+ else
+ p = none;
+ seq_printf(m, "%-15s ", p);
+
+ data = irq_desc_get_chip_data(desc);
+ seq_printf(m, "0x%16p ", data);
+
+ if (desc->irq_data.domain->of_node)
+ p = desc->irq_data.domain->of_node->full_name;
+ else
+ p = none;
+ seq_printf(m, "%s\n", p);
+ }
+
+ raw_spin_unlock_irqrestore(&desc->lock, flags);
+ }
+
+ return 0;
+}
+
+static int virq_debug_open(struct inode *inode, struct file *file)
+{
+ return single_open(file, virq_debug_show, inode->i_private);
+}
+
+static const struct file_operations virq_debug_fops = {
+ .open = virq_debug_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = single_release,
+};
+
+static int __init irq_debugfs_init(void)
+{
+ if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
+ NULL, &virq_debug_fops) == NULL)
+ return -ENOMEM;
+
+ return 0;
+}
+__initcall(irq_debugfs_init);
+#endif /* CONFIG_VIRQ_DEBUG */
diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
index 76a6e40..782bd0a 100644
--- a/arch/powerpc/kernel/kgdb.c
+++ b/arch/powerpc/kernel/kgdb.c
@@ -24,6 +24,7 @@
#include <asm/current.h>
#include <asm/processor.h>
#include <asm/machdep.h>
+#include <asm/debug.h>
/*
* This table contains the mapping between PowerPC hardware trap types, and
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
index af48e59..ae645ab 100644
--- a/kernel/irq/irqdomain.c
+++ b/kernel/irq/irqdomain.c
@@ -632,78 +632,6 @@ unsigned int irq_linear_revmap(struct irq_domain *domain,
return revmap[hwirq];
}
-#ifdef CONFIG_VIRQ_DEBUG
-static int virq_debug_show(struct seq_file *m, void *private)
-{
- unsigned long flags;
- struct irq_desc *desc;
- const char *p;
- static const char none[] = "none";
- void *data;
- int i;
-
- seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
- "chip name", "chip data", "domain name");
-
- for (i = 1; i < nr_irqs; i++) {
- desc = irq_to_desc(i);
- if (!desc)
- continue;
-
- raw_spin_lock_irqsave(&desc->lock, flags);
-
- if (desc->action && desc->action->handler) {
- struct irq_chip *chip;
-
- seq_printf(m, "%5d ", i);
- seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
-
- chip = irq_desc_get_chip(desc);
- if (chip && chip->name)
- p = chip->name;
- else
- p = none;
- seq_printf(m, "%-15s ", p);
-
- data = irq_desc_get_chip_data(desc);
- seq_printf(m, "0x%16p ", data);
-
- if (desc->irq_data.domain->of_node)
- p = desc->irq_data.domain->of_node->full_name;
- else
- p = none;
- seq_printf(m, "%s\n", p);
- }
-
- raw_spin_unlock_irqrestore(&desc->lock, flags);
- }
-
- return 0;
-}
-
-static int virq_debug_open(struct inode *inode, struct file *file)
-{
- return single_open(file, virq_debug_show, inode->i_private);
-}
-
-static const struct file_operations virq_debug_fops = {
- .open = virq_debug_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
-
-static int __init irq_debugfs_init(void)
-{
- if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
- NULL, &virq_debug_fops) == NULL)
- return -ENOMEM;
-
- return 0;
-}
-__initcall(irq_debugfs_init);
-#endif /* CONFIG_VIRQ_DEBUG */
-
int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t hwirq)
{
--
1.7.9.1
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply related
* Re: [GIT PULL] Disintegrate and kill asm/system.h
From: Michael Neuling @ 2012-03-29 4:55 UTC (permalink / raw)
To: Stephen Rothwell
Cc: linux-arch, arnd, ppc-dev, linux-kernel, David Howells,
paul.gortmaker, hpa, akpm, Linus Torvalds
In-Reply-To: <20120329154238.1ce219f7c998da45452af4b2@canb.auug.org.au>
> > Can we please move that abortion into arch/powerpc/? Instead of making
> > generic code even uglier..
>
> How about this (build tested on powerpc allyesconfig):
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 29 Mar 2012 14:58:10 +1100
> Subject: [PATCH] powerpc: fix fallout from system.h split up
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
FWIW.. this works for me too..
Acked-by: Michael Neuling <mikey@neuling.org>
Mikey
> ---
> arch/powerpc/kernel/fadump.c | 2 +
> arch/powerpc/kernel/irq.c | 72 ++++++++++++++++++++++++++++++++++++++=
> ++++
> arch/powerpc/kernel/kgdb.c | 1 +
> kernel/irq/irqdomain.c | 72 --------------------------------------=
> ----
> 4 files changed, 75 insertions(+), 72 deletions(-)
>
> diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
> index cfe7a38..18bdf74 100644
> --- a/arch/powerpc/kernel/fadump.c
> +++ b/arch/powerpc/kernel/fadump.c
> @@ -40,6 +40,8 @@
> #include <asm/prom.h>
> #include <asm/rtas.h>
> #include <asm/fadump.h>
> +#include <asm/debug.h>
> +#include <asm/setup.h>
> =20
> static struct fw_dump fw_dump;
> static struct fadump_mem_struct fdm;
> diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
> index 243dbab..ff165f5 100644
> --- a/arch/powerpc/kernel/irq.c
> +++ b/arch/powerpc/kernel/irq.c
> @@ -623,3 +623,75 @@ static int __init setup_noirqdistrib(char *str)
> =20
> __setup("noirqdistrib", setup_noirqdistrib);
> #endif /* CONFIG_PPC64 */
> +
> +#ifdef CONFIG_VIRQ_DEBUG
> +static int virq_debug_show(struct seq_file *m, void *private)
> +{
> + unsigned long flags;
> + struct irq_desc *desc;
> + const char *p;
> + static const char none[] =3D "none";
> + void *data;
> + int i;
> +
> + seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
> + "chip name", "chip data", "domain name");
> +
> + for (i =3D 1; i < nr_irqs; i++) {
> + desc =3D irq_to_desc(i);
> + if (!desc)
> + continue;
> +
> + raw_spin_lock_irqsave(&desc->lock, flags);
> +
> + if (desc->action && desc->action->handler) {
> + struct irq_chip *chip;
> +
> + seq_printf(m, "%5d ", i);
> + seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
> +
> + chip =3D irq_desc_get_chip(desc);
> + if (chip && chip->name)
> + p =3D chip->name;
> + else
> + p =3D none;
> + seq_printf(m, "%-15s ", p);
> +
> + data =3D irq_desc_get_chip_data(desc);
> + seq_printf(m, "0x%16p ", data);
> +
> + if (desc->irq_data.domain->of_node)
> + p =3D desc->irq_data.domain->of_node->full_name
;
> + else
> + p =3D none;
> + seq_printf(m, "%s\n", p);
> + }
> +
> + raw_spin_unlock_irqrestore(&desc->lock, flags);
> + }
> +
> + return 0;
> +}
> +
> +static int virq_debug_open(struct inode *inode, struct file *file)
> +{
> + return single_open(file, virq_debug_show, inode->i_private);
> +}
> +
> +static const struct file_operations virq_debug_fops =3D {
> + .open =3D virq_debug_open,
> + .read =3D seq_read,
> + .llseek =3D seq_lseek,
> + .release =3D single_release,
> +};
> +
> +static int __init irq_debugfs_init(void)
> +{
> + if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
> + NULL, &virq_debug_fops) =3D=3D NULL)
> + return -ENOMEM;
> +
> + return 0;
> +}
> +__initcall(irq_debugfs_init);
> +#endif /* CONFIG_VIRQ_DEBUG */
> diff --git a/arch/powerpc/kernel/kgdb.c b/arch/powerpc/kernel/kgdb.c
> index 76a6e40..782bd0a 100644
> --- a/arch/powerpc/kernel/kgdb.c
> +++ b/arch/powerpc/kernel/kgdb.c
> @@ -24,6 +24,7 @@
> #include <asm/current.h>
> #include <asm/processor.h>
> #include <asm/machdep.h>
> +#include <asm/debug.h>
> =20
> /*
> * This table contains the mapping between PowerPC hardware trap types, and
> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
> index af48e59..ae645ab 100644
> --- a/kernel/irq/irqdomain.c
> +++ b/kernel/irq/irqdomain.c
> @@ -632,78 +632,6 @@ unsigned int irq_linear_revmap(struct irq_domain *doma=
> in,
> return revmap[hwirq];
> }
> =20
> -#ifdef CONFIG_VIRQ_DEBUG
> -static int virq_debug_show(struct seq_file *m, void *private)
> -{
> - unsigned long flags;
> - struct irq_desc *desc;
> - const char *p;
> - static const char none[] =3D "none";
> - void *data;
> - int i;
> -
> - seq_printf(m, "%-5s %-7s %-15s %-18s %s\n", "virq", "hwirq",
> - "chip name", "chip data", "domain name");
> -
> - for (i =3D 1; i < nr_irqs; i++) {
> - desc =3D irq_to_desc(i);
> - if (!desc)
> - continue;
> -
> - raw_spin_lock_irqsave(&desc->lock, flags);
> -
> - if (desc->action && desc->action->handler) {
> - struct irq_chip *chip;
> -
> - seq_printf(m, "%5d ", i);
> - seq_printf(m, "0x%05lx ", desc->irq_data.hwirq);
> -
> - chip =3D irq_desc_get_chip(desc);
> - if (chip && chip->name)
> - p =3D chip->name;
> - else
> - p =3D none;
> - seq_printf(m, "%-15s ", p);
> -
> - data =3D irq_desc_get_chip_data(desc);
> - seq_printf(m, "0x%16p ", data);
> -
> - if (desc->irq_data.domain->of_node)
> - p =3D desc->irq_data.domain->of_node->full_name
;
> - else
> - p =3D none;
> - seq_printf(m, "%s\n", p);
> - }
> -
> - raw_spin_unlock_irqrestore(&desc->lock, flags);
> - }
> -
> - return 0;
> -}
> -
> -static int virq_debug_open(struct inode *inode, struct file *file)
> -{
> - return single_open(file, virq_debug_show, inode->i_private);
> -}
> -
> -static const struct file_operations virq_debug_fops =3D {
> - .open =3D virq_debug_open,
> - .read =3D seq_read,
> - .llseek =3D seq_lseek,
> - .release =3D single_release,
> -};
> -
> -static int __init irq_debugfs_init(void)
> -{
> - if (debugfs_create_file("virq_mapping", S_IRUGO, powerpc_debugfs_root,
> - NULL, &virq_debug_fops) =3D=3D NULL)
> - return -ENOMEM;
> -
> - return 0;
> -}
> -__initcall(irq_debugfs_init);
> -#endif /* CONFIG_VIRQ_DEBUG */
> -
> int irq_domain_simple_map(struct irq_domain *d, unsigned int irq,
> irq_hw_number_t hwirq)
> {
> --=20
> 1.7.9.1
>
>
> --=20
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
> http://www.canb.auug.org.au/~sfr/
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox