This is my resurected attempt at adding support for generic PCI host
bridge controllers that make use of device tree information to
configure themselves. I've tagged it as v8 although the patches
have now been reshuffled in order to ease adoption so referring to
the older versions might be a bit of a hoop jumping exercise.
Changes from v7:
- Reordered the patches so that fixes and non-controversial patches
from v7 can be accepted more easily. If agreed I can split the
series again into patches that can be upstreamed easily and ones
that still need discussion.
- Moved the of_create_host_bridge() function to drivers/of/of_pci.c
to better reflect its target use.
- Added the function to remap the bus I/O resources that used to be
provided in my arm64 patch series and (re)named it pci_remap_iospace()
- Removed error code checking from parsing and mapping of IRQ from DT
in recognition that some PCI devices will not have legacy IRQ mappings.
v7 thread here with all the historic information: https://lkml.org/lkml/2014/3/14/279
Best regards,
Liviu
Liviu Dudau (9):
Fix ioport_map() for !CONFIG_GENERIC_IOMAP cases.
pci: Export find_pci_host_bridge() function.
pci: Introduce pci_register_io_range() helper function.
pci: OF: Fix the conversion of IO ranges into IO resources.
pci: Create pci_host_bridge before its associated bus in pci_create_root_bus.
pci: Introduce a domain number for pci_host_bridge.
pci: of: Parse and map the IRQ when adding the PCI device.
pci: Add support for creating a generic host_bridge from device tree
pci: Remap I/O bus resources into CPU space with pci_remap_iospace()
drivers/of/address.c | 108 ++++++++++++++++++++++++++++++++++++
drivers/of/of_pci.c | 135 +++++++++++++++++++++++++++++++++++++++++++++
drivers/pci/host-bridge.c | 21 ++++++-
drivers/pci/pci.c | 37 +++++++++++++
drivers/pci/probe.c | 68 ++++++++++++++++-------
include/asm-generic/io.h | 2 +-
include/linux/of_address.h | 14 +----
include/linux/of_pci.h | 10 ++++
include/linux/pci.h | 15 +++++
9 files changed, 376 insertions(+), 34 deletions(-)
--
2.0.0
V1: https://lkml.org/lkml/2014/6/25/152
Stephen Boyd sent few patches some time back around a new cpufreq driver for
Qualcomm's Krait SoC: https://lkml.org/lkml/2014/6/24/918.
Krait couldn't use existing cpufreq-cpu0 driver as it doesn't have support for
SoC's with multiple clusters or SoC's which don't share clock line across all
CPUs.
This patchset is all about extending support beyond CPU0. It can be used for
platforms like Krait or ARM big LITTLE architecture now.
First two patches add helper routine for of and clk layer, which would be used
by later patches.
Third one adds space for driver specific data in 'struct cpufreq_policy' and
later ones migrate cpufreq-cpu0 to cpufreq-generic, i.e. can be used for SoCs
which don't share clock lines across all CPUs.
@Stephen: I haven't added your Tested-by as there were few modifications since
the time you tested it last.
Pushed here:
Rebased over v3.16-rc3:
git://git.linaro.org/people/viresh.kumar/linux.git cpufreq/cpu0-krait-v2
For guys looking to test on exynos, rebased over linux-next + some patches from
Thomas Abraham to use cpufreq-cpu0 for exynos:
git://git.linaro.org/people/viresh.kumar/linux.git cpufreq/cpu0-exynos-v2
Cc: devicetree(a)vger.kernel.org
Cc: Kukjin Kim <kgene.kim(a)samsung.com>
Cc: Michal Simek <michal.simek(a)xilinx.com>
Cc: Mike Turquette <mturquette(a)linaro.org>
Cc: Rob Herring <rob.herring(a)linaro.org>
Cc: Santosh Shilimkar <santosh.shilimkar(a)ti.com>
Cc: Simon Horman <horms(a)verge.net.au>
Viresh Kumar (14):
of: Create of_property_match()
clk: Create of_clk_shared_by_cpus()
cpufreq: Add support for per-policy driver data
cpufreq: cpu0: Add Module Author
cpufreq: cpu0: don't validate clock on clk_put()
cpufreq: cpu0: defer probe if clock isn't registered yet
cpufreq: cpu0: OPPs can be populated at runtime
cpufreq: cpu0: use dev_{err|warn|dbg} instead of pr_{err|warn|debug}
cpufreq: cpu0: Move per-cluster initialization code to ->init()
cpufreq: cpu0: try regulators with name "cpu-supply"
cpufreq: cpu0: Make allocate_resources() work for any CPU
cpufreq: cpu0: Extend support beyond CPU0
cpufreq: cpu0: rename driver and internals to 'cpufreq_generic'
cpufreq: generic: set platform_{driver|device} '.name' to
'cpufreq-generic'
.../devicetree/bindings/cpufreq/cpufreq-cpu0.txt | 62 ----
.../bindings/cpufreq/cpufreq-generic.txt | 126 +++++++
arch/arm/mach-imx/imx27-dt.c | 2 +-
arch/arm/mach-imx/imx51-dt.c | 2 +-
arch/arm/mach-omap2/pm.c | 2 +-
arch/arm/mach-shmobile/board-ape6evm-reference.c | 2 +-
arch/arm/mach-shmobile/setup-sh73a0.c | 4 +-
arch/arm/mach-zynq/common.c | 2 +-
drivers/clk/clk.c | 56 +++
drivers/cpufreq/Kconfig | 10 +-
drivers/cpufreq/Kconfig.arm | 2 +-
drivers/cpufreq/Makefile | 2 +-
drivers/cpufreq/cpufreq-cpu0.c | 251 -------------
drivers/cpufreq/cpufreq-generic.c | 394 +++++++++++++++++++++
drivers/cpufreq/exynos4x12-cpufreq.c | 2 +-
drivers/cpufreq/highbank-cpufreq.c | 6 +-
drivers/of/base.c | 29 ++
include/linux/clk.h | 6 +
include/linux/cpufreq.h | 3 +
include/linux/of.h | 10 +
20 files changed, 642 insertions(+), 331 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
create mode 100644 Documentation/devicetree/bindings/cpufreq/cpufreq-generic.txt
delete mode 100644 drivers/cpufreq/cpufreq-cpu0.c
create mode 100644 drivers/cpufreq/cpufreq-generic.c
--
2.0.0.rc2
Hi,
Arm64 kernel dmesg will print out a multiline message if any user
binary segfaults. We get "unhandled level X translation fault" with
pr_info, show_pte() with pr_alert and show_regs with default kernel
level:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/a…
Contrast to arm32 version, where it is only done if CONFIG_DEBUG_USER
is selected and user_debug=N is passed down from kernel command line:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/a…
The verboseness was useful in early platform bringup, but now it is
now a more source of confusion (people google for unhandled level
translation fault and find old linaro bugs..) . For end users pov, the
x86 version with single line on INFO level would probably be good:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/x…
example:
test[8901]: segfault at 0 ip 00007fe456a4621f sp 00007ffffd465a90
error 6 in libc-2.19.so[7fe4569db000+19f000]
Could the arm64 behavior be changed to match arm or x86 printouts?
Riku
Tree/Branch: next-20140725
Git describe: next-20140725
Commit: 5a7439efd1 Add linux-next specific files for 20140725
Build Time: 53 min 20 sec
Passed: 1 / 2 ( 50.00 %)
Failed: 1 / 2 ( 50.00 %)
Errors: 15
Warnings: 24
Section Mismatches: 0
Failed defconfigs:
arm64-allmodconfig
Errors:
arm64-allmodconfig
collect2: error: ld returned 1 exit status
../kernel/bpf/core.c:509:1: error: insn does not satisfy its constraints:
../kernel/bpf/core.c:509:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/gpio/gpio-grgpio.c:451:1: error: insn does not satisfy its constraints:
../drivers/gpio/gpio-grgpio.c:451:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../fs/nfs/filelayout/filelayoutdev.c:638:1: error: insn does not satisfy its constraints:
../fs/nfs/filelayout/filelayoutdev.c:638:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/misc/altera-stapl/altera.c:2127:1: error: insn does not satisfy its constraints:
../drivers/misc/altera-stapl/altera.c:2127:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:5398:1: error: insn does not satisfy its constraints:
../drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:5398:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/net/wireless/b43/phy_n.c:2463:1: error: insn does not satisfy its constraints:
../drivers/net/wireless/b43/phy_n.c:2463:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:23074:1: error: insn does not satisfy its constraints:
../drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:23074:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
23 warnings 0 mismatches : arm64-allmodconfig
2 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Errors summary: 15
1 collect2: error: ld returned 1 exit status
1 ../kernel/bpf/core.c:509:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
1 ../kernel/bpf/core.c:509:1: error: insn does not satisfy its constraints:
1 ../fs/nfs/filelayout/filelayoutdev.c:638:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
1 ../fs/nfs/filelayout/filelayoutdev.c:638:1: error: insn does not satisfy its constraints:
1 ../drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:23074:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
1 ../drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:23074:1: error: insn does not satisfy its constraints:
1 ../drivers/net/wireless/b43/phy_n.c:2463:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
1 ../drivers/net/wireless/b43/phy_n.c:2463:1: error: insn does not satisfy its constraints:
1 ../drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:5398:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
1 ../drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:5398:1: error: insn does not satisfy its constraints:
1 ../drivers/misc/altera-stapl/altera.c:2127:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
1 ../drivers/misc/altera-stapl/altera.c:2127:1: error: insn does not satisfy its constraints:
1 ../drivers/gpio/gpio-grgpio.c:451:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
1 ../drivers/gpio/gpio-grgpio.c:451:1: error: insn does not satisfy its constraints:
Warnings Summary: 24
2 ../drivers/char/random.c:1526:6: warning: unused variable ‘r’ [-Wunused-variable]
1 ../sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../sound/soc/fsl/imx-audmux.c:162:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../sound/soc/codecs/adau1977.c:971:20: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../fs/cifs/misc.c:578:1: warning: ‘cifs_oplock_break_wait’ defined but not used [-Wunused-function]
1 ../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/spi/spi-pl022.c:1420:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
1 ../drivers/spi/spi-atmel.c:1250:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/spi/spi-atmel.c:1015:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type
1 ../drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
1 ../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/sh/rcar-dmac.c:1260:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
1 ../drivers/dma/sh/rcar-dmac.c:1231:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1 ../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
1 ../drivers/dma/amba-pl08x.c:1042:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
1 ../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined
1 ../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
1 ../arch/arm64/include/asm/pgtable.h:376:50: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-allmodconfig : FAIL, 15 errors, 23 warnings, 0 section mismatches
Errors:
collect2: error: ld returned 1 exit status
../kernel/bpf/core.c:509:1: error: insn does not satisfy its constraints:
../kernel/bpf/core.c:509:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/gpio/gpio-grgpio.c:451:1: error: insn does not satisfy its constraints:
../drivers/gpio/gpio-grgpio.c:451:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../fs/nfs/filelayout/filelayoutdev.c:638:1: error: insn does not satisfy its constraints:
../fs/nfs/filelayout/filelayoutdev.c:638:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/misc/altera-stapl/altera.c:2127:1: error: insn does not satisfy its constraints:
../drivers/misc/altera-stapl/altera.c:2127:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:5398:1: error: insn does not satisfy its constraints:
../drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:5398:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/net/wireless/b43/phy_n.c:2463:1: error: insn does not satisfy its constraints:
../drivers/net/wireless/b43/phy_n.c:2463:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
../drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:23074:1: error: insn does not satisfy its constraints:
../drivers/net/wireless/brcm80211/brcmsmac/phy/phy_n.c:23074:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411
Warnings:
../fs/cifs/misc.c:578:1: warning: ‘cifs_oplock_break_wait’ defined but not used [-Wunused-function]
../drivers/block/drbd/drbd_bitmap.c:482:0: warning: "BITS_PER_PAGE" redefined
../drivers/block/drbd/drbd_bitmap.c:483:0: warning: "BITS_PER_PAGE_MASK" redefined
../sound/soc/codecs/adau1977.c:971:20: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/char/random.c:1526:6: warning: unused variable ‘r’ [-Wunused-variable]
../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 9 has type ‘size_t’ [-Wformat=]
../drivers/dma/sh/rcar-dmac.c:759:4: warning: format ‘%u’ expects argument of type ‘unsigned int’, but argument 10 has type ‘size_t’ [-Wformat=]
../drivers/dma/sh/rcar-dmac.c:1231:20: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/dma/sh/rcar-dmac.c:1260:63: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/dma/amba-pl08x.c:1042:4: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 5 has type ‘size_t’ [-Wformat=]
../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat=]
../drivers/dma/amba-pl08x.c:1664:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 6 has type ‘size_t’ [-Wformat=]
../sound/soc/fsl/fsl_sai.c:337:7: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../sound/soc/fsl/imx-audmux.c:70:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../sound/soc/fsl/imx-audmux.c:162:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/input/joystick/analog.c:171:2: warning: #warning Precise timer not defined for this architecture. [-Wcpp]
../drivers/power/reset/xgene-reboot.c:80:17: warning: assignment from incompatible pointer type
../drivers/spi/spi-atmel.c:1015:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/spi/spi-atmel.c:1250:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
../drivers/spi/spi-pl022.c:1420:17: warning: large integer implicitly truncated to unsigned type [-Woverflow]
../drivers/staging/bcm/CmHost.c:1503:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1546:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
../drivers/staging/bcm/CmHost.c:1564:3: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 2 warnings, 0 section mismatches
Warnings:
../arch/arm64/include/asm/pgtable.h:376:50: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../drivers/char/random.c:1526:6: warning: unused variable ‘r’ [-Wunused-variable]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches:
Tree/Branch: master
Git describe: v3.16-rc6-118-g82e13c7
Commit: 82e13c71bc Merge branch 'for-3.16' of git://linux-nfs.org/~bfields/linux
Build Time: 0 min 54 sec
Passed: 1 / 1 (100.00 %)
Failed: 0 / 1 ( 0.00 %)
Errors: 0
Warnings: 3
Section Mismatches: 0
-------------------------------------------------------------------------------
defconfigs with issues (other than build errors):
3 warnings 0 mismatches : arm64-defconfig
-------------------------------------------------------------------------------
Warnings Summary: 3
1 ../fs/direct-io.c:920:9: warning: ‘to’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../fs/direct-io.c:1034:9: warning: ‘from’ may be used uninitialized in this function [-Wmaybe-uninitialized]
1 ../arch/arm64/include/asm/pgtable.h:363:50: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized]
===============================================================================
Detailed per-defconfig build reports below:
-------------------------------------------------------------------------------
arm64-defconfig : PASS, 0 errors, 3 warnings, 0 section mismatches
Warnings:
../arch/arm64/include/asm/pgtable.h:363:50: warning: ‘start’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../fs/direct-io.c:920:9: warning: ‘to’ may be used uninitialized in this function [-Wmaybe-uninitialized]
../fs/direct-io.c:1034:9: warning: ‘from’ may be used uninitialized in this function [-Wmaybe-uninitialized]
-------------------------------------------------------------------------------
Passed with no errors, warnings or mismatches: