* Re: [PATCH 0/6 v2] mpc83xx_wdt rework, support for mpc8610
From: Kumar Gala @ 2008-05-13 14:50 UTC (permalink / raw)
To: avorontsov
Cc: linuxppc-dev@ozlabs.org list, Wim Van Sebroeck, Scott Wood,
Timur Tabi
In-Reply-To: <20080513141411.GA8981@polina.dev.rtsoft.ru>
On May 13, 2008, at 9:14 AM, Anton Vorontsov wrote:
> Hi all,
>
> Thanks for the review, here is the new version.
>
> Changes since v1:
>
> - Scott Wood asked for mpc83xx_wdt on multiplatform kernels. Done via
> OF platform driver;
> - Kumar Gala asked for mpc83xx_wdt -> mpc8xxx_wdt rename. Done in two
> steps;
> - Segher Boessenkool noticed a negligence in the wdt device tree node.
> Fixed by removing mpc83xx_wdt compatible entry.
any possibility of making this work on 8xx per Jochen's comment? (see
mpc8xx_wdt.c)
- k
^ permalink raw reply
* Re: [PATCH 5/5] [PPC] provide walk_memory_resource() for ppc
From: Badari Pulavarty @ 2008-05-13 15:09 UTC (permalink / raw)
To: Geoff Levand; +Cc: linuxppc-dev, paulus, lkml, Yasunori Goto
In-Reply-To: <4828DDFE.6050805@am.sony.com>
On Mon, 2008-05-12 at 17:17 -0700, Geoff Levand wrote:
> Hi,
>
> I've had some trouble with this change.
>
> Badari Pulavarty wrote:
> > Provide walk_memory_resource() for ppc64. PPC maintains
> > logic memory region mapping in lmb.memory structures. Walk
> > through these structures and do the callbacks for the
> > contiguous chunks.
>
> ...
>
> > --- linux-2.6.25-rc3.orig/arch/powerpc/mm/mem.c 2008-03-05 10:14:28.000000000 -0800
> > +++ linux-2.6.25-rc3/arch/powerpc/mm/mem.c 2008-03-05 10:32:16.000000000 -0800
> > @@ -148,19 +148,35 @@ out:
> >
> > /*
> > * walk_memory_resource() needs to make sure there is no holes in a given
> > - * memory range. On PPC64, since this range comes from /sysfs, the range
> > - * is guaranteed to be valid, non-overlapping and can not contain any
> > - * holes. By the time we get here (memory add or remove), /proc/device-tree
> > - * is updated and correct. Only reason we need to check against device-tree
> > - * would be if we allow user-land to specify a memory range through a
> > - * system call/ioctl etc. instead of doing offline/online through /sysfs.
> > + * memory range. PPC64 does not maintain the memory layout in /proc/iomem.
> > + * Instead it maintains it in lmb.memory structures. Walk through the
> > + * memory regions, find holes and callback for contiguous regions.
> > */
> > int
> > walk_memory_resource(unsigned long start_pfn, unsigned long nr_pages, void *arg,
> > int (*func)(unsigned long, unsigned long, void *))
> > {
> > - return (*func)(start_pfn, nr_pages, arg);
> > + struct lmb_property res;
> > + unsigned long pfn, len;
> > + u64 end;
> > + int ret = -1;
> > +
> > + res.base = (u64) start_pfn << PAGE_SHIFT;
> > + res.size = (u64) nr_pages << PAGE_SHIFT;
> > +
> > + end = res.base + res.size - 1;
> > + while ((res.base < end) && (lmb_find(&res) >= 0)) {
> ^^^^^^^^^^^^^^
>
> In the PS3 platform code (arch/pwerpc/platfroms/ps3/mm.c) the hotplug
> memory is added like this:
>
> ...
> result = add_memory(0, start_addr, map.r1.size);
> ...
> result = online_pages(start_pfn, nr_pages);
> ...
>
> In its work, online_pages() eventually calls walk_memory_resource(),
> which has been changed as above to do a test on lmb_find(). I found
> that this lmb_find() test always fails for PS3 since add_memory()
> does not call lmb_add().
>
> Is it the responsibility of the platform code to call lmb_add(), or
> should that be done by add_memory()?
Since "lmb" code is specific to architecture, I would prefer that
arch specific code is responsible for manipulating "lmb"s instead of
generic code.
In case of ppc64, I added lmb_add() call in /proc/device-tree
manipulation code. Are there any arch specific calls for PS3
when add/remove memory happens ? If there are no other calls,
you can do lmb_add() in ps3_mm_add_memory(). For remove, we
need to find a better place.
Thanks,
Badari
^ permalink raw reply
* Re: [PATCH] Delete unused fec_8xx net driver
From: Kumar Gala @ 2008-05-13 15:12 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: netdev, jengelh, linuxppc-dev, scottwood, Jeff Garzik
In-Reply-To: <20080508172519.GA12162@gate.crashing.org>
On May 8, 2008, at 12:25 PM, Vitaly Bordug wrote:
> On Tue, May 06, 2008 at 12:30:08PM -0400, Jeff Garzik wrote:
>> Becky Bruce wrote:
>>> This driver has been superseded by fs_enet and is no longer in use.
>>>
>>> Signed-off-by: Becky Bruce <becky.bruce@freescale.com>
>>
>> I cannot make an informed judgement on this.
>>
>> ACK, and pass through platform tree, if all platform peeps are happy.
>
> I'll move thins along.
I've applied this to my tree and will push via powerpc.git.
- k
^ permalink raw reply
* Xilinx ML403 I2C Problems
From: Aaron Sells @ 2008-05-13 15:12 UTC (permalink / raw)
To: linuxppc-embedded
Hello,
I am having troubles accessing the eeprom on our Xilinx ML403 board. It
is running an up to date kernel pulled from the git.xilinx.com tree. I
am running an OpenEmbedded file system. I am using I2C Tools
[http://www.lm-sensors.org/wiki/I2CTools] to probe the I2C bus. I am
using Xilinx EDK 10.1 and the base system builder wizard to generate my
bitstream. The following are I2C related messages during bootup:
> root@xilinx-ml403:~# dmesg | grep i[i2]c
> [ 0.126379] Registering device xilinx_iic:0
> [ 0.186921] i2c-core: driver [dummy] registered
> [ 11.729656] i2c /dev entries driver
> [ 11.770185] i2c-core: driver [dev_driver] registered
> [ 11.772527] i2c-core: driver [eeprom] registered
> [ 11.772951] I2C adapter driver [xilinx_iic.0] forgot to specify physical device
> [ 11.774135] i2c-adapter i2c-0: adapter [xilinx_iic.0] registered
> [ 11.775475] i2c-dev: adapter [xilinx_iic.0] registered as minor 0
> [ 11.775569] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x50
> [ 11.775640] i2c-adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
> [ 11.775710] i2c-adapter i2c-0: master_xfer[0] W, addr=0x50, len=0
> [ 11.776245] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0050
> [ 11.776364] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x51
> [ 11.776441] i2c-adapter i2c-0: master_xfer[0] W, addr=0x51, len=0
> [ 11.776510] i2c-adapter i2c-0: master_xfer[0] W, addr=0x51, len=0
> [ 11.776847] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0051
> [ 11.776957] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x52
> [ 11.777034] i2c-adapter i2c-0: master_xfer[0] W, addr=0x52, len=0
> [ 11.777102] i2c-adapter i2c-0: master_xfer[0] W, addr=0x52, len=0
> [ 11.777414] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0052
> [ 11.777526] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x53
> [ 11.777603] i2c-adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
> [ 11.777671] i2c-adapter i2c-0: master_xfer[0] W, addr=0x53, len=0
> [ 11.778053] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0053
> [ 11.778169] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x54
> [ 11.778249] i2c-adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
> [ 11.778317] i2c-adapter i2c-0: master_xfer[0] W, addr=0x54, len=0
> [ 11.778708] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0054
> [ 11.778821] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x55
> [ 11.778905] i2c-adapter i2c-0: master_xfer[0] W, addr=0x55, len=0
> [ 11.778974] i2c-adapter i2c-0: master_xfer[0] W, addr=0x55, len=0
> [ 11.779296] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0055
> [ 11.779406] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x56
> [ 11.779487] i2c-adapter i2c-0: master_xfer[0] W, addr=0x56, len=0
> [ 11.779556] i2c-adapter i2c-0: master_xfer[0] W, addr=0x56, len=0
> [ 11.779881] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0056
> [ 11.780180] i2c-adapter i2c-0: found normal entry for adapter 0, addr 0x57
> [ 11.780275] i2c-adapter i2c-0: master_xfer[0] W, addr=0x57, len=0
> [ 11.780346] i2c-adapter i2c-0: master_xfer[0] W, addr=0x57, len=0
> [ 11.780695] i2c-adapter i2c-0: client [eeprom] registered with bus id 0-0057
> [ 11.780779] i2c-adapter i2c-0: master_xfer[0] W, addr=0x57, len=1
> [ 11.780828] i2c-adapter i2c-0: master_xfer[1] R, addr=0x57, len=1
> [ 11.796088] xilinx_iic.0 #0: Could not talk to device 0x57 (0), bus always busy, trying to reset
> [ 11.884076] i2c-adapter i2c-0: master_xfer[0] R, addr=0x57, len=1
> [ 11.900084] xilinx_iic.0 #0: Could not talk to device 0x57 (0), bus always busy, trying to reset
> [ 11.988074] i2c-adapter i2c-0: master_xfer[0] R, addr=0x57, len=1
> [ 12.004086] xilinx_iic.0 #0: Could not talk to device 0x57 (0), bus always busy, trying to reset
> [ 12.096076] i2c-adapter i2c-0: master_xfer[0] R, addr=0x57, len=1
> [ 12.112084] xilinx_iic.0 #0: Could not talk to device 0x57 (0), bus always busy, trying to reset
> [ 12.200151] xilinx_iic.0 #0 at 0x81600000 mapped to 0xC5060000, irq=4
Also, occasionally the board will hang during bootup during the I2C
device initialization. This is what I get when I try to read from the
eeprom memory locations:
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x50
> Error: Could not set address to 0x50: Device or resource busy
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x51
> Error: Could not set address to 0x51: Device or resource busy
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x52
> Error: Could not set address to 0x52: Device or resource busy
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x53
> Error: Could not set address to 0x53: Device or resource busy
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x54
> Error: Could not set address to 0x54: Device or resource busy
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x55
> Error: Could not set address to 0x55: Device or resource busy
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x56
> Error: Could not set address to 0x56: Device or resource busy
> root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x57
> Error: Could not set address to 0x57: Device or resource busy
The following are the I2C defines in my xparameters_ml403.h file:
> sellsa@SS-SBIR-Ubuntu:~/linux-2.6-xlnx/arch/ppc/platforms/4xx/xparameters$ cat xparameters_ml403.h | grep IIC
> /* Definitions for driver IIC */
> #define XPAR_XIIC_NUM_INSTANCES 1
> /* Definitions for peripheral IIC_EEPROM */
> #define XPAR_IIC_EEPROM_DEVICE_ID 0
> #define XPAR_IIC_EEPROM_BASEADDR 0x81600000
> #define XPAR_IIC_EEPROM_HIGHADDR 0x8160FFFF
> #define XPAR_IIC_EEPROM_TEN_BIT_ADR 0
> #define XPAR_IIC_EEPROM_GPO_WIDTH 1
> /* Canonical definitions for peripheral IIC_EEPROM */
> #define XPAR_IIC_0_DEVICE_ID XPAR_IIC_EEPROM_DEVICE_ID
> #define XPAR_IIC_0_BASEADDR 0x81600000
> #define XPAR_IIC_0_HIGHADDR 0x8160FFFF
> #define XPAR_IIC_0_TEN_BIT_ADR 0
> #define XPAR_IIC_0_GPO_WIDTH 1
> #define XPAR_IIC_EEPROM_IIC2INTC_IRPT_MASK 0X000010
> #define XPAR_XPS_INTC_0_IIC_EEPROM_IIC2INTC_IRPT_INTR 4
> #define XPAR_INTC_0_IIC_0_VEC_ID XPAR_XPS_INTC_0_IIC_EEPROM_IIC2INTC_IRPT_INTR
> #define XPAR_PERSISTENT_0_IIC_0_BASEADDR 0
> #define XPAR_PERSISTENT_0_IIC_0_HIGHADDR 128
> #define XPAR_PERSISTENT_0_IIC_0_EEPROMADDR 0x50
Any ideas on what could be going wrong? Any ideas on how to
troubleshoot this?
Regards,
Aaron
^ permalink raw reply
* [PATCH] [WATCHDOG] mpc8xxx_wdt: add support for MPC8xx watchdogs
From: Anton Vorontsov @ 2008-05-13 15:55 UTC (permalink / raw)
To: Kumar Gala
Cc: linuxppc-dev@ozlabs.org list, Wim Van Sebroeck, Scott Wood,
Timur Tabi
In-Reply-To: <8C355C2C-C029-4F02-A5B0-DA8173FAFF69@kernel.crashing.org>
Only build-tested.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
---
On Tue, May 13, 2008 at 09:50:26AM -0500, Kumar Gala wrote:
>
> On May 13, 2008, at 9:14 AM, Anton Vorontsov wrote:
>
>> Hi all,
>>
>> Thanks for the review, here is the new version.
>>
>> Changes since v1:
>>
>> - Scott Wood asked for mpc83xx_wdt on multiplatform kernels. Done via
>> OF platform driver;
>> - Kumar Gala asked for mpc83xx_wdt -> mpc8xxx_wdt rename. Done in two
>> steps;
>> - Segher Boessenkool noticed a negligence in the wdt device tree node.
>> Fixed by removing mpc83xx_wdt compatible entry.
>
> any possibility of making this work on 8xx per Jochen's comment? (see
> mpc8xx_wdt.c)
[ Oops. Jochen, sorry I forgot to Cc you this time. ]
I think it should work with the patch inlined here, and this node
in the device tree.
soc@ff000000 {
....
wdt@0 {
device_type = "watchdog";
compatible = "fsl,mpc885-wdt";
reg = <0 0x100>;
};
....
};
Not tested though. And also no support for RTC-driven timer tweak
(anybody willing are welcomed to implement this ;-).
drivers/watchdog/Kconfig | 2 +-
drivers/watchdog/mpc8xxx_wdt.c | 31 +++++++++++++++++++++++++++----
2 files changed, 28 insertions(+), 5 deletions(-)
diff --git a/drivers/watchdog/Kconfig b/drivers/watchdog/Kconfig
index bd9044f..06b1119 100644
--- a/drivers/watchdog/Kconfig
+++ b/drivers/watchdog/Kconfig
@@ -684,7 +684,7 @@ config 8xx_WDT
config 8xxx_WDT
tristate "MPC8xxx Watchdog Timer"
- depends on PPC_83xx || PPC_86xx
+ depends on FSL_SOC
config MV64X60_WDT
tristate "MV64X60 (Marvell Discovery) Watchdog Timer"
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index b582441..a93b512 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -42,6 +42,11 @@ struct mpc8xxx_wdt {
u8 res2[0xF0];
};
+struct mpc8xxx_wdt_type {
+ int prescaler;
+ bool hw_enabled;
+};
+
static struct mpc8xxx_wdt __iomem *wd_base;
static u16 timeout = 0xffff;
@@ -182,6 +187,7 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,
{
int ret;
struct device_node *np = ofdev->node;
+ struct mpc8xxx_wdt_type *wdt_type = match->data;
u32 freq = fsl_get_sys_freq();
bool enabled;
@@ -193,7 +199,7 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,
return -ENOMEM;
enabled = in_be32(&wd_base->swcrr) & SWCRR_SWEN;
- if (!enabled && of_device_is_compatible(np, "fsl,mpc8610-wdt")) {
+ if (!enabled && wdt_type->hw_enabled) {
pr_info("mpc8xxx_wdt: could not be enabled in software\n");
ret = -ENOSYS;
goto err_unmap;
@@ -208,7 +214,7 @@ static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,
/* Calculate the timeout in seconds */
if (prescale)
- timeout_sec = (timeout * 0x10000) / freq;
+ timeout_sec = (timeout * wdt_type->prescaler) / freq;
else
timeout_sec = timeout / freq;
@@ -240,8 +246,25 @@ static int __devexit mpc8xxx_wdt_remove(struct of_device *ofdev)
}
static const struct of_device_id mpc8xxx_wdt_match[] = {
- { .compatible = "mpc83xx_wdt", },
- { .compatible = "fsl,mpc8610-wdt", },
+ {
+ .compatible = "mpc83xx_wdt",
+ .data = &(struct mpc8xxx_wdt_type) {
+ .prescaler = 0x10000,
+ },
+ },
+ {
+ .compatible = "fsl,mpc8610-wdt",
+ .data = &(struct mpc8xxx_wdt_type) {
+ .prescaler = 0x10000,
+ .hw_enabled = true,
+ },
+ },
+ {
+ .compatible = "fsl,mpc885-wdt",
+ .data = &(struct mpc8xxx_wdt_type) {
+ .prescaler = 0x800,
+ },
+ },
{},
};
MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match);
--
1.5.5.1
^ permalink raw reply related
* [PATCH v2] Update defconfig for MPC8610 HPCD
From: Timur Tabi @ 2008-05-13 16:04 UTC (permalink / raw)
To: galak, linuxppc-dev
Update the defconfig for the Freescale MPC8610 HPCD board. Enable module
support. Disable support for all NICs except for the on-board ULI526x.
Enable support for the Freescale DIU driver. Increase the maximum zone order
to 12, so that the DIU driver can allocate physically-contiguous 5MB buffers.
Signed-off-by: Timur Tabi <timur@freescale.com>
---
Support for the Freescale generic DMA driver will have to wait until 2.6.27
because the current audio driver for the 8610 is incompatible with it.
arch/powerpc/configs/mpc8610_hpcd_defconfig | 309 +++++++++++++++------------
1 files changed, 176 insertions(+), 133 deletions(-)
diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig
index 7e5b9ce..2171181 100644
--- a/arch/powerpc/configs/mpc8610_hpcd_defconfig
+++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.25-rc6
-# Mon Mar 24 08:48:33 2008
+# Linux kernel version: 2.6.26-rc2
+# Tue May 13 10:49:38 2008
#
# CONFIG_PPC64 is not set
@@ -31,6 +31,8 @@ CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_HARDIRQS=y
# CONFIG_HAVE_SETUP_PER_CPU_AREA is not set
CONFIG_IRQ_PER_CPU=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_ILOG2_U32=y
CONFIG_GENERIC_HWEIGHT=y
@@ -86,6 +88,7 @@ CONFIG_INITRAMFS_SOURCE=""
CONFIG_SYSCTL=y
CONFIG_EMBEDDED=y
CONFIG_SYSCTL_SYSCALL=y
+CONFIG_SYSCTL_SYSCALL_CHECK=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
CONFIG_KALLSYMS_EXTRA_PASS=y
@@ -110,14 +113,22 @@ CONFIG_SLUB=y
# CONFIG_PROFILING is not set
# CONFIG_MARKERS is not set
CONFIG_HAVE_OPROFILE=y
+# CONFIG_KPROBES is not set
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
+# CONFIG_HAVE_DMA_ATTRS is not set
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
# CONFIG_TINY_SHMEM is not set
CONFIG_BASE_SMALL=0
-# CONFIG_MODULES is not set
+CONFIG_MODULES=y
+# CONFIG_MODULE_FORCE_LOAD is not set
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
CONFIG_BLOCK=y
# CONFIG_LBD is not set
# CONFIG_BLK_DEV_IO_TRACE is not set
@@ -151,6 +162,7 @@ CONFIG_PPC_86xx=y
# CONFIG_PPC_CELL_NATIVE is not set
# CONFIG_PQ2ADS is not set
# CONFIG_MPC8641_HPCN is not set
+# CONFIG_SBC8641D is not set
CONFIG_MPC8610_HPCD=y
CONFIG_MPC8610=y
# CONFIG_IPIC is not set
@@ -199,11 +211,13 @@ CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
# CONFIG_SPARSEMEM_STATIC is not set
# CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set
+CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_RESOURCES_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
+CONFIG_FORCE_MAX_ZONEORDER=12
CONFIG_PROC_DEVICETREE=y
# CONFIG_CMDLINE_BOOL is not set
# CONFIG_PM is not set
@@ -223,12 +237,14 @@ CONFIG_PCI_DOMAINS=y
CONFIG_PCI_SYSCALL=y
CONFIG_PCIEPORTBUS=y
CONFIG_PCIEAER=y
+# CONFIG_PCIEASPM is not set
CONFIG_ARCH_SUPPORTS_MSI=y
# CONFIG_PCI_MSI is not set
CONFIG_PCI_LEGACY=y
CONFIG_PCI_DEBUG=y
# CONFIG_PCCARD is not set
# CONFIG_HOTPLUG_PCI is not set
+# CONFIG_HAS_RAPIDIO is not set
#
# Advanced setup
@@ -238,11 +254,11 @@ CONFIG_PCI_DEBUG=y
#
# Default settings for advanced configuration options are used
#
-CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_PAGE_OFFSET=0xc0000000
CONFIG_KERNEL_START=0xc0000000
+CONFIG_PHYSICAL_START=0x00000000
CONFIG_TASK_SIZE=0xc0000000
-CONFIG_BOOT_LOAD=0x00800000
#
# Networking
@@ -303,8 +319,10 @@ CONFIG_INET6_XFRM_MODE_TUNNEL=y
CONFIG_INET6_XFRM_MODE_BEET=y
# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
CONFIG_IPV6_SIT=y
+CONFIG_IPV6_NDISC_NODETYPE=y
# CONFIG_IPV6_TUNNEL is not set
# CONFIG_IPV6_MULTIPLE_TABLES is not set
+# CONFIG_IPV6_MROUTE is not set
# CONFIG_NETWORK_SECMARK is not set
# CONFIG_NETFILTER is not set
# CONFIG_IP_DCCP is not set
@@ -446,6 +464,7 @@ CONFIG_MTD_NAND_FSL_ELBC=y
#
# CONFIG_MTD_UBI is not set
CONFIG_OF_DEVICE=y
+CONFIG_OF_I2C=y
# CONFIG_PARPORT is not set
CONFIG_BLK_DEV=y
# CONFIG_BLK_DEV_FD is not set
@@ -504,6 +523,7 @@ CONFIG_CHR_DEV_SG=y
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
# CONFIG_SCSI_SCAN_ASYNC is not set
+CONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
@@ -553,7 +573,11 @@ CONFIG_SCSI_LOWLEVEL=y
# CONFIG_SCSI_SRP is not set
CONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not set
+CONFIG_SATA_PMP=y
CONFIG_SATA_AHCI=y
+# CONFIG_SATA_SIL24 is not set
+# CONFIG_SATA_FSL is not set
+CONFIG_ATA_SFF=y
# CONFIG_SATA_SVW is not set
# CONFIG_ATA_PIIX is not set
# CONFIG_SATA_MV is not set
@@ -563,13 +587,11 @@ CONFIG_SATA_AHCI=y
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SX4 is not set
# CONFIG_SATA_SIL is not set
-# CONFIG_SATA_SIL24 is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
# CONFIG_SATA_INIC162X is not set
-# CONFIG_SATA_FSL is not set
CONFIG_PATA_ALI=y
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
@@ -609,6 +631,7 @@ CONFIG_PATA_ALI=y
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
# CONFIG_PATA_PLATFORM is not set
+# CONFIG_PATA_SCH is not set
# CONFIG_MD is not set
# CONFIG_FUSION is not set
@@ -628,25 +651,9 @@ CONFIG_DUMMY=y
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_ARCNET is not set
-CONFIG_PHYLIB=y
-
-#
-# MII PHY device drivers
-#
-# CONFIG_MARVELL_PHY is not set
-# CONFIG_DAVICOM_PHY is not set
-# CONFIG_QSEMI_PHY is not set
-# CONFIG_LXT_PHY is not set
-# CONFIG_CICADA_PHY is not set
-# CONFIG_VITESSE_PHY is not set
-# CONFIG_SMSC_PHY is not set
-# CONFIG_BROADCOM_PHY is not set
-# CONFIG_ICPLUS_PHY is not set
-# CONFIG_REALTEK_PHY is not set
-# CONFIG_FIXED_PHY is not set
-# CONFIG_MDIO_BITBANG is not set
+# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
+# CONFIG_MII is not set
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
@@ -663,64 +670,10 @@ CONFIG_ULI526X=y
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
-CONFIG_NET_PCI=y
-# CONFIG_PCNET32 is not set
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_NET_PCI is not set
# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_EEPRO100 is not set
-# CONFIG_E100 is not set
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-CONFIG_8139TOO=y
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-# CONFIG_8139TOO_8129 is not set
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_R6040 is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-# CONFIG_SC92031 is not set
-CONFIG_NETDEV_1000=y
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_E1000E is not set
-# CONFIG_E1000E_ENABLED is not set
-# CONFIG_IP1000 is not set
-# CONFIG_IGB is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-# CONFIG_GIANFAR is not set
-# CONFIG_QLA3XXX is not set
-# CONFIG_ATL1 is not set
-CONFIG_NETDEV_10000=y
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_CHELSIO_T3 is not set
-# CONFIG_IXGBE is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-# CONFIG_MYRI10GE is not set
-# CONFIG_NETXEN_NIC is not set
-# CONFIG_NIU is not set
-# CONFIG_MLX4_CORE is not set
-# CONFIG_TEHUTI is not set
-# CONFIG_BNX2X is not set
+# CONFIG_NETDEV_1000 is not set
+# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set
#
@@ -728,6 +681,7 @@ CONFIG_NETDEV_10000=y
#
# CONFIG_WLAN_PRE80211 is not set
# CONFIG_WLAN_80211 is not set
+# CONFIG_IWLWIFI_LEDS is not set
# CONFIG_WAN is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
@@ -783,6 +737,7 @@ CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_DEVKMEM=y
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_NOZOMI is not set
@@ -824,13 +779,6 @@ CONFIG_I2C_BOARDINFO=y
# CONFIG_I2C_CHARDEV is not set
#
-# I2C Algorithms
-#
-# CONFIG_I2C_ALGOBIT is not set
-# CONFIG_I2C_ALGOPCF is not set
-# CONFIG_I2C_ALGOPCA is not set
-
-#
# I2C Hardware Bus support
#
# CONFIG_I2C_ALI1535 is not set
@@ -852,9 +800,11 @@ CONFIG_I2C_MPC=y
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_TAOS_EVM is not set
+# CONFIG_I2C_STUB is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_PLATFORM is not set
#
# Miscellaneous I2C Chip support
@@ -864,19 +814,13 @@ CONFIG_I2C_MPC=y
# CONFIG_SENSORS_PCF8574 is not set
# CONFIG_PCF8575 is not set
# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_TPS65010 is not set
# CONFIG_SENSORS_MAX6875 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
# CONFIG_W1 is not set
# CONFIG_POWER_SUPPLY is not set
# CONFIG_HWMON is not set
@@ -893,12 +837,21 @@ CONFIG_SSB_POSSIBLE=y
# Multifunction device drivers
#
# CONFIG_MFD_SM501 is not set
+# CONFIG_HTC_PASIC3 is not set
#
# Multimedia devices
#
+
+#
+# Multimedia core support
+#
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
+
+#
+# Multimedia drivers
+#
CONFIG_DAB=y
#
@@ -908,7 +861,57 @@ CONFIG_DAB=y
# CONFIG_DRM is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=y
-# CONFIG_FB is not set
+CONFIG_FB=y
+# CONFIG_FIRMWARE_EDID is not set
+# CONFIG_FB_DDC is not set
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
+# CONFIG_FB_SYS_FILLRECT is not set
+# CONFIG_FB_SYS_COPYAREA is not set
+# CONFIG_FB_SYS_IMAGEBLIT is not set
+# CONFIG_FB_FOREIGN_ENDIAN is not set
+# CONFIG_FB_SYS_FOPS is not set
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_SVGALIB is not set
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+# CONFIG_FB_MODE_HELPERS is not set
+# CONFIG_FB_TILEBLITTING is not set
+
+#
+# Frame buffer hardware drivers
+#
+# CONFIG_FB_CIRRUS is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_OF is not set
+# CONFIG_FB_CT65550 is not set
+# CONFIG_FB_ASILIANT is not set
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_VGA16 is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_NVIDIA is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_S3 is not set
+# CONFIG_FB_SAVAGE is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_KYRO is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_VT8623 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_ARK is not set
+# CONFIG_FB_PM3 is not set
+CONFIG_FB_FSL_DIU=y
+# CONFIG_FB_IBM_GXT4500 is not set
+# CONFIG_FB_VIRTUAL is not set
# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
#
@@ -922,6 +925,8 @@ CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE is not set
+# CONFIG_LOGO is not set
#
# Sound
@@ -965,6 +970,7 @@ CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
+# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
@@ -1031,14 +1037,14 @@ CONFIG_SND_VERBOSE_PROCFS=y
CONFIG_SND_SOC=y
#
-# SoC Audio support for SuperH
-#
-
-#
# ALSA SoC audio for Freescale SOCs
#
CONFIG_SND_SOC_MPC8610=y
CONFIG_SND_SOC_MPC8610_HPCD=y
+
+#
+# SoC Audio for the Texas Instruments OMAP
+#
CONFIG_SND_SOC_CS4270=y
CONFIG_SND_SOC_CS4270_VD33_ERRATA=y
@@ -1055,6 +1061,8 @@ CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
# CONFIG_USB is not set
+# CONFIG_USB_OTG_WHITELIST is not set
+# CONFIG_USB_OTG_BLACKLIST_HUB is not set
#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
@@ -1063,14 +1071,11 @@ CONFIG_USB_ARCH_HAS_EHCI=y
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
# CONFIG_NEW_LEDS is not set
+# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
# CONFIG_EDAC is not set
# CONFIG_RTC_CLASS is not set
# CONFIG_DMADEVICES is not set
-
-#
-# Userspace I/O
-#
# CONFIG_UIO is not set
#
@@ -1090,7 +1095,6 @@ CONFIG_FS_MBCACHE=y
# CONFIG_JFS_FS is not set
# CONFIG_FS_POSIX_ACL is not set
# CONFIG_XFS_FS is not set
-# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY is not set
@@ -1134,6 +1138,7 @@ CONFIG_TMPFS=y
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
+# CONFIG_JFFS2_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
@@ -1147,10 +1152,9 @@ CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
# CONFIG_NFS_V3_ACL is not set
# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
CONFIG_NFSD=y
# CONFIG_NFSD_V3 is not set
-CONFIG_NFSD_TCP=y
+# CONFIG_NFSD_V4 is not set
CONFIG_ROOT_NFS=y
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
@@ -1234,6 +1238,7 @@ CONFIG_NLS_DEFAULT="iso8859-1"
# Library routines
#
CONFIG_BITREVERSE=y
+# CONFIG_GENERIC_FIND_FIRST_BIT is not set
# CONFIG_CRC_CCITT is not set
# CONFIG_CRC16 is not set
# CONFIG_CRC_ITU_T is not set
@@ -1244,6 +1249,7 @@ CONFIG_PLIST=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
+CONFIG_HAVE_LMB=y
#
# Kernel hacking
@@ -1251,6 +1257,7 @@ CONFIG_HAS_DMA=y
# CONFIG_PRINTK_TIME is not set
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
+CONFIG_FRAME_WARN=1024
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_UNUSED_SYMBOLS is not set
# CONFIG_DEBUG_FS is not set
@@ -1261,6 +1268,7 @@ CONFIG_DETECT_SOFTLOCKUP=y
CONFIG_SCHED_DEBUG=y
# CONFIG_SCHEDSTATS is not set
# CONFIG_TIMER_STATS is not set
+# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
@@ -1274,9 +1282,11 @@ CONFIG_SCHED_DEBUG=y
CONFIG_DEBUG_BUGVERBOSE=y
CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_VM is not set
+# CONFIG_DEBUG_WRITECOUNT is not set
# CONFIG_DEBUG_LIST is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_BOOT_PRINTK_DELAY is not set
+# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_SAMPLES is not set
@@ -1284,6 +1294,7 @@ CONFIG_DEBUG_INFO=y
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PAGEALLOC is not set
# CONFIG_DEBUGGER is not set
+# CONFIG_IRQSTACKS is not set
# CONFIG_BDI_SWITCH is not set
# CONFIG_PPC_EARLY_DEBUG is not set
@@ -1294,48 +1305,80 @@ CONFIG_DEBUG_INFO=y
# CONFIG_SECURITY is not set
# CONFIG_SECURITY_FILE_CAPABILITIES is not set
CONFIG_CRYPTO=y
-# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Crypto core or helper
+#
# CONFIG_CRYPTO_MANAGER is not set
+# CONFIG_CRYPTO_GF128MUL is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_CRYPTD is not set
+# CONFIG_CRYPTO_AUTHENC is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Authenticated Encryption with Associated Data
+#
+# CONFIG_CRYPTO_CCM is not set
+# CONFIG_CRYPTO_GCM is not set
+# CONFIG_CRYPTO_SEQIV is not set
+
+#
+# Block modes
+#
+# CONFIG_CRYPTO_CBC is not set
+# CONFIG_CRYPTO_CTR is not set
+# CONFIG_CRYPTO_CTS is not set
+# CONFIG_CRYPTO_ECB is not set
+# CONFIG_CRYPTO_LRW is not set
+# CONFIG_CRYPTO_PCBC is not set
+# CONFIG_CRYPTO_XTS is not set
+
+#
+# Hash modes
+#
# CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_XCBC is not set
-# CONFIG_CRYPTO_NULL is not set
+
+#
+# Digest
+#
+# CONFIG_CRYPTO_CRC32C is not set
# CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_SHA1 is not set
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
-# CONFIG_CRYPTO_WP512 is not set
# CONFIG_CRYPTO_TGR192 is not set
-# CONFIG_CRYPTO_GF128MUL is not set
-# CONFIG_CRYPTO_ECB is not set
-# CONFIG_CRYPTO_CBC is not set
-# CONFIG_CRYPTO_PCBC is not set
-# CONFIG_CRYPTO_LRW is not set
-# CONFIG_CRYPTO_XTS is not set
-# CONFIG_CRYPTO_CTR is not set
-# CONFIG_CRYPTO_GCM is not set
-# CONFIG_CRYPTO_CCM is not set
-# CONFIG_CRYPTO_CRYPTD is not set
-# CONFIG_CRYPTO_DES is not set
-# CONFIG_CRYPTO_FCRYPT is not set
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_WP512 is not set
+
+#
+# Ciphers
+#
# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_TEA is not set
-# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_DES is not set
+# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SALSA20 is not set
+# CONFIG_CRYPTO_SEED is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+
+#
+# Compression
+#
# CONFIG_CRYPTO_DEFLATE is not set
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_CAMELLIA is not set
-# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_LZO is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
# CONFIG_PPC_CLOCK is not set
+CONFIG_PPC_LIB_RHEAP=y
+# CONFIG_VIRTUALIZATION is not set
--
1.5.5
^ permalink raw reply related
* Re: [PATCH] [WATCHDOG] mpc8xxx_wdt: add support for MPC8xx watchdogs
From: Scott Wood @ 2008-05-13 16:12 UTC (permalink / raw)
To: avorontsov; +Cc: linuxppc-dev@ozlabs.org list, Wim Van Sebroeck, Timur Tabi
In-Reply-To: <20080513155507.GA25624@polina.dev.rtsoft.ru>
Anton Vorontsov wrote:
> config 8xxx_WDT
> tristate "MPC8xxx Watchdog Timer"
> - depends on PPC_83xx || PPC_86xx
> + depends on FSL_SOC
We should probably change the description to "MPC8xxx Platform Watchdog
Timer", and have help text indicating that it's not the Book-E core
watchdog, and that it works on 8xx despite the discrepancy in the number
of "x"s.
-Scott
^ permalink raw reply
* Re: [PATCH 6/6] [POWERPC] 86xx: mpc8610_hpcd: add watchdog node
From: Scott Wood @ 2008-05-13 16:16 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: linuxppc-dev, Wim Van Sebroeck, Timur Tabi
In-Reply-To: <20080513141511.GF15717@polina.dev.rtsoft.ru>
Anton Vorontsov wrote:
> Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
> ---
> arch/powerpc/boot/dts/mpc8610_hpcd.dts | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
> index 5030533..a7f3e0e 100644
> --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts
> +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts
> @@ -195,6 +195,12 @@
> fsl,has-rstcr;
> };
>
> + wdt@e4000 {
> + device_type = "watchdog";
> + compatible = "fsl,mpc8610-wdt";
> + reg = <0xe4000 0x100>;
> + };
> +
We don't need the device_type anymore.
-Scott
^ permalink raw reply
* RE: Xilinx ML403 I2C Problems
From: Bittner, Bruno A (GE EntSol, Intelligent Platforms) @ 2008-05-13 15:25 UTC (permalink / raw)
To: Aaron Sells, linuxppc-embedded
In-Reply-To: <4829AFD9.30809@zin-tech.com>
Check the Xilinx website for i2c pullup changes for the ML403 if you
haven't done that already. There's a level shifter involved in there
too. The app-note/errata explains what's happening.
Note that the default eeprom device is a 48T02, I believe. Which has
two pages of 256 bytes, the low i2c address bit used to address the
page, and the other i2c address bits ignored, so this eeprom is
replicated across the whole eeprom range.
It's been a year since I messed with this, the above is from memory
(mine), so be skeptical.
> -----Original Message-----
> From: linuxppc-embedded-bounces+bruno.bittner=3Dgefanuc.com@ozlabs.org
>
[mailto:linuxppc-embedded-bounces+bruno.bittner=3Dgefanuc.com@ozlabs.org]=
On
> Behalf Of Aaron Sells
> Sent: Tuesday, May 13, 2008 10:12 AM
> To: linuxppc-embedded@ozlabs.org
> Subject: Xilinx ML403 I2C Problems
>=20
> Hello,
>=20
> I am having troubles accessing the eeprom on our Xilinx ML403 board.
It
> is running an up to date kernel pulled from the git.xilinx.com tree.
I
> am running an OpenEmbedded file system. I am using I2C Tools
> [http://www.lm-sensors.org/wiki/I2CTools] to probe the I2C bus. I am
> using Xilinx EDK 10.1 and the base system builder wizard to generate
my
> bitstream. The following are I2C related messages during bootup:
>=20
> > root@xilinx-ml403:~# dmesg | grep i[i2]c
> > [ 0.126379] Registering device xilinx_iic:0
> > [ 0.186921] i2c-core: driver [dummy] registered
> > [ 11.729656] i2c /dev entries driver
> > [ 11.770185] i2c-core: driver [dev_driver] registered
> > [ 11.772527] i2c-core: driver [eeprom] registered
> > [ 11.772951] I2C adapter driver [xilinx_iic.0] forgot to specify
> physical device
> > [ 11.774135] i2c-adapter i2c-0: adapter [xilinx_iic.0] registered
> > [ 11.775475] i2c-dev: adapter [xilinx_iic.0] registered as minor 0
> > [ 11.775569] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x50
> > [ 11.775640] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x50, =
len=3D0
> > [ 11.775710] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x50, =
len=3D0
> > [ 11.776245] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0050
> > [ 11.776364] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x51
> > [ 11.776441] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x51, =
len=3D0
> > [ 11.776510] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x51, =
len=3D0
> > [ 11.776847] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0051
> > [ 11.776957] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x52
> > [ 11.777034] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x52, =
len=3D0
> > [ 11.777102] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x52, =
len=3D0
> > [ 11.777414] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0052
> > [ 11.777526] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x53
> > [ 11.777603] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x53, =
len=3D0
> > [ 11.777671] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x53, =
len=3D0
> > [ 11.778053] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0053
> > [ 11.778169] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x54
> > [ 11.778249] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x54, =
len=3D0
> > [ 11.778317] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x54, =
len=3D0
> > [ 11.778708] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0054
> > [ 11.778821] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x55
> > [ 11.778905] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x55, =
len=3D0
> > [ 11.778974] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x55, =
len=3D0
> > [ 11.779296] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0055
> > [ 11.779406] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x56
> > [ 11.779487] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x56, =
len=3D0
> > [ 11.779556] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x56, =
len=3D0
> > [ 11.779881] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0056
> > [ 11.780180] i2c-adapter i2c-0: found normal entry for adapter 0,
addr
> 0x57
> > [ 11.780275] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x57, =
len=3D0
> > [ 11.780346] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x57, =
len=3D0
> > [ 11.780695] i2c-adapter i2c-0: client [eeprom] registered with
bus id
> 0-0057
> > [ 11.780779] i2c-adapter i2c-0: master_xfer[0] W, addr=3D0x57, =
len=3D1
> > [ 11.780828] i2c-adapter i2c-0: master_xfer[1] R, addr=3D0x57, =
len=3D1
> > [ 11.796088] xilinx_iic.0 #0: Could not talk to device 0x57 (0),
bus
> always busy, trying to reset
> > [ 11.884076] i2c-adapter i2c-0: master_xfer[0] R, addr=3D0x57, =
len=3D1
> > [ 11.900084] xilinx_iic.0 #0: Could not talk to device 0x57 (0),
bus
> always busy, trying to reset
> > [ 11.988074] i2c-adapter i2c-0: master_xfer[0] R, addr=3D0x57, =
len=3D1
> > [ 12.004086] xilinx_iic.0 #0: Could not talk to device 0x57 (0),
bus
> always busy, trying to reset
> > [ 12.096076] i2c-adapter i2c-0: master_xfer[0] R, addr=3D0x57, =
len=3D1
> > [ 12.112084] xilinx_iic.0 #0: Could not talk to device 0x57 (0),
bus
> always busy, trying to reset
> > [ 12.200151] xilinx_iic.0 #0 at 0x81600000 mapped to 0xC5060000,
irq=3D4
>=20
> Also, occasionally the board will hang during bootup during the I2C
> device initialization. This is what I get when I try to read from the
> eeprom memory locations:
>=20
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x50
> > Error: Could not set address to 0x50: Device or resource busy
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x51
> > Error: Could not set address to 0x51: Device or resource busy
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x52
> > Error: Could not set address to 0x52: Device or resource busy
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x53
> > Error: Could not set address to 0x53: Device or resource busy
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x54
> > Error: Could not set address to 0x54: Device or resource busy
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x55
> > Error: Could not set address to 0x55: Device or resource busy
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x56
> > Error: Could not set address to 0x56: Device or resource busy
> > root@xilinx-ml403:~/i2c-tools-3.0.1/tools# ./i2cget 0 0x57
> > Error: Could not set address to 0x57: Device or resource busy
>=20
> The following are the I2C defines in my xparameters_ml403.h file:
>=20
> > sellsa@SS-SBIR-Ubuntu:~/linux-2.6-
> xlnx/arch/ppc/platforms/4xx/xparameters$ cat xparameters_ml403.h |
grep
> IIC
> > /* Definitions for driver IIC */
> > #define XPAR_XIIC_NUM_INSTANCES 1
> > /* Definitions for peripheral IIC_EEPROM */
> > #define XPAR_IIC_EEPROM_DEVICE_ID 0
> > #define XPAR_IIC_EEPROM_BASEADDR 0x81600000
> > #define XPAR_IIC_EEPROM_HIGHADDR 0x8160FFFF
> > #define XPAR_IIC_EEPROM_TEN_BIT_ADR 0
> > #define XPAR_IIC_EEPROM_GPO_WIDTH 1
> > /* Canonical definitions for peripheral IIC_EEPROM */
> > #define XPAR_IIC_0_DEVICE_ID XPAR_IIC_EEPROM_DEVICE_ID
> > #define XPAR_IIC_0_BASEADDR 0x81600000
> > #define XPAR_IIC_0_HIGHADDR 0x8160FFFF
> > #define XPAR_IIC_0_TEN_BIT_ADR 0
> > #define XPAR_IIC_0_GPO_WIDTH 1
> > #define XPAR_IIC_EEPROM_IIC2INTC_IRPT_MASK 0X000010
> > #define XPAR_XPS_INTC_0_IIC_EEPROM_IIC2INTC_IRPT_INTR 4
> > #define XPAR_INTC_0_IIC_0_VEC_ID
> XPAR_XPS_INTC_0_IIC_EEPROM_IIC2INTC_IRPT_INTR
> > #define XPAR_PERSISTENT_0_IIC_0_BASEADDR 0
> > #define XPAR_PERSISTENT_0_IIC_0_HIGHADDR 128
> > #define XPAR_PERSISTENT_0_IIC_0_EEPROMADDR 0x50
>=20
> Any ideas on what could be going wrong? Any ideas on how to
> troubleshoot this?
>=20
> Regards,
> Aaron
>=20
> _______________________________________________
> Linuxppc-embedded mailing list
> Linuxppc-embedded@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-embedded
^ permalink raw reply
* PS3: Fix memory hotplug
From: Geoff Levand @ 2008-05-13 16:23 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev@ozlabs.org
A change was made to walk_memory_resource() in commit
4b119e21d0c66c22e8ca03df05d9de623d0eb50f that added a
check of find_lmb(). Add the corresponding lmb_add()
call to ps3_mm_add_memory() so that that check will
succeed.
This fixes the condition where the PS3 boots up with
just the 128 MiB of boot memory.
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
---
Paul,
Please send this one upstream at your earliest convenience.
-Geoff
arch/powerpc/platforms/ps3/mm.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/powerpc/platforms/ps3/mm.c
+++ b/arch/powerpc/platforms/ps3/mm.c
@@ -317,6 +317,8 @@ static int __init ps3_mm_add_memory(void
return result;
}
+ lmb_add(start_addr, map.r1.size);
+
result = online_pages(start_pfn, nr_pages);
if (result)
^ permalink raw reply
* smc911x: how to call the driver?
From: Jens Gehrlein @ 2008-05-13 16:04 UTC (permalink / raw)
To: linuxppc-embedded Mailinglist
Hi,
on our board a SMSC LAN9215i is connected to an i.MX31 ARM processor. My
hope is to get the smc911x driver run on this chip. The LAN921x data
sheets say that existing 911x drivers should work.
The first I had to patch was the Kconfig file, in which the smc911x
driver is only available on PXA architecture:
- depends on NET_ETHERNET && ARCH_PXA
+ depends on NET_ETHERNET && (ARCH_PXA || ARCH_MXC)
So the driver got at least compiled.
My next problem is:
Where and when get the functions smc911x_drv_probe() and smc911x_init()
called? Any hints?
Thank you in advance.
Best Regards,
Jens
^ permalink raw reply
* Re: [PATCH] [POWERPC] Add i2c pins to dts and board setup
From: Scott Wood @ 2008-05-13 16:46 UTC (permalink / raw)
To: Jochen Friedrich
Cc: Kernel, Linux, linuxppc-dev list, Linux I2C, Jean Delvare
In-Reply-To: <4825C445.4020004@scram.de>
Jochen Friedrich wrote:
> Initialize I2C pins on boards with CPM1/CPM2 controllers.
>
> Signed-off-by: Jochen Friedrich <jochen@scram.de>
> ---
> arch/powerpc/boot/dts/mpc8272ads.dts | 10 ++++++++++
> arch/powerpc/boot/dts/mpc866ads.dts | 10 ++++++++++
> arch/powerpc/boot/dts/mpc885ads.dts | 10 ++++++++++
> arch/powerpc/platforms/82xx/mpc8272_ads.c | 4 ++++
> arch/powerpc/platforms/8xx/mpc86xads_setup.c | 4 ++++
> arch/powerpc/platforms/8xx/mpc885ads_setup.c | 3 +++
> 6 files changed, 41 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/boot/dts/mpc8272ads.dts b/arch/powerpc/boot/dts/mpc8272ads.dts
> index 46e2da3..57abcc1 100644
> --- a/arch/powerpc/boot/dts/mpc8272ads.dts
> +++ b/arch/powerpc/boot/dts/mpc8272ads.dts
> @@ -217,6 +217,16 @@
> linux,network-index = <1>;
> fsl,cpm-command = <0x16200300>;
> };
> +
> + i2c@11860 {
> + compatible = "fsl,mpc8272-i2c",
> + "fsl,cpm2-i2c",
> + "fsl,cpm-i2c";
> + reg = <11860 20 8afc 2>;
> + interrupts = <1 8>;
> + interrupt-parent = <&PIC>;
> + fsl,cpm-command = <29600000>;
> + };
> };
>
> PIC: interrupt-controller@10c00 {
> diff --git a/arch/powerpc/boot/dts/mpc866ads.dts b/arch/powerpc/boot/dts/mpc866ads.dts
> index 765e43c..84c190e 100644
> --- a/arch/powerpc/boot/dts/mpc866ads.dts
> +++ b/arch/powerpc/boot/dts/mpc866ads.dts
> @@ -171,6 +171,16 @@
> fsl,cpm-command = <0000>;
> linux,network-index = <1>;
> };
> +
> + i2c@860 {
> + compatible = "fsl,mpc866-i2c",
> + "fsl,cpm1-i2c",
> + "fsl,cpm-i2c";
> + reg = <860 20 3c80 30>;
> + interrupts = <10>;
> + interrupt-parent = <&CPM_PIC>;
> + fsl,cpm-command = <0010>;
> + };
> };
> };
>
> diff --git a/arch/powerpc/boot/dts/mpc885ads.dts b/arch/powerpc/boot/dts/mpc885ads.dts
> index 9895043..67d0e8d 100644
> --- a/arch/powerpc/boot/dts/mpc885ads.dts
> +++ b/arch/powerpc/boot/dts/mpc885ads.dts
> @@ -215,6 +215,16 @@
> fsl,cpm-command = <0x80>;
> linux,network-index = <2>;
> };
> +
> + i2c@860 {
> + compatible = "fsl,mpc885-i2c",
> + "fsl,cpm1-i2c",
> + "fsl,cpm-i2c";
> + reg = <860 20 3c80 30>;
> + interrupts = <10>;
> + interrupt-parent = <&CPM_PIC>;
> + fsl,cpm-command = <0010>;
> + };
> };
> };
>
These are v1 dts files -- you need an 0x prefix on the hex numbers.
-Scott
^ permalink raw reply
* [PATCH 0/6] 16G and multi size hugetlb page support on powerpc
From: Jon Tollefson @ 2008-05-13 17:07 UTC (permalink / raw)
To: linux-kernel, Linux Memory Management List, linuxppc-dev
Cc: Nick Piggin, Nishanth Aravamudan, Andi Kleen, Paul Mackerras
This patch set builds on Nick Piggin's patches for multi size and giant
hugetlb page support of April 22. The following set of patches adds
support for 16G huge pages on ppc64 and support for multiple huge page
sizes at the same time on ppc64. Thus allowing 64K, 16M, and 16G huge
pages given a POWER5+ or later machine.
New to this version of my patch is numerous bug fixes and cleanups, but
the biggest change is the support for multiple huge page sizes on power.
patch 1: changes to generic hugetlb to enable 16G pages on power
patch 2: powerpc: adds function for allocating 16G pages
patch 3: powerpc: setups 16G page locations found in device tree
patch 4: powerpc: page definition support for 16G pages
patch 5: check for overflow when user space is 32bit
patch 6: powerpc: multiple huge page size support
Jon
^ permalink raw reply
* [PATCH 1/6 v2] allow arch specific function for allocating gigantic pages
From: Jon Tollefson @ 2008-05-13 17:19 UTC (permalink / raw)
To: linux-kernel, Linux Memory Management List, linuxppc-dev
Cc: Nick Piggin, Nishanth Aravamudan, Andi Kleen, Paul Mackerras
In-Reply-To: <4829CAC3.30900@us.ibm.com>
Allow alloc_bm_huge_page() to be overridden by architectures that can't
always use bootmem. This requires huge_boot_pages to be available for
use by this function. The 16G pages on ppc64 have to be reserved prior
to boot-time. The location of these pages are indicated in the device
tree.
A BUG_ON in huge_add_hstate is commented out in order to allow 64K huge
pages to continue to work on power.
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
---
include/linux/hugetlb.h | 10 ++++++++++
mm/hugetlb.c | 15 ++++++---------
2 files changed, 16 insertions(+), 9 deletions(-)
diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h
index 8c47ca7..b550ec7 100644
--- a/include/linux/hugetlb.h
+++ b/include/linux/hugetlb.h
@@ -35,6 +35,7 @@ void hugetlb_unreserve_pages(struct inode *inode, long offset, long freed);
extern unsigned long hugepages_treat_as_movable;
extern const unsigned long hugetlb_zero, hugetlb_infinity;
extern int sysctl_hugetlb_shm_group;
+extern struct list_head huge_boot_pages;
/* arch callbacks */
@@ -205,6 +206,14 @@ struct hstate {
unsigned int surplus_huge_pages_node[MAX_NUMNODES];
};
+struct huge_bm_page {
+ struct list_head list;
+ struct hstate *hstate;
+};
+
+/* arch callback */
+int alloc_bm_huge_page(struct hstate *h);
+
void __init huge_add_hstate(unsigned order);
struct hstate *size_to_hstate(unsigned long size);
@@ -256,6 +265,7 @@ extern unsigned long sysctl_overcommit_huge_pages[HUGE_MAX_HSTATE];
#else
struct hstate {};
+#define alloc_bm_huge_page(h) NULL
#define hstate_file(f) NULL
#define hstate_vma(v) NULL
#define hstate_inode(i) NULL
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 5273f6c..efb5805 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -27,6 +27,7 @@ unsigned long max_huge_pages[HUGE_MAX_HSTATE];
unsigned long sysctl_overcommit_huge_pages[HUGE_MAX_HSTATE];
static gfp_t htlb_alloc_mask = GFP_HIGHUSER;
unsigned long hugepages_treat_as_movable;
+struct list_head huge_boot_pages;
static int max_hstate = 0;
@@ -533,14 +534,8 @@ static struct page *alloc_huge_page(struct vm_area_struct *vma,
return page;
}
-static __initdata LIST_HEAD(huge_boot_pages);
-
-struct huge_bm_page {
- struct list_head list;
- struct hstate *hstate;
-};
-
-static int __init alloc_bm_huge_page(struct hstate *h)
+/* Can be overriden by architectures */
+__attribute__((weak)) int alloc_bm_huge_page(struct hstate *h)
{
struct huge_bm_page *m;
int nr_nodes = nodes_weight(node_online_map);
@@ -583,6 +578,8 @@ static void __init hugetlb_init_hstate(struct hstate *h)
unsigned long i;
/* Don't reinitialize lists if they have been already init'ed */
+ if (!huge_boot_pages.next)
+ INIT_LIST_HEAD(&huge_boot_pages);
if (!h->hugepage_freelists[0].next) {
for (i = 0; i < MAX_NUMNODES; ++i)
INIT_LIST_HEAD(&h->hugepage_freelists[i]);
@@ -664,7 +661,7 @@ void __init huge_add_hstate(unsigned order)
return;
}
BUG_ON(max_hstate >= HUGE_MAX_HSTATE);
- BUG_ON(order < HPAGE_SHIFT - PAGE_SHIFT);
+/* BUG_ON(order < HPAGE_SHIFT - PAGE_SHIFT);*/
h = &hstates[max_hstate++];
h->order = order;
h->mask = ~((1ULL << (order + PAGE_SHIFT)) - 1);
^ permalink raw reply related
* [PATCH 2/6 v2] powerpc: function for allocating gigantic pages
From: Jon Tollefson @ 2008-05-13 17:21 UTC (permalink / raw)
To: linux-kernel, Linux Memory Management List, linuxppc-dev
Cc: Nick Piggin, Nishanth Aravamudan, Andi Kleen, Paul Mackerras
In-Reply-To: <4829CAC3.30900@us.ibm.com>
The 16G page locations have been saved during early boot in an array.
The alloc_bm_huge_page() function adds a page from here to the
huge_boot_pages list.
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
---
arch/powerpc/mm/hugetlbpage.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 26f212f..383b3b2 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -29,6 +29,12 @@
#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
+#define MAX_NUMBER_GPAGES 1024
+
+/* Tracks the 16G pages after the device tree is scanned and before the
+ * huge_boot_pages list is ready. */
+static unsigned long gpage_freearray[MAX_NUMBER_GPAGES];
+static unsigned nr_gpages;
unsigned int hugepte_shift;
#define PTRS_PER_HUGEPTE (1 << hugepte_shift)
@@ -104,6 +110,22 @@ pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
}
#endif
+/* Moves the gigantic page addresses from the temporary list to the
+ * huge_boot_pages list.
+ */
+int alloc_bm_huge_page(struct hstate *h)
+{
+ struct huge_bm_page *m;
+ if (nr_gpages == 0)
+ return 0;
+ m = phys_to_virt(gpage_freearray[--nr_gpages]);
+ gpage_freearray[nr_gpages] = 0;
+ list_add(&m->list, &huge_boot_pages);
+ m->hstate = h;
+ return 1;
+}
+
+
/* Modelled after find_linux_pte() */
pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
{
^ permalink raw reply related
* [PATCH 3/6 v2] powerpc: scan device tree and save gigantic page locations
From: Jon Tollefson @ 2008-05-13 17:22 UTC (permalink / raw)
To: linux-kernel, Linux Memory Management List, linuxppc-dev
Cc: Nick Piggin, Nishanth Aravamudan, Andi Kleen, Paul Mackerras
In-Reply-To: <4829CAC3.30900@us.ibm.com>
The 16G huge pages have to be reserved in the HMC prior to boot. The
location of the pages are placed in the device tree. This patch adds
code to scan the device tree during very early boot and save these page
locations until hugetlbfs is ready for them.
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
---
arch/powerpc/mm/hash_utils_64.c | 44 ++++++++++++++++++++++++++++++++++++++-
arch/powerpc/mm/hugetlbpage.c | 16 ++++++++++++++
include/asm-powerpc/mmu-hash64.h | 2 +
3 files changed, 61 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index a83dfa3..133d6e2 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -67,6 +67,7 @@
#define KB (1024)
#define MB (1024*KB)
+#define GB (1024L*MB)
/*
* Note: pte --> Linux PTE
@@ -302,6 +303,44 @@ static int __init htab_dt_scan_page_sizes(unsigned long node,
return 0;
}
+/* Scan for 16G memory blocks that have been set aside for huge pages
+ * and reserve those blocks for 16G huge pages.
+ */
+static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
+ const char *uname, int depth,
+ void *data) {
+ char *type = of_get_flat_dt_prop(node, "device_type", NULL);
+ unsigned long *addr_prop;
+ u32 *page_count_prop;
+ unsigned int expected_pages;
+ long unsigned int phys_addr;
+ long unsigned int block_size;
+
+ /* We are scanning "memory" nodes only */
+ if (type == NULL || strcmp(type, "memory") != 0)
+ return 0;
+
+ /* This property is the log base 2 of the number of virtual pages that
+ * will represent this memory block. */
+ page_count_prop = of_get_flat_dt_prop(node, "ibm,expected#pages", NULL);
+ if (page_count_prop == NULL)
+ return 0;
+ expected_pages = (1 << page_count_prop[0]);
+ addr_prop = of_get_flat_dt_prop(node, "reg", NULL);
+ if (addr_prop == NULL)
+ return 0;
+ phys_addr = addr_prop[0];
+ block_size = addr_prop[1];
+ if (block_size != (16 * GB))
+ return 0;
+ printk(KERN_INFO "Huge page(16GB) memory: "
+ "addr = 0x%lX size = 0x%lX pages = %d\n",
+ phys_addr, block_size, expected_pages);
+ lmb_reserve(phys_addr, block_size * expected_pages);
+ add_gpage(phys_addr, block_size, expected_pages);
+ return 0;
+}
+
static void __init htab_init_page_sizes(void)
{
int rc;
@@ -370,7 +409,10 @@ static void __init htab_init_page_sizes(void)
mmu_psize_defs[mmu_io_psize].shift);
#ifdef CONFIG_HUGETLB_PAGE
- /* Init large page size. Currently, we pick 16M or 1M depending
+ /* Reserve 16G huge page memory sections for huge pages */
+ of_scan_flat_dt(htab_dt_scan_hugepage_blocks, NULL);
+
+/* Init large page size. Currently, we pick 16M or 1M depending
* on what is available
*/
if (mmu_psize_defs[MMU_PAGE_16M].shift)
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 383b3b2..a27b80c 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -110,6 +110,22 @@ pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
}
#endif
+/* Build list of addresses of gigantic pages. This function is used in early
+ * boot before the buddy or bootmem allocator is setup.
+ */
+void add_gpage(unsigned long addr, unsigned long page_size,
+ unsigned long number_of_pages)
+{
+ if (!addr)
+ return;
+ while (number_of_pages > 0) {
+ gpage_freearray[nr_gpages] = addr;
+ nr_gpages++;
+ number_of_pages--;
+ addr += page_size;
+ }
+}
+
/* Moves the gigantic page addresses from the temporary list to the
* huge_boot_pages list.
*/
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h
index 2864fa3..db1276a 100644
--- a/include/asm-powerpc/mmu-hash64.h
+++ b/include/asm-powerpc/mmu-hash64.h
@@ -279,6 +279,8 @@ extern int htab_bolt_mapping(unsigned long vstart, unsigned long vend,
unsigned long pstart, unsigned long mode,
int psize, int ssize);
extern void set_huge_psize(int psize);
+extern void add_gpage(unsigned long addr, unsigned long page_size,
+ unsigned long number_of_pages);
extern void demote_segment_4k(struct mm_struct *mm, unsigned long addr);
extern void htab_initialize(void);
^ permalink raw reply related
* [PATCH 4/6 v2] powerpc: define page support for 16G pages
From: Jon Tollefson @ 2008-05-13 17:23 UTC (permalink / raw)
To: linux-kernel, Linux Memory Management List, linuxppc-dev
Cc: Nick Piggin, Nishanth Aravamudan, Andi Kleen, Paul Mackerras
In-Reply-To: <4829CAC3.30900@us.ibm.com>
The huge page size is defined for 16G pages. If a hugepagesz of 16G is
specified at boot-time then it becomes the huge page size instead of
the default 16M.
The change in pgtable-64K.h is to the macro
pte_iterate_hashed_subpages to make the increment to va (the 1
being shifted) be a long so that it is not shifted to 0. Otherwise it
would create an infinite loop when the shift value is for a 16G page
(when base page size is 64K).
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
---
arch/powerpc/mm/hugetlbpage.c | 62 ++++++++++++++++++++++++++------------
include/asm-powerpc/pgtable-64k.h | 2 -
2 files changed, 45 insertions(+), 19 deletions(-)
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index a27b80c..063ec36 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -24,8 +24,9 @@
#include <asm/cputable.h>
#include <asm/spu.h>
-#define HPAGE_SHIFT_64K 16
-#define HPAGE_SHIFT_16M 24
+#define PAGE_SHIFT_64K 16
+#define PAGE_SHIFT_16M 24
+#define PAGE_SHIFT_16G 34
#define NUM_LOW_AREAS (0x100000000UL >> SID_SHIFT)
#define NUM_HIGH_AREAS (PGTABLE_RANGE >> HTLB_AREA_SHIFT)
@@ -95,7 +96,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
static inline
pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
{
- if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
+ if (HPAGE_SHIFT == PAGE_SHIFT_64K)
return pmd_offset(pud, addr);
else
return (pmd_t *) pud;
@@ -103,7 +104,7 @@ pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
static inline
pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
{
- if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
+ if (HPAGE_SHIFT == PAGE_SHIFT_64K)
return pmd_alloc(mm, pud, addr);
else
return (pmd_t *) pud;
@@ -260,7 +261,7 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
continue;
hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
#else
- if (HPAGE_SHIFT == HPAGE_SHIFT_64K) {
+ if (HPAGE_SHIFT == PAGE_SHIFT_64K) {
if (pud_none_or_clear_bad(pud))
continue;
hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
@@ -591,20 +592,40 @@ void set_huge_psize(int psize)
{
/* Check that it is a page size supported by the hardware and
* that it fits within pagetable limits. */
- if (mmu_psize_defs[psize].shift && mmu_psize_defs[psize].shift < SID_SHIFT &&
+ if (mmu_psize_defs[psize].shift &&
+ mmu_psize_defs[psize].shift < SID_SHIFT_1T &&
(mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT ||
- mmu_psize_defs[psize].shift == HPAGE_SHIFT_64K)) {
+ mmu_psize_defs[psize].shift == PAGE_SHIFT_64K ||
+ mmu_psize_defs[psize].shift == PAGE_SHIFT_16G)) {
+ /* Return if huge page size is the same as the
+ * base page size. */
+ if (mmu_psize_defs[psize].shift == PAGE_SHIFT)
+ return;
+
HPAGE_SHIFT = mmu_psize_defs[psize].shift;
mmu_huge_psize = psize;
-#ifdef CONFIG_PPC_64K_PAGES
- hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
-#else
- if (HPAGE_SHIFT == HPAGE_SHIFT_64K)
- hugepte_shift = (PMD_SHIFT-HPAGE_SHIFT);
- else
- hugepte_shift = (PUD_SHIFT-HPAGE_SHIFT);
-#endif
+ switch (HPAGE_SHIFT) {
+ case PAGE_SHIFT_64K:
+ /* We only allow 64k hpages with 4k base page,
+ * which was checked above, and always put them
+ * at the PMD */
+ hugepte_shift = PMD_SHIFT;
+ break;
+ case PAGE_SHIFT_16M:
+ /* 16M pages can be at two different levels
+ * of pagestables based on base page size */
+ if (PAGE_SHIFT == PAGE_SHIFT_64K)
+ hugepte_shift = PMD_SHIFT;
+ else /* 4k base page */
+ hugepte_shift = PUD_SHIFT;
+ break;
+ case PAGE_SHIFT_16G:
+ /* 16G pages are always at PGD level */
+ hugepte_shift = PGDIR_SHIFT;
+ break;
+ }
+ hugepte_shift -= HPAGE_SHIFT;
} else
HPAGE_SHIFT = 0;
}
@@ -620,17 +641,22 @@ static int __init hugepage_setup_sz(char *str)
shift = __ffs(size);
switch (shift) {
#ifndef CONFIG_PPC_64K_PAGES
- case HPAGE_SHIFT_64K:
+ case PAGE_SHIFT_64K:
mmu_psize = MMU_PAGE_64K;
break;
#endif
- case HPAGE_SHIFT_16M:
+ case PAGE_SHIFT_16M:
mmu_psize = MMU_PAGE_16M;
break;
+ case PAGE_SHIFT_16G:
+ mmu_psize = MMU_PAGE_16G;
+ break;
}
- if (mmu_psize >=0 && mmu_psize_defs[mmu_psize].shift)
+ if (mmu_psize >= 0 && mmu_psize_defs[mmu_psize].shift) {
set_huge_psize(mmu_psize);
+ huge_add_hstate(shift - PAGE_SHIFT);
+ }
else
printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
diff --git a/include/asm-powerpc/pgtable-64k.h b/include/asm-powerpc/pgtable-64k.h
index 1cbd6b3..55f0861 100644
--- a/include/asm-powerpc/pgtable-64k.h
+++ b/include/asm-powerpc/pgtable-64k.h
@@ -125,7 +125,7 @@ static inline struct subpage_prot_table *pgd_subpage_prot(pgd_t *pgd)
unsigned __split = (psize == MMU_PAGE_4K || \
psize == MMU_PAGE_64K_AP); \
shift = mmu_psize_defs[psize].shift; \
- for (index = 0; va < __end; index++, va += (1 << shift)) { \
+ for (index = 0; va < __end; index++, va += (1L << shift)) { \
if (!__split || __rpte_sub_valid(rpte, index)) do { \
#define pte_iterate_hashed_end() } while(0); } } while(0)
^ permalink raw reply related
* [PATCH 5/6 v2] check for overflow
From: Jon Tollefson @ 2008-05-13 17:23 UTC (permalink / raw)
To: linux-kernel, Linux Memory Management List, linuxppc-dev
Cc: Nick Piggin, Nishanth Aravamudan, Andi Kleen, Paul Mackerras
In-Reply-To: <4829CAC3.30900@us.ibm.com>
Adds a check for an overflow in the filesystem size so if someone is
checking with statfs() on a 16G hugetlbfs in a 32bit binary that it
will report back EOVERFLOW instead of a size of 0.
Are other places that need a similar check? I had tried a similar
check in put_compat_statfs64 too but it didn't seem to generate an
EOVERFLOW in my test case.
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
---
fs/compat.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/compat.c b/fs/compat.c
index 2ce4456..6eb6aad 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -196,8 +196,8 @@ static int put_compat_statfs(struct compat_statfs __user *ubuf, struct kstatfs *
{
if (sizeof ubuf->f_blocks == 4) {
- if ((kbuf->f_blocks | kbuf->f_bfree | kbuf->f_bavail) &
- 0xffffffff00000000ULL)
+ if ((kbuf->f_blocks | kbuf->f_bfree | kbuf->f_bavail |
+ kbuf->f_bsize | kbuf->f_frsize) & 0xffffffff00000000ULL)
return -EOVERFLOW;
/* f_files and f_ffree may be -1; it's okay
* to stuff that into 32 bits */
^ permalink raw reply related
* [PATCH 6/6] powerpc: support multiple huge page sizes
From: Jon Tollefson @ 2008-05-13 17:25 UTC (permalink / raw)
To: linux-kernel, Linux Memory Management List, linuxppc-dev
Cc: Nick Piggin, Nishanth Aravamudan, Andi Kleen, Paul Mackerras
In-Reply-To: <4829CAC3.30900@us.ibm.com>
Instead of using the variable mmu_huge_psize to keep track of the huge
page size we use an array of MMU_PAGE_* values. For each supported
huge page size we need to know the hugepte_shift value and have a
pgtable_cache. The hstate or an mmu_huge_psizes index is passed to
functions so that they know which huge page size they should use.
The hugepage sizes 16M and 64K are setup(if available on the
hardware) so that they don't have to be set on the boot cmd line in
order to use them. The number of 16G pages have to be specified at
boot-time though (e.g. hugepagesz=16G hugepages=5).
Signed-off-by: Jon Tollefson <kniht@linux.vnet.ibm.com>
---
arch/powerpc/mm/hash_utils_64.c | 9 -
arch/powerpc/mm/hugetlbpage.c | 267 +++++++++++++++++++++++++--------------
arch/powerpc/mm/init_64.c | 8 -
arch/powerpc/mm/tlb_64.c | 2
include/asm-powerpc/mmu-hash64.h | 4
include/asm-powerpc/page_64.h | 1
include/asm-powerpc/pgalloc-64.h | 4
7 files changed, 187 insertions(+), 108 deletions(-)
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -99,7 +99,6 @@ int mmu_kernel_ssize = MMU_SEGSIZE_256M;
int mmu_highuser_ssize = MMU_SEGSIZE_256M;
u16 mmu_slb_size = 64;
#ifdef CONFIG_HUGETLB_PAGE
-int mmu_huge_psize = MMU_PAGE_16M;
unsigned int HPAGE_SHIFT;
#endif
#ifdef CONFIG_PPC_64K_PAGES
@@ -412,15 +411,15 @@ static void __init htab_init_page_sizes(void)
/* Reserve 16G huge page memory sections for huge pages */
of_scan_flat_dt(htab_dt_scan_hugepage_blocks, NULL);
-/* Init large page size. Currently, we pick 16M or 1M depending
+/* Set default large page size. Currently, we pick 16M or 1M depending
* on what is available
*/
if (mmu_psize_defs[MMU_PAGE_16M].shift)
- set_huge_psize(MMU_PAGE_16M);
+ HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_16M].shift;
/* With 4k/4level pagetables, we can't (for now) cope with a
* huge page size < PMD_SIZE */
else if (mmu_psize_defs[MMU_PAGE_1M].shift)
- set_huge_psize(MMU_PAGE_1M);
+ HPAGE_SHIFT = mmu_psize_defs[MMU_PAGE_1M].shift;
#endif /* CONFIG_HUGETLB_PAGE */
}
@@ -819,7 +818,7 @@ int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
#ifdef CONFIG_HUGETLB_PAGE
/* Handle hugepage regions */
- if (HPAGE_SHIFT && psize == mmu_huge_psize) {
+ if (HPAGE_SHIFT && mmu_huge_psizes[psize]) {
DBG_LOW(" -> huge page !\n");
return hash_huge_page(mm, access, ea, vsid, local, trap);
}
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 063ec36..61ce875 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -37,15 +37,30 @@
static unsigned long gpage_freearray[MAX_NUMBER_GPAGES];
static unsigned nr_gpages;
-unsigned int hugepte_shift;
-#define PTRS_PER_HUGEPTE (1 << hugepte_shift)
-#define HUGEPTE_TABLE_SIZE (sizeof(pte_t) << hugepte_shift)
+/* Array of valid huge page sizes - non-zero value(hugepte_shift) is
+ * stored for the huge page sizes that are valid.
+ */
+unsigned int mmu_huge_psizes[MMU_PAGE_COUNT];
+
+#define hugepte_shift mmu_huge_psizes
+#define PTRS_PER_HUGEPTE(psize) (1 << hugepte_shift[psize])
+#define HUGEPTE_TABLE_SIZE(psize) (sizeof(pte_t) << hugepte_shift[psize])
+
+#define HUGEPD_SHIFT(psize) (mmu_psize_to_shift(psize) \
+ + hugepte_shift[psize])
+#define HUGEPD_SIZE(psize) (1UL << HUGEPD_SHIFT(psize))
+#define HUGEPD_MASK(psize) (~(HUGEPD_SIZE(psize)-1))
-#define HUGEPD_SHIFT (HPAGE_SHIFT + hugepte_shift)
-#define HUGEPD_SIZE (1UL << HUGEPD_SHIFT)
-#define HUGEPD_MASK (~(HUGEPD_SIZE-1))
+/* Subtract one from array size because we don't need a cache for 4K since
+ * is not a huge page size */
+#define huge_pgtable_cache(psize) (pgtable_cache[HUGEPTE_CACHE_NUM \
+ + psize-1])
+#define HUGEPTE_CACHE_NAME(psize) (huge_pgtable_cache_name[psize])
-#define huge_pgtable_cache (pgtable_cache[HUGEPTE_CACHE_NUM])
+static const char *huge_pgtable_cache_name[MMU_PAGE_COUNT] = {
+ "unused_4K", "hugepte_cache_64K", "unused_64K_AP",
+ "hugepte_cache_1M", "hugepte_cache_16M", "hugepte_cache_16G"
+};
/* Flag to mark huge PD pointers. This means pmd_bad() and pud_bad()
* will choke on pointers to hugepte tables, which is handy for
@@ -56,24 +71,49 @@ typedef struct { unsigned long pd; } hugepd_t;
#define hugepd_none(hpd) ((hpd).pd == 0)
+static inline int shift_to_mmu_psize(unsigned int shift)
+{
+ switch (shift) {
+#ifndef CONFIG_PPC_64K_PAGES
+ case PAGE_SHIFT_64K:
+ return MMU_PAGE_64K;
+#endif
+ case PAGE_SHIFT_16M:
+ return MMU_PAGE_16M;
+ case PAGE_SHIFT_16G:
+ return MMU_PAGE_16G;
+ }
+ return -1;
+}
+
+static inline unsigned int mmu_psize_to_shift(unsigned int mmu_psize)
+{
+ if (mmu_psize_defs[mmu_psize].shift)
+ return mmu_psize_defs[mmu_psize].shift;
+ BUG();
+}
+
static inline pte_t *hugepd_page(hugepd_t hpd)
{
BUG_ON(!(hpd.pd & HUGEPD_OK));
return (pte_t *)(hpd.pd & ~HUGEPD_OK);
}
-static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr)
+static inline pte_t *hugepte_offset(hugepd_t *hpdp, unsigned long addr,
+ struct hstate *hstate)
{
- unsigned long idx = ((addr >> HPAGE_SHIFT) & (PTRS_PER_HUGEPTE-1));
+ unsigned int shift = huge_page_shift(hstate);
+ int psize = shift_to_mmu_psize(shift);
+ unsigned long idx = ((addr >> shift) & (PTRS_PER_HUGEPTE(psize)-1));
pte_t *dir = hugepd_page(*hpdp);
return dir + idx;
}
static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
- unsigned long address)
+ unsigned long address, unsigned int psize)
{
- pte_t *new = kmem_cache_alloc(huge_pgtable_cache,
+ pte_t *new = kmem_cache_alloc(huge_pgtable_cache(psize),
GFP_KERNEL|__GFP_REPEAT);
if (! new)
@@ -81,7 +121,7 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
spin_lock(&mm->page_table_lock);
if (!hugepd_none(*hpdp))
- kmem_cache_free(huge_pgtable_cache, new);
+ kmem_cache_free(huge_pgtable_cache(psize), new);
else
hpdp->pd = (unsigned long)new | HUGEPD_OK;
spin_unlock(&mm->page_table_lock);
@@ -90,21 +130,22 @@ static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
/* Base page size affects how we walk hugetlb page tables */
#ifdef CONFIG_PPC_64K_PAGES
-#define hpmd_offset(pud, addr) pmd_offset(pud, addr)
-#define hpmd_alloc(mm, pud, addr) pmd_alloc(mm, pud, addr)
+#define hpmd_offset(pud, addr, h) pmd_offset(pud, addr)
+#define hpmd_alloc(mm, pud, addr, h) pmd_alloc(mm, pud, addr)
#else
static inline
-pmd_t *hpmd_offset(pud_t *pud, unsigned long addr)
+pmd_t *hpmd_offset(pud_t *pud, unsigned long addr, struct hstate *hstate)
{
- if (HPAGE_SHIFT == PAGE_SHIFT_64K)
+ if (huge_page_shift(hstate) == PAGE_SHIFT_64K)
return pmd_offset(pud, addr);
else
return (pmd_t *) pud;
}
static inline
-pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr)
+pmd_t *hpmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long addr,
+ struct hstate *hstate)
{
- if (HPAGE_SHIFT == PAGE_SHIFT_64K)
+ if (huge_page_shift(hstate) == PAGE_SHIFT_64K)
return pmd_alloc(mm, pud, addr);
else
return (pmd_t *) pud;
@@ -130,7 +171,7 @@ void add_gpage(unsigned long addr, unsigned long page_size,
/* Moves the gigantic page addresses from the temporary list to the
* huge_boot_pages list.
*/
-int alloc_bm_huge_page(struct hstate *h)
+int alloc_bm_huge_page(struct hstate *hstate)
{
struct huge_bm_page *m;
if (nr_gpages == 0)
@@ -138,7 +179,7 @@ int alloc_bm_huge_page(struct hstate *h)
m = phys_to_virt(gpage_freearray[--nr_gpages]);
gpage_freearray[nr_gpages] = 0;
list_add(&m->list, &huge_boot_pages);
- m->hstate = h;
+ m->hstate = hstate;
return 1;
}
@@ -150,17 +191,25 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
pud_t *pu;
pmd_t *pm;
- BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
+ unsigned int psize;
+ unsigned int shift;
+ unsigned long sz;
+ struct hstate *hstate;
+ psize = get_slice_psize(mm, addr);
+ shift = mmu_psize_to_shift(psize);
+ sz = ((1UL) << shift);
+ hstate = size_to_hstate(sz);
- addr &= HPAGE_MASK;
+ addr &= hstate->mask;
pg = pgd_offset(mm, addr);
if (!pgd_none(*pg)) {
pu = pud_offset(pg, addr);
if (!pud_none(*pu)) {
- pm = hpmd_offset(pu, addr);
+ pm = hpmd_offset(pu, addr, hstate);
if (!pmd_none(*pm))
- return hugepte_offset((hugepd_t *)pm, addr);
+ return hugepte_offset((hugepd_t *)pm, addr,
+ hstate);
}
}
@@ -173,16 +222,20 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz
pud_t *pu;
pmd_t *pm;
hugepd_t *hpdp = NULL;
+ struct hstate *hstate;
+ unsigned int psize;
+ hstate = size_to_hstate(sz);
- BUG_ON(get_slice_psize(mm, addr) != mmu_huge_psize);
+ psize = get_slice_psize(mm, addr);
+ BUG_ON(!mmu_huge_psizes[psize]);
- addr &= HPAGE_MASK;
+ addr &= hstate->mask;
pg = pgd_offset(mm, addr);
pu = pud_alloc(mm, pg, addr);
if (pu) {
- pm = hpmd_alloc(mm, pu, addr);
+ pm = hpmd_alloc(mm, pu, addr, hstate);
if (pm)
hpdp = (hugepd_t *)pm;
}
@@ -190,10 +243,10 @@ pte_t *huge_pte_alloc(struct mm_struct *mm, unsigned long addr, unsigned long sz
if (! hpdp)
return NULL;
- if (hugepd_none(*hpdp) && __hugepte_alloc(mm, hpdp, addr))
+ if (hugepd_none(*hpdp) && __hugepte_alloc(mm, hpdp, addr, psize))
return NULL;
- return hugepte_offset(hpdp, addr);
+ return hugepte_offset(hpdp, addr, hstate);
}
int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
@@ -201,19 +254,22 @@ int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep)
return 0;
}
-static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp)
+static void free_hugepte_range(struct mmu_gather *tlb, hugepd_t *hpdp,
+ unsigned int psize)
{
pte_t *hugepte = hugepd_page(*hpdp);
hpdp->pd = 0;
tlb->need_flush = 1;
- pgtable_free_tlb(tlb, pgtable_free_cache(hugepte, HUGEPTE_CACHE_NUM,
+ pgtable_free_tlb(tlb, pgtable_free_cache(hugepte,
+ HUGEPTE_CACHE_NUM+psize-1,
PGF_CACHENUM_MASK));
}
static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
unsigned long addr, unsigned long end,
- unsigned long floor, unsigned long ceiling)
+ unsigned long floor, unsigned long ceiling,
+ unsigned int psize)
{
pmd_t *pmd;
unsigned long next;
@@ -225,7 +281,7 @@ static void hugetlb_free_pmd_range(struct mmu_gather *tlb, pud_t *pud,
next = pmd_addr_end(addr, end);
if (pmd_none(*pmd))
continue;
- free_hugepte_range(tlb, (hugepd_t *)pmd);
+ free_hugepte_range(tlb, (hugepd_t *)pmd, psize);
} while (pmd++, addr = next, addr != end);
start &= PUD_MASK;
@@ -251,6 +307,9 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
pud_t *pud;
unsigned long next;
unsigned long start;
+ unsigned int shift;
+ unsigned int psize = get_slice_psize(tlb->mm, addr);
+ shift = mmu_psize_to_shift(psize);
start = addr;
pud = pud_offset(pgd, addr);
@@ -259,16 +318,18 @@ static void hugetlb_free_pud_range(struct mmu_gather *tlb, pgd_t *pgd,
#ifdef CONFIG_PPC_64K_PAGES
if (pud_none_or_clear_bad(pud))
continue;
- hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
+ hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling,
+ psize);
#else
- if (HPAGE_SHIFT == PAGE_SHIFT_64K) {
+ if (shift == PAGE_SHIFT_64K) {
if (pud_none_or_clear_bad(pud))
continue;
- hugetlb_free_pmd_range(tlb, pud, addr, next, floor, ceiling);
+ hugetlb_free_pmd_range(tlb, pud, addr, next, floor,
+ ceiling, psize);
} else {
if (pud_none(*pud))
continue;
- free_hugepte_range(tlb, (hugepd_t *)pud);
+ free_hugepte_range(tlb, (hugepd_t *)pud, psize);
}
#endif
} while (pud++, addr = next, addr != end);
@@ -336,27 +397,29 @@ void hugetlb_free_pgd_range(struct mmu_gather **tlb,
* now has no other vmas using it, so can be freed, we don't
* bother to round floor or end up - the tests don't need that.
*/
+ unsigned int psize = get_slice_psize((*tlb)->mm, addr);
- addr &= HUGEPD_MASK;
+ addr &= HUGEPD_MASK(psize);
if (addr < floor) {
- addr += HUGEPD_SIZE;
+ addr += HUGEPD_SIZE(psize);
if (!addr)
return;
}
if (ceiling) {
- ceiling &= HUGEPD_MASK;
+ ceiling &= HUGEPD_MASK(psize);
if (!ceiling)
return;
}
if (end - 1 > ceiling - 1)
- end -= HUGEPD_SIZE;
+ end -= HUGEPD_SIZE(psize);
if (addr > end - 1)
return;
start = addr;
pgd = pgd_offset((*tlb)->mm, addr);
do {
- BUG_ON(get_slice_psize((*tlb)->mm, addr) != mmu_huge_psize);
+ psize = get_slice_psize((*tlb)->mm, addr);
+ BUG_ON(!mmu_huge_psizes[psize]);
next = pgd_addr_end(addr, end);
if (pgd_none_or_clear_bad(pgd))
continue;
@@ -373,7 +436,12 @@ void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
* necessary anymore if we make hpte_need_flush() get the
* page size from the slices
*/
- pte_update(mm, addr & HPAGE_MASK, ptep, ~0UL, 1);
+ unsigned int psize = get_slice_psize(mm, addr);
+ unsigned int shift = mmu_psize_to_shift(psize);
+ unsigned long sz;
+ sz = ((1UL) << shift);
+ struct hstate *hstate = size_to_hstate(sz);
+ pte_update(mm, addr & hstate->mask, ptep, ~0UL, 1);
}
*ptep = __pte(pte_val(pte) & ~_PAGE_HPTEFLAGS);
}
@@ -390,14 +458,19 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
{
pte_t *ptep;
struct page *page;
+ unsigned int mmu_psize = get_slice_psize(mm, address);
- if (get_slice_psize(mm, address) != mmu_huge_psize)
+ /* Verify it is a huge page else bail. */
+ if (!mmu_huge_psizes[mmu_psize])
return ERR_PTR(-EINVAL);
ptep = huge_pte_offset(mm, address);
page = pte_page(*ptep);
- if (page)
- page += (address % HPAGE_SIZE) / PAGE_SIZE;
+ if (page) {
+ unsigned int shift = mmu_psize_to_shift(mmu_psize);
+ unsigned long sz = ((1UL) << shift);
+ page += (address % sz) / PAGE_SIZE;
+ }
return page;
}
@@ -425,15 +498,16 @@ unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr,
unsigned long len, unsigned long pgoff,
unsigned long flags)
{
- return slice_get_unmapped_area(addr, len, flags,
- mmu_huge_psize, 1, 0);
+ struct hstate *hstate = hstate_file(file);
+ int mmu_psize = shift_to_mmu_psize(huge_page_shift(hstate));
+ return slice_get_unmapped_area(addr, len, flags, mmu_psize, 1, 0);
}
/*
* Called by asm hashtable.S for doing lazy icache flush
*/
static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,
- pte_t pte, int trap)
+ pte_t pte, int trap, unsigned long sz)
{
struct page *page;
int i;
@@ -446,7 +520,7 @@ static unsigned int hash_huge_page_do_lazy_icache(unsigned long rflags,
/* page is dirty */
if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) {
if (trap == 0x400) {
- for (i = 0; i < (HPAGE_SIZE / PAGE_SIZE); i++)
+ for (i = 0; i < (sz / PAGE_SIZE); i++)
__flush_dcache_icache(page_address(page+i));
set_bit(PG_arch_1, &page->flags);
} else {
@@ -466,7 +540,12 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
long slot;
int err = 1;
int ssize = user_segment_size(ea);
+ unsigned int mmu_psize;
+ int shift;
+ mmu_psize = get_slice_psize(mm, ea);
+ if(!mmu_huge_psizes[mmu_psize])
+ goto out;
ptep = huge_pte_offset(mm, ea);
/* Search the Linux page table for a match with va */
@@ -510,30 +589,32 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
rflags = 0x2 | (!(new_pte & _PAGE_RW));
/* _PAGE_EXEC -> HW_NO_EXEC since it's inverted */
rflags |= ((new_pte & _PAGE_EXEC) ? 0 : HPTE_R_N);
+ shift = mmu_psize_to_shift(mmu_psize);
+ unsigned long sz = ((1UL) << shift);
if (!cpu_has_feature(CPU_FTR_COHERENT_ICACHE))
/* No CPU has hugepages but lacks no execute, so we
* don't need to worry about that case */
rflags = hash_huge_page_do_lazy_icache(rflags, __pte(old_pte),
- trap);
+ trap, sz);
/* Check if pte already has an hpte (case 2) */
if (unlikely(old_pte & _PAGE_HASHPTE)) {
/* There MIGHT be an HPTE for this pte */
unsigned long hash, slot;
- hash = hpt_hash(va, HPAGE_SHIFT, ssize);
+ hash = hpt_hash(va, shift, ssize);
if (old_pte & _PAGE_F_SECOND)
hash = ~hash;
slot = (hash & htab_hash_mask) * HPTES_PER_GROUP;
slot += (old_pte & _PAGE_F_GIX) >> 12;
- if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_huge_psize,
+ if (ppc_md.hpte_updatepp(slot, rflags, va, mmu_psize,
ssize, local) == -1)
old_pte &= ~_PAGE_HPTEFLAGS;
}
if (likely(!(old_pte & _PAGE_HASHPTE))) {
- unsigned long hash = hpt_hash(va, HPAGE_SHIFT, ssize);
+ unsigned long hash = hpt_hash(va, shift, ssize);
unsigned long hpte_group;
pa = pte_pfn(__pte(old_pte)) << PAGE_SHIFT;
@@ -552,7 +633,7 @@ repeat:
/* Insert into the hash table, primary slot */
slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags, 0,
- mmu_huge_psize, ssize);
+ mmu_psize, ssize);
/* Primary is full, try the secondary */
if (unlikely(slot == -1)) {
@@ -560,7 +641,7 @@ repeat:
HPTES_PER_GROUP) & ~0x7UL;
slot = ppc_md.hpte_insert(hpte_group, va, pa, rflags,
HPTE_V_SECONDARY,
- mmu_huge_psize, ssize);
+ mmu_psize, ssize);
if (slot == -1) {
if (mftb() & 0x1)
hpte_group = ((hash & htab_hash_mask) *
@@ -597,35 +678,34 @@ void set_huge_psize(int psize)
(mmu_psize_defs[psize].shift > MIN_HUGEPTE_SHIFT ||
mmu_psize_defs[psize].shift == PAGE_SHIFT_64K ||
mmu_psize_defs[psize].shift == PAGE_SHIFT_16G)) {
- /* Return if huge page size is the same as the
- * base page size. */
- if (mmu_psize_defs[psize].shift == PAGE_SHIFT)
+ /* Return if huge page size has already been setup or is the
+ * same as the base page size. */
+ if (mmu_huge_psizes[psize] ||
+ mmu_psize_defs[psize].shift == PAGE_SHIFT)
return;
+ huge_add_hstate(mmu_psize_defs[psize].shift - PAGE_SHIFT);
- HPAGE_SHIFT = mmu_psize_defs[psize].shift;
- mmu_huge_psize = psize;
-
- switch (HPAGE_SHIFT) {
+ switch (mmu_psize_defs[psize].shift) {
case PAGE_SHIFT_64K:
/* We only allow 64k hpages with 4k base page,
* which was checked above, and always put them
* at the PMD */
- hugepte_shift = PMD_SHIFT;
+ hugepte_shift[psize] = PMD_SHIFT;
break;
case PAGE_SHIFT_16M:
/* 16M pages can be at two different levels
* of pagestables based on base page size */
if (PAGE_SHIFT == PAGE_SHIFT_64K)
- hugepte_shift = PMD_SHIFT;
+ hugepte_shift[psize] = PMD_SHIFT;
else /* 4k base page */
- hugepte_shift = PUD_SHIFT;
+ hugepte_shift[psize] = PUD_SHIFT;
break;
case PAGE_SHIFT_16G:
/* 16G pages are always at PGD level */
- hugepte_shift = PGDIR_SHIFT;
+ hugepte_shift[psize] = PGDIR_SHIFT;
break;
}
- hugepte_shift -= HPAGE_SHIFT;
+ hugepte_shift[psize] -= mmu_psize_defs[psize].shift;
} else
HPAGE_SHIFT = 0;
}
@@ -633,30 +713,15 @@ void set_huge_psize(int psize)
static int __init hugepage_setup_sz(char *str)
{
unsigned long long size;
- int mmu_psize = -1;
+ int mmu_psize;
int shift;
size = memparse(str, &str);
shift = __ffs(size);
- switch (shift) {
-#ifndef CONFIG_PPC_64K_PAGES
- case PAGE_SHIFT_64K:
- mmu_psize = MMU_PAGE_64K;
- break;
-#endif
- case PAGE_SHIFT_16M:
- mmu_psize = MMU_PAGE_16M;
- break;
- case PAGE_SHIFT_16G:
- mmu_psize = MMU_PAGE_16G;
- break;
- }
-
- if (mmu_psize >= 0 && mmu_psize_defs[mmu_psize].shift) {
+ mmu_psize = shift_to_mmu_psize(shift);
+ if (mmu_psize >= 0 && mmu_psize_defs[mmu_psize].shift)
set_huge_psize(mmu_psize);
- huge_add_hstate(shift - PAGE_SHIFT);
- }
else
printk(KERN_WARNING "Invalid huge page size specified(%llu)\n", size);
@@ -671,16 +736,30 @@ static void zero_ctor(struct kmem_cache *cache, void *addr)
static int __init hugetlbpage_init(void)
{
+ unsigned int psize;
if (!cpu_has_feature(CPU_FTR_16M_PAGE))
return -ENODEV;
-
- huge_pgtable_cache = kmem_cache_create("hugepte_cache",
- HUGEPTE_TABLE_SIZE,
- HUGEPTE_TABLE_SIZE,
- 0,
- zero_ctor);
- if (! huge_pgtable_cache)
- panic("hugetlbpage_init(): could not create hugepte cache\n");
+ /* Add supported huge page sizes. Need to change HUGE_MAX_HSTATE
+ * and adjust PTE_NONCACHE_NUM if the number of supported huge page
+ * sizes changes.
+ */
+ set_huge_psize(MMU_PAGE_16M);
+ set_huge_psize(MMU_PAGE_64K);
+ set_huge_psize(MMU_PAGE_16G);
+
+ for (psize = 0; psize < MMU_PAGE_COUNT; ++psize) {
+ if (mmu_huge_psizes[psize]) {
+ huge_pgtable_cache(psize) = kmem_cache_create(
+ HUGEPTE_CACHE_NAME(psize),
+ HUGEPTE_TABLE_SIZE(psize),
+ HUGEPTE_TABLE_SIZE(psize),
+ 0,
+ zero_ctor);
+ if (!huge_pgtable_cache(psize))
+ panic("hugetlbpage_init(): could not create %s"\
+ "\n", HUGEPTE_CACHE_NAME(psize));
+ }
+ }
return 0;
}
diff --git a/arch/powerpc/mm/init_64.c b/arch/powerpc/mm/init_64.c
index c0f5cff..55588d5 100644
--- a/arch/powerpc/mm/init_64.c
+++ b/arch/powerpc/mm/init_64.c
@@ -151,10 +151,10 @@ static const char *pgtable_cache_name[ARRAY_SIZE(pgtable_cache_size)] = {
};
#ifdef CONFIG_HUGETLB_PAGE
-/* Hugepages need one extra cache, initialized in hugetlbpage.c. We
- * can't put into the tables above, because HPAGE_SHIFT is not compile
- * time constant. */
-struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+1];
+/* Hugepages need an extra cache per hugepagesize, initialized in
+ * hugetlbpage.c. We can't put into the tables above, because HPAGE_SHIFT
+ * is not compile time constant. */
+struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)+MMU_PAGE_COUNT];
#else
struct kmem_cache *pgtable_cache[ARRAY_SIZE(pgtable_cache_size)];
#endif
diff --git a/arch/powerpc/mm/tlb_64.c b/arch/powerpc/mm/tlb_64.c
index e2d867c..8d79e16 100644
--- a/arch/powerpc/mm/tlb_64.c
+++ b/arch/powerpc/mm/tlb_64.c
@@ -150,7 +150,7 @@ void hpte_need_flush(struct mm_struct *mm, unsigned long addr,
*/
if (huge) {
#ifdef CONFIG_HUGETLB_PAGE
- psize = mmu_huge_psize;
+ psize = get_slice_psize(mm, addr);;
#else
BUG();
psize = pte_pagesize_index(mm, addr, pte); /* shutup gcc */
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h
index db1276a..63b0fa5 100644
--- a/include/asm-powerpc/mmu-hash64.h
+++ b/include/asm-powerpc/mmu-hash64.h
@@ -192,9 +192,9 @@ extern int mmu_ci_restrictions;
#ifdef CONFIG_HUGETLB_PAGE
/*
- * The page size index of the huge pages for use by hugetlbfs
+ * The page size indexes of the huge pages for use by hugetlbfs
*/
-extern int mmu_huge_psize;
+extern unsigned int mmu_huge_psizes[MMU_PAGE_COUNT];
#endif /* CONFIG_HUGETLB_PAGE */
diff --git a/include/asm-powerpc/page_64.h b/include/asm-powerpc/page_64.h
index 67834ea..bdf453b 100644
--- a/include/asm-powerpc/page_64.h
+++ b/include/asm-powerpc/page_64.h
@@ -90,6 +90,7 @@ extern unsigned int HPAGE_SHIFT;
#define HPAGE_SIZE ((1UL) << HPAGE_SHIFT)
#define HPAGE_MASK (~(HPAGE_SIZE - 1))
#define HUGETLB_PAGE_ORDER (HPAGE_SHIFT - PAGE_SHIFT)
+#define HUGE_MAX_HSTATE 3
#endif /* __ASSEMBLY__ */
diff --git a/include/asm-powerpc/pgalloc-64.h b/include/asm-powerpc/pgalloc-64.h
index 6898099..812a1d8 100644
--- a/include/asm-powerpc/pgalloc-64.h
+++ b/include/asm-powerpc/pgalloc-64.h
@@ -22,7 +22,7 @@ extern struct kmem_cache *pgtable_cache[];
#define PUD_CACHE_NUM 1
#define PMD_CACHE_NUM 1
#define HUGEPTE_CACHE_NUM 2
-#define PTE_NONCACHE_NUM 3 /* from GFP rather than kmem_cache */
+#define PTE_NONCACHE_NUM 7 /* from GFP rather than kmem_cache */
static inline pgd_t *pgd_alloc(struct mm_struct *mm)
{
@@ -119,7 +119,7 @@ static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage)
__free_page(ptepage);
}
-#define PGF_CACHENUM_MASK 0x3
+#define PGF_CACHENUM_MASK 0x7
typedef struct pgtable_free {
unsigned long val;
^ permalink raw reply related
* RE: mmap problem in device driver and application program.
From: Howard, Marc @ 2008-05-13 17:51 UTC (permalink / raw)
To: MingLiu, Dave Cogley, linuxppc-embedded
In-Reply-To: <BAY138-W368A781D323F0E5E4D0BF3B2CF0@phx.gbl>
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
Dear Dave,
> If you are using memory that is not under the kernel's memory management
> you will need to use something other than remap_pfn_range.
>
Happenly and unfortunately we are using the memory space out of the control from the kernel. We have 2GB memory on the board and only 64(or 32) MB is reserved for the kernel. The rest large space is for the data buffering or LUT use. In my question, the LUT memory is located in the rest part rather than the kernel memory area.
Any more suggestion on how to mmap this LUT area? Any idea will be valuable for a beginner like me. Thanks in advance.
BR
Ming
________________________________
“七件武器,七种完美” 立刻体验! <http://get.live.cn>
I have a similar setup where the upper 64MB are reserved for hardware. The mmap implementation in my device driver works just fine using io_remap_page_range().
Marc Howard
[-- Attachment #2: Type: text/html, Size: 2102 bytes --]
^ permalink raw reply
* Re: how to check for "optional" ppc chip features (MSR_BE)
From: Roland McGrath @ 2008-05-13 19:33 UTC (permalink / raw)
To: Paul Mackerras; +Cc: linuxppc-dev
In-Reply-To: <18473.33194.781010.826872@cargo.ozlabs.ibm.com>
> So it looks like we need to define a new feature bit to mean "supports
> block-step". Is this something that userspace will expect to be told
> about via the AT_HWCAP entry in the aux vector?
I don't care to have userland know about it. I'm just concerned with the
arch_has_block_step() definition being right. But, you did previously tell
me that userland can set its own MSR_SE via sigreturn or setcontext or
something. If it can set its own MSR_BE the same way, then perhaps
userland wants to know.
Thanks,
Roland
^ permalink raw reply
* Feedback requested on switching the exception wrapper used for the PMU interrupt on ppc64
From: Corey Ashford @ 2008-05-13 22:05 UTC (permalink / raw)
To: linuxppc-dev, eranian
Hello,
One of the things I've been working on is porting perfmon2 to ppc64.
We've made a fair amount of progress on it, and support is available in
libpfm and the perfmon2 kernel patch.
One of the things we had to work around was the "lazy interrupt
disabling" mechanism in ppc64 Linux. The problem was that the PMU
exception handler (0xf00) uses the STD_EXCEPTION_PSERIES wrapper, which
does not support lazy interrupt disabling.
This is desirable for Oprofile's use of the PMU since its handler is
fairly simple and being able to profile interrupt protected code is
desirable. However, it causes problems for perfmon2, since the
operations it performs on the thread of its PMU interrupt handler can
cause a deadlock condition (it can end up calling spin_lock, for example).
Initially, to work around this, we created special spin_lock_irqsave and
spin_unlock_irqrestore macros for perfmon2 which we could override for
POWER to define them as functions which do hard disables and restores.
However, not all of the places that we need to disable interrupts were
occurring from within the perfmon2 code. Specifically, getting PMU
interrupts in the middle of a schedule() call (where interrupts were
expected to be disabled) was causing kernel hangs.
To fix this, I've gone back and removed the special spin_lock macros we
defined in perfmon2 and have ifdef'd arch/powerpc/kernel/head_64.S file
as follows:
/*** pSeries interrupt support ***/
/* moved from 0xf00 */
+ #ifdef CONFIG_PERFMON
+ MASKABLE_EXCEPTION_PSERIES(., performance_monitor)
+ #else
STD_EXCEPTION_PSERIES(., performance_monitor)
+ #endif
/*
* An interrupt came in while soft-disabled; clear EE in SRR1,
* clear paca->hard_enabled and return.
The downside of this change is that if someone is using Oprofile and
they have enabled perfmon in their kernel, they will not get profile
samples that occur in interrupt-protected regions of the kernel.
However, they still can by configuring perfmon out of their kernel.
What do you think of this idea? Is this something that you would object
to when perfmon2 does go upstream to LKML? I think we'd want to add
some documentation somewhere that describes this side-effect of enabling
perfmon in the ppc64 Linux kernel. Do you have suggestions on where
that should go? I'm thinking perhaps in both the basic_profiling.txt
and perfmon2.txt files in the Documentation subdirectory.
Thanks for your consideration,
- Corey
--
Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com
^ permalink raw reply
* Re: Feedback requested on switching the exception wrapper used for the PMU interrupt on ppc64
From: Olof Johansson @ 2008-05-13 22:13 UTC (permalink / raw)
To: Corey Ashford; +Cc: linuxppc-dev, eranian
In-Reply-To: <482A10AF.6040205@us.ibm.com>
On May 13, 2008, at 5:05 PM, Corey Ashford wrote:
> Hello,
>
> One of the things I've been working on is porting perfmon2 to ppc64.
> We've made a fair amount of progress on it, and support is available
> in libpfm and the perfmon2 kernel patch.
>
> One of the things we had to work around was the "lazy interrupt
> disabling" mechanism in ppc64 Linux. The problem was that the PMU
> exception handler (0xf00) uses the STD_EXCEPTION_PSERIES wrapper,
> which does not support lazy interrupt disabling.
>
> This is desirable for Oprofile's use of the PMU since its handler is
> fairly simple and being able to profile interrupt protected code is
> desirable. However, it causes problems for perfmon2, since the
> operations it performs on the thread of its PMU interrupt handler
> can cause a deadlock condition (it can end up calling spin_lock, for
> example).
>
> Initially, to work around this, we created special spin_lock_irqsave
> and spin_unlock_irqrestore macros for perfmon2 which we could
> override for POWER to define them as functions which do hard
> disables and restores.
>
> However, not all of the places that we need to disable interrupts
> were occurring from within the perfmon2 code. Specifically, getting
> PMU interrupts in the middle of a schedule() call (where interrupts
> were expected to be disabled) was causing kernel hangs.
>
> To fix this, I've gone back and removed the special spin_lock macros
> we defined in perfmon2 and have ifdef'd arch/powerpc/kernel/
> head_64.S file as follows:
>
> /*** pSeries interrupt support ***/
>
> /* moved from 0xf00 */
> + #ifdef CONFIG_PERFMON
> + MASKABLE_EXCEPTION_PSERIES(., performance_monitor)
> + #else
> STD_EXCEPTION_PSERIES(., performance_monitor)
> + #endif
>
> /*
> * An interrupt came in while soft-disabled; clear EE in SRR1,
> * clear paca->hard_enabled and return.
>
> The downside of this change is that if someone is using Oprofile and
> they have enabled perfmon in their kernel, they will not get profile
> samples that occur in interrupt-protected regions of the kernel.
> However, they still can by configuring perfmon out of their kernel.
>
> What do you think of this idea? Is this something that you would
> object to when perfmon2 does go upstream to LKML? I think we'd want
> to add some documentation somewhere that describes this side-effect
> of enabling perfmon in the ppc64 Linux kernel. Do you have
> suggestions on where that should go? I'm thinking perhaps in both
> the basic_profiling.txt and perfmon2.txt files in the Documentation
> subdirectory.
Since you didn't post the perfmon2 code, I'll ask instead of go look:
Do you have a single entry point from performance_monitor into
perfmon2? If so, it's nicer to check and see if interrupts are soft
disabled right upon entry (before taking any locks, etc), and if they
are just return without doing more work.
PMU interrupts generally won't re-arm themselves so you'll obviously
have to deal with that as well but I'm sure you're already aware of
that...
-Olof
^ permalink raw reply
* Re: Feedback requested on switching the exception wrapper used for the PMU interrupt on ppc64
From: Corey Ashford @ 2008-05-13 22:26 UTC (permalink / raw)
To: linuxppc-dev, Olof Johansson
In-Reply-To: <OFDA580598.87E2E65B-ON87257448.007AA3F0-88257448.007AB1E1@us.ibm.com>
Corey J Ashford wrote:
> On May 13, 2008, at 5:05 PM, Corey Ashford wrote:
>
>> Hello,
>>
>> One of the things I've been working on is porting perfmon2 to ppc64.
>> We've made a fair amount of progress on it, and support is available
>> in libpfm and the perfmon2 kernel patch.
>>
>> One of the things we had to work around was the "lazy interrupt
>> disabling" mechanism in ppc64 Linux. The problem was that the PMU
>> exception handler (0xf00) uses the STD_EXCEPTION_PSERIES wrapper,
>> which does not support lazy interrupt disabling.
>>
>> This is desirable for Oprofile's use of the PMU since its handler is
>> fairly simple and being able to profile interrupt protected code is
>> desirable. However, it causes problems for perfmon2, since the
>> operations it performs on the thread of its PMU interrupt handler
>> can cause a deadlock condition (it can end up calling spin_lock, for
>> example).
>>
>> Initially, to work around this, we created special spin_lock_irqsave
>> and spin_unlock_irqrestore macros for perfmon2 which we could
>> override for POWER to define them as functions which do hard
>> disables and restores.
>>
>> However, not all of the places that we need to disable interrupts
>> were occurring from within the perfmon2 code. Specifically, getting
>> PMU interrupts in the middle of a schedule() call (where interrupts
>> were expected to be disabled) was causing kernel hangs.
>>
>> To fix this, I've gone back and removed the special spin_lock macros
>> we defined in perfmon2 and have ifdef'd arch/powerpc/kernel/
>> head_64.S file as follows:
>>
>> /*** pSeries interrupt support ***/
>>
>> /* moved from 0xf00 */
>> + #ifdef CONFIG_PERFMON
>> + MASKABLE_EXCEPTION_PSERIES(., performance_monitor)
>> + #else
>> STD_EXCEPTION_PSERIES(., performance_monitor)
>> + #endif
>>
>> /*
>> * An interrupt came in while soft-disabled; clear EE in SRR1,
>> * clear paca->hard_enabled and return.
>>
>> The downside of this change is that if someone is using Oprofile and
>> they have enabled perfmon in their kernel, they will not get profile
>> samples that occur in interrupt-protected regions of the kernel.
>> However, they still can by configuring perfmon out of their kernel.
>>
>> What do you think of this idea? Is this something that you would
>> object to when perfmon2 does go upstream to LKML? I think we'd want
>> to add some documentation somewhere that describes this side-effect
>> of enabling perfmon in the ppc64 Linux kernel. Do you have
>> suggestions on where that should go? I'm thinking perhaps in both
>> the basic_profiling.txt and perfmon2.txt files in the Documentation
>> subdirectory.
>
> Since you didn't post the perfmon2 code, I'll ask instead of go look:
>
> Do you have a single entry point from performance_monitor into
> perfmon2? If so, it's nicer to check and see if interrupts are soft
> disabled right upon entry (before taking any locks, etc), and if they
> are just return without doing more work.
>
> PMU interrupts generally won't re-arm themselves so you'll obviously
> have to deal with that as well but I'm sure you're already aware of
> that...
>
>
> -Olof
The perfmon2 code is available here:
http://sourceforge.net/project/showfiles.php?group_id=144822
perfmon2's interrupt handler does have a single entry point. Could I
somehow mimic what the MASKABLE_EXCEPTION_PSERIES macro does inside of
the perfmon2 interrupt handler? Are there examples of this I can look at?
That would give us the best of both worlds.
Regards,
- Corey
--
Corey Ashford
Software Engineer
IBM Linux Technology Center, Linux Toolchain
Beaverton, OR
503-578-3507
cjashfor@us.ibm.com
^ permalink raw reply
* Re: [PATCH 1/6] [WATCHDOG] mpc83xx_wdt: convert to the OF platform driver
From: Stephen Rothwell @ 2008-05-13 23:32 UTC (permalink / raw)
To: Anton Vorontsov; +Cc: Scott Wood, linuxppc-dev, Wim Van Sebroeck, Timur Tabi
In-Reply-To: <20080513141454.GA15717@polina.dev.rtsoft.ru>
[-- Attachment #1: Type: text/plain, Size: 777 bytes --]
Hi Anton,
On Tue, 13 May 2008 18:14:54 +0400 Anton Vorontsov <avorontsov@ru.mvista.com> wrote:
>
> +static struct of_platform_driver mpc83xx_wdt_driver = {
> + .name = "mpc83xx_wdt",
> + .match_table = mpc83xx_wdt_match,
> .probe = mpc83xx_wdt_probe,
> .remove = __devexit_p(mpc83xx_wdt_remove),
> - .driver = {
> - .name = "mpc83xx_wdt",
> - .owner = THIS_MODULE,
> - },
You should leave this as it was because the name and owner fields are
being removed from struct of_platform_driver in favour of those embedded in
the .driver.
Maybe I should add a comment to the structure definition. Or maybe it is
time to actually remove them.
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox