Re: x86/kdump: crashkernel=X try to reserve below 896M first then below 4G and MAXMEM

2017-10-21 Thread Yinghai Lu
On Thu, Oct 19, 2017 at 10:52 PM, Dave Young wrote: > Now crashkernel=X will fail if there's not enough memory at low region > (below 896M) when trying to reserve large memory size. One can use > crashkernel=xM,high to reserve it at high region (>4G) but it is more > convinient to improve crashke

Re: [PATCH V13 1/4] PCI: Don't ignore valid response before CRS timeout

2017-09-03 Thread Yinghai Lu
On Tue, Aug 29, 2017 at 12:53 PM, Bjorn Helgaas wrote: > > Applied this series to pci/enumeration for v4.14. You didn't include a > cover letter, but the series includes: > > [V13 1/4] PCI: Don't ignore valid response before CRS timeout > [V13 2/4] PCI: Factor out pci_bus_wait_crs() > [V13

[PATCH 03/10] PCI: export symbol for PCI_TEST module

2017-08-04 Thread Yinghai Lu
We need to use them from pci_test module, so expose them. Signed-off-by: Yinghai Lu --- arch/x86/pci/i386.c | 1 + drivers/pci/setup-bus.c | 1 + kernel/resource.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 7b43071..9065c58

[PATCH 00/10] PCI: pci resource allocation test module

2017-08-04 Thread Yinghai Lu
://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for_pci_v4.14_pci_next Thanks Yinghai Yinghai Lu (10): PCI: avoid arch_remove_reservations() for PCI_TEST PCI: introduce ioport_res/iomem_res for PCI_TEST PCI: export symbol for PCI_TEST module PCI: extend pci device

[PATCH 01/10] PCI: avoid arch_remove_reservations() for PCI_TEST

2017-08-04 Thread Yinghai Lu
: Yinghai Lu --- arch/x86/kernel/resource.c | 15 +-- include/linux/ioport.h | 3 ++- kernel/resource.c | 5 +++-- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/arch/x86/kernel/resource.c b/arch/x86/kernel/resource.c index 5ab3895..f19b0f6 100644 --- a

[PATCH 04/10] PCI: extend pci device match_driver state

2017-08-04 Thread Yinghai Lu
Change it from false/true to -1/0/1. If it is set from -1, then it will never get change to 1 later. For PCI_TEST, the simulated device does not have realy function support except bus number and BAR setting. Signed-off-by: Yinghai Lu --- drivers/iommu/amd_iommu_init.c | 2 +- drivers/pci

[PATCH 06/10] PCI: PCI_TEST simple data

2017-08-04 Thread Yinghai Lu
Signed-off-by: Yinghai Lu --- drivers/pci/pci_test_data.txt | 24 drivers/pci/pci_test_mask.txt | 5 + 2 files changed, 29 insertions(+) create mode 100644 drivers/pci/pci_test_data.txt create mode 100644 drivers/pci/pci_test_mask.txt diff --git a/drivers/pci

[PATCH 02/10] PCI: introduce ioport_res/iomem_res for PCI_TEST

2017-08-04 Thread Yinghai Lu
Make every bus to take the pointer to correct iomem_res instead of using iomem_resource directly. So PCI_TEST could use different iomem_res later. Signed-off-by: Yinghai Lu --- drivers/pci/probe.c | 2 ++ drivers/pci/quirks.c| 2 +- drivers/pci/setup-bus.c | 2 +- drivers/pci/setup

[PATCH 05/10] PCI: Add PCI_TEST module for resource allocation

2017-08-04 Thread Yinghai Lu
registers, so we can make pci BAR sizing working. It also support bus number assign-all. Only tested on x86 64bit arch. Signed-off-by: Yinghai Lu --- drivers/pci/Kconfig|6 + drivers/pci/Makefile |2 + drivers/pci/pci_test.c | 1281 3

Re: [tip:x86/platform] x86/PCI/mmcfg: Switch to ECAM config mode if possible

2017-06-29 Thread Yinghai Lu
On Wed, Jun 28, 2017 at 11:45 PM, tip-bot for Thomas Gleixner wrote: > Commit-ID: b5b0f00c760b6e9673ab79b88ede2f3c7a039f74 > Gitweb: http://git.kernel.org/tip/b5b0f00c760b6e9673ab79b88ede2f3c7a039f74 > Author: Thomas Gleixner > AuthorDate: Thu, 16 Mar 2017 22:50:09 +0100 > Committer: Th

Re: [PATCH v3] PCI: Workaround wrong flags completions for IDT switch

2017-06-13 Thread Yinghai Lu
On Mon, Jun 12, 2017 at 2:48 PM, Bjorn Helgaas wrote: > On Fri, Jun 09, 2017 at 04:16:17PM -0700, Yinghai Lu wrote: >> From: James Puthukattukaran >> >> The IDT switch incorrectly flags an ACS source violation on a read config >> request to an end point device on the c

[PATCH v3] PCI: Workaround wrong flags completions for IDT switch

2017-06-09 Thread Yinghai Lu
pci_bus_check_dev() and move enable_acs_sv to drivers/pci/pci.c -- by Yinghai -v3: add bus->self check for root bus and virtual bus for sriov vfs. Signed-off-by: James Puthukattukaran Signed-off-by: Yinghai Lu -- drivers/pci/pci.c | 33 + drivers/pci/pc

Re: [PATCH] x86/mm: Fix incorrect for loop count calculation in sync_global_pgds

2017-05-01 Thread Yinghai Lu
trace fe34c0fc0fe685ab ]--- > [9.998690] Kernel panic - not syncing: Fatal exception > [ 10.004708] Kernel Offset: 0x1100 from 0x8100 (relocation > range: 0xffff8000-0xbfff) > > Reported-by: Jeff Moyer > Signed-off-by: Baoquan He > Cc: Tho

Re: [PATCH v2] x86/mm: Fix incorrect for loop count calculation in sync_global_pgds

2017-05-01 Thread Yinghai Lu
On Mon, May 1, 2017 at 12:32 PM, Ingo Molnar wrote: > > * Baoquan He wrote: > >> arch/x86/mm/init_64.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c >> index 15173d3..dfa9edb 100644 >> --- a/arch/x86/mm/init_64.c >> +

Re: [tip:x86/boot] x86/boot/e820: Basic cleanup of e820.c

2017-04-25 Thread Yinghai Lu
On Tue, Apr 11, 2017 at 12:37 AM, tip-bot for Ingo Molnar wrote: > Commit-ID: 640e1b38b00550990cecd809021cd37716e45922 > Gitweb: http://git.kernel.org/tip/640e1b38b00550990cecd809021cd37716e45922 > Author: Ingo Molnar > AuthorDate: Sat, 28 Jan 2017 11:13:08 +0100 > Committer: Ingo Molna

Re: [PATCH 1/2] x86/mm/ident_map: Add PUD level 1GB page support

2017-04-25 Thread Yinghai Lu
On Tue, Apr 25, 2017 at 2:13 AM, Xunlei Pang wrote: > The current kernel_ident_mapping_init() creates the identity > mapping using 2MB page(PMD level), this patch adds the 1GB > page(PUD level) support. > > This is useful on large machines to save some reserved memory > (as paging structures) in t

[PATCH 05/13] sparc/PCI: Keep resource idx order with bridge register number

2017-04-20 Thread Yinghai Lu
ad_bridge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c | 8 +++- 1 file changed, 7 i

[PATCH 00/13] PCI: sparc related 64bit resource fixup

2017-04-20 Thread Yinghai Lu
to root all pcie. patch 13: restore old pref allocation logic if hostbridge does not support mmio64. Those patches could be applied on top of today's pci/next. Thanks Yinghai Yinghai Lu (13): sparc/PCI: Use correct offset for bus address to resource PCI: Add pci_find_bus_res

[PATCH 07/13] powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Gavin Shan Cc: Yijing Wang Cc: Anton Blanchard Cc: linuxppc-...@lists.ozlabs.org --- arch/powerpc/kernel/pci_of_scan.c | 4 +++- 1 file changed, 3 insertions

[PATCH 01/13] sparc/PCI: Use correct offset for bus address to resource

2017-04-20 Thread Yinghai Lu
change in pci_resource_to_user() Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 6 +++--- arch/sparc/kernel/pci_common.c | 32 arch/sparc/kernel/pci_impl.h | 4 3 files changed, 31 insertions(+), 11

[PATCH 12/13] PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64

2017-04-20 Thread Yinghai Lu
If host bridge does not have mmio64 above 4G, We don't need to treat device non-pref mmio64 as as pref mmio64. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/driver

[PATCH 02/13] PCI: Add pci_find_bus_resource()

2017-04-20 Thread Yinghai Lu
Add pci_find_bus_resource() to return bus resource for input resource. In some case, we may only have bus instead of dev. It is same as pci_find_parent_resource, but take bus as input. Signed-off-by: Yinghai Lu --- drivers/pci/pci.c | 27 --- include/linux/pci.h | 2

[PATCH 09/13] PCI: Check pref compatible bit for mem64 resource of PCIe device

2017-04-20 Thread Yinghai Lu
vid Ahern Tested-by: David Ahern Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Tested-by: TJ Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci_common.c | 2 +- drivers/pci/pci.c | 8 +--- drivers/pci/pci

[PATCH 10/13] PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64

2017-04-20 Thread Yinghai Lu
re we check them for child device resources. -v2: check all bus resources instead of just res[15]. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/setup-bus.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bu

[PATCH 06/13] powerpc/PCI: Keep resource idx order with bridge register number

2017-04-20 Thread Yinghai Lu
Same as sparc version. Make resource with consistent sequence like other arch or directly from pci_read_bridge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu Cc

[PATCH 04/13] sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Tested-by: Khalid Aziz --- arch/sparc/kernel/of_device_32.c | 5 +++-- arch/sparc/kernel/of_device_64.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletion

[PATCH 08/13] OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

2017-04-20 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: Grant Likely Cc: Rob Herring Cc: devicet...@vger.kernel.org Tested-by: Khalid Aziz --- drivers/of/address.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index

[PATCH 13/13] PCI: Restore pref MMIO allocation logic for host bridge without mmio64

2017-04-20 Thread Yinghai Lu
g at all. The patch restore to old logic: when host bridge does not have has_mem64, put children pref mmio64 and pref mmio32 all under bridges pref bars. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/bus.c | 4 +++- drivers/pci/setup-bus.c | 13 + drivers/p

[PATCH 11/13] PCI: Add has_mem64 for struct host_bridge

2017-04-20 Thread Yinghai Lu
keep pref mmio64 and pref mmio32 under bridge pref bar. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/probe.c | 7 +++ include/linux/pci.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 676b55f..8f439e0 100644 --- a/d

[PATCH 03/13] sparc/PCI: Reserve legacy mmio after PCI mmio

2017-04-20 Thread Yinghai Lu
ose regions. -v5: merge simplify one and use pcibios_bus_to_resource() -v6: use pci_find_bus_resource() Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 1 + arch/sparc/kernel/pci_common.c | 59 ++

Re: [PATCH v2] PCI: disable SERR for kdump kernel

2017-04-20 Thread Yinghai Lu
On Thu, Apr 20, 2017 at 10:14 AM, Sinan Kaya wrote: > On 4/18/2017 8:31 PM, Yinghai Lu wrote: >> * pci_setup_device - fill in class and map information of a device >> * @dev: the device structure to fill >> @@ -1572,6 +1592,9 @@ int pci_setup_device(struct pci_dev *dev >

[PATCH v2] PCI: disable SERR for kdump kernel

2017-04-18 Thread Yinghai Lu
Found one system with infiniband with SRIOV enabled, kdump kernel SRIOV BAR probing trigger one pci fatal error. That assert error pin, and host get reset by BMC. We can just ignore that error to let kernel go on and kdump to create vmcore. -v2: add debug print out Signed-off-by: Yinghai Lu

Re: [PATCH] x86/boot: Support uncompressed kernel

2017-03-23 Thread Yinghai Lu
On Thu, Mar 23, 2017 at 5:51 AM, Chao Peng wrote: > Compressed kernel has its own drawback: uncompressing takes time. Even > though the time is short enough to ignore for most cases but for cases that > time is critical this is still a big number. In our on-going optimization > for kernel boot tim

Re: [tip:x86/asm] x86/asm: Optimize clear_page()

2017-03-07 Thread Yinghai Lu
On Mon, Mar 6, 2017 at 11:30 PM, Ingo Molnar wrote: > > * Yinghai Lu wrote: > >> On Wed, Mar 1, 2017 at 1:47 AM, tip-bot for Borislav Petkov >> wrote: >> > Commit-ID: 49ca7bb328c630dd43be626534b49e19513296fd >> > Gitw

Re: [tip:x86/asm] x86/asm: Optimize clear_page()

2017-03-06 Thread Yinghai Lu
On Wed, Mar 1, 2017 at 1:47 AM, tip-bot for Borislav Petkov wrote: > Commit-ID: 49ca7bb328c630dd43be626534b49e19513296fd > Gitweb: http://git.kernel.org/tip/49ca7bb328c630dd43be626534b49e19513296fd > Author: Borislav Petkov > AuthorDate: Thu, 9 Feb 2017 01:34:49 +0100 > Committer: Ingo

[PATCH] PCI/aspm: Fix link->downstream setting

2017-03-01 Thread Yinghai Lu
xc4/0x180 SyS_write+0x49/0xa0 do_syscall_64+0xa6/0x1c0 entry_SYSCALL64_slow_path+0x25/0x25 ---[ end trace bd187ee0267df5d9 ]--- set downstream even with blacklist path. Signed-off-by: Yinghai Lu --- drivers/pci/pcie/aspm.c |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) In

Re: [PATCH] PCI, pciehp: Reuse set_slot_off()

2017-02-24 Thread Yinghai Lu
On Fri, Feb 24, 2017 at 9:17 AM, Raj, Ashok wrote: > On Thu, Feb 23, 2017 at 10:54:35PM -0800, Yinghai Lu wrote: >> +++ linux-2.6/drivers/pci/hotplug/pciehp_ctrl.c >> @@ -71,9 +71,6 @@ static void set_slot_off(struct controll >>*/ >>

[PATCH] PCI, pciehp: Reuse set_slot_off()

2017-02-23 Thread Yinghai Lu
Now set_slot_off() is used in board_added() err path. We could reuse in remove_board. Also need to move green_led and attention_status out it. and make code more readable. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_ctrl.c | 16 +++- 1 file changed, 3 insertions

[PATCH] PCI,pciehp: Skip not changed command write

2017-02-23 Thread Yinghai Lu
skip writing. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) Index: linux-2.6/drivers/pci/hotplug/pciehp_hpc.c === --- linux-2.6.orig/drivers/pci/hotplug

Re: [PATCH] PCI,pciehp: Move printout before write_cmd

2017-02-23 Thread yinghai . lu
message? On 02/23/2017 03:28 PM, Yinghai Lu wrote: Bjorn complained some strange print out for pending interrupts. Actually that is caused that have cmd print out after write_cmd. Adjust the sequence to get right order for debug print out. Signed-off-by: Yinghai Lu diff --git a/drivers/pci

[PATCH -v2] PCI,pciehp: Not write linkctrl register if val is not changed

2017-02-23 Thread Yinghai Lu
Most system have port link enabled by default, and should not have confusing printout. Also move printout before actully write, so could make debug print in order. -v2: inline __pciehp_link_set into pciehp_link_enable Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c | 19

[PATCH] PCI,pciehp: Not write linkctrl register if val is changed

2017-02-23 Thread Yinghai Lu
Most system have port link enabled by default, and should not have confusing printout. Also move printout before actully write, so could make debug print in order. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions

[PATCH] PCI,pciehp: Move printout before write_cmd

2017-02-23 Thread Yinghai Lu
Bjorn complained some strange print out for pending interrupts. Actually that is caused that have cmd print out after write_cmd. Adjust the sequence to get right order for debug print out. Signed-off-by: Yinghai Lu diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug

Re: [PATCH] PCI,pciehp: Don't handle PDC for cards with attention button

2017-02-17 Thread Yinghai Lu
On Fri, Feb 17, 2017 at 2:39 PM, Bjorn Helgaas wrote: > On Thu, Feb 16, 2017 at 10:12:47PM -0800, Yinghai Lu wrote: > > I don't think it really makes sense to tie PDC handling with the > attention button. It might happen to avoid the problem on your > system, but I d

[PATCH] PCI,pciehp: Don't handle PDC for cards with attention button

2017-02-16 Thread Yinghai Lu
is not there. So we can safely add checking in pciehp_isr() to skip that PDC handling. Signed-off-by: Yinghai Lu --- drivers/pci/hotplug/pciehp_hpc.c |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Index: linux-2.6/drivers/pci/hotplug/pciehp

[PATCH] PCI/PME: Restore pcie_pme_driver.remove

2017-02-14 Thread Yinghai Lu
hat commit did extra thing like remove the .remove for pcie_pme_driver. Put back pcie_pme_remove and restore to pcie_pme_driver fix the problem. Fixes: d7def2040077 ("PCI/PME: Make explicitly non-modular") Cc: Signed-off-by: Yinghai Lu diff --git a/drivers/pci/pcie/pme.c b/drivers/

Re: [GIT PULL] PCI fixes for v4.10

2017-02-10 Thread Yinghai Lu
On Fri, Feb 10, 2017 at 6:39 PM, Yinghai Lu wrote: > Ashok, > > Can ask your QA guys check only attached patch and commit 68db9bc ? more clean patches: split that into two small patches. Thanks Yinghai From 68db9bc814362e7f24371c27d12a4f34477d9356 Mon Sep 17 00:00:00 2001 From: Luk

Re: [GIT PULL] PCI fixes for v4.10

2017-02-10 Thread Yinghai Lu
.0: [108e:2088] type 00 class 0x020700 ... That mean commit 68db9bc assumpation about power on/off on D3 is not right. - The configuration space of the port remains accessible in D3hot, so all the functions to read or modify the Slot Status and Slot Control registers need not be m

Re: pciehp is broken from 4.10-rc1

2017-02-04 Thread Yinghai Lu
On Sat, Feb 4, 2017 at 8:22 PM, Yinghai Lu wrote: > On Sat, Feb 4, 2017 at 3:34 PM, Lukas Wunner wrote: >> On Sat, Feb 04, 2017 at 01:44:34PM -0800, Yinghai Lu wrote: >>> On Sat, Feb 4, 2017 at 10:56 AM, Lukas Wunner wrote: >>> > On Sat, Feb 04, 2017 at 09:12:

Re: pciehp is broken from 4.10-rc1

2017-02-04 Thread Yinghai Lu
On Sat, Feb 4, 2017 at 3:34 PM, Lukas Wunner wrote: > On Sat, Feb 04, 2017 at 01:44:34PM -0800, Yinghai Lu wrote: >> On Sat, Feb 4, 2017 at 10:56 AM, Lukas Wunner wrote: >> > On Sat, Feb 04, 2017 at 09:12:54AM +0100, Lukas Wunner wrote: >> > Section 6.7.3.4 of the PCIe

clocksource watchdog false detection

2017-01-17 Thread Yinghai Lu
one socket system with running cpu/memory stress test, got: -- [45477.565642] timekeeping watchdog: Marking clocksource 'tsc' as unstable, because the skew is too large: [45477.565643] 'acpi_pm' wd_now: 32e642 wd_last: 71c8c5 mask: ff [45477.565644] 'tsc' cs_now: 4b80842681e0 cs_last:

Re: [PATCH] x86/e820: make e820_search_gap() static and remove unused variables

2016-12-25 Thread Yinghai Lu
Signed-off-by: Wei Yang Acked-by: Yinghai Lu

Re: [PATCH] PCI: pciehp: Optimize PCIe root resume time

2016-12-10 Thread Yinghai Lu
On Fri, Dec 09, 2016 at 06:27:44PM -0600, Bjorn Helgaas wrote: > [+cc Yinghai, author of 2f5d8e4ff947] > > On Fri, Dec 09, 2016 at 02:43:26PM -0800, Vaibhav Shankar wrote: > > On Apollolake platforms, PCIe rootport takes a long time to resume > > from S3. With 100ms delay before read pci conf, roo

[tip:ras/core] x86/MCE: Do not look at panic_on_oops in the severity grading

2016-11-08 Thread tip-bot for Yinghai Lu
Commit-ID: f5e886ef9b45a3dbfd42b054a13c755894ea8402 Gitweb: http://git.kernel.org/tip/f5e886ef9b45a3dbfd42b054a13c755894ea8402 Author: Yinghai Lu AuthorDate: Fri, 16 Sep 2016 13:23:25 -0700 Committer: Thomas Gleixner CommitDate: Tue, 8 Nov 2016 17:10:12 +0100 x86/MCE: Do not look at

Re: [tip:x86/cpu] x86/cpu: Get rid of the show_msr= boot option

2016-10-26 Thread Yinghai Lu
On Tue, Oct 25, 2016 at 3:34 AM, tip-bot for Borislav Petkov wrote: > Commit-ID: 59c6f278bdeea4147e8be92a3ed50a9907e60088 > Gitweb: http://git.kernel.org/tip/59c6f278bdeea4147e8be92a3ed50a9907e60088 > Author: Borislav Petkov > AuthorDate: Mon, 24 Oct 2016 19:38:44 +0200 > Committer: Ing

Re: [tip:x86/urgent] x86/acpi: Prevent LAPIC id 0xff from being accounted

2016-10-07 Thread Yinghai Lu
On Fri, Oct 7, 2016 at 10:33 PM, Yinghai Lu wrote: > On Fri, Oct 7, 2016 at 10:26 PM, Yinghai Lu wrote: >> On Fri, Oct 7, 2016 at 6:28 AM, tip-bot for Thomas Gleixner >>> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c >>> index 32a7d70..6d35ba

Re: [tip:x86/urgent] x86/acpi: Prevent LAPIC id 0xff from being accounted

2016-10-07 Thread Yinghai Lu
On Fri, Oct 7, 2016 at 10:26 PM, Yinghai Lu wrote: > On Fri, Oct 7, 2016 at 6:28 AM, tip-bot for Thomas Gleixner >> diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c >> index 32a7d70..6d35baf 100644 >> --- a/arch/x86/kernel/acpi/boot.c >> +++ b/

Re: [tip:x86/urgent] x86/acpi: Prevent LAPIC id 0xff from being accounted

2016-10-07 Thread Yinghai Lu
which ignores the invalid id. > > Fixes: 8f54969dc8d6 ("x86/acpi: Introduce persistent storage for cpuid <-> > apicid mapping") > Reported-by: Yinghai Lu > Signed-off-by: Thomas Gleixner > Cc: Gu Zheng , > Cc: Tang Chen > Cc: douly.f...@cn.fujitsu.com, >

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-07 Thread Yinghai Lu
On Fri, Oct 7, 2016 at 6:00 AM, Thomas Gleixner wrote: > On Fri, 7 Oct 2016, Thomas Gleixner wrote: >> On Fri, 7 Oct 2016, Dou Liyang wrote: >> > Is it possible that the "-1/ox" could appear in the MADT which is >> > one >> > of the ACPI tables? >> >> According to the SDM the x2apic id is

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-06 Thread Yinghai Lu
On Thu, Oct 6, 2016 at 1:06 AM, Dou Liyang wrote: > I seem to remember that in x2APIC Spec the x2APIC ID may be at 255 or > greater. Good to know. Maybe later when one package have more cores like 30 cores etc. > If we do that judgment, it may be affect x2APIC's work in some other places. > > I

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-05 Thread Yinghai Lu
On Wed, Oct 5, 2016 at 7:04 AM, Thomas Gleixner wrote: >> @@ -176,6 +177,11 @@ static int acpi_register_lapic(int id, u >> return -EINVAL; >> } >> >> +if (!enabled && (id == disabled_id)) { >> +++disabled_cpus; >> +return -EINVAL; >> +} > > Why would you need

Re: [tip:x86/apic] x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping

2016-10-03 Thread Yinghai Lu
On Thu, Sep 22, 2016 at 12:10 PM, tip-bot for Gu Zheng wrote: > > x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping > > The whole patch-set aims at making cpuid <-> nodeid mapping persistent. So > that, > when node online/offline happens, cache based on cpuid <-> nodeid mapping

[PATCH v14 07/17] sparc/PCI: Reserve legacy mmio after PCI mmio

2016-09-16 Thread Yinghai Lu
ose regions. -v5: merge simplify one and use pcibios_bus_to_resource() -v6: use pci_find_bus_resource() Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 1 + arch/sparc/kernel/pci_common.c | 59 ++

[RFC PATCH] x86: Do not panic if mce=2 is passed

2016-09-16 Thread Yinghai Lu
From: Yinghai Lu For UE recovery support, current we need mce=2 in command line and also disable panic_on_oops with sysctl. but other user may still need to have panic_on_oops to 1 always. We can remove checking of panic_on_oops for mce-severity path. We should be ok as on default path when

[PATCH v14 15/17] PCI: Add has_mem64 for struct host_bridge

2016-09-16 Thread Yinghai Lu
keep pref mmio64 and pref mmio32 under bridge pref bar. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/probe.c | 7 +++ include/linux/pci.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 55539dd..08cff94 100644 --- a/d

[PATCH v14 05/17] sparc/PCI: Use correct offset for bus address to resource

2016-09-16 Thread Yinghai Lu
change in pci_resource_to_user() Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c| 6 +++--- arch/sparc/kernel/pci_common.c | 32 arch/sparc/kernel/pci_impl.h | 4 3 files changed, 31 insertions(+), 11

[PATCH v14 16/17] PCI: Only treat non-pref mmio64 as pref if host bridge has mmio64

2016-09-16 Thread Yinghai Lu
If host bridge does not have mmio64 above 4G, We don't need to treat device non-pref mmio64 as as pref mmio64. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/driver

[PATCH v14 13/17] PCI: Check pref compatible bit for mem64 resource of PCIe device

2016-09-16 Thread Yinghai Lu
vid Ahern Tested-by: David Ahern Link: https://bugzilla.kernel.org/show_bug.cgi?id=81431 Tested-by: TJ Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci_common.c | 2 +- drivers/pci/pci.c | 8 +--- drivers/pci/pci

[PATCH v14 12/17] OF/PCI: Add IORESOURCE_MEM_64 for 64-bit resource

2016-09-16 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: Grant Likely Cc: Rob Herring Cc: devicet...@vger.kernel.org Tested-by: Khalid Aziz --- drivers/of/address.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/of/address.c b/drivers/of/address.c index

[PATCH v14 03/17] PCI: Remove __pci_mmap_make_offset()

2016-09-16 Thread Yinghai Lu
After PCI: Let pci_mmap_page_range() take resource address No user for __pci_mmap_make_offset in those arch. Remove them. Signed-off-by: Yinghai Lu Cc: linuxppc-...@lists.ozlabs.org Cc: sparcli...@vger.kernel.org Cc: linux-xte...@linux-xtensa.org --- arch/microblaze/pci/pci-common.c | 63

[PATCH v14 09/17] sparc/PCI: Keep resource idx order with bridge register number

2016-09-16 Thread Yinghai Lu
ad_bridge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz Cc: sparcli...@vger.kernel.org --- arch/sparc/kernel/pci.c | 8 +++- 1 file changed, 7 i

[PATCH v14 08/17] sparc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2016-09-16 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: "David S. Miller" Cc: sparcli...@vger.kernel.org Tested-by: Khalid Aziz --- arch/sparc/kernel/of_device_32.c | 5 +++-- arch/sparc/kernel/of_device_64.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletion

[PATCH v14 17/17] PCI: Restore pref MMIO allocation logic for host bridge without mmio64

2016-09-16 Thread Yinghai Lu
g at all. The patch restore to old logic: when host bridge does not have has_mem64, put children pref mmio64 and pref mmio32 all under bridges pref bars. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/bus.c | 4 +++- drivers/pci/setup-bus.c | 13 + drivers/p

[PATCH v14 14/17] PCI: Only treat non-pref mmio64 as pref if all bridges have MEM_64

2016-09-16 Thread Yinghai Lu
re we check them for child device resources. -v2: check all bus resources instead of just res[15]. Signed-off-by: Yinghai Lu Tested-by: Khalid Aziz --- drivers/pci/setup-bus.c | 31 +-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/drivers/pci/setup-bu

[PATCH v14 11/17] powerpc/PCI: Add IORESOURCE_MEM_64 for 64-bit resource in OF parsing

2016-09-16 Thread Yinghai Lu
://bugzilla.kernel.org/show_bug.cgi?id=96241 Signed-off-by: Yinghai Lu Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Gavin Shan Cc: Yijing Wang Cc: Anton Blanchard Cc: linuxppc-...@lists.ozlabs.org --- arch/powerpc/kernel/pci_of_scan.c | 4 +++- 1 file changed, 3 insertions

[PATCH v14 04/17] PCI: Check resource alignment for /sys pci_mmap_resource path

2016-09-16 Thread Yinghai Lu
_read_resource_io /pci_write_resource_io path instead. user code should be like: fd = open(argv[1], O_RDONLY); ... sscanf(argv[2], "0x%lx", &offset); for (i = 0; i < 8; i++) { pread(fd, &buf, 1, i + offset); } close(fd); Signed-off-by: Yinghai Lu --- drivers

[PATCH v14 06/17] PCI: Add pci_find_bus_resource()

2016-09-16 Thread Yinghai Lu
Add pci_find_bus_resource() to return bus resource for input resource. In some case, we may only have bus instead of dev. It is same as pci_find_parent_resource, but take bus as input. Signed-off-by: Yinghai Lu --- drivers/pci/pci.c | 27 --- include/linux/pci.h | 2

[PATCH v14 00/17] PCI: Fixup for 64bit resource with sparc

2016-09-16 Thread Yinghai Lu
rt or support 64bit mmio. -v14: update patchset on linus/master of 2016-09-16 Yinghai Lu (17): PCI: Fix proc mmap on sparc PCI: Let pci_mmap_page_range() take resource address PCI: Remove __pci_mmap_make_offset() PCI: Check resource alignment for /sys pci_mmap_resource path sparc/PCI

[PATCH v14 01/17] PCI: Fix proc mmap on sparc

2016-09-16 Thread Yinghai Lu
S_MEM); addr = mmap(NULL, PAGE_SIZE, PROT_READ, MAP_SHARED, fd, offset); for (i = 0; i < 8; i++) printf("%x ", addr[i + left]); munmap(addr, PAGE_SIZE); close(fd); Fixes: 8c05cd08a7 ("PCI: fix offset check for sysfs mmapped files") Signed-off-by: Yinghai Lu --- dr

[PATCH v14 02/17] PCI: Let pci_mmap_page_range() take resource address

2016-09-16 Thread Yinghai Lu
: update after fix for pci_mmap with proc path according to Bjorn. Signed-off-by: Yinghai Lu Cc: linuxppc-...@lists.ozlabs.org Cc: sparcli...@vger.kernel.org Cc: linux-xte...@linux-xtensa.org --- arch/microblaze/pci/pci-common.c | 11 +--- arch/powerpc/kernel/pci-common.c | 11 +--- ar

[PATCH v14 10/17] powerpc/PCI: Keep resource idx order with bridge register number

2016-09-16 Thread Yinghai Lu
Same as sparc version. Make resource with consistent sequence like other arch or directly from pci_read_bridge_bases(), even when non-pref mmio is missing, or out of ordering in firmware reporting. Just hold i = 1 for non pref mmio, and i = 2 for pref mmio. Signed-off-by: Yinghai Lu Cc

Re: [PATCH v2 1/2] kexec: Introduce "/sys/kernel/kexec_crash_low_size"

2016-08-23 Thread Yinghai Lu
On Wed, Aug 17, 2016 at 1:20 AM, Dave Young wrote: > On 08/17/16 at 09:50am, Xunlei Pang wrote: >> "/sys/kernel/kexec_crash_size" only handles crashk_res, it >> is fine in most cases, but sometimes we have crashk_low_res. >> For example, when "crashkernel=size[KMG],high" combined with >> "crashker

Re: [PATCH 2/6] x86/boot: Move compressed kernel to end of decompression buffer

2016-08-16 Thread Yinghai Lu
On Mon, Aug 15, 2016 at 9:01 PM, Matt Mullins wrote: > > This appears to have a negative effect on booting the Intel Edison platform, > as > it uses u-boot as its bootloader. u-boot does not copy the init_size > parameter > when booting a bzImage: it copies a fixed-size setup_header [1], and it

Re: [PATCH v13 00/16] PCI: Fixup for 64bit resource with sparc

2016-08-09 Thread Yinghai Lu
On Mon, Aug 8, 2016 at 12:49 PM, Bjorn Helgaas wrote: > On Fri, Jun 17, 2016 at 07:24:45PM -0700, Yinghai Lu wrote: > > Can you update these to apply to v4.8-rc1, and we can keep chipping > away at these? sure. will send rebased version shortly. Thanks Yinghai

Re: [PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping

2016-08-08 Thread Yinghai Lu
On Mon, Aug 8, 2016 at 12:06 AM, Yinghai Lu wrote: >> >>> At the same time, set_up_temporary_text_mapping could be replaced with >>> kernel_ident_mapping_init() too if restore_jump_address is KVA for >>> jump_address_phys. >> >> I see no reason to do

Re: [PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping

2016-08-08 Thread Yinghai Lu
On Sun, Aug 7, 2016 at 4:23 PM, Rafael J. Wysocki wrote: > On Saturday, August 06, 2016 09:53:50 PM Yinghai Lu wrote: >> On Sat, Aug 6, 2016 at 6:03 PM, Rafael J. Wysocki wrote: >> > On Wednesday, August 03, 2016 11:28:48 PM Rafael J. Wysocki wrote: >> > >> >

Re: [PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping

2016-08-06 Thread Yinghai Lu
ng_init() might be made work in that > case too, using hibernation-specific code for that is way simpler. > > Reported-by: Thomas Garnier > Suggested-by: Yinghai Lu > Signed-off-by: Rafael J. Wysocki > --- > arch/x86/power/hibernate_64.c | 61 >

[PATCH] megaraid_sas: Fix probing cards without io port

2016-08-06 Thread Yinghai Lu
ask 1, so that pci_request_selected_regions() is trying to request BAR0 instead of BAR1. Fix all related reference. Fixes: b6d5d8808b4c ("megaraid_sas: Use lowest memory bar for SR-IOV VF support") Signed-off-by: Yinghai Lu --- drivers/scsi/megaraid/megaraid_sas_base.c |6 +++--

[PATCH v2] x86/power/64: Support unaligned addresses for temporary mapping

2016-08-03 Thread Yinghai Lu
. Signed-off-by: Thomas Garnier [yinghai: change loop to virtual address] Signed-off-by: Yinghai Lu --- arch/x86/mm/ident_map.c | 54 1 file changed, 32 insertions(+), 22 deletions(-) Index: linux-2.6/arch/x86/mm/ident_map.c

Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for temporary mapping

2016-08-02 Thread Yinghai Lu
On Tue, Aug 2, 2016 at 10:48 AM, Thomas Garnier wrote: > On Tue, Aug 2, 2016 at 10:36 AM, Yinghai Lu wrote: >> >> Looks like we need to change the loop from phys address to virtual >> address instead. >> to avoid the overflow. something like attached. --- arc

Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for temporary mapping

2016-08-02 Thread Yinghai Lu
On Mon, Aug 1, 2016 at 5:36 PM, Rafael J. Wysocki wrote: > On Monday, August 01, 2016 10:07:59 AM Thomas Garnier wrote: >> Correctly setup the temporary mapping for hibernation. Previous >> implementation assumed the address was aligned on the PGD level. With >> KASLR memory randomization enabled,

Re: [PATCH v1 1/2] x86/power/64: Support unaligned addresses for temporary mapping

2016-08-02 Thread Yinghai Lu
On Mon, Aug 1, 2016 at 10:07 AM, Thomas Garnier wrote: > Correctly setup the temporary mapping for hibernation. Previous > implementation assumed the address was aligned on the PGD level. With > KASLR memory randomization enabled, the address is randomized on the PUD > level. This change supports

Re: Why does BIOS assign memory to 16 byte BAR

2016-07-26 Thread Yinghai Lu
On Tue, Jul 26, 2016 at 8:43 AM, Bharat Kumar Gogada wrote: >> > > We have only one End point connected to our root port. >> > > >> > > Here is the log: >> > > [2.319289] nwl-pcie fd0e.pcie: Link is UP >> > > [2.319332] PCI host bridge /amba/pcie@fd0e ranges: >> > > [2.319349]

Re: [LKP] [x86/KASLR] ed9f007ee6: -- System halted

2016-06-30 Thread Yinghai Lu
On Wed, Jun 29, 2016 at 11:58 PM, Ye Xiaolong wrote: > On Wed, Jun 29, 2016 at 09:49:12PM -0700, Yinghai Lu wrote: >>On Wed, Jun 29, 2016 at 1:29 PM, Huang, Ying wrote: >>> If you could provide a git branch for that, that will be easier for us >>> to test and more

Re: [LKP] [x86/KASLR] ed9f007ee6: -- System halted

2016-06-29 Thread Yinghai Lu
On Wed, Jun 29, 2016 at 1:29 PM, Huang, Ying wrote: > If you could provide a git branch for that, that will be easier for us > to test and more accurate for you to get the right patch to be tested. > Please check git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-x86-v4.

Re: [x86/KASLR] ed9f007ee6: -- System halted

2016-06-29 Thread Yinghai Lu
On Tue, Jun 28, 2016 at 12:49 PM, Yinghai Lu wrote: > On Mon, Jun 27, 2016 at 10:43 PM, Ye Xiaolong wrote: >> On Mon, Jun 27, 2016 at 11:59:37AM -0700, Yinghai Lu wrote: >>>output is: >>> >>>early console in setup code >>>early console in ext

Re: [x86/KASLR] ed9f007ee6: -- System halted

2016-06-27 Thread Yinghai Lu
_putstr("out of pgt_buf in " __FILE__ "!?\n"); - debug_putaddr(pages->pgt_buf_offset); - debug_putaddr(pages->pgt_buf_size); return NULL; } Subject: [PATCH] x86, boot: Add printf support for early console in compressed/misc.c Reuse printf.c in x86 setup code. Later decompr

[tip:x86/boot] x86/KASLR: Allow randomization below the load address

2016-06-26 Thread tip-bot for Yinghai Lu
Commit-ID: e066cc47776a89bbdaf4184c0e75f7d389f9ab48 Gitweb: http://git.kernel.org/tip/e066cc47776a89bbdaf4184c0e75f7d389f9ab48 Author: Yinghai Lu AuthorDate: Wed, 25 May 2016 15:45:34 -0700 Committer: Ingo Molnar CommitDate: Sun, 26 Jun 2016 12:32:05 +0200 x86/KASLR: Allow

Re: [PATCH v13 01/16] PCI: Let pci_mmap_page_range() take resource address

2016-06-22 Thread Yinghai Lu
On Wed, Jun 22, 2016 at 8:22 AM, Bjorn Helgaas wrote: > On Tue, Jun 21, 2016 at 09:32:49PM -0700, Yinghai Lu wrote: > > If sparc is broken, let's make this a tiny sparc-only patch that fixes > only the breakage -- no cleanup or restructuring. Then we can do the > more

Re: [PATCH v13 01/16] PCI: Let pci_mmap_page_range() take resource address

2016-06-21 Thread Yinghai Lu
On Sat, Jun 18, 2016 at 5:17 AM, Bjorn Helgaas wrote: > On Fri, Jun 17, 2016 at 07:24:46PM -0700, Yinghai Lu wrote: >> In 8c05cd08a7 ("PCI: fix offset check for sysfs mmapped files"), try >> to check exposed value with resource start/end in proc mmap path. >> &g

  1   2   3   4   5   6   7   8   9   10   >