Re: [PATCH 3/3] irqchip: mips-gic: Use __raw_{readl,writel} for GIC registers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 28, 2014 at 2:39 PM, Andrew Bresticker
<abrestic@xxxxxxxxxxxx> wrote:
>> I just ran into a related problem on bcm3384, a big-endian platform on
>> which readl/writel perform extra endian swaps (CONFIG_SWAP_IO_SPACE).
>> My solution was twofold:
>>
>>  - Change the irq_reg_{readl,writel} macros so that they can be
>> configured to use the __raw_ variants on individual platforms
>>
>>  - Use irq_reg_{readl,writel} instead of directly invoking
>> __raw_{readl,writel} in our irqchip driver, so that the irqchip driver
>> code always uses the same I/O accessors as the helper functions we're
>> using from kernel/irq/generic-chip.c
>
> You could also specify your own irq_reg_{readl,writel} in your
> platform's irq.h.  Though since it seems like this is pretty common on
> MIPS platforms, maybe it makes more sense to have a Kconfig option.
> I've added the irqchip maintainers to see what they think.

I thought about just adding it to my own <irq.h>, but it looks like
several other platforms also use the __raw_ variants:

$ git grep -l __raw_ drivers/irqchip/
drivers/irqchip/exynos-combiner.c
drivers/irqchip/irq-brcmstb-l2.c
drivers/irqchip/irq-mxs.c
drivers/irqchip/irq-s3c24xx.c

Aside from irq-brcmstb-l2, these don't currently reference any of the
irq_gc_* functions.  But if they wanted to do so in the future (e.g.
because newer helper functions are introduced) they would need
generic-chip.c to use the __raw_  accessors.  So having the Kconfig
option would simplify things.





[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux