* Re: [PATCH v2 21/21] of: push struct boot_param_header and defines into powerpc
From: Benjamin Herrenschmidt @ 2014-04-28 1:37 UTC (permalink / raw)
To: Rob Herring
Cc: devicetree, Rob Herring, linux-kernel, Paul Mackerras,
Grant Likely, linuxppc-dev
In-Reply-To: <1398215901-25609-22-git-send-email-robherring2@gmail.com>
On Tue, 2014-04-22 at 20:18 -0500, Rob Herring wrote:
> From: Rob Herring <robh@kernel.org>
>
> Now powerpc is the only user of struct boot_param_header and FDT defines,
> so they can be moved into the powerpc architecture code.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> ---
I assume we want to get rid of that too eventually ? :-)
We should be able to get the definitions from libfdt too....
In the meantime:
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
--
> v2: no change
>
> arch/powerpc/include/asm/prom.h | 39 +++++++++++++++++++++++++++++++++++++++
> include/linux/of_fdt.h | 37 -------------------------------------
> 2 files changed, 39 insertions(+), 37 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/prom.h b/arch/powerpc/include/asm/prom.h
> index d977b9b..74b79f0 100644
> --- a/arch/powerpc/include/asm/prom.h
> +++ b/arch/powerpc/include/asm/prom.h
> @@ -26,6 +26,45 @@
> #include <linux/of_irq.h>
> #include <linux/platform_device.h>
>
> +#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
> +#define OF_DT_END_NODE 0x2 /* End node */
> +#define OF_DT_PROP 0x3 /* Property: name off, size,
> + * content */
> +#define OF_DT_NOP 0x4 /* nop */
> +#define OF_DT_END 0x9
> +
> +#define OF_DT_VERSION 0x10
> +
> +/*
> + * This is what gets passed to the kernel by prom_init or kexec
> + *
> + * The dt struct contains the device tree structure, full pathes and
> + * property contents. The dt strings contain a separate block with just
> + * the strings for the property names, and is fully page aligned and
> + * self contained in a page, so that it can be kept around by the kernel,
> + * each property name appears only once in this page (cheap compression)
> + *
> + * the mem_rsvmap contains a map of reserved ranges of physical memory,
> + * passing it here instead of in the device-tree itself greatly simplifies
> + * the job of everybody. It's just a list of u64 pairs (base/size) that
> + * ends when size is 0
> + */
> +struct boot_param_header {
> + __be32 magic; /* magic word OF_DT_HEADER */
> + __be32 totalsize; /* total size of DT block */
> + __be32 off_dt_struct; /* offset to structure */
> + __be32 off_dt_strings; /* offset to strings */
> + __be32 off_mem_rsvmap; /* offset to memory reserve map */
> + __be32 version; /* format version */
> + __be32 last_comp_version; /* last compatible version */
> + /* version 2 fields below */
> + __be32 boot_cpuid_phys; /* Physical CPU id we're booting on */
> + /* version 3 fields below */
> + __be32 dt_strings_size; /* size of the DT strings block */
> + /* version 17 fields below */
> + __be32 dt_struct_size; /* size of the DT structure block */
> +};
> +
> /*
> * OF address retreival & translation
> */
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index 1f882e1..5c0ab05 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -17,45 +17,8 @@
>
> /* Definitions used by the flattened device tree */
> #define OF_DT_HEADER 0xd00dfeed /* marker */
> -#define OF_DT_BEGIN_NODE 0x1 /* Start of node, full name */
> -#define OF_DT_END_NODE 0x2 /* End node */
> -#define OF_DT_PROP 0x3 /* Property: name off, size,
> - * content */
> -#define OF_DT_NOP 0x4 /* nop */
> -#define OF_DT_END 0x9
> -
> -#define OF_DT_VERSION 0x10
>
> #ifndef __ASSEMBLY__
> -/*
> - * This is what gets passed to the kernel by prom_init or kexec
> - *
> - * The dt struct contains the device tree structure, full pathes and
> - * property contents. The dt strings contain a separate block with just
> - * the strings for the property names, and is fully page aligned and
> - * self contained in a page, so that it can be kept around by the kernel,
> - * each property name appears only once in this page (cheap compression)
> - *
> - * the mem_rsvmap contains a map of reserved ranges of physical memory,
> - * passing it here instead of in the device-tree itself greatly simplifies
> - * the job of everybody. It's just a list of u64 pairs (base/size) that
> - * ends when size is 0
> - */
> -struct boot_param_header {
> - __be32 magic; /* magic word OF_DT_HEADER */
> - __be32 totalsize; /* total size of DT block */
> - __be32 off_dt_struct; /* offset to structure */
> - __be32 off_dt_strings; /* offset to strings */
> - __be32 off_mem_rsvmap; /* offset to memory reserve map */
> - __be32 version; /* format version */
> - __be32 last_comp_version; /* last compatible version */
> - /* version 2 fields below */
> - __be32 boot_cpuid_phys; /* Physical CPU id we're booting on */
> - /* version 3 fields below */
> - __be32 dt_strings_size; /* size of the DT strings block */
> - /* version 17 fields below */
> - __be32 dt_struct_size; /* size of the DT structure block */
> -};
>
> #if defined(CONFIG_OF_FLATTREE)
>
^ permalink raw reply
* Re: [PATCH v2 6/6] powerpc/perf/hv-24x7: catalog version number is be64, not be32
From: Benjamin Herrenschmidt @ 2014-04-28 4:47 UTC (permalink / raw)
To: Cody P Schafer
Cc: Michael Ellerman, David.Laight, Linux PPC, LKML, Anton Blanchard
In-Reply-To: <1397581855-4585-7-git-send-email-cody@linux.vnet.ibm.com>
On Tue, 2014-04-15 at 10:10 -0700, Cody P Schafer wrote:
> The catalog version number was changed from a be32 (with proceeding
> 32bits of padding) to a be64, update the code to treat it as a be64
>
> Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
> --
Have you tested this ?
It doesn't build for me:
arch/powerpc/perf/hv-24x7.c: In function 'catalog_read':
arch/powerpc/perf/hv-24x7.c:223:3: error: format '%d' expects argument of type 'int', but argument 2 has type 'uint64_t' [-Werror=format]
cc1: all warnings being treated as errors
I'll fix that up in my tree.
Cheers,
Ben.
> arch/powerpc/perf/hv-24x7.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/arch/powerpc/perf/hv-24x7.c b/arch/powerpc/perf/hv-24x7.c
> index 95a67f8..9d4badc 100644
> --- a/arch/powerpc/perf/hv-24x7.c
> +++ b/arch/powerpc/perf/hv-24x7.c
> @@ -171,7 +171,7 @@ static unsigned long h_get_24x7_catalog_page_(unsigned long phys_4096,
> }
>
> static unsigned long h_get_24x7_catalog_page(char page[],
> - u32 version, u32 index)
> + u64 version, u32 index)
> {
> return h_get_24x7_catalog_page_(virt_to_phys(page),
> version, index);
> @@ -185,7 +185,7 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
> ssize_t ret = 0;
> size_t catalog_len = 0, catalog_page_len = 0, page_count = 0;
> loff_t page_offset = 0;
> - uint32_t catalog_version_num = 0;
> + uint64_t catalog_version_num = 0;
> void *page = kmem_cache_alloc(hv_page_cache, GFP_USER);
> struct hv_24x7_catalog_page_0 *page_0 = page;
> if (!page)
> @@ -197,7 +197,7 @@ static ssize_t catalog_read(struct file *filp, struct kobject *kobj,
> goto e_free;
> }
>
> - catalog_version_num = be32_to_cpu(page_0->version);
> + catalog_version_num = be64_to_cpu(page_0->version);
> catalog_page_len = be32_to_cpu(page_0->length);
> catalog_len = catalog_page_len * 4096;
>
> @@ -255,7 +255,7 @@ e_free: \
> static DEVICE_ATTR_RO(_name)
>
> PAGE_0_ATTR(catalog_version, "%lld\n",
> - (unsigned long long)be32_to_cpu(page_0->version));
> + (unsigned long long)be64_to_cpu(page_0->version));
> PAGE_0_ATTR(catalog_len, "%lld\n",
> (unsigned long long)be32_to_cpu(page_0->length) * 4096);
> static BIN_ATTR_RO(catalog, 0/* real length varies */);
^ permalink raw reply
* Re: [PATCH v2 6/6] powerpc/perf/hv-24x7: catalog version number is be64, not be32
From: Cody P Schafer @ 2014-04-28 4:59 UTC (permalink / raw)
To: Benjamin Herrenschmidt
Cc: Michael Ellerman, David.Laight, Linux PPC, LKML, Anton Blanchard
In-Reply-To: <1398660478.30694.10.camel@pasglop>
On 04/27/2014 09:47 PM, Benjamin Herrenschmidt wrote:
> On Tue, 2014-04-15 at 10:10 -0700, Cody P Schafer wrote:
>> The catalog version number was changed from a be32 (with proceeding
>> 32bits of padding) to a be64, update the code to treat it as a be64
>>
>> Signed-off-by: Cody P Schafer <cody@linux.vnet.ibm.com>
>> --
>
> Have you tested this ?
>
> It doesn't build for me:
>
> arch/powerpc/perf/hv-24x7.c: In function 'catalog_read':
> arch/powerpc/perf/hv-24x7.c:223:3: error: format '%d' expects argument of type 'int', but argument 2 has type 'uint64_t' [-Werror=format]
> cc1: all warnings being treated as errors
I have, and I wasn't initially sure how I managed to miss that
warning-as-error. On examination: My config (for some reason) has
CONFIG_PPC_DISABLE_WERROR=y set (probably because it's a variation of a
distro config). Must have been piping the warnings to a file and
forgotten to check the file.
> I'll fix that up in my tree.
Thanks.
^ permalink raw reply
* Re: [PATCH v2 1/2] powerpc/pm: add api to get suspend state which is STANDBY or MEM
From: Leo Li @ 2014-04-28 5:53 UTC (permalink / raw)
To: Scott Wood
Cc: linuxppc-dev, Dongsheng Wang, 正雄 金,
Zhao Chenhui
In-Reply-To: <1398462328.24575.20.camel@snotra.buserror.net>
On Sat, Apr 26, 2014 at 5:45 AM, Scott Wood <scottwood@freescale.com> wrote:
> On Thu, 2014-04-24 at 14:11 +0800, Dongsheng Wang wrote:
>> From: Wang Dongsheng <dongsheng.wang@freescale.com>
>>
>> Add set_pm_suspend_state & pm_suspend_state functions to set/get
>> suspend state. When system going to sleep or deep sleep, devices
>> can get the system suspend state(STANDBY/MEM) through pm_suspend_state
>> function and to handle different situations.
>>
>> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
>> ---
>> *v2*
>> Move pm api from fsl platform to powerpc general framework.
>
> What is powerpc-specific about this?
Generally I agree with you. But I had the discussion about this topic
a while ago with the PM maintainer. He suggestion to go with the
platform way.
https://lkml.org/lkml/2013/8/16/505
Regards,
Leo
^ permalink raw reply
* [PATCH V5] mtd: m25p80: modify the name of mtd_info
From: Hou Zhiqiang @ 2014-04-28 6:28 UTC (permalink / raw)
To: linux-mtd, linuxppc-dev
Cc: shijie8, Hou Zhiqiang, scottwood, mingkai.hu, computersforpeace,
dwmw2
To specify spi flash layouts by "mtdparts=..." in cmdline, we must
give mtd_info a fixed name, because the cmdlinepart's parser will
match the name of mtd_info given in cmdline.
Now, if it use DT, the mtd_info's name will be spi->dev->name. It
consists of spi_master->bus_num, and the spi_master->bus_num maybe
dynamically fetched. So, in this case, replace the component bus_num
with the physical address of spi master.
Signed-off-by: Hou Zhiqiang <B48286@freescale.com>
---
V5:
Rebase on the latest l2-mtd tree.
V4:
add check no-NULL for pointer of master's device node, and if it failed
to get physcial address of the master, then name the mtd_info by the
name of spi->dev.
V3:
Fix a bug, matching unsigned long long with "%llx".
V2:
1. Fix some code style issue.
2. Cast physical address to unsigned long long.
drivers/mtd/devices/m25p80.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 1557d8f..329aa2c 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -26,6 +26,7 @@
#include <linux/spi/spi.h>
#include <linux/spi/flash.h>
#include <linux/mtd/spi-nor.h>
+#include <linux/of_address.h>
#define MAX_CMD_SIZE 6
struct m25p {
@@ -196,6 +197,8 @@ static int m25p_probe(struct spi_device *spi)
struct m25p *flash;
struct spi_nor *nor;
enum read_mode mode = SPI_NOR_NORMAL;
+ struct resource res;
+ struct device_node *mnp = spi->master->dev.of_node;
int ret;
flash = devm_kzalloc(&spi->dev, sizeof(*flash), GFP_KERNEL);
@@ -228,6 +231,17 @@ static int m25p_probe(struct spi_device *spi)
data = dev_get_platdata(&spi->dev);
ppdata.of_node = spi->dev.of_node;
+ if (mnp) {
+ ret = of_address_to_resource(mnp, 0, &res);
+ if (!ret) {
+ flash->mtd.name = kasprintf(GFP_KERNEL, "spi%llx.%d",
+ (unsigned long long)res.start,
+ spi->chip_select);
+ if (!flash->mtd.name)
+ return -ENOMEM;
+ }
+ }
+
return mtd_device_parse_register(&flash->mtd, NULL, &ppdata,
data ? data->parts : NULL,
data ? data->nr_parts : 0);
--
1.8.5
^ permalink raw reply related
* [git pull] Please pull powerpc.git merge branch
From: Benjamin Herrenschmidt @ 2014-04-28 6:52 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linuxppc-dev, Linux Kernel list
Hi Linus !
Here is a bunch of post-merge window fixes that have been accumulating
in patchwork while I was on vacation or buried under other stuff last
week.
We have the now usual batch of LE fixes from Anton (sadly some new stuff
that went into this merge window had endian issues, we'll try to make
sure we do better next time)
Some fixes and cleanups to the new 24x7 performance monitoring stuff
(mostly typos and cleaning up printk's)
A series of fixes for an issue with our runlatch bit, which wasn't set
properly for offlined threads/cores and under KVM, causing potentially
some counters to misbehave along with possible power management issues.
A fix for kexec nasty race where the new kernel wouldn't "see" the
secondary processors having reached back into firmware in time.
And finally a few other misc (and pretty simple) bug fixes.
Cheers,
Ben.
The following changes since commit a798c10faf62a505d24e5f6213fbaf904a39623f:
Linux 3.15-rc2 (2014-04-20 11:08:50 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc.git merge
for you to fetch changes up to e4565362c7adc31201135c4b6d649fc1bdc3bf20:
powerpc/4xx: Fix section mismatch in ppc4xx_pci.c (2014-04-28 16:32:53 +1000)
----------------------------------------------------------------
Alistair Popple (1):
powerpc/4xx: Fix section mismatch in ppc4xx_pci.c
Aneesh Kumar K.V (1):
powerpc/mm: Fix tlbie to add AVAL fields for 64K pages
Anton Blanchard (11):
powerpc/powernv: Fix little endian issues in OPAL flash code
powerpc/powernv: Use uint64_t instead of size_t in OPAL APIs
powerpc/powernv: Remove some OPAL function declaration duplication
powerpc/powernv: Fix little endian issues with opal_do_notifier calls
powerpc/powernv: Fix little endian issues in OPAL error log code
powerpc/powernv: Create OPAL sglist helper functions and fix endian issues
powerpc/powernv: Fix little endian issues in OPAL dump code
powerpc: Rename duplicate COMMAND_LINE_SIZE define
powerpc: Bump COMMAND_LINE_SIZE to 2048
powerpc: Bump BOOT_COMMAND_LINE_SIZE to 2048
powerpc: Fix error return in rtas_flash module init
Benjamin Herrenschmidt (1):
powerpc/powernv: Fix kexec races going back to OPAL
Cody P Schafer (6):
powerpc/perf/hv_24x7: Probe errors changed to pr_debug(), padding fixed
powerpc/perf/hv_gpci: Probe failures use pr_debug(), and padding reduced
powerpc/perf/hv-gpci: Make device attr static
powerpc/perf/hv-24x7: Use (unsigned long) not (u32) values when calling plpar_hcall_norets()
powerpc/perf/hv-24x7: Remove [static 4096], sparse chokes on it
powerpc/perf/hv-24x7: Catalog version number is be64, not be32
Jeff Mahoney (1):
powerpc: Export flush_icache_range
Joel Stanley (5):
powerpc/powernv: Fix sysparam sysfs error handling
powerpc/powernv: Use ssize_t for sysparam return values
powerpc/powernv: Check sysfs size before copying
powerpc/powernv: Fix typos in sysparam code
powerpc/powernv: Check sysparam size before creation
Li Zhong (2):
powerpc: Fix Oops in rtas_stop_self()
powerpc/pseries: Protect remove_memory() with device hotplug lock
Preeti U Murthy (3):
ppc/powernv: Set the runlatch bits correctly for offline cpus
ppc/kvm: Set the runlatch bit of a CPU just before starting guest
ppc/kvm: Clear the runlatch bit of a vcpu before napping
Wei Yang (2):
powerpc/powernv: Reduce multi-hit of iommu_add_device()
powerpc/powernv: Release the refcount for pci_dev
arch/powerpc/boot/main.c | 8 +-
arch/powerpc/boot/ops.h | 2 +-
arch/powerpc/boot/ps3.c | 4 +-
arch/powerpc/include/asm/opal.h | 42 ++++-----
arch/powerpc/include/uapi/asm/setup.h | 7 +-
arch/powerpc/kernel/ppc_ksyms.c | 1 +
arch/powerpc/kernel/rtas_flash.c | 2 +-
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 18 +++-
arch/powerpc/mm/hash_native_64.c | 38 ++++----
arch/powerpc/perf/hv-24x7.c | 35 ++++---
arch/powerpc/perf/hv-gpci.c | 6 +-
arch/powerpc/platforms/powernv/opal-dump.c | 94 +++----------------
arch/powerpc/platforms/powernv/opal-elog.c | 11 ++-
arch/powerpc/platforms/powernv/opal-flash.c | 118 ++----------------------
arch/powerpc/platforms/powernv/opal-sysparam.c | 32 +++++--
arch/powerpc/platforms/powernv/opal.c | 69 +++++++++++++-
arch/powerpc/platforms/powernv/pci-ioda.c | 3 +-
arch/powerpc/platforms/powernv/setup.c | 48 +++++++++-
arch/powerpc/platforms/powernv/smp.c | 3 +
arch/powerpc/platforms/pseries/hotplug-cpu.c | 5 +-
arch/powerpc/platforms/pseries/hotplug-memory.c | 10 +-
arch/powerpc/sysdev/ppc4xx_pci.c | 2 +-
22 files changed, 273 insertions(+), 285 deletions(-)
^ permalink raw reply
* [PATCH V3 0/2] mm: FAULT_AROUND_ORDER patchset performance data for powerpc
From: Madhavan Srinivasan @ 2014-04-28 9:01 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, linux-mm, linux-arch, x86
Cc: riel, ak, peterz, rusty, dave.hansen, Madhavan Srinivasan, paulus,
mgorman, akpm, mingo, kirill.shutemov
Kirill A. Shutemov with 8c6e50b029 commit introduced
vm_ops->map_pages() for mapping easy accessible pages around
fault address in hope to reduce number of minor page faults.
This patch creates infrastructure to modify the FAULT_AROUND_ORDER
value using mm/Kconfig. This will enable architecture maintainers
to decide on suitable FAULT_AROUND_ORDER value based on
performance data for that architecture. First patch also defaults
FAULT_AROUND_ORDER Kconfig element to 4. Second patch list
out the performance numbers for powerpc (platform pseries) and
initialize the fault around order variable for pseries platform of
powerpc.
V3 Changes:
Replaced FAULT_AROUND_ORDER macro to a variable to support arch's that
supports sub platforms.
Made changes in commit messages.
V2 Changes:
Created Kconfig parameter for FAULT_AROUND_ORDER
Added check in do_read_fault to handle FAULT_AROUND_ORDER value of 0
Made changes in commit messages.
Madhavan Srinivasan (2):
mm: move FAULT_AROUND_ORDER to arch/
powerpc/pseries: init fault_around_order for pseries
arch/powerpc/platforms/pseries/setup.c | 5 +++++
mm/Kconfig | 8 ++++++++
mm/memory.c | 11 ++++-------
3 files changed, 17 insertions(+), 7 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [PATCH V3 1/2] mm: move FAULT_AROUND_ORDER to arch/
From: Madhavan Srinivasan @ 2014-04-28 9:01 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, linux-mm, linux-arch, x86
Cc: riel, ak, peterz, rusty, dave.hansen, Madhavan Srinivasan, paulus,
mgorman, akpm, mingo, kirill.shutemov
In-Reply-To: <1398675690-16186-1-git-send-email-maddy@linux.vnet.ibm.com>
Kirill A. Shutemov with 8c6e50b029 commit introduced
vm_ops->map_pages() for mapping easy accessible pages around
fault address in hope to reduce number of minor page faults.
This patch creates infrastructure to modify the FAULT_AROUND_ORDER
value using mm/Kconfig. This will enable architecture maintainers
to decide on suitable FAULT_AROUND_ORDER value based on
performance data for that architecture. Patch also defaults
FAULT_AROUND_ORDER Kconfig element to 4.
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
mm/Kconfig | 8 ++++++++
mm/memory.c | 11 ++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index ebe5880..c7fc4f1 100644
--- a/mm/Kconfig
+++ b/mm/Kconfig
@@ -176,6 +176,14 @@ config MOVABLE_NODE
config HAVE_BOOTMEM_INFO_NODE
def_bool n
+#
+# Fault around order is a control knob to decide the fault around pages.
+# Default value is set to 4 , but the arch can override it as desired.
+#
+config FAULT_AROUND_ORDER
+ int
+ default 4
+
# eventually, we can have this option just 'select SPARSEMEM'
config MEMORY_HOTPLUG
bool "Allow for memory hot-add"
diff --git a/mm/memory.c b/mm/memory.c
index d0f0bef..457436d 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3382,11 +3382,9 @@ void do_set_pte(struct vm_area_struct *vma, unsigned long address,
update_mmu_cache(vma, address, pte);
}
-#define FAULT_AROUND_ORDER 4
+unsigned int fault_around_order = CONFIG_FAULT_AROUND_ORDER;
#ifdef CONFIG_DEBUG_FS
-static unsigned int fault_around_order = FAULT_AROUND_ORDER;
-
static int fault_around_order_get(void *data, u64 *val)
{
*val = fault_around_order;
@@ -3395,7 +3393,6 @@ static int fault_around_order_get(void *data, u64 *val)
static int fault_around_order_set(void *data, u64 val)
{
- BUILD_BUG_ON((1UL << FAULT_AROUND_ORDER) > PTRS_PER_PTE);
if (1UL << val > PTRS_PER_PTE)
return -EINVAL;
fault_around_order = val;
@@ -3430,14 +3427,14 @@ static inline unsigned long fault_around_pages(void)
{
unsigned long nr_pages;
- nr_pages = 1UL << FAULT_AROUND_ORDER;
+ nr_pages = 1UL << fault_around_order;
BUILD_BUG_ON(nr_pages > PTRS_PER_PTE);
return nr_pages;
}
static inline unsigned long fault_around_mask(void)
{
- return ~((1UL << (PAGE_SHIFT + FAULT_AROUND_ORDER)) - 1);
+ return ~((1UL << (PAGE_SHIFT + fault_around_order)) - 1);
}
#endif
@@ -3495,7 +3492,7 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
* if page by the offset is not ready to be mapped (cold cache or
* something).
*/
- if (vma->vm_ops->map_pages) {
+ if ((vma->vm_ops->map_pages) && (fault_around_order)) {
pte = pte_offset_map_lock(mm, pmd, address, &ptl);
do_fault_around(vma, address, pte, pgoff, flags);
if (!pte_same(*pte, orig_pte))
--
1.7.10.4
^ permalink raw reply related
* [PATCH V3 2/2] powerpc/pseries: init fault_around_order for pseries
From: Madhavan Srinivasan @ 2014-04-28 9:01 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev, linux-mm, linux-arch, x86
Cc: riel, ak, peterz, rusty, dave.hansen, Madhavan Srinivasan, paulus,
mgorman, akpm, mingo, kirill.shutemov
In-Reply-To: <1398675690-16186-1-git-send-email-maddy@linux.vnet.ibm.com>
Performance data for different FAULT_AROUND_ORDER values from 4 socket
Power7 system (128 Threads and 128GB memory). perf stat with repeat of 5
is used to get the stddev values. Test ran in v3.14 kernel (Baseline) and
v3.15-rc1 for different fault around order values.
FAULT_AROUND_ORDER Baseline 1 3 4 5 8
Linux build (make -j64)
minor-faults 47,437,359 35,279,286 25,425,347 23,461,275 22,002,189 21,435,836
times in seconds 347.302528420 344.061588460 340.974022391 348.193508116 348.673900158 350.986543618
stddev for time ( +- 1.50% ) ( +- 0.73% ) ( +- 1.13% ) ( +- 1.01% ) ( +- 1.89% ) ( +- 1.55% )
%chg time to baseline -0.9% -1.8% 0.2% 0.39% 1.06%
Linux rebuild (make -j64)
minor-faults 941,552 718,319 486,625 440,124 410,510 397,416
times in seconds 30.569834718 31.219637539 31.319370649 31.434285472 31.972367174 31.443043580
stddev for time ( +- 1.07% ) ( +- 0.13% ) ( +- 0.43% ) ( +- 0.18% ) ( +- 0.95% ) ( +- 0.58% )
%chg time to baseline 2.1% 2.4% 2.8% 4.58% 2.85%
Binutils build (make all -j64 )
minor-faults 474,821 371,380 269,463 247,715 235,255 228,337
times in seconds 53.882492432 53.584289348 53.882773216 53.755816431 53.607824348 53.423759642
stddev for time ( +- 0.08% ) ( +- 0.56% ) ( +- 0.17% ) ( +- 0.11% ) ( +- 0.60% ) ( +- 0.69% )
%chg time to baseline -0.55% 0.0% -0.23% -0.51% -0.85%
Two synthetic tests: access every word in file in sequential/random order.
Sequential access 16GiB file
FAULT_AROUND_ORDER Baseline 1 3 4 5 8
1 thread
minor-faults 263,148 131,166 32,908 16,514 8,260 1,093
times in seconds 53.091138345 53.113191672 53.188776177 53.233017218 53.206841347 53.429979442
stddev for time ( +- 0.06% ) ( +- 0.07% ) ( +- 0.08% ) ( +- 0.09% ) ( +- 0.03% ) ( +- 0.03% )
%chg time to baseline 0.04% 0.18% 0.26% 0.21% 0.63%
8 threads
minor-faults 2,097,267 1,048,753 262,237 131,397 65,621 8,274
times in seconds 55.173790028 54.591880790 54.824623287 54.802162211 54.969680503 54.790387715
stddev for time ( +- 0.78% ) ( +- 0.09% ) ( +- 0.08% ) ( +- 0.07% ) ( +- 0.28% ) ( +- 0.05% )
%chg time to baseline -1.05% -0.63% -0.67% -0.36% -0.69%
32 threads
minor-faults 8,388,751 4,195,621 1,049,664 525,461 262,535 32,924
times in seconds 60.431573046 60.669110744 60.485336388 60.697789706 60.077959564 60.588855032
stddev for time ( +- 0.44% ) ( +- 0.27% ) ( +- 0.46% ) ( +- 0.67% ) ( +- 0.31% ) ( +- 0.49% )
%chg time to baseline 0.39% 0.08% 0.44% -0.58% 0.25%
64 threads
minor-faults 16,777,409 8,607,527 2,289,766 1,202,264 598,405 67,587
times in seconds 96.932617720 100.675418760 102.109880836 103.881733383 102.580199555 105.751194041
stddev for time ( +- 1.39% ) ( +- 1.06% ) ( +- 0.99% ) ( +- 0.76% ) ( +- 1.65% ) ( +- 1.60% )
%chg time to baseline 3.86% 5.34% 7.16% 5.82% 9.09%
128 threads
minor-faults 33,554,705 17,375,375 4,682,462 2,337,245 1,179,007 134,819
times in seconds 128.766704495 115.659225437 120.353046307 115.291871270 115.450886036 113.991902150
stddev for time ( +- 2.93% ) ( +- 0.30% ) ( +- 2.93% ) ( +- 1.24% ) ( +- 1.03% ) ( +- 0.70% )
%chg time to baseline -10.17% -6.53% -10.46% -10.34% -11.47%
Random access 1GiB file
FAULT_AROUND_ORDER Baseline 1 3 4 5 8
1 thread
minor-faults 17,155 8,678 2,126 1,097 581 134
times in seconds 51.904430523 51.658017987 51.919270792 51.560531738 52.354431597 51.976469502
stddev for time ( +- 3.19% ) ( +- 1.35% ) ( +- 1.56% ) ( +- 0.91% ) ( +- 1.70% ) ( +- 2.02% )
%chg time to baseline -0.47% 0.02% -0.66% 0.86% 0.13%
8 threads
minor-faults 131,844 70,705 17,457 8,505 4,251 598
times in seconds 58.162813956 54.991706305 54.952675791 55.323057492 54.755587379 53.376722828
stddev for time ( +- 1.44% ) ( +- 0.69% ) ( +- 1.23% ) ( +- 2.78% ) ( +- 1.90% ) ( +- 2.91% )
%chg time to baseline -5.45% -5.52% -4.88% -5.86% -8.22%
32 threads
minor-faults 524,437 270,760 67,069 33,414 16,641 2,204
times in seconds 69.981777072 76.539570015 79.753578505 76.245943618 77.254258344 79.072596831
stddev for time ( +- 2.81% ) ( +- 1.95% ) ( +- 2.66% ) ( +- 0.99% ) ( +- 2.35% ) ( +- 3.22% )
%chg time to baseline 9.37% 13.96% 8.95% 10.39% 12.98%
64 threads
minor-faults 1,049,117 527,451 134,016 66,638 33,391 4,559
times in seconds 108.024517536 117.575067996 115.322659914 111.943998437 115.049450815 119.218450840
stddev for time ( +- 2.40% ) ( +- 1.77% ) ( +- 1.19% ) ( +- 3.29% ) ( +- 2.32% ) ( +- 1.42% )
%chg time to baseline 8.84% 6.75% 3.62% 6.5% 10.3%
128 threads
minor-faults 2,097,440 1,054,360 267,042 133,328 66,532 8,652
times in seconds 155.055861167 153.059625968 152.449492156 151.024005282 150.844647770 155.954366718
stddev for time ( +- 1.32% ) ( +- 1.14% ) ( +- 1.32% ) ( +- 0.81% ) ( +- 0.75% ) ( +- 0.72% )
%chg time to baseline -1.28% -1.68% -2.59% -2.71% 0.57%
Incase of Kernel compilation, fault around order (fao) of 1 and 3 provides fast compilation time
when compared to a value of 4. On closer look, fao of 3 has higher agains. Incase of Sequential access
synthetic tests fao of 1 has higher gains and in Random access test, fao of 3 has marginal gains.
Going by compilation time, fao value of 3 is suggested in this patch for pseries platform.
Worst case scenario: we touch one page every 16M to demonstrate overhead.
Touch only one page in page table in 16GiB file
FAULT_AROUND_ORDER Baseline 1 3 4 5 8
1 thread
minor-faults 1,104 1,090 1,071 1,068 1,065 1,063
times in seconds 0.006583298 0.008531502 0.019733795 0.036033763 0.062300553 0.406857086
stddev for time ( +- 2.79% ) ( +- 2.42% ) ( +- 3.47% ) ( +- 2.81% ) ( +- 2.01% ) ( +- 1.33% )
8 threads
minor-faults 8,279 8,264 8,245 8,243 8,239 8,240
times in seconds 0.044572398 0.057211811 0.107606306 0.205626815 0.381679120 2.647979955
stddev for time ( +- 1.95% ) ( +- 2.98% ) ( +- 1.74% ) ( +- 2.80% ) ( +- 2.01% ) ( +- 1.86% )
32 threads
minor-faults 32,879 32,864 32,849 32,845 32,839 32,843
times in seconds 0.197659343 0.218486087 0.445116407 0.694235883 1.296894038 9.127517045
stddev for time ( +- 3.05% ) ( +- 3.05% ) ( +- 4.33% ) ( +- 3.08% ) ( +- 3.75% ) ( +- 0.56% )
64 threads
minor-faults 65,680 65,664 65,646 65,645 65,640 65,647
times in seconds 0.455537304 0.489688780 0.866490093 1.427393118 2.379628982 17.059295051
stddev for time ( +- 4.01% ) ( +- 4.13% ) ( +- 2.92% ) ( +- 1.68% ) ( +- 1.79% ) ( +- 0.48% )
128 threads
minor-faults 131,279 131,265 131,250 131,245 131,241 131,254
times in seconds 1.026880651 1.095327536 1.721728274 2.808233068 4.662729948 31.732848290
stddev for time ( +- 6.85% ) ( +- 4.09% ) ( +- 1.71% ) ( +- 3.45% ) ( +- 2.40% ) ( +- 0.68% )
Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
---
arch/powerpc/platforms/pseries/setup.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 2db8cc6..c87e6b6 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -74,6 +74,8 @@ int CMO_SecPSP = -1;
unsigned long CMO_PageSize = (ASM_CONST(1) << IOMMU_PAGE_SHIFT_4K);
EXPORT_SYMBOL(CMO_PageSize);
+extern unsigned int fault_around_order;
+
int fwnmi_active; /* TRUE if an FWNMI handler is present */
static struct device_node *pSeries_mpic_node;
@@ -465,6 +467,9 @@ static void __init pSeries_setup_arch(void)
{
set_arch_panic_timeout(10, ARCH_PANIC_TIMEOUT);
+ /* Measured on a 4 socket Power7 system (128 Threads and 128GB memory) */
+ fault_around_order = 3;
+
/* Discover PIC type and setup ppc_md accordingly */
pseries_discover_pic();
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH V3 1/2] mm: move FAULT_AROUND_ORDER to arch/
From: Peter Zijlstra @ 2014-04-28 9:06 UTC (permalink / raw)
To: Madhavan Srinivasan
Cc: linux-arch, riel, rusty, dave.hansen, x86, linux-kernel, linux-mm,
ak, paulus, mgorman, akpm, linuxppc-dev, mingo, kirill.shutemov
In-Reply-To: <1398675690-16186-2-git-send-email-maddy@linux.vnet.ibm.com>
On Mon, Apr 28, 2014 at 02:31:29PM +0530, Madhavan Srinivasan wrote:
> +unsigned int fault_around_order = CONFIG_FAULT_AROUND_ORDER;
__read_mostly?
^ permalink raw reply
* RE: [RFC PATCH] Fix Oops in rtas_stop_self()
From: David Laight @ 2014-04-28 9:06 UTC (permalink / raw)
To: 'Li Zhong', Anton Blanchard
Cc: PowerPC email list, Benjamin Herrenschmidt, Paul Mackerras
In-Reply-To: <1398644805.3046.7.camel@ThinkPad-T5421>
RnJvbTogTGkgWmhvbmcNCj4gT24gRnJpLCAyMDE0LTA0LTI1IGF0IDIyOjE4ICsxMDAwLCBBbnRv
biBCbGFuY2hhcmQgd3JvdGU6DQo+ID4gSGksDQo+ID4NCj4gPiA+IFdoZW4gdHJ5aW5nIG9mZmxp
bmUgY3B1cywgSSBub3RpY2VkIGZvbGxvd2luZyBPb3BzIGluDQo+ID4gPiBydGFzX3N0b3Bfc2Vs
ZigpLCBhbmQgaXQgc2VlbXMgY2F1c2VkIGJ5IGNvbW1pdCA0MWRkMDNhOS4gVGhlIE9vcHMNCj4g
PiA+IGRpc2FwcGVhcnMgYWZ0ZXIgcmV2ZXJ0aW5nIHRoaXMgY29tbWl0Lg0KPiA+ID4NCj4gPiA+
IEFmdGVyIHJlYWRpbmcgdGhlIGNvZGUsIEkgZ3Vlc3MgaXQgbWlnaHQgYmUgY2F1c2VkIGJ5IG1v
dmluZyB0aGUNCj4gPiA+IHJ0YXNfYXJncyB0byBzdGFjay4gU3RpbGwgbmVlZCBzb21lIG1vcmUg
dGltZSB0byByZWFkIGVudGVyX3J0YXMgdG8NCj4gPiA+IHVuZGVyc3RhbmQgd2h5IGl0IGhhcHBl
bnMsIGJ1dCB0aGUgcHJvYmxlbSBzZWVtcyBjb3VsZCBiZSBzb2x2ZWQgYnkNCj4gPiA+IG1vdmlu
ZyB0aGUgcnRhc19hcmdzIGF3YXkgZnJvbSBzdGFjayBieSBhZGRpbmcgc3RhdGljIGJlZm9yZSBp
dC4NCj4gPg0KPiA+IE5pY2UgY2F0Y2guIFJUQVMgaXMgMzJiaXQgYW5kIGlmIHlvdXIgYm94IGhh
cyBtb3JlIHRoYW4gNEdCIFJBTSB0aGVuDQo+ID4geW91ciBzdGFjayBjb3VsZCBlYXNpbHkgYmUg
b3V0c2lkZSAzMmJpdCByYW5nZS4NCj4gDQo+IEFoLCB5ZXMsIHRoZSBzdGFjayBoZXJlIGlzIG9i
dmlvdXNseSBhdCBhIG11Y2ggaGlnaGVyIGFkZHJlc3MgdGhhbiA0R0IuDQoNCkFyZSB3ZSB0YWxr
aW5nIG9mIHBoeXNpY2FsIG9yIHZpcnR1YWwgYWRkcmVzc2VzIGhlcmU/DQoob3IgZXZlbiB1c2Vy
PykNCg0KSXMgdGhlcmUgYSByZS1lbnRyYW5jeSBwcm9ibGVtIHVzaW5nIGtlcm5lbCBzdGF0aWMg
ZGF0YT8NCg0KCURhdmlkDQoNCg==
^ permalink raw reply
* Re: [RFC PATCH] Fix Oops in rtas_stop_self()
From: Benjamin Herrenschmidt @ 2014-04-28 9:17 UTC (permalink / raw)
To: David Laight
Cc: PowerPC email list, Paul Mackerras, Anton Blanchard,
'Li Zhong'
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D0F700501@AcuExch.aculab.com>
On Mon, 2014-04-28 at 09:06 +0000, David Laight wrote:
> > Ah, yes, the stack here is obviously at a much higher address than
> 4GB.
>
> Are we talking of physical or virtual addresses here?
> (or even user?)
Real.
> Is there a re-entrancy problem using kernel static data?
Not for this code. This is called as the last thing a CPU does
before returning to firmware.
Cheers,
Ben.
^ permalink raw reply
* RE: [PATCH V3 1/2] mm: move FAULT_AROUND_ORDER to arch/
From: Kirill A. Shutemov @ 2014-04-28 9:36 UTC (permalink / raw)
To: Madhavan Srinivasan
Cc: linux-arch, riel, rusty, dave.hansen, peterz, x86, linux-kernel,
Madhavan Srinivasan, linux-mm, ak, paulus, mgorman, akpm,
linuxppc-dev, mingo, kirill.shutemov
In-Reply-To: <1398675690-16186-2-git-send-email-maddy@linux.vnet.ibm.com>
Madhavan Srinivasan wrote:
> Kirill A. Shutemov with 8c6e50b029 commit introduced
> vm_ops->map_pages() for mapping easy accessible pages around
> fault address in hope to reduce number of minor page faults.
>
> This patch creates infrastructure to modify the FAULT_AROUND_ORDER
> value using mm/Kconfig. This will enable architecture maintainers
> to decide on suitable FAULT_AROUND_ORDER value based on
> performance data for that architecture. Patch also defaults
> FAULT_AROUND_ORDER Kconfig element to 4.
>
> Signed-off-by: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
> ---
> mm/Kconfig | 8 ++++++++
> mm/memory.c | 11 ++++-------
> 2 files changed, 12 insertions(+), 7 deletions(-)
>
> diff --git a/mm/Kconfig b/mm/Kconfig
> index ebe5880..c7fc4f1 100644
> --- a/mm/Kconfig
> +++ b/mm/Kconfig
> @@ -176,6 +176,14 @@ config MOVABLE_NODE
> config HAVE_BOOTMEM_INFO_NODE
> def_bool n
>
> +#
> +# Fault around order is a control knob to decide the fault around pages.
> +# Default value is set to 4 , but the arch can override it as desired.
> +#
> +config FAULT_AROUND_ORDER
> + int
> + default 4
> +
> # eventually, we can have this option just 'select SPARSEMEM'
> config MEMORY_HOTPLUG
> bool "Allow for memory hot-add"
> diff --git a/mm/memory.c b/mm/memory.c
> index d0f0bef..457436d 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3382,11 +3382,9 @@ void do_set_pte(struct vm_area_struct *vma, unsigned long address,
> update_mmu_cache(vma, address, pte);
> }
>
> -#define FAULT_AROUND_ORDER 4
> +unsigned int fault_around_order = CONFIG_FAULT_AROUND_ORDER;
>
> #ifdef CONFIG_DEBUG_FS
> -static unsigned int fault_around_order = FAULT_AROUND_ORDER;
> -
> static int fault_around_order_get(void *data, u64 *val)
> {
> *val = fault_around_order;
> @@ -3395,7 +3393,6 @@ static int fault_around_order_get(void *data, u64 *val)
>
> static int fault_around_order_set(void *data, u64 val)
> {
> - BUILD_BUG_ON((1UL << FAULT_AROUND_ORDER) > PTRS_PER_PTE);
> if (1UL << val > PTRS_PER_PTE)
> return -EINVAL;
> fault_around_order = val;
> @@ -3430,14 +3427,14 @@ static inline unsigned long fault_around_pages(void)
> {
> unsigned long nr_pages;
>
> - nr_pages = 1UL << FAULT_AROUND_ORDER;
> + nr_pages = 1UL << fault_around_order;
> BUILD_BUG_ON(nr_pages > PTRS_PER_PTE);
This BUILD_BUG_ON() doesn't make sense any more since compiler usually can't
prove anything about extern variable.
Drop it or change to VM_BUG_ON() or something.
> return nr_pages;
> }
>
> static inline unsigned long fault_around_mask(void)
> {
> - return ~((1UL << (PAGE_SHIFT + FAULT_AROUND_ORDER)) - 1);
> + return ~((1UL << (PAGE_SHIFT + fault_around_order)) - 1);
fault_around_pages() and fault_around_mask() should be moved outside of
#ifdef CONFIG_DEBUG_FS and consolidated since they are practically identical
both branches after the changes.
> }
> #endif
>
> @@ -3495,7 +3492,7 @@ static int do_read_fault(struct mm_struct *mm, struct vm_area_struct *vma,
> * if page by the offset is not ready to be mapped (cold cache or
> * something).
> */
> - if (vma->vm_ops->map_pages) {
> + if ((vma->vm_ops->map_pages) && (fault_around_order)) {
Way too many parentheses.
> pte = pte_offset_map_lock(mm, pmd, address, &ptl);
> do_fault_around(vma, address, pte, pgoff, flags);
> if (!pte_same(*pte, orig_pte))
--
Kirill A. Shutemov
^ permalink raw reply
* Re: [PATCH 2/3] powerpc, ptrace: Add new ptrace request macros for transactional memory
From: Anshuman Khandual @ 2014-04-28 10:30 UTC (permalink / raw)
To: Pedro Alves; +Cc: mikey, avagin, oleg, linux-kernel, linuxppc-dev
In-Reply-To: <535AF2E9.1000005@redhat.com>
On 04/26/2014 05:12 AM, Pedro Alves wrote:
> On 04/02/2014 08:02 AM, Anshuman Khandual wrote:
>> This patch adds following new sets of ptrace request macros for transactional
>> memory expanding the existing ptrace ABI on PowerPC.
>>
>> /* TM special purpose registers */
>> PTRACE_GETTM_SPRREGS
>> PTRACE_SETTM_SPRREGS
>>
>> /* TM checkpointed GPR registers */
>> PTRACE_GETTM_CGPRREGS
>> PTRACE_SETTM_CGPRREGS
>>
>> /* TM checkpointed FPR registers */
>> PTRACE_GETTM_CFPRREGS
>> PTRACE_SETTM_CFPRREGS
>>
>> /* TM checkpointed VMX registers */
>> PTRACE_GETTM_CVMXREGS
>> PTRACE_SETTM_CVMXREGS
>
> Urgh, we're _still_ adding specialized register specific calls?
> Why aren't these exported as new register sets, accessible through
> PTRACE_GETREGSET / PTRACE_SETREGSET? That's supposed to be the
> Modern Way to do things.
All these new register sets can be accessed through PTRACE_GETREGSET
/SETREGSET requests with the new NT_PPC_* core note types added in the
previous patch. PowerPC already has some register specific ptrace
requests, so thought of adding some new requests for transactional
memory purpose. But yes these are redundant and can be dropped.
^ permalink raw reply
* Re: [PATCH 1/2] powerpc/powernv: reduce multi-hit of iommu_add_device()
From: Alexey Kardashevskiy @ 2014-04-28 13:35 UTC (permalink / raw)
To: Wei Yang, linuxppc-dev; +Cc: gwshan
In-Reply-To: <1398219993-6326-1-git-send-email-weiyang@linux.vnet.ibm.com>
On 04/23/2014 12:26 PM, Wei Yang wrote:
> During the EEH hotplug event, iommu_add_device() will be invoked three times
> and two of them will trigger warning or error.
>
> The three times to invoke the iommu_add_device() are:
>
> pci_device_add
> ...
> set_iommu_table_base_and_group <- 1st time, fail
> device_add
> ...
> tce_iommu_bus_notifier <- 2nd time, succees
> pcibios_add_pci_devices
> ...
> pcibios_setup_bus_devices <- 3rd time, re-attach
>
> The first time fails, since the dev->kobj->sd is not initialized. The
> dev->kobj->sd is initialized in device_add().
> The third time's warning is triggered by the re-attach of the iommu_group.
>
> After applying this patch, the error
Nack.
The patch still seems incorrect and we actually need to remove
tce_iommu_bus_notifier completely as pcibios_setup_bus_devices is called
from another notifier anyway. Could you please test it?
>
> iommu_tce: 0003:05:00.0 has not been added, ret=-14
>
> and the warning
>
> [ 204.123609] ------------[ cut here ]------------
> [ 204.123645] WARNING: at arch/powerpc/kernel/iommu.c:1125
> [ 204.123680] Modules linked in: xt_CHECKSUM nf_conntrack_netbios_ns nf_conntrack_broadcast ipt_MASQUERADE ip6t_REJECT bnep bluetooth 6lowpan_iphc rfkill xt_conntrack ebtable_nat ebtable_broute bridge stp llc mlx4_ib ib_sa ib_mad ib_core ib_addr ebtable_filter ebtables ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle ip6table_security ip6table_raw ip6table_filter ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw bnx2x tg3 mlx4_core nfsd ptp mdio ses libcrc32c nfs_acl enclosure be2net pps_core shpchp lockd kvm uinput sunrpc binfmt_misc lpfc scsi_transport_fc ipr scsi_tgt
> [ 204.124356] CPU: 18 PID: 650 Comm: eehd Not tainted 3.14.0-rc5yw+ #102
> [ 204.124400] task: c0000027ed485670 ti: c0000027ed50c000 task.ti: c0000027ed50c000
> [ 204.124453] NIP: c00000000003cf80 LR: c00000000006c648 CTR: c00000000006c5c0
> [ 204.124506] REGS: c0000027ed50f440 TRAP: 0700 Not tainted (3.14.0-rc5yw+)
> [ 204.124558] MSR: 9000000000029032 <SF,HV,EE,ME,IR,DR,RI> CR: 88008084 XER: 20000000
> [ 204.124682] CFAR: c00000000006c644 SOFTE: 1
> GPR00: c00000000006c648 c0000027ed50f6c0 c000000001398380 c0000027ec260300
> GPR04: c0000027ea92c000 c00000000006ad00 c0000000016e41b0 0000000000000110
> GPR08: c0000000012cd4c0 0000000000000001 c0000027ec2602ff 0000000000000062
> GPR12: 0000000028008084 c00000000fdca200 c0000000000d1d90 c0000027ec281a80
> GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
> GPR20: 0000000000000000 0000000000000000 0000000000000000 0000000000000001
> GPR24: 000000005342697b 0000000000002906 c000001fe6ac9800 c000001fe6ac9800
> GPR28: 0000000000000000 c0000000016e3a80 c0000027ea92c090 c0000027ea92c000
> [ 204.125353] NIP [c00000000003cf80] .iommu_add_device+0x30/0x1f0
> [ 204.125399] LR [c00000000006c648] .pnv_pci_ioda_dma_dev_setup+0x88/0xb0
> [ 204.125443] Call Trace:
> [ 204.125464] [c0000027ed50f6c0] [c0000027ed50f750] 0xc0000027ed50f750 (unreliable)
> [ 204.125526] [c0000027ed50f750] [c00000000006c648] .pnv_pci_ioda_dma_dev_setup+0x88/0xb0
> [ 204.125588] [c0000027ed50f7d0] [c000000000069cc8] .pnv_pci_dma_dev_setup+0x78/0x340
> [ 204.125650] [c0000027ed50f870] [c000000000044408] .pcibios_setup_device+0x88/0x2f0
> [ 204.125712] [c0000027ed50f940] [c000000000046040] .pcibios_setup_bus_devices+0x60/0xd0
> [ 204.125774] [c0000027ed50f9c0] [c000000000043acc] .pcibios_add_pci_devices+0xdc/0x1c0
> [ 204.125837] [c0000027ed50fa50] [c00000000086f970] .eeh_reset_device+0x36c/0x4f0
> [ 204.125939] [c0000027ed50fb20] [c00000000003a2d8] .eeh_handle_normal_event+0x448/0x480
> [ 204.126068] [c0000027ed50fbc0] [c00000000003a35c] .eeh_handle_event+0x4c/0x340
> [ 204.126192] [c0000027ed50fc80] [c00000000003a74c] .eeh_event_handler+0xfc/0x1b0
> [ 204.126319] [c0000027ed50fd30] [c0000000000d1ea0] .kthread+0x110/0x130
> [ 204.126430] [c0000027ed50fe30] [c00000000000a460] .ret_from_kernel_thread+0x5c/0x7c
> [ 204.126556] Instruction dump:
> [ 204.126610] 7c0802a6 fba1ffe8 fbc1fff0 fbe1fff8 f8010010 f821ff71 7c7e1b78 60000000
> [ 204.126787] 60000000 e87e0298 3143ffff 7d2a1910 <0b090000> 2fa90000 40de00c8 ebfe0218
> [ 204.126966] ---[ end trace 6e7aefd80add2973 ]---
>
> are cleared.
>
> This patch removes iommu_add_device() in pnv_pci_ioda_dma_dev_setup(), which
> revert part of the change in commit d905c5df(PPC: POWERNV: move
> iommu_add_device earlier).
>
> Signed-off-by: Wei Yang <weiyang@linux.vnet.ibm.com>
> ---
> arch/powerpc/platforms/powernv/pci-ioda.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/powerpc/platforms/powernv/pci-ioda.c b/arch/powerpc/platforms/powernv/pci-ioda.c
> index bc8e74e..bd3870e 100644
> --- a/arch/powerpc/platforms/powernv/pci-ioda.c
> +++ b/arch/powerpc/platforms/powernv/pci-ioda.c
> @@ -1423,7 +1423,7 @@ static void pnv_pci_ioda_dma_dev_setup(struct pnv_phb *phb, struct pci_dev *pdev
>
> pe = &phb->ioda.pe_array[pdn->pe_number];
> WARN_ON(get_dma_ops(&pdev->dev) != &dma_iommu_ops);
> - set_iommu_table_base_and_group(&pdev->dev, pe->tce32_table);
> + set_iommu_table_base(&pdev->dev, pe->tce32_table);
> }
>
> static int pnv_pci_ioda_dma_set_mask(struct pnv_phb *phb,
>
--
Alexey Kardashevskiy
IBM OzLabs, LTC Team
e-mail: aik@au1.ibm.com
notes: Alexey Kardashevskiy/Australia/IBM
^ permalink raw reply
* [PATCH 1/2] powerpc/book3s: Improve machine check handling for unhandled errors
From: Mahesh J Salgaonkar @ 2014-04-28 14:16 UTC (permalink / raw)
To: linuxppc-dev, Benjamin Herrenschmidt; +Cc: Michael Neuling
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Current code does not check for unhandled/unrecovered errors and return from
interrupt if it is recoverable exception which in-turn triggers same machine
check exception in a loop causing hypervisor to be unresponsive.
This patch fixes this situation and forces hypervisor to panic for
unhandled/unrecovered errors.
This patch also fixes another issue where unrecoverable_exception routine
was called in real mode in case of unrecoverable exception (MSR_RI = 0).
This causes another exception vector 0x300 (data access) during system crash
leading to confusion while debugging cause of the system crash.
Also turn ME bit off while going down, so that when another MCE is hit during
panic path, system will checkstop and hypervisor will get restarted cleanly
by SP.
With the above fixes we now throw correct console messages (see below) while
crashing the system in case of unhandled/unrecoverable machine checks.
--------------
Severe Machine check interrupt [[Not recovered]
Initiator: CPU
Error type: UE [Instruction fetch]
Effective address: 0000000030002864
Oops: Machine check, sig: 7 [#1]
SMP NR_CPUS=2048 NUMA PowerNV
Modules linked in: bork(O) bridge stp llc kvm [last unloaded: bork]
CPU: 36 PID: 55162 Comm: bash Tainted: G O 3.14.0mce #1
task: c000002d72d022d0 ti: c000000007ec0000 task.ti: c000002d72de4000
NIP: 0000000030002864 LR: 00000000300151a4 CTR: 000000003001518c
REGS: c000000007ec3d80 TRAP: 0200 Tainted: G O (3.14.0mce)
MSR: 9000000000041002 <SF,HV,ME,RI> CR: 28222848 XER: 20000000
CFAR: 0000000030002838 DAR: d0000000004d0000 DSISR: 00000000 SOFTE: 1
GPR00: 000000003001512c 0000000031f92cb0 0000000030078af0 0000000030002864
GPR04: d0000000004d0000 0000000000000000 0000000030002864 ffffffffffffffc9
GPR08: 0000000000000024 0000000030008af0 000000000000002c c00000000150e728
GPR12: 9000000000041002 0000000031f90000 0000000010142550 0000000040000000
GPR16: 0000000010143cdc 0000000000000000 00000000101306fc 00000000101424dc
GPR20: 00000000101424e0 000000001013c6f0 0000000000000000 0000000000000000
GPR24: 0000000010143ce0 00000000100f6440 c000002d72de7e00 c000002d72860250
GPR28: c000002d72860240 c000002d72ac0038 0000000000000008 0000000000040000
NIP [0000000030002864] 0x30002864
LR [00000000300151a4] 0x300151a4
Call Trace:
Instruction dump:
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX XXXXXXXX
---[ end trace 7285f0beac1e29d3 ]---
Sending IPI to other CPUs
IPI complete
OPAL V3 detected !
--------------
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kernel/exceptions-64s.S | 40 +++++++++++++++++++++++++++++++---
1 file changed, 37 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 3afd391..e7eded1 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -1389,6 +1389,7 @@ machine_check_handle_early:
bl .save_nvgprs
addi r3,r1,STACK_FRAME_OVERHEAD
bl .machine_check_early
+ std r3,RESULT(r1) /* Save result */
ld r12,_MSR(r1)
#ifdef CONFIG_PPC_P7_NAP
/*
@@ -1443,11 +1444,33 @@ machine_check_handle_early:
*/
andi. r11,r12,MSR_RI
bne 2f
-1: addi r3,r1,STACK_FRAME_OVERHEAD
- bl .unrecoverable_exception
- b 1b
+1: mfspr r11,SPRN_SRR0
+ ld r10,PACAKBASE(r13)
+ LOAD_HANDLER(r10,unrecover_mce)
+ mtspr SPRN_SRR0,r10
+ ld r10,PACAKMSR(r13)
+ /*
+ * We are going down. But there are chances that we might get hit by
+ * another MCE during panic path and we may run into unstable state
+ * with no way out. Hence, turn ME bit off while going down, so that
+ * when another MCE is hit during panic path, system will checkstop
+ * and hypervisor will get restarted cleanly by SP.
+ */
+ li r3,MSR_ME
+ andc r10,r10,r3 /* Turn off MSR_ME */
+ mtspr SPRN_SRR1,r10
+ rfid
+ b .
2:
/*
+ * Check if we have successfully handled/recovered from error, if not
+ * then stay on emergency stack and panic.
+ */
+ ld r3,RESULT(r1) /* Load result */
+ cmpdi r3,0 /* see if we handled MCE successfully */
+
+ beq 1b /* if !handled then panic */
+ /*
* Return from MC interrupt.
* Queue up the MCE event so that we can log it later, while
* returning from kernel or opal call.
@@ -1460,6 +1483,17 @@ machine_check_handle_early:
MACHINE_CHECK_HANDLER_WINDUP
b machine_check_pSeries
+unrecover_mce:
+ /* Invoke machine_check_exception to print MCE event and panic. */
+ addi r3,r1,STACK_FRAME_OVERHEAD
+ bl .machine_check_exception
+ /*
+ * We will not reach here. Even if we did, there is no way out. Call
+ * unrecoverable_exception and die.
+ */
+1: addi r3,r1,STACK_FRAME_OVERHEAD
+ bl .unrecoverable_exception
+ b 1b
/*
* r13 points to the PACA, r9 contains the saved CR,
* r12 contain the saved SRR1, SRR0 is still ready for return
^ permalink raw reply related
* [PATCH 2/2] powerpc/book3s: Add stack overflow check in machine check handler.
From: Mahesh J Salgaonkar @ 2014-04-28 14:16 UTC (permalink / raw)
To: linuxppc-dev, Benjamin Herrenschmidt; +Cc: Michael Neuling
In-Reply-To: <20140428141622.5522.6901.stgit@mars>
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Currently machine check handler does not check for stack overflow for
nested machine check. If we hit another MCE while inside the machine check
handler repeatedly from same address then we get into risk of stack
overflow which can cause huge memory corruption. This patch limits the
nested MCE level to 4 and panic when we cross level 4.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kernel/exceptions-64s.S | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index e7eded1..06774d8 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -439,9 +439,9 @@ BEGIN_FTR_SECTION
* R9 = CR
* Original R9 to R13 is saved on PACA_EXMC
*
- * Switch to mc_emergency stack and handle re-entrancy (though we
- * currently don't test for overflow). Save MCE registers srr1,
- * srr0, dar and dsisr and then set ME=1
+ * Switch to mc_emergency stack and handle re-entrancy (we limit
+ * the nested MCE upto level 4 to avoid stack overflow).
+ * Save MCE registers srr1, srr0, dar and dsisr and then set ME=1
*
* We use paca->in_mce to check whether this is the first entry or
* nested machine check. We increment paca->in_mce to track nested
@@ -464,6 +464,9 @@ BEGIN_FTR_SECTION
0: subi r1,r1,INT_FRAME_SIZE /* alloc stack frame */
addi r10,r10,1 /* increment paca->in_mce */
sth r10,PACA_IN_MCE(r13)
+ /* Limit nested MCE to level 4 to avoid stack overflow */
+ cmpwi r10,4
+ bgt 2f /* Check if we hit limit of 4 */
std r11,GPR1(r1) /* Save r1 on the stack. */
std r11,0(r1) /* make stack chain pointer */
mfspr r11,SPRN_SRR0 /* Save SRR0 */
@@ -482,10 +485,23 @@ BEGIN_FTR_SECTION
ori r11,r11,MSR_RI /* turn on RI bit */
ld r12,PACAKBASE(r13) /* get high part of &label */
LOAD_HANDLER(r12, machine_check_handle_early)
- mtspr SPRN_SRR0,r12
+1: mtspr SPRN_SRR0,r12
mtspr SPRN_SRR1,r11
rfid
b . /* prevent speculative execution */
+2:
+ /* Stack overflow. Stay on emergency stack and panic.
+ * Keep the ME bit off while panic-ing, so that if we hit
+ * another machine check we checkstop.
+ */
+ addi r1,r1,INT_FRAME_SIZE /* go back to previous stack frame */
+ ld r11,PACAKMSR(r13)
+ ld r12,PACAKBASE(r13)
+ LOAD_HANDLER(r12, unrecover_mce)
+ li r10,MSR_ME
+ andc r11,r11,r10 /* Turn off MSR_ME */
+ b 1b
+ b . /* prevent speculative execution */
END_FTR_SECTION_IFSET(CPU_FTR_HVMODE)
machine_check_pSeries:
^ permalink raw reply related
* [PATCH] powerpc/book3s: Increment the mce counter during machine_check_early call.
From: Mahesh J Salgaonkar @ 2014-04-28 14:17 UTC (permalink / raw)
To: linuxppc-dev, Benjamin Herrenschmidt; +Cc: Michael Neuling
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
We don't see MCE counter getting increased in /proc/interrupts which gives
false impression of no MCE occurred even when there were MCE events.
The machine check early handling was added for PowerKVM and we missed to
increment the MCE count in the early handler.
We also increment mce counters in the machine_check_exception call, but
in most cases where we handle the error hypervisor never reaches there
unless its fatal and we want to crash. Only during fatal situation we may
see double increment of mce count. We need to fix that. But for
now it always good to have some count increased instead of zero.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kernel/traps.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
index 1bd7ca2..239f1cd 100644
--- a/arch/powerpc/kernel/traps.c
+++ b/arch/powerpc/kernel/traps.c
@@ -295,6 +295,8 @@ long machine_check_early(struct pt_regs *regs)
{
long handled = 0;
+ __get_cpu_var(irq_stat).mce_exceptions++;
+
if (cur_cpu_spec && cur_cpu_spec->machine_check_early)
handled = cur_cpu_spec->machine_check_early(regs);
return handled;
^ permalink raw reply related
* [PATCH] powerpc/book3s: Improve machine check delivery to guest.
From: Mahesh J Salgaonkar @ 2014-04-28 14:17 UTC (permalink / raw)
To: linuxppc-dev, Benjamin Herrenschmidt; +Cc: Michael Neuling
From: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Currently we forward MCEs to guest which have been recovered by guest.
And for unhandled errors we do not deliver the MCE to guest. It looks like
with no support of FWNMI in qemu, guest just panics whenever we deliver the
recovered MCEs to guest. Also, the existig code used to return to host for
unhandled errors which was casuing guest to hang with soft lockups inside
guest and makes it difficult to recover guest instance.
This patch now forwards all fatal MCEs to guest causing guest to crash/panic.
And, for recovered errors we just go back to normal functioning of guest
instead of returning to host. This fixes soft lockup issues in guest.
This patch also fixes an issue where guest MCE events were not logged to
host console.
Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
---
arch/powerpc/kvm/book3s_hv_ras.c | 15 +++++++--------
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 19 ++++++++++++++++---
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/arch/powerpc/kvm/book3s_hv_ras.c b/arch/powerpc/kvm/book3s_hv_ras.c
index 768a9f9..3a5c568 100644
--- a/arch/powerpc/kvm/book3s_hv_ras.c
+++ b/arch/powerpc/kvm/book3s_hv_ras.c
@@ -113,10 +113,8 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu)
* We assume that if the condition is recovered then linux host
* will have generated an error log event that we will pick
* up and log later.
- * Don't release mce event now. In case if condition is not
- * recovered we do guest exit and go back to linux host machine
- * check handler. Hence we need make sure that current mce event
- * is available for linux host to consume.
+ * Don't release mce event now. We will queue up the event so that
+ * we can log the MCE event info on host console.
*/
if (!get_mce_event(&mce_evt, MCE_EVENT_DONTRELEASE))
goto out;
@@ -128,11 +126,12 @@ static long kvmppc_realmode_mc_power7(struct kvm_vcpu *vcpu)
out:
/*
- * If we have handled the error, then release the mce event because
- * we will be delivering machine check to guest.
+ * We are now going enter guest either through machine check
+ * interrupt (for unhandled errors) or will continue from
+ * current HSRR0 (for handled errors) in guest. Hence
+ * queue up the event so that we can log it from host console later.
*/
- if (handled)
- release_mce_event();
+ machine_check_queue_event();
return handled;
}
diff --git a/arch/powerpc/kvm/book3s_hv_rmhandlers.S b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
index ffbb871..781205f 100644
--- a/arch/powerpc/kvm/book3s_hv_rmhandlers.S
+++ b/arch/powerpc/kvm/book3s_hv_rmhandlers.S
@@ -2101,14 +2101,27 @@ machine_check_realmode:
mr r3, r9 /* get vcpu pointer */
bl .kvmppc_realmode_machine_check
nop
- cmpdi r3, 0 /* continue exiting from guest? */
+ cmpdi r3, 0 /* Did we handle MCE ? */
ld r9, HSTATE_KVM_VCPU(r13)
li r12, BOOK3S_INTERRUPT_MACHINE_CHECK
- beq mc_cont
+ /*
+ * Deliver unhandled/fatal (e.g. UE) MCE errors to guest through
+ * machine check interrupt (set HSRR0 to 0x200). And for handled
+ * errors (no-fatal), just go back to guest execution with current
+ * HSRR0 instead of exiting guest. This new approach will inject
+ * machine check to guest for fatal error causing guest to crash.
+ *
+ * The old code used to return to host for unhandled errors which
+ * was causing guest to hang with soft lockups inside guest and
+ * makes it difficult to recover guest instance.
+ */
+ ld r10, VCPU_PC(r9)
+ ld r11, VCPU_MSR(r9)
+ bne 2f /* Continue guest execution. */
/* If not, deliver a machine check. SRR0/1 are already set */
li r10, BOOK3S_INTERRUPT_MACHINE_CHECK
bl kvmppc_msr_interrupt
- b fast_interrupt_c_return
+2: b fast_interrupt_c_return
/*
* Check the reason we woke from nap, and take appropriate action.
^ permalink raw reply related
* Re: [git pull] Please pull abiv2 branch
From: Philippe Bergheaud @ 2014-04-28 14:39 UTC (permalink / raw)
To: Anton Blanchard
Cc: philippe.bergheaud, mikey, amodra, rusty, rostedt, ulrich.weigand,
paulus, mjw, linuxppc-dev
In-Reply-To: <20140423124902.5be9dab0@kryten>
Anton Blanchard wrote:
> Here are the ABIv2 patches rebased against 3.15-rc2.
After recompiling 3.15-rc2 with the ABIv2 patches,
I see the following line in Modules.symvers:
0x00000000 TOC. vmlinux EXPORT_SYMBOL
Kernel will not load modules because TOC. has no CRC.
Is this expected ? Shouldn't TOC. have a CRC ?
Philippe
^ permalink raw reply
* Re: [PATCH 00/38] MMC updates, plus CuBox-i WiFi support
From: Stephen Warren @ 2014-04-28 16:42 UTC (permalink / raw)
To: Russell King - ARM Linux, Anton Vorontsov, Barry Song, Ben Dooks,
Chris Ball, devicetree, Ian Campbell, Jaehoon Chung, Kumar Gala,
linux-arm-kernel, linux-doc, linux-mmc, linuxppc-dev, linux-tegra,
Mark Rutland, Michal Simek, Pawel Moll, Randy Dunlap, Rob Herring,
Sascha Hauer, Seungwon Jeon, Shawn Guo, spear-devel,
Thierry Reding, Ulf Hansson, Viresh Kumar
In-Reply-To: <20140423185534.GA26756@n2100.arm.linux.org.uk>
On 04/23/2014 12:55 PM, Russell King - ARM Linux wrote:
> All,
>
> This is where I'm at with trying to clean up the SDHCI mess, and sort out
> issues I've noticed when trying to get UHS support working on CuBoxes.
> This is my full patch set, but I recommend not applying patch 37 as there
> appears to be a hardware issue preventing it working reliably.
>
> In any case, patches 0-33 inclusive are the SDHCI clean up, based against
> v3.15-rc1. Patches 34 and 35 are Olof's Wifi support, 36 is my fix against
> those, and 38 adds the Broadcom Wifi and BT support for CuBox.
>
> The questions over how to handle these devices were never properly settled,
> so I recommend against merging patch 34 onwards. As for the rest, I'm not
> planning on any further work, so it may be a good idea for people to
> consider testing them with a view to getting them merged.
The series,
Tested-by: Stephen Warren <swarren@nvidia.com>
(On an NVIDIA Tegra "Jetson TK1" board, with the patches applied on top
of next-20140428, also with Andrew Bresticker's Tegra SDHCI patches
"mmc: tegra: disable UHS modes" and "mmc: tegra: fix reporting of base
clock frequency" applied)
^ permalink raw reply
* Re: [PATCH 00/38] MMC updates, plus CuBox-i WiFi support
From: Chris Ball @ 2014-04-28 16:52 UTC (permalink / raw)
To: Stephen Warren
Cc: Mark Rutland, Ulf Hansson, linux-doc, Seungwon Jeon,
Thierry Reding, Russell King - ARM Linux, Anton Vorontsov,
Michal Simek, Jaehoon Chung, linux-arm-kernel, devicetree,
Pawel Moll, Ian Campbell, spear-devel, Rob Herring, Ben Dooks,
linux-tegra, Shawn Guo, Barry Song, Randy Dunlap, linux-mmc,
Viresh Kumar, Sascha Hauer, Kumar Gala, linuxppc-dev
In-Reply-To: <535E84FB.4080305@wwwdotorg.org>
Hi,
On Mon, Apr 28 2014, Stephen Warren wrote:
> The series,
> Tested-by: Stephen Warren <swarren@nvidia.com>
>
> (On an NVIDIA Tegra "Jetson TK1" board, with the patches applied on top
> of next-20140428, also with Andrew Bresticker's Tegra SDHCI patches
> "mmc: tegra: disable UHS modes" and "mmc: tegra: fix reporting of base
> clock frequency" applied)
Thanks very much Stephen, Russell for the series, and Ulf.
This seems like a good time to merge to mmc-next and call for testing
in linux-next -- I'm happy to merge a v2 PR when ready.
- Chris.
--
Chris Ball <http://printf.net/>
^ permalink raw reply
* [PATCH 3/3][RFC][v1] powerpc: kconfig: Increase the size of COMMAND_LINE_SIZE to 2048 from 512 for powerpc.
From: Joseph Salisbury @ 2014-04-28 21:11 UTC (permalink / raw)
To: linux-kernel, benh, paulus; +Cc: linuxppc-dev, anton
In-Reply-To: <cover.1398287636.git.joseph.salisbury@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1306677
While booting the PPC64EL kernel, the command line gets truncated to 512 characters. This is due to a limit of 512 defined for COMMAND_LINE_SIZE. It would be beneficial to have a command line longer than 512 characters, as iscsi targets and cloud-init parameters are passed through the kernel command line.
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
---
arch/powerpc/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 3426bdc..becee70 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -614,7 +614,7 @@ config CMDLINE_BOOL
config COMMAND_LINE_SIZE
int "Maximum size of the command line."
- default "512"
+ default "2048"
help
This is the per architecture maximum command line size.
--
1.9.1
^ permalink raw reply related
* [PATCH 2/3][RFC][v1] powerpc: Change the powerpc architecture to use Kconfig to set COMMAND_LINE_SIZE.
From: Joseph Salisbury @ 2014-04-28 21:11 UTC (permalink / raw)
To: linux-kernel, benh, paulus; +Cc: linuxppc-dev, anton
In-Reply-To: <cover.1398287636.git.joseph.salisbury@canonical.com>
The powerpc architecture currently uses asm-generic to set the value of COMMAND_LINE_SIZE. This change will allow the value of COMMAND_LINE_SIZE to be set specifically for powerpc without affecting other architectures that may use asm-generic.
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
---
arch/powerpc/include/asm/setup.h | 2 --
arch/powerpc/include/uapi/asm/setup.h | 1 -
2 files changed, 3 deletions(-)
delete mode 100644 arch/powerpc/include/uapi/asm/setup.h
diff --git a/arch/powerpc/include/asm/setup.h b/arch/powerpc/include/asm/setup.h
index 11ba86e..c7b62c3 100644
--- a/arch/powerpc/include/asm/setup.h
+++ b/arch/powerpc/include/asm/setup.h
@@ -1,8 +1,6 @@
#ifndef _ASM_POWERPC_SETUP_H
#define _ASM_POWERPC_SETUP_H
-#include <uapi/asm/setup.h>
-
#ifndef __ASSEMBLY__
extern void ppc_printk_progress(char *s, unsigned short hex);
diff --git a/arch/powerpc/include/uapi/asm/setup.h b/arch/powerpc/include/uapi/asm/setup.h
deleted file mode 100644
index 552df83..0000000
--- a/arch/powerpc/include/uapi/asm/setup.h
+++ /dev/null
@@ -1 +0,0 @@
-#include <asm-generic/setup.h>
--
1.9.1
^ permalink raw reply related
* [PATCH 0/3][RFC][v1] kconfig: powerpc: Make COMMAND_LINE_SIZE a kernel config option. Increase COMMAND_LINE_SIZE for the powerpc architecture.
From: Joseph Salisbury @ 2014-04-28 21:11 UTC (permalink / raw)
To: linux-kernel, benh, paulus; +Cc: linuxppc-dev, anton
I'm sending this out as a RFC to get feedback and see which way folks would like to go. Patch 1 of this patch set makes COMMAND_LINE_SIZE a seperate config option for each architecture. However, an alternative to that would be to create a single default size(Possibly 2048 to satisfy patchs 2 and 3 of this patch set) for COMMAND_LINE_SIZE in ~kernel/Kconfig or ~init/Kconfig and then allow the different architecures to either bump this size up or down if needed.
This set of changes focus on COMMAND_LINE_SIZE. An inital patch was created to increase the size of COMMAND_LINE_SIZE for the powerpc architecture. However, after looking at the code, it appears powerpc does not actually use the define in the ppc headers but uses the common generic default. It seems like having COMMAND_LINE_SIZE a kernel config options is a cleaner way to modify the value, instead of going through and chaning defines. This applies to all architectures and not just powerpc.
The powerpc architecture uses asm-generic to set the value of COMMAND_LINE_SIZE, which should be changed to a kernel config option.
The size of COMMAND_LINE_SIZE for powerpc should be longer than 512 characters, as iscsi targets and cloud-init parameters are passed through the kernel command line.
Joseph Salisbury (3):
kconfig: Change COMMAND_LINE_SIZE to a kernel config option, which is
now set per architecture.
powerpc: Change the powerpc architecture to use Kconfig to set
COMMAND_LINE_SIZE.
powerpc: kconfig: Increase the size of COMMAND_LINE_SIZE to 2048 from
512 for powerpc.
arch/alpha/Kconfig | 6 ++++++
arch/alpha/include/uapi/asm/setup.h | 4 +++-
arch/arc/Kconfig | 6 ++++++
arch/arc/include/asm/setup.h | 4 +++-
arch/arm/Kconfig | 6 ++++++
arch/arm/include/uapi/asm/setup.h | 4 +++-
arch/arm64/Kconfig | 6 ++++++
arch/arm64/include/uapi/asm/setup.h | 4 +++-
arch/avr32/Kconfig | 6 ++++++
arch/avr32/include/uapi/asm/setup.h | 4 +++-
arch/c6x/Kconfig | 6 ++++++
arch/c6x/include/uapi/asm/setup.h | 4 +++-
arch/cris/Kconfig | 6 ++++++
arch/cris/include/uapi/asm/setup.h | 4 +++-
arch/frv/Kconfig | 6 ++++++
arch/frv/include/uapi/asm/setup.h | 5 +++--
arch/ia64/Kconfig | 6 ++++++
arch/ia64/include/uapi/asm/setup.h | 4 +++-
arch/m32r/Kconfig | 6 ++++++
arch/m32r/include/uapi/asm/setup.h | 5 +++--
arch/m68k/Kconfig | 6 ++++++
arch/m68k/include/uapi/asm/setup.h | 4 +++-
arch/microblaze/Kconfig | 6 ++++++
arch/microblaze/include/uapi/asm/setup.h | 4 +++-
arch/mips/Kconfig | 6 ++++++
arch/mips/include/uapi/asm/setup.h | 5 +++--
arch/mn10300/Kconfig | 6 ++++++
arch/mn10300/include/uapi/asm/param.h | 4 +++-
arch/parisc/Kconfig | 6 ++++++
arch/parisc/include/uapi/asm/setup.h | 4 +++-
arch/powerpc/Kconfig | 6 ++++++
arch/powerpc/boot/ops.h | 5 ++++-
arch/powerpc/include/asm/setup.h | 2 --
arch/powerpc/include/uapi/asm/setup.h | 1 -
arch/s390/Kconfig | 6 ++++++
arch/s390/include/uapi/asm/setup.h | 4 +++-
arch/score/Kconfig | 6 ++++++
arch/score/include/uapi/asm/setup.h | 5 ++++-
arch/sparc/Kconfig | 7 +++++++
arch/sparc/include/uapi/asm/setup.h | 7 ++-----
arch/tile/Kconfig | 6 ++++++
arch/tile/include/uapi/asm/setup.h | 5 +++--
arch/um/Kconfig.um | 6 ++++++
arch/um/include/asm/setup.h | 4 +++-
arch/x86/Kconfig | 6 ++++++
arch/x86/include/asm/setup.h | 4 +++-
arch/xtensa/Kconfig | 6 ++++++
arch/xtensa/include/uapi/asm/setup.h | 4 +++-
include/uapi/asm-generic/setup.h | 2 +-
49 files changed, 210 insertions(+), 35 deletions(-)
delete mode 100644 arch/powerpc/include/uapi/asm/setup.h
--
1.9.1
^ 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