* EDAC PCIe errors when scannning the bus
From: Valentin Longchamp @ 2014-03-19 12:46 UTC (permalink / raw)
To: linuxppc-dev@lists.ozlabs.org, linux-pci
[-- Attachment #1: Type: text/plain, Size: 2118 bytes --]
Hello,
We have a board that is based on Freescale's P2041 SoC. The boards has 2 PCIe
buses with this topology:
PCIe 0 <---> PEX8505 switch <---> 4 network devices
PCIE 2 <---> FPGA
On 3.10.33 + a subset of the Freescale SDK 1.4 patches, both PCIe buses work
well and we are able to use the devices on them.
For each bus, I however keep getting EDAC PCIe errors at the very first stage of
bus enumeration (please see the attached kernel log, with some debug output from
arch/powerpc/kernel/pci-common.c and drivers/pci/probe.c) for both buses.
My current "understanding" of the situation is such: since PCI_PROBE_NORMAL is
used, pcibios_scan_phb() calls pci_scan_child_bus() that does a pci_scan_slot()
on the bus for 32 slots. The first pci_scan_slot() is successful and it
discovers the P2041's PCIe Controller. All the 31 other pci_scan_slot() calls
generate an EDAC PCIe error, that is triggered by the configuration read
transaction to read an hypothetical vendor ID of a device on the bus. This is
relevant with that is reported by the EDAC error handler (all the 31 are the same):
> PCIE error(s) detected
> PCIE ERR_DR register: 0x00020000
ICCA bit is set: Access to an illegal configuration space from
PEX_CONFIG_ADDR/PEX_CONFIG_DATA was detected.
> PCIE ERR_CAP_STAT register: 0x80000001
To is set: Transaction originated from PEX_CONFIG_ADDR/PEX_CONFIG_DATA.
> PCIE ERR_CAP_R0 register: 0x00000800
FMT: 0b00, TYPE: 0b00100 (Config read I guess)
> PCIE ERR_CAP_R1 register: 0x00000000
> PCIE ERR_CAP_R2 register: 0x00000000
> PCIE ERR_CAP_R3 register: 0x00000000
Afterwards, pci_scan_child_bus() calls pcibios_fixup_bus (that maybe helps ?).
>From here, since the P2041's PCIe Controller is a bridge, pci_scan_bridge is
called for this bus and all the devices are detected without having any
configuration transaction causing EDAC errors.
Has someone already observed such a behavior ? Why do these initial transaction
generate an error ? What would be a possible fix to avoid these transaction
errors for these 31 (unneded ?) pci_scan_slot() calls on the initial bus ?
Best Regards,
Valentin
[-- Attachment #2: PCIe-boot-log.txt --]
[-- Type: text/plain, Size: 52105 bytes --]
U-Boot KM-v2013.10-7.0.5-00001-g29cfbaf (Mar 13 2014 - 11:40:15)
CPU0: P2041E, Version: 2.0, (0x82180120)
Core: e500mc, Version: 3.2, (0x80230032)
Clock Configuration:
CPU0:1333.333 MHz, CPU1:1333.333 MHz, CPU2:1333.333 MHz, CPU3:1333.333 MHz,
CCB:666.667 MHz,
DDR:533.333 MHz (1066.667 MT/s data rate) (Asynchronous), LBC:83.333 MHz
FMAN1: 533.333 MHz
QMAN: 333.333 MHz
PME: 333.333 MHz
L1: D-cache 32 KiB enabled
I-cache 32 KiB enabled
Reset Configuration Word (RCW):
00000000: 14600000 00000000 28200000 00000000
00000010: 148e70cf cfc02000 58000000 41000000
00000020: 00000000 00000000 00000000 f0428816
00000030: 00000000 00000000 00000000 00000000
Board: Keymile kmcoge4
I2C: ready
SPI: ready
DRAM: Initializing with SPD
Detected UDIMM
1 GiB (DDR3, 64-bit, CL=8, ECC off)
L2: 128 KiB enabled
Corenet Platform Cache: 1 MiB enabled
SERDES: bank 3 disabled
NAND: 256 MiB
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
PCIe FPGA config: done
PCIe1: Root Complex, x1, regs @ 0xfe200000
01:00.0 - 10b5:8505 - Bridge device
02:01.0 - 10b5:8505 - Bridge device
03:00.0 - 11ab:8000 - Network controller
02:02.0 - 10b5:8505 - Bridge device
04:00.0 - 11ab:8000 - Network controller
02:03.0 - 10b5:8505 - Bridge device
05:00.0 - 11ab:8000 - Network controller
02:04.0 - 10b5:8505 - Bridge device
06:00.0 - 11ab:8000 - Network controller
PCIe1: Bus 00 - 06
PCIe3: Root Complex, x1, regs @ 0xfe202000
08:00.0 - 10ee:000a - Memory controller
PCIe3: Bus 07 - 08
In: serial
Out: serial
Err: serial
Net: Initializing Fman
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Fman1: Uploading microcode version 106.1.9
FM1@DTSEC5 [PRIME]
Warning: Bootlimit (3) exceeded. Using altbootcmd.
Hit any key to stop autoboot: 0
Using FM1@DTSEC5 device
TFTP from server 192.168.12.201; our IP address is 192.168.12.16
Filename 'kmcoge4/kmcoge4.dtb'.
Load address: 0x1f80000
Loading: ###
119.1 KiB/s
done
Bytes transferred = 30240 (7620 hex)
Using FM1@DTSEC5 device
TFTP from server 192.168.12.201; our IP address is 192.168.12.16
Filename 'kmcoge4/ecc_bch_uImage'.
Load address: 0x1000000
Loading: #################################################################
#################################################################
#################################################################
#################################################################
#############
4.4 MiB/s
done
Bytes transferred = 4002063 (3d110f hex)
WARNING: adjusting available memory to 30000000
## Booting kernel from Legacy Image at 01000000 ...
Image Name: Linux-3.10.32-kmcoge4-v0.5-00003
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 4001999 Bytes = 3.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01f80000
Booting using the fdt blob at 0x1f80000
Uncompressing Kernel Image ... OK
Loading Device Tree to 03fe5000, end 03fff61f ... OK
Using Keymile kmp204x machine description
Memory CAM mapping: 256/256 Mb, residual: 510Mb
Initializing cgroup subsys cpu
Linux version 3.10.32-kmcoge4-v0.5-00003-g6885786-dirty (chlongv1@chber1-10533x.keymile.net) (gcc version 4.7.2 (GCC) ) #6 SMP Wed Mar 19 08:27:30 CET 2014
No /soc@ffe000000/qman@318000 property 'fsl,qman-fqd', using memblock_alloc(0000000000400000)
No /soc@ffe000000/qman@318000 property 'fsl,qman-pfdr', using memblock_alloc(0000000002000000)
Qman ver:0a01,01,02
No /soc@ffe000000/bman@31a000 property 'fsl,bman-fbpr', using memblock_alloc(0000000001000000)
Bman ver:0a02,01,00
Found legacy serial port 0 for /soc@ffe000000/serial@11c500
mem=ffe11c500, taddr=ffe11c500, irq=0, clk=333333330, speed=0
Found legacy serial port 1 for /soc@ffe000000/serial@11c600
mem=ffe11c600, taddr=ffe11c600, irq=0, clk=333333330, speed=0
Found legacy serial port 2 for /soc@ffe000000/serial@11d500
mem=ffe11d500, taddr=ffe11d500, irq=0, clk=333333330, speed=0
Found legacy serial port 3 for /soc@ffe000000/serial@11d600
mem=ffe11d600, taddr=ffe11d600, irq=0, clk=333333330, speed=0
CPU maps initialized for 1 thread per core
(thread shift is 0)
bootconsole [udbg0] enabled
setup_arch: bootmem
Keymile kmp204x board from Freescale Semiconductor
arch: exit
Top of RAM: 0x3fe7f000, Total RAM: 0x3fe7f000
Memory hole size: 0MB
Zone ranges:
DMA [mem 0x00000000-0x1fffffff]
Normal empty
HighMem [mem 0x20000000-0x3fe7efff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x00000000-0x3fe7efff]
On node 0 totalpages: 261759
free_area_init_node: node 0, pgdat c07f1ec0, node_mem_map c08bf000
DMA zone: 1024 pages used for memmap
DMA zone: 0 pages reserved
DMA zone: 131072 pages, LIFO batch:31
HighMem zone: 1021 pages used for memmap
HighMem zone: 130687 pages, LIFO batch:31
MMU: Allocated 1088 bytes of context maps for 255 contexts
PERCPU: Embedded 11 pages/cpu @c10c5000 s22400 r8192 d14464 u45056
pcpu-alloc: s22400 r8192 d14464 u45056 alloc=11*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 260735
Kernel command line: root=/dev/nfs rw nfsroot=192.168.12.201:/opt/eldk/ppc_82xx debug ip=192.168.12.16:192.168.12.201:::kmcoge4:eth0:off: console=ttyS0,115200 mem=0x3fe7f000 init=/sbin/init-overlay.sh eccmode=bch phram.phram=phvar,0x3feff000,0x100000 ubi.mtd=ubi0,2048
forcing BCH ECC algorithm to: bch!
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Sorting __ex_table...
High memory: 522744k
Memory: 909796k/1047036k available (7912k kernel code, 137240k reserved, 300k data, 732k bss, 324k init)
Kernel virtual memory layout:
* 0xfff5f000..0xfffff000 : fixmap
* 0xffc00000..0xffe00000 : highmem PTEs
* 0xffbfb000..0xffc00000 : early ioremap
* 0xe1000000..0xffbfb000 : vmalloc & ioremap
Hierarchical RCU implementation.
RCU debugfs-based tracing is enabled.
RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC " version 1.2 at ffe040000, max 4 CPUs
mpic: ISU size: 512, shift: 9, mask: 1ff
mpic: Initializing for 512 sources
time_init: decrementer frequency = 20.833333 MHz
time_init: processor frequency = 1333.333320 MHz
clocksource: timebase mult[3000000d] shift[24] registered
clockevent: decrementer mult[5555554] shift[32] cpu[0]
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys net_cls
mpic: requesting IPIs...
e500 family performance monitor hardware support registered
Brought up 4 CPUs
devtmpfs: initialized
NET: Registered protocol family 16
Found FSL PCI host bridge at 0x0000000ffe200000. Firmware bus number: 0->6
PCI host bridge /pcie@ffe200000 (primary) ranges:
MEM 0x0000000c00000000..0x0000000c1fffffff -> 0x00000000e0000000
IO 0x0000000ff8000000..0x0000000ff800ffff -> 0x0000000000000000
/pcie@ffe200000: PCICSRBAR @ 0xdf000000
EDAC PCI0: Giving out device to module 'MPC85xx_edac' controller 'mpc85xx_pci_err': DEV 'ffe200000.pcie' (INTERRUPT)
MPC85xx_edac acquired irq 482 for PCI Err
MPC85xx_edac PCI err registered
Found FSL PCI host bridge at 0x0000000ffe202000. Firmware bus number: 0->1
PCI host bridge /pcie@ffe202000 ranges:
MEM 0x0000000c20000000..0x0000000c3fffffff -> 0x00000000e0000000
IO 0x0000000ff8010000..0x0000000ff801ffff -> 0x0000000000000000
/pcie@ffe202000: PCICSRBAR @ 0xdf000000
EDAC PCI1: Giving out device to module 'MPC85xx_edac' controller 'mpc85xx_pci_err': DEV 'ffe202000.pcie' (INTERRUPT)
MPC85xx_edac acquired irq 480 for PCI Err
MPC85xx_edac PCI err registered
PCI: Probing PCI hardware
PCI: Scanning PHB /pcie@ffe200000
PCI: PHB IO resource = 00000000-0000ffff [100] off 0x00000000
PCI: PHB MEM resource 0 = c00000000-c1fffffff [200] off 0xb20000000
fsl-pci ffe200000.pcie: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0xc00000000-0xc1fffffff] (bus address [0xe0000000-0xffffffff])
pci_bus 0000:00: root bus resource [bus 00-ff]
probe mode: 0
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to ff
pci_bus 0000:00: scanning bus
pci 0000:00:00.0: [1957:0412] type 01 class 0x0b2000
pci 0000:00:00.0: reg 10: [mem 0xdf000000-0xdfffffff]
PCI:0000:00:00.0 Resource 0 00000000df000000-00000000dfffffff [40200]
pci 0000:00:00.0: supports D1 D2
pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot D3cold
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
pci_bus 0000:00: fixups for bus
PCI: Fixup bus devices 0 (PHB)
PCI: Try to map irq for 0000:00:00.0...
Got one, spec 4 cells (0x00000010 0x00000002...) on /soc@ffe000000/pic@40000
Mapped to linux irq 482
pci 0000:00:00.0: scanning [bus 01-06] behind bridge, pass 0
pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
pci_bus 0000:01: scanning bus
pci 0000:01:00.0: [10b5:8505] type 01 class 0x060400
pci 0000:01:00.0: reg 10: [mem 0xc00000000-0xc0001ffff]
PCI:0000:01:00.0 Resource 0 0000000c00000000-0000000c0001ffff [40200]
pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
pci_bus 0000:01: fixups for bus
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
pci 0000:00:00.0: bridge window [mem 0xc00000000-0xc1fffffff]
PCI:0000:00:00.0 Bus rsrc 1 0000000c00000000-0000000c1fffffff [200]
PCI: Fixup bus devices 1 (0000:00:00.0)
PCI: Try to map irq for 0000:01:00.0...
Got one, spec 4 cells (0x00000028 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 40
pci 0000:01:00.0: scanning [bus 02-06] behind bridge, pass 0
pci 0000:01:00.0: scanning [bus 00-00] behind bridge, pass 1
pci_bus 0000:02: scanning bus
pci 0000:02:01.0: [10b5:8505] type 01 class 0x060400
pci 0000:02:01.0: PME# supported from D0 D3hot D3cold
pci 0000:02:02.0: [10b5:8505] type 01 class 0x060400
pci 0000:02:02.0: PME# supported from D0 D3hot D3cold
pci 0000:02:03.0: [10b5:8505] type 01 class 0x060400
pci 0000:02:03.0: PME# supported from D0 D3hot D3cold
pci 0000:02:04.0: [10b5:8505] type 01 class 0x060400
pci 0000:02:04.0: PME# supported from D0 D3hot D3cold
pci_bus 0000:02: fixups for bus
pci 0000:01:00.0: PCI bridge to [bus 02-ff]
pci 0000:01:00.0: bridge window [mem 0xc00100000-0xc1fffffff]
PCI:0000:01:00.0 Bus rsrc 1 0000000c00100000-0000000c1fffffff [200]
PCI: Fixup bus devices 2 (0000:01:00.0)
PCI: Try to map irq for 0000:02:01.0...
Got one, spec 4 cells (0x00000001 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 20
PCI: Try to map irq for 0000:02:02.0...
Got one, spec 4 cells (0x00000002 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 21
PCI: Try to map irq for 0000:02:03.0...
Got one, spec 4 cells (0x00000003 0x00000002...) on /soc@ffe000000/pic@40000
Mapped to linux irq 22
PCI: Try to map irq for 0000:02:04.0...
Got one, spec 4 cells (0x00000028 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 40
pci 0000:02:01.0: scanning [bus 03-03] behind bridge, pass 0
pci 0000:02:02.0: scanning [bus 04-04] behind bridge, pass 0
pci 0000:02:03.0: scanning [bus 05-05] behind bridge, pass 0
pci 0000:02:04.0: scanning [bus 06-06] behind bridge, pass 0
pci 0000:02:01.0: scanning [bus 00-00] behind bridge, pass 1
pci_bus 0000:03: scanning bus
pci 0000:03:00.0: [11ab:8000] type 00 class 0x020000
pci 0000:03:00.0: reg 10: [mem 0xc00100000-0xc001fffff 64bit pref]
pci 0000:03:00.0: reg 18: [mem 0xc04000000-0xc07ffffff 64bit pref]
PCI:0000:03:00.0 Resource 0 0000000c00100000-0000000c001fffff [14220c]
PCI:0000:03:00.0 Resource 2 0000000c04000000-0000000c07ffffff [14220c]
pci 0000:03:00.0: supports D1 D2
pci_bus 0000:03: fixups for bus
pci 0000:02:01.0: PCI bridge to [bus 03-ff]
pci 0000:02:01.0: bridge window [mem 0xc00100000-0xc07ffffff]
PCI:0000:02:01.0 Bus rsrc 1 0000000c00100000-0000000c07ffffff [200]
PCI: Fixup bus devices 3 (0000:02:01.0)
PCI: Try to map irq for 0000:03:00.0...
Got one, spec 4 cells (0x00000001 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 20
pci_bus 0000:03: bus scan returning with max=03
pci_bus 0000:03: busn_res: [bus 03-ff] end is updated to 03
pci 0000:02:02.0: scanning [bus 00-00] behind bridge, pass 1
pci_bus 0000:04: scanning bus
pci 0000:04:00.0: [11ab:8000] type 00 class 0x020000
pci 0000:04:00.0: reg 10: [mem 0xc08000000-0xc080fffff 64bit pref]
pci 0000:04:00.0: reg 18: [mem 0xc0c000000-0xc0fffffff 64bit pref]
PCI:0000:04:00.0 Resource 0 0000000c08000000-0000000c080fffff [14220c]
PCI:0000:04:00.0 Resource 2 0000000c0c000000-0000000c0fffffff [14220c]
pci 0000:04:00.0: supports D1 D2
pci_bus 0000:04: fixups for bus
pci 0000:02:02.0: PCI bridge to [bus 04-ff]
pci 0000:02:02.0: bridge window [mem 0xc08000000-0xc0fffffff]
PCI:0000:02:02.0 Bus rsrc 1 0000000c08000000-0000000c0fffffff [200]
PCI: Fixup bus devices 4 (0000:02:02.0)
PCI: Try to map irq for 0000:04:00.0...
Got one, spec 4 cells (0x00000002 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 21
pci_bus 0000:04: bus scan returning with max=04
pci_bus 0000:04: busn_res: [bus 04-ff] end is updated to 04
pci 0000:02:03.0: scanning [bus 00-00] behind bridge, pass 1
pci_bus 0000:05: scanning bus
pci 0000:05:00.0: [11ab:8000] type 00 class 0x020000
pci 0000:05:00.0: reg 10: [mem 0xc10000000-0xc100fffff 64bit pref]
pci 0000:05:00.0: reg 18: [mem 0xc14000000-0xc17ffffff 64bit pref]
PCI:0000:05:00.0 Resource 0 0000000c10000000-0000000c100fffff [14220c]
PCI:0000:05:00.0 Resource 2 0000000c14000000-0000000c17ffffff [14220c]
pci 0000:05:00.0: supports D1 D2
pci_bus 0000:05: fixups for bus
pci 0000:02:03.0: PCI bridge to [bus 05-ff]
pci 0000:02:03.0: bridge window [mem 0xc10000000-0xc17ffffff]
PCI:0000:02:03.0 Bus rsrc 1 0000000c10000000-0000000c17ffffff [200]
PCI: Fixup bus devices 5 (0000:02:03.0)
PCI: Try to map irq for 0000:05:00.0...
Got one, spec 4 cells (0x00000003 0x00000002...) on /soc@ffe000000/pic@40000
Mapped to linux irq 22
pci_bus 0000:05: bus scan returning with max=05
pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 05
pci 0000:02:04.0: scanning [bus 00-00] behind bridge, pass 1
pci_bus 0000:06: scanning bus
pci 0000:06:00.0: [11ab:8000] type 00 class 0x020000
pci 0000:06:00.0: reg 10: [mem 0xc18000000-0xc180fffff 64bit pref]
pci 0000:06:00.0: reg 18: [mem 0xc1c000000-0xc1fffffff 64bit pref]
PCI:0000:06:00.0 Resource 0 0000000c18000000-0000000c180fffff [14220c]
PCI:0000:06:00.0 Resource 2 0000000c1c000000-0000000c1fffffff [14220c]
pci 0000:06:00.0: supports D1 D2
pci_bus 0000:06: fixups for bus
pci 0000:02:04.0: PCI bridge to [bus 06-ff]
pci 0000:02:04.0: bridge window [mem 0xc18000000-0xc1fffffff]
PCI:0000:02:04.0 Bus rsrc 1 0000000c18000000-0000000c1fffffff [200]
PCI: Fixup bus devices 6 (0000:02:04.0)
PCI: Try to map irq for 0000:06:00.0...
Got one, spec 4 cells (0x00000028 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 40
pci_bus 0000:06: bus scan returning with max=06
pci_bus 0000:06: busn_res: [bus 06-ff] end is updated to 06
pci_bus 0000:02: bus scan returning with max=06
pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 06
pci_bus 0000:01: bus scan returning with max=06
pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 06
pci_bus 0000:00: bus scan returning with max=06
pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 06
PCI: Scanning PHB /pcie@ffe202000
PCI: PHB IO resource = 00020000-0002ffff [100] off 0x00020000
PCI: PHB MEM resource 0 = c20000000-c3fffffff [200] off 0xb40000000
fsl-pci ffe202000.pcie: PCI host bridge to bus 0001:07
pci_bus 0001:07: root bus resource [io 0x20000-0x2ffff] (bus address [0x0000-0xffff])
pci_bus 0001:07: root bus resource [mem 0xc20000000-0xc3fffffff] (bus address [0xe0000000-0xffffffff])
pci_bus 0001:07: root bus resource [bus 07-ff]
probe mode: 0
pci_bus 0001:07: busn_res: [bus 07-ff] end is updated to ff
pci_bus 0001:07: scanning bus
pci 0001:07:00.0: [1957:0412] type 01 class 0x0b2000
pci 0001:07:00.0: reg 10: [mem 0xdf000000-0xdfffffff]
PCI:0001:07:00.0 Resource 0 00000000df000000-00000000dfffffff [40200]
pci 0001:07:00.0: supports D1 D2
pci 0001:07:00.0: PME# supported from D0 D1 D2 D3hot D3cold
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
PCIE error(s) detected
PCIE ERR_DR register: 0x00020000
PCIE ERR_CAP_STAT register: 0x80000001
PCIE ERR_CAP_R0 register: 0x00000800
PCIE ERR_CAP_R1 register: 0x00000000
PCIE ERR_CAP_R2 register: 0x00000000
PCIE ERR_CAP_R3 register: 0x00000000
pci_bus 0001:07: fixups for bus
PCI: Fixup bus devices 7 (PHB)
PCI: Try to map irq for 0001:07:00.0...
Got one, spec 4 cells (0x00000010 0x00000002...) on /soc@ffe000000/pic@40000
Mapped to linux irq 480
pci 0001:07:00.0: scanning [bus 01-01] behind bridge, pass 0
pci 0001:07:00.0: Primary bus is hard wired to 0
pci 0001:07:00.0: bridge configuration invalid ([bus 01-01]), reconfiguring
pci 0001:07:00.0: scanning [bus 00-00] behind bridge, pass 1
pci_bus 0001:08: scanning bus
pci 0001:08:00.0: [10ee:000a] type 00 class 0x050000
pci 0001:08:00.0: reg 10: [mem 0xc20000000-0xc201fffff]
pci 0001:08:00.0: reg 14: [mem 0xc20200000-0xc203fffff]
PCI:0001:08:00.0 Resource 0 0000000c20000000-0000000c201fffff [40200]
PCI:0001:08:00.0 Resource 1 0000000c20200000-0000000c203fffff [40200]
pci 0001:08:00.0: supports D1 D2
pci 0001:08:00.0: PME# supported from D0 D1 D2 D3hot
pci_bus 0001:08: fixups for bus
pci 0001:07:00.0: PCI bridge to [bus 08-ff]
pci 0001:07:00.0: bridge window [mem 0xc20000000-0xc203fffff]
PCI:0001:07:00.0 Bus rsrc 1 0000000c20000000-0000000c203fffff [200]
PCI: Fixup bus devices 8 (0001:07:00.0)
PCI: Try to map irq for 0001:08:00.0...
Got one, spec 4 cells (0x0000002a 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 42
pci_bus 0001:08: bus scan returning with max=08
pci_bus 0001:08: busn_res: [bus 08-ff] end is updated to 08
pci_bus 0001:07: bus scan returning with max=08
pci_bus 0001:07: busn_res: [bus 07-ff] end is updated to 08
PCI: Allocating bus resources for 0000:00...
PCI: PHB (bus 0) bridge rsrc 4: 0000000000000000-000000000000ffff [0x100], parent c07bfa20 (PCI IO)
PCI: PHB (bus 0) bridge rsrc 5: 0000000c00000000-0000000c1fffffff [0x200], parent c07bf9f8 (PCI mem)
PCI: Allocating bus resources for 0000:01...
PCI: 0000:00:00.0 (bus 1) bridge rsrc 0: 0000000000000000-000000000000ffff [0x100], parent db14ae88 (/pcie@ffe200000)
PCI: 0000:00:00.0 (bus 1) bridge rsrc 1: 0000000c00000000-0000000c1fffffff [0x200], parent db14aeb0 (/pcie@ffe200000)
PCI: Allocating bus resources for 0000:02...
PCI: 0000:01:00.0 (bus 2) bridge rsrc 1: 0000000c00100000-0000000c1fffffff [0x200], parent db0ea698 (PCI Bus 0000:01)
PCI: Allocating bus resources for 0000:03...
PCI: 0000:02:01.0 (bus 3) bridge rsrc 1: 0000000c00100000-0000000c07ffffff [0x200], parent db0ea298 (PCI Bus 0000:02)
PCI: Allocating bus resources for 0000:04...
PCI: 0000:02:02.0 (bus 4) bridge rsrc 1: 0000000c08000000-0000000c0fffffff [0x200], parent db0ea298 (PCI Bus 0000:02)
PCI: Allocating bus resources for 0000:05...
PCI: 0000:02:03.0 (bus 5) bridge rsrc 1: 0000000c10000000-0000000c17ffffff [0x200], parent db0ea298 (PCI Bus 0000:02)
PCI: Allocating bus resources for 0000:06...
PCI: 0000:02:04.0 (bus 6) bridge rsrc 1: 0000000c18000000-0000000c1fffffff [0x200], parent db0ea298 (PCI Bus 0000:02)
PCI: Allocating bus resources for 0001:07...
PCI: PHB (bus 7) bridge rsrc 4: 0000000000020000-000000000002ffff [0x100], parent c07bfa20 (PCI IO)
PCI: PHB (bus 7) bridge rsrc 5: 0000000c20000000-0000000c3fffffff [0x200], parent c07bf9f8 (PCI mem)
PCI: Allocating bus resources for 0001:08...
PCI: 0001:07:00.0 (bus 8) bridge rsrc 0: 0000000000020000-000000000002ffff [0x100], parent db14a888 (/pcie@ffe202000)
PCI: 0001:07:00.0 (bus 8) bridge rsrc 1: 0000000c20000000-0000000c3fffffff [0x200], parent db14a8b0 (/pcie@ffe202000)
PCI: Allocating 0000:00:00.0: Resource 0: 00000000df000000..00000000dfffffff [40200]
PCI: Cannot allocate resource region 0 of device 0000:00:00.0, will remap
PCI: Allocating 0000:01:00.0: Resource 0: 0000000c00000000..0000000c0001ffff [40200]
PCI: Allocating 0000:03:00.0: Resource 0: 0000000c00100000..0000000c001fffff [14220c]
PCI: Allocating 0000:03:00.0: Resource 2: 0000000c04000000..0000000c07ffffff [14220c]
PCI: Allocating 0000:04:00.0: Resource 0: 0000000c08000000..0000000c080fffff [14220c]
PCI: Allocating 0000:04:00.0: Resource 2: 0000000c0c000000..0000000c0fffffff [14220c]
PCI: Allocating 0000:05:00.0: Resource 0: 0000000c10000000..0000000c100fffff [14220c]
PCI: Allocating 0000:05:00.0: Resource 2: 0000000c14000000..0000000c17ffffff [14220c]
PCI: Allocating 0000:06:00.0: Resource 0: 0000000c18000000..0000000c180fffff [14220c]
PCI: Allocating 0000:06:00.0: Resource 2: 0000000c1c000000..0000000c1fffffff [14220c]
PCI: Allocating 0001:07:00.0: Resource 0: 00000000df000000..00000000dfffffff [40200]
PCI: Cannot allocate resource region 0 of device 0001:07:00.0, will remap
PCI: Allocating 0001:08:00.0: Resource 0: 0000000c20000000..0000000c201fffff [40200]
PCI: Allocating 0001:08:00.0: Resource 1: 0000000c20200000..0000000c203fffff [40200]
Reserving legacy ranges for domain 0000
Candidate legacy IO: [io 0x0000-0x0fff]
PCI 0000:00 Cannot reserve Legacy IO [io 0x0000-0x0fff]
hose mem res: [mem 0xc00000000-0xc1fffffff]
Reserving legacy ranges for domain 0001
Candidate legacy IO: [io 0x20000-0x20fff]
PCI 0001:07 Cannot reserve Legacy IO [io 0x20000-0x20fff]
hose mem res: [mem 0xc20000000-0xc3fffffff]
PCI: Assigning unassigned resources...
pci 0000:02:01.0: bridge window [io 0x1000-0x0fff] to [bus 03] add_size 1000
pci 0000:02:01.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 03] add_size 200000
pci 0000:02:02.0: bridge window [io 0x1000-0x0fff] to [bus 04] add_size 1000
pci 0000:02:02.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 04] add_size 200000
pci 0000:02:03.0: bridge window [io 0x1000-0x0fff] to [bus 05] add_size 1000
pci 0000:02:03.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 05] add_size 200000
pci 0000:02:01.0: res[7]=[io 0x1000-0x0fff] get_res_add_size add_size 1000
pci 0000:02:02.0: res[7]=[io 0x1000-0x0fff] get_res_add_size add_size 1000
pci 0000:02:03.0: res[7]=[io 0x1000-0x0fff] get_res_add_size add_size 1000
pci 0000:01:00.0: bridge window [io 0x1000-0x0fff] to [bus 02-06] add_size 3000
pci 0000:02:01.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:02:02.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:02:03.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:01:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 02-06] add_size 600000
pci 0000:01:00.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 600000
pci 0000:00:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 01-06] add_size 600000
pci 0000:00:00.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 600000
pci 0000:00:00.0: BAR 0: can't assign mem (size 0x1000000)
pci 0000:00:00.0: BAR 9: can't assign mem pref (size 0x600000)
pci 0000:00:00.0: BAR 0: can't assign mem (size 0x1000000)
pci 0000:00:00.0: BAR 9: can't assign mem pref (size 0x600000)
pci 0000:01:00.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 600000
pci 0000:01:00.0: res[7]=[io 0x1000-0x0fff] get_res_add_size add_size 3000
pci 0000:01:00.0: BAR 9: can't assign mem pref (size 0x600000)
pci 0000:01:00.0: BAR 7: assigned [io 0x1000-0x3fff]
pci 0000:01:00.0: BAR 9: can't assign mem pref (size 0x600000)
pci 0000:02:01.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:02:02.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:02:03.0: res[9]=[mem 0x00100000-0x000fffff 64bit pref] get_res_add_size add_size 200000
pci 0000:02:01.0: res[7]=[io 0x1000-0x0fff] get_res_add_size add_size 1000
pci 0000:02:02.0: res[7]=[io 0x1000-0x0fff] get_res_add_size add_size 1000
pci 0000:02:03.0: res[7]=[io 0x1000-0x0fff] get_res_add_size add_size 1000
pci 0000:02:01.0: BAR 9: can't assign mem pref (size 0x200000)
pci 0000:02:02.0: BAR 9: can't assign mem pref (size 0x200000)
pci 0000:02:03.0: BAR 9: can't assign mem pref (size 0x200000)
pci 0000:02:01.0: BAR 7: assigned [io 0x1000-0x1fff]
pci 0000:02:02.0: BAR 7: assigned [io 0x2000-0x2fff]
pci 0000:02:03.0: BAR 7: assigned [io 0x3000-0x3fff]
pci 0000:02:03.0: BAR 9: can't assign mem pref (size 0x200000)
pci 0000:02:02.0: BAR 9: can't assign mem pref (size 0x200000)
pci 0000:02:01.0: BAR 9: can't assign mem pref (size 0x200000)
pci 0000:02:01.0: PCI bridge to [bus 03]
pci 0000:02:01.0: bridge window [io 0x1000-0x1fff]
pci 0000:02:01.0: bridge window [mem 0xc00100000-0xc07ffffff]
pci 0000:02:02.0: PCI bridge to [bus 04]
pci 0000:02:02.0: bridge window [io 0x2000-0x2fff]
pci 0000:02:02.0: bridge window [mem 0xc08000000-0xc0fffffff]
pci 0000:02:03.0: PCI bridge to [bus 05]
pci 0000:02:03.0: bridge window [io 0x3000-0x3fff]
pci 0000:02:03.0: bridge window [mem 0xc10000000-0xc17ffffff]
pci 0000:02:04.0: PCI bridge to [bus 06]
pci 0000:02:04.0: bridge window [mem 0xc18000000-0xc1fffffff]
pci 0000:01:00.0: PCI bridge to [bus 02-06]
pci 0000:01:00.0: bridge window [io 0x1000-0x3fff]
pci 0000:01:00.0: bridge window [mem 0xc00100000-0xc1fffffff]
pci 0000:00:00.0: PCI bridge to [bus 01-06]
pci 0000:00:00.0: bridge window [io 0x0000-0xffff]
pci 0000:00:00.0: bridge window [mem 0xc00000000-0xc1fffffff]
pci 0001:07:00.0: BAR 0: can't assign mem (size 0x1000000)
pci 0001:07:00.0: PCI bridge to [bus 08]
pci 0001:07:00.0: bridge window [io 0x20000-0x2ffff]
pci 0001:07:00.0: bridge window [mem 0xc20000000-0xc3fffffff]
Some PCI device resources are unassigned, try booting with pci=realloc
PCI: Try to map irq for 0000:00:00.0...
Got one, spec 4 cells (0x00000010 0x00000002...) on /soc@ffe000000/pic@40000
Mapped to linux irq 482
PCI: Try to map irq for 0000:01:00.0...
Got one, spec 4 cells (0x00000028 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 40
PCI: Try to map irq for 0000:02:01.0...
Got one, spec 4 cells (0x00000001 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 20
PCI: Try to map irq for 0000:02:02.0...
Got one, spec 4 cells (0x00000002 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 21
PCI: Try to map irq for 0000:02:03.0...
Got one, spec 4 cells (0x00000003 0x00000002...) on /soc@ffe000000/pic@40000
Mapped to linux irq 22
PCI: Try to map irq for 0000:02:04.0...
Got one, spec 4 cells (0x00000028 0x00000001...) on /soc@ffe000000/pic@40000
Mapped to linux irq 40
PCI: Try to map irq for 0001:07:00.0...
Got one, spec 4 cells (0x00000010 0x00000002...) on /soc@ffe000000/pic@40000
Mapped to linux irq 480
pci_bus 0000:00: resource 4 [io 0x0000-0xffff]
pci_bus 0000:00: resource 5 [mem 0xc00000000-0xc1fffffff]
pci_bus 0000:01: resource 0 [io 0x0000-0xffff]
pci_bus 0000:01: resource 1 [mem 0xc00000000-0xc1fffffff]
pci_bus 0000:02: resource 0 [io 0x1000-0x3fff]
pci_bus 0000:02: resource 1 [mem 0xc00100000-0xc1fffffff]
pci_bus 0000:03: resource 0 [io 0x1000-0x1fff]
pci_bus 0000:03: resource 1 [mem 0xc00100000-0xc07ffffff]
pci_bus 0000:04: resource 0 [io 0x2000-0x2fff]
pci_bus 0000:04: resource 1 [mem 0xc08000000-0xc0fffffff]
pci_bus 0000:05: resource 0 [io 0x3000-0x3fff]
pci_bus 0000:05: resource 1 [mem 0xc10000000-0xc17ffffff]
pci_bus 0000:06: resource 1 [mem 0xc18000000-0xc1fffffff]
pci_bus 0001:07: resource 4 [io 0x20000-0x2ffff]
pci_bus 0001:07: resource 5 [mem 0xc20000000-0xc3fffffff]
pci_bus 0001:08: resource 0 [io 0x20000-0x2ffff]
pci_bus 0001:08: resource 1 [mem 0xc20000000-0xc3fffffff]
Setting up Freescale MSI support
Setting up Freescale MSI support
Setting up Freescale MSI support
bio: create slab <bio-0> at 0
vgaarb: loaded
SCSI subsystem initialized
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Bman err interrupt handler present
Bman portal initialised, cpu 0
Bman portal initialised, cpu 1
Bman portal initialised, cpu 2
Bman portal initialised, cpu 3
Bman portals initialised
Bman: BPID allocator includes range 32:32
Qman err interrupt handler present
Qman portal initialised, cpu 0
Qman portal initialised, cpu 1
Qman portal initialised, cpu 2
Qman portal initialised, cpu 3
Qman portals initialised
Qman: FQID allocator includes range 256:256
Qman: FQID allocator includes range 32768:32768
Qman: CGRID allocator includes range 0:256
Qman: pool channel allocator includes range 33:15
Switching to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 32 bytes, default 64
audit: initializing netlink socket (disabled)
type=2000 audit(2.215:1): initialized
bounce pool size: 64 pages
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
squashfs: version 4.0 (2009/01/31) Phillip Lougher
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
NTFS driver 2.1.30 [Flags: R/O].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
aufs 3.10
msgmni has been set to 884
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0xffe11c500 (irq = 36) is a 16550A
console [ttyS0] enabled, bootconsole disabled
console [ttyS0] enabled, bootconsole disabled
serial8250.0: ttyS1 at MMIO 0xffe11c600 (irq = 36) is a 16550A
serial8250.0: ttyS2 at MMIO 0xffe11d500 (irq = 37) is a 16550A
serial8250.0: ttyS3 at MMIO 0xffe11d600 (irq = 37) is a 16550A
ePAPR hypervisor byte channel driver
Generic non-volatile memory driver v1.1
brd: module loaded
loop: module loaded
st: Version 20101219, fixed bufsize 32768, s/g segs 256
phram_setup name=phvar, addr=3feff000, len=1024k
phram: phvar device: 0x100000 at 0x3feff000
ONFI param page 0 valid
ONFI flash detected
NAND device: Manufacturer ID: 0x2c, Chip ID: 0xda (Micron MT29F2G08ABAEAWP), 256MiB, page size: 2048, OOB size: 64
forcing BCH ECC algorithm to 5!
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
1 ofpart partitions found on MTD device ffa00000.flash
Creating 1 MTD partitions on "ffa00000.flash":
0x000000000000-0x000010000000 : "ubi0"
eLBC NAND device at 0xfffa00000, bank 0
fsl_espi ffe110000.spi: master is unqueued, this is deprecated
m25p80 spi32766.0: s25fl256s1 (32768 Kbytes)
4 ofpart partitions found on MTD device spi32766.0
Creating 4 MTD partitions on "spi32766.0":
0x000000000000-0x000000100000 : "u-boot"
0x000000100000-0x000000110000 : "env"
0x000000110000-0x000000120000 : "envred"
0x000000120000-0x000000130000 : "fman-ucode"
m25p80 spi32766.2: m25p32 (4096 Kbytes)
1 ofpart partitions found on MTD device spi32766.2
Creating 1 MTD partitions on "spi32766.2":
0x000000000000-0x000000400000 : "fpga-config"
fsl_espi ffe110000.spi: at 0xe1106000 (irq = 53)
libphy: Fixed MDIO Bus: probed
fsl-pq_mdio ffe4e1120.mdio: deferring probe since network devices not present yet
platform ffe4e1120.mdio: Driver fsl-pq_mdio requests probe deferral
libphy: Freescale XGMAC MDIO Bus: probed
FMAN(0) Fifo size settings:
- Total buffers available(512 - 256B/buffer)
- Total throughput(3Gbps)
- Max frame size(1522B)
- 1G ports TX 3(12 bufs set (min: 12))
- 1G ports RX 3(142 bufs set (min: 14))
- OH-HC ports 4(8)
- Shared extra buffers(16)
FMAN(0) open dma settings:
- Total open dma available(32)
- 1G ports TX 3(4)
- 1G ports RX 3(4)
- OH-HC ports 4(1)
- Shared extra open dma(4)
FMAN(0) Tnums settings:
- Total Tnums available(128)
- 1G ports TX 3(19)
- 1G ports RX 3(20)
- OH-HC ports 4(2)
- Shared extra tnums(3)
Freescale FM module (Mar 18 2014:15:06:49), FMD API version 21.1.0
Freescale FM Ports module (Mar 18 2014:15:06:50)
dpaa_debugfs: FSL DPAA Ethernet debugfs entries ()
fsl_mac: mac.c:417:mac_load() fsl_mac: FSL FMan MAC API based driver ()
fsl_mac ffe4e0000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac ffe4e0000.ethernet: FMan MAC address: 00:11:22:33:44:55
fsl_mac ffe4e2000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac ffe4e2000.ethernet: FMan MAC address: 00:11:22:33:44:55
fsl_mac ffe4e8000.ethernet: FMan dTSEC version: 0x08240101
fsl_mac ffe4e8000.ethernet: FMan MAC address: 00:e0:df:a3:45:a1
fsl_dpa: dpaa_eth.c:4320:dpa_load() fsl_dpa: FSL DPAA Ethernet driver ()
fsl_dpa ethernet.16: Using private BM buffer pools
fsl_dpa: dpaa_eth.c:3715:dpa_rx_fq_init() Using dynamic RX QM frame queues
fsl_dpa: dpaa_eth.c:3739:dpa_tx_fq_init() Using dynamic TX QM frame queues
fsl_dpa ethernet.17: Using private BM buffer pools
fsl_dpa: dpaa_eth.c:3715:dpa_rx_fq_init() Using dynamic RX QM frame queues
fsl_dpa: dpaa_eth.c:3739:dpa_tx_fq_init() Using dynamic TX QM frame queues
fsl_dpa ethernet.18: Using private BM buffer pools
fsl_dpa: dpaa_eth.c:3715:dpa_rx_fq_init() Using dynamic RX QM frame queues
fsl_dpa: dpaa_eth.c:3739:dpa_tx_fq_init() Using dynamic TX QM frame queues
fsl_oh: offline_port.c:439:oh_port_load() fsl_oh: FSL FMan Offline Parsing port driver ()
i2c /dev entries driver
mpc-i2c ffe118000.i2c: timeout 1000000 us
mpc-i2c ffe118000.i2c: SCL GPIO pin not yet available, deferring probing
mpc-i2c ffe118000.i2c: failed to request GPIOs
platform ffe118000.i2c: Driver mpc-i2c requests probe deferral
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
mpc85xx_mc_err_probe: No ECC DIMMs discovered
caam ffe300000.crypto: device ID = 0x0a12010000000000 (Era 3)
caam ffe300000.crypto: job rings = 4, qi = 1
caam ffe300000.crypto: fsl,sec-v4.2 algorithms registered in /proc/crypto
platform ffe301000.jr: registering rng-caam
qriox ffb000000.bec: GPIO ctlr registered
qriox ffb000000.bec: GPIO export registered
qriox ffb000000.bec: IRQ ctlr registered
qriox ffb000000.bec: QRIO1 Rev. 0x13 registered @ 0xffb000000..0xffb00007f, BUF_ENA=ON
qriox ffb000000.bec: Populate qriox child nodes...
bc_get_addr: bc_get_addr no node, trying compatible node
created "/proc/driver/bootcount"
bootcount driver registered.
bfticu: attaching bftic4, private db461940
bfticu: physical resources [mem 0xfe0000000-0xfe00000ff]
bfticu fe0000000.bftic4: Chip id correct 0x65
bfticu fe0000000.bftic4: Set up succesfully 48 bfticu_irqs
bfticu:init
km_event_probe: probing events for qrio_events.12
km_event_handler: setup OK.
km_event_probe: probing events for fe0000000.bftic4_events
km_event_handler: setup OK.
u32 classifier
Performance counters on
ipip: IPv4 over IPv4 tunneling driver
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
tipc: Activated (version 2.0.0)
NET: Registered protocol family 30
tipc: Started in single node mode
Key type dns_resolver registered
libphy: Freescale PowerQUICC MII Bus: probed
mpc-i2c ffe118000.i2c: timeout 1000000 us
mpc-i2c ffe118000.i2c: requested GPIO 180 for SCL
mpc-i2c ffe118000.i2c: requested GPIO 181 for SDA
UBI: attaching mtd1 to ubi0
UBI: scanning is finished
UBI: attached mtd1 (name "ubi0", size 256 MiB) to ubi0
UBI: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
UBI: VID header offset: 2048 (aligned 2048), data offset: 4096
UBI: good PEBs: 2044, bad PEBs: 4, corrupted PEBs: 0
UBI: user volume: 11, internal volumes: 1, max. volumes count: 128
UBI: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 0
UBI: available PEBs: 1017, total reserved PEBs: 1027, PEBs reserved for bad PEB handling: 36
UBI: background thread "ubi_bgt0d" started, PID 110
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
IP-Config: Guessing netmask 255.255.255.0
IP-Config: Complete:
device=eth0, hwaddr=00:e0:df:a3:45:a1, ipaddr=192.168.12.16, mask=255.255.255.0, gw=255.255.255.255
host=kmcoge4, domain=, nis-domain=(none)
bootserver=192.168.12.201, rootserver=192.168.12.201, rootpath=
VFS: Mounted root (nfs filesystem) on device 0:17.
devtmpfs: mounted
Freeing unused kernel memory: 324K (c0769000 - c07ba000)
6.677 INFO init-overlay done in 0.26
8.300 INFO sysinit done in 1.61
root@kmcoge4:~#
^ permalink raw reply
* Re: [PATCH RFC v9 2/6] dma: mpc512x: add support for peripheral transfers
From: Alexander Popov @ 2014-03-19 13:26 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Lars-Peter Clausen, Arnd Bergmann, Vinod Koul, Gerhard Sittig,
Alexander Popov, dmaengine, Dan Williams, Anatolij Gustschin,
linuxppc-dev
In-Reply-To: <1394790471.28803.247.camel@smile.fi.intel.com>
Hello Andy
2014-03-14 13:47 GMT+04:00 Andy Shevchenko <andriy.shevchenko@linux.intel.com>:
> On Wed, 2014-03-12 at 15:47 +0400, Alexander Popov wrote:
>> + case DMA_SLAVE_CONFIG:
>> + /* Constraints:
>> + * - only transfers between a peripheral device and
>> + * memory are supported;
>> + * - minimal transfer chunk is 4 bytes and consequently
>> + * source and destination addresses must be 4-byte aligned
>> + * and transfer size must be aligned on (4 * maxburst)
>> + * boundary;
>> + * - during the transfer RAM address is being incremented by
>> + * the size of minimal transfer chunk;
>> + * - peripheral port's address is constant during the transfer.
>> + */
>> +
>> + cfg = (void *)arg;
>> +
>> + if (!is_slave_direction(cfg->direction))
>> + return -EINVAL;
>
> As far as I understand the intention you have not to use direction field
> in the dma_slave_config. It will be removed once.
>
>> +
>> + if (cfg->src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES &&
>> + cfg->dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES)
>> + return -EINVAL;
>> +
>> + spin_lock_irqsave(&mchan->lock, flags);
>> +
>> + if (cfg->direction == DMA_DEV_TO_MEM) {
>> + mchan->per_paddr = cfg->src_addr;
>> + mchan->tcd_nunits = cfg->src_maxburst;
>> + } else {
>> + mchan->per_paddr = cfg->dst_addr;
>> + mchan->tcd_nunits = cfg->dst_maxburst;
>> + }
>
> Ditto.
Excuse me, I don't understand this point.
I have to use cfg->direction because in case of DMA_DEV_TO_MEM
I use cfg->SRC_addr and cfg->SRC_maxburst and in case of
DMA_MEM_TO_DEV I use cfg->DST_addr and cfg->DST_maxburst.
Is it correct?
Best regards,
Alexander
^ permalink raw reply
* Re: [PATCH RFC v9 2/6] dma: mpc512x: add support for peripheral transfers
From: Vinod Koul @ 2014-03-19 14:08 UTC (permalink / raw)
To: Alexander Popov
Cc: Lars-Peter Clausen, Arnd Bergmann, Gerhard Sittig,
Andy Shevchenko, dmaengine, Dan Williams, Anatolij Gustschin,
linuxppc-dev
In-Reply-To: <CAF0T0X5egegHc3pheSbPRPuZaVaktMtdUiGPOLhcWZevH=pD=A@mail.gmail.com>
On Wed, Mar 19, 2014 at 05:26:47PM +0400, Alexander Popov wrote:
> Hello Andy
>
> 2014-03-14 13:47 GMT+04:00 Andy Shevchenko <andriy.shevchenko@linux.intel.com>:
> > On Wed, 2014-03-12 at 15:47 +0400, Alexander Popov wrote:
> >> + case DMA_SLAVE_CONFIG:
> >> + /* Constraints:
> >> + * - only transfers between a peripheral device and
> >> + * memory are supported;
> >> + * - minimal transfer chunk is 4 bytes and consequently
> >> + * source and destination addresses must be 4-byte aligned
> >> + * and transfer size must be aligned on (4 * maxburst)
> >> + * boundary;
> >> + * - during the transfer RAM address is being incremented by
> >> + * the size of minimal transfer chunk;
> >> + * - peripheral port's address is constant during the transfer.
> >> + */
> >> +
> >> + cfg = (void *)arg;
> >> +
> >> + if (!is_slave_direction(cfg->direction))
> >> + return -EINVAL;
> >
> > As far as I understand the intention you have not to use direction field
> > in the dma_slave_config. It will be removed once.
> >
> >> +
> >> + if (cfg->src_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES &&
> >> + cfg->dst_addr_width != DMA_SLAVE_BUSWIDTH_4_BYTES)
> >> + return -EINVAL;
> >> +
> >> + spin_lock_irqsave(&mchan->lock, flags);
> >> +
> >> + if (cfg->direction == DMA_DEV_TO_MEM) {
> >> + mchan->per_paddr = cfg->src_addr;
> >> + mchan->tcd_nunits = cfg->src_maxburst;
> >> + } else {
> >> + mchan->per_paddr = cfg->dst_addr;
> >> + mchan->tcd_nunits = cfg->dst_maxburst;
> >> + }
> >
> > Ditto.
>
> Excuse me, I don't understand this point.
> I have to use cfg->direction because in case of DMA_DEV_TO_MEM
> I use cfg->SRC_addr and cfg->SRC_maxburst and in case of
> DMA_MEM_TO_DEV I use cfg->DST_addr and cfg->DST_maxburst.
> Is it correct?
You store the complete config for both source and destination.
Then based on the descriptor direction you can retrive the values from channel
context and program
This way you _dont_ need to fix the direction and can use it both ways!
--
~Vinod
^ permalink raw reply
* Tasks stuck in futex code (in 3.14-rc6)
From: Srikar Dronamraju @ 2014-03-19 15:26 UTC (permalink / raw)
To: davidlohr; +Cc: peterz, torvalds, LKML, paulus, tglx, linuxppc-dev, mingo
Hi,
When running specjbb on a power7 numa box, I am seeing java threads
getting stuck in futex
# ps -Ao pid,tt,user,fname,tmout,f,wchan | grep futex
14808 pts/0 root java - 0 futex_wait_queue_me
14925 pts/0 root java - 0 futex_wait_queue_me
#
stack traces, I see
[ 1843.426591] Call Trace:
[ 1843.426595] [c0000017101d74d0] [0000000000000020] 0x20 (unreliable)
[ 1843.426601] [c0000017101d76a0] [c000000000014c50] .__switch_to+0x1e0/0x390
[ 1843.426607] [c0000017101d7750] [c0000000006ed314] .__schedule+0x364/0x8c0
[ 1843.426613] [c0000017101d79d0] [c000000000139c28] .futex_wait_queue_me+0xf8/0x1a0
[ 1843.426619] [c0000017101d7a60] [c00000000013afbc] .futex_wait+0x17c/0x2a0
[ 1843.426626] [c0000017101d7c10] [c00000000013cee4] .do_futex+0x254/0xd80
[ 1843.426631] [c0000017101d7d60] [c00000000013db2c] .SyS_futex+0x11c/0x1d0
[ 1843.426638] [c0000017101d7e30] [c000000000009efc] syscall_exit+0x0/0x7c
[ 1843.426643] java S 00003fffa08b16a0 0 14812 14203 0x00000080
[ 1843.426650] Call Trace:
[ 1843.426653] [c00000170c6034d0] [c000001710b09cf8] 0xc000001710b09cf8 (unreliable)
[ 1843.426660] [c00000170c6036a0] [c000000000014c50] .__switch_to+0x1e0/0x390
[ 1843.426666] [c00000170c603750] [c0000000006ed314] .__schedule+0x364/0x8c0
[ 1843.426672] [c00000170c6039d0] [c000000000139c28] .futex_wait_queue_me+0xf8/0x1a0
[ 1843.426679] [c00000170c603a60] [c00000000013afbc] .futex_wait+0x17c/0x2a0
[ 1843.453383] [c00000170c603c10] [c00000000013cee4] .do_futex+0x254/0xd80
[ 1843.453389] [c00000170c603d60] [c00000000013db2c] .SyS_futex+0x11c/0x1d0
[ 1843.453395] [c00000170c603e30] [c000000000009efc] syscall_exit+0x0/0x7c
[ 1843.453400] java S 00003fffa08b1a74 0 14813 14203 0x00000080
[ 1843.453407] Call Trace:
There are 332 tasks all stuck in futex_wait_queue_me().
I am able to reproduce this consistently.
Infact I can reproduce this if the java_constraint is either node, socket, system.
However I am not able to reproduce if java_constraint is set to core.
I ran git bisect between v3.12 and v3.14-rc6 and found that
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b0c29f79ecea0b6fbcefc999e70f2843ae8306db
commit b0c29f79ecea0b6fbcefc999e70f2843ae8306db
Author: Davidlohr Bueso <davidlohr@hp.com>
Date: Sun Jan 12 15:31:25 2014 -0800
futexes: Avoid taking the hb->lock if there's nothing to wake up
was the commit thats causing the threads to be stuck in futex.
I reverted b0c29f79ecea0b6fbcefc999e70f2843ae8306db on top of v3.14-rc6 and confirmed that
reverting the commit solved the problem.
--
Thanks and Regards
Srikar Dronamraju
^ permalink raw reply
* Re: [PATCH] fix dmaengine_unmap failure.
From: Dan Williams @ 2014-03-19 15:43 UTC (permalink / raw)
To: Xuelin Shi; +Cc: Vinod Koul, dmaengine@vger.kernel.org, linuxppc-dev
In-Reply-To: <30ef7093dcc247e490831a43355ec10f@BL2PR03MB147.namprd03.prod.outlook.com>
On Tue, Mar 18, 2014 at 11:39 PM, Xuelin Shi <xuelin.shi@freescale.com> wrote:
> Hi Dan,
>
> In async_mult(...) of async_raid6_recov.c, the count 3 is used to request an unmap.
> However the to_cnt and bidi_cnt are both set to 1 and from_cnt to 0.
> Then while trying to do unmap, we are getting the wrong "unmap" from a different mempool.
>
> In this patch, the mempool is associated with the unmap structure instead of computing it again.
> By this way, it is guaranteed that the unmap is the same when we get and put the unmap data.
>
> BTW: the mempool is just used to manage the struct unmap, not the pages.
>
I see, what about just storing the map_cnt at allocation time? It
could be another byte in struct dmaengine_unmap_data rather than an 8
byte pointer.
^ permalink raw reply
* Re: Tasks stuck in futex code (in 3.14-rc6)
From: Peter Zijlstra @ 2014-03-19 15:47 UTC (permalink / raw)
To: Srikar Dronamraju
Cc: linuxppc-dev, LKML, davidlohr, paulus, tglx, torvalds, mingo
In-Reply-To: <20140319152619.GB10406@linux.vnet.ibm.com>
On Wed, Mar 19, 2014 at 08:56:19PM +0530, Srikar Dronamraju wrote:
> There are 332 tasks all stuck in futex_wait_queue_me().
> I am able to reproduce this consistently.
>
> Infact I can reproduce this if the java_constraint is either node, socket, system.
> However I am not able to reproduce if java_constraint is set to core.
What's any of that mean?
> I ran git bisect between v3.12 and v3.14-rc6 and found that
>
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=b0c29f79ecea0b6fbcefc999e70f2843ae8306db
>
> commit b0c29f79ecea0b6fbcefc999e70f2843ae8306db
> Author: Davidlohr Bueso <davidlohr@hp.com>
> Date: Sun Jan 12 15:31:25 2014 -0800
>
> futexes: Avoid taking the hb->lock if there's nothing to wake up
>
> was the commit thats causing the threads to be stuck in futex.
>
> I reverted b0c29f79ecea0b6fbcefc999e70f2843ae8306db on top of v3.14-rc6 and confirmed that
> reverting the commit solved the problem.
Joy,.. let me look at that with ppc in mind.
^ permalink raw reply
* Re: EDAC PCIe errors when scannning the bus
From: Johannes Thumshirn @ 2014-03-19 15:54 UTC (permalink / raw)
To: Valentin Longchamp; +Cc: linux-pci, linuxppc-dev@lists.ozlabs.org
In-Reply-To: <532991AD.6020903@keymile.com>
On Wed, Mar 19, 2014 at 01:46:37PM +0100, Valentin Longchamp wrote:
> Hello,
>
> We have a board that is based on Freescale's P2041 SoC. The boards has 2 PCIe
> buses with this topology:
>
> PCIe 0 <---> PEX8505 switch <---> 4 network devices
> PCIE 2 <---> FPGA
>
> On 3.10.33 + a subset of the Freescale SDK 1.4 patches, both PCIe buses work
> well and we are able to use the devices on them.
>
> For each bus, I however keep getting EDAC PCIe errors at the very first stage of
> bus enumeration (please see the attached kernel log, with some debug output from
> arch/powerpc/kernel/pci-common.c and drivers/pci/probe.c) for both buses.
>
> My current "understanding" of the situation is such: since PCI_PROBE_NORMAL is
> used, pcibios_scan_phb() calls pci_scan_child_bus() that does a pci_scan_slot()
> on the bus for 32 slots. The first pci_scan_slot() is successful and it
> discovers the P2041's PCIe Controller. All the 31 other pci_scan_slot() calls
> generate an EDAC PCIe error, that is triggered by the configuration read
> transaction to read an hypothetical vendor ID of a device on the bus. This is
> relevant with that is reported by the EDAC error handler (all the 31 are the same):
>
> > PCIE error(s) detected
> > PCIE ERR_DR register: 0x00020000
>
> ICCA bit is set: Access to an illegal configuration space from
> PEX_CONFIG_ADDR/PEX_CONFIG_DATA was detected.
>
> > PCIE ERR_CAP_STAT register: 0x80000001
>
> To is set: Transaction originated from PEX_CONFIG_ADDR/PEX_CONFIG_DATA.
>
> > PCIE ERR_CAP_R0 register: 0x00000800
>
> FMT: 0b00, TYPE: 0b00100 (Config read I guess)
>
> > PCIE ERR_CAP_R1 register: 0x00000000
> > PCIE ERR_CAP_R2 register: 0x00000000
> > PCIE ERR_CAP_R3 register: 0x00000000
>
> Afterwards, pci_scan_child_bus() calls pcibios_fixup_bus (that maybe helps ?).
> From here, since the P2041's PCIe Controller is a bridge, pci_scan_bridge is
> called for this bus and all the devices are detected without having any
> configuration transaction causing EDAC errors.
>
> Has someone already observed such a behavior ? Why do these initial transaction
> generate an error ? What would be a possible fix to avoid these transaction
> errors for these 31 (unneded ?) pci_scan_slot() calls on the initial bus ?
>
> Best Regards,
>
> Valentin
Hi Valentin,
I've encountered similar problems on a P4080 based design (mine has additional
machine checks that cause an oops). I haven't solved it yet, so I unfortunately
can't offer you a fix. But I was told there are some errata workarounds that
more or less could have an impact on PCIe behavior. Could you show me the output
of U-Boot's errata command?
Especially if the workarounds for A-004580 and A-004849 are in place.
Johannes
^ permalink raw reply
* [PATCH] powerpc/le: big endian arguments for ppc_rtas()
From: Greg Kurz @ 2014-03-19 16:02 UTC (permalink / raw)
To: benh, paulus; +Cc: linuxppc-dev, anton, linux-kernel
The ppc_rtas() syscall allows userspace to interact directly with RTAS.
For the moment, it assumes every thing is big endian and returns either
EINVAL or EFAULT when called in a little endian environment.
As suggested by Benjamin, to avoid bugs when userspace wants to pass
a non 32 bit value to RTAS, it is far better to stick with a simple
rationale: ppc_rtas() should be called with a big endian rtas_args
structure.
With this patch, it is now up to userspace to forge big endian arguments,
as expected by RTAS.
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
---
Ben,
The chunk with the -1 return code check may look a bit pedantic. Please feel
free to kill it. :)
Cheers.
--
Greg
arch/powerpc/kernel/rtas.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/kernel/rtas.c b/arch/powerpc/kernel/rtas.c
index 4cf674d..f386296 100644
--- a/arch/powerpc/kernel/rtas.c
+++ b/arch/powerpc/kernel/rtas.c
@@ -1013,12 +1013,13 @@ struct pseries_errorlog *get_pseries_errorlog(struct rtas_error_log *log,
return NULL;
}
+/* We assume to be passed big endian arguments */
asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
{
struct rtas_args args;
unsigned long flags;
char *buff_copy, *errbuf = NULL;
- int nargs;
+ int nargs, nret, token;
int rc;
if (!capable(CAP_SYS_ADMIN))
@@ -1027,10 +1028,13 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
return -EFAULT;
- nargs = args.nargs;
+ nargs = be32_to_cpu(args.nargs);
+ nret = be32_to_cpu(args.nret);
+ token = be32_to_cpu(args.token);
+
if (nargs > ARRAY_SIZE(args.args)
- || args.nret > ARRAY_SIZE(args.args)
- || nargs + args.nret > ARRAY_SIZE(args.args))
+ || nret > ARRAY_SIZE(args.args)
+ || nargs + nret > ARRAY_SIZE(args.args))
return -EINVAL;
/* Copy in args. */
@@ -1038,14 +1042,14 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
nargs * sizeof(rtas_arg_t)) != 0)
return -EFAULT;
- if (args.token == RTAS_UNKNOWN_SERVICE)
+ if (token == RTAS_UNKNOWN_SERVICE)
return -EINVAL;
args.rets = &args.args[nargs];
- memset(args.rets, 0, args.nret * sizeof(rtas_arg_t));
+ memset(args.rets, 0, nret * sizeof(rtas_arg_t));
/* Need to handle ibm,suspend_me call specially */
- if (args.token == ibm_suspend_me_token) {
+ if (token == ibm_suspend_me_token) {
rc = rtas_ibm_suspend_me(&args);
if (rc)
return rc;
@@ -1062,7 +1066,7 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
/* A -1 return code indicates that the last command couldn't
be completed due to a hardware error. */
- if (args.rets[0] == -1)
+ if (be32_to_cpu(args.rets[0]) == -1)
errbuf = __fetch_rtas_last_error(buff_copy);
unlock_rtas(flags);
@@ -1077,7 +1081,7 @@ asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
/* Copy out args. */
if (copy_to_user(uargs->args + nargs,
args.args + nargs,
- args.nret * sizeof(rtas_arg_t)) != 0)
+ nret * sizeof(rtas_arg_t)) != 0)
return -EFAULT;
return 0;
^ permalink raw reply related
* Re: Tasks stuck in futex code (in 3.14-rc6)
From: Linus Torvalds @ 2014-03-19 16:04 UTC (permalink / raw)
To: Srikar Dronamraju
Cc: Peter Zijlstra, LKML, Davidlohr Bueso, Paul Mackerras,
Thomas Gleixner, ppc-dev, Ingo Molnar
In-Reply-To: <20140319152619.GB10406@linux.vnet.ibm.com>
On Wed, Mar 19, 2014 at 8:26 AM, Srikar Dronamraju
<srikar@linux.vnet.ibm.com> wrote:
>
> I reverted b0c29f79ecea0b6fbcefc999e70f2843ae8306db on top of v3.14-rc6 and confirmed that
> reverting the commit solved the problem.
Ok. I'll give Peter and Davidlohr a few days to perhaps find something
obvious, but I guess we'll need to revert it from 3.14 and try again
later unless some fix comes up quickly..
Oh well.
Linus
^ permalink raw reply
* Re: Tasks stuck in futex code (in 3.14-rc6)
From: Srikar Dronamraju @ 2014-03-19 16:09 UTC (permalink / raw)
To: Peter Zijlstra
Cc: linuxppc-dev, LKML, davidlohr, paulus, tglx, torvalds, mingo
In-Reply-To: <20140319154705.GB8557@laptop.programming.kicks-ass.net>
> >
> > Infact I can reproduce this if the java_constraint is either node, socket, system.
> > However I am not able to reproduce if java_constraint is set to core.
>
> What's any of that mean?
>
Using the constraint, one can specify how many jvm instances should
participate in the specjbb run.
For example on a 4 node box, I can say 2 jvms per constraint with
constraint set to node and specjbb will run with 8 instances of java.
I was running with 1 jvm per constraint. But when I set the constraint
to node/System, I keep seeing this problem. However if I set the
constraint to core (which means running more instances of java), the
problem is not seen. I kind of guess, the lesser the number of java
instances the easier it is to reproduce.
--
Thanks and Regards
Srikar Dronamraju
^ permalink raw reply
* Re: Tasks stuck in futex code (in 3.14-rc6)
From: Peter Zijlstra @ 2014-03-19 17:08 UTC (permalink / raw)
To: Srikar Dronamraju
Cc: linuxppc-dev, LKML, davidlohr, paulus, tglx, torvalds, mingo
In-Reply-To: <20140319154705.GB8557@laptop.programming.kicks-ass.net>
On Wed, Mar 19, 2014 at 04:47:05PM +0100, Peter Zijlstra wrote:
> > I reverted b0c29f79ecea0b6fbcefc999e70f2843ae8306db on top of v3.14-rc6 and confirmed that
> > reverting the commit solved the problem.
>
> Joy,.. let me look at that with ppc in mind.
OK; so while pretty much all the comments from that patch are utter
nonsense (what was I thinking), I cannot actually find a real bug.
But could you try the below which replaces a control dependency with a
full barrier. The control flow is plenty convoluted that I think the
control barrier isn't actually valid anymore and that might indeed
explain the fail.
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -119,42 +119,32 @@
* sys_futex(WAIT, futex, val);
* futex_wait(futex, val);
*
- * waiters++;
- * mb(); (A) <-- paired with -.
- * |
- * lock(hash_bucket(futex)); |
- * |
- * uval = *futex; |
- * | *futex = newval;
- * | sys_futex(WAKE, futex);
- * | futex_wake(futex);
- * |
- * `-------> mb(); (B)
- * if (uval == val)
+ *
+ * lock(hash_bucket(futex)); (A)
+ *
+ * uval = *futex;
+ * *futex = newval;
+ * sys_futex(WAKE, futex);
+ * futex_wake(futex);
+ *
+ * if (uval == val) (B) smp_mb(); (D)
* queue();
- * unlock(hash_bucket(futex));
- * schedule(); if (waiters)
+ * unlock(hash_bucket(futex)); (C)
+ * schedule(); if (spin_is_locked(&hb_lock) ||
+ * (smp_rmb(), !plist_empty))) (E)
* lock(hash_bucket(futex));
* wake_waiters(futex);
* unlock(hash_bucket(futex));
*
- * Where (A) orders the waiters increment and the futex value read -- this
- * is guaranteed by the head counter in the hb spinlock; and where (B)
- * orders the write to futex and the waiters read -- this is done by the
- * barriers in get_futex_key_refs(), through either ihold or atomic_inc,
- * depending on the futex type.
- *
- * This yields the following case (where X:=waiters, Y:=futex):
- *
- * X = Y = 0
- *
- * w[X]=1 w[Y]=1
- * MB MB
- * r[Y]=y r[X]=x
- *
- * Which guarantees that x==0 && y==0 is impossible; which translates back into
- * the guarantee that we cannot both miss the futex variable change and the
- * enqueue.
+ *
+ * Because of the acquire (A) and release (C) the futex value load and the
+ * plist_add are guaranteed to be inside the locked region. Furthermore, the
+ * control dependency (B) ensures the futex load happens before the plist_add().
+ *
+ * On the wakeup side, the full barrier (D) separates the futex value write
+ * from the hb_lock load, and matches with the control dependency. The rmb (E)
+ * separates the spin_is_locked() read and the plist_head_empty() read, such
+ * that ..., matches with the release barrier (C).
*/
#ifndef CONFIG_HAVE_FUTEX_CMPXCHG
@@ -250,7 +240,7 @@ static inline void futex_get_mm(union fu
/*
* Ensure futex_get_mm() implies a full barrier such that
* get_futex_key() implies a full barrier. This is relied upon
- * as full barrier (B), see the ordering comment above.
+ * as full barrier (D), see the ordering comment above.
*/
smp_mb__after_atomic();
}
@@ -308,10 +298,10 @@ static void get_futex_key_refs(union fut
switch (key->both.offset & (FUT_OFF_INODE|FUT_OFF_MMSHARED)) {
case FUT_OFF_INODE:
- ihold(key->shared.inode); /* implies MB (B) */
+ ihold(key->shared.inode); /* implies MB (D) */
break;
case FUT_OFF_MMSHARED:
- futex_get_mm(key); /* implies MB (B) */
+ futex_get_mm(key); /* implies MB (D) */
break;
}
}
@@ -385,7 +375,7 @@ get_futex_key(u32 __user *uaddr, int fsh
if (!fshared) {
key->private.mm = mm;
key->private.address = address;
- get_futex_key_refs(key); /* implies MB (B) */
+ get_futex_key_refs(key); /* implies MB (D) */
return 0;
}
@@ -492,7 +482,7 @@ get_futex_key(u32 __user *uaddr, int fsh
key->shared.pgoff = basepage_index(page);
}
- get_futex_key_refs(key); /* implies MB (B) */
+ get_futex_key_refs(key); /* implies MB (D) */
out:
unlock_page(page_head);
@@ -1604,7 +1594,7 @@ static inline struct futex_hash_bucket *
hb = hash_futex(&q->key);
q->lock_ptr = &hb->lock;
- spin_lock(&hb->lock); /* implies MB (A) */
+ spin_lock(&hb->lock);
return hb;
}
@@ -1995,6 +1985,8 @@ static int futex_wait_setup(u32 __user *
goto retry;
}
+ smp_mb();
+
if (uval != val) {
queue_unlock(*hb);
ret = -EWOULDBLOCK;
^ permalink raw reply
* Re: Tasks stuck in futex code (in 3.14-rc6)
From: Davidlohr Bueso @ 2014-03-19 18:06 UTC (permalink / raw)
To: Peter Zijlstra
Cc: Srikar Dronamraju, torvalds, LKML, paulus, tglx, Paul E. McKenney,
linuxppc-dev, mingo
In-Reply-To: <20140319170829.GD8557@laptop.programming.kicks-ass.net>
On Wed, 2014-03-19 at 18:08 +0100, Peter Zijlstra wrote:
> On Wed, Mar 19, 2014 at 04:47:05PM +0100, Peter Zijlstra wrote:
> > > I reverted b0c29f79ecea0b6fbcefc999e70f2843ae8306db on top of v3.14-rc6 and confirmed that
> > > reverting the commit solved the problem.
> >
> > Joy,.. let me look at that with ppc in mind.
errr... just sat down to check email this morning. CC'ing Paul as for
any subtle barrier issues.
^ permalink raw reply
* RE: EDAC PCIe errors when scannning the bus
From: Rajat Jain @ 2014-03-19 19:58 UTC (permalink / raw)
To: Valentin Longchamp, linuxppc-dev@lists.ozlabs.org,
linux-pci@vger.kernel.org
Cc: Guenter Roeck
In-Reply-To: <532991AD.6020903@keymile.com>
SGVsbG8sDQoNCj4gLS0tLS1PcmlnaW5hbCBNZXNzYWdlLS0tLS0NCj4gRnJvbTogbGludXgtcGNp
LW93bmVyQHZnZXIua2VybmVsLm9yZyBbbWFpbHRvOmxpbnV4LXBjaS0NCj4gb3duZXJAdmdlci5r
ZXJuZWwub3JnXSBPbiBCZWhhbGYgT2YgVmFsZW50aW4gTG9uZ2NoYW1wDQo+IFNlbnQ6IFdlZG5l
c2RheSwgTWFyY2ggMTksIDIwMTQgNTo0NyBBTQ0KPiBUbzogbGludXhwcGMtZGV2QGxpc3RzLm96
bGFicy5vcmc7IGxpbnV4LXBjaUB2Z2VyLmtlcm5lbC5vcmcNCj4gU3ViamVjdDogRURBQyBQQ0ll
IGVycm9ycyB3aGVuIHNjYW5ubmluZyB0aGUgYnVzDQo+IA0KPiBIZWxsbywNCj4gDQo+IFdlIGhh
dmUgYSBib2FyZCB0aGF0IGlzIGJhc2VkIG9uIEZyZWVzY2FsZSdzIFAyMDQxIFNvQy4gVGhlIGJv
YXJkcyBoYXMgMg0KPiBQQ0llIGJ1c2VzIHdpdGggdGhpcyB0b3BvbG9neToNCj4gDQo+IFBDSWUg
MCA8LS0tPiBQRVg4NTA1IHN3aXRjaCA8LS0tPiA0IG5ldHdvcmsgZGV2aWNlcyBQQ0lFIDIgPC0t
LT4gRlBHQQ0KPiANCj4gT24gMy4xMC4zMyArIGEgc3Vic2V0IG9mIHRoZSBGcmVlc2NhbGUgU0RL
IDEuNCBwYXRjaGVzLCBib3RoIFBDSWUgYnVzZXMNCj4gd29yayB3ZWxsIGFuZCB3ZSBhcmUgYWJs
ZSB0byB1c2UgdGhlIGRldmljZXMgb24gdGhlbS4NCj4gDQo+IEZvciBlYWNoIGJ1cywgSSBob3dl
dmVyIGtlZXAgZ2V0dGluZyBFREFDIFBDSWUgZXJyb3JzIGF0IHRoZSB2ZXJ5IGZpcnN0DQo+IHN0
YWdlIG9mIGJ1cyBlbnVtZXJhdGlvbiAocGxlYXNlIHNlZSB0aGUgYXR0YWNoZWQga2VybmVsIGxv
Zywgd2l0aCBzb21lDQo+IGRlYnVnIG91dHB1dCBmcm9tIGFyY2gvcG93ZXJwYy9rZXJuZWwvcGNp
LWNvbW1vbi5jIGFuZA0KPiBkcml2ZXJzL3BjaS9wcm9iZS5jKSBmb3IgYm90aCBidXNlcy4NCj4g
DQo+IE15IGN1cnJlbnQgInVuZGVyc3RhbmRpbmciIG9mIHRoZSBzaXR1YXRpb24gaXMgc3VjaDog
c2luY2UNCj4gUENJX1BST0JFX05PUk1BTCBpcyB1c2VkLCBwY2liaW9zX3NjYW5fcGhiKCkgY2Fs
bHMgcGNpX3NjYW5fY2hpbGRfYnVzKCkNCj4gdGhhdCBkb2VzIGEgcGNpX3NjYW5fc2xvdCgpIG9u
IHRoZSBidXMgZm9yIDMyIHNsb3RzLiBUaGUgZmlyc3QNCj4gcGNpX3NjYW5fc2xvdCgpIGlzIHN1
Y2Nlc3NmdWwgYW5kIGl0IGRpc2NvdmVycyB0aGUgUDIwNDEncyBQQ0llDQo+IENvbnRyb2xsZXIu
IEFsbCB0aGUgMzEgb3RoZXIgcGNpX3NjYW5fc2xvdCgpIGNhbGxzIGdlbmVyYXRlIGFuIEVEQUMg
UENJZQ0KPiBlcnJvciwgdGhhdCBpcyB0cmlnZ2VyZWQgYnkgdGhlIGNvbmZpZ3VyYXRpb24gcmVh
ZCB0cmFuc2FjdGlvbiB0byByZWFkDQo+IGFuIGh5cG90aGV0aWNhbCB2ZW5kb3IgSUQgb2YgYSBk
ZXZpY2Ugb24gdGhlIGJ1cy4gVGhpcyBpcyByZWxldmFudCB3aXRoDQo+IHRoYXQgaXMgcmVwb3J0
ZWQgYnkgdGhlIEVEQUMgZXJyb3IgaGFuZGxlciAoYWxsIHRoZSAzMSBhcmUgdGhlIHNhbWUpOg0K
PiANCj4gPiBQQ0lFIGVycm9yKHMpIGRldGVjdGVkDQo+ID4gUENJRSBFUlJfRFIgcmVnaXN0ZXI6
IDB4MDAwMjAwMDANCj4gDQo+IElDQ0EgYml0IGlzIHNldDogQWNjZXNzIHRvIGFuIGlsbGVnYWwg
Y29uZmlndXJhdGlvbiBzcGFjZSBmcm9tDQo+IFBFWF9DT05GSUdfQUREUi9QRVhfQ09ORklHX0RB
VEEgd2FzIGRldGVjdGVkLg0KPiANCj4gPiBQQ0lFIEVSUl9DQVBfU1RBVCByZWdpc3RlcjogMHg4
MDAwMDAwMQ0KPiANCj4gVG8gaXMgc2V0OiBUcmFuc2FjdGlvbiBvcmlnaW5hdGVkIGZyb20gUEVY
X0NPTkZJR19BRERSL1BFWF9DT05GSUdfREFUQS4NCj4gDQo+ID4gUENJRSBFUlJfQ0FQX1IwIHJl
Z2lzdGVyOiAweDAwMDAwODAwDQo+IA0KPiBGTVQ6IDBiMDAsIFRZUEU6IDBiMDAxMDAgKENvbmZp
ZyByZWFkIEkgZ3Vlc3MpDQo+IA0KPiA+IFBDSUUgRVJSX0NBUF9SMSByZWdpc3RlcjogMHgwMDAw
MDAwMA0KPiA+IFBDSUUgRVJSX0NBUF9SMiByZWdpc3RlcjogMHgwMDAwMDAwMA0KPiA+IFBDSUUg
RVJSX0NBUF9SMyByZWdpc3RlcjogMHgwMDAwMDAwMA0KPiANCj4gQWZ0ZXJ3YXJkcywgcGNpX3Nj
YW5fY2hpbGRfYnVzKCkgY2FsbHMgcGNpYmlvc19maXh1cF9idXMgKHRoYXQgbWF5YmUNCj4gaGVs
cHMgPykuDQo+IEZyb20gaGVyZSwgc2luY2UgdGhlIFAyMDQxJ3MgUENJZSBDb250cm9sbGVyIGlz
IGEgYnJpZGdlLA0KPiBwY2lfc2Nhbl9icmlkZ2UgaXMgY2FsbGVkIGZvciB0aGlzIGJ1cyBhbmQg
YWxsIHRoZSBkZXZpY2VzIGFyZSBkZXRlY3RlZA0KPiB3aXRob3V0IGhhdmluZyBhbnkgY29uZmln
dXJhdGlvbiB0cmFuc2FjdGlvbiBjYXVzaW5nIEVEQUMgZXJyb3JzLg0KPiANCj4gSGFzIHNvbWVv
bmUgYWxyZWFkeSBvYnNlcnZlZCBzdWNoIGEgYmVoYXZpb3IgPyBXaHkgZG8gdGhlc2UgaW5pdGlh
bA0KPiB0cmFuc2FjdGlvbiBnZW5lcmF0ZSBhbiBlcnJvciA/IFdoYXQgd291bGQgYmUgYSBwb3Nz
aWJsZSBmaXggdG8gYXZvaWQNCj4gdGhlc2UgdHJhbnNhY3Rpb24gZXJyb3JzIGZvciB0aGVzZSAz
MSAodW5uZWRlZCA/KSBwY2lfc2Nhbl9zbG90KCkgY2FsbHMNCj4gb24gdGhlIGluaXRpYWwgYnVz
ID8NCg0KSSBzZWUgdGhpcyB0b28gb24gbXkgUDUwMjAgYmFzZWQgcGxhdGZvcm0uIE5vIGZpeCB5
ZXQsIGZvciBub3cgZGlzYWJsaW5nIHRoZSBFREFDLg0KDQpUaGFua3MsDQoNClJhamF0DQoNCj4g
DQo+IEJlc3QgUmVnYXJkcywNCj4gDQo+IFZhbGVudGluDQo=
^ permalink raw reply
* Re: [RFC, v3] powerpc: Loading kernels over 8Mbytes without CONFIG_PIN_TLB
From: Scott Wood @ 2014-03-19 20:42 UTC (permalink / raw)
To: LEROY Christophe; +Cc: Paul Mackerras, linuxppc-dev, linux-kernel
In-Reply-To: <20131215150957.1F5C143E5B@localhost.localdomain>
On Sun, Dec 15, 2013 at 04:09:57PM +0100, LEROY Christophe wrote:
> Hereunder is a try to implement the sizing of the initial memory size based on
> initial-mapped-area size given by uboot in r7.
> As this has an impact on all powerpc platforms due to the need to provide the
> info up to function setup_initial_memory_limit(), I'm not completly sure of the
> proper implementation.
> Thanks to provide comments.
>
> Today on the 8xx, the only way to load kernels whose size is greater than
> 8Mbytes is to activate CONFIG_PIN_TLB. Otherwise, the physical memory initially
> mapped is limited to 8Mbytes. This patch uses the size of initial memory mapped
> by the bootloader and given to the kernel through register r7.
> This is done regardless of whether CONFIG_PIN_TLB is active or not. It allows to
> load "big" kernels (for instance when activating CONFIG_LOCKDEP_SUPPORT) without
> having to activate CONFIG_PIN_TLB.
>
> Not-yet-signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
>
> ---
> Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
> http://www.avast.com
>
> Index: linux/arch/powerpc/include/asm/mmu.h
> ===================================================================
> --- linux/arch/powerpc/include/asm/mmu.h (revision 5484)
> +++ linux/arch/powerpc/include/asm/mmu.h (copie de travail)
> @@ -138,7 +138,8 @@
> extern void early_init_mmu_secondary(void);
>
> extern void setup_initial_memory_limit(phys_addr_t first_memblock_base,
> - phys_addr_t first_memblock_size);
> + phys_addr_t first_memblock_size,
> + u64 init_mem_size);
What is the difference between first_memblock_size and init_mem_size, in
terms of what you expect setup_initial_memory_limit to do with them?
Can you just pass in min(first_memblock_size, init_mem_size), with the
non-ePAPR fallback handled in head_8xx.S (just load r30 with 8M instead
of zero)?
> #ifdef CONFIG_PPC64
> /* This is our real memory area size on ppc64 server, on embedded, we
> Index: linux/arch/powerpc/kernel/head_8xx.S
> ===================================================================
> --- linux/arch/powerpc/kernel/head_8xx.S (revision 5484)
> +++ linux/arch/powerpc/kernel/head_8xx.S (copie de travail)
> @@ -31,6 +31,8 @@
> #include <asm/asm-offsets.h>
> #include <asm/ptrace.h>
>
> +#define EPAPR_MAGIC 0x65504150
> +
> /* Macro to make the code more readable. */
> #ifdef CONFIG_8xx_CPU6
> #define DO_8xx_CPU6(val, reg) \
> @@ -77,10 +79,19 @@
> .globl __start
> __start:
> mr r31,r3 /* save device tree ptr */
> + li r30,0
>
> + lis r8,EPAPR_MAGIC@h
> + ori r8,r8, EPAPR_MAGIC@l
> + cmpw cr0,r8, r6
Whitespace
> + bne 1f
> +
> + mr r30,r7 /* save initial ram size */
> +
> /* We have to turn on the MMU right away so we get cache modes
> * set correctly.
> */
> +1:
> bl initial_mmu
>
> /* We now have the lower 8 Meg mapped into TLB entries, and the caches
> @@ -717,6 +728,8 @@
> */
> li r3,0
> mr r4,r31
> + li r5,0
> + mr r6,r30
> bl machine_init
> bl MMU_init
>
> @@ -841,11 +854,17 @@
> ori r8, r8, MI_BOOTINIT|0x2 /* Inhibit cache -- Cort */
> mtspr SPRN_MD_RPN, r8
>
> + /* Map two more 8M kernel data pages if needed
> + * We check how much memory is mapped by the bootloader
> + */
Whitespace
> Index: linux/arch/powerpc/kernel/prom.c
> ===================================================================
> --- linux/arch/powerpc/kernel/prom.c (revision 5484)
> +++ linux/arch/powerpc/kernel/prom.c (copie de travail)
> @@ -649,7 +649,7 @@
> }
> }
>
> -void __init early_init_devtree(void *params)
> +void __init early_init_devtree(void *params, u64 init_mem_size)
> {
> phys_addr_t limit;
>
> @@ -697,7 +697,7 @@
> /* make sure we've parsed cmdline for mem= before this */
> if (memory_limit)
> first_memblock_size = min_t(u64, first_memblock_size, memory_limit);
> - setup_initial_memory_limit(memstart_addr, first_memblock_size);
> + setup_initial_memory_limit(memstart_addr, first_memblock_size, init_mem_size);
Line length.
Yes, I know there's an existing violation on the previous line. :-)
> Index: linux/arch/powerpc/mm/init_32.c
> ===================================================================
> --- linux/arch/powerpc/mm/init_32.c (revision 5484)
> +++ linux/arch/powerpc/mm/init_32.c (copie de travail)
> @@ -206,19 +206,16 @@
>
> #ifdef CONFIG_8xx /* No 8xx specific .c file to put that in ... */
> void setup_initial_memory_limit(phys_addr_t first_memblock_base,
> - phys_addr_t first_memblock_size)
> + phys_addr_t first_memblock_size,
> + u64 init_mem_size)
> {
> /* We don't currently support the first MEMBLOCK not mapping 0
> * physical on those processors
> */
> BUG_ON(first_memblock_base != 0);
>
> -#ifdef CONFIG_PIN_TLB
> - /* 8xx can only access 24MB at the moment */
> - memblock_set_current_limit(min_t(u64, first_memblock_size, 0x01800000));
> -#else
> - /* 8xx can only access 8MB at the moment */
> - memblock_set_current_limit(min_t(u64, first_memblock_size, 0x00800000));
> -#endif
> + if (!init_mem_size)
> + init_mem_size = 0x00800000;
> + memblock_set_current_limit(min_t(u64, first_memblock_size, init_mem_size));
Line length
> }
> #endif /* CONFIG_8xx */
> Index: linux/arch/powerpc/mm/ppc_mmu_32.c
> ===================================================================
> --- linux/arch/powerpc/mm/ppc_mmu_32.c (revision 5484)
> +++ linux/arch/powerpc/mm/ppc_mmu_32.c (copie de travail)
> @@ -273,7 +273,8 @@
> }
>
> void setup_initial_memory_limit(phys_addr_t first_memblock_base,
> - phys_addr_t first_memblock_size)
> + phys_addr_t first_memblock_size,
> + u64 init_mem_size)
> {
> /* We don't currently support the first MEMBLOCK not mapping 0
> * physical on those processors
> Index: linux/arch/powerpc/mm/tlb_nohash.c
> ===================================================================
> --- linux/arch/powerpc/mm/tlb_nohash.c (revision 5484)
> +++ linux/arch/powerpc/mm/tlb_nohash.c (copie de travail)
> @@ -654,7 +654,8 @@
> }
>
> void setup_initial_memory_limit(phys_addr_t first_memblock_base,
> - phys_addr_t first_memblock_size)
> + phys_addr_t first_memblock_size,
> + u64 init_mem_size)
> {
> /* On non-FSL Embedded 64-bit, we adjust the RMA size to match
> * the bolted TLB entry. We know for now that only 1G
It seems a bit odd for this function to take init_mem_size on these other
platforms, but not use it.
-Scott
^ permalink raw reply
* Re: [2/2] fsl/pci: The new pci suspend/resume implementation
From: Scott Wood @ 2014-03-19 21:00 UTC (permalink / raw)
To: Dongsheng Wang; +Cc: roy.zang, galak, rjw, linux-pci, bhelgaas, linuxppc-dev
In-Reply-To: <1389081848-26506-2-git-send-email-dongsheng.wang@freescale.com>
On Tue, Jan 07, 2014 at 04:04:08PM +0800, Dongsheng Wang wrote:
> From: Wang Dongsheng <dongsheng.wang@freescale.com>
>
> The new suspend/resume implementation, send pme turnoff message
> in suspend, and send pme exit message in resume.
>
> Add a PME handler, to response PME & message interrupt.
>
> Change platform_driver->suspend/resume to syscore->suspend/resume.
> pci-driver will call back EP device, to save EP state in
> pci_pm_suspend_noirq, so we need to keep the link, until
> pci_pm_suspend_noirq finish.
>
> Signed-off-by: Wang Dongsheng <dongsheng.wang@freescale.com>
Is this patch OK to go in without patch 1/2? It's not clear whether that
was deemed incorrect (as in new patch coming) or unnecessary.
It would also be good if you submit with the explanation from
http://www.spinics.net/lists/linux-pci/msg27844.html in the commit
message.
> -static int fsl_pci_probe(struct platform_device *pdev)
> +#ifdef CONFIG_PM
> +static irqreturn_t fsl_pci_pme_handle(int irq, void *dev_id)
> {
> - int ret;
> - struct device_node *node;
> + struct pci_controller *hose = dev_id;
> + struct ccsr_pci __iomem *pci = hose->private_data;
> + u32 dr;
>
> - node = pdev->dev.of_node;
> - ret = fsl_add_bridge(pdev, fsl_pci_primary == node);
> + dr = in_be32(&pci->pex_pme_mes_dr);
> + if (dr)
> + out_be32(&pci->pex_pme_mes_dr, dr);
> + else
> + return IRQ_NONE;
>
> - mpc85xx_pci_err_probe(pdev);
> + return IRQ_HANDLED;
> +}
Why do you put some of the HANDLED path in the if statement, and some
outside?
Just do:
if (!dr)
return IRQ_NONE;
out_be32(...);
return IRQ_HANDLED;
> +static int fsl_pci_pme_probe(struct pci_controller *hose)
> +{
> + struct ccsr_pci __iomem *pci;
> + struct pci_dev *dev = hose->bus->self;
> + u16 pms;
> + int pme_irq;
> + int res;
> +
> + /* PME Disable */
> + pci_read_config_word(dev, dev->pm_cap + PCI_PM_CTRL, &pms);
> + pms &= ~PCI_PM_CTRL_PME_ENABLE;
> + pci_write_config_word(dev, dev->pm_cap + PCI_PM_CTRL, pms);
> +
> + pme_irq = irq_of_parse_and_map(hose->dn, 0);
> + if (!pme_irq) {
> + pr_warn("Failed to map PME interrupt.\n");
dev_err()
> +
> + return -ENXIO;
> + }
> +
> + res = devm_request_irq(hose->parent, pme_irq,
> + fsl_pci_pme_handle,
> + IRQF_DISABLED | IRQF_SHARED,
> + "[PCI] PME", hose);
IRQF_DISABLED is a deprecated no-op.
> + if (res < 0) {
> + pr_warn("Unable to requiest irq %d for PME\n", pme_irq);
dev_err() etc.
-Scott
^ permalink raw reply
* Re: clk: mpc85xx: Update the driver to align to new clock bindings
From: Scott Wood @ 2014-03-19 21:52 UTC (permalink / raw)
To: tang yuantian; +Cc: linuxppc-dev, mturquette
In-Reply-To: <1390267965-22408-1-git-send-email-Yuantian.Tang@freescale.com>
On Tue, Jan 21, 2014 at 09:32:45AM +0800, tang yuantian wrote:
> From: Tang Yuantian <yuantian.tang@freescale.com>
>
> The clock bindings for Freescale CoreNet platform are updated.
> So, the driver needs to be updated accordingly.
> The main changes include:
> - Added a new node to present the input system clock
> - Changed PLL and MUX's compatible string
>
> Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
>
> ---
> drivers/clk/clk-ppc-corenet.c | 70 +++++++++++++++++++++++++++++--------------
> 1 file changed, 48 insertions(+), 22 deletions(-)
Acked-by: Scott Wood <scottwood@freescale.com>
Mike, does this need to go to linux-arm-kernel@lists.infradead.org as per
MAINTAINERS for drivers/clk?
> diff --git a/drivers/clk/clk-ppc-corenet.c b/drivers/clk/clk-ppc-corenet.c
> index c4f76ed..8b284be 100644
> --- a/drivers/clk/clk-ppc-corenet.c
> +++ b/drivers/clk/clk-ppc-corenet.c
> @@ -27,7 +27,6 @@ struct cmux_clk {
> #define CLKSEL_ADJUST BIT(0)
> #define to_cmux_clk(p) container_of(p, struct cmux_clk, hw)
>
> -static void __iomem *base;
> static unsigned int clocks_per_pll;
>
> static int cmux_set_parent(struct clk_hw *hw, u8 idx)
> @@ -100,7 +99,11 @@ static void __init core_mux_init(struct device_node *np)
> pr_err("%s: could not allocate cmux_clk\n", __func__);
> goto err_name;
> }
> - cmux_clk->reg = base + offset;
> + cmux_clk->reg = of_iomap(np, 0);
> + if (!cmux_clk->reg) {
> + pr_err("%s: could not map register\n", __func__);
> + goto err_clk;
> + }
dev_err? Though it looks like of_clk_init() makes it hard to pass a
reference to the parent device (or anything else but a function pointer
and device tree node) to the init function -- why?
> node = of_find_compatible_node(NULL, NULL, "fsl,p4080-clockgen");
> if (node && (offset >= 0x80))
> @@ -143,38 +146,39 @@ err_name:
>
> static void __init core_pll_init(struct device_node *np)
> {
> - u32 offset, mult;
> + u32 mult;
> int i, rc, count;
> const char *clk_name, *parent_name;
> struct clk_onecell_data *onecell_data;
> struct clk **subclks;
> + void __iomem *base;
>
> - rc = of_property_read_u32(np, "reg", &offset);
> - if (rc) {
> - pr_err("%s: could not get reg property\n", np->name);
> + base = of_iomap(np, 0);
> + if (!base) {
> + pr_err("clk-ppc: iomap error\n");
> return;
> }
>
> /* get the multiple of PLL */
> - mult = ioread32be(base + offset);
> + mult = ioread32be(base);
>
> /* check if this PLL is disabled */
> if (mult & PLL_KILL) {
> pr_debug("PLL:%s is disabled\n", np->name);
> - return;
> + goto err_map;
> }
> mult = (mult >> 1) & 0x3f;
>
> parent_name = of_clk_get_parent_name(np, 0);
> if (!parent_name) {
> pr_err("PLL: %s must have a parent\n", np->name);
> - return;
> + goto err_map;
> }
>
> count = of_property_count_strings(np, "clock-output-names");
> if (count < 0 || count > 4) {
> pr_err("%s: clock is not supported\n", np->name);
> - return;
> + goto err_map;
> }
>
> /* output clock number per PLL */
> @@ -183,7 +187,7 @@ static void __init core_pll_init(struct device_node *np)
> subclks = kzalloc(sizeof(struct clk *) * count, GFP_KERNEL);
> if (!subclks) {
> pr_err("%s: could not allocate subclks\n", __func__);
> - return;
> + goto err_map;
> }
>
> onecell_data = kzalloc(sizeof(struct clk_onecell_data), GFP_KERNEL);
> @@ -230,30 +234,52 @@ static void __init core_pll_init(struct device_node *np)
> goto err_cell;
> }
>
> + iounmap(base);
> return;
> err_cell:
> kfree(onecell_data);
> err_clks:
> kfree(subclks);
> +err_map:
> + iounmap(base);
> +}
Consider devres -- is there a devres version of of_iomap()?
-Scott
^ permalink raw reply
* [PATCH 3/4] ARCH: AUDIT: implement syscall_get_arch for all arches
From: Eric Paris @ 2014-03-19 22:04 UTC (permalink / raw)
To: linux-audit
Cc: linux-mips, linux-ia64, linux-parisc, microblaze-uclinux, linux,
Eric Paris, sparclinux, linuxppc-dev
In-Reply-To: <1395266643-3139-1-git-send-email-eparis@redhat.com>
For all arches which support audit implement syscall_get_arch()
They are all pretty easy and straight forward, stolen from how the call
to audit_syscall_entry() determines the arch.
Signed-off-by: Eric Paris <eparis@redhat.com>
Cc: linux-ia64@vger.kernel.org
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: linux-mips@linux-mips.org
Cc: linux@lists.openrisc.net
Cc: linux-parisc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: sparclinux@vger.kernel.org
---
arch/ia64/include/asm/syscall.h | 6 ++++++
arch/microblaze/include/asm/syscall.h | 5 +++++
arch/mips/include/asm/syscall.h | 2 +-
arch/openrisc/include/asm/syscall.h | 5 +++++
arch/parisc/include/asm/syscall.h | 11 +++++++++++
arch/powerpc/include/asm/syscall.h | 12 ++++++++++++
arch/sparc/include/asm/syscall.h | 8 ++++++++
include/uapi/linux/audit.h | 1 +
8 files changed, 49 insertions(+), 1 deletion(-)
diff --git a/arch/ia64/include/asm/syscall.h b/arch/ia64/include/asm/syscall.h
index a7ff1c6..1d0b875 100644
--- a/arch/ia64/include/asm/syscall.h
+++ b/arch/ia64/include/asm/syscall.h
@@ -13,6 +13,7 @@
#ifndef _ASM_SYSCALL_H
#define _ASM_SYSCALL_H 1
+#include <uapi/linux/audit.h>
#include <linux/sched.h>
#include <linux/err.h>
@@ -79,4 +80,9 @@ static inline void syscall_set_arguments(struct task_struct *task,
ia64_syscall_get_set_arguments(task, regs, i, n, args, 1);
}
+
+static inline int syscall_get_arch(void)
+{
+ return AUDIT_ARCH_IA64;
+}
#endif /* _ASM_SYSCALL_H */
diff --git a/arch/microblaze/include/asm/syscall.h b/arch/microblaze/include/asm/syscall.h
index 9bc4317..53cfaf3 100644
--- a/arch/microblaze/include/asm/syscall.h
+++ b/arch/microblaze/include/asm/syscall.h
@@ -1,6 +1,7 @@
#ifndef __ASM_MICROBLAZE_SYSCALL_H
#define __ASM_MICROBLAZE_SYSCALL_H
+#include <uapi/linux/audit.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <asm/ptrace.h>
@@ -99,4 +100,8 @@ static inline void syscall_set_arguments(struct task_struct *task,
asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);
asmlinkage void do_syscall_trace_leave(struct pt_regs *regs);
+static inline int syscall_get_arch(void)
+{
+ return AUDIT_ARCH_MICROBLAZE;
+}
#endif /* __ASM_MICROBLAZE_SYSCALL_H */
diff --git a/arch/mips/include/asm/syscall.h b/arch/mips/include/asm/syscall.h
index fc556d8..992b6ab 100644
--- a/arch/mips/include/asm/syscall.h
+++ b/arch/mips/include/asm/syscall.h
@@ -103,7 +103,7 @@ extern const unsigned long sysn32_call_table[];
static inline int syscall_get_arch(void)
{
- int arch = EM_MIPS;
+ int arch = AUDIT_ARCH_MIPS;
#ifdef CONFIG_64BIT
arch |= __AUDIT_ARCH_64BIT;
#endif
diff --git a/arch/openrisc/include/asm/syscall.h b/arch/openrisc/include/asm/syscall.h
index b752bb6..2db9f1c 100644
--- a/arch/openrisc/include/asm/syscall.h
+++ b/arch/openrisc/include/asm/syscall.h
@@ -19,6 +19,7 @@
#ifndef __ASM_OPENRISC_SYSCALL_H__
#define __ASM_OPENRISC_SYSCALL_H__
+#include <uapi/linux/audit.h>
#include <linux/err.h>
#include <linux/sched.h>
@@ -71,4 +72,8 @@ syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,
memcpy(®s->gpr[3 + i], args, n * sizeof(args[0]));
}
+static inline int syscall_get_arch(void)
+{
+ return AUDIT_ARCH_OPENRISC;
+}
#endif
diff --git a/arch/parisc/include/asm/syscall.h b/arch/parisc/include/asm/syscall.h
index 8bdfd2c..a5eba95 100644
--- a/arch/parisc/include/asm/syscall.h
+++ b/arch/parisc/include/asm/syscall.h
@@ -3,6 +3,8 @@
#ifndef _ASM_PARISC_SYSCALL_H_
#define _ASM_PARISC_SYSCALL_H_
+#include <uapi/linux/audit.h>
+#include <linux/compat.h>
#include <linux/err.h>
#include <asm/ptrace.h>
@@ -37,4 +39,13 @@ static inline void syscall_get_arguments(struct task_struct *tsk,
}
}
+static inline int syscall_get_arch(void)
+{
+ int arch = AUDIT_ARCH_PARISC;
+#ifdef CONFIG_64BIT
+ if (!is_compat_task())
+ arch = AUDIT_ARCH_PARISC64;
+#endif
+ return arch;
+}
#endif /*_ASM_PARISC_SYSCALL_H_*/
diff --git a/arch/powerpc/include/asm/syscall.h b/arch/powerpc/include/asm/syscall.h
index b54b2ad..4271544 100644
--- a/arch/powerpc/include/asm/syscall.h
+++ b/arch/powerpc/include/asm/syscall.h
@@ -13,6 +13,8 @@
#ifndef _ASM_SYSCALL_H
#define _ASM_SYSCALL_H 1
+#include <uapi/linux/audit.h>
+#include <linux/compat.h>
#include <linux/sched.h>
/* ftrace syscalls requires exporting the sys_call_table */
@@ -86,4 +88,14 @@ static inline void syscall_set_arguments(struct task_struct *task,
memcpy(®s->gpr[3 + i], args, n * sizeof(args[0]));
}
+static inline int syscall_get_arch(void)
+{
+ int arch = AUDIT_ARCH_PPC;
+
+#ifdef CONFIG_PPC64
+ if (!is_32bit_task())
+ arch = AUDIT_ARCH_PPC64;
+#endif
+ return arch;
+}
#endif /* _ASM_SYSCALL_H */
diff --git a/arch/sparc/include/asm/syscall.h b/arch/sparc/include/asm/syscall.h
index 025a02a..fed3d51 100644
--- a/arch/sparc/include/asm/syscall.h
+++ b/arch/sparc/include/asm/syscall.h
@@ -1,9 +1,11 @@
#ifndef __ASM_SPARC_SYSCALL_H
#define __ASM_SPARC_SYSCALL_H
+#include <uapi/linux/audit.h>
#include <linux/kernel.h>
#include <linux/sched.h>
#include <asm/ptrace.h>
+#include <asm/thread_info.h>
/*
* The syscall table always contains 32 bit pointers since we know that the
@@ -124,4 +126,10 @@ static inline void syscall_set_arguments(struct task_struct *task,
regs->u_regs[UREG_I0 + i + j] = args[j];
}
+static inline int syscall_get_arch(void)
+{
+ return test_thread_flag(TIF_32BIT) ? AUDIT_ARCH_SPARC
+ : AUDIT_ARCH_SPARC64;
+}
+
#endif /* __ASM_SPARC_SYSCALL_H */
diff --git a/include/uapi/linux/audit.h b/include/uapi/linux/audit.h
index 9af01d7..8496cfa 100644
--- a/include/uapi/linux/audit.h
+++ b/include/uapi/linux/audit.h
@@ -343,6 +343,7 @@ enum {
#define AUDIT_ARCH_IA64 (EM_IA_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_M32R (EM_M32R)
#define AUDIT_ARCH_M68K (EM_68K)
+#define AUDIT_ARCH_MICROBLAZE (EM_MICROBLAZE)
#define AUDIT_ARCH_MIPS (EM_MIPS)
#define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE)
#define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT)
--
1.8.5.3
^ permalink raw reply related
* Re: [PATCH] powerpc 32: Provides VIRT_CPU_ACCOUNTING
From: Scott Wood @ 2014-03-19 22:05 UTC (permalink / raw)
To: Christophe Leroy; +Cc: linuxppc-dev, Paul Mackerras, linux-kernel
In-Reply-To: <20140319215241.236B21A4BDE@localhost.localdomain>
On Wed, 2014-03-19 at 22:52 +0100, Christophe Leroy wrote:
> This patch provides VIRT_CPU_ACCOUTING to PPC32 architecture.
> Unlike PPC64, PPC32 doesn't provide the PACA register. Therefore the
> implementation is similar to the one done in the IA64 architecture.
> It is based on additional information added to the Task Info structure.
PACA isn't a register -- just a convention for how Linux uses a GPR.
Maybe it's time to use it on PPC32 as well?
> Index: b/arch/powerpc/kernel/asm-offsets.c
> ===================================================================
> --- b/arch/powerpc/kernel/asm-offsets.c (revision 5607)
> +++ b/arch/powerpc/kernel/asm-offsets.c (revision 5608)
> @@ -167,6 +167,10 @@
> DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
> DEFINE(TI_TASK, offsetof(struct thread_info, task));
> DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
> + DEFINE(TI_AC_STAMP, offsetof(struct thread_info, ac_stamp));
> + DEFINE(TI_AC_LEAVE, offsetof(struct thread_info, ac_leave));
> + DEFINE(TI_AC_STIME, offsetof(struct thread_info, ac_stime));
> + DEFINE(TI_AC_UTIME, offsetof(struct thread_info, ac_utime));
Doesn't this need to be protected by #ifdef
CONFIG_VIRT_CPU_ACCOUNTING_NATIVE?
>
> #ifdef CONFIG_PPC64
> DEFINE(DCACHEL1LINESIZE, offsetof(struct ppc64_caches, dline_size));
> Index: b/arch/powerpc/include/asm/thread_info.h
> ===================================================================
> --- b/arch/powerpc/include/asm/thread_info.h (revision 5607)
> +++ b/arch/powerpc/include/asm/thread_info.h (revision 5608)
> @@ -43,6 +43,12 @@
> int cpu; /* cpu we're on */
> int preempt_count; /* 0 => preemptable,
> <0 => BUG */
> +#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
> + __u32 ac_stamp;
> + __u32 ac_leave;
> + __u32 ac_stime;
> + __u32 ac_utime;
> +#endif
This isn't uapi; why not use "u32"?
Plus, it should be made clear that this is only used on 32-bit.
> struct restart_block restart_block;
> unsigned long local_flags; /* private flags for thread */
>
> @@ -58,6 +64,8 @@
> .task = &tsk, \
> .exec_domain = &default_exec_domain, \
> .cpu = 0, \
> + .ac_stime = 0, \
> + .ac_utime = 0, \
Also needs to be ifdeffed -- which isn't going to work in a macro, so
maybe remove the ifdef from the variable declarations, or just let the
fields be initialized to zero by default. Or add PACA to 32-bit. :-)
-Scott
^ permalink raw reply
* Re: [PATCH 3/4] ARCH: AUDIT: implement syscall_get_arch for all arches
From: Matt Turner @ 2014-03-19 22:19 UTC (permalink / raw)
To: Eric Paris
Cc: linux-mips@linux-mips.org, linux-ia64,
linux-parisc@vger.kernel.org, microblaze-uclinux, linux,
linux-audit, sparclinux, linuxppc-dev
In-Reply-To: <1395266643-3139-3-git-send-email-eparis@redhat.com>
On Wed, Mar 19, 2014 at 3:04 PM, Eric Paris <eparis@redhat.com> wrote:
> For all arches which support audit implement syscall_get_arch()
support audit -- is that AUDIT_ARCH? If so, alpha gained support
recently, so I think this patch needs to handle alpha too?
^ permalink raw reply
* [PATCH] powerpc 32: Provides VIRT_CPU_ACCOUNTING
From: Christophe Leroy @ 2014-03-19 21:52 UTC (permalink / raw)
To: Benjamin Herrenschmidt, Paul Mackerras, scottwood
Cc: linuxppc-dev, linux-kernel
This patch provides VIRT_CPU_ACCOUTING to PPC32 architecture.
Unlike PPC64, PPC32 doesn't provide the PACA register. Therefore the
implementation is similar to the one done in the IA64 architecture.
It is based on additional information added to the Task Info structure.
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Index: b/arch/powerpc/Kconfig
===================================================================
--- b/arch/powerpc/Kconfig (revision 5607)
+++ b/arch/powerpc/Kconfig (revision 5608)
@@ -138,6 +138,7 @@
select OLD_SIGSUSPEND
select OLD_SIGACTION if PPC32
select HAVE_DEBUG_STACKOVERFLOW
+ select HAVE_VIRT_CPU_ACCOUNTING
config EARLY_PRINTK
bool
Index: b/arch/powerpc/kernel/time.c
===================================================================
--- b/arch/powerpc/kernel/time.c (revision 5607)
+++ b/arch/powerpc/kernel/time.c (revision 5608)
@@ -162,7 +162,9 @@
cputime_t cputime_one_jiffy;
+#ifdef CONFIG_PPC_SPLPAR
void (*dtl_consumer)(struct dtl_entry *, u64);
+#endif
static void calc_cputime_factors(void)
{
@@ -178,6 +180,7 @@
__cputime_clockt_factor = res.result_low;
}
+#ifdef CONFIG_PPC64
/*
* Read the SPURR on systems that have it, otherwise the PURR,
* or if that doesn't exist return the timebase value passed in.
@@ -190,6 +193,7 @@
return mfspr(SPRN_PURR);
return tb;
}
+#endif
#ifdef CONFIG_PPC_SPLPAR
@@ -291,6 +295,7 @@
* Account time for a transition between system, hard irq
* or soft irq state.
*/
+#ifdef CONFIG_PPC64
static u64 vtime_delta(struct task_struct *tsk,
u64 *sys_scaled, u64 *stolen)
{
@@ -377,7 +382,70 @@
get_paca()->utime_sspurr = 0;
account_user_time(tsk, utime, utimescaled);
}
+#else
+void vtime_account_user(struct task_struct *tsk)
+{
+ cputime_t delta_utime;
+ struct thread_info *ti = task_thread_info(tsk);
+
+ if (ti->ac_utime) {
+ delta_utime = ti->ac_utime;
+ account_user_time(tsk, delta_utime, delta_utime);
+ ti->ac_utime = 0;
+ }
+}
+
+/*
+ * Called from the context switch with interrupts disabled, to charge all
+ * accumulated times to the current process, and to prepare accounting on
+ * the next process.
+ */
+void arch_vtime_task_switch(struct task_struct *prev)
+{
+ struct thread_info *pi = task_thread_info(prev);
+ struct thread_info *ni = task_thread_info(current);
+
+ ni->ac_stamp = pi->ac_stamp;
+ ni->ac_stime = ni->ac_utime = 0;
+}
+
+/*
+ * Account time for a transition between system, hard irq or soft irq state.
+ * Note that this function is called with interrupts enabled.
+ */
+static cputime_t vtime_delta(struct task_struct *tsk)
+{
+ struct thread_info *ti = task_thread_info(tsk);
+ __u32 delta_stime;
+ __u32 now;
+
+ WARN_ON_ONCE(!irqs_disabled());
+
+ now = mftbl();
+
+ delta_stime = ti->ac_stime + (now - ti->ac_stamp);
+ ti->ac_stime = 0;
+ ti->ac_stamp = now;
+
+ return (cputime_t)delta_stime;
+}
+
+void vtime_account_system(struct task_struct *tsk)
+{
+ cputime_t delta = vtime_delta(tsk);
+
+ account_system_time(tsk, 0, delta, delta);
+}
+EXPORT_SYMBOL_GPL(vtime_account_system);
+
+void vtime_account_idle(struct task_struct *tsk)
+{
+ account_idle_time(vtime_delta(tsk));
+}
+
+#endif
+
#else /* ! CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
#define calc_cputime_factors()
#endif
@@ -871,6 +939,8 @@
ppc_proc_freq / 1000000, ppc_proc_freq % 1000000);
}
+ mttbl(0);
+ mttbu(0);
tb_ticks_per_jiffy = ppc_tb_freq / HZ;
tb_ticks_per_sec = ppc_tb_freq;
tb_ticks_per_usec = ppc_tb_freq / 1000000;
Index: b/arch/powerpc/kernel/entry_32.S
===================================================================
--- b/arch/powerpc/kernel/entry_32.S (revision 5607)
+++ b/arch/powerpc/kernel/entry_32.S (revision 5608)
@@ -177,6 +177,12 @@
addi r12,r12,-1
stw r12,4(r11)
#endif
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
+ CURRENT_THREAD_INFO(r9, r1)
+ tophys(r9, r9)
+ ACCOUNT_CPU_USER_ENTRY(r9, r11, r12)
+#endif
+
b 3f
2: /* if from kernel, check interrupted DOZE/NAP mode and
@@ -406,6 +412,13 @@
lwarx r7,0,r1
END_FTR_SECTION_IFSET(CPU_FTR_NEED_PAIRED_STWCX)
stwcx. r0,0,r1 /* to clear the reservation */
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
+ andi. r4,r8,MSR_PR
+ beq 3f
+ CURRENT_THREAD_INFO(r4, r1)
+ ACCOUNT_CPU_USER_EXIT(r4, r5, r7)
+3:
+#endif
lwz r4,_LINK(r1)
lwz r5,_CCR(r1)
mtlr r4
@@ -841,6 +854,10 @@
andis. r10,r0,DBCR0_IDM@h
bnel- load_dbcr0
#endif
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
+ CURRENT_THREAD_INFO(r9, r1)
+ ACCOUNT_CPU_USER_EXIT(r9, r10, r11)
+#endif
b restore
Index: b/arch/powerpc/kernel/asm-offsets.c
===================================================================
--- b/arch/powerpc/kernel/asm-offsets.c (revision 5607)
+++ b/arch/powerpc/kernel/asm-offsets.c (revision 5608)
@@ -167,6 +167,10 @@
DEFINE(TI_PREEMPT, offsetof(struct thread_info, preempt_count));
DEFINE(TI_TASK, offsetof(struct thread_info, task));
DEFINE(TI_CPU, offsetof(struct thread_info, cpu));
+ DEFINE(TI_AC_STAMP, offsetof(struct thread_info, ac_stamp));
+ DEFINE(TI_AC_LEAVE, offsetof(struct thread_info, ac_leave));
+ DEFINE(TI_AC_STIME, offsetof(struct thread_info, ac_stime));
+ DEFINE(TI_AC_UTIME, offsetof(struct thread_info, ac_utime));
#ifdef CONFIG_PPC64
DEFINE(DCACHEL1LINESIZE, offsetof(struct ppc64_caches, dline_size));
Index: b/arch/powerpc/include/asm/thread_info.h
===================================================================
--- b/arch/powerpc/include/asm/thread_info.h (revision 5607)
+++ b/arch/powerpc/include/asm/thread_info.h (revision 5608)
@@ -43,6 +43,12 @@
int cpu; /* cpu we're on */
int preempt_count; /* 0 => preemptable,
<0 => BUG */
+#ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
+ __u32 ac_stamp;
+ __u32 ac_leave;
+ __u32 ac_stime;
+ __u32 ac_utime;
+#endif
struct restart_block restart_block;
unsigned long local_flags; /* private flags for thread */
@@ -58,6 +64,8 @@
.task = &tsk, \
.exec_domain = &default_exec_domain, \
.cpu = 0, \
+ .ac_stime = 0, \
+ .ac_utime = 0, \
.preempt_count = INIT_PREEMPT_COUNT, \
.restart_block = { \
.fn = do_no_restart_syscall, \
Index: b/arch/powerpc/include/asm/cputime.h
===================================================================
--- b/arch/powerpc/include/asm/cputime.h (revision 5607)
+++ b/arch/powerpc/include/asm/cputime.h (revision 5608)
@@ -228,7 +228,11 @@
#define cputime64_to_clock_t(ct) cputime_to_clock_t((cputime_t)(ct))
+#ifdef CONFIG_PPC64
static inline void arch_vtime_task_switch(struct task_struct *tsk) { }
+#else
+extern void arch_vtime_task_switch(struct task_struct *tsk);
+#endif
#endif /* __KERNEL__ */
#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
Index: b/arch/powerpc/include/asm/ppc_asm.h
===================================================================
--- b/arch/powerpc/include/asm/ppc_asm.h (revision 5607)
+++ b/arch/powerpc/include/asm/ppc_asm.h (revision 5608)
@@ -25,10 +25,16 @@
*/
#ifndef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE
+#ifdef CONFIG_PPC64
#define ACCOUNT_CPU_USER_ENTRY(ra, rb)
#define ACCOUNT_CPU_USER_EXIT(ra, rb)
+#else /* CONFIG_PPC64 */
+#define ACCOUNT_CPU_USER_ENTRY(ti, ra, rb)
+#define ACCOUNT_CPU_USER_EXIT(ti, ra, rb)
+#endif
#define ACCOUNT_STOLEN_TIME
-#else
+#else /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
+#ifdef CONFIG_PPC64
#define ACCOUNT_CPU_USER_ENTRY(ra, rb) \
MFTB(ra); /* get timebase */ \
ld rb,PACA_STARTTIME_USER(r13); \
@@ -68,7 +74,27 @@
#define ACCOUNT_STOLEN_TIME
#endif /* CONFIG_PPC_SPLPAR */
+#else /* CONFIG_PPC64 */
+#define ACCOUNT_CPU_USER_ENTRY(ti, ra, rb) \
+ MFTB(ra); \
+ lwz rb, TI_AC_LEAVE(ti); \
+ stw ra, TI_AC_STAMP(ti); /* AC_STAMP = NOW */ \
+ subf rb, rb, ra; /* R = NOW - AC_LEAVE */ \
+ lwz ra, TI_AC_UTIME(ti); \
+ add ra, rb, ra; /* AC_UTIME += R */ \
+ stw ra, TI_AC_UTIME(ti); \
+#define ACCOUNT_CPU_USER_EXIT(ti, ra, rb) \
+ MFTB(ra); \
+ lwz rb, TI_AC_STAMP(ti); \
+ stw ra, TI_AC_LEAVE(ti); \
+ subf rb, rb, ra; /* R = NOW - AC_STAMP */ \
+ lwz ra, TI_AC_STIME(ti); \
+ add ra, rb, ra; /* AC_STIME += R */ \
+ stw ra, TI_AC_STIME(ti); \
+
+#endif
+
#endif /* CONFIG_VIRT_CPU_ACCOUNTING_NATIVE */
/*
^ permalink raw reply
* Re: [1/2, v9] powerpc/mpc85xx:Add initial device tree support of T104x
From: Scott Wood @ 2014-03-19 22:33 UTC (permalink / raw)
To: Prabhakar Kushwaha
Cc: Varun Sethi, Poonam Aggrwal, linuxppc-dev, Priyanka Jain
In-Reply-To: <1390650059-19437-1-git-send-email-prabhakar@freescale.com>
On Sat, Jan 25, 2014 at 05:10:59PM +0530, Prabhakar Kushwaha wrote:
> + corenet-cf@18000 {
> + compatible = "fsl,corenet-cf";
> + reg = <0x18000 0x1000>;
> + interrupts = <16 2 1 31>;
> + fsl,ccf-num-csdids = <32>;
> + fsl,ccf-num-snoopids = <32>;
> + };
I know this isn't a new problem, but this needs a binding -- and a
different compatible from p4080-era CCF. AFAICT it's a completely
different programming model, and even the block version registers weren't
present in the original version.
> +/include/ "qoriq-mpic.dtsi"
> +
> + guts: global-utilities@e0000 {
> + compatible = "fsl,t1040-device-config", "fsl,qoriq-device-config-2.0";
> + reg = <0xe0000 0xe00>;
> + fsl,has-rstcr;
> + fsl,liodn-bits = <12>;
> + };
> +
> + clockgen: global-utilities@e1000 {
> + compatible = "fsl,t1040-clockgen", "fsl,qoriq-clockgen-2.0",
> + "fixed-clock";
> + ranges = <0x0 0xe1000 0x1000>;
> + clock-frequency = <100000000>;
Why is clock-frequency hardcoded here rather than supplied by U-Boot?
Especially since this is an SoC file, not a board file.
> + reg = <0xe1000 0x1000>;
> + clock-output-names = "sysclk";
> + #address-cells = <1>;
> + #size-cells = <1>;
clock-output-names and fixed-clock doesn't belong on this node.
> +
> + sysclk: sysclk {
> + #clock-cells = <0>;
> + compatible = "fsl,qoriq-sysclk-2.0";
> + clock-output-names = "sysclk";
> + };
> +
> +
> + pll0: pll0@800 {
> + #clock-cells = <1>;
> + reg = <0x800 4>;
> + compatible = "fsl,qoriq-core-pll-2.0";
> + clocks = <&clockgen>;
> + clock-output-names = "pll0", "pll0-div2", "pll0-div4";
> + };
> +
> + pll1: pll1@820 {
> + #clock-cells = <1>;
> + reg = <0x820 4>;
> + compatible = "fsl,qoriq-core-pll-2.0";
> + clocks = <&clockgen>;
> + clock-output-names = "pll1", "pll1-div2", "pll1-div4";
> + };
clocks should point to sysclk.
> + display@180000 {
> + compatible = "fsl,t1040-diu", "fsl,diu";
> + reg = <0x180000 1000>;
> + interrupts = <74 2 0 0>;
> + };
> +
> +/include/ "qoriq-sata2-0.dtsi"
> +sata@220000 {
> + fsl,iommu-parent = <&pamu0>;
> + fsl,liodn-reg = <&guts 0x550>; /* SATA1LIODNR */
> +};
> +/include/ "qoriq-sata2-1.dtsi"
> +sata@221000 {
> + fsl,iommu-parent = <&pamu0>;
> + fsl,liodn-reg = <&guts 0x554>; /* SATA2LIODNR */
> +};
> +/include/ "qoriq-sec5.0-0.dtsi"
> +};
Whitespace
-Scott
^ permalink raw reply
* Re: powerpc/config: Remove unnecssary CONFIG_FSL_IFC
From: Scott Wood @ 2014-03-19 22:42 UTC (permalink / raw)
To: Prabhakar Kushwaha; +Cc: linuxppc-dev
In-Reply-To: <1390652612-3553-1-git-send-email-prabhakar@freescale.com>
On Sat, Jan 25, 2014 at 05:53:32PM +0530, Prabhakar Kushwaha wrote:
> CONFIG_FSL_IFC gets enabled by Kconfig dependancies.
> So remove unnecssary define from the defconfigs
>
> Signed-off-by: Prabhakar Kushwaha <prabhakar@freescale.com>
>
> ---
> arch/powerpc/configs/corenet64_smp_defconfig | 1 -
> arch/powerpc/configs/mpc85xx_defconfig | 1 -
> arch/powerpc/configs/mpc85xx_smp_defconfig | 1 -
> 3 files changed, 3 deletions(-)
I'll apply this, but FSL_IFC really should be made user-selectable
without needing to enable NAND support, since it also provides error
reporting for NOR and GPCM.
Also, when submitting patches like this, it's best to mention that it's
the output of running savedefconfig (and if that isn't how the patch was
generated, do it that way instead).
-Scott
^ permalink raw reply
* 3.16.6 build error: swsusp_booke.S:85: Error: invalid sprg number
From: John Donnelly @ 2014-03-19 22:58 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1276 bytes --]
Platform: Freescale p4080--e500mc ,
Suggestions welcome .
/bin/sh arch/powerpc/kernel/systbl_chk.sh arch/powerpc/kernel/systbl_chk.i
make -f scripts/Makefile.build obj=arch/powerpc/kernel/vdso32
gcc -mbig-endian -m32 -Wp,-MD,arch/powerpc/kernel/.swsusp_booke.o.d
-nostdinc -isystem /usr/lib/gcc/ppc64-redhat-linux/4.8.2/include
-I/root/linux-3.13.6/arch/powerpc/include -Iarch/powerpc/include/generated
-Iinclude -I/root/linux-3.13.6/arch/powerpc/include/uapi
-Iarch/powerpc/include/generated/uapi -I/root/linux-3.13.6/include/uapi
-Iinclude/generated/uapi -include
/root/linux-3.13.6/include/linux/kconfig.h -D__KERNEL__ -Iarch/powerpc
-D__ASSEMBLY__ -Iarch/powerpc -gdwarf-2 -c -o
arch/powerpc/kernel/swsusp_booke.o arch/powerpc/kernel/swsusp_booke.S
arch/powerpc/kernel/swsusp_booke.S: Assembler messages:
arch/powerpc/kernel/swsusp_booke.S:85: Error: invalid sprg number
arch/powerpc/kernel/swsusp_booke.S:87: Error: invalid sprg number
--
*Regards,*
* John.*
*--*
*o* Energy-efficiency is #1 reason data centers look to expand. -- Digital
Realty Trust
*o* Green Data Centers spending to increase 300% worldwide by 2016. --
Pike Research
*o *Data Centers have become as vital to the functioni
ng of society as power stations. -- The Economist
[-- Attachment #2: Type: text/html, Size: 3186 bytes --]
^ permalink raw reply
* [PATCH 4/4] ARCH: AUDIT: audit_syscall_entry() should not require the arch
From: Eric Paris @ 2014-03-19 22:04 UTC (permalink / raw)
To: linux-audit
Cc: linux-mips, x86, linux-ia64, user-mode-linux-devel, linux-parisc,
linux-s390, linux-xtensa, microblaze-uclinux, linux, linux-sh,
Eric Paris, linux-alpha, sparclinux, linuxppc-dev,
linux-arm-kernel
In-Reply-To: <1395266643-3139-1-git-send-email-eparis@redhat.com>
We have a function where the arch can be queried, syscall_get_arch().
So rather than have every single piece of arch specific code use and/or
duplicate syscall_get_arch(), just have the audit code use the
syscall_get_arch() code.
Signed-off-by: Eric Paris <eparis@redhat.com>
Cc: linux-alpha@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-ia64@vger.kernel.org
Cc: microblaze-uclinux@itee.uq.edu.au
Cc: linux-mips@linux-mips.org
Cc: linux@lists.openrisc.net
Cc: linux-parisc@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-s390@vger.kernel.org
Cc: linux-sh@vger.kernel.org
Cc: sparclinux@vger.kernel.org
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: linux-xtensa@linux-xtensa.org
Cc: x86@kernel.org
---
arch/alpha/kernel/ptrace.c | 2 +-
arch/arm/kernel/ptrace.c | 4 ++--
arch/ia64/kernel/ptrace.c | 2 +-
arch/microblaze/kernel/ptrace.c | 3 +--
arch/mips/kernel/ptrace.c | 4 +---
arch/openrisc/kernel/ptrace.c | 3 +--
arch/parisc/kernel/ptrace.c | 9 +++------
arch/powerpc/kernel/ptrace.c | 7 ++-----
arch/s390/kernel/ptrace.c | 4 +---
arch/sh/kernel/ptrace_32.c | 14 +-------------
arch/sh/kernel/ptrace_64.c | 17 +----------------
arch/sparc/kernel/ptrace_64.c | 9 ++-------
arch/um/kernel/ptrace.c | 3 +--
arch/x86/kernel/ptrace.c | 8 ++------
arch/x86/um/asm/ptrace.h | 4 ----
arch/xtensa/kernel/ptrace.c | 2 +-
include/linux/audit.h | 7 ++++---
17 files changed, 25 insertions(+), 77 deletions(-)
diff --git a/arch/alpha/kernel/ptrace.c b/arch/alpha/kernel/ptrace.c
index 86d8351..d9ee817 100644
--- a/arch/alpha/kernel/ptrace.c
+++ b/arch/alpha/kernel/ptrace.c
@@ -321,7 +321,7 @@ asmlinkage unsigned long syscall_trace_enter(void)
if (test_thread_flag(TIF_SYSCALL_TRACE) &&
tracehook_report_syscall_entry(current_pt_regs()))
ret = -1UL;
- audit_syscall_entry(AUDIT_ARCH_ALPHA, regs->r0, regs->r16, regs->r17, regs->r18, regs->r19);
+ audit_syscall_entry(regs->r0, regs->r16, regs->r17, regs->r18, regs->r19);
return ret ?: current_pt_regs()->r0;
}
diff --git a/arch/arm/kernel/ptrace.c b/arch/arm/kernel/ptrace.c
index 0dd3b79..c9d2b34 100644
--- a/arch/arm/kernel/ptrace.c
+++ b/arch/arm/kernel/ptrace.c
@@ -943,8 +943,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs, int scno)
if (test_thread_flag(TIF_SYSCALL_TRACEPOINT))
trace_sys_enter(regs, scno);
- audit_syscall_entry(AUDIT_ARCH_ARM, scno, regs->ARM_r0, regs->ARM_r1,
- regs->ARM_r2, regs->ARM_r3);
+ audit_syscall_entry(scno, regs->ARM_r0, regs->ARM_r1, regs->ARM_r2,
+ regs->ARM_r3);
return scno;
}
diff --git a/arch/ia64/kernel/ptrace.c b/arch/ia64/kernel/ptrace.c
index b7a5fff..6f54d51 100644
--- a/arch/ia64/kernel/ptrace.c
+++ b/arch/ia64/kernel/ptrace.c
@@ -1219,7 +1219,7 @@ syscall_trace_enter (long arg0, long arg1, long arg2, long arg3,
ia64_sync_krbs();
- audit_syscall_entry(AUDIT_ARCH_IA64, regs.r15, arg0, arg1, arg2, arg3);
+ audit_syscall_entry(regs.r15, arg0, arg1, arg2, arg3);
return 0;
}
diff --git a/arch/microblaze/kernel/ptrace.c b/arch/microblaze/kernel/ptrace.c
index 39cf508..bb10637 100644
--- a/arch/microblaze/kernel/ptrace.c
+++ b/arch/microblaze/kernel/ptrace.c
@@ -147,8 +147,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
*/
ret = -1L;
- audit_syscall_entry(EM_MICROBLAZE, regs->r12, regs->r5, regs->r6,
- regs->r7, regs->r8);
+ audit_syscall_entry(regs->r12, regs->r5, regs->r6, regs->r7, regs->r8);
return ret ?: regs->r12;
}
diff --git a/arch/mips/kernel/ptrace.c b/arch/mips/kernel/ptrace.c
index 65ba622..c06bb82 100644
--- a/arch/mips/kernel/ptrace.c
+++ b/arch/mips/kernel/ptrace.c
@@ -671,9 +671,7 @@ asmlinkage void syscall_trace_enter(struct pt_regs *regs)
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_enter(regs, regs->regs[2]);
- audit_syscall_entry(syscall_get_arch(),
- regs->regs[2],
- regs->regs[4], regs->regs[5],
+ audit_syscall_entry(regs->regs[2], regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]);
}
diff --git a/arch/openrisc/kernel/ptrace.c b/arch/openrisc/kernel/ptrace.c
index 71a2a0c..4f59fa4 100644
--- a/arch/openrisc/kernel/ptrace.c
+++ b/arch/openrisc/kernel/ptrace.c
@@ -187,8 +187,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
*/
ret = -1L;
- audit_syscall_entry(AUDIT_ARCH_OPENRISC, regs->gpr[11],
- regs->gpr[3], regs->gpr[4],
+ audit_syscall_entry(regs->gpr[11], regs->gpr[3], regs->gpr[4],
regs->gpr[5], regs->gpr[6]);
return ret ? : regs->gpr[11];
diff --git a/arch/parisc/kernel/ptrace.c b/arch/parisc/kernel/ptrace.c
index e842ee2..7481457 100644
--- a/arch/parisc/kernel/ptrace.c
+++ b/arch/parisc/kernel/ptrace.c
@@ -276,14 +276,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
#ifdef CONFIG_64BIT
if (!is_compat_task())
- audit_syscall_entry(AUDIT_ARCH_PARISC64,
- regs->gr[20],
- regs->gr[26], regs->gr[25],
- regs->gr[24], regs->gr[23]);
+ audit_syscall_entry(regs->gr[20], regs->gr[26], regs->gr[25],
+ regs->gr[24], regs->gr[23]);
else
#endif
- audit_syscall_entry(AUDIT_ARCH_PARISC,
- regs->gr[20] & 0xffffffff,
+ audit_syscall_entry(regs->gr[20] & 0xffffffff,
regs->gr[26] & 0xffffffff,
regs->gr[25] & 0xffffffff,
regs->gr[24] & 0xffffffff,
diff --git a/arch/powerpc/kernel/ptrace.c b/arch/powerpc/kernel/ptrace.c
index 2e3d2bf..524a943 100644
--- a/arch/powerpc/kernel/ptrace.c
+++ b/arch/powerpc/kernel/ptrace.c
@@ -1788,14 +1788,11 @@ long do_syscall_trace_enter(struct pt_regs *regs)
#ifdef CONFIG_PPC64
if (!is_32bit_task())
- audit_syscall_entry(AUDIT_ARCH_PPC64,
- regs->gpr[0],
- regs->gpr[3], regs->gpr[4],
+ audit_syscall_entry(regs->gpr[0], regs->gpr[3], regs->gpr[4],
regs->gpr[5], regs->gpr[6]);
else
#endif
- audit_syscall_entry(AUDIT_ARCH_PPC,
- regs->gpr[0],
+ audit_syscall_entry(regs->gpr[0],
regs->gpr[3] & 0xffffffff,
regs->gpr[4] & 0xffffffff,
regs->gpr[5] & 0xffffffff,
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c
index e65c91c..2e2e7bb5 100644
--- a/arch/s390/kernel/ptrace.c
+++ b/arch/s390/kernel/ptrace.c
@@ -812,9 +812,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_enter(regs, regs->gprs[2]);
- audit_syscall_entry(is_compat_task() ?
- AUDIT_ARCH_S390 : AUDIT_ARCH_S390X,
- regs->gprs[2], regs->orig_gpr2,
+ audit_syscall_entry(regs->gprs[2], regs->orig_gpr2,
regs->gprs[3], regs->gprs[4],
regs->gprs[5]);
out:
diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c
index 668c816..c1a6b89 100644
--- a/arch/sh/kernel/ptrace_32.c
+++ b/arch/sh/kernel/ptrace_32.c
@@ -484,17 +484,6 @@ long arch_ptrace(struct task_struct *child, long request,
return ret;
}
-static inline int audit_arch(void)
-{
- int arch = EM_SH;
-
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
- arch |= __AUDIT_ARCH_LE;
-#endif
-
- return arch;
-}
-
asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
{
long ret = 0;
@@ -513,8 +502,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs)
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_enter(regs, regs->regs[0]);
- audit_syscall_entry(audit_arch(), regs->regs[3],
- regs->regs[4], regs->regs[5],
+ audit_syscall_entry(regs->regs[3], regs->regs[4], regs->regs[5],
regs->regs[6], regs->regs[7]);
return ret ?: regs->regs[0];
diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c
index af90339..5cea973 100644
--- a/arch/sh/kernel/ptrace_64.c
+++ b/arch/sh/kernel/ptrace_64.c
@@ -504,20 +504,6 @@ asmlinkage int sh64_ptrace(long request, long pid,
return sys_ptrace(request, pid, addr, data);
}
-static inline int audit_arch(void)
-{
- int arch = EM_SH;
-
-#ifdef CONFIG_64BIT
- arch |= __AUDIT_ARCH_64BIT;
-#endif
-#ifdef CONFIG_CPU_LITTLE_ENDIAN
- arch |= __AUDIT_ARCH_LE;
-#endif
-
- return arch;
-}
-
asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)
{
long long ret = 0;
@@ -536,8 +522,7 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs)
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_enter(regs, regs->regs[9]);
- audit_syscall_entry(audit_arch(), regs->regs[1],
- regs->regs[2], regs->regs[3],
+ audit_syscall_entry(regs->regs[1], regs->regs[2], regs->regs[3],
regs->regs[4], regs->regs[5]);
return ret ?: regs->regs[9];
diff --git a/arch/sparc/kernel/ptrace_64.c b/arch/sparc/kernel/ptrace_64.c
index c13c9f2..9ddc492 100644
--- a/arch/sparc/kernel/ptrace_64.c
+++ b/arch/sparc/kernel/ptrace_64.c
@@ -1076,13 +1076,8 @@ asmlinkage int syscall_trace_enter(struct pt_regs *regs)
if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT)))
trace_sys_enter(regs, regs->u_regs[UREG_G1]);
- audit_syscall_entry((test_thread_flag(TIF_32BIT) ?
- AUDIT_ARCH_SPARC :
- AUDIT_ARCH_SPARC64),
- regs->u_regs[UREG_G1],
- regs->u_regs[UREG_I0],
- regs->u_regs[UREG_I1],
- regs->u_regs[UREG_I2],
+ audit_syscall_entry(regs->u_regs[UREG_G1], regs->u_regs[UREG_I0],
+ regs->u_regs[UREG_I1], regs->u_regs[UREG_I2],
regs->u_regs[UREG_I3]);
return ret;
diff --git a/arch/um/kernel/ptrace.c b/arch/um/kernel/ptrace.c
index 694d551..62435ef 100644
--- a/arch/um/kernel/ptrace.c
+++ b/arch/um/kernel/ptrace.c
@@ -165,8 +165,7 @@ static void send_sigtrap(struct task_struct *tsk, struct uml_pt_regs *regs,
*/
void syscall_trace_enter(struct pt_regs *regs)
{
- audit_syscall_entry(HOST_AUDIT_ARCH,
- UPT_SYSCALL_NR(®s->regs),
+ audit_syscall_entry(UPT_SYSCALL_NR(®s->regs),
UPT_SYSCALL_ARG1(®s->regs),
UPT_SYSCALL_ARG2(®s->regs),
UPT_SYSCALL_ARG3(®s->regs),
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 7461f50..46dfba6 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1488,15 +1488,11 @@ long syscall_trace_enter(struct pt_regs *regs)
trace_sys_enter(regs, regs->orig_ax);
if (IS_IA32)
- audit_syscall_entry(AUDIT_ARCH_I386,
- regs->orig_ax,
- regs->bx, regs->cx,
+ audit_syscall_entry(regs->orig_ax, regs->bx, regs->cx,
regs->dx, regs->si);
#ifdef CONFIG_X86_64
else
- audit_syscall_entry(AUDIT_ARCH_X86_64,
- regs->orig_ax,
- regs->di, regs->si,
+ audit_syscall_entry(regs->orig_ax, regs->di, regs->si,
regs->dx, regs->r10);
#endif
diff --git a/arch/x86/um/asm/ptrace.h b/arch/x86/um/asm/ptrace.h
index 54f8102..e59eef2 100644
--- a/arch/x86/um/asm/ptrace.h
+++ b/arch/x86/um/asm/ptrace.h
@@ -47,8 +47,6 @@ struct user_desc;
#ifdef CONFIG_X86_32
-#define HOST_AUDIT_ARCH AUDIT_ARCH_I386
-
extern int ptrace_get_thread_area(struct task_struct *child, int idx,
struct user_desc __user *user_desc);
@@ -57,8 +55,6 @@ extern int ptrace_set_thread_area(struct task_struct *child, int idx,
#else
-#define HOST_AUDIT_ARCH AUDIT_ARCH_X86_64
-
#define PT_REGS_R8(r) UPT_R8(&(r)->regs)
#define PT_REGS_R9(r) UPT_R9(&(r)->regs)
#define PT_REGS_R10(r) UPT_R10(&(r)->regs)
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c
index 562fac6..4d54b48 100644
--- a/arch/xtensa/kernel/ptrace.c
+++ b/arch/xtensa/kernel/ptrace.c
@@ -342,7 +342,7 @@ void do_syscall_trace_enter(struct pt_regs *regs)
do_syscall_trace();
#if 0
- audit_syscall_entry(current, AUDIT_ARCH_XTENSA..);
+ audit_syscall_entry(...);
#endif
}
diff --git a/include/linux/audit.h b/include/linux/audit.h
index 4b2983e..62c9d98 100644
--- a/include/linux/audit.h
+++ b/include/linux/audit.h
@@ -26,6 +26,7 @@
#include <linux/sched.h>
#include <linux/ptrace.h>
#include <uapi/linux/audit.h>
+#include <asm/syscall.h>
struct audit_sig_info {
uid_t uid;
@@ -135,12 +136,12 @@ static inline void audit_free(struct task_struct *task)
if (unlikely(task->audit_context))
__audit_free(task);
}
-static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
+static inline void audit_syscall_entry(int major, unsigned long a0,
unsigned long a1, unsigned long a2,
unsigned long a3)
{
if (unlikely(current->audit_context))
- __audit_syscall_entry(arch, major, a0, a1, a2, a3);
+ __audit_syscall_entry(syscall_get_arch(), major, a0, a1, a2, a3);
}
static inline void audit_syscall_exit(void *pt_regs)
{
@@ -316,7 +317,7 @@ static inline int audit_alloc(struct task_struct *task)
}
static inline void audit_free(struct task_struct *task)
{ }
-static inline void audit_syscall_entry(int arch, int major, unsigned long a0,
+static inline void audit_syscall_entry(int major, unsigned long a0,
unsigned long a1, unsigned long a2,
unsigned long a3)
{ }
--
1.8.5.3
^ permalink raw reply related
* Re: [PATCH 3/4] ARCH: AUDIT: implement syscall_get_arch for all arches
From: Eric Paris @ 2014-03-19 23:02 UTC (permalink / raw)
To: Matt Turner
Cc: linux-mips@linux-mips.org, linux-ia64,
linux-parisc@vger.kernel.org, microblaze-uclinux, linux,
linux-audit, sparclinux, linuxppc-dev
In-Reply-To: <CAEdQ38Ex47GxhN1ZZMu+RETpWs-ENbfCr8v=6iFg9p_QWaa9zw@mail.gmail.com>
On Wed, 2014-03-19 at 15:19 -0700, Matt Turner wrote:
> On Wed, Mar 19, 2014 at 3:04 PM, Eric Paris <eparis@redhat.com> wrote:
> > For all arches which support audit implement syscall_get_arch()
>
> support audit -- is that AUDIT_ARCH? If so, alpha gained support
> recently, so I think this patch needs to handle alpha too?
Absolutely right. I broke Alpha (in the next patch). Will fix.
-Eric
^ 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