* Patch "hw_breakpoints, powerpc: Fix CONFIG_HAVE_HW_BREAKPOINT off-case in ptrace_set_debugreg()" has been added to the 2.6.38-stable tree
From: gregkh @ 2011-05-10 0:10 UTC (permalink / raw)
To: fweisbec, gregkh, linuxppc-dev, mingo, prasad; +Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
hw_breakpoints, powerpc: Fix CONFIG_HAVE_HW_BREAKPOINT off-case in ptrace_set_debugreg()
to the 2.6.38-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
hw_breakpoints-powerpc-fix-config_have_hw_breakpoint-off-case-in-ptrace_set_debugreg.patch
and it can be found in the queue-2.6.38 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@kernel.org> know about it.
>From 925f83c085e1bb08435556c5b4844a60de002e31 Mon Sep 17 00:00:00 2001
From: Frederic Weisbecker <fweisbec@gmail.com>
Date: Fri, 6 May 2011 01:53:18 +0200
Subject: hw_breakpoints, powerpc: Fix CONFIG_HAVE_HW_BREAKPOINT off-case in ptrace_set_debugreg()
From: Frederic Weisbecker <fweisbec@gmail.com>
commit 925f83c085e1bb08435556c5b4844a60de002e31 upstream.
We make use of ptrace_get_breakpoints() / ptrace_put_breakpoints() to
protect ptrace_set_debugreg() even if CONFIG_HAVE_HW_BREAKPOINT if off.
However in this case, these APIs are not implemented.
To fix this, push the protection down inside the relevant ifdef.
Best would be to export the code inside
CONFIG_HAVE_HW_BREAKPOINT into a standalone function to cleanup
the ifdefury there and call the breakpoint ref API inside. But
as it is more invasive, this should be rather made in an -rc1.
Fixes this build error:
arch/powerpc/kernel/ptrace.c:1594: error: implicit declaration of function 'ptrace_get_breakpoints' make[2]: ***
Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: LPPC <linuxppc-dev@lists.ozlabs.org>
Cc: Prasad <prasad@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/1304639598-4707-1-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/powerpc/kernel/ptrace.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -924,12 +924,16 @@ int ptrace_set_debugreg(struct task_stru
if (data && !(data & DABR_TRANSLATION))
return -EIO;
#ifdef CONFIG_HAVE_HW_BREAKPOINT
+ if (ptrace_get_breakpoints(task) < 0)
+ return -ESRCH;
+
bp = thread->ptrace_bps[0];
if ((!data) || !(data & (DABR_DATA_WRITE | DABR_DATA_READ))) {
if (bp) {
unregister_hw_breakpoint(bp);
thread->ptrace_bps[0] = NULL;
}
+ ptrace_put_breakpoints(task);
return 0;
}
if (bp) {
@@ -939,9 +943,12 @@ int ptrace_set_debugreg(struct task_stru
(DABR_DATA_WRITE | DABR_DATA_READ),
&attr.bp_type);
ret = modify_user_hw_breakpoint(bp, &attr);
- if (ret)
+ if (ret) {
+ ptrace_put_breakpoints(task);
return ret;
+ }
thread->ptrace_bps[0] = bp;
+ ptrace_put_breakpoints(task);
thread->dabr = data;
return 0;
}
@@ -956,9 +963,12 @@ int ptrace_set_debugreg(struct task_stru
ptrace_triggered, task);
if (IS_ERR(bp)) {
thread->ptrace_bps[0] = NULL;
+ ptrace_put_breakpoints(task);
return PTR_ERR(bp);
}
+ ptrace_put_breakpoints(task);
+
#endif /* CONFIG_HAVE_HW_BREAKPOINT */
/* Move contents to the DABR register */
Patches currently in stable-queue which might be from fweisbec@gmail.com are
queue-2.6.38/ptrace-prepare-to-fix-racy-accesses-on-task-breakpoints.patch
queue-2.6.38/hw_breakpoints-powerpc-fix-config_have_hw_breakpoint-off-case-in-ptrace_set_debugreg.patch
queue-2.6.38/x86-hw_breakpoints-fix-racy-access-to-ptrace-breakpoints.patch
^ permalink raw reply
* Re: [stable] Patch Upstream: hw_breakpoints, powerpc: Fix CONFIG_HAVE_HW_BREAKPOINT off-case in ptrace_set_debugreg()
From: Greg KH @ 2011-05-09 23:33 UTC (permalink / raw)
To: Ingo Molnar, Frederic Weisbecker, LPPC, Prasad; +Cc: stable
In-Reply-To: <201105072120.p47LK2IJ016755@hera.kernel.org>
On Sat, May 07, 2011 at 09:20:02PM +0000, James Bottomley wrote:
> commit: 925f83c085e1bb08435556c5b4844a60de002e31
> From: Frederic Weisbecker <fweisbec@gmail.com>
> Date: Fri, 6 May 2011 01:53:18 +0200
> Subject: [PATCH] hw_breakpoints, powerpc: Fix CONFIG_HAVE_HW_BREAKPOINT
> off-case in ptrace_set_debugreg()
>
> We make use of ptrace_get_breakpoints() / ptrace_put_breakpoints() to
> protect ptrace_set_debugreg() even if CONFIG_HAVE_HW_BREAKPOINT if off.
> However in this case, these APIs are not implemented.
>
> To fix this, push the protection down inside the relevant ifdef.
> Best would be to export the code inside
> CONFIG_HAVE_HW_BREAKPOINT into a standalone function to cleanup
> the ifdefury there and call the breakpoint ref API inside. But
> as it is more invasive, this should be rather made in an -rc1.
>
> Fixes this build error:
>
> arch/powerpc/kernel/ptrace.c:1594: error: implicit declaration of function 'ptrace_get_breakpoints' make[2]: ***
>
> Reported-by: Ingo Molnar <mingo@elte.hu>
> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: LPPC <linuxppc-dev@lists.ozlabs.org>
> Cc: Prasad <prasad@linux.vnet.ibm.com>
> Cc: v2.6.33.. <stable@kernel.org>
This patch applied after I tweaked it to the .38-stable tree, but it
doesn't apply at all to 2.6.33-stable. If someone wants to see it
there, please send a backported patch to stable@kernel.org.
^ permalink raw reply
* [PATCH] pseries/iommu: restore iommu table pointer when restoring iommu ops
From: Nishanth Aravamudan @ 2011-05-09 22:58 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: linuxppc-dev, Paul Mackerras, Anton Blanchard, Milton Miller
When we swtich to direct dma ops, we set the dma data union to have the
dma offset. When we switch back to iommu table ops because of a later
dma_set_mask, we need to restore the iommu table pointer. Without this
change, crashes have been observed on kexec where (for reasons still
being investigated) we fall back to a 32-bit dma mask on a particular
device and then panic because the table pointer is not valid.
The easiset way to find this value is to call
pci_dma_dev_setup_pSeriesLP which will search up the pci tree until it
finds the node with the table.
Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Cc: Milton Miller <miltonm@bga.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/platforms/pseries/iommu.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index f66c6b6..a3ee4e7 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -1036,10 +1036,10 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask)
if (!dev->dma_mask || !dma_supported(dev, dma_mask))
return -EIO;
+ pdev = to_pci_dev(dev);
+
/* only attempt to use a new window if 64-bit DMA is requested */
if (!disable_ddw && dma_mask == DMA_BIT_MASK(64)) {
- pdev = to_pci_dev(dev);
-
dn = pci_device_to_OF_node(pdev);
dev_dbg(dev, "node is %s\n", dn->full_name);
@@ -1070,6 +1070,7 @@ static int dma_set_mask_pSeriesLP(struct device *dev, u64 dma_mask)
if (!ddw_enabled) {
dev_info(dev, "Using 32-bit DMA via iommu\n");
set_dma_ops(dev, &dma_iommu_ops);
+ pci_dma_dev_setup_pSeriesLP(pdev);
}
*dev->dma_mask = dma_mask;
--
1.7.4.1
^ permalink raw reply related
* Re: [BUG] rebuild_sched_domains considered dangerous
From: Jesse Larrew @ 2011-05-09 21:26 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Peter Zijlstra, Martin Schwidefsky, linuxppc-dev,
linux-kernel@vger.kernel.org
In-Reply-To: <1303336869.2513.26.camel@pasglop>
[-- Attachment #1: Type: text/plain, Size: 1603 bytes --]
On 04/20/2011 05:01 PM, Benjamin Herrenschmidt wrote:
> On Wed, 2011-04-20 at 12:07 +0200, Peter Zijlstra wrote:
>> On Thu, 2011-03-10 at 15:10 +0100, Peter Zijlstra wrote:
>>>
>>> Also, still waiting to hear from the Power7 folks on how often
>>> they think to rebuild the topology and how they think that makes
>>> sense, afaict Power7 does have actual NUMA nodes unlike s390, so
>>> I'm still not seeing how that's going to work properly at all.
>>
>> Jesse care to answer? I hear from Ben you're responsible for that
>> mess.
>
> "responsible for this mess" is a big word :-)
>
> But he's the one to last play with that code ... Jesse ?
>
Hi Peter!
According the the Power firmware folks, updating the home node of a virtual cpu happens rather infrequently. The VPHN code currently checks for topology updates every 60 seconds, but we can poll less frequently if it helps. I chose 60 second intervals simply because that's how often they check the topology on s390. ;-)
As for updating the memory topology, there are cases where changing the home node of a virtual cpu doesn't affect the memory topology. If it does, there is a separate notification system for memory topology updates that is independent from the cpu updates. I plan to start working on a patch set to enable memory topology updates in the kernel in the coming weeks, but I wanted to get the cpu patches out on the list so we could start having these debates. :)
Sincerely,
Jesse Larrew
Software Engineer, Linux on Power Kernel Team
IBM Linux Technology Center
Phone: (512) 973-2052 (T/L: 363-2052)
jlarrew@linux.vnet.ibm.com
[-- Attachment #2: Type: text/html, Size: 2409 bytes --]
^ permalink raw reply
* [PATCH] powerpc/e5500: set non-base IVORs
From: Scott Wood @ 2011-05-09 21:26 UTC (permalink / raw)
To: galak; +Cc: linuxppc-dev
Without this, we attempt to use doorbells for IPIs, and end up
branching to some bad address. Plus, even for the exceptions
we don't implement, it's good to handle it and get a message out.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
arch/powerpc/include/asm/reg_booke.h | 4 ++
arch/powerpc/kernel/cpu_setup_fsl_booke.S | 3 ++
arch/powerpc/kernel/exceptions-64e.S | 47 +++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/arch/powerpc/include/asm/reg_booke.h b/arch/powerpc/include/asm/reg_booke.h
index 817bd1a..0f0ad9f 100644
--- a/arch/powerpc/include/asm/reg_booke.h
+++ b/arch/powerpc/include/asm/reg_booke.h
@@ -83,6 +83,10 @@
#define SPRN_IVOR13 0x19D /* Interrupt Vector Offset Register 13 */
#define SPRN_IVOR14 0x19E /* Interrupt Vector Offset Register 14 */
#define SPRN_IVOR15 0x19F /* Interrupt Vector Offset Register 15 */
+#define SPRN_IVOR38 0x1B0 /* Interrupt Vector Offset Register 38 */
+#define SPRN_IVOR39 0x1B1 /* Interrupt Vector Offset Register 39 */
+#define SPRN_IVOR40 0x1B2 /* Interrupt Vector Offset Register 40 */
+#define SPRN_IVOR41 0x1B3 /* Interrupt Vector Offset Register 41 */
#define SPRN_SPEFSCR 0x200 /* SPE & Embedded FP Status & Control */
#define SPRN_BBEAR 0x201 /* Branch Buffer Entry Address Register */
#define SPRN_BBTAR 0x202 /* Branch Buffer Target Address Register */
diff --git a/arch/powerpc/kernel/cpu_setup_fsl_booke.S b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
index 9136111..8053db0 100644
--- a/arch/powerpc/kernel/cpu_setup_fsl_booke.S
+++ b/arch/powerpc/kernel/cpu_setup_fsl_booke.S
@@ -88,6 +88,9 @@ _GLOBAL(__setup_cpu_e5500)
bl __e500_dcache_setup
#ifdef CONFIG_PPC_BOOK3E_64
bl .__setup_base_ivors
+ bl .setup_perfmon_ivor
+ bl .setup_doorbell_ivors
+ bl .setup_ehv_ivors
#else
bl __setup_e500mc_ivors
#endif
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index 4d0abb4..69de473 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -272,8 +272,13 @@ interrupt_base_book3e: /* fake trap */
EXCEPTION_STUB(0x1a0, watchdog) /* 0x09f0 */
EXCEPTION_STUB(0x1c0, data_tlb_miss)
EXCEPTION_STUB(0x1e0, instruction_tlb_miss)
+ EXCEPTION_STUB(0x260, perfmon)
EXCEPTION_STUB(0x280, doorbell)
EXCEPTION_STUB(0x2a0, doorbell_crit)
+ EXCEPTION_STUB(0x2c0, guest_doorbell)
+ EXCEPTION_STUB(0x2e0, guest_doorbell_crit)
+ EXCEPTION_STUB(0x300, hypercall)
+ EXCEPTION_STUB(0x320, ehpriv)
.globl interrupt_end_book3e
interrupt_end_book3e:
@@ -455,6 +460,8 @@ interrupt_end_book3e:
kernel_dbg_exc:
b . /* NYI */
+ MASKABLE_EXCEPTION(0x260, perfmon, .performance_monitor_exception, ACK_NONE)
+
/* Doorbell interrupt */
MASKABLE_EXCEPTION(0x2070, doorbell, .doorbell_exception, ACK_NONE)
@@ -469,6 +476,11 @@ kernel_dbg_exc:
// b ret_from_crit_except
b .
+ MASKABLE_EXCEPTION(0x2c0, guest_doorbell, .unknown_exception, ACK_NONE)
+ MASKABLE_EXCEPTION(0x2e0, guest_doorbell_crit, .unknown_exception, ACK_NONE)
+ MASKABLE_EXCEPTION(0x310, hypercall, .unknown_exception, ACK_NONE)
+ MASKABLE_EXCEPTION(0x320, ehpriv, .unknown_exception, ACK_NONE)
+
/*
* An interrupt came in while soft-disabled; clear EE in SRR1,
@@ -588,7 +600,12 @@ fast_exception_return:
BAD_STACK_TRAMPOLINE(0x000)
BAD_STACK_TRAMPOLINE(0x100)
BAD_STACK_TRAMPOLINE(0x200)
+BAD_STACK_TRAMPOLINE(0x260)
+BAD_STACK_TRAMPOLINE(0x2c0)
+BAD_STACK_TRAMPOLINE(0x2e0)
BAD_STACK_TRAMPOLINE(0x300)
+BAD_STACK_TRAMPOLINE(0x310)
+BAD_STACK_TRAMPOLINE(0x320)
BAD_STACK_TRAMPOLINE(0x400)
BAD_STACK_TRAMPOLINE(0x500)
BAD_STACK_TRAMPOLINE(0x600)
@@ -1124,3 +1141,33 @@ _GLOBAL(__setup_base_ivors)
sync
blr
+
+_GLOBAL(setup_perfmon_ivor)
+ SET_IVOR(35, 0x260) /* Performance Monitor */
+ blr
+
+_GLOBAL(setup_doorbell_ivors)
+ SET_IVOR(36, 0x280) /* Processor Doorbell */
+ SET_IVOR(37, 0x2a0) /* Processor Doorbell Crit */
+
+ /* Check MMUCFG[LPIDSIZE] to determine if we have category E.HV */
+ mfspr r10,SPRN_MMUCFG
+ rlwinm. r10,r10,0,MMUCFG_LPIDSIZE
+ beqlr
+
+ SET_IVOR(38, 0x2c0) /* Guest Processor Doorbell */
+ SET_IVOR(39, 0x2e0) /* Guest Processor Doorbell Crit/MC */
+ blr
+
+_GLOBAL(setup_ehv_ivors)
+ /*
+ * We may be running as a guest and lack E.HV even on a chip
+ * that normally has it.
+ */
+ mfspr r10,SPRN_MMUCFG
+ rlwinm. r10,r10,0,MMUCFG_LPIDSIZE
+ beqlr
+
+ SET_IVOR(40, 0x300) /* Embedded Hypervisor System Call */
+ SET_IVOR(41, 0x320) /* Embedded Hypervisor Privilege */
+ blr
--
1.7.4.1
^ permalink raw reply related
* Re: Regarding P2020 in AMP mode
From: Hollis Blanchard @ 2011-05-09 20:22 UTC (permalink / raw)
To: Prasanna Khanapur; +Cc: linuxppc-dev
In-Reply-To: <BANLkTik7tZSJ9-OPDbQEPJDHpZ13wMmo_Q@mail.gmail.com>
On 05/07/2011 05:20 AM, Prasanna Khanapur wrote:
> Hi,
> I'm running P2020 in AMP mode, each core running its linux os.
> Ethernet 1(@25000) and Ethernet 2(@26000) assigned to Core0 are working
> fine.
> I'm facing problems with Ethernet interface(@24000) assigned to Core1,
> its not working.
>
> I'm using dts file which were added by :
> http://lists.ozlabs.org/pipermail/linuxppc-dev/2009-September/075594.html
>
> Looks either there is some mistake in the dts file or my understanding
> is wrong.
>
> MDIO @24000 is defined in core0 dts file though the Ethernet is assigned
> to Core 1.
>
> DTS files :
> http://web.mornfall.net/repos/linux-2.6/git/arch/powerpc/boot/dts/p2020rdb_camp_core0.dts
> http://web.mornfall.net/repos/linux-2.6/git/arch/powerpc/boot/dts/p2020rdb_camp_core1.dts
The fixed-link property in core1.dts indicates enet0 should use 1Gb
link. Is that device connected to a 1Gb network?
--
Hollis Blanchard
Mentor Graphics, Embedded Systems Division
^ permalink raw reply
* [PATCH] powerpc/86xx: don't pretend that we support 8-bit pixels on the MPC8610 HPCD
From: Timur Tabi @ 2011-05-09 19:29 UTC (permalink / raw)
To: kumar.gala, linuxppc-dev
If the video mode is set to 16-, 24-, or 32-bit pixels, then the pixel data
contains actual levels of red, blue, and green. However, if the video mode is
set to 8-bit pixels, then the 8-bit value represents an index into color table.
This is called "palette mode" on the Freescale DIU video controller.
The DIU driver does not currently support palette mode, but the MPC8610 HPCD
board file returned a non-zero (although incorrect) pixel format value for
8-bit mode.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 97 ++++++++++++++++++----------
1 files changed, 64 insertions(+), 33 deletions(-)
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 018cc67..2b24452 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -105,45 +105,77 @@ machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices);
#if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE)
-static u32 get_busfreq(void)
-{
- struct device_node *node;
-
- u32 fs_busfreq = 0;
- node = of_find_node_by_type(NULL, "cpu");
- if (node) {
- unsigned int size;
- const unsigned int *prop =
- of_get_property(node, "bus-frequency", &size);
- if (prop)
- fs_busfreq = *prop;
- of_node_put(node);
- };
- return fs_busfreq;
-}
+/*
+ * DIU Area Descriptor
+ *
+ * The MPC8610 reference manual shows the bits of the AD register in
+ * little-endian order, which causes the BLUE_C field to be split into two
+ * parts. To simplify the definition of the MAKE_AD() macro, we define the
+ * fields in big-endian order and byte-swap the result.
+ *
+ * So even though the registers don't look like they're in the
+ * same bit positions as they are on the P1022, the same value is written to
+ * the AD register on the MPC8610 and on the P1022.
+ */
+#define AD_BYTE_F 0x10000000
+#define AD_ALPHA_C_MASK 0x0E000000
+#define AD_ALPHA_C_SHIFT 25
+#define AD_BLUE_C_MASK 0x01800000
+#define AD_BLUE_C_SHIFT 23
+#define AD_GREEN_C_MASK 0x00600000
+#define AD_GREEN_C_SHIFT 21
+#define AD_RED_C_MASK 0x00180000
+#define AD_RED_C_SHIFT 19
+#define AD_PALETTE 0x00040000
+#define AD_PIXEL_S_MASK 0x00030000
+#define AD_PIXEL_S_SHIFT 16
+#define AD_COMP_3_MASK 0x0000F000
+#define AD_COMP_3_SHIFT 12
+#define AD_COMP_2_MASK 0x00000F00
+#define AD_COMP_2_SHIFT 8
+#define AD_COMP_1_MASK 0x000000F0
+#define AD_COMP_1_SHIFT 4
+#define AD_COMP_0_MASK 0x0000000F
+#define AD_COMP_0_SHIFT 0
+
+#define MAKE_AD(alpha, red, blue, green, size, c0, c1, c2, c3) \
+ cpu_to_le32(AD_BYTE_F | (alpha << AD_ALPHA_C_SHIFT) | \
+ (blue << AD_BLUE_C_SHIFT) | (green << AD_GREEN_C_SHIFT) | \
+ (red << AD_RED_C_SHIFT) | (c3 << AD_COMP_3_SHIFT) | \
+ (c2 << AD_COMP_2_SHIFT) | (c1 << AD_COMP_1_SHIFT) | \
+ (c0 << AD_COMP_0_SHIFT) | (size << AD_PIXEL_S_SHIFT))
unsigned int mpc8610hpcd_get_pixel_format(unsigned int bits_per_pixel,
int monitor_port)
{
static const unsigned long pixelformat[][3] = {
- {0x88882317, 0x88083218, 0x65052119},
- {0x88883316, 0x88082219, 0x65053118},
+ {
+ MAKE_AD(3, 0, 2, 1, 3, 8, 8, 8, 8),
+ MAKE_AD(4, 2, 0, 1, 2, 8, 8, 8, 0),
+ MAKE_AD(4, 0, 2, 1, 1, 5, 6, 5, 0)
+ },
+ {
+ MAKE_AD(3, 2, 0, 1, 3, 8, 8, 8, 8),
+ MAKE_AD(4, 0, 2, 1, 2, 8, 8, 8, 0),
+ MAKE_AD(4, 2, 0, 1, 1, 5, 6, 5, 0)
+ },
};
- unsigned int pix_fmt, arch_monitor;
+ unsigned int arch_monitor;
+ /* The DVI port is mis-wired on revision 1 of this board. */
arch_monitor = ((*pixis_arch == 0x01) && (monitor_port == 0))? 0 : 1;
- /* DVI port for board version 0x01 */
-
- if (bits_per_pixel == 32)
- pix_fmt = pixelformat[arch_monitor][0];
- else if (bits_per_pixel == 24)
- pix_fmt = pixelformat[arch_monitor][1];
- else if (bits_per_pixel == 16)
- pix_fmt = pixelformat[arch_monitor][2];
- else
- pix_fmt = pixelformat[1][0];
-
- return pix_fmt;
+
+ switch (bits_per_pixel) {
+ case 32:
+ return pixelformat[arch_monitor][0];
+ case 24:
+ return pixelformat[arch_monitor][1];
+ case 16:
+ return pixelformat[arch_monitor][2];
+ default:
+ pr_err("fsl-diu: unsupported pixel depth %u\n", bits_per_pixel);
+ return 0;
+ }
}
void mpc8610hpcd_set_gamma_table(int monitor_port, char *gamma_table_base)
@@ -190,8 +222,7 @@ void mpc8610hpcd_set_pixel_clock(unsigned int pixclock)
}
/* Pixel Clock configuration */
- pr_debug("DIU: Bus Frequency = %d\n", get_busfreq());
- speed_ccb = get_busfreq();
+ speed_ccb = fsl_get_sys_freq();
/* Calculate the pixel clock with the smallest error */
/* calculate the following in steps to avoid overflow */
--
1.7.3.4
^ permalink raw reply related
* Re: [PATCH] powerpc/mpc8610_hpcd: Do not use "/" in interrupt names
From: Tabi Timur-B04825 @ 2011-05-09 16:09 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Anton Vorontsov, Linux/PPC Development, Linux Kernel Development
In-Reply-To: <alpine.DEB.2.00.1105041627560.2601@ayla.of.borg>
On Wed, May 4, 2011 at 9:29 AM, Geert Uytterhoeven <geert@linux-m68k.org> w=
rote:
> It may trigger a warning in fs/proc/generic.c:__xlate_proc_name() when
> trying to add an entry for the interrupt handler to sysfs.
>
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Acked-by: Timur Tabi <timur@freescale.com>
This fixes a real bug in the kernel.
--=20
Timur Tabi
Linux kernel developer at Freescale=
^ permalink raw reply
* Re: [PATCH 0/1] ppc4xx: Fix PCIe scanning for the 460SX
From: Ayman El-Khashab @ 2011-05-09 16:09 UTC (permalink / raw)
To: Tirumala Marri; +Cc: linuxppc-dev, Paul Mackerras
In-Reply-To: <BANLkTi=BaYhw92wYHp9rPvz1yq2H1p0G9w@mail.gmail.com>
On Thu, May 05, 2011 at 09:44:27AM -0700, Tirumala Marri wrote:
> >
> > Also, the patch removes the code for waiting for the link to be up with
> > a comment "What DCR has the link status on the 460SX?". Please fix that
> > (Tirumala, can you provide the missing information ?)
> >
>
> It is not one register. Here is the flow for Gen-1.
> 1. PECFGn_DLLSTA[3] will be asserted when pci-e link comes up.
> 2. now progream the UTL buffer configuration registers.
> 3. SW should assert PEUTLn_PCTL[0] to cause flow control initialization.
> This is memory mapped using GPL register REGBH , REBAL and REGMSK
> 4. Now check for the PEUTLN_PSTA[8] for the flow control init completion.
So what is the best way to handle this? It appears (based
on the comments of others and my own experience) that there
is no DCR that exists and behaves the way that previous SOCs
behaved to give us the link status? The register above
PECFGn_DLLSTA is actually in the PCIe configuration space so
we would have to map that in to be able to read that
register during the link check. Is that correct or ok?
I've communicated with some people over email and they had
tried the (PESDRn_HSSLySTS) register. Recognizing that
there exists one of these for each port/lane, is there a way
to use this one? It is in the indirect DCR space. I'd
tried this myself and never did get it to do anything but I
could have been looking at the wrong lane or something.
Lastly, what was the reason for forcing the original code to
be GEN-1 speeds?
ayman
^ permalink raw reply
* [PATCH 2/2] powerpc: Remove ioremap_flags
From: Anton Blanchard @ 2011-05-09 7:43 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
In-Reply-To: <20110509174159.6f9759d9@kryten>
We have a confusing number of ioremap functions. Make things just a
bit simpler by merging ioremap_flags and ioremap_prot.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-powerpc/arch/powerpc/include/asm/io.h
===================================================================
--- linux-powerpc.orig/arch/powerpc/include/asm/io.h 2011-05-09 13:29:33.000000000 +1000
+++ linux-powerpc/arch/powerpc/include/asm/io.h 2011-05-09 13:33:30.969769572 +1000
@@ -624,9 +624,8 @@ static inline void iosync(void)
* * ioremap is the standard one and provides non-cacheable guarded mappings
* and can be hooked by the platform via ppc_md
*
- * * ioremap_flags allows to specify the page flags as an argument and can
- * also be hooked by the platform via ppc_md. ioremap_prot is the exact
- * same thing as ioremap_flags.
+ * * ioremap_prot allows to specify the page flags as an argument and can
+ * also be hooked by the platform via ppc_md.
*
* * ioremap_nocache is identical to ioremap
*
@@ -639,7 +638,7 @@ static inline void iosync(void)
* currently be hooked. Must be page aligned.
*
* * __ioremap is the low level implementation used by ioremap and
- * ioremap_flags and cannot be hooked (but can be used by a hook on one
+ * ioremap_prot and cannot be hooked (but can be used by a hook on one
* of the previous ones)
*
* * __ioremap_caller is the same as above but takes an explicit caller
@@ -650,11 +649,10 @@ static inline void iosync(void)
*
*/
extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
-extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size,
- unsigned long flags);
+extern void __iomem *ioremap_prot(phys_addr_t address, unsigned long size,
+ unsigned long flags);
extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size);
#define ioremap_nocache(addr, size) ioremap((addr), (size))
-#define ioremap_prot(addr, size, prot) ioremap_flags((addr), (size), (prot))
extern void iounmap(volatile void __iomem *addr);
Index: linux-powerpc/arch/powerpc/lib/devres.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/lib/devres.c 2011-05-09 13:20:38.000000000 +1000
+++ linux-powerpc/arch/powerpc/lib/devres.c 2011-05-09 13:32:38.768848426 +1000
@@ -9,11 +9,11 @@
#include <linux/device.h> /* devres_*(), devm_ioremap_release() */
#include <linux/gfp.h>
-#include <linux/io.h> /* ioremap_flags() */
+#include <linux/io.h> /* ioremap_prot() */
#include <linux/module.h> /* EXPORT_SYMBOL() */
/**
- * devm_ioremap_prot - Managed ioremap_flags()
+ * devm_ioremap_prot - Managed ioremap_prot()
* @dev: Generic device to remap IO address for
* @offset: BUS offset to map
* @size: Size of map
@@ -31,7 +31,7 @@ void __iomem *devm_ioremap_prot(struct d
if (!ptr)
return NULL;
- addr = ioremap_flags(offset, size, flags);
+ addr = ioremap_prot(offset, size, flags);
if (addr) {
*ptr = addr;
devres_add(dev, ptr);
Index: linux-powerpc/arch/powerpc/mm/pgtable_32.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/mm/pgtable_32.c 2011-05-09 13:30:21.000000000 +1000
+++ linux-powerpc/arch/powerpc/mm/pgtable_32.c 2011-05-09 13:32:38.768848426 +1000
@@ -141,7 +141,7 @@ ioremap_wc(phys_addr_t addr, unsigned lo
EXPORT_SYMBOL(ioremap_wc);
void __iomem *
-ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags)
+ioremap_prot(phys_addr_t addr, unsigned long size, unsigned long flags)
{
/* writeable implies dirty for kernel addresses */
if (flags & _PAGE_RW)
@@ -160,7 +160,7 @@ ioremap_flags(phys_addr_t addr, unsigned
return __ioremap_caller(addr, size, flags, __builtin_return_address(0));
}
-EXPORT_SYMBOL(ioremap_flags);
+EXPORT_SYMBOL(ioremap_prot);
void __iomem *
__ioremap(phys_addr_t addr, unsigned long size, unsigned long flags)
Index: linux-powerpc/arch/powerpc/mm/pgtable_64.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/mm/pgtable_64.c 2011-05-09 13:32:20.000000000 +1000
+++ linux-powerpc/arch/powerpc/mm/pgtable_64.c 2011-05-09 13:33:50.310110792 +1000
@@ -265,7 +265,7 @@ void __iomem * ioremap_wc(phys_addr_t ad
return __ioremap_caller(addr, size, flags, caller);
}
-void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size,
+void __iomem * ioremap_prot(phys_addr_t addr, unsigned long size,
unsigned long flags)
{
void *caller = __builtin_return_address(0);
@@ -322,7 +322,7 @@ void iounmap(volatile void __iomem *toke
EXPORT_SYMBOL(ioremap);
EXPORT_SYMBOL(ioremap_wc);
-EXPORT_SYMBOL(ioremap_flags);
+EXPORT_SYMBOL(ioremap_prot);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(__ioremap_at);
EXPORT_SYMBOL(iounmap);
Index: linux-powerpc/arch/powerpc/platforms/ps3/spu.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/platforms/ps3/spu.c 2011-05-09 13:20:38.000000000 +1000
+++ linux-powerpc/arch/powerpc/platforms/ps3/spu.c 2011-05-09 13:32:38.768848426 +1000
@@ -197,7 +197,7 @@ static void spu_unmap(struct spu *spu)
* The current HV requires the spu shadow regs to be mapped with the
* PTE page protection bits set as read-only (PP=3). This implementation
* uses the low level __ioremap() to bypass the page protection settings
- * inforced by ioremap_flags() to get the needed PTE bits set for the
+ * inforced by ioremap_prot() to get the needed PTE bits set for the
* shadow regs.
*/
@@ -214,7 +214,7 @@ static int __init setup_areas(struct spu
goto fail_ioremap;
}
- spu->local_store = (__force void *)ioremap_flags(spu->local_store_phys,
+ spu->local_store = (__force void *)ioremap_prot(spu->local_store_phys,
LS_SIZE, _PAGE_NO_CACHE);
if (!spu->local_store) {
Index: linux-powerpc/arch/powerpc/sysdev/axonram.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/sysdev/axonram.c 2011-05-09 13:20:38.000000000 +1000
+++ linux-powerpc/arch/powerpc/sysdev/axonram.c 2011-05-09 13:32:38.768848426 +1000
@@ -216,7 +216,7 @@ static int axon_ram_probe(struct platfor
AXON_RAM_DEVICE_NAME, axon_ram_bank_id, bank->size >> 20);
bank->ph_addr = resource.start;
- bank->io_addr = (unsigned long) ioremap_flags(
+ bank->io_addr = (unsigned long) ioremap_prot(
bank->ph_addr, bank->size, _PAGE_NO_CACHE);
if (bank->io_addr == 0) {
dev_err(&device->dev, "ioremap() failed\n");
Index: linux-powerpc/arch/powerpc/sysdev/fsl_85xx_cache_sram.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/sysdev/fsl_85xx_cache_sram.c 2011-05-09 13:20:38.000000000 +1000
+++ linux-powerpc/arch/powerpc/sysdev/fsl_85xx_cache_sram.c 2011-05-09 13:32:38.768848426 +1000
@@ -106,10 +106,10 @@ int __init instantiate_cache_sram(struct
goto out_free;
}
- cache_sram->base_virt = ioremap_flags(cache_sram->base_phys,
+ cache_sram->base_virt = ioremap_prot(cache_sram->base_phys,
cache_sram->size, _PAGE_COHERENT | PAGE_KERNEL);
if (!cache_sram->base_virt) {
- dev_err(&dev->dev, "%s: ioremap_flags failed\n",
+ dev_err(&dev->dev, "%s: ioremap_prot failed\n",
dev->dev.of_node->full_name);
ret = -ENOMEM;
goto out_release;
^ permalink raw reply
* [PATCH 1/2] powerpc: Add ioremap_wc
From: Anton Blanchard @ 2011-05-09 7:41 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
Add ioremap_wc so drivers can request write combining on kernel
mappings.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-powerpc/arch/powerpc/include/asm/io.h
===================================================================
--- linux-powerpc.orig/arch/powerpc/include/asm/io.h 2011-05-09 11:25:11.987156163 +1000
+++ linux-powerpc/arch/powerpc/include/asm/io.h 2011-05-09 13:29:33.405575494 +1000
@@ -2,6 +2,8 @@
#define _ASM_POWERPC_IO_H
#ifdef __KERNEL__
+#define ARCH_HAS_IOREMAP_WC
+
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -628,6 +630,8 @@ static inline void iosync(void)
*
* * ioremap_nocache is identical to ioremap
*
+ * * ioremap_wc enables write combining
+ *
* * iounmap undoes such a mapping and can be hooked
*
* * __ioremap_at (and the pending __iounmap_at) are low level functions to
@@ -648,6 +652,7 @@ static inline void iosync(void)
extern void __iomem *ioremap(phys_addr_t address, unsigned long size);
extern void __iomem *ioremap_flags(phys_addr_t address, unsigned long size,
unsigned long flags);
+extern void __iomem *ioremap_wc(phys_addr_t address, unsigned long size);
#define ioremap_nocache(addr, size) ioremap((addr), (size))
#define ioremap_prot(addr, size, prot) ioremap_flags((addr), (size), (prot))
Index: linux-powerpc/arch/powerpc/mm/pgtable_32.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/mm/pgtable_32.c 2011-05-09 13:29:48.565843294 +1000
+++ linux-powerpc/arch/powerpc/mm/pgtable_32.c 2011-05-09 13:30:21.376422809 +1000
@@ -133,6 +133,14 @@ ioremap(phys_addr_t addr, unsigned long
EXPORT_SYMBOL(ioremap);
void __iomem *
+ioremap_wc(phys_addr_t addr, unsigned long size)
+{
+ return __ioremap_caller(addr, size, _PAGE_NO_CACHE,
+ __builtin_return_address(0));
+}
+EXPORT_SYMBOL(ioremap_wc);
+
+void __iomem *
ioremap_flags(phys_addr_t addr, unsigned long size, unsigned long flags)
{
/* writeable implies dirty for kernel addresses */
Index: linux-powerpc/arch/powerpc/mm/pgtable_64.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/mm/pgtable_64.c 2011-05-09 13:29:48.605844002 +1000
+++ linux-powerpc/arch/powerpc/mm/pgtable_64.c 2011-05-09 13:32:20.378523852 +1000
@@ -255,6 +255,16 @@ void __iomem * ioremap(phys_addr_t addr,
return __ioremap_caller(addr, size, flags, caller);
}
+void __iomem * ioremap_wc(phys_addr_t addr, unsigned long size)
+{
+ unsigned long flags = _PAGE_NO_CACHE;
+ void *caller = __builtin_return_address(0);
+
+ if (ppc_md.ioremap)
+ return ppc_md.ioremap(addr, size, flags, caller);
+ return __ioremap_caller(addr, size, flags, caller);
+}
+
void __iomem * ioremap_flags(phys_addr_t addr, unsigned long size,
unsigned long flags)
{
@@ -311,6 +321,7 @@ void iounmap(volatile void __iomem *toke
}
EXPORT_SYMBOL(ioremap);
+EXPORT_SYMBOL(ioremap_wc);
EXPORT_SYMBOL(ioremap_flags);
EXPORT_SYMBOL(__ioremap);
EXPORT_SYMBOL(__ioremap_at);
^ permalink raw reply
* [PATCH] powerpc: Improve scheduling of system call entry instructions
From: Anton Blanchard @ 2011-05-09 7:36 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
After looking at our system call path, Mary Brown suggested that we
should put all mfspr SRR* instructions before any mtspr SRR*.
To test this I used a very simple null syscall (actually getppid)
testcase at http://ozlabs.org/~anton/junkcode/null_syscall.c
I tested with the following changes against the pseries_defconfig:
CONFIG_VIRT_CPU_ACCOUNTING=n
CONFIG_AUDIT=n
to remove the overhead of virtual CPU accounting and syscall
auditing.
POWER6:
baseline: mean = 757.2 cycles sd = 2.108
modified: mean = 759.1 cycles sd = 2.020
POWER7:
baseline: mean = 411.4 cycles sd = 0.138
modified: mean = 404.1 cycles sd = 0.109
So we have 1.77% improvement on POWER7 which looks significant. The
POWER6 suggest a 0.25% slowdown, but the results are within 1
standard deviation and may be in the noise.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-powerpc/arch/powerpc/kernel/exceptions-64s.S
===================================================================
--- linux-powerpc.orig/arch/powerpc/kernel/exceptions-64s.S 2011-05-07 10:56:04.000000000 +1000
+++ linux-powerpc/arch/powerpc/kernel/exceptions-64s.S 2011-05-09 11:20:23.872220052 +1000
@@ -211,11 +211,11 @@ END_FTR_SECTION_IFSET(CPU_FTR_REAL_LE)
mr r9,r13
GET_PACA(r13)
mfspr r11,SPRN_SRR0
- ld r12,PACAKBASE(r13)
- ld r10,PACAKMSR(r13)
- LOAD_HANDLER(r12, system_call_entry)
- mtspr SPRN_SRR0,r12
mfspr r12,SPRN_SRR1
+ ld r10,PACAKBASE(r13)
+ LOAD_HANDLER(r10, system_call_entry)
+ mtspr SPRN_SRR0,r10
+ ld r10,PACAKMSR(r13)
mtspr SPRN_SRR1,r10
rfid
b . /* prevent speculative execution */
^ permalink raw reply
* [PATCH] powerpc: Remove static branch hint in giveup_altivec
From: Anton Blanchard @ 2011-05-09 7:20 UTC (permalink / raw)
To: benh, linuxppc-dev
A static branch hint will override dynamic branch prediction on
recent POWER CPUs. Since we are about to use more altivec in the
kernel remove the static hint in giveup_altivec that assumes
a userspace task is using altivec.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-powerpc/arch/powerpc/kernel/vector.S
===================================================================
--- linux-powerpc.orig/arch/powerpc/kernel/vector.S 2011-04-24 12:38:26.329650611 +1000
+++ linux-powerpc/arch/powerpc/kernel/vector.S 2011-04-24 12:39:27.850785617 +1000
@@ -102,7 +102,7 @@ _GLOBAL(giveup_altivec)
MTMSRD(r5) /* enable use of VMX now */
isync
PPC_LCMPI 0,r3,0
- beqlr- /* if no previous owner, done */
+ beqlr /* if no previous owner, done */
addi r3,r3,THREAD /* want THREAD of task */
PPC_LL r5,PT_REGS(r3)
PPC_LCMPI 0,r5,0
^ permalink raw reply
* [PATCH] powerpc: Simplify 4k/64k copy_page logic
From: Anton Blanchard @ 2011-05-09 7:18 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
To make it easier to add optimised versions of copy_page, remove
the 4kB loop for 64kB pages and just do all the work in copy_page.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-powerpc/arch/powerpc/include/asm/page_64.h
===================================================================
--- linux-powerpc.orig/arch/powerpc/include/asm/page_64.h 2011-04-24 12:38:26.469653194 +1000
+++ linux-powerpc/arch/powerpc/include/asm/page_64.h 2011-04-24 12:39:27.220773995 +1000
@@ -59,24 +59,7 @@ static __inline__ void clear_page(void *
: "ctr", "memory");
}
-extern void copy_4K_page(void *to, void *from);
-
-#ifdef CONFIG_PPC_64K_PAGES
-static inline void copy_page(void *to, void *from)
-{
- unsigned int i;
- for (i=0; i < (1 << (PAGE_SHIFT - 12)); i++) {
- copy_4K_page(to, from);
- to += 4096;
- from += 4096;
- }
-}
-#else /* CONFIG_PPC_64K_PAGES */
-static inline void copy_page(void *to, void *from)
-{
- copy_4K_page(to, from);
-}
-#endif /* CONFIG_PPC_64K_PAGES */
+extern void copy_page(void *to, void *from);
/* Log 2 of page table size */
extern u64 ppc64_pft_size;
Index: linux-powerpc/arch/powerpc/kernel/ppc_ksyms.c
===================================================================
--- linux-powerpc.orig/arch/powerpc/kernel/ppc_ksyms.c 2011-04-24 12:38:26.489653562 +1000
+++ linux-powerpc/arch/powerpc/kernel/ppc_ksyms.c 2011-04-24 12:39:27.220773995 +1000
@@ -54,7 +54,6 @@ extern void single_step_exception(struct
extern int sys_sigreturn(struct pt_regs *regs);
EXPORT_SYMBOL(clear_pages);
-EXPORT_SYMBOL(copy_page);
EXPORT_SYMBOL(ISA_DMA_THRESHOLD);
EXPORT_SYMBOL(DMA_MODE_READ);
EXPORT_SYMBOL(DMA_MODE_WRITE);
@@ -88,9 +87,7 @@ EXPORT_SYMBOL(__copy_tofrom_user);
EXPORT_SYMBOL(__clear_user);
EXPORT_SYMBOL(__strncpy_from_user);
EXPORT_SYMBOL(__strnlen_user);
-#ifdef CONFIG_PPC64
-EXPORT_SYMBOL(copy_4K_page);
-#endif
+EXPORT_SYMBOL(copy_page);
#if defined(CONFIG_PCI) && defined(CONFIG_PPC32)
EXPORT_SYMBOL(isa_io_base);
Index: linux-powerpc/arch/powerpc/lib/copypage_64.S
===================================================================
--- linux-powerpc.orig/arch/powerpc/lib/copypage_64.S 2011-04-24 12:38:26.449652824 +1000
+++ linux-powerpc/arch/powerpc/lib/copypage_64.S 2011-04-24 14:28:05.471401998 +1000
@@ -6,6 +6,7 @@
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
+#include <asm/page.h>
#include <asm/processor.h>
#include <asm/ppc_asm.h>
#include <asm/asm-offsets.h>
@@ -15,9 +16,9 @@ PPC64_CACHES:
.tc ppc64_caches[TC],ppc64_caches
.section ".text"
-
-_GLOBAL(copy_4K_page)
- li r5,4096 /* 4K page size */
+_GLOBAL(copy_page)
+ lis r5,PAGE_SIZE@h
+ ori r5,r5,PAGE_SIZE@l
BEGIN_FTR_SECTION
ld r10,PPC64_CACHES@toc(r2)
lwz r11,DCACHEL1LOGLINESIZE(r10) /* log2 of cache line size */
^ permalink raw reply
* Re: [PATCH v2 7/7] ARM: mxc: remove esdhc.h and use the public one
From: Shawn Guo @ 2011-05-09 6:23 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Shawn Guo, sameo, Xiaobo Xie, patches, devicetree-discuss,
linux-mmc, Saeed Bishara, Chris Ball, kernel, Mike Rapoport,
Anton Vorontsov, linuxppc-dev, Albert Herranz, linux-arm-kernel
In-Reply-To: <20110506083959.GS11574@pengutronix.de>
Hi Uwe,
On Fri, May 06, 2011 at 10:39:59AM +0200, Uwe Kleine-K=F6nig wrote:
> Hello Shawn,
>=20
> On Thu, May 05, 2011 at 09:22:58PM +0800, Shawn Guo wrote:
> > Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
> > ---
> > .../plat-mxc/devices/platform-sdhci-esdhc-imx.c | 1 -
> > arch/arm/plat-mxc/include/mach/devices-common.h | 2 +-
> what about removing arch/arm/plat-mxc/include/mach/esdhc.h in this
> patch as advertised in the subject?
>=20
Yes, will do if the patch #4 will finally stands. People are voting
for it. Let's see Wolfram's position.
--=20
Regards,
Shawn
^ permalink raw reply
* Re: [PATCH] atomic: add *_dec_not_zero
From: Mike Frysinger @ 2011-05-09 2:38 UTC (permalink / raw)
To: Sven Eckelmann
Cc: linux-arch, linux-mips, linux-m32r, linux-ia64, linux-cris-kernel,
linux-parisc, linux-s390, linux-sh, linux-kernel, Chris Metcalf,
uclinux-dist-devel, David Howells, linux-m68k, linux-am33-list,
linux-alpha, sparclinux, Russell King - ARM Linux, x86,
linuxppc-dev, linux-arm-kernel
In-Reply-To: <201105081133.50824.sven@narfation.org>
On Sun, May 8, 2011 at 05:33, Sven Eckelmann wrote:
> Russell King - ARM Linux wrote:
> [...]
>> Do we need atomic_dec_not_zero() et.al. in every arch header - is there =
no
>> generic header which it could be added to?
>
> Mike Frysinger already tried to answer it in
> <BANLkTimctgbto3dsnJ3d3r7NggS0KF9_Sw@mail.gmail.com>:
>> that's what asm-generic is for. =C2=A0if the arch isnt using it, it's
>> either because the arch needs to convert to it, or they're using SMP
>> and asm-generic doesnt yet support that for atomic.h.
>>
>> for example, the Blackfin port only needed updating for the SMP case.
>> in the non-SMP case, we're getting the def from asm-generic/atomic.h.
>
> Feel free to change that but I just followed the style used by all other
> macros and will not redesign the complete atomic*.h idea.
what you're doing is currently correct. i think merging SMP support
into asm-generic for atomic* will take a bit of pondering first.
-mike
^ permalink raw reply
* [PATCH] powerpc/pseries: Enable iSCSI support for a number of cards
From: Anton Blanchard @ 2011-05-08 23:19 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
Enable iSCSI support for a number of cards. We had the base
networking devices enabled but forgot to enable iSCSI.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-powerpc/arch/powerpc/configs/pseries_defconfig
===================================================================
--- linux-powerpc.orig/arch/powerpc/configs/pseries_defconfig 2011-05-09 09:14:40.773045437 +1000
+++ linux-powerpc/arch/powerpc/configs/pseries_defconfig 2011-05-09 09:16:47.445154427 +1000
@@ -146,12 +146,18 @@ CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_FC_ATTRS=y
CONFIG_SCSI_SAS_ATTRS=m
+CONFIG_SCSI_CXGB3_ISCSI=m
+CONFIG_SCSI_CXGB4_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
+CONFIG_SCSI_BNX2_ISCSI=m
+CONFIG_BE2ISCSI=m
CONFIG_SCSI_IBMVSCSI=y
CONFIG_SCSI_IBMVFC=m
CONFIG_SCSI_SYM53C8XX_2=y
CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
CONFIG_SCSI_IPR=y
CONFIG_SCSI_QLA_FC=m
+CONFIG_SCSI_QLA_ISCSI=m
CONFIG_SCSI_LPFC=m
CONFIG_ATA=y
# CONFIG_ATA_SFF is not set
^ permalink raw reply
* [PATCH] powerpc/pseries: Enable Emulex and Qlogic 10Gbit cards
From: Anton Blanchard @ 2011-05-08 23:18 UTC (permalink / raw)
To: benh; +Cc: linuxppc-dev
Enable the Qlogic and Emulex 10Gbit adapters.
Signed-off-by: Anton Blanchard <anton@samba.org>
---
Index: linux-powerpc/arch/powerpc/configs/pseries_defconfig
===================================================================
--- linux-powerpc.orig/arch/powerpc/configs/pseries_defconfig 2011-05-09 09:14:34.302937721 +1000
+++ linux-powerpc/arch/powerpc/configs/pseries_defconfig 2011-05-09 09:14:40.773045437 +1000
@@ -197,6 +197,8 @@ CONFIG_S2IO=m
CONFIG_MYRI10GE=m
CONFIG_NETXEN_NIC=m
CONFIG_MLX4_EN=m
+CONFIG_QLGE=m
+CONFIG_BE2NET=m
CONFIG_PPP=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
^ permalink raw reply
* Re: [PATCH] atomic: add *_dec_not_zero
From: Benjamin Herrenschmidt @ 2011-05-08 22:15 UTC (permalink / raw)
To: Sven Eckelmann
Cc: linux-arch, linux-mips, linux-m68k, linux-m32r, linux-ia64,
linux-cris-kernel, linux-parisc, linux-s390, linux-sh,
linux-kernel, Chris Metcalf, David Howells, linux-am33-list,
linux-alpha, sparclinux, uclinux-dist-devel, x86, linuxppc-dev,
linux-arm-kernel
In-Reply-To: <1304458235-28473-1-git-send-email-sven@narfation.org>
On Tue, 2011-05-03 at 23:30 +0200, Sven Eckelmann wrote:
> Introduce an *_dec_not_zero operation. Make this a special case of
> *_add_unless because batman-adv uses atomic_dec_not_zero in different
> places like re-broadcast queue or aggregation queue management. There
> are other non-final patches which may also want to use this macro.
For arch/powerpc:
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
(Sorry for catching up late)
Cheers,
Ben.
> diff --git a/arch/powerpc/include/asm/atomic.h b/arch/powerpc/include/asm/atomic.h
> index b8f152e..906f49a 100644
> --- a/arch/powerpc/include/asm/atomic.h
> +++ b/arch/powerpc/include/asm/atomic.h
> @@ -213,6 +213,7 @@ static __inline__ int atomic_add_unless(atomic_t *v, int a, int u)
> }
>
> #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
> +#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0)
>
> #define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0)
> #define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0)
> @@ -469,6 +470,7 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
> }
>
> #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0)
> +#define atomic64_dec_not_zero(v) atomic64_add_unless((v), -1, 0)
>
> #else /* __powerpc64__ */
> #include <asm-generic/atomic64.h>
> diff --git a/arch/powerpc/include/asm/local.h b/arch/powerpc/include/asm/local.h
> index c2410af..3d4c58a 100644
> --- a/arch/powerpc/include/asm/local.h
> +++ b/arch/powerpc/include/asm/local.h
> @@ -134,6 +134,7 @@ static __inline__ int local_add_unless(local_t *l, long a, long u)
> }
>
> #define local_inc_not_zero(l) local_add_unless((l), 1, 0)
> +#define local_dec_not_zero(l) local_add_unless((l), -1, 0)
>
> #define local_sub_and_test(a, l) (local_sub_return((a), (l)) == 0)
> #define local_dec_and_test(l) (local_dec_return((l)) == 0)
^ permalink raw reply
* Re: [PATCH 0/2] ppc/cleaup: Fix compiler warnings
From: Stratos Psomadakis @ 2011-05-08 20:02 UTC (permalink / raw)
To: linuxppc-dev; +Cc: paulus, linux-kernel
In-Reply-To: <1304777491-7947-1-git-send-email-psomas@cslab.ece.ntua.gr>
On 05/07/2011 05:11 PM, Stratos Psomadakis wrote:
> Fix compiler warnings in ppc code, which can lead to build failure, if
> CONFIG_PPC_WERROR is set (default).
>
> arch/powerpc/include/asm/pgtable-ppc64.h | 13 ++++++-------
> arch/powerpc/kernel/Makefile | 2 +-
> 2 files changed, 7 insertions(+), 8 deletions(-)
forgot to cc the maintainers
--
Stratos Psomadakis
<psomas@ece.ntua.gr>
^ permalink raw reply
* Re: [PATCH] atomic: add *_dec_not_zero
From: Russell King - ARM Linux @ 2011-05-08 9:24 UTC (permalink / raw)
To: Sven Eckelmann
Cc: linux-arch, linux-mips, linux-m32r, linux-ia64, linux-cris-kernel,
linux-parisc, linux-s390, linux-sh, linux-kernel, Chris Metcalf,
David Howells, linux-m68k, linux-am33-list, linux-alpha,
sparclinux, uclinux-dist-devel, x86, linuxppc-dev,
linux-arm-kernel
In-Reply-To: <1304458235-28473-1-git-send-email-sven@narfation.org>
On Tue, May 03, 2011 at 11:30:35PM +0200, Sven Eckelmann wrote:
> Introduce an *_dec_not_zero operation. Make this a special case of
> *_add_unless because batman-adv uses atomic_dec_not_zero in different
> places like re-broadcast queue or aggregation queue management. There
> are other non-final patches which may also want to use this macro.
...
> diff --git a/arch/arm/include/asm/atomic.h b/arch/arm/include/asm/atomic.h
> index 7e79503..a005265 100644
> --- a/arch/arm/include/asm/atomic.h
> +++ b/arch/arm/include/asm/atomic.h
> @@ -218,6 +218,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u)
> return c != u;
> }
> #define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0)
> +#define atomic_dec_not_zero(v) atomic_add_unless((v), -1, 0)
>
> #define atomic_inc(v) atomic_add(1, v)
> #define atomic_dec(v) atomic_sub(1, v)
> @@ -459,6 +460,7 @@ static inline int atomic64_add_unless(atomic64_t *v, u64 a, u64 u)
> #define atomic64_dec_return(v) atomic64_sub_return(1LL, (v))
> #define atomic64_dec_and_test(v) (atomic64_dec_return((v)) == 0)
> #define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1LL, 0LL)
> +#define atomic64_dec_not_zero(v) atomic64_add_unless((v), -1LL, 0LL)
>
> #else /* !CONFIG_GENERIC_ATOMIC64 */
> #include <asm-generic/atomic64.h>
Do we need atomic_dec_not_zero() et.al. in every arch header - is there no
generic header which it could be added to?
^ permalink raw reply
* Re: [PATCH] atomic: add *_dec_not_zero
From: Sven Eckelmann @ 2011-05-08 9:33 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: linux-arch, linux-mips, linux-m32r, linux-ia64, linux-cris-kernel,
linux-parisc, linux-s390, linux-sh, linux-kernel, Chris Metcalf,
David Howells, linux-m68k, linux-am33-list, linux-alpha,
sparclinux, uclinux-dist-devel, x86, linuxppc-dev,
linux-arm-kernel
In-Reply-To: <20110508092403.GB27807@n2100.arm.linux.org.uk>
[-- Attachment #1: Type: Text/Plain, Size: 777 bytes --]
Russell King - ARM Linux wrote:
[...]
> Do we need atomic_dec_not_zero() et.al. in every arch header - is there no
> generic header which it could be added to?
Mike Frysinger already tried to answer it in
<BANLkTimctgbto3dsnJ3d3r7NggS0KF9_Sw@mail.gmail.com>:
> that's what asm-generic is for. if the arch isnt using it, it's
> either because the arch needs to convert to it, or they're using SMP
> and asm-generic doesnt yet support that for atomic.h.
>
> for example, the Blackfin port only needed updating for the SMP case.
> in the non-SMP case, we're getting the def from asm-generic/atomic.h.
> -mike
Feel free to change that but I just followed the style used by all other
macros and will not redesign the complete atomic*.h idea.
thanks,
Sven
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply
* Re: [PATCH] PCI: portdrv: fix irq initialization on FSL pcie host controller
From: Kumar Gala @ 2011-05-07 16:21 UTC (permalink / raw)
To: Xu Lei; +Cc: linux-pci, linuxppc-dev, linux-kernel
In-Reply-To: <1303977671.1642.742.camel@xulei-desktop>
On Apr 28, 2011, at 3:01 AM, Xu Lei wrote:
>=20
> Any feedback on this patch? Thanks.
>=20
> On Friday, 2011-04-22 at 15:43 +0800, Lei Xu wrote:
>> Root complex ports for Freescale PCIe host controller only receive
>> interrupts, so if there is no irq setting for RC, it should not =
return
>> error, otherwise it may result the PCIe host controller is disabled.
>>=20
>> Signed-off-by: Lei Xu <B33228@freescale.com>
>> ---
>> drivers/pci/pcie/portdrv_core.c | 5 ++++-
>> 1 files changed, 4 insertions(+), 1 deletions(-)
>>=20
>> diff --git a/drivers/pci/pcie/portdrv_core.c =
b/drivers/pci/pcie/portdrv_core.c
>> index 595654a..95e64c8 100644
>> --- a/drivers/pci/pcie/portdrv_core.c
>> +++ b/drivers/pci/pcie/portdrv_core.c
>> @@ -209,7 +209,10 @@ static int init_service_irqs(struct pci_dev =
*dev, int *irqs, int mask)
>> irqs[i] =3D irq;
>> irqs[PCIE_PORT_SERVICE_VC_SHIFT] =3D -1;
>>=20
>> - if (irq < 0)
>> + /* Root complex ports for Freescale PCIe host controller only
>> + * receive interrupts, so if there is no irq setting for RC,
>> + * it should not return error. */
>> + if ((irq < 0) && (dev->pcie_type !=3D PCI_EXP_TYPE_ROOT_PORT))
>> return -ENODEV;
>> return 0;
>> }
>=20
> --=20
> Regards
>=20
> Lei
>=20
Reviewing this in more detail this is not the right solution. We should =
have an dev->irq set and need to fix that.
The means to accomplish that is by fixing up the device tree to properly =
get the interrupt assigned to the root complex node.
- k=
^ permalink raw reply
* Re: [PATCH 1/2] ppc: Fix compiler warning in ptrace.c [-Wno-array-bounds]
From: Stratos Psomadakis @ 2011-05-07 15:57 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Stratos Psomadakis, linuxppc-dev, linux-kernel
In-Reply-To: <m2oc3eh744.fsf@igel.home>
On 05/07/2011 06:18 PM, Andreas Schwab wrote:
> Stratos Psomadakis <psomas@cslab.ece.ntua.gr> writes:
>
>> +CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' -Wno-array-bounds
> You need to check first whether the option is valid.
>
> Andreas.
>
I resent the patch, with $(call cc-option) to check if GCC supports the
option. Is it ok?
Thx.
--
Stratos Psomadakis
<psomas@ece.ntua.gr>
^ permalink raw reply
* [RESEND PATCH 1/2] ppc: Fix compiler warning in ptrace.c [-Wno-array-bounds]
From: Stratos Psomadakis @ 2011-05-07 15:54 UTC (permalink / raw)
To: linuxppc-dev; +Cc: schwab, linux-kernel
In-Reply-To: <m2oc3eh744.fsf@igel.home>
The trick used to bypass the thread_struct fpr array in order to access the
struct fpscr, in arch/powerpc/kernel/ptrace.c, can trigger an "array subscript
is above array bounds [-Werror=array-bounds]" warning.
Add -Wno-array-bounds to CFLAGS_ptrace.o, in arch/powerpc/kernel/Makefile to
slience this warning.
Signed-off-by: Stratos Psomadakis <psomas@ece.ntua.gr>
---
arch/powerpc/kernel/Makefile | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile
index 3bb2a3e..92b1002 100644
--- a/arch/powerpc/kernel/Makefile
+++ b/arch/powerpc/kernel/Makefile
@@ -2,7 +2,7 @@
# Makefile for the linux kernel.
#
-CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"'
+CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' $(call cc-option, -Wno-array-bounds)
subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror
--
1.5.6.5
^ permalink raw reply related
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