Re: [PATCH] 83xx: add support for the kmeter1 board.

2009-04-28 Thread Heiko Schocher
Hello Scott,

Scott Wood wrote:
 On Mon, Apr 27, 2009 at 07:38:38AM +0200, Heiko Schocher wrote:
 1) add in the soc node an errata node and in this errata node
we can add all CPU specific errata as an example the qe_enet10
errata, which above code covers:
 
 What about errata discovered after the device tree is deployed?

Didn;t know that there are such errata. Ok, this is a problem.

 soc8...@e000 {
  [...]
 errata {
 device_type = errata;
 
 device_type is deprecated except for a couple of legacy uses.  Please do
 not add new ones.

Ok.

 compatible = fsl,mpc83xx_errata;
 
 To be bound to by an errata driver? :-P

Why not ;-) ?

 #address-cells = 1;
 #size-cells = 1;

 qe_ene...@14a8 {
 device_type = errata;
 compatible = fsl,mpc83xx_errata_qe_enet10;
 reg = 0x14a8 0x08;
 
 But that register is part of the QE parallel I/O port block (even if it
 happens to be undocumented within that block), not part of the QE ENET10
 erratum block.  The device tree describes the hardware, not what you
 want to do with it.

Hmm.. isn;t this an errata for a buggy hardware? Why not describing this
in the dts?

 The presence of the erratum itself is indicated by the presence of the
 buggy device, possibly in conjunction with SVR if the device tree is not
 specific enough.

Ah, Ok, that was just an idea ... so, where and how to solve the qe_enet10
errata without using get_immrbase() (and I vote not to solve it as it
actuall is in board specific code, maybe as i proposed in an earlier mail
in the ucc_geth.c driver?)?

bye
Heiko
-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


RE: [PATCH 2/2] powerpc/85xx: Add new LAW MCM device tree nodes for all85xx systems

2009-04-28 Thread Liu Dave-R63238
 Subject: [PATCH 2/2] powerpc/85xx: Add new LAW  MCM device 
 tree nodes for all85xx systems

One nit/typo, the tittle of the two patches should be ECM
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] fsldma: use PCI Read Multiple command

2009-04-28 Thread Liu Dave-R63238
 You are assuming the PCI memory space is prefetchable( no side effect)
 for DMA.
 Is it possible that DMA is from non-prefetchable memory space?

 This should be a safe assumption for this driver.  Remember, this
 driver just does offload memcpy, from one region to another.  So the
 PCI memory that you are reading from should be just a buffer of data,
 and there should be side-effect of reading it.

How about one FIFO buffer?

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

Re: Please revert edada399 and 9203fc9c

2009-04-28 Thread Sam Ravnborg
On Tue, Apr 28, 2009 at 02:56:33PM +1000, Paul Mackerras wrote:
 Linus,
 
 Please revert commits edada399 (powerpc: Use TEXT_TEXT macro in
 linker script.) and 9203fc9c (powerpc: Use __REF macro instead of
 old .text.init.refok.), which depends on edada399.
 
 Commit edada399 breaks the build because it moves the __ftr_alt_*
 sections of a file away from the .text section, causing link failures
 due to relative conditional branch targets being too far away from the
 branch instructions.  This happens on pretty much all 64-bit powerpc
 configs.
 
 Clearly these patches were never even build-tested.  They were never
 acked by the powerpc maintainer (Ben) - because he was on vacation -
 and they weren't sent to the deputy maintainer (me) or the relevant
 mailing list (linuxppc-dev).

This is partly my fault :-(
I acked them as I did not see the issue with conditional branches.
Could I ask you to add a comment to the lds file about this.

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


Re: [PATCH] net: Fix ucc_geth.c handling of phy 'interface' property.

2009-04-28 Thread David Miller
From: Grant Likely grant.lik...@secretlab.ca
Date: Mon, 27 Apr 2009 11:50:20 -0600

 On Mon, Apr 27, 2009 at 11:36 AM, Scott Wood scottw...@freescale.com wrote:
 On Mon, Apr 27, 2009 at 09:36:13AM -0600, Grant Likely wrote:
 From: Grant Likely grant.lik...@secretlab.ca

 Previous rework to ucc_geth.c to add of_mdio support (net: Rework
 ucc_geth driver to use of_mdio infrastructure) added a block of
 code which broke older openfirmware device trees which use an
 'interface' property in the phy node to describe the connection
 between the MAC and the PHY.  This patch removes the offending blurb.
 [snip]
       prop = of_get_property(np, phy-connection-type, NULL);
       if (!prop) {
               /* handle interface property present in old trees */
 -             if (!phy)
 -                     return -ENODEV;
 -
               prop = of_get_property(phy, interface, NULL);
               if (prop != NULL) {
                       phy_interface = enet_to_phy_interface[*prop];

 The above test only makes a difference when there is no phy node -- so I
 don't see how it was breaking device trees that had a phy node (with or
 without an interface property).  I can see it breaking fixed link
 device trees, though.
 
 Sorry, you're right.  I got myself confused when I was writing the
 description.  This patch fixes breakage when using a fixed-link and
 there is no phy-connection-type property.

Patch applied with commit message fixed up.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] powerpc/fsl_rio: use LAW address from device tree

2009-04-28 Thread Li Yang
Instead of fixed address in old code.

Signed-off-by: Li Yang le...@freescale.com
---
 arch/powerpc/sysdev/fsl_rio.c |   12 +++-
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index abdb124..fa0720f 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -1077,8 +1077,9 @@ int fsl_rio_setup(struct of_device *dev)
 
INIT_LIST_HEAD(port-dbells);
port-iores.start = law_start;
-   port-iores.end = law_start + law_size;
+   port-iores.end = law_start + law_size - 1;
port-iores.flags = IORESOURCE_MEM;
+   port-iores.name = rio_io_win;
 
priv-bellirq = irq_of_parse_and_map(dev-node, 2);
priv-txirq = irq_of_parse_and_map(dev-node, 3);
@@ -1156,14 +1157,15 @@ int fsl_rio_setup(struct of_device *dev)
out_be32((priv-regs_win + RIO_ISR_AACR), RIO_ISR_AACR_AA);
 
/* Configure maintenance transaction window */
-   out_be32(priv-maint_atmu_regs-rowbar, 0x000c);
-   out_be32(priv-maint_atmu_regs-rowar, 0x80077015);
+   out_be32(priv-maint_atmu_regs-rowbar, law_start  12);
+   out_be32(priv-maint_atmu_regs-rowar, 0x80077015);/* 4M */
 
priv-maint_win = ioremap(law_start, RIO_MAINT_WIN_SIZE);
 
/* Configure outbound doorbell window */
-   out_be32(priv-dbell_atmu_regs-rowbar, 0x000c0400);
-   out_be32(priv-dbell_atmu_regs-rowar, 0x8004200b);
+   out_be32(priv-dbell_atmu_regs-rowbar,
+   (law_start + RIO_MAINT_WIN_SIZE)  12);
+   out_be32(priv-dbell_atmu_regs-rowar, 0x8004200b);/* 4k */
fsl_rio_doorbell_init(port);
 
return 0;
-- 
1.5.4

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


[PATCH] powerpc: add memory map support to Freescale RapioIO block

2009-04-28 Thread Li Yang
The RIO memory map functions are used to support direct IO memory access
to RapidIO space.  The patch adds its support for Freescale RapidIO block
driver.

Signed-off-by: Zhang Wei z...@zh-kernel.org
Signed-off-by: Li Yang le...@freescale.com
---
 arch/powerpc/sysdev/fsl_rio.c |  217 -
 1 files changed, 215 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/sysdev/fsl_rio.c b/arch/powerpc/sysdev/fsl_rio.c
index fa0720f..7056dc0 100644
--- a/arch/powerpc/sysdev/fsl_rio.c
+++ b/arch/powerpc/sysdev/fsl_rio.c
@@ -31,6 +31,9 @@
 #define IRQ_RIO_TX(m)  (((struct rio_priv *)(m-priv))-txirq)
 #define IRQ_RIO_RX(m)  (((struct rio_priv *)(m-priv))-rxirq)
 
+#define IS_64BIT_DMA   ((sizeof(dma_addr_t) == 8) ? 1 : 0)
+#define IS_64BIT_PHYS  ((sizeof(phys_addr_t) == 8) ? 1 : 0)
+
 #define RIO_ATMU_REGS_OFFSET   0x10c00
 #define RIO_P_MSG_REGS_OFFSET  0x11000
 #define RIO_S_MSG_REGS_OFFSET  0x13000
@@ -40,6 +43,15 @@
 #define RIO_ISR_AACR_AA0x1 /* Accept All ID */
 #define RIO_MAINT_WIN_SIZE 0x40
 #define RIO_DBELL_WIN_SIZE 0x1000
+#define RIO_MAX_INB_ATMU   4
+#define RIO_MAX_OUTB_ATMU  8
+#define RIO_INB_ATMU_REGS_OFFSET   0x10de0
+#define RIO_ATMU_EN_MASK   0x8000
+
+#define RIO_NREAD  0x4
+#define RIO_NWRITE 0x4
+#define RIO_NWRITE_R   0x5
+#define RIO_NREAD_R0x5
 
 #define RIO_MSG_OMR_MUI0x0002
 #define RIO_MSG_OSR_TE 0x0080
@@ -83,6 +95,15 @@ struct rio_atmu_regs {
u32 pad3[3];
 };
 
+struct rio_inb_atmu_regs {
+   u32 riwtar;
+   u32 pad1;
+   u32 riwbar;
+   u32 pad2;
+   u32 riwar;
+   u32 pad3[3];
+};
+
 struct rio_msg_regs {
u32 omr;
u32 osr;
@@ -341,6 +362,188 @@ fsl_rio_config_write(struct rio_mport *mport, int index, 
u16 destid,
 }
 
 /**
+ * fsl_rio_map_inb_mem -- Mapping inbound memory region.
+ * @mport: RapidIO master port
+ * @lstart: Local memory space start address.
+ * @rstart: RapidIO space start address.
+ * @size: The mapping region size.
+ * @flags: Flags for mapping. 0 for using default flags.
+ *
+ * Return: 0 -- Success.
+ *
+ * This function will create the inbound mapping
+ * from rstart to lstart.
+ */
+static int fsl_rio_map_inb_mem(struct rio_mport *mport, dma_addr_t lstart,
+   resource_size_t rstart, resource_size_t size, u32 flags)
+{
+   int i;
+   struct rio_priv *priv = mport-priv;
+   struct rio_inb_atmu_regs __iomem *inbatmu = (struct rio_inb_atmu_regs *)
+   (priv-regs_win + RIO_INB_ATMU_REGS_OFFSET) - 1;
+   int size_ffs;
+   resource_size_t align;
+
+   if (flags == 0)
+   flags = (RIO_NREAD_R  4) | RIO_NWRITE_R;
+
+   align = (size  0x1000) ? 0x1000 : 1  (__ilog2(size - 1) + 1);
+
+   /* Align the size */
+   if ((lstart + size)  (_ALIGN_DOWN(lstart, align) + align)) {
+   size_ffs = __ffs(_ALIGN_DOWN(lstart + size - 1, align));
+   size = 1  (size_ffs + (((_ALIGN_DOWN(lstart, 1  size_ffs) +
+   (1  size_ffs))  (lstart + size)) ? 1 : 0));
+   } else
+   size = align;
+
+   if ((lstart  (size - 1)) != (rstart  (size - 1))) {
+   dev_err(mport-dev, The local address 0x%llx can not be 
+   aligned to the same size 0x%llx with the RapidIO 
+   space address 0x%llx!\n, (unsigned long long)lstart,
+   (unsigned long long)size, (unsigned long long)rstart);
+   return -EINVAL;
+   }
+
+   /* Search for free inbound ATMU */
+   for (i = 1;
+   (i = RIO_MAX_INB_ATMU)  (inbatmu-riwar  RIO_ATMU_EN_MASK);
+   i++, inbatmu--)
+   ;
+
+   if (i  RIO_MAX_INB_ATMU) {
+   dev_err(mport-dev, No free inbound ATMU!\n);
+   return -EBUSY;
+   }
+   out_be32(inbatmu-riwtar, ((IS_64BIT_DMA ? (lstart  32)
+0xf : 0)  20) | ((lstart  12)  0xf));
+   out_be32(inbatmu-riwbar, ((IS_64BIT_DMA ? (rstart  32)
+0x3 : 0)  20) | ((rstart  12)  0xf));
+   out_be32(inbatmu-riwar, 0x8000 | (0xf  20)
+   | ((flags  0xff)  12)
+   | (__ilog2(size) - 1));
+   return 0;
+}
+
+/**
+ * fsl_rio_map_outb_mem -- Mapping outbound memory region.
+ * @mport: RapidIO master port
+ * @lstart: Local memory space start address.
+ * @rstart: RapidIO space start address.
+ * @size: The mapping region size.
+ * @tid: The target RapidIO device id.
+ * @flags: Flags for mapping. 0 for using default flags.
+ *
+ * Return: 0 -- Success.
+ *
+ * This function will create the outbound mapping
+ * from lstart to rstart.
+ */
+static int fsl_rio_map_outb_mem(struct rio_mport *mport, phys_addr_t lstart,
+   

Re: [PATCH] rio: warn_unused_result warnings fix

2009-04-28 Thread Li Yang
On Tue, Apr 28, 2009 at 6:51 PM, Michael Ellerman
mich...@ellerman.id.au wrote:
 On Tue, 2009-04-28 at 18:15 +0800, Li Yang wrote:
 warning: ignoring return value of 'device_add', declared with attribute 
 warn_unused_result
 warning: ignoring return value of 'sysfs_create_bin_file', declared with 
 attribute warn_unused_result

 Signed-off-by: Li Yang le...@freescale.com
 ---
  drivers/rapidio/rio-scan.c  |    5 -
  drivers/rapidio/rio-sysfs.c |    6 --
  2 files changed, 8 insertions(+), 3 deletions(-)

 diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
 index 74d0bfa..9309e24 100644
 --- a/drivers/rapidio/rio-scan.c
 +++ b/drivers/rapidio/rio-scan.c
 @@ -265,7 +265,10 @@ static void rio_route_set_ops(struct rio_dev *rdev)
   */
  static void __devinit rio_add_device(struct rio_dev *rdev)
  {
 -     device_add(rdev-dev);
 +     int err;
 +
 +     err = device_add(rdev-dev);
 +     WARN_ON(err);

       spin_lock(rio_global_list_lock);
       list_add_tail(rdev-global_list, rio_devices);

 Is that really useful? Why not return the error to rio_setup_device()
 which can tell it's caller.

IMHO, when device_add() fails the system is quite broken.  So the
value is very limited for it to fail cleanly, which need some effort
to implement.  I can add it if you insist.

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

Re: leds: Add openfirmware platform device support breaks sparc

2009-04-28 Thread David Miller
From: Grant Likely grant.lik...@secretlab.ca
Date: Mon, 27 Apr 2009 21:59:39 -0600

 of: make of_(un)register_platform_driver common code.
 
 Some drivers using of_register_platform_driver() wrapper break on sparc
 because the wrapper isn't in the header file.  This patch moves it from
 Microblaze and PowerPC implementations and makes it common code.
 
 Signed-off-by: Grant Likely grant.lik...@secretlab.ca

Looks great:

Acked-by: David S. Miller da...@davemloft.net
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] rapidio: add common mapping APIs for RapidIO memory access

2009-04-28 Thread Li Yang
Add the mapping functions used to support direct IO memory access of
rapidIO.

Signed-off-by: Zhang Wei z...@zh-kernel.org
Signed-off-by: Li Yang le...@freescale.com
---
 drivers/rapidio/rio.c   |   95 +++
 include/linux/rio.h |   25 
 include/linux/rio_drv.h |   24 +---
 3 files changed, 138 insertions(+), 6 deletions(-)

diff --git a/drivers/rapidio/rio.c b/drivers/rapidio/rio.c
index 6395c78..224a076 100644
--- a/drivers/rapidio/rio.c
+++ b/drivers/rapidio/rio.c
@@ -2,6 +2,8 @@
  * RapidIO interconnect services
  * (RapidIO Interconnect Specification, http://www.rapidio.org)
  *
+ * Copyright (C) 2007-2009 Freescale Semiconductor, Inc.
+ *
  * Copyright 2005 MontaVista Software, Inc.
  * Matt Porter mpor...@kernel.crashing.org
  *
@@ -24,11 +26,23 @@
 #include linux/spinlock.h
 #include linux/slab.h
 #include linux/interrupt.h
+#include linux/dma-mapping.h
+#include linux/hardirq.h
 
 #include rio.h
 
 static LIST_HEAD(rio_mports);
 
+static DEFINE_SPINLOCK(rio_config_lock);
+
+struct resource rio_resource = {
+   .name   = RapidIO GSM,
+   .start  = 0,
+   .end= -1,
+   .flags  = IORESOURCE_MEM,
+};
+EXPORT_SYMBOL(rio_resource);
+
 /**
  * rio_local_get_device_id - Get the base/extended device id for a port
  * @port: RIO master port from which to get the deviceid
@@ -333,6 +347,87 @@ int rio_release_outb_dbell(struct rio_dev *rdev, struct 
resource *res)
 }
 
 /**
+ * rio_map_inb_region -- Mapping inbound memory region.
+ * @mport: Master port.
+ * @mem: Memory struction for mapping.
+ * @rflags: Flags for mapping.
+ *
+ * Return: 0 -- Success.
+ *
+ * This function will create the mapping from rio space to local mem.
+ */
+int rio_map_inb_region(struct rio_mport *mport, struct resource *rio_res,
+   dma_addr_t local, u32 rflags)
+{
+   int rc = 0;
+   unsigned long flags;
+
+   if (!mport-mops)
+   return -1;
+   spin_lock_irqsave(rio_config_lock, flags);
+   rc = mport-mops-map_inb(mport, local, rio_res-start,
+   resource_size(rio_res), rflags);
+   spin_unlock_irqrestore(rio_config_lock, flags);
+   return rc;
+}
+
+/**
+ * rio_map_outb_region -- Mapping outbound memory region.
+ * @mport: Master port.
+ * @tid: Target RapidIO device id.
+ * @mem: Memory struction for mapping.
+ * @rflags: Flags for mapping.
+ *
+ * Return: 0 -- Success.
+ *
+ * This function will create the mapping from local iomem to rio space.
+ */
+int rio_map_outb_region(struct rio_mport *mport, u16 tid,
+   struct resource *rio_res, phys_addr_t lstart, u32 rflags)
+{
+   int rc = 0;
+   unsigned long flags;
+
+   if (!mport-mops)
+   return -1;
+   spin_lock_irqsave(rio_config_lock, flags);
+   rc = mport-mops-map_outb(mport, lstart, rio_res-start,
+   resource_size(rio_res), tid, rflags);
+   spin_unlock_irqrestore(rio_config_lock, flags);
+   return rc;
+}
+
+/**
+ * rio_unmap_inb_region -- Unmap the inbound memory region
+ * @mport: Master port
+ * @mem: Memory struction for unmapping.
+ */
+void rio_unmap_inb_region(struct rio_mport *mport, dma_addr_t lstart)
+{
+   unsigned long flags;
+   if (!mport-mops)
+   return;
+   spin_lock_irqsave(rio_config_lock, flags);
+   mport-mops-unmap_inb(mport, lstart);
+   spin_unlock_irqrestore(rio_config_lock, flags);
+}
+
+/**
+ * rio_unmap_outb_region -- Unmap the outbound memory region
+ * @mport: Master port
+ * @mem: Memory struction for unmapping.
+ */
+void rio_unmap_outb_region(struct rio_mport *mport, phys_addr_t lstart)
+{
+   unsigned long flags;
+   if (!mport-mops)
+   return;
+   spin_lock_irqsave(rio_config_lock, flags);
+   mport-mops-unmap_outb(mport, lstart);
+   spin_unlock_irqrestore(rio_config_lock, flags);
+}
+
+/**
  * rio_mport_get_feature - query for devices' extended features
  * @port: Master port to issue transaction
  * @local: Indicate a local master port or remote device access
diff --git a/include/linux/rio.h b/include/linux/rio.h
index dc0c755..dd61538 100644
--- a/include/linux/rio.h
+++ b/include/linux/rio.h
@@ -176,6 +176,7 @@ struct rio_mport {
struct rio_msg outb_msg[RIO_MAX_MBOX];
int host_deviceid;  /* Host device ID */
struct rio_ops *ops;/* maintenance transaction functions */
+   struct rio_mem_ops *mops; /* Memory functions */
unsigned char id;   /* port ID, unique among all ports */
unsigned char index;/* port index, unique among all port
   interfaces of the same type */
@@ -185,6 +186,7 @@ struct rio_mport {
 */
enum rio_phy_type phy_type; /* RapidIO phy type */
unsigned char name[40];
+   struct device *dev;
void *priv; /* Master port private data */
 };
 

Re: [PATCH 2/2] powerpc/86xx: Add new LAW MCM device tree nodes for all 86xx systems

2009-04-28 Thread Martyn Welch

Kumar Gala wrote:

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---
 arch/powerpc/boot/dts/gef_ppc9a.dts|   13 +
 arch/powerpc/boot/dts/gef_sbc310.dts   |   13 +
 arch/powerpc/boot/dts/gef_sbc610.dts   |   13 +
 arch/powerpc/boot/dts/mpc8610_hpcd.dts |   13 +
 arch/powerpc/boot/dts/mpc8641_hpcn.dts |   13 +
 arch/powerpc/boot/dts/mpc8641_hpcn_36b.dts |   13 +
 arch/powerpc/boot/dts/sbc8641d.dts |   13 +
 7 files changed, 91 insertions(+), 0 deletions(-)
  
Am I right in thinking that this patch doesn't (as yet) enable any added 
functionality, or have I missed something?


I assume this is destined for next (as it relies on Becky's 
powerpc/86xx: Add 36-bit device tree for mpc8641hpcn), assuming this, 
fwiw, seems good to me.


Martyn

--
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)1327322748
GE Fanuc Intelligent Platforms Ltd,|Registered in England and Wales
Tove Valley Business Park, Towcester,  |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 927559189

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


Re: [PATCH] rio: warn_unused_result warnings fix

2009-04-28 Thread David Miller
From: Li Yang le...@freescale.com
Date: Tue, 28 Apr 2009 19:08:13 +0800

 IMHO, when device_add() fails the system is quite broken.  So the
 value is very limited for it to fail cleanly, which need some effort
 to implement.  I can add it if you insist.

I disagree.

For the cases where device_add() fails (duplicate name, for
example) the device layer already is emitting warnings.

You're just adding more log messages for the user to sift
through, and likely not adding any new information.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] rapidio: add common mapping APIs for RapidIO memory access

2009-04-28 Thread David Miller

Please number your patches. :-/

There is no way for anyone to be able to tell in what order
your changes should be applied.

Since you're going to wait for feedback anyways, you can
fix this up when you make your next submission of these
changes.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] rio: warn_unused_result warnings fix

2009-04-28 Thread Li Yang
warning: ignoring return value of 'device_add', declared with attribute 
warn_unused_result
warning: ignoring return value of 'sysfs_create_bin_file', declared with 
attribute warn_unused_result

Signed-off-by: Li Yang le...@freescale.com
---
 drivers/rapidio/rio-scan.c  |5 -
 drivers/rapidio/rio-sysfs.c |6 --
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/rapidio/rio-scan.c b/drivers/rapidio/rio-scan.c
index 74d0bfa..9309e24 100644
--- a/drivers/rapidio/rio-scan.c
+++ b/drivers/rapidio/rio-scan.c
@@ -265,7 +265,10 @@ static void rio_route_set_ops(struct rio_dev *rdev)
  */
 static void __devinit rio_add_device(struct rio_dev *rdev)
 {
-   device_add(rdev-dev);
+   int err;
+
+   err = device_add(rdev-dev);
+   WARN_ON(err);
 
spin_lock(rio_global_list_lock);
list_add_tail(rdev-global_list, rio_devices);
diff --git a/drivers/rapidio/rio-sysfs.c b/drivers/rapidio/rio-sysfs.c
index 97a147f..ba742e8 100644
--- a/drivers/rapidio/rio-sysfs.c
+++ b/drivers/rapidio/rio-sysfs.c
@@ -214,9 +214,11 @@ static struct bin_attribute rio_config_attr = {
  */
 int rio_create_sysfs_dev_files(struct rio_dev *rdev)
 {
-   sysfs_create_bin_file(rdev-dev.kobj, rio_config_attr);
+   int err = 0;
 
-   return 0;
+   err = sysfs_create_bin_file(rdev-dev.kobj, rio_config_attr);
+
+   return err;
 }
 
 /**
-- 
1.5.4

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


Re: [PATCH 2/2] powerpc/85xx: Add new LAW MCM device tree nodes for all85xx systems

2009-04-28 Thread Kumar Gala


On Apr 28, 2009, at 1:41 AM, Liu Dave-R63238 wrote:


Subject: [PATCH 2/2] powerpc/85xx: Add new LAW  MCM device
tree nodes for all85xx systems


One nit/typo, the tittle of the two patches should be ECM


oops, thanks for catching that ;)

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


Re: [PATCH 0/5] rapidio: adding memory mapping IO support and misc fixes

2009-04-28 Thread Kumar Gala


On Apr 28, 2009, at 5:16 AM, Li Yang wrote:


The patch series add MMIO support to Linux rapidio and fix a few nits.
The patches cross rapidio, netdev, powerpc sub-systems.  It will be
good for them to go through one tree.  Probably Andrew?  As the
previous rapidio patches are mostly merged by you.

- Leo


When you repost use the -n option in git-format-patch so we get a  
sequence # for the patches.


Either Andrew or I can possible pick them up as long as we get the  
right maintainer ACKs.


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


[PATCH] rionet: add memory access to simulated Ethernet over rapidio

2009-04-28 Thread Li Yang
Through the newly added IO memory access of Rapidio, sender can
write directly to recipient's rx buffer, either by cpu or DMA engine.

Signed-off-by: Zhang Wei z...@zh-kernel.org
Signed-off-by: Li Yang le...@freescale.com
---
 drivers/net/Kconfig  |   10 ++
 drivers/net/rionet.c |  365 +-
 2 files changed, 371 insertions(+), 4 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 214a92d..1e88e26 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2736,6 +2736,16 @@ config RIONET_RX_SIZE
depends on RIONET
default 128
 
+config RIONET_MEMMAP
+   bool Use memory map instead of message
+   depends on RIONET
+   default n
+
+config RIONET_DMA
+   bool Use DMA for memory mapping data transfer
+   depends on RIONET_MEMMAP  FSL_DMA
+   default y
+
 config FDDI
tristate FDDI driver support
depends on (PCI || EISA || TC)
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
index ec59e29..c38e51e 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -1,6 +1,8 @@
 /*
  * rionet - Ethernet driver over RapidIO messaging services
  *
+ * Copyright (C) 2007-2009 Freescale Semiconductor, Inc.
+ *
  * Copyright 2005 MontaVista Software, Inc.
  * Matt Porter mpor...@kernel.crashing.org
  *
@@ -23,6 +25,7 @@
 #include linux/skbuff.h
 #include linux/crc32.h
 #include linux/ethtool.h
+#include linux/dmaengine.h
 
 #define DRV_NAMErionet
 #define DRV_VERSION 0.2
@@ -40,13 +43,48 @@ MODULE_LICENSE(GPL);
 NETIF_MSG_TX_ERR)
 
 #define RIONET_DOORBELL_JOIN   0x1000
+#ifdef CONFIG_RIONET_MEMMAP
+#define RIONET_DOORBELL_SEND   0x1001
+#define RIONET_DOORBELL_LEAVE  0x1002
+#else
 #define RIONET_DOORBELL_LEAVE  0x1001
+#endif
 
 #define RIONET_MAILBOX 0
 
 #define RIONET_TX_RING_SIZECONFIG_RIONET_TX_SIZE
 #define RIONET_RX_RING_SIZECONFIG_RIONET_RX_SIZE
 
+#define ERR(fmt, arg...) \
+   printk(KERN_ERR ERROR %s - %s:  fmt,  __FILE__, __func__, ## arg)
+
+#ifdef CONFIG_RIONET_MEMMAP
+/* Definitions for rionet memory map driver */
+#define RIONET_DRVID   0x101
+#define RIONET_MAX_SK_DATA_SIZE0x1000
+#define RIONET_MEM_RIO_BASE0x1000
+#define RIONET_TX_RX_BUFF_SIZE (0x1000 * (128 + 128))
+#define RIONET_QUEUE_NEXT(x)   (((x)  127) ? ((x) + 1) : 0)
+#define RIONET_QUEUE_INC(x)(x = RIONET_QUEUE_NEXT(x))
+
+struct sk_data {
+   u8  data[0x1000];
+};
+
+#define RIONET_SKDATA_EN   0x8000
+struct rionet_tx_rx_buff {
+   int enqueue;/* enqueue point */
+   int dequeue;/* dequeue point */
+   u32 size[128];  /* size[i] is skdata[i] size
+* the most high bit [31] is
+* enable bit. The
+* max size is 4096.
+*/
+   u8  rev1[3576];
+   struct sk_data  skdata[128];/* all size are 0x1000 * 128 */
+};
+#endif /* CONFIG_RIONET_MEMMAP */
+
 static LIST_HEAD(rionet_peers);
 
 struct rionet_private {
@@ -60,6 +98,19 @@ struct rionet_private {
spinlock_t lock;
spinlock_t tx_lock;
u32 msg_enable;
+#ifdef CONFIG_RIONET_MEMMAP
+   struct rionet_tx_rx_buff *rxbuff;
+   struct rionet_tx_rx_buff __iomem *txbuff;
+   dma_addr_t rx_addr;
+   phys_addr_t tx_addr;
+   struct resource *riores;
+#ifdef CONFIG_RIONET_DMA
+   struct dma_chan *txdmachan;
+   struct dma_chan *rxdmachan;
+   struct dma_client rio_dma_client;
+   spinlock_t rio_dma_event_lock;
+#endif
+#endif
 };
 
 struct rionet_peer {
@@ -90,6 +141,7 @@ static struct rio_dev **rionet_active;
 #define RIONET_MAC_MATCH(x)(*(u32 *)x == 0x00010001)
 #define RIONET_GET_DESTID(x)   (*(u16 *)(x + 4))
 
+#ifndef CONFIG_RIONET_MEMMAP
 static int rionet_rx_clean(struct net_device *ndev)
 {
int i;
@@ -108,9 +160,11 @@ static int rionet_rx_clean(struct net_device *ndev)
 
rnet-rx_skb[i]-data = data;
skb_put(rnet-rx_skb[i], RIO_MAX_MSG_SIZE);
+   rnet-rx_skb[i]-dev = ndev;
rnet-rx_skb[i]-protocol =
eth_type_trans(rnet-rx_skb[i], ndev);
error = netif_rx(rnet-rx_skb[i]);
+   rnet-rx_skb[i] = NULL;
 
if (error == NET_RX_DROP) {
ndev-stats.rx_dropped++;
@@ -128,6 +182,7 @@ static int rionet_rx_clean(struct net_device *ndev)
 
return i;
 }
+#endif
 
 static void rionet_rx_fill(struct net_device *ndev, int end)
 {
@@ -141,19 +196,86 @@ static void rionet_rx_fill(struct net_device *ndev, int 
end)
if (!rnet-rx_skb[i])
break;
 
+#ifndef CONFIG_RIONET_MEMMAP
rio_add_inb_buffer(rnet-mport, 

Re: [PATCH v2] fs_enet: Remove dead code

2009-04-28 Thread David Miller
From: Kumar Gala ga...@kernel.crashing.org
Date: Wed, 22 Apr 2009 16:35:48 -0500

 CONFIG_DUET doesn't exist anymore, remove all the code that exists to
 support it.
 
 Signed-off-by: Kumar Gala ga...@kernel.crashing.org

I took the liberty of simplifying fs_init() even further
when applying this.  It had become:

int r = foo();
if (r != 0)
return r;
return 0;

which is just plain:

return foo();

fs_enet: Remove dead code

CONFIG_DUET doesn't exist anymore, remove all the code that exists to
support it.

[ Simplify fs_init() even further -DaveM ]

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
Signed-off-by: David S. Miller da...@davemloft.net
---
 drivers/net/fs_enet/fs_enet-main.c |   39 +---
 drivers/net/fs_enet/fs_enet.h  |5 
 drivers/net/fs_enet/mac-fec.c  |   34 ---
 3 files changed, 1 insertions(+), 77 deletions(-)

diff --git a/drivers/net/fs_enet/fs_enet-main.c 
b/drivers/net/fs_enet/fs_enet-main.c
index 9604aae..b892c3a 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -941,30 +941,6 @@ extern void fs_mii_disconnect(struct net_device *dev);
 
 
/**/
 
-/* handy pointer to the immap */
-void __iomem *fs_enet_immap = NULL;
-
-static int setup_immap(void)
-{
-#ifdef CONFIG_CPM1
-   fs_enet_immap = ioremap(IMAP_ADDR, 0x4000);
-   WARN_ON(!fs_enet_immap);
-#elif defined(CONFIG_CPM2)
-   fs_enet_immap = cpm2_immr;
-#endif
-
-   return 0;
-}
-
-static void cleanup_immap(void)
-{
-#if defined(CONFIG_CPM1)
-   iounmap(fs_enet_immap);
-#endif
-}
-
-/**/
-
 #ifdef CONFIG_FS_ENET_HAS_FEC
 #define IS_FEC(match) ((match)-data == fs_fec_ops)
 #else
@@ -1144,25 +1120,12 @@ static struct of_platform_driver fs_enet_driver = {
 
 static int __init fs_init(void)
 {
-   int r = setup_immap();
-   if (r != 0)
-   return r;
-
-   r = of_register_platform_driver(fs_enet_driver);
-   if (r != 0)
-   goto out;
-
-   return 0;
-
-out:
-   cleanup_immap();
-   return r;
+   return of_register_platform_driver(fs_enet_driver);
 }
 
 static void __exit fs_cleanup(void)
 {
of_unregister_platform_driver(fs_enet_driver);
-   cleanup_immap();
 }
 
 #ifdef CONFIG_NET_POLL_CONTROLLER
diff --git a/drivers/net/fs_enet/fs_enet.h b/drivers/net/fs_enet/fs_enet.h
index 85a4bab..ef01e09 100644
--- a/drivers/net/fs_enet/fs_enet.h
+++ b/drivers/net/fs_enet/fs_enet.h
@@ -194,9 +194,4 @@ extern const struct fs_ops fs_scc_ops;
 
 /***/
 
-/* handy pointer to the immap */
-extern void __iomem *fs_enet_immap;
-
-/***/
-
 #endif
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
index 14e5753..ca7bcb8 100644
--- a/drivers/net/fs_enet/mac-fec.c
+++ b/drivers/net/fs_enet/mac-fec.c
@@ -245,10 +245,6 @@ static void set_multicast_list(struct net_device *dev)
 
 static void restart(struct net_device *dev)
 {
-#ifdef CONFIG_DUET
-   immap_t *immap = fs_enet_immap;
-   u32 cptr;
-#endif
struct fs_enet_private *fep = netdev_priv(dev);
fec_t __iomem *fecp = fep-fec.fecp;
const struct fs_platform_info *fpi = fep-fpi;
@@ -315,36 +311,6 @@ static void restart(struct net_device *dev)
FW(fecp, ievent, 0xffc0);
FW(fecp, ivec, (virq_to_hw(fep-interrupt) / 2)  29);
 
-   /*
-* adjust to speed (only for DUET  RMII)
-*/
-#ifdef CONFIG_DUET
-   if (fpi-use_rmii) {
-   cptr = in_be32(immap-im_cpm.cp_cptr);
-   switch (fs_get_fec_index(fpi-fs_no)) {
-   case 0:
-   cptr |= 0x100;
-   if (fep-speed == 10)
-   cptr |= 0x010;
-   else if (fep-speed == 100)
-   cptr = ~0x010;
-   break;
-   case 1:
-   cptr |= 0x80;
-   if (fep-speed == 10)
-   cptr |= 0x008;
-   else if (fep-speed == 100)
-   cptr = ~0x008;
-   break;
-   default:
-   BUG();  /* should never happen */
-   break;
-   }
-   out_be32(immap-im_cpm.cp_cptr, cptr);
-   }
-#endif
-
-
FW(fecp, r_cntrl, FEC_RCNTRL_MII_MODE); /* MII enable */
/*
 * adjust to duplex mode
-- 
1.6.2.4

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


Re: [PATCH 2/2] powerpc: Add 2.06 tlbie mnemonics

2009-04-28 Thread Kumar Gala


On Apr 28, 2009, at 12:03 AM, Michael Neuling wrote:


From: Milton Miller milt...@bga.com

This adds the PowerPC 2.06 tlbie mnemonics and keeps backwards
compatibilty for CPUs before 2.06.

Only useful for bare metal systems.

Signed-off-by: Milton Miller milt...@bga.com
Signed-off-by: Michael Neuling mi...@neuling.org
---

arch/powerpc/include/asm/ppc-opcode.h |3 +++
arch/powerpc/kernel/cputable.c|6 --
arch/powerpc/mm/hash_native_64.c  |   11 +--


did you miss the update to mmu.h to add MMU_FTR_TLBIE_206?


3 files changed, 16 insertions(+), 4 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/ppc-opcode.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
@@ -79,4 +79,7 @@
#define PPC_WAIT(w) stringify_in_c(.long PPC_INST_WAIT | \
__PPC_WC(w))

+#define TLBIE(lp,a) \
+   stringify_in_c(.long 0x7c000264 | ((a)  11) | ((lp)  21))
+


Can you match the format of the file and define a PPC_INST_TLBIE

- k

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


[PATCH 1/6] powerpc: Move #ifdef'ed body of do_IRQ() into a separate function

2009-04-28 Thread Michael Ellerman
Rather than a giant ifdef in the body of do_IRQ(), including a
dangling else, move the irq stack logic into a separate routine and
do the ifdef there.

Signed-off-by: Michael Ellerman mich...@ellerman.id.au
---
 arch/powerpc/kernel/irq.c |   96 ++---
 1 files changed, 56 insertions(+), 40 deletions(-)

diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c
index 8c1a496..3d3658d 100644
--- a/arch/powerpc/kernel/irq.c
+++ b/arch/powerpc/kernel/irq.c
@@ -248,13 +248,63 @@ void fixup_irqs(cpumask_t map)
 }
 #endif
 
+#ifdef CONFIG_IRQSTACKS
+static inline void handle_one_irq(unsigned int irq)
+{
+   struct thread_info *curtp, *irqtp;
+   unsigned long saved_sp_limit;
+   struct irq_desc *desc;
+   void *handler;
+
+   /* Switch to the irq stack to handle this */
+   curtp = current_thread_info();
+   irqtp = hardirq_ctx[smp_processor_id()];
+
+   if (curtp == irqtp) {
+   /* We're already on the irq stack, just handle it */
+   generic_handle_irq(irq);
+   return;
+   }
+
+   desc = irq_desc + irq;
+   saved_sp_limit = current-thread.ksp_limit;
+
+   handler = desc-handle_irq;
+   if (handler == NULL)
+   handler = __do_IRQ;
+
+   irqtp-task = curtp-task;
+   irqtp-flags = 0;
+
+   /* Copy the softirq bits in preempt_count so that the
+* softirq checks work in the hardirq context. */
+   irqtp-preempt_count = (irqtp-preempt_count  ~SOFTIRQ_MASK) |
+  (curtp-preempt_count  SOFTIRQ_MASK);
+
+   current-thread.ksp_limit = (unsigned long)irqtp +
+   _ALIGN_UP(sizeof(struct thread_info), 16);
+
+   call_handle_irq(irq, desc, irqtp, handler);
+   current-thread.ksp_limit = saved_sp_limit;
+   irqtp-task = NULL;
+
+   /* Set any flag that may have been set on the
+* alternate stack
+*/
+   if (irqtp-flags)
+   set_bits(irqtp-flags, curtp-flags);
+}
+#else
+static inline void handle_one_irq(unsigned int irq)
+{
+   generic_handle_irq(irq);
+}
+#endif
+
 void do_IRQ(struct pt_regs *regs)
 {
struct pt_regs *old_regs = set_irq_regs(regs);
unsigned int irq;
-#ifdef CONFIG_IRQSTACKS
-   struct thread_info *curtp, *irqtp;
-#endif
 
irq_enter();
 
@@ -282,43 +332,9 @@ void do_IRQ(struct pt_regs *regs)
 */
irq = ppc_md.get_irq();
 
-   if (irq != NO_IRQ  irq != NO_IRQ_IGNORE) {
-#ifdef CONFIG_IRQSTACKS
-   /* Switch to the irq stack to handle this */
-   curtp = current_thread_info();
-   irqtp = hardirq_ctx[smp_processor_id()];
-   if (curtp != irqtp) {
-   struct irq_desc *desc = irq_desc + irq;
-   void *handler = desc-handle_irq;
-   unsigned long saved_sp_limit = 
current-thread.ksp_limit;
-   if (handler == NULL)
-   handler = __do_IRQ;
-   irqtp-task = curtp-task;
-   irqtp-flags = 0;
-
-   /* Copy the softirq bits in preempt_count so that the
-* softirq checks work in the hardirq context.
-*/
-   irqtp-preempt_count =
-   (irqtp-preempt_count  ~SOFTIRQ_MASK) |
-   (curtp-preempt_count  SOFTIRQ_MASK);
-
-   current-thread.ksp_limit = (unsigned long)irqtp +
-   _ALIGN_UP(sizeof(struct thread_info), 16);
-   call_handle_irq(irq, desc, irqtp, handler);
-   current-thread.ksp_limit = saved_sp_limit;
-   irqtp-task = NULL;
-
-
-   /* Set any flag that may have been set on the
-* alternate stack
-*/
-   if (irqtp-flags)
-   set_bits(irqtp-flags, curtp-flags);
-   } else
-#endif
-   generic_handle_irq(irq);
-   } else if (irq != NO_IRQ_IGNORE)
+   if (irq != NO_IRQ  irq != NO_IRQ_IGNORE)
+   handle_one_irq(irq);
+   else if (irq != NO_IRQ_IGNORE)
/* That's not SMP safe ... but who cares ? */
ppc_spurious_interrupts++;
 
-- 
1.6.2.1

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


Re: [PATCH 2/2] powerpc: Add 2.06 tlbie mnemonics

2009-04-28 Thread Michael Neuling
Kumar,

  From: Milton Miller milt...@bga.com
 
  This adds the PowerPC 2.06 tlbie mnemonics and keeps backwards
  compatibilty for CPUs before 2.06.
 
  Only useful for bare metal systems.
 
  Signed-off-by: Milton Miller milt...@bga.com
  Signed-off-by: Michael Neuling mi...@neuling.org
  ---
 
  arch/powerpc/include/asm/ppc-opcode.h |3 +++
  arch/powerpc/kernel/cputable.c|6 --
  arch/powerpc/mm/hash_native_64.c  |   11 +--
 
 did you miss the update to mmu.h to add MMU_FTR_TLBIE_206?

Yep a missing quilt add.  Thanks

 
  3 files changed, 16 insertions(+), 4 deletions(-)
 
  Index: linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
  ===
  --- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/ppc-opcode.h
  +++ linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
  @@ -79,4 +79,7 @@
  #define PPC_WAIT(w) stringify_in_c(.long PPC_INST_WAIT | \
  __PPC_WC(w))
 
  +#define TLBIE(lp,a) \
  +   stringify_in_c(.long 0x7c000264 | ((a)  11) | ((lp)  21))
  +
 
 Can you match the format of the file and define a PPC_INST_TLBIE

Sorry, I obviously just stuck my crap in there without looking at the
nice macros I could use.

Repost coming.

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


[PATCH 0/2] powerpc: tlbie implementation for PowerPC ISA 2.06

2009-04-28 Thread Michael Neuling
These patches implement the PowerPC ISA 2.06 tlbie mnemonics

Signed-off-by: Michael Neuling mi...@neuling.org
--- 
This version attempts to address issues raised by Kumar.
- Add missing mmu.h
- Follow the bouncing ball in ppc-opcode.h for #define PPC_TLBIE 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 1/2] powerpc: Enable MMU feature sections for inline asm

2009-04-28 Thread Michael Neuling
From: Milton Miller milt...@bga.com

powerpc: Enable MMU feature sections for inline asm

This adds the ability to do MMU feature sections for inline asm.

Signed-off-by: Milton Miller milt...@bga.com
Signed-off-by: Michael Neuling mi...@neuling.org
---

 arch/powerpc/include/asm/feature-fixups.h |   25 -
 1 file changed, 20 insertions(+), 5 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/include/asm/feature-fixups.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/feature-fixups.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/feature-fixups.h
@@ -8,8 +8,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#ifdef __ASSEMBLY__
-
 /*
  * Feature section common macros
  *
@@ -23,10 +21,12 @@
 /* 64 bits kernel, 32 bits code (ie. vdso32) */
 #define FTR_ENTRY_LONG .llong
 #define FTR_ENTRY_OFFSET   .long 0x; .long
+#elif defined(CONFIG_PPC64)
+#define FTR_ENTRY_LONG .llong
+#define FTR_ENTRY_OFFSET   .llong
 #else
-/* 64 bit kernel 64 bit code, or 32 bit kernel 32 bit code */
-#define FTR_ENTRY_LONG PPC_LONG
-#define FTR_ENTRY_OFFSET   PPC_LONG
+#define FTR_ENTRY_LONG .long
+#define FTR_ENTRY_OFFSET   .long
 #endif
 
 #define START_FTR_SECTION(label)   label##1:
@@ -141,6 +141,21 @@ label##5:  \
 #define ALT_FW_FTR_SECTION_END_IFCLR(msk)  \
ALT_FW_FTR_SECTION_END_NESTED_IFCLR(msk, 97)
 
+#ifndef __ASSEMBLY__
+
+#define ASM_MMU_FTR_IF_X(string, estring, msk, val)\
+   stringify_in_c(BEGIN_MMU_FTR_SECTION)   \
+   string ;  \
+   stringify_in_c(MMU_FTR_SECTION_ELSE)\
+   estring ; \
+   stringify_in_c(ALT_MMU_FTR_SECTION_END((msk), (val)))
+
+#define ASM_MMU_FTR_IFSET(string, estring, msk)\
+   ASM_MMU_FTR_IF_X(string, estring, (msk), (msk))
+
+#define ASM_MMU_FTR_IFCLR(string, estring, msk)\
+   ASM_MMU_FTR_IF_X(string, estring, (msk), 0)
+
 #endif /* __ASSEMBLY__ */
 
 /* LWSYNC feature sections */
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 2/2] powerpc: Add 2.06 tlbie mnemonics

2009-04-28 Thread Michael Neuling
From: Milton Miller milt...@bga.com

This adds the PowerPC 2.06 tlbie mnemonics and keeps backwards
compatibilty for CPUs before 2.06.

Only useful for bare metal systems.  

Signed-off-by: Milton Miller milt...@bga.com
Signed-off-by: Michael Neuling mi...@neuling.org
---

 arch/powerpc/include/asm/mmu.h|5 +
 arch/powerpc/include/asm/ppc-opcode.h |4 
 arch/powerpc/kernel/cputable.c|6 --
 arch/powerpc/mm/hash_native_64.c  |   13 +++--
 4 files changed, 24 insertions(+), 4 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/mmu.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
@@ -58,6 +58,11 @@
  */
 #define MMU_FTR_TLBILX_EARLY_OPCODEASM_CONST(0x0040)
 
+/* This indicates that the processor uses the ISA 2.06 server tlbie
+ * mnemonics
+ */
+#define MMU_FTR_TLBIE_206  ASM_CONST(0x0080)
+
 #ifndef __ASSEMBLY__
 #include asm/cputable.h
 
Index: linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/ppc-opcode.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
@@ -46,10 +46,12 @@
 #define PPC_INST_TLBILX0x7c24
 #define PPC_INST_TLBILX_EARLY  0x7c000626
 #define PPC_INST_WAIT  0x7c7c
+#define PPC_INST_TLBIE 0x7c000264
 
 /* macros to insert fields into opcodes */
 #define __PPC_RA(a)((a  0x1f)  16)
 #define __PPC_RB(b)((b  0x1f)  11)
+#define __PPC_RS(s)((s  0x1f)  21)
 #define __PPC_T_TLB(t) ((t  0x3)  21)
 #define __PPC_WC(w)((w  0x3)  21)
 
@@ -78,5 +80,7 @@
 #define PPC_TLBILX_VA_EARLY(a, b)  PPC_TLBILX_EARLY(3, a, b)
 #define PPC_WAIT(w)stringify_in_c(.long PPC_INST_WAIT | \
__PPC_WC(w))
+#define PPC_TLBIE(lp,a)stringify_in_c(.long PPC_INST_TLBIE | \
+  __PPC_RB(a) | __PPC_RS(lp))
 
 #endif /* _ASM_POWERPC_PPC_OPCODE_H */
Index: linux-2.6-ozlabs/arch/powerpc/kernel/cputable.c
===
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/cputable.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/cputable.c
@@ -425,7 +425,8 @@ static struct cpu_spec __initdata cpu_sp
.cpu_name   = POWER7 (architected),
.cpu_features   = CPU_FTRS_POWER7,
.cpu_user_features  = COMMON_USER_POWER7,
-   .mmu_features   = MMU_FTR_HPTE_TABLE,
+   .mmu_features   = MMU_FTR_HPTE_TABLE |
+   MMU_FTR_TLBIE_206,
.icache_bsize   = 128,
.dcache_bsize   = 128,
.machine_check  = machine_check_generic,
@@ -438,7 +439,8 @@ static struct cpu_spec __initdata cpu_sp
.cpu_name   = POWER7 (raw),
.cpu_features   = CPU_FTRS_POWER7,
.cpu_user_features  = COMMON_USER_POWER7,
-   .mmu_features   = MMU_FTR_HPTE_TABLE,
+   .mmu_features   = MMU_FTR_HPTE_TABLE |
+   MMU_FTR_TLBIE_206,
.icache_bsize   = 128,
.dcache_bsize   = 128,
.num_pmcs   = 6,
Index: linux-2.6-ozlabs/arch/powerpc/mm/hash_native_64.c
===
--- linux-2.6-ozlabs.orig/arch/powerpc/mm/hash_native_64.c
+++ linux-2.6-ozlabs/arch/powerpc/mm/hash_native_64.c
@@ -27,6 +27,7 @@
 #include asm/cputable.h
 #include asm/udbg.h
 #include asm/kexec.h
+#include asm/ppc-opcode.h
 
 #ifdef DEBUG_LOW
 #define DBG_LOW(fmt...) udbg_printf(fmt)
@@ -49,14 +50,21 @@ static inline void __tlbie(unsigned long
case MMU_PAGE_4K:
va = ~0xffful;
va |= ssize  8;
-   asm volatile(tlbie %0,0 : : r (va) : memory);
+   asm volatile(ASM_MMU_FTR_IFCLR(tlbie %0,0, PPC_TLBIE(%1,%0),
+  %2)
+: : r (va), r(0), i (MMU_FTR_TLBIE_206)
+: memory);
break;
default:
penc = mmu_psize_defs[psize].penc;
va = ~((1ul  mmu_psize_defs[psize].shift) - 1);
va |= penc  12;
va |= ssize  8;
-   asm volatile(tlbie %0,1 : : r (va) : memory);
+   va |= 1; /* L */
+   asm volatile(ASM_MMU_FTR_IFCLR(tlbie %0,1, PPC_TLBIE(%1,%0),
+  %2)
+: : r (va), r(0), i (MMU_FTR_TLBIE_206)
+: memory);
break;
}
 }
@@ -80,6 

[PATCH 0/5] rapidio: adding memory mapping IO support and misc fixes

2009-04-28 Thread Li Yang
The patch series add MMIO support to Linux rapidio and fix a few nits.
 The patches cross rapidio, netdev, powerpc sub-systems.  It will be
good for them to go through one tree.  Probably Andrew?  As the
previous rapidio patches are mostly merged by you.

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


[PATCH 1/2] powerpc: updating the linkstation_defconfig

2009-04-28 Thread Rogério Brito
Simple update of the linkstation_defconfig file for the 2.6.30-rc3 tree.

Signed-off-by: Rogério Brito rbr...@ime.usp.br
---

As asked, Kumar, here is a vanilla update.

--- a/arch/powerpc/configs/linkstation_defconfig2009-04-26 
11:55:06.0 -0300
+++ b/arch/powerpc/configs/linkstation_defconfig2009-04-28 
09:53:38.0 -0300
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.29-rc6
-# Fri Mar  6 00:07:38 2009
+# Linux kernel version: 2.6.30-rc3
+# Tue Apr 28 09:53:38 2009
 #
 # CONFIG_PPC64 is not set
 
@@ -14,6 +14,7 @@ CONFIG_6xx=y
 # CONFIG_40x is not set
 # CONFIG_44x is not set
 # CONFIG_E200 is not set
+CONFIG_PPC_BOOK3S=y
 CONFIG_PPC_FPU=y
 # CONFIG_ALTIVEC is not set
 CONFIG_PPC_STD_MMU=y
@@ -54,6 +55,7 @@ CONFIG_GENERIC_BUG=y
 CONFIG_DEFAULT_UIMAGE=y
 # CONFIG_PPC_DCR_NATIVE is not set
 # CONFIG_PPC_DCR_MMIO is not set
+CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
 CONFIG_DEFCONFIG_LIST=/lib/modules/$UNAME_RELEASE/.config
 
 #
@@ -68,6 +70,7 @@ CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
 CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 # CONFIG_TASKSTATS is not set
 # CONFIG_AUDIT is not set
@@ -100,21 +103,24 @@ CONFIG_NAMESPACES=y
 # CONFIG_NET_NS is not set
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=
+CONFIG_RD_GZIP=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
 CONFIG_SYSCTL=y
+CONFIG_ANON_INODES=y
 # CONFIG_EMBEDDED is not set
 CONFIG_SYSCTL_SYSCALL=y
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
+# CONFIG_STRIP_ASM_SYMS is not set
 CONFIG_HOTPLUG=y
 CONFIG_PRINTK=y
 CONFIG_BUG=y
 CONFIG_ELF_CORE=y
-# CONFIG_COMPAT_BRK is not set
 CONFIG_BASE_FULL=y
 CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
 CONFIG_EPOLL=y
 CONFIG_SIGNALFD=y
 CONFIG_TIMERFD=y
@@ -124,10 +130,12 @@ CONFIG_AIO=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_PCI_QUIRKS=y
 CONFIG_SLUB_DEBUG=y
+# CONFIG_COMPAT_BRK is not set
 # CONFIG_SLAB is not set
 CONFIG_SLUB=y
 # CONFIG_SLOB is not set
 # CONFIG_PROFILING is not set
+# CONFIG_MARKERS is not set
 CONFIG_HAVE_OPROFILE=y
 # CONFIG_KPROBES is not set
 CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
@@ -135,6 +143,7 @@ CONFIG_HAVE_IOREMAP_PROT=y
 CONFIG_HAVE_KPROBES=y
 CONFIG_HAVE_KRETPROBES=y
 CONFIG_HAVE_ARCH_TRACEHOOK=y
+# CONFIG_SLOW_WORK is not set
 # CONFIG_HAVE_GENERIC_DMA_COHERENT is not set
 CONFIG_SLABINFO=y
 CONFIG_RT_MUTEXES=y
@@ -147,7 +156,6 @@ CONFIG_MODULE_UNLOAD=y
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_BLOCK=y
 # CONFIG_LBD is not set
-# CONFIG_BLK_DEV_IO_TRACE is not set
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -168,8 +176,6 @@ CONFIG_DEFAULT_IOSCHED=anticipatory
 #
 # Platform support
 #
-CONFIG_PPC_MULTIPLATFORM=y
-CONFIG_CLASSIC32=y
 # CONFIG_PPC_CHRP is not set
 # CONFIG_MPC5121_ADS is not set
 # CONFIG_MPC5121_GENERIC is not set
@@ -191,6 +197,8 @@ CONFIG_LINKSTATION=y
 CONFIG_MPC10X_BRIDGE=y
 CONFIG_MPC10X_OPENPIC=y
 # CONFIG_MPC10X_STORE_GATHERING is not set
+# CONFIG_AMIGAONE is not set
+CONFIG_PPC_OF_BOOT_TRAMPOLINE=y
 # CONFIG_IPIC is not set
 CONFIG_MPIC=y
 # CONFIG_MPIC_WEIRD is not set
@@ -250,9 +258,12 @@ CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
 CONFIG_VIRT_TO_BUS=y
 CONFIG_UNEVICTABLE_LRU=y
+CONFIG_HAVE_MLOCK=y
+CONFIG_HAVE_MLOCKED_PAGE_BIT=y
 CONFIG_PPC_4K_PAGES=y
 # CONFIG_PPC_16K_PAGES is not set
 # CONFIG_PPC_64K_PAGES is not set
+# CONFIG_PPC_256K_PAGES is not set
 CONFIG_FORCE_MAX_ZONEORDER=11
 CONFIG_PROC_DEVICETREE=y
 # CONFIG_CMDLINE_BOOL is not set
@@ -277,6 +288,7 @@ CONFIG_ARCH_SUPPORTS_MSI=y
 # CONFIG_PCI_LEGACY is not set
 # CONFIG_PCI_DEBUG is not set
 # CONFIG_PCI_STUB is not set
+# CONFIG_PCI_IOV is not set
 # CONFIG_PCCARD is not set
 # CONFIG_HOTPLUG_PCI is not set
 # CONFIG_HAS_RAPIDIO is not set
@@ -299,7 +311,6 @@ CONFIG_NET=y
 #
 # Networking options
 #
-CONFIG_COMPAT_NET_DEV_OPS=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_UNIX=y
@@ -371,6 +382,7 @@ CONFIG_NETFILTER_XTABLES=m
 # CONFIG_NETFILTER_XT_TARGET_CLASSIFY is not set
 # CONFIG_NETFILTER_XT_TARGET_CONNMARK is not set
 # CONFIG_NETFILTER_XT_TARGET_DSCP is not set
+CONFIG_NETFILTER_XT_TARGET_HL=m
 # CONFIG_NETFILTER_XT_TARGET_MARK is not set
 # CONFIG_NETFILTER_XT_TARGET_NFLOG is not set
 # CONFIG_NETFILTER_XT_TARGET_NFQUEUE is not set
@@ -379,6 +391,7 @@ CONFIG_NETFILTER_XTABLES=m
 # CONFIG_NETFILTER_XT_TARGET_TRACE is not set
 # CONFIG_NETFILTER_XT_TARGET_TCPMSS is not set
 # CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
+# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set
 # CONFIG_NETFILTER_XT_MATCH_COMMENT is not set
 # CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set
 # CONFIG_NETFILTER_XT_MATCH_CONNLIMIT is not set
@@ -389,6 +402,7 @@ CONFIG_NETFILTER_XTABLES=m
 # CONFIG_NETFILTER_XT_MATCH_ESP is not set
 # CONFIG_NETFILTER_XT_MATCH_HASHLIMIT is not set
 # CONFIG_NETFILTER_XT_MATCH_HELPER is not set
+# CONFIG_NETFILTER_XT_MATCH_HL 

Re: [ewg] Re: [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc

2009-04-28 Thread Alexander Schmidt
Hi Roland,

did you have a chance to take a look at the patchset and will you apply it, or
are there any outstanding issues we need to address?

Regards,
Alex

On Wed, 22 Apr 2009 16:02:28 +0200
Stefan Roscher ossro...@linux.vnet.ibm.com wrote:

 In case of large queue pairs there is the possibillity of allocation failures 
 due to memory fragmentationo with kmalloc().To ensure the memory is allocated 
 even
 if kmalloc() can not find chunks which are big enough, we try to allocate the 
 memory
 with vmalloc().
 
 Signed-off-by: Stefan Roscher stefan.rosc...@de.ibm.com
 ---
 
 On Tuesday 21 April 2009 07:34:30 pm Roland Dreier wrote:
+queue-queue_pages = kmalloc(nr_of_pages * sizeof(void *), 
  GFP_KERNEL);
  
  How big might this buffer be?  Any chance of allocation failure due to
  memory fragmentation?
  
   - R.
 Hey Roland, 
 yes you are right and here is the patch to circumvent the described problem.
 It will apply on top of the patchset.
 regards Stefan
 
 
 
  drivers/infiniband/hw/ehca/ipz_pt_fn.c |   17 +
  1 files changed, 13 insertions(+), 4 deletions(-)
 
 diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c 
 b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
 index a260559..1227c59 100644
 --- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c
 +++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c
 @@ -222,8 +222,11 @@ int ipz_queue_ctor(struct ehca_pd *pd, struct ipz_queue 
 *queue,
   /* allocate queue page pointers */
   queue-queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL);
   if (!queue-queue_pages) {
 - ehca_gen_err(Couldn't allocate queue page list);
 - return 0;
 + queue-queue_pages = vmalloc(nr_of_pages * sizeof(void *));
 + if (!queue-queue_pages) {
 + ehca_gen_err(Couldn't allocate queue page list);
 + return 0;
 + }
   }
   memset(queue-queue_pages, 0, nr_of_pages * sizeof(void *));
 
 @@ -240,7 +243,10 @@ int ipz_queue_ctor(struct ehca_pd *pd, struct ipz_queue 
 *queue,
  ipz_queue_ctor_exit0:
   ehca_gen_err(Couldn't alloc pages queue=%p 
nr_of_pages=%x,  queue, nr_of_pages);
 - kfree(queue-queue_pages);
 + if (is_vmalloc_addr(queue-queue_pages))
 + vfree(queue-queue_pages);
 + else
 + kfree(queue-queue_pages);
 
   return 0;
  }
 @@ -262,7 +268,10 @@ int ipz_queue_dtor(struct ehca_pd *pd, struct ipz_queue 
 *queue)
   free_page((unsigned long)queue-queue_pages[i]);
   }
 
 - kfree(queue-queue_pages);
 + if (is_vmalloc_addr(queue-queue_pages))
 + vfree(queue-queue_pages);
 + else
 + kfree(queue-queue_pages);
 
   return 1;
  }
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] powerpc: Fix up elf_read_implies_exec() usage

2009-04-28 Thread Kumar Gala
On ppc64 we implemented elf_read_implies_exec() for 32-bit binaries
because old toolchains had bugs with regards to marking PHDRs as
executable that needed to be.  For some reason we didn't do this on
ppc32 builds.  This hadn't been an issue until recent changes to I$/D$
handling that impacted the per-page exec handling on embedded PPC.

Additionally we believe if a toolchain supported PT_GNU_STACK that it
sets the proper PHDR permissions so we only have elf_read_implies_exec()
true if we don't see PT_GNU_STACK set.

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---

Paul, please pick this up for 2.6.30 and send onto linus.

- k

 arch/powerpc/include/asm/elf.h |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index 087c22f..014a624 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -256,10 +256,11 @@ do {  
\
  * even if we have an executable stack.
  */
 # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
-   (exec_stk != EXSTACK_DISABLE_X) : 0)
+   (exec_stk == EXSTACK_DEFAULT) : 0)
 #else
 # define SET_PERSONALITY(ex) \
   set_personality(PER_LINUX | (current-personality  (~PER_MASK)))
+# define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT)
 #endif /* __powerpc64__ */

 extern int dcache_bsize;
-- 
1.6.0.6

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


Re: [PATCH 2/2] powerpc: Add 2.06 tlbie mnemonics

2009-04-28 Thread Kumar Gala


On Apr 28, 2009, at 7:45 AM, Michael Neuling wrote:


Index: linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/mmu.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
@@ -58,6 +58,11 @@
 */
#define MMU_FTR_TLBILX_EARLY_OPCODE ASM_CONST(0x0040)

+/* This indicates that the processor uses the ISA 2.06 server tlbie
+ * mnemonics
+ */
+#define MMU_FTR_TLBIE_206  ASM_CONST(0x0080)
+
#ifndef __ASSEMBLY__
#include asm/cputable.h


You aren't going to like me, but I just got rid of  
MMU_FTR_TLBILX_EARLY_OPCODE and thus freed up 0x0040.  So a) patch  
will probably bitch when being applied by Ben b) we should use  
0x0040.


(suggest pulling in paulus/merge as that has the revert patch that  
removes MMU_FTR_TLBILX_EARLY_OPCODE - and paul's sent a pull request  
to linus for it.)


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


Re: [PATCH] powerpc: minimizing the configuration of linkstation_defconfig

2009-04-28 Thread Kumar Gala


On Apr 27, 2009, at 9:27 PM, Rogério Brito wrote:


Hi, Kumar.

On Apr 27 2009, Kumar Gala wrote:


On Apr 24, 2009, at 5:33 PM, Rogério Brito wrote:

04. disable CONFIG_BLK_DEV_RAM.


do we not allow booting a ramdisk?


Well, do we need a block device in ram to use initramfs?

(...)


I'm pretty sure we need this for old initrd style ramdisks so I'd  
prefer we leave it enabled.



Dear Kumar, please, apply this one.

I have another patch regarding one regression regarding MTD 
PHYSMAP_COMPAT that I plan to send on top of this one.


Ok, can we look at just specifying such info in the linkstation  
device

tree.


Thanks. The MTD  PHYMAP_COMPAT are the things that have been  
bugging me
and my main reason to keep with the bleeding edge kernels is to get  
things

whey they were (regarding mtd) as in kernel 2.6.28.

As I have no experience with MTD devices, I would appreciate a  
reference to
their workings... All that I know is that all my /dev/mtd* devices  
are gone

if I boot a 2.6.29* kernel.

Of course, I can do a git bisect process (since the MTD subsystem  
doesn't
work as it did in the past even if I enable PHYMAP_COMPAT and put  
the same

settings there, quite unfortunately).


ok.. I killed my kurobox long ago so can't be much help here.

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


Re: [PATCH] powerpc: Fix up elf_read_implies_exec() usage

2009-04-28 Thread Kumar Gala


On Apr 28, 2009, at 8:08 AM, Kumar Gala wrote:


On ppc64 we implemented elf_read_implies_exec() for 32-bit binaries
because old toolchains had bugs with regards to marking PHDRs as
executable that needed to be.  For some reason we didn't do this on
ppc32 builds.  This hadn't been an issue until recent changes to I$/D$
handling that impacted the per-page exec handling on embedded PPC.

Additionally we believe if a toolchain supported PT_GNU_STACK that it
sets the proper PHDR permissions so we only have  
elf_read_implies_exec()

true if we don't see PT_GNU_STACK set.

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---

Paul, please pick this up for 2.6.30 and send onto linus.

- k


oops.. didn't see you grabbed the old one already.  I'll send a new  
patch based on it to switch to testing against EXSTACK_DEFAULT


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


[PATCH v2] powerpc: Fix up elf_read_implies_exec() usage

2009-04-28 Thread Kumar Gala
We believe if a toolchain supports PT_GNU_STACK that it sets the proper
PHDR permissions.  Therefor elf_read_implies_exec() should only be true
if we don't see PT_GNU_STACK set.

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---
* Rebased patch on paulus/merge tree which picked up an older patch to fixed
  elf_read_implies_exec() on pure PPC32 systems but not in the way we desired.

Paul, lets try this one for .30.

- k

 arch/powerpc/include/asm/elf.h |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h
index d6b4a12..014a624 100644
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -256,11 +256,11 @@ do {  
\
  * even if we have an executable stack.
  */
 # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \
-   (exec_stk != EXSTACK_DISABLE_X) : 0)
+   (exec_stk == EXSTACK_DEFAULT) : 0)
 #else 
 # define SET_PERSONALITY(ex) \
   set_personality(PER_LINUX | (current-personality  (~PER_MASK)))
-# define elf_read_implies_exec(ex, exec_stk) (exec_stk != EXSTACK_DISABLE_X)
+# define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT)
 #endif /* __powerpc64__ */
 
 extern int dcache_bsize;
-- 
1.6.0.6

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


[PATCH 2/2] powerpc: minimizing the configuration of linkstation_defconfig

2009-04-28 Thread Rogério Brito
This patch addresses the following issues:


01. makes CFQ the default scheduler, to be in line with the rest of  
the kernel.

02. since linkstations are meant to store files, enable large blk  
devices.

03. disable CONFIG_MIGRATION in in such low memory devices.

04. disable CONFIG_BLK_DEV_RAM.

05. disable CONFIG_SCSI_LOWLEVEL, as no device under that tree is  
used.

06. idem for CONFIG_NETDEV_1.

07. idem for CONFIG_WIRELESS.

08. idem for CONFIG_HWMON.

09. idem for CONFIG_CRYPTO_HW.

10. disable CONFIG_VIDEO_OUTPUT_CONTROL.

11. keep consistency and disable extended attributes in CIFS, ext3,  
and NFS.

12. enable CONFIG_PRINTK_TIME.

Signed-off-by: Rogério Brito rbr...@ime.usp.br

---

This is the patch for tidying the defconfig.

--- a/arch/powerpc/configs/linkstation_defconfig2009-04-28 
09:53:38.0 -0300
+++ b/arch/powerpc/configs/linkstation_defconfig2009-04-28 
10:14:11.0 -0300
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.30-rc3
-# Tue Apr 28 09:53:38 2009
+# Tue Apr 28 10:14:11 2009
 #
 # CONFIG_PPC64 is not set
 
@@ -155,7 +155,7 @@
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_BLOCK=y
-# CONFIG_LBD is not set
+CONFIG_LBD=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -166,11 +166,11 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_AS is not set
 # CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_DEFAULT_IOSCHED=cfq
 # CONFIG_FREEZER is not set
 
 #
@@ -252,7 +252,7 @@
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
+# CONFIG_MIGRATION is not set
 # CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
@@ -492,13 +492,7 @@
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-CONFIG_WIRELESS=y
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_OLD_REGULATORY=y
-CONFIG_WIRELESS_EXT=y
-CONFIG_WIRELESS_EXT_SYSFS=y
-# CONFIG_LIB80211 is not set
-# CONFIG_MAC80211 is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
@@ -625,10 +619,7 @@
 # CONFIG_BLK_DEV_NBD is not set
 # CONFIG_BLK_DEV_SX8 is not set
 # CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=2
-CONFIG_BLK_DEV_RAM_SIZE=8192
-# CONFIG_BLK_DEV_XIP is not set
+# CONFIG_BLK_DEV_RAM is not set
 # CONFIG_CDROM_PKTCDVD is not set
 # CONFIG_ATA_OVER_ETH is not set
 # CONFIG_BLK_DEV_HD is not set
@@ -688,49 +679,7 @@
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
-CONFIG_SCSI_LOWLEVEL=y
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_SCSI_CXGB3_ISCSI is not set
-# CONFIG_BLK_DEV_3W__RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_AIC94XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_ARCMSR is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_MPT2SAS is not set
-# CONFIG_SCSI_HPTIOP is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_LIBFC is not set
-# CONFIG_LIBFCOE is not set
-# CONFIG_FCOE is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_MVSAS is not set
-# CONFIG_SCSI_STEX is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_QLA_ISCSI is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_SRP is not set
+# CONFIG_SCSI_LOWLEVEL is not set
 # CONFIG_SCSI_DH is not set
 # CONFIG_SCSI_OSD_INITIATOR is not set
 CONFIG_ATA=y
@@ -872,25 +821,7 @@
 # CONFIG_ATL1E is not set
 # CONFIG_ATL1C is not set
 # CONFIG_JME is not set
-CONFIG_NETDEV_1=y
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_CHELSIO_T3_DEPENDS=y
-# CONFIG_CHELSIO_T3 is not set
-# CONFIG_ENIC is not set
-# CONFIG_IXGBE is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_VXGE is not set
-# CONFIG_MYRI10GE is not set
-# CONFIG_NETXEN_NIC is not set
-# CONFIG_NIU is not set
-# CONFIG_MLX4_EN is not set
-# CONFIG_MLX4_CORE is not set
-# CONFIG_TEHUTI is not set
-# CONFIG_BNX2X is not set
-# CONFIG_QLGE is not set

Re: [PATCH] net: Fix ucc_geth.c handling of phy 'interface' property.

2009-04-28 Thread Grant Likely
On Tue, Apr 28, 2009 at 3:12 AM, David Miller da...@davemloft.net wrote:
 From: Grant Likely grant.lik...@secretlab.ca
 Date: Mon, 27 Apr 2009 11:50:20 -0600

 On Mon, Apr 27, 2009 at 11:36 AM, Scott Wood scottw...@freescale.com wrote:
 On Mon, Apr 27, 2009 at 09:36:13AM -0600, Grant Likely wrote:
 From: Grant Likely grant.lik...@secretlab.ca

 Previous rework to ucc_geth.c to add of_mdio support (net: Rework
 ucc_geth driver to use of_mdio infrastructure) added a block of
 code which broke older openfirmware device trees which use an
 'interface' property in the phy node to describe the connection
 between the MAC and the PHY.  This patch removes the offending blurb.
 [snip]
       prop = of_get_property(np, phy-connection-type, NULL);
       if (!prop) {
               /* handle interface property present in old trees */
 -             if (!phy)
 -                     return -ENODEV;
 -
               prop = of_get_property(phy, interface, NULL);
               if (prop != NULL) {
                       phy_interface = enet_to_phy_interface[*prop];

 The above test only makes a difference when there is no phy node -- so I
 don't see how it was breaking device trees that had a phy node (with or
 without an interface property).  I can see it breaking fixed link
 device trees, though.

 Sorry, you're right.  I got myself confused when I was writing the
 description.  This patch fixes breakage when using a fixed-link and
 there is no phy-connection-type property.

 Patch applied with commit message fixed up.

Thanks David

g.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH] fsldma: use PCI Read Multiple command

2009-04-28 Thread Timur Tabi
David Hawkins wrote:
 How about FIFO RAM case?
 
 If the FIFO has a fixed address, then according to
 the user guide, the DMA controller won't generate
 a burst transaction to it.
 
 We can try confirming this if you'd like.

Like I said earlier, this driver does not support copying data to/from a
single register address.  It's just a off-loaded memcpy.  So we don't
need to worry about what happens to a fixed address.

-- 
Timur Tabi
Linux kernel developer at Freescale
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: removing get_immrbase()??

2009-04-28 Thread Timur Tabi
David Gibson wrote:
 On Wed, Apr 22, 2009 at 11:41:31PM -0500, Kumar Gala wrote:
 Lets say I had an error driver for our MCM (core to soc coherency  
 module).  It was getting the base address by using get_immrbase().   
 Today I proposed a proper device node for the MCM block as it doesn't  
 exist in .dts today.  We add such a node into .dts and I can clean up my 
 error driver to use proper device node information.  However I've just 
 broken any old .dts that didn't have this node.  You are saying I need to 
 add code into the kernel to create this new node and we have to keep that 
 code around for ever in the kernel.. why would I ever bother to actually 
 changing anything than.
 
 Well, again.  It's a judgement call, balancing the pain of having to
 update the dts files (which depends on how widely deployed the
 platform is) versus the pain of having to keep the bacwards
 compatibility shim in the kernel.

I agree with this sentiment.  I'm only asking for a reasonable attempt
at adding backwards compatibility via an isolated code block.  Sprinkle
in a few comments, and that should be enough.  It won't always be
possible to add such code, but at the very least, I expect the
driver/kernel to clearly indicate what's missing from the device tree.
In Kumar's example above, I expect the kernel to say that the MCM node
is missing.

-- 
Timur Tabi
Linux kernel developer at Freescale
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] of: make of_(un)register_platform_driver common code.

2009-04-28 Thread Grant Likely
From: Grant Likely grant.lik...@secretlab.ca

Some drivers using of_register_platform_driver() wrapper break on sparc
because the wrapper isn't in the header file.  This patch moves it from
Microblaze and PowerPC implementations and makes it common code.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
Acked-by: David S. Miller da...@davemloft.net
---

 arch/microblaze/include/asm/of_platform.h |   10 --
 arch/powerpc/include/asm/of_platform.h|   10 --
 include/linux/of_platform.h   |   10 ++
 3 files changed, 10 insertions(+), 20 deletions(-)


diff --git a/arch/microblaze/include/asm/of_platform.h 
b/arch/microblaze/include/asm/of_platform.h
index 187c0ee..3749127 100644
--- a/arch/microblaze/include/asm/of_platform.h
+++ b/arch/microblaze/include/asm/of_platform.h
@@ -36,16 +36,6 @@ static const struct of_device_id of_default_bus_ids[] = {
{},
 };
 
-/* Platform drivers register/unregister */
-static inline int of_register_platform_driver(struct of_platform_driver *drv)
-{
-   return of_register_driver(drv, of_platform_bus_type);
-}
-static inline void of_unregister_platform_driver(struct of_platform_driver 
*drv)
-{
-   of_unregister_driver(drv);
-}
-
 /* Platform devices and busses creation */
 extern struct of_device *of_platform_device_create(struct device_node *np,
const char *bus_id,
diff --git a/arch/powerpc/include/asm/of_platform.h 
b/arch/powerpc/include/asm/of_platform.h
index 53b4650..d4aaa34 100644
--- a/arch/powerpc/include/asm/of_platform.h
+++ b/arch/powerpc/include/asm/of_platform.h
@@ -11,16 +11,6 @@
  *
  */
 
-/* Platform drivers register/unregister */
-static inline int of_register_platform_driver(struct of_platform_driver *drv)
-{
-   return of_register_driver(drv, of_platform_bus_type);
-}
-static inline void of_unregister_platform_driver(struct of_platform_driver 
*drv)
-{
-   of_unregister_driver(drv);
-}
-
 /* Platform devices and busses creation */
 extern struct of_device *of_platform_device_create(struct device_node *np,
   const char *bus_id,
diff --git a/include/linux/of_platform.h b/include/linux/of_platform.h
index 3d327b6..9084066 100644
--- a/include/linux/of_platform.h
+++ b/include/linux/of_platform.h
@@ -51,6 +51,16 @@ extern int of_register_driver(struct of_platform_driver *drv,
  struct bus_type *bus);
 extern void of_unregister_driver(struct of_platform_driver *drv);
 
+/* Platform drivers register/unregister */
+static inline int of_register_platform_driver(struct of_platform_driver *drv)
+{
+   return of_register_driver(drv, of_platform_bus_type);
+}
+static inline void of_unregister_platform_driver(struct of_platform_driver 
*drv)
+{
+   of_unregister_driver(drv);
+}
+
 #include asm/of_platform.h
 
 extern struct of_device *of_find_device_by_node(struct device_node *np);

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


Re: [ewg] Re: [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc

2009-04-28 Thread Alexander Schmidt
On Tue, 28 Apr 2009 07:01:32 -0700
Roland Dreier rdre...@cisco.com wrote:

   did you have a chance to take a look at the patchset and will you apply 
 it, or
   are there any outstanding issues we need to address?
 
 I guess it's OK, but definitely 2.6.31 material.  I guess I'll stick it
 linux-next soon.
 
  - R.

Okay with us, thank you very much!

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


Re: [ewg] Re: [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc

2009-04-28 Thread Roland Dreier
  did you have a chance to take a look at the patchset and will you apply it, 
  or
  are there any outstanding issues we need to address?

I guess it's OK, but definitely 2.6.31 material.  I guess I'll stick it
linux-next soon.

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


[PATCH] gianfar: Use memset instead of cacheable_memzero

2009-04-28 Thread Kumar Gala
cacheable_memzero() is completely overkill for the clearing out the FCB
block which is only 8-bytes.  The compiler should easily optimize this
with memset.  Additionally, cacheable_memzero() only exists on ppc32 and
thus breaks builds of gianfar on ppc64.

Signed-off-by: Kumar Gala ga...@kernel.crashing.org
---
 drivers/net/gianfar.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index dae1437..2bb038b 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -1207,7 +1207,8 @@ static int gfar_enet_open(struct net_device *dev)
 static inline struct txfcb *gfar_add_fcb(struct sk_buff *skb)
 {
struct txfcb *fcb = (struct txfcb *)skb_push(skb, GMAC_FCB_LEN);
-   cacheable_memzero(fcb, GMAC_FCB_LEN);
+
+   memset(fcb, 0, GMAC_FCB_LEN);
 
return fcb;
 }
-- 
1.6.0.6

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


Re: [PATCH] powerpc: minimizing the configuration of linkstation_defconfig

2009-04-28 Thread Rogério Brito
On Apr 28 2009, Kumar Gala wrote:
 I'm pretty sure we need this for old initrd style ramdisks so I'd prefer 
 we leave it enabled.

Oh, for oldstyle it is needed. You're right. It is better to keep it in
the defconfig. Just drop the hunk from the patch that I sent you.

 Thanks. The MTD  PHYMAP_COMPAT are the things that have been bugging
 me and my main reason to keep with the bleeding edge kernels is to
 get things whey they were (regarding mtd) as in kernel 2.6.28.

 As I have no experience with MTD devices, I would appreciate a
 reference to their workings... All that I know is that all my
 /dev/mtd* devices are gone if I boot a 2.6.29* kernel.

 Of course, I can do a git bisect process (since the MTD subsystem
 doesn't work as it did in the past even if I enable PHYMAP_COMPAT and
 put the same settings there, quite unfortunately).

 ok.. I killed my kurobox long ago so can't be much help here.

Oh... :-(

I will post the problems that I get with MTD on my kurobox so that
people from both the linux-mtd/linuxppc-dev lists can see what is
happening and suggest some fixes.


Thanks, Rogério Brito.

-- 
Rogério Brito : rbr...@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Re: [PATCH] gianfar: Use memset instead of cacheable_memzero

2009-04-28 Thread David Miller
From: Kumar Gala ga...@kernel.crashing.org
Date: Tue, 28 Apr 2009 09:14:01 -0500

 cacheable_memzero() is completely overkill for the clearing out the FCB
 block which is only 8-bytes.  The compiler should easily optimize this
 with memset.  Additionally, cacheable_memzero() only exists on ppc32 and
 thus breaks builds of gianfar on ppc64.
 
 Signed-off-by: Kumar Gala ga...@kernel.crashing.org

Applied to net-next-2.6, thanks!
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 11/14] powerpc: Use macros for .data.page_aligned section.

2009-04-28 Thread Stephen Rothwell
Hi Tim,

Firstly, patches for a particular architecture should really be cc'd to
the list associated with that architecture.  In this case,
linuxppc-dev@ozlabs.org (cc'd).

On Mon, 27 Apr 2009 16:33:05 -0400 Tim Abbott tabb...@mit.edu wrote:

 +++ b/arch/powerpc/kernel/vmlinux.lds.S
 @@ -222,6 +222,7 @@ SECTIONS
  
  #ifdef CONFIG_PPC32
   .data : AT(ADDR(.data) - LOAD_OFFSET) {
 + PAGE_ALIGNED_DATA
   DATA_DATA
   *(.sdata)
   *(.got.plt) *(.got)
 @@ -259,11 +260,6 @@ SECTIONS
   *(.data.init_task)
   }
  
 - . = ALIGN(PAGE_SIZE);
 - .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
 - *(.data.page_aligned)
 - }
 -

This moves the page_aligned section from a common part of the
vmlinux.lds to a 32 bit only part.  Was that intentional?

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


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

Re: [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc

2009-04-28 Thread Dave Hansen
On Tue, 2009-04-21 at 17:16 +0200, Stefan Roscher wrote:
 From: Anton Blanchard antonb at au1.ibm.com
 
 To improve performance of driver ressource allocation,
 replace the vmalloc() call with kmalloc().

Just curious, but how big are these allocations?  Why was vmalloc() even
ever used if we know they'll be small?

-- Dave

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


Re: [PATCH 11/14] powerpc: Use macros for .data.page_aligned section.

2009-04-28 Thread Stephen Rothwell
On Wed, 29 Apr 2009 01:07:53 +1000 Stephen Rothwell s...@canb.auug.org.au 
wrote:

 This moves the page_aligned section from a common part of the
 vmlinux.lds to a 32 bit only part.  Was that intentional?

Just saw your later patches, so ignore this.

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/


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

Re: [PATCH 11/14] powerpc: Use macros for .data.page_aligned section.

2009-04-28 Thread Tim Abbott
On Wed, 29 Apr 2009, Stephen Rothwell wrote:

 This moves the page_aligned section from a common part of the
 vmlinux.lds to a 32 bit only part.  Was that intentional?

No.  See my reply to this patch from last night 
http://lkml.org/lkml/2009/4/28/16 and the revised pair of patches in 
reply to that message that replace PATCH 11/14.

-Tim Abbott
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Please revert edada399 and 9203fc9c

2009-04-28 Thread Tim Abbott
 Please revert commits edada399 (powerpc: Use TEXT_TEXT macro in
 linker script.) and 9203fc9c (powerpc: Use __REF macro instead of
 old .text.init.refok.), which depends on edada399.

Paul,

Sorry for breaking the build.  I will be sure to CC you and 
linuxppc-dev@ozlabs.org on future powerpc patches in this section name 
cleanup project.

I think just reverting commits edada399 and 9203fc9c will cause a section 
mismatch warning since commit 27b18332 removed the support code for the 
.text.init.refok section.  The following patch I believe should fix this 
by effectively reverting just commit edada399.  Can someone who has a 
64-bit powerpc machine confirm?

-Tim Abbott

--

powerpc: Revert switch to TEXT_TEXT in linker script

Commit edada399 broke the build on 64-bit powerpc because it moved the
__ftr_alt_* sections of a file away from the .text section, causing
link failures due to relative conditional branch targets being too far
away from the branch instructions.  This happens on pretty much all
64-bit powerpc configs.

This change reverts commit edada399 while preserving the update from
the *.refok sections to .ref.text that has happened since.

Signed-off-by: Tim Abbott tabb...@mit.edu
---
 arch/powerpc/kernel/vmlinux.lds.S |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/vmlinux.lds.S 
b/arch/powerpc/kernel/vmlinux.lds.S
index 433ae11..a047a6c 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -54,8 +54,8 @@ SECTIONS
ALIGN_FUNCTION();
HEAD_TEXT
_text = .;
-   TEXT_TEXT
-   *(.fixup __ftr_alt_*)
+   /* careful! __ftr_alt_* sections need to be close to .text */
+   *(.text .fixup __ftr_alt_* .ref.text)
SCHED_TEXT
LOCK_TEXT
KPROBES_TEXT
-- 
1.6.2.1

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


[PATCH] powerpc/virtex: Add uImage to the default images list

2009-04-28 Thread Grant Likely
From: Grant Likely grant.lik...@secretlab.ca

It is common to use U-Boot on Xilinx Virtex platforms.  This patch
ensures that CONFIG_DEFAULT_UIMAGE is selected for virtex

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 arch/powerpc/platforms/40x/Kconfig |1 +
 arch/powerpc/platforms/44x/Kconfig |1 +
 2 files changed, 2 insertions(+), 0 deletions(-)


diff --git a/arch/powerpc/platforms/40x/Kconfig 
b/arch/powerpc/platforms/40x/Kconfig
index 14e027f..f39c953 100644
--- a/arch/powerpc/platforms/40x/Kconfig
+++ b/arch/powerpc/platforms/40x/Kconfig
@@ -153,6 +153,7 @@ config 405GPR
 
 config XILINX_VIRTEX
bool
+   select DEFAULT_UIMAGE
 
 config XILINX_VIRTEX_II_PRO
bool
diff --git a/arch/powerpc/platforms/44x/Kconfig 
b/arch/powerpc/platforms/44x/Kconfig
index bf5c7ff..0d83a6a 100644
--- a/arch/powerpc/platforms/44x/Kconfig
+++ b/arch/powerpc/platforms/44x/Kconfig
@@ -246,6 +246,7 @@ config IBM440EP_ERR42
 # Xilinx specific config options.
 config XILINX_VIRTEX
bool
+   select DEFAULT_UIMAGE
 
 # Xilinx Virtex 5 FXT FPGA architecture, selected by a Xilinx board above
 config XILINX_VIRTEX_5_FXT

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


Re: [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc

2009-04-28 Thread Stefan Roscher
On Tuesday 28 April 2009 05:12:51 pm Dave Hansen wrote:
 On Tue, 2009-04-21 at 17:16 +0200, Stefan Roscher wrote:
  From: Anton Blanchard antonb at au1.ibm.com
  
  To improve performance of driver ressource allocation,
  replace the vmalloc() call with kmalloc().
 
 Just curious, but how big are these allocations?  Why was vmalloc() even
 ever used if we know they'll be small?
 
 -- Dave
 
 

The theoretical maximum size can be 512k, but for common queue pairs 
less than 128k is used.Because of the theoretical maximum we implemented
vmalloc() first, but recognized a huge performance impact.

-- Stefan 

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


Re: [PATCH] powerpc: minimizing the configuration of linkstation_defconfig

2009-04-28 Thread Kumar Gala


On Apr 28, 2009, at 9:48 AM, Rogério Brito wrote:


On Apr 28 2009, Kumar Gala wrote:
I'm pretty sure we need this for old initrd style ramdisks so I'd  
prefer

we leave it enabled.


Oh, for oldstyle it is needed. You're right. It is better to keep it  
in

the defconfig. Just drop the hunk from the patch that I sent you.


just send a new patch w/this fixed.

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


Re: [PATCH] 83xx: add support for the kmeter1 board.

2009-04-28 Thread Scott Wood
On Tue, Apr 28, 2009 at 06:42:43AM +0200, Heiko Schocher wrote:
 Scott Wood wrote:
  On Mon, Apr 27, 2009 at 07:38:38AM +0200, Heiko Schocher wrote:
  1) add in the soc node an errata node and in this errata node
 we can add all CPU specific errata as an example the qe_enet10
 errata, which above code covers:
  
  What about errata discovered after the device tree is deployed?
 
 Didn;t know that there are such errata. Ok, this is a problem.

Bugs can be discovered at any point in time.

  The presence of the erratum itself is indicated by the presence of the
  buggy device, possibly in conjunction with SVR if the device tree is not
  specific enough.
 
 Ah, Ok, that was just an idea ... so, where and how to solve the qe_enet10
 errata without using get_immrbase()

Get the register block address from the par_io node.

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


[PATCH 2/2] powerpc: minimizing the configuration of linkstation_defconfig

2009-04-28 Thread Rogério Brito

This patch addresses the following issues:

01. makes CFQ the default scheduler, to be in line with the rest of  
the kernel.

02. since linkstations are meant to store files, enable large blk  
devices.

03. disable CONFIG_MIGRATION in in such low memory devices.

04. disable CONFIG_SCSI_LOWLEVEL, as no device under that tree is  
used.

05. idem for CONFIG_NETDEV_1.

06. idem for CONFIG_WIRELESS.

07. idem for CONFIG_HWMON.

08. idem for CONFIG_CRYPTO_HW.

09. disable CONFIG_VIDEO_OUTPUT_CONTROL.

10. keep consistency and disable extended attributes in CIFS, ext3,  
and NFS.

11. enable CONFIG_PRINTK_TIME.

Signed-off-by: Rogério Brito rbr...@ime.usp.br

---

Here is the fixed patch. Thank you very much, Kumar.

--- a/arch/powerpc/configs/linkstation_defconfig2009-04-28 
09:53:38.0 -0300
+++ b/arch/powerpc/configs/linkstation_defconfig2009-04-28 
10:14:11.0 -0300
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.30-rc3
-# Tue Apr 28 09:53:38 2009
+# Tue Apr 28 10:14:11 2009
 #
 # CONFIG_PPC64 is not set
 
@@ -155,7 +155,7 @@
 # CONFIG_MODVERSIONS is not set
 # CONFIG_MODULE_SRCVERSION_ALL is not set
 CONFIG_BLOCK=y
-# CONFIG_LBD is not set
+CONFIG_LBD=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_BLK_DEV_INTEGRITY is not set
 
@@ -166,11 +166,11 @@
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
+# CONFIG_DEFAULT_AS is not set
 # CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
+CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED=anticipatory
+CONFIG_DEFAULT_IOSCHED=cfq
 # CONFIG_FREEZER is not set
 
 #
@@ -252,7 +252,7 @@
 CONFIG_FLAT_NODE_MEM_MAP=y
 CONFIG_PAGEFLAGS_EXTENDED=y
 CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
+# CONFIG_MIGRATION is not set
 # CONFIG_PHYS_ADDR_T_64BIT is not set
 CONFIG_ZONE_DMA_FLAG=1
 CONFIG_BOUNCE=y
@@ -492,13 +492,7 @@
 # CONFIG_IRDA is not set
 # CONFIG_BT is not set
 # CONFIG_AF_RXRPC is not set
-CONFIG_WIRELESS=y
-# CONFIG_CFG80211 is not set
-CONFIG_WIRELESS_OLD_REGULATORY=y
-CONFIG_WIRELESS_EXT=y
-CONFIG_WIRELESS_EXT_SYSFS=y
-# CONFIG_LIB80211 is not set
-# CONFIG_MAC80211 is not set
+# CONFIG_WIRELESS is not set
 # CONFIG_WIMAX is not set
 # CONFIG_RFKILL is not set
 # CONFIG_NET_9P is not set
@@ -688,49 +679,7 @@
 # CONFIG_SCSI_ISCSI_ATTRS is not set
 # CONFIG_SCSI_SAS_LIBSAS is not set
 # CONFIG_SCSI_SRP_ATTRS is not set
-CONFIG_SCSI_LOWLEVEL=y
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_SCSI_CXGB3_ISCSI is not set
-# CONFIG_BLK_DEV_3W__RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_AIC94XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_ARCMSR is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_MPT2SAS is not set
-# CONFIG_SCSI_HPTIOP is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_LIBFC is not set
-# CONFIG_LIBFCOE is not set
-# CONFIG_FCOE is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_MVSAS is not set
-# CONFIG_SCSI_STEX is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_QLA_ISCSI is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_SRP is not set
+# CONFIG_SCSI_LOWLEVEL is not set
 # CONFIG_SCSI_DH is not set
 # CONFIG_SCSI_OSD_INITIATOR is not set
 CONFIG_ATA=y
@@ -872,25 +821,7 @@
 # CONFIG_ATL1E is not set
 # CONFIG_ATL1C is not set
 # CONFIG_JME is not set
-CONFIG_NETDEV_1=y
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_CHELSIO_T3_DEPENDS=y
-# CONFIG_CHELSIO_T3 is not set
-# CONFIG_ENIC is not set
-# CONFIG_IXGBE is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_VXGE is not set
-# CONFIG_MYRI10GE is not set
-# CONFIG_NETXEN_NIC is not set
-# CONFIG_NIU is not set
-# CONFIG_MLX4_EN is not set
-# CONFIG_MLX4_CORE is not set
-# CONFIG_TEHUTI is not set
-# CONFIG_BNX2X is not set
-# CONFIG_QLGE is not set
-# CONFIG_SFC is not set
-# CONFIG_BE2NET is not set
+# CONFIG_NETDEV_1 is not set
 # CONFIG_TR is not set
 
 #
@@ -1085,68 +1016,7 @@
 # CONFIG_GPIOLIB is not set
 # CONFIG_W1 is not set
 # CONFIG_POWER_SUPPLY is not set
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_AD7414 is not set
-# CONFIG_SENSORS_AD7418 is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# 

Re: [PATCH 1/3] IB/ehca: Replace vmalloc with kmalloc

2009-04-28 Thread Roland Dreier
thanks, applied.

  From: Anton Blanchard antonb at au1.ibm.com
  Signed-off-by: Stefan Roscher stefan.roscher at de.ibm.com

please use '@' signs so these are real email addresses.

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


Re: [PATCH 3/3] IB/ehca: Increment version number

2009-04-28 Thread Roland Dreier
thanks, applied 2  3.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH] powerpc: Update MPC5xxx and Xilinx Virtex maintainer entries

2009-04-28 Thread Grant Likely
From: Grant Likely grant.lik...@secretlab.ca

- Add git tree URLs
- Drop Sylvain from the 5xxx maintainers list.  He hasn't been active
  for a while now.

Signed-off-by: Grant Likely grant.lik...@secretlab.ca
---

 MAINTAINERS |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/MAINTAINERS b/MAINTAINERS
index ef03abe..4a8d367 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -3434,11 +3434,10 @@ L:  linuxppc-dev@ozlabs.org
 S: Maintained
 
 LINUX FOR POWERPC EMBEDDED MPC5XXX
-P: Sylvain Munaut
-M: t...@246tnt.com
 P: Grant Likely
 M: grant.lik...@secretlab.ca
 L: linuxppc-dev@ozlabs.org
+T: git git://git.secretlab.ca/git/linux-2.6.git
 S: Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC4XX
@@ -3456,6 +3455,7 @@ P:Grant Likely
 M: grant.lik...@secretlab.ca
 W: http://wiki.secretlab.ca/index.php/Linux_on_Xilinx_Virtex
 L: linuxppc-dev@ozlabs.org
+T: git git://git.secretlab.ca/git/linux-2.6.git
 S: Maintained
 
 LINUX FOR POWERPC EMBEDDED PPC8XX

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


[PATCH v2 10/15] powerpc: Remove unused __page_aligned macro.

2009-04-28 Thread Tim Abbott
Signed-off-by: Tim Abbott tabb...@mit.edu
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Paul Mackerras pau...@samba.org
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/include/asm/page_64.h |8 
 1 files changed, 0 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/include/asm/page_64.h 
b/arch/powerpc/include/asm/page_64.h
index 043bfdf..20f9c74 100644
--- a/arch/powerpc/include/asm/page_64.h
+++ b/arch/powerpc/include/asm/page_64.h
@@ -152,14 +152,6 @@ do {   \
 
 #endif /* !CONFIG_HUGETLB_PAGE */
 
-#ifdef MODULE
-#define __page_aligned __attribute__((__aligned__(PAGE_SIZE)))
-#else
-#define __page_aligned \
-   __attribute__((__aligned__(PAGE_SIZE), \
-   __section__(.data.page_aligned)))
-#endif
-
 #define VM_DATA_DEFAULT_FLAGS \
(test_thread_flag(TIF_32BIT) ? \
 VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEFAULT_FLAGS64)
-- 
1.6.2.1

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


[PATCH v2 12/15] powerpc: Use macros for .data.page_aligned section.

2009-04-28 Thread Tim Abbott
.data.page_aligned should not need a separate output section, so as
part of this cleanup I moved into the .data output section in the
linker scripts in order to eliminate unnecessary references to the
section name.

Note that this change moves the page-aligned data inside _edata.
Since it _is_ data, I suspect having page-aligned data outside _edata
was a bug.  Please comment if it is not.

Signed-off-by: Tim Abbott tabb...@mit.edu
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Paul Mackerras pau...@samba.org
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/kernel/vdso.c  |2 +-
 arch/powerpc/kernel/vdso32/vdso32_wrapper.S |3 ++-
 arch/powerpc/kernel/vdso64/vdso64_wrapper.S |3 ++-
 arch/powerpc/kernel/vmlinux.lds.S   |6 +-
 4 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
index ad06d5c..841910a 100644
--- a/arch/powerpc/kernel/vdso.c
+++ b/arch/powerpc/kernel/vdso.c
@@ -74,7 +74,7 @@ static int vdso_ready;
 static union {
struct vdso_datadata;
u8  page[PAGE_SIZE];
-} vdso_data_store __attribute__((__section__(.data.page_aligned)));
+} vdso_data_store __page_aligned_data
 struct vdso_data *vdso_data = vdso_data_store.data;
 
 /* Format of the patch table */
diff --git a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S 
b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
index 556f0ca..6e8f507 100644
--- a/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
+++ b/arch/powerpc/kernel/vdso32/vdso32_wrapper.S
@@ -1,7 +1,8 @@
 #include linux/init.h
+#include linux/linkage.h
 #include asm/page.h
 
-   .section .data.page_aligned
+   __PAGE_ALIGNED_DATA
 
.globl vdso32_start, vdso32_end
.balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S 
b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
index 0529cb9..b8553d6 100644
--- a/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
+++ b/arch/powerpc/kernel/vdso64/vdso64_wrapper.S
@@ -1,7 +1,8 @@
 #include linux/init.h
+#include linux/linkage.h
 #include asm/page.h
 
-   .section .data.page_aligned
+   __PAGE_ALIGNED_DATA
 
.globl vdso64_start, vdso64_end
.balign PAGE_SIZE
diff --git a/arch/powerpc/kernel/vmlinux.lds.S 
b/arch/powerpc/kernel/vmlinux.lds.S
index 47899b0..d3dcea0 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -221,6 +221,7 @@ SECTIONS
_sdata = .;
 
.data : AT(ADDR(.data) - LOAD_OFFSET) {
+   PAGE_ALIGNED_DATA
DATA_DATA
 #ifdef CONFIG_PPC32
*(.sdata)
@@ -258,11 +259,6 @@ SECTIONS
*(.data.init_task)
}
 
-   . = ALIGN(PAGE_SIZE);
-   .data.page_aligned : AT(ADDR(.data.page_aligned) - LOAD_OFFSET) {
-   *(.data.page_aligned)
-   }
-
.data.cacheline_aligned : AT(ADDR(.data.cacheline_aligned) - 
LOAD_OFFSET) {
*(.data.cacheline_aligned)
}
-- 
1.6.2.1

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


[PATCH v2 11/15] powerpc: share .data output section definition between 32 and 64 bits.

2009-04-28 Thread Tim Abbott
Since upcoming changes will add several more common pieces of code
between the 32-bit and 64-bit powerpc architectures, it seems best to
unify these two blocks.

Signed-off-by: Tim Abbott tabb...@mit.edu
Cc: Benjamin Herrenschmidt b...@kernel.crashing.org
Cc: Paul Mackerras pau...@samba.org
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/kernel/vmlinux.lds.S |7 +++
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/kernel/vmlinux.lds.S 
b/arch/powerpc/kernel/vmlinux.lds.S
index a047a6c..47899b0 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -220,20 +220,19 @@ SECTIONS
. = ALIGN(PAGE_SIZE);
_sdata = .;
 
-#ifdef CONFIG_PPC32
.data : AT(ADDR(.data) - LOAD_OFFSET) {
DATA_DATA
+#ifdef CONFIG_PPC32
*(.sdata)
*(.got.plt) *(.got)
-   }
 #else
-   .data : AT(ADDR(.data) - LOAD_OFFSET) {
-   DATA_DATA
*(.data.rel*)
*(.toc1)
*(.branch_lt)
+#endif
}
 
+#ifndef CONFIG_PPC32
.opd : AT(ADDR(.opd) - LOAD_OFFSET) {
*(.opd)
}
-- 
1.6.2.1

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


Re: How to use Localbus on 5200B w/ 2.6.29.1

2009-04-28 Thread Albrecht Dreß

Hi Grant:

Am 27.04.09 19:36 schrieb(en) Grant Likely:
For completeness use: compatible =  
fsl,mpc5200b-lpb,fsl,mpc5200-lpb,simple-bus;  Then it will work.


I doesn't.  I had to add fsl,lpb, without no localbus nodes show up.   
The file arch/powerpc/platforms/52xx/mpc52xx_common.c lists only  
fsl,lpb  as compatible.  Or did I miss something here?



If this is on CS3, then reg should be:
   reg = 3 0x0 0x100;// 256 Bytes, 32 used


Ouch.  Sorry, that was the error.  Works perfectly now...

Thanks a lot for your help,
Albrecht.


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

Re: [PATCH] of: make of_(un)register_platform_driver common code.

2009-04-28 Thread Andrew Morton
On Tue, 28 Apr 2009 07:58:26 -0600
Grant Likely grant.lik...@secretlab.ca wrote:

 Some drivers using of_register_platform_driver() wrapper break on sparc
 because the wrapper isn't in the header file.  This patch moves it from
 Microblaze and PowerPC implementations and makes it common code.

Thanks.  I'll plan to merge this into mainline later in the week.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: How to use Localbus on 5200B w/ 2.6.29.1

2009-04-28 Thread Grant Likely
On Tue, Apr 28, 2009 at 11:55 AM, Albrecht Dreß albrecht.dr...@arcor.de wrote:
 Hi Grant:

 Am 27.04.09 19:36 schrieb(en) Grant Likely:

 For completeness use: compatible =
 fsl,mpc5200b-lpb,fsl,mpc5200-lpb,simple-bus;  Then it will work.

 I doesn't.  I had to add fsl,lpb, without no localbus nodes show up.  The
 file arch/powerpc/platforms/52xx/mpc52xx_common.c lists only fsl,lpb  as
 compatible.  Or did I miss something here?

Ah, I guess I didn't merge that fix until 2.6.30.  fsl,lpb works for
now.  What I wrote about is the recommended value for .30 and later,
just because it is clearer.

g.

-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: Please revert edada399 and 9203fc9c

2009-04-28 Thread Benjamin Herrenschmidt
On Tue, 2009-04-28 at 10:35 +0200, Sam Ravnborg wrote:

 This is partly my fault :-(
 I acked them as I did not see the issue with conditional branches.
 Could I ask you to add a comment to the lds file about this.

I'm back :-)

Not a huge deal per-se, it's just that the patches were merged in Linus
tree only a few hours after being initially submitted it seems, which
doesn't leave much chance for anybody to test, to hit -next, or anything
like that... that was a little bit too trigger happy .

Cheers,
Ben.


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


Re: [PATCH v2 12/15] powerpc: Use macros for .data.page_aligned section.

2009-04-28 Thread Paul Mackerras
Tim Abbott writes:

 diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c
 index ad06d5c..841910a 100644
 --- a/arch/powerpc/kernel/vdso.c
 +++ b/arch/powerpc/kernel/vdso.c
 @@ -74,7 +74,7 @@ static int vdso_ready;
  static union {
   struct vdso_datadata;
   u8  page[PAGE_SIZE];
 -} vdso_data_store __attribute__((__section__(.data.page_aligned)));
 +} vdso_data_store __page_aligned_data
^
Surely we need a semicolon here? ---|

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


Re: [PATCH 2/2] powerpc: Add 2.06 tlbie mnemonics

2009-04-28 Thread Michael Neuling
  Index: linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
  ===
  --- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/mmu.h
  +++ linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
  @@ -58,6 +58,11 @@
   */
  #define MMU_FTR_TLBILX_EARLY_OPCODE ASM_CONST(0x0040)
 
  +/* This indicates that the processor uses the ISA 2.06 server tlbie
  + * mnemonics
  + */
  +#define MMU_FTR_TLBIE_206  ASM_CONST(0x0080)
  +
  #ifndef __ASSEMBLY__
  #include asm/cputable.h
 
 You aren't going to like me, but I just got rid of  
 MMU_FTR_TLBILX_EARLY_OPCODE and thus freed up 0x0040.  So a) patch  
 will probably bitch when being applied by Ben b) we should use  
 0x0040.

Kumar :-)

 (suggest pulling in paulus/merge as that has the revert patch that  
 removes MMU_FTR_TLBILX_EARLY_OPCODE - and paul's sent a pull request  
 to linus for it.)

OK, new patches coming.

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


Re: Please revert edada399 and 9203fc9c

2009-04-28 Thread Linus Torvalds


On Tue, 28 Apr 2009, Paul Mackerras wrote:
 
 And they are clearly not fixes for regressions or serious bugs, so why
 are these patches going in after -rc3 anyway?

Yeah, my bad. They looked so obviously trivial, but obviously weren't.

I'm not taking any more of them.

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


[PATCH 0/2] powerpc: tlbie implementation for PowerPC ISA 2.06

2009-04-28 Thread Michael Neuling
These patches implement the PowerPC ISA 2.06 tlbie mnemonics

Signed-off-by: Michael Neuling mi...@neuling.org
--- 
Moves MMU_FTR_TLBIE_206 down one bit as the item before has now been
removed.  Thanks to Kumar for noticing. 
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 1/2] powerpc: Enable MMU feature sections for inline asm

2009-04-28 Thread Michael Neuling
From: Milton Miller milt...@bga.com

powerpc: Enable MMU feature sections for inline asm

This adds the ability to do MMU feature sections for inline asm.

Signed-off-by: Milton Miller milt...@bga.com
Signed-off-by: Michael Neuling mi...@neuling.org
---

 arch/powerpc/include/asm/feature-fixups.h |   25 -
 1 file changed, 20 insertions(+), 5 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/include/asm/feature-fixups.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/feature-fixups.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/feature-fixups.h
@@ -8,8 +8,6 @@
  * 2 of the License, or (at your option) any later version.
  */
 
-#ifdef __ASSEMBLY__
-
 /*
  * Feature section common macros
  *
@@ -23,10 +21,12 @@
 /* 64 bits kernel, 32 bits code (ie. vdso32) */
 #define FTR_ENTRY_LONG .llong
 #define FTR_ENTRY_OFFSET   .long 0x; .long
+#elif defined(CONFIG_PPC64)
+#define FTR_ENTRY_LONG .llong
+#define FTR_ENTRY_OFFSET   .llong
 #else
-/* 64 bit kernel 64 bit code, or 32 bit kernel 32 bit code */
-#define FTR_ENTRY_LONG PPC_LONG
-#define FTR_ENTRY_OFFSET   PPC_LONG
+#define FTR_ENTRY_LONG .long
+#define FTR_ENTRY_OFFSET   .long
 #endif
 
 #define START_FTR_SECTION(label)   label##1:
@@ -141,6 +141,21 @@ label##5:  \
 #define ALT_FW_FTR_SECTION_END_IFCLR(msk)  \
ALT_FW_FTR_SECTION_END_NESTED_IFCLR(msk, 97)
 
+#ifndef __ASSEMBLY__
+
+#define ASM_MMU_FTR_IF_X(string, estring, msk, val)\
+   stringify_in_c(BEGIN_MMU_FTR_SECTION)   \
+   string ;  \
+   stringify_in_c(MMU_FTR_SECTION_ELSE)\
+   estring ; \
+   stringify_in_c(ALT_MMU_FTR_SECTION_END((msk), (val)))
+
+#define ASM_MMU_FTR_IFSET(string, estring, msk)\
+   ASM_MMU_FTR_IF_X(string, estring, (msk), (msk))
+
+#define ASM_MMU_FTR_IFCLR(string, estring, msk)\
+   ASM_MMU_FTR_IF_X(string, estring, (msk), 0)
+
 #endif /* __ASSEMBLY__ */
 
 /* LWSYNC feature sections */
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


[PATCH 2/2] powerpc: Add 2.06 tlbie mnemonics

2009-04-28 Thread Michael Neuling
From: Milton Miller milt...@bga.com

This adds the PowerPC 2.06 tlbie mnemonics and keeps backwards
compatibilty for CPUs before 2.06.

Only useful for bare metal systems.  

Signed-off-by: Milton Miller milt...@bga.com
Signed-off-by: Michael Neuling mi...@neuling.org
---

 arch/powerpc/include/asm/mmu.h|5 +
 arch/powerpc/include/asm/ppc-opcode.h |4 
 arch/powerpc/kernel/cputable.c|6 --
 arch/powerpc/mm/hash_native_64.c  |   13 +++--
 4 files changed, 24 insertions(+), 4 deletions(-)

Index: linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/mmu.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/mmu.h
@@ -52,6 +52,11 @@
  */
 #define MMU_FTR_NEED_DTLB_SW_LRU   ASM_CONST(0x0020)
 
+/* This indicates that the processor uses the ISA 2.06 server tlbie
+ * mnemonics
+ */
+#define MMU_FTR_TLBIE_206  ASM_CONST(0x0040)
+
 #ifndef __ASSEMBLY__
 #include asm/cputable.h
 
Index: linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
===
--- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/ppc-opcode.h
+++ linux-2.6-ozlabs/arch/powerpc/include/asm/ppc-opcode.h
@@ -45,10 +45,12 @@
 #define PPC_INST_STSWX 0x7c00052a
 #define PPC_INST_TLBILX0x7c24
 #define PPC_INST_WAIT  0x7c7c
+#define PPC_INST_TLBIE 0x7c000264
 
 /* macros to insert fields into opcodes */
 #define __PPC_RA(a)((a  0x1f)  16)
 #define __PPC_RB(b)((b  0x1f)  11)
+#define __PPC_RS(s)((s  0x1f)  21)
 #define __PPC_T_TLB(t) ((t  0x3)  21)
 #define __PPC_WC(w)((w  0x3)  21)
 
@@ -69,5 +71,7 @@
 #define PPC_TLBILX_VA(a, b)PPC_TLBILX(3, a, b)
 #define PPC_WAIT(w)stringify_in_c(.long PPC_INST_WAIT | \
__PPC_WC(w))
+#define PPC_TLBIE(lp,a)stringify_in_c(.long PPC_INST_TLBIE | \
+  __PPC_RB(a) | __PPC_RS(lp))
 
 #endif /* _ASM_POWERPC_PPC_OPCODE_H */
Index: linux-2.6-ozlabs/arch/powerpc/kernel/cputable.c
===
--- linux-2.6-ozlabs.orig/arch/powerpc/kernel/cputable.c
+++ linux-2.6-ozlabs/arch/powerpc/kernel/cputable.c
@@ -425,7 +425,8 @@ static struct cpu_spec __initdata cpu_sp
.cpu_name   = POWER7 (architected),
.cpu_features   = CPU_FTRS_POWER7,
.cpu_user_features  = COMMON_USER_POWER7,
-   .mmu_features   = MMU_FTR_HPTE_TABLE,
+   .mmu_features   = MMU_FTR_HPTE_TABLE |
+   MMU_FTR_TLBIE_206,
.icache_bsize   = 128,
.dcache_bsize   = 128,
.machine_check  = machine_check_generic,
@@ -438,7 +439,8 @@ static struct cpu_spec __initdata cpu_sp
.cpu_name   = POWER7 (raw),
.cpu_features   = CPU_FTRS_POWER7,
.cpu_user_features  = COMMON_USER_POWER7,
-   .mmu_features   = MMU_FTR_HPTE_TABLE,
+   .mmu_features   = MMU_FTR_HPTE_TABLE |
+   MMU_FTR_TLBIE_206,
.icache_bsize   = 128,
.dcache_bsize   = 128,
.num_pmcs   = 6,
Index: linux-2.6-ozlabs/arch/powerpc/mm/hash_native_64.c
===
--- linux-2.6-ozlabs.orig/arch/powerpc/mm/hash_native_64.c
+++ linux-2.6-ozlabs/arch/powerpc/mm/hash_native_64.c
@@ -27,6 +27,7 @@
 #include asm/cputable.h
 #include asm/udbg.h
 #include asm/kexec.h
+#include asm/ppc-opcode.h
 
 #ifdef DEBUG_LOW
 #define DBG_LOW(fmt...) udbg_printf(fmt)
@@ -49,14 +50,21 @@ static inline void __tlbie(unsigned long
case MMU_PAGE_4K:
va = ~0xffful;
va |= ssize  8;
-   asm volatile(tlbie %0,0 : : r (va) : memory);
+   asm volatile(ASM_MMU_FTR_IFCLR(tlbie %0,0, PPC_TLBIE(%1,%0),
+  %2)
+: : r (va), r(0), i (MMU_FTR_TLBIE_206)
+: memory);
break;
default:
penc = mmu_psize_defs[psize].penc;
va = ~((1ul  mmu_psize_defs[psize].shift) - 1);
va |= penc  12;
va |= ssize  8;
-   asm volatile(tlbie %0,1 : : r (va) : memory);
+   va |= 1; /* L */
+   asm volatile(ASM_MMU_FTR_IFCLR(tlbie %0,1, PPC_TLBIE(%1,%0),
+  %2)
+: : r (va), r(0), i (MMU_FTR_TLBIE_206)
+: memory);
break;
}
 }
@@ -80,6 +88,7 @@ 

Re: [PATCH] [MTD] ofpart: Partitions at same address cannot have the same name v3

2009-04-28 Thread Segher Boessenkool
Sometimes, an special partition is included in the device tree  
including all the

partitions. Like in:

partit...@ff00 {
   reg =  0x00 0x80 ;
   label = Root File System;
};
partit...@ff80 {
   reg =  0x80 0x1a ;
   label = Bitstream;
};
...
f...@ff00 {
   compatible = partition;
   reg =  0x00 0x100 ;
   label = Full FLASH;
};


Your special partition isn't really a partition then, is it.
Because of that, device nodes to represent your partitions doesn't
work very well.

You really want to use something else, a partition table on the
flash itself for example.  Or maybe the (platform? MTD?) code
should create a Linux device for the full device.


Because two nodes of a device tree cannot have the same name,


This isn't true.


but all the
partitions must be named partition,


Bad binding, no cookie for you!


-   if (strcmp(partname, partition) != 0) {
+   if ((strcmp(partname, partition) != 0) 
+   (of_device_is_compatible(pp, partition) != 1))
+   {


You cannot claim a name as generic as partition for this.  Pick
something else if you really must do things this way.


Segher

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


Re: [PATCH 1/2] powerpc: Enable MMU feature sections for inline asm

2009-04-28 Thread Michael Ellerman
On Wed, 2009-04-29 at 10:26 +1000, Michael Neuling wrote:
 From: Milton Miller milt...@bga.com
 
 powerpc: Enable MMU feature sections for inline asm
 
 This adds the ability to do MMU feature sections for inline asm.
 
 Signed-off-by: Milton Miller milt...@bga.com
 Signed-off-by: Michael Neuling mi...@neuling.org
 ---
 
  arch/powerpc/include/asm/feature-fixups.h |   25 -
  1 file changed, 20 insertions(+), 5 deletions(-)
 
 Index: linux-2.6-ozlabs/arch/powerpc/include/asm/feature-fixups.h
 ===
 --- linux-2.6-ozlabs.orig/arch/powerpc/include/asm/feature-fixups.h
 +++ linux-2.6-ozlabs/arch/powerpc/include/asm/feature-fixups.h
 @@ -8,8 +8,6 @@
   * 2 of the License, or (at your option) any later version.
   */
  
 -#ifdef __ASSEMBLY__
 -
  /*
   * Feature section common macros
   *
 @@ -23,10 +21,12 @@
  /* 64 bits kernel, 32 bits code (ie. vdso32) */
  #define FTR_ENTRY_LONG   .llong
  #define FTR_ENTRY_OFFSET .long 0x; .long
 +#elif defined(CONFIG_PPC64)
 +#define FTR_ENTRY_LONG   .llong
 +#define FTR_ENTRY_OFFSET .llong
  #else
 -/* 64 bit kernel 64 bit code, or 32 bit kernel 32 bit code */
 -#define FTR_ENTRY_LONG   PPC_LONG
 -#define FTR_ENTRY_OFFSET PPC_LONG
 +#define FTR_ENTRY_LONG   .long
 +#define FTR_ENTRY_OFFSET .long
  #endif

This is a bit of a pity, I take it you can't nest stringify_in_c(). It
is probably worth a comment here about why you're not using PPC_LONG,
otherwise someone will try and clean it up.

 @@ -141,6 +141,21 @@ label##5:
 \
  #define ALT_FW_FTR_SECTION_END_IFCLR(msk)\
   ALT_FW_FTR_SECTION_END_NESTED_IFCLR(msk, 97)
  
 +#ifndef __ASSEMBLY__
 +
 +#define ASM_MMU_FTR_IF_X(string, estring, msk, val)  \
 + stringify_in_c(BEGIN_MMU_FTR_SECTION)   \
 + string ;  \
 + stringify_in_c(MMU_FTR_SECTION_ELSE)\
 + estring ; \
 + stringify_in_c(ALT_MMU_FTR_SECTION_END((msk), (val)))

Just call it ASM_MMU_FTR_IF() ?  And string and estring don't mean
much to me.

cheers


signature.asc
Description: This is a digitally signed message part
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev

Please pull merge branch

2009-04-28 Thread Grant Likely
Hi Paul/Ben,

Here is a bug fix, a minor tweak and a tidy to merge for 2.6.30.
Please pull 'merge' branch of git://git.secretlab.ca/git/linux-2.6

Thanks,
g.

The following changes since commit 56a50adda49b2020156616c4eb15353e0f9ad7de:
  Linus Torvalds (1):
Merge branch 'drm-intel-next' of
git://git.kernel.org/.../anholt/drm-intel

are available in the git repository at:

  git://git.secretlab.ca/git/linux-2.6 merge

Grant Likely (2):
  powerpc: Update MPC5xxx and Xilinx Virtex maintainer entries
  powerpc/virtex: Add uImage to the default images list

John Linn (1):
  powerpc/virtex: Fix duplicate level irq events.

 MAINTAINERS|4 +-
 arch/powerpc/platforms/40x/Kconfig |1 +
 arch/powerpc/platforms/44x/Kconfig |1 +
 arch/powerpc/sysdev/xilinx_intc.c  |  117 ---
 4 files changed, 111 insertions(+), 12 deletions(-)


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev


Re: [PATCH 5/5] proc: export more page flags in /proc/kpageflags

2009-04-28 Thread Nathan Lynch
Wu Fengguang fengguang...@intel.com writes:

 On Wed, Apr 29, 2009 at 05:32:44AM +0800, Andrew Morton wrote:
 On Tue, 28 Apr 2009 09:09:12 +0800
 Wu Fengguang fengguang...@intel.com wrote:
 
  +/*
  + * Kernel flags are exported faithfully to Linus and his fellow hackers.
  + * Otherwise some details are masked to avoid confusing the end user:
  + * - some kernel flags are completely invisible
  + * - some kernel flags are conditionally invisible on their odd usages
  + */
  +#ifdef CONFIG_DEBUG_KERNEL
  +static inline int genuine_linus(void) { return 1; }
 
 Although he's a fine chap, the use of the _linus tag isn't terribly
 clear (to me).  I think what you're saying here is that this enables
 kernel-developer-only features, yes?

 Yes.

 If so, perhaps we could come up with an identifier which expresses that
 more clearly.
 
 But I'd expect that everyone and all distros enable CONFIG_DEBUG_KERNEL
 for _some_ reason, so what's the point?

At the least, it has not always been so...


 Good point! I can confirm my debian has CONFIG_DEBUG_KERNEL=Y!

I can confirm mine does not.

etch-i386:~# uname -a
Linux etch-i386 2.6.18-6-686 #1 SMP Fri Dec 12 16:48:28 UTC 2008 i686 GNU/Linux
etch-i386:~# grep DEBUG_KERNEL /boot/config-2.6.18-6-686 
# CONFIG_DEBUG_KERNEL is not set

For what that's worth.


 It is preferable that we always implement the same interface for all
 Kconfig settings.  If this exposes information which is confusing or
 not useful to end-users then so be it - we should be able to cover that
 in supporting documentation.

 My original patch takes that straightforward manner - and I still like it.
 I would be very glad to move the filtering code from kernel to user space.

 The use of more obscure flags could be discouraged by _not_ documenting
 them. A really curious user is encouraged to refer to the code for the
 exact meaning (and perhaps become a kernel developer ;-)

 Also, as mentioned in the other email, it would be good if we were to
 publish a little userspace app which people can use to access this raw
 data.  We could give that application an `--i-am-a-kernel-developer'
 option!

 OK. I'll include page-types.c in the next take.

  +#else
  +static inline int genuine_linus(void) { return 0; }
  +#endif
 
 This isn't an appropriate use of CONFIG_DEBUG_KERNEL.
 
 DEBUG_KERNEL is a Kconfig-only construct which is use to enable _other_
 debugging features.  The way you've used it here, if the person who is
 configuring the kernel wants to enable any other completely-unrelated
 debug feature, they have to enable DEBUG_KERNEL first.  But when they
 do that, they unexpectedly alter the behaviour of pagemap!
 
 There are two other places where CONFIG_DEBUG_KERNEL affects code
 generation in .c files: arch/parisc/mm/init.c and
 arch/powerpc/kernel/sysfs.c.  These are both wrong, and need slapping ;)

 (add cc to related maintainers)

I assume I was cc'd because I've changed arch/powerpc/kernel/sysfs.c a
couple of times in the last year, but I can't claim to maintain that
code.  I'm pretty sure I haven't touched the code in question in this
discussion.  I've cc'd linuxppc-dev.


 CONFIG_DEBUG_KERNEL being enabled in distro kernels effectively means 

 #ifdef CONFIG_DEBUG_KERNEL == #if 1

 as the following patch demos. Now it becomes obviously silly.

Sure, #if 1 is usually silly.  But if the point is that DEBUG_KERNEL is
not supposed to directly affect code generation, then I see two options
for powerpc:

- remove the #ifdef CONFIG_DEBUG_KERNEL guards from
  arch/powerpc/kernel/sysfs.c, unconditionally enabling the hid/ima
  sysfs attributes, or

- define a new config symbol which governs whether those attributes are
  enabled, and make it depend on DEBUG_KERNEL


 --- a/arch/powerpc/kernel/sysfs.c
 +++ b/arch/powerpc/kernel/sysfs.c
 @@ -212,19 +212,19 @@ static SYSDEV_ATTR(purr, 0600, show_purr, store_purr);
  #endif /* CONFIG_PPC64 */
  
  #ifdef HAS_PPC_PMC_PA6T
  SYSFS_PMCSETUP(pa6t_pmc0, SPRN_PA6T_PMC0);
  SYSFS_PMCSETUP(pa6t_pmc1, SPRN_PA6T_PMC1);
  SYSFS_PMCSETUP(pa6t_pmc2, SPRN_PA6T_PMC2);
  SYSFS_PMCSETUP(pa6t_pmc3, SPRN_PA6T_PMC3);
  SYSFS_PMCSETUP(pa6t_pmc4, SPRN_PA6T_PMC4);
  SYSFS_PMCSETUP(pa6t_pmc5, SPRN_PA6T_PMC5);
 -#ifdef CONFIG_DEBUG_KERNEL
 +#if 1
  SYSFS_PMCSETUP(hid0, SPRN_HID0);
  SYSFS_PMCSETUP(hid1, SPRN_HID1);
  SYSFS_PMCSETUP(hid4, SPRN_HID4);
  SYSFS_PMCSETUP(hid5, SPRN_HID5);
  SYSFS_PMCSETUP(ima0, SPRN_PA6T_IMA0);
  SYSFS_PMCSETUP(ima1, SPRN_PA6T_IMA1);
  SYSFS_PMCSETUP(ima2, SPRN_PA6T_IMA2);
  SYSFS_PMCSETUP(ima3, SPRN_PA6T_IMA3);
  SYSFS_PMCSETUP(ima4, SPRN_PA6T_IMA4);
 @@ -282,19 +282,19 @@ static struct sysdev_attribute classic_pmc_attrs[] = {
  static struct sysdev_attribute pa6t_attrs[] = {
   _SYSDEV_ATTR(mmcr0, 0600, show_mmcr0, store_mmcr0),
   _SYSDEV_ATTR(mmcr1, 0600, show_mmcr1, store_mmcr1),
   _SYSDEV_ATTR(pmc0, 0600, show_pa6t_pmc0, store_pa6t_pmc0),
   _SYSDEV_ATTR(pmc1, 0600, show_pa6t_pmc1, store_pa6t_pmc1),
   

Re: [PATCH 5/5] proc: export more page flags in /proc/kpageflags

2009-04-28 Thread Andrew Morton
On Tue, 28 Apr 2009 23:41:52 -0500 Nathan Lynch n...@pobox.com wrote:

  CONFIG_DEBUG_KERNEL being enabled in distro kernels effectively means 
 
  #ifdef CONFIG_DEBUG_KERNEL == #if 1
 
  as the following patch demos. Now it becomes obviously silly.
 
 Sure, #if 1 is usually silly.  But if the point is that DEBUG_KERNEL is
 not supposed to directly affect code generation, then I see two options
 for powerpc:
 
 - remove the #ifdef CONFIG_DEBUG_KERNEL guards from
   arch/powerpc/kernel/sysfs.c, unconditionally enabling the hid/ima
   sysfs attributes, or
 
 - define a new config symbol which governs whether those attributes are
   enabled, and make it depend on DEBUG_KERNEL

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


Re: drivers/video/logo/logo_linux_mono.c build error

2009-04-28 Thread Tony Breeds
On Mon, Apr 27, 2009 at 02:50:31PM -0700, Andrew Morton wrote:
 
 powerpc allmodconfig, current mainline:
 
 drivers/video/logo/logo_linux_mono.c:11: error: logo_linux_mono_data causes a 
 section type conflict
 
 switching it from __initconst to __initdata fixes it.
 
 I'm (illegally) using gcc-4.1.0.

You could use the compilers at:
http://bakeyournoodle.com/cross/

Currently x86_64 hosted only, but i686  hosted compilers are building now :)
 
Yours Tony
___
Linuxppc-dev mailing list
Linuxppc-dev@ozlabs.org
https://ozlabs.org/mailman/listinfo/linuxppc-dev